summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>1999-12-30 00:00:00 +0100
committerHans Hagen <pragma@wxs.nl>1999-12-30 00:00:00 +0100
commitdd50c74f0702bff05e96d5d3994316405414663e (patch)
tree1afbfa61cdd0721fa4eea8892972a6a183b05610 /tex
parentb386eada290e225dc25484133c2bc5697024a822 (diff)
downloadcontext-dd50c74f0702bff05e96d5d3994316405414663e.tar.gz
stable 1999.12.30
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/colo-ini.tex123
-rw-r--r--tex/context/base/colo-rgb.tex56
-rw-r--r--tex/context/base/cont-cz.tex35
-rw-r--r--tex/context/base/cont-de.tex11
-rw-r--r--tex/context/base/cont-en.tex11
-rw-r--r--tex/context/base/cont-fil.tex24
-rw-r--r--tex/context/base/cont-log.tex4
-rw-r--r--tex/context/base/cont-new.tex523
-rw-r--r--tex/context/base/cont-nl.tex11
-rw-r--r--tex/context/base/cont-old.tex2
-rw-r--r--tex/context/base/cont-sys.rme75
-rw-r--r--tex/context/base/cont-uk.tex13
-rw-r--r--tex/context/base/cont-usr.ori89
-rw-r--r--tex/context/base/context.tex86
-rw-r--r--tex/context/base/core-01a.tex3678
-rw-r--r--tex/context/base/core-01b.tex315
-rw-r--r--tex/context/base/core-01c.tex223
-rw-r--r--tex/context/base/core-01d.tex380
-rw-r--r--tex/context/base/core-01e.tex212
-rw-r--r--tex/context/base/core-02a.tex71
-rw-r--r--tex/context/base/core-02b.tex24
-rw-r--r--tex/context/base/core-02d.tex12
-rw-r--r--tex/context/base/core-con.tex301
-rw-r--r--tex/context/base/core-dat.tex254
-rw-r--r--tex/context/base/core-fig.tex661
-rw-r--r--tex/context/base/core-fil.tex71
-rw-r--r--tex/context/base/core-fld.tex48
-rw-r--r--tex/context/base/core-fnt.tex32
-rw-r--r--tex/context/base/core-gen.tex2
-rw-r--r--tex/context/base/core-grd.tex11
-rw-r--r--tex/context/base/core-hlp.tex126
-rw-r--r--tex/context/base/core-int.tex6
-rw-r--r--tex/context/base/core-mak.tex4
-rw-r--r--tex/context/base/core-mat.tex24
-rw-r--r--tex/context/base/core-mis.tex2
-rw-r--r--tex/context/base/core-mps.tex85
-rw-r--r--tex/context/base/core-mul.tex308
-rw-r--r--tex/context/base/core-nav.tex35
-rw-r--r--tex/context/base/core-new.tex127
-rw-r--r--tex/context/base/core-not.tex197
-rw-r--r--tex/context/base/core-obj.tex68
-rw-r--r--tex/context/base/core-pag.tex595
-rw-r--r--tex/context/base/core-ref.tex365
-rw-r--r--tex/context/base/core-reg.tex873
-rw-r--r--tex/context/base/core-rul.tex94
-rw-r--r--tex/context/base/core-tab.tex333
-rw-r--r--tex/context/base/core-tbl.tex166
-rw-r--r--tex/context/base/core-var.tex7
-rw-r--r--tex/context/base/core-ver.tex278
-rw-r--r--tex/context/base/core-vis.tex10
-rw-r--r--tex/context/base/enco-ans.tex29
-rw-r--r--tex/context/base/enco-chi.tex183
-rw-r--r--tex/context/base/enco-ec.tex236
-rw-r--r--tex/context/base/enco-ibm.tex71
-rw-r--r--tex/context/base/enco-il2.tex57
-rw-r--r--tex/context/base/enco-ini.tex481
-rw-r--r--tex/context/base/enco-lat.tex32
-rw-r--r--tex/context/base/enco-mis.tex59
-rw-r--r--tex/context/base/enco-pdf.tex40
-rw-r--r--tex/context/base/enco-pol.tex254
-rw-r--r--tex/context/base/enco-uni.tex23
-rw-r--r--tex/context/base/enco-vis.tex154
-rw-r--r--tex/context/base/enco-win.tex246
-rw-r--r--tex/context/base/enco-x5.tex235
-rw-r--r--tex/context/base/font-ant.tex28
-rw-r--r--tex/context/base/font-arb.tex327
-rw-r--r--tex/context/base/font-ber.tex44
-rw-r--r--tex/context/base/font-chi.tex943
-rw-r--r--tex/context/base/font-cmr.tex53
-rw-r--r--tex/context/base/font-cmx.tex98
-rw-r--r--tex/context/base/font-con.tex2
-rw-r--r--tex/context/base/font-csr.tex129
-rw-r--r--tex/context/base/font-eul.tex2
-rw-r--r--tex/context/base/font-fil.tex15
-rw-r--r--tex/context/base/font-heb.tex50
-rw-r--r--tex/context/base/font-ini.tex305
-rw-r--r--tex/context/base/font-lbr.tex5
-rw-r--r--tex/context/base/font-map.tex2
-rw-r--r--tex/context/base/font-pcr.tex8
-rw-r--r--tex/context/base/font-phv.tex2
-rw-r--r--tex/context/base/font-plr.tex130
-rw-r--r--tex/context/base/font-pos.tex2
-rw-r--r--tex/context/base/font-ptm.tex2
-rw-r--r--tex/context/base/font-uni.tex439
-rw-r--r--tex/context/base/font-unk.tex82
-rw-r--r--tex/context/base/font-vnr.tex50
-rw-r--r--tex/context/base/java-ans.tex4
-rw-r--r--tex/context/base/java-fil.tex8
-rw-r--r--tex/context/base/java-fld.tex61
-rw-r--r--tex/context/base/java-ini.tex104
-rw-r--r--tex/context/base/lang-alt.tex6
-rw-r--r--tex/context/base/lang-ana.tex2
-rw-r--r--tex/context/base/lang-art.tex2
-rw-r--r--tex/context/base/lang-bal.tex2
-rw-r--r--tex/context/base/lang-cel.tex2
-rw-r--r--tex/context/base/lang-chi.tex91
-rw-r--r--tex/context/base/lang-ger.tex101
-rw-r--r--tex/context/base/lang-grk.tex2
-rw-r--r--tex/context/base/lang-hnl.tex32
-rw-r--r--tex/context/base/lang-ind.tex2
-rw-r--r--tex/context/base/lang-ini.tex166
-rw-r--r--tex/context/base/lang-ita.tex77
-rw-r--r--tex/context/base/lang-lab.tex62
-rw-r--r--tex/context/base/lang-sla.tex242
-rw-r--r--tex/context/base/lang-ura.tex6
-rw-r--r--tex/context/base/lang-vn.tex83
-rw-r--r--tex/context/base/m-chart.tex939
-rw-r--r--tex/context/base/m-chemic.tex2
-rw-r--r--tex/context/base/m-pictex.tex2
-rw-r--r--tex/context/base/m-pstric.tex2
-rw-r--r--tex/context/base/m-units.tex2
-rw-r--r--tex/context/base/mult-com.tex1209
-rw-r--r--tex/context/base/mult-con.tex848
-rw-r--r--tex/context/base/mult-ini.tex330
-rw-r--r--tex/context/base/mult-sys.tex65
-rw-r--r--tex/context/base/ppchtex.tex32
-rw-r--r--tex/context/base/s-abr-01.tex23
-rw-r--r--tex/context/base/s-abr-02.tex2
-rw-r--r--tex/context/base/s-abr-03.tex22
-rw-r--r--tex/context/base/s-dtk-01.tex257
-rw-r--r--tex/context/base/s-faq-00.tex2
-rw-r--r--tex/context/base/s-faq-01.tex52
-rw-r--r--tex/context/base/s-faq-02.tex4
-rw-r--r--tex/context/base/s-faq-03.tex2
-rw-r--r--tex/context/base/s-map-01.tex14
-rw-r--r--tex/context/base/s-pre-00.tex169
-rw-r--r--tex/context/base/s-pre-01.tex36
-rw-r--r--tex/context/base/s-pre-02.tex104
-rw-r--r--tex/context/base/s-pre-03.tex200
-rw-r--r--tex/context/base/s-pre-04.tex376
-rw-r--r--tex/context/base/s-pre-05.tex214
-rw-r--r--tex/context/base/s-pre-06.tex294
-rw-r--r--tex/context/base/spec-dvi.tex3
-rw-r--r--tex/context/base/spec-fdf.tex800
-rw-r--r--tex/context/base/spec-ini.tex134
-rw-r--r--tex/context/base/spec-mis.tex39
-rw-r--r--tex/context/base/spec-pdf.tex14
-rw-r--r--tex/context/base/spec-ps.tex19
-rw-r--r--tex/context/base/spec-tpd.tex493
-rw-r--r--tex/context/base/spec-tr.tex2
-rw-r--r--tex/context/base/spec-win.tex8
-rw-r--r--tex/context/base/spec-yy.tex3
-rw-r--r--tex/context/base/supp-box.tex200
-rw-r--r--tex/context/base/supp-eps.tex15
-rw-r--r--tex/context/base/supp-fil.tex54
-rw-r--r--tex/context/base/supp-fun.tex2
-rw-r--r--tex/context/base/supp-ini.tex2
-rw-r--r--tex/context/base/supp-lan.tex138
-rw-r--r--tex/context/base/supp-mat.tex2
-rw-r--r--tex/context/base/supp-mis.tex2
-rw-r--r--tex/context/base/supp-mps.tex165
-rw-r--r--tex/context/base/supp-mrk.tex88
-rw-r--r--tex/context/base/supp-num.tex2
-rw-r--r--tex/context/base/supp-pdf.tex215
-rw-r--r--tex/context/base/supp-ran.tex87
-rw-r--r--tex/context/base/supp-spe.tex2
-rw-r--r--tex/context/base/supp-tpi.tex6
-rw-r--r--tex/context/base/supp-vis.tex2
-rw-r--r--tex/context/base/symb-ini.tex39
-rw-r--r--tex/context/base/symb-nav.tex2
-rw-r--r--tex/context/base/syst-ext.tex368
-rw-r--r--tex/context/base/syst-gen.tex120
-rw-r--r--tex/context/base/syst-new.tex35
-rw-r--r--tex/context/base/syst-tex.tex16
-rw-r--r--tex/context/base/thrd-ran.tex149
-rw-r--r--tex/context/base/verb-ini.tex175
-rw-r--r--tex/context/base/verb-jv.tex21
-rw-r--r--tex/context/base/verb-mp.tex94
-rw-r--r--tex/context/base/verb-pl.tex33
-rw-r--r--tex/context/base/verb-sql.tex218
-rw-r--r--tex/context/base/verb-tex.tex43
-rw-r--r--tex/context/config/cont-usr.tex122
-rw-r--r--tex/generic/context/m-ch-de.tex10
-rw-r--r--tex/generic/context/m-ch-en.tex10
-rw-r--r--tex/generic/context/m-ch-nl.tex10
-rw-r--r--tex/generic/context/m-metapo.tex89
-rw-r--r--tex/generic/context/ppchtex.noc205
-rw-r--r--tex/latex/context/m-ch-de.sty1
-rw-r--r--tex/latex/context/m-ch-en.sty1
-rw-r--r--tex/latex/context/m-ch-nl.sty1
-rw-r--r--tex/latex/context/m-metapo.sty1
-rw-r--r--tex/latex/context/m-pictex.sty1
182 files changed, 19919 insertions, 6478 deletions
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index d7ec042b6..f8bb83543 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Color Macros}
@@ -108,6 +108,21 @@
11: Farbe wird in Grau umgewandelt
\stopmessages
+\startmessages czech library: colors
+ title: barva
+ 1: system -- je globalne aktivovana
+ 2: system -- je lokalne activovana
+ 3: -- neni definovana
+ 4: system -- je nacten
+ 5: neznamy system --
+ 6: palette -- je k dispozici
+ 7: palette -- neni k dispozici
+ 8: (naplatna) specifikace -- v barve -- bude cerna
+ 9: -- prostor barev neni podporovan
+ 10: -- prostor barev je podporovan
+ 11: barva je prevedena na sed
+\stopmessages
+
%D \macros
%D {definecolor}
%D
@@ -452,38 +467,10 @@
\doconvertCMYKtoCMY#3\k#4\to\@@cl@@y
\let\@@cl@@k=\@@cl@@z}
-%D We already mentioned that colors interfere with building
-%D the pagebody. This means that when the page is composed,
-%D the colors temporary have to be reset. After the page is
-%D shipped out, we have to revive the current color.
-%D
-%D We use \type{\marks} to keep track of colors across page
-%D boundaries. Unfortunately standard \TEX\ supports only one mark,
-%D and using this one for color support only would be a waste.
-%D We therefore use an adapted version of J.~Fox's multiple mark
-%D mechanism as (re|)|implemented in \module{supp-mrk}.
-
-\doifdefinedelse{newmark}
- {\newmark\colormark}
- {\def\colormark#1{}}
-
-%D Using this mark mechanism with lots of colors has one
-%D major drawback: \TEX's memory tends to overflow when
-%D very colorful text is stored in a global box. Even worse is that
-%D the processing time grows considerably. We therefore support
-%D local as well as global color switching.
-%D
-%D Of the next macros, \type{\popcolor} is to be used after
-%D the actual \type{\shipout} and \type{\startcolorpage} and
-%D \type{\stopcolorpage} are called when entering and leaving
-%D the \type{\pagebody} builder. In case of emergencies
-%D \type{\pushcolor} can be used to undo the current color,
-%D for instance when insertions are appended to the page.
-
%D Before we present the color macros, we first define the
%D setup command. This command takes care of setting up the
-%D booleans that control local and global behavior and
-%D conversion to other color spaces.
+%D booleans that control local and global behavior (more on
+%D that later) and conversion to other color spaces.
\newif\ifincolor
\newif\iflocalcolor
@@ -611,8 +598,8 @@
{\xdef\currentcolor{\getvalue{\??cl\the\colorlevel C}}%
\global\advance\colorlevel by \@@colorplus1
\setxvalue{\??cl\the\colorlevel C}{#1}%
- \debuggerinfo{\m!colors}
- {start #1 at level \the\colorlevel}%
+ %\debuggerinfo{\m!colors}
+ % {start #1 at level \the\colorlevel}%
\doifelsenothing{#1}
{\setxvalue{\??cl\the\colorlevel C}{\currentcolor}%
\setgvalue{\??cl\the\colorlevel S}{\donoglobalstopcolor}}
@@ -638,8 +625,8 @@
\def\donoglobalstopcolor%
{\ifnum\colorlevel=0 \else
\xdef\currentcolor{\getvalue{\??cl\the\colorlevel C}}%
- \debuggerinfo{\m!colors}
- {stop \currentcolor\normalspace at level \the\colorlevel}%
+ %\debuggerinfo{\m!colors}
+ % {stop \currentcolor\normalspace at level \the\colorlevel}%
\global\advance\colorlevel by \@@colorminus1
\fi}
@@ -714,32 +701,57 @@
%D \stopkleur
%D \stopbuffer
%D
-%D \startvoorbeeld
+%D \startopelkaar
%D \haalbuffer
-%D \stopvoorbeeld
+%D \stopopelkaar
%D
%D These quotes are typeset by saying:
%D
%D \typebuffer
+
+%D We already mentioned that colors interfere with building
+%D the pagebody. This means that when the page is composed,
+%D the colors temporary have to be reset. After the page is
+%D shipped out, we have to revive the current color.
+%D
+%D We use \type{\marks} to keep track of colors across page
+%D boundaries. Unfortunately standard \TEX\ supports only one mark,
+%D and using this one for color support only would be a waste.
+%D We therefore use an adapted version of J.~Fox's multiple mark
+%D mechanism as (re|)|implemented in \module{supp-mrk}.
+
+\doifdefinedelse{newmark}
+ {\newmark\colormark}
+ {\def\colormark#1{}}
+
+%D Using this mark mechanism with lots of colors has one
+%D major drawback: \TEX's memory tends to overflow when
+%D very colorful text is stored in a global box. Even worse is that
+%D the processing time grows considerably. We therefore support
+%D local as well as global color switching.
%D
+%D Of the next macros, \type{\popcolor} is to be used after
+%D the actual \type{\shipout} and \type{\startcolorpage} and
+%D \type{\stopcolorpage} are called when entering and leaving
+%D the \type{\pagebody} builder. In case of emergencies
+%D \type{\pushcolor} can be used to undo the current color,
+%D for instance when insertions are appended to the page.
+%D
%D Out of efficiency we only use marks when needed. The next
%D macro tries to find out if indeed a mark should be set.
%D This macro uses the boolean \type{\ifinpagebody}, which can
%D be defined and set in the module that handles the pagebody.
\def\docolormark#1%
- {\ifinpagebody \else
- \iflocalcolor \else
- \dodocolormark{#1}%
- \fi
- \fi}
+ {\iflocalcolor \else \ifinpagebody \else \ifinframed \else
+ \dodocolormark{#1}%
+ \fi \fi \fi}
\let\lastcolormark=\empty
\def\dodocolormark#1%
{\doifnot{#1}{\lastcolormark}
{\xdef\lastcolormark{#1}%
- %\expandafter\colormark\expandafter{\lastcolormark}}}
\expandafter\setmark\expandafter\colormark\expandafter{\lastcolormark}}}
%D \macros
@@ -752,26 +764,15 @@
\def\pushcolor%
{\stopcolormode}
-%\def\popcolor%
-% {\doifsomething{\botcolormark}
-% {\debuggerinfo{\m!colors}{popping \botcolormark}%
-% \startcolormode{\botcolormark}}}
-%
-%\def\popsplitcolor%
-% {\getsplitmarks\colormark % hier wel
-% \doifsomething{\botcolormark}
-% {\debuggerinfo{\m!colors}{split popping \botcolormark}%
-% \startcolormode{\botcolormark}}}
-
\def\popcolor%
{\doifsomething{\getbotmark\colormark}
- {\debuggerinfo{\m!colors}{popping \getbotmark\colormark}%
+ {%\debuggerinfo{\m!colors}{popping \getbotmark\colormark}%
\startcolormode{\getbotmark\colormark}}}
\def\popsplitcolor%
{\getsplitmarks\colormark % hier wel
\doifsomething{\getsplitbotmark\colormark}
- {\debuggerinfo{\m!colors}{split popping \getsplitbotmark\colormark}%
+ {%\debuggerinfo{\m!colors}{split popping \getsplitbotmark\colormark}%
\startcolormode{\getsplitbotmark\colormark}}}
%D \macros
@@ -805,8 +806,8 @@
\def\@@colorminus{+}%
\let\docolormark=\gobbleoneargument
\edef\savedcolorlevel{\the\colorlevel}%
- \localstartcolor[black]%
- \global\colorlevel=0 }
+ \global\colorlevel=0 % before \localstartcolor of
+ \localstartcolor[black]} % course, ugly bug removed
\def\stopcolorpage%
{\localstopcolor
@@ -1515,9 +1516,6 @@
%D We default to the colors defined in \module{colo-rgb} and
%D support both \kap{RGB} and \kap{CMYK} output.
-\setupcolor
- [\v!rgb]
-
\setupcolors
[\c!status=\v!stop,
\c!conversie=\v!ja,
@@ -1525,6 +1523,9 @@
\c!rgb=\v!ja,
\c!cmyk=\v!ja]
+\setupcolor
+ [\v!rgb]
+
%D As we can see, color support is turned off by default.
%D Reduction of gray colors to gray scales is turned on.
diff --git a/tex/context/base/colo-rgb.tex b/tex/context/base/colo-rgb.tex
index b2e34f93a..445b8ed8e 100644
--- a/tex/context/base/colo-rgb.tex
+++ b/tex/context/base/colo-rgb.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D Just to give users a start we define some colors. While
@@ -141,6 +141,46 @@
\stopinterface
+\startinterface czech
+
+ \definecolor [cervena] [red]
+ \definecolor [zelena] [green]
+ \definecolor [modra] [blue]
+
+ \definecolor [azurova] [cyan]
+ \definecolor [fialova] [magenta]
+ \definecolor [zluta] [yellow]
+
+ \definecolor [bila] [white]
+ \definecolor [cerna] [black]
+
+ \definecolor [tmavecervena] [darkred]
+ \definecolor [strednecervena][middlered]
+ \definecolor [svetlecervena] [lightred]
+
+ \definecolor [tmavezelena] [darkgreen]
+ \definecolor [strednezelena] [middlegreen]
+ \definecolor [svetlezelena] [lightgreen]
+
+ \definecolor [tmavemodra] [darkblue]
+ \definecolor [strednemodra] [middleblue]
+ \definecolor [svetlemodra] [lightblue]
+
+ \definecolor [tmaveazurova] [darkcyan]
+ \definecolor [stredneazurova][middlecyan]
+
+ \definecolor [tmavefialova] [darkmagenta]
+ \definecolor [strednefialova][middlemagenta]
+
+ \definecolor [tmavezluta] [darkyellow]
+ \definecolor [strednezluta] [middleyellow]
+
+ \definecolor [tmaveseda] [darkgray]
+ \definecolor [stredneseda] [middlegray]
+ \definecolor [svetleseda] [lightgray]
+
+\stopinterface
+
%D Like colors, we first define the english colorgroups. These
%D colorgroups are tuned for distinctive gray scale printing.
@@ -299,6 +339,20 @@
\definecolorgroup [gelb*] [yellow*]
\stopinterface
+\startinterface czech
+ \definecolorgroup [seda] [gray]
+ \definecolorgroup [cervena] [red]
+ \definecolorgroup [zelena] [green]
+ \definecolorgroup [modra] [blue]
+ \definecolorgroup [azurova] [cyan]
+ \definecolorgroup [fialova] [magenta]
+ \definecolorgroup [zluta] [yellow]
+ \definecolorgroup [cervena*][red*]
+ \definecolorgroup [zelena*] [green*]
+ \definecolorgroup [modra*] [blue*]
+ \definecolorgroup [zluta*] [yellow*]
+\stopinterface
+
%D The next set of color palets is quite language independant.
%D These palets are meant as examples.
diff --git a/tex/context/base/cont-cz.tex b/tex/context/base/cont-cz.tex
deleted file mode 100644
index f7816ffa5..000000000
--- a/tex/context/base/cont-cz.tex
+++ /dev/null
@@ -1,35 +0,0 @@
-%D \module
-%D [ file=cont-cz,
-%D version=1998.12.02,
-%D title=\CONTEXT,
-%D subtitle=\CONTEXT\ Czech Format Generation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
-
-\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{english}
-
-\input context.tex
-
-\unprotect
-
-\installlanguage [\s!en] [\c!status=\v!start]
-\installlanguage [\s!de] [\c!status=\v!start]
-
-\installlanguage [\s!cz] [\c!status=\v!start,\s!mapping=il2,\s!encoding=il2]
-\installlanguage [\s!sk] [\c!status=\v!start,\s!mapping=il2,\s!encoding=il2]
-
-\appendtoks \language [\s!cz] \to \everyjob
-\appendtoks \mainlanguage [\s!cz] \to \everyjob
-
-\setupbodyfont [csr,rm,12pt]
-
-\protect
-
-\dump
-
-\endinput
diff --git a/tex/context/base/cont-de.tex b/tex/context/base/cont-de.tex
index e1c373867..eb0ab22c4 100644
--- a/tex/context/base/cont-de.tex
+++ b/tex/context/base/cont-de.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{german}
@@ -17,6 +17,10 @@
\unprotect
+\setupcurrentlanguage[\s!de]
+
+\loaduserspecifications
+
\installlanguage [\s!en] [\c!status=\v!start]
\installlanguage [\s!uk] [\c!status=\v!start]
\installlanguage [\s!de] [\c!status=\v!start]
@@ -26,10 +30,7 @@
\installlanguage [deo] [\c!status=\v!start]
-\appendtoks \language [\s!de] \to \everyjob
-\appendtoks \mainlanguage [\s!de] \to \everyjob
-
-\setupbodyfont [cmr,cmx,rm,12pt]
+\setupbodyfont [cmr,rm,12pt]
\protect
diff --git a/tex/context/base/cont-en.tex b/tex/context/base/cont-en.tex
index b5fc1eaa1..544876940 100644
--- a/tex/context/base/cont-en.tex
+++ b/tex/context/base/cont-en.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{english}
@@ -17,6 +17,10 @@
\unprotect
+\setupcurrentlanguage[\s!en]
+
+\loaduserspecifications
+
\installlanguage [\s!en] [\c!status=\v!start]
\installlanguage [\s!uk] [\c!status=\v!start]
\installlanguage [\s!de] [\c!status=\v!start]
@@ -24,10 +28,7 @@
\installlanguage [\s!sp] [\c!status=\v!start]
\installlanguage [\s!nl] [\c!status=\v!start]
-\appendtoks \language [\s!en] \to \everyjob
-\appendtoks \mainlanguage [\s!en] \to \everyjob
-
-\setupbodyfont [cmr,cmx,rm,12pt]
+\setupbodyfont [cmr,rm,12pt]
\protect
diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex
index 89e9b1f3a..6a81465b8 100644
--- a/tex/context/base/cont-fil.tex
+++ b/tex/context/base/cont-fil.tex
@@ -8,17 +8,29 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context File Synonyms}
-\definefilesynonym [chemie] [chemic]
+\definefilesynonym [chemie] [chemic]
-\definefilesynonym [unit] [units]
-\definefilesynonym [eenheid] [units]
-\definefilesynonym [einheit] [units]
+\definefilesynonym [unit] [units]
+\definefilesynonym [eenheid] [units]
+\definefilesynonym [einheit] [units]
-\definefilesynonym [finance] [financ]
+\definefilesynonym [finance] [financ]
+
+\definefilesynonym [pre-general] [pre-00]
+
+\definefilesynonym [pre-original] [pre-01]
+\definefilesynonym [pre-green] [pre-02]
+\definefilesynonym [pre-funny] [pre-03]
+\definefilesynonym [pre-colorful] [pre-04]
+\definefilesynonym [pre-fuzzy] [pre-05]
+\definefilesynonym [pre-polish] [pre-06]
+
+\definefilesynonym [abr-pseudocaps] [abr-01]
+\definefilesynonym [abr-smallcaps] [abr-02]
\endinput
diff --git a/tex/context/base/cont-log.tex b/tex/context/base/cont-log.tex
index da24d9ff7..1aecd0efd 100644
--- a/tex/context/base/cont-log.tex
+++ b/tex/context/base/cont-log.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context TeX Logos}
@@ -142,7 +142,7 @@
%D Some placeholders:
-\def\eTeX {e-\TEX}
+\def\eTeX {\mathematics{\varepsilon}-\TEX}
\def\pdfTeX {pdf\TEX}
\def\pdfeTeX {pdfe-\TEX}
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 93a56deef..d42da211d 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -8,17 +8,528 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-%D This file is loaded at runtime, thereby providing an
-%D excelent place for hacks and new features.
+%D This file is loaded at runtime, thereby providing an
+%D excellent place for hacks and new features.
\unprotect
-% \writestatus{\m!systems}{BEWARE: SOMETHING NEW INSERTED!}
+\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!}
+
+% Speeds up when having a field with thousands of clones,
+% which we happen to have -)
-% \readfile{syst-eet}{}{} % temporary here
+\def\getmainfieldkids#1%
+ {\let\@@FieldKids\empty
+ \ifdefinemainfield
+ \definerawpasslist{fld:#1}% runtime defined by system
+ \moverawpasslist{fld:#1}\@@FieldKids
+ \fi}
+
+%D Let's also support a negative offset.
+
+\def\dooutlinebox#1\color#2\offset#3\corner#4\radius#5\depth#6\toggle#7\\%
+ {\vbox % rules on top of box
+ {\dimen0=#3\relax
+ \dimen2=\wd#1\advance\dimen2 by 2\dimen0
+ \dimen4=\ht#1\advance\dimen4 by \dimen0
+ \dimen6=\dp#1\advance\dimen6 by \dimen0\advance\dimen6 by #6\relax
+\ifdim\dimen6<\!!zeropoint
+ \advance\dimen4 by \dimen6 \dimen8=-\dimen6 \dimen6=\!!zeropoint
+\else
+ \dimen8=\!!zeropoint
+\fi
+ \setbox\extraframebox=\hbox
+ {\dostrokedbox\width\dimen2\height\dimen4\depth\dimen6%
+ \corner#4\radius#5\toggle#7\\}%
+ \setbox\extraframebox=\hbox
+ {\raise\dimen8\vbox{\moveleft#3\box\extraframebox}}%
+ \wd\extraframebox=\wd#1%
+ \ht\extraframebox=\ht#1%
+ \dp\extraframebox=\dp#1%
+ \hbox
+ {%\copy#1\hskip-\wd#1%
+ \box#1\hskip-\wd\extraframebox % faster
+ \doifelsenothing{#2} % speeds up a little
+ {\box\extraframebox}
+ {\color[#2]{\box\extraframebox}}}}}
+
+%D More chinese:
+
+\unexpanded\def\uc#1#2% used in tricky situations
+ {\bgroup
+ \edef\unicodeone{#1}%
+ \edef\unicodetwo{#2}%
+ \futurelet\nextglyph\dohandleucflowglyph}
+
+\def\dohandleucflowglyph%
+ {\unicodeposition=\unicodeone\unicodetwo\relax
+ \handleunicodeglyph
+ \egroup}
+
+%D Some adaptions due to active /'s. This goes to supp-lan.tex.
+
+%D And then came the Polish users, and who can deny them? Like
+%D the German \TEX\ users demand an active \type {"}, the
+%D Polish cannot do without the \type {/}. The next alternative
+%D is a bit slower but far the most robust alternative. As a
+%D bonus it also offers \type {|^|} and even \type {|||} which
+%D both result in a breakable|^|bar.
+%D
+%D The trick we use here is to convert the argument to a
+%D string and compare this string to string'd tokens.
+
+\def\activedotextmodediscretionary#1%
+ {\bgroup
+ \let\nextnextnext\egroup
+ \def\handlecompoundcharacter##1% new, needed for polish
+ {\getvalue{\@nc@\string##1}}% where / is active
+ \def\next##1#1%
+ {\def\next{\activedododotextmodediscretionary#1{##1}}%
+ \futurelet\nextnext\next}%
+ \next}
+
+\def\activedododotextmodediscretionary#1#2%
+ {\convertargument#2\to\discretionarytoken
+ \def\textmodediscretionary{\getvalue{textmodediscretionary\string#1}}%
+ \ifx#1\nextnext % takec care of ||| and +++ and ......
+ \prewordbreak\discretionary{\hbox{$#1$}}{}{\hbox{$#1$}}%
+ \allowbreak\postwordbreak
+ \def\nextnextnext{\afterassignment\egroup\let\next=}%
+ \else\ifx\discretionarytoken\empty
+ \checkafterdiscretionary
+ \bgroup
+ \checkbeforediscretionary
+ \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak\postwordbreak
+ \egroup
+ \else\convertargument=\to\next\ifx\next\discretionarytoken
+ \prewordbreak\textmodediscretionary
+ \else\convertargument~\to\next\ifx\next\discretionarytoken
+ \prewordbreak\discretionary{-}{}{\thinspace}\postwordbreak
+ \else\convertargument_\to\next\ifx\next\discretionarytoken
+ \prewordbreak\discretionary{\textmodediscretionary}
+ {\textmodediscretionary}{\textmodediscretionary}\prewordbreak
+ \else\convertargument(\to\next\ifx\next\discretionarytoken
+ \ifdim\lastskip>\!!zeropoint\relax
+ (\prewordbreak
+ \else
+ \prewordbreak\discretionary{}{(-}{(}\prewordbreak
+ \fi
+ \else\convertargument)\to\next\ifx\next\discretionarytoken
+ \ifx\nextnext\blankspace
+ \prewordbreak)\relax
+ \else\ifx\nextnext\space
+ \prewordbreak)\relax
+ \else
+ \prewordbreak\discretionary{-)}{}{)}\prewordbreak
+ \fi\fi
+ \else\convertargument'\to\next\ifx\next\discretionarytoken
+ \prewordbreak\discretionary{-}{}{'}\postwordbreak
+ \else\convertargument<\to\next\ifx\next\discretionarytoken
+ \beginofsubsentence\prewordbreak\beginofsubsentencespacing
+ \else\convertargument>\to\next\ifx\next\discretionarytoken
+ \endofsubsentencespacing\prewordbreak\endofsubsentence
+ \else\convertargument^\to\next\ifx\next\discretionarytoken
+ \prewordbreak\discretionary{\hbox{$|$}}{}{\hbox{$|$}}%
+ \allowbreak\postwordbreak
+ \else
+ \checkafterdiscretionary
+ \bgroup
+ \checkbeforediscretionary
+ \prewordbreak
+ \discretionary{\hbox{#2}}{}{\hbox{#2}}%
+ \allowbreak\postwordbreak
+ \egroup
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \nextnextnext}
+
+%D Since we don't have to bother about active characters any
+%D longer, we end up with a pretty simple activating macro:
+
+\def\enableactivediscretionaries%
+ {\let\dotextmodediscretionary=\activedotextmodediscretionary}
+
+\enableactivediscretionaries
+
+\def\handlecompoundcharacter#1%
+ {\def\dohandlecompoundcharacter%
+ {\ifx\next\bgroup
+ %\def\next{\dodohandlecompoundcharacter#1}% % handle "{ee} -> \"ee
+ %\let\next\relax % forget "{ee} -> ee
+ \def\next{\handlecompoundcharacterone#1}% % ignore "{ee} -> "ee
+ \else\ifx\next\egroup
+ \def\next{\getvalue{\@nc@\string#1}}%
+ \else\ifx\next\blankspace
+ \def\next{\getvalue{\@nc@\string#1}}%
+ \else
+ \def\next{\dodohandlecompoundcharacter#1}%
+ \fi\fi\fi
+ \next}%
+ \futurelet\next\dohandlecompoundcharacter}
+
+%D So far for supp-lan.tex.
+
+%D For Berend:
+
+\def\simpledoblanko%
+ {\doifelse{\currentwitruimte}{\v!geen}
+ {\blanko[\currentblanko]}
+ {\blanko[\s!default]}}
+
+\definieerblanko
+ [\s!default]
+ [\v!wit]
+
+%\definieerblanko
+% [\s!default]
+% [\v!groot]
+
+%D Yes or no:
+
+\def\collectlocalfootnotes%
+ {\def\localfootinsert##1% was \gdef, but never reset!
+ {%\message{[local footnote]}%
+ \global\setbox\localpostponedfootnotes=\vbox\bgroup
+ \unvbox\localpostponedfootnotes
+ \let\next}}
+
+\def\doplaatskoptekst#1#2#3#4%
+ {\beginheadplacement{#1}%
+ \setbox0=\hbox
+ {\getvalue{\??ko#1\c!commando}
+ {} % no number
+ {\doattributes
+ {\??ko#1}\c!letter\c!kleur
+ {\doattributes
+ {\??ko#1}\c!tekstletter\c!tekstkleur
+ {\dontconvertfont
+ \ifdisplaysectionhead\stelinterliniein
+\else
+ \stelspatieringin
+\fi
+ #2%
+ \getvalue{\??ko#1\c!voorcommando}%
+ \getvalue{\??ko#1\c!tekstcommando}%
+ {\ifdisplaysectionhead
+ \setstrut\begstrut#3\endstrut
+\xdef\localheaddepth{\the\dp\strutbox}%
+ \else
+ #3%
+ \fi}%
+ \getvalue{\??ko#1\c!nacommando}%
+ \ifdisplaysectionhead\endgraf\fi}}}}%
+ \endheadplacement{#1}{#4}}
+
+\def\doplaatskopnummertekst#1#2#3#4#5%
+ {\beginheadplacement{#1}%
+ \setbox0=\hbox
+ {\getvalue{\??ko#1\c!commando}%
+ {\doattributes{\??ko#1}\c!letter\c!kleur
+ {\doattributes{\??ko#1}\c!nummerletter\c!nummerkleur
+ {\getvalue{\??ko#1\c!voorcommando}%
+ \getvalue{\??ko#1\c!nummercommando}%
+ {\ifdisplaysectionhead
+ \setstrut\begstrut#3\endstrut
+ \else
+ #3%
+ \fi}}}}
+ {\doattributes{\??ko#1}\c!letter\c!kleur
+ {\doattributes{\??ko#1}\c!tekstletter\c!tekstkleur
+ {\dontconvertfont
+ \ifdisplaysectionhead\stelinterliniein
+\else
+ \stelspatieringin
+\fi
+ #2%
+ \getvalue{\??ko#1\c!tekstcommando}%
+ {\ifdisplaysectionhead
+ \setstrut\begstrut#4\endstrut
+\xdef\localheaddepth{\the\dp\strutbox}%
+ \else
+ #4%
+ \fi}%
+ \getvalue{\??ko#1\c!nacommando}%
+ \ifdisplaysectionhead\endgraf\fi}}}}%
+ \endheadplacement{#1}{#5}}
+
+%D depth
+
+\def\beginheadplacement#1%
+ {\bgroup
+ \gdef\localheaddepth{\dp\strutbox}%
+ \everypar{}% needed indeed
+ \noindent % ipv \witruimte elders, na \forgetall !
+ \bgroup
+ \forgetall % now we may forget everything
+ %\showcomposition
+ \mindermeldingen
+ \postponefootnotes
+ \iflocation\ifdisplaysectionhead\else\noninterferingmarks\fi\fi
+ \setupinteraction
+ [\c!letter=,
+ \c!kleur=,
+ \c!contrastkleur=]%
+ \strictouterreferencestrue % tzt instelling
+ \def\localkopsetup%
+ {\dolocalkopsetup{#1}}%
+ \startsynchronisatie}
+
+\def\endheadplacement#1#2%
+ {\doifvaluenothing{\??ko#1\c!file}{\locationfalse}%
+ \ifdisplaysectionhead
+ \let\headlastlinewidth\!!zeropoint
+ \snaptogrid\hbox
+ {\iflocation
+ \ifautocrossdocument
+ \naarbox{\box0}[\getvalue{\??ko#1\c!file}::#1]%
+ \else
+ \hbox{\box0}%
+ \fi
+ \else
+ \hbox{\box0}%
+ \fi
+ \doflushfootnotes}% new
+ \endgraf
+ \nointerlineskip
+ \dosomebreak\nobreak
+ #2%
+ \else
+ \strut
+ \doflushfootnotes % new
+ \iflocation
+ \ifautocrossdocument
+ \hhboxindent=\ifcontinuoushead\headlastlinewidth\else\!!zeropoint\fi
+ \unhhbox0\with{\naarbox{\box\hhbox}[\getvalue{\??ko#1\c!file}::#1]}%
+ \advance\lasthhboxwidth by \numberheaddistance
+ \xdef\headlastlinewidth{\the\lasthhboxwidth}%
+ \else
+ \unhbox0
+ \global\let\headlastlinewidth\!!zeropoint
+ \fi
+ \else
+ \unhbox0
+ \global\let\headlastlinewidth\!!zeropoint
+ \fi
+ #2%
+ \dimen0=\numberheaddistance
+ \hskip\dimen0 \!!plus \dimen0 \!!minus .25\dimen0
+ \hskip\headsignal\ignorespaces
+ \fi
+ \ifdisplaysectionhead
+ \ifgridsnapping % important, font related depth, see comment
+ \prevdepth\dp\strutbox
+ \else
+ \prevdepth\localheaddepth
+ \fi
+ \fi
+ \stopsynchronisatie
+ \egroup
+ \egroup
+\doflushfootnotes % new, still needed?
+ \ifdisplaysectionhead
+ \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}%
+ \else
+ \nonoindentation % recently added, was a bug
+ \fi}
+
+%D Due to polish active /'s we have to deal a bit more
+%D robust with filename:
+
+%D ...
+
+%D Some day:
+
+% \definieermarkering[\v!margetitel]
+%
+% \def\complexmargewoord[#1][#2]#3%
+% {\doglobal\increment\margincontent
+% \stelinmargein[\margincontent][]% see next macro
+% \@EA\setgvalue\@EA{\@EA\??im\@EA\margincontent\@EA}\@EA
+% {\@EA\stelinmargein\@EA[\margincontent][]% see next macro
+% \flushmargincontent[#1][#2]{#3}%
+% \markeer[\v!margetitel]{#3}}}
+
+%D Table
+
+
+%D New indeed. Undocumented and under development.
+
+\def\startsimplecolumns%
+ {\dosingleempty\dostartsimplecolumns}
+
+\def\dostartsimplecolumns[#1]%
+ {\bgroup
+ \getparameters[\??kl][\c!breedte=\hsize,\c!afstand=1em,\c!n=2,#1]%
+ \setrigidcolumnhsize\@@klbreedte\@@klafstand\@@kln
+ \setbox\scratchbox=\vbox\bgroup
+ \forgetall}
+
+\def\stopsimplecolumns%
+ {\removelastskip
+ \egroup
+ \rigidcolumnbalance\scratchbox
+ \egroup}
+
+%D Aha.
+
+\def\rigidcolumnbalance#1%
+ {\global\chardef\rigidcolumnbox=#1\relax
+ \ifnum\rigidcolumns=1
+ \ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi\rigidcolumnbox
+ \else
+ \hbox to \savedrigidhsize % was \hsize
+ {\vbadness=10000
+ \tabskip\!!zeropoint
+ \setbox\rigidcolumnbox=\vbox
+ {\unvbox\rigidcolumnbox
+ \unpenalty\removelastskip}% get rid of \blank's
+ \splittopskip=\openstrutheight
+\splittopskip=\!!zeropoint
+ %\scratchdimen=\ht\rigidcolumnbox % sensitive for overflow
+ %\divide\scratchdimen by \rigidcolumns % therefore we need the hack:
+ \scratchdimen=1pt
+ \divide\scratchdimen by \rigidcolumns
+ \expanded{\scratchdimen=\withoutpt{\the\scratchdimen}\ht\rigidcolumnbox}%
+ \advance\scratchdimen by \ht\strutbox
+ \valign{##\vfill\cr\dorigidcolumnsplits}}%
+ \fi}
+
+%D Is this a better default?
+
+\def\doverbatimgoodbreak%
+ {} % instead of {\ifoptimizeverbatim\penalty100\fi}
+
+%D Hm:
+
+\def\startgeheel%
+ {\startregelcorrectie
+ \insidefloattrue}
+
+\def\stopgeheel
+ {\stopregelcorrectie}
+
+%D Can save lots of mpgraph files when using pdftex:
+
+\newif\ifrecycleMPslots \recycleMPslotsfalse
+
+\def\allocateMPslot#1%
+ {\ifrunMPgraphics
+ \ifcase\pdfoutput \recycleMPslotsfalse \fi
+ \else
+ \recycleMPslotsfalse
+ \fi
+ \ifrecycleMPslots
+ \doloop
+ {\doifundefined{\recurselevel MP}
+ {\global\letvalue{\recurselevel MP}=\empty
+ \global#1=\recurselevel\exitloop}}%
+ %\message{[MP slot + \number#1]%
+ \else
+ \global\advance#1 by 1
+ \fi}
+
+\def\deallocateMPslot#1%
+ {\ifrunMPgraphics
+ \ifcase\pdfoutput \recycleMPslotsfalse \fi
+ \else
+ \recycleMPslotsfalse
+ \fi
+ \ifrecycleMPslots
+ \global\letbeundefined{\number#1MP}%
+ %\message{[MP slot - \number#1]}%
+ \fi}
+
+%D For Taco and David: (to be documented and added to
+%D setupb too).
+
+\def\definereferenceformat%
+ {\dodoubleargument\dodefinereferenceformat}
+
+\def\dodefinereferenceformat[#1][#2]%
+ {\iffirstargument
+ \getparameters[\??rf#1]
+ [\c!links={[},
+ \c!rechts={]},
+ \c!tekst=,
+ \c!label=,
+ \c!commando=\in,
+ #2]%
+ \unexpanded\setvalue{#1}{\doexecutereferenceformat{#1}}%
+ \fi}
+
+\def\noexecutelabelreferenceformat#1%
+ {\doifvaluesomething{\??rf#1\c!tekst}
+ {\gdef\textofreference{\getvalue{\??rf#1\c!tekst}}}%
+ \getvalue{\??rf#1\c!commando}}
+
+\def\doexecutelabelreferenceformat#1%
+ {\getvalue{\??rf#1\c!commando}%
+ {\leftlabeltext {\getvalue{\??rf#1\c!label}}}%
+ {\rightlabeltext{\getvalue{\??rf#1\c!label}}}}
+
+\def\doexecutereferenceformat#1%
+ {\gdef\leftofreference {\getvalue{\??rf#1\c!links }}%
+ \gdef\rightofreference{\getvalue{\??rf#1\c!rechts}}%
+ \global\let\textofreference\empty % otherwise ~ added
+ \doifelsevaluenothing{\??rf#1\c!label}
+ {\let\next\noexecutelabelreferenceformat}
+ {\let\next\doexecutelabelreferenceformat}%
+ \next{#1}}
+
+\let\leftofreference \relax
+\let\rightofreference\relax
+\let\textofreference \relax
+
+\def\dodododoinatreference#1#2#3[#4]%
+ {\ifx\next\bgroup
+ \dododododoinatreference
+ {\leftofreference#1\ignorespaces#3\rightofreference}{#2}[#4]%
+ \else
+ \dododododoinatreference
+ {\leftofreference#1\rightofreference}{#2#3}[#4]%
+ \fi}
+
+\def\dododododoinatreference#1#2[#3]%
+ {\bgroup
+ \forgetall
+ \leaveoutervmode
+ \doifreferencefoundelse{#3}
+ {\bgroup
+ \let\ignorespaces \empty % rather dirty trick, but ok
+ \let\leftofreference \empty % the same, again ok
+ \let\rightofreference\empty % and once more
+ \def\textofreference {#2}% % temporary value
+ \ifx\textofreference\empty % simple expansion
+ \doifelsenothing{#1}
+ {\egroup\dosymbolreference{#1}{\textofreference}[#3]}
+ {\egroup\dowantedreference{#1}{\textofreference}[#3]}%
+ \else
+ \doifelsenothing{#1}
+ {\egroup\dosymbolreference{#1}{#2}[#3]}
+ {\egroup\dowantedreference{#1}{#2}[#3]}%
+ \fi}
+ {\dounknownreference{#1}{#2}[#3]}%
+ \referentieinfo{<}{#3}%
+ \global\let\leftofreference \empty
+ \global\let\rightofreference\empty
+ \global\let\textofreference \empty
+ \egroup}
+
+%D The next hack is used for some exiting new feature test.
+
+\def\resetpositions%
+ {\let\someposition=\gobblesevenarguments}
+
+\resetpositions
+
+%D The next line can be uncommented when Taco's extensions to
+%D \quote {\TEX\ The Program} are used.
+
+% \readfile {syst-eet} {} {}
+
+% I have to scan for \unhbox and use the vbox/hbox trick instead
\protect
diff --git a/tex/context/base/cont-nl.tex b/tex/context/base/cont-nl.tex
index 9544b1a9c..7b64f597e 100644
--- a/tex/context/base/cont-nl.tex
+++ b/tex/context/base/cont-nl.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{dutch}
@@ -17,6 +17,10 @@
\unprotect
+\setupcurrentlanguage[\s!nl]
+
+\loaduserspecifications
+
\installlanguage [\s!en] [\c!status=\v!start]
\installlanguage [\s!uk] [\c!status=\v!start]
\installlanguage [\s!de] [\c!status=\v!start]
@@ -24,10 +28,7 @@
\installlanguage [\s!sp] [\c!status=\v!start]
\installlanguage [\s!nl] [\c!status=\v!start]
-\appendtoks \language [\s!nl] \to \everyjob
-\appendtoks \mainlanguage [\s!nl] \to \everyjob
-
-\setupbodyfont [cmr,cmx,rm,12pt]
+\setupbodyfont [cmr,rm,12pt]
\protect
diff --git a/tex/context/base/cont-old.tex b/tex/context/base/cont-old.tex
index 1c7ea458a..e71f15da1 100644
--- a/tex/context/base/cont-old.tex
+++ b/tex/context/base/cont-old.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Old Macros}
diff --git a/tex/context/base/cont-sys.rme b/tex/context/base/cont-sys.rme
new file mode 100644
index 000000000..0378f95b7
--- /dev/null
+++ b/tex/context/base/cont-sys.rme
@@ -0,0 +1,75 @@
+%D \module
+%D [ file=cont-sys,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Miscellaneous Macros,
+%D subtitle=System Specific Setups,
+%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.
+
+\unprotect
+
+% Some examples of missing font sets and font files:
+%
+% \setupbodyfont [ber] % berry names
+%
+% \definefilesynonym [font-lbr] [font-cmr]
+%
+% \definefontsynonym [Courier-Bold] [Courier]
+% \definefontsynonym [Courier-BoldOblique] [Courier]
+%
+% \definefontsynonym [gbhei] [gbsong]
+% \definefontsynonym [gbheisl] [gbsong]
+% \definefontsynonym [gbheisl] [gbsong]
+%
+% Setting up a global figure path (beware, \c!gebied may change):
+%
+% \setupexternalfigures
+% [\c!gebied={e:/fig/eps,t:/pragma/metapost/symbols}]
+%
+% Loading a specific special driver:
+%
+% \setupoutput
+% [dviwindo]
+%
+% Enabling \CONTEXT\ navigation symbols:
+%
+% \usesymbols
+% [nav]
+%
+% \setupsymbolset
+% [navigation 1]
+%
+% \stelinteractiein
+% [\c!symboolset=navigation 1]
+%
+% Changing language defaults:
+%
+% \setuplanguage
+% [nl]
+% [\c!leftquote=\upperleftsinglesixquote,
+% \c!leftquotation=\upperleftdoublesixquote]
+%
+% \protect
+%
+% Loading local preferences:
+%
+% \input prag-gen % company styles
+% \input prag-log % more company styles
+%
+% Enabling run time \METAPOST\ (also enable \write18 in texmf.cnf):
+
+\runMPgraphicstrue
+\recycleMPslotstrue
+
+% Enabling nested pretty printing:
+
+\newprettytrue
+
+% So far.
+
+\endinput
diff --git a/tex/context/base/cont-uk.tex b/tex/context/base/cont-uk.tex
index c820e23ab..e1bb62d9d 100644
--- a/tex/context/base/cont-uk.tex
+++ b/tex/context/base/cont-uk.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=cont-en,
+%D [ file=cont-uk,
%D version=1997.08.19,
%D title=\CONTEXT,
%D subtitle=\CONTEXT\ English Format Generation,
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{english}
@@ -17,6 +17,10 @@
\unprotect
+\setupcurrentlanguage[\s!uk]
+
+\loaduserspecifications
+
\installlanguage [\s!en] [\c!status=\v!start]
\installlanguage [\s!uk] [\c!status=\v!start]
\installlanguage [\s!de] [\c!status=\v!start]
@@ -24,10 +28,7 @@
\installlanguage [\s!sp] [\c!status=\v!start]
\installlanguage [\s!nl] [\c!status=\v!start]
-\appendtoks \language [\s!uk] \to \everyjob
-\appendtoks \mainlanguage [\s!uk] \to \everyjob
-
-\setupbodyfont [cmr,cmx,rm,12pt]
+\setupbodyfont [cmr,rm,12pt]
\protect
diff --git a/tex/context/base/cont-usr.ori b/tex/context/base/cont-usr.ori
index 1740129e2..db2526542 100644
--- a/tex/context/base/cont-usr.ori
+++ b/tex/context/base/cont-usr.ori
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D In this file users can specify what hyphenation patterns
@@ -26,24 +26,39 @@
%D Thomas Esser's \TETEX\ distribution.) This list will be
%D adapted to the actual situation.
+\definefilesynonym [lang-cz.pat] [czhyph.tex]
+\definefilesynonym [lang-da.pat] [dkhyph.tex]
\definefilesynonym [lang-de.pat] [dehyphn.tex]
-\definefilesynonym [lang-deo.pat] [dehypht.tex]
-\definefilesynonym [lang-nl.pat] [nehyph2.tex]
-\definefilesynonym [lang-nlx.pat] [dutch96.pat]
-\definefilesynonym [lang-us.pat] [ushyph1.tex]
-\definefilesynonym [lang-uk.pat] [ukhyph.tex]
+\definefilesynonym [lang-en.pat] [ushyph1.tex]
+\definefilesynonym [lang-fi.pat] [fihyph.tex]
\definefilesynonym [lang-fr.pat] [frhyph.tex]
-\definefilesynonym [lang-sp.pat] [sphyph.tex]
\definefilesynonym [lang-it.pat] [ithyph.tex]
-\definefilesynonym [lang-da.pat] [dkhyph.tex]
+\definefilesynonym [lang-la.pat] [lahyph7.tex]
+\definefilesynonym [lang-nl.pat] [nehyph.tex]
+\definefilesynonym [lang-no.pat] [nohyph.tex]
+\definefilesynonym [lang-pl.pat] [plhyph.tex]
\definefilesynonym [lang-pt.pat] [pthyph.tex]
+\definefilesynonym [lang-sk.pat] [skhyph.tex]
+\definefilesynonym [lang-sp.pat] [sphyph.tex]
\definefilesynonym [lang-sv.pat] [sehyph.tex]
-\definefilesynonym [lang-pl.pat] [plhyph.tex]
-\definefilesynonym [lang-fi.pat] [fihyph.tex]
-\definefilesynonym [lang-no.pat] [nohyph.tex]
+\definefilesynonym [lang-hr.pat] [hrhyph.tex]
\definefilesynonym [lang-tr.pat] [trhyph.tex]
-\definefilesynonym [lang-cz.pat] [czhyph.tex]
-\definefilesynonym [lang-sk.pat] [skhyph.tex]
+\definefilesynonym [lang-uk.pat] [ukhyphen.tex]
+\definefilesynonym [lang-us.pat] [ushyph1.tex]
+
+%D Pattern files are (can be) encoded! And, alas, not all
+%D pattern files are self contained, which is why (for the
+%D moment) we specify encodings here.
+
+\installlanguage [\s!cz] [\s!mapping=il2,\s!encoding=il2]
+\installlanguage [\s!sk] [\s!mapping=il2,\s!encoding=il2]
+\installlanguage [\s!pl] [\s!mapping=pl0,\s!encoding=pl0]
+\installlanguage [\s!hr] [\s!mapping=il2,\s!encoding=il2] % ans ?
+
+%D Sometimes these are not wanted:
+
+%\definefilesynonym [lang-deo.pat] [dehypht.tex] % old patterns
+%\definefilesynonym [lang-nlx.pat] [dutch96.pat] % new patterns
%D Additional languages can be defined here. Beware of
%D encoding incompatibilities. Please take a look at the
@@ -57,6 +72,7 @@
% \installlanguage [\s!fi] [\c!status=\v!start] % finnish
% \installlanguage [\s!fr] [\c!status=\v!start] % french
% \installlanguage [\s!it] [\c!status=\v!start] % italian
+% \installlanguage [\s!la] [\c!status=\v!start] % latin
% \installlanguage [\s!nl] [\c!status=\v!start] % dutch
% \installlanguage [\s!no] [\c!status=\v!start] % norwegian
% \installlanguage [\s!pl] [\c!status=\v!start] % polish
@@ -65,34 +81,32 @@
% \installlanguage [\s!sv] [\c!status=\v!start] % swedish
% \installlanguage [\s!tr] [\c!status=\v!start] % turkish
% \installlanguage [\s!uk] [\c!status=\v!start] % english uk
+% \installlanguage [\s!hr] [\c!status=\v!start] % croatian
-% \installlanguage [deo] [\c!status=\v!start] % old german
+\installlanguage [deo] [\c!status=\v!start] % old german
% \installlanguage [nlx] [\c!status=\v!start] % dutch 8 bit
%D The next lines can be used for setting the language to be
%D used at startup time.
-% \appendtoks \language[\s!af] \to \everyjob
-% \appendtoks \language[\s!cz] \to \everyjob
-% \appendtoks \language[\s!da] \to \everyjob
-% \appendtoks \language[\s!de] \to \everyjob
-% \appendtoks \language[\s!en] \to \everyjob
-% \appendtoks \language[\s!fi] \to \everyjob
-% \appendtoks \language[\s!fr] \to \everyjob
-% \appendtoks \language[\s!it] \to \everyjob
-% \appendtoks \language[\s!nl] \to \everyjob
-% \appendtoks \language[\s!no] \to \everyjob
-% \appendtoks \language[\s!pl] \to \everyjob
-% \appendtoks \language[\s!pt] \to \everyjob
-% \appendtoks \language[\s!sk] \to \everyjob
-% \appendtoks \language[\s!sp] \to \everyjob
-% \appendtoks \language[\s!sv] \to \everyjob
-% \appendtoks \language[\s!tr] \to \everyjob
-
-%D When one of the current lines is uncommented, please also
-%D uncomment the next one.
-
-% \appendtoks \mainlanguage[\currentlanguage] \to \everyjob
+% \setupcurrentlanguage[\s!af]
+% \setupcurrentlanguage[\s!cz]
+% \setupcurrentlanguage[\s!da]
+% \setupcurrentlanguage[\s!de]
+% \setupcurrentlanguage[\s!en]
+% \setupcurrentlanguage[\s!fi]
+% \setupcurrentlanguage[\s!fr]
+% \setupcurrentlanguage[\s!it]
+% \setupcurrentlanguage[\s!la]
+% \setupcurrentlanguage[\s!nl]
+% \setupcurrentlanguage[\s!no]
+% \setupcurrentlanguage[\s!pl]
+% \setupcurrentlanguage[\s!pt]
+% \setupcurrentlanguage[\s!sk]
+% \setupcurrentlanguage[\s!sp]
+% \setupcurrentlanguage[\s!sv]
+% \setupcurrentlanguage[\s!tr]
+% \setupcurrentlanguage[\s!hr]
%D Local font settings can go here. Normally suitable
%D defaults are already preloaded, almost certainly the
@@ -100,10 +114,9 @@
%D next line is only meant as sample, take a look at the
%D format related files first.
-% \setupbodyfont[cmr]
+% \definefilesynonym [font-cmr] [font-csr]
+% \definefilesynonym [font-cmr] [font-plr]
%D Don't remove the next few lines.
\protect
-
-\endinput
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 746f9f301..a55ad272a 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -8,10 +8,12 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\def\contextversion{1999.3.31}
+\catcode`\{=1 \catcode`\}=2
+
+\def\contextversion{1999.12.30}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type{tex -i} or \type{whatevertex} using
@@ -42,6 +44,11 @@
\input mult-con.tex
\input mult-com.tex
+%D We also use some third party macros. These are loaded by
+%D saying:
+
+\input thrd-ran.tex
+
%D Now we're ready for some general support modules. These
%D modules implement some basic typesetting functionality.
@@ -57,6 +64,7 @@
\input supp-mps.tex
\input supp-tpi.tex
\input supp-mat.tex
+\input supp-ran.tex
%D Verbatim typestting is implemented in a separate class of
%D modules. The pretty typesetting modules are loaded at run
@@ -64,11 +72,6 @@
\input verb-ini.tex % replaces supp-ver
-%D We also use some third party macros. These are loaded by
-%D saying:
-
-\input thrd-ran
-
%D When loading the font, color and special modules, we need a
%D bit more advanced file handling as well as some general
%D variables, so next we load:
@@ -85,7 +88,7 @@
%D just go for the best there is and load \TABLE. Just to be
%D sure we do it here, before we redefine \type{|}.
-\input thrd-tab.tex % \doinputonce{table}
+\input thrd-tab.tex
%D Here comes the last support modules. They take care of
%D some language specific things.
@@ -117,12 +120,13 @@
\input lang-cel.tex
\input lang-ger.tex
\input lang-grk.tex
-\input lang-hnl.tex
\input lang-ind.tex
\input lang-ita.tex
\input lang-sla.tex
\input lang-ura.tex
+\input lang-vn.tex % vietnamese, will be grouped
+
%D All kind of symbols are handles in:
\input symb-ini.tex
@@ -133,13 +137,14 @@
\input core-gen.tex
\input core-mak.tex
\input core-mat.tex
+\input core-dat.tex
\input core-grd.tex
\input core-ver.tex
\input core-vis.tex
\input core-con.tex
\input core-rul.tex
-\input core-tab.tex
\input core-new.tex
+\input core-tab.tex
\input core-nav.tex
\input core-ref.tex
\input core-obj.tex
@@ -148,11 +153,22 @@
\input core-pag.tex
\input core-tbl.tex
\input core-mis.tex
+\input core-mps.tex
+
+%D A few more languages, that have specifics use core
+%D functionality:
+
+\input lang-chi.tex
-%D How about fill||in fields?
+%D How about fill||in fields and related stuff?
\input java-ini.tex
\input core-fld.tex
+\input core-hlp.tex
+
+%D Registers can depend on fields, so we load that now.
+
+\input core-reg.tex
%D Of course we do need fonts. There are no \TFM\ files
%D loaded yet, so the format file is independant of their
@@ -160,6 +176,7 @@
%D instead of italian.
\input font-ini.tex
+\input font-uni.tex
%D Now we're ready for more core modules.
@@ -174,8 +191,8 @@
\input core-01d.tex
\input core-01e.tex
-\input core-02a.tex
-\input core-02b.tex
+% core-02a.tex % obsolete, replaced by core-dat.tex
+% core-02b.tex
% core-02c.tex
\input core-02d.tex
@@ -240,16 +257,29 @@
\stopinterface
+\startinterface czech
+
+\writestring{Tento balik je zalozen na Plain TeXu. Pouziva prizpusobenou verzi}
+\writestring{rozsireneho znackovaciho mechanismu J. Foxe (1987) a nekolik casti}
+\writestring{sidefloat mechanismu D. Comenetze (1993). Vetsina prikazu Plain TeXu}
+\writestring{D. E. Knutha (\fmtversion) je dostupna a muze byt bez problemu pouzita.}
+\writestring{Tento balik pouziva balik TaBlE, ktery vytvoril M. J. Wichura (1988).}
+\writestring{Je generovano jen nekolik pomocnych souboru, z nichz nektere musi byt}
+\writestring{zpracovany programem TeXUtil (\utilityversion). Aktualni verze}
+\writestring{blok-maker je \blockversion.}
+
+\stopinterface
+
\edef\copyrightversion%
{Copyright 1990-\the\normalyear\normalspace /
PRAGMA ADE / J. Hagen - A.F. Otten}
\writeline\writestring{\copyrightversion}\writeline
-%D Except from english, no hyphenation patterns are loaded
-%D yet. Users can specify their needs in the next module:
-
-\input cont-usr.tex
+% %D Except from english, no hyphenation patterns are loaded
+% %D yet. Users can specify their needs in the next module:
+%
+% \input cont-usr.tex
%D Let's quit this file when doing a \type {cont-..} generation.
@@ -260,7 +290,14 @@
\next
%D Unless we're generating a \type {cont-..} format, we also
-%D set:
+%D do the following.
+
+%D Except from english, no hyphenation patterns are loaded
+%D yet. Users can specify their needs in the next module:
+
+\loaduserspecifications
+
+%D Next we default to the same language as the interface.
\unprotect
@@ -293,10 +330,21 @@
\stopinterface
-\setupbodyfont [cmr,rm,12pt]
+\startinterface czech
+
+ \installlanguage [\s!cz] [\c!status=\v!start]
+
+ \appendtoks \language [\s!cz] \to \everyjob
+ \appendtoks \mainlanguage [\s!cz] \to \everyjob
+
+\stopinterface
\protect
+%D Finally we load some fonts.
+
+\setupbodyfont [cmr,rm,12pt]
+
%D Now dumping the format is all that's left to be done.
\dump
diff --git a/tex/context/base/core-01a.tex b/tex/context/base/core-01a.tex
index 3efa7992a..17b8ea1e9 100644
--- a/tex/context/base/core-01a.tex
+++ b/tex/context/base/core-01a.tex
@@ -8,11 +8,14 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
% nog oplossen: voetnoot setten ivm later veranderde
% witruimte; probleem: als lijn graphic
+
+% The %I etc thing will be replaced by documentation. Some
+% years ago they served as helpinfo blocks for our editor.
\newevery \everybodyfont \Everybodyfont % just to be sure
@@ -25,8 +28,8 @@
\appendtoks \stelblankoin \to \everybodyfont
\appendtoks \stelwitruimtein \to \everybodyfont
%\appendtoks\setupfootnotes \to \everybodyfont
-\appendtoks \stelspatieringin \to \everybodyfont % nieuw
-\appendtoks \setdisplayskips \to \everybodyfont % nieuw
+\appendtoks \stelspatieringin \to \everybodyfont % nieuw
+\appendtoks \setdisplayskips \to \everybodyfont % nieuw
% \appendtoks .. \to \everypar
% \appendtoks .. \to \everypar
@@ -54,11 +57,11 @@
2: -- geladen
3: probeer LaTeX eens
4: commando -- is al gedefinieerd
- 5: macro's uit -- geladen
- 6: geen macro's in -- gevonden
- 7: macro's uit -- reeds geladen
+ 5: macro's uit module -- geladen
+ 6: geen macro's in module -- gevonden
+ 7: macro's uit module -- reeds geladen
8: nieuwe versie hulpfile, tweede run nodig
- 9: -- niet gevonden/geplaatst
+ 9: -- niet gevonden/geplaatst
10: gebruik geen em in --
11: aanmaken basale hulpfile
12: de hulpfile is niet gesorteerd, gebruik texutil
@@ -85,9 +88,9 @@
2: -- loaded
3: try LaTeX
4: command -- is already defined
- 5: macros of -- loaded
- 6: no macros found in --
- 7: macros of -- already loaded
+ 5: macros of module -- loaded
+ 6: no macros found in module --
+ 7: macros of module -- already loaded
8: new version of utility file, second pass needed
9: -- not found/processed
10: don't use em in --
@@ -116,9 +119,9 @@
2: -- geladen
3: Versuche LaTeX
4: Befehl -- ist bereits definiert
- 5: Makros in -- geladen
- 6: Keine Makros in -- gefunden
- 7: Makros in -- bereits geladen
+ 5: Makros aus Modul -- geladen
+ 6: Keine Makros in Modul -- gefunden
+ 7: Makros aus Modul -- bereits geladen
8: Neue Version der Hilfsdatei, zweiter Durchlauf benoetigt
9: -- nicht gefunden/verarbeitet
10: Benutzte kein em in --
@@ -141,6 +144,37 @@
27: Version
\stopmessages
+\startmessages czech library: systems
+ title: system
+ 1: nacteni pomocneho souboru odlozeno (typemode)
+ 2: -- nacteno
+ 3: zkuste LaTeX
+ 4: prikaz -- je jiz definovan
+ 5: makra z -- nactena
+ 6: zadna makra v -- nenalezena
+ 7: makra z -- jsou jiz nactena
+ 8: nova verze pomocneho souboru, je treba druheho behu
+ 9: -- nenalezeno/nezpracovano
+ 10: nepouzivejte em v --
+ 11: vytvarim jednoduchy pomocny soubor
+ 12: pomosny soubor neni setriden, pouzijte texutil
+ 13: znacka -- definovana --
+ 14: vynucena nova stranka v seznamu na --
+ 15: uklada se buffer --
+ 16: sazi se buffer --
+ 17: sazi se doslovny (verbatim) buffer --
+ 18: synonymum -- -- neexistuje
+ 19: vyznam (synonyma) -- nacten
+ 20: vyznam (trideni) -- nacten
+ 21: pomocny soubor necten
+ 22: pouzijte platny pomocny soubor
+ 23: -- upraveno na --
+ 24: plovouci bloky
+ 25: reference
+ 26: registry
+ 27: verze
+\stopmessages
+
\startmessages dutch library: textblocks
title: tekstblokken
1: nieuwe versie, tweede run nodig
@@ -189,6 +223,22 @@
12: -- ausgelassen
\stopmessages
+\startmessages czech library: textblocks
+ title: textovyblok
+ 1: nova verze, je treba druhy beh
+ 2: zapisuji bloky do --
+ 3: ctu bloky z --
+ 4: je treba druhy beh
+ 5: -- neni skryto
+ 6: -- skryto a zpracovano
+ 7: -- skryto
+ 8: -- vysazeno
+ 9: -- nevysazeno
+ 10: -- nacteno a zpracovano
+ 11: -- nacteno a vysazeno
+ 12: -- preskoceno
+\stopmessages
+
\startmessages dutch library: floatblocks
title: plaatsblokken
1: -- hernummerd / -- => --
@@ -237,6 +287,22 @@
12: undefiniert
\stopmessages
+\startmessages czech library: floatblocks
+ title: plovouciobjekty
+ 1: -- precislovano / -- => --
+ 2: -- ulozeno
+ 3: -- presunuto
+ 4: -- umisteno
+ 5: poradi prizpusobeno
+ 6: pocet hornich plovoucich objektu je omezen na --
+ 7: pocet spodnich plovoucich objektu je omezen na --
+ 8: radku je mene nez --
+ 9: poradi naruseno
+ 10: -- omezeno
+ 11: nedan zadny blok
+ 12: nedefinovano
+\stopmessages
+
\startmessages dutch library: layouts
title: layout
1: teksthoogte aangepast met -- op pagina --
@@ -282,6 +348,21 @@
11: Zwischenraum -- nicht im Grittermoduserlau
\stopmessages
+\startmessages czech library: layouts
+ title: layout
+ 1: vyska textu prizpusobena s -- na strane --
+ 2: -- krat odlozeny text umisten
+ 3: -- krat text odlozen
+ 4: okrajove bloky aktivni
+ 5: okrajove bloky neaktivni
+ 6: sada stran -- zpracovana (velikost --)
+ 7: pocita se misto pro logo
+ 8: pocita se pozadi
+ 9: aktualne ne vice nez -- urovne/urovni vyctu
+ 10: -- a -- nedava dohromady 1.0
+ 11: svisla mezera -- neni povolena v pevnem radkovem rejstriku
+\stopmessages
+
\startmessages dutch library: structures
title: structuur
1: begin van sectieblok --
@@ -299,6 +380,12 @@
1: Begin des Abschnittsblock --
2: Ende des Abschnittsblock --
\stopmessages
+
+\startmessages czech library: structures
+ title: struktury
+ 1: zacatek oddilu (sekce) --
+ 2: konec oddilu (sekce) --
+\stopmessages
% \CONTEXTtrue % Now we know that we can use ConTeXt commands.
@@ -320,6 +407,16 @@
% \message{NEE}
% \fi
+\def\convertexpanded#1#2#3% watch the double \v!ja expansion !
+ {\ExpandFirstAfter\processaction
+ [\getvalue{#1\c!expansie}]
+ [ \v!ja=>{{\honorunexpanded\xdef\@@globalexpanded{#2}%
+ \xdef\@@globalexpanded{\@@globalexpanded}}%
+ \dodoglobal\convertcommand\@@globalexpanded\to#3},
+ \v!commando=>{\dodoglobal\convertcommand #2\to#3},
+ \s!default=>{\dodoglobal\convertargument#2\to#3},
+ \s!unknown=>{\dodoglobal\convertargument#2\to#3}]}
+
% om problemen te voorkomen:
%
% \ascii => \@@ascii@@
@@ -507,23 +604,20 @@
\unexpanded\def\doattributes#1#2#3#4%
{\dostartattributes{#1}{#2}{#3}{#4}\dostopattributes}
-% \dotextprefix{tekst}
-%
-% als {tekst} niet leeg is: tekst~
-
-\def\dotextprefix#1%
- {\ConvertToConstant\doifnot{#1}{}{#1~}}
-
% kan vaker worden toegepast:
+\newskip\leftskipadaption
+
\def\doadaptleftskip#1%
- {\processaction[#1] % \ExpandFirstAfter
- [\v!standaard=>\advance\leftskip by
+ {\leftskipadaption\!!zeropoint
+ \processaction[#1] % \ExpandFirstAfter
+ [\v!standaard=>\leftskipadaption=
\ifdim\voorwit=\!!zeropoint\@@sllinks\else\voorwit\fi,
- \v!ja=>\advance\leftskip by
+ \v!ja=>\leftskipadaption=
\ifdim\voorwit=\!!zeropoint\@@sllinks\else\voorwit\fi,
\v!nee=>,
- \s!unknown=>\advance\leftskip by #1]}
+ \s!unknown=>\leftskipadaption=#1]%
+ \advance\leftskip by \leftskipadaption}
\def\herhaal {\dorepeat}
\def\herhaler {\repeater}
@@ -801,7 +895,7 @@
\def\endstrut%
{\relax\ifhmode\ifdim\ht\strutbox=\!!zeropoint\else
- \unskip
+ \unskip\unskip\unskip
\normalpenalty\!!tenthousand
\normalhskip\!!zeropoint
\strut
@@ -813,15 +907,15 @@
\let\endstrut=\empty
\let\begstrut=\empty}
-% unsave:
+% unsave:
%
% \def\pseudostrut%
% {\bgroup
-% \setnostrut
-% \normalstrut
+% \setnostrut
+% \normalstrut
% \egroup}
%
-% try:
+% try:
%
% \startchemie
% \chemie[ONE,Z0,SB15,MOV1,SB15,Z0][C,C]
@@ -1078,27 +1172,32 @@
\utilitycheckmessage
\fi\fi\fi}
+% no longer needed, since texutil is now multi platform
+%
+% \def\checkutilityfile%
+% {\doiflocfileelse{\jobname.\f!outputextension}
+% {}
+% {\doiflocfileelse{\jobname.\f!inputextension}
+% {\bgroup
+% \showmessage{\m!systems}{11}{}%
+% \openout\scratchwrite=\jobname.\f!outputextension
+% \openlocin\scratchread{\jobname.\f!inputextension}%
+% \def\doprocessline%
+% {\ifeof\scratchread
+% \def\doprocessline{\closein\scratchread}%
+% \else
+% \read\scratchread to \ascii
+% \convertcommand\ascii\to\ascii
+% \expandafter\saveutilityline\ascii\txen
+% \fi
+% \doprocessline}%
+% \doprocessline
+% \closeout\scratchwrite
+% \egroup}
+% {}}}
+
\def\checkutilityfile%
- {\doiflocfileelse{\jobname.\f!outputextension}
- {}
- {\doiflocfileelse{\jobname.\f!inputextension}
- {\bgroup
- \showmessage{\m!systems}{11}{}%
- \openout\scratchwrite=\jobname.\f!outputextension
- \openlocin\scratchread{\jobname.\f!inputextension}%
- \def\doprocessline%
- {\ifeof\scratchread
- \def\doprocessline{\closein\scratchread}%
- \else
- \read\scratchread to \ascii
- \convertcommand\ascii\to\ascii
- \expandafter\saveutilityline\ascii\txen
- \fi
- \doprocessline}%
- \doprocessline
- \closeout\scratchwrite
- \egroup}
- {}}}
+ {}
\long\def\doutilities#1#2#3#4#5% % introduceren in utility file
{\restorecatcodes
@@ -1138,6 +1237,21 @@
\fi
\disableinitializevariables
\endgroup}
+
+% Saving the sort vector:
+
+\def\savesortkeys%
+ {\setbox\scratchbox=\hbox
+ \bgroup
+ \def\flushsortkey##1##2##3##4%
+ {\convertargument{##1}{##2}{##3}{##4}\to\ascii
+ \immediatewriteutility{k {\currentlanguage}{\currentencoding}\ascii}}%
+ \let\definesortkey\flushsortkey
+ \flushsortkeys
+ \egroup
+ \global\let\savesortkeys\relax}
+
+\prependtoks \savesortkeys \to \everystarttext
% Commando's ten behoeve van two-pass lists. In principe
% kan alles in een keer worden ingelezen. Omdat de macro's
@@ -1153,9 +1267,15 @@
% \iftwopassdatafound
% \twopassdata
%
-% \twopassentry{\s!xxx}{nr}{data} nr alleen voor testdoeleinden
+% \twopassentry{\s!xxx}{nr}{data} nr alleen voor testdoeleinden
+%
+% also:
+%
+% \definerawpasslist{\s!xxx}
+% \moverawpasslist\s!xxx\to\somemacro
-\def\alltwopasslists{}
+\let\alltwopasslists\empty % with 0,0 -> stepwise commalist
+\let\allrawpasslists\empty % without 0,0 -> raw commalist
\newif\iftwopassdatafound
@@ -1163,13 +1283,16 @@
{\executeifdefined{@@#1\s!pass}\gobbletwoarguments}
\def\appendtwopasselement#1#2#3%
- {\debuggerinfo{\m!systems}{twopass data #1 - #2 = #3}%
- \setxvalue{#1:\s!list}{\getvalue{#1:\s!list}#3,}}
+ {%\debuggerinfo{\m!systems}{twopass data #1 - #2 = #3}%
+ \@EA\ifx\csname#1:\s!list\endcsname\empty
+ \setxvalue{#1:\s!list}{#3}%
+ \else
+ \setxvalue{#1:\s!list}{\getvalue{#1:\s!list},#3}%
+ \fi}
\def\dodefinetwopasslist#1%
{\doifundefined{#1:\s!list}
- {\debuggerinfo{\m!systems}{defining twopass class #1}%
- \doglobal\addtocommalist{#1}\alltwopasslists
+ {%\debuggerinfo{\m!systems}{defining twopass class #1}%
\doglobal\addutilityreset{#1\s!pass}%
\setgvalue{\s!set#1\s!pass}%
{\global\letvalue{\s!set#1\s!pass}\gobbletwoarguments
@@ -1179,20 +1302,38 @@
\getvalue{\s!reset#1\s!pass}}}
\def\definetwopasslist#1%
- {\expanded{\dodefinetwopasslist{#1}}}
+ {\expanded{\dodefinetwopasslist{#1}}%
+ \doglobal\addtocommalist{#1}\alltwopasslists}
+
+\def\definerawpasslist#1%
+ {\expanded{\dodefinetwopasslist{#1}}%
+ \doglobal\addtocommalist{#1}\allrawpasslists}
\def\doloadtwopassdata#1%
{\doifundefined{#1:\s!list}
{\global\letvalue{#1:\s!list}\empty
\doutilities{#1\s!pass}{\jobname}{}{}{}%
- \setxvalue{#1:\s!list}{\getvalue{#1:\s!list}0,0}}}
+ \ifx\twopassdata\empty\else
+ \appendtwopasselement{#1}{0}\twopassdata
+ \fi}}
\def\loadtwopassdata%
{\ifx\alltwopasslists\empty\else
+ \def\twopassdata{0,0}% end condition
\processcommacommand[\alltwopasslists]\doloadtwopassdata
\global\let\alltwopassdata\empty
+ \fi
+ \ifx\allrawpasslists\empty\else
+ \let\twopassdata\empty
+ \processcommacommand[\allrawpasslists]\doloadtwopassdata
+ \global\let\allrawpassdata\empty
\fi}
+\def\moverawpasslist#1#2% erases the old one, like the others do
+ {\loadtwopassdata
+ \@EA\let\@EA#2\csname#1:\s!list\endcsname
+ \@EA\let\csname#1:\s!list\endcsname\empty}
+
\let\twopassdata=\empty
\def\dogettwopassdata[#1,#2]#3%
@@ -1206,7 +1347,7 @@
\def\gettwopassdata#1%
{\loadtwopassdata
\edef\!!stringa{\getvalue{#1:\s!list}}%
- \debuggerinfo{\m!systems}{twopass get #1 - \!!stringa}%
+ %\debuggerinfo{\m!systems}{twopass get #1 - \!!stringa}%
\expandafter\dogettwopassdata\expandafter[\!!stringa]{#1}}
\def\findtwopassdata%
@@ -1215,7 +1356,7 @@
\def\dofindtwopassdata#1#2%
{\edef\!!stringa{,\getvalue{#1:\s!list}}%
- \debuggerinfo{\m!systems}{twopass find #2 - \!!stringa}%
+ %\debuggerinfo{\m!systems}{twopass find #2 - \!!stringa}%
\def\dodofindtwopassdata[##1,##2#2##3,##4]%
{\edef\twopassdata{##3}%
\ifx\twopassdata\empty
@@ -1620,15 +1761,37 @@
%I
%I waarbij de offset betrekking heeft op dubbelzijdig zetten.
+\ifx\stelpapierformaatin\undefined
+ \let\stelpapierformaatin\relax
+\fi
+
+%\def\dodefinieerpapierformaat[#1][#2]%
+% {\ifsecondargument
+% \getparameters
+% [\??pp#1] % geen \c!schaal, scheelt hash ruimte
+% [\c!breedte=\@@ppbreedte,\c!hoogte=\@@pphoogte,
+% \c!offset=\@@ppoffset,#2]%
+% \else
+% \definieerpapierformaat[][#1]%
+% \stelpapierformaatin
+% \fi}
+
\def\dodefinieerpapierformaat[#1][#2]%
- {\getparameters
- [\??pp#1] % geen \c!schaal, scheelt hash ruimte
- [\c!breedte=\@@ppbreedte,\c!hoogte=\@@pphoogte,#2]}
+ {\ifsecondargument
+ \getparameters
+ [\??pp#1] % geen \c!schaal, scheelt hash ruimte
+ [\c!breedte=\@@ppbreedte,\c!hoogte=\@@pphoogte,
+ \c!offset=\@@ppoffset,#2]%
+ \else
+ \getparameters[\??pp][#1]%
+ \stelpapierformaatin
+ \fi}
\def\definieerpapierformaat%
- {\dodoubleargument\dodefinieerpapierformaat}
+ {\dodoubleempty\dodefinieerpapierformaat}
-\definieerpapierformaat[][\c!breedte=210mm,\c!hoogte=297mm]
+\definieerpapierformaat
+ [\c!breedte=210mm,\c!hoogte=297mm,\c!offset=0pt]
\chardef\papermirror =0
\chardef\printmirror =0
@@ -1659,15 +1822,75 @@
180=>\gdef#3{180}\gdef#4{0},
270=>\gdef#3{270}\gdef#4{90}]}
+\ifx\calculatepaperoffsets\undefined
+
+ \def\calculatepaperoffsets#1%
+ {\scratchdimen=\getvalue{\??pp#1\c!offset}%
+ \global\advance\papierbreedte by -2\scratchdimen
+ \global\advance\papierhoogte by -2\scratchdimen}
+
+\fi
+
+% \def\dostelpapierformaatin[#1][#2]%
+% {\ifsecondargument
+% \dostelpapierrichtingin{#1}\paperlandscape\paperrotation\paperreverse\papermirror
+% \dostelpapierrichtingin{#2}\printlandscape\printrotation\printreverse\printmirror
+% \def\docommando##1%
+% {\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
+% {\global\papierbreedte=\getvalue{\??pp##1\c!breedte}%
+% \global\papierhoogte=\getvalue{\??pp##1\c!hoogte}%
+% \calculatepaperoffsets{##1}%
+% \xdef\papierformaat{##1}}}}%
+% \processcommalist[#1]\docommando
+% \doifdefinedelse{\??pp#1\c!schaal}
+% {\edef\papierschaal{\getvalue{\??pp#1\c!schaal}}}
+% {\edef\papierschaal{1}}%
+% \def\docommando##1%
+% {\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
+% {\global\printpapierbreedte=\getvalue{\??pp##1\c!breedte}%
+% \global\printpapierhoogte=\getvalue{\??pp##1\c!hoogte}%
+% \xdef\printpapierformaat{##1}}}}%
+% \processcommalist[#2]\docommando
+% \ifnum\paperlandscape>0
+% \doglobal\swapdimens\papierbreedte\papierhoogte
+% \fi
+% \ifnum\printlandscape>0
+% \doglobal\swapdimens\printpapierbreedte\printpapierhoogte
+% \fi
+% \ifdim\papierhoogte>\printpapierhoogte
+% \global\printpapierhoogte=\papierhoogte
+% \fi
+% \ifdim\papierbreedte>\printpapierbreedte
+% \global\printpapierbreedte=\papierbreedte
+% \fi
+% \calculatehsizes
+% \calculatevsizes
+% \global\newlogostrue
+% \global\newbackgroundtrue
+% \resetlayout
+% \else\iffirstargument
+% \stelpapierformaatin[#1][#2]%
+% \else\ifx\papierformaat\undefined\else
+% \stelpapierformaatin[\papierformaat][\printpapierformaat]%
+% \fi\fi\fi}
+
\def\dostelpapierformaatin[#1][#2]%
+ {\doifinstringelse{=}{#1}
+ {\getparameters[\??pp][#1]}
+ {\doifinstringelse{=}{#2}
+ {\getparameters[\??pp#1][#2]}
+ {\dodostelpapierformaatin[#1][#2]}}}
+
+\def\dodostelpapierformaatin[#1][#2]%
{\ifsecondargument
\dostelpapierrichtingin{#1}\paperlandscape\paperrotation\paperreverse\papermirror
\dostelpapierrichtingin{#2}\printlandscape\printrotation\printreverse\printmirror
\def\docommando##1%
{\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
- {\gdef\papierformaat{##1}%
- \global\papierbreedte=\getvalue{\??pp##1\c!breedte}%
- \global\papierhoogte=\getvalue{\??pp##1\c!hoogte}}}}%
+ {\global\papierbreedte=\getvalue{\??pp##1\c!breedte}%
+ \global\papierhoogte=\getvalue{\??pp##1\c!hoogte}%
+ \calculatepaperoffsets{##1}%
+ \xdef\papierformaat{##1}}}}%
\processcommalist[#1]\docommando
\doifdefinedelse{\??pp#1\c!schaal}
{\edef\papierschaal{\getvalue{\??pp#1\c!schaal}}}
@@ -1675,14 +1898,15 @@
\def\docommando##1%
{\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
{\global\printpapierbreedte=\getvalue{\??pp##1\c!breedte}%
- \global\printpapierhoogte=\getvalue{\??pp##1\c!hoogte}}}}%
+ \global\printpapierhoogte=\getvalue{\??pp##1\c!hoogte}%
+ \xdef\printpapierformaat{##1}}}}%
\processcommalist[#2]\docommando
\ifnum\paperlandscape>0
\doglobal\swapdimens\papierbreedte\papierhoogte
\fi
\ifnum\printlandscape>0
\doglobal\swapdimens\printpapierbreedte\printpapierhoogte
- \fi
+ \fi
\ifdim\papierhoogte>\printpapierhoogte
\global\printpapierhoogte=\papierhoogte
\fi
@@ -1696,7 +1920,9 @@
\resetlayout
\else\iffirstargument
\stelpapierformaatin[#1][#2]%
- \fi\fi}
+ \else\ifx\papierformaat\undefined\else
+ \stelpapierformaatin[\papierformaat][\printpapierformaat]%
+ \fi\fi\fi}
\def\stelpapierformaatin%
{\dodoubleempty\dostelpapierformaatin}
@@ -1724,13 +1950,13 @@
\doifelse{\@@lygrid}{\v!ja}
{\gridsnappingtrue}
{\gridsnappingfalse}%
-\ifgridsnapping
- \widowpenalty=0 % is gewoon beter
- \clubpenalty =0 % zeker bij grids
-\else
- \widowpenalty=\defaultwidowpenalty
- \clubpenalty=\defaultclubpenalty
-\fi
+ \ifgridsnapping
+ \widowpenalty=0 % is gewoon beter
+ \clubpenalty =0 % zeker bij grids
+ \else
+ \widowpenalty=\defaultwidowpenalty
+ \clubpenalty=\defaultclubpenalty
+ \fi
\stelwitruimtein
\stelblankoin
\doifelse{\@@lybreedte}{\v!midden}
@@ -1780,7 +2006,10 @@
\calculatehsizes
\calculatevsizes
\global\newlogostrue
- \global\newbackgroundtrue}
+ \global\newbackgroundtrue
+ \setMPpagedata}
+
+\ifx\setMPpagedata\undefined \let\setMPpagedata\relax \fi
\def\checklayout%
{\doifsomething{\@@lyregels}
@@ -1790,22 +2019,27 @@
\newif\ifdoublesidedprint
-\def\setcenterpagebox#1#2#3#4%
- {\let\leftpagebox =#1%
- \let\rightpagebox =#2%
- \let\toppagebox =#3%
- \let\bottompagebox=#4}%
+%\def\setcenterpagebox#1#2#3#4%
+% {\let\leftpagebox =#1%
+% \let\rightpagebox =#2%
+% \let\toppagebox =#3%
+% \let\bottompagebox=#4}
\def\presetcenterpagebox% in \stellayoutin !!!!!!!!!!!!!!!!
- {\setcenterpagebox\relax\hss\relax\vss
+ {%\setcenterpagebox\relax\hss\relax\vss
\doublesidedprintfalse
\ExpandFirstAfter\processallactionsinset
[\@@lyplaats]
- [ \v!midden=>\setcenterpagebox\hss\hss\vss\vss,
- \v!links=>\setcenterpagebox\relax\hss\toppagebox\bottompagebox,
- \v!rechts=>\setcenterpagebox\hss\relax\toppagebox\bottompagebox,
- \v!onder=>\setcenterpagebox\leftpagebox\rightpagebox\vss\relax,
- \v!boven=>\setcenterpagebox\leftpagebox\rightpagebox\relax\vss,
+% [ \v!midden=>\setcenterpagebox\hss\hss\vss\vss,
+% \v!links=>\setcenterpagebox\relax\hss\toppagebox\bottompagebox,
+% \v!rechts=>\setcenterpagebox\hss\relax\toppagebox\bottompagebox,
+% \v!onder=>\setcenterpagebox\leftpagebox\rightpagebox\vss\relax,
+% \v!boven=>\setcenterpagebox\leftpagebox\rightpagebox\relax\vss,
+ [ \v!midden=>{\stelpapierformaatin[\c!links=\hss,\c!rechts=\hss,\c!boven=\vss,\c!onder=\vss]},
+ \v!links=>{\stelpapierformaatin[\c!links=,\c!rechts=\hss]},
+ \v!rechts=>{\stelpapierformaatin[\c!links=\hss,\c!rechts=]},
+ \v!onder=>{\stelpapierformaatin[\c!boven=\vss,\c!onder=]},
+ \v!boven=>{\stelpapierformaatin[\c!boven=,\c!onder=\vss]},%
\v!dubbelzijdig=>\doublesidedprinttrue,
\v!enkelzijdig=>\doublesidedprintfalse]}
@@ -2092,6 +2326,7 @@
\def\douitstellen%
{\the\everytopofpage
\ifinuitstellen\else\ifcase\nofpostponedblocks\else % The \nof-test is
+ \global\pagetotal\!!zeropoint % recently added
\global\inuitstellentrue % definitely needed
\dorecurse{\nofpostponedblocks} % else we can loose
{\haalbuffer[buf-\recurselevel]} % or disorder floats
@@ -2154,8 +2389,7 @@
{\dodoubleargument\dostelnummerin}
\def\dodefinieernummer[#1][#2]% ook overal class als localframed
- {\makecounter{\s!number#1}%
- \getparameters
+ {\getparameters
[\s!number#1]
[\s!check=,
\c!wijze=\@@nrwijze,
@@ -2166,8 +2400,13 @@
\c!conversie=\v!cijfers,
\c!start=0,
#2]%
+ \makecounter{\s!number#1}%
\setcounter{\s!number#1}{\getvalue{\s!number#1\c!start}}}
+% \c!nummer=#1 ; nogal veel copieen nodig
+%
+% \def\@@thenumber#1{\s!number\getvalue{\s!number#1\c!nummer}}
+
\def\definieernummer%
{\dodoubleempty\dodefinieernummer}
@@ -2217,7 +2456,7 @@
{\bgroup
\doifinstringelse{.0}{.#2} % waarom \instring en \@koscheider
{\doifnot{#3}{\v!per}
- {\debuggerinfo{\m!systems}{number #1 #3 becomes \getvalue{\s!number#1\c!wijze}}%
+ {%\debuggerinfo{\m!systems}{number #1 #3 becomes \getvalue{\s!number#1\c!wijze}}%
\setevalue{\s!number#1\c!wijze}% geen \xdef, gaat mis met \subpage
{#3}%
\dochecknummer{#1}}} % tricky and ugly
@@ -2249,18 +2488,38 @@
\fi
\egroup}
+% \def\domaakvoorafgaandenummer[#1]%
+% {\gdef\voorafgaandenummer{}%
+% \ifsectienummer
+% \doifvalue{\??sb\@@sectieblok\c!nummer}{\v!ja} % toegevoegd
+% {\doifvalue{\s!number#1\c!sectienummer}{\v!ja}
+% {\edef\currentsection%
+% {\getvalue{\??by\getvalue{\s!number#1\c!wijze\c!lokaal}}}%
+% \doifnot{\currentsection}{\zerosection}
+% {\doifnot{\@@sectionvalue{\currentsection}}{0}
+% {\xdef\voorafgaandenummer%
+% {\getvalue{\currentsection\c!nummer}.}}}}}%
+% \fi}
+
\def\domaakvoorafgaandenummer[#1]%
- {\gdef\voorafgaandenummer{}%
+ {\bgroup % added
+ \global\let\voorafgaandenummer\empty
\ifsectienummer
- \doifvalue{\??sb\@@sectieblok\c!nummer}{\v!ja} % toegevoegd
- {\doifvalue{\s!number#1\c!sectienummer}{\v!ja}
- {\edef\currentsection%
- {\getvalue{\??by\getvalue{\s!number#1\c!wijze\c!lokaal}}}%
- \doifnot{\currentsection}{\zerosection}
- {\doifnot{\@@sectionvalue{\currentsection}}{0}
- {\xdef\voorafgaandenummer%
- {\getvalue{\currentsection\c!nummer}.}}}}}%
- \fi}
+ \doifvalue{\??sb\@@sectieblok\c!nummer}{\v!ja} % added
+ {\doifelsevalue{\s!number#1\c!sectienummer}{\v!ja}
+ {\donetrue}{\donefalse}%
+ \doifvalue{\s!number#1\c!sectienummer}{\v!nummer}
+ {\donetrue\let\@@sectionconversion\gobbleoneargument}%
+ \ifdone
+ \edef\currentsection%
+ {\getvalue{\??by\getvalue{\s!number#1\c!wijze\c!lokaal}}}%
+ \doifnot{\currentsection}{\zerosection}
+ {\doifnot{\@@sectionvalue{\currentsection}}{0}
+ {\xdef\voorafgaandenummer%
+ {\getvalue{\currentsection\c!nummer}.}}}%
+ \fi}%
+ \fi
+ \egroup}
\def\maakvoorafgaandenummer[#1]%
{\bgroup
@@ -2400,7 +2659,7 @@
\xdef\nofsubpages{0}%
\fi}
-\def\gotonextsubpage% overlapt behoorlijk met realpage macro
+\def\gotonextsubpage% overlapt behoorlijk met realpage macro
{\global\let\checksubpages=\relax
\ifsubpaging
\edef\oldsubpage{\the\subpageno}%
@@ -2502,10 +2761,35 @@
\xdef\nextpage{\realfolio}%
\setglobalsystemreference\rt!page{\v!pagina}\nextpage
\setglobalsystemreference\rt!page{\v!vooruit}\nextpage
+ \bgroup
+ \xdef\nextnextpage{\realfolio}%
+ \ifodd\realpageno
+ \setglobalsystemreference\rt!page{\v!volgendeonevenpagina}\nextnextpage
+ \else
+ \setglobalsystemreference\rt!page{\v!volgendeevenpagina}\nextnextpage
+ \fi
+ \advance\realpageno by 1
+ \xdef\nextnextpage{\realfolio}%
+ \ifnum\realpageno>\lastpage\relax
+ %\ifodd\realpageno
+ % \setglobalsystemreference\rt!page{\v!volgendeonevenpagina}\lastpage
+ %\else
+ % \setglobalsystemreference\rt!page{\v!volgendeevenpagina}\lastpage
+ %\fi
+ \else
+ \ifodd\realpageno
+ \setglobalsystemreference\rt!page{\v!volgendeonevenpagina}\nextnextpage
+ \else
+ \setglobalsystemreference\rt!page{\v!volgendeevenpagina}\nextnextpage
+ \fi
+ \fi
+ \egroup
\else
\global\let\nextpage=\lastpage
\setglobalsystemreference\rt!page{\v!pagina}\firstpage
\setglobalsystemreference\rt!page{\v!vooruit}\firstpage
+ \setglobalsystemreference\rt!page{\v!volgendeonevenpagina}\lastpage
+ \setglobalsystemreference\rt!page{\v!volgendeevenpagina}\lastpage
\fi
\setglobalsystemreference\rt!page{\v!volgendepagina}\realfolio
\egroup}
@@ -2571,14 +2855,14 @@
\newcounter\shippedoutpages
\let\pagestoshipout\empty % {1,3,6}
-\chardef\whichpagetoshipout=0 % 0=all 1=odd 2=even
+\chardef\whichpagetoshipout=0 % 0=all 1=odd 2=even
\def\actualshipout#1%
- {\doglobal\increment\shippedoutpages
+ {\doglobal\increment\shippedoutpages
\ifx\pagestoshipout\empty
\ifcase\whichpagetoshipout\relax
\donetrue
- \or % 1
+ \or % 1
\ifodd\shippedoutpages\relax\donetrue\else\donefalse\fi
\or % 2
\ifodd\shippedoutpages\relax\donefalse\else\donetrue\fi
@@ -2607,25 +2891,24 @@
\box0}}%
\else
\message
- {[\ifarrangingpages arranged \fi page
+ {[\ifarrangingpages arranged \fi page
\ifarrangingpages\the\arrangeno\else\the\realpageno\fi\normalspace
- not flushed]}%
+ not flushed]}%
\setbox0=\hbox{#1}%
\deadcycles=0
\fi}
-
\def\actualarrange#1%
{\setbox0=\hbox{\thisisrealpage{\realfolio}#1}%
\pusharrangedpage0
- \deadcycles=0}
+ \deadcycles=0 }
\def\goleftonpage%
- {\hskip-\linkermargeafstand
- \hskip-\linkermargebreedte
- \hskip-\paginascheiding
- \hskip-\linkerrandafstand
- \hskip-\linkerrandbreedte}
+ {\hskip-\linkermargeafstand
+ \hskip-\linkermargebreedte
+ \hskip-\paginascheiding
+ \hskip-\linkerrandafstand
+ \hskip-\linkerrandbreedte}
\def\doswapmargins%
{\let\doswapmargins=\relax % to prevent local swapping
@@ -2738,11 +3021,62 @@
% \egroup
% \placefootnotes}
+% \def\dopagecontents#1#2% \box<n> \unvbox<n>
+% {\bgroup%
+% \forgetall
+% \boxmaxdepth=\maxdepth
+% \setbox0=\vbox to \teksthoogte
+% {\edef\currentpagedepth{\the\dp#2}% still to be derived from #1
+% \dotopinsertions
+% #1#2% \fuzzysnappedbox{#1}{#2}% goes wrong
+% \pushcolor
+% \ifgridsnapping
+% \vskip-\currentpagedepth
+% \vskip\openstrutdepth % \dp\strutbox
+% \prevdepth\openstrutdepth % \dp\strutbox
+% \dobotinsertions
+% \vfil
+% \else\ifr@ggedbottom
+% \vskip-\currentpagedepth
+% \vskip\openstrutdepth % \dp\strutbox
+% \prevdepth\openstrutdepth % \dp\strutbox
+% \dobotinsertions
+% \vfil
+% \else\ifb@selinebottom
+% \kern-\currentpagedepth
+% \kern\maxdepth
+% \dobotinsertions
+% \else
+% %\dobotinsertions
+% \fi\fi\fi
+% \ifdim\ht\footins>\!!zeropoint % beter dan \ifvoid\footins\else
+% \kern\skip\footins
+% \kern\ht\footins
+% \fi}%
+% \ifgridsnapping
+% \getnoflines\teksthoogte
+% \advance\noflines by -1
+% \scratchdimen=\noflines\lineheight
+% \advance\scratchdimen by \topskip
+% \else
+% \scratchdimen=\ht0
+% \fi
+% \setbox2=\hbox
+% {\ifvoid\savedfootins \else
+% \setbox\footins=\box\savedfootins
+% \fi
+% \lower\scratchdimen\vbox{\placefootnotes}}%
+% \smashbox2
+% \ht0=\!!zeropoint
+% \vbox to \teksthoogte
+% {\box0\box2}%
+% \egroup}
+
\def\dopagecontents#1#2% \box<n> \unvbox<n>
{\bgroup
\forgetall
\boxmaxdepth=\maxdepth
- \setbox0=\vbox to \teksthoogte
+ \setbox0=\vbox \ifbottomnotes to \teksthoogte \fi
{\edef\currentpagedepth{\the\dp#2}% still to be derived from #1
\dotopinsertions
#1#2% \fuzzysnappedbox{#1}{#2}% goes wrong
@@ -2763,13 +3097,12 @@
\kern-\currentpagedepth
\kern\maxdepth
\dobotinsertions
- \else
- %\dobotinsertions
\fi\fi\fi
\ifdim\ht\footins>\!!zeropoint % beter dan \ifvoid\footins\else
\kern\skip\footins
\kern\ht\footins
\fi}%
+\ifbottomnotes
\ifgridsnapping
\getnoflines\teksthoogte
\advance\noflines by -1
@@ -2778,15 +3111,20 @@
\else
\scratchdimen=\ht0
\fi
+\else
+ \scratchdimen=\!!zeropoint
+\fi
\setbox2=\hbox
{\ifvoid\savedfootins \else
\setbox\footins=\box\savedfootins
\fi
\lower\scratchdimen\vbox{\placefootnotes}}%
\smashbox2
- \ht0=\!!zeropoint
+\ifbottomnotes
+ \ht0=\!!zeropoint
+\fi
\vbox to \teksthoogte
- {\box0\box2}%
+ {\box0\box2\ifbottomnotes\else\vfill\fi}%
\egroup}
\def\dodummypageskip#1%
@@ -2810,7 +3148,7 @@
\def\plaatsboventekstblok {\dodummypageskip\v!boven}
\def\plaatsondertekstblok {\dodummypageskip\v!onder}
-% kan tzt nog eens als:
+% kan tzt nog eens als:
%
% \newtoks\everyboventekstblok
%
@@ -2825,7 +3163,7 @@
%
% \appendtoks\interactiemenus[\v!boven]\to\everyboventekstblok
%
-% kan vaker, is namelijk sneller als commalist
+% kan vaker, is namelijk sneller als commalist
\newtoks\afterpage \newtoks\aftereverypage
\newtoks\beforepage \newtoks\beforeeverypage
@@ -2884,30 +3222,56 @@
\smashbox0
\box0}
-%\def\setpagedisplacement%
-% {\global\voffset=\kopoffset
-% \global\hoffset=\rugoffset
-% \global\advance\voffset by -1in
-% \global\advance\hoffset by -1in}
-
+% \def\setpagedisplacement%
+% {\global\voffset=\kopoffset
+% \global\hoffset=\rugoffset
+% \global\advance\voffset by -1in
+% \global\advance\hoffset by -1in}
+
+% \def\centerpagebox#1%
+% {\printpapierbreedte=\papierschaal\printpapierbreedte
+% \printpapierhoogte =\papierschaal\printpapierhoogte
+% \setbox#1=\vbox to \printpapierhoogte
+% {\toppagebox
+% \hbox to \printpapierbreedte
+% {\ifdoublesidedprint
+% \doifbothsides
+% \leftpagebox\box#1\rightpagebox
+% \orsideone
+% \leftpagebox\box#1\rightpagebox
+% \orsidetwo
+% \rightpagebox\box#1\leftpagebox
+% \od
+% \else
+% \leftpagebox\box#1\rightpagebox
+% \fi}
+% \bottompagebox}}
+
\def\centerpagebox#1%
{\printpapierbreedte=\papierschaal\printpapierbreedte
\printpapierhoogte =\papierschaal\printpapierhoogte
\setbox#1=\vbox to \printpapierhoogte
- {\toppagebox
+ {\@@ppboven
+ %\toppagebox
\hbox to \printpapierbreedte
{\ifdoublesidedprint
\doifbothsides
- \leftpagebox\box#1\rightpagebox
+ %\leftpagebox\box#1\rightpagebox
+ \@@pplinks\box#1\@@pprechts
\orsideone
- \leftpagebox\box#1\rightpagebox
+ %\leftpagebox\box#1\rightpagebox
+ \@@pplinks\box#1\@@pprechts
\orsidetwo
- \rightpagebox\box#1\leftpagebox
+ %\rightpagebox\box#1\leftpagebox
+ \@@pprechts\box#1\@@pplinks
\od
\else
- \leftpagebox\box#1\rightpagebox
- \fi}
- \bottompagebox}}
+ %\leftpagebox\box#1\rightpagebox
+ \@@pplinks\box#1\@@pprechts
+ \fi}%
+ \par
+ %\bottompagebox
+ \@@pponder}}
\def\offsetprintbox#1%
{\dimen0=\wd#1\dimen2=\ht#1\dimen4=\dp#1%
@@ -3021,21 +3385,62 @@
{\m!systems}{23}
{\the\realpageno.\the\pageno\ifnum\subpageno>0 .\the\subpageno\fi,#1}}
+% \def\buildpagebody#1#2%
+% {\vbox
+% {\beginrestorecatcodes
+% \forgetall % igv problemen, check: \boxmaxdepth\maxdimen
+% \boxmaxdepth\maxdimen % new
+% \mindermeldingen
+% \setbox0=\vbox
+% {\offinterlineskip
+% \ifpagebodyornaments
+% \getbackgroundbox
+% \getlogobox
+% \bgroup % else footnotes get inconsistent font/baseline
+% \doconvertfont{\@@lyletter}{}%
+% \offinterlineskip
+% \gettextboxes
+% \egroup
+% \fi
+% \getmainbox#1#2}% including footnotes
+% \buildpagebox0
+% \ifpagebodyornaments
+% \addpagebackground0
+% \fi
+% \ifarrangingpages \else
+% \addpagecutmarks0
+% \replicatepagebox0
+% \scalepagebox0
+% \mirrorpaperbox0
+% \rotatepaperbox0
+% \addpagecolormarks0
+% \centerpagebox0
+% \mirrorprintbox0
+% \rotateprintbox0
+% \offsetprintbox0
+% \negateprintbox0
+% \fi
+% \box0
+% \endrestorecatcodes}}
+
\def\buildpagebody#1#2%
{\vbox
{\beginrestorecatcodes
\forgetall % igv problemen, check: \boxmaxdepth\maxdimen
- \boxmaxdepth\maxdimen % new
+ \boxmaxdepth\maxdimen % new
\mindermeldingen
\setbox0=\vbox
- {\doconvertfont{\@@lyletter}{}%
- \offinterlineskip
+ {\offinterlineskip
\ifpagebodyornaments
\getbackgroundbox
\getlogobox
- \gettextboxes
+ \bgroup % else footnotes get inconsistent font/baseline
+ \doconvertfont{\@@lyletter}{}%
+ \offinterlineskip
+ \gettextboxes
+ \egroup
\fi
- \getmainbox#1#2}%
+ \getmainbox#1#2}% including footnotes
\buildpagebox0
\ifpagebodyornaments
\addpagebackground0
@@ -3048,6 +3453,7 @@
\rotatepaperbox0
\addpagecolormarks0
\centerpagebox0
+\addprintbackground0
\mirrorprintbox0
\rotateprintbox0
\offsetprintbox0
@@ -3056,6 +3462,15 @@
\box0
\endrestorecatcodes}}
+\def\addprintbackground#1%
+ {\ifsomebackgroundfound\v!papier
+ \setbox#1=\vbox\localframed
+ [\??ma\v!papier]%
+ [\c!offset=\v!overlay,\c!strut=\v!nee,
+ \c!breedte=\printpapierbreedte,\c!hoogte=\printpapierhoogte]%
+ {\noindent\box#1}%
+ \fi}
+
\def\finishpagebox#1%
{\ifarrangingpages
\addpagecutmarks#1%
@@ -3145,7 +3560,7 @@
\chardef\normalpagebox=255
-\appendtoks \restoreglobalbodyfont \to \everypagebody
+\appendtoks \restoreglobalbodyfont \to \everypagebody
\appendtoks \restorecolumnsettings \to \everypagebody
\def\dopagebody#1#2%
@@ -3159,8 +3574,7 @@
\checkmargeblokken
\dotoks\beforeeverypage
\flushtoks\beforepage
- \inpagebodytrue
- \buildpagebody#1#2%
+ \inpagebodytrue\buildpagebody#1#2%
\flushtoks\afterpage
\dotoks\aftereverypage
\resetpagina
@@ -3194,7 +3608,7 @@
{\global\subpageno=0}
{\global\subpageno=\ruwenummer[\s!subpage]}}
-\newtoks\pageboundsettings
+\newtoks\pageboundsettings
\prependtoks \initializepaper \to \pageboundsettings
@@ -3487,7 +3901,7 @@
\egroup
\def\space { }
-\def\fixedspace {\hskip.5em\relax}
+\def\fixedspace {\hskip.5em\relax}
\def\nospace {\unskip\ignorespaces}
\let\spatie \space
@@ -3497,7 +3911,7 @@
\def\opelkaar%
{\nointerlineskip}
-\def\omlaag[#1]% nog eens mooier, relateren aan blanko
+\def\omlaag[#1]% nog eens mooier, relateren aan blanko
{\nointerlineskip
\vskip#1 }
@@ -3685,7 +4099,7 @@
\ifdim\prevdepth=-1000pt % toegevoegd omdat binnen
\else % een vbox een extra skip
\witruimte % ongewenst is; dit kan
-\baselinecorrection %% zie in \plaatsregister[n=1]
+\baselinecorrection %% zie in \plaatsregister[n=1]
\vskip\noparskipsignal % waarschijnlijk ook in
\fi % blanko blokkeer
\bgroup
@@ -3851,7 +4265,7 @@
\def\simplestelinterliniein%
{\localinterlinespacetrue
\setfontparameters
- \updateraggedskips % funny one here
+ \updateraggedskips % funny one here
\localinterlinespacefalse}
\definecomplexorsimple\stelinterliniein
@@ -3989,7 +4403,7 @@
\v!geenwit=>\global\blankogeenwittrue,
-\v!wit=>\global\advance\blankoskip by -\parskip,
\v!blokkeer=>\global\blankoblokkeertrue,
- \v!forceer=>\global\blankoforceertrue,
+ \v!forceer=>\global\blankoforceertrue,
\v!regel=>\global\advance\blankoskip by \lineheight,
\v!halveregel=>\global\fuzzyvskiptrue\global\advance\blankoskip by .5\lineheight,
\s!unknown=>{\herhaalmetcommando[#1]\dosingleblanko}]}
@@ -4105,7 +4519,7 @@
{\blanko[\currentblanko]}
{\blanko[\currentwitruimte]}}
-\def\blanko% % the \relax is definitely needed due to the many \if's
+\def\blanko% % the \relax is definitely needed due to the many \if's
{\relax\complexorsimple\doblanko}
\def\dostelblankoin#1%
@@ -4304,152 +4718,6 @@
\wd6=\!!zeropoint\box6\box4\relax
\fi}}
-%I n=Kapitalen
-%I c=\kap,\Kap,\KAP,\Kaps,\Woord,\Woorden,\uitgerekt
-%I
-%I Kapitalen kunnen in een kleiner letterformaat worden
-%I weergegeven met de commando's:
-%I
-%I \kap{tekst}
-%I \Kap{tekst}
-%I \KAP{tekst}
-%I
-%I Bij het eerste commando wordt de hele tekst in kapitalen
-%I gezet, bij het tweede alleen de eerste letter en bij het
-%I laatste commando de letters die worden voorafgegaan door
-%I \\, bijvoorbeeld \KAP{\\Commissie \\Ziezo}.
-%I
-%I Als de tekst van het laatste commando uit woorden bestaat,
-%I kan ook het volgende commando worden gebruikt:
-%I
-%I \Kaps{tekst tekst tekst}
-%I
-%I In dat geval zijn geen \\ nodig.
-%P
-%I Binnen \kap kan \nokap worden gebruikt om een kleine
-%I letter af te dwingen: \kap{AM\nokap{v}B}.
-%I
-%I Een eerste letter(s) van een of meer woorden kunnen worden
-%I omgezet in een hoofdletter met het commando
-%I
-%I \Woord{woord}
-%I \Woorden{woord woord woord ...}
-%I
-%I Een heel woord kan in hoofdletters worden omgezet met:
-%I
-%I \WOORD{tekst}
-%P
-%I Woorden kunnen worden uitgerekt over de actuele breedte
-%I met:
-%I
-%I \uitgerekt{tekst}
-%I
-%I bijvoorbeeld:
-%I
-%I \hbox to 20em{\uitgerekt{abcdef\\ghijk}}
-%I
-%I met \\ of {} wordt een spatie afgedwongen.
-
-%T n=kap
-%T m=kap
-%T a=k
-%T
-%T \kap{?}
-
-%I n=Afbreken
-%I c=\stelkoppeltekenin
-%I
-%I Met streepjes (-, --, ---) verbonden worden alleen afgebroken
-%I op de plaats van het streepje. Wil men kunnen afbreken op
-%I andere plaatsen, dan moet men de volgende constructie
-%I gebruiken:
-%I
-%I ditiseen|---|heellangwoord|--|hoeweleigenlijkis|-|heteenzin
-%I
-%I Het is ook mogelijk geen teken mee te geven:
-%I
-%I ditiseen||heellangwoord
-%I
-%I In dat geval wordt het ingestelde teken tussengevoegd. Het
-%I teken kan worden ingesteld met:
-%I
-%I \stelkoppeltekenin[teken=]
-%I
-%I Betekenisvolle waarden zijn: - en --, eventueel kan ~
-%I worden meegegeven. In dat geval wordt een \thinspace
-%I geplaatst.
-%P
-%I Een |~| levert midden in de zin een spatie en aan het
-%I eind van de zin een streepje, || is standaard equivalent
-%I met |--|.
-%I
-%I Het koppelteken zelf kan worden opgeroepen met |=|,
-%I bijvoorbeeld in alfa|=| en beta||deeltjes. Dit levert
-%I dus alfa- en beta-deeltjes of alfa-- en beta--deeltjes.
-%I Andere instellingen worden afgevangen.
-%I
-%I Ook ( en ) worden afgevangen. Hierbij wordt bij het
-%I afbreken van voor(na) op de volgende regel (-na)
-%I geplaatst. En wat te denken van |<| en |>|.
-
-% we use module supp-lan.tex
-
-\installdiscretionaries || \@@kpteken
-
-\newsignal\subsentencesignal
-\newcounter\subsentencelevel
-\def\subsentenceskip{.25em\relax}
-
-\def\stelkoppeltekenin%
- {\dodoubleargument\getparameters[\??kp]}
-
-\def\beginofsubsentence%
- {\ifdim\lastkern=\subsentencesignal
- \unskip
- \kern\subsentenceskip
- \fi
- \doglobal\increment\subsentencelevel
- \ifnum\subsentencelevel=1
- \leaveoutervmode
- \fi
- \ifodd\subsentencelevel
- \getvalue{\??la\currentlanguage\c!leftsentence}%
- \else
- \getvalue{\??la\currentlanguage\c!leftsubsentence}%
- \fi
- \ignorespaces}
-
-\def\beginofsubsentencespacing%
- {\kern\subsentencesignal\ignorespaces}
-
-\def\endofsubsentence%
- {\ifodd\subsentencelevel
- \getvalue{\??la\currentlanguage\c!rightsentence}%
- \else
- \getvalue{\??la\currentlanguage\c!rightsubsentence}%
- \fi
- \doglobal\decrement\subsentencelevel
- \unskip
- \kern\subsentencesignal}
-
-\def\endofsubsentencespacing%
- {%\ifdim\lastkern=\subsentencesignal \else
- % \unskip
- %\fi
- \ifdim\lastkern=\subsentencesignal
- \unskip
- \hskip\subsentenceskip
- \ignorespaces
- \else
- \unskip
- \fi}
-
-% test |<|test |<|test|>| test|>| test \par
-% test|<|test|<|test|>|test|>|test \par
-% test |<||<|test|>||>| test \par
-
-\enableactivediscretionaries
-
%I n=Positioneren
%I c=\startpositioneren,\stelpositionerenin
%I
@@ -4673,6 +4941,9 @@
\doifelsenothing{\@@klhoogte}
{\heightencolumnsfalse}
{\heightencolumnstrue}%
+ \doifelse{\@@klrichting}{\v!rechts}
+ {\reversecolumnsfalse}
+ {\reversecolumnstrue}%
\doifelse{\@@klbalanceren}{\v!ja}
{\balancecolumnstrue}
{\balancecolumnsfalse}%
@@ -4691,7 +4962,7 @@
\savecurrentblanko
\savecurrentwitruimte
\def\restorecolumnsettings%
- {\boxmaxdepth\maxdimen % done elsewhere
+ {\boxmaxdepth\maxdimen % done elsewhere
\restorecurrentblanko
\restorecurrentwitruimte}%
%
@@ -4771,9 +5042,9 @@
\def\tooninstellingB#1#2#3%
{#1&&#2#3&\tttf\string#3\cr}
-\startinterface dutch
+\startinterface dutch
-\def\tooninstellingen%
+\def\tooninstellingen%
{\noindent
\vbox
{\forgetall
@@ -4786,24 +5057,27 @@
\tooninstellingA{papierbreedte} \papierbreedte
\tooninstellingA{printpapierhoogte} \printpapierhoogte
\tooninstellingA{printpapierbreedte} \printpapierbreedte
+ \noalign{\blanko}
\tooninstellingA{kopwit} \kopwit
\tooninstellingA{rugwit} \rugwit
\tooninstellingA{hoogte} \zethoogte
\tooninstellingA{breedte} \zetbreedte
- \tooninstellingA{teksthoogte} \teksthoogte
- \tooninstellingA{tekstbreedte} \tekstbreedte
+ \noalign{\blanko}
+ \tooninstellingA{boven} \bovenhoogte
\tooninstellingC{bovenafstand} \bovenafstand
\tooninstellingA{hoofd} \hoofdhoogte
\tooninstellingC{hoofdafstand} \hoofdafstand
- \tooninstellingA{boven} \bovenhoogte
+ \tooninstellingA{teksthoogte} \teksthoogte
\tooninstellingC{voetafstand} \voetafstand
\tooninstellingA{voet} \voethoogte
\tooninstellingC{onderafstand} \onderafstand
\tooninstellingA{onder} \onderhoogte
+ \noalign{\blanko}
\tooninstellingA{linkerrand} \linkerrandbreedte
\tooninstellingC{linkerrandafstand} \linkerrandafstand
\tooninstellingA{linkermarge} \linkermargebreedte
\tooninstellingC{linkermargeafstand} \linkermargeafstand
+ \tooninstellingA{tekstbreedte} \tekstbreedte
\tooninstellingC{rechtermargeafstand}\rechtermargeafstand
\tooninstellingA{rechtermarge} \rechtermargebreedte
\tooninstellingC{rechterrandafstand} \rechterrandafstand
@@ -4819,9 +5093,9 @@
\stopinterface
-\startinterface english
+\startinterface english
-\def\tooninstellingen%
+\def\tooninstellingen%
{\noindent
\vbox
{\forgetall
@@ -4834,24 +5108,27 @@
\tooninstellingA{paperwidth} \paperwidth
\tooninstellingA{printpaperheight} \printpaperheight
\tooninstellingA{printpaperwidth} \printpaperwidth
+ \noalign{\blanko}
\tooninstellingA{topspace} \topspace
\tooninstellingA{backspace} \backspace
\tooninstellingA{height} \makeupheight
\tooninstellingA{width} \makeupwidth
- \tooninstellingA{textheight} \textheight
- \tooninstellingA{textwidth} \textwidth
+ \noalign{\blanko}
\tooninstellingA{top} \topheight
\tooninstellingC{topdistance} \topdistance
\tooninstellingA{header} \headerheight
\tooninstellingC{headerdistance} \headerdistance
+ \tooninstellingA{textheight} \textheight
\tooninstellingC{footerdistance} \footerdistance
\tooninstellingA{footer} \footerheight
\tooninstellingC{bottomdistance} \bottomdistance
\tooninstellingA{bottom} \bottomheight
+ \noalign{\blanko}
\tooninstellingA{leftedge} \leftedgewidth
\tooninstellingC{leftedgedistance} \leftedgedistance
\tooninstellingA{leftmargin} \leftmarginwidth
\tooninstellingC{leftmargindistance} \leftmargindistance
+ \tooninstellingA{textwidth} \textwidth
\tooninstellingC{rightmargindistance}\rightmargindistance
\tooninstellingA{rightmargin} \rightmarginwidth
\tooninstellingC{rightedgedistance} \rightedgedistance
@@ -4869,7 +5146,7 @@
\startinterface german
-\def\tooninstellingen%
+\def\tooninstellingen%
{\noindent
\vbox
{\forgetall
@@ -4882,24 +5159,27 @@
\tooninstellingA{papierbreite} \papierbreite
\tooninstellingA{printpapierhoehe} \printpapierhoehe
\tooninstellingA{printpapierbreite} \printpapierbreite
+ \noalign{\blanko}
\tooninstellingA{kopfweite} \kopfweite
\tooninstellingA{rumpfweite} \rumpfweite
\tooninstellingA{hoehe} \satzhoehe
\tooninstellingA{breite} \satzbreite
- \tooninstellingA{texthoehe} \texthoehe
- \tooninstellingA{textbreite} \textbreite
+ \noalign{\blanko}
\tooninstellingA{oben} \hoeheoben
- \tooninstellingC{abstandoben} \abstandoben
+ \tooninstellingC{abstandoben} \abstandoben
\tooninstellingA{kopfzeile} \kopfzeilenhoehe
\tooninstellingC{kopfzeilenabstand} \kopfzeilenabstand
+ \tooninstellingA{texthoehe} \texthoehe
\tooninstellingC{fusszeileabstand} \fusszeileabstand
\tooninstellingA{fusszeilen} \fusszeilenhoehe
\tooninstellingC{abstandunten} \abstandunten
\tooninstellingA{hoeheunten} \hoeheunten
+ \noalign{\blanko}
\tooninstellingA{linkerrand} \breitelinkerrand
\tooninstellingC{abstandlinkerrand} \abstandlinkerrand
\tooninstellingA{linkemarginal} \linkemarginalbreite
\tooninstellingC{linkemarginalafstand} \linkemarginalafstand
+ \tooninstellingA{textbreite} \textbreite
\tooninstellingC{rechtemarginalafstand}\rechtemarginalafstand
\tooninstellingA{rechtemarginal} \rechtemarginalbreite
\tooninstellingC{abstandrechterrand} \abstandrechterrand
@@ -4915,6 +5195,54 @@
\stopinterface
+\startinterface czech
+
+\def\tooninstellingen%
+ {\noindent
+ \vbox
+ {\forgetall
+ \mindermeldingen
+ \switchtobodyfont[\v!klein]
+ \tabskip\!!zeropoint
+ \halign
+ {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
+ \tooninstellingA{vyskapapiru} \vyskapapiru
+ \tooninstellingA{sirkapapiru} \sirkapapiru
+ \tooninstellingA{vyskatiskpapiru} \vyskatiskpapiru
+ \tooninstellingA{sirkatiskpapiru} \sirkatiskpapiru
+ \tooninstellingA{hornimezera} \hornimezera
+ \tooninstellingA{spodnimezera} \spodnimezera
+ \tooninstellingA{vyska} \vyskasazby
+ \tooninstellingA{breite} \sirkasazby
+ \tooninstellingA{vyskatextu} \vyskatextu
+ \tooninstellingA{sirkatextu} \sirkatextu
+ \tooninstellingA{horejsek} \vyskahorejsku
+ \tooninstellingC{vzdalenosthorejsku} \vzdalenosthorejsku
+ \tooninstellingA{zahlavi} \vyskazahlavi
+ \tooninstellingC{vzdalenostzahlavi} \vzdalenostzahlavi
+ \tooninstellingC{fusszeileabstand} \vzdalenostupati
+ \tooninstellingA{upati} \vyskaupati
+ \tooninstellingC{vzdalenostspodku} \vzdalenostspodku
+ \tooninstellingA{spodek} \vyakaspodku
+ \tooninstellingA{levyokraj} \sirkalevehookraje
+ \tooninstellingC{vzdalenostlevehookraje}\vzdalenostlevehookraje
+ \tooninstellingA{levamarginalie} \sirkalevemarginalie
+ \tooninstellingC{vzdalenostlevemarginalie}\vzdalenostlevemarginalie
+ \tooninstellingC{vzdalenostpravemarginalie}\vzdalenostpravemarginalie
+ \tooninstellingA{pravamarginalie} \sirkapravemarginalie
+ \tooninstellingC{vzdalenostpravehookraje}\vzdalenostpravehookraje
+ \tooninstellingA{pravyokraj} \sirkapravehookraje
+ \noalign{\blanko}
+ \tooninstellingB{zakladnivelikost} \the \globalbodyfontsize
+ \noalign{\blanko}
+ \tooninstellingB{linka} \relax \normallineheight
+ \tooninstellingB{vyska} \relax \strutheightfactor
+ \tooninstellingB{hloubka} \relax \strutdepthfactor
+ \tooninstellingB{topskip} \relax \topskipfactor
+ \tooninstellingB{maxdepth} \relax \maxdepthfactor}}}
+
+\stopinterface
+
\def\toonlayout% interfereert lelijk met een \typefile er na
{\bgroup
\pagina
@@ -5058,7 +5386,6 @@
% NOG [0] voor start op 0
%
-\newif\ifsomkolommen \somkolommenfalse
\newif\ifsubsom \subsomfalse
\newif\ifsymsom \symsomfalse
\newif\ifkopsom \kopsomfalse
@@ -5068,6 +5395,8 @@
\newif\ifpackeditems \packeditemsfalse
\newif\iffirstlist \firstlistfalse
+\newcounter \itemcolumndepth
+
\definetwopasslist{\s!list}
\newcounter\noflists
@@ -5089,7 +5418,7 @@
\c!letter,\c!marletter,\c!symletter,\c!kopletter,
\c!kleur,\c!markleur,\c!symkleur,\c!kopkleur,
\c!kopvoor,\c!kopna,\c!voor,\c!tussen,\c!na,
- \c!afsluiter,\c!plaatsafsluiter,
+ \c!afsluiter,\c!plaatsafsluiter,\c!inspringen,
\c!n,\c!binnen,\c!symbool,\c!marge]%
\makecounter{\s!itemcount#1}%
\setvalue{\??op\c!symbool\s!global#1}{#1}}}
@@ -5135,6 +5464,7 @@
{\processaction
[#2#3#4]
[ \v!opelkaar*=>\packitems,
+ \v!vanelkaar*=>\packeditemsfalse,
\v!intro*=>\somintrotrue,
\v!autointro*=>\somautointrotrue,
\v!ruim*=>{\doassign[\??op#1][\c!factor=1]},
@@ -5217,15 +5547,15 @@
{\def\tempsymbool{}}%
\fi}
-% PAS OP: ook 'opelkaar' en zo worden getest, nog eens afvangen!
+% PAS OP: ook 'opelkaar' en zo worden getest, nog eens afvangen!
\def\setitemmark#1% % en pas op: resets \docommando
- {\doifsymboldefinedelse{#1}
+ {\doifsymboldefinedelse{#1}
{\setxvalue{\??op\c!symbool\s!global\itemlevel}{#1}%
\setgvalue{\??op\c!symbool\s!local\itemlevel}{?}%
\def\listitem{\symbol[#1]}%
\let\docommando\gobbleoneargument}
- {\doifconversiondefinedelse{#1}
+ {\doifconversiondefinedelse{#1}
{\setxvalue{\??op\c!symbool\s!global\itemlevel}{#1}%
\setgvalue{\??op\c!symbool\s!local\itemlevel}%
{\convertnumber{#1}{\countervalue{\s!itemcount\itemlevel}}}%
@@ -5264,9 +5594,11 @@
% \dosetraggedcommand{\@@oouitlijnen}\raggedcommand
\fi
\dosetraggedcommand{\getvalue{\??op\itemlevel\c!uitlijnen}}\raggedcommand
+\doifvaluesomething{\??op\itemlevel\c!inspringen}
+ {\expanded{\stelinspringenin[\getvalue{\??op\itemlevel\c!inspringen}]}}%
\doifinset{\v!kolommen}{#1}%
- {\ifbinnenkolommen\else
- \global\somkolommentrue
+ {\ifbinnenkolommen\else\ifnum\itemcolumndepth=0
+ \global\let\itemcolumndepth\itemlevel
\getvalue{\??op\itemlevel\c!voor}%
\processfirstactioninset
[#1]
@@ -5277,12 +5609,12 @@
\v!vijf=>\!!counta=5\relax,
\s!unknown=>\@EA\!!counta\getvalue{\??op\itemlevel\c!n}]%
\startkolommen
- [\c!n=\!!counta,
+ [\c!n=\!!counta, % neter \??op\itemlevel\c!n
\c!hoogte=,
\c!lijn=\v!uit,
\c!balanceren=\v!ja,
\c!uitlijnen=\v!nee]%
- \fi}%
+ \fi\fi}%
\doifinsetelse{\v!intro}{#1}
{\somintrotrue}
{\somintrofalse}%
@@ -5293,12 +5625,12 @@
\subsomfalse
\symsomfalse
\let\marsymbol=\relax
- \let\somdestination=\empty
+ \global\let\somdestination=\empty
\def\symsymbol{}%
\def\som%
{\dosom}%
\def\but[##1]%
- {\def\somdestination{##1}%
+ {\gdef\somdestination{##1}%
\dosom}%
\def\nop%
{\sym{\strut}\strut}%
@@ -5345,10 +5677,12 @@
\dostelopsomminginvariable[\itemlevel][#2]}
{\dostelopsomminginconstant[\itemlevel][#1]%
\dostelopsomminginvariable[\itemlevel][#2]%
- \doifinsetelse{\v!verder}{#1}%
- {\edef\@@opsymbool{\getvalue{\??op\c!symbool\s!global\itemlevel}}%
+ \doifinsetelse{\v!verder}{#1}% \moexpand, else problems in non-etex with chinese
+ %{\edef\@@opsymbool{\getvalue{\??op\c!symbool\s!global\itemlevel}}%
+ {\edef\@@opsymbool{\noexpand\getvalue{\??op\c!symbool\s!global\itemlevel}}%
\getvalue{\??op\v!verder\itemlevel}}
- {\edef\@@opsymbool{\getvalue{\??op\itemlevel\c!symbool}}%
+ %{\edef\@@opsymbool{\getvalue{\??op\itemlevel\c!symbool}}%
+ {\edef\@@opsymbool{\noexpand\getvalue{\??op\itemlevel\c!symbool}}%
\setgvalue{\??op\v!verder\itemlevel}%
{\dostelopsomminginconstant[\itemlevel][#1]%
\dostelopsomminginvariable[\itemlevel][#2]}}%
@@ -5380,13 +5714,11 @@
\def\stopopsomming%
{\par
- \ifsomkolommen \else
- \dolistreference % beware !
- \fi
- \endgroup
- \ifsomkolommen
- \global\somkolommenfalse
+ \ifnum\itemcolumndepth=0 \dolistreference \fi % beware !
+ \iffirstlist \else \endgroup \fi % toegevoegd, eerte \som opent groep
+ \ifnum\itemcolumndepth=\itemlevel\relax
\stopkolommen
+ \doglobal\newcounter\itemcolumndepth
\getvalue{\??op\itemlevel\c!na}%
\else
\ifnum\itemlevel=1
@@ -5403,21 +5735,18 @@
{\flushfootnotes\penalty-5\relax} % -10
\def\somnobreak%
- {\flushfootnotes\penalty+5\ifbinnenkolommen\else00\fi\relax} % +5
+ {\flushfootnotes\penalty+5\ifbinnenkolommen\else00\fi\relax} % +5
-\def\dolistitem%
+\def\dolistitem% evt aantal items opslaan per niveau, scheelt zoeken
{\par
\ignorespaces
\increment\noflistelements
-% \ifnum\noflistelements=1 % als gevolg van nesting
-% \findtwopassdata{\s!list}{\noflists:}% % wordt soms de volgorde
-% \fi % verstoord, vandaar \find
- \ifsomkolommen\else\ifoptimizeitems
+ \ifnum\itemcolumndepth=0\relax\ifoptimizeitems
\ifnum\noflistelements=1 % tgv bv kolommen/nesting
\findtwopassdata{\s!list}{\noflists:}% % wordt soms de volgorde
- \fi % verstoord, vandaar
+ \fi % verstoord, vandaar \find
\iftwopassdatafound
- \ifnum\twopassdata=3
+ \ifnum\twopassdata=3
\ifnum\noflistelements>1
\dosomebreak\somnobreak
\fi
@@ -5449,7 +5778,9 @@
{\doattributes{\??op\itemlevel}\c!letter\c!kleur{\listitem}}%
\fi\fi
\doifsomething{\somdestination}
- {\setbox8=\hbox{\naar{\copy8}[\somdestination]}}%
+ %{\setbox8=\hbox{\naar{\copy8}[\somdestination]}}%
+ {\setbox8=\hbox{\naar{\box8}[\somdestination]}}%
+ \global\let\somdestination=\empty
\dimen2=\getvalue{\??op\itemlevel\c!breedte}\relax
\ifdim\dimen2<\!!zeropoint\relax
\llap{\ifsubsom\llap{+}\fi\box8\hskip\linkermargeafstand}%
@@ -5462,7 +5793,8 @@
\llap{\hbox to \dimen0{\ifsubsom\llap{+}\fi\box8\hfill}}%
\fi
\setevalue{\??op\c!symbool\itemlevel}%
- {\getvalue{\??op\c!symbool\s!local\itemlevel}}%
+ %{\getvalue{\??op\c!symbool\s!local\itemlevel}}% problems with \uchar
+ {\noexpand\getvalue{\??op\c!symbool\s!local\itemlevel}}%
\kopsomfalse
\subsomfalse
\symsomfalse
@@ -5473,15 +5805,15 @@
{\par
\ignorespaces
\doadvanceitem
- \ifsomkolommen\else\ifbinnenkolommen\else % dubbelop
- \ifnum\noflistelements>0\relax\dosomebreak\nobreak\fi
+ \ifnum\itemcolumndepth=0\relax\ifnum\noflistelements>0\relax
+ \dosomebreak\nobreak
\fi\fi
\iffirstlist
\firstlistfalse
\begingroup
\ifcase\itemlevel
\or % 1
- \ifsomkolommen\else
+ \ifnum\itemcolumndepth=0\relax
\ifsomintro\dosomebreak\nobreak\fi
\getvalue{\??op1\c!voor}%
\ifsomintro\dosomebreak\nobreak\fi
@@ -5492,14 +5824,14 @@
\getvalue{\??op\previtemlevel\c!tussen}% = itemlevel-1
\fi
\else
- \itemuse{\c!tussen}%
+ \itemuse\c!tussen
\fi
\ignorespaces
\dolistitem
\ifpackeditems
\stelwitruimtein[\v!geen]%
\fi
- \itemuse{\c!binnen}%
+ \itemuse\c!binnen
\marsymbol
\let\marsymbol=\relax
\doifsomething{#1}
@@ -5508,36 +5840,43 @@
\protectconversion
\rawreference{\s!lst}{#1}{\itemreference}%
\egroup}}%
+ \strut % added 11-08-99
\ignorespaces}
\def\complexsom[#1]#2\par%
{\startopsomming[#1]
- \complexdosom[]\ignorespaces#2\par
+ \complexdosom[]\ignorespaces\begstrut#2\unskip\endstrut\par
\stopopsomming}
\definecomplexorsimpleempty\som
\definecomplexorsimpleempty\dosom
-%\def\complexdokop[#1]#2\par%
-% {\ifpackeditems\else\itemuse{\c!kopvoor}\fi%
-% \dosomebreak{\pagina[\v!voorkeur]}% geen \goodbreak ! \allowbreak testen
-% \complexdosom[#1]{\doattributes{\??op\itemlevel}\c!kopletter\c!kopkleur
-% {\ignorespaces#2}}\par%
-% \ifpackeditems\else\itemuse{\c!kopna}\fi%
-% \dosomebreak\nobreak}
-
-\def\complexdokop[#1]#2\par%
- {\ifpackeditems\else\itemuse{\c!kopvoor}\fi%
- \dosomebreak{\pagina[\v!voorkeur]}% geen \goodbreak ! \allowbreak testen
+% \def\complexdokop[#1]#2\par%
+% {\ifpackeditems\else\itemuse\c!kopvoor\fi
+% \dosomebreak{\pagina[\v!voorkeur]}% geen \goodbreak ! \allowbreak testen
+% \complexdosom[#1]{\doattributes{\??op\itemlevel}\c!kopletter\c!kopkleur
+% {\ignorespaces#2}}\par
+% \ifpackeditems\else\itemuse\c!kopna\fi
+% \dosomebreak\nobreak
+% \noindentation}
+
+\def\complexdokop[#1]#2\par% % beter in \complexdosom hangen met een if
+ {\iffirstlist\else\dosomebreak\allowbreak\fi
+ \ifpackeditems\else\itemuse\c!kopvoor\fi
+ \iffirstlist\ifsomintro\else\ifcase\itemlevel % incr in \complexdosom
+ %\dosomebreak{\pagina[\v!voorkeur]}% geen \goodbreak ! \allowbreak testen
+ \dosomebreak\allowbreak
+ \fi\fi\fi
\complexdosom[#1]{\doattributes{\??op\itemlevel}\c!kopletter\c!kopkleur
- {\ignorespaces#2}}\par%
- \ifpackeditems\else\itemuse{\c!kopna}\fi%
+ {\ignorespaces#2}}\par
+ \dosomebreak\nobreak
+ \ifpackeditems\else\itemuse\c!kopna\fi
\dosomebreak\nobreak
\noindentation}
\def\complexkop[#1]#2\par#3\par%
{\startopsomming[#1]%
- \complexdokop[]\ignorespaces#2\par#3\par%
+ \complexdokop[]\ignorespaces#2\par#3\par
\stopopsomming}
\definecomplexorsimpleempty\kop
@@ -5637,7 +5976,7 @@
\def\normal@@definitiewoord#1[#2]#3#4%
{\doattributes
{\??dd#1}\c!kopletter\c!kopkleur
- {\getvalue{\??dd#1\c!commando}%
+ {\getvalue{\??dd#1\c!commando}% NAAR BUITENSTE NIVEAU !
{\begstrut\getvalue{\??dd#1\c!tekst}#4\endstrut}}%
\rawreference{\s!def}{#2}{#3}}
@@ -5656,24 +5995,52 @@
\s!default=>\let\next=#2]%
\next{#1}}
+% \def\@@definitielinkspure#1[#2]#3%
+% {\@@dostartdefinitie{#1}[#2]{#3}%
+% \advance\leftskip by \!!widtha
+% \@@makedefinitiepurebox{#1}\raggedright%
+% \advance\leftskip by \!!widthb
+% \llap
+% {\hbox to \leftskip{\copy\@@definitiebox\hss}}% copy ?
+% \@@dodefinitie{#1}}
+%
+% \def\@@definitierechtspure#1[#2]#3%
+% {\@@dostartdefinitie{#1}[#2]{#3}%
+% \advance\rightskip by \!!widtha
+% \@@makedefinitiepurebox{#1}\raggedleft%
+% \rlap
+% {\hskip\hsize
+% \hskip-\leftskip
+% \hskip-\rightskip
+% \copy\@@definitiebox}%
+% \advance\rightskip by \!!widthb
+% \@@dodefinitie{#1}}
+
\def\@@definitielinkspure#1[#2]#3%
{\@@dostartdefinitie{#1}[#2]{#3}%
+ \leftskip\@@leftdefinitieskip
+ \rightskip\@@rightdefinitieskip
\advance\leftskip by \!!widtha
- \@@makedefinitiepurebox{#1}\raggedright%
+ \@@makedefinitiepurebox{#1}\raggedright
\advance\leftskip by \!!widthb
\llap
- {\hbox to \leftskip{\copy\@@definitiebox\hss}}%
+ {\hbox to \leftskip
+ {\hskip\@@leftdefinitieskip
+ \copy\@@definitiebox\hss}}%
\@@dodefinitie{#1}}
\def\@@definitierechtspure#1[#2]#3%
{\@@dostartdefinitie{#1}[#2]{#3}%
+ \leftskip\@@leftdefinitieskip
+ \rightskip\@@rightdefinitieskip
\advance\rightskip by \!!widtha
- \@@makedefinitiepurebox{#1}\raggedleft%
+ \@@makedefinitiepurebox{#1}\raggedleft
\rlap
{\hskip\hsize
\hskip-\leftskip
\hskip-\rightskip
- \copy\@@definitiebox}%
+ \copy\@@definitiebox
+ \hskip\@@rightdefinitieskip}%
\advance\rightskip by \!!widthb
\@@dodefinitie{#1}}
@@ -5771,6 +6138,7 @@
\def\@@definitieaanelkaarpassend#1[#2]#3%
{\@@dostartdefinitie{#1}[#2]{#3}%
\unhcopy\@@definitiebox
+ \hskip\!!widthb % toegevoegd
\@@dodefinitie{#1}}
\def\@@definitieaanelkaarruim#1[#2]#3%
@@ -5783,7 +6151,7 @@
{\@@dostartdefinitie{#1}[#2]{#3}%
\hbox to \!!widtha
{\unhcopy\@@definitiebox\hss}%
- \hskip\!!widthb
+ \hskip\!!widthb
\ignorespaces
\@@dodefinitie{#1}}
@@ -5796,15 +6164,37 @@
\s!default=>\let\next=\@@definitieaanelkaarruim]%
\next{#1}[#2]{#3}}
+% \setvalue{@@definitie\v!hangend}#1[#2]#3%
+% {\skip0=-\leftskip % uggly trick
+% \@@dostartdefinitie{#1}[#2]{#3}% % adds \c!marge to \leftskip
+% \advance\skip0 by \leftskip % but useful
+% \ifdim\skip0=\!!zeropoint
+% \skip0=1.5em % just some default
+% \advance\leftskip by \skip0
+% \fi
+% \hskip-\skip0 % no hang in the first line
+% \unhcopy\@@definitiebox
+% \ifdim\!!widthb=\!!zeropoint
+% \kern.75em % another default
+% \else
+% \kern\!!widthb
+% \fi
+% \ignorespaces
+% \@@dodefinitie{#1}}
+
\setvalue{@@definitie\v!hangend}#1[#2]#3%
- {\skip0=-\leftskip % uggly trick
- \@@dostartdefinitie{#1}[#2]{#3}% % adds \c!marge to \leftskip
- \advance\skip0 by \leftskip % but useful
- \ifdim\skip0=\!!zeropoint
- \skip0=1.5em % just some default
- \advance\leftskip by \skip0
+ {\@@dostartdefinitie{#1}[#2]{#3}% % adds \c!marge to \leftskip
+ \advance\leftskip by -\leftskipadaption
+ \ifdim\leftskipadaption=\!!zeropoint
+ \leftskipadaption=1.5em % just some default
+ \ifnum\insidedefinition=1 \ifdim\leftskip>\!!zeropoint
+ \leftskipadaption=\leftskip
+ \fi \fi
\fi
- \hskip-\skip0 % no hang in the first line
+ \ifnum\insidedefinition=1
+ \advance\leftskip by \leftskipadaption
+ \fi
+ \hskip-\leftskipadaption
\unhcopy\@@definitiebox
\ifdim\!!widthb=\!!zeropoint
\kern.75em % another default
@@ -5814,6 +6204,48 @@
\ignorespaces
\@@dodefinitie{#1}}
+% \def\@@dostartdefinitie#1[#2]#3%
+% {\getvalue{\??dd#1\c!voor}%
+% \begingroup
+% \doadaptleftskip{\getvalue{\??dd#1\c!marge}}%
+% \showcomposition
+% \setbox\@@definitiebox=\hbox
+% {\forgetall
+% \mindermeldingen
+% \def\\{\crcr}%
+% % \doattributes
+% % {\??dd#1}\c!kopletter\c!kopkleur
+% % {\doifelsevalue{\??dd#1\c!plaats}{\v!aanelkaar}
+% % {\@@definitiewoord{#1}[#2]{#3}{#3}}
+% % {\@@definitiewoord{#1}[#2]{#3}{\vbox{\halign{\strut##\hss\cr#3\crcr}}}}}}%
+% \doifelsevalue{\??dd#1\c!plaats}{\v!aanelkaar}
+% {\@@definitiewoord{#1}[#2]{#3}{#3}}
+% {\@@definitiewoord{#1}[#2]{#3}{\vbox{\halign{\strut##\hss\cr#3\crcr}}}}}%
+% \!!widthb=\getvalue{\??dd#1\c!afstand}\relax
+% \ifdim\!!widthb=\!!zeropoint\relax
+% \doifvalue{\??dd#1\c!breedte}{\v!ruim}{\!!widthb=1em}%
+% \fi
+% \assignwidth
+% {\!!widtha}
+% {\getvalue{\??dd#1\c!breedte}}
+% {\doifelsevaluenothing{\??dd#1\c!monster}
+% {\unhcopy\@@definitiebox}
+% {\doattributes
+% {\??dd#1}\c!kopletter\c!kopkleur
+% {\getvalue{\??dd#1\c!tekst}\getvalue{\??dd#1\c!monster}}}}
+% {\!!widthb}%
+% %\getvalue{\??dd#1\s!do\c!lokaal}%
+% \parindent=\!!zeropoint\relax
+% \noindent
+% \ignorespaces}
+
+%D A new key 'titeluitlijnen' in definitions.
+
+\chardef\insidedefinition=0
+
+\let\@@leftdefinitieskip \!!zeropoint
+\let\@@rightdefinitieskip\!!zeropoint
+
\def\@@dostartdefinitie#1[#2]#3%
{\getvalue{\??dd#1\c!voor}%
\begingroup
@@ -5823,11 +6255,9 @@
{\forgetall
\mindermeldingen
\def\\{\crcr}%
- \doattributes
- {\??dd#1}\c!kopletter\c!kopkleur
- {\doifelsevalue{\??dd#1\c!plaats}{\v!aanelkaar}
- {\@@definitiewoord{#1}[#2]{#3}{#3}}
- {\@@definitiewoord{#1}[#2]{#3}{\vbox{\halign{\strut##\hss\cr#3\crcr}}}}}}%
+ \doifelsevalue{\??dd#1\c!plaats}{\v!aanelkaar}
+ {\@@definitiewoord{#1}[#2]{#3}{#3}}
+ {\@@definitiewoord{#1}[#2]{#3}{\vbox{\halign{\strut##\hss\cr#3\crcr}}}}}%
\!!widthb=\getvalue{\??dd#1\c!afstand}\relax
\ifdim\!!widthb=\!!zeropoint\relax
\doifvalue{\??dd#1\c!breedte}{\v!ruim}{\!!widthb=1em}%
@@ -5843,6 +6273,18 @@
{\!!widthb}%
%\getvalue{\??dd#1\s!do\c!lokaal}%
\parindent=\!!zeropoint\relax
+ \doifelsevalue{\??dd#1\c!titeluitlijnen}{\v!nee}
+ {\edef\@@leftdefinitieskip {\the\leftskip }%
+ \edef\@@rightdefinitieskip{\the\rightskip}}
+ {\ifcase\insidedefinition
+ \edef\@@leftdefinitieskip {\the\leftskip }%
+ \edef\@@rightdefinitieskip{\the\rightskip}%
+ \fi}%
+ \ifcase\insidedefinition
+ \chardef\insidedefinition=1
+ \or
+ \chardef\insidedefinition=2
+ \fi
\noindent
\ignorespaces}
@@ -5992,7 +6434,7 @@
%I \steldoornummerenin[naam][instellingen]
\def\showdnpuretext#1%
- {\strut\getvalue{\??dd#1\c!tekst} }
+ {\strut\getvalue{\??dd#1\c!tekst}} % geen spatie
\def\showdntext#1%
{\doifelsevaluenothing{\??dd#1\c!tekst}
@@ -6025,6 +6467,45 @@
% #1=name #2=level #3=\show #4[#5]#6#7=#1[#2]#3#4 van definitie
+%\def\special@@definitiewoord#1#2#3#4[#5]#6#7%
+% {\strut
+% \doifelsevalue{\??dd#1\c!nummer}{\v!nee}
+% {\!!doneafalse}
+% {\doifelse{#5}{-}
+% {\!!doneafalse}
+% {\!!doneatrue}}%
+% \if!!donea
+% \getvalue{\e!volgende#2#1}%
+% \iflocation
+% \bgroup
+% \setvalue{\??dd#1\c!sectienummer}{\v!ja}%
+% \protectconversion
+% \maakvoorafgaandenummer[#1]%
+% \xdef\internaldoornummer{#3{#1}}%
+% \rawreference{\s!num}{#1:\internaldoornummer}{}%
+% \egroup
+% \fi
+% \maakvoorafgaandenummer[#1]%
+% \hbox
+% {\def\kap##1{##1}% \domakednnumer gaat hier fout binnen kap
+% \doattributes
+% {\??dd#1}\c!kopletter\c!kopkleur
+% {\showdntext{#2#1}%
+% \domakednnummer#3{#1}%
+% \getvalue{\??dd#1\c!afsluiter}}%
+% \iflocation
+% \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}%
+% \doifreferencefoundelse{\localconnection}
+% {\in[\localconnection]}{}% genereert > of <
+% \fi}%
+% \rawreference{\s!num}{#5}{#3{#1}}%
+% \else
+% \edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded
+% \expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur
+% {\!!stringa}}%
+% \rawreference{\s!num}{#5}{}%
+% \fi}
+
\def\special@@definitiewoord#1#2#3#4[#5]#6#7%
{\strut
\doifelsevalue{\??dd#1\c!nummer}{\v!nee}
@@ -6032,36 +6513,59 @@
{\doifelse{#5}{-}
{\!!doneafalse}
{\!!doneatrue}}%
+ \chardef\definitiekoppeling=0
+ \iflocation
+ \doifvaluesomething{\??dd#1\c!koppeling}
+ {\processaction % genereert > of <
+ [\getvalue{\??dd#1\c!koppelwijze}]
+ [ \v!lokaal=>\chardef\definitiekoppeling=1, % old: default
+ \v!globaal=>\chardef\definitiekoppeling=2]}% new: global crosslinking
+ \fi
+ \stelnummerin % the number is called indirectly
+ [\getvalue{\??dd#1\??dd\c!nummer}]
+ [\c!sectienummer=\getvalue{\??dd#1\c!sectienummer}]%
\if!!donea
\getvalue{\e!volgende#2#1}%
\iflocation
\bgroup
\setvalue{\??dd#1\c!sectienummer}{\v!ja}%
\protectconversion
- \maakvoorafgaandenummer[#1]%
- \xdef\internaldoornummer{#3{#1}}%
- \rawreference{\s!num}{#1:\internaldoornummer}{}%
+ %\maakvoorafgaandenummer[#1]%
+ \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
+ \ifcase\definitiekoppeling \or
+ \xdef\internaldoornummer{#3{#1}}%
+ \rawreference{\s!num}{#1:\internaldoornummer}{}%
+ \or
+ \xdef\internaldoornummer{\countervalue{\??dd\c!koppeling#1}}%
+ \rawreference{\s!num}{#1:\internaldoornummer}{}%
+ \fi
\egroup
\fi
- \maakvoorafgaandenummer[#1]%
+ %\maakvoorafgaandenummer[#1]%
+ \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
+%\getvalue{\??dd#1\c!commando}{%
\hbox
- {\def\kap##1{##1}% \domakednnumer gaat hier fout binnen kap
- \doattributes
+ {\let\normalkap\relax % sorry, uppercase causes troubles
+ \doattributes % \nocase primitive needed
{\??dd#1}\c!kopletter\c!kopkleur
{\showdntext{#2#1}%
\domakednnummer#3{#1}%
\getvalue{\??dd#1\c!afsluiter}}%
- \iflocation
+ \iflocation\ifcase\definitiekoppeling \else
\edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}%
\doifreferencefoundelse{\localconnection}
{\in[\localconnection]}{}% genereert > of <
- \fi}%
- \rawreference{\s!num}{#5}{#3{#1}}%
+ %\in[\localconnection]%
+ \fi\fi}%
+ \doifnot{#5}{-}{\rawreference{\s!num}{#5}{#3{#1}}}%
+%}%
\else
+%\getvalue{\??dd#1\c!commando}{%
\edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded
\expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur
{\!!stringa}}%
- \rawreference{\s!num}{#5}{}%
+ \doifnot{#5}{-}{\rawreference{\s!num}{#5}{}}%
+%}%
\fi}
\def\@@ddresetsubsubsubnummer#1%
@@ -6113,7 +6617,8 @@
{\dodoubleempty\dosteldoornummerenin}
\def\dododoornummeren#1#2#3[#4][#5]#6%
- {\dodoordefinieren[#3#1]%
+ {\makecounter{\??dd\c!koppeling#1}% new: global cross linking
+ \dodoordefinieren[#3#1]%
[\s!do\c!status=\v!start,
\s!do\c!commando=\special@@definitiewoord{#1}{#3}{#6}]%
\copyparameters[\??dd#3#1][\??dn]
@@ -6125,16 +6630,16 @@
\ConvertToConstant\doifinstringelse{=}{#4}
{\getparameters[\??dd#3#1]%
[\c!tekst=#1,\??dd\c!nummer=#1,\c!conversie=,
- \c!links=,\c!rechts=,\c!koppeling=,#4]}%
+ \c!links=,\c!rechts=,\c!koppeling=,\c!koppelwijze=\v!lokaal,#4]}%
{\doifelsenothing{#4}
{\getparameters[\??dd#3#1]%
[\c!tekst=#1,\??dd\c!nummer=#1,\c!conversie=,
- \c!links=,\c!rechts=,\c!koppeling=,#4]}%
+ \c!links=,\c!rechts=,\c!koppeling=,\c!koppelwijze=,#4]}%
{\copyparameters[\??dd#3#1][\??dd#3#4]
[\c!plaats,\c!kopletter,\c!letter,\c!kleur,\c!kopkleur,
\c!breedte,\c!nummer,\c!afstand,\c!commando,\c!marge,
\c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na,
- \c!springvolgendein,\c!links,\c!rechts,\c!koppeling]%
+ \c!springvolgendein,\c!links,\c!rechts,\c!koppeling,\c!koppelwijze]%
\getparameters[\??dd#3#1]
[\c!tekst=#1,\??dd\c!nummer=#4,\c!conversie=,#5]}}%
\ExpandBothAfter\doif{\getvalue{\??dd#3#1\??dd\c!nummer}}{#1}
@@ -6153,7 +6658,8 @@
{\dotripleempty\dovolgendedoornummer[#1][#3]}}
\def\dovolgendedoornummer[#1][#2]%
- {\getvalue{\??dd\c!volgende#2\c!nummer}{#1}}%
+ {\pluscounter{\??dd\c!koppeling#1}% new: global crosslinking
+ \getvalue{\??dd\c!volgende#2\c!nummer}{#1}}%
\def\doresetdoornummer[#1][#2]%
{\getvalue{\??dd\s!reset#2\c!nummer}{#1}}%
@@ -6465,27 +6971,27 @@
% \tolerance >= 1500 % was 200
% \raggedness = 2 .. 6\korpsgrootte
-\def\leftraggedness {2\korpsgrootte}
-\def\rightraggedness {2\korpsgrootte}
-\def\middleraggedness {6\korpsgrootte}
+\def\leftraggedness {2\bodyfontsize}
+\def\rightraggedness {2\bodyfontsize}
+\def\middleraggedness {6\bodyfontsize}
\def\setraggedness#1%
- {\ifnum\tolerance<1500\relax % kleinere waarden
- \tolerance=1500\relax % geven ongewenste
- \fi % effecten
- \spaceskip=2.5\hsize % voorkomt conflict
- \xspaceskip=#1\relax % met \dimen0/2 en
- \divide\spaceskip by \xspaceskip % deze skips worden
- \hyphenpenalty=\spaceskip} % toch al aangepast
+ {\ifnum\tolerance<1500\relax % small values have
+ \tolerance=1500\relax % unwanted side effects
+ \fi %
+ \spaceskip=2.5\hsize % we misuse these
+ \xspaceskip=#1\relax % registers for temporary
+ \divide\spaceskip by \xspaceskip % storage; they are
+ \hyphenpenalty=\spaceskip} % changed anyway
\let\updateraggedskips\relax
\def\setraggedskips#1#2#3#4#5#6% never change this name
{\def\updateraggedskips%
{\dosetraggedskips{#1}{#2}{#3}{#4}{#5}{#6}}%
- \updateraggedskips}
+ \updateraggedskips}
-\def\dosetraggedskips#1#2#3#4#5#6%
+\def\dosetraggedskips#1#2#3#4#5#6%
{\leftskip=1\leftskip\!!plus#1\relax % zie: Tex By Topic 8.1.3
\rightskip=1\rightskip\!!plus#2\relax % zie: Tex By Topic 8.1.3
\spaceskip#3\relax
@@ -6494,7 +7000,7 @@
\parindent#6\relax}
\def\notragged%
- {\setraggedskips{0em}{0em}{0em}{0em}{1fil}{\parindent}} % {\voorwit}}
+ {\setraggedskips{0em}{0em}{0em}{0em}{1fil}{\parindent}}
\def\raggedleft%
{\setraggedness\leftraggedness
@@ -6504,26 +7010,52 @@
{\setraggedness\middleraggedness
\setraggedskips{\middleraggedness}{\middleraggedness}{.3333em}{.5em}{0em}{0em}}
+%D We used to have:
+%D
+%D \starttypen
+%D \def\raggedright%
+%D {\setraggedness\rightraggedness
+%D \setraggedskips{0em}{\rightraggedness}{.3333em}{.5em}{0em}{\parindent}}
+%D \stoptypen
+%D
+%D However, the next alternative, suggested by Taco, is better.
+
\def\raggedright%
{\setraggedness\rightraggedness
- \setraggedskips{0em}{\rightraggedness}{.3333em}{.5em}{0em}{\parindent}} % {\voorwit}}
+ \setraggedskips{0em}{\rightraggedness}{.3333em}{.5em}{1fil}{\parindent}}
\def\veryraggedleft%
{\setraggedskips{1fil}{0em}{.3333em}{.5em}{0em}{0em}}
+%D When we want the last line to have a natural width:
+%D
+%D \starttypen
+%D \def\veryraggedleft%
+%D {\setraggedskips{1fil}{0em}{.3333em}{.5em}{0em}{-1fil}}
+%D \stoptypen
+%D
+%D but this one is not accepted by the macros.
+
\def\veryraggedcenter%
{\setraggedskips{1fil}{1fil}{.3333em}{.5em}{0em}{0em}}
\def\veryraggedright%
- {\setraggedskips{0em}{1fil}{.3333em}{.5em}{0em}{\parindent}} % {\voorwit}}
+ {\setraggedskips{0em}{1fil}{.3333em}{.5em}{0em}{\parindent}}
\def\ttraggedright%
{\tttf
\setraggedskips{0em}{\rightraggedness}{0em}{0em}{0em}{\parindent}} % {\voorwit}}
-\def\dosteluitlijnenin[#1]%
- {\doifinsetelse{\v!ruim}{#1}{\!!doneatrue}{\!!doneafalse}%
- \processallactionsinset
+%D A bonus one:
+
+\def\raggedwidecenter%
+ {\setraggedness\middleraggedness
+ \setraggedskips{.5fil}{.5fil}{.3333em}{.5em}{0em}{0em}}
+
+\def\dodosteluitlijnenin[#1]%
+ {\doifinsetelse{\v!ruim} {#1}{\!!doneatrue}{\!!doneafalse}%
+ \doifinsetelse{\v!breed}{#1}{\!!donebtrue}{\!!donebfalse}%
+ \ExpandFirstAfter\processallactionsinset
[#1]
[ \v!regel=>\baselinebottom,
\v!onder=>\raggedbottom,
@@ -6531,11 +7063,15 @@
\v!breedte=>\notragged,
\v!binnen=>\setraggedparagraphmode\raggedleft\raggedright,
\v!buiten=>\setraggedparagraphmode\raggedright\raggedleft,
- \v!links=>\if!!donea\veryraggedleft\else\raggedleft\fi,
- \v!rechts=>\if!!donea\veryraggedright\else\raggedright\fi,
- \v!midden=>\if!!donea\veryraggedcenter\else\raggedcenter\fi,
+ \v!links=>\if!!donea\veryraggedleft \else\raggedleft \fi,
+ \v!rechts=>\if!!donea\veryraggedright \else\raggedright \fi,
+ \v!midden=>\if!!doneb\raggedwidecenter\else
+ \if!!donea\veryraggedcenter\else\raggedcenter\fi\fi,
\v!reset=>\notragged\normalbottom]}
+\def\dosteluitlijnenin[#1]%
+ {\expanded{\dodosteluitlijnenin[#1]}}
+
\def\steluitlijnenin%
{\dosingleargument\dosteluitlijnenin}
@@ -6562,15 +7098,32 @@
{\strut#1\unhbox\nextbox#2}}
\hbox}
+% also supporting \\
+%
+% \def\doalignline#1#2%
+% {\dowithnextbox
+% {\noindent\hbox to \hsize
+% {\strut#1\unhbox\nextbox#2}}
+% \hbox\bgroup
+% \def\\{\egroup\par\doalignline#1#2\bgroup}\let\next=}
+
+\def\doalignline#1#2%
+ {\bgroup
+ \def\\{\egroup\par\doalignline#1#2\bgroup}%
+ \dowithnextbox
+ {\noindent\hbox to \hsize
+ {\strut#1\unhbox\nextbox#2}\egroup}
+ \hbox}
+
% directe commando's
\def\regellinks {\doalignline \relax \hss }
\def\regelrechts{\doalignline \hss \relax}
\def\regelmidden{\doalignline \hss \hss }
-\def\regelbegrensd#1{\limitatetext{#1}{\hsize}{\onbekend}}
+\def\regelbegrensd#1{\limitatetext{#1}{\hsize}{\unknown}}
-% indirecte commando's
+% indirecte commando's
\setvalue{regel\v!links }{\doalignline \relax \hss }
\setvalue{regel\v!rechts}{\doalignline \hss \relax}
@@ -6581,15 +7134,16 @@
\def\dosteltolerantiein[#1]%
{\doifinsetelse{\v!vertikaal}{#1}%
- {\processfirstactioninset
+ {\ExpandFirstAfter\processallactionsinset
[#1]
[\v!zeerstreng=>\def\bottomtolerance{},
\v!streng=>\def\bottomtolerance{.050},
\v!soepel=>\def\bottomtolerance{.075},
\v!zeersoepel=>\def\bottomtolerance{.100}]}%
- {\processfirstactioninset
+ {\ExpandFirstAfter\processallactionsinset
[#1]
- [\v!zeerstreng=>\tolerance=200,
+ [ \v!rek=>\emergencystretch=\bodyfontsize,
+ \v!zeerstreng=>\tolerance=200,
\v!streng=>\tolerance=1500,
\v!soepel=>\tolerance=3000,
\v!zeersoepel=>\tolerance=4500]}}
@@ -6905,49 +7459,52 @@
\let\restoreinterlinepenalty=\relax
-\def\flushmargincontents% % links + rechts
- {\restoreinterlinepenalty
- \ifnum\margincontent>0
- \bgroup
- \forgetall
- \global\marginheight\!!zeropoint
- \dorecurse{\margincontent}
- {\bgroup
- \edef\margetekstafstand {\getvalue{\??im\recurselevel\c!afstand}}%
- \edef\margetekstregels {\getvalue{\??im\recurselevel\c!regel}}%
- \edef\margetekstscheider{\getvalue{\??im\recurselevel\c!scheider}}%
- \let\margetekstnummer=\recurselevel
- \getvalue{\??im\recurselevel}%
- \global\setvalue{\??im\recurselevel}{}%
- \egroup}%
- \ifdim\marginheight>\lineheight % This is something real dirty!
- \advance\marginheight by \pagetotal
- \advance\marginheight by \lineheight % a sort of bonus
- \ifdim\marginheight>\pagegoal
- \xdef\restoreinterlinepenalty%
- {\global\let\restoreinterlinepenalty\relax
+\def\flushmargincontents%
+ {\restoreinterlinepenalty % here?
+ \ifnum\margincontent>0 % called quite often, so we
+ \expandafter\doflushmargincontents % speed up the \fi scan by
+ \fi} % using a \do..
+
+\def\doflushmargincontents% % links + rechts
+ {\bgroup
+ \forgetall
+ \global\marginheight\!!zeropoint
+ \dorecurse{\margincontent}
+ {\bgroup
+ \edef\margetekstafstand {\getvalue{\??im\recurselevel\c!afstand}}%
+ \edef\margetekstregels {\getvalue{\??im\recurselevel\c!regel}}%
+ \edef\margetekstscheider{\getvalue{\??im\recurselevel\c!scheider}}%
+ \let\margetekstnummer=\recurselevel
+ \getvalue{\??im\recurselevel}%
+ \global\setvalue{\??im\recurselevel}{}%
+ \egroup}%
+ \ifdim\marginheight>\lineheight % This is something real dirty!
+ \advance\marginheight by \pagetotal
+ \advance\marginheight by \lineheight % a sort of bonus
+ \ifdim\marginheight>\pagegoal
+ \xdef\restoreinterlinepenalty%
+ {\global\let\restoreinterlinepenalty\relax
\global\interlinepenalty=\the\interlinepenalty}%
- \global\interlinepenalty=10000
- \fi
- \else % We need the above because interlinepenalties overrule vadjusted \nobreaks.
- %\vadjust
- % {\forgetall
- % \global\advance\marginheight by \lineheight
- % \global\divide\marginheight by \lineheight
- % \dorecurse{\number\marginheight}
- % {\nobreak\vskip\lineheight}%
- % \kern-\number\marginheight\lineheight}%
- \vadjust{\nobreak}%
+ \global\interlinepenalty=10000
\fi
- \doglobal\newcounter\margincontent
- \egroup
- \fi}
+ \else % We need the above because interlinepenalties overrule vadjusted \nobreaks.
+ %\vadjust
+ % {\forgetall
+ % \global\advance\marginheight by \lineheight
+ % \global\divide\marginheight by \lineheight
+ % \dorecurse{\number\marginheight}
+ % {\nobreak\vskip\lineheight}%
+ % \kern-\number\marginheight\lineheight}%
+ \vadjust{\nobreak}%
+ \fi
+ \doglobal\newcounter\margincontent
+ \egroup}
\def\complexmargewoord[#1][#2]#3%
{\doglobal\increment\margincontent
- \stelinmargein[\margincontent][]% see next macro
+ \stelinmargein[\margincontent][]% see next macro
\@EA\setgvalue\@EA{\@EA\??im\@EA\margincontent\@EA}\@EA
- {\@EA\stelinmargein\@EA[\margincontent][]% see next macro
+ {\@EA\stelinmargein\@EA[\margincontent][]% see next macro
\flushmargincontent[#1][#2]{#3}}}
\def\margewoordpositie[#1]#2%
@@ -7156,11 +7713,11 @@
{\getparameters
[\??pn]
[\c!status=\v!start,
+ \c!nummer=,
#1]%
- \doifinstringelse{\c!nummer}{#1}
+ \doifsomething{\@@pnnummer}
{\setnummer[\s!page]{\@@pnnummer}%
- \setuserpageno{\ruwenummer[\s!page]}}%
- {}}
+ \setuserpageno{\ruwenummer[\s!page]}}}
\def\stelpaginanummerin%
{\dosingleargument\dostelpaginanummerin}
@@ -7563,7 +8120,7 @@
\def\doteksten#1#2#3#4#5#6%
{\bgroup
- %\showcomposition % I need to test first
+ %\showcomposition % I need to test first
\convertargument#6\to\ascii
\doifsomething{\ascii}
{\doattributes{#1#2}#3#4%
@@ -7579,8 +8136,8 @@
\def\dodoteksten#1#2#3#4#5#6%
{\doifonevenpaginaelse
- {\doteksten{#1}{#2}#3{#4}} % #3 => provides three arguments
- {\doteksten{#1}{#2}#5{#6}}} % #5 => provides three arguments
+ {\doteksten{#1}{#2}#3{#4}} % #3 => provides three arguments
+ {\doteksten{#1}{#2}#5{#6}}} % #5 => provides three arguments
\def\dodododoteksten[#1][#2][#3][#4][#5][#6]%
{\ifsixthargument
@@ -7619,7 +8176,7 @@
{\dodoteksten{\??tk#1}{\v!tekst}
{\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#3}
{\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#3}}%
- \else\ifsecondargument % new
+ \else\ifsecondargument % new
\setvalue{\??tk#1\v!tekst\c!linkertekst}{}%
\setvalue{\??tk#1\v!tekst\c!rechtertekst}{}%
\setvalue{\??tk#1\v!tekst\c!middentekst}%
@@ -7717,11 +8274,11 @@
\def\dodefinieertekst[#1][#2][#3][#4][#5][#6]%
{\ifsixthargument
- \setvalue{\??tk#2#1}{\dosixtupleempty\dodododoteksten[#2][#3][#4][#5][#6]}%
+ \setvalue{\??tk#2#1}{\dosixtupleempty\dodododoteksten[#2][#3][#4][#5][#6]}%
\else\iffourthargument
- \setvalue{\??tk#2#1}{\dosixtupleempty\dodododoteksten[#2][#3][#4]}%
+ \setvalue{\??tk#2#1}{\dosixtupleempty\dodododoteksten[#2][#3][#4]}%
\else
- \setvalue{\??tk#2#1}{\dosixtupleempty\dodododoteksten[#2][#3]}%
+ \setvalue{\??tk#2#1}{\dosixtupleempty\dodododoteksten[#2][#3]}%
\fi\fi}
% \definieertekst[hoofdstuk][voet][paginanummer]
@@ -7748,7 +8305,7 @@
\egroup,
\v!normaal=>\doplaatslayoutregel{#1}{#2},
\s!default=>\doplaatslayoutregel{#1}{#2},
- \s!unknown=>\bgroup % new
+ \s!unknown=>\bgroup % new
\setgvalue{\??tk#1\v!tekst\c!status}{\v!normaal}%
\getvalue{\??tk#1\commalistelement}%
\doplaatslayoutregel{#1}{#2}%
@@ -7790,6 +8347,8 @@
\vskip\bovenafstand
\plaatshoofdregel
\vskip\hoofdafstand
+\plaatspositieanchors
+\vskip-\teksthoogte
\plaatstekstregel
\vskip\voetafstand
\plaatsvoetregel
@@ -7803,6 +8362,10 @@
\box0
\egroup}
+\ifx\undefined\plaatspositieanchors
+ \def\plaatspositieanchors{\vskip\teksthoogte}
+\fi
+
%\def\@@plaatspaginascheider%
% {\doif{\@@nmstatus}{\v!start}%
% {\@@nmtekstscheider}}
@@ -7837,7 +8400,7 @@
\v!opmarge=>\dododosetpagenumberlocation{\v!tekst\c!kantlijntekst},
\v!kantlijn=>\dododosetpagenumberlocation{\v!tekst\c!kantlijntekst}]%
\ifdone \else
- \dododosetpagenumberlocation{\v!tekst\c!middentekst}% default
+ \dododosetpagenumberlocation{\v!tekst\c!middentekst}% default
\fi
\fi}
@@ -7876,21 +8439,45 @@
% {\doifvalue{#1##1\c!nummer}{\v!ja}
% {\setvalue{#1\getvalue{\??by##1}\c!nummer}{\v!ja}}}%
% \processcommacommand[\@@kolijst]\dopreparepaginaprefix}
+%
+% nog fouter
+%
+% \def\preparepaginaprefix#1%
+% {\def\dopreparepaginaprefix##1%
+% {\doifelsevalue{#1##1\v!nummer}{\v!ja} % v
+% {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!ja}} % v
+% {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!nee}}}% % v
+% \processcommacommand[\@@kolijst]\dopreparepaginaprefix}
+%
+% best, beware, chapter (yes) can be followed by title (no)
\def\preparepaginaprefix#1%
{\def\dopreparepaginaprefix##1%
- {\doifelsevalue{#1##1\v!nummer}{\v!ja} % v
- {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!ja}} % v
- {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!nee}}}% % v
+ {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!nee}}% %v
+ \processcommacommand[\@@kolijst]\dopreparepaginaprefix
+ \def\dopreparepaginaprefix##1%
+ {\doifvalue{#1##1\v!nummer}{\v!ja} %v
+ {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!ja}}}%
\processcommacommand[\@@kolijst]\dopreparepaginaprefix}
+% \def\dopaginaprefix#1#2%
+% {\doifelsevalue{#1#2\v!nummer}{\v!ja} % v
+% {\@EA\beforesplitstring\@EA{\postprefix}\at:\to\preprefix
+% \@EA\aftersplitstring\@EA{\postprefix}\at:\to\postprefix
+% \doifsomething{\preprefix}
+% {\doifnot{\preprefix}{0}{\preprefix\@@nmnummerscheider}}}%
+% {\@EA\aftersplitstring\@EA{\postprefix}\at:\to\postprefix}}
+
\def\dopaginaprefix#1#2%
- {\doifelsevalue{#1#2\v!nummer}{\v!ja} % v
+ {\let\normaluchar\uchar\let\uchar\relax % ugly but needed
+ \doifelsevalue{#1#2\v!nummer}{\v!ja} % \v! and no \c!
{\@EA\beforesplitstring\@EA{\postprefix}\at:\to\preprefix
\@EA\aftersplitstring\@EA{\postprefix}\at:\to\postprefix
+ \let\uchar\normaluchar % ugly but needed
\doifsomething{\preprefix}
{\doifnot{\preprefix}{0}{\preprefix\@@nmnummerscheider}}}%
- {\@EA\aftersplitstring\@EA{\postprefix}\at:\to\postprefix}}
+ {\@EA\aftersplitstring\@EA{\postprefix}\at:\to\postprefix
+ \let\uchar\normaluchar}} % ugly but needed
\def\paginaprefix#1[#2::#3::#4]% kan wat sneller ####1:0:
{\bgroup
@@ -7901,7 +8488,7 @@
\donexttrackcommando\firstsection
\egroup}
-\unexpanded\def\@@plaatspaginanummer% called in empty tests
+\unexpanded\def\@@plaatspaginanummer% called in empty tests
{\doif{\@@nmstatus}{\v!start}%
{{\@@nmcommando{\doattributes\??nm\c!letter\c!kleur{\volledigepaginanummer}}}}}
@@ -8015,7 +8602,7 @@
\def\dododefinieermarkering[#1][#2]%
{\stelmarkeringin[#1]
[% \c!expansie=\v!nee, % saves a macro
- \c!scheider={ --- }, % watch the spaces
+ \c!scheider={ --- }, % watch the spaces
\c!status=\v!start]%
\ontkoppelmarkering[#1]% % no coupling with sections
\setevalue{\??mk#1\c!koppeling}{#2}%
@@ -8060,12 +8647,12 @@
\def\dohaalmarkering[#1][#2]%
{\doifvalue{\??mk#1\c!status}{\v!start}
{\bgroup
- \def\geenmarkering##1{\onbekend\ }%
+ \def\geenmarkering##1{\unknown\ }%
\processaction
[#2]
[ \v!beide=>{\fetchtwomarks[#1]},
\v!alles=>{\fetchallmarks[#1]},
- \s!default=>{\fetchmark[#1][\v!eerste]},
+ \s!default=>{\fetchmark[#1][\v!eerste]},
\s!unknown=>{\fetchmark[#1][#2]}]%
\egroup}}
@@ -8080,6 +8667,7 @@
\doifelsevalue{\??mk#1\c!expansie}{\v!ja}
{\expandmarkstrue}
{\expandmarksfalse}%
+% \honorunexpanded
% \getvalue{\??mk\hoofdmarkering{#1}}{#2}%
\expandafter\setmark\csname\??mk\hoofdmarkering{#1}\endcsname{#2}%
\egroup}
@@ -8238,23 +8826,26 @@
\let\@@koppeling\empty
\makecounter{\??se\v!tekst}
+
\setevalue{\??se\v!tekst\c!voor}{}
-\setevalue{\??se\v!tekst\c!na}{}
+\setevalue{\??se\v!tekst\c!na }{}
+
\setevalue{\v!tekst\c!nummer}{0}
\setevalue{\v!tekst\s!format}{}
\setevalue{\??sk\v!tekst}{}
-\setevalue{\??sk}{}
+\setevalue{\??sk }{}
-\setvalue{\??by}{\v!tekst}
-\setvalue{\??by\v!tekst}{\v!tekst}
-\setvalue{\??by\v!alles}{\v!tekst}
-\setvalue{\??by\v!per}{\v!tekst}
-\setvalue{\??by\v!per\v!tekst}{\v!tekst}
-\setvalue{\??by\v!per\v!alles}{\v!tekst}
+\setvalue{\??by }{\v!tekst}
+\setvalue{\??by\v!tekst }{\v!tekst}
+\setvalue{\??by\v!alles }{\v!tekst}
+\setvalue{\??by\v!per }{\v!tekst}
+\setvalue{\??by\v!per\v!tekst }{\v!tekst}
+\setvalue{\??by\v!per\v!alles }{\v!tekst}
+\setvalue{\??by\v!per\v!pagina}{\v!tekst} % see footnotes
\def\dostelsectiein[#1][#2]%
- {\getparameters[\??se#1][#2]
+ {\getparameters[\??se#1][#2]%
\doifelsevalue{\??se#1\c!vorigenummer}{\v!ja}
{\setvalue{#1\c!nummer}{\@@longsectionnumber{#1}}}
{\setvalue{#1\c!nummer}{\@@shortsectionnumber{#1}}}}
@@ -8335,6 +8926,21 @@
\def\@@sectionconversion#1%
{\getvalue{\??cv\getvalue{\??se#1\@@sectieblok\c!conversie}}}
+% suited for chinese too:
+
+\def\@@sectionconversion#1#2% a doublure with \@@shortsectionnumber
+ {\ifnum#2=0 0\else % else troubles with \uchar
+ \@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax
+ \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax
+ #2%
+ \else
+ \getvalue{\??cv\getvalue{\??se#1\c!conversie}}{#2}%
+ \fi
+ \else
+ \getvalue{\??cv\getvalue{\??se#1\@@sectieblok\c!conversie}}{#2}%
+ \fi
+ \fi}
+
\def\@@sectionlevel#1%
{\ifundefined{\??se#1\c!niveau}0\else\getvalue{\??se#1\c!niveau}\fi}
@@ -8381,7 +8987,7 @@
{\bgroup
\doifelse{#1}{\v!vorige}
{\global\alllevelstrue
- \xdef\currentlevel{}%
+ \global\let\currentlevel\empty
\def\dobacktrackcommando##1%
{\ifnum\countervalue{\??se##1}>0
\global\alllevelsfalse
@@ -8392,7 +8998,7 @@
\dobacktrackcommando\lastsection}
{\doifelse{\getvalue{\??by#1}}{\v!tekst}
{\global\alllevelstrue
- \xdef\currentlevel{}}
+ \global\let\currentlevel\empty}
{\doifdefinedelse{\??ko#1\c!sectie} % beter alteratief: ook
{\edef\@@sectie{\getvalue{\??ko#1\c!sectie}}} % hoofdstuk\c!format
{\edef\@@sectie{#1}}%
@@ -8400,7 +9006,7 @@
{\global\alllevelsfalse
\xdef\currentlevel{\getvalue{\@@sectie\s!format}}}
{\global\alllevelstrue
- \xdef\currentlevel{}%
+ \global\let\currentlevel\empty
\def\dobacktrackcommando##1%
{\@EA\ifx\csname\??se##1\c!start\endcsname\relax
\dobacktracklevel{##1}%
@@ -8415,6 +9021,8 @@
\dobacktrackcommando\lastsection}}}%
\egroup}
+\let\currentlevel\empty
+
\def\doifnextlevelelse[#1::#2]#3#4%
{\ifalllevels
#3%
@@ -8461,14 +9069,24 @@
\@@sectionconversion{#1}{\@@sectionvalue{#1}}%
\fi}
-\def\dodosetlocalsectieblok[#1#2][#3]%
+% suited for chinese too:
+
+\def\@@shortsectionnumber#1%
+ {\@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax
+ \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax
+ \@@sectionvalue{#1}%
+ \else
+ \@@sectionconversion{#1}{\@@sectionvalue{#1}}%
+ \fi
+ \else
+ \@@sectionconversion{#1}{\@@sectionvalue{#1}}%
+ \fi}
+
+\def\dosetlocalsectieblok#1#2#3%
{\def\@@sectiontype{#1}%
- \def\@@sectieblok{#1#2}%
+ \def\@@sectieblok{#2}%
\def\@@sectieblokken{#3}}
-\def\dosetlocalsectieblok#1#2%
- {\@EA\dodosetlocalsectieblok\@EA[#1][#2]}
-
\def\doaroundsectieblok#1%
{\doifvaluesomething{\??sb#1\c!pagina}
{\ExpandFirstAfter\pagina[\getvalue{\??sb#1\c!pagina}]}%
@@ -8478,7 +9096,7 @@
\def\dostartsectieblok#1#2%
{\begingroup
\doaroundsectieblok{#1}%
- \dosetlocalsectieblok{#1}{#2}%
+ \getvalue{\??sb#1}%
\expandafter\csname#2true\endcsname % vervangen door mode
\enablemode[#1]%
\getvalue{\??sb\@@sectieblok\c!voor}% don't move
@@ -8496,6 +9114,11 @@
\def\stelsectieblokin%
{\dodoubleargument\dostelsectieblokin}
+% We used to use the first char as id, but a counter is
+% better, because in english we get a name clash.
+
+\newcounter\currentsectionblock
+
\def\dodefinieersectieblok[#1][#2][#3]%
{\getparameters
[\??sb#1]
@@ -8505,8 +9128,9 @@
%\c!na=,
#3]%
\expandafter\newif\csname if#2\endcsname
- \setvalue{\??sb#1}%
- {\dosetlocalsectieblok{#1}{#2}}%
+ \doglobal\increment\currentsectionblock
+ \setevalue{\??sb#1}%
+ {\noexpand\dosetlocalsectieblok{\currentsectionblock}{#1}{#2}}%
\setvalue{\e!start#2}%
{\dostartsectieblok{#1}{#2}}%
\setvalue{\e!stop#2}%
@@ -8515,33 +9139,24 @@
\def\definieersectieblok%
{\dotripleargument\dodefinieersectieblok}
-\def\sectiebloklabel#1%
- {\@EA\ifx\csname#1\@@sectieblok\c!label\endcsname\relax
- \else
- \labeltext{\getvalue{#1\@@sectieblok\c!label}}%
- \fi}
-
-% BETER:
-
-\def\sectiebloklabel#1%
+\def\sectiebloklabel#1#2%
{\@EA\ifx\csname\??ko#1\@@sectieblok\c!label\endcsname\relax
- \labeltext{#1}%
+ \labeltexts{#1}{#2}%
\else
- \labeltext{\getvalue{\??ko#1\@@sectieblok\c!label}}%
+ \labeltexts{\getvalue{\??ko#1\@@sectieblok\c!label}}{#2}%
\fi}
-\dosetlocalsectieblok{\v!hoofdtekst}{\v!hoofdteksten}
+\dosetlocalsectieblok{2}{\v!hoofdtekst}{\v!hoofdteksten} % hm, dirty
\def\setsectiontype[#1]%
{\getvalue{\??sb#1}}
-\def\writesection#1#2#3%
+\def\writesection#1#2#3% #3 -> \asciititle
{\bgroup
- \convertargument#3\to\ascii
\edef\!!stringa{#1}%
\@EA\writestatus\@EA
{\!!stringa}
- {\ifsectienummer#2\else(#2)\fi\normalspace\ascii}%
+ {\ifsectienummer#2\else(#2)\fi\normalspace\asciititle}%
\egroup}
\def\@@koniveau{1} \def\kopniveau{\@@koniveau}
@@ -8580,10 +9195,10 @@
{\doifvaluesomething{\??ko#1\c!hoofd}
{\stelhoofdin[\c!status=\getvalue{\??ko#1\c!hoofd}]}}%
\doifinset{\getvalue{\??tk\v!voet\v!tekst\c!status}}{\v!normaal,\v!start}
- {\doifvaluesomething{\??ko#1\c!voet} % new
+ {\doifvaluesomething{\??ko#1\c!voet} % new
{\stelvoetin[\c!status=\getvalue{\??ko#1\c!voet}]}}}}
-\def\dohandelpaginaafX#1% zie doordefinieren / boven
+\def\dohandelpaginaafX#1% zie doordefinieren / boven
{\bgroup
\!!countb=\@@koniveau
\advance\!!countb by #1
@@ -8611,11 +9226,21 @@
{\xdef\@@koniveau{\getvalue{\??se\@@sectie\c!niveau}}%
\nobreak}
+%\def\dolocalkopsetup#1% koppeling met standaard kopcommando / engels
+% {\forgetall
+% \doifvaluesomething{\??ko#1\c!uitlijnen}
+% {\ExpandFirstAfter\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}%
+% \doifvaluesomething{\??ko#1\c!tolerantie}
+% {\ExpandFirstAfter\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}%
+% \def\\{\crlf\strut\ignorespaces}}
+
\def\dolocalkopsetup#1% koppeling met standaard kopcommando / engels
{\forgetall
- \doifvaluesomething{\??ko#1\c!uitlijnen} % can be embedded in \framed etc
- {\ExpandFirstAfter\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}%
- \def\\{\crlf\strut}}
+ \doifvaluesomething{\??ko#1\c!uitlijnen}
+ {\expanded{\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}}%
+ \doifvaluesomething{\??ko#1\c!tolerantie}
+ {\expanded{\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}}%
+ \def\\{\crlf\strut\ignorespaces}}
\newif\ifplaatskop
\newif\ifverhoognummer
@@ -8655,10 +9280,10 @@
\def\dododosomekop#1#2#3#4%
{\iffourthargument
\def\next%
- {\dodododosomekop{#1}[#2]{\sectiebloklabel{#1}}{#3}{#4}}%
+ {\dodododosomekop{#1}[#2]{#1}{#3}{#4}}%
\else
\def\next%
- {\dodododosomekop{#1}[#2]{\sectiebloklabel{#1}}{\finalsectionnumber}{#3}}%
+ {\dodododosomekop{#1}[#2]{#1}{\finalsectionnumber}{#3}}%
\fi
\next}
@@ -8699,15 +9324,12 @@
\doifelsevalue{\??ko#1\c!prefix}{+}
{\doifelsenothing{#2}
{\def\localkopprefix{+}}
- {\def\localkopprefix{#2}}}
+ {\def\localkopprefix{#2}}} % eigenlijk alleen eerste
{\edef\localkoprefix{\getvalue{\??ko#1\c!prefix}}}%
\fi
\doifelsevalue{\??ko#1\c!plaatskop}{\v!ja}
{\plaatskoptrue}
{\plaatskopfalse}%
- %\doifelsevalue{\??ko#1\c!verhoognummer}{\v!ja}
- % {\verhoognummertrue}
- % {\verhoognummerfalse}%
\processaction
[\getvalue{\??ko#1\c!verhoognummer}]
[ \v!ja=>\verhoognummertrue,
@@ -8727,13 +9349,7 @@
\else
\kopnummerfalse
\fi
- %\convertargument#5\to\asciititle
- \processaction
- [\getvalue{\??ko#1\c!expansie}]
- [ \v!ja=>{\edef\asciititle{#5}},
- \v!commando=>{\convertcommand#5\to\asciititle},
- \s!default=>{\convertargument#5\to\asciititle},
- \s!unknown=>{\convertargument#5\to\asciititle}]%
+ \convertexpanded{\??ko#1}{#5}\asciititle
\ifverhoognummer
\ifplaatskop
\checknexthead\handelpaginaaf{#1}%
@@ -8748,17 +9364,16 @@
{#1}
{\setsectionlistreference{\@@sectie}{#1}%
\ExpandFirstAfter\soortpagina[\@@koppeling]%
-% \rawreference{\s!sec}{#2}{#4}%
-\rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
+ \rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
\resetsectionmarks[\@@sectie]%
-\stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
+ \stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
\doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}}
- {#3#4}
+ {\sectiebloklabel{#3}{#4}}
{#5}
- {\marking[#1]{#5}%
-\doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
- {\edef\finalsectionnumber{#4}}
- {\bepaalkopnummer[#1]}%
+ {\marking[#1]{#5}%
+ \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
+ {\edef\finalsectionnumber{#4}}
+ {\bepaalkopnummer[#1]}%
\expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}%
\writesection{#1}{#4}{#5}%
\else
@@ -8766,16 +9381,15 @@
{#1}
{\setsectionlistreference{\@@sectie}{#1}%
\ExpandFirstAfter\soortpagina[\@@koppeling]%
-% \rawpagereference{\s!sec}{#2}%
-\rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
+ \rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
\resetsectionmarks[\@@sectie]%
-\stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
+ \stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
\doschrijfnaarlijst{\@@koppeling}{}{#5}{\v!kop}}
{#5}
- {\marking[#1]{#5}%
-\doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
- {\edef\finalsectionnumber{#4}}
- {\bepaalkopnummer[#1]}%
+ {\marking[#1]{#5}%
+ \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
+ {\edef\finalsectionnumber{#4}}
+ {\bepaalkopnummer[#1]}%
\expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}%
\writesection{#1}{-}{#5}%
\fi
@@ -8795,25 +9409,23 @@
\setsectionlistreference{\@@sectie}{#1}%
\resetsectionmarks[\@@sectie]%
\marking[#1]{#5}%
-\doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
- {\edef\finalsectionnumber{#4}}
- {\bepaalkopnummer[#1]}%
+ \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
+ {\edef\finalsectionnumber{#4}}
+ {\bepaalkopnummer[#1]}%
\expanded{\marking[#1\v!nummer]{\finalsectionnumber}}%
\ExpandFirstAfter\soortpagina[\@@koppeling]%
-\bgroup
-\stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
+ \bgroup
+ \stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
\ifkopnummer
-% \rawreference{\s!sec}{#2}{#4}%
-\rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
+ \rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
\doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}%
\writesection{#1}{#4}{#5}%
\else
-% \rawpagereference{\s!sec}{#2}%
-\rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
+ \rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
\doschrijfnaarlijst{\@@koppeling}{}{#5}{\v!kop}%
\writesection{#1}{-}{#5}%
\fi
-\egroup
+ \egroup
\ifkopprefix
\ExpandFirstAfter\setupreferencing[\c!prefix=\localkopprefix]%
\fi
@@ -8825,8 +9437,7 @@
\getvalue{\??ko#1\c!tussen}%
\doplaatskoptekst
{#1}
-% {\rawpagereference{\s!sec}{#2}}
-{\rawreference{\s!sec}{#2}{#4{}{\asciititle}}}
+ {\rawreference{\s!sec}{#2}{{#4}{\asciititle}}}
{#5}
{}%
\writesection{#1}{-}{#5}%
@@ -8845,78 +9456,6 @@
% \onderwerp{test} \strut \input tufte
% \onderwerp{test} \plaatslijst[...]
-% \def\doplaatskoptekst#1#2#3#4%
-% {\bgroup
-% \forgetall
-% %\showcomposition
-% \mindermeldingen
-% \postponefootnotes
-% \def\localkopsetup%
-% {\dolocalkopsetup{#1}}%
-% \startsynchronisatie
-% \ifdisplaysectionhead\@EA\snaptogrid\@EA\hbox\fi
-% {\getvalue{\??ko#1\c!commando}
-% {} % no number
-% {\doattributes
-% {\??ko#1}\c!letter\c!kleur
-% {\doattributes
-% {\??ko#1}\c!tekstletter\c!tekstkleur
-% {\dontconvertfont
-% \ifdisplaysectionhead\stelinterliniein\fi
-% #2%
-% \getvalue{\??ko#1\c!voorcommando}%
-% \getvalue{\??ko#1\c!tekstcommando}{\setstrut\begstrut#3\endstrut}%
-% \getvalue{\??ko#1\c!nacommando}%
-% \ifdisplaysectionhead\endgraf\fi}}}}%
-% \ifdisplaysectionhead
-% \endgraf
-% \nointerlineskip
-% \dosomebreak\nobreak
-% \fi
-% #4%
-% \ifdisplaysectionhead
-% \prevdepth\openstrutdepth % \dp\strutbox % ivm grid
-% \fi
-% \stopsynchronisatie
-% \egroup
-% \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}}
-%
-% \def\doplaatskopnummertekst#1#2#3#4#5%
-% {\bgroup
-% \forgetall
-% %\showcomposition
-% \mindermeldingen
-% \postponefootnotes
-% \def\localkopsetup%
-% {\dolocalkopsetup{#1}}%
-% \startsynchronisatie
-% \ifdisplaysectionhead\@EA\snaptogrid\@EA\hbox\fi
-% {\getvalue{\??ko#1\c!commando}%
-% {\doattributes{\??ko#1}\c!letter\c!kleur
-% {\doattributes{\??ko#1}\c!nummerletter\c!nummerkleur
-% {\getvalue{\??ko#1\c!voorcommando}%
-% \getvalue{\??ko#1\c!nummercommando}{\setstrut\begstrut#3\endstrut}}}}
-% {\doattributes{\??ko#1}\c!letter\c!kleur
-% {\doattributes{\??ko#1}\c!tekstletter\c!tekstkleur
-% {\dontconvertfont
-% \ifdisplaysectionhead\stelinterliniein\fi
-% #2%
-% \getvalue{\??ko#1\c!tekstcommando}{\setstrut\begstrut#4\endstrut}%
-% \getvalue{\??ko#1\c!nacommando}%
-% \ifdisplaysectionhead\endgraf\fi}}}}%
-% \ifdisplaysectionhead
-% \endgraf
-% \nointerlineskip
-% \dosomebreak\nobreak
-% \fi
-% #5%
-% \ifdisplaysectionhead
-% \prevdepth\openstrutdepth % \dp\strutbox % important, see comment
-% \fi
-% \stopsynchronisatie
-% \egroup
-% \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}}
-
\def\doplaatskoptekst#1#2#3#4%
{\beginheadplacement{#1}%
\setbox0=\hbox
@@ -8973,20 +9512,20 @@
\newif\ifcontinuoushead
\def\beginheadplacement#1%
- {\bgroup
+ {\bgroup
\everypar{}% needed indeed
\noindent % ipv \witruimte elders, na \forgetall !
- \bgroup
+ \bgroup
\forgetall % now we may forget everything
%\showcomposition
\mindermeldingen
\postponefootnotes
\iflocation\ifdisplaysectionhead\else\noninterferingmarks\fi\fi
- \stelinteractiein
+ \setupinteraction
[\c!letter=,
\c!kleur=,
\c!contrastkleur=]%
- \strictouterreferencestrue % tzt instelling
+ \strictouterreferencestrue % tzt instelling
\def\localkopsetup%
{\dolocalkopsetup{#1}}%
\startsynchronisatie}
@@ -8997,54 +9536,59 @@
\let\headlastlinewidth\!!zeropoint
\snaptogrid\hbox
{\iflocation
-\ifautocrossdocument
- \naarbox{\box0}[\getvalue{\??ko#1\c!file}::#1]%
-\else
- \hbox{\box0}%
-\fi
+ \ifautocrossdocument
+ \naarbox{\box0}[\getvalue{\??ko#1\c!file}::#1]%
+ \else
+ \hbox{\box0}%
+ \fi
\else
\hbox{\box0}%
- \fi}%
+ \fi
+ \doflushfootnotes}% new
\endgraf
\nointerlineskip
\dosomebreak\nobreak
#2%
\else
\strut
+ \doflushfootnotes % new
\iflocation
-\ifautocrossdocument
- \hhboxindent=\ifcontinuoushead\headlastlinewidth\else\!!zeropoint\fi
- \unhhbox0\with{\naarbox{\box\hhbox}[\getvalue{\??ko#1\c!file}::#1]}%
- \advance\lasthhboxwidth by \numberheaddistance
- \xdef\headlastlinewidth{\the\lasthhboxwidth}%
-\else
- \unhbox0
- \global\let\headlastlinewidth\!!zeropoint
-\fi
+ \ifautocrossdocument
+ \hhboxindent=\ifcontinuoushead\headlastlinewidth\else\!!zeropoint\fi
+ \unhhbox0\with{\naarbox{\box\hhbox}[\getvalue{\??ko#1\c!file}::#1]}%
+ \advance\lasthhboxwidth by \numberheaddistance
+ \xdef\headlastlinewidth{\the\lasthhboxwidth}%
+ \else
+ \unhbox0
+ \global\let\headlastlinewidth\!!zeropoint
+ \fi
\else
\unhbox0
\global\let\headlastlinewidth\!!zeropoint
\fi
#2%
- \dimen0=\numberheaddistance
+ \dimen0=\numberheaddistance
\hskip\dimen0 \!!plus \dimen0 \!!minus .25\dimen0
\hskip\headsignal\ignorespaces
\fi
%#2%
\ifdisplaysectionhead
- \prevdepth\openstrutdepth % \dp\strutbox % important, see comment
+ \prevdepth\dp\strutbox % important, font related depth, see comment
\fi
\stopsynchronisatie
\egroup
\egroup
+\doflushfootnotes % new, still needed?
\ifdisplaysectionhead
\doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}%
+ \else
+ \nonoindentation % recently added, was a bug
\fi}
\def\checknexthead#1#2% nog optioneel
{\ifhmode
\scratchcounter=\lastpenalty\unpenalty % no beauty in this
- \ifdim\lastskip=\headsignal
+ \ifdim\lastskip=\headsignal
\handelpaginaafC{#1}%
\global\continuousheadtrue
\else
@@ -9089,12 +9633,24 @@
\xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}%
\egroup}
+%\def\complexkopnummer[#1]%
+% {\bgroup
+% \setsectieenkoppeling{#1}%
+% \xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}%
+% \doifnot{\huidigekopnummer}{0}
+% {\finalsectionnumber}%
+% \egroup}
+
\def\complexkopnummer[#1]%
{\bgroup
- \setsectieenkoppeling{#1}%
+ \edef\huidigekopnummer{#1}%
+ \doifinsetelse{-}{#1}
+ {\removefromcommalist{-}\huidigekopnummer
+ \setsectieenkoppeling\huidigekopnummer
+ \stelsectiein[\@@sectie][\c!vorigenummer=\v!nee]}%
+ {\setsectieenkoppeling\huidigekopnummer}%
\xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}%
- \doifnot{\huidigekopnummer}{0}
- {\finalsectionnumber}%
+ \doifnot{\huidigekopnummer}{0}{\finalsectionnumber}%
\egroup}
\def\simplekopnummer%
@@ -9105,6 +9661,9 @@
\def\alinea%
{\par}
+\def\plaatskopalinea#1#2%
+ {\vbox{\begstrut\doifsomething{#1}{#1\hskip\numberheaddistance}#2}}
+
\def\plaatskopnormaal#1#2%
{\doifelsenothing{#1}
{\vbox
@@ -9139,9 +9698,9 @@
\def\plaatskopintekst#1#2%
{\bgroup
\localkopsetup
- \doifsomething{#1}{{#1}\kern\numberheaddistance}% no stretch
+ \doifsomething{#1}{{#1}\kern\numberheaddistance}% no stretch
{\begstrut#2}%
- %\hskip\numberheaddistance % naar elders
+ %\hskip\numberheaddistance % naar elders
\egroup}
% default == instellingen
@@ -9183,21 +9742,21 @@
\c!verhoognummer=\v!ja,
\c!variant=\@@kovariant,
\c!commando=\@@plaatskop,
- \c!uitlijnen=,
+ \c!uitlijnen=,
+ \c!tolerantie=,
\c!file=,
\c!expansie=,
#2]%
\ConvertToConstant\doifnot{#1}{\getvalue{\??ko#1\c!default}}
{\doifsomething{\getvalue{\??ko#1\c!default}}
- {%\presetlabeltext[#1=\labeltext{\getvalue{\??ko#1\c!default}}]%
- \copyparameters
+ {\copyparameters
[\??ko#1][\??ko\getvalue{\??ko#1\c!default}]
[\c!voor,\c!na,\c!commando,\c!file,\c!pagina,\c!doorgaan,\c!hoofd,\c!voet,
\c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer,
\c!letter,\c!kleur,\c!afstand,\c!variant,\c!springvolgendein,
%\c!nummerletter,\c!tekstletter,
- %\c!expansie, % njet
- \c!uitlijnen,\c!nummercommando,\c!tekstcommando]}}%
+ %\c!expansie, % njet
+ \c!uitlijnen,\c!tolerantie,\c!nummercommando,\c!tekstcommando]}}%
\getparameters[\??ko#1][#2]%
\doifsomething{\getvalue{\??ko#1\c!sectie}}
{\doifundefined{\??mk#1}
@@ -9209,16 +9768,15 @@
\doifundefined{\??li#1}{\definieerlijst[#1]}}
{\ConvertToConstant\doifelse{#1}{#2}
{\doifundefined{\??li#1}{\definieerlijst[#1]}}
- {%\presetlabeltext[#1=\labeltext{#2}]%
- \copyparameters
+ {\copyparameters
[\??ko#1][\??ko#2]
[\c!niveau,\c!sectie,\c!koppeling,\c!prefix,
\c!voor,\c!na,\c!commando,\c!file,\c!pagina,\c!doorgaan,\c!hoofd,\c!voet,
\c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer,
\c!letter,\c!kleur,\c!afstand,\c!variant,\c!springvolgendein,
%\c!nummerletter,\c!tekstletter,
- %\c!expansie, % njet
- \c!uitlijnen,\c!nummercommando,\c!tekstcommando]%
+ %\c!expansie, % njet
+ \c!uitlijnen,\c!tolerantie,\c!nummercommando,\c!tekstcommando]%
\definieermarkering[#1][#2]%
\definieermarkering[#1\v!nummer][#2\v!nummer]%
\doifundefined{\??li#1}{\definieerlijst[#1][#2]}}}%
@@ -9264,6 +9822,7 @@
\v!marge=>\def\@@plaatskop{\plaatskopinmarge},
\v!inmarge=>\def\@@plaatskop{\plaatskopinmarge},
\v!tekst=>\def\@@plaatskop{\plaatskopintekst}\displaysectionheadfalse,
+ \v!alinea=>\def\@@plaatskop{\plaatskopalinea},
\s!unknown=>\def\@@plaatskop{\plaatskopnormaal}]}
\def\dostelkoppenin[#1]%
@@ -9279,7 +9838,7 @@
\def\systemsuppliedchapter {\getvalue{\v!hoofdstuk}}
\def\systemsuppliedtitle {\getvalue{\v!titel}}
-% a left over
+% a left over
\def\complexbijlage[#1]#2%
{\pagina[\v!rechts]
@@ -9429,7 +9988,7 @@
\def\startlistreferences#1%
{\thisissomeinternal{\s!lst}{#1\currentsectionformat}%
- \setxvalue{\s!lst:#1}{\realfolio}% to be sure
+ \setxvalue{\s!lst:#1}{\realfolio}% to be sure
\setxvalue{\s!lst:#1\currentsectionformat}{\realfolio}%
\setxvalue{\e!vorigelokale#1}{\s!lst:#1\previoussectionformat}%
\setxvalue{\e!huidigelokale#1}{\s!lst:#1\currentsectionformat}%
@@ -9559,10 +10118,10 @@
\processaction
[\@@rginspringen]
[ \v!ja=>\def\@@rgstepyes{\parindent\@@rgparindent}%
- \def\@@rgstepno{\parindent\@@rgparindent},
- \v!oneven=>\def\@@rgstepyes{\parindent\!!zeropoint}%
- \def\@@rgstepno{\parindent\@@rgparindent},
- \v!even=>\def\@@rgstepno{\parindent\!!zeropoint}%
+ \def\@@rgstepno {\parindent\@@rgparindent},
+ \v!oneven=>\def\@@rgstepyes{\parindent\!!zeropoint }%
+ \def\@@rgstepno {\parindent\@@rgparindent},
+ \v!even=>\def\@@rgstepno {\parindent\!!zeropoint }%
\def\@@rgstepyes{\parindent\@@rgparindent}]%
\inregelstrue
\stelwitruimtein[\v!geen]%
@@ -9578,7 +10137,7 @@
{\par
\afterfirstobeyedline
\ifdim\lastskip>\!!zeropoint
- \def\@@rglinesteptoggle{0}%
+ \gdef\@@rglinesteptoggle{0}%
\else
\doglobal\increment\@@rglinesteptoggle
\fi
@@ -9586,9 +10145,17 @@
\@@rgstepyes
\else
\@@rgstepno
- \fi}%
+ \fi
+ \futurelet\next\dobetweenthelines}%
\GotoPar}
+\def\dobetweenthelines%
+ {\convertcommand \next \to\!!stringa % very ugly and fuzzy
+ \convertargument\obeyedline\to\!!stringb % but needed anyway
+ \ifx\!!stringa\!!stringb
+ \@@rgtussen
+ \fi}
+
\def\stopregels%
{\endgroup
\@@rgna}
@@ -9675,14 +10242,23 @@
\def\stopregel[#1]%
{\unskip\regelreferentie2[#1]}
-\def\inregellabel#1%
- {\doifinstringelse{--}{#1}
- {\labeltext{\v!regels}}
- {\labeltext{\v!regel}}}
+% \def\inregellabel#1%
+% {\doifinstringelse{--}{#1}
+% {\labeltext{\v!regels}}
+% {\labeltext{\v!regel}}}
+%
+% \def\inregel#1[#2]%
+% {\doifelsenothing{#1}
+% {\in{\inregellabel{\currenttextreference}}[\@@rnprefix#2]}
+% {\in{#1}[\@@rnprefix#2]}}
+%
+% double labels:
\def\inregel#1[#2]%
{\doifelsenothing{#1}
- {\in{\inregellabel{\currenttextreference}}[\@@rnprefix#2]}
+ {\doifinstringelse{--}{\currenttextreference}
+ {\in{\leftlabeltext\v!regels}{\rightlabeltext\v!regels}[\@@rnprefix#2]}
+ {\in{\leftlabeltext\v!regel }{\rightlabeltext\v!regel }[\@@rnprefix#2]}}
{\in{#1}[\@@rnprefix#2]}}
\def\dostartnummerenPAR%
@@ -9704,8 +10280,8 @@
% 1 xxx xxx xxx xxx xxx xxx xxx
% 2 xxx yyy yyy yyy yyy yyy yyy <= start y
-% 3 yyy yyy yyy yyy yyy yyy yyy
-% 4 yyy yyy yyy yyy yyy xxx xxx <= stop y
+% 3 yyy yyy yyy yyy yyy yyy yyy
+% 4 yyy yyy yyy yyy yyy xxx xxx <= stop y
% 5 xxx xxx xxx xxx xxx xxx xxx
%\def\regelreferentie#1[#2]%
@@ -9738,79 +10314,6 @@
\prewordbreak
\egroup}
-%\def\dostopnummerenPAR% dp's -> openstrutdepth
-% {\endofshapebox
-% \checkreferences
-% \linestepper=0
-% \reshapebox{\global\advance\linestepper by 1\relax}%
-% \global\advance\linenumber by \linestepper
-% \doifelse{\@@rnrefereren}{\v!aan}
-% {\reshapebox % We are going back!
-% {\global\advance\linenumber by -1
-% \dimen0=\dp\shapebox
-% \advance\dimen0 by -\dp\strutbox
-% \ifdim\dimen0>\!!zeropoint\relax
-% % 1=>4 | 2=>4 1=>2
-% % start 1=>(n=y,l=2,p=1)
-% % stop 2=>(n=y,l=4,p=2)
-% \dostepwiserecurse{1}{\number\dimen0}{1}
-% {\setxvalue{lrf:l:\recurselevel}{\the\linenumber}}%
-% \fi}%
-% \global\advance\linenumber by \linestepper
-% \ifnum\linereference>0 % anders vreemde loop in paragraphs+recurse
-% \dorecurse{\linereference}
-% {\edef\linereferenceplus{\getvalue{lrf:p:\recurselevel}}%
-% \ifnum\linereferenceplus=2 % stop
-% \edef\linereferencename{\getvalue{lrf:n:\recurselevel}}%
-% \edef\linereferenceline{\getvalue{lrf:l:\recurselevel}}%
-% % ref y: text = 4 / Kan dit buiten referentie mechanisme om?
-% \expanded{\setlocalcrossreference
-% {\referenceprefix\linereferencename}{}{}{\linereferenceline}}%
-% \fi}%
-% \dorecurse{\linereference}
-% {\edef\linereferenceplus{\getvalue{lrf:p:\recurselevel}}%
-% \ifnum\linereferenceplus<2 % start / lone
-% \edef\linereferencename{\getvalue{lrf:n:\recurselevel}}% y
-% \edef\linereferenceline{\getvalue{lrf:l:\recurselevel}}% 2
-% \ifnum\linereferenceplus=1 % start
-% \getreferenceelements{\linereferencename}% text = 4
-% \ifnum\linereferenceline<0\currenttextreference\relax % 0 prevents error
-% \edef\linereferenceline{\linereferenceline--\currenttextreference}%
-% \fi
-% \fi
-% \expanded{\setlocalcrossreference
-% {\referenceprefix\linereferencename}{}{}{\linereferenceline}}%
-% \fi}%
-% \global\let\scratchline=\linenumber % We are going back!
-% \reshapebox
-% {\doglobal\decrement\scratchline
-% \hbox
-% {\dorecurse{\linereference}
-% {\edef\linereferencename{\getvalue{lrf:n:\recurselevel}}%
-% \getreferenceelements{\linereferencename}%
-% \beforesplitstring\currenttextreference--\at--\to\firstline
-% \ifnum\firstline=\scratchline\relax
-% % beter een rawtextreference
-% \textreference[\linereferencename]{\currenttextreference}%
-% \expanded{\setlocalcrossreference
-% {\referenceprefix\linereferencename}{}{}{0}}% ==done
-% \fi}%
-% \dimen0=\dp\shapebox
-% \advance\dimen0 by -\dp\strutbox
-% \ifdim\dimen0>\!!zeropoint\relax
-% \dp\shapebox=\dp\strutbox
-% \fi
-% \schrijfregelnummer\box\shapebox}}%
-% \else
-% \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}%
-% \fi}
-% {\reshapebox{\global\advance\linenumber by -1}%
-% \global\advance\linenumber by \linestepper
-% \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}}%
-% \global\advance\linenumber by \linestepper
-% \flushshapebox
-% \egroup}
-
\def\dostopnummerenPAR% dp's -> openstrutdepth
{\endofshapebox
\checkreferences
@@ -9823,7 +10326,7 @@
\dimen0=\dp\shapebox
\advance\dimen0 by -\dp\strutbox
\ifdim\dimen0>\!!zeropoint\relax
- % 1=>4 | 2=>4 1=>2
+ % 1=>4 | 2=>4 1=>2
% start 1=>(n=y,l=2,p=1)
% stop 2=>(n=y,l=4,p=2)
\dostepwiserecurse{1}{\number\dimen0}{1}
@@ -9842,9 +10345,9 @@
\fi}%
\dorecurse{\linereference}
{\getlinereference\recurselevel
- \ifnum\linereferenceplus<2 % start / lone
- \ifnum\linereferenceplus=1 % start
- \getreferenceelements{\linereferencename}% text = 4
+ \ifnum\linereferenceplus<2 % start / lone
+ \ifnum\linereferenceplus=1 % start
+ \getreferenceelements{\linereferencename}% text = 4
\ifnum\linereferenceline<0\currenttextreference\relax % 0 prevents error
\edef\linereferenceline{\linereferenceline--\currenttextreference}%
\fi
@@ -9871,24 +10374,22 @@
\ifdim\dimen0>\!!zeropoint\relax
\dp\shapebox=\dp\strutbox
\fi
- \schrijfregelnummer\box\shapebox}}%
+ \schrijfregelnummer\box\shapebox}}% no \strut !
\else
- \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}%
+ \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}% no \strut !
\fi}
{\reshapebox{\global\advance\linenumber by -1}%
\global\advance\linenumber by \linestepper
- \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}}%
+ \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}}% no \strut !
\global\advance\linenumber by \linestepper
\flushshapebox
\egroup}
-
-
\def\crlf%
- {\unskip\hfil\break}
+ {\ifhmode\unskip\else\strut\fi\hfil\break}
\def\opeenregel%
- {\def\crlf{\unskip\space}\let\\\crlf}
+ {\def\crlf{\ifhmode\unskip\fi\space}\let\\\crlf}
%I n=Opmaak
%I c=\definieeropmaak,\testopmaak,\startstandaardopmaak
@@ -10179,7 +10680,7 @@
\def\cbox%
{\lrcbox\raggedcenter}
-\def\dosetraggedvbox#1%
+\def\dosetraggedvbox#1%
{\processaction
[#1]
[ \v!links=>\def\raggedbox{\lbox},
@@ -10189,7 +10690,7 @@
\s!default=>\def\raggedbox{\vbox},
\s!unknown=>\def\raggedbox{\vbox}]}
-\def\dosetraggedhbox#1%
+\def\dosetraggedhbox#1%
{\processaction
[#1]
[ \v!links=>\let\raggedbox\regellinks,
@@ -10198,7 +10699,7 @@
\s!default=>\let\raggedbox\hbox,
\s!unknown=>\let\raggedbox\hbox]}
-\def\dosetraggedcommand#1% ook ruim,rechts en zo
+\def\dosetraggedcommand#1% ook ruim,rechts en zo
{\processaction
[#1]
[ \v!links=>\def\raggedcommand{\raggedleft},
@@ -10385,7 +10886,7 @@
\global\insidefloattrue
\dowithnextbox
{\docompletefloat
- {#1}{#3}{#1}{#2}{\labeltext{#1}}{#4}
+ {#1}{#3}{#1}{#2}{#1}{#4}
{\box\nextbox}}%
\vbox}
@@ -10410,6 +10911,7 @@
\c!kader=\@@bkkader,
\c!straal=\@@bkstraal,
\c!hoek=\@@bkhoek,
+ \c!plaats=\@@bkplaats,
\c!achtergrond=\@@bkachtergrond,
\c!achtergrondraster=\@@bkachtergrondraster,
\c!achtergrondkleur=\@@bkachtergrondkleur,
@@ -10468,9 +10970,6 @@
\setvalue{\e!leeg#1}%
{\doleegblok{#1}}}
-%\setvalue{\c!in#1}[##1]%
-% {\c!in\normalspace\in{\labeltext{#1}}[##1]}}
-
\def\definieerplaatsblok%
{\dodoubleargument\dodefinieerplaatsblok}
@@ -11003,10 +11502,10 @@
\blanko[\@@bknawit]}%
\doinsertfloatinfo}
-% The number of topinserts also influences the float order,
-% in this respect that when a moved float does not fit, but a
-% next one does, it is indeed placed. Take for instance a
-% sequence of 20 floats, large and small, where a large one
+% The number of topinserts also influences the float order,
+% in this respect that when a moved float does not fit, but a
+% next one does, it is indeed placed. Take for instance a
+% sequence of 20 floats, large and small, where a large one
% migrates and the next smaller one is inserted.
% \loop ...\repeat doesn't work here, but why?
@@ -11287,9 +11786,14 @@
\fi}%
\setbox\floatbox=\vbox to \floattextheight
{\hsize\floatwidth
- \box\floatbox
- \vfill}%
- \setbox\floattext=\vbox to \floattextheight
+ \doifinsetelse{\v!beide}{#1}%
+ {\doifinsetelse{\v!laag}{#1}
+ {\vfill\box\floatbox}
+ {\doifinsetelse{\v!midden}{#1}
+ {\vfill\box\floatbox\vfill}
+ {\box\floatbox\vfill}}}
+ {\box\floatbox\vfill}}%
+ \setbox\floattext=\vbox to \floattextheight
{\hsize\floattextwidth
\doifinsetelse{\v!laag}{#1}
{\vfill
@@ -11448,6 +11952,7 @@
[\??fl#1]
[\c!breedte=\@@bkbreedte,
\c!hoogte=\@@bkhoogte,
+ \c!plaats=\v!normaal,
\c!offset=\@@bkoffset]%
{\box\floatbox}}}
@@ -11457,13 +11962,13 @@
{\mindermeldingen
\begstrut\dofloatnummer\dofloattekst\endstrut}
-\def\dosetpagfloat#1#2#3#4%
+\def\dosetpagfloat#1#2#3#4% \copy wegwerken
{\bgroup
\forgetall
%\showcomposition
\putborderedfloat#4\in4\\%
\def\locatefloat%
- {\doregelplaats\@@bkplaats}%
+ {\doregelplaats\@@flflplaats}%
\ConvertToConstant\doifelse{#3}{\v!geen}
{\global\setbox\floatbox=\vbox
{\locatefloat{\box4}}} % pas op, nog wd groter dan hsize
@@ -11472,9 +11977,7 @@
\setbox\captionbox=\hbox{\putcompletecaption}%
\def\putcompletecaption{\unhcopy\captionbox}%
%
- \setbox2=\hbox
- {\forgetall
- \putcompletecaption}%
+ \setbox2=\hbox{\forgetall\putcompletecaption}%
\doifinsetelse{\@@kjkjplaats}{\v!hoog,\v!midden,\v!laag}
{\dimen0=\hsize
\advance\dimen0 by -\wd4\relax
@@ -11552,7 +12055,7 @@
\endgraf\@@kjkjtussen
\locatefloat{\copy2},
\v!hoog=>\locatefloat
- {\doifelse{\@@bkplaats}{\v!links}
+ {\doifelse{\@@flflplaats}{\v!links}
{\copy4
\tfskip
\vbox to\ht4{\@@kjkjtussen\copy2\vfill}}
@@ -11560,7 +12063,7 @@
\tfskip
\copy4}},
\v!laag=>\locatefloat
- {\doifelse{\@@bkplaats}{\v!links}
+ {\doifelse{\@@flflplaats}{\v!links}
{\copy4
\tfskip
\vbox to\ht4
@@ -11570,7 +12073,7 @@
\tfskip
\copy4}},
\v!midden=>\locatefloat
- {\doifelse{\@@bkplaats}{\v!links}
+ {\doifelse{\@@flflplaats}{\v!links}
{\copy4
\tfskip
\vbox to\ht4{\vfill\copy2\vfill}}
@@ -11618,13 +12121,10 @@
\global\setbox\floatbox=\vbox
{\processaction
[\@@kjkjplaats]
- [ \v!boven=>\box2
- \endgraf\@@kjkjtussen
- \box4,
- \v!onder=>\box4
- \endgraf\@@kjkjtussen
- \box2,
- \v!geen=>\box4]}}%
+ [ \v!boven=>\box2\endgraf\@@kjkjtussen\box4,
+ \v!onder=>\box4\endgraf\@@kjkjtussen\box2,
+ \v!geen=>\box4,
+ \s!unknown=>\box4\endgraf\@@kjkjtussen\box2]}}%
\egroup}
\newif\ifparfloat
@@ -11639,16 +12139,17 @@
\ifbinnenkolommen
\global\parfloatfalse
\fi
- \edef\@@kjkjbreedte {\getvalue{\??kj#4\c!breedte}}%
- \def \@@kjkjtussen {\getvalue{\??kj#4\c!tussen}}% geen \edef
- \edef\@@kjkjplaats {\getvalue{\??kj#4\c!plaats}}%
- \edef\@@kjkjuitlijnen {\getvalue{\??kj#4\c!uitlijnen}}%
- \ifparfloat
+ \edef\@@kjkjbreedte {\getvalue{\??kj#4\c!breedte}}%
+ \def \@@kjkjtussen {\getvalue{\??kj#4\c!tussen}}% geen \edef
+ \edef\@@kjkjplaats {\getvalue{\??kj#4\c!plaats}}%
+ \edef\@@kjkjuitlijnen{\getvalue{\??kj#4\c!uitlijnen}}%
+ \edef\@@flflplaats {\getvalue{\??fl#4\c!plaats}}%
+ \ifparfloat
\dosetparfloat{#1}{#2}{#3}{#4}%
\else
\dosetpagfloat{#1}{#2}{#3}{#4}%
\fi
-\setbox\floatbox=\hbox{\black\box\floatbox}%
+ \setbox\floatbox=\hbox{\black\box\floatbox}%
\global\floatheight=\ht\floatbox
\global\advance\floatheight by \dp\floatbox
\global\floatwidth=\wd\floatbox
@@ -11673,32 +12174,9 @@
\fi
\fi}
-% \def\dogetfloatbox#1%
-% {\ifvisible
-% \def\next##1{\global\floatsonpagetrue\def\next{##1}}%
-% \processfirstactioninset
-% [#1]
-% [ \v!hier=>\next{\someelsefloat[#1]},
-% \v!forceer=>\next{\somefixdfloat[#1]},
-% \v!links=>\next{\somesidefloat[#1]},
-% \v!rechts=>\next{\somesidefloat[#1]},
-% \v!tekst=>\next{\sometextfloat[#1]},
-% \v!boven=>\def\next{\someelsefloat[#1]}, % !
-% \v!onder=>\next{\someelsefloat[#1]},
-% \v!marge=>\def\next{\somenextfloat[#1]}, % !
-% \v!pagina=>\next{\somepagefloat[#1]},
-% \v!naast=>\next{\somefacefloat[#1]},
-% \v!inmarge=>\next{\somesidefloat[#1]},
-% \v!inlinker=>\next{\somesidefloat[#1]},
-% \v!inrechter=>\next{\somesidefloat[#1]},
-% \s!default=>\next{\someelsefloat[\v!hier,#1]},
-% \s!unknown=>\next{\someelsefloat[\v!hier,#1]}]%
-% \next
-% \fi}
-
\def\dogetfloatbox#1%
{\ifvisible
-\let\next\relax % ivm eetex
+ \let\next\relax % ivm eetex
\processfirstactioninset
[#1]
[ \v!hier=>\def\next{\global\floatsonpagetrue\someelsefloat[#1]},
@@ -11740,7 +12218,7 @@
\vss % gets rid of the depth
\rawpagereference{\s!flt}{#2}}%
\egroup\dofloat{#4}{}{#6}{#1}}
- {\convertargument#6\to\asciititle
+ {\doglobal\convertargument#6\to\asciititle % \asciititle is global
\doifelsevalue{\??kj#1\c!nummer}{\v!ja}
{\verhoognummer[#1]%
\maakhetnummer[#1]%
@@ -11748,14 +12226,12 @@
{\unvbox\floatbox % no \vss, keep the depth
\dofloatreference
\redofloatorder{#1}%
-% \rawreference{\s!flt}{#2}{\hetnummer}%
-\rawreference{\s!flt}{#2}{{\hetnummer}{\asciititle}}%
+ \rawreference{\s!flt}{#2}{{\hetnummer}{\asciititle}}%
\doschrijfnaarlijst{#3}{\hetnummer}{#6}{#3}}%
- \egroup\dofloat{#4}{#5\hetnummer}{#6}{#1}}
+ \egroup\dofloat{#4}{\labeltexts{#5}{\hetnummer}}{#6}{#1}}
{\global\setbox\floatbox=\vbox
{\unvbox\floatbox % no \vss, keep the depth
-% \rawpagereference{\s!flt}{#2}}%
-\rawreference{\s!flt}{#2}{{}{\asciititle}}}%
+ \rawreference{\s!flt}{#2}{{}{\asciititle}}}%
\egroup\dofloat{#4}{}{#6}{#1}}}%
\global\insidefloatfalse}
@@ -11854,6 +12330,7 @@
\resetnummer[\??si]%
\def\floatcaptionsuffix{\nummer[\??si]}%
\TABLEcaptionheight=\@@siregels\lineheight
+\def\docomplexpagina[##1]{\goodbreak}%
\dowithnextbox
{\forgetall
\mindermeldingen
@@ -11950,7 +12427,7 @@
%%
-\newconditional\handleformulanumber
+\newconditional\handleformulanumber
\newconditional\incrementformulanumber
\def\dododoformulenummer#1#2#3#4% (#1,#2)=outer(ref,sub) (#3,#4)=inner(ref,sub)
@@ -11981,7 +12458,7 @@
\def\dodoformulenummer[#1][#2][#3]%
{\doquadruplegroupempty\dododoformulenummer{#1}{#2}{#3}}
-\def\doformulenummer%
+\def\doformulenummer%
{\dotripleempty\dodoformulenummer}
%
@@ -12011,7 +12488,7 @@
\belowdisplayskip\!!zeropoint
\abovedisplayshortskip\!!zeropoint
\belowdisplayshortskip\!!zeropoint
-\vbox{\strut}\vskip-2\lineheight % Why 2 and not 1?
+\vbox{\strut}\vskip-2\lineheight % Why 2 and not 1?
$$\def\dostopformula{$$\egroup}}
\def\plaatsformule%
@@ -12032,7 +12509,7 @@
\futurelet\next\redoplaatsformule}
\long\def\xdoplaatsformule[#1]#2#3% #3 gobbles spaces
- {\def\redoplaatsformule%
+ {\def\redoplaatsformule%
{\expandafter\ifx\csname\e!start\e!formule\endcsname\next
\expandafter\dodoplaatsstartformule
\else
@@ -12342,15 +12819,10 @@
% \schrijfwegnaarlijst
% \endgroup}}
-\def\doschrijfnaarlijst#1#2#3#4%
+\def\doschrijfnaarlijst#1#2#3#4%
{\doifvalue{\??li#1\c!status}{\v!start}
{\begingroup
- \ExpandFirstAfter\processaction
- [\getvalue{\??li#1\c!expansie}]
- [ \v!ja=>{\edef\ascii{#3}},
- \v!commando=>{\convertcommand#3\to\ascii},
- \s!default=>{\convertargument#3\to\ascii},
- \s!unknown=>{\convertargument#3\to\ascii}]%
+ \convertexpanded{\??li#1}{#3}\asciilistentry
\makesectionformat
\doifelse{\@@nmstatus}{\v!start}
{\def\dopaginanummer{\noexpand\pagenumber}}
@@ -12379,7 +12851,7 @@
\processcommacommand[\crossdocumentreferences]\docommando
\egroup
\else
- \thisisnextinternal{#1}%
+ \thisisnextinternal{#1}%
\fi
\edef\schrijfwegnaarlijst%
{\writeutilitycommand%
@@ -12387,7 +12859,7 @@
{#1}%
{\nextinternalreference}%
{#2}%
- {\ascii}%
+ {\asciilistentry}%
{\sectionformat::\dopaginanummer}%
{\noexpand\realfolio}}}%
\schrijfwegnaarlijst
@@ -12488,6 +12960,7 @@
\c!titeluitlijnen=,
\c!voor=,
\c!na=,
+ \c!tussen=,
\c!symbool=,
\c!interactie=\v!sectienummer,
\v!deel\v!nummer=\v!ja, % nodig ? % v
@@ -12504,7 +12977,7 @@
\c!paginaletter,\c!paginacommando,\c!paginakleur,
\c!nummerletter,\c!nummerkleur,\c!nummercommando,
\c!paginanummer,\c!paginaovergangen,\c!marge,\c!symbool,
- \c!titeluitlijnen,\c!voor,\c!na,\v!deel\c!nummer,\c!label]%
+ \c!titeluitlijnen,\c!voor,\c!na,\c!tussen,\v!deel\c!nummer,\c!label]%
\getparameters[\??li#1][#3]}}%
\addutilityreset{#1}%
\setvalue{\s!set#1}%
@@ -12576,12 +13049,12 @@
\vrule\!!width\dimen0\!!height\dimen2\!!depth\dimen4}},
\s!unknown=>\def\listsymbol{\getvalue{\??li#1\c!symbool}},
\s!default=>\doifelsevalue{\??li#1\c!prefix}{\v!nee}
- {\aftersplitstring#2\at.\to\splitlistsymbol}
- {\def\splitlistsymbol{#2}}% geen \edef ivm enz
- \def\listsymbol%
- {\doifvalue{\??li#1\c!label}{\v!ja}{\labeltext{#1}}%
- \strut\splitlistsymbol
- \getvalue{\??li#1\c!scheider}}]}
+ {\aftersplitstring#2\at.\to\splitlistsymbol}
+ {\def\splitlistsymbol{#2}}% geen \edef ivm enz
+ \def\listsymbol% kan iets efficienter met \ifdone
+ {\doifvalue{\??li#1\c!label}{\v!ja}{\leftlabeltext{#1}}%
+ \strut\splitlistsymbol\getvalue{\??li#1\c!scheider}%
+ \doifvalue{\??li#1\c!label}{\v!ja}{\rightlabeltext{#1}}}]}
\def\dosomelijstelement#1#2#3{#1 #2 \translatednumber[#3]}
@@ -12594,7 +13067,13 @@
\def\dodolijstelementg{\let\dosomelijstelement\dodofixdlijstelementG}
\setvalue{dodolijstelement\v!geen}%
- {\let\dosomelijstelement\dodofreelijstelement}
+ {\def\dosomelijstelement{\dodofreevlijstelement}}
+
+\setvalue{dodolijstelement\v!vertikaal}%
+ {\def\dosomelijstelement{\dodofreevlijstelement}}
+
+\setvalue{dodolijstelement\v!horizontaal}%
+ {\def\dosomelijstelement{\dodofreehlijstelement}}
\setvalue{dodolijstelement\v!commando}%
{\let\dosomelijstelement\dodocommandlijstelement}
@@ -12608,6 +13087,8 @@
% \strippedcsname\dodolijstelement
+\def\newlineinlist{\space}
+
\def\dolijstelement#1#2#3#4#5#6% pas op: wordt ook elders gedefinieerd
{\doiftoclevelelse[#5]
{\getvalue{dodolijstelement\getvalue{\??li#1\c!variant}}%
@@ -12628,22 +13109,21 @@
\def\dolistattributes#1#2#3%
{\doifvaluesomething{\??li#1#3}
- {\stelinteractiein[\c!kleur=,\c!contrastkleur=]}%
+ {\setupinteraction[\c!kleur=,\c!contrastkleur=]}%
\doattributes{\??li#1}{#2}{#3}}
-\def\dodocommandlijstelement#1#2#3#4#5#6%
+\def\dodocommandlijstelement#1#2#3#4#5#6%
{\doifdefinedelse{\??li#1\c!commando}
{\getvalue{\??li#1\c!commando}
{#3}{#4}{\paginaprefix\??li#1[#5]\translatednumber[#5]}}
{[#1: #3 - #4 - \paginaprefix\??li#1[#5]\translatednumber[#5]]}}
-\def\dodofreelijstelement#1#2#3#4#5#6%
+\def\dodofreelijstelement#1#2#3#4#5#6#7#8%
{\def\makelijstelement##1##2%
{\hbox
{\doifelsevalue{\??li#1\c!interactie}{##1}
{\setbox0=\hbox{\showcontrastlocation{\??ia}{#6}{##2}}%
- \linklisttoelement{#1}{#2}{#5}{#6}{\copy0}}%
- %\gotonextinternal{#1}{#2}{#6}{\copy0}%
+ \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\copy0}}%
{##2}}}%
\getvalue{\??li#1\c!voor}% can be \hskip
\doifdefinedelse{\??li#1\c!commando}
@@ -12653,16 +13133,16 @@
{#4}% geen conversies etc
{\paginaprefix\??li#1[#5]%
\translatednumber[#5]}}}
- {\ifvmode\nointerlineskip\fi % recently added
+ {#7%
\vbox
{\forgetall
\makelijstelement\v!alles
{\makelijstelement\v!sectienummer
- {\dolistattributes{#1}\c!nummertekst\c!nummerkleur
+ {\dolistattributes{#1}\c!nummerletter\c!nummerkleur
{\getvalue{\??li#1\c!nummercommando}{\listsymbol}}}%
\makelijstelement\v!tekst
{\dolistattributes{#1}\c!tekstletter\c!tekstkleur
- {\def\\{ }%
+ {\let\\=\newlineinlist
\dontconvertfont
\getvalue{\??li#1\c!tekstcommando}{#4}}}%
\doifvalue{\??li#1\c!paginanummer}{\v!ja}
@@ -12672,27 +13152,35 @@
{\getvalue{\??li#1\c!paginacommando}
{\paginaprefix\??li#1[#5]%
\translatednumber[#5]}}}}}}}%
- \nointerlineskip % anders verkeerde spatiering bij multi-line
- \endgraf
- \allowbreak}
+ #8}%
\getvalue{\??li#1\c!na}}
+\def\dodofreehlijstelement#1#2#3#4#5#6%
+ {\dodofreelijstelement{#1}{#2}{#3}{#4}{#5}{#6}
+ {\noindent}{}}
+
+\def\dodofreevlijstelement#1#2#3#4#5#6% % \nointerlineskip nodig,
+ {\dodofreelijstelement{#1}{#2}{#3}{#4}{#5}{#6} % anders verkeerde spatiering
+ {\ifvmode\nointerlineskip\fi} % bij multi-line lijsten
+ {\nointerlineskip\endgraf\allowbreak}} %
+
\def\dodofixdlijstelementABC#1#2#3#4#5#6% weeden
{\endgraf
\leftskip=\getvalue{\??li#1\c!marge}% na de \endgraf !
\getvalue{\??li#1\c!voor}%
- \doifelsenothing{#3}
- {\doifelsevalue{\??li#1\c!titeluitlijnen}{\v!ja}
- {\!!widtha=\!!zeropoint}
- {\!!widtha=\getvalue{\??li#1\c!breedte}}}
- {\!!widtha=\getvalue{\??li#1\c!breedte}}%
+ \doifelsevalue{\??li#1\c!breedte}{\v!passend}
+ {\!!widtha=\!!zeropoint}
+ {\doifelsenothing{#3}
+ {\doifelsevalue{\??li#1\c!titeluitlijnen}{\v!ja}
+ {\!!widtha=\!!zeropoint}
+ {\!!widtha=\getvalue{\??li#1\c!breedte}}}
+ {\!!widtha=\getvalue{\??li#1\c!breedte}}}%
\getvalue{\??li\c!variant\getvalue{\??li#1\c!variant}}%
\endgraf
\def\makelijstelement##1##2%
{\doifelsevalue{\??li#1\c!interactie}{##1}
{\setbox0=\hbox{\showcontrastlocation{\??ia}{#6}{##2}}%
- \linklisttoelement{#1}{#2}{#5}{#6}{\copy0}}%
- %\gotonextinternal{#1}{#2}{#6}{\copy0}%
+ \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\copy0}}%
{\hbox{##2}}}%
\doifvalue{\??li#1\c!interactie}{\v!tekst} % not supported
{\doassign[\??li#1][\c!interactie=\v!alles]}%
@@ -12706,7 +13194,7 @@
\hfill}}%
\setbox4=\hbox
{\doifvalue{\??li#1\c!paginanummer}{\v!ja}
- {\doifsomething{#5} % \lijstwidth is new ; temp hack
+ {\doifsomething{#5} % \lijstwidth is new ; temp hack
{\hbox \ifdim\lijstwidth>\!!zeropoint to \lijstwidth\fi
{\hfill
\makelijstelement\v!paginanummer
@@ -12738,7 +13226,7 @@
\hskip\dimen2
\bgroup
\dolistattributes{#1}\c!tekstletter\c!tekstkleur
- {\def\\{ }%
+ {\let\\=\newlineinlist
\dontconvertfont
\getvalue{\??li#1\c!tekstcommando}{#4}}%
\egroup
@@ -12763,7 +13251,7 @@
\def\dodofixdlijstelementD#1#2#3#4#5#6%
{%\leftskip=\getvalue{\??li#1\c!marge}%
\ifvmode
- \advance\leftskip\getvalue{\??li#1\c!marge}% AANGEPAST
+ \advance\leftskip\getvalue{\??li#1\c!marge}% AANGEPAST
\fi
\bgroup
\ifvmode
@@ -12776,8 +13264,7 @@
\def\makelijstelement##1##2%
{\doifelsevalue{\??li#1\c!interactie}{##1}
{\setbox0=\hbox{\showcontrastlocation{\??ia}{#6}{##2}}%
- \linklisttoelement{#1}{#2}{#5}{#6}{\copy0}}%
- %\gotonextinternal{#1}{#2}{#6}{\copy0}%
+ \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\copy0}}%
{\hbox{##2}}}%
\setbox4=\hbox
{\doifvalue{\??li#1\c!paginanummer}{\v!ja}
@@ -12795,9 +13282,9 @@
\getvalue{\??li#1\c!rechts}%
\hskip.5em}%
\nobreak
- \tolerance3500 % niet zomaar veranderen
+ \tolerance3500 % niet zomaar veranderen
\dolistattributes{#1}\c!tekstletter\c!tekstkleur
- {\def\\{ }%
+ {\let\\=\newlineinlist
\dontconvertfont
\getvalue{\??li#1\c!tekstcommando}{#4}}%
\ifvoid4\else
@@ -12816,13 +13303,13 @@
\def\dodofixdlijstelementE#1%
{\dodofixdlijstelementEFG
- {\stelinteractiein[\c!strut=\v!nee]}
+ {\setupinteraction[\c!strut=\v!nee]}
{\localframed[\??li#1][\c!diepte=\!!zeropoint,\c!kleur=]}
{#1}}
\def\dodofixdlijstelementF#1%
- {\dodofixdlijstelementEFG
- {}
+ {\dodofixdlijstelementEFG
+ {}
{\dosetraggedhbox{\getvalue{\??li#1\c!uitlijnen}}\raggedbox}
{#1}}
@@ -12835,8 +13322,8 @@
\def\dodofixdlijstelementEFG#1#2#3#4#5#6#7#8%
{\noindent
\hbox
- {#1% in case E nils the strut
- \def\\={ }%
+ {#1% in case E nils the strut
+ \let\\=\newlineinlist
\setbox0=\hbox
{#2{\showcontrastlocation{\??ia}{#8}
{\dostartattributes{\??li#3}\c!letter\c!kleur{}%
@@ -12844,16 +13331,16 @@
\begstrut
\doifelsenothing{\??li#3\c!maxbreedte}
{\getvalue{\??li#3\c!tekstcommando}{#6}}
- {\getvalue{\??li#3\c!tekstcommando}{\limitatetext{#6}{\getvalue{\??li#3\c!maxbreedte}}{\onbekend}}}%
+ {\getvalue{\??li#3\c!tekstcommando}{\limitatetext{#6}{\getvalue{\??li#3\c!maxbreedte}}{\unknown}}}%
\endstrut % struts new
\dostopattributes}}}%
- \linklisttoelement{#3}{#4}{#7}{#8}{\copy0}}%
- %\gotonextinternal{#3}{#4}{#8}{\copy0}%
- \par}
+ \linklisttoelement{#3}{#4}{#7}{#8}{\box0}}%{\copy0}}%
+ \par
+ \getvalue{\??li#3\c!tussen}}
\def\strippedlistentry[#1::#2::#3]{#1::#2}%
-\def\linklisttoelement#1#2#3#4#5% % list location format page data
+\def\linklisttoelement#1#2#3#4#5% % list location format page data
{\ifautocrossdocument
\gotodestination{}{}{#1::\strippedlistentry[#3]}{#4}{#5}%
\else
@@ -12861,7 +13348,7 @@
\fi}
\def\schrijfnaarlijst[#1]#2#3%
- {\doifsomething{#1}
+ {\doifsomething{#1}
{\convertargument#2\to\firstlistelement
\@EA\doschrijfnaarlijst\@EA{#1}{\firstlistelement}{#3}{\v!kop}}}
@@ -12892,7 +13379,7 @@
\hbox
{\doattributes
{\??li##1}\c!tekstletter\c!tekstkleur
- {\def\\{ }%
+ {\let\\=\newlineinlist
\dontconvertfont
\getvalue{\??li##1\c!tekstcommando}{##4}}}%
\global\utilitydonetrue}
@@ -12951,10 +13438,11 @@
% algemeen
\def\referentiebutton#1[#2]%
- {\bgroup
- \let\referenceprefix=\empty
- \setbox0=\hbox{\ignorespaces#1}%
- \naarbox{\copy0}[#2]%
+ {\hbox\bgroup % the \hbox is needed to bypass
+ \let\referenceprefix=\empty % \dontleavehmode in \naarbox
+ \setupinteraction[\c!kleur=,\c!contrastkleur=,\c!strut=]%
+ \setupreferencing[\c!prefix=]%
+ \naarbox{\hbox{\ignorespaces#1}}[#2]%
\egroup}
\newcounter\referencecounter
@@ -12999,15 +13487,27 @@
\schrijfwegnaarlijst
\endgroup}}
-\def\schrijfnaarreferentielijst[#1]#2#3% #1=class #2=data #3=visualization
- {\doifelsevalue{\??rl#1\c!status}{\v!start}
- {\referentiebutton
- {#3%
- \doglobal\increment\referencecounter
- \pagereference[\r!from\referencecounter]%
- \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}%
- [\r!to\referencecounter]}
- {#3}}
+%\def\schrijfnaarreferentielijst[#1]#2#3% #1=class #2=data #3=visualization
+% {\doifelsevalue{\??rl#1\c!status}{\v!start}
+% {\doglobal\increment\referencecounter
+% \referentiebutton
+% {#3%
+% \pagereference[\r!from\referencecounter]%
+% \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}%
+% [\r!to\referencecounter]}
+% {#3}}
+
+\def\schrijfnaarreferentielijst[#1]#2% #1=class #2=data #3=visualization
+ {\dowithnextbox
+ {\doifelsevalue{\??rl#1\c!status}{\v!start}
+ {\doglobal\increment\referencecounter % must be resolved due to #2
+ \referentiebutton
+ {\box\nextbox
+ \pagereference[\r!from\referencecounter]%
+ \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}%
+ [\r!to\referencecounter]}
+ {\box\nextbox}}
+ \hbox} % \vbox ?
\def\referencelistentry#1%
{\executeifdefined{#1\c!lijst}\gobblefourarguments}
@@ -13106,10 +13606,10 @@
{\begingroup
\getparameters[\??ih#1][#2]%
\dosettoclevel{\getvalue{\??ih#1\c!criterium}}%
- \edef\samengesteldelijst{\getvalue{\??ih#1\c!lijst}}%
- \stripspaces\from\samengesteldelijst\to\samengesteldelijst
+ \edef\samengesteldelijst{\getvalue{\??ih#1\c!lijst}}%
+ \stripspaces\from\samengesteldelijst\to\samengesteldelijst
\doifelsevalue{\??ih#1\c!niveau}{\v!huidige} % criterium=vorige,niveau=huidige
- {\!!counta=0\@@koniveau} % hm: \@@koniveau
+ {\!!counta=0\@@koniveau} % hm: \@@koniveau
{\ExpandFirstAfter\doifnumberelse{\getvalue{\??ih#1\c!niveau}}% in verband
{\!!counta=\getvalue{\??ih#1\c!niveau}% met de vorige implementatie
\advance\!!counta by 1 % accepteren we ook nummers (0==deel)
@@ -13241,7 +13741,7 @@
\global\utilitydonetrue
\syndef
{\doattributes{\??sm#1}\c!tekstletter\c!tekstkleur{#3}}
- \ConvertToConstant\doifelse{#4}{}{\onbekend}{#4}\par
+ \ConvertToConstant\doifelse{#4}{}{\unknown}{#4}\par
\egroup}
\def\synonymentry#1%
@@ -13249,7 +13749,7 @@
\def\dosetsynonym#1%
{\doifdefinedelse{\??sm#1\c!commando}
- {\setvalue{#1\s!entry}{\getvalue{\??sm#1\c!commando}}} % 3 argumenten
+ {\setvalue{#1\s!entry}{\getvalue{\??sm#1\c!commando}}} % 3 argumenten
{\setvalue{#1\s!entry}{\dohandlesynonymentry{#1}}}}
\def\doplaatslijstmetsynoniemen#1#2%
@@ -13264,14 +13764,14 @@
[syndef]
[\c!plaats=\getvalue{\??sm#1\c!plaats},
\c!breedte=\getvalue{\??sm#1\c!breedte},
- \c!afstand=\getvalue{\??sm#1\c!afstand},
- \c!monster=\getvalue{\??sm#1\c!monster},
- \c!hang=\getvalue{\??sm#1\c!hang},
- \c!uitlijnen=\getvalue{\??sm#1\c!uitlijnen},
- \c!voor=\getvalue{\??sm#1\c!voor},
- \c!tussen=\getvalue{\??sm#1\c!tussen},
- \c!na=\getvalue{\??sm#1\c!na},
- \c!springvolgendein=\getvalue{\??sm#1\c!springvolgendein},
+ \c!afstand=\getvalue{\??sm#1\c!afstand},
+ \c!monster=\getvalue{\??sm#1\c!monster},
+ \c!hang=\getvalue{\??sm#1\c!hang},
+ \c!uitlijnen=\getvalue{\??sm#1\c!uitlijnen},
+ \c!voor=\getvalue{\??sm#1\c!voor},
+ \c!tussen=\getvalue{\??sm#1\c!tussen},
+ \c!na=\getvalue{\??sm#1\c!na},
+ \c!springvolgendein=\getvalue{\??sm#1\c!springvolgendein},
\c!kopletter=,
\c!letter=]%
%
@@ -13312,18 +13812,9 @@
\def\dowritesynonym#1#2#3#4%
{\begingroup % anders in mathmode lege \hbox
- \ExpandFirstAfter\processaction
- [\getvalue{\??sm#1\c!expansie}]
- [ \v!ja=>{\edef\asciiA{#3}\edef\asciiB{#4}},
- \v!commando=>{\convertcommand#3\to\asciiA\convertcommand#4\to\asciiB},
- \s!default=>{\convertargument#3\to\asciiA\convertargument#4\to\asciiB},
- \s!unknown=>{\convertargument#3\to\asciiA\convertargument#4\to\asciiB}]%
- %\doifelsevalue{\??sm#1\c!expansie}{\v!ja}
- % {\immediatewriteutility{s e {#1} {#2} {#3} {#4}}}
- % {\convertargument#3\to\asciiA
- % \convertargument#4\to\asciiB
- % \immediatewriteutility{s e {#1} {#2} {\asciiA} {\asciiB}}}%
- \immediatewriteutility{s e {#1} {#2} {\asciiA} {\asciiB}}%
+ \convertexpanded{\??sm#1}{#3}\asciisynonym
+ \convertexpanded{\??sm#1}{#4}\asciimeaning
+ \immediatewriteutility{s e {#1} {#2} {\asciisynonym} {\asciimeaning}}%
\endgroup}
\def\preexecutesynonym#1#2#3#4%
@@ -13385,13 +13876,13 @@
\c!criterium=,
\c!plaats=\v!links,
\c!breedte=5em,
- \c!afstand=0pt,
- \c!monster=,
- \c!hang=,
- \c!uitlijnen=,
- \c!voor=,
- \c!tussen=,
- \c!na=,
+ \c!afstand=0pt,
+ \c!monster=,
+ \c!hang=,
+ \c!uitlijnen=,
+ \c!voor=,
+ \c!tussen=,
+ \c!na=,
\c!springvolgendein=\v!nee]%
\presetheadtext
[#2=\Word{#2}]%
@@ -13498,7 +13989,7 @@
\global\utilitydonetrue
\bgroup
\doifdefinedelse{\??so#1\c!commando}
- {\getvalue{\??so#1\c!commando}{##2}} % 1 argument
+ {\getvalue{\??so#1\c!commando}{##2}} % 1 argument
{\getvalue{\??so#1\c!voor}%
\doattributes{\??so#1}\c!letter\c!kleur{##2}%
\getvalue{\??so#1\c!na}}%
@@ -13525,17 +14016,8 @@
\def\dowritesort#1#2#3%
{\bgroup
- %\doifelsevalue{\??so#1\c!expansie}{\v!ja}
- % {\immediatewriteutility{s e {#1} {#2} {#3} {}}}
- % {\convertargument#3\to\asciiA
- % \immediatewriteutility{s e {#1} {#2} {\asciiA} {}}}%
- \ExpandFirstAfter\processaction
- [\getvalue{\??so#1\c!expansie}]
- [ \v!ja=>{\edef\asciiA{#3}},
- \v!commando=>{\convertcommand#3\to\asciiA},
- \s!default=>{\convertargument#3\to\asciiA},
- \s!unknown=>{\convertargument#3\to\asciiA}]%
- \immediatewriteutility{s e {#1} {#2} {\asciiA} {}}%
+ \convertexpanded{\??so#1}{#3}\asciisynonym
+ \immediatewriteutility{s e {#1} {#2} {\asciisynonym} {}}%
\egroup}
\def\synonymentry#1%
@@ -13547,9 +14029,18 @@
\unexpanded\setgvalue{#2}{\processsort{#1}{#3}{#2}}%
\fi}
+% \def\executesort#1#2#3%
+% {\preexecutesort{#1}{#2}{#3}%
+% \processsort{#1}{#3}{#2}}
+%
+% Better because it catches nested logo's:
+
\def\executesort#1#2#3%
- {\preexecutesort{#1}{#2}{#3}%
- \processsort{#1}{#3}{#2}}
+ {\bgroup
+ \def\executesort##1##2##3{##3}% Trick needed for nested logo's.
+ \preexecutesort{#1}{#2}{#3}%
+ \processsort{#1}{#3}{#2}%
+ \egroup}
\def\doloadsort#1%
{\setvalue{#1\s!entry}##1##2##3%
@@ -13582,14 +14073,14 @@
\def\dodefinieersorteren[#1][#2][#3]%
{\getparameters[\??so#1]
- [%\c!commando=, % we test for defined !
+ [%\c!commando=, % we test for defined !
\c!status=\v!start,
\c!criterium=,
\c!letter=,
\c!voor=,
\c!na=\endgraf]%
\presetheadtext[#2=\Word{#2}]%
- \setvalue{\e!stel#2\e!in}[##1]% vervalt tzt
+ \setvalue{\e!stel#2\e!in}[##1]% vervalt tzt
{\getparameters[\??so#1][##1]}%
\ifthirdargument
\def#3##1%
@@ -13673,973 +14164,6 @@
%I
%I \geendimensie{wiskundige eenheid}
-%I n=Registers
-%I c=\definieerregister,\stelregisterin
-%I c=\volledigregister,\plaatsregister
-%I
-%I Er kunnen registers worden gedefinieerd met het commando:
-%I
-%I \definieerregister[naam][namen]
-%I
-%I Vanaf dat moment zijn de volgende commando's beschikbaar:
-%I
-%I \naam[ascii]{ingang+ingang+ingang}
-%I \zienaam[ascii]{ingang+ingang+ingang}{andere ingang}
-%I \plaatsnaam
-%I \volledigenaam
-%I
-%I of
-%I
-%I \plaatsregister[naam]
-%I \volledigregister[naam]
-%I
-%I De commando's rond de standaard index zijn gedefinieerd
-%I met de waarden: [index][indices]
-%P
-%I In de tekst dient een registerverwijzing voor het woord
-%I te staan, dus: we verwijzen naar \index{woord}woord.
-%I
-%I Bij koppen daarentegen plaatsen we \index na de kop:
-%I
-%I \subparagraaf{dat is dat}
-%I \index{ziezo}
-%I
-%I ........... tekst .....
-%I
-%I of
-%I
-%I \margewoord{ziezo}
-%I \index{ziezo}
-%I
-%I ........... tekst .....
-%I
-%I Ongewenste spaties na \index worden verwijderd! Wil men
-%I dus een spatie, dan moet dit worden afgedwongen met \ .
-%P
-%I Mocht het hierboven beschreven mechanisme interfereren
-%I met andere mechanismen, dan kan ook het volgende commando
-%I worden gebruikt:
-%I
-%I \schrijfnaarregister[naam][ascii]{ingang+ingang+ingang}
-%I
-%I waarbij [ascii] optioneel is.
-%P
-%I De registers kunnen worden ingesteld met het commando:
-%I
-%I \stelregisterin[naam][letter=,aanduiding=,n=,
-%I balanceren=,uitlijnen=,criterium=,afstand=,symbool=,
-%I expansie=]
-%I
-%I waarbij 'aanduiding' betrekking heeft op het al dan niet
-%I plaatsen van een letter ('ja' of 'nee') en 'letter' op de
-%I weergave van de letter.
-%I
-%I Met 'criterium' kan een subindex worden opgeroepen,
-%I bijvoorbeeld 'deel' of 'hoofdstuk', of als het niveau
-%I onbekend is: 'lokaal'. Standaard wordt een volledige index
-%I gegenereerd ('alles').
-%I
-%I In plaats van een paginanummer kan een symbool worden
-%I gezet: n (1,2,3,..), a (a,b,c,..), 1 (bolletjes) en
-%I 2 (rechthoekjes). Een symbool heeft alleen zin bij
-%I interactieve teksten.
-%I
-%I Voor eigen gebruik is \ifregistergeplaatst beschikbaar.
-%P
-%I In plaats van een + als scheider kan ook & worden
-%I gebruikt. Bovendien kan als eerste karakter worden opgegeven
-%I wat de scheider is:
-%I
-%I \index[abcformule]{&formule&$ax^2+bx+c$}
-%I
-%I Overigens gaat de & voor de +, zodat hier de specificatie
-%I niet per se nodig is. Let wel: dit is een kenmerk van
-%I texutil, en niet zozeer van ConTeXt.
-
-% Formaat tex-utility-input-file <jobname.tui>:
-%
-% i e {tag} {loc} {pure} {entry+..} {p:c:p:sp:ssp=>page} {realpage}
-% i s {tag} {loc} {pure} {entry+..} {other entry}
-%
-% In plaats van + kan een & worden gebruikt. Ook kan als
-% eerste karakter worden opgegeven wat de scheider is.
-%
-% \index {entry}
-% \index[key] {entry}
-% \index[pageclass::] {entry}
-% \index[pageclass::key]{entry}
-% \index {textclass::entry}
-% \index[key] {textclass::entry}
-% \index[pageclass::] {textclass::entry}
-% \index[pageclass::key]{textclass::entry}
-%
-% Deze file wordt met het Perl script TeXUtil omgezet in
-% een in te lezen file met de commando's:
-%
-% \registerentrya {tag} {ingang}
-% \registerentryb {tag} {subingang}
-% \registerentryc {tag} {subsubingang}
-%
-% \registerpage {tag} {pag,txt} {volgnummer} {paginanummer} {volgnummer}
-%
-% \registersee {tag} {pag,txt} {andere ingang}
-%
-% \registerentry {tag} {letter}
-
-\def\dostelregisterin[#1][#2][#3]%
- {\ifthirdargument
- \def\docommando##1%
- {\getparameters[\??id##1#2][#3]%
- \preparepaginaprefix{\??id##1}}%
- \else
- \def\docommando##1%
- {\getparameters[\??id##1][#2]%
- \preparepaginaprefix{\??id##1}}%
- \fi
- \processcommalist[#1]\docommando}
-
-\def\stelregisterin%
- {\dotripleempty\dostelregisterin}
-
-\def\getlastregisterentry#1%
- {\def\docommando##1%
- {\def\!!stringa{##1}}%
- \processconcanatedlist[#1][+]\docommando
- \!!stringa}
-
-\def\doprocessregister[#1]#2%
- {\begingroup
- \thisisnextinternal{\s!ind}%
- \ifduplicate\getlastregisterentry{#2}\fi
- %\doifelsevalue{\??id\currentregister\c!expansie}{\v!ja}
- % {\edef\ascii{#2}}
- % {\convertargument#2\to\ascii}%
- \ExpandFirstAfter\processaction
- [\getvalue{\??id\currentregister\c!expansie}]
- [ \v!ja=>{\edef\ascii{#2}},
- \v!commando=>{\convertcommand#2\to\ascii},
- \s!default=>{\convertargument#2\to\ascii},
- \s!unknown=>{\convertargument#2\to\ascii}]%
- \makesectionformat
- \edef\schrijfwegnaarregister%
- {\writeutility%
- {r \ifcase\registerpagestatus\space\or e \or f \or t \fi
- {\currentregister} %
- {\nextinternalreference} %
- {#1} %
- {\ascii} %
- {\sectionformat::\noexpand\pagenumber} %
- {\noexpand\realfolio}}}%
- \schrijfwegnaarregister
- \getfirstcharacter\currentregister
- \registerinfo{> \firstcharacter}{#2}%
- \endgroup}
-
-\def\complexdoregister[#1]#2%
- {\doprocessregister[#1]{#2}%
- \ifvmode\nobreak\fi
- \GotoPar}
-
-%\def\doregister#1%
-% {\def\currentregister{#1}%
-% \complexorsimpleempty\doregister}
-
-\def\doregister#1%
- {\chardef\registerpagestatus=1
- \def\currentregister{#1}%
- \complexorsimpleempty\doregister}
-
-\def\startregister%
- {\dodoubleargument\dostartregister}
-
-\def\dostartregister[#1][#2]#3%
- {\chardef\registerpagestatus=2
- \def\currentregister{#1}%
- \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#2]{#3}}%
- \complexdoregister[#2]{#3}}
-
-\def\stopregister%
- {\dodoubleargument\dostopregister}
-
-\def\dostopregister[#1][#2]%
- {\getvalue{\??id#1\??id#2}\setgvalue{\??id#1\??id#2}{}}
-
-\def\dodostopregister[#1][#2]%
- {\chardef\registerpagestatus=3
- \def\currentregister{#1}%
- \complexdoregister[#2]}
-
-\def\complexdozieregister[#1]#2#3%
- {\begingroup
- \thisisnextinternal{\s!ind}%
- \ifduplicate\getlastregisterentry{#2}\fi
- %\doifelsevalue{\??id\currentregister\c!expansie}{\v!ja}
- % {\edef\ascii{#2}}
- % {\convertargument#2\to\ascii}%
- \ExpandFirstAfter\processaction
- [\getvalue{\??id\currentregister\c!expansie}]
- [ \v!ja=>{\edef\ascii{#2}},
- \v!commando=>{\convertcommand#2\to\ascii},
- \s!default=>{\convertargument#2\to\ascii},
- \s!unknown=>{\convertargument#2\to\ascii}]%
- \makesectionformat
- \edef\schrijfwegnaarregister%
- {\writeutility%
- {r s %
- {\currentregister} %
- {\nextinternalreference} %
- {#1} %
- {\ascii} %
- {#3} %
- {\sectionformat}}}%
- \schrijfwegnaarregister
- \endgroup
- \registerinfo{> zie}{#2}%
- \GotoPar}
-
-\def\dozieregister#1%
- {\def\currentregister{#1}%
- \complexorsimpleempty\dozieregister}
-
-\def\doschrijfnaarregister[#1]% % de twee-traps-aanroep is nodig
- {\edef\currentregister{#1}% % om gebruik van \ExpandBothAfter
- \doprocessregister} % mogelijk te maken
-
-\def\schrijfnaarregister%
- {\dodoubleempty\doschrijfnaarregister}
-
-\def\ifregistergeplaatst{\ifutilitydone}
-
-\newif\iffirstregisterpage
-
-\def\c!entrya{}
-\def\c!entryb{}
-\def\c!entryc{}
-
-\def\nextregisterpage%
- {\iffirstregisterpage
- \doglobal\newcounter\registerpagenumber
- \fi
- \doglobal\increment\registerpagenumber}
-
-\def\doregisterpagelocation#1#2%
- {\nextregisterpage
- \hbox to 1em{\hss\doregisterpagehowto{#1}{#2}\hss}}
-
-\def\setregisterpage#1%
- {\let\registerpageseparator=\empty
- \processaction
- [\getvalue{\??id#1\c!symbool}]
- [ \c!n=>{\def\doregisterpage##1[##2]%
- {\doregisterpagelocation{#1}{\registerpagenumber}\/}},
- \c!a=>{\def\doregisterpage##1[##2]%
- {\doregisterpagelocation{#1}{\character{\registerpagenumber}\/}}},
- 1=>{\def\doregisterpage##1[##2]%
- {\doregisterpagelocation{#1}{$\bullet$}}},
- 2=>{\def\doregisterpage##1[##2]%
- {\doregisterpagelocation{#1}{\vrule\!!width1em\!!height1ex\!!depth\!!zeropoint}}},
- \v!geen=>{\def\doregisterpage##1[##2]{}},%
- \s!unknown=>{\def\registerpagesymbol{\getvalue{\??id#1\c!symbool}}%
- \def\doregisterpage##1[##2]%
- {\doregisterpagelocation{#1}{\registerpagesymbol}}},
- \s!default=>{\def\registerpageseparator%
- {,}%
- \def\doregisterpage##1[##2]%
- {\doregisterpagehowto{##1}
- {\strut
- \paginaprefix{\??id##1}[##2]%
- \translatednumber[##2]}}}]}
-
-\let\registerpagehowto\empty
-\let\registertexthowto\empty
-
-\def\setregisterhowto[#1,#2]%
- {\def\registerpagehowto{#1}%
- \def\registertexthowto{#2}}%
-
-\def\doregistertexthowto#1#2%
- {\dostartattributes{\??id#1\registertexthowto}\c!tekstletter\c!tekstkleur{}%
- \getvalue{\??id#1\c!tekstcommando}{#2}%
- \dostopattributes}
-
-\def\doregisterpagehowto#1#2%
- {\dostartattributes{\??id#1\registerpagehowto}\c!paginaletter\c!paginakleur{}%
- \getvalue{\??id#1\c!paginacommando}{#2}%
- \dostopattributes}
-
-\def\registerentry #1{\executeifdefined{#1\s!entry}\gobbleoneargument}
-\def\registerentrya#1{\executeifdefined{#1\s!entrya}\gobbleoneargument}
-\def\registerentryb#1{\executeifdefined{#1\s!entryb}\gobbleoneargument}
-\def\registerentryc#1{\executeifdefined{#1\s!entryc}\gobbleoneargument}
-\def\registersee #1{\executeifdefined{#1\s!see}\gobblethrearguments}
-\def\registerpage #1{\executeifdefined{#1\s!page}\gobblefourarguments}
-\def\registerfrom #1{\executeifdefined{#1\s!from}\gobblefourarguments}
-\def\registerto #1{\executeifdefined{#1\s!to}\gobblefourarguments}
-
-\def\doresetregister#1%
- {\letvalue{#1\s!entrya}=\gobbleoneargument
- \letvalue{#1\s!entryb}=\gobbleoneargument
- \letvalue{#1\s!entryc}=\gobbleoneargument
- \letvalue {#1\s!see}=\gobblethreearguments
- \letvalue {#1\s!page}=\gobblefourarguments
- \letvalue {#1\s!from}=\gobblefourarguments
- \letvalue {#1\s!to}=\gobblefourarguments
- \letvalue {#1\s!entry}=\gobbleoneargument}
-
-\newif\iffirstsubentry
-\newif\iffirstsubsubentry
-
-\newcounter\currententrylevel
-
-\let\c!entryletter=\empty
-\let\c!entrya =\relax
-\let\c!entryb =\relax
-\let\c!entryc =\relax
-
-% \def\dosetpageregister#1%
-% {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
-% \setregisterpage{#1}%
-% \setvalue{#1\s!entrya}##1%
-% {\edef\currententrylevel{1}%
-% \global\let\c!entryb=\relax
-% \global\let\c!entryc=\relax
-% \gdef\c!entrya%
-% {\global\firstregisterpagetrue
-% \endgraf
-% \hangindent1em\noindent
-% \dohandleregisterentry{##1}%
-% \global\firstsubentrytrue
-% \global\firstsubsubentrytrue}}%
-% \setvalue{#1\s!entryb}##1%
-% {\edef\currententrylevel{2}%
-% \global\let\c!entryc=\relax
-% \global\def\c!entryb%
-% {\global\firstregisterpagetrue
-% \global\let\c!entrya=\relax
-% \endgraf
-% \iffirstsubentry\nobreak\fi
-% \hangindent2em\noindent\hskip1em\relax
-% \dohandleregisterentry{##1}%
-% \global\firstsubentryfalse
-% \global\firstsubsubentrytrue}}%
-% \setvalue{#1\s!entryc}##1%
-% {\edef\currententrylevel{3}%
-% \gdef\c!entryc%
-% {\global\firstregisterpagetrue
-% \global\let\c!entrya=\relax
-% \global\let\c!entryb=\relax
-% \endgraf
-% \iffirstsubsubentry\nobreak\fi
-% \hangindent3em\noindent\hskip2em\relax
-% \dohandleregisterentry{##1}%
-% \global\firstsubsubentryfalse}}%
-% \setvalue{#1\s!page}##1##2##3%
-% {\doifreglevelelse[##2]
-% {\global\utilitydonetrue
-% \c!entryletter
-% \def\dohandleregisterentry####1%
-% {\bgroup
-% \if!!donea % \strut nieuw
-% \setbox0=\hbox{\showlocation{\getvalue{\??id#1\c!tekstcommando}{\strut####1}}}%
-% \gotonextinternal{\s!ind}{##1}{##3}{\copy0}%
-% \else
-% \getvalue{\??id#1\c!tekstcommando}{####1}%
-% \fi
-% \egroup
-% \!!doneafalse}%
-% \!!doneafalse
-% \doifelsevalue{\??id#1\c!interactie}{\v!tekst}
-% {\ifcase\currententrylevel
-% \or
-% \!!doneatrue\c!entrya\c!entryb\c!entryc
-% \or
-% \c!entrya\!!doneatrue\c!entryb\c!entryc
-% \or
-% \c!entrya\c!entryb\!!doneatrue\c!entryc
-% \fi}
-% {\c!entrya\c!entryb\c!entryc}%
-% \global\let\c!entrya=\relax
-% \global\let\c!entryb=\relax
-% \global\let\c!entryc=\relax
-% \global\let\c!entryletter=\relax
-% \iffirstregisterpage
-% \expandafter\hskip\getvalue{\??id#1\c!afstand}\relax
-% \else
-% \registerpageseparator % || Moet anders
-% |\spatie|\relax % \relax needed because | looks ahead
-% \fi
-% \doifelsevalue{\??id#1\c!interactie}{\v!paginanummer}
-% {\bgroup
-% \setbox0=\hbox{\showlocation{\doregisterpage{#1}[##2]}}%
-% \gotonextinternal{\s!ind}{##1}{##3}{\copy0}%
-% \egroup}
-% {\hbox{\doregisterpage{#1}[##2]}}%
-% \ignorespaces
-% \global\firstregisterpagefalse}
-% {}}%
-% \setvalue{#1\s!see}##1##2%
-% {\doifreglevelelse[##2::0]
-% {{\global\utilitydonetrue
-% \def\dohandleregisterentry####1% dubbelop | \strut nieuw
-% {\getvalue{\??id#1\c!tekstcommando}{\strut####1}}%
-% \ifcase\currententrylevel % \e!zie must be label
-% \getvalue{#1\s!entrya}{\sl\e!zie\space##1}%
-% \or
-% \getvalue{#1\s!entryb}{\sl\e!zie\space##1}%
-% \or
-% \getvalue{#1\s!entryc}{\sl\e!zie\space##1}%
-% \fi
-% \c!entryletter\c!entrya\c!entryb\c!entryc
-% \global\let\c!entrya=\relax
-% \global\let\c!entryb=\relax
-% \global\let\c!entryc=\relax
-% \global\let\c!entryletter=\relax
-% \global\firstregisterpagefalse}}
-% {}}%
-% \setvalue{#1\s!entry}##1%
-% {\gdef\c!entryletter%
-% {\global\let\c!entryletter=\relax
-% \global\utilitydonetrue
-% \getvalue{\??id#1\c!voor}%
-% %\vskip\lineheight\vskip-\lineheight\goodbreak
-% \vskip\lineheight\goodbreak\vskip-\lineheight
-% \doifelsevalue{\??id#1\c!aanduiding}{\v!ja}
-% {\ifhmode\unskip\else\noindent\fi
-% \getvalue{\??id#1\c!commando}% % needed
-% {\doattributes{\??id#1}\c!letter\c!kleur
-% {\doifvalue{\??id#1\c!refereren}{\v!aan}
-% {\pagereference[#1:##1]}%
-% \strut\ignorespaces##1}}%
-% \getvalue{\??id#1\c!na}%
-% \par\nobreak} % don't use \string##1, other hack
-% {\goodbreak % needed ##1 can be \string...
-% \doifvalue{\??id#1\c!refereren}{\v!aan}
-% {\pagereference[#1:##1]}}}}}
-
-\chardef\lastregisterpagestatus=0
-
-\def\dosetpageregisterpage#1#2#3#4#5#6%
- {\doifreglevelelse[#5]
- {\global\utilitydonetrue
- \c!entryletter
- \setregisterhowto[#3]%
- \def\dohandleregisterentry##1%
- {\bgroup
- \if!!donea % \strut nieuw
- \setbox0=\hbox{\showlocation{\doregistertexthowto{#2}{\strut##1}}}%
- \gotonextinternal{\s!ind}{#4}{#6}{\copy0}%
- \else
- \doregistertexthowto{#2}{##1}%
- \fi
- \egroup
- \!!doneafalse}%
- \!!doneafalse
- \doifelsevalue{\??id#2\c!interactie}{\v!tekst}
- {\ifcase\currententrylevel \or
- \!!doneatrue\c!entrya\c!entryb\c!entryc \or
- \c!entrya\!!doneatrue\c!entryb\c!entryc \or
- \c!entrya\c!entryb\!!doneatrue\c!entryc \fi}
- {\c!entrya\c!entryb\c!entryc}%
- \global\let\c!entrya=\relax
- \global\let\c!entryb=\relax
- \global\let\c!entryc=\relax
- \global\let\c!entryletter=\relax
- \iffirstregisterpage
- \global\chardef\lastregisterpagestatus=0
- \expandafter\hskip\getvalue{\??id#2\c!afstand}\relax
- \donetrue
- \else\ifnum#1=3
- |--|\relax % -- !
- \donetrue
- \else\ifnum\lastregisterpagestatus=2
- \donefalse % waiting for "to" pagenumber
- \else
- \registerpageseparator
- |\spatie|\relax % \relax needed because | looks ahead
- \donetrue
- \fi\fi\fi
- \ifdone
- \doifelsevalue{\??id#2\c!interactie}{\v!paginanummer}
- {\bgroup
- \setbox0=\hbox
- {\showlocation{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}%
- \gotonextinternal{\s!ind}{#4}{#6}{\copy0}%
- \egroup}
- {\hbox{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}%
- \ignorespaces
- \global\chardef\lastregisterpagestatus=#1\relax
- \fi
- \global\firstregisterpagefalse}
- {}}
-
-\def\dosetpageregistersee#1#2#3#4%
- {\doifreglevelelse[#4::0]
- {{\global\utilitydonetrue
- \setregisterhowto[#2]%
- \def\dohandleregisterentry##1% dubbelop | \strut nieuw
- {\doregistertexthowto{#1}{\strut##1}}%
- \getvalue
- {#1\ifcase\currententrylevel\s!entrya\or\s!entryb\else\s!entryc\fi}%
- {\doregisterpagehowto{#1}{\labeltext\v!zie\space#3}}%
- \c!entryletter\c!entrya\c!entryb\c!entryc
- \global\let\c!entrya=\relax
- \global\let\c!entryb=\relax
- \global\let\c!entryc=\relax
- \global\let\c!entryletter=\relax
- \global\chardef\lastregisterpagestatus=0
- \global\firstregisterpagefalse}}
- {}}
-
-\def\dosetpageregisterletter#1#2%
- {\gdef\c!entryletter%
- {\global\let\c!entryletter=\relax
- \global\utilitydonetrue
- \getvalue{\??id#1\c!voor}%
- %\vskip\lineheight\vskip-\lineheight\goodbreak
- \vskip\lineheight\goodbreak\vskip-\lineheight
- \doifelsevalue{\??id#1\c!aanduiding}{\v!ja}
- {\ifhmode\unskip\else\noindent\fi
- \getvalue{\??id#1\c!commando}% % needed
- {\doattributes{\??id#1}\c!letter\c!kleur
- {\doifvalue{\??id#1\c!refereren}{\v!aan}
- {\pagereference[#1:#2]}%
- \strut\ignorespaces#2}}%
- \getvalue{\??id#1\c!na}%
- \par\nobreak} % don't use \string#2, other hack
- {\goodbreak % needed #2 can be \string...
- \doifvalue{\??id#1\c!refereren}{\v!aan}
- {\pagereference[#1:#2]}}}}
-
-\def\dosetpageregisterentrya#1#2%
- {\edef\currententrylevel{1}%
- \global\let\c!entryb=\relax
- \global\let\c!entryc=\relax
- \gdef\c!entrya%
- {\global\firstregisterpagetrue
- \endgraf
- \hangindent1em\noindent
- \dohandleregisterentry{#2}%
- \global\firstsubentrytrue
- \global\firstsubsubentrytrue}}
-
-\def\dosetpageregisterentryb#1#2%
- {\edef\currententrylevel{2}%
- \global\let\c!entryc=\relax
- \global\def\c!entryb%
- {\global\firstregisterpagetrue
- \global\let\c!entrya=\relax
- \endgraf
- \iffirstsubentry\nobreak\fi
- \hangindent2em\noindent\hskip1em\relax
- \dohandleregisterentry{#2}%
- \global\firstsubentryfalse
- \global\firstsubsubentrytrue}}
-
-\def\dosetpageregisterentryc#1#2%
- {\edef\currententrylevel{3}%
- \gdef\c!entryc%
- {\global\firstregisterpagetrue
- \global\let\c!entrya=\relax
- \global\let\c!entryb=\relax
- \endgraf
- \iffirstsubsubentry\nobreak\fi
- \hangindent3em\noindent\hskip2em\relax
- \dohandleregisterentry{#2}%
- \global\firstsubsubentryfalse}}
-
-\def\dosetpageregister#1%
- {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
- \setregisterpage{#1}%
- \chardef\lastregisterpagestatus=0
- \setvalue{#1\s!entrya}{\dosetpageregisterentrya {#1}}%
- \setvalue{#1\s!entryb}{\dosetpageregisterentryb {#1}}%
- \setvalue{#1\s!entryc}{\dosetpageregisterentryc {#1}}%
- \setvalue {#1\s!page}{\dosetpageregisterpage{1}{#1}}%
- \setvalue {#1\s!from}{\dosetpageregisterpage{2}{#1}}%
- \setvalue {#1\s!to}{\dosetpageregisterpage{3}{#1}}%
- \setvalue {#1\s!see}{\dosetpageregistersee {#1}}%
- \setvalue {#1\s!entry}{\dosetpageregisterletter {#1}}}
-
-\def\getalllistreferences#1#2%
- {\convertargument#2\to\currentregisterentry
- \doifdefinedelse{\??id#1\??id\currentregisterentry}
- {\edef\alllistreferences%
- {\getvalue{\??id#1\??id\currentregisterentry}}%
- \beforesplitstring\alllistreferences\at::\to\internallistreference
- \aftersplitstring\alllistreferences\at::\to\alllistreferences}
- {\let\alllistreferences=\empty
- \def\internallistreference{0}}}
-
-\def\dosetlinkregister#1% is die page reference echt nodig?
- {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
- \setregisterpage{#1}%
- \setvalue{#1\s!entrya}##1%
- {\global\utilitydonetrue
- \c!entryletter
- \iflocation
- \getalllistreferences{#1}{##1}%
- \endgraf\hangindent1em\noindent
- %
- %\thisissomeinternal{\s!lin}{\internallistreference}%
- %
- \pagereference[\s!lin:\internallistreference]%
- %
- \getcommacommandsize[\alllistreferences]%
- \getfromcommacommand[\alllistreferences][1]%
- \ifnum\commalistsize=1
- \let\firstlistreference=\empty
- \let\midlistreference=\commalistelement
- \let\lastlistreference=\empty
- \else
- \let\firstlistreference=\commalistelement
- \getfromcommacommand[\alllistreferences][\commalistsize]%
- \let\lastlistreference=\commalistelement
- \ifnum\commalistsize=2
- \let\midlistreference=\empty
- \else
- \!!counta=\commalistsize
- \divide\!!counta by 2
- \getfromcommacommand[\alllistreferences][\!!counta]%
- \let\midlistreference=\commalistelement
- \fi
- \fi
- % \hskip-.25em\relax ??????
- \getvalue{\??id#1\c!tekstcommando}{##1}%
- \hskip\getvalue{\??id#1\c!afstand}%
- \def\dodocommando[####1-####2]%
- {\gotonextinternal{\s!ind}{####1}{####2}{\copy0}}%
- \def\docommando####1####2%
- {\setbox0=\hbox{\showlocation{\hbox to 1em{\hss\symbol[####2]\hss}}}%
- \ifx####1\empty
- % \hskip\wd0 % (optioneel maken)
- \else
- \expandafter\dodocommando\expandafter[####1]%
- \fi}%
- {\docommando\firstlistreference\v!vorige}%
- {\docommando\midlistreference\v!ergens}%
- {\docommando\lastlistreference\v!volgende}%
- \else
- ##1%
- \fi}%
- \setvalue{#1\s!entry}##1% hetzelfde dus gemeenschappelijk
- {\gdef\c!entryletter%
- {\global\utilitydonetrue
- \global\let\c!entryletter=\relax
- \getvalue{\??id#1\c!voor}%
- %\vskip\lineheight\vskip-\lineheight\goodbreak
- \vskip\lineheight\goodbreak\vskip-\lineheight
- \doifelsevalue{\??id#1\c!aanduiding}{\v!ja}
- {\ifhmode\unskip\else\noindent\fi
- \getvalue{\??id#1\c!commando}% % needed
- {\doattributes{\??id#1}\c!letter\c!kleur
- {\doifvalue{\??id#1\c!refereren}{\v!aan}
- {\pagereference[#1:##1]}%
- \strut##1}}%
- \getvalue{\??id#1\c!na}%
- \par\nobreak} % don't use \string##1, other hack
- {\goodbreak % needed ##1 can be \string...
- \doifvalue{\??id#1\c!refereren}{\v!aan}
- {\pagereference[#1:##1]}}}}}
-
-\def\dosetregister#1%
- {\doifelsevalue{\??id#1\c!koppeling}{\v!ja}
- {\dosetlinkregister{#1}}
- {\dosetpageregister{#1}}}
-
-\newcounter\internallistreference
-
-% \def\doloadregisterlinks#1%
-% {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
-% \setregisterpage{#1}%
-% \setvalue{#1\s!entrya}##1%
-% {\global\firstregisterpagetrue
-% \doglobal\convertargument##1\to\currentregisterentry % \doglobal nodig?
-% \doglobal\increment\internallistreference}%
-% \setvalue{#1\s!page}##1##2##3%
-% {\doifreglevelelse[##2]
-% {\global\utilitydonetrue
-% \iffirstregisterpage
-% \global\firstregisterpagefalse
-% \setxvalue{\??id#1\??id\currentregisterentry}%
-% {\internallistreference::##1-##3}%
-% \else
-% \setxvalue{\??id#1\??id\currentregisterentry}%
-% {\getvalue{\??id#1\??id\currentregisterentry},##1-##3}%
-% \fi}
-% {}}}
-
-\def\doloadregisterlinks#1%
- {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
- \setregisterpage{#1}%
- \setvalue{#1\s!entrya}##1%
- {\global\firstregisterpagetrue
- \doglobal\convertargument##1\to\currentregisterentry % \doglobal nodig?
- \doglobal\increment\internallistreference}%
- \setvalue{#1\s!from}%
- {\getvalue{#1\s!page}}%
- \setvalue{#1\s!page}##1##2##3##4%
- {\doifreglevelelse[##3]
- {\global\utilitydonetrue
- \iffirstregisterpage
- \global\firstregisterpagefalse
- \setxvalue{\??id#1\??id\currentregisterentry}%
- {\internallistreference::##2-##4}%
- \else
- \setxvalue{\??id#1\??id\currentregisterentry}%
- {\getvalue{\??id#1\??id\currentregisterentry},##2-##4}%
- \fi}
- {}}}
-
-\def\dokoppelregister[#1][#2]%
- {\iflocation
- \begingroup
- \let\dosetregister=\doloadregisterlinks
- \stelregisterin[#1][#2]%
- \doutilities{#1}{\jobname}{#1}{}{}%
- \endgroup
- \fi}
-
-\def\koppelregister%
- {\dodoubleempty\dokoppelregister}
-
-\def\doprocesslinkedregister[#1][#2]#3%
- {\hbox
- {\doprocessregister[#2]{#3}%
- \let\firstlistreference=\empty
- \let\lastlistreference=\empty
- \let\selflistreference=\empty
- \let\prevlistreference=\empty
- \let\nextlistreference=\empty
- \getalllistreferences{#1}{#3}%
- \doifnot{\alllistreferences}{}
- {\def\dodocommando[##1-##2]%
- {\ifx\firstlistreference\empty
- \def\firstlistreference{##1-##2}%
- \fi
- \def\lastlistreference{##1-##2}%
- \ifnum##1<\nextinternalreference\relax
- \def\prevlistreference{##1-##2}%
- \else\ifnum##1>\nextinternalreference\relax
- \def\nextlistreference{##1-##2}%
- \def\dodocommando[####1-####2]%
- {\def\lastlistreference{####1-####2}}%
- \else
- \def\selflistreference{##1-##2}%
- \fi\fi}%
- \def\docommando##1%
- {\dodocommando[##1]}%
- \processcommacommand[\alllistreferences]\docommando}%
- \ifx\prevlistreference\empty
- \let\prevlistreference=\lastlistreference
- \fi
- \ifx\nextlistreference\empty
- \let\nextlistreference=\firstlistreference
- \fi
- \ifx\prevlistreference\selflistreference
- \let\prevlistreference=\empty
- \let\nextlistreference=\empty
- \fi
-%
-% \def\dodocommando[##1-##2]%
-% {\gotonextinternal{\s!ind}{##1}{##2}{\copy0}}%
-% \def\docommando##1##2%
-% {\setbox0=\hbox to 1em{\hss\showlocation{\symbol[##2]}\hss}%
-% \ifx##1\empty
-% \hskip\wd0 % (optioneel maken)
-% \else
-% \expandafter\dodocommando\expandafter[##1]%
-% \fi}%
-% \bgroup
-% \docommando\prevlistreference{\v!vorige}%
-% \egroup
-% \bgroup
-% \doifreferencefoundelse{\s!lin:\internallistreference}
-% {\gotosomeinternal
-% {\s!lin}{\internallistreference}{\currentrealreference}
-% {\showlocation{#3}}}
-% {\hbox{#3}}%
-% \egroup
-% \bgroup
-% \docommando\nextlistreference{\v!volgende}%
-% \egroup}}
-%
- \def\dodocommando[##1-##2]%
- {\gotonextinternal{\s!ind}{##1}{##2}{\copy0}}%
- \def\docommando##1##2%
- {\bgroup
- \ifx##1\empty
- \doifvalue{\??id#1\c!onbekendeverwijzing}{\v!leeg}
- {\hskip1em}%
- \else
- \setbox0=\hbox to 1em{\hss\showlocation{\symbol[##2]}\hss}%
- \expandafter\dodocommando\expandafter[##1]%
- \fi
- \egroup}%
- \processaction
- [\getvalue{\??id#1\c!plaats}]
- [\v!midden=>\docommando\prevlistreference\v!vorige,
- \v!links=>\docommando\prevlistreference\v!vorige
- \docommando\nextlistreference\v!volgende]%
- \doifreferencefoundelse{\s!lin:\internallistreference}
- {\gotosomeinternal
- {\s!lin}{\internallistreference}{\currentrealreference}
- {\showlocation{#3}}}
- {\hbox{#3}}%
- \processaction
- [\getvalue{\??id#1\c!plaats}]
- [ \v!midden=>\docommando\nextlistreference\v!volgende,
- \v!rechts=>\docommando\prevlistreference\v!vorige
- \docommando\nextlistreference\v!volgende]}}
-
-\def\dodolinkedregister[#1][#2]#3%
- {\bgroup
- \chardef\registerpagestatus=1
- \def\currentregister{#1}%
- \iflocation
- \doifelsevalue{\??id#1\c!koppeling}{\v!ja}
- {\def\next{\doprocesslinkedregister[#1][#2]{#3}}}
- {\def\next{\doprocessregister[#2]{#3}}}% ook hier [#1]
- \else
- \def\next{\doprocessregister[#2]{#3}}%
- \fi
- \next
- \egroup
- \ifvmode\nobreak\fi
- \GotoPar}
-
-\def\dolinkedregister#1%
- {\dodoubleempty\dodolinkedregister[#1]}
-
-\def\complexdoplaatsregister[#1]%
- {\begingroup
- \stelregisterin[\currentregister][#1]%
- \raggedright
- \startkolommen
- [\c!n=\getvalue{\??id\currentregister\c!n},
- \c!balanceren=\getvalue{\??id\currentregister\c!balanceren},
- \c!uitlijnen=\getvalue{\??id\currentregister\c!uitlijnen}]%
- \mindermeldingen
- \startopelkaar[\v!blanko]%
- \doutilities{\currentregister}{\jobname}{\currentregister}{}{\par}%
- \stopopelkaar
- \stopkolommen
- \endgroup}
-
-\def\doplaatsregister[#1]%
- {\def\currentregister{#1}%
- \complexorsimpleempty\doplaatsregister}
-
-\def\plaatsregister%
- {\dosingleargument\doplaatsregister}
-
-\def\complexdovolledigregister[#1]% \@EA's kunnen weg
- {\@EA\plaatsvolledig\@EA{\@EA\systemsuppliedchapter\@EA}%
- \@EA{\@EA\currentregister\@EA}%
- \@EA{\@EA\headtext\@EA{\currentregister}}%
- {\complexdoplaatsregister[#1]}}
-
-\def\dovolledigregister[#1]%
- {\def\currentregister{#1}%
- \complexorsimpleempty\dovolledigregister}
-
-\def\volledigregister%
- {\dosingleargument\doplaatsregister}
-
-\def\dodefinieerregister[#1][#2]%
- {\stelregisterin[#1]%
- [\c!n=2,
- \c!balanceren=\v!ja, % \v!nee komt niet zo vaak voor
- \c!uitlijnen=\v!nee,
- \c!voor=\blanko, % binnen kolommen: \blanko[\v!regel]
- \c!na=,
- \c!symbool=,
- \c!interactie=\v!paginanummer,
- \c!afstand=1em,
- \c!letter=\v!vet,
- \c!paginaletter=\v!schuin,
- \c!aanduiding=\v!ja,
- \v!deel\v!nummer=\v!ja, % v
- \v!hoofdstuk\c!nummer=\v!nee,
- \c!criterium=\v!alles,
- \c!commando=,
- \c!refereren=\v!aan,
- \c!plaats=\v!midden,
- \c!onbekendeverwijzing=\v!leeg]%
- \presetheadtext[#1=\Word{#1}]%
- \setvalue{#1}%
- {\doregister{#1}}%
- \setvalue{\e!gekoppelde#1}%
- {\dolinkedregister{#1}}%
- \setvalue{\s!set#1}%
- {\dosetregister{#1}}%
- \setvalue{\s!reset#1}%
- {\doresetregister{#1}}%
- \addutilityreset{#1}%
- \setvalue{\e!zie#1}%
- {\dozieregister{#1}}%
- \setvalue{\e!plaats#1}%
- {\doplaatsregister[#1]}%
- \setvalue{\e!volledige#1}%
- {\dovolledigregister[#1]}%
- \setvalue{\e!stel#1\e!in}[##1]%
- {\getparameters[\??id#1][##1]}}
-
-\def\definieerregister%
- {\dodoubleargument\dodefinieerregister}
-
-\def\registerlengte {\utilityregisterlength}
-
-\def\utilityregisterlength {0}
-
-\def\dobepaalregisterkenmerken[#1][#2]%
- {\begingroup
- \stelregisterin[#1][#2]%
- \dosetreglevel{\getvalue{\??id#1\c!criterium}}%
- \setvalue{#1\s!from}%
- {\getvalue{#1\s!page}}%
- \setvalue{#1\s!page}##1##2##3##4%
- {\doifreglevelelse[##3]
- {\doglobal\increment\utilitylistlength
- \global\utilitydonetrue}
- {}}%
- \doglobal\newcounter\utilityregisterlength
- \setbox0=\vbox
- {\doutilities{#1}{\jobname}{#1}{}{}}%
- \endgroup
- \ifregistergeplaatst\enablemode[\e!register]\else\disablemode[\e!register]\fi}
-
-\def\bepaalregisterkenmerken%
- {\dodoubleempty\dobepaalregisterkenmerken}
-
-%I n=Index
-%I c=\index,\zieindex,\volledigeindex
-%I
-%I Een ingang naar de index wordt gecreeerd met:
-%I
-%I \index[ascii]{ingang+ingang+ingang}
-%I
-%I Een verwijzing wordt gecreerd met:
-%I
-%I \zieindex[ascii]{ingang+ingang+ingang}{andere ingang}
-%I
-%I Een index kan (vooralsnog) alleen een eenvoudig
-%I zetcommando afhandelen, bijvoorbeeld: \index{\bf{test}} of
-%I \index{\kap{anwb}}. Meer is vaak niet nodig.
-%I
-%I Als een ingang niet goed gesorteerd wordt, dient [ascii]
-%I te worden meegegeven: \index[anwb]{\kap{anwb}}.
-%I
-%I Een index wordt gegenereerd met:
-%I
-%I \plaatsindex
-%I \volledigeindex
-
-%T n=index
-%T m=ind
-%T a=i
-%T
-%T \index{?}
-
%I n=Buffers
%I c=\startbuffer,\haalbuffer,\typebuffer
%I
@@ -14673,7 +14197,6 @@
%I terwijl voor het eerste woord spaties moeten staan, er
%I bewust wel (!) een naam moet worden opgegeven.
-
% \EveryPar%
% {\doglobal\newcounter\NOfLines}
%
@@ -14713,8 +14236,12 @@
\egroup
\getvalue{#3}}%
\doifelsenothing{#1}
- {\immediate\openout\tmpblocks=\jobname.\f!temporaryextension}
- {\immediate\openout\tmpblocks=#1.\f!temporaryextension}%
+ %{\immediate\openout\tmpblocks=\jobname.\f!temporaryextension}
+ %{\immediate\openout\tmpblocks=#1.\f!temporaryextension}%
+ %{\immediate\openout\tmpblocks=\bufferprefix\jobname.\f!temporaryextension}
+ %{\immediate\openout\tmpblocks=\bufferprefix#1.\f!temporaryextension}%
+ {\immediate\openout\tmpblocks=\TEXbufferfile{\jobname}}
+ {\immediate\openout\tmpblocks=\TEXbufferfile{#1}}%
\newcounter\nestedbufferlevel
\setupcopyblock
\let\writeoutblocks\gobbleoneargument
@@ -14730,7 +14257,7 @@
% \setbuffer[name]#2\endbuffer : saves to file #1.tmp
\def\setbuffer[#1]#2\endbuffer%
- {\immediate\openout\tmpblocks=#1.\f!temporaryextension
+ {\immediate\openout\tmpblocks=\TEXbufferfile{#1}%
\convertargument#2\to\ascii
\immediate\write\tmpblocks{\ascii}%
\immediate\closeout\tmpblocks}
@@ -14739,7 +14266,7 @@
{\def\dodobuffer##1%
{\showmessage{\m!systems}{#1}{##1}%
\beginrestorecatcodes
- #3{##1.\f!temporaryextension}{}{}%
+ #3{\TEXbufferfile{##1}}{}{}%
\endrestorecatcodes}%
\doifelsenothing{#2}
{\dodobuffer\jobname}
@@ -14781,7 +14308,7 @@
\fi}
\def\dodefinieerbuffer[#1]%
- {\iffirstargument % else problems
+ {\iffirstargument % else problems
\doglobal\increment\nofdefinedbuffers
\setevalue{\e!start#1}%
{\noexpand\dostartbuffer[def-\nofdefinedbuffers][\e!start#1][\e!stop#1]}%
@@ -14884,10 +14411,10 @@
% de in de \answer-macro van Knuth gebruikte copieermethode.
% Blokken kunnen worden
%
-% \gehandhaafd : in de tekst worden opgenomen ‚n gecopieerd
-% \verborgen : alleen worden gecopieerd
-% \gebruikt : later in de tekst worden opgenomen
-% \geselecteerd : later selectief in de tekst worden opgenomen
+% gehandhaafd : in de tekst worden opgenomen ‚n gecopieerd
+% verborgen : alleen worden gecopieerd
+% gebruikt : later in de tekst worden opgenomen
+% geselecteerd : later selectief in de tekst worden opgenomen
%
% Ieder blok wordt gecopieerd naar de file 'jobname.tmp'.
% Daarnaast wordt een blok tijdelijk opgeslagen in de file
@@ -14969,7 +14496,7 @@
\newif\ifoldinbijlagen
\def\opentmpblock%
- {\immediate\openout\tmpblocks=\f!utilityfilename.\f!temporaryextension}
+ {\immediate\openout\tmpblocks=\TEXbufferfile{\f!utilityfilename}}
\def\closetmpblock%
{\immediate\write\tmpblocks{}% een lege regel is handig voor \par commando's
@@ -15039,7 +14566,7 @@
{\showmessage{\m!textblocks}{4}{}}%
\endrestorecatcodes}
-%\def\setupcopyblock% kan vlotter
+%\def\setupcopyblock% kan vlotter
% {\!!counta=1\relax
% \loop
% \catcode\!!counta=\@@other
@@ -15150,7 +14677,7 @@
\saveblock}
\def\loadoneblock%
- {\readjobfile{\f!utilityfilename.\f!temporaryextension}{}{}}
+ {\readjobfile{\TEXbufferfile{\f!utilityfilename}}{}{}}
\def\dodefinieerblok[#1]%
{\passeerblok[#1]%
@@ -15319,11 +14846,11 @@
% \skipblock{#1}}%
% \fi
% \next}
-%
+%
% \def\dogebruikblok[#1][#2]%
% {\setvalue{\s!thisisblock#1}##1[##2]%
% {\dodogebruikblok{#1}{##1}{##2}{#2}}}
-%
+%
% \def\dogebruikblokken[#1][#2]%
% {\def\docommando##1%
% {\dogebruikblok[##1][#2]}%
@@ -15332,23 +14859,23 @@
% \doifdefined{\??tb\commalistelement\c!file}
% {\loadallblocks{\getvalue{\??tb\commalistelement\c!file}}}%
% \endgroup}
-%
+%
% \def\gebruikblokken%
% {\begingroup
% \doassign[\??bs][\c!criterium=\v!alles]%
% \dodoubleempty\dogebruikblokken}
-\newconditional\processblockstatus
+\newconditional\processblockstatus
\newconditional\dummyblockstatus
\def\dodogebruikblok#1#2#3#4%
{\getblockstatus{#2}%
\ifblockpermitted
- \setfalse\dummyblockstatus
+ \setfalse\dummyblockstatus
\doifelsenothing{#4}
{\edef\bloktitel{#1}}
{\doifnotcommon{#3}{#4}
- {\ifconditional\processblockstatus
+ {\ifconditional\processblockstatus
\settrue\dummyblockstatus
\else
\global\blockpermittedfalse
@@ -15473,18 +15000,58 @@
\newbox\leftbackground
\newbox\rightbackground
-\def\doaddpagebackground#1#2%
- {\doifvaluesomething{\??ma#1\c!achtergrond}
- {\setbox2=\vbox
- {\offinterlineskip
- \localframed
- [\??ma#1]
- [\c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]%, \c!offset=\v!overlay]
- {\getvalue{\??ma#1\c!commando}}}%
- \wd2=\!!zeropoint
- \dp2=\!!zeropoint
- \setbox#2=\vbox
- {\hbox{\box2\box#2}}}}
+% \getvalue{\??ma#1\c!commando} is obsolete; replaced by overlay
+%
+% \def\doaddpagebackground#1#2%
+% {\doifvaluesomething{\??ma#1\c!achtergrond}
+% {\setbox2=\vbox
+% {\offinterlineskip
+% \localframed
+% [\??ma#1]
+% [\c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]%, \c!offset=\v!overlay]
+% {\getvalue{\??ma#1\c!commando}}}%
+% \wd2=\!!zeropoint
+% \dp2=\!!zeropoint
+% \setbox#2=\vbox
+% {\hbox{\box2\box#2}}}}
+
+%\def\doaddpagebackground#1#2%
+% {\doifvaluesomething{\??ma#1\c!achtergrond}
+% {\edef\setpagebackgrounddepth%
+% {\dp#2=\the\dp#2}%
+% \setbox#2=\vbox\localframed
+% [\??ma#1]
+% [\c!strut=\v!nee,\c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]
+% {\dp#2=\!!zeropoint\box#2}%
+% \setpagebackgrounddepth}}
+
+\def\ifsomebackgroundfound#1%
+ {\edef\!!stringe{\??ma#1}%
+ \doifelsevaluenothing{\!!stringe\c!achtergrond}
+ {\doifelsevalue{\!!stringe\c!kader }\v!aan\!!doneatrue
+ {\doifelsevalue{\!!stringe\c!linkerkader }\v!aan\!!doneatrue
+ {\doifelsevalue{\!!stringe\c!rechterkader}\v!aan\!!doneatrue
+ {\doifelsevalue{\!!stringe\c!bovenkader }\v!aan\!!doneatrue
+ {\doifelsevalue{\!!stringe\c!onderkader }\v!aan\!!doneatrue
+ \!!doneafalse}}}}}
+ \!!doneatrue
+ \if!!donea}
+
+\def\doaddpagebackground#1#2%
+ {\doifelsevaluenothing{\??ma#1\c!achtergrond}
+ {\doifelsevaluenothing{\??ma#1\c!kader}
+ {\donefalse}
+ {\donetrue}}
+ {\donetrue}%
+ \ifdone
+ \edef\setpagebackgrounddepth%
+ {\dp#2=\the\dp#2}%
+ \setbox#2=\vbox\localframed
+ [\??ma#1]
+ [\c!strut=\v!nee,\c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]
+ {\dp#2=\!!zeropoint\box#2}%
+ \setpagebackgrounddepth
+ \fi}
\def\addpagebackground#1%
{\doifbothsidesoverruled
@@ -15505,32 +15072,8 @@
% #3 = pos
% #4 = pos
-% \def\dododopagebodybackground#1#2#3#4%
-% {\doifelsevaluenothing{\??ma#3#4\c!achtergrond}
-% {\doifelsevalue{\??ma#3#4\c!kader}{\v!aan} % niet waterdicht, ook deelkaders
-% {\!!doneatrue}
-% {\!!doneafalse}}
-% {\!!doneatrue}%
-% \if!!donea
-% \localframed
-% [\??ma#3#4]
-% [\c!breedte=#1,\c!hoogte=#2,\c!offset=\v!overlay]
-% {\getvalue{\??ma#3#4\c!commando}}%
-% \else
-% \hskip#1%
-% \fi}
-
\def\dododopagebodybackground#1#2#3#4%
- {\edef\!!stringe{\??ma#3#4}%
- \doifelsevaluenothing{\!!stringe\c!achtergrond }
- {\doifelsevalue{\!!stringe\c!kader }\v!aan\!!doneatrue
- {\doifelsevalue{\!!stringe\c!linkerkader }\v!aan\!!doneatrue
- {\doifelsevalue{\!!stringe\c!rechterkader}\v!aan\!!doneatrue
- {\doifelsevalue{\!!stringe\c!bovenkader }\v!aan\!!doneatrue
- {\doifelsevalue{\!!stringe\c!onderkader }\v!aan\!!doneatrue
- \!!doneafalse}}}}}
- \!!doneatrue
- \if!!donea
+ {\ifsomebackgroundfound{#3#4}%
\localframed
[\??ma#3#4]
[\c!breedte=#1,\c!hoogte=#2,\c!offset=\v!overlay]
@@ -15588,11 +15131,11 @@
\setbackgroundbox\rightbackground\doswapmargins
\fi
%\global\newbackgroundfalse
-\doifnot{\@@mastatus}{\v!herhaal}{\global\newbackgroundfalse}%
+ \doifnot{\@@mastatus}{\v!herhaal}{\global\newbackgroundfalse}%
\doifelsevaluenothing{\??ma\v!tekst\v!tekst\c!achtergrond}
{\global\let\pagebackgroundhoffset=\!!zeropoint
\global\let\pagebackgroundvoffset=\!!zeropoint
- \global\let\pagebackgrounddepth=\!!zeropoint}
+ \global\let\pagebackgrounddepth =\!!zeropoint}
{\bgroup
\dimen0=\getvalue{\??ma\v!pagina\c!offset}%
\doifnothing
@@ -15601,7 +15144,7 @@
{\xdef\pagebackgroundhoffset{\the\dimen0}}%
\doifnothing
{\getvalue{\??ma\v!tekst\v!rechterrand\c!achtergrond}%
- \getvalue{\??ma\v!tekst\v!linkerrand\c!achtergrond}}
+ \getvalue{\??ma\v!tekst\v!linkerrand \c!achtergrond}}
{\xdef\pagebackgroundvoffset{\the\dimen0}%
\dimen0=\getvalue{\??ma\v!pagina\c!diepte}%
\xdef\pagebackgrounddepth{\the\dimen0}}%
@@ -15625,7 +15168,8 @@
{\def\dodocommando##1##2%
{\copylocalframed[\??ma##1##2][\??ma\v!pagina]%
\getparameters[\??ma##1##2]
- [\c!achtergrond=,\c!kader=,\c!kleur=,\c!raster=]%
+ [\c!achtergrond=,\c!kader=,\c!kleur=,\c!raster=,
+ \c!onderkader=,\c!bovenkader=,\c!linkerkader=,\c!rechterkader=]%
\copyparameters
[\??ma##1##2\c!kader][\??ma##1##2]
[\c!kleur,\c!raster]%
@@ -15642,20 +15186,49 @@
\def\docheckbackgrounddefinitions%
{\global\somebackgroundtrue}}}
+% \def\dostelachtergrondenin[#1][#2][#3]%
+% {\ifthirdargument
+% \docheckbackgrounddefinitions
+% \def\docommando##1%
+% {\doifinsetelse{##1}{\v!pagina,\v!linkerpagina,\v!rechterpagina}
+% {\getparameters[\??ma##1][#3]%
+% \dosetpageseparation}
+% {\def\dodocommando####1%
+% {\getparameters[\??ma##1####1][#3]}
+% \processcommalist[#2]\dodocommando}}%
+% \processcommalist[#1]\docommando
+% \else\ifsecondargument
+% \docheckbackgrounddefinitions
+% \doifcommonelse{#1}{\v!pagina,\v!linkerpagina,\v!rechterpagina}
+% {\def\docommando##1%
+% {\getparameters[\??ma##1][#2]}%
+% \processcommalist[#1]\docommando
+% \dosetpageseparation}
+% {\dostelachtergrondenin
+% [#1]
+% [\v!linkerrand,\v!linkermarge,\v!tekst,\v!rechtermarge,\v!rechterrand]
+% [#2]}%
+% \else\iffirstargument
+% \getparameters[\??ma][#1]%
+% \fi\fi\fi
+% \doifelse{\@@mastatus}{\v!stop}
+% {\global\newbackgroundfalse}
+% {\global\newbackgroundtrue}}
+
\def\dostelachtergrondenin[#1][#2][#3]%
{\ifthirdargument
\docheckbackgrounddefinitions
\def\docommando##1%
- {\doifinsetelse{##1}{\v!pagina,\v!linkerpagina,\v!rechterpagina}
+ {\doifinsetelse{##1}{\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina}
{\getparameters[\??ma##1][#3]%
\dosetpageseparation}
{\def\dodocommando####1%
- {\getparameters[\??ma##1####1][#3]}
+ {\getparameters[\??ma##1####1][#3]}%
\processcommalist[#2]\dodocommando}}%
\processcommalist[#1]\docommando
\else\ifsecondargument
\docheckbackgrounddefinitions
- \doifcommonelse{#1}{\v!pagina,\v!linkerpagina,\v!rechterpagina}
+ \doifcommonelse{#1}{\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina}
{\def\docommando##1%
{\getparameters[\??ma##1][#2]}%
\processcommalist[#1]\docommando
@@ -15664,23 +15237,32 @@
[#1]
[\v!linkerrand,\v!linkermarge,\v!tekst,\v!rechtermarge,\v!rechterrand]
[#2]}%
- \else\iffirstargument
+ \else\iffirstargument
\getparameters[\??ma][#1]%
\fi\fi\fi
\doifelse{\@@mastatus}{\v!stop}
{\global\newbackgroundfalse}
{\global\newbackgroundtrue}}
-
+
\def\stelachtergrondenin%
{\dotripleempty\dostelachtergrondenin}
% a lot of setups, including short ones
+\presetlocalframed [\??ma\v!papier]
\presetlocalframed [\??ma\v!pagina]
\presetlocalframed [\??ma\v!linkerpagina]
\presetlocalframed [\??ma\v!rechterpagina]
\copyparameters
+ [\??ma\v!papier\c!kader][\??ma\v!pagina]
+ [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
+
+\copyparameters
+ [\??ma\v!papier\c!achtergrond][\??ma\v!pagina]
+ [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
+
+\copyparameters
[\??ma\v!pagina\c!kader][\??ma\v!pagina]
[\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
@@ -15869,11 +15451,11 @@
% \readlocfile{#1}{}{}
% \doglobal\decrement\fileprocesslevel}
-\def\processlocalfile#1#2%
+\def\processlocalfile#1#2%
{\doglobal\increment\fileprocesslevel
\setxvalue{\c!file::\fileprocesslevel}{#2}%
\@EA\doglobal\@EA\addtocommalist\@EA{#2}\processedfiles
- #1{#2}{}{}% #1=\readlocfile|\readsetfile{dir} #2=filename
+ #1{#2}{}{}% #1=\readlocfile|\readsetfile{dir} #2=filename
\doglobal\decrement\fileprocesslevel}
\def\processfile#1%
@@ -15888,15 +15470,15 @@
\ifdone\expandafter\quitcommalist\fi}%
\processcommacommand[.,\allinputpaths]\docommando
\ifx\filepath\empty
- \processlocalfile{\readlocfile }{#1}% fall back ../../..
+ \processlocalfile{\readlocfile }{#1}% fall back ../../..
\else
- \processlocalfile{\readsetfile\filepath}{#1}% file found
+ \processlocalfile{\readsetfile\filepath}{#1}% file found
\fi
\fi}
\let\allinputpaths\empty
-\def\usepath[#1]%
+\def\usepath[#1]%
{\def\docommando##1%
{\doifelse{##1}{\v!reset}
{\let\allinputpaths\empty}
@@ -15939,37 +15521,66 @@
\loadallsystemfiles\f!filfilename
\loadallsystemfiles\f!sysfilename}
-%
+%D Loading of \type {cont-usr.tex} and \type {cont-exe.tex}
+%D (the one generated by texexec).
+
+\def\loaduserspecifications
+ {\readsysfile{\f!usrfilename}
+ {\showmessage{\m!systems}{2}{\f!usrfilename}}{}%
+ \readjobfile{\f!fmtfilename}
+ {\showmessage{\m!systems}{2}{\f!fmtfilename}}{}}
+
+%D We don't want multiple jobfiles to interfere.
+
+\bgroup
+\catcode`\%=\@@other
+\xdef\texcommentsymbol{%}
+\egroup
-\def\loadoptionfile%
- {\readsysfile{\f!optfilename}
- {\showmessage{\m!systems}{2}{\f!optfilename}}{}}
+%\def\loadoptionfile% tzt \unlinkfile
+% {\readjobfile{\f!optfilename}
+% {\showmessage{\m!systems}{2}{\f!optfilename}}%
+% {}%
+% \doiffileelse{\f!optfilename}
+% {\immediate\openout\scratchwrite=\f!optfilename
+% \immediate\write\scratchwrite{\texcommentsymbol\space see backup copy}%
+% \immediate\closeout\scratchwrite}
+% {}}
+
+\def\loadoptionfile%
+ {\readjobfile{\jobname.\f!optionextension}
+ {\showmessage{\m!systems}{2}{\jobname.\f!optionextension}}%
+ {}}
% \newevery \everyjob \EveryJob
% \appendtoks ... \to \everyjob
-\appendtoks \showcontextbanner \to \everyjob
-\appendtoks \loadsystemfiles \to \everyjob
-\appendtoks \preloadfonts \to \everyjob
-\appendtoks \settopskip \to \everyjob
-\appendtoks \preloadspecials \to \everyjob
-\appendtoks \openspecialfile \to \everyjob
-\appendtoks \checkutilityfile \to \everyjob
-\appendtoks \openutilities \to \everyjob
-\appendtoks \loadoptionfile \to \everyjob
-\appendtoks \loadtwopassdata \to \everyjob
-\appendtoks \setupfootnotes \to \everyjob % eigenlijk ergens anders
- % hangt af van korps
+\prependtoks \showcontextbanner \to \everyjob
+
+\appendtoks \loadsystemfiles \to \everyjob
+\appendtoks \preloadfonts \to \everyjob
+\appendtoks \settopskip \to \everyjob
+\appendtoks \preloadlanguages \to \everyjob
+\appendtoks \preloadspecials \to \everyjob
+\appendtoks \openspecialfile \to \everyjob
+\appendtoks \checkutilityfile \to \everyjob
+\appendtoks \openutilities \to \everyjob
+\appendtoks \loadoptionfile \to \everyjob
+\appendtoks \loadtwopassdata \to \everyjob
+\appendtoks \setupfootnotes \to \everyjob % eigenlijk ergens anders
+ % hangt af van korps
\appendtoks \pagina[\v!laatste] \pagina
\ifarrangingpages\poparrangedpages\fi \to \everybye
-\appendtoks \registreerfileinfo[end]{\jobname} \to \everybye
+\appendtoks \registreerfileinfo[end]{\jobname} \to \everybye
\appendtoks \stopcopyingblocks \to \everybye
\appendtoks \closeutilities \to \everybye
\appendtoks \closespecialfile \to \everybye
+\appendtoks \checkreferences \to \everystarttext % nieuw 4-12-1999
+
\def\doateverystarttext%
- {\the\everystarttext
+ {\the\everystarttext
\global\let\doateverystarttext\relax}
\def\starttekst%
@@ -16103,8 +15714,8 @@
{\let\next=\skipdeelomgeving}%
\next}
-\def\startproduct{\startproduct}
-\def\stopproduct {\stopproduct}
+\def\startproduct{\startprodukt}
+\def\stopproduct {\stopprodukt}
\def\startproject{\startprojekt}
\def\stopproject {\stopprojekt}
@@ -16152,7 +15763,7 @@
\ #1: \ascii\
\!!doneatrue}}
-\def\plaatsversieaanduiding% nog engels maken
+\def\plaatsversieaanduiding% nog engels maken
{\ifvoorlopig
\vskip\!!sixpoint
\hbox to \zetbreedte
@@ -16377,7 +15988,7 @@
%I \label{tekst}
\def\complexstart[#1]{\bgroup\getvalue{\e!start#1}}
-\def\complexstop [#1]{\getvalue{\e!stop #1}\egroup}
+\def\complexstop [#1]{\getvalue{\e!stop #1}\egroup}
\def\simplestart{\bgroup}
\def\simplestop {\egroup}
@@ -16446,11 +16057,27 @@
\def\dosetupsystem[#1]%
{\getparameters[\??sv][#1]%
+ \setuprandomize[\@@svwillekeur]%
\beforesplitstring\@@svresolutie\at dpi\to\@@svresolutie
\let\outputresolution=\@@svresolutie}
\def\setupsystem%
{\dosingleargument\dosetupsystem}
+
+\def\setuprandomize[#1]%
+ {\doifsomething{#1}
+ {\bgroup
+ \setrandomseed{-1}%
+ \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!normaal=>,
+ \s!default=>,
+ \s!unknown=>\time=#1]%
+ \nextrandom
+ \egroup}}
% Default-instellingen (verborgen)
@@ -16465,6 +16092,7 @@
\setupsystem
[\c!gebied=,
\c!resolutie=300dpi,
+ \c!willekeur=,
\c!korps=\normalizedlocalbodyfontsize] % of iets anders
% Pas op:
@@ -16576,6 +16204,12 @@
\stelpapierformaatin
[A4][A4]
+\stelpapierformaatin
+ [\c!boven=,
+ \c!onder=\vss,
+ \c!links=,
+ \c!rechts=\hss]
+
\stelinterliniein
[\c!hoogte=.72,
\c!diepte=.28,
@@ -16586,6 +16220,7 @@
\stelkolommenin
[\c!n=2,
\c!commando=,
+ \c!richting=\v!rechts,
\c!lijn=\v!uit,
\c!tolerantie=\v!soepel,
\c!afstand=1.5\korpsgrootte, % influenced by switching
@@ -16887,7 +16522,7 @@
\c!linkerbreedte=\getvalue{\??tk\v!tekst\v!rand\c!breedte},
\c!rechterbreedte=\getvalue{\??tk\v!tekst\v!rand\c!breedte}]
-\stelnummeringin % na instellen hoofdteksten !
+\stelnummeringin % na instellen hoofdteksten !
[\c!variant=\v!enkelzijdig,
\c!plaats={\v!hoofd,\v!midden},
\c!conversie=\v!cijfers,
@@ -16961,19 +16596,19 @@
[\v!sub\v!sub\v!paragraaf]
[\c!sectie=\v!sectionlevel-5,
%\c!default=\v!paragraaf]
- \c!default=\v!sub\v!paragraaf] % nieuw
+ \c!default=\v!sub\v!paragraaf] % nieuw
\definieerkop
[\v!sub\v!sub\v!sub\v!paragraaf]
[\c!sectie=\v!sectionlevel-6,
%\c!default=\v!paragraaf]
- \c!default=\v!sub\v!sub\v!paragraaf] % nieuw
+ \c!default=\v!sub\v!sub\v!paragraaf] % nieuw
\definieerkop
[\v!sub\v!sub\v!sub\v!sub\v!paragraaf]
[\c!sectie=\v!sectionlevel-7,
%\c!default=\v!paragraaf]
- \c!default=\v!sub\v!sub\v!sub\v!paragraaf] % nieuw
+ \c!default=\v!sub\v!sub\v!sub\v!paragraaf] % nieuw
\definieerkop
[\v!titel]
@@ -17061,7 +16696,7 @@
\c!voor={\blanko[2*\v!groot]},
\c!na=\blanko]
-\stelkopin % nieuw
+\stelkopin % nieuw
[\v!sub\v!paragraaf]
[\c!pagina=]
@@ -17142,6 +16777,7 @@
\c!factor=0,
\c!afstand=.5em,
\c!uitlijnen=\v!normaal,
+ \c!inspringen=, % untouched if empty
\c!kleur=,
\c!letter=, % kan tzt weg
\c!marletter=\c!type, % \c! ???
@@ -17168,7 +16804,7 @@
\c!kleur=,
\c!kopkleur=,
\c!breedte=\v!passend,
- \c!tekst=\onbekend,
+ \c!tekst=\unknown,
\c!monster=,
\c!voor=\blanko,
\c!na=\blanko,
@@ -17202,12 +16838,12 @@
\stelinmargein
[\v!links]
[\c!plaats=\v!links]
-% \c!uitlijnen=\v!links] % njet
+% \c!uitlijnen=\v!links] % njet
\stelinmargein
[\v!rechts]
[\c!plaats=\v!rechts]
-% \c!uitlijnen=\v!rechts] % njet
+% \c!uitlijnen=\v!rechts] % njet
\versie
[\v!definitief]
@@ -17257,6 +16893,7 @@
\stelregelsin
[\c!voor=\blanko,
\c!na=\blanko,
+ \c!tussen=\blanko,
\c!inspringen=\v!nee]
\steldoordefinierenin
@@ -17322,10 +16959,6 @@
\stelspatieringin
[\v!opelkaar]
-\definieerregister
- [\v!index]
- [\v!indices]
-
\definieerplaatsblok
[\v!figuur]
[\v!figuren]
@@ -17393,7 +17026,7 @@
[\c!status=\c!start]
\stelachtergrondenin
- [\v!pagina,\v!linkerpagina,\v!rechterpagina]
+ [\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina]
[\c!kader=\v!uit,
\c!straal=.5\korpsgrootte,
\c!hoek=\v!recht,
@@ -17452,3 +17085,4 @@
\protect
\endinput
+
diff --git a/tex/context/base/core-01b.tex b/tex/context/base/core-01b.tex
index cecc58c08..49ffc182f 100644
--- a/tex/context/base/core-01b.tex
+++ b/tex/context/base/core-01b.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Core Macros (b)}
@@ -34,7 +34,7 @@
%I
%I Mogelijke plaatsen zijn links, rechts, onder, boven en
%I inmarge. Als breedte wordt de breedte van de totale tekst
-%I opgegeven. Het aantal is facultatief, eventueel kan er
+%I opgegeven. Het aantal is facultatief, eventueel kan er
%I 'onbekend' worden meegegeven. Uitlijnen is 'ja' of 'nee'.
%P
%I Indien gewenst, kan de instelling direkt achter \item worden
@@ -57,19 +57,19 @@
%\def\checkinterlineskip%
% {\ifvmode
-% \ifdim\lastskip>\!!zeropoint\relax
-% \nointerlineskip
-% \else\ifdim\lastkern>\!!zeropoint\relax
-% \nointerlineskip
+% \ifdim\lastskip>\!!zeropoint\relax
+% \nointerlineskip
+% \else\ifdim\lastkern>\!!zeropoint\relax
+% \nointerlineskip
% \fi\fi
% \fi}
-\def\horitems#1#2% #1=breedte #2=commandos
+\def\horitems#1#2% #1=breedte #2=commandos
{\dimen0=#1\relax
\divide\dimen0 by \nofitems
\!!counta=0\relax
\def\docommando##1%
- {\advance\!!counta by 1\relax
+ {\advance\!!counta by 1\relax
\processaction
[\@@isuitlijnen]
[ \v!links=>\hbox to \dimen0{\strut##1\hss},
@@ -78,11 +78,11 @@
\v!marge=>\ifnum\!!counta=1\hss\else\hfill\fi
\strut##1%
\ifnum\!!counta=\nofitems\hss\else\hfill\fi,
- \s!default=>\hbox to \dimen0{\hss\strut##1\hss}, % midden
+ \s!default=>\hbox to \dimen0{\hss\strut##1\hss}, % midden
\s!unknown=>\hbox to \dimen0{\strut##1\hss}]}% % links
\hbox to #1{\hss#2\hss}}
-\def\veritems#1#2% #1=breedte #2=commandos
+\def\veritems#1#2% #1=breedte #2=commandos
{\dimen0=#1\relax
\def\docommando##1%
{\ifdim\dimen0<\!!zeropoint\relax % the - was a signal
@@ -101,7 +101,7 @@
\doifdefinedelse{\??cv\@@issymbool}
{\def\doitembullet##1{\convertnumber{\@@issymbool}{##1}}}
{\doifdefined{\??ss\@@issymbool}
- {\def\doitembullet##1{\symbol[\@@issymbool]}}}}
+ {\def\doitembullet##1{\symbol[\@@issymbool]}}}}
\def\makeitemsandbullets#1%
{\doifelse{\@@isn}{\v!onbekend}
@@ -133,7 +133,7 @@
{\forgetall
\doifsomething{\@@issymbool}
{\doifnot{\@@issymbool}{\v!geen}
- {\box2
+ {\box2
\@@istussen
\nointerlineskip}}%
\box0}%
@@ -151,18 +151,18 @@
\dostopitems}
\setvalue{doitems\v!inmarge}#1%
- {\dostartitems{#1}{\veritems}{-1.5em}% - is a signal
+ {\dostartitems{#1}{\veritems}{-1.5em}% - is a signal
\noindent\hbox{\llap{\box2\hskip\linkermargeafstand}\box0}%
\dostopitems}
\setvalue{doitems\v!links}#1%
{\advance\hsize by -1.5em\relax
- \dostartitems{#1}{\veritems}{1.5em}%
+ \dostartitems{#1}{\veritems}{1.5em}%
\noindent\hbox{\box2\box0}%
\dostopitems}
\setvalue{doitems\v!rechts}#1%
- {\dostartitems{#1}{\veritems}{0em}%
+ {\dostartitems{#1}{\veritems}{0em}%
\noindent\hbox{\box0\hskip-\wd2\box2}%
\dostopitems}
@@ -180,7 +180,7 @@
{\let\@@isplaats\v!links}%
\getvalue{doitems\@@isplaats}}
-\definecomplexorsimpleempty\items
+\definecomplexorsimpleempty\items
%I n=Tabulatie (1)
%I c=\definieeralineas,\stelalineasin
@@ -196,14 +196,14 @@
%I \startnaam .... \naam .... \naam .... \stopnaam
%I
%I of (soms verwarrend):
-%I
+%I
%I \naam .... \naam .... \naam .... \naam
-%I
+%I
%I of (lekker kort):
-%I
+%I
%I \naam .... \\ .... \\ .... \\
-%I
-%I waarbij het aantal malen .... \naam of \\ gelijk is
+%I
+%I waarbij het aantal malen .... \naam of \\ gelijk is
%I aan n. Naast \naam en \\ is ook \volgendenaam toegestaan.
%P
%I Het is mogelijk per kolom een en ander in te stellen met
@@ -215,7 +215,7 @@
% Te zijner tijd [plaats=boven,onder,midden] implementeren,
% in dat geval moet eerst de maximale hoogte worden bepaald.
-%
+%
% Overigens kan een en ander mooier met \halign.
\def\dodefinieeralineas[#1][#2]%
@@ -266,7 +266,7 @@
\c!afstand=\getvalue{\??al#1\c!afstand}]}%
\stelalineasin[#1][1][\c!afstand=0em]}
-% nog monster
+% nog monster
%
%\assignwidth
% {\!!widtha}
@@ -281,7 +281,7 @@
\def\definieeralineas%
{\dodoubleargument\dodefinieeralineas}
-\def\dostelalineasin[#1][#2][#3]%
+\def\dostelalineasin[#1][#2][#3]%
{\doifelse{#2}{\v!elk}
{\dorecurse
{\getvalue{\??al#1\c!n}}
@@ -327,15 +327,15 @@
\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\steluitlijnenin\expandafter[\!!stringa]%
\edef\!!stringa{\getvalue{\??al#1\the\alteller\c!tolerantie}}% nodig?
\expandafter\steltolerantiein\expandafter[\!!stringa]%
\ignorespaces
\endgraf
\ignorespaces
- %
- % Nadeel van de onderstaande constructie is dat \everypar
- % binnen een groep kan staan en zo steeds \begstruts
+ %
+ % Nadeel van de onderstaande constructie is dat \everypar
+ % binnen een groep kan staan en zo steeds \begstruts
% worden geplaatst. Mooi is anders dus moet het anders!
%
% Hier is \Everypar niet nodig.
@@ -353,7 +353,7 @@
\fi
\getvalue{\??al#1\the\alteller\c!onder}%
\egroup
- \ifdim\wd0=\!!zeropoint % no data
+ \ifdim\wd0=\!!zeropoint % no data
\wd0=\!!widtha
\fi
\box0
@@ -434,7 +434,7 @@
\doordefinieren
[tab]
[\c!kopletter=\@@takopletter,
- \c!kopkleur=\@@takleur,
+ \c!kopkleur=\@@takleur,
\c!monster=\@@tamonster,
\c!breedte=\@@tabreedte,
\c!voor=\@@tavoor,
@@ -463,16 +463,16 @@
%I \promille promilage
%I \dollar dollar teken
%I \sterling pound sterling teken
-%I \florijn gulden teken
+%I \florijn gulden teken
-% The following macro's are derived from PPCHTEX and
-% therefore take some LaTeX font-switching into account.
+% The following macro's are derived from PPCHTEX and
+% therefore take some LaTeX font-switching into account.
\newif\ifloweredsubscripts
-% Due to some upward incompatibality of LaTeX to LaTeX2.09
-% and/or LaTeX2e we had to force \@@chemieletter. Otherwise
-% some weird \nullfont error comes up.
+% Due to some upward incompatibality of LaTeX to LaTeX2.09
+% and/or LaTeX2e we had to force \@@chemieletter. Otherwise
+% some weird \nullfont error comes up.
\doifundefined{@@chemieletter}{\def\@@chemieletter{\rm}}
@@ -533,7 +533,7 @@
{\mathematics{^\circ}}
\def\inch%
- {\hbox{\rm\char125\relax}}
+ {\hbox{\rm\char125\relax}}
\def\breuk#1#2%
{\mathematics{#1\over#2}}
@@ -562,9 +562,9 @@
\egroup}
% \definieeralineas[test][n=3]
-%
+%
% \stelalineasin[test][3][breedte=4cm,uitlijnen=links]
-%
+%
% \startopelkaar
% \test hans \\ ton \\ \bedrag{1.000,--} \\
% \test hans \\ ton \\ \bedrag{~.~~1,--} \\
@@ -619,15 +619,15 @@
% for compatibility
\def\unknown%
- {\punten[3]}
+ {\dontleavehmode\punten[3]}
-% currency
+% currency
\def\dollar%
{\bgroup
- \ifnum\fam=\itfam
- \sl
- \else\ifnum\fam=\bifam
+ \ifnum\fam=\itfam
+ \sl
+ \else\ifnum\fam=\bifam
\bs
\fi\fi
\$%
@@ -636,11 +636,11 @@
\def\sterling%
{\bgroup
\ifnum\fam=\bffam
- \bi
+ \bi
\else\ifnum\fam=\bifam
- \bi
+ \bi
\else\ifnum\fam=\bsfam
- \bi
+ \bi
\else
\it
\fi\fi\fi
@@ -650,11 +650,11 @@
\def\florijn%
{\bgroup
\ifnum\fam=\bffam
- \bi
+ \bi
\else\ifnum\fam=\bifam
- \bi
+ \bi
\else\ifnum\fam=\bsfam
- \bi
+ \bi
\else
\it
\fi\fi\fi
@@ -672,21 +672,21 @@
%I tekst
%I \stopcitaat
%I
-%I Rond de tekst worden in de marge dubbele quotes
-%I geplaatst. Ook bij dit commando kunnen tussen [] maten
+%I Rond de tekst worden in de marge dubbele quotes
+%I geplaatst. Ook bij dit commando kunnen tussen [] maten
%I worden opgegeven:
%I
%I \startcitaat[2*links,rechts]
%I
-%I In de lopende tekst kan gebruik worden gemaakt van:
+%I In de lopende tekst kan gebruik worden gemaakt van:
%I
%I \citaat{tekst}
%I \citeer{tekst}
%I
-%I Het eerste commando levert dubbele quotes en het tweede
-%I enkele quotes.
+%I Het eerste commando levert dubbele quotes en het tweede
+%I enkele quotes.
%P
-%I Er zijn twee varianten (1 en 2) beschikbaar die kunnen
+%I Er zijn twee varianten (1 en 2) beschikbaar die kunnen
%I worden ingesteld met:
%I
%I \stelciterenin
@@ -724,20 +724,32 @@
\def\startcitaat%
{\dosingleempty\dostartcitaat}
-\def\handlequotation#1%
- {\ifdim\lastkern=\quotationsignal
- \unskip
- \hskip\quotationskip
+% \def\dohandlequotation#1%
+% {\ifdim\lastkern=\quotationsignal
+% \unskip
+% \hskip\quotationskip
+% \fi
+% \strut % new, needed below
+% \getvalue{\??la\currentlanguage#1}%
+% \kern\quotationsignal}
+
+%D Better hyphenation (\prewordbreak look alike added):
+
+\def\dohandlequotation#1%
+ {\ifdim\lastskip=\quotationsignal
+ \unskip\hskip\quotationskip
\fi
+ \penalty\!!tenthousand\hskip\!!zeropoint % == \prewordbreak
+ \strut % new, needed below
\getvalue{\??la\currentlanguage#1}%
- \kern\quotationsignal}
+ \penalty\!!tenthousand\hskip\quotationsignal} % +- \prewordbreak
-\def\citaat%
+\unexpanded\def\citaat%
{\groupedcommand
- {\handlequotation\c!leftquotation}
- {\handlequotation\c!rightquotation}}
+ {\dohandlequotation\c!leftquotation}
+ {\dohandlequotation\c!rightquotation}}
-\def\citeer%
+\unexpanded\def\citeer%
{\doifelse{\@@ciletter}{\v!normaal}
{\let\next=\doquotedcite}
{\let\next=\doattributedcite}%
@@ -745,20 +757,32 @@
\def\doquotedcite%
{\groupedcommand
- {\handlequotation\c!leftquote}
- {\handlequotation\c!rightquote}}
+ {\dohandlequotation\c!leftquote}
+ {\dohandlequotation\c!rightquote}}
\def\doattributedcite%
{\groupedcommand
{\dostartattributes\??ci\c!letter\c!kleur}
{\dostopattributes}}
+
+% The previous one fails in \placefloat[left]{}{}, so instead
+% we use the next alternative, where the first one is handled
+% outside group. Watch the strut.
+
+\unexpanded\def\citaat%
+ {\dohandlequotation\c!leftquotation
+ \groupedcommand{}{\dohandlequotation\c!rightquotation}}
+
+\def\doquotedcite%
+ {\dohandlequotation\c!leftquote
+ \groupedcommand{}{\dohandlequotation\c!rightquote}}
-% Tijden horen hier niet thuis en zullen in een aparte
+% Tijden horen hier niet thuis en zullen in een aparte
% module worden ondergebracht. voorlopig handhaven we ze nog
% even. Een implementatie met \doordefinieren zou beter voldoen
-% omdat een en ander dan instelbaar wordt. Het is trouwens
-% zowieso beter het commando \tijd te reserveren voor de
-% systeemtijd.
+% omdat een en ander dan instelbaar wordt. Het is trouwens
+% zowieso beter het commando \tijd te reserveren voor de
+% systeemtijd.
% %I n=Tijden
% %I c=\tijd,\tijdspan,\activiteit
@@ -831,13 +855,13 @@
%I
%I \tekstlijn
%I \tekstlijn[onder]{}
-%I
+%I
%I Daarnaast zijn beschikbaar:
-%I
-%I \starttekstlijn{tekst}
+%I
+%I \starttekstlijn{tekst}
%I \stoptekstlijn
%I
-%I waarbij de plaats dus boven is.
+%I waarbij de plaats dus boven is.
%P
%I Een en ander kan worden ingesteld met het commando:
%I
@@ -847,7 +871,7 @@
%I De breedte heeft betrekking op de lengte van de lijn voor
%I de tekst. Mogelijke plaatsen zijn links en inmarge.
-% nog eens \definieertekstlijn
+% nog eens \definieertekstlijn
\def\steltekstlijnenin%
{\dodoubleargument\getparameters[\??tl]}
@@ -895,7 +919,7 @@
\doifelse{#1}{}
{\hrule\!!depth\linewidth\!!height\!!zeropoint}
{\docomplextekstlijn{#1}}%
- \@@tlna
+ \@@tlna
\pagina[\v!voorkeur]}
\def\complextekstlijn[#1]#2%
@@ -918,7 +942,7 @@
{\dobottomtekstlijn{}%
\egroup}
-%I n=Invullijnen
+%I n=Invullijnen
%I c=\invullijnen,\stelinvullijnenin,\invultekst
%I
%I Ten behoeve van invullijsten is het volgende commando
@@ -942,8 +966,8 @@
%I
%I \stelinvullijnenin[n=,breedte=,afstand=,letter=,voor=,
%I na=,scheider=]
-%I
-%I De afstand heeft betrekking op de afstand tussen de
+%I
+%I De afstand heeft betrekking op de afstand tussen de
%I scheider en de lijnen.
%I
%I Het volgende commando plaatst een tekst op een zelfde
@@ -965,7 +989,7 @@
{\setbox0=\hbox to \@@ilbreedte}
{\doattributes
\??il\c!letter\c!kleur
- {\strut#3\hfill
+ {\strut#3\hfill
\doifsomething{\@@ilscheider}
{\hbox spread \@@ilafstand{\@@ilscheider\hss}}}}%
\hangindent=\wd0\relax
@@ -1023,15 +1047,15 @@
\stelinvulregelsin[#1]%
\advance\rightskip by \@@ivbreedte
\parfillskip\!!zeropoint
- #2\hfill
+ #2\hfill
\dimen0=\@@ivbreedte
\advance\dimen0 by -\@@ivafstand
\rlap
{\hskip\@@ivafstand
\vrule\!!width\dimen0\!!height\linewidth}%
- \par % !
+ \par % !
\endgroup
- \par % !
+ \par % !
\@@ilna}
\definecomplexorsimpleempty\invulregel
@@ -1192,7 +1216,7 @@
%I waarbij mogelijke varianten zijn: normaal apa en normaal.
%I Nummeren kan 'ja' of 'nee' zijn; links en rechts
%I hebben betrekking op de weergave in de tekst en zijn
-%I standaard [ en ].
+%I standaard [ en ].
% Dit wordt:
%
@@ -1262,15 +1286,15 @@
\def\publicatie#1[#2]%
{\@@pblinks\in{#1}[#2]\@@pbrechts}
-%I n=Kenmerken
+%I n=Kenmerken
%I c=\kenmerk,\kenmerkdatum
%I
%I Er kan een kenmerk worden gezet met het commando:
%I
%I \kenmerk[bet=,ken=,dat=,van=,aan=,ref=]
%I
-%I waarbij de verplichte parameters staan voor 'betreft',
-%I 'kenmerk' en 'datum' en de optionele voor 'van', 'aan' en
+%I waarbij de verplichte parameters staan voor 'betreft',
+%I 'kenmerk' en 'datum' en de optionele voor 'van', 'aan' en
%I 'referentie'.
%I
%I Een kenmerk-datum kan worden gezet met het commando:
@@ -1287,56 +1311,83 @@
\def\kenmerkdatum%
{\currentdate[\v!kenmerk]}
+% \def\dokenmerk[#1]%
+% {\geenhoofdenvoetregels
+% \getparameters
+% [\??km]
+% [\c!bet=\unknown,
+% \c!dat=\unknown,
+% \c!ken=\unknown,
+% \c!van=,
+% \c!aan=,
+% \c!ref=,
+% #1]%
+% \bgroup % moet anders, hoort niet in 01b
+% \assigntranslation[nl=referentie,en=reference,du=Referenz,sp=referencia]\to\@@@kmref
+% \assigntranslation[nl=van,en=from,du=Von,sp=de]\to\@@@kmvan
+% \assigntranslation[nl=aan,en=to,du=An,sp=a]\to\@@@kmaan
+% \assigntranslation[nl=betreft,en=concerns,du=Betreff,sp=]\to\@@@kmbet
+% \assigntranslation[nl=datum,en=date,du=Datum,sp=fecha]\to\@@@kmdat
+% \assigntranslation[nl=kenmerk,en=mark,du=Kennzeichen,sp=]\to\@@@kmken
+% \doifelsenothing{\@@kmvan\@@kmaan}
+% {\def\@@dokmvanaan{}}
+% {\def\@@dokmvanaan{&\omit\cr}}%
+% \doifelsenothing{\@@kmvan}
+% {\def\@@dokmvan{}}
+% {\def\@@dokmvan{\@@@kmvan&\@@kmvan\cr}}%
+% \doifelsenothing{\@@kmaan}
+% {\def\@@dokmaan{}}
+% {\def\@@dokmaan{\@@@kmaan&\@@kmaan\cr}}%
+% \doifelsenothing{\@@kmref}
+% {\def\@@dokmref{}}
+% {\def\@@dokmref{&\omit\cr\@@@kmref&\@@kmref\cr}}%
+% \witruimte
+% \tabskip=\!!zeropoint
+% \noindent\halign
+% \bgroup
+% ##~&:~##\hfil\cr
+% \@@@kmbet&\@@kmbet\cr
+% \@@@kmdat&\@@kmdat\cr
+% \@@@kmken&\kap{\@@kmken}\cr
+% \@@dokmvanaan
+% \@@dokmvan
+% \@@dokmaan
+% \@@dokmref
+% \egroup
+% \egroup}
+
\def\dokenmerk[#1]%
{\geenhoofdenvoetregels
+ \bgroup
\getparameters
[\??km]
- [\c!bet=\onbekend,
- \c!dat=\onbekend,
- \c!ken=\onbekend,
- \c!van=,
- \c!aan=,
- \c!ref=,
- #1]%
- \bgroup % moet anders, hoort niet in 01b
- \assigntranslation[nl=referentie,en=reference,du=Referenz,sp=referencia]\to\@@@kmref
- \assigntranslation[nl=van,en=from,du=Von,sp=de]\to\@@@kmvan
- \assigntranslation[nl=aan,en=to,du=An,sp=a]\to\@@@kmaan
- \assigntranslation[nl=betreft,en=concerns,du=Betreff,sp=]\to\@@@kmbet
- \assigntranslation[nl=datum,en=date,du=Datum,sp=fecha]\to\@@@kmdat
- \assigntranslation[nl=kenmerk,en=mark,du=Kennzeichen,sp=]\to\@@@kmken
- \doifelsenothing{\@@kmvan\@@kmaan}
- {\def\@@dokmvanaan{}}
- {\def\@@dokmvanaan{&\omit\cr}}%
- \doifelsenothing{\@@kmvan}
- {\def\@@dokmvan{}}
- {\def\@@dokmvan{\@@@kmvan&\@@kmvan\cr}}%
- \doifelsenothing{\@@kmaan}
- {\def\@@dokmaan{}}
- {\def\@@dokmaan{\@@@kmaan&\@@kmaan\cr}}%
- \doifelsenothing{\@@kmref}
- {\def\@@dokmref{}}
- {\def\@@dokmref{&\omit\cr\@@@kmref&\@@kmref\cr}}%
- \witruimte
- \tabskip=\!!zeropoint
- \noindent\halign
- \bgroup
- ##~&:~##\hfil\cr
- \@@@kmbet&\@@kmbet\cr
- \@@@kmdat&\@@kmdat\cr
- \@@@kmken&\kap{\@@kmken}\cr
- \@@dokmvanaan
- \@@dokmvan
- \@@dokmaan
- \@@dokmref
- \egroup
+ [\c!bet=\unknown,\c!dat=\unknown,\c!ken=\unknown,
+ \c!van=, \c!aan=, \c!ref=, #1]%
+ % moet anders, hoort niet in 01b
+ \assigntranslation[nl=referentie,en=reference,du=Referenz, sp=referencia]\to\@@@kmref
+ \assigntranslation[nl=van, en=from, du=Von, sp=de]\to\@@@kmvan
+ \assigntranslation[nl=aan, en=to, du=An, sp=a]\to\@@@kmaan
+ \assigntranslation[nl=betreft, en=concerns, du=Betreff, sp=]\to\@@@kmbet
+ \assigntranslation[nl=datum, en=date, du=Datum, sp=fecha]\to\@@@kmdat
+ \assigntranslation[nl=kenmerk, en=mark, du=Kennzeichen,sp=]\to\@@@kmken
+ %
+ \definetabulate[\s!dummy][|le|p|]
+ \startdummy
+ \NC\@@@kmbet\NC\@@kmbet\NC\NR
+ \NC\@@@kmdat\NC\@@kmdat\NC\NR
+ \NC\@@@kmken\NC\kap{\@@kmken}\NC\NR
+ \doifsomething{\@@kmvan\@@kmaan}{\NC\NC\NC\NR}%
+ \doifsomething{\@@kmvan}{\NC\@@@kmvan\NC\@@kmvan\NC\NR}%
+ \doifsomething{\@@kmaan}{\NC\@@@kmaan\NC\@@kmaan\NC\NR}%
+ \doifsomething{\@@kmref}{\NC\NC\NC\NR\NC\@@@kmref\NC\@@kmref\NC\NR}%
+ \stopdummy
\egroup}
\def\kenmerk%
{\dosingleargument\dokenmerk}
-% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
-% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
+% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
+% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
\def\??ri{@@ri}
@@ -1373,8 +1424,8 @@
boven=,
onder=\vfill]
-% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
-% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
+% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
+% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
% Standaardinstellingen
diff --git a/tex/context/base/core-01c.tex b/tex/context/base/core-01c.tex
index 676c06539..a22e76427 100644
--- a/tex/context/base/core-01c.tex
+++ b/tex/context/base/core-01c.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Core Macros (c)}
@@ -26,6 +26,10 @@
\startmessages german library: systems
41: Externe Datei -- in Gruppe -- existiert nicht
\stopmessages
+
+\startmessages czech library: systems
+ 41: externi soubor -- ve skupine -- neexistuje
+\stopmessages
%I n=Formules+
%I c=\startlegenda,\startgegeven
@@ -53,79 +57,11 @@
%I \leg symbool \\ symbool \\ betekenis \\ dimensie \\
%I \stoplegenda
-% \newif\ifdoublelegends
-%
-% \def\legendaspacing%
-% {\hskip.5em}
-%
-% \def\dostartlegenda[#1]%
-% {\witruimte
-% \blanko
-% \bgroup
-% \doifelse{#1}{\v!twee}
-% {\doublelegendstrue
-% \let\leg=\doubleleg}
-% {\doublelegendsfalse
-% \let\leg=\singleleg}%
-% \tabskip=\!!zeropoint
-% \halign
-% \bgroup
-% \hskip\leftskip
-% $##$\hfil
-% &\hfil\legendaspacing##\legendaspacing\hfil
-% &\ifdoublelegends$##$\hfil\fi
-% &\ifdoublelegends\hfil\legendaspacing##\legendaspacing\hfil\fi
-% &##\unskip\hfil\legendaspacing\legendaspacing
-% &$\rm##$\hfill\cr}
-%
-% \def\singleleg#1\\#2\\#3\\%
-% {#1&\doifsomething{#1}{=}&
-% &&
-% #2\unskip&
-% #3\cr}
-%
-% \def\doubleleg#1\\#2\\#3\\#4\\%
-% {#1&\doifsomething{#1}{\doifnot{#1}{ }{=}}&
-% #2&\doifsomething{#2}{\doifnot{#2}{ }{=}}&
-% #3\unskip&
-% #4\cr}
-%
-% \def\startlegenda%
-% {\dosingleempty\dostartlegenda}
-%
-% \def\stoplegenda%
-% {\egroup
-% \egroup
-% \blanko}
-%
-% % tzt: \crlf == \\ \\ \leg \\ afh kolom
-%
-% \def\startgegeven%
-% {\witruimte
-% \blanko
-% \bgroup
-% \tabskip=\!!zeropoint
-% \halign
-% \bgroup
-% \hskip\leftskip##\unskip\hfil
-% &\legendaspacing\legendaspacing\hfil$##$&\hfil\legendaspacing##\legendaspacing\hfil&
-% $\rm##$\hfil\cr}
-%
-% \def\stopgegeven%
-% {\egroup
-% \egroup
-% \blanko}
-%
-% \def\geg#1\\#2\\#3\\%
-% {#1&
-% #2&=&
-% #3\cr}
-
\definetabulate
- [\e!legenda]
- [|emj1|i1|mR|]
+ [\e!legenda]
+ [|emj1|i1|mR|]
-\setuptabulate
+\setuptabulate
[\e!legenda]
[\c!eenheid=.75em,\c!binnen=\setquicktabulate\leg,EQ={=}]
@@ -134,10 +70,10 @@
[|emj1|emk1|i1|mR|]
\definetabulate
- [\e!gegeven]
- [|R|ecmj1|i1mR|]
+ [\e!gegeven]
+ [|R|ecmj1|i1mR|]
-\setuptabulate
+\setuptabulate
[\e!gegeven]
[\c!eenheid=.75em,\c!binnen=\setquicktabulate\geg,EQ={=}]
@@ -150,6 +86,137 @@
% \def\mrm#1%
% {$\rm#1$}
+%D \macros
+%D {setuplegend, placelegend}
+%D
+%D It makes sense to typeset a legend to a figure in \TEX\ and
+%D not in a drawing package. The macro \type {\placelegend}
+%D combines a figure (or something else) and its legend.
+%D
+%D \showsetup{placelegend}
+%D
+%D The legend is placed according to \type {location}, being
+%D \type {bottom} or \type {right}. The macro macro is used as
+%D follows.
+%D
+%D \starttypen
+%D \placefigure
+%D {whow}
+%D {\placelegend
+%D {\externalfigure[cow]}
+%D {\starttabulation
+%D \NC 1 \NC head \NC \NR
+%D \NC 2 \NC legs \NC \NR
+%D \NC 3 \NC tail \NC \NR
+%D \stoptabulation}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend
+%D {\externalfigure[cow]}
+%D {\starttabulation[|l|l|l|l|]
+%D \NC 1 \NC head \NC 3 \NC tail \NC \NR
+%D \NC 2 \NC legs \NC \NC \NC \NR
+%D \stoptabulation}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend[n=2]
+%D {\externalfigure[cow]}
+%D {\starttabulation
+%D \NC 1 \NC head \NC \NR
+%D \NC 2 \NC legs \NC \NR
+%D \NC 3 \NC tail \NC \NR
+%D \stoptabulation}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend[n=2]
+%D {\externalfigure[cow]}
+%D {head \par legs \par tail}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend[n=2]
+%D {\externalfigure[cow]}
+%D {\startitemize[packed]
+%D \item head \item legs \item tail \item belly \item horns
+%D \stopitemize}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend[n=2,width=.8\hsize]
+%D {\externalfigure[cow]}
+%D {\startitemize[packed]
+%D \item head \item legs \item tail \item belly \item horns
+%D \stopitemize}}
+%D \stoptypen
+%D
+%D There are a few more parameters:
+%D
+%D \showsetup{setuplegend}
+
+\def\setuplegend%
+ {\dodoubleargument\getparameters[\??ld]}
+
+\setuplegend
+ [\c!n=1,
+ \c!afstand=1em,
+ \c!tussen={\blanko[\v!middel]},
+ \c!breedte=\hsize,
+ \c!hoogte=\vsize,
+ \c!korps=,
+ \c!plaats=\v!onder]
+
+\def\placelegend%
+ {\bgroup
+ \dosingleempty\doplacelegend}
+
+\def\doplacelegend[#1]% watch the hsize/vsize tricks
+ {\setuplegend[#1]% % and don't change them
+ \dowithnextbox
+ {\switchtobodyfont[\@@ldkorps]% split under same regime
+ \scratchdimen=\wd\nextbox
+ \doifelse{\@@ldplaats}{\v!rechts}
+ {\vsize=\ht\nextbox
+ \vsize=\@@ldhoogte
+ \hsize=\zetbreedte
+ \advance\hsize by -\scratchdimen
+ \advance\hsize by -\@@ldafstand
+ \plaatsnaastelkaar{\box\nextbox}\bgroup}
+ {\hsize\scratchdimen
+ \plaatsonderelkaar{\box\nextbox}\bgroup}%
+ \hsize\@@ldbreedte
+ \doif{\@@ldplaats}{\v!rechts}{\hskip\@@ldafstand}%
+ \ifnum\@@ldn>1
+ \setrigidcolumnhsize\hsize\@@ldafstand\@@ldn
+ \fi
+ \dowithnextbox
+ {\doifelse{\@@ldplaats}{\v!rechts}
+ {\vbox to \vsize
+ {\ifnum\@@ldn>1
+ \rigidcolumnbalance\nextbox
+ \else
+ \box\nextbox
+ \fi
+ \vfill}}
+ {\vbox
+ {\@@ldtussen
+ \ifnum\@@ldn>1
+ \rigidcolumnbalance\nextbox
+ \else
+ \box\nextbox
+ \fi}}%
+ \egroup\egroup}%
+ \vbox
+ \bgroup
+ \forgetall
+ \tolerantTABLEbreaktrue % hm.
+ \blanko[\v!blokkeer]%
+ \everypar{\begstrut}%
+ \let\next=}
+ \hbox}
+
%I n=Combinaties
%I c=\startcombinatie,\stelcombinatiesin
%I
@@ -357,7 +424,7 @@
\def\plaatsondernaastelkaar#1#2%
{\bgroup
- \def\plaatsonderelkaar%
+ \def\doplaatsondernaastelkaar%
{#2\cr\omit\bgroup#2%
\aftergroup#2%
\aftergroup\cr
@@ -366,7 +433,7 @@
\let\next=}%
#1\bgroup##\cr
\omit\bgroup#2%
- \aftergroup\plaatsonderelkaar
+ \aftergroup\doplaatsondernaastelkaar
\let\next=}
\def\plaatsonderelkaar%
diff --git a/tex/context/base/core-01d.tex b/tex/context/base/core-01d.tex
index 12c7bad42..fe6a6f069 100644
--- a/tex/context/base/core-01d.tex
+++ b/tex/context/base/core-01d.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Core Macros (d)}
@@ -39,6 +39,14 @@
4: keine Seitensynchronisation (--) im hmode
\stopmessages
+\startmessages czech library: interactions
+ title: interakce
+ 1: pomer -- x -- (s x v)
+ 2: aktivni
+ 3: neaktivni
+ 4: zadna strankova synchronizace (--) v hmode
+\stopmessages
+
\startmessages dutch library: versions
title: versie
1: er mankeert een @+
@@ -59,9 +67,16 @@
2: Erstelle Seiten
3: Ausgewaehlte Seiten: --
\stopmessages
+
+\startmessages czech library: versions
+ title: verze
+ 1: postradam @+
+ 2: oznacuji se strany
+ 3: oznacene strany: --
+\stopmessages
%I n=Interacteren
-%I c=\stelinteractiein,\stelinteractiemenuin
+%I c=\setupinteraction,\stelinteractiemenuin
%I c=\definieerinteractiemenu,\startinteractiemenu
%I c=\blokkeerinteractiemenu,\geefinteractiemenuvrij
%I c=\stelinteractieschermin,\scherm
@@ -70,7 +85,7 @@
%I voor DVIWINDO en Acrobat betekenisvolle codes. De volgende
%I commando's zijn (voorlopig) beschikbaar:
%I
-%I \stelinteractiein[status=,menu=,letter=,kleur=,strut=,
+%I \setupinteraction[status=,menu=,letter=,kleur=,strut=,
%I breedte=,hoogte=,diepte=,pagina=]
%I
%I Hierbij hebben 'letter' en 'kleur' betrekking op in de tekst
@@ -127,7 +142,7 @@
%I \raw tekst \\ : ongeformatteerde tekst
%I \but[ref] tekst \\ : interactief menu item
%I \nop \\ : dummy menu item
-%I \txt tekst \\ : niet interactief menu item
+%I \txt tekst \\ : niet interactief menu item
%I \rul tekst \\ : niet interactief menu item (omlijnd)
%I \com commandos \\ : commando's
%P
@@ -199,7 +214,7 @@
{}
%\def\initializepaper%
-% {\iflocation % without screen settings
+% {\iflocation % without screen settings
% \dosetuppaper
% {\papierformaat}
% {\the\papierbreedte}
@@ -247,12 +262,13 @@
\advance\!!heighta by 2\scratchdimen}
{\doifelse{\@@schoogte}{\v!max}
{\!!heighta=\printpapierhoogte}
- {\!!heighta=\@@schoogte}}}
+ {\!!heighta=\@@schoogte}}%
+ \doif{\@@scwachttijd}{\v!geen}{\def\@@scwachttijd{0}}}
\def\complexstelinteractieschermin[#1]%
{\getparameters[\??sc][#1]%
\def\initializepaper%
- {\bgroup
+ {\bgroup
\berekeninteractiescherm
\ifdim \!!widtha>\papierbreedte \papierbreedte=\!!widtha \fi
\ifdim \!!heighta>\papierhoogte \papierhoogte=\!!heighta \fi
@@ -264,18 +280,26 @@
\def\setupinteractionscreens% met a, b en \number
{\bgroup
\berekeninteractiescherm
- \doifelse{\@@scoptie}{\v!max}
- {\doif{\@@lyplaats}{\v!midden} % werkt niet goed
- {\scratchdimen=\printpapierhoogte
- \advance\scratchdimen by -\papierhoogte
- \divide\scratchdimen by 2
- \advance\kopoffset by \scratchdimen
- \scratchdimen=\printpapierbreedte
- \advance\scratchdimen by -\papierbreedte
- \divide\scratchdimen by 2
- \advance\rugoffset by \scratchdimen}%
- \!!counte=1}
- {\!!counte=0}%
+ \processaction
+ [\@@scoptie]
+ [ \v!max=>\!!counte=1,
+ \v!bookmark=>\!!counte=2,
+ \s!unknown=>\!!counte=0,
+ \s!default=>\!!counte=0]%
+ %\doifelse{\@@scoptie}{\v!max}
+ % {%\doif{\@@lyplaats}{\v!midden} % werkt niet goed / bovendien niet gewenst
+ % % {\scratchdimen=\printpapierhoogte
+ % % \advance\scratchdimen by -\papierhoogte
+ % % \divide\scratchdimen by 2
+ % % \advance\kopoffset by \scratchdimen
+ % % \scratchdimen=\printpapierbreedte
+ % % \advance\scratchdimen by -\papierbreedte
+ % % \divide\scratchdimen by 2
+ % % \advance\rugoffset by \scratchdimen}%
+ % \!!counte=1}
+ % {\doifelse{\@@scoptie}{\v!bookmark}
+ % {\!!counte=2}
+ % {\!!counte=0}}%
\showmessage{\m!interactions}{1} % niet waterdicht
{\@EA\withoutpt\the\!!widtha,\@EA\withoutpt\the\!!heighta}%
\dosetupscreen
@@ -286,7 +310,7 @@
{\@@iatitel}
{\@@iasubtitel}
{\@@iaauteur} % The next line is not to be removed. Copyright!
- {CONTEXT / PRAGMA ADE / HASSELT NL / pragma@wxs.nl / \jobname.tex}
+ {CONTEXT / www.pragma-ade.nl / \jobname.tex}
{\@@iadatum}
\egroup}}
@@ -301,7 +325,7 @@
%D the existing list mechanisms. That way users can generate
%D bookmarks automatically, although its entirely valid to add
%D bookmarks by defining alternative ones. These will be added
-%D at the appropriate place in the list.
+%D at the appropriate place in the list.
% \hoofdstuk{het eerste hoofdstuk}
%
@@ -329,7 +353,7 @@
{\ifx\flushpostponedbookmark\relax \else
\bgroup
\convertargument#1\to\ascii
- \writestatus{system}{clashing bookmarks: \ascii}% ECHTE MESSAGE MAKEN
+ \writestatus{system}{clashing bookmarks: \ascii}% ECHTE MESSAGE MAKEN
\egroup
\fi
\gdef\flushpostponedbookmark%
@@ -380,7 +404,7 @@
{\let\dolijstelement=#2\relax
\scratchcounter=0
\def\docommando##1%
- {\advance\scratchcounter by 1
+ {\advance\scratchcounter by 1
\getlistlevel[##1]\listlevel{\the\scratchcounter}%
\setxvalue{\@@bookcount\the\scratchcounter}{1}%
\setxvalue{\@@booklevel##1}{\listlevel}}%
@@ -402,14 +426,14 @@
\bgroup
\!!counta=\previousbookmarklevel
\doloop
- {\let\bookmarktag=\empty
+ {\let\bookmarktag=\empty
\!!countb=\!!counta
\advance\!!countb by -1
- \dorecurse{\!!countb}
- {\edef\bookmarktag%
+ \dorecurse{\!!countb}
+ {\edef\bookmarktag%
{\bookmarktag\getvalue{\@@bookcount\recurselevel}:}}%
\edef\bookmarklevelcount%
- {\getvalue{\@@bookcount\the\!!counta}}%
+ {\getvalue{\@@bookcount\the\!!counta}}%
\xdef\bookmarklevellist%
{\bookmarklevellist/\bookmarktag:\bookmarklevelcount/}%
\advance\!!counta by -1
@@ -442,15 +466,15 @@
\else
\@EA\doglobal\@EA\increment\csname \@@bookcount\the\previousbookmarklevel\endcsname\relax
\fi\fi
- \let\bookmarktag=\empty
+ \let\bookmarktag=\empty
\!!countb\currentbookmarklevel
- \dorecurse{\!!countb}
- {\edef\bookmarktag%
+ \dorecurse{\!!countb}
+ {\edef\bookmarktag%
{\bookmarktag\getvalue{\@@bookcount\recurselevel}:}}%
- \getbookmarklevelcount
+ \getbookmarklevelcount
\iftracebookmarks
\bgroup
- \par
+ \par
\bookmarktag\quad
\dorecurse{\currentbookmarklevel}{\quad}\unskip#1\quad
(\bookmarklevelcount)\quad
@@ -467,18 +491,18 @@
\def\dogetbookmarkelement#1#2#3#4#5#6%
{\doifnot{#1}{\@@bookmark}
- {\dodogetbookmarkelement{#1}{#2}{#3}{#4}{#5}{#6}}}
+ {\dodogetbookmarkelement{#1}{#2}{#3}{#4}{#5}{#6}}}
\def\doputbookmarkelement#1#2#3#4#5#6%
{\doifelse{#1}{\@@bookmark}
{\localbookmark{#4}}
{\flushbookmark
- \dodoputbookmarkelement{#1}{#2}{#3}{#4}{#5}{#6}}}
+ \dodoputbookmarkelement{#1}{#2}{#3}{#4}{#5}{#6}}}
\let\flushbookmark=\relax
\let\localbookmark=\gobbleoneargument
-\def\insertsomebookmark#1#2#3#4#5%
+\def\insertsomebookmark#1#2#3#4#5%
{\gdef\flushbookmark%
{\doinsertsomebookmark{#1}{#2}{#3}{#4}{#5}{g}}%
\gdef\localbookmark##1%
@@ -487,7 +511,7 @@
\def\doinsertsomebookmark#1#2#3#4#5#6%
{\global\utilitydonetrue
\global\let\localbookmark=\gobbleoneargument
- \global\let\flushbookmark=\relax
+ \global\let\flushbookmark=\relax
\doifinstringelse{#1}{\openbookmarklist}
{\chardef\openbookmark=1}
{\chardef\openbookmark=0}%
@@ -559,12 +583,14 @@
\edef\locationboxbackground{}%
\fi
\localframed[#1]
- [\c!kader=\locationboxborder,\c!achtergrond=\locationboxbackground,#2]
+ [\c!kader=\locationboxborder,
+ \c!achtergrond=\locationboxbackground,
+ #2]
{\dolocationattributes{#1}\c!letter\c!kleur{#3}}}%
- \hbox{#4{\copy\locationbox}}}
+ \hbox{#4{\box\locationbox}}}%{\copy\locationbox}}}
\def\setlocationboxyes#1[#2]#3[#4]%
- {\ifx\currentouterreference\empty
+ {\ifx\currentouterreference\empty
\ifrealreferencepage\!!doneatrue\else\!!doneafalse\fi
%\doifelse{\currentrealreference}{\realfolio}
% {\!!doneatrue}{\!!doneafalse}%
@@ -572,7 +598,7 @@
\!!doneafalse
\fi
\if!!donea
- \ifcase\getvalue{#1\c!zelfdepagina}\relax
+ \ifcase0\getvalue{#1\c!zelfdepagina}\relax
\bgroup
\locationdummytrue
\setevalue{#1\c!kleur}{\getvalue{#1\c!contrastkleur}}%
@@ -617,7 +643,7 @@
% \unknownreference{#4}}}}
\def\setlocationbox#1[#2]#3[#4]%
- {\doifreferencepermitedelse{#4}{\getvalue{#1\c!blokkade}}
+ {\doifreferencepermittedelse{#4}{\getvalue{#1\c!blokkade}}
{\setlocationboxyes{#1}[#2]{#3}[#4]}
{\setlocationboxnop{#1}[#2]{#3}[#4]}}
@@ -670,7 +696,7 @@
\ifskippedmenuitem \else
\getvalue{\??am#1#2}%
\fi
- \egroup
+ \egroup
\ignorespaces}%
\def\raw[##1]##2\\%
{\@@amboxcommand\naarbox{\ignorespaces##2\unskip}[##1]\\}%
@@ -733,7 +759,7 @@
\vskip\getvalue{\??am#3\c!bovenoffset}%
\ht0=\!!zeropoint
\box0
- \vskip\pagebackgroundvoffset}% overbodig
+ \vskip\pagebackgroundvoffset}% overbodig
\ht0=\teksthoogte
\wd0=#2\relax
\box0
@@ -761,45 +787,49 @@
{\getvalue{\??am\c!menu#1}}
\def\horizontaalinteractiemenu#1#2#3#4%
- {\dimen2=\!!zeropoint
- \setbox0=\hbox
- {\def\docommando##1%
- {\doifnotvalue{\??am##1\c!status}{\v!geen}
- {\hskip\dimen2
- \setbox2=\hbox to #2
- {\getvalue{\??am##1#3}\interactiemenu[##1]\getvalue{\??am##1#4}}%
- \doifelsevalue{\??am##1\c!afstand}{\v!overlay}
- {\dimen2=\!!zeropoint
- \wd2=\!!zeropoint}%
- {\dimen2=\getvalue{\??am##1\c!afstand}}%
- \box2}}%
- \startinteractie
- \processcommacommand[\getvalue{\??am#1}]\docommando
- \stopinteractie}%
- \wd0=#2\relax
- \box0\relax}
+ {\ifdim#2>\!!zeropoint % new
+ \dimen2=\!!zeropoint
+ \setbox0=\hbox
+ {\def\docommando##1%
+ {\doifnotvalue{\??am##1\c!status}{\v!geen}
+ {\hskip\dimen2
+ \setbox2=\hbox to #2
+ {\getvalue{\??am##1#3}\interactiemenu[##1]\getvalue{\??am##1#4}}%
+ \doifelsevalue{\??am##1\c!afstand}{\v!overlay}
+ {\dimen2=\!!zeropoint
+ \wd2=\!!zeropoint}%
+ {\dimen2=\getvalue{\??am##1\c!afstand}}%
+ \box2}}%
+ \startinteractie
+ \processcommacommand[\getvalue{\??am#1}]\docommando
+ \stopinteractie}%
+ \wd0=#2\relax
+ \box0\relax
+ \fi}
\def\vertikaalinteractiemenu#1#2#3#4%
- {\dimen2=\!!zeropoint
- \setbox0=\vbox
- {\def\docommando##1%
- {\doifnotvalue{\??am##1\c!status}{\v!geen}
- {\vskip\dimen2
- \setbox2=\vbox to #2
- {\getvalue{\??am##1#3}\interactiemenu[##1]\getvalue{\??am##1#4}}%
- \doifelsevalue{\??am##1\c!afstand}{\v!overlay}
- {\dimen2=\!!zeropoint
- \offinterlineskip
- \dp2=\!!zeropoint
- \ht2=\!!zeropoint}%
- {\dimen2=\getvalue{\??am##1\c!afstand}}%
- \box2}}%
- \startinteractie
- \processcommacommand[\getvalue{\??am#1}]\docommando
- \stopinteractie}%
- \ht0=#2\relax
- \dp0=\!!zeropoint
- \box0\relax}
+ {\ifdim#2>\!!zeropoint % new
+ \dimen2=\!!zeropoint
+ \setbox0=\vbox
+ {\def\docommando##1%
+ {\doifnotvalue{\??am##1\c!status}{\v!geen}
+ {\vskip\dimen2
+ \setbox2=\vbox to #2
+ {\getvalue{\??am##1#3}\interactiemenu[##1]\getvalue{\??am##1#4}}%
+ \doifelsevalue{\??am##1\c!afstand}{\v!overlay}
+ {\dimen2=\!!zeropoint
+ \offinterlineskip
+ \dp2=\!!zeropoint
+ \ht2=\!!zeropoint}%
+ {\dimen2=\getvalue{\??am##1\c!afstand}}%
+ \box2}}%
+ \startinteractie
+ \processcommacommand[\getvalue{\??am#1}]\docommando
+ \stopinteractie}%
+ \ht0=#2\relax
+ \dp0=\!!zeropoint
+ \box0\relax
+ \fi}
\def\interactiemenus[#1]%
{\iflocation
@@ -1079,7 +1109,7 @@
\setvalue{synchronisatie\v!pagina}[#1]%
{\bgroup
- \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setupinteraction[\c!breedte=\!!zeropoint]%
\setbox0=\hbox
{\localframed[\??ba][]%
{\dolocationattributes\??ba\c!letter\c!kleur{\strut\@@batekst}}}%
@@ -1095,7 +1125,7 @@
%\gotodestination
% {}{#1}{\syncprefix:##1}{}
% {\hbox to \dimen0{\color[\locationcolor\@@bakleur]{\onder}}}}%
- \naarbox
+ \naarbox
{\hbox to \dimen0{\color[\locationcolor\@@bakleur]{\onder}}}%
[#1::\syncprefix:##1]}%
\hbox
@@ -1125,12 +1155,12 @@
\setvalue{synchronisatie\v!lokaal}[#1]%
{\bgroup
- \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setupinteraction[\c!breedte=\!!zeropoint]%
\def\blackrule{\hbox{\vrule\!!height.5em\!!width.5em}}%
%\gotodestination
% {}{##1}{\syncprefix:#1}{0}
% {\color[\locationcolor\@@bakleur]{\blackrule}}%
- \naarbox %
+ \naarbox %
{\color[\locationcolor\@@bakleur]{\blackrule}}%
[#1::\syncprefix:\synccounter]%
\egroup}
@@ -1194,7 +1224,7 @@
\def\interactiebalka%
{\iflocation
\bgroup
- \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setupinteraction[\c!breedte=\!!zeropoint]%
\setupblackrules[\c!hoogte=\v!max,\c!diepte=\v!max]% maten ??
\!!widthb=\@@ibbreedte\relax
\advance\!!widthb by -2.75em\relax
@@ -1297,7 +1327,7 @@
\ifnum\nofsubpages>1
\hbox
\bgroup
- \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setupinteraction[\c!breedte=\!!zeropoint]%
\ifbalksymbool % beter: 3 chars assign en 3*box
\setupsymbolset[\@@iasymboolset]%
\setbox0=\hbox{\symbol[\v!vorige]}%
@@ -1347,7 +1377,7 @@
\ifdim\!!widtha<\@@ibafstand\relax
\interactiebalkf
\else
- \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setupinteraction[\c!breedte=\!!zeropoint]%
\noindent
\hbox to \@@ibbreedte
\bgroup
@@ -1392,7 +1422,7 @@
\def\interactiebalkf% !! KAN WORDEN GECOMBINEERD MET D !!
{\iflocation\ifshowingsubpage
\ifnum\nofsubpages>1
- \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setupinteraction[\c!breedte=\!!zeropoint]%
\noindent
\hbox to \@@ibbreedte
\bgroup
@@ -1413,7 +1443,7 @@
\advance\!!countc by -2
\!!widtha=-\@@ibafstand
\!!widtha=\!!countc\!!widtha
-\advance\!!widtha by \@@ibbreedte
+\advance\!!widtha by \@@ibbreedte
\advance\!!countc by 1
\divide\!!widtha by \!!countc
\ifbalksymbool
@@ -1460,7 +1490,7 @@
\ifnum\teller=\firstsubpage\relax \!!doneatrue \fi
\ifnum\teller=\lastsubpage\relax \!!doneatrue \fi
\ifnum\teller>\!!countc \ifnum\teller<\!!countd \!!doneatrue \fi\fi
- \if!!donea
+ \if!!donea
\ifnum\teller<\realpageno
\gotox0%
\else\ifnum\teller>\realpageno
@@ -1516,7 +1546,7 @@
{\startinteractie
\processaction
[\@@ibvariant]
- [ c=>\checkinteractiebalk\v!max\v!max,
+ [ c=>\checkinteractiebalk\v!max\v!max,
d=>\checkinteractiebalk{.5em}\!!zeropoint,
e=>\checkinteractiebalk{.5em}\!!zeropoint,
f=>\checkinteractiebalk{.5em}\!!zeropoint,
@@ -1586,14 +1616,14 @@
% Als met \getpar wordt gewerkt, dan moet \next worden toegepast.
-% TZT initialisatie!
+% TZT initialisatie!
\def\profilepage{}
\let\dosetprofilepage=\relax
\let\dogetprofilepage=\relax
-\def\processprofile[#1]#2#3%
+\def\processprofile#1[#2]%
{\iflocation
\par % needed for pdftex
\bgroup
@@ -1604,12 +1634,19 @@
{\doifsomething{##1}{(##1)}}%
{\addtocommalist{##2}\processedprofiles
##1\relax
- #3{##2}{\hsize}{\profilepage}}}%
+ \ifcase#1\relax
+ \dobeginofprofile
+ {##2}
+ {\number\papierbreedte}{\number\papierhoogte}
+ {\profilepage}%
+ \else
+ \doendofprofile
+ \fi}}%
\def\processedprofiles{}%
\def\doprocessprofile##1%
{\doifelse{\@@pfoptie}{\v!test}%
{\goodbreak\blanko\nobreak\tt[\spatie
- #2 profiel\spatie ##1:\spatie
+ \ifcase#1\v!start\else\v!stop\fi profiel\spatie ##1:\spatie
\doifdefinedelse{\c!profiel!!##1}%
{\def\dodoprocessprofile####1%
{\processoneprofile
@@ -1625,7 +1662,7 @@
{\processoneprofile{}{####1}}%
\processcommacommand
[\getvalue{\c!profiel!!##1}]\dodoprocessprofile}}}%
- \processcommalist[#1]\doprocessprofile
+ \processcommalist[#2]\doprocessprofile
\egroup
\par % needed for pdftex
\fi}
@@ -1635,9 +1672,9 @@
\bgroup
\addtocommalist{#1}\actualprofile
\def\stopprofiel%
- {\processprofile[#1]\v!stop\doendofprofile
+ {\processprofile1[#1]%
\egroup}%
- \DoAfterFi\processprofile[#1]\v!start\dobeginofprofile
+ \DoAfterFi\processprofile0[#1]%
\fi}
\let\stopprofiel=\relax
@@ -1722,7 +1759,7 @@
%I
%I Een versienummer mag punten (.) bevatten. Deze worden
%I voor het vergelijken niet meegenomen. Oppassen dus: 1.10
-%I wordt 110 en 2.2 wordt 22 en moet
+%I wordt 110 en 2.2 wordt 22.
%P
%I Het is mogelijk alleen de 'recente' wijzigingen te
%I verwerken. Dit gaat in twee slagen:
@@ -1915,25 +1952,34 @@
\newif\ifrandomtransitions
\def\stelpaginaovergangenin%
- {\dosingleempty\dostelpaginaovergangenin}
-
-\def\dostelpaginaovergangenin[#1]%
- {\doglobal\newcounter\currentpagetransition
- \doifelse{#1}{\v!reset}
- {\let\setpagetransition\relax}
- {\let\setpagetransition\setsomepagetransition
- \doifinsetelse{\v!willekeurig}{#1}
- {\randomtransitionstrue}{\randomtransitionsfalse}%
- \edef\userpagetransitions{#1}%
- \@EA\removefromcommalist\@EA{\v!willekeurig}\userpagetransitions
- \ifx\userpagetransitions\empty
- \let\userpagetransitions\pagetransitions
- \fi}}
+ {\dosingleempty\dostelpaginaovergangenin}
+
+\def\dostelpaginaovergangenin[#1]%
+ {\doifelsenothing{#1}
+ {\doifnot{\@@scwachttijd}{\v!geen}
+ {\let\setpagetransition\setsomepagedelay}}
+ {\doifelse{#1}{\v!start}
+ {\doifnot{\@@scwachttijd}{\v!geen}
+ {\let\setpagetransition\setsomepagedelay}}
+ {\doglobal\newcounter\currentpagetransition
+ \doifinsetelse{#1}{\v!reset,\v!stop}
+ {\let\setpagetransition\relax}
+ {\let\setpagetransition\setsomepagetransition
+ \doifinsetelse{\v!willekeurig}{#1}
+ {\randomtransitionstrue}{\randomtransitionsfalse}%
+ \edef\userpagetransitions{#1}%
+ \@EA\removefromcommalist\@EA{\v!willekeurig}\userpagetransitions
+ \ifx\userpagetransitions\empty
+ \let\userpagetransitions\pagetransitions
+ \fi}}}}
+
+\def\setsomepagedelay%
+ {\expanded{\dosetpagetransition{0}{\@@scwachttijd}}}
\def\setsomepagetransition%
{\iflocation
\ifrandomtransitions
- \expanded{\getcommalistsize[\userpagetransitions]}%
+ \expanded{\getcommalistsize[\userpagetransitions]}%
\getrandomnumber{\currentpagetransition}{1}{\commalistsize}%
\else
\doglobal\increment\currentpagetransition
@@ -1943,10 +1989,12 @@
{\expanded{\getfromcommalist[\pagetransitions][\commalistelement]}}
{}%
\ifx\commalistelement\empty
- \doglobal\newcounter\currentpagetransition
+ \doglobal\newcounter\currentpagetransition
\setsomepagetransition
\else
- \expanded{\dosetpagetransition{\commalistelement}}%
+ \doifelse{\@@scwachttijd}{\v!geen}
+ {\expanded{\dosetpagetransition{\commalistelement}{0}}}
+ {\expanded{\dosetpagetransition{\commalistelement}{\@@scwachttijd}}}%
\fi
\fi}
@@ -2017,41 +2065,50 @@
\setvalue{\e!start\e!commentaar}% the dummy triple gobbles trailing spaces
{\dotripleempty\dostartcommentaar}
-\def\dostartcommentaar[#1][#2][#3]%
+\def\dostartcommentaar[#1][#2][#3]%
{\bgroup
+ \doifassignmentelse{#1}
+ {\getparameters[\??cc][#1]}
+ {\getparameters[\??cc][\c!titel=#1,#2]}%
+ \bgroup
\obeylines
+ \doif{\@@ccspatie}{\v!ja}{\obeyspaces}%
\long\def\docommando##1%
- {\egroup
+ {\egroup
\global\setbox\commentbox=\hbox
- {\getparameters[\??cc][#2]%
- \!!widtha=\@@ccbreedte
+ {\!!widtha=\@@ccbreedte
\!!heighta=\@@cchoogte
\doinsertcomment
- {#1}{\number\!!widtha}{\number\!!heighta}{\@@cckleur}{0}{##1}%
+ {\@@cctitel}{\number\!!widtha}{\number\!!heighta}
+ {\@@cckleur}{0}{\@@ccsymbool}{##1}%
\hskip\ifvoid\commentbox\@@ccmarge\else\@@ccafstand\fi
- \box\commentbox}}%
+ \box\commentbox
+ \egroup}}%
\grabuntil{\e!stop\e!commentaar}\docommando}
-\def\commentaar%
+\def\commentaar%
{\dodoubleempty\docommentaar}
\def\docommentaar[#1][#2]#3%
{\bgroup
- \getparameters[\??cc][#2]%
+ \doifassignmentelse{#1}
+ {\getparameters[\??cc][#1]}
+ {\getparameters[\??cc][\c!titel=#1,#2]}%
\!!widtha=\@@ccbreedte
\!!heighta=\@@cchoogte
\hbox to \!!zeropoint
{\hskip-\@@ccmarge
\raise\ht\strutbox\hbox
{\doPDFinsertcomment
- {#1}{\number\!!widtha}{\number\!!heighta}{\@@cckleur}{0}{#3}}}%
+ {\@@cctitel}{\number\!!widtha}{\number\!!heighta}
+ {\@@cckleur}{0}{\@@ccsymbool}{#3}}}%
\egroup
\ignorespaces}
% \startcommentaar
% hello beautiful\\world
% \stopcommentaar
-%
+%
% \startcommentaar[hallo]
% hello \<< \'e\'erste \>>
% beautiful
@@ -2063,14 +2120,50 @@
% beautiful
% world
% \stopcommentaar
-%
+%
% \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm]
% hello \<< \'e\'erste \>>
-%
+%
% beautiful
-%
+%
% world
% \stopcommentaar
+%
+% \startcommentaar[symbool=Balloon]
+% Do we want this kind of rubish? And, why isn't this and
+% some more features related to text annotations so poorly
+% (actually not) documented? Anyhow, by providing this
+% functionality we demonstrate that \pdfTeX\ can do it. By
+% the way, it's funny that when in Acrobat we scale up the
+% text, the symbols scale down.
+% \stopcommentaar
+
+%D \macros
+%D {registermenubuttons}
+%D
+%D A still undocumented macro that generates a clickable
+%D alphabet to a register.
+
+\def\doregistermenubuttons[#1][#2]% [menu id] [register]
+ {\bgroup
+ \ifsecondargument
+ \stelinteractiemenuin
+ [#1][\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja]%
+ \def\docommando##1%
+ {\noindent
+ \menubutton[#1]{##1}[#2:##1]%
+ \space}%
+ \else
+ \def\docommando##1%
+ {\noindent
+ \button[\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja]{##1}[#1:##1]%
+ \space}%
+ \fi
+ \handletokens abcdefghijklmnopqrstuvwxyz\with\docommando
+ \egroup}
+
+\def\registermenubuttons%
+ {\dodoubleempty\doregistermenubuttons}
\definieerinteractiemenu
[\v!rechts]
@@ -2078,7 +2171,7 @@
[\c!voor=,
\c!na=\vfil,
\c!tussen=\blanko,
- \c!afstand=\bodyfontsize, % 12pt
+ \c!afstand=\bodyfontsize, % 12pt
\c!links=\hss,
\c!rechts=\hss,
\c!breedte=\rechterrandbreedte,
@@ -2090,7 +2183,7 @@
[\c!voor=,
\c!na=\vfil,
\c!tussen=\blanko,
- \c!afstand=\bodyfontsize, % 12pt
+ \c!afstand=\bodyfontsize, % 12pt
\c!links=\hss,
\c!rechts=\hss,
\c!breedte=\linkerrandbreedte,
@@ -2102,7 +2195,7 @@
[\c!voor=\vss,
\c!na=\vss,
\c!midden=\hfil,
- \c!afstand=\bodyfontsize, % 12pt
+ \c!afstand=\bodyfontsize, % 12pt
\c!breedte=\v!passend,
\c!hoogte=\v!ruim]
@@ -2112,7 +2205,7 @@
[\c!voor=\vss,
\c!na=\vss,
\c!midden=\hfil,
- \c!afstand=\bodyfontsize, % 12pt
+ \c!afstand=\bodyfontsize, % 12pt
\c!breedte=\v!passend,
\c!hoogte=\v!ruim]
@@ -2163,10 +2256,11 @@
\c!kopoffset=\!!zeropoint,
\c!rugwit=\rugwit,
\c!kopwit=\kopwit,
- \c!optie=\c!min]
+ \c!optie=\c!min,
+ \c!wachttijd=\v!geen]
\stelbuttonsin
- [\c!status=\v!start,
+ [\c!status=\v!start,
\c!breedte=\v!passend,
\c!hoogte=\v!ruim,
\c!offset=0.25em,
@@ -2176,8 +2270,9 @@
\c!achtergrondkleur=,
\c!letter=\@@ialetter,
\c!kleur=\@@iakleur,
+ \c!contrastkleur=\@@iacontrastkleur,
\c!zelfdepagina=\v!ja,
- \c!onbekendeverwijzing=\v!leeg]
+ \c!onbekendeverwijzing=\v!ja]
\stelinteractiebalkin
[\c!status=\v!start,
@@ -2186,7 +2281,7 @@
\c!breedte=\rechterrandbreedte,
\c!hoogte=, % these are taken care
\c!diepte=, % of at calling time
- \c!afstand=.5em, % beter relateren aan breedte
+ \c!afstand=.5em, % beter relateren aan breedte
\c!stap=1,
\c!kleur=\@@iakleur,
\c!contrastkleur=\@@iacontrastkleur,
@@ -2220,10 +2315,13 @@
[\c!marge=2.5em,
\c!afstand=1em,
\c!breedte=.3\tekstbreedte,
- \c!hoogte=.2\teksthoogte,
- \c!kleur=\@@iakleur]
+ \c!hoogte=.2\teksthoogte,
+ \c!kleur=\@@iakleur,
+ \c!titel=,
+ \c!spatie=\v!nee,
+ \c!symbool=\v!normaal]
-\stelversiesin % beware, @ is made active here,
+\stelversiesin % beware, @ is made active here,
[\c!nummer=1, % therefore we set this one at the end
\c!letter=\ss,
\c!kleur=]
diff --git a/tex/context/base/core-01e.tex b/tex/context/base/core-01e.tex
index 7e3e3ff9e..afb3debef 100644
--- a/tex/context/base/core-01e.tex
+++ b/tex/context/base/core-01e.tex
@@ -8,63 +8,63 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Core Macros (e)}
\unprotect
-% \ifprocesspreviousparagraphs
+% \ifprocesspreviousparagraphs
%
% \nofskippedparagraphs
-% \paragraphnumber
-% \nofparagraphs
-%
-% \dosetparagraph
-% \doresetparagraph
-% \dobeforeparagraph
-% \doafterparagraph
-% \dobeforeskipparagraph
-% \doafterskipparagraph
-%
-% \pushparagraphs\endcommand alle alineas tot \endcommand laden
+% \paragraphnumber
+% \nofparagraphs
+%
+% \dosetparagraph
+% \doresetparagraph
+% \dobeforeparagraph
+% \doafterparagraph
+% \dobeforeskipparagraph
+% \doafterskipparagraph
+%
+% \pushparagraphs\endcommand alle alineas tot \endcommand laden
% \pushmoreparagraphs\endcommand alle alineas tot \endcommand toevoegen
-% \popparagraphs alle alineas oproepen
-% \popparagraphs[a,b,c] enkele alineas oproepen [geen]
+% \popparagraphs alle alineas oproepen
+% \popparagraphs[a,b,c] enkele alineas oproepen [geen]
%
-% tzt een optionele prefix:
+% tzt een optionele prefix:
%
-% \pushparagraphs[xxx]\endcommand alle alineas tot \endcommand laden
-% \popparagraphs[xxx] alle alineas oproepen
-% \popparagraphs[xxx][a,b,c] enkele alineas oproepen
+% \pushparagraphs[xxx]\endcommand alle alineas tot \endcommand laden
+% \popparagraphs[xxx] alle alineas oproepen
+% \popparagraphs[xxx][a,b,c] enkele alineas oproepen
%
% \numberparagraphs
% \numberparagraphlines
% \resetparagraphlines
-\newif\ifprocesspreviousparagraphs % public
-\newif\ifprocessallparagraphs % private
+\newif\ifprocesspreviousparagraphs % public
+\newif\ifprocessallparagraphs % private
-\newcounter\totalnofparagraphs % private
-\newcounter\globalparagraphnumber % private
+\newcounter\totalnofparagraphs % private
+\newcounter\globalparagraphnumber % private
\newcounter\discardedparagraphs % private
\newcounter\mostrecentparagraphtotal % public
-\let\dosetparagraph = \relax % public
-\let\doresetparagraph = \relax % public
-\let\dobeforeparagraph = \relax % public
-\let\doafterparagraph = \relax % public
-\let\dobeforeskipparagraph = \relax % public
-\let\doafterskipparagraph = \relax % public
+\let\dosetparagraph = \relax % public
+\let\doresetparagraph = \relax % public
+\let\dobeforeparagraph = \relax % public
+\let\doafterparagraph = \relax % public
+\let\dobeforeskipparagraph = \relax % public
+\let\doafterskipparagraph = \relax % public
-\def\paragraphnumber {} % public
-\def\nofparagraphs {} % public
-\def\nofskippedparagraphs {} % public
+\def\paragraphnumber {} % public
+\def\nofparagraphs {} % public
+\def\nofskippedparagraphs {} % public
-\def\paragraphprefix {paragraph} % private
+\def\paragraphprefix {paragraph} % private
-% voorlopig, wordt nog class
+% voorlopig, wordt nog class
\def\resetparagraphlines%
{\global\linenumber=1\relax}
@@ -72,14 +72,14 @@
\def\numberparagraphs% instelbaar maken en slimmer ivm breedte regelnummer !!!!!
{\processpreviousparagraphstrue
\def\dosetparagraph%
- {\bgroup
+ {\bgroup
\resetparagraphlines
\EveryPar
{\strut\inlinkermarge{\tf{\tx\paragraphnumber}\kern2em}%
\ignorespaces}}
\def\doresetparagraph%
{\resetparagraphlines
- \egroup}}
+ \egroup}}
\def\numberparagraphlines%
{\processpreviousparagraphstrue
@@ -97,13 +97,13 @@
\def\doafterskipparagraph%
{\startregelnummeren[\v!verder]}}
-\def\dopushparagraphs#1%
+\def\dopushparagraphs#1%
{\global\let\mostrecentparagraphtotal=\totalnofparagraphs
\ifx#1\undefined
\let#1=\relax
\fi
\convertargument#1\to\asciiA
- \convertargument{ }\to\asciiB % lege regel
+ \convertargument{ }\to\asciiB % lege regel
\def\dopushparagraph##1\par%
{\convertargument##1\to\asciiC
\doifelse{\asciiC}{\asciiA}
@@ -114,7 +114,7 @@
\ifnum\totalnofparagraphs>0\nofskippedparagraphs\relax
\setgvalue{\paragraphprefix\totalnofparagraphs}%
{##1}%
- \else
+ \else
\setgvalue{\paragraphprefix\totalnofparagraphs}%
{\skipparagraph##1\par}%
\fi}}%
@@ -129,20 +129,20 @@
\def\pushmoreparagraphs%
{\dopushparagraphs}
-\def\dododopopparagraph#1% no grouping, i.v.m. sidefloats
+\def\dododopopparagraph#1% no grouping, i.v.m. sidefloats
{\ifnum#1>\totalnofparagraphs\relax
\else
\let\paragraphnumber=\globalparagraphnumber
\decrement(\paragraphnumber,\discardedparagraphs)%
\dobeforeparagraph
- \ifhmode\indentation\fi\getvalue{\paragraphprefix#1}\par
+ \ifhmode\indentation\fi\getvalue{\paragraphprefix#1}\par
\doafterparagraph
\fi}
\long\def\skipparagraph#1\par%
{\doglobal\increment\discardedparagraphs
\ifprocessallparagraphs
- \dobeforeskipparagraph
+ \dobeforeskipparagraph
\ifhmode\indentation\fi#1\par
\doafterskipparagraph
\fi}
@@ -160,7 +160,7 @@
\def\processpreviousparagraphs[#1]% process previous ones
{\ifprocesspreviousparagraphs
\bgroup
- \getfromcommacommand[#1][1]% tzt snelle \..command.. testen
+ \getfromcommacommand[#1][1]% tzt snelle \..command.. testen
\let\totalnofparagraphs=\commalistelement
\decrement\totalnofparagraphs
\let\dodopopparagraph=\dodoprocessparagraph
@@ -170,7 +170,7 @@
\def\dopopparagraphs[#1]%
{\doifnotinset{#1}{\v!geen,0}
- {\dosetparagraph
+ {\dosetparagraph
\doglobal\newcounter\globalparagraphnumber
\doglobal\newcounter\discardedparagraphs
\doifelse{#1}{}
@@ -214,108 +214,108 @@
% \numberparagraphs
%
% \def\nofskippedparagraphs{1}
-%
+%
% \pushparagraphs\ThatsIt
-%
+%
% \ruledbaseline eerste eerste eerste eerste eerste eerste
% eerste eerste eerste eerste eerste eerste eerste eerste
% eerste eerste eerste eerste eerste eerste eerste eerste
% eerste eerste eerste eerste eerste eerste eerste eerste
% eerste eerste eerste eerste eerste eerste eerste eerste
-% eerste eerste eerste eerste eerste
-%
+% eerste eerste eerste eerste eerste
+%
% \ruledbaseline eerste eerste eerste eerste eerste eerste
% eerste eerste eerste eerste eerste eerste eerste eerste
% eerste eerste eerste eerste eerste eerste eerste eerste
% eerste eerste eerste eerste eerste eerste eerste eerste
% eerste eerste eerste eerste eerste eerste eerste eerste
-% eerste eerste eerste eerste eerste
-%
+% eerste eerste eerste eerste eerste
+%
% \ruledbaseline tweede tweede tweede tweede tweede tweede
% tweede tweede tweede tweede tweede tweede tweede tweede
% tweede tweede tweede tweede tweede tweede tweede tweede
% tweede tweede tweede tweede tweede tweede tweede tweede
% tweede tweede tweede tweede tweede tweede tweede tweede
% tweede tweede tweede tweede tweede tweede tweede tweede
-% tweede tweede tweede tweede tweede
-%
+% tweede tweede tweede tweede tweede
+%
% \skipparagraph \ruledbaseline skipped skipped skipped
% skipped skipped skipped skipped skipped skipped skipped
% skipped skipped skipped skipped skipped skipped skipped
-% skipped skipped
-%
+% skipped skipped
+%
% \ruledbaseline derde derde derde derde derde derde derde
% derde derde derde derde derde derde derde derde derde derde
% derde derde derde derde derde derde derde derde derde derde
% derde derde derde derde derde derde derde derde derde derde
% derde derde derde derde derde derde derde derde derde derde
-% derde derde derde derde derde derde derde derde derde derde
-%
+% derde derde derde derde derde derde derde derde derde derde
+%
% \skipparagraph \ruledbaseline skipped skipped skipped
% skipped skipped skipped skipped skipped skipped skipped
% skipped skipped skipped skipped skipped skipped skipped
-% skipped skipped skipped
-%
+% skipped skipped skipped
+%
% \ruledbaseline vierde vierde vierde vierde vierde vierde
% vierde vierde vierde vierde vierde vierde vierde vierde
% vierde vierde vierde vierde vierde vierde vierde vierde
-% vierde vierde vierde vierde
-%
+% vierde vierde vierde vierde
+%
% \ruledbaseline vijfde vijfde vijfde vijfde vijfde vijfde
% vijfde vijfde vijfde vijfde vijfde vijfde vijfde vijfde
% vijfde vijfde vijfde vijfde vijfde vijfde vijfde vijfde
% vijfde vijfde vijfde vijfde vijfde vijfde vijfde vijfde
-% vijfde vijfde vijfde
-%
+% vijfde vijfde vijfde
+%
% \skipparagraph \ruledbaseline skipped skipped skipped
% skipped skipped skipped skipped skipped skipped skipped
% skipped skipped skipped skipped skipped skipped skipped
-% skipped skipped skipped
-%
+% skipped skipped skipped
+%
% \ThatsIt
-%
+%
% \popparagraphs
-%
+%
% \countparagraphs
-%
+%
% \blanko[2*groot]
-%
+%
% nofparagraphs:~\nofparagraphs
-%
-% \pagina
-%
+%
+% \pagina
+%
% \popparagraphs[1]
% \popparagraphs[2]
% \popparagraphs[3]
% \popparagraphs[4]
% \popparagraphs[5]
-%
-% \pagina
-%
+%
+% \pagina
+%
% \ruledvbox{\popparagraphs[1,2,3,4,5]}
-%
-% \pagina
+%
+% \pagina
-% PAS OP: VERVALLEN
-%
+% PAS OP: VERVALLEN
+%
% \newif\ifprocesspreviousparagraphs
% \newif\ifprocessallparagraphs
-%
+%
% \newcounter\nofskippedparagraphs
% \newcounter\nofmidskippedparagraphs
-%
+%
% \def\alineanummer {}
-%
+%
% \newcounter\nofalineas
-%
-% \def\laadalineas#1% alinea = class
+%
+% \def\laadalineas#1% alinea = class
% {\doglobal\newcounter\nofalineas
% \doglobal\decrement(\nofalineas,\nofskippedparagraphs)%
% \ifx#1\undefined
% \let#1=\relax
% \fi
% \convertargument#1\to\asciiA
-% \convertargument{ }\to\asciiB % lege regel
+% \convertargument{ }\to\asciiB % lege regel
% \def\dolaadalinea##1\par%
% {\convertargument##1\to\asciiC
% \doifelse{\asciiC}{\asciiA}
@@ -327,15 +327,15 @@
% \let\next=\dolaadalinea}
% \next}%
% \dolaadalinea}
-%
-% % De constructie \edef\alineanummer{#1} is nodig voor
-% % bijvoorbeeld:
-% %
+%
+% % De constructie \edef\alineanummer{#1} is nodig voor
+% % bijvoorbeeld:
+% %
% % \EveryPar{\strut\inlinker{\alineanummer}}
% %
-% % Laten we dit weg, dan wordt het vorige nummer gebruikt.
-%
-% \def\dododohaalalinea#1% geen grouping, i.v.m. sidefloats
+% % Laten we dit weg, dan wordt het vorige nummer gebruikt.
+%
+% \def\dododohaalalinea#1% geen grouping, i.v.m. sidefloats
% {\edef\localalineanummer{#1}%
% \ifnum\localalineanummer>\nofalineas\relax
% \else
@@ -345,30 +345,30 @@
% \else
% \let\alineanummer=\empty
% \fi
-% \dopreparagraph
-% \doeveryparagraph\getvalue{alinea\localalineanummer}\par
-% \dopostparagraph
+% \dopreparagraph
+% \doeveryparagraph\getvalue{alinea\localalineanummer}\par
+% \dopostparagraph
% \fi}
-%
+%
% \long\def\geenalinea#1\par%
% {\ifprocessallparagraphs
% \let\alineanummer=\relax
-% \dopostparagraph % fool around a bit
+% \dopostparagraph % fool around a bit
% #1\par
-% \dopreparagraph % ugly but effective
+% \dopreparagraph % ugly but effective
% \fi
% \doglobal\increment\nofmidskippedparagraphs}
-%
+%
% \def\dodohaalalinea%
% {\dododohaalalinea}
-%
+%
% \def\dodoverwerkalinea#1%
% {\ifprocesspreviousparagraphs
% \bgroup
% \setbox0=\vbox{\dododohaalalinea{#1}}%
% \egroup
% \fi}
-%
+%
% \def\verwerkvorigealineas[#1]% process previous ones
% {\ifprocesspreviousparagraphs
% \bgroup
@@ -379,16 +379,16 @@
% \haalalineas
% \egroup
% \fi}
-%
+%
% \let \dosetparagraph = \relax
% \let \doresetparagraph = \relax
% \let \dopreparagraph = \relax
% \let \dopostparagraph = \relax
% \let \doeveryparagraph = \relax
-%
+%
% \def\dohaalalineas[#1]%
% {\doifnotinset{#1}{\v!geen,0}
-% {\dosetparagraph
+% {\dosetparagraph
% \doglobal\newcounter\globalalineanummer
% \doglobal\newcounter\nofmidskippedparagraphs
% \doifelse{#1}{}
@@ -399,7 +399,7 @@
% {\doglobal\increment\globalalineanummer
% \ifnum\globalalineanummer>\nofalineas\relax
% \let\dohaalalinea=\relax
-% \else
+% \else
% \ifprocessallparagraphs
% \dodohaalalinea\globalalineanummer
% \else
@@ -413,7 +413,7 @@
% \dohaalalinea}%
% \dohaalalinea
% \doresetparagraph}}
-%
+%
% \def\haalalineas%
% {\dosingleempty\dohaalalineas}
diff --git a/tex/context/base/core-02a.tex b/tex/context/base/core-02a.tex
index 13068c72f..b7f9ac411 100644
--- a/tex/context/base/core-02a.tex
+++ b/tex/context/base/core-02a.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Extra Macros (a)}
@@ -35,24 +35,31 @@
2: Haupbestand --
3: Nebenbestand --
\stopmessages
+
+\startmessages czech library: addresses
+ title: adresy
+ 1: --
+ 2: primarni baze --
+ 3: sekundarni baze --
+\stopmessages
%I n=Kontakten
%I c=\laadkontakten
-%I
-%I De onderstaande commando's werken samen met het programma
+%I
+%I De onderstaande commando's werken samen met het programma
%I TeXAdres.
%I
-%I \laadkontakten[naam,groep,...]
+%I \laadkontakten[naam,groep,...]
%I
-%I Dit commando doorzoekt eerst de file 'texadres.tao' en
+%I Dit commando doorzoekt eerst de file 'texadres.tao' en
%I vervolgens de file 'texadres.tae' op naam en groep. Bij
-%I elk gevonden adres (naam of groepslid) wordt het commando
-%I \doemetkontakt{logisch} aangeroepen.
+%I elk gevonden adres (naam of groepslid) wordt het commando
+%I \doemetkontakt{logisch} aangeroepen.
%I
%I De waarden van de verschillende velden zijn op te roepen met
-%I het commando \kontaktwaarde{veldnaam}. Let op: het in
-%I bijvoorbeeld een adres opgenomen commando \\ moet men zelf
-%I definieren, bijvoorbeeld: \def\\{\endgraf}.
+%I het commando \kontaktwaarde{veldnaam}. Let op: het in
+%I bijvoorbeeld een adres opgenomen commando \\ moet men zelf
+%I definieren, bijvoorbeeld: \def\\{\endgraf}.
%P
%I TeXAdres zet alle files op een gebied met de extensie 'tai'
%I om in een file met de extensie 'tao' of 'tae'. Een invoerfile
@@ -67,12 +74,12 @@
%I \...{...}
%I \postadres{...}
%I \eindvankontakt{...}
-%P
-%I De invoerfile bevat zowel definities van kontakten als van
-%I groepen.
-%I
+%P
+%I De invoerfile bevat zowel definities van kontakten als van
+%I groepen.
+%I
%I Een kontakt wordt als volgt gedefinieerd:
-%I
+%I
%I < kontakt >
%I
%I [ logisch ] hagenj
@@ -86,26 +93,26 @@
%I [ info ] ach ja
%P
%I Een groep wordt als volgt gedefinieerd:
-%I
+%I
%I < groep >
%I
-%I [ logisch ] werkgroep
+%I [ logisch ] werkgroep
%I [ naam ]
%I [ lid ] ottenaf
%I [ lid ] hagenj
%I [ lid ] jonkerj
%I [ lid ] marlecvan
-% In eerste instantie leek het werken met % voor te skippen
-% regels mij een aardige oplossing. Echter, het opslurpen van
-% een heel blok tot \eindvankontakt gaat net zo snel.
-%
-% Hoewel het mechanisme inmiddels uitstekend is te combineren
-% met het tekstblok-mechanisme, wordt vooralsnog deze snelle
-% variant gebruikt.
+% In eerste instantie leek het werken met % voor te skippen
+% regels mij een aardige oplossing. Echter, het opslurpen van
+% een heel blok tot \eindvankontakt gaat net zo snel.
%
-% Om conflicten te voorkomen met reeds gedefinieerde commando's,
-% zoals \naam, wordt enkele malen \bgroup..\egroup gebruikt.
+% Hoewel het mechanisme inmiddels uitstekend is te combineren
+% met het tekstblok-mechanisme, wordt vooralsnog deze snelle
+% variant gebruikt.
+%
+% Om conflicten te voorkomen met reeds gedefinieerde commando's,
+% zoals \naam, wordt enkele malen \bgroup..\egroup gebruikt.
\newevery \everykontakt \EveryKontakt
@@ -136,7 +143,7 @@
\resetkontaktwaarde}
\def\skipkontakt%
- {\long\def\next##1\eindvankontakt%
+ {\long\def\next##1\eindvankontakt%
{\def\next####1{\egroup}\next}%
\next}
@@ -152,7 +159,7 @@
\kontaktoktrue}
{\kontaktokfalse}%
\def\checkkontakt##1%
- {\rawdoifinsetelse{##1}{\gevraagdekontakten}{\kontaktoktrue}{}}%
+ {\rawdoifinsetelse{##1}{\gevraagdekontakten}{\kontaktoktrue}{}}%
\def\lidvangroep##1%
{\doifsomething{##1}
{\rawprocesscommalist[##1]\checkkontakt}%
@@ -175,12 +182,12 @@
\else
\let\next=\relax
\fi
- \fi
+ \fi
\next}%
\def\eindvankontakt##1%
{\relax
- \egroup
- \the\everykontakt
+ \egroup
+ \the\everykontakt
\doemetkontakt{##1}}%
\showmessage{\m!addresses}{1}{\gevraagdekontakten}%
\readsysfile{texadres.tao}{\showmessage{\m!addresses}{2}{(tao)}}{\relax}%
diff --git a/tex/context/base/core-02b.tex b/tex/context/base/core-02b.tex
index e1acabf34..52428d1ed 100644
--- a/tex/context/base/core-02b.tex
+++ b/tex/context/base/core-02b.tex
@@ -8,17 +8,17 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Extra Macros (b)}
\unprotect
-%I n=Karakters
+%I n=Karakters
%I
-%I Het is mogelijk bij het definieren van tabellen gebruik
-%I te maken van speciale karakters:
+%I Het is mogelijk bij het definieren van tabellen gebruik
+%I te maken van speciale karakters:
%I
%I \starttabel[|l|c|r|]
%I ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿
@@ -33,12 +33,12 @@
%I
%I Eventueel kunnen \starttabel en \stoptabel worden weggelaten.
%P
-%I Naast \hoog en \laag kunnen (ook in de wiskunde-mode) de
+%I Naast \hoog en \laag kunnen (ook in de wiskunde-mode) de
%I karakters  en  worden gebruikt: m2, x{23} enz.
%P
%I De volgende hoge ascii-karakters worden vertaald:
%I
-%I Ÿ bedrag geen haakjes nodig, wel spaties
+%I Ÿ bedrag geen haakjes nodig, wel spaties
\newcount\row
\newcount\columns
@@ -125,15 +125,15 @@
% \catcode`\Ú=\@@active \defÚ{\firstrow\firstcolumn}
% \catcode`\Ã=\@@active \defÃ{\lastrow}
% \catcode`\À=\@@active \defÀ{\lastrow}
-%
+%
% \catcode`\¿=\@@active \def¿{\nextcolumn}
% \catcode`\´=\@@active \def´{}
% \catcode`\Ù=\@@active \defÙ{\endoftable}
-%
+%
% \catcode`\Â=\@@active \defÂ{\nextcolumn}
% \catcode`\Å=\@@active \defÅ{}
% \catcode`\Á=\@@active \defÁ{}
-%
+%
% \catcode`\³=\@@active \def³{\beginoftable\nextrow}
% \catcode`\Ä=\@@active \defÄ{}
@@ -142,7 +142,7 @@
\catcode`\À=\@@active \defÀ{\ifprocessingverbatim{ }\else\lastrow\fi}
\catcode`\¿=\@@active \def¿{\ifprocessingverbatim{ }\else\nextcolumn\fi}
-\catcode`\´=\@@active \def´{\ifprocessingverbatim\char`|\else\fi}
+\catcode`\´=\@@active \def´{\ifprocessingverbatim\char`|\else\fi}
\catcode`\Ù=\@@active \defÙ{\ifprocessingverbatim{ }\else\endoftable\fi}%
\catcode`\Â=\@@active \defÂ{\ifprocessingverbatim\char`-\else\nextcolumn\fi}
@@ -150,7 +150,7 @@
\catcode`\Á=\@@active \defÁ{\ifprocessingverbatim\char`-\else\fi}
\catcode`\³=\@@active \def³{\ifprocessingverbatim\char`|\else\beginoftable\nextrow\fi}
-\catcode`\Ä=\@@active \defÄ{\ifprocessingverbatim\char`-\else\fi}
+\catcode`\Ä=\@@active \defÄ{\ifprocessingverbatim\char`-\else\fi}
\catcode`\=\@@active
\catcode`\=\@@active
diff --git a/tex/context/base/core-02d.tex b/tex/context/base/core-02d.tex
index 5123057f0..d667a8079 100644
--- a/tex/context/base/core-02d.tex
+++ b/tex/context/base/core-02d.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Extra Macros (d)}
@@ -22,8 +22,8 @@
{\getparameters
[\??fp#1]
[\c!file=#1,
- \c!voor=,
- \c!na=,
+ \c!voor=,
+ \c!na=,
#2]%
\setvalue{\e!start#1}{\dostartfilegroep[#1]}}
@@ -37,10 +37,10 @@
\@EA\dolaadfilegroep\@EA[\!!stringa]%
\getvalue{\e!start#1#2}}
-\def\dolaadfilegroep[#1-#2#3#4#5]%
+\def\dolaadfilegroep[#1-#2#3#4#5]%
{\readsysfile{#1-#2#3#4}{}{}}
-\def\dostopfilegroep[#1][#2]%
+\def\dostopfilegroep[#1][#2]%
{\getvalue{\e!stop#1#2}%
\getvalue{\??fp#1\c!na}}
diff --git a/tex/context/base/core-con.tex b/tex/context/base/core-con.tex
index bc90481e6..7acd94912 100644
--- a/tex/context/base/core-con.tex
+++ b/tex/context/base/core-con.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Core Macros / Conversion Macros}
@@ -17,7 +17,7 @@
%D This module deals with all kind of conversions from numbers
%D and dates. I considered splitting this module in a support
-%D one and a core one, but to keep things simple as well as
+%D one and a core one, but to keep things simple as well as
%D preserve the overview, I decided against splitting.
%D \macros
@@ -27,8 +27,8 @@
%D \TEX\ primitive \type{\number}. The uppercase alternative is
%D only there for compatibility with the other conversion
%D macros. We could do without \type{#1} but this way we get
-%D rid of unwanted braces. For the savety we also define a
-%D non||sence uppercase alternative.
+%D rid of unwanted braces. For the savety we also define a
+%D non||sence uppercase alternative.
%D
%D \showsetup{\y!numbers}
@@ -61,15 +61,15 @@
%D \macros
%D {character,Character}
%D
-%D Converting a number into a character can of course only
-%D be done with numbers less or equal to~26. At the cost of
+%D Converting a number into a character can of course only
+%D be done with numbers less or equal to~26. At the cost of
%D much more macros a faster conversion is possible, using:
-%D
+%D
%D \starttypen
%D \setvalue{char1}{a} \def\character#1{\getvalue{char#1}}
%D \stoptypen
-%D
-%D But we prefer a simpel \type{\case}.
+%D
+%D But we prefer a simpel \type{\case}.
%D
%D \showsetup{\y!character}
%D \showsetup{\y!Character}
@@ -77,7 +77,7 @@
\def\unknowncharacter{-} % else in lists \relax
\def\character#1%
- {\ifcase#1\unknowncharacter
+ {\ifcase#1\unknowncharacter
\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m%
\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z%
\else
@@ -85,7 +85,7 @@
\fi}
\def\Character#1%
- {\ifcase#1\unknowncharacter
+ {\ifcase#1\unknowncharacter
\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or K\or L\or M%
\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or Y\or Z%
\else
@@ -94,17 +94,17 @@
%D \macros
%D {characters,Characters}
-%D
+%D
%D Converting large numbers is supported by the next two
%D macros. This time we just count on: $\cdots$~x, y, z, aa,
-%D ab, ac~$\cdots$.
-%D
+%D ab, ac~$\cdots$.
+%D
%D \showsetup{\y!characters}
%D \showsetup{\y!Characters}
-\def\doconvertcharacters#1#2%
- {\ifnum#2>26
- \bgroup
+\def\doconvertcharacters#1#2%
+ {\ifnum#2>26
+ \bgroup
\!!counta=#2
\ifnum\!!counta>0
\advance\!!counta by -1
@@ -131,47 +131,47 @@
%D \macros
%D {greeknumerals,Greeknumerals}
%D
-%D Why should we only honour the romans, and not the greek?
+%D Why should we only honour the romans, and not the greek?
\def\greeknumerals#1% watch the \normalxi
{\mathematics
- {\ifcase#1\unknowncharacter\or
- \alpha\or\beta\or\gamma\or\delta\or\varepsilon\or
+ {\ifcase#1\unknowncharacter\or
+ \alpha\or\beta\or\gamma\or\delta\or\varepsilon\or
\zeta\or\eta\or\theta\or\iota\or\kappa\or\lambda\or
\mu\or\nu\or\normalxi\or o\or\pi\or\varrho\or\sigma\or
\tau\or\upsilon\or\phi\or\chi\or\psi\or\omega
\else
- \unknowncharacter
+ \unknowncharacter
\fi}}
\def\Greeknumerals#1%
{\mathematics
{\ifcase#1\unknowncharacter \or
- A\or B\or\Gamma\or\Delta\or E\or Z\or H\or\Theta\or
- I\or K\or\Lambda\or M\or N\or\Xi\or O\or\Pi\or P\or
+ A\or B\or\Gamma\or\Delta\or E\or Z\or H\or\Theta\or
+ I\or K\or\Lambda\or M\or N\or\Xi\or O\or\Pi\or P\or
\Sigma\or T\or\Upsilon\or\Phi\or X\or\Psi\or\Omega
\else
- \unknowncharacter
+ \unknowncharacter
\fi}}
%D \macros
%D {protectconversion}
%D
-%D The previous two commands are not robust enough to be
-%D passed to \type{\write} en \type{\message}. That's why we
+%D The previous two commands are not robust enough to be
+%D passed to \type{\write} en \type{\message}. That's why we
%D introduce:
\def\protectconversion%
- {\def\doconvertcharacters##1{##1}} % was \relax
- %{\def\doconvertcharacters##1{\ifcase0##1 0\else##1\fi}} more save
+ {\def\doconvertcharacters##1{##1}} % was \relax
+ %{\def\doconvertcharacters##1{\ifcase0##1 0\else##1\fi}} more save
%D \macros
%D {normaltime,normalyear,normalmonth,normalday}
-%D
+%D
%D The last part of this module is dedicated to converting
%D dates. Because we want to use as meaningful commands as
%D possible, and because \TEX\ already uses up some of those,
-%D we save the original meanings.
+%D we save the original meanings.
\let\normaltime = \time
\let\normalyear = \year
@@ -181,15 +181,15 @@
%D \macros
%D {month,MONTH}
%D
-%D Converting the month number into a month name is done
-%D using a case statement, abstact values and the label
+%D Converting the month number into a month name is done
+%D using a case statement, abstact values and the label
%D mechanism. This way users can easily redefine a label from
-%D for instance german into austrian.
-%D
+%D for instance german into austrian.
+%D
%D \starttypen
%D \setuplabeltext [de] [january=J\"anner]
%D \stoptypen
-%D
+%D
%D Anyhow, the conversion looks like:
\def\doconvertmonth#1%
@@ -215,17 +215,17 @@
%D out that it would be handy to convert to the day of the
%D week. In doing so, we have to calculate the total number of
%D days, taking leapyears into account. For those who are
-%D curious:
-%D
+%D curious:
+%D
%D \startopsomming[opelkaar]
%D \som years that can be divided by 4 are leapyears
-%D \som exept years that can be divided by 100
+%D \som exept years that can be divided by 100
%D \som unless years can be divided by 400
%D \stopopsomming
-%D
+%D
%D This makes the year 1900 into a normal year and 1996 and
%D 2000 into leap years, right? Well, converting to string
-%D looks familiar:
+%D looks familiar:
\def\doconvertday#1%
{\labeltext
@@ -235,18 +235,18 @@
%D \macros
%D {getdayoftheweek, dayoftheweek}
-%D
+%D
%D The conversion algoritm is an old one and a translation from
-%D a procedure written in MODULA~2 back in the 80's. I finaly
+%D a procedure written in MODULA~2 back in the 80's. I finaly
%D found the 4--100-400 rules in some enclopedia. Look at this
-%D messy low level routine that takes the day, month and year
+%D messy low level routine that takes the day, month and year
%D as arguments:
\newcount\normalweekday
\def\getdayoftheweek#1#2#3%
{\bgroup
- \!!counta=\ifcase#2\relax
+ \!!counta=\ifcase#2\relax
0\or 0\or 31\or 59\or 90\or120\or151\or
181\or212\or243\or273\or304\or334\or365\fi
\advance\!!counta by #1\relax
@@ -285,35 +285,35 @@
{\getdayoftheweek{#1}{#2}{#3}\doconvertday{\normalweekday}}
%D Using this macro in
-%D
+%D
%D \startbuffer
-%D monday: \dayoftheweek {4} {5} {1992}
-%D friday: \dayoftheweek {16} {6} {1995}
-%D monday: \dayoftheweek {25} {8} {1997}
-%D saturday: \dayoftheweek {30} {8} {1997}
-%D tuesday: \dayoftheweek {2} {1} {1996}
-%D tuesday: \dayoftheweek {7} {1} {1997}
-%D tuesday: \dayoftheweek {13} {1} {1998}
-%D friday: \dayoftheweek {1} {1} {2000}
+%D monday: \dayoftheweek {4} {5} {1992}
+%D friday: \dayoftheweek {16} {6} {1995}
+%D monday: \dayoftheweek {25} {8} {1997}
+%D saturday: \dayoftheweek {30} {8} {1997}
+%D tuesday: \dayoftheweek {2} {1} {1996}
+%D tuesday: \dayoftheweek {7} {1} {1997}
+%D tuesday: \dayoftheweek {13} {1} {1998}
+%D friday: \dayoftheweek {1} {1} {2000}
%D \stopbuffer
-%D
-%D \typebuffer
-%D
+%D
+%D \typebuffer
+%D
%D gives
-%D
+%D
%D \startvoorbeeld
%D \startregels
%D \haalbuffer
%D \stopregels
%D \stopvoorbeeld
-%D
-%D The macro \type {\getdayoftheweek} can be used to calculate
+%D
+%D The macro \type {\getdayoftheweek} can be used to calculate
%D the number \type {\normalweekday}.
%D \macros
%D {weekday,WEEKDAY}
%D
-%D The first one is sort of redundant. It takes the day
+%D The first one is sort of redundant. It takes the day
%D number argument.
%D
%D \showsetup{\y!weekday}
@@ -329,7 +329,7 @@
%D {weekoftheday}
%D
%D {\em not yet implemented:}
-%D
+%D
%D \starttypen
%D \def\weekoftheday#1#2#3%
%D {}
@@ -339,20 +339,20 @@
%D {doifleapyearelse,
%D getdayspermonth}
%D
-%D Sometimes we need to know if we're dealing with a
+%D Sometimes we need to know if we're dealing with a
%D leapyear, so here is a testmacro:
%D
%D \starttypen
%D \doifleapyearelse{year}{yes}{no}
%D \stoptypen
%D
-%D An example of its use can be seen in the macro
-%D
+%D An example of its use can be seen in the macro
+%D
%D \starttypen
%D \getdayspermonth{year}{month}
%D \stoptypen
%D
-%D The number of days is available in the macro \type
+%D The number of days is available in the macro \type
%D {\numberofdays}.
\def\doifleapyearelse#1#2#3%
@@ -367,9 +367,9 @@
\ifnum\!!countb=0 \!!doneatrue \fi
\fi
\if!!donea
- \egroup\def\next{#2}%
+ \egroup\def\next{#2}%
\else
- \egroup\def\next{#3}%
+ \egroup\def\next{#3}%
\fi
\next}
@@ -379,45 +379,45 @@
{\def\numberofdays{28}}%
\edef\numberofdays%
{\ifcase#2 \or31\or\numberofdays\or31\or30\or
- 31\or30\or31\or31\or30\or31\or30\or31\fi}}
+ 31\or30\or31\or31\or30\or31\or30\or31\fi}}
%D \macros
%D {currentdate, date}
-%D
-%D We use these conversion macros in the date formatting
-%D macro:
-%D
+%D
+%D We use these conversion macros in the date formatting
+%D macro:
+%D
%D \showsetup{\y!currentdate}
-%D
-%D This macro takes care of proper spacing and delivers for
-%D instance:
-%D
+%D
+%D This macro takes care of proper spacing and delivers for
+%D instance:
+%D
%D \startbuffer
%D \currentdate[weekdag,dag,maand,jaar] % still dutch example
%D \currentdate[WEEKDAG,dag,MAAND,jaar] % still dutch example
%D \stopbuffer
-%D
+%D
%D \startvoorbeeld
%D \startregels
%D \haalbuffer
%D \stopregels
%D \stopvoorbeeld
-%D
+%D
%D depending of course on the keywords. Here we gave:
-%D
-%D \typebuffer
-%D
+%D
+%D \typebuffer
+%D
%D If needed one can also add non||keywords, like in
-%D
+%D
%D \startbuffer
%D \currentdate[dd,--,mm,--,yy]
%D \stopbuffer
-%D
+%D
%D \typebuffer
-%D
+%D
%D or typeset: \haalbuffer.
%D
-%D When no argument is passed, the current date is given as
+%D When no argument is passed, the current date is given as
%D specified per language (using \type{\installlanguage}).
%D
%D \showsetup{\y!currentdate}
@@ -428,13 +428,13 @@
%D \date[d=12,m=12,y=1998]
%D \stopbuffer
%D
-%D We can also typeset arbitrary dates, using the previous
-%D command.
+%D We can also typeset arbitrary dates, using the previous
+%D command.
%D
%D \typebyffer
%D
-%D The date is specified by one character keys. When no date
-%D is given, we get the current date.
+%D The date is specified by one character keys. When no date
+%D is given, we get the current date.
%D
%D \startregels
%D \haalbuffer
@@ -461,7 +461,7 @@
\v!MAAND=>\betweendates\MONTH\normalmonth,
\v!jaar=>\betweendates\the\normalyear,
\v!weekdag=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear,
- \v!WEEKDAG=>\betweendates
+ \v!WEEKDAG=>\betweendates
\bgroup
\let\labeltext=\LABELTEXT
\dayoftheweek\normalday\normalmonth\normalyear
@@ -497,16 +497,16 @@
%D Because we're dealing with dates, we also introduce a few
%D day loops:
-%D
+%D
%D \starttypen
-%D \processmonth{year}{month}{command}
+%D \processmonth{year}{month}{command}
%D \processyear{year}{command}{before}{after}
%D \stoptypen
-%D
-%D The counters \type {\normalyear}, \type {\normalmonth} and
-%D \type{\normalday} can be used for for date manipulations.
-
-\long\def\processmonth#1#2#3% year month command
+%D
+%D The counters \type {\normalyear}, \type {\normalmonth} and
+%D \type{\normalday} can be used for for date manipulations.
+
+\long\def\processmonth#1#2#3% year month command
{\bgroup
\getdayspermonth{#1}{#2}%
\dostepwiserecurse{1}{\numberofdays}{1}
@@ -516,9 +516,9 @@
#3}%
\egroup}
-\def\lastmonth{12} % can be set to e.g. 1 when testing
+\def\lastmonth{12} % can be set to e.g. 1 when testing
-\long\def\processyear#1#2#3#4% year command before after
+\long\def\processyear#1#2#3#4% year command before after
{\bgroup
\dorecurse{\lastmonth}
{\normalyear =#1\relax
@@ -527,18 +527,18 @@
\egroup}
%D \macros
-%D {defineconversion, convertnumber}
+%D {defineconversion, convertnumber}
%D
-%D Conversion involves the macros that we implemented earlier
-%D in this module.
+%D Conversion involves the macros that we implemented earlier
+%D in this module.
%D
-%D \showsetup{\y!defineconversion}
-%D \showsetup{\y!convertnumber}
+%D \showsetup{\y!defineconversion}
+%D \showsetup{\y!convertnumber}
%D
%D We can feed this command with conversion macros as well as
-%D a set of conversion symbols. Both need a bit different
+%D a set of conversion symbols. Both need a bit different
%D treatment.
-%D
+%D
%D \starttypen
%D \defineconversion [roman] [\romannumerals]
%D \defineconversion [set 1] [$\star$,$\bullet$,$\ast$]
@@ -563,10 +563,10 @@
\def\doifconversiondefinedelse#1%
{\doifdefinedelse{\??cv#1}}
-%D As longs as symbols are linked to levels or numbers, we can
-%D also use the conversion mechanism, but in for instance the
-%D itemization macros, we prefer symbols because they can more
-%D easier be (partially) redefined. Symbols are implemented
+%D As longs as symbols are linked to levels or numbers, we can
+%D also use the conversion mechanism, but in for instance the
+%D itemization macros, we prefer symbols because they can more
+%D easier be (partially) redefined. Symbols are implemented
%D in another module.
\defineconversion [] [\numbers] % the default conversion
@@ -604,35 +604,66 @@
\defineconversion [\v!grieks] [\greeknumerals]
\defineconversion [\v!Grieks] [\Greeknumerals]
-% Some bonus ones:
+% Some bonus ones:
\defineconversion [\v!leeg] [\gobbleoneargument]
\defineconversion [\v!geen] [\numbers]
-\defineconversion
- [set 0]
- [{\symbool[1]},{\symbool[2]},{\symbool[3]},{\symbool[4]},
- {\symbool[5]},{\symbool[6]},{\symbool[7]},{\symbool[8]}]
-
-\defineconversion
+\defineconversion
+ [set 0]
+ [{\symbol[bullet]},
+ {\symbol[dash]},
+ {\symbol[star]},
+ {\symbol[triangle]},
+ {\symbol[circle]},
+ {\symbol[medcircle]},
+ {\symbol[bigcircle]},
+ {\symbol[square]}]
+
+\defineconversion
[set 1]
- [$\star$,$\star\star$,$\star\star\star$,
- $\ddagger$,$\ddagger\ddagger$,$\ddagger\ddagger\ddagger$,
- $\ast$,$\ast\ast$,$\ast\ast\ast$]
-
-\defineconversion
- [set 2]
- [$*$,$\dag$,$\ddag$,
- $**$,$\dag\dag$,$\ddag\ddag$,
- $***$,$\dag\dag\dag,$\ddag\ddag\ddag$]
-
-\defineconversion
- [set 3]
- [$\star$,$\star\star$,$\star\star\star$,
- $\ddagger$,$\ddagger\ddagger$,
- $\P$,$\P\P$,
- $\S$,$\S\S$,
- $\ast$,$\ast\ast$]
+ [\mathematics{\star},
+ \mathematics{\star\star},
+ \mathematics{\star\star\star},
+ \mathematics{\ddagger},
+ \mathematics{\ddagger\ddagger},
+ \mathematics{\ddagger\ddagger\ddagger},
+ \mathematics{\ast},
+ \mathematics{\ast\ast},
+ \mathematics{\ast\ast\ast}]
+
+\defineconversion
+ [set 2]
+ [\mathematics{*},
+ \mathematics{\dag},
+ \mathematics{\ddag},
+ \mathematics{**},
+ \mathematics{\dag\dag},
+ \mathematics{\ddag\ddag},
+ \mathematics{***},
+ \mathematics{\dag\dag\dag},
+ \mathematics{\ddag\ddag\ddag},
+ \mathematics{****},
+ \mathematics{\dag\dag\dag\dag},
+ \mathematics{\ddag\ddag\ddag\ddag}]
+
+\defineconversion
+ [set 3]
+ [\mathematics{\star},
+ \mathematics{\star\star},
+ \mathematics{\star\star\star},
+ \mathematics{\ddagger},
+ \mathematics{\ddagger\ddagger},
+ \mathematics{\ddagger\ddagger\ddagger},
+ \mathematics{\P},
+ \mathematics{\P\P},
+ \mathematics{\P\P\P},
+ \mathematics{\S},
+ \mathematics{\S\S},
+ \mathematics{\S\S\S},
+ \mathematics{\ast},
+ \mathematics{\ast\ast},
+ \mathematics{\ast\ast\ast}]
\protect
diff --git a/tex/context/base/core-dat.tex b/tex/context/base/core-dat.tex
new file mode 100644
index 000000000..b9f9b594c
--- /dev/null
+++ b/tex/context/base/core-dat.tex
@@ -0,0 +1,254 @@
+%D \module
+%D [ file=core-dat, % was core-02a,
+%D version=1999.08.10, % 1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Database Support, % 2A
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Database Support}
+
+\startmessages dutch library: databases
+ title: database
+ 1: --
+ 2: lokaal bestand --
+ 3: globaal bestand --
+ 4: onbekend bestand --
+\stopmessages
+
+\startmessages english library: databases
+ title: databases
+ 1: --
+ 2: local file --
+ 3: global file --
+ 4: unknown file --
+\stopmessages
+
+\startmessages german library: databases
+ title: Datenbank
+ 1: --
+ 2: lokale Datei --
+ 3: globale Datei --
+ 4: unbekannte Datei --
+\stopmessages
+
+\unprotect
+
+%D This module is a (limited) rewrite of the original \type
+%D {core-02a} module, the module that dealt with managing a
+%D database of addresses. The principles and methods have not
+%D changed; they are only generalized.
+%D
+%D A database file |<|in most cases such a base is generated
+%D from another one|>| is structured as follows:
+%D
+%D \starttyping
+%D \startrecord{tag}
+%D \memberofgroup{grouplist}
+%D \setrecordentry{name}{...}
+%D ....
+%D \stoprecord
+%D \stoptyping
+%D
+%D The interface to such a database is defined as follows:
+%D
+%D \starttyping
+%D \definerecord[class][settings]
+%D \setuprecord[class][settings]
+%D \definerecordentry[class][name]
+%D \stoptyping
+%D
+%D and processed by
+%D
+%D \starttyping
+%D \processrecords[file list][tag and/or group list]
+%D \stoptyping
+%D
+%D The actual processing is done by a macro assigned to \type
+%D {command}:
+%D
+%D \starttyping
+%D \setuprecord[class][command=\DoWithRecord]
+%D \stoptyping
+%D
+%D Given that one can ask for a field with
+%D
+%D \starttyping
+%D \getrecordentry{name}
+%D \stoptyping
+%D
+%D such a command can look like:
+%D
+%D \starttyping
+%D \def\DoWithRecord#1%
+%D {\startpacked
+%D \let\\=\quad
+%D name: \getrecordentry{name}~\getrecordentry{family name}\par
+%D address: \getrecordentry{postal address}\par
+%D \stoppacked}
+%D \stoptyping
+%D
+%D The argument passed is the tag. The database can look like:
+%D
+%D \starttyping
+%D \startrecord{hagenj}
+%D \memberofgroup{a,b}
+%D \setrecordentry{naam}{Hans}
+%D \setrecordentry{family name}{Hagen}
+%D \setrecordentry{postal address}{J. Hagen\\Ridderstraat 29\\Hasselt NL}
+%D \stoprecord
+%D
+%D \startrecord{ottenaf}
+%D \memberofgroup{a}
+%D \setrecordentry{name}{Ton}
+%D \setrecordentry{family name}{Otten}
+%D \setrecordentry{postal address}{A.F. Otten\\Prinsengracht 17\\Hasselt NL}
+%D \stoprecord
+%D \stoptyping
+%D
+%D The definition of this database looks like:
+%D
+%D \starttyping
+%D \definerecord[address][command=\DoWithRecord]
+%D
+%D \definerecordentry[address][name]
+%D \definerecordentry[address][family name]
+%D \definerecordentry[address][postal address]
+%D \stoptyping
+%D
+%D The actual processing is now done by (for instance):
+%D
+%D \starttyping
+%D \processrecords[datafile][hagenj]
+%D \processrecords[datafile][hagenj,offenaf]
+%D \processrecords[datafile][all]
+%D \processrecords[datafile][a]
+%D \processrecords[datafile][b]
+%D \stoptyping
+%D
+%D Of course one can reassing the command used to handle the
+%D records in between.
+
+% \??kt ->
+% \??kw ->
+
+\def\??db {@@db}
+\def\c!velden{velden}
+
+%\newevery \everyrecord \EveryRecord
+
+\def\definerecord%
+ {\dodoubleempty\dodefinerecord}
+
+\def\dodefinerecord[#1][#2]%
+ {\getparameters
+ [\??db#1]
+ [\c!velden=,
+ \c!commando=\gobbleoneargument,
+ #2]}
+
+\def\setuprecord%
+ {\dodoubleargument\dosetuprecord}
+
+\def\dosetuprecord[#1][#2]%
+ {\getparameters[\??db#1][#2]}%
+
+\def\definerecordentry[#1][#2]%
+ {\edef\recordentries{\getvalue{\??db#1\c!velden}}%
+ \addtocommalist{#2}\recordentries
+ \letvalue{\??db#1\c!velden}\recordentries}
+
+%D Watch out: the entries are defined global! While
+%D processing a record, no grouping is applied.
+
+\def\getrecordentry #1{\getvalue{\??db:#1}}
+\def\resetrecordentry #1{\global\letvalue{\??db:#1}\empty}
+\def\assignrecordentry#1{\setgvalue{\??db:#1}}
+
+\long\def\skiprecord#1\stoprecord%
+ {\egroup}
+
+\newif\ifrecordok
+
+\newtoks\resetrecordlist
+
+\def\processrecords%
+ {\dotripleargument\doprocessrecords}
+
+\def\doprocessrecords[#1][#2][#3]%
+ {\bgroup
+ \ifx\\\undefined\let\\\relax\fi
+ \def\docommando##1%
+ {\resetrecordentry{##1}%
+ \appendtoks\resetrecordentry{##1}\to\resetrecordlist}%
+ \processcommacommand[\getvalue{\??db#1\c!velden}]\docommando
+ \let\setrecordentry\skiprecord
+ \the\resetrecordlist
+ \doifelse{#2}{\v!alles} % 't Is nu eenmaal alles
+ {\recordoktrue}
+ {\doifelsenothing{#2} % of niets
+ {\recordoktrue}
+ {\recordokfalse}}% % zullen we maar zeggen.
+ \ifrecordok
+ \let\askedrecords\v!alles
+ \else
+ \makerawcommalist[#2]\askedrecords
+ \fi
+ \def\checkrecord##1%
+ {\rawdoifinsetelse{##1}{\askedrecords}{\recordoktrue}{}}%
+ \def\presetrecord##1%
+ {\let\setrecordentry\assignrecordentry
+ \let\memberofgroup\gobbleoneargument
+ \the\resetrecordlist
+ \def\stoprecord{\dostoprecord{##1}}}%
+ \def\memberofgroup##1%
+ {\doifsomething{##1}
+ {\rawprocesscommalist[##1]\checkrecord}%
+ \ifrecordok
+ \presetrecord{##1}%
+ \else
+ \expandafter\skiprecord
+ \fi}%
+ \def\startrecord##1%
+ {\bgroup
+ \ifrecordok
+ \presetrecord{##1}%
+ \else
+ \checkrecord{##1}%
+ \ifrecordok
+ \presetrecord{##1}%
+ \fi
+ \fi}%
+ \def\dostoprecord##1%
+ {\relax
+ \egroup
+ %\the\everyrecord
+ \getvalue{\??db#1\c!commando}{##1}}%
+ \showmessage{\m!databases}{1}{\askedrecords}%
+ \def\doprocessrecords##1%
+ {\readjobfile{##1}
+ {\showmessage{\m!databases}{2}{(job)}}
+ {\readsysfile{##1}
+ {\showmessage{\m!databases}{3}{(sys)}}
+ {\showmessage{\m!databases}{4}{}}}}%
+ \processcommalist[#3]\doprocessrecords
+ \egroup}
+
+%D While writing the original implementation, I did some
+%D experiments with \type {%} before each entry and changing
+%D the category code of the comment char. Because \TEX\ scans
+%D the line anyway |<|this is needed because the end of line
+%D character can be non standard|> this is not faster.
+%D
+%D Although this mechanism could have been combined with the
+%D block moving mechaism, the current implementation is
+%D prefered out of speed reasons.
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex
index 801683dca..5ae559434 100644
--- a/tex/context/base/core-fig.tex
+++ b/tex/context/base/core-fig.tex
@@ -8,15 +8,15 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Core Macros / Figure Inclusion}
\unprotect
% figurefilemode checken
-% zowieso alles checken
+% zowieso alles checken
% movie scanner
%D Scanning for illustrations is automated to the max. Right
@@ -28,7 +28,7 @@
%D \PDFTEX\ started offering \PDF\ inclusion, I felt the need
%D to automate dimension detection to a higher degree.
%D Fortunately \TEXUTIL\ can scan more types now as well as
-%D that we can run \TEXUTIL\ from within \TEX.
+%D that we can run \TEXUTIL\ from within \TEX.
\startmessages dutch library: figures
title: figuren
@@ -56,33 +56,44 @@
9: suffix -- by figure -- is not handled
\stopmessages
-% TOBIAS: watch my funny german extensions
-
\startmessages german library: figures
- title: figures
+ title: Abbildungen
1: Abbildung -- kann nicht gefunden werden
2: Abbildung -- wird nicht erstellt
- 3: Dimensionen von -- genomen von --
- 4: Dimensionen von -- geladen von Abbildungsdatei selbst
- 5: Dimensionen von -- geladen von Abbildungsdatei --
+ 3: Dimensionen von -- uebernommen von --
+ 4: Dimensionen von -- geladen aus der Abbildungsdatei selbst
+ 5: Dimensionen von -- geladen aus Abbildungsdatei --
6: Dimensionen von -- ausgerechnet durch TeXUtil
- 7: Sie brauchen eine neu Abbildungsdatei -- zu erstellen
- 8: Abbildungobject -- ist herbraucht
- 9: suffix -- by figure -- is not handled
+ 7: Sie muessen eine neue Abbildungsdatei -- erstellen
+ 8: Abbildungobjekt -- wurde wiederverwandt
+ 9: Dateiendung -- der Abbildung -- wird nicht unterstuetzt
+\stopmessages
+
+\startmessages czech library: figures
+ title: obrazy
+ 1: obraz -- nelze nalezt
+ 2: obraz -- nepritomen
+ 3: dimenze obrazu -- vypujceny od --
+ 4: dimenze obrazu -- nacteny primo z jeho souboru
+ 5: dimenze obrazu -- nacteny ze souboru obrazu --
+ 6: dimenze obrazu -- spocteny programem TeXUtil
+ 7: musite znovu vygenerovat soubor obrazu --
+ 8: obrazovy objekt -- je znovu pouzit
+ 9: pripona -- obrazu -- neni uvazovana
\stopmessages
-%D Due to the mere fact that \DVI/\PDF\ drivers differ in their
+%D Due to the mere fact that \DVI|/|\PDF\ drivers differ in their
%D needs for figure dimensions, we have to provide the width,
%D height, horizontal and vertical scale. Also we want to
-%D specify at the user level either width and/or height, scale,
+%D specify at the user level either width and|/|or height, scale,
%D or a factor related to the current document bodyfont size.
%D Even better: we can also specify isometric scaling and
%D automatically let \CONTEXT\ calculate the maximum possible
%D dimensions. Whatever we calculate, the results will come
-%D available in the next registers.
+%D available in the next registers.
-\newcount \figxsca
-\newcount \figysca
+\newcount \figxsca
+\newcount \figysca
\newdimen \fighei
\newdimen \figwid
@@ -93,67 +104,67 @@
%D such a file, and, as a last resort, trying to use the
%D dimensions. Now when things do not work out the way we want,
%D we can set a switch and get some information on what takes
-%D place.
+%D place.
\newif\iftraceexternalfigures % \traceexternalfigurestrue
\let\traceexternalfigures \traceexternalfigurestrue
-%D Another switch tells \CONTEXT\ to locate and calculate a
-%D figure, but does not actually insert it. Especially when we
-%D use \PDFTEX\ this saves a lot of time on trialruns. (Keep
+%D Another switch tells \CONTEXT\ to locate and calculate a
+%D figure, but does not actually insert it. Especially when we
+%D use \PDFTEX\ this saves a lot of time on trialruns. (Keep
%D in mind that \PDFTEX\ is both a \TEX\ pre|| and postcessor.)
\newif\ifskipexternalfigures % \skipexternalfigurestrue
-%D A last switch inhibits running \TEXUTIL. Lets do it when
-%D possible.
+%D A last switch inhibits running \TEXUTIL. Lets do it when
+%D possible.
\newif\ifrunutilityfile % \runutilityfiletrue
%D When I ever decide to change the format of the figure
%D directory file that \TEXUTIL\ produces, the next number
-%D needs to be changed.
+%D needs to be changed.
\edef\figureversion{1996.06.01}
%D We keep track of the current state by setting a variable
%D which value is related to the method that provided the
-%D dimensions.
+%D dimensions.
\chardef\figurefilemode=0
-%D The next values are set:
-%D
+%D The next values are set:
+%D
%D \startopsomming[opelkaar]
%D \sym 0 the dimensions are not found
-%D \sym 1 the dimensions are not preset at all
+%D \sym 1 the dimensions are not preset at all
%D \sym 2 the dimensions are taken from other
%D \sym 3 the dimensions are taken from figure
%D \sym 4 the dimensions are taken from texutil.tuf
%D \sym 5 the dimensions are generated by texutil.tmp
%D \stopopsomming
%D
-%D In our search for the right file, that is, when no
-%D filetype is specified, we scan for the next set of files.
-%D As one can see, we prefer outlines over bitmaps.
+%D In our search for the right file, that is, when no
+%D filetype is specified, we scan for the next set of files.
+%D As one can see, we prefer outlines over bitmaps.
\def\figuretypes%
- {\c!eps,\c!mps,\c!pdf,\c!png,\c!jpg,\c!tif} % ,\c!tex,\c!tmp} % \c!mov
+ {\c!eps,\c!mps,\c!pdf,\c!png,\c!jpg,\c!tif} % ,\c!tex,\c!tmp} % \c!mov
%D Instead of using a comma separated list, we could have use a
%D faster alternative, but the current implementation is not
-%D that slow either.
+%D that slow either.
%D
-%D Sorry for those who want to understand every bit, but I
-%D will only sparse comment on the next macros. These macros
+%D Sorry for those who want to understand every bit, but I
+%D will only sparse comment on the next macros. These macros
%D evolved out of the original macros and thereby lost all of
-%D their beauty.
+%D their beauty.
%D
%D We save the progess state in a macro. The main reason for
%D this is that otherwise the log would end up intermingled
%D with \TEX's hard coded file loading messages and launching
-%D \TEXUTIL.
+%D \TEXUTIL.
\def\@@eftrace#1%
{\iftraceexternalfigures
@@ -177,7 +188,7 @@
%D file, or using \TEXUTIL\ directly, we revert to the second
%D method, and make a pass over all utility files. The last
%D method scans the utility files for files with the same name,
-%D but different type.
+%D but different type.
\def\doanalyzefigurefiles#1%
{\let\dodododoanalyzefigurefiles=#1%
@@ -189,35 +200,38 @@
\processcommacommand[\@@ex@@gebied]\dododoanalyzefigurefiles
\fi}
-\def\dododoanalyzefigurefiles#1%
+\def\dododoanalyzefigurefiles#1%
{\ifcase\figurestatus
\def\@@efcurrentpath{#1}%
+\sanitizefilename#1\to\@@efcurrentpath
\doiffileinsertionsupportedelse{\@@efcurrenttype}
{\edef\@@efcurrentfile%
- {\@@efcurrentpath/\@@effilename.\figureextension{\@@efcurrenttype}}%
+ {\@@efcurrentpath\f!pathseparator\@@effilename.\figureextension{\@@efcurrenttype}}%
\dodododoanalyzefigurefiles}
{}%
\fi}
%D Here is our first method: we scan the file directly, parse
%D the utility file next, and finaly run \TEXUTIL. The latter
-%D two of course only take place when the first scan fails.
+%D two of course only take place when the first scan fails.
\def\doanalyzefigurefilesA%
{\doiffileelse{\@@efcurrentfile}
- {\getfiguredimensionsA
+ {\getfiguredimensionsA
\getfiguredimensionsB
\getfiguredimensionsC}
{}}
%D It is possible to let \TEX\ determine the dimensions itself.
%D The next macro shows how such a test is implemented. The
-%D special driver \type {supp-tpd} shows some more.
+%D special driver \type {supp-tpd} shows some more.
-%D The check on extension prevente problems when drivers are
+%D The check on extension prevents problems when drivers are
%D not loaded well, in which case the tex one comes first.
+%D
+%D Should be a special!
-\def\dogetfiguresizetex#1#2#3#4#5%
+\def\dogetfiguresizetex#1#2#3#4#5#6% file pagina ...
{\ifx\@@efextension\c!tex \else \ifx\@@efextension\c!tmp \else
\doifnumberelse{\@@efextension}
{\executedfalse}
@@ -226,32 +240,37 @@
\fi \fi
\ifexecuted
\global\setbox\foundexternalfigure=\vbox
- {\forgetall
+ {\insidefloattrue
+ \forgetall
+ \blanko[\v!blokkeer] % niet meer weg !
\startreadingfile
\readfile{#1}{}{}%
- \stopreadingfile}%
- \global\setbox\foundexternalfigure=\hbox
+ \stopreadingfile
+ \endgraf
+ \removelastskip}%
+ \global\setbox\foundexternalfigure=\hbox
{\raise\dp\foundexternalfigure\box\foundexternalfigure}%
- #2=\!!zeropoint
#3=\!!zeropoint
- #4=\wd\foundexternalfigure
- #5=\ht\foundexternalfigure
+ #4=\!!zeropoint
+ #5=\wd\foundexternalfigure
+ #6=\ht\foundexternalfigure
\fi}
\let\dogetfiguresizetmp\dogetfiguresizetex
-%D Here we start scanning the other types:
-
+%D Here we start scanning the other types:
+
\def\getfiguredimensionsA%
{\ifcase\figurestatus
\@@eftrace{analyzing \@@efcurrentfile\space as \@@efcurrenttype}%
\!!widthb=\!!zeropoint
- \executeifdefined{dogetfiguresize\@@efcurrenttype}\gobblefivearguments
- {\@@efcurrentfile}{\!!widtha}{\!!heighta}{\!!widthb}{\!!heightb}%
-% new from here
+ \executeifdefined{dogetfiguresize\@@efcurrenttype}\gobblesixarguments
+ {\@@efcurrentfile}{\@@efpagina}%
+ {\!!widtha}{\!!heighta}{\!!widthb}{\!!heightb}%
+% new from here
\ifdim\!!widtha=\!!zeropoint\relax\ifdim\!!heighta=\!!zeropoint\relax
\ifdim\!!widthb=\!!zeropoint\relax\ifdim\!!heightb=\!!zeropoint\relax
- \executedfalse % nothing decent found
+ \executedfalse % nothing decent found
\fi\fi
\fi\fi
\ifexecuted\ifx\@@efcurrenttype\c!mps\ifcase\EPScreator
@@ -263,7 +282,7 @@
\ifx\@@efcurrenttype\c!eps
\ifcase\EPScreator
\@@eftrace{found}%
- \else
+ \else
\let\@@efcurrenttype\c!mps
\@@eftrace{mps found}%
\fi
@@ -281,13 +300,18 @@
\fi
\fi}
-\def\dogetfiguresizepdf{\dogetPDFmediabox}
-\def\dogetfiguresizeeps{\dogetEPSboundingbox}
-\def\dogetfiguresizemps{\dogetEPSboundingbox}
+\def\dogetfiguresizepdf#1#2#3#4#5#6%
+ {\dogetPDFmediabox{#1}{#3}{#4}{#5}{#6}}
+
+\def\dogetfiguresizeeps#1#2#3#4#5#6%
+ {\dogetEPSboundingbox{#1}{#3}{#4}{#5}{#6}}
+
+\def\dogetfiguresizemps%
+ {\dogetfiguresizeeps}
\def\getfiguredimensionsB%
{\ifcase\figurestatus\ifcase\figurefilemode\else
- \def\@@efloadname{\@@efcurrentpath/\@@exfile}%
+ \def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}%
\edef\@@effilenametype{\@@effilename.\@@efcurrenttype}%
\@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}%
\pushendofline
@@ -311,19 +335,21 @@
\def\getfiguredimensionsC%
{\ifcase\figurestatus\ifrunutilityfile\ifcase\figurefilemode\else
- \doiffileelse{\@@efcurrentfile}
- {\edef\@@effilenametype{\@@effilename.\@@efcurrenttype}%
- \@@eftrace{running texutil on \@@effilenametype}%
- \def\@@efloadname{\f!utilityfilename.\f!temporaryextension}%
- \executesystemcommand
- {texutil --fig --out=\@@efloadname\space\@@effilenametype}%
- \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}%
- \pushendofline
- \let\presetfigure=\presetfigureB
- \readsetfile{.}{\@@efloadname}\relax\relax
- \popendofline
- \@@eftrace{\ifcase\figurestatus not \fi found}}
- {}%
+ \ifx\@@efcurrenttype\c!tex\else
+ \doiffileelse{\@@efcurrentfile}
+ {\edef\@@effilenametype{\@@effilename.\@@efcurrenttype}%
+ \@@eftrace{running texutil on \@@effilenametype}%
+ \def\@@efloadname{\f!utilityfilename.\f!temporaryextension}%
+ \executesystemcommand
+ {texutil --fig --out=\@@efloadname\space\@@effilenametype}%
+ \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}%
+ \pushendofline
+ \let\presetfigure=\presetfigureB
+ \readsetfile{.}{\@@efloadname}\relax\relax
+ \popendofline
+ \@@eftrace{\ifcase\figurestatus not \fi found}}
+ {}%
+ \fi
\fi\fi\fi}
\def\presetfigureB[#1][#2]%
@@ -333,11 +359,11 @@
\let\@@effullname\@@efcurrentfile}
%D The second pass over types and directories uses the
-%D utilility files.
+%D utilility files.
\def\doanalyzefigurefilesB%
- {\ifcase\figurestatus\ifcase\figurefilemode\else
- \def\@@efloadname{\@@efcurrentpath/\@@exfile}%
+ {\ifcase\figurestatus\ifcase\figurefilemode\else
+ \def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}%
\edef\@@effilenametype{\@@effilename.\figureextension{\@@efcurrenttype}}%
\@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}%
\pushendofline
@@ -360,11 +386,11 @@
\fi}
%D The last and third pass mainly differs from the second in
-%D being more tolerant.
+%D being more tolerant.
\def\doanalyzefigurefilesC%
{\ifcase\figurestatus\ifcase\figurefilemode\else
- \def\@@efloadname{\@@efcurrentpath/\@@exfile}%
+ \def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}%
\@@eftrace{analyzing \@@efloadname\space on \@@effilename.* surrogate}%
\pushendofline
\let\presetfigure=\presetfigureD
@@ -389,7 +415,7 @@
%D While loading the utlity file (often \type {texutil.tuf})
%D the next command (when present) aborts reading when the
-%D versions don't match.
+%D versions don't match.
\def\thisisfigureversion#1%
{\doifnot{\figureversion}{#1}
@@ -401,7 +427,7 @@
%D specified width and height reflect the right aspect ratio.
%D Nevertheless, when one does not want any scanning done, one
%D can disable \type{preset}. When no preset is needed, we only
-%D locate the file.
+%D locate the file.
\def\locatepresetfigurefiles%
{\processcommacommand[\@@eftype]\dolocatepresetfigurefiles}
@@ -414,7 +440,7 @@
{\ifcase\figurestatus
\doiffileinsertionsupportedelse{\@@efcurrenttype}
{\edef\@@efcurrentfile%
- {#1/\@@effilename.\figureextension{\@@efcurrenttype}}%
+ {#1\f!pathseparator\@@effilename.\figureextension{\@@efcurrenttype}}%
\@@eftrace{only searching for \@@efcurrentfile}%
\doiffileelse{\@@efcurrentfile}
{\chardef\figurestatus=1
@@ -425,17 +451,17 @@
\fi}
%D All these macros are in some way called by the macro \type
-%D {\analyzefigurefiles}, which in turn is called by the next
-%D macro.
+%D {\analyzefigurefiles}, which in turn is called by the next
+%D macro.
-% bools gebruiken
+% bools gebruiken
\def\setnaturalfiguresize%
{\doifsomething{\@@efbreedte}
{\figwid=\@@efbreedte}%
- \doifsomething{\@@efhoogte}
- {\fighei=\@@efhoogte}%
- \doifsomething{\@@efschaal}
+ \doifsomething{\@@efhoogte}
+ {\fighei=\@@efhoogte}%
+ \doifsomething{\@@efschaal}
{\figxsca=\@@efschaal
\figysca=\@@efschaal}}
@@ -515,7 +541,7 @@
{\scratchcounter=3 }
{\doifelsenothing{\@@exfile}
{\scratchcounter=3 }
- {\scratchcounter=0
+ {\scratchcounter=0
\ExpandBothAfter\doifinset{\v!lokaal}{\@@explaats}
{\advance\scratchcounter by 1 }%
\ExpandBothAfter\doifinset{\v!globaal}{\@@explaats}
@@ -603,11 +629,26 @@
\ifx\@@efbreedte\empty\def\@@breedte{4cm}\fi
\ifx\@@efhoogte \empty\def\@@hoogte {3cm}\fi}
+% The page number (frame) is passed as first option.
+
+\newcounter\forcedMPSobject % better something \every<type>
+
+%D We have arrived at one of the main macros, the one that
+%D tries to analyze the figure, preloads it when possible, and
+%D scales is according to the specifications. This macro is
+%D quite unreadable, for which I appologize. The main
+%D complication is that we have to catch all kind of border
+%D cases, like \METAPOST\ graphics and buffers.
+
\def\calculateexternalfigure[#1][#2][#3][#4][#5][#6]%
{\mindermeldingen
\global\setbox\foundexternalfigure=\box\voidb@x
\beforesplitstring#3\at.\to\@@effilename
\aftersplitstring #3\at.\to\@@efextension
+\doifelse{\@@effilename}{mprun}
+ {\edef\@@effilepref{\bufferprefix}}
+ {\let \@@effilepref\empty}%
+\edef\@@effilename{\@@effilepref\@@effilename}%
\restorecatcodes % recently added; we presume local use
\def\@@eflabel{#2}%
\global\let\externalfigurelog\empty
@@ -620,24 +661,34 @@
\getparameters
[\??ef]
[\c!type=\s!unknown,\c!methode=\@@eftype,\c!symbool=\v!nee,
- \c!object=\@@exobject,\c!preset=\v!ja,\c!preview=\v!nee,
- \c!schaal=,\c!breedte=,\c!hoogte=,
+ \c!object=\@@exobject,\c!preset=\v!ja,
+ \c!pagina=0,\c!preview=\v!nee,\c!herhaal=\v!nee,
+ \c!schaal=,\c!breedte=,\c!hoogte=,\c!scherm=,
\c!factor=,\c!hfactor=,\c!bfactor=,
\c!achtergrond=,\c!achtergrondkleur=,\c!achtergrondraster=\@@rsraster,
\c!hoek=,\c!straal=.5\korpsgrootte,\c!kader=\v!uit]%
\ifx\@@efextension\c!mov \presetfiguremov \fi
#1[#4][#5][#6]%
+ \ifx\@@eftype\c!mov \presetfiguremov \fi
+ \ifx\@@eftype\v!buffer
+ \ifx\@@efextension\empty
+ \let\@@efextension\c!tmp
+ \fi
+ \let\@@eftype\c!tex
+ \fi
\processaction
[\@@efextension]
- [\c!tex=>\let\@@eftype\c!tex,
- \c!tmp=>\let\@@eftype\c!tex,
- \c!mov=>\presetfiguremov]%
-\edef\figuretypes{\figuretypes,\c!tex}%
+ [ \c!tex=>\let\@@eftype\c!tex,
+ \c!tmp=>\let\@@eftype\c!tex
+ \edef\@@effilepref{\bufferprefix}%
+ \edef\@@effilename{\@@effilepref\@@effilename},
+ \c!mov=>\presetfiguremov]%
+ \edef\figuretypes{\figuretypes,\c!tex}%
\doifelse{\@@efobject}{\v!nee}
{\donefalse}
{\doifspecialavailableelse\dostartscaling
{\doifobjectssupportedelse
- {\edef\@@efobjectname{#3-\@@eftype}%
+ {\edef\@@efobjectname{\@@effilename-\@@eftype-\@@efextension-\@@efpagina}%
\doifobjectfoundelse{FIG}{\@@efobjectname}{\donetrue}{\donefalse}}
{\donefalse}}
{\donefalse}}%
@@ -654,11 +705,11 @@
[\c!x=\!!zeropoint,\c!y=\!!zeropoint,
\c!w=\objectwidth,\c!h=\objectheight]%
\chardef\figurestatus=5
- \def\@@effullname{#3}%
+ \edef\@@effullname{\@@effilepref#3}%
\else
\doifelse{#2}{\s!figurepreset}
{\def\figureextension##1{\@@efextension}%
- \edef\@@effullname{#3}}%
+ \edef\@@effullname{\@@effilepref#3}}%
{\ifx\@@efextension\empty
\dogetcommacommandelement1\from\@@eftype\to\commalistelement
\edef\@@effullname{\@@effilename.\commalistelement}%
@@ -670,13 +721,13 @@
\def\figureextension##1{\@@efextension}%
\fi}%
\ifcase\figurefilemode
- \def\@@ex@@gebied{.}%
+ \let\@@ex@@gebied\f!currentpath
\or
- \def\@@ex@@gebied{.}%
+ \let\@@ex@@gebied\f!currentpath
\or
\let\@@ex@@gebied\@@exgebied
\or
- \edef\@@ex@@gebied{.\ifx\@@exgebied\empty\else,\fi\@@exgebied}%
+ \edef\@@ex@@gebied{\f!currentpath\ifx\@@exgebied\empty\else,\fi\@@exgebied}%
\fi
\doifelse{\@@efpreset}{\v!nee}
{\doifelse{\@@eftype}{\s!unknown}
@@ -696,7 +747,7 @@
\fi
\doifelse{#2}{\s!figurepreset}
{\chardef\figurestatus=4
- \def\@@efloadname{./\@@exfile}%
+ \def\@@efloadname{\f!currentpath\f!pathseparator\@@exfile}%
\let\@@eftype=\@@epe}
{\chardef\figurestatus=0
\analyzefigurefiles}}%
@@ -725,8 +776,12 @@
\ifdim\@@eph=\!!zeropoint \chardef\figurestatus=1 \fi
\ifnum\figurestatus=1 % unknown dimensions, take width or height or scale
\setnaturalfiguresize
+\xdef\naturalfigurewidth{\the\figwid}%
+\xdef\naturalfigureheight{\the\fighei}%
\let\@@efkader=\v!uit
\else
+\global\let\naturalfigurewidth\@@epw
+\global\let\naturalfigureheight\@@eph
\setfactorfiguresize
\setscalefiguresize
\setdimensionfiguresize
@@ -744,13 +799,23 @@
\doif{\@@exoptie}{\v!leeg}
{\skipexternalfigurestrue
\let\@@efkader=\v!uit}%
- \doifelse{\@@efpreview}{\v!ja}
- {\def\@@efpreview{1}}
- {\def\@@efpreview{0}}%
- \doifelse{\@@efobject}{\v!nee}
+\doifelsenothing{\@@efpagina} % NIEUW
+ {\let\@@efoptions\empty}
+ {\let\@@efoptions\@@efpagina}%
+ \doif{\@@efpreview}{\v!ja}
+ {\addtocommalist\v!preview\@@efoptions}%
+ \doif{\@@efherhaal}{\v!ja}
+ {\addtocommalist\v!herhaal\@@efoptions}%
+\ifx\@@eftype\c!mps\ifcase\EPSspecial\else\ifinobject\else
+ \@@eftrace{special mps, object forced}%
+ \doglobal\increment\forcedMPSobject
+ \edef\@@efobjectname{\c!mps::\forcedMPSobject}%
+ \let\@@efobject\v!ja
+\fi\fi\fi
+\global\let\lastfigureobjectname\@@efobjectname
+ \doifelse{\@@efobject}{\v!nee}
{\donefalse}
- {\doifobjectssupportedelse
- {\donetrue}{\donefalse}}%
+ {\doifobjectssupportedelse{\donetrue}{\donefalse}}%
\ifdone
\doifobjectfoundelse{FIG}{\@@efobjectname}
{}
@@ -770,8 +835,8 @@
{100}{100}
{\@@epx}{\@@epy}
{\@@epw}{\@@eph}
- {\@@efpreview}%
- \else\ifskipexternalfigures
+ {\@@efoptions}%
+ \else\ifskipexternalfigures
\ruledhbox{\fakebox\foundexternalfigure}
\else
\box\foundexternalfigure
@@ -780,76 +845,83 @@
\setobject{FIG}{\@@efobjectname}\vbox{\box0}%
\egroup}%
\fi
+ \xdef\figurewidth {\the\figwid}%
+ \xdef\figureheight{\the\fighei}%
\global\setbox\foundexternalfigure=\vbox to \fighei
{\vfill
\hsize\figwid
\ifdone
\dimen0=\scax pt\divide\dimen0 by 100\edef\scax{\@EA\withoutpt\the\dimen0}%
\dimen0=\scay pt\divide\dimen0 by 100\edef\scay{\@EA\withoutpt\the\dimen0}%
- \schaal[sx=\scax,sy=\scay]{\getobject{FIG}{\@@efobjectname}}%
+ \schaal[sx=\scax,sy=\scay]{\dowithfigure{\getobject{FIG}{\@@efobjectname}}}%
+ \else\ifdim\wd\foundexternalfigure=\!!zeropoint
+ \dowithfigure
+ {\doinsertfile
+ {\@@eftype,\@@efmethode}{\@@effullname,\@@eflabel}
+ {\scax}{\scay}
+ {\figx}{\figy}
+ {\number\figwid}{\number\fighei}
+ {\@@efoptions}}%
\else
- \ifdim\wd\foundexternalfigure=\!!zeropoint
- \doinsertfile
- {\@@eftype,\@@efmethode}{\@@effullname,\@@eflabel}
- {\scax}{\scay}
- {\figx}{\figy}
- {\number\figwid}{\number\fighei}
- {\@@efpreview}%
- \else
- \dimen0=\scax pt\divide\dimen0 by 100\edef\scax{\@EA\withoutpt\the\dimen0}%
- \dimen0=\scay pt\divide\dimen0 by 100\edef\scay{\@EA\withoutpt\the\dimen0}%
- \schaal[sx=\scax,sy=\scay]{\box\foundexternalfigure}%
- \fi
- \fi}}
-
-\let\figureheight=\!!zeropoint
-\let\figurewidth =\!!zeropoint
+ \dimen0=\scax pt\divide\dimen0 by 100\edef\scax{\@EA\withoutpt\the\dimen0}%
+ \dimen0=\scay pt\divide\dimen0 by 100\edef\scay{\@EA\withoutpt\the\dimen0}%
+ \schaal[sx=\scax,sy=\scay]{\dowithfigure{\box\foundexternalfigure}}%
+ \fi\fi}%
+ \global\wd\foundexternalfigure=\figwid}
+
+%D In \PDF\ one can specify an alternative graphic. This means
+%D that for instance a low resolution graphic can be used for
+%D viewing and a high res one for printing. Because this
+%D feature depends much on the driver, here we only take care
+%D of perparations. It is up to the special driver to handle
+%D the inclusion. The driver routines can change the content of
+%D box \type {\foundexternalfigure} if suitable.
+%D
+%D One complication is for instance that an alternative may
+%D not itself have an alternative, and these kind of situations
+%D are best handled by the driver.
+
+\let\lastfigureobjectname\empty
+
+\def\calculateexternalscreenfigure[#1][#2][#3][#4][#5][#6]%
+ {\ifx\@@efscherm\empty\else\ifx\@@efobject\v!nee\else
+ \doifobjectssupportedelse
+ {\doifspecialavailableelse\doregisterfigure
+ {\bgroup
+ #1[#4][#5][#6]%
+ \doregisterfigure{FIG}{\lastfigureobjectname}%
+ \let\@@ef@@scherm\@@efscherm
+ \calculateexternalfigure[#1][\@@ef@@scherm][\@@ef@@scherm][#4,\c!scherm=][#5][#6]%
+ \egroup}
+ {}}
+ {}%
+ \fi\fi}
+
+\let\dowithfigure\relax
+
+\let\naturalfigureheight=\!!zeropoint
+\let\naturalfigurewidth =\!!zeropoint
+\let\figureheight =\!!zeropoint
+\let\figurewidth =\!!zeropoint
\def\getfiguredimensions%
{\dodoubleempty\dogetfiguredimensions}
\def\dogetfiguredimensions[#1][#2]%
- {{\setbox0=\hbox{\externalfigure[#1][#2,\c!object=\v!nee]}}}
+ {{\let\immediate\relax % very dirty but prevents flushing
+ \setbox0=\hbox{\externalfigure[#1][#2,\c!scherm=,\c!object=\v!nee]}}}
\presetlocalframed[\??ef]
-% \def\doplaceexternalfigure#1[#2][#3][#4][#5]%
-% {\bgroup
-% \setupexternalfigures
-% \calculateexternalfigure#1[#2][#3][#4][#5]%
-% \xdef\figurewidth {\the\figwid}%
-% \xdef\figureheight{\the\fighei}%
-% \ifskipexternalfigures
-% \localframed
-% [\??ef]
-% [\c!breedte=\figwid,
-% \c!hoogte=\fighei,
-% \c!kader=\v!aan]
-% {\ttx name: #2 \\ file: #3 \\ skipped}%
-% \else\ifcase\figurestatus
-% \localframed
-% [\??ef]
-% [\c!breedte=\figwid,
-% \c!hoogte=\fighei,
-% \c!kader=\v!aan]
-% {\ttx name: #2 \\ file: #3 \\ unknown}%
-% \else
-% \localframed
-% [\??ef]
-% [\c!breedte=\figwid,
-% \c!hoogte=\fighei,
-% \c!offset=\v!overlay]
-% {\vfilll\box\foundexternalfigure}%
-% \fi\fi
-% \egroup}
-
-\def\doplaceexternalfigure% used direct and indirect
+\def\doplaceexternalfigure% used direct and indirect
{\dosixtupleempty\dodoplaceexternalfigure}
\def\dodoplaceexternalfigure[#1][#2][#3][#4][#5][#6]%
{\bgroup
\setupexternalfigures
\calculateexternalfigure[#1][#2][#3][#4][#5][#6]%
+ \setupexternalfigures
+ \calculateexternalscreenfigure[#1][#2][#3][#4][#5][#6]%
\xdef\figurewidth {\the\figwid}%
\xdef\figureheight{\the\fighei}%
\ifskipexternalfigures
@@ -879,45 +951,25 @@
\def\getexternalfigure#1%
{\getvalue{\??ef\??ef#1}}
-% \def\dopresetfigure[#1][#2]%
-% {\getparameters[\??ef][#1]%
-% \getparameters[\??ep][#2]}
-%
-% \def\doprecopfigure[#1][#2]%
-% {\def\doplaceexternalfigure##1[##2][##3][##4][##5]%
-% {\getparameters[\??ef][##4]%
-% \getparameters[\??ep][##5,#2]}%
-% \getvalue{\??ef\??ef#1}}
-
\def\dopresetfigure[#1][#2][#3]%
{\getparameters[\??ef][#1,#3]%
\getparameters[\??ep][#2]}
\def\doprecopfigure[#1][#2][#3]%
{\def\doplaceexternalfigure[##1][##2][##3][##4][##5]%
- {\getparameters[\??ef][##4,#2,#3]%
+ {\getparameters[\??ef][##4,#2,#3]%
\getparameters[\??ep][##5]}%
\getvalue{\??ef\??ef#1}}
-% \def\dosetuseexternalfigure[#1][#2][#3][#4]%
-% {\doifinstringelse{=}{#3}
-% {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure\dopresetfigure[#1][#2][#3][#4]}}
-% {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure\doprecopfigure[#1][#2][#3][#4]}}%
-% \doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}} % upward compatible
-%
-% \def\douseexternalfigure[#1][#2][#3][#4]%
-% {\doifelsenothing{#1}
-% {\doifsomething{#2}
-% {\dosetuseexternalfigure[#2][#2][#3][#4]}}
-% {\doifelsenothing{#2}
-% {\dosetuseexternalfigure[#1][#1][#3][#4]}
-% {\dosetuseexternalfigure[#1][#2][#3][#4]}}}
+\def\getnumberoffigurepages#1%
+ {\gdef#1{1}% the default
+ \dogetnofinsertpages#1}
% \useexternalfigure[alpha][koe]
% \useexternalfigure[beta] [koe] [breedte=1cm]
% \useexternalfigure[gamma][koe][alpha]
% \useexternalfigure[delta][koe][alpha][breedte=2cm]
-%
+%
% volle breedte: \externalfigure[koe] \par
% 3cm breed: \externalfigure[koe] [breedte=3cm] \par
% volle breedte: \externalfigure[alpha] \par
@@ -944,30 +996,23 @@
\def\useexternalfigure%
{\doquadrupleempty\douseexternalfigure}
-% \def\doexternalfigure[#1][#2][#3]%
-% {\bgroup
-% \doifundefinedelse{\??ef\??ef#1}
-% {\useexternalfigure[\s!dummy][#1][#2][#3]%
-% \getexternalfigure{\s!dummy}}
-% {\getexternalfigure{#1}}%
-% \egroup}
-
\def\doexternalfigure[#1][#2][#3]%
{\bgroup
- \doifundefinedelse{\??ef\??ef#1}
- {\useexternalfigure[\s!dummy][#1][#2][#3]%
- \getexternalfigure{\s!dummy}[#3]}
- {\getexternalfigure{#1}[#2]}%
+ \doifelsenothing{#1}
+ {\framed[\c!breedte=4cm,\c!hoogte=3cm]{external\\figure}}
+ {\doifundefinedelse{\??ef\??ef#1}
+ {\useexternalfigure[\s!dummy][#1][#2][#3]%
+ \getexternalfigure{\s!dummy}[#3]}
+ {\getexternalfigure{#1}[#2]}}%
\egroup}
\unexpanded\def\externalfigure%
{\dotripleempty\doexternalfigure}
-%D Two alternatives, more settings needed.
+%D Two alternatives, more settings needed.
\def\showexternalfigurea%
{\bgroup
- \setupcolors[\c!status=\v!start]% to prevent mps color conversion
\mindermeldingen
\def\presetfigure[##1][##2]%
{\useexternalfigure
@@ -985,6 +1030,7 @@
\def\docommando####1%
{\beforesplitstring####1\at=\to\asciia
\aftersplitstring ####1\at=\to\asciib
+ \convertcommand\asciib\to\asciib
\doifsomething{\asciib}
{\hsmash{\hbox to .75em{\asciia\hss}: \asciib}\endgraf}}%
\processcommalist[##2]\docommando
@@ -992,16 +1038,15 @@
\endgraf
\getvalue{\e!stop\v!figuur\e!tekst}}%
\pushendofline
- \readjobfile{\@@exfile}{}{}% was \readlocfile
+ \readjobfile{\@@exfile}{}{}% was \readlocfile
\popendofline
\egroup}
-\def\showexternalfigureb% instelbaar maken
+\def\showexternalfigureb% instelbaar maken
{\bgroup
\def\total{5}%
\global\let\allfigures=\empty
\doglobal\newcounter\figurecounter
- \setupcolors[\c!status=\v!start]% to prevent mps color conversion
\mindermeldingen
\def\docommando##1{##1&}%
\def\figurecaptions%
@@ -1037,9 +1082,47 @@
\popendofline
\egroup}
+\def\showexternalfigurec%
+ {\bgroup
+ \def\presetfigure[##1][##2]{\pagefigure[##1]}
+ \pushendofline
+ \readjobfile{\@@exfile}{}{}
+ \popendofline
+ \egroup}
+
+\def\pagefigure%
+ {\dodoubleempty\dopagefigure}
+
+\def\dopagefigure[#1][#2]%
+ {\bgroup
+ \pagina
+ \getfiguredimensions
+ [#1][#2]
+ \scratchdimen=\@@exoffset
+ \dimen0=\figurewidth \advance\dimen0 2\scratchdimen\edef\figurewidth {\the\dimen0}
+ \dimen0=\figureheight\advance\dimen0 2\scratchdimen\edef\figureheight{\the\dimen0}
+ \definieerpapierformaat
+ [\s!dummy][\c!breedte=\figurewidth,\c!hoogte=\figureheight]
+ \stelpapierformaatin
+ [\s!dummy][\s!dummy]
+ \setupcolors
+ [\c!status=\v!start]
+ \stellayoutin
+ [\c!kopwit=\@@exoffset, \c!rugwit=\@@exoffset,
+ \c!hoofd=\!!zeropoint, \c!voet=\!!zeropoint,
+ \c!hoogte=\v!midden, \c!breedte=\v!midden]
+ \externalfigure
+ [#1]
+ [#2,\c!breedte=\textwidth,\c!hoogte=\textheight]
+ \pagina
+ \egroup}
+
+% \starttext \pagefigure[two.1] \stoptext
+
\def\doshowexternalfigures[#1]%
{\bgroup
- \getparameters[\??ex][\c!variant=a,#1]%
+ \setupcolors[\c!status=\v!start]% to prevent mps color conversion
+ \getparameters[\??ex][\c!variant=a,\c!offset=\!!zeropoint,#1]%
\getvalue{showexternalfigure\@@exvariant}%
\egroup}
@@ -1064,7 +1147,7 @@
\divide\dimen0 by \efysteps
\edef\@@exxmax{\number\dimen0}%
\else
- \efxsteps=\figurewidth \divide\efxsteps by \@@exxmax
+ \efxsteps=\figurewidth \divide\efxsteps by \@@exxmax
\efysteps=\figureheight \divide\efysteps by \@@exymax
\fi}
@@ -1101,7 +1184,7 @@
\setnostrut
\framed
[\c!breedte=#1\efxsteps,
- \c!hoogte=#2\efysteps,
+ \c!hoogte=#2\efysteps,
\c!offset=\!!zeropoint,
\c!kader=#3]
{#4}%
@@ -1124,7 +1207,7 @@
{\advance\efreference by 1
\hbox
{\quad
- \thisissomeinternal{\s!vwb}{#8}%
+ \thisissomeinternal{\s!vwb}{#8}%
\gotosomeinternal
{\s!vwa}{#8}{\realfolio}
{\hbox to 1.5em{\the\efreference\presetgoto\hfill}}%
@@ -1151,12 +1234,12 @@
{\hskip2em\box\colorbarbox}%
\global\wd\colorbarbox=\!!zeropoint}
-\def\placestartfigure[#1][#2][#3]#4\placestopfigure%
+\def\placestartfigure[#1][#2][#3]#4\placestopfigure[#5]%
{\hbox
{\setbox0=\hbox
- {\useexternalfigure[\s!dummy][#2][#3]%
+ {\useexternalfigure[\s!dummy][#2][#3,#5]%
\externalfigure[\s!dummy]}%
- \calculateefsteps
+ \calculateefsteps
\startpositioneren
\def\referring(##1,##2)##3(##4,##5)##6[##7]%
{\positioneer(##1,##2)
@@ -1187,6 +1270,15 @@
\stoppositioneren
\box\colorbarbox}}
+\def\dodostartfigure[#1][#2][#3]#4\stopfigure%
+ {\doifelse{\@@exoptie}{\v!test}
+ {\teststartfigure[#1][#2][#3]#4\teststopfigure
+ \def\@@exhokjes{\v!aan}}
+ {\def\@@exhokjes{\v!uit}}%
+ \setvalue{\??ef\??ef#1}%
+ {\dosingleempty{\placestartfigure[#1][#2][#3]#4\placestopfigure}}%
+ \doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}}
+
% De onderstaande macro mag niet zondermeer worden aangepast
% en is afgestemd op gebruik in de handleiding.
@@ -1212,10 +1304,10 @@
{\box0}%
\positioneer(0,0)
{\rooster
- [\c!nx=\@@exxmax,
- \c!dx=\withoutpt{\the\efxsteps},
- \c!ny=\@@exymax,
- \c!dy=\withoutpt{\the\efysteps},
+ [\c!nx=\@@exxmax,
+ \c!dx=\withoutpt{\the\efxsteps},
+ \c!ny=\@@exymax,
+ \c!dy=\withoutpt{\the\efysteps},
\c!xstap=1,
\c!ystap=1,
\c!schaal=1,
@@ -1224,7 +1316,7 @@
\stelpositionerenin%
[\c!eenheid=pt,
\c!xschaal=\withoutpt{\the\efxsteps},
- \c!yschaal=\withoutpt{\the\efysteps},
+ \c!yschaal=\withoutpt{\the\efysteps},
\c!factor=1]%
\linewidth=1pt
\ignorespaces#4\relax
@@ -1250,7 +1342,7 @@
\ht0=\ht2
\fi
\hbox
- {\hskip3em
+ {\hskip3em
\vtop{\vskip12pt\box0\vskip6pt}%
\vtop{\vskip12pt\box2\vskip6pt}}%
\endgroup}
@@ -1261,7 +1353,7 @@
\def\@@exhokjes{\v!aan}}
{\def\@@exhokjes{\v!uit}}%
\setvalue{\??ef\??ef#1}%
- {\placestartfigure[#1][#2][#3]#4\placestopfigure}%
+ {\dosingleempty{\placestartfigure[#1][#2][#3]#4\placestopfigure}}%
\doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}}
\long\def\dostartfigure#1%
@@ -1270,10 +1362,134 @@
\def\startfigure%
{\grabuntil{\e!stop\v!figuur}\dostartfigure}
+%D \macros
+%D {clip, setupclipping}
+%D
+%D Although related to figures, clipping can be applied to
+%D arbitrary content. We can use \METAPOST\ to provide a non
+%D rectangular clipping path.
+%D
+%D \starttypen
+%D \startMPclip{fun}
+%D clip currentpicture to fullcircle
+%D shifted (.5,.5) xscaled \width yscaled \height ;
+%D \stopMPclip
+%D \stoptypen
+%D
+%D We get a rectangular piece of the figure when we say:
+%D
+%D \starttypen
+%D \clip[x=2,y=1]{\externalfigure[photo]}
+%D \stoptypen
+%D
+%D When we want to clip to the oval we defined a few lines ago,
+%D we say:
+%D
+%D \starttypen
+%D \clip[nx=1,ny=1,x=1,y=1,mp=fun]{\externalfigure[photo]}
+%D \stoptypen
+%D
+%D The general characteristics of clipping can be set up with
+%D
+%D \showsetup{setupclipping}
+
+% \def\doclip[#1]% nb top->bottom left->right
+% {\bgroup
+% \getparameters[\??cp][#1]%
+% \dowithnextbox
+% {\ifdim\@@cpbreedte>\!!zeropoint
+% \dimen0=\@@cpbreedte
+% \dimen4=\@@cphoffset
+% \else
+% \dimen0=\wd\nextbox
+% \divide\dimen0 \@@cpnx
+% \dimen4=\@@cpx\dimen0
+% \advance\dimen4 -\dimen0
+% \fi
+% \relax % sure
+% \ifdim\@@cphoogte>\!!zeropoint
+% \dimen2=\@@cphoogte
+% \dimen6=\ht\nextbox
+% \advance\dimen6 by -\@@cpvoffset
+% \advance\dimen6 by -\dimen2
+% \else
+% \dimen2=\ht\nextbox
+% \divide\dimen2 \@@cpny
+% \dimen6=-\@@cpy\dimen2
+% \advance\dimen6 \ht\nextbox
+% \fi
+% \setbox\nextbox=\hbox
+% {\hskip-\dimen4\lower\dimen6\box\nextbox}%
+% \wd\nextbox=\!!zeropoint
+% \ht\nextbox=\!!zeropoint
+% \dp\nextbox=\!!zeropoint
+% \setbox\nextbox=\hbox
+% {\dostartclipping{\@@cpmp}{\number\dimen0}{\number\dimen2}%
+% \box\nextbox
+% \dostopclipping}%
+% \wd\nextbox=\dimen0
+% \ht\nextbox=\dimen2
+% \dp\nextbox=\!!zeropoint
+% \box\nextbox
+% \egroup}%
+% \hbox}
+
+\def\doclip[#1]% nb top->bottom left->right
+ {\bgroup
+ \getparameters[\??cp][#1]%
+ \dowithnextbox
+ {\ifdim\@@cpbreedte>\!!zeropoint
+ \dimen0=\@@cpbreedte
+ \dimen4=\@@cphoffset
+ \else
+ \dimen0=\wd\nextbox
+ \divide\dimen0 \@@cpnx
+ \dimen4=\@@cpx\dimen0
+ \advance\dimen4 -\dimen0
+ \dimen0=\@@cpsx\dimen0
+ \fi
+ \relax % sure
+ \ifdim\@@cphoogte>\!!zeropoint
+ \dimen2=\@@cphoogte
+ \dimen6=\ht\nextbox
+ \advance\dimen6 by -\@@cpvoffset
+ \advance\dimen6 by -\dimen2
+ \else
+ \dimen2=\ht\nextbox
+ \divide\dimen2 \@@cpny
+ \dimen6=-\@@cpy\dimen2
+ \advance\dimen6 -\@@cpsy\dimen2
+ \advance\dimen6 \dimen2
+ \dimen2=\@@cpsy\dimen2
+ \advance\dimen6 \ht\nextbox
+ \fi
+ \setbox\nextbox=\hbox
+ {\hskip-\dimen4\lower\dimen6\box\nextbox}%
+ \wd\nextbox=\!!zeropoint
+ \ht\nextbox=\!!zeropoint
+ \dp\nextbox=\!!zeropoint
+ \setbox\nextbox=\hbox
+ {\dostartclipping{\@@cpmp}{\number\dimen0}{\number\dimen2}%
+ \box\nextbox
+ \dostopclipping}%
+ \wd\nextbox=\dimen0
+ \ht\nextbox=\dimen2
+ \dp\nextbox=\!!zeropoint
+ \box\nextbox
+ \egroup}%
+ \hbox}
+
+\def\clip{\dosingleempty\doclip}
+
+\def\setupclipping%
+ {\dodoubleargument\getparameters[\??cp]}
+
\appendtoks \setupexternalfigures[\c!optie=\v!leeg] \to \everyfastmode
\appendtoks \runMPgraphicsfalse \to \everyfastmode
\appendtoks \insertMPgraphicsfalse \to \everyfastmode
+\appendtoks \flushMPgraphics \to \everylastshipout
+
\setupexternalfigures
[\c!optie=,
\c!object=\v!ja,
@@ -1291,8 +1507,15 @@
\c!xmax=]
\useexternalfigure
- [buffer] [\jobname.\c!tmp] [\c!type=\c!tex,\c!object=\v!nee]
+ [buffer] [\jobname] [\c!type=\v!buffer,\c!object=\v!nee]
+
+\setupclipping
+ [\c!nx=2,\c!x=1,\c!sx=1,
+ \c!ny=2,\c!y=1,\c!sy=1,
+ \c!breedte=\!!zeropoint,\c!hoogte=\!!zeropoint,
+ \c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint,
+ mp=]
\protect
-
+
\endinput
diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex
index 3f47d7528..987fcb2c7 100644
--- a/tex/context/base/core-fil.tex
+++ b/tex/context/base/core-fil.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / File Support}
@@ -34,6 +34,11 @@
1: Dateisynonym -- wird bereits fuer -- benutzt
\stopmessages
+\startmessages czech library: files
+ title: soubory
+ 1: synonymum souboru -- je jiz pouzito pro --
+\stopmessages
+
%D \macros
%D {definefilesynonym}
%D
@@ -67,7 +72,9 @@
{\doifdefined{\??fs#1}
{\doifnotvalue{\??fs#1}{#2}
{\showmessage{\m!files}{1}{#1 (#2),\getvalue{\??fs#1}}}}%
- \setevalue{\??fs#1}{#2}}
+ \doifelse{#1}{#2}
+ {\letbeundefined{\??fs#1}{#2}}
+ {\setevalue{\??fs#1}{#2}}}
%D \macros
%D {truefilename}
@@ -107,7 +114,7 @@
%D
%D Most of \CONTEXT is preloaded in the format file. Some very
%D domain specific typesetting topics are however dealt with in
-%D separate modules, e.g. typesettingof chemical structure
+%D separate modules, e.g. typesetting of chemical structure
%D formulas. These modules are loaded by:
%D
%D \showsetup{\y!usemodule}
@@ -115,21 +122,31 @@
%D More information on the specific modules can be found in
%D their dedicated manuals.
+\newconditional\moduleisloaded
+
\def\dododousemodules#1#2%
- {\makeshortfilename[#1\truefilename{#2}]%
- \doifundefinedelse{\shortfilename\v!aan}
- {\setgvalue{\shortfilename\v!aan}{}%
- \startreadingfile
- \readsysfile{\shortfilename}%
- {\showmessage{\m!systems}{5}{#1#2}}%
- {\showmessage{\m!systems}{6}{#1#2}}%
- \stopreadingfile}
- {\showmessage{\m!systems}{7}{#2}}}
+ {\ifconditional\moduleisloaded\else
+ \makeshortfilename[#1\truefilename{#2}]%
+ \doifundefinedelse{\shortfilename\v!aan}
+ {\setgvalue{\shortfilename\v!aan}{}%
+ \startreadingfile
+ \readsysfile{\shortfilename}%
+ {\showmessage{\m!systems}{5}{#2}%
+ \settrue\moduleisloaded}%
+ {}%
+ \stopreadingfile}
+ {\showmessage{\m!systems}{7}{#2}%
+ \settrue\moduleisloaded}%
+ \fi}
\def\dodousemodules#1%
- {\dododousemodules\f!moduleprefix {#1}%
+ {\setfalse\moduleisloaded
+ \dododousemodules\f!moduleprefix {#1}%
\dododousemodules\f!styleprefix {#1}%
- \dododousemodules\f!privateprefix{#1}}
+ \dododousemodules\f!privateprefix{#1}%
+ \ifconditional\moduleisloaded\else
+ \showmessage{\m!systems}{6}{#1}%
+ \fi}
\def\dousemodules[#1]%
{\doifsomething{#1}{\processcommalist[#1]\dodousemodules}%
@@ -146,6 +163,32 @@
% %D The definition shows that the language specific settings
% %D are activated after loading all the modules specified.
+%D \macros
+%D {ifprotectbuffers, bufferprefix,
+%D TEXbufferfile, MPgraphicfile}
+%D
+%D The next switch enables protection of temporary filenames,
+%D which is needed when we process more files on one path at
+%D the same time.
+
+\newif\ifprotectbuffers
+
+\def\bufferprefix%
+ {\ifprotectbuffers\jobname-\fi}
+
+% also
+
+\def\TEXbufferfile#1%
+ {\bufferprefix#1.\f!temporaryextension}
+
+%D We also redefine:
+
+\def\MPgraphicfile%
+ {\bufferprefix mp\ifMPrun run\else graph\fi}
+
+\def\convertMPcolorfile%
+ {\bufferprefix metacmyk.tmp}
+
\protect
\endinput
diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex
index bd4a70a07..2d1b0b7eb 100644
--- a/tex/context/base/core-fld.tex
+++ b/tex/context/base/core-fld.tex
@@ -8,9 +8,11 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% \appendtocommalist versus \addtocommalist
+
\writestatus{loading}{Context Field Macros}
% messages
@@ -118,7 +120,8 @@
\@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
\def\presetpushfield%
- {\presetfieldsymbols[\@@FieldValues]%
+ {\edef\@@FieldValues{{\@@FieldValues}}% makes sure {a,b,c} is passed
+ \presetfieldsymbols[\@@FieldValues]%
\dopresetpushfield
{\@@FieldName}
{\@@FieldWidth}
@@ -277,7 +280,8 @@
\doloop
{\gettwopassdata{fld:#1}%
\iftwopassdatafound
- \addtocommalist\twopassdata\@@FieldKids
+ %\addtocommalist\twopassdata\@@FieldKids
+ \appendtocommalist\twopassdata\@@FieldKids
\else
\exitloop
\fi}%
@@ -431,7 +435,8 @@
\writestatus{fields}{unknown field #1}%
\else
\let\@@FieldMode=\fieldparentmode
- \def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
+ %\def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
+ \def\docommando##1{\appendtocommalist{##1}\@@FieldKids}%
\processcommalist[#2]\docommando
\changefield{#1}%
\let\@@FieldAutoParent=\@@FieldAuto
@@ -464,7 +469,8 @@
\writestatus{fields}{unknown field #1}%
\else
\let\@@FieldMode=\fieldparentmode
- \def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
+ %\def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
+ \def\docommando##1{\appendtocommalist{##1}\@@FieldKids}%
\processcommalist[#2]\docommando
\changefield{#1}%
\let\@@FieldAutoParent=\@@FieldAuto
@@ -542,7 +548,8 @@
\fi
\ifdone
\let\@@FieldParent=\@@FieldName
- \addtocommalist\@@FieldParent\@@FieldKids
+ %\addtocommalist\@@FieldParent\@@FieldKids
+ \appendtocommalist\@@FieldParent\@@FieldKids
\dosetfieldstatus\@@FieldMode\@@FieldParent\@@FieldKids\@@FieldRoot
\iflocation\getvalue{preset\@@FieldType field}\fi
\let\@@FieldMode=\fieldchildmode
@@ -622,7 +629,9 @@
{\presetlocalframed[\??fd]%
\processallactionsinset
[#2]
- [ \v!label=>\ShowFieldLabeltrue,
+ [ \v!reset=>\ShowFieldLabelfalse\ShowFieldFramefalse
+ \HorizontalFieldfalse\VerticalFieldfalse,
+ \v!label=>\ShowFieldLabeltrue,
\v!kader=>\ShowFieldFrametrue,
\v!horizontaal=>\HorizontalFieldtrue,
\v!vertikaal=>\VerticalFieldtrue]%
@@ -640,21 +649,23 @@
\fi\fi
\getparameters[\??fd]
[\c!n=,\c!voor=,\c!na=\vss,\c!letter=,\c!kleur=,#3]%
- \reshapeframeboxfalse
- \ifShowFieldFrame
- \localframed[\??fd][\c!strut=\v!nee]\bgroup
+ \reshapeframeboxfalse % else ugly spacing
+ \ifShowFieldFrame
+ \localframed[\??fd][\c!strut=\v!nee,\c!uitlijnen=]\bgroup
\else
\vbox\bgroup
\fi
\mindermeldingen
\ifShowFieldLabel
\setbox0=\hbox
- {\framed
+ {\reshapeframeboxtrue % else wrong dimensions
+ \framed
[\c!letter=,\c!kleur=,\c!uitlijnen=\c!rechts,#4]
{\@@FieldLabel}}%
\fi
\setbox2=\hbox
- {\ifVerticalField
+ {\reshapeframeboxtrue % else wrong dimensions
+ \ifVerticalField
\setupframed[\c!hoogte=6ex,\c!breedte=\hsize]%
\else\ifHorizontalField
\setupframed[\c!hoogte=\vsize,\c!breedte=20em]%
@@ -665,7 +676,7 @@
[\c!uitlijnen=\v!rechts,\c!strut=\v!nee,#5]
{\getparameters
[\??fd]
- [\c!kleur=,\v!letter=,\c!uitlijnen=\v!rechts,\c!optie=,
+ [\c!kleur=,\c!letter=,\c!uitlijnen=\v!rechts,\c!optie=,
\c!klikin=,\c!klikuit=,\c!gebiedin=,\c!gebieduit=,
\c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=,
\c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=,
@@ -677,8 +688,10 @@
\vss}}%
\ifShowFieldLabel
\ifVerticalField
- \copy0
- \@@fdtussen
+ \vbox
+ {\copy0
+ \@@fdtussen
+ \copy2}%
\else
\hbox
{\vbox \ifdim\ht2>\ht0 to \ht2 \fi
@@ -700,7 +713,7 @@
{\presetlocalframed[\??fd]%
\localframed
[\??fd]
- [\c!strut=\v!nee,\c!kleur=,\v!letter=,\c!optie=,
+ [\c!n=1,\c!strut=\v!nee,\c!kleur=,\c!letter=,\c!optie=,
\c!klikin=,\c!klikuit=,\c!gebiedin=,\c!gebieduit=,
\c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=,
\c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=,
@@ -830,7 +843,8 @@
\definefield[#1:\stackedfieldnumber][check][#1][##1,\v!leeg][\v!leeg]%
\fi}%
\processcommalist[#2]\dododofieldstack
- \setupfield[#1][#3,\c!optie=\v!alleenleesbaar]%
+ \setupfield[#1][\v!reset]% added
+ \setupfield[#1][\c!optie=\v!alleenleesbaar,#3]% #3 swapped
\newcounter\stackedfieldnumber
\def\dododofieldstack##1%
{\doglobal\increment\stackedfieldnumber
diff --git a/tex/context/base/core-fnt.tex b/tex/context/base/core-fnt.tex
index b9ac85b80..b6c11dbd3 100644
--- a/tex/context/base/core-fnt.tex
+++ b/tex/context/base/core-fnt.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Font Support}
@@ -190,7 +190,7 @@
\uppercase{#1}%
\egroup}
-\def\Word#1%
+\unexpanded\def\Word#1%
{\doWord#1}
\def\doprocesswords#1 #2\od%
@@ -201,19 +201,21 @@
\def\processwords#1%
{\doprocesswords#1 \od\unskip}
-\def\Words%
+\unexpanded\def\Words%
{\let\processwords=\Word
\processwords}
-\def\WORD#1%
+\unexpanded\def\WORD#1%
{\bgroup
\the\everyuppercase
- \def\kap#1{#1}%
- \edef\next{#1}%
- \uppercase\expandafter{\next}%
- \egroup}
-
-\def\WORDS#1%
+ \def\kap##1{##1}%
+ \def\WORD##1{##1}%
+ \uppercase{#1}% No expansion here, otherwise \getvalue problems!
+% \edef\next{#1}%
+% \uppercase\expandafter{\next}%
+ \egroup}
+
+\unexpanded\def\WORDS#1%
{\WORD{#1}}
%D \macros
@@ -298,12 +300,12 @@
%D \showsetup{\y!setupunderbar}
%D
%D The alternatives show up as
-%D {\setupunderbar [variant=a]\underbar{alternative a},
-%D {\setupunderbar [variant=b]\underbar{alternative b},
-%D {\setupunderbar [variant=c]\underbar{alternative c}
+%D {\setupunderbar [variant=a]\underbar{alternative a}},
+%D {\setupunderbar [variant=b]\underbar{alternative b}},
+%D {\setupunderbar [variant=c]\underbar{alternative c}}
%D and
-%D {\setupunderbar [lijndikte=1pt]\underbar{1pt width},
-%D {\setupunderbar [lijndikte=2pt]\underbar{2pt width},
+%D {\setupunderbar [lijndikte=1pt]\underbar{1pt width}},
+%D {\setupunderbar [lijndikte=2pt]\underbar{2pt width}},
%D or whatever. Because \type{\overstrike} uses the same
%D method, the settings also apply to that macro.
diff --git a/tex/context/base/core-gen.tex b/tex/context/base/core-gen.tex
index 03f402973..9ecded535 100644
--- a/tex/context/base/core-gen.tex
+++ b/tex/context/base/core-gen.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / General}
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index d50259817..e1dcd4b9d 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Grid Snapping}
@@ -65,6 +65,9 @@
%D
%D {\showbaselinecorrection\haalbuffer[2]}
+\definecolor[GridLineColor][red]
+\definecolor[GridTextColor][blue]
+
\def\setbaselinecorrections%
{\setbox0=\hbox{\setstrut\strut}%
\setbox2=\hbox{(}%
@@ -265,7 +268,7 @@
\llap
{\infofont
\doglobal\increment\currentsnap
- \color[red]{\vl\presnapskip
+ \color[GridLineColor]{\vl\presnapskip
\vl\presnap
\vl\postsnap
\vl\ifcase\@@extrasnap
@@ -526,7 +529,7 @@
\global\advance\fuzzymarker by \ifodd\fuzzymarker#1\else#2\fi
\nobreak
\ifshowfuzzyskips
- \hbox{\color[blue]
+ \hbox{\color[GridTextColor]
{\llap{\infofont#3\vl\the\fuzzymarker}\nobreak
\vrule\!!width\hsize\!!height.1\lineheight}}
\nobreak
@@ -607,7 +610,7 @@
\iffuzzysnapped
\iftracegridsnapping
\gdef\presnapcorrection%
- {\color[red]{\hrule\!!height.5\openlineheight\!!width\hsize}}%
+ {\color[GridLineColor]{\hrule\!!height.5\openlineheight\!!width\hsize}}%
\else
\gdef\presnapcorrection{\kern.5\openlineheight}%
\fi
diff --git a/tex/context/base/core-hlp.tex b/tex/context/base/core-hlp.tex
new file mode 100644
index 000000000..5a7a22d8d
--- /dev/null
+++ b/tex/context/base/core-hlp.tex
@@ -0,0 +1,126 @@
+%D \module
+%D [ file=core-hlp,
+%D version=1998.10.10,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Help (Experimental),
+%D author={Hans Hagen \& Ton Otten},
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is an experimental and private module, so the interface
+%D and functionality can change. Pieces of code will be moved
+%D to other modules. More features are possible but will be
+%D interfaces later. See m-chart for an application.
+
+\unprotect
+
+\defineframedtext
+ [\e!helptext]
+
+\setupframedtexts
+ [\e!helptext]
+ [\c!breedte=.75\textwidth,
+ \c!uitlijnen=\v!normaal,
+ \c!kader=\v!uit,
+ \c!achtergrond=\v!raster]
+
+\newcounter \nofhelpdataentries
+\newconditional \somehelpdatadefined
+
+\appendtoks \getpagehelpdata \to \beforeeverypage
+\appendtoks \resetpagehelpdata \to \aftereverypage
+
+\def\getpagehelpdata%
+ {\iflocation
+ \let\pagehelpdata\empty
+ \ifconditional\somehelpdatadefined
+ \definetwopasslist{hlp:\realfolio}%
+ \doloop
+ {\gettwopassdata{hlp:\realfolio}%
+ \iftwopassdatafound
+ \addtocommalist\twopassdata\pagehelpdata
+ \else
+ \exitloop
+ \fi}%
+ \fi
+ \ifx\pagehelpdata\empty \else
+ \useJSscripts[fld]%
+ \definereference[HideHelp][JS(Hide_Fields)]% for the moment
+ \fi
+ \fi}
+
+\def\setpagehelpdata#1%
+ {\iflocation\expanded{\dosetpagehelpdata{#1}}\fi}
+
+\def\dosetpagehelpdata#1%
+ {\doglobal\increment\nofhelpdataentries
+ \writeutilitycommand
+ {\twopassentry%
+ {hlp:\realfolio}%
+ {\nofhelpdataentries}%
+ {#1}}}
+
+\def\resetpagehelpdata%
+ {\global\let\pagehelpdata\empty
+ \definereference[HideHelp][]}
+
+\setvalue{\e!start\e!helptext}[#1]%
+ {\iflocation
+ \global\settrue\somehelpdatadefined
+ \setvalue{\e!stop\e!helptext}%
+ {\definesymbol[helpinfo:#1][\helptext{\getbuffer[\e!helptext]}]%
+ \dopresetfieldsymbol{helpinfo:#1}}%
+ \else
+ \letvalue{\e!stop\e!helptext}\relax
+ \fi
+ \dostartbuffer[\e!helptext][\e!start\e!helptext][\e!stop\e!helptext]}
+
+\def\dohelpdata#1%
+ {\setbox0=\hbox
+ {\startoverlay
+ {\box0}
+ {\definemainfield[help:#1][check][helpsetup][helpinfo:#1][helpinfo:#1]%
+ \fitfield[help:#1]}
+ \stopoverlay}}
+
+\def\helpdata%
+ {\iflocation
+ \bgroup
+ %\getpagehelpdata
+ \ifx\pagehelpdata\empty \else
+ \setupfields[\v!reset]%
+ \setupfield
+ [helpsetup]
+ [\c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!kader=\v!uit,
+ \c!optie={\v!alleenleesbaar,\v!verborgen}]%
+ \setbox0=\box\voidb@x
+ \processcommacommand[\pagehelpdata]\dohelpdata
+ \box0
+ \fi
+ \egroup
+ \fi}
+
+\def\dohelpbutton[#1][#2]%
+ {\iflocation
+ \ifsecondargument
+ \setpagehelpdata{#2}\button[#1]{}[JS(Vide_Fields{help:#2})]%
+ \else
+ \setpagehelpdata{#1}\button {}[JS(Vide_Fields{help:#1})]%
+ \fi
+ \fi}
+
+\def\helpbutton%
+ {\dodoubleempty\dohelpbutton}
+
+\def\doifhelpinfo#1#2%
+ {\iflocation\doifsymboldefinedelse{helpinfo:#1}{#2}{}\fi}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex
index 594345203..74377e35a 100644
--- a/tex/context/base/core-int.tex
+++ b/tex/context/base/core-int.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D Still to be done properly.
@@ -74,7 +74,7 @@
\fi
\iflocation
\hbox
- {\stelinteractiein[\c!breedte=\!!zeropoint]%
+ {\setupinteraction[\c!breedte=\!!zeropoint]%
\doganaareenpagina\??lk\gotobegincharacter\firstlink\hss
\ifnum\noflinks>2
\hskip\@@lkafstand
@@ -135,7 +135,7 @@
\fi
\iflocation
\hbox
- {\stelinteractiein[\c!breedte=\!!zeropoint]%
+ {\setupinteraction[\c!breedte=\!!zeropoint]%
%
% \doganaareenpagina\??lk\gotobegincharacter\firstlink\hss
% \ifnum\noflinks>2
diff --git a/tex/context/base/core-mak.tex b/tex/context/base/core-mak.tex
index 568cee03f..63f69a90e 100644
--- a/tex/context/base/core-mak.tex
+++ b/tex/context/base/core-mak.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / General Makeup Commands}
@@ -28,6 +28,7 @@
\c!rechts=\hss,
\c!regelcorrectie=\v!uit,
\c!dieptecorrectie=\v!uit,
+ \c!marge=\v!standaard,
%\c!voor=,
%\c!na=,
#2]%
@@ -46,6 +47,7 @@
\getparameters[#1][#2]%
\getvalue{#1\c!voor}%
\doifvalue{#1\c!regelcorrectie} {\v!aan} {\startbaselinecorrection}%
+ \doifinset{\getvalue{#1\c!marge}}{\v!standaard,\v!ja}{\noindent}%
\hbox to \localhsize
{\getvalue{#1\c!links}%
\box\nextbox
diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex
index 386ceeb4c..1cc32fcb6 100644
--- a/tex/context/base/core-mat.tex
+++ b/tex/context/base/core-mat.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Math Fundamentals}
@@ -75,9 +75,9 @@
\catcode`\_=\@@active
\gdef\enablesupersub%
{\catcode`\^=\@@active
- \def^{\ifmmode\expandafter\super\else\expandafter\normalsuper\fi}%
+ \def^{\ifmmode\expandafter\super\else\expandafter\donormalsuper\fi}%
\catcode`\_=\@@active
- \def_{\ifmmode\expandafter\sub \else\expandafter\normalsub \fi}}
+ \def_{\ifmmode\expandafter\sub \else\expandafter\donormalsub \fi}}
\egroup
%D \macro
@@ -119,7 +119,7 @@
%D
%D This is another one Tobias asked for. It replaces the
%D primitive \type {\over}. We also take the opportunity to
-%D handle math style restorin, which makes sure units and
+%D handle math style restoring, which makes sure units and
%D chemicals come out ok.
\def\frac#1#2%
@@ -130,6 +130,9 @@
$\frac{#1}{#2}$%
\fi}
+\def\frac#1#2%
+ {\relax\mathematics{{{\mathstyle{#1}}\over{\mathstyle{#2}}}}}
+
%D The next macro, \type {\ch}, is \PPCHTEX\ aware. In
%D formulas one can therefore best use \type {\ch} instead of
%D \type {\chemical}, especially in fractions.
@@ -147,6 +150,19 @@
\doresetsubscripts
\fi}
+%D \macros
+%D {/}
+%D
+%D Just to be sure, we restore the behavior of some typical
+%D math characters.
+
+\bgroup
+
+\catcode`\/=\@@other \global \let\normalforwardslash/
+\catcode`\/=\@@active \doglobal\appendtoks\let/\normalforwardslash\to\everymath
+
+\egroup
+
\protect
\endinput
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
index f291ff4ac..a3594a9a7 100644
--- a/tex/context/base/core-mis.tex
+++ b/tex/context/base/core-mis.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Misc Commands}
diff --git a/tex/context/base/core-mps.tex b/tex/context/base/core-mps.tex
new file mode 100644
index 000000000..c92aee271
--- /dev/null
+++ b/tex/context/base/core-mps.tex
@@ -0,0 +1,85 @@
+%D \module
+%D [ file=core-mps,
+%D version=1999.07.10,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=\METAPOST\ Connectivity,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / MetaPost Connectivity}
+
+\unprotect
+
+%D Let's first load the auxiliary file.
+
+\appendtoks input mp-tool ;\to \MPinitializations
+
+%D The next few macros tell \METAPOST\ how the \CONTEXT\
+%D pagebody looks.
+
+\def\writeMPpagedata%
+ {\bgroup
+ \def\writeMPpagedata ##1 ##2%
+ {\scratchdimen=##2%
+ \immediate\write\scratchwrite{##1 := \the\scratchdimen;}}%
+ \immediate\openout\scratchwrite=\TEXbufferfile{mp-state}\relax
+ \writeMPpagedata PaperHeight \papierhoogte
+ \writeMPpagedata PaperWidth \papierbreedte
+ \writeMPpagedata PrintPaperHeight \printpapierhoogte
+ \writeMPpagedata PrintPaperWidth \printpapierbreedte
+ \writeMPpagedata TopSpace \kopwit
+ \writeMPpagedata BackSpace \rugwit
+ \writeMPpagedata MakeupHeight \zethoogte
+ \writeMPpagedata MakeupWidth \zetbreedte
+ \writeMPpagedata TopHeight \bovenhoogte
+ \writeMPpagedata TopDistance \bovenafstand
+ \writeMPpagedata HeaderHeight \hoofdhoogte
+ \writeMPpagedata HeaderDistance \hoofdafstand
+ \writeMPpagedata TextHeight \teksthoogte
+ \writeMPpagedata FooterDistance \voetafstand
+ \writeMPpagedata FooterHeight \voethoogte
+ \writeMPpagedata BottomDistance \onderafstand
+ \writeMPpagedata BottomHeight \onderhoogte
+ \writeMPpagedata LeftEdgeWidth \linkerrandbreedte
+ \writeMPpagedata LeftEdgeDistance \linkerrandafstand
+ \writeMPpagedata LeftMarginWidth \linkermargebreedte
+ \writeMPpagedata LeftMarginDistance \linkermargeafstand
+ \writeMPpagedata TextWidth \tekstbreedte
+ \writeMPpagedata RightMarginDistance \rechtermargeafstand
+ \writeMPpagedata RightMarginWidth \rechtermargebreedte
+ \writeMPpagedata RightEdgeDistance \rechterrandafstand
+ \writeMPpagedata RightEdgeWidth \rechterrandbreedte
+ \writeMPpagedata PageOffset {\getvalue{\??ma\v!pagina\c!offset}}%
+ \writeMPpagedata PageDepth {\getvalue{\??ma\v!pagina\c!diepte}}%
+ \immediate\closeout\scratchwrite
+ \egroup}
+
+\prependtoks \flushMPpagedata \to \everyMPgraphic
+
+\let\flushMPpagedata\relax
+
+\def\setMPpagedata%
+ {\gdef\flushMPpagedata{\writeMPpagedata\global\let\flushMPpagedata\relax}}
+
+%D We have to make sure that the right page data is loaded,
+%D especially when we run multiple jobs on one path.
+
+\prependtoks \prepareMPpagedata \to \everyMPgraphic
+
+\def\prepareMPpagedata%
+ {\appendtoks
+ input mp-page ;
+ def LoadPageState =
+ scantokens "input \TEXbufferfile{mp-state}" ;
+ enddef ;
+ \to \MPinitializations
+ \let\prepareMPpagedata\relax}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-mul.tex b/tex/context/base/core-mul.tex
index 0c93ddf8a..ae8055f98 100644
--- a/tex/context/base/core-mul.tex
+++ b/tex/context/base/core-mul.tex
@@ -8,13 +8,23 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Core Macros / Multi Column Output}
\unprotect
+% check \count<insert> multiplications
+
+% some day try this in balancing routine
+%
+% \ifdim\pagetotal>\pagegoal
+% \eject
+% \else
+% \goodbreak
+% \fi
+
%D The following macro's implement a multi||column output
%D routine. The original implementation was based on Donald
%D Knuth's implementation, which was adapted by Craig Platt to
@@ -70,10 +80,27 @@
9: Ausrichtung ueberpruefen
10: (weniger als) 1 Zeile uebrig
11: Gleitobjekt zu breit fuer Spalte
- 12: Gleitobjekt in naechste Zeile verschoben / --
+ 12: Gleitobjekt in naechste Zeile verschoben / --
13: breites Gleitobjekt an den Anfang der Spalten verschoben
\stopmessages
+\startmessages czech library: columns
+ title: sloupce
+ 1: je mozno pouze -- sloupcu
+ 2: pouzijte \string\filbreak\space jako alternativu
+ 3: problem, vypina se vyvazovani
+ 4: horni plovouci objekt jeste neni podporovan
+ 5: spodni plovouci objekt jeste neni podporovan
+ 6: -- plovouci objekt(y) odlozeny
+ 7: vyvazovani ukonceno po 100 krocich
+ 8: vyvazeno v -- krocich
+ 9: kontrola nerovnost
+ 10: zbyl (mene nez) 1 radek
+ 11: plovouci objekt je pro sloupec prilis siroky
+ 12: plovouci objekt je presunut do nasledujiciho sloupce / --
+ 13: siroky plovouci objekt je presunut nad sloupce
+\stopmessages
+
%D This completely new implementation can handle enough
%D situations for everyday documents, but is still far from
%D perfect. While at the moment the routine doesn't support
@@ -136,6 +163,9 @@
%D \interface \type{\ifnormalbottom} \\
%D put the bottom line at the baseline \\
%D
+%D \interface \type{\ifreversecolumns} \\
+%D reverse the order in wich columns are flushed \\
+%D
%D \interface \type{\usercolumnwidth} \\
%D the calculated width of a column \\
%D \interface \type{\columntextwidth} \\
@@ -205,16 +235,16 @@
% %D In fact, the column height and width are set by means of
% %D two macro's. One can change their meaning if needed:
-%
+%
% \def\setcolumntextheight%
% {\def\columntextheight{\teksthoogte}}
-%
-% \def\setcolumntextwidth%
+%
+% \def\setcolumntextwidth%
% {\def\columntextwidth{\zetbreedte}}
%D Both macros are redefined in \CONTEXT\ when backgrounds
-%D are applied to columns. The final values are used when
-%D flushing the columns.
+%D are applied to columns. The final values are used when
+%D flushing the columns.
\newcount\nofcolumns \nofcolumns=2
@@ -279,25 +309,43 @@
%D \type{\firstcolumnbox} and \type{\lastcolumnbox} are handled
%D outside these macro's.
-\def\dohandlemidcolumns#1%
- {\dorecurse
- {\nofcolumns}
- {\ifnum\recurselevel>1
- \ifnum\recurselevel<\nofcolumns\relax
- \edef\currentcolumnbox{\getvalue{\@@txtcol\recurselevel}}%
- \edef\currenttopcolumnbox{\getvalue{\@@topcol\recurselevel}}%
- \let\currentcolumn=\recurselevel
- #1\relax
- \fi
- \fi}}
+%\def\dohandlemidcolumns#1%
+% {\dorecurse
+% {\nofcolumns}
+% {\ifnum\recurselevel>1
+% \ifnum\recurselevel<\nofcolumns\relax
+% \edef\currentcolumnbox{\getvalue{\@@txtcol\recurselevel}}%
+% \edef\currenttopcolumnbox{\getvalue{\@@topcol\recurselevel}}%
+% \let\currentcolumn=\recurselevel
+% #1\relax
+% \fi
+% \fi}}
+%
+%\def\dohandleallcolumns#1%
+% {\dorecurse
+% {\nofcolumns}
+% {\edef\currentcolumnbox{\getvalue{\@@txtcol\recurselevel}}%
+% \edef\currenttopcolumnbox{\getvalue{\@@topcol\recurselevel}}%
+% \let\currentcolumn=\recurselevel
+% #1\relax}}
+
+\def\dohandlecolumn#1%
+ {\edef\currentcolumnbox {\getvalue{\@@txtcol\recurselevel}}%
+ \edef\currenttopcolumnbox{\getvalue{\@@topcol\recurselevel}}%
+ \let\currentcolumn=\recurselevel
+ #1\relax}
\def\dohandleallcolumns#1%
- {\dorecurse
- {\nofcolumns}
- {\edef\currentcolumnbox{\getvalue{\@@txtcol\recurselevel}}%
- \edef\currenttopcolumnbox{\getvalue{\@@topcol\recurselevel}}%
- \let\currentcolumn=\recurselevel
- #1\relax}}
+ {\dorecurse{\nofcolumns}{\dohandlecolumn{#1}}}
+
+\def\dohandlerevcolumns#1%
+ {\dostepwiserecurse{\nofcolumns}{1}{-1}{\dohandlecolumn{#1}}}
+
+\def\dohandlemidcolumns#1%
+ {\dohandleallcolumns
+ {\ifnum\recurselevel>1\relax\ifnum\recurselevel<\nofcolumns\relax
+ \dohandlecolumn{#1}%
+ \fi\fi}}
%D Going to a new columns is done by means of a
%D \type{\ejectcolumn}. The following definition does not
@@ -352,8 +400,8 @@
{#1=\!!zeropoint
\def\doaddinsertionheight##1%
{\ifvoid##1\else
- \advance#1 by \skip##1
- \advance#1 by \ht##1
+ \advance#1 by 1\skip##1
+ \advance#1 by \ht##1
\fi}%
\doaddinsertionheight\topins
\doaddinsertionheight\botins
@@ -376,9 +424,9 @@
\advance\localcolumnwidth by -\nofcolumns\intercolumnwidth
\advance\localcolumnwidth by \intercolumnwidth
\divide\localcolumnwidth by \nofcolumns
-\dimen0=\columntextoffset
-\multiply\dimen0 by 2
-\advance\localcolumnwidth by -\dimen0
+ \dimen0=\columntextoffset
+ \multiply\dimen0 by 2
+ \advance\localcolumnwidth by -\dimen0
\usercolumnwidth=\localcolumnwidth
\hsize=\localcolumnwidth} % we don't do it \global
@@ -389,9 +437,9 @@
\def\setcolumnvsize%
{%\global\vsize=\columntextheight
-\global\vsize=-\columntextoffset
-\global\multiply\vsize by 2
-\global\advance\vsize by \columntextheight
+ \global\vsize=-\columntextoffset
+ \global\multiply\vsize by 2
+ \global\advance\vsize by \columntextheight
\ifdim\partialpageheight>\!!zeropoint
\global\advance\vsize by -\partialpageheight
\fi
@@ -466,11 +514,7 @@
\global\savedpagetotal=\pagetotal
\global\singlecolumnout=\output
\global\output={\global\setbox\partialpage=\vbox{\unvbox\normalpagebox}}%
- \bgroup
- \holdinginserts=1
- \eject
- \egroup
-% \holdinginserts=0
+ \eject % no \holdinginserts=1, can make footnote disappear !
\global\partialpageheight=\ht\partialpage
\global\output={\continuousmulticolumnsout}%
\setcolumnfloats
@@ -501,7 +545,8 @@
\def\endmulticolumns%
{%\par
\vskip\lineheight\vskip-\lineheight % take footnotes into account
- \dontshowcomposition
+ \dontshowcomposition
+\doflushcolumnfloat % added recently
\doflushcolumnfloats % added recently
\flushfootnotes
\par
@@ -532,21 +577,18 @@
\def\checkbegincolumnfootnotes%
{\ifcleverfootnotes
- \doflushfootnotes
- \ifdim\ht\footins>\!!zeropoint
+ \doflushfootnotes
+ \ifdim\ht\footins>\!!zeropoint % hm, actually unknown
\global\setbox\savedfootins=\box\footins
\else
\global\setbox\savedfootins=\box\voidb@x
\fi
- \global\skip\savedfootins=\skip\footins
- \global\count\savedfootins=\count\footins
- \setupfootnotes
\else
- \global\skip\savedfootins=\skip\footins
\global\setbox\savedfootins=\box\voidb@x
- \global\count\savedfootins=\count\footins
- \setupfootnotes
- \fi}
+ \fi
+ \global\skip\savedfootins=\skip\footins
+ \global\count\savedfootins=\count\footins
+ \setupfootnotes}
\def\checkendcolumnfootnotes%
{\ifcleverfootnotes\ifvoid\savedfootins\else
@@ -567,7 +609,7 @@
\topskip=1\topskip
\splittopskip=\topskip
\splitmaxdepth=\maxdepth
- \boxmaxdepth=\maxdepth % dangerous
+ \boxmaxdepth=\maxdepth % dangerous
\emergencystretch=\!!zeropoint\relax} % sometimes needed !
%D Flushing the page comes to pasting the columns together and
@@ -606,6 +648,70 @@
\edef\maxcolumndepth{\the\dp\currentcolumnbox}%
\fi}}
+% \def\flushcolumnedpage%
+% {\bgroup
+% \forgetall
+% \setmulticolumnsout
+% \showcomposition
+% \setmaxcolumndimensions
+% \postprocesscolumns
+% \dohandleallcolumns % \hbox i.v.m. \showcomposition
+% {\global\setbox\currentcolumnbox=\hbox to \localcolumnwidth
+% {\box\currentcolumnbox
+% \global\wd\currentcolumnbox=\localcolumnwidth
+% \ifheightencolumns
+% \global\ht\currentcolumnbox=\fixedcolumnheight
+% \fi}}%
+% \setmaxcolumndimensions
+% \overlaycolumnfootnotes
+% \setbox0=\vbox
+% {\hbox to \finalcolumntextwidth
+% {\dohandleallcolumns
+% {\finishcolumnbox{\hbox
+% {\ifx\finishcolumnbox\relax\else\strut\fi
+% \box\currentcolumnbox}}%
+% \ifnum\currentcolumn<\nofcolumns
+% \hfil
+% \fi}}}%
+% \scratchdimen=\!!zeropoint
+% \dohandleallcolumns
+% {\ifdim-\ht\currenttopcolumnbox<\scratchdimen
+% \scratchdimen=-\ht\currenttopcolumnbox
+% \fi
+% \global\setbox\currenttopcolumnbox=\box\voidb@x}%
+% \advance\scratchdimen by \ht0
+% \setbox2=\hbox to \columntextwidth
+% {\vrule\!!width\!!zeropoint\!!height\scratchdimen\!!depth\dp0
+% \dostepwiserecurse{2}{\nofcolumns}{1}{\hfil\betweencolumns}\hfil}%
+% \setbox0=\hbox
+% {\box0\hskip-\columntextwidth\color[black]{\box2}}%
+% \ifvoid\partialpage \else
+% \ifgridsnapping % do you believe this junk?
+% \scratchdimen=\savedpagetotal
+% \advance\scratchdimen by -\ht\partialpage
+% \advance\scratchdimen by -\dp\partialpage
+% \advance\scratchdimen by -\topskip
+% \box\partialpage
+% \kern\scratchdimen
+% \else
+% \unvbox\partialpage
+% \fi
+% \fi
+% \global\partialpageheight=\!!zeropoint
+% \setvsize
+% \dosomebreak\nobreak
+% \ifgridsnapping \else
+% \dimen0=\topskip
+% \advance\dimen0 by -\openstrutheight
+% \nointerlineskip
+% \vskip-\dimen0
+% \fi
+% \prevdepth\openstrutdepth
+% \nointerlineskip
+% \dp0=\!!zeropoint
+% \box0
+% \egroup}
+
\def\flushcolumnedpage%
{\bgroup
\forgetall
@@ -624,13 +730,16 @@
\overlaycolumnfootnotes
\setbox0=\vbox
{\hbox to \finalcolumntextwidth
- {\dohandleallcolumns
+ {\ifreversecolumns
+ \@EA\dohandlerevcolumns
+ \else
+ \@EA\dohandleallcolumns
+ \fi
{\finishcolumnbox{\hbox
{\ifx\finishcolumnbox\relax\else\strut\fi
\box\currentcolumnbox}}%
- \ifnum\currentcolumn<\nofcolumns
- \hfil
- \fi}}}%
+ \hfil}%
+ \unskip}}%
\scratchdimen=\!!zeropoint
\dohandleallcolumns
{\ifdim-\ht\currenttopcolumnbox<\scratchdimen
@@ -639,14 +748,14 @@
\global\setbox\currenttopcolumnbox=\box\voidb@x}%
\advance\scratchdimen by \ht0
\setbox2=\hbox to \columntextwidth
- {\vrule\!!width\!!zeropoint\!!height\scratchdimen\!!depth\dp0
+ {\vrule\!!width\!!zeropoint\!!height\scratchdimen\!!depth\dp0
\dostepwiserecurse{2}{\nofcolumns}{1}{\hfil\betweencolumns}\hfil}%
\setbox0=\hbox
{\box0\hskip-\columntextwidth\color[black]{\box2}}%
\ifvoid\partialpage \else
- \ifgridsnapping % do you believe this junk?
- \scratchdimen=\savedpagetotal
- \advance\scratchdimen by -\ht\partialpage
+ \ifgridsnapping % do you believe this junk?
+ \scratchdimen=\savedpagetotal
+ \advance\scratchdimen by -\ht\partialpage
\advance\scratchdimen by -\dp\partialpage
\advance\scratchdimen by -\topskip
\box\partialpage
@@ -664,7 +773,7 @@
\nointerlineskip
\vskip-\dimen0
\fi
- \prevdepth\openstrutdepth
+ \prevdepth\openstrutdepth
\nointerlineskip
\dp0=\!!zeropoint
\box0
@@ -672,7 +781,7 @@
%D In case one didn't notice, finaly \type{\finishcolumnbox} is
%D applied to all boxes. One can use these hooks for special
-%D purposes. But there is more:
+%D purposes.
%D
%D Once upon a time I wanted to manipulate the individual lines
%D in a column. This feature is demonstrated in the two examples
@@ -750,6 +859,15 @@
\let\postprocesscolumnline=\undefined
\let\postprocesscolumnbox =\undefined
+%D \macros
+%D {reversecolumnstrue}
+%D
+%D We can force the macro that takes care of combining
+%D the columns, to flush them in the revere order. Of
+%D course, by default we don't reverse.
+
+\newif\ifreversecolumns
+
%D Here comes the simple splitting routine. It's a bit
%D longer than expected because of ragging bottoms or not.
%D This part can be a bit shorter but I suppose that I will
@@ -865,8 +983,8 @@
\ifcleverfootnotes
\ifnum#1=\lastcolumnbox
\ifdim\ht\footins>\!!zeropoint
- \vskip\skip\footins
- \vskip\ht\footins
+ \vskip1\skip\footins % remove stretch and shrink
+ \kern\ht\footins % a \vskip would be is discarded!
\fi
\fi
\fi}
@@ -912,7 +1030,7 @@
\def\continuousmulticolumnsout%
{\bgroup
-\forgetall
+ \forgetall
\setmulticolumnsout
\dontshowcomposition
\dimen0=\columntextheight
@@ -930,15 +1048,22 @@
{\splitcurrentcolumn from \box\normalpagebox to \dimen0}
\setbox\restofpage=\vbox{\unvbox\normalpagebox}%
\ifinheritcolumns
- \ifr@ggedbottom
+ \ifr@ggedbottom % vreemd
+%\ifbottomnotes % can better be a state
\dohandleallcolumns
- {\global\setbox\currentcolumnbox=\vbox to \dimen0
+ {\global\setbox\currentcolumnbox=\vbox to \ht\firstcolumnbox
{\dimen0=\dp\currentcolumnbox
\unvbox\currentcolumnbox
\vskip-\dimen0
\vskip\openstrutdepth % \dp\strutbox
\prevdepth\openstrutdepth % \dp\strutbox
\vfill}}%
+%\else
+% \dimen0=\ht\firstcolumnbox
+%\fi
+\ifbottomnotes \else
+ \dimen0=\ht\firstcolumnbox
+\fi
\fi
\ifn@rmalbottom
\advance\dimen0 by \maxdepth
@@ -970,6 +1095,8 @@
% \penalty\outputpenalty % gaat gruwelijk mis in opsommingen
\egroup}
+
+
%D And this is the balancing stuff. Again, part of the routine
%D is dedicated to handling ragged bottoms, but here we also
%D see some handling concerning the stretching of columns.
@@ -1010,12 +1137,14 @@
\setbox2=\vbox{\unvcopy\firstcolumnbox}%
\dimen4=\!!zeropoint
\dohandleallcolumns
- {\setbox4=\vbox{\unvcopy\currentcolumnbox
-% rather new, test this on pdftex-z.tex
-\unpenalty\unskip\unpenalty\unskip}% maybe better in main splitter
-%\writestatus{balance}{\the\currentcolumnbox: \the\ht4}%
- \dimen6=\ht4
- \ifdim\dimen6>\dimen4 \dimen4=\dimen6 \fi}%
+ {\setbox4=\vbox
+ {\unvcopy\currentcolumnbox
+ %rather new, test this on pdftex-z.tex
+ \unpenalty\unskip\unpenalty\unskip}% maybe better in main splitter
+ %\writestatus{balance}{\the\currentcolumnbox: \the\ht4}%
+ \dimen6=\ht4
+ \ifdim\dimen6>\dimen4 \dimen4=\dimen6 \fi}%
+\advance\dimen4 by -.0005pt % get rid of accurracy problem, pretty new
\ifnum\count255>100\relax
\donefalse
\else\ifdim\dimen4>\ht2
@@ -1154,7 +1283,8 @@
\let\flushcolumnfloats=\noflushcolumnfloats}
\def\setlocalcolumnfloats%
- {\everypar={\flushfootnotes\flushcolumnfloat\flushmargincontents\checkindentation}
+ {\everypar=
+ {\flushfootnotes\flushcolumnfloat\flushmargincontents\checkindentation}%
\let\flushcolumnfloat=\doflushcolumnfloat
\let\doroomfloat=\docolumnroomfloat
\let\flushcolumnfloats=\doflushcolumnfloats
@@ -1262,13 +1392,13 @@
\else
\bgroup
\getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\%
- \advance\dimen0 by 2\openlineheight % nog nodig ?
+ \advance\dimen0 by 2\openlineheight % nog nodig ?
%\ifnum\count255=\nofcolumns
% \getinsertionheight
% %\message{\insertionheight}\wait
-% \advance\dimen0 by \insertionheight
+% \advance\dimen0 by \insertionheight
%\fi
- \setbox\scratchbox=\vbox
+ \setbox\scratchbox=\vbox % tricky met objecten ?
{\blanko[\@@bkvoorwit]
\snaptogrid\vbox{\copy\floatbox}}%
\advance\dimen0 by \ht\scratchbox
@@ -1303,11 +1433,14 @@
\ifdim\wd\floatbox>\hsize
\doresavefloat
\else
+% \setbox2=\vbox
+% {\blanko[\@@bkvoorwit]
+% \snaptogrid\vbox{\copy\floatbox}%
+% \blanko[\@@bknawit]
\setbox2=\vbox
{\blanko[\@@bkvoorwit]
- \snaptogrid\vbox{\copy\floatbox}%
- \blanko[\@@bknawit]}%
- \advance\dimen0 by \ht2
+ \snaptogrid\vbox{\copy\floatbox}}%
+ \advance\dimen0 by \ht2
\ifdim\dimen0>\dimen2
\ifnum\count255<\nofcolumns
\advance\count255 by 1
@@ -1336,7 +1469,9 @@
\par
\ifdim\prevdepth<\!!zeropoint\relax % anders bovenaan kolom witruimte
\else
+\nobreak
\blanko[\@@bkvoorwit]
+\nobreak
\fi
\flushfloatbox
\blanko[\@@bknawit]
@@ -1383,6 +1518,8 @@
\advance\dimen0 by \intercolumnwidth
\dimen2=\hsize
\advance\dimen2 by \intercolumnwidth
+\advance\dimen0 by .5pt
+\advance\dimen2 by .5pt
\divide\dimen0 by \dimen2
\count0=\dimen0
\advance\count0 by 1
@@ -1394,7 +1531,12 @@
\advance\dimen0 by \count0\intercolumnwidth
\advance\dimen0 by -\intercolumnwidth
\global\setbox\floatbox=\hbox to \dimen0
- {\hss\hbox{\copy\floatbox}\hss}%
+ %{\hss\hbox{\copy\floatbox}\hss}%
+ {\processaction[\@@bkplaats] % how easy to forget
+ [ \v!links=>\copy\floatbox\hss,
+ \v!rechts=>\hss\copy\floatbox,
+ \s!default=>\hss\copy\floatbox\hss,
+ \s!unknown=>\hss\copy\floatbox\hss]}%
\fi
\showmessage{\m!columns}{13}{}%
\else
@@ -1438,3 +1580,13 @@
\protect
\endinput
+
+% border case, should fit on one page
+%
+% \startkolommen
+%
+% 1 \input tufte \par \plaatsfiguur{}{\omlijnd[breedte=\hsize,hoogte=3cm]{1}}
+% 2 \input tufte \par \plaatsfiguur{}{\omlijnd[breedte=\hsize,hoogte=3cm]{2}}
+% 3 \input tufte \par \plaatsfiguur{}{\omlijnd[breedte=\hsize,hoogte=3cm]{3}}
+%
+% \stopkolommen
diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex
index 55a5b5a44..49f7f9794 100644
--- a/tex/context/base/core-nav.tex
+++ b/tex/context/base/core-nav.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Navigation}
@@ -40,16 +40,16 @@
%D
%D The other settings are:
%D
-%D \showsetup{\y!stelinteractiein}
+%D \showsetup{\y!setupinteraction}
%D
%D In the special driver modules we introduced a switch that
%D forces page destinations (instead of named ones). We set
%D this switch here.
-\def\stelinteractiein%
- {\dosingleargument\dostelinteractiein}
+\def\setupinteraction%
+ {\dosingleargument\dodosetupinteraction}
-\def\dostelinteractiein[#1]%
+\def\dodosetupinteraction[#1]% % \dosetupinteraction == special
{\getparameters[\??ia][#1]%
\dosetuppageview{\@@iascherm}%
\doifelse{\@@iastatus}{\v!start}
@@ -61,9 +61,17 @@
\showmessage{\m!interactions}{3}{\ifusepagedestinations\space(PAGE)\fi}%
\global\locationfalse
\fi}%
+ \doifsomething{\@@iabereken}
+ {\doregistercalculationset\@@iabereken}%
\doifelse{\@@iastrut}{\v!ja}
{\locationstruttrue}
{\locationstrutfalse}%
+ \doifelse{\@@iaklik}{\v!ja}
+ {\highlighthyperlinkstrue}
+ {\highlighthyperlinksfalse}%
+ \doifelse{\@@iascherm}{\v!nieuw}
+ {\gotonewwindowtrue}
+ {\gotonewwindowfalse}%
\doifelse{\@@iapagina}{\v!ja}
{\global\usepagedestinationstrue}
{\global\usepagedestinationsfalse}}
@@ -73,7 +81,7 @@
\def\dolocationstartup%
{\iflocation
\dosetupinteraction
- \handlereferenceactions\@@iaopenactie\dosetupopenaction
+ \handlereferenceactions\@@iaopenactie \dosetupopenaction
\handlereferenceactions\@@iasluitactie\dosetupcloseaction
\setupinteractionscreens
\global\let\dolocationstartup=\relax
@@ -81,6 +89,14 @@
\appendtoks \dolocationstartup \to \everyshipout
+\def\dolocationpagecheck%
+ {\iflocation
+ \handlereferenceactions\@@iaopenpaginaactie \doPDFsetupopenpageaction
+ \handlereferenceactions\@@iasluitpaginaactie\doPDFsetupclosepageaction
+ \fi}
+
+\appendtoks \dolocationpagecheck \to \everyshipout
+
%D The next few macros are really horrible. For proper
%D navigation a in||line hypertext fragment must have
%D comfortable properties, so we must force some minimal
@@ -292,15 +308,20 @@
%
% \definereference [AtOpenInitializeForm] [\v!geen]
-\stelinteractiein % start fit page and reset form
+\setupinteraction % start fit page and reset form
[\c!status=\v!stop,
\c!pagina=\v!nee,
+ \c!klik=\v!ja,
+ \c!scherm=,
%\c!openactie={\v!eerstepagina,AtOpenInitializeForm},
\c!openactie={\v!eerstepagina,\v!ResetForm},
\c!sluitactie=,
+ \c!openpaginaactie=,
+ \c!sluitpaginaactie=,
\c!scherm=\v!passend,
\c!menu=\v!uit,
\c!letter=\v!vet,
+ \c!bereken=,
\c!strut=\v!ja,
\c!kleur=interactioncolor,
\c!contrastkleur=interactioncontrastcolor,
diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex
index 2b8b9eb0e..6e02e0144 100644
--- a/tex/context/base/core-new.tex
+++ b/tex/context/base/core-new.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / New Ones}
@@ -31,6 +31,8 @@
% \startnotmode [list]
% \stopnotmode
+% to be implemented: mode naar texutil/scherm + message
+
\let\currentmode=\empty
\def\enablemode[#1]%
@@ -68,7 +70,128 @@
\long\def\dostartnotmode[#1]#2\stopnotmode%
{\dodoifnotmode{#1}{#2}}
-
+
+% actually this is pretty old, but temporary moved here
+
+\installdiscretionaries || \@@kpteken
+
+\newsignal\subsentencesignal
+\newcounter\subsentencelevel
+\def\subsentenceskip{.25em\relax}
+
+\def\stelkoppeltekenin%
+ {\dodoubleargument\getparameters[\??kp]}
+
+\def\beginofsubsentence%
+ {\ifdim\lastkern=\subsentencesignal
+ \unskip
+ \kern\subsentenceskip
+ \fi
+ \doglobal\increment\subsentencelevel
+ \ifnum\subsentencelevel=1
+ \leaveoutervmode
+ \fi
+ \ifodd\subsentencelevel
+ \getvalue{\??la\currentlanguage\c!leftsentence}%
+ \else
+ \getvalue{\??la\currentlanguage\c!leftsubsentence}%
+ \fi
+ \ignorespaces}
+
+\def\beginofsubsentencespacing%
+ {\kern\subsentencesignal\ignorespaces}
+
+\def\endofsubsentence%
+ {\ifodd\subsentencelevel
+ \getvalue{\??la\currentlanguage\c!rightsentence}%
+ \else
+ \getvalue{\??la\currentlanguage\c!rightsubsentence}%
+ \fi
+ \doglobal\decrement\subsentencelevel
+ \unskip
+ \kern\subsentencesignal}
+
+\def\endofsubsentencespacing%
+ {%\ifdim\lastkern=\subsentencesignal \else
+ % \unskip
+ %\fi
+ \ifdim\lastkern=\subsentencesignal
+ \unskip
+ \hskip\subsentenceskip
+ \ignorespaces
+ \else
+ \unskip
+ \fi}
+
+% test |<|test |<|test|>| test|>| test \par
+% test|<|test|<|test|>|test|>|test \par
+% test |<||<|test|>||>| test \par
+
+\enableactivediscretionaries
+
+%D new and beta
+
+\def\defineshortcut%
+ {\dodoubleargument\dodefineshortcut}
+
+\bgroup
+
+ \catcode`\<=\@@active
+
+ \gdef\dodefineshortcut[#1][#2]%
+ {\ifsecondargument
+ \catcode`\<=\@@active
+ \def<{\ifmmode\expandafter\normalless\else\expandafter\doshortcut\fi}%
+ \getparameters[\??te#1][\c!commandos=,\c!commando=,\c!letter=,\c!kleur=,#2]%
+ \else
+ \defineshortcut[][#1]%
+ \fi}
+
+\egroup
+
+\def\doshortcut%
+ {\bgroup
+ \catcode`\>=\@@other
+ \dodoshortcut}
+
+\def\dodoshortcut#1>%
+ {\def\shortcut{#1}%
+ \dododoshortcut#1:\end}
+
+\def\dododoshortcut#1:#2\end
+ {\doifelsenothing{#2}
+ {\doifundefinedelse{\??te\c!commandos}
+ {\shortcut}
+ {\@EA\dodododoshortcut\@EA\??te\@EA:\shortcut:\end}}
+ {\doifundefinedelse{\??te#1\c!commandos}
+ {\shortcut}
+ {\dodododoshortcut\??te#1:#2\end}}%
+ \egroup}
+
+\def\dodododoshortcut#1:#2:\end
+ {\getvalue{#1\c!commandos}%
+ \doattributes{#1}\c!letter\c!kleur{\getvalue{#1\c!commando}{#2}}}
+
+%D \defineshortcut [\c!letter=\v!type]
+%D \defineshortcut [b] [\c!letter=\v!vet]
+%D \defineshortcut [e] [\c!letter=\em]
+%D \defineshortcut [t] [\c!letter=\v!type]
+%D \defineshortcut [c] [\c!letter=\v!kap]
+%D \defineshortcut [k] [\c!letter=\v!kap]
+%D \defineshortcut [u] [\c!letter=\v!type,\c!commando=\hyphenatedurl]
+%D
+%D test <ziezo> test \par
+%D test test <t:ziezo> \par
+%D test test <b:ziezo> \par
+%D test test <w:ziezo> \par
+%D zus<>zo zus<:>zo zus<::>zo \par
+%D test test <t:ziezo> dat (ziezo) \par
+%D test test <t::ziezo> dat (:ziezo) \par
+%D test test <t:ziezo:> dat (ziezo:) \par
+%D test test <t:zi:ezo:> dat (zi:ezo:) \par
+%D well, <u:http://www.pragma-ade.nl> looks fuzzy \par
+%D $10<20$
+
\protect
\endinput
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index ed923b4ee..3bf022fed 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Footnote Handling}
@@ -18,6 +18,8 @@
\unprotect
+% splitskips setten
+
%D Footnotes are can be characterized by three components:
%D
%D \startopsomming[opelkaar]
@@ -61,7 +63,8 @@
%D rearanged paragraph, typeset by the algoritms on pages 398
%D and~389. We definitely did not reinvent that wheel.
-\newif\ifendnotes \endnotesfalse
+\newif\ifendnotes \endnotesfalse
+\newif\ifbottomnotes \bottomnotestrue
%D The footnoterule can be a graphic and therefore calling this
%D setup macro at every skipswitch is tricky (many many MP
@@ -94,22 +97,29 @@
\def\setupfootnotes%
{\dosingleempty\dosetupfootnotes}
+\def\dodofootnoterule%
+ {\color
+ [\@@vnlijnkleur]
+ {\hrule\!!width.2\hsize\!!height\@@vnlijndikte\!!depth\!!zeropoint}
+ \kern\strutdepth}
+
\def\dosetupfootnotes[#1]%
{\getparameters[\??vn][#1]%
\processaction
[\@@vnlijn]
- [ \v!aan=>\def\footnoterule{\hrule \!!width .2\hsize},
- \v!uit=>\let\footnoterule=\relax,
- \s!unknown=>\let\footnoterule=\@@vnlijn]%
+ [ \v!aan=>\let\dofootnoterule=\dodofootnoterule,
+ \v!uit=>\let\dofootnoterule=\relax,
+ \s!default=>\let\dofootnoterule=\relax,
+ \s!unknown=>\let\dofootnoterule=\@@vnlijn]%
\setbox0=\vbox
{\forgetall
\@@vnvoor
- \footnoterule
+ \dofootnoterule
\@@vnna}%
\skip\footins=\ht0
\count\footins=1000
\setbox0=\box\voidb@x % \somehow \box0 is used
- \doifelse{\@@vnplaats}{\v!kolommen}
+ \ExpandBothAfter\doifinsetelse{\v!kolommen}{\@@vnplaats}
{\cleverfootnotestrue % global ?
\ifnum\@@kln=0
\scratchcounter=1
@@ -118,6 +128,7 @@
%\divide\count\footins by \scratchcounter
\fi
\global\endnotesfalse
+ \global\bottomnotestrue
\setcleverfootnotes}
{\cleverfootnotesfalse
\ifnum\@@vnn=0
@@ -128,9 +139,13 @@
\scratchcounter=\@@vnn\relax
\divide\count\footins by \scratchcounter
\fi
- \doifelse{\@@vnplaats}{\v!pagina}
- {\global\endnotesfalse}
+ \ExpandBothAfter\doifinsetelse{\v!pagina}{\@@vnplaats}
+ {\global\endnotesfalse
+ \ExpandBothAfter\doifinsetelse{\v!hoog}{\@@vnplaats}
+ {\global\bottomnotesfalse}
+ {\global\bottomnotestrue}}
{\global\endnotestrue
+ \global\bottomnotestrue
\postponefootnotes}}%
\dimen\footins=\@@vnhoogte
\multiply\dimen\footins by \scratchcounter}
@@ -247,15 +262,58 @@
%D \stoptypen
%D
%D which can be handy while for instance typesetting tables
-%D of contents.
+%D of contents. The pagewise footnote numbering is dedicated
+%D to Han The Thanh, who needed it first.
+
+%\newif\iffootnotesenabled \footnotesenabledtrue
+%
+%\def\dofootnote#1%
+% {\iffootnotesenabled
+% \doifelse{#1}{-}
+% {\let\footnotenumber=\empty}
+% {\verhoognummer[\v!voetnoot]%
+% \maakhetnummer[\v!voetnoot]%
+% \rawtextreference{\s!fnt}{#1}{\hetnummer}%
+% \let\footnotenumber=\hetnummer}%
+% \expandafter\dostartfootnote
+% \else
+% \expandafter\gobbleoneargument
+% \fi}
\newif\iffootnotesenabled \footnotesenabledtrue
+\newconditional\pagewisefootnotes % saves two hash entries
+
+\def\lastfootnotepage{1}
+
+\def\domovednote#1#2%
+ {\ifconditional\pagewisefootnotes
+ \doifreferencefoundelse{\s!fnt:t:\internalfootreference}
+ {\let\savedrealreference\currentrealreference
+ \doifreferencefoundelse{\s!fnt:f:\internalfootreference}
+ {\ifnum\savedrealreference<\currentrealreference\relax\symbol[#1]\else
+ \ifnum\savedrealreference>\currentrealreference\relax\symbol[#2]\fi\fi}
+ {}}
+ {}
+ \fi}
+
\def\dofootnote#1%
{\iffootnotesenabled
+ \doglobal\increment\internalfootreference
+ \doifelse{\@@vnwijze}{\v!per\v!pagina}
+ {\settrue\pagewisefootnotes}
+ {\setfalse\pagewisefootnotes}%
\doifelse{#1}{-}
{\let\footnotenumber=\empty}
- {\verhoognummer[\v!voetnoot]%
+ {\ifconditional\pagewisefootnotes
+ \doifreferencefoundelse{\s!fnt:t:\internalfootreference}
+ {\ifnum\currentrealreference>\lastfootnotepage\relax
+ \global\let\lastfootnotepage\currentrealreference
+ \resetnummer[\v!voetnoot]%
+ \fi}
+ {}%
+ \fi
+ \verhoognummer[\v!voetnoot]%
\maakhetnummer[\v!voetnoot]%
\rawtextreference{\s!fnt}{#1}{\hetnummer}%
\let\footnotenumber=\hetnummer}%
@@ -295,34 +353,45 @@
\hoog{\kern\@@vnafstand}% gets the font right, hack !
\fi
\ignorespaces
- \doglobal\increment\internalfootreference
\nobreak
\iflocation
- \naarbox{\hoog{\footnotenumber}}[\s!fnt:t:\internalfootreference]%
+ \naarbox
+ {\hoog{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}}
+ [\s!fnt:t:\internalfootreference]%
\rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}%
\else
- \hoog{\footnotenumber}%
+ \hoog{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}%
+ \ifconditional\pagewisefootnotes
+ \rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}%
+ \fi
\fi
\localfootinsert\footins\bgroup
\forgetall
\setfootnotebodyfont
\redoconvertfont % to undo \undo calls in in headings etc
- \interlinepenalty=\interfootnotelinepenalty
\splittopskip\ht\strutbox % not actually needed here
\splitmaxdepth\dp\strutbox % not actually needed here
\def\linkermargeafstand{\@@vnmargeafstand}%
\def\rechtermargeafstand{\@@vnmargeafstand}%
+ \ifcase\@@vnn\relax % new 31-07-99 ; always ?
+ \doifnotinset{\@@vnbreedte}{\v!passend,\v!ruim}{\hsize\@@vnbreedte}%
+ \fi
\startpushfootnote
{\ifx\footnotenumber\empty \else
\iflocation
- \naarbox{\@@vnnummercommando\footnotenumber}[\s!fnt:f:\internalfootreference]%
+ \naarbox{\@@vnnummercommando
+ {\footnotenumber\domovednote\v!volgendepagina\v!vorigepagina}}%
+ [\s!fnt:f:\internalfootreference]%
\else
- \@@vnnummercommando\footnotenumber
+ \@@vnnummercommando
+ {\footnotenumber\domovednote\v!volgendepagina\v!vorigepagina}%
\fi
\fi
\iflocation
\rawreference{\s!fnt}{\s!fnt:t:\internalfootreference}{}%
- \fi}%
+ \else\ifconditional\pagewisefootnotes
+ \rawreference{\s!fnt}{\s!fnt:t:\internalfootreference}{}%
+ \fi\fi}%
\bgroup
\aftergroup\dostopfootnote
\begstrut
@@ -349,7 +418,7 @@
{\iffootnotesenabled
\bgroup
\unskip
- \naarbox{\hoog{\currenttextreference}}[#1]%
+ \naarbox{\hoog{\tx\currenttextreference}}[#1]%
\egroup
\fi}
@@ -361,27 +430,56 @@
\let\startpopfootnotes = \relax
\let\stoppopfootnotes = \relax
+% \def\placefootnoteinserts%
+% {%\ifvoid\footins \else % unsafe, strange
+% \ifdim\ht\footins>\!!zeropoint\relax
+% \ifendnotes \else
+% \@@vnvoor
+% \dofootnoterule % alleen in ..mode
+% \bgroup
+% \setfootnotebodyfont
+% \localframed
+% [\??vn]
+% [\c!breedte=\v!passend,
+% \c!hoogte=\v!passend,
+% \c!strut=\v!nee,
+% \c!offset=\v!overlay]
+% {\startpopfootnotes % == \vbox
+% \ifdim\dp\footins=\!!zeropoint % this hack is needed because \vadjust
+% \hbox{\lower\dp\strutbox\box\footins}% % in margin number placement
+% \else % hides the (always) present depth
+% \box\footins
+% \fi
+% \stoppopfootnotes}%
+% \egroup
+% \@@vnna
+% \fi
+% \fi}
+
\def\placefootnoteinserts%
{%\ifvoid\footins \else % unsafe, strange
\ifdim\ht\footins>\!!zeropoint\relax
\ifendnotes \else
\@@vnvoor
- \footnoterule % alleen in ..mode
+ \dofootnoterule % alleen in ..mode
\bgroup
\setfootnotebodyfont
+ \setbox0=\hbox
+ {\startpopfootnotes
+ \setfootnotebodyfont
+ \ifcase\@@vnn\unvbox\else\box\fi\footins
+ \stoppopfootnotes}%
\localframed
[\??vn]
[\c!breedte=\v!passend,
\c!hoogte=\v!passend,
\c!strut=\v!nee,
- \c!offset=\v!overlay]
- {\startpopfootnotes % == \vbox
- \ifdim\dp\footins=\!!zeropoint % this hack is needed because \vadjust
- \hbox{\lower\dp\strutbox\box\footins}% % in margin number placement
- \else % hides the (always) present depth
- \box\footins
- \fi
- \stoppopfootnotes}%
+ \c!offset=\v!overlay]
+ {\ifdim\dp0=\!!zeropoint % this hack is needed because \vadjust
+ \hbox{\lower\dp\strutbox\box0}% % in margin number placement
+ \else % hides the (always) present depth
+ \box0
+ \fi}%
\egroup
\@@vnna
\fi
@@ -439,16 +537,24 @@
\unvbox\postponedfootnotes
\gobbletwoarguments}}
-\def\doflushfootnotes%
- {\bgroup
- \scratchdimen=\pagegoal
- \advance\scratchdimen by -\pagetotal
- \ifdim\scratchdimen<\ht\postponedfootnotes
- \message{[moved footnote]}%
- \fi
- \egroup
- \global\let\localfootinsert=\insert
- \insert\footins\bgroup\unvbox\postponedfootnotes\egroup}
+\def\doflushfootnotes% also called directly, \ifvoid is needed !
+ {\ifendnotes \else
+ \ifvoid\postponedfootnotes
+ \global\let\localfootinsert=\insert
+ \else
+ \bgroup
+ \ifdim\ht\postponedfootnotes>\!!zeropoint
+ \scratchdimen=\pagegoal
+ \advance\scratchdimen by -\pagetotal
+ \ifdim\scratchdimen<\ht\postponedfootnotes
+ \message{[moved footnote]}%
+ \fi
+ \fi
+ \egroup
+ \global\let\localfootinsert=\insert
+ \insert\footins\bgroup\unvbox\postponedfootnotes\egroup
+ \fi
+ \fi}
\def\flushfootnotes%
{\ifinpagebody \else \ifinner \else
@@ -478,7 +584,7 @@
\endofshapebox
\reshapebox{\hbox{\unhbox\shapebox}}%
\vbox{\flushshapebox}}}%
- \localframed
+ \localframed
[\??vn]
[\c!breedte=\v!passend,
\c!hoogte=\v!passend,
@@ -502,6 +608,8 @@
%D \showsetup{\y!startlocalfootnotes}
%D \showsetup{\y!placelocalfootnotes}
+\def\defaultfootnotewidth{\zetbreedte}
+
\newbox\localpostponedfootnotes
\def\collectlocalfootnotes%
@@ -514,6 +622,8 @@
\def\dostartlocalfootnotes[#1]%
{\let\autopostponefootnotes=\postponefootnotes
\let\postponefootnotes=\collectlocalfootnotes
+ \def\defaultfootnotewidth%
+ {\ifdim\hsize<\zetbreedte\hsize\else\zetbreedte\fi}%
\setupfootnotes[#1]%
\savenumber[\v!voetnoot]%
\resetnummer[\v!voetnoot]%
@@ -616,7 +726,8 @@
%D we already used a footnote specific font setting macro.
\def\setfootnotebodyfont%
- {\restoreglobalbodyfont
+ {\let\setfootnotebodyfont\relax
+ \restoreglobalbodyfont
\switchtobodyfont[\@@vnkorps]}
%D The footnote mechanism defaults to a traditional one
@@ -634,11 +745,15 @@
\c!letter=,
\c!kleur=,
\c!na=,
+ \c!lijnkleur=,
+ \c!lijndikte=\linewidth,
\c!kader=\v!uit,
\c!margeafstand=.5em,
\c!kolomafstand=1em,
\c!afstand=.125em,
- \c!breedte=\zetbreedte,
+ %\c!breedte=\zetbreedte,
+ %\c!breedte=\ifdim\hsize<\zetbreedte\hsize\else\zetbreedte\fi,
+ \c!breedte=\defaultfootnotewidth,
\c!hoogte=\teksthoogte,
\c!nummercommando=\hoog,
\c!n=1]
diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex
index 3b886d33f..8c6d0e079 100644
--- a/tex/context/base/core-obj.tex
+++ b/tex/context/base/core-obj.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Object Handling}
@@ -30,6 +30,14 @@
31: doppeltes Object --
\stopmessages
+\startmessages czech library: references
+ 30: neznamy objekt --
+ 31: duplicitni object --
+\stopmessages
+
+%D \macros
+%D {setobject,getobject,ifinobject}
+%D
%D Boxes can be considered reuable objects. Unfortunaltely once
%D passed to the \DVI\ file, such objects cannot be reused. In
%D \PDF\ however, reusing is possible and sometimes even a
@@ -37,8 +45,7 @@
%D
%D During the \TEX\ processing run, boxes can serve the purpose
%D of objects, and the \DVI\ driver module implements objects
-%D using boxes. Only when \ETEX\ is widespread, and therefore
-%D the limit on 256 boxes is removed, this becomes useful.
+%D using packed boxes.
%D
%D The \PDF\ and \PDFTEX\ driver modules implement objects
%D using \PDF\ forms. There is no (real) restriction on the
@@ -53,9 +60,16 @@
%D \setobject{class}{name}\somebox{}
%D \getobject{class}{name}
%D \stoptypen
-%D
-%D Here \type{\somebox} can be whatever box specification
-%D suits \TEX.
+%D
+%D Here \type{\somebox} can be whatever box specification suits
+%D \TEX. We save the dimensions of an object, although some
+%D drivers will do so themselves. This means that when for
+%D instance using \PDFTEX\ we could save a hash entry plus some
+%D 20+ memory locations per object by delegating this
+%D housekeeping to the driver. The current approach permits
+%D us to keep the box characteristic too.
+
+\newif\ifinobject
\def\presetobject#1#2%
{\doifundefined{\r!object#1::#2}
@@ -71,26 +85,33 @@
{#1}{#2}}
\def\dosetobject#1#2%
- {\dowithnextbox
+ {\bgroup
+ \inobjecttrue
+ \dowithnextbox
{\bgroup
\dontshowcomposition % rather fuzzy in \setxvalue ... \hbox
\setxvalue{\r!object#1::#2}%
{\noexpand\dohandleobject{#1}{#2}
{\ifhbox\nextbox\hbox\else\vbox\fi}
- {\the\wd\nextbox}{\the\ht\nextbox}{\the\dp\nextbox}}%
- \dostartobject{#1}{#2}
+ %{\the\wd\nextbox}{\the\ht\nextbox}{\the\dp\nextbox}}%
+ {\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}}%
+ \dostartobject
+ {#1}{#2}
{\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}%
\box\nextbox
\dostopobject
+ \egroup
\egroup}}
\def\dogetobject#1#2#3#4#5#6%
{\initializepaper
\bgroup
\dontshowcomposition
- \setbox0=\vbox to #5{\vfill\doinsertobject{#1}{#2}}%
+% \setbox0=\vbox to #5{\vfill\doinsertobject{#1}{#2}}%
+ \setbox0=\vbox to #5sp{\vfill\doinsertobject{#1}{#2}}%
\setbox0=#3{\box0}%
- \wd0=#4\ht0=#5\dp0=#6\relax
+% \wd0=#4\ht0=#5\dp0=#6\relax
+ \wd0=#4sp\ht0=#5sp\dp0=#6sp%
\box0
\egroup}
@@ -104,13 +125,16 @@
%D \getobjectdimensions{class}{name}
%D \stoptypen
%D
-%D The results are reproted in \type {\objectwidth}, \type
+%D The results are reported in \type {\objectwidth}, \type
%D {\objectheight} and \type {\objectdepth}.
\def\dogetobjectdimensions#1#2#3#4#5#6%
- {\def\objectwidth {#4}%
- \def\objectheight{#5}%
- \def\objectdepth {#6}}
+% {\def\objectwidth {#4}%
+% \def\objectheight{#5}%
+% \def\objectdepth {#6}}
+ {\def\objectwidth {#4sp}%
+ \def\objectheight{#5sp}%
+ \def\objectdepth {#6sp}}
\def\getobjectdimensions#1#2%
{\let\dohandleobject\dogetobjectdimensions
@@ -119,9 +143,13 @@
\let\objectdepth \!!zeropoint
\getvalue{\r!object#1::#2}}
-%D We keep track of object references by means of the cross
-%D reference mechanism. Normally, objects are defined before
-%D they are used, but forward referencing sometimes occurs.
+%D Apart from this kind of objects, that have typeset content,
+%D we can have low level driver specific objects. Both types
+%D can have references to internal representations, hidden for
+%D the user. We keep track of such references by means of a
+%D dedicated cross reference mechanism. Normally, objects are
+%D defined before they are used, but forward referencing
+%D sometimes occurs.
%D
%D \starttypen
%D \dosetobjectreference {class} {identifier} {reference value}
@@ -181,7 +209,7 @@
\def\setreferenceobject%
{\global\objectreferencingtrue\normalsetobject}
-%D \macro
+%D \macros
%D {doifobjectfoundelse,doifobjectreferencefoundelse}
%D
%D To prevent redundant definition of objects, one can use
@@ -199,7 +227,7 @@
{\checkobjectreferences
\doifundefinedelse{\r!driver#1::#2}{#4}{#3}}
-%D \macro
+%D \macros
%D {doifobjectssupportedelse}
%D
%D Starting with reuse of graphics, we will implement object
diff --git a/tex/context/base/core-pag.tex b/tex/context/base/core-pag.tex
index 9e6ba430d..68d94c50d 100644
--- a/tex/context/base/core-pag.tex
+++ b/tex/context/base/core-pag.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Pagebody Building}
@@ -23,74 +23,182 @@
\newif\ifmirrorarranged
\newif\ifdoublearranged
+\newif\ifarrangingdisabled
+
\def\arrangedrotationO{0}
\def\arrangedrotationE{0}
\newcounter\arrangedpageN
+
\chardef\arrangedpageT=1
+\chardef\arrangedpageX=1
+\chardef\arrangedpageY=1
+
+\def\calculatepaperoffsets#1%
+ {\scratchdimen=\getvalue{\??pp#1\c!offset}%
+ \divide\scratchdimen by \arrangedpageX
+ \global\advance\papierbreedte by -2\scratchdimen
+ \scratchdimen=\getvalue{\??pp#1\c!offset}%
+ \divide\scratchdimen by \arrangedpageY
+ \global\advance\papierhoogte by -2\scratchdimen}
\def\stelarrangerenin[#1]%
- {\global\negatearrangedfalse
- \global\mirrorarrangedfalse
- \global\doublearrangedfalse
- \gdef\arrangedrotationO{0}%
- \gdef\arrangedrotationE{180}%
- \global\arrangingpagestrue
- \processallactionsinset
- [#1]
- [ \v!gespiegeld=>\global\mirrorarrangedtrue,
- \v!dubbelzijdig=>\global\doublearrangedtrue,
- \v!negatief=>\global\negatearrangedtrue,
- \v!geroteerd=>\gdef\arrangedrotationO{90}\gdef\arrangedrotationE{270},
- 90=>\gdef\arrangedrotationO{90}\gdef\arrangedrotationE{270},
- 180=>\gdef\arrangedrotationO{180}\gdef\arrangedrotationE{0},
- 270=>\gdef\arrangedrotationO{270}\gdef\arrangedrotationE{90},
- 2*8=>\global\chardef\arrangedpageX=4
- \global\chardef\arrangedpageY=2
- \global\chardef\arrangedpageT=8
- \global\chardef\horizontalcutmarks=5
- \global\chardef\verticalcutmarks=3
- \global\let\pusharrangedpage=\pusharrangedpageSIXTEEN
- \global\let\poparrangedpages=\poparrangedpagesAB,
- 2*4=>\global\chardef\arrangedpageX=2
- \global\chardef\arrangedpageY=2
- \global\chardef\arrangedpageT=4
- \global\chardef\horizontalcutmarks=3
- \global\chardef\verticalcutmarks=3
- \global\let\pusharrangedpage=\pusharrangedpageEIGHT
- \global\let\poparrangedpages=\poparrangedpagesAB,
- 2*2=>\global\chardef\arrangedpageX=2
- \global\chardef\arrangedpageY=1
- \global\chardef\arrangedpageT=2
- \global\chardef\horizontalcutmarks=3
- \global\chardef\verticalcutmarks=2
- \global\let\pusharrangedpage=\pusharrangedpageFOUR
- \global\let\poparrangedpages=\poparrangedpagesAB,
- 2UP=>\global\chardef\arrangedpageX=2
- \global\chardef\arrangedpageY=1
- \global\chardef\arrangedpageT=4
- \global\chardef\horizontalcutmarks=3
- \global\chardef\verticalcutmarks=2
- \global\let\handlearrangedpage=\handlearrangedpageTWOUP
- \global\let\pusharrangedpage=\pusharrangedpageTWO
- \global\let\poparrangedpages=\poparrangedpagesTWO,
- 2DOWN=>\global\chardef\arrangedpageX=1
- \global\chardef\arrangedpageY=2
- \global\chardef\arrangedpageT=4
- \global\chardef\horizontalcutmarks=2
- \global\chardef\verticalcutmarks=3
- \global\let\handlearrangedpage=\handlearrangedpageTWODOWN
- \global\let\pusharrangedpage=\pusharrangedpageTWO
- \global\let\poparrangedpages=\poparrangedpagesTWO,
- \s!reset=>\global\arrangingpagesfalse,
- \s!unknown=>\global\arrangingpagesfalse,
- \s!default=>\global\arrangingpagesfalse]%
- \doifcommonelse{#1}{90,270,\v!geroteerd}
- {\swapmacros\horizontalcutmarks\verticalcutmarks}{}% ugly solution
- \ifarrangingpages
- \abortutilitygeneration
+ {\ifarrangingdisabled \else
+ \doifelse{#1}{\v!blokkeer}
+ {\global\arrangingdisabledtrue}
+ {\global\arrangingdisabledfalse}%
+ \global\arrangingpagestrue
+ \global\negatearrangedfalse
+ \global\mirrorarrangedfalse
+ \global\doublearrangedfalse
+ \gdef\arrangedrotationO{0}%
+ \gdef\arrangedrotationE{180}%
+ \processallactionsinset
+ [#1]
+ [ \v!gespiegeld=>\global\mirrorarrangedtrue,
+ \v!dubbelzijdig=>\global\doublearrangedtrue,
+ \v!negatief=>\global\negatearrangedtrue,
+ \v!geroteerd=>\gdef\arrangedrotationO {90}\gdef\arrangedrotationE{270},
+ 90=>\gdef\arrangedrotationO {90}\gdef\arrangedrotationE{270},
+ 180=>\gdef\arrangedrotationO{180}\gdef\arrangedrotationE{0},
+ 270=>\gdef\arrangedrotationO{270}\gdef\arrangedrotationE{90},
+ 2*16=>\global\chardef\arrangedpageX=8
+ \global\chardef\arrangedpageY=4
+ \global\chardef\arrangedpageT=16
+ \global\chardef\horizontalcutmarks=5
+ \global\chardef\verticalcutmarks=5
+ \global\let\pusharrangedpage=\pusharrangedpageTHIRTYTWO
+ \global\let\poparrangedpages=\poparrangedpagesAB,
+ 2*8=>\global\chardef\arrangedpageX=4
+ \global\chardef\arrangedpageY=2
+ \global\chardef\arrangedpageT=8
+ \global\chardef\horizontalcutmarks=5
+ \global\chardef\verticalcutmarks=3
+ \global\let\pusharrangedpage=\pusharrangedpageSIXTEEN
+ \global\let\poparrangedpages=\poparrangedpagesAB,
+ 2*4=>\global\chardef\arrangedpageX=2
+ \global\chardef\arrangedpageY=2
+ \global\chardef\arrangedpageT=4
+ \global\chardef\horizontalcutmarks=3
+ \global\chardef\verticalcutmarks=3
+ \global\let\pusharrangedpage=\pusharrangedpageEIGHT
+ \global\let\poparrangedpages=\poparrangedpagesAB,
+ 2*2=>\global\chardef\arrangedpageX=2
+ \global\chardef\arrangedpageY=1
+ \global\chardef\arrangedpageT=2
+ \global\chardef\horizontalcutmarks=3
+ \global\chardef\verticalcutmarks=2
+ \global\let\pusharrangedpage=\pusharrangedpageFOUR
+ \global\let\poparrangedpages=\poparrangedpagesAB,
+ 2SIDE=>\global\chardef\arrangedpageX=2
+ \global\chardef\arrangedpageY=1
+ \global\chardef\arrangedpageT=2
+ \global\chardef\horizontalcutmarks=3
+ \global\chardef\verticalcutmarks=2
+ \global\let\pusharrangedpage=\pusharrangedpageSIDE
+ \global\let\poparrangedpages=\poparrangedpagesAB,
+ 2UP=>\global\chardef\arrangedpageX=2
+ \global\chardef\arrangedpageY=1
+ \global\chardef\arrangedpageT=4
+ \global\chardef\horizontalcutmarks=3
+ \global\chardef\verticalcutmarks=2
+ \global\let\handlearrangedpage=\handlearrangedpageTWOUP
+ \global\let\pusharrangedpage=\pusharrangedpageTWO
+ \global\let\poparrangedpages=\poparrangedpagesTWO,
+ 2DOWN=>\global\chardef\arrangedpageX=1
+ \global\chardef\arrangedpageY=2
+ \global\chardef\arrangedpageT=4
+ \global\chardef\horizontalcutmarks=2
+ \global\chardef\verticalcutmarks=3
+ \global\let\handlearrangedpage=\handlearrangedpageTWODOWN
+ \global\let\pusharrangedpage=\pusharrangedpageTWO
+ \global\let\poparrangedpages=\poparrangedpagesTWO,
+ \s!reset=>\global\arrangingpagesfalse,
+ \s!unknown=>\global\arrangingpagesfalse,
+ \s!default=>\global\arrangingpagesfalse]%
+ \doifcommonelse{#1}{90,270,\v!geroteerd}
+ {\swapmacros\horizontalcutmarks\verticalcutmarks}{}% ugly solution
+ \stelpapierformaatin
+ \ifarrangingpages
+ \abortutilitygeneration
+ \fi
\fi}
-
+
+% cleaner, but unchecked
+%
+% \def\dostelarrangereninXY#1#2#3#4#5#6#7#8%
+% {\global\chardef\arrangedpageX =#1%
+% \global\chardef\arrangedpageY =#2%
+% \global\chardef\arrangedpageT =#3%
+% \global\chardef\horizontalcutmarks=#4%
+% \global\chardef\verticalcutmarks =#5%
+% \global\let \pusharrangedpage =#6%
+% \global\let \poparrangedpages =#7%
+% \global\let \handlearrangedpage=#8}
+%
+% \def\dostelarrangereninOE#1#2%
+% {\gdef\arrangedrotationO{#1}%
+% \gdef\arrangedrotationE{#2}}
+%
+% \def\stelarrangerenin[#1]%
+% {\ifarrangingdisabled \else
+% \doifelse{#1}{\v!blokkeer}
+% {\global\arrangingdisabledtrue}
+% {\global\arrangingdisabledfalse}%
+% \global\arrangingpagestrue
+% \global\negatearrangedfalse
+% \global\mirrorarrangedfalse
+% \global\doublearrangedfalse
+% \gdef\arrangedrotationO{0}%
+% \gdef\arrangedrotationE{180}%
+% \processallactionsinset
+% [#1]
+% [ \v!gespiegeld=>\global\mirrorarrangedtrue,
+% \v!dubbelzijdig=>\global\doublearrangedtrue,
+% \v!negatief=>\global\negatearrangedtrue,
+% \v!geroteerd=>\dostelarrangereninOE{90}{270},
+% 90=>\dostelarrangereninOE{90}{270},
+% 180=>\dostelarrangereninOE{180}{0},
+% 270=>\dostelarrangereninOE{270}{90},
+% 2*16=>\dostelarrangereninXY{8}{4}{16}{5}{5}
+% \pusharrangedpageTHIRTYTWO
+% \poparrangedpagesAB
+% \relax,
+% 2*8=>\dostelarrangereninXY{4}{2}{8}{5}{3}
+% \pusharrangedpageSIXTEEN
+% \poparrangedpagesAB
+% \relax,
+% 2*4=>\dostelarrangereninXY{2}{2}{4}{3}{3}
+% \pusharrangedpageEIGHT
+% \poparrangedpagesAB
+% \relax,
+% 2*2=>\dostelarrangereninXY{2}{1}{2}{3}{2}
+% \pusharrangedpageFOUR
+% \poparrangedpagesAB
+% \relax,
+% 2SIDE=>\dostelarrangereninXY{2}{1}{2}{3}{2}
+% \pusharrangedpageSIDE
+% \poparrangedpagesAB
+% \relax,
+% 2UP=>\dostelarrangereninXY{2}{1}{4}{3}{2}
+% \pusharrangedpageTWO
+% \poparrangedpagesTWO,
+% \handlearrangedpageTWOUP,
+% 2DOWN=>\dostelarrangereninXY{1}{2}{4}{2}{3}
+% \pusharrangedpageTWO
+% \poparrangedpagesTWO
+% \handlearrangedpageTWODOWN,
+% \s!reset=>\global\arrangingpagesfalse,
+% \s!unknown=>\global\arrangingpagesfalse,
+% \s!default=>\global\arrangingpagesfalse]%
+% \doifcommonelse{#1}{90,270,\v!geroteerd}
+% {\swapmacros\horizontalcutmarks\verticalcutmarks}{}% ugly solution
+% \stelpapierformaatin
+% \ifarrangingpages
+% \abortutilitygeneration
+% \fi
+% \fi}
+
\def\filluparrangedpages% beware: \realpageno is 1 ahead
{\ifarrangingpages
\scratchcounter=-\realpageno
@@ -145,7 +253,7 @@
\actualshipout{\box#1}%
\egroup}
-% 16/8/4
+% 32/16/8/4/SIDE
\def\poparrangedpagesAB%
{\ifnum\arrangedpageN>0
@@ -157,41 +265,80 @@
\doglobal\newcounter\arrangedpageN
\fi}
-\def\pusharrangedpageSIXTEEN#1%
+\def\pusharrangedpageTHIRTYTWO#1% taco's challenge
{\doglobal\increment\arrangedpageN
\reportarrangedpage\arrangedpageN
\ifcase\arrangedpageN
- \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageA % 1
- \or \handlearrangedpageXY{#1}{180}{3}{1}\arrangedpageB % 2
- \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageB % 3
- \or \handlearrangedpageXY{#1}{180}{3}{1}\arrangedpageA % 4
- \or \handlearrangedpageXY{#1} {0}{3}{0}\arrangedpageA % 5
- \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageB % 6
- \or \handlearrangedpageXY{#1} {0}{3}{0}\arrangedpageB % 7
- \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageA % 8
- \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageA % 9
- \or \handlearrangedpageXY{#1} {0}{2}{0}\arrangedpageB % 10
- \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageB % 11
- \or \handlearrangedpageXY{#1} {0}{2}{0}\arrangedpageA % 12
- \or \handlearrangedpageXY{#1}{180}{2}{1}\arrangedpageA % 13
- \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageB % 14
- \or \handlearrangedpageXY{#1}{180}{2}{1}\arrangedpageB % 15
- \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageA % 16
+ \or \handlearrangedpageXY{#1} {0}{3}{3}\arrangedpageA % 1
+ \or \handlearrangedpageXY{#1} {0}{0}{3}\arrangedpageB % 2
+ \or \handlearrangedpageXY{#1}{180}{0}{0}\arrangedpageB % 3
+ \or \handlearrangedpageXY{#1}{180}{3}{0}\arrangedpageA % 4
+ \or \handlearrangedpageXY{#1}{180}{0}{0}\arrangedpageA % 5
+ \or \handlearrangedpageXY{#1}{180}{3}{0}\arrangedpageB % 6
+ \or \handlearrangedpageXY{#1} {0}{3}{3}\arrangedpageB % 7
+ \or \handlearrangedpageXY{#1} {0}{0}{3}\arrangedpageA % 8
+ \or \handlearrangedpageXY{#1}{180}{0}{2}\arrangedpageA % 9
+ \or \handlearrangedpageXY{#1}{180}{3}{2}\arrangedpageB % 10
+ \or \handlearrangedpageXY{#1} {0}{3}{1}\arrangedpageB % 11
+ \or \handlearrangedpageXY{#1} {0}{0}{1}\arrangedpageA % 12
+ \or \handlearrangedpageXY{#1} {0}{3}{1}\arrangedpageA % 13
+ \or \handlearrangedpageXY{#1} {0}{0}{1}\arrangedpageB % 14
+ \or \handlearrangedpageXY{#1}{180}{0}{2}\arrangedpageB % 15
+ \or \handlearrangedpageXY{#1}{180}{3}{2}\arrangedpageA % 16
+ \or \handlearrangedpageXY{#1}{180}{2}{2}\arrangedpageA % 17
+ \or \handlearrangedpageXY{#1}{180}{1}{2}\arrangedpageB % 18
+ \or \handlearrangedpageXY{#1} {0}{1}{1}\arrangedpageB % 19
+ \or \handlearrangedpageXY{#1} {0}{2}{1}\arrangedpageA % 20
+ \or \handlearrangedpageXY{#1} {0}{1}{1}\arrangedpageA % 21
+ \or \handlearrangedpageXY{#1} {0}{2}{1}\arrangedpageB % 22
+ \or \handlearrangedpageXY{#1}{180}{2}{2}\arrangedpageB % 23
+ \or \handlearrangedpageXY{#1}{180}{1}{2}\arrangedpageA % 24
+ \or \handlearrangedpageXY{#1} {0}{1}{3}\arrangedpageA % 25
+ \or \handlearrangedpageXY{#1} {0}{2}{3}\arrangedpageB % 26
+ \or \handlearrangedpageXY{#1}{180}{2}{0}\arrangedpageB % 27
+ \or \handlearrangedpageXY{#1}{180}{1}{0}\arrangedpageA % 28
+ \or \handlearrangedpageXY{#1}{180}{2}{0}\arrangedpageA % 29
+ \or \handlearrangedpageXY{#1}{180}{1}{0}\arrangedpageB % 30
+ \or \handlearrangedpageXY{#1} {0}{1}{3}\arrangedpageB % 31
+ \or \handlearrangedpageXY{#1} {0}{2}{3}\arrangedpageA % 32
\poparrangedpages
\fi}
-\def\pusharrangedpageEIGHT#1%
+\def\pusharrangedpageSIXTEEN#1% changed to match the official way of doing
{\doglobal\increment\arrangedpageN
\reportarrangedpage\arrangedpageN
\ifcase\arrangedpageN
- \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageA % 1
- \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageB % 2
- \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageB % 3
- \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageA % 4
- \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageA % 5
- \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageB % 6
- \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageB % 7
- \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageA % 8
+ \or \handlearrangedpageXY{#1} {0}{3}{1}\arrangedpageA % 1
+ \or \handlearrangedpageXY{#1} {0}{0}{1}\arrangedpageB % 2
+ \or \handlearrangedpageXY{#1} {0}{3}{1}\arrangedpageB % 3
+ \or \handlearrangedpageXY{#1} {0}{0}{1}\arrangedpageA % 4
+ \or \handlearrangedpageXY{#1}{180}{0}{0}\arrangedpageA % 5
+ \or \handlearrangedpageXY{#1}{180}{3}{0}\arrangedpageB % 6
+ \or \handlearrangedpageXY{#1}{180}{0}{0}\arrangedpageB % 7
+ \or \handlearrangedpageXY{#1}{180}{3}{0}\arrangedpageA % 8
+ \or \handlearrangedpageXY{#1}{180}{2}{0}\arrangedpageA % 9
+ \or \handlearrangedpageXY{#1}{180}{1}{0}\arrangedpageB % 10
+ \or \handlearrangedpageXY{#1}{180}{2}{0}\arrangedpageB % 11
+ \or \handlearrangedpageXY{#1}{180}{1}{0}\arrangedpageA % 12
+ \or \handlearrangedpageXY{#1} {0}{1}{1}\arrangedpageA % 13
+ \or \handlearrangedpageXY{#1} {0}{2}{1}\arrangedpageB % 14
+ \or \handlearrangedpageXY{#1} {0}{1}{1}\arrangedpageB % 15
+ \or \handlearrangedpageXY{#1} {0}{2}{1}\arrangedpageA % 16
+ \poparrangedpages
+ \fi}
+
+\def\pusharrangedpageEIGHT#1% changed to match the official way of doing
+ {\doglobal\increment\arrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXY{#1} {0}{1}{1}\arrangedpageA % 1
+ \or \handlearrangedpageXY{#1} {0}{0}{1}\arrangedpageB % 2
+ \or \handlearrangedpageXY{#1}{180}{0}{0}\arrangedpageB % 3
+ \or \handlearrangedpageXY{#1}{180}{1}{0}\arrangedpageA % 4
+ \or \handlearrangedpageXY{#1}{180}{0}{0}\arrangedpageA % 5
+ \or \handlearrangedpageXY{#1}{180}{1}{0}\arrangedpageB % 6
+ \or \handlearrangedpageXY{#1} {0}{1}{1}\arrangedpageB % 7
+ \or \handlearrangedpageXY{#1} {0}{0}{1}\arrangedpageA % 8
\poparrangedpages
\fi}
@@ -206,6 +353,17 @@
\poparrangedpages
\fi}
+\def\pusharrangedpageSIDE#1% not ok yet
+ {\doglobal\increment\arrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXY{#1}{0}{0}{0}\arrangedpageA % 1
+ \or \handlearrangedpageXY{#1}{0}{1}{0}\arrangedpageA % 2
+ \or \handlearrangedpageXY{#1}{0}{0}{0}\arrangedpageB % 3
+ \or \handlearrangedpageXY{#1}{0}{1}{0}\arrangedpageB % 4
+ \poparrangedpages
+ \fi}
+
% 2UP/2DOWN / 1pt prevents overflow
\def\splitoffarrangedpagesTWO%
@@ -279,6 +437,267 @@
\dp#1=\!!zeropoint
\vbox{\box#1}}}
+%D One can (mis)use this mechanism, in close cooperation
+%D with \PDFTEX\ to arrange pages of already produced files.
+%D
+%D \starttypen
+%D \insertpages[file.pdf][1,3][n=30,width=18cm]
+%D \stoptypen
+%D
+%D The pages are inserted in the text area, and even pages
+%D are repositioned according to the width. In this example
+%D empty pages are added after page 1 and 3.
+%D
+%D Selecting pages can be accomplished by:
+%D
+%D \starttypen
+%D \filterpages[file.pdf][1,3,5][n=30,width=18cm]
+%D \stoptypen
+%D
+%D One may pass \type {odd} or \type {even} instead of a
+%D comma separated list. A third alternative is:
+%D
+%D \starttypen
+%D \copypages[file.pdf][n=30,scale=950]
+%D \stoptypen
+%D
+%D This macros inserts the page, according to the settings
+%D provided.
+
+\def\insertpages%
+ {\dotripleempty\doinsertpages}
+
+\def\doinsertpages[#1][#2][#3]%
+ {\doifassignmentelse{#2}
+ {\dodoinsertpages[#1][][#2]}
+ {\dodoinsertpages[#1][#2][#3]}}
+
+\def\dodoinsertpages[#1][#2][#3]%
+ {\bgroup
+ \mindermeldingen
+ \getparameters[\??ip][\c!n=\noffigurepages,\c!breedte=\!!zeropoint,#3]%
+ \dorecurse{\@@ipn}
+ {\dofilterpage{#1}{\recurselevel}%
+ \doifinsetelse{\recurselevel}{#2}{\null\pagina}{}}%
+ \egroup}
+
+\def\filterpages%
+ {\dotripleempty\dofilterpages}
+
+\def\dofilterpages[#1][#2][#3]%
+ {\bgroup
+ \mindermeldingen
+ \getparameters[\??ip][\c!n=\noffigurepages,\c!breedte=\!!zeropoint,#3]%
+ \doifelse{#2}{\v!even}
+ {\dorecurse{\@@ipn}
+ {\ifodd\recurselevel\relax\else\dofilterpage{#1}{\recurselevel}\fi}}
+ {\doifelse{#2}{\v!oneven}
+ {\dorecurse{\@@ipn}
+ {\ifodd\recurselevel\relax\dofilterpage{#1}{\recurselevel}\fi}}
+ {\def\docommando##1{\ifnum##1>\@@ipn\else\dofilterpage{#1}{##1}\fi}%
+ \processcommalist[#2]\docommando}}%
+ \egroup}
+
+\def\dofilterpage#1#2%
+ {\hbox to \tekstbreedte
+ {\ifdubbelzijdig\ifdim\@@ipbreedte>\!!zeropoint\relax\ifodd\realpageno\else
+ \hfill
+ \def\dowithfigure{\hskip-\@@ipbreedte}%
+ \fi\fi\fi
+ \setbox0=\hbox
+ {\externalfigure[#1][\c!pagina=#2,\c!hoogte=\teksthoogte]}%
+ \wd0=\!!zeropoint
+ \box0}
+ \pagina}
+
+\def\copypages%
+ {\dodoubleempty\docopypages}
+
+\def\docopypages[#1][#2]%
+ {\getparameters[\??ip][\c!n=\noffigurepages,#2]%
+ \dorecurse{\@@ipn}
+ {\vbox to \teksthoogte
+ {\hsize=\tekstbreedte
+ \centeredbox{\externalfigure[#1][\c!pagina=\recurselevel,#2]}}
+ \pagina}}
+
+%D \macros
+%D {combinepages}
+%D
+%D Yet another way of postprocessing is handles by \type
+%D {\combinepages}. This macro builds a matrix of pages from a
+%D file, for example:
+%D
+%D \starttypen
+%D \setuppapersize
+%D [A4][A4] % or [A4,landscape][A4,landscape]
+%D
+%D \setuplayout
+%D [header=0pt,footer=1cm,
+%D backspace=1cm,topspace=1cm,
+%D width=middle,height=middle]
+%D
+%D \setupfootertexts
+%D [presentation---\currentdate\space---\space\pagenumber]
+%D
+%D \starttext
+%D \combinepages[slides][nx=2,ny=3,frame=on]
+%D \stoptext
+%D \starttypen
+%D
+%D One can influence the way the pages are combined. (This
+%D will be explained some time.)
+
+\def\combinepages%
+ {\dodoubleempty\docombinepages}
+
+\def\docombinepages[#1][#2]%
+ {\bgroup
+ \def\noffigurepages{1}%
+ \getparameters
+ [\??ip]
+ [\c!n=\noffigurepages,\c!nx=2,\c!ny=2,
+ \c!afstand=\bodyfontsize,
+ \c!onder=\vfill,\c!boven=\vss,
+ \c!links=\hss,\c!rechts=\hss,
+ \c!voor=\pagina,\c!na=\pagina,\c!kader=,
+ #2]%
+ \@@ipvoor
+ \doglobal\newcounter\combinedpagescounter
+ \doloop
+ {\vbox to \teksthoogte
+ {\mindermeldingen
+ \hsize=\tekstbreedte
+ \scratchdimen=\@@ipafstand
+ \!!widtha=\hsize
+ \advance\!!widtha by -\@@ipnx\scratchdimen
+ \advance\!!widtha by \scratchdimen
+ \divide \!!widtha by \@@ipnx
+ \!!heighta=\vsize
+ \advance\!!heighta by -\@@ipny\scratchdimen
+ \advance\!!heighta by \scratchdimen
+ \divide \!!heighta by \@@ipny
+ \dorecurse{\@@ipny}
+ {\hbox to \hsize
+ {\dorecurse{\@@ipnx}
+ {\doglobal\increment\combinedpagescounter
+ \vbox to \!!heighta
+ {\hsize=\!!widtha
+ \vsize=\!!heighta
+ \@@ipboven
+ \hbox to \hsize
+ {\@@iplinks
+ \ifnum\combinedpagescounter>\@@ipn \else
+ \externalfigure[#1][\c!pagina=\combinedpagescounter,\c!factor=\v!max,\c!kader=\@@ipkader]%
+ \getnumberoffigurepages\noffigurepages
+ \fi
+ \@@iprechts}
+ \@@iponder}%
+ \hfil}%
+ \hfilneg}
+ \vfil}
+ \vfilneg}
+ \pagina
+ \ifnum\combinedpagescounter<\@@ipn \else\exitloop\fi}
+ \@@ipna
+ \egroup}
+
+%D \macros
+%D {setuppagecomment,startpagecomment}
+%D
+%D This command is not yet documented. Usage:
+%D
+%D \starttypen
+%D \setuppagecomment[state=start,location=right]
+%D
+%D \startpagecomment
+%D \input knuth
+%D \stoppagecomment
+%D \stoptypen
+
+\def\setuppagecomment%
+ {\dosingleempty\dosetuppagecomment}
+
+\def\dosetuppagecomment[#1]%
+ {\getparameters[\??pc][#1]%
+ \doifelse{\@@pcstatus}{\v!start}
+ {\doifinsetelse{\@@pcplaats}{\v!onder,\v!boven}
+ {\stelpapierformaatin[\c!links=\hskip\@@pcoffset]%
+ \adddimenmacro\papierhoogte\@@pcoffset\@@pcoffset\@@pcafstand\@@pchoogte\to\@@pcpaperheight
+ \adddimenmacro\papierbreedte\@@pcoffset\@@pcoffset\to\@@pcpaperwidth
+ \definieeroverlay[pagecomment][\placepagecommentTB]}
+ {\stelpapierformaatin[\c!boven=\vskip\@@pcoffset]%
+ \adddimenmacro\papierhoogte\@@pcoffset\@@pcoffset\to\@@pcpaperheight
+ \adddimenmacro\papierbreedte\@@pcoffset\@@pcoffset\@@pcafstand\@@pcbreedte\to\@@pcpaperwidth
+ \definieeroverlay[pagecomment][\placepagecommentLR]}%
+ \processaction
+ [\@@pcplaats]
+ [ \v!onder=>{\stelpapierformaatin[\c!onder =\vss,\c!boven =\vskip\@@pcoffset]},
+ \v!boven=>{\stelpapierformaatin[\c!boven =\vss,\c!onder =\vskip\@@pcoffset]},
+ \v!links=>{\stelpapierformaatin[\c!links =\hss,\c!rechts=\hskip\@@pcoffset]},
+ \v!rechts=>{\stelpapierformaatin[\c!rechts=\hss,\c!links =\hskip\@@pcoffset]}]%
+ \definieerpapierformaat
+ [commentedpage]
+ [\c!hoogte=\@@pcpaperheight,
+ \c!breedte=\@@pcpaperwidth]%
+ \let\@@pcprintpaperformat\printpapierformaat
+ \stelpapierformaatin[\papierformaat][commentedpage]%
+ \stelachtergrondenin[\v!papier][\c!achtergrond=pagecomment]}
+ {\doif{\@@pcstatus}{\v!stop} % else initialization invokes backgrounds
+ {% this should be tested first
+ % \expanded{\stelpapierformaatin[\papierformaat][\@@pcprintpaperformat]}%
+ \stelachtergrondenin[\v!papier][\c!achtergrond=]}}}
+
+\def\@@pcprintpaperformat{\printpapierformaat}
+
+\def\placepagecommentTB%
+ {\vbox to \printpapierhoogte
+ {\forgetall
+ \hsize\printpapierbreedte
+ \vskip\@@pcoffset
+ \doifelse{\@@pcplaats}{\v!onder}{\vskip\papierhoogte\vskip\@@pcafstand}{\vss}
+ \hskip\@@pcoffset
+ \vbox to \@@pchoogte
+ {\forgetall
+ \hsize\papierbreedte
+ \ifpagecomment
+ \haalbuffer[pagecomm]
+ \global\pagecommentfalse
+ \fi}%
+ \hfill
+ \doifelse{\@@pcplaats}{\v!onder}{\vss}{\vskip\papierhoogte\vskip\@@pcafstand}
+ \vskip\@@pcoffset}}
+
+\def\placepagecommentLR%
+ {\hbox to \printpapierbreedte
+ {\hskip\@@pcoffset
+ \doifelse{\@@pcplaats}{\v!rechts}{\hskip\papierbreedte\hskip\@@pcafstand}{\hss}%
+ \vbox to \printpapierhoogte
+ {\forgetall
+ \vskip\@@pcoffset
+ \hsize\@@pcbreedte
+ \ifpagecomment
+ \haalbuffer[pagecomm]
+ \global\pagecommentfalse
+ \fi
+ \vss}%
+ \doifelse{\@@pcplaats}{\v!rechts}{\hss}{\hskip\papierbreedte\hskip\@@pcafstand}%
+ \hskip\@@pcoffset}}
+
+\newif\ifpagecomment
+
+\setvalue{\e!start\e!pagecomment}%
+ {\global\pagecommenttrue
+ \dostartbuffer[pagecomm][\e!start\e!pagecomment][\e!stop\e!pagecomment]}
+
+\setuppagecomment
+ [\c!status=, % \v!stop would invoke background calculation
+ \c!plaats=\v!onder,
+ \c!offset=.5cm,
+ \c!afstand=.5cm,
+ \c!hoogte=5cm,
+ \c!breedte=10cm]
+
\protect
\endinput
diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex
index e4a88d63b..6996d6ead 100644
--- a/tex/context/base/core-ref.tex
+++ b/tex/context/base/core-ref.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Cross Referencing}
@@ -76,6 +76,17 @@
23: Obskure Referenz -- (Prefix=--)
\stopmessages
+\startmessages czech library: references
+ title: reference
+ 1: neznama reference --
+ 2: duplicitni reference -- na strane --
+ 3: neznamy typ reference --
+ 4: nedovolena reference --
+ 21: dokument -- nacten
+ 22: dokument -- neni interaktivni
+ 23: obskurni (nejasna) reference -- (prefix=--)
+\stopmessages
+
%D This module deals with referencing. In \CONTEXT\ referencing
%D is one of the core features, although at a first glance
%D probably nobody will notice. This is good, because
@@ -161,6 +172,14 @@
\newevery \everyreference \relax
+%D This is really needed, since for instance Polish has a
+%D different alphabet and needs accented entries in registers.
+
+\appendtoks
+ \def\dohandleaccent #1#2{\string#1\string#2}%
+ \def\dohandlecommand #1{\string#1}%
+\to\everyreference
+
%D Why do we have to write down references? \TEX, and therefore
%D \CONTEXT\ is a batch processing system. During the
%D typesetting process, pages are shipped out, which means that
@@ -433,24 +452,6 @@
\newif\ifforwardreference
-%\def\dogetreferenceelements#1#2#3#4#5%
-% {\chardef\currentreferencetype=\ifx#1\relax0\else#1\fi\relax
-% \ifnum\currentreferencetype<2
-% \def\currentpagereference{\referencepagenumber[#2]}%
-% \edef\currentrealreference{#3}%
-% \def\currenttextreference{#4}%
-% \ifnum0#5>\crossreferencenumber
-% \forwardreferencetrue
-% \else
-% \forwardreferencefalse
-% \fi
-% \else
-% \def\currentdatareference{#2}%
-% \edef\currentrealreference{#3}%
-% \def\currenttextreference{#4}%
-% \forwardreferencefalse
-% \fi}
-
\newif\ifrealreferencepage
\def\docheckrealreferencepage#1%
@@ -468,7 +469,7 @@
\def\currentpagereference{\referencepagenumber[#2]}%
\edef\currentrealreference{#3}%
\settextreferences#4\end
- \ifnum0#5>\crossreferencenumber
+ \ifnum0#5<\crossreferencenumber
\forwardreferencetrue
\else
\forwardreferencefalse
@@ -781,7 +782,6 @@
\def\dodoifreferencefoundelse#1#2#3%
{\checkreferences
\bgroup
- \the\everyreference
\let\unharmedreferenceprefix=\referenceprefix
\bgroup
\splitofffullreference{#1}%
@@ -851,7 +851,6 @@
\def\dodoifreferencefoundelse#1#2#3%
{\checkreferences
\bgroup
- \the\everyreference
\let\unharmedreferenceprefix=\referenceprefix
\bgroup
\splitofffullreference{#1}%
@@ -953,25 +952,26 @@
\def\doifreferencefoundelse#1#2#3%
{\doresetgotowhereever
\global\secondaryreferencefalse
- \xdef\primaryreference{#1}%
+ {\the\everyreference\xdef\primaryreference{#1}}%
\global\nofsecondaryreferences=0
\def\dopreprocessreference##1,%
{\if]##1\else
\ifsecondaryreference
\ifenablereferencechains \iflocation
+ {\the\everyreference\xdef\secondaryreference{##1}}%
%\global\advance\nofsecondaryreferences by 1
- \dodoifreferencefoundelse{##1}
+ \@EA\dodoifreferencefoundelse\@EA{\secondaryreference}
{\global\advance\nofsecondaryreferences by 1
#2}
{%\global\advance\nofsecondaryreferences by -1
- \dostartnoto#3\dostopnoto}% #3}%
+ \dostartnoto#3\dostopnoto}%
\fi \fi
\else
- \xdef\primaryreference{##1}%
+ {\the\everyreference\xdef\primaryreference{##1}}%
\global\secondaryreferencetrue
\fi
\expandafter\dopreprocessreference
- \fi}%
+ \fi}%
\dopreprocessreference#1,],%
\global\secondaryreferencefalse
\@EA\dodoifreferencefoundelse\@EA{\primaryreference}{#2}{#3}%
@@ -1194,22 +1194,22 @@
\def\checkpredefinedreference#1#2#3#4% #3 can expand tricky
{{#1}{#2}{#4}}
-\def\doifpredefinedreferenceelse#1#2%
+\def\doifpredefinedreferenceelse#1#2% \referenceprefix added
{\bgroup
\let\rt!cross\checkpredefinedreference
- \doifelse{\getvalue{\r!cross\predefinedreference}}{{}{}{}}
+ \doifelse{\getvalue{\r!cross\referenceprefix\predefinedreference}}{{}{}{}}
{\egroup#1}{\egroup#2}}
%D Sometimes we want to temporary put a reference out of
%D order. An example can be found in the menu macros.
%D
%D \starttypen
-%D \doifreferencepermitedelse{reference}{set}{true}{false}
+%D \doifreferencepermittedelse{reference}{set}{true}{false}
%D \stoptypen
%D
%D The second argument can be a comma seperated list.
-\def\doifreferencepermitedelse#1#2#3#4% ref set found notfound
+\def\doifreferencepermittedelse#1#2#3#4% ref set found notfound
{\doifreferencefoundelse{#1}
{\ifx\currentinnerreference\empty
\ifx\currentouterreference\empty
@@ -1304,6 +1304,7 @@
\data
{#5}%
\start
+ \the\everyreference % we are (have to be) grouped !
\dostartgotolocation
{\number\buttonwidth}{\number\buttonheight}
{#1}{#2}{#3}{#4}%
@@ -1331,6 +1332,25 @@
{#4}%
\fi}
+%D \macros
+%D {setreferencefilename}
+%D
+%D This command can be used in the special drivers to
+%D uppercase filenames. This is needed when one wants to
+%D produce \CDROM's conforming to ISO9660. We consider is the
+%D savest to enable this feature by default. We cannot handle
+%D uppercase here, since the suffix is handled in the special
+%D driver. COnversion is taken care of by:
+%D
+%D \startypen
+%D \setreferencefilename somefilename\to\SomeFileName
+%D \stoptypen
+
+\def\setreferencefilename#1\to#2%
+ {\doifelsevalue{\??rf\c!converteerfile}{\v!ja} % boolean is sneller
+ {\uppercasestring#1\to#2}
+ {\edef#2{#1}}}
+
%D Internal references can best be set using the next few
%D macros. Setting such references to unique values is
%D completely up to the macros that call them.
@@ -1539,6 +1559,7 @@
\setglobalsystemreference \rt!exec \v!ViewerHelp {help}
\setglobalsystemreference \rt!exec \v!HideField {hide}
\setglobalsystemreference \rt!exec \v!ShowField {show}
+\setglobalsystemreference \rt!exec \v!GotoPage {gotopage}
%D Executing the command looks alike the previous goto macros.
@@ -1583,6 +1604,8 @@
%D document). By setting the \type{interaction} variable, one
%D can influences the way interactive references are set.
+% \newif\ifreferencestrut % some day an option
+
\def\setupreferencing%
{\dosingleargument\dosetupreferencing}
@@ -1600,6 +1623,9 @@
\v!label=>\let\dowantedreference=\dolabelonlyreference,
\v!tekst=>\let\dowantedreference=\dotextonlyreference,
\v!symbool=>\let\dowantedreference=\dosymbolreference]%
+ %\doifelse{\@@rfstrut}{\v!ja} % some day an option
+ % {\referencetruttrue}
+ % {\referencestrutfalse}%
\ifx\@@rfprefix\s!unknown
% retain the current value
\else\ifx\@@rfprefix\empty
@@ -1607,10 +1633,10 @@
\else\ifx\@@rfprefix\incrementreferenceprefix
\advance\prefixcounter by 1
\edef\referenceprefix{\the\prefixcounter:}%
-\let\@@rfprefix\s!unknown
+ \let\@@rfprefix\s!unknown
\else\ifx\@@rfprefix\decrementreferenceprefix
\let\referenceprefix=\empty
-\let\@@rfprefix\s!unknown
+ \let\@@rfprefix\s!unknown
\else
\edef\referenceprefix{\@@rfprefix:}%
\fi\fi\fi\fi}
@@ -1724,10 +1750,11 @@
\fi}
\unexpanded\def\dospecialover[#1]%
- {\bgroup
+ {\dontleavehmode
+ \bgroup
\def\thecurrentsubtextreference%
{\limitatetext{\currentsubtextreference}{\@@rfbreedte}{...}}%
- \leaveoutervmode
+ %\leaveoutervmode
\@@rflinks
\doifreferencefoundelse{#1}
{\let\crlf\space
@@ -1798,13 +1825,16 @@
%D among the several representations.
\def\dododododoinatreference#1#2[#3]%
- {\bgroup
+ {\dontleavehmode
+ \bgroup
\forgetall
- \leaveoutervmode
+ %\leaveoutervmode
\doifreferencefoundelse{#3}
- {\doifelsenothing{#1}
- {\dosymbolreference{#1}{#2}[#3]}
- {\dowantedreference{#1}{#2}[#3]}}
+ {\bgroup
+ \let\ignorespaces\empty % rather dirty but ok
+ \doifelsenothing{#1}
+ {\egroup\dosymbolreference{#1}{#2}[#3]}
+ {\egroup\dowantedreference{#1}{#2}[#3]}}
{\dounknownreference{#1}{#2}[#3]}%
\referentieinfo{<}{#3}%
\egroup}
@@ -1823,19 +1853,19 @@
\ifx\currentreferencespecial\empty
\ifx\currentouterreference\empty
\ifnum0\currentrealreference=0
- \ifhmode\strut$^{\symbol[\v!nergens]}$\fi
+ \ifhmode\strut\hoog{\symbol[\v!nergens]}\fi
\else\ifnum0\currentrealreference>\realpageno
- \dodosymbolreference{#2}{$^{\symbol[\v!volgende]}$}%
+ \dodosymbolreference{#2}{\hoog{\symbol[\v!volgende]}}%
\else\ifnum0\currentrealreference<\realpageno
- \dodosymbolreference{#2}{$^{\symbol[\v!vorige]}$}%
+ \dodosymbolreference{#2}{\hoog{\symbol[\v!vorige]}}%
\else
- \ifhmode\strut$^{\symbol[\v!nergens]}$\fi
+ \ifhmode\strut\hoog{\symbol[\v!nergens]}\fi
\fi\fi\fi
\else
- \gotoouterlocation{#3}{\showlocation{$^{\symbol[\v!ergens]}$}}%
+ \gotoouterlocation{#3}{\showlocation{\hoog{\symbol[\v!ergens]}}}%
\fi
\else
- \gotospeciallocation{#3}{\showlocation{$^{\symbol[\v!ergens]}$}}%
+ \gotospeciallocation{#3}{\showlocation{\hoog{\symbol[\v!ergens]}}}%
\fi
\egroup}
@@ -1849,12 +1879,12 @@
\def\dounknownreference#1#2[#3]%
{\unknownreference{#3}\dotextprefix{#2}\dummyreference}%
-\def\docompletereference#1#2[#3]%
- {\doifsomespaceelse{#2}
- {\doifsomething{#2}{\donaarspace{#2}[#3]~}\donaarfixed{#1}[#3]}
- {\donaarfixed{\dotextprefix{#2}#1}[#3]}}
-
-% VEEL BETER:
+% \def\docompletereference#1#2[#3]%
+% {\doifsomespaceelse{#2}
+% {\doifsomething{#2}{\donaarspace{#2}[#3]~}\donaarfixed{#1}[#3]}
+% {\donaarfixed{\dotextprefix{#2}#1}[#3]}}
+%
+% better:
\def\docompletereference#1#2[#3]%
{\doifsomespaceelse{#2}
@@ -1871,10 +1901,41 @@
\let\dowantedreference=\docompletereference
-%D --- OF MEER, OF ANDERS: ---
-
-\def\dotextprefix#1%
- {\ConvertToConstant\doifnot{#1}{}{#1~}}
+%D [ref] here when ok
+
+% \chapter[a]{first}
+%
+% \placeformula[b] \startformula a = b + c \stopformula
+%
+% \placeformula[for:c] \startformula a = b + c \stopformula
+%
+% \blank
+%
+% \in{chapter}[a] and \in{formula}[b] and \in{formula}[for:c] \par
+% \at{page}[a] and \at{page}[b] and \at{page}[for:c]
+%
+% \definereferenceformat[informula]
+%
+% \informula[b] and \informula[for:c] \par
+% the \informula{formulas}[b] \informula{en}[for:c]
+%
+% \definereferenceformat[informula][left=(,right=)]
+%
+% \informula[b] en \informula[for:c] \par
+% the \informula{formulas}[b] \informula{and}[for:c]
+%
+% \definereferenceformat[informula] [left=(,right=),text=formula]
+% \definereferenceformat[informulas] [left=(,right=),text=formulas]
+% \definereferenceformat[andformula] [left=(,right=),text=and]
+% \definereferenceformat[andformulas][left=(,right=),text=and]
+%
+% \informula[b] and \informula[for:c] \par
+% the \informula{formulas}[b] \informula{and}[for:c] \par
+% the \informulas{formulas}[b] \informula{and}[for:c] \par
+% the \informulas[b] \informula{en}[for:c] \par
+% the \informulas[b] \andformula[for:c] \par
+%
+% Instead of a text, one can specify a label.
%D In interactive documents going to a specific location is not
%D bound to cross references. The \type{\goto} commands can be
@@ -1893,7 +1954,8 @@
%D prevented, long references can cross line endings.
%\unexpanded\def\naar#1[#2]%
-% {\leaveoutervmode
+% {\dontleavehmode
+% %\leaveoutervmode
% \doifreferencefoundelse{#2}
% {\doifelsenothing{#1}
% {\dosymbolreference{}{}[#2]}
@@ -1902,7 +1964,8 @@
% \referentieinfo{<}{#2}}
\def\donaar#1[#2]%
- {\leaveoutervmode
+ {\dontleavehmode
+ %\leaveoutervmode
\doifreferencefoundelse{#2}
{\doifelsenothing{#1}
{\dosymbolreference{}{}[#2]}
@@ -1946,9 +2009,10 @@
%D --- NOG IN HANDLEIDING ---
\unexpanded\def\naarbox#1[#2]%
- {\bgroup
+ {\dontleavehmode
+ \bgroup
\locationstrutfalse
- \leaveoutervmode
+ %\leaveoutervmode
\doifreferencefoundelse{#2}
{\donaarfixed{#1}[#2]}
{\hbox{\unknownreference{#2}#1}}%
@@ -2037,7 +2101,7 @@
\def\gebruikURL%
{\bgroup
- \catcode`\#=12\catcode`\%=12
+ \catcode`\#=12\catcode`\%=12\catcode`\/=12
\catcode`\_=12\catcode`\~=12
\dodoubleempty\dogebruikURL}
@@ -2331,7 +2395,7 @@
%D
%D Here location is a keyword like \type{nextpage}.
%D
-%D \showsetup{\y!ganaarpagina}
+%D \showsetup{\y!naarpagina}
\def\dodefinieerpagina[#1][#2]%
{\setvalue{\v!pagina:::#1}{#2}}
@@ -2359,7 +2423,32 @@
%D Because we combine both methods, we have to take care of
%D the \type{file::page(n)} as well as \type{page(file::n)}.
-\definespeciallocation\v!pagina#1#2%
+% \definespeciallocation\v!pagina#1#2%
+% {\iflocation
+% \ifx\currentouterreference\empty
+% \splitoffreference\currentreferenceoperation
+% \else
+% \let\currentinnerreference=\currentreferenceoperation
+% \fi
+% \ifx\currentouterreference\empty
+% \doifnonzeropositiveelse{\currentinnerreference}
+% {}
+% {\edef\currentinnerreference{1}}%
+% \gotorealpage{}{}{\currentinnerreference}{#2}%
+% \else
+% \setouterlocation\currentouterreference
+% \doifnonzeropositiveelse{\currentinnerreference}
+% {}
+% {\doifdefinedelse{\v!pagina:::\currentinnerreference}
+% {\edef\currentinnerreference{\getvalue{\v!pagina:::\currentinnerreference}}}
+% {\edef\currentinnerreference{1}}}%
+% \gotorealpage{\otherURL}{\otherfile}{\currentinnerreference}{#2}%
+% \fi
+% \else
+% {#2}%
+% \fi}
+
+\definespeciallocation\v!pagina#1#2% page(n) page(+n) page(-n)
{\iflocation
\ifx\currentouterreference\empty
\splitoffreference\currentreferenceoperation
@@ -2367,6 +2456,15 @@
\let\currentinnerreference=\currentreferenceoperation
\fi
\ifx\currentouterreference\empty
+ \doifinstringelse{+}{\currentinnerreference}
+ {\scratchcounter=\realpageno
+ \advance\scratchcounter by \currentinnerreference
+ \edef\currentinnerreference{\the\scratchcounter}}
+ {\doifinstringelse{-}{\currentinnerreference}
+ {\scratchcounter=\realpageno
+ \advance\scratchcounter by \currentinnerreference
+ \edef\currentinnerreference{\the\scratchcounter}}
+ {}}%
\doifnonzeropositiveelse{\currentinnerreference}
{}
{\edef\currentinnerreference{1}}%
@@ -2401,8 +2499,9 @@
%D support, also suitable for references to floating bodies.
-\unexpanded\def\dosomewhere#1#2#3[#4]% #3 gobbles space around #2
- {\leaveoutervmode
+\unexpanded\def\somewhere#1#2#3[#4]% #3 gobbles space around #2
+ {\dontleavehmode
+ %\leaveoutervmode
\doifreferencefoundelse{#4}
{\ifforwardreference
\doifelsenothing{#1}
@@ -2417,7 +2516,8 @@
\referentieinfo{<}{#4}}
\unexpanded\def\atpage[#1]%
- {\leaveoutervmode
+ {\dontleavehmode
+ %\leaveoutervmode
\doifreferencefoundelse{#1}
{\ifrealreferencepage
\ifforwardreference
@@ -2426,10 +2526,10 @@
\donaarfixed{\labeltext{\v!hieronder}}[#1]%
\fi
\else
- \donaarfixed{\labeltext{\v!oppagina}~\currentpagereference}[#1]%
+ \donaarfixed{\labeltexts{\v!oppagina}{\currentpagereference}}[#1]%
\fi}
{\unknownreference{#1}%
- \v!pagina~\dummyreference}%
+ \labeltexts{\v!pagina}{\dummyreference}}%
\referentieinfo{<}{#1}}
%D We can cross link documents by using:
@@ -2529,31 +2629,47 @@
\presetlocalframed[\??bt]
\def\docomplexbutton#1[#2]#3#4% get rid of possible space before [#4]
- {\dodocomplexbutton#1[#2]{#3}#4} % #4 == [
+ {\dodocomplexbutton#1[#2]{#3}#4} % #4 == [
-\def\dodocomplexbutton#1[#2]#3[#4]%
+% \def\dodocomplexbutton#1[#2]#3[#4]%
+% {\bgroup
+% \doifvalue{#1\c!status}{\v!stop}{\locationfalse}%
+% \iflocation
+% \resetgoto
+% \ConvertConstantAfter\doifelse{#3}{\v!geen}
+% {\!!doneafalse}
+% {\!!doneatrue}%
+% \doifelsenothing{#4} % in handleiding, is soort dummy
+% {\if!!donea\hbox\else\hphantom\fi
+% {\localframed[#1][#2]{#3}}}%
+% {\doifreferencefoundelse{#4}
+% {\setbox0=\if!!donea\hbox\else\hphantom\fi
+% {\localframed[#1][#2]
+% {\checkcontrastreference{#1}%
+% \dolocationattributes{#1}\c!letter\c!kleur{\ignorespaces#3}}}%
+% \startinteractie
+% %\hbox{\gotolocation{#4}{\copy0}}%
+% \hbox{\gotolocation{#4}{\box0}}%
+% \stopinteractie}
+% {\unknownreference{#4}%
+% \if!!donea\hbox\else\hphantom\fi
+% {\localframed[#1][#2]
+% {\ignorespaces#3}}}}% !!!!!!!!!!
+% \fi
+% \egroup}
+
+\def\dodocomplexbutton#1[#2]#3[#4]% #3 can contain [] -> {#3} later
{\bgroup
\doifvalue{#1\c!status}{\v!stop}{\locationfalse}%
\iflocation
\resetgoto
- \ConvertConstantAfter\doifelse{#3}{\v!geen}
- {\!!doneafalse}
- {\!!doneatrue}%
- \doifelsenothing{#4} % in handleiding, is soort dummy
- {\if!!donea\hbox\else\hphantom\fi
- {\localframed[#1][#2]{#3}}}%
- {\doifreferencefoundelse{#4}
- {\setbox0=\if!!donea\hbox\else\hphantom\fi
- {\localframed[#1][#2]
- {\checkcontrastreference{#1}%
- \dolocationattributes{#1}\c!letter\c!kleur{\ignorespaces#3}}}%
- \startinteractie
- \hbox{\gotolocation{#4}{\copy0}}%
- \stopinteractie}
- {\unknownreference{#4}%
- \if!!donea\hbox\else\hphantom\fi
- {\localframed[#1][#2]
- {\ignorespaces#3}}}}%
+ \ConvertConstantAfter\doifelse{#3}{\v!geen}{\hphantom}{\hbox}
+ {\doifelsenothing{#4}
+ {\setlocationboxnop#1[#2]{#3}[#4]}
+ {\doifreferencefoundelse{#4}
+ {\setlocationboxyes#1[#2]{#3}[#4]}
+ {\unknownreference{#4}%
+ \setlocationboxnop#1[#2]{#3}[#4]}}}%
\fi
\egroup}
@@ -2592,7 +2708,7 @@
\localframed[\??ib][]{\symbol[\v!vorigepagina]}}%
\!!heighta=\ht2
\stelinteractiebalkin[#1,\c!strut=\v!nee]%
- \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setupinteraction[\c!breedte=\!!zeropoint]%
%\!!counta=1
\!!counta=0 % new
\processallactionsinset
@@ -2643,6 +2759,62 @@
\egroup
\fi}
+%D \macros
+%D {overlaybutton}
+%D
+%D For converience we provide:
+%D
+%D \starttypen
+%D \overlaybutton[reference]
+%D \stoptypen
+%D
+%D This command can be used to define overlays an/or can be
+%D used in the whatevertext areas, like:
+%D
+%D \starttypen
+%D \defineoverlay[PrevPage][\overlaybutton{PrevPage}]
+%D \setupbackgrounds[page][background=PrevPage]
+%D \setuptexttexts[\overlaybutton{NextPage}]
+%D \stoptypen
+%D
+%D For practical reasons, this macro accepts square brackets
+%D as well as braces.
+
+\definecomplexorsimple\overlaybutton
+
+\def\simpleoverlaybutton#1%
+ {\complexoverlaybutton[#1]}
+
+\def\complexoverlaybutton% no text, next argument is [reference]
+ {\button
+ [\c!kader=\v!uit,\c!achtergrond=,
+ \c!breedte=\overlaywidth,\c!hoogte=\overlayheight]%
+ {}}
+
+%D \macros
+%D {dotextprefix}
+%D
+%D In previous macros we used \type {\dotextprefix} to
+%D generate a space between a label and a number.
+%D
+%D \starttypen
+%D \dotextprefix{text}
+%D \stoptypen
+%D
+%D Only when \type {text} is not empty, a space is inserted.
+
+\def\dotextprefix#1%
+ {\bgroup
+ \global\labeltextdonefalse % this is an ugly dependancy,
+ \setbox\scratchbox=\hbox{#1}% to be solved some day
+ \ifdim\wd\scratchbox>\!!zeropoint
+ \unhbox\scratchbox
+ \iflabeltextdone\else\@@rfscheider\fi
+ \else
+ \unhbox\scratchbox
+ \fi
+ \egroup}
+
%D In the next settings we see some variables that were not
%D used here and that concern the way the pagenumbers refered
%D to are typeset.
@@ -2652,14 +2824,17 @@
\v!deel\c!nummer=\v!ja,
\v!hoofdstuk\c!nummer=\v!nee,
\c!interactie=\v!alles,
-% \c!urlvariant=\v!beide,
-% \c!urlspatie=\v!nee,
-% \c!urlletter=,
-% \c!urlkleur=,
+ %\c!urlvariant=\v!beide,
+ %\c!urlspatie=\v!nee,
+ %\c!urlletter=,
+ %\c!urlkleur=,
+ \c!converteerfile=\v!ja,
+ %\c!strut=\v!nee, % some day an option
\c!prefix=,
\c!breedte=.75\zetbreedte,
\c!links=\citaat\bgroup,
- \c!rechts=\egroup]
+ \c!rechts=\egroup,
+ \c!scheider=~]
\setupurl
[\c!variant=\v!beide,
@@ -2681,7 +2856,7 @@
% \c!letter=\@@ialetter,
% \c!kleur=\@@iakleur,
% \c!zelfdepagina=\v!ja,
-% \c!onbekendeverwijzing=\v!leeg]
+% \c!onbekendeverwijzing=\v!ja]
\protect
diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex
new file mode 100644
index 000000000..6b58ae107
--- /dev/null
+++ b/tex/context/base/core-reg.tex
@@ -0,0 +1,873 @@
+%D \module
+%D [ file=core-reg,
+%D version=1999.12.27,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Register Management,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Register Management}
+
+\newif \ifautoregisterhack % for the moment a private hack
+
+% for the moment \e!register ipv #1 (evt nog \v!register)
+
+\unprotect
+
+%D Isolated but still indocumented.
+
+% Formaat tex-utility-input-file <jobname.tui>:
+%
+% i e {tag} {loc} {pure} {entry+..} {p:c:p:sp:ssp=>page} {realpage}
+% i s {tag} {loc} {pure} {entry+..} {other entry}
+%
+% In plaats van + kan een & worden gebruikt. Ook kan als
+% eerste karakter worden opgegeven wat de scheider is.
+%
+% \index {entry}
+% \index[key] {entry}
+% \index[pageclass::] {entry}
+% \index[pageclass::key]{entry}
+% \index {textclass::entry}
+% \index[key] {textclass::entry}
+% \index[pageclass::] {textclass::entry}
+% \index[pageclass::key]{textclass::entry}
+%
+% Deze file wordt met het Perl script TeXUtil omgezet in
+% een in te lezen file met de commando's:
+%
+% \registerentrya {tag} {ingang}
+% \registerentryb {tag} {subingang}
+% \registerentryc {tag} {subsubingang}
+%
+% \registerpage {tag} {pag,txt} {volgnummer} {paginanummer} {volgnummer}
+%
+% \registersee {tag} {pag,txt} {andere ingang}
+%
+% \registerentry {tag} {letter}
+
+\def\dostelregisterin[#1][#2][#3]%
+ {\ifthirdargument
+ \def\dodostelregisterin##1%
+ {\getparameters[\??id##1#2][#3]%
+ \preparepaginaprefix{\??id##1}}%
+ \else
+ \def\dodostelregisterin##1%
+ {\getparameters[\??id##1][#2]%
+ \doifvalue{\??id##1\c!koppeling}{\v!ja}
+ {\appendtoks\koppelregister[##1][#2]\to\everystarttext}%
+ \preparepaginaprefix{\??id##1}}%
+ \fi
+ \processcommalist[#1]\dodostelregisterin}
+
+\def\stelregisterin%
+ {\dotripleempty\dostelregisterin}
+
+\def\getlastregisterentry#1%
+ {\def\docommando##1%
+ {\def\!!stringa{##1}}%
+ \processconcanatedlist[#1][+]\docommando
+ \!!stringa}
+
+\def\doprocesspageregister[#1]#2%
+ {\begingroup
+ \thisisnextinternal{\s!ind}%
+ \ifduplicate\getlastregisterentry{#2}\fi
+ \convertexpanded{\??id\currentregister}{#2}\asciiregisterentry
+ \makesectionformat
+ \edef\schrijfwegnaarregister%
+ {\writeutility%
+ {r \ifcase\registerpagestatus\space\or e \or f \or t \fi
+ {\currentregister} %
+ {\nextinternalreference} %
+ {#1} %
+ {\asciiregisterentry} %
+ {\sectionformat::\noexpand\pagenumber} %
+ {\noexpand\realfolio}}}%
+ \schrijfwegnaarregister
+ \getfirstcharacter\currentregister
+ \registerinfo{> \firstcharacter}{#2}%
+ \endgroup}
+
+\def\complexdoregister[#1]#2%
+ {\doprocesspageregister[#1]{#2}%
+ \ifvmode\nobreak\fi
+ \GotoPar}
+
+%\def\doregister#1%
+% {\def\currentregister{#1}%
+% \complexorsimpleempty\doregister}
+
+\def\doregister#1%
+ {\chardef\registerpagestatus=1
+ \def\currentregister{#1}%
+ \complexorsimpleempty\doregister}
+
+\def\startregister%
+ {\dodoubleargument\dostartregister}
+
+\def\dostartregister[#1][#2]#3%
+ {\chardef\registerpagestatus=2
+ \def\currentregister{#1}%
+ \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#2]{#3}}%
+ \complexdoregister[#2]{#3}}
+
+\def\stopregister%
+ {\dodoubleargument\dostopregister}
+
+\def\dostopregister[#1][#2]%
+ {\getvalue{\??id#1\??id#2}\setgvalue{\??id#1\??id#2}{}}
+
+\def\dodostopregister[#1][#2]%
+ {\chardef\registerpagestatus=3
+ \def\currentregister{#1}%
+ \complexdoregister[#2]}
+
+\def\complexdozieregister[#1]#2#3%
+ {\begingroup
+ \thisisnextinternal{\s!ind}%
+ \ifduplicate\getlastregisterentry{#2}\fi
+ \convertexpanded{\??id\currentregister}{#2}\asciiregisterentry
+ \makesectionformat
+ \edef\schrijfwegnaarregister%
+ {\writeutility%
+ {r s %
+ {\currentregister} %
+ {\nextinternalreference} %
+ {#1} %
+ {\asciiregisterentry} %
+ {#3} %
+ {\sectionformat}}}%
+ \schrijfwegnaarregister
+ \endgroup
+ \registerinfo{> zie}{#2}%
+ \GotoPar}
+
+\def\dozieregister#1%
+ {\def\currentregister{#1}%
+ \complexorsimpleempty\dozieregister}
+
+\def\doschrijfnaarregister[#1]% % de twee-traps-aanroep is nodig
+ {\edef\currentregister{#1}% % om gebruik van \ExpandBothAfter
+ \doprocesspageregister} % mogelijk te maken
+
+\def\schrijfnaarregister%
+ {\dodoubleempty\doschrijfnaarregister}
+
+\def\ifregistergeplaatst{\ifutilitydone}
+
+\newif\iffirstregisterpage
+
+\def\c!entrya{}
+\def\c!entryb{}
+\def\c!entryc{}
+
+\def\nextregisterpage%
+ {\iffirstregisterpage
+ \doglobal\newcounter\registerpagenumber
+ \fi
+ \doglobal\increment\registerpagenumber}
+
+\def\doregisterpagelocation#1#2%
+ {\nextregisterpage
+ \hbox to 1em{\hss\doregisterpagehowto{#1}{#2}\hss}}
+
+\def\setregisterpage#1%
+ {\let\registerpageseparator=\empty
+ \processaction
+ [\getvalue{\??id#1\c!symbool}]
+ [ \c!n=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{\registerpagenumber}\/}},
+ \c!a=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{\character{\registerpagenumber}\/}}},
+ 1=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{$\bullet$}}},
+ 2=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{\vrule\!!width1em\!!height1ex\!!depth\!!zeropoint}}},
+ \v!geen=>{\def\doregisterpage##1[##2]{}},%
+ \s!unknown=>{\def\registerpagesymbol{\getvalue{\??id#1\c!symbool}}%
+ \def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{\registerpagesymbol}}},
+ \s!default=>{\def\registerpageseparator%
+ {,}%
+ \def\doregisterpage##1[##2]%
+ {\doregisterpagehowto{##1}
+ {\strut
+ \paginaprefix{\??id##1}[##2]%
+ \translatednumber[##2]}}}]}
+
+\let\registerpagehowto\empty
+\let\registertexthowto\empty
+
+\def\setregisterhowto[#1,#2]%
+ {\def\registerpagehowto{#1}%
+ \def\registertexthowto{#2}}%
+
+\def\doregistertexthowto#1#2%
+ {\dostartattributes{\??id#1\registertexthowto}\c!tekstletter\c!tekstkleur{}%
+ \getvalue{\??id#1\c!tekstcommando}{#2}%
+ \dostopattributes}
+
+\def\doregisterpagehowto#1#2%
+ {\dostartattributes{\??id#1\registerpagehowto}\c!paginaletter\c!paginakleur{}%
+ \getvalue{\??id#1\c!paginacommando}{#2}%
+ \dostopattributes}
+
+\def\registerentry #1{\executeifdefined{#1\s!entry}\gobbleoneargument}
+\def\registerentrya#1{\executeifdefined{#1\s!entrya}\gobbleoneargument}
+\def\registerentryb#1{\executeifdefined{#1\s!entryb}\gobbleoneargument}
+\def\registerentryc#1{\executeifdefined{#1\s!entryc}\gobbleoneargument}
+\def\registersee #1{\executeifdefined{#1\s!see}\gobblethrearguments}
+\def\registerpage #1{\executeifdefined{#1\s!page}\gobblefourarguments}
+\def\registerfrom #1{\executeifdefined{#1\s!from}\gobblefourarguments}
+\def\registerto #1{\executeifdefined{#1\s!to}\gobblefourarguments}
+
+\def\doresetregister#1%
+ {\letvalue{#1\s!entrya}=\gobbleoneargument
+ \letvalue{#1\s!entryb}=\gobbleoneargument
+ \letvalue{#1\s!entryc}=\gobbleoneargument
+ \letvalue {#1\s!see}=\gobblethreearguments
+ \letvalue {#1\s!page}=\gobblefourarguments
+ \letvalue {#1\s!from}=\gobblefourarguments
+ \letvalue {#1\s!to}=\gobblefourarguments
+ \letvalue {#1\s!entry}=\gobbleoneargument}
+
+\newif\iffirstsubentry
+\newif\iffirstsubsubentry
+
+\newcounter\currententrylevel
+
+\let\c!entryletter =\empty
+\let\c!entryreference=\empty
+\let\c!entrya =\relax
+\let\c!entryb =\relax
+\let\c!entryc =\relax
+
+\chardef\lastregisterpagestatus=0
+
+\def\limitedregisterentry#1#2%
+ {\getvalue{\??id#1\c!tekstcommando}%
+ {\doifelsenothing{\??id#1\c!maxbreedte}
+ {#2}
+ {\limitatetext{#2}{\getvalue{\??id#1\c!maxbreedte}}{\unknown}}}}
+
+\def\dosetpageregisterpage#1#2#3#4#5#6%
+ {\doifreglevelelse[#5]
+ {\global\utilitydonetrue
+ \c!entryletter
+ \setregisterhowto[#3]%
+ \def\dohandleregisterentry##1%
+ {\bgroup
+ \if!!donea % \strut nieuw
+ \setbox0=\hbox{\showlocation{\doregistertexthowto{#2}
+ {\strut\limitedregisterentry{#2}{##1}}}}%
+ \gotonextinternal{\s!ind}{#4}{#6}{\box0}%
+ \else
+ \doregistertexthowto{#2}{##1}%
+ \fi
+ \egroup
+ \!!doneafalse}%
+ \!!doneafalse
+ \doifelsevalue{\??id#2\c!interactie}{\v!tekst}
+ {\ifcase\currententrylevel \or
+ \!!doneatrue\c!entrya\c!entryb\c!entryc \or
+ \c!entrya\!!doneatrue\c!entryb\c!entryc \or
+ \c!entrya\c!entryb\!!doneatrue\c!entryc \fi}
+ {\c!entrya\c!entryb\c!entryc}%
+ \global\let\c!entrya=\relax
+ \global\let\c!entryb=\relax
+ \global\let\c!entryc=\relax
+ \global\let\c!entryletter=\relax
+ \global\let\c!entryreference=\relax
+ \iffirstregisterpage
+ \global\chardef\lastregisterpagestatus=0
+ \expandafter\hskip\getvalue{\??id#2\c!afstand}\relax
+ \donetrue
+ \else\ifnum#1=3
+ |--|\relax % -- !
+ \donetrue
+ \else\ifnum\lastregisterpagestatus=2
+ \donefalse % waiting for "to" pagenumber
+ \else
+ \registerpageseparator
+ |\spatie|\relax % \relax needed because | looks ahead
+ \donetrue
+ \fi\fi\fi
+ \ifdone
+ \doifelsevalue{\??id#2\c!interactie}{\v!paginanummer}
+ {\bgroup
+ \setbox0=\hbox
+ {\showlocation{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}%
+ \gotonextinternal{\s!ind}{#4}{#6}{\box0}%{\copy0}%
+ \egroup}
+ {\hbox{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}%
+ \ignorespaces
+ \global\chardef\lastregisterpagestatus=#1\relax
+ \fi
+ \global\firstregisterpagefalse}
+ {}}
+
+\def\dosetpageregistersee#1#2#3#4%
+ {\doifreglevelelse[#4::0]
+ {{\global\utilitydonetrue
+ \setregisterhowto[#2]%
+ \def\dohandleregisterentry##1% dubbelop | \strut nieuw
+ {\doregistertexthowto{#1}{\strut\limitedregisterentry{#1}{##1}}}%
+ \getvalue
+ {#1\ifcase\currententrylevel\s!entrya\or\s!entryb\else\s!entryc\fi}%
+ {\doregisterpagehowto{#1}{\labeltexts{\v!zie}{#3}}}%
+ \c!entryletter\c!entrya\c!entryb\c!entryc
+ \global\let\c!entrya=\relax
+ \global\let\c!entryb=\relax
+ \global\let\c!entryc=\relax
+ \global\let\c!entryletter=\relax
+ \global\let\c!entryreference=\relax
+ \global\chardef\lastregisterpagestatus=0
+ \global\firstregisterpagefalse}}
+ {}}
+
+\def\dosetpageregisterletter#1#2%
+ {\gdef\c!entryreference%
+ {\global\let\c!entryreference=\relax
+ \doifvalue{\??id#1\c!refereren}{\v!aan}
+ {\pagereference[#1:#2]}}%
+ \gdef\c!entryletter%
+ {\global\let\c!entryletter=\relax
+ \global\utilitydonetrue
+ \getvalue{\??id#1\c!voor}%
+ \vskip\lineheight\goodbreak\vskip-\lineheight
+ \doifelsevalue{\??id#1\c!aanduiding}{\v!ja}
+ {\ifhmode\unskip\else\noindent\fi
+ \getvalue{\??id#1\c!commando}% % needed
+ {\doattributes{\??id#1}\c!letter\c!kleur{\strut\ignorespaces#2}}%
+ \getvalue{\??id#1\c!na}%
+ \par\nobreak} % don't use \string#2, other hack
+ {\goodbreak}}} % needed #2 can be \string...
+
+\def\dosetpageregisterentrya#1#2%
+ {\edef\currententrylevel{1}%
+ \global\let\c!entryb=\relax
+ \global\let\c!entryc=\relax
+ \gdef\c!entrya%
+ {\global\firstregisterpagetrue
+ \endgraf
+ \hangindent1em\noindent\c!entryreference
+ \dohandleregisterentry{#2}%
+ \global\firstsubentrytrue
+ \global\firstsubsubentrytrue}}
+
+\def\dosetpageregisterentryb#1#2%
+ {\edef\currententrylevel{2}%
+ \global\let\c!entryc=\relax
+ \global\def\c!entryb%
+ {\global\firstregisterpagetrue
+ \global\let\c!entrya=\relax
+ \endgraf
+ \iffirstsubentry\nobreak\fi
+ \hangindent2em\noindent\c!entryreference\hskip1em\relax
+ \dohandleregisterentry{#2}%
+ \global\firstsubentryfalse
+ \global\firstsubsubentrytrue}}
+
+\def\dosetpageregisterentryc#1#2%
+ {\edef\currententrylevel{3}%
+ \gdef\c!entryc%
+ {\global\firstregisterpagetrue
+ \global\let\c!entrya=\relax
+ \global\let\c!entryb=\relax
+ \endgraf
+ \iffirstsubsubentry\nobreak\fi
+ \hangindent3em\noindent\c!entryreference\hskip2em\relax
+ \dohandleregisterentry{#2}%
+ \global\firstsubsubentryfalse}}
+
+\def\dosetpageregister#1%
+ {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \global\let\currentregisterentry\empty
+ \global\firstsubentrytrue
+ \global\firstsubsubentrytrue
+ \setregisterpage{#1}%
+ \chardef\lastregisterpagestatus=0
+ \setvalue{#1\s!entrya}{\dosetpageregisterentrya {#1}}%
+ \setvalue{#1\s!entryb}{\dosetpageregisterentryb {#1}}%
+ \setvalue{#1\s!entryc}{\dosetpageregisterentryc {#1}}%
+ \setvalue {#1\s!page}{\dosetpageregisterpage{1}{#1}}%
+ \setvalue {#1\s!from}{\dosetpageregisterpage{2}{#1}}%
+ \setvalue {#1\s!to}{\dosetpageregisterpage{3}{#1}}%
+ \setvalue {#1\s!see}{\dosetpageregistersee {#1}}%
+ \setvalue {#1\s!entry}{\dosetpageregisterletter {#1}}}
+
+\def\getalllistreferences#1#2%
+ {\doglobal\convertexpanded{\??id#1}{#2}\currentregisterentry
+ \doifdefinedelse{\??id#1\??id\currentregisterentry}
+ {\edef\alllistreferences%
+ {\getvalue{\??id#1\??id\currentregisterentry}}%
+ \beforesplitstring\alllistreferences\at::\to\internallistreference
+ \aftersplitstring\alllistreferences\at::\to\alllistreferences}
+ {\let\alllistreferences=\empty
+ \def\internallistreference{0}}}
+
+\def\dosetlinkregister#1% is die page reference echt nodig?
+ {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setregisterpage{#1}%
+ \global\let\currentregisterentry\empty
+ \global\firstsubentrytrue % not needed
+ \global\firstsubsubentrytrue % not needed too
+ \setvalue{#1\s!entrya}##1%
+ {\dosetlinkregisterentrya{#1}{##1}}%
+ \setvalue{#1\s!entry}##1%
+ {\dosetpageregisterletter{#1}{##1}}}
+
+\def\dosetlinkregisterentrya#1#2%
+ {\global\utilitydonetrue
+ \c!entryletter
+ \iflocation
+ \getalllistreferences{#1}{#2}%
+ \endgraf\hangindent1em\noindent\c!entryreference
+ %
+ %\thisissomeinternal{\s!lin}{\internallistreference}%
+ %
+ \pagereference[-:\s!lin:\internallistreference]% -: added
+ %
+ \getcommacommandsize[\alllistreferences]%
+ \getfromcommacommand[\alllistreferences][1]%
+ \ifnum\commalistsize=1
+ \let\firstlistreference=\empty
+ \let\midlistreference=\commalistelement
+ \let\lastlistreference=\empty
+ \else
+ \let\firstlistreference=\commalistelement
+ \getfromcommacommand[\alllistreferences][\commalistsize]%
+ \let\lastlistreference=\commalistelement
+ \ifnum\commalistsize=2
+ \let\midlistreference=\empty
+ \else
+ \!!counta=\commalistsize
+ \divide\!!counta by 2
+ \getfromcommacommand[\alllistreferences][\!!counta]%
+ \let\midlistreference=\commalistelement
+ \fi
+ \fi
+ % aangepast
+ \def\dodocommando[####1-####2]%
+ {\gotonextinternal{\s!ind}{####1}{####2}{\box0}}%
+ \doifelsevalue{\??id#1\c!interactie}{\v!paginanummer}
+ {\limitedregisterentry{#1}{#2}} % paginanummer
+ {{\setbox0=\hbox{\limitedregisterentry{#1}{\begstrut#2}}%
+ \ifx\firstlistreference\empty % tekst,alles
+ \ifx\midlistreference\empty
+ \box0
+ \else
+ \expandafter\dodocommando\expandafter[\midlistreference]%
+ \fi
+ \else
+ \expandafter\dodocommando\expandafter[\firstlistreference]%
+ \fi}}%
+ \doifvalue{\??id#1\c!nummer}{\v!ja}
+ {\hskip\getvalue{\??id#1\c!afstand}(\commalistsize)}%
+ \doifnotvalue{\??id#1\c!interactie}{\v!tekst} % paginanummer,alles
+ {\def\docommando####1####2%
+ {{\setbox0=\hbox{\showlocation{\hbox to 1em{\hss\symbol[####2]\hss}}}%
+ \ifx####1\empty
+ % \hskip\wd0 % (optioneel maken)
+ \else
+ \expandafter\dodocommando\expandafter[####1]%
+ \fi}}%
+ \hskip\getvalue{\??id#1\c!afstand}%
+ \docommando\firstlistreference\v!vorige
+ \docommando\midlistreference\v!ergens
+ \docommando\lastlistreference\v!volgende}%
+ % tot hier
+ \else
+ \endgraf\noindent\c!entryreference
+ \limitedregisterentry{#1}{#2}%
+ \fi}
+
+%\def\dosetregister#1%
+% {\doifelsevalue{\??id#1\c!koppeling}{\v!ja}
+% {\dosetlinkregister{#1}}
+% {\dosetpageregister{#1}}}
+
+\def\dosetregister#1%
+ {\doifelsevalue{\??id#1\c!koppeling}{\v!ja}
+ {\ifautoregisterhack
+ \dosetautoregister{#1}%
+ \else
+ \dosetlinkregister{#1}%
+ \fi}
+ {\dosetpageregister{#1}}}
+
+\newcounter\internallistreference
+
+\def\doloadregisterlinks#1%
+ {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setregisterpage{#1}%
+ \global\let\currentregisterentry\empty
+ \global\firstregisterpagetrue
+ \setvalue{#1\s!entrya}##1%
+ {\global\firstregisterpagetrue
+ \doglobal\convertargument##1\to\currentregisterentry % \doglobal nodig?
+ \doglobal\increment\internallistreference}%
+ \setvalue{#1\s!from}%
+ {\getvalue{#1\s!page}}%
+ \setvalue{#1\s!page}##1##2##3##4%
+ {\doifreglevelelse[##3]
+ {\global\utilitydonetrue
+ \iffirstregisterpage
+ \global\firstregisterpagefalse
+\ifautoregisterhack
+ \setxvalue{\??id#1\??id\currentregisterentry}%
+ {\internallistreference::##4}%
+\else
+ \setxvalue{\??id#1\??id\currentregisterentry}%
+ {\internallistreference::##2-##4}%
+\fi
+ \else % catches errors in index
+\ifautoregisterhack % binnen doif
+ \doifdefined{\??id#1\??id\currentregisterentry}
+ {\setxvalue{\??id#1\??id\currentregisterentry}%
+ {\getvalue{\??id#1\??id\currentregisterentry},##4}}%
+\else
+ \doifdefined{\??id#1\??id\currentregisterentry}
+ {\setxvalue{\??id#1\??id\currentregisterentry}%
+ {\getvalue{\??id#1\??id\currentregisterentry},##2-##4}}%
+\fi
+ \fi}
+ {}}}
+
+%\def\dokoppelregister[#1][#2]%
+% {\iflocation
+% \begingroup
+% \let\dosetregister=\doloadregisterlinks
+% \stelregisterin[#1][#2]%
+% \doutilities{#1}{\jobname}{#1}{}{}%
+% \endgroup
+% \fi}
+
+\def\dokoppelregister[#1][#2]%
+ {\iflocation
+ \ifcase0\countervalue{autolink:#1}\relax % only once
+ \begingroup
+ \let\dosetregister=\doloadregisterlinks
+ \stelregisterin[#1][#2]%
+ \doutilities{#1}{\jobname}{#1}{}{}%
+ \endgroup
+ \ifautoregisterhack
+ \doinitializeautoregister{#1}%
+ \else
+ \doinitializelinkregister{#1}%
+ \fi
+ \fi
+ \fi}
+
+\def\koppelregister%
+ {\dodoubleempty\dokoppelregister}
+
+\def\doprocesslinkregister[#1][#2]#3%
+ {\hbox
+ {\doprocesspageregister[#2]{#3}%
+ \let\firstlistreference=\empty
+ \let\lastlistreference=\empty
+ \let\selflistreference=\empty
+ \let\prevlistreference=\empty
+ \let\nextlistreference=\empty
+ \getalllistreferences{#1}{#3}%
+ \doifnot{\alllistreferences}{}
+ {\def\dodocommando[##1-##2]%
+ {\ifx\firstlistreference\empty
+ \def\firstlistreference{##1-##2}%
+ \fi
+ \def\lastlistreference{##1-##2}%
+ \ifnum##1<\nextinternalreference\relax
+ \def\prevlistreference{##1-##2}%
+ \else\ifnum##1>\nextinternalreference\relax
+ \def\nextlistreference{##1-##2}%
+ \def\dodocommando[####1-####2]%
+ {\def\lastlistreference{####1-####2}}%
+ \else
+ \def\selflistreference{##1-##2}%
+ \fi\fi}%
+ \def\docommando##1%
+ {\dodocommando[##1]}%
+ \processcommacommand[\alllistreferences]\docommando}%
+ \ifx\prevlistreference\empty
+ \let\prevlistreference=\lastlistreference
+ \fi
+ \ifx\nextlistreference\empty
+ \let\nextlistreference=\firstlistreference
+ \fi
+ \ifx\prevlistreference\selflistreference
+ \let\prevlistreference=\empty
+ \let\nextlistreference=\empty
+ \fi
+ \def\dodocommando[##1-##2]%
+ {\gotonextinternal{\s!ind}{##1}{##2}{\box0}}%{\copy0}}%
+ \def\docommando##1##2%
+ {\bgroup
+ \ifx##1\empty
+ \doifvalue{\??id#1\c!onbekendeverwijzing}{\v!leeg}
+ {\hskip1em}%
+ \else
+ \setbox0=\hbox to 1em{\hss\showlocation{\symbol[##2]}\hss}%
+ \expandafter\dodocommando\expandafter[##1]%
+ \fi
+ \egroup}%
+ \processaction
+ [\getvalue{\??id#1\c!plaats}]
+ [\v!midden=>\docommando\prevlistreference\v!vorige,
+ \v!links=>\docommando\prevlistreference\v!vorige
+ \docommando\nextlistreference\v!volgende]%
+ \doifreferencefoundelse{\s!lin:\internallistreference}
+ {\gotosomeinternal
+ {\s!lin}{\internallistreference}{\currentrealreference}
+ {\showlocation{\limitedregisterentry{#1}{#3}}}}
+ {\hbox{\limitedregisterentry{#1}{#3}}}%
+ \processaction
+ [\getvalue{\??id#1\c!plaats}]
+ [ \v!midden=>\docommando\nextlistreference\v!volgende,
+ \v!rechts=>\docommando\prevlistreference\v!vorige
+ \docommando\nextlistreference\v!volgende]}}
+
+\def\dodolinkedregister[#1][#2]#3% page auto link
+ {\bgroup
+ \chardef\registerpagestatus=1
+ \def\currentregister{#1}%
+ \iflocation
+ \ifautoregisterhack
+ \def\next{\doprocessautoregister[#1][#2]{#3}}%
+ \else
+ \def\next{\doprocesslinkregister[#1][#2]{#3}}%
+ \fi
+ \else
+ \def\next{\doprocesspageregister[#2]{#3}}%
+ \fi
+ \next
+ \egroup
+ \ifvmode\nobreak\fi
+ \GotoPar}
+
+\def\dolinkedregister#1%
+ {\dodoubleempty\dodolinkedregister[#1]}
+
+\def\dosetautoregister#1%
+ {\makecounter{autolink:#1}%
+ \dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setregisterpage{#1}%
+ \global\let\currentregisterentry\empty
+ \global\firstsubentrytrue % not needed
+ \global\firstsubsubentrytrue % not needed too
+ \setvalue{#1\s!entrya}##1%
+ {\dosetautoregisterentrya{#1}{##1}}%
+ \setvalue{#1\s!entry}##1%
+ {\dosetpageregisterletter{#1}{##1}}}
+
+\def\dosetautoregisterentrya#1#2% for the moment \e!register ipv #1
+ {\global\utilitydonetrue
+ \c!entryletter
+ \iflocation
+ \getalllistreferences{#1}{#2}%
+ \endgraf\hangindent1em\noindent\c!entryreference
+ \pagereference[-:\s!lin:\internallistreference]%
+ \pluscounter{autolink:#1}%
+ \bgroup
+ \setupinteraction[\c!kleur=,\c!contrastkleur=,\c!letter=]% kan sneller
+ \naarbox
+ {\limitedregisterentry{#1}{\begstrut#2}}%
+ [JS(SetRegisterEntry{\e!register,\countervalue{autolink:#1},#2,{\alllistreferences}})]%
+ \egroup
+ \else
+ \endgraf\noindent\c!entryreference
+ \limitedregisterentry{#1}{#2}%
+ \fi}
+
+\def\doprocessautoregister[#1][#2]#3%
+ {\hbox
+ {\doprocesspageregister[#2]{#3}%
+ \doifreferencefoundelse{\s!lin:\internallistreference}
+ {\gotosomeinternal
+ {\s!lin}{\internallistreference}{\currentrealreference}
+ {\showlocation{\limitedregisterentry{#1}{#3}}}}
+ {\hbox{\limitedregisterentry{#1}{#3}}}}}
+
+% \appendmacro aan openpaginaactie (in shipout)
+
+%D The first implementation used one main field with clones.
+%D In a 2500 page document this resulted in a rather (anoying)
+%D long start||up time. This \quote {every page its own field}
+%D solution, combined with a \quote {page open action}, works
+%D much faster, but is conceptually pretty weak.
+
+\def\complexregisterfield[#1]%
+ {\definefield[#1:\realfolio][line][\e!register]%
+ \field[#1:\realfolio]}
+
+\def\simpleregisterfield%
+ {\complexregisterfield[\e!register]}
+
+\definecomplexorsimple\registerfield
+
+\setupfield
+ [\e!register]
+ [\c!breedte=10em,
+ \c!hoogte=3ex,
+ \c!uitlijnen=\v!midden,
+ \c!optie=\v!alleenleesbaar,
+ \c!plaats=\v!laag]
+
+\def\doinitializeautoregister#1% for the moment \e!register ipv #1
+ {\useJSscripts[reg]%
+ \useJSpreamblenow{LinkedRegisters}%
+ \setupinteraction[\c!openpaginaactie=JS(UpdateRegisterField{\e!register})]%
+ \definereference[\v!reset \e!register][JS(ResetRegisterEntry{\e!register})]%
+ \definereference[\v!eerste \e!register][JS(GotoFirstRegisterEntry{\e!register})]%
+ \definereference[\v!vorige \e!register][JS(GotoPreviousRegisterEntry{\e!register})]%
+ \definereference[\v!volgende\e!register][JS(GotoNextRegisterEntry{\e!register})]%
+ \definereference[\v!laatste \e!register][JS(GotoLastRegisterEntry{\e!register})]}
+
+\def\doinitializelinkregister#1%
+ {}
+
+\def\complexdoplaatsregister[#1]%
+ {\begingroup
+ \stelregisterin[\currentregister][#1]%
+ \raggedright
+ \startkolommen
+ [\c!n=\getvalue{\??id\currentregister\c!n},
+ \c!balanceren=\getvalue{\??id\currentregister\c!balanceren},
+ \c!uitlijnen=\getvalue{\??id\currentregister\c!uitlijnen}]%
+ \mindermeldingen
+ \startopelkaar[\v!blanko]%
+ \doutilities{\currentregister}{\jobname}{\currentregister}{}{\par}%
+ \stopopelkaar
+ \stopkolommen
+ \endgroup}
+
+\def\doplaatsregister[#1]%
+ {\def\currentregister{#1}%
+ \complexorsimpleempty\doplaatsregister}
+
+\def\plaatsregister%
+ {\dosingleargument\doplaatsregister}
+
+\def\complexdovolledigregister[#1]% \@EA's kunnen weg
+ {\@EA\plaatsvolledig\@EA{\@EA\systemsuppliedchapter\@EA}%
+ \@EA{\@EA\currentregister\@EA}%
+ \@EA{\@EA\headtext\@EA{\currentregister}}%
+ {\complexdoplaatsregister[#1]}}
+
+\def\dovolledigregister[#1]%
+ {\def\currentregister{#1}%
+ \complexorsimpleempty\dovolledigregister}
+
+\def\volledigregister%
+ {\dosingleargument\doplaatsregister}
+
+\def\dodefinieerregister[#1][#2]%
+ {\stelregisterin[#1]%
+ [\c!n=2,
+ \c!balanceren=\v!ja, % \v!nee komt niet zo vaak voor
+ \c!uitlijnen=\v!nee,
+ \c!voor=\blanko, % binnen kolommen: \blanko[\v!regel]
+ \c!na=,
+ \c!symbool=,
+ \c!interactie=\v!paginanummer,
+ \c!afstand=1em,
+ \c!letter=\v!vet,
+ \c!paginaletter=\v!schuin,
+ \c!aanduiding=\v!ja,
+ \v!deel\v!nummer=\v!ja, % v
+ \v!hoofdstuk\c!nummer=\v!nee,
+ \c!criterium=\v!alles,
+ \c!commando=,
+ \c!refereren=\v!aan,
+ \c!plaats=\v!midden,
+ \c!maxbreedte=,
+ \c!nummer=\v!nee,
+ \c!onbekendeverwijzing=\v!leeg]%
+ \presetheadtext[#1=\Word{#1}]%
+ \setvalue{#1}%
+ {\doregister{#1}}%
+ \setvalue{\e!gekoppelde#1}%
+ {\dolinkedregister{#1}}%
+ \setvalue{\s!set#1}%
+ {\dosetregister{#1}}%
+ \setvalue{\s!reset#1}%
+ {\doresetregister{#1}}%
+ \addutilityreset{#1}%
+ \setvalue{\e!zie#1}%
+ {\dozieregister{#1}}%
+ \setvalue{\e!plaats#1}%
+ {\doplaatsregister[#1]}%
+ \setvalue{\e!volledige#1}%
+ {\dovolledigregister[#1]}%
+ \setvalue{\e!stel#1\e!in}[##1]%
+ {\getparameters[\??id#1][##1]}}
+
+\def\definieerregister%
+ {\dodoubleargument\dodefinieerregister}
+
+\def\registerlengte {\utilityregisterlength}
+
+\def\utilityregisterlength {0}
+
+\def\dobepaalregisterkenmerken[#1][#2]%
+ {\begingroup
+ \stelregisterin[#1][#2]%
+ \dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setvalue{#1\s!from}%
+ {\getvalue{#1\s!page}}%
+ \setvalue{#1\s!page}##1##2##3##4%
+ {\doifreglevelelse[##3]
+ {\doglobal\increment\utilitylistlength
+ \global\utilitydonetrue}
+ {}}%
+ \doglobal\newcounter\utilityregisterlength
+ \setbox0=\vbox
+ {\doutilities{#1}{\jobname}{#1}{}{}}%
+ \endgroup
+ \ifregistergeplaatst\enablemode[\e!register]\else\disablemode[\e!register]\fi}
+
+\def\bepaalregisterkenmerken%
+ {\dodoubleempty\dobepaalregisterkenmerken}
+
+\definieerregister
+ [\v!index]
+ [\v!indices]
+
+% \stelregisterin[index][koppeling=ja]
+%
+% \stelveldenin
+% [register][achtergrond=raster,kader=uit]
+%
+% \stelvoettekstenin
+% [{\field[index]}]
+%
+% \stelhoofdtekstenin
+% [{\naar {first}[eersteindex]\quad
+% \naar{previous}[vorigeindex]\quad
+% \naar {next}[volgendeindex]\quad
+% \naar {last}[laatsteindex]\quad\quad
+% \naar {index}[index]}]
+%
+% \starttekst
+%
+% oeps~~~\gekoppeldeindex{oeps} \blanko
+% flop~~~\gekoppeldeindex{flop} \blanko
+% test~~~\gekoppeldeindex{test} \pagina
+% flop~~~\gekoppeldeindex{flop} \blanko
+% test~~~\gekoppeldeindex{test} \pagina
+% oeps~~~\gekoppeldeindex{oeps} \blanko
+% test~~~\gekoppeldeindex{test} \pagina
+% flop~~~\gekoppeldeindex{flop} \blanko
+% oeps~~~\gekoppeldeindex{oeps} \pagina
+%
+% \volledigeindex
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index d87cfc1d4..b790ff1dd 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Ruled Stuff Handling}
@@ -232,7 +232,7 @@
%D \macros
%D {defineoverlay,
%D overlaywidth, overlayheight, overlaydepth,
-%D overlaycolor}
+%D overlaycolor, overlaylinecolor, overlaylinewidth}
%D
%D Before we define the macro that actually takes card of the
%D backgrounds, we introduce overlays. An overlay is something
@@ -243,7 +243,7 @@
%D \defineoverlay
%D [fancy]
%D [{\externfiguur
-%D [gene-011]
+%D [mp-cont.502]
%D [breedte=\overlaywidth,
%D hoogte=\overlayheight]}]
%D \stopbuffer
@@ -287,9 +287,14 @@
%D
%D The resulting box is lowered to the right depth.
-\def\overlaywidth {\the\vsize} % We preset the variables
-\def\overlayheight{\the\hsize} % to some reasonable default
-\def\overlaydepth {\!!zeropoint} % values.
+\def\overlaywidth {\the\vsize} % We preset the variables
+\def\overlayheight {\the\hsize} % to some reasonable default
+\let\overlaydepth \!!zeropoint % values. The attributes
+\let\overlaycolor \empty % of the frame can be (are)
+\let\overlaylinewidth \!!zeropoint % set somewhere else.
+\let\overlaylinecolor \empty %
+
+\newtoks\everyoverlay
\def\defineoverlay%
{\dodoubleargument\dodefineoverlay}
@@ -302,17 +307,17 @@
\long\def\executedefinedoverlay#1\\#2\\#3#4#5#6#7#8#9%
{\bgroup
\scratchdimen=#3%
- \edef\overlaywidth {\the\scratchdimen}%
+ \edef\overlaywidth{\the\scratchdimen}%
\scratchdimen=#4%
\advance\scratchdimen by #5%
\edef\overlayheight{\the\scratchdimen}%
\scratchdimen=#5%
- \edef\overlaydepth {\the\scratchdimen}%
+ \edef\overlaydepth{\the\scratchdimen}%
\edef\overlaycolor{#6}%
%\writestatus
% {overlay}
% {#1\space w=\overlaywidth/h+d=\overlayheight/d=\overlaydepth]}%
- \setbox0=\hbox{\lower\overlaydepth\hbox{#2}}%
+ \setbox0=\hbox{\lower\overlaydepth\hbox{\the\everyoverlay#2}}%
\dimen0=\wd0 \advance\dimen0 by -\overlaywidth
\dimen2=\ht0 \advance\dimen2 by -#4% not \overlayheight
\wd0=\overlaywidth
@@ -360,10 +365,10 @@
{\dimen2}{\dimen4}{\dimen6}{#3}{#4}{#5}{#6}}%
\setbox\extraframebox=\hbox
{\vbox{\moveleft\dimen0\box\extraframebox}}%
- \wd\extraframebox=\wd#2%
- \ht\extraframebox=\ht#2%
- \dp\extraframebox=\dp#2%
- \box\extraframebox\hskip-\wd#2%
+ \wd\extraframebox=\backgroundwidth
+ \ht\extraframebox=\backgroundheight
+ \dp\extraframebox=\backgrounddepth
+ \box\extraframebox\hskip-\backgroundwidth
\egroup}
\def\dobackgroundbox#1\background#2\color#3\raster#4\offset#5\corner
@@ -377,8 +382,17 @@
\def\docommando##1%
{\dodobackgroundbox{##1}{#1}{#3}{#4}{#6}{#7}}%
\hbox
- {\expanded{\rawprocesscommalist[#2]\noexpand\docommando}%
- \box#1}}}
+ {\edef\backgroundwidth {\the\wd#1}%
+ \edef\backgroundheight{\the\ht#1}%
+ \edef\backgrounddepth {\the\dp#1}%
+ \edef\foregroundbox{\box#1}%
+ \expanded{\rawprocesscommalist[#2]\noexpand\docommando}%
+ \box#1}}}
+
+%D One can explictly insert the foreground box. For that
+%D purpose we introduce the overlay \tyupe {foreground}.
+
+\defineoverlay[\v!voorgrond][\foregroundbox]
%D We can specify overlays as a comma separated list of
%D overlays, a sometimes handy feature.
@@ -403,7 +417,8 @@
\ht\extraframebox=\ht#1%
\dp\extraframebox=\dp#1%
\hbox
- {\copy#1\hskip-\wd#1%
+ {%\copy#1\hskip-\wd#1%
+ \box#1\hskip-\wd\extraframebox % faster
\doifelsenothing{#2} % speeds up a little
{\box\extraframebox}
{\color[#2]{\box\extraframebox}}}}}
@@ -524,8 +539,8 @@
[\c!breedte,\c!hoogte,\c!offset,\c!leeg,
\c!straal,\c!hoek,\c!diepte,\c!kader,\c!kaderkleur,
\c!bovenkader,\c!onderkader,\c!linkerkader,\c!rechterkader,
- \c!lijndikte,\c!kaderoffset,\c!achtergrondoffset,
- \c!achtergrond,\c!achtergrondraster,\c!achtergrondkleur,
+ \c!lijndikte,\c!kaderoffset,\c!achtergrond,
+ \c!achtergrondoffset,\c!achtergrondraster,\c!achtergrondkleur,
\c!uitlijnen,\c!onder,\c!boven,\c!strut,\c!plaats]%
\copyparameters[#1\c!achtergrond][#1]
[\c!straal,\c!hoek,\c!diepte]%
@@ -535,16 +550,23 @@
\def\setupframed%
{\dodoubleargument\getparameters[\??oi]}
+%D \macros
+%D {ifinframed}
+%D
%D The normal case first presets all parameters and next starts
%D looking for the user supplied ones. The first step is
%D omitted in the local case, because these are preset at
%D declaration time and keep their values unless explictly
%D changed. By presetting the variables everytime the normal
%D command is called, we can use this command nested, without
-%D the unwanted side effect of inheritance.
+%D the unwanted side effect of inheritance. The boolean is
+%D used to speed up the color stack.
+
+\newif\ifinframed
\def\localframed%
{\bgroup
+ \inframedtrue
\dodoubleargument\startlocalframed}
%D Before we go into details, we present (and implement) the
@@ -554,15 +576,10 @@
%D dimensions and specific settings concerning aligment and
%D offsets.
-%\let\backgroundcolor\empty
-%\let\framecolor \empty
-
\def\startlocalframed[#1][#2]%
{\bgroup
\edef\@@framed{#1}%
\getparameters[\@@framed][#2]%
- %\edef\backgroundcolor{\getvalue{\@@framed\c!achtergrondkleur}}%
- %\edef\framecolor {\getvalue{\@@framed\c!kaderkleur}}%
\edef\localoffset{\getvalue{\@@framed\c!offset}}%
\edef\localwidth{\getvalue{\@@framed\c!breedte}}%
\edef\localheight{\getvalue{\@@framed\c!hoogte}}%
@@ -715,7 +732,10 @@
\ifboxisoverlaid \else
\dolocateframebox
\fi
- \doframedbox
+ \doifelsevalue{\@@framed\c!kader}{\v!overlay}
+ {\edef\overlaylinecolor{\getvalue{\@@framed\c!kaderkleur}}%
+ \edef\overlaylinewidth{\the\linewidth}}%
+ {\doframedbox}%
\doifvaluesomething{\@@framed\c!achtergrond}
{\dobackedbox}%
\doifelsevalue{\@@framed\c!plaats}{\v!laag}
@@ -1188,7 +1208,7 @@
%D frame as well as the background an additional offset and
%D even a bit more depth. The blue outline is the frame, the
%D red box is the background and the small black outline is the
-%D vsiualization of the resulting box, that is, we applied
+%D visualization of the resulting box, that is, we applied
%D \type{\ruledhbox} to the result.
%D \startuitstellen
@@ -1489,12 +1509,9 @@
\def\dodrawmarginrule%
{\setbox0=\hbox
- {\vrule
- \!!height\strutheight
- \!!depth\strutdepth
- \!!width\@@kadikte}%
- \vsmashbox0
- \box0}
+ {\vrule\!!depth\strutdepth\!!height\strutheight\!!width\@@kadikte}%
+ \smashbox0 % no \vsmash !!!
+ \box0}
\def\drawmarginrule%
{\strut\inlinker{\dodrawmarginrule}}
@@ -1835,7 +1852,8 @@
\c!achtergrond=,
\c!achtergrondkleur=,
\c!achtergrondraster=\@@rsraster,
- \c!regelcorrectie=\v!aan,
+ \c!regelcorrectie=\v!aan,
+ \c!marge=\v!standaard,
#2]%
\setvalue{\e!start#1}{\dostartframedtext[#1]}%
\setvalue{\e!stop#1}{\dostopframedtext[#1]}
@@ -2309,7 +2327,8 @@
%D adding a dummy line.
\def\dostartbackground%
- {\bgroup
+ {\endgraf
+ \bgroup
\setbox0=\vbox\bgroup
\vbox to \lineheight{}\vskip\!!zeropoint
\blanko[\v!blokkeer]
@@ -2389,7 +2408,8 @@
\pagina
\fi
\ifdim\ht0>\!!zeropoint \repeat
- \egroup}
+ \egroup
+ \endgraf}
%D As a bonus we also have a short command, that is of not
%D much use, but kept there for historic reasons.
@@ -2462,7 +2482,7 @@
\c!raster=0.95]
\setupblackrules
- [\c!n=1,
+ [\c!n=3,
\c!breedte=1em,
\c!hoogte=1ex,
\c!diepte=\!!zeropoint,
@@ -2519,9 +2539,9 @@
\c!straal=.5\bodyfontsize,
\c!hoek=\v!recht,
\c!kader=\v!uit,
+ \c!kleur=,
\c!diepte=\!!zeropoint,
\c!achtergrond=\v!raster,
- \c!kleur=,
\c!achtergrondkleur=\@@agkleur,
\c!raster=\@@rsraster]
diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex
index c8a088df5..a8370143d 100644
--- a/tex/context/base/core-tab.tex
+++ b/tex/context/base/core-tab.tex
@@ -8,17 +8,16 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Core Macros / TaBlE Embedding}
% e-tex: reverse rows or vadjust or ... in tables
% \ifalign
% \xhrule : calls for 'special' with width
-
-% BUG:
-%
+% BUG:
+%
% \starttabel[|l|l|]
% \HL
% \RL\FR \VL Head 1 \VL Head 2 \VL\FR
@@ -64,7 +63,6 @@
% THIS RENEWED MODULE WORKS OK BUT STILL LOOKS BAD
-
%D We felt no need to write our own table building macros,
%D simply because Michael Wichura made a terrific one. This
%D package is quite complete and well documented. In \CONTEXT\
@@ -92,7 +90,7 @@
\newif\ifsplittables
%D \macros
-%D {iftracetable}
+%D {iftracetables}
%D
%D When I documented this module, I felt the need for tracing
%D options. After implementing this feature, I also added
@@ -414,60 +412,85 @@
%D To keep things verbose, as well as to show what \TABLE\
%D commands we affect, we show some meanings.
-\def\normalTABLEshortrule {\!ttShortHrule} % \-
-\def\normalTABLElongrule {\!ttLongHrule} % \=
-\def\normalTABLEfullrule {\!ttFullHrule} % \_
-\def\normalTABLEendofrow {\!ttEndOfRow} % \\
-\def\normalTABLEsimplebar {\unskip\!ttRightGlue&&} % |
+\def\normalTABLEshortrule {\!ttShortHrule} % \-
+\def\normalTABLElongrule {\!ttLongHrule} % \=
+\def\normalTABLEfullrule {\!ttFullHrule} % \_
+\def\normalTABLEendofrow {\!ttEndOfRow} % \\
+\def\normalTABLEsimplebar {\unskip\!ttRightGlue&&} % |
\def\normalTABLEcomplexbar {\unskip\!ttRightGlue&\omit\!ttAlternateVrule} % \|
-\def\normalTABLEquote {\unskip\!ttRightGlue&\omit&} % "
+\def\normalTABLEquote {\unskip\!ttRightGlue&\omit&} % "
\def\normalTABLElineformat {\normalTABLEendofrow+}
\def\normalTABLElineending {\normalTABLEendofrow0 }
\def\normalTABLEsinglerule {&\normalTABLElongrule&}
\def\normalTABLEmultirule#1{&\use{#1}\normalTABLElongrule&}
-%D The next hack is dedicated to Tobias, who found out that
-%D paragraph entries don't break well.
+%D The next hack is dedicated to Tobias, who found out that
+%D paragraph entries don't break well.
\def\TABLEhack{\hskip\!!zeropoint}
-%D The first attemp to solve this problem was:
+%D The first attemp to solve this problem was:
%D
%D \starttypen
%D \def\normalTABLEquote%
%D {\unskip\TABLEhack\!ttRightGlue&\omit&\TABLEhack}
%D \stoptypen
%D
-%D But, as usual, this interfered with \type {\omit}.
-%D
-%D The next attempt is redefining some core \TABLE\ macro:
-
-\def\!tfAdjoinPriorColumn%
- {\ifnum\!taColumnNumber=0
- \!taPreamble=\!taRuleColumnTemplate
- \ifnum\TracingFormats>0 \!tfShowRuleTemplate\fi
- \else
- \ifx\!tfRowOfWidths\empty \else \!tfUpdateRowOfWidths\fi
- \!thToksEdef\!taDataColumnTemplate=
- {\the\!taLeftGlue \the\!taDataColumnTemplate \the\!taRightGlue}%
- \ifnum\TracingFormats>0 \!tfShowTemplates\fi
- \!thToksEdef\!taPreamble=
- {\the\!taPreamble&\the\!taDataColumnTemplate&\the\!taRuleColumnTemplate}%
- \fi
- \advance\!taColumnNumber 1
- \if!taOnceOnlyTabskip
- \!thToksEdef\!taDataColumnTemplate=
- {\TABLEhack####\TABLEhack\tabskip\the\!taLastRegularTabskip}
- \else
- \!taDataColumnTemplate{\TABLEhack##\TABLEhack}%
- \fi
- \!taRuleColumnTemplate{}%
- \!taLeftGlue{\hfil}%
- \!taRightGlue{\hfil}%
- \!taMinimumColumnWidth=0pt
- \def\!tfWidthText{}%
- \!taOnceOnlyTabskipfalse
- \ReadFormatKeys}
+%D But, as usual, this interfered with \type {\omit}.
+%D
+%D The next attempt is redefining some core \TABLE\ macro:.
+%D This works ok, but breaks for instance the~\type{b}
+%D key handling.
+%D
+%D \starttypen
+%D \def\!tfAdjoinPriorColumn%
+%D {\ifnum\!taColumnNumber=0
+%D \!taPreamble=\!taRuleColumnTemplate
+%D ...
+%D \if!taOnceOnlyTabskip
+%D \!thToksEdef\!taDataColumnTemplate=
+%D {\TABLEhack####\TABLEhack\tabskip\the\!taLastRegularTabskip}
+%D \else
+%D \!taDataColumnTemplate{\TABLEhack##\TABLEhack}%
+%D \fi
+%D ...
+%D \ReadFormatKeys}
+%D \stoptypen
+
+% \def\BeginTableParBox#1%
+% {\vtop\bgroup
+% \hsize=#1
+% \normalbaselines
+% \let~=\!ttTie
+% \let\-=\!ttDH
+% \the\EveryTableParBox
+% \begstrut} % added
+%
+% \def\EndTableParBox%
+% {\endstrut % added
+% \MakeStrut{0pt}{\StrutDepthFactor\StrutUnit}%
+% \egroup}
+
+\newdimen\TABLEparheight
+
+\def\BeginTableParBox#1%
+ {\setbox\scratchbox=\vtop\bgroup % \setbox added
+ \hsize=#1
+ \normalbaselines
+ \let~=\!ttTie
+ \let\-=\!ttDH
+ \blanko[\v!blokkeer] % added
+ \the\EveryTableParBox}
+
+\def\EndTableParBox%
+ {\removelastskip % added
+ %\MakeStrut{0pt}{\StrutDepthFactor\StrutUnit} % removed
+ \egroup % finishes the \vtop begun by \BeginTableParbox
+ \getboxheight\scratchdimen\of\box\scratchbox\relax % added
+ \ifdim\scratchdimen>\TABLEparheight % added
+ \global\TABLEparheight=\scratchdimen % added
+ \fi % added
+ \box\scratchbox}
%D To give an impression of what the (well documented) source
%D of \TABLE\ looks like, we first implement an alternative for
@@ -649,22 +672,52 @@
%D \NC C{identifier} \NC column entry color \NC\AR
%D \HL
%D \stoptabel
+
+%D To be compatible with the tabulate environment, we also
+%D support the \type {l}, \type {c} and \type {r} keys for
+%D paragraph entries.
+
+\letvalue{!tk<\string l>}=\undefined
+\letvalue{!tk<\string c>}=\undefined
+\letvalue{!tk<\string r>}=\undefined
+\letvalue{!tk<\string x>}=\undefined % not that needed
+
+\NewFormatKey c%
+ {\prependtoks\raggedcenter\to\!taDataColumnTemplate
+ \ReadFormatKeys \LeftGlue\hfil \RightGlue\hfil}
+
+\NewFormatKey l%
+ {\prependtoks\raggedright\to\!taDataColumnTemplate
+ \ReadFormatKeys \LeftGlue{} \RightGlue\hfil}
+
+\NewFormatKey r%
+ {\prependtoks\raggedleft\to\!taDataColumnTemplate
+ \ReadFormatKeys \LeftGlue\hfil \RightGlue{}}
+
+\NewFormatKey x%
+ {\prependtoks\notragged\to\!taDataColumnTemplate
+ \ReadFormatKeys \LeftGlue\hfil \RightGlue{}}
+
+\appendtoks \TABLEparalignment \to \EveryTableParBox
%D Later on, we're going to implement multiple page table
%D support, therefore the next \TABLE\ macro needs to be
-%D slightly adapted, i.c. the penalty is removed.
+%D slightly adapted, i.c. the penalty is removed. We also
+%D add basic color support.
\def\!ttFullHruleA%
{\!ttGetHalfRuleThickness
+ \startglobalTABLEcolor % added
\hrule\!thHeight\dimen0\!thDepth\dimen0
- %\penalty0
+ \stopglobalTABLEcolor % added
+ %\penalty0 % removed
\egroup}
%D We'll see that when we want to give a vertical rule a color,
%D we have to set and reset states. After heavy testing it
%D proved most useful to extend a \TABLE\ primitive with some
%D hooks. One thing to keep in mind is that \type{&} keeps
-%D assignments local.
+%D assignments local. Again, we add basic color support.
\let\TABLEbeforebar=\empty
\let\TABLEafterbar =\empty
@@ -672,6 +725,7 @@
\def\!ttInsertVrule%
{\hfil
\TABLEbeforebar % added
+ \startglobalTABLEcolor % added
\vrule \!thWidth
\ifnum\!tgCode=1
\ifx\!tgValue\empty
@@ -683,11 +737,45 @@
\else
\!tgValue
\fi
+ \stopglobalTABLEcolor % added
\TABLEafterbar % added
\hfil
&}
-%D We already shows the next one, but here we slightly adapt
+%D The next two macros are only adapted to basis rule
+%D color support.
+
+\def\!tfSetVrule%
+ {\!thToksEdef\!taRuleColumnTemplate=
+ {\noexpand\hfil
+ \noexpand\startglobalTABLEcolor % added
+ \noexpand\vrule
+ \noexpand\!thWidth
+ \ifnum\!tgCode=1
+ \ifx\!tgValue\empty
+ \the\LineThicknessFactor
+ \else
+ \!tgValue
+ \fi
+ \!taLTU
+ \else
+ \!tgValue
+ \fi
+ ####%
+ \noexpand\hfil
+ \noexpand\stopglobalTABLEcolor % added
+ \the\!taRuleColumnTemplate}
+ \!tfAdjoinPriorColumn}
+
+\def\!ttShortHruleA%
+ {\!ttGetHalfRuleThickness
+ \startglobalTABLEcolor % added
+ \leaders\hrule\!thHeight\dimen0\!thDepth\dimen0\hfill
+ \stopglobalTABLEcolor % added
+ \null
+ \ignorespaces}
+
+%D We already showed the next one, but here we slightly adapt
%D the macro by adding an \type{\expandafter}. The space after
%D \type{#1} is crucial!
@@ -838,16 +926,18 @@
%D The optional third and fourth arguments define which table
%D head and tail to use.
%D
-%D \starttype
+%D \starttypen
%D \definetabletemplate[test][|||][before][after]
%D \stoptypen
%D
%D This also means that one can define table heads and tails
%D by name!
%D
+%D \starttypen
%D \starttablehead[before]
%D \HL \VL first \VL second \VL \SR \HL
%D \stoptablehead
+%D \stoptypen
%D
%D Templates defined this way get protected names, that cannot
%D conflict with existing commands.
@@ -1074,7 +1164,7 @@
% \def\dosetTABLEtail[#1]#2\end{\setvalue{@@TABLEtail#1}{#2}}
%D The second argument is a dummy one, by scanning for it, we
-%D get rid of interfering spaces.
+%D get rid of interfering spaces.
\def\setTABLEhead{\dodoubleempty\dosetTABLEhead}
\def\setTABLEtail{\dodoubleempty\dosetTABLEtail}
@@ -1164,8 +1254,8 @@
\def\complexorsimpleTable#1#2%
{\getvalue{\if[\noexpand#2\s!complex\else\s!simple\fi\c!Table#1}#2}
-%D The next one is used in \type{\VL} cum suis and honours
-%D the next grouping.
+%D The next one is used in \type{\VL} cum suis and honours
+%D the next grouping.
\def\docomplexorsimpleTable#1#2%
{\ifx\next\bgroup\@EA#2\else\@EA\dodocomplexorsimpleTable\@EA#1\@EA#2\fi}
@@ -1325,7 +1415,7 @@
\def\TableMR%
{\ifTABLEgrayline \else
\ifnum\TABLEaction=\TABLErule
- \writestatus{TABLE}{change \string\MR\space into \string\FR/\string\SR}%
+ \writestatus{TABLE}{change \string\MR\space into \string\FR/\string\SR}%
\else\ifnum\TABLEaction=\TABLElastrow
\writestatus{TABLE}{change \string\MR\space into \string\FR}%
\fi\fi
@@ -1438,6 +1528,10 @@
{\ifsplittables
\setbox0=\hbox{\AugmentedTableStrut{#1}{#2}}%
\getboxheight\dimen0\of\box0\relax
+ \ifdim\TABLEparheight>\dimen0 % new
+ \dimen0=\TABLEparheight % new
+ \global\TABLEparheight=\!!zeropoint % new
+ \fi % new
\ifTABLEgrayline \else
\global\advance\TABLEheight by \dimen0
\fi
@@ -1480,7 +1574,7 @@
\fi}
%D When tables are split, the spacing before and after a
-%D horizontal rule is corrected according to whet we expect.
+%D horizontal rule is corrected according to what we expect.
\def\endofTABLEline[#1][#2->#3]#4#5%
{\ifx#2#3\else
@@ -1587,7 +1681,8 @@
{\getvalue{eVL\the\currentTABLEcolumn}%
\global\letvalue{eVL\the\currentTABLEcolumn}=\empty}%
\edef\@@tiVLwidth{\getvalue{wVL\the\currentTABLEcolumn}}%
- \expanded{\normalTABLEcomplexbar{\@@tiVLwidth}}}
+ \expanded{\normalTABLEcomplexbar\@@tiVLwidth\space}}% \relax breaks \use
+
\def\resetVLvalues%
{\dostepwiserecurse{0}{\maxTABLEcolumn}{1}
@@ -1890,6 +1985,7 @@
\else
\TABLEnoalign\bgroup
\global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \global\let\TABLEgrayline\empty % new
\let\BL=\doTableBL
\let\BC=\doTableBC
\expandafter\doTableBC
@@ -1902,6 +1998,7 @@
\def\TableBL%
{\TABLEnoalign\bgroup
\global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \global\let\TABLEgrayline\empty % new
\let\BL=\doTableBL
\let\CL=\doTableCL
\let\RL=\doTableRL
@@ -1968,6 +2065,7 @@
\def\TableCL%
{\TABLEnoalign\bgroup
\global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \global\let\TABLEgrayline\empty % new
\let\BL=\doTableBL
\let\CL=\doTableCL
\let\RL=\doTableRL
@@ -1977,7 +2075,7 @@
\def\doTableCL%
{\complexorsimpleTable{CL}}
-\def\simpleTableCL% nog eens \"e\"en lijn van maken
+\def\simpleTableCL% nog eens \'e\'en lijn van maken
{\BL[\the\maxTABLEcolumn,c,\lastTABLEc]}
\def\complexTableCL[#1]%
@@ -1987,6 +2085,7 @@
\def\TableRL%
{\TABLEnoalign\bgroup
\global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \global\let\TABLEgrayline\empty % new
\let\BL=\doTableBL
\let\CL=\doTableCL
\let\RL=\doTableRL
@@ -2113,13 +2212,13 @@
\fi}
\def\gobbleTableBCL#1%
- {\ifx#1\BC \let\next=\doTableBC \else
- \ifx#1\BL \let\next=\doTableBL \else
- \ifx#1\SR \setTableBCL\SR\SR \let\next=\egroup \else
- \ifx#1\FR \setTableBCL\FR\FR \let\next=\egroup \else
- \ifx#1\MR \setTableBCL\MR\MR \let\next=\egroup \else
- \ifx#1\LR \setTableBCL\LR\LR \let\next=\egroup \else
- \setTableBCL#1\SR \let\next=\egroup
+ {\ifx#1\BC \let\next=\doTableBC \else
+ \ifx#1\BL \let\next=\doTableBL \else
+ \ifx#1\SR \setTableBCL\SR\SR \let\next=\egroup \else
+ \ifx#1\FR \setTableBCL\FR\FR \let\next=\egroup \else
+ \ifx#1\MR \setTableBCL\MR\MR \let\next=\egroup \else
+ \ifx#1\LR \setTableBCL\LR\LR \let\next=\egroup \else
+ \setTableBCL #1\SR \let\next=\egroup
\fi\fi\fi\fi\fi\fi
\next}
@@ -2177,7 +2276,6 @@
\global\chardef\TABLEendofrowheight=\TABLErowzero
\global\chardef\TABLEendofrowdepth =\TABLErowfactor
\fi}
-
\def\defineTABLEshorthands%
{\def\TWO {\use{2}}%
@@ -2215,6 +2313,13 @@
\def\dosteltabellenin[#1]%
{\getparameters[\??ti][#1]%
+ \processaction
+ [\@@tiuitlijnen]
+ [ \v!rechts=>\def\TABLEparalignment{\raggedright},
+ \v!links=>\def\TABLEparalignment{\raggedleft},
+ \v!midden=>\def\TABLEparalignment{\raggedcenter},
+ \s!default=>\def\TABLEparalignment{\notragged},
+ \s!unknown=>\def\TABLEparalignment{\notragged}]%
\assignalfadimension{\@@tiVL}{\@@tiVLwidth} {2}{4}{6}%
\assignalfadimension{\@@tiHL}{\@@tiHLheight}{2}{4}{6}}
@@ -2227,11 +2332,107 @@
\NormalTLTU ={.1pt}%
\NormalTSU ={\normalbaselineskip\divide\StrutUnit by 12 }%
\NormalTableUnits}
+
+%D And then I wrote the tabulate environment. That
+%D alternative supports setting the rule thickness and color,
+%D so here is the table alternative.
+
+\let\startglobalTABLEcolor\empty
+\let\stopglobalTABLEcolor \empty
+
+\def\localTABLEsetup%
+ {\@@ticommandos\relax
+ % bodyfont
+ \expanded{\switchtobodyfont[\@@tikorps]}%
+ % linecolor
+ \doifsomething{\@@tilijnkleur}
+ {\def\startglobalTABLEcolor{\localstartcolor[\@@tilijnkleur]}%
+ \def\stopglobalTABLEcolor {\localstopcolor}}%
+ % linethickness
+ \LineThicknessFactor=4
+ \scratchdimen=\@@tilijndikte
+ \divide\scratchdimen by \LineThicknessFactor
+ \expanded{\NormalTLTU={\the\scratchdimen}}%
+ % spacing, was depth=4 height=8 (counters, sigh, now macros)
+ \doifelse{\@@tihoogte}{\v!strut}
+ {\let\StrutHeightFactor\@@ithoogte}
+ {\let\StrutHeightFactor\@@tihoogte}%
+ \doifelse{\@@tidiepte}{\v!strut}
+ {\let\StrutDepthFactor\@@itdiepte}
+ {\let\StrutDepthFactor\@@tidiepte}%
+ \scratchdimen=\StrutHeightFactor pt \multiply\scratchdimen by 10
+ \edef\StrutHeightFactor{\@EA\withoutpt\the\scratchdimen}%
+ \scratchdimen=\StrutDepthFactor pt \multiply\scratchdimen by 10
+ \edef\StrutDepthFactor{\@EA\withoutpt\the\scratchdimen}%
+ % units
+ \NormalTSU={\normalbaselineskip\divide\StrutUnit by 12 }%
+ \NormalTableUnits}
+
+\def\OpenUp#1#2%
+ {\scratchdimen=\StrutHeightFactor pt \advance\scratchdimen by #1pt
+ \edef\StrutHeightFactor{\@EA\withoutpt\the\scratchdimen}%
+ \scratchdimen=\StrutDepthFactor pt \advance\scratchdimen by #2pt
+ \edef\StrutDepthFactor{\@EA\withoutpt\the\scratchdimen}}
+
+%D As one can see, we didn't only add color, but also more
+%D control over spacing.
+%D
+%D \startbuffer[a]
+%D \starttabel[|c|]
+%D \HL
+%D \VL \strut test \VL \FR
+%D \VL \strut test \VL \MR
+%D \VL \strut test \VL \MR
+%D \VL \strut test \VL \LR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \startbuffer[b]
+%D \starttabulatie[|c|]
+%D \HL
+%D \NC test \NC \NR
+%D \NC test \NC \NR
+%D \NC test \NC \NR
+%D \NC test \NC \NR
+%D \HL
+%D \stoptabulatie
+%D \stopbuffer
+%D
+%D In the next example, the first table is defined as:
+%D
+%D \typebuffer[a]
+%D
+%D and the second one as:
+%D
+%D \typebuffer[b]
+%D
+%D The first table is typeset using the default height and
+%D depth factors .8 and .4. The second table has both factors
+%D set to \type {strut}, and the third table shows what
+%D happens when we set the values to zero. The rightmost table
+%D is typeset using the tabulate environment.
+%D
+%D \startcombinatie
+%D {$\vcenter{\haalbuffer[a]}$}
+%D {h=.8 d=.4}
+%D {\steltabellenin[hoogte=strut,diepte=strut]$\vcenter{\haalbuffer[a]}$}
+%D {h=d=\type{strut}}
+%D {\steltabellenin[hoogte=0,diepte=0]$\vcenter{\haalbuffer[a]}$}
+%D {h=d=0}
+%D {$\vcenter{\haalbuffer[b]}$}
+%D {tabulate}
+%D \stopcombinatie
\steltabellenin
[HL=\v!middel,
VL=\v!middel,
NL=\v!klein,
+ \c!uitlijnen=\v!rechts,
+ \c!diepte=.40, % \v!strut
+ \c!hoogte=.80, % \v!strut
+ \c!lijndikte=\linewidth,
+ \c!lijnkleur=,
\c!afstand=\v!middel,
\c!korps=\the\bodyfontsize,
\c!commandos=,
diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex
index e1680f70e..a1ec0887b 100644
--- a/tex/context/base/core-tbl.tex
+++ b/tex/context/base/core-tbl.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Tabulation}
@@ -143,7 +143,7 @@
\appendtoks\fi \to\!!toksa
\appendtoks \bgroup\ignorespaces\to\!!toksa
\appendtoks \tabulatehook##\to\!!toksa
- \appendtoks \unskip\unskip\egroup\to\!!toksa
+ \appendtoks \unskip\unskip\endgraf\egroup\to\!!toksa
\appendtoks\ifnum\tabulatetype=1 \else \to\!!toksa
\@EA\appendtoks \the\tabulateafter\to\!!toksa
\@EA\appendtoks \the\tabulateemath\to\!!toksa
@@ -162,7 +162,9 @@
\let\nextnext\relax
\else
\let\nextnext\settabulatepreamble
- \ifx l\next
+ \ifx x\next
+ \chardef\tabulatealign=0
+ \else\ifx l\next
\chardef\tabulatealign=1
\else\ifx r\next
\chardef\tabulatealign=2
@@ -210,7 +212,7 @@
\appendtoks\fixedspaces\to\tabulatesettings
\else
\message{unknown preamble key [\meaning\next]}%
- \fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
+ \fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
\fi
\nextnext}
@@ -260,7 +262,7 @@
{\tabulatefont{#1}%
\settabulatepreamble}
-\def\gettabulatewidth%
+\def\gettabulatewidth% why was this split = 0
{\chardef\tabulatemodus=0
\doifnextcharelse{(}
{\chardef\tabulatedimen=0
@@ -268,6 +270,13 @@
{\chardef\tabulatedimen=0
\settabulatepreamble}}
+%D So:
+
+\def\gettabulatewidth%
+ {\chardef\tabulatemodus=0
+ \chardef\tabulatedimen=0
+ \doifnextcharelse(\dogettabulatewidth\settabulatepreamble}
+
\def\gettabulateparagraph%
{\doifnextcharelse{(}
{\chardef\tabulatemodus=1
@@ -290,10 +299,11 @@
\def\tabulateraggedright {\ifnum\tabulatetype=1 \else\raggedright \fi}
\def\tabulateraggedcenter{\ifnum\tabulatetype=1 \else\raggedcenter\fi}
\def\tabulateraggedleft {\ifnum\tabulatetype=1 \else\raggedleft \fi}
+\def\tabulatenotragged {\ifnum\tabulatetype=1 \else\notragged \fi}
\def\tabulatehss {\ifnum\tabulatetype=1 \else\hss \fi}
\def\nexttabulate#1|%
- {\chardef\tabulatealign=0
+ {\chardef\tabulatealign=\@@tabulatealign
\chardef\tabulatemodus=0
\chardef\tabulatedimen=0
\tabulatebefore{}%
@@ -333,8 +343,8 @@
\def\splitofftabulatebox%
{\mindermeldingen
- \@EA\setbox\@EA\tabulatebox\@EA\vsplit\csname\@@tabbox@@\tabulatecolumn\endcsname
- to \lineheight
+ \@EA\global\@EA\setbox\@EA\tabulatebox\@EA
+ \vsplit\csname\@@tabbox@@\tabulatecolumn\endcsname to \lineheight
\setbox\tabulatebox=\vbox{\unvbox\tabulatebox}%
\setbox\tabulatebox=\hbox to \wd\tabulatebox
{\hss\dotabulatehook{\box\tabulatebox}\hss}%
@@ -357,11 +367,13 @@
{\ifthirdargument
\doifundefined{\??tt#1::\c!eenheid}
{\copyparameters
- [\??tt#1::][\??tt\e!tabulate::]
- [\c!eenheid,\c!voor,\c!na,\c!binnen,\c!inspringen,EQ]}%
+ [\??tt#1::][\??tt\e!tabulate::]%
+ [\c!eenheid,\c!voor,\c!na,\c!binnen,\c!inspringen,
+ \c!uitlijnen,\c!lijnkleur,\c!lijndikte,EQ]}%
\copyparameters
[\??tt#1::#2][\??tt#1::]%
- [\c!eenheid,\c!voor,\c!na,\c!binnen,\c!inspringen,EQ]%
+ [\c!eenheid,\c!voor,\c!na,\c!binnen,\c!inspringen,
+ \c!uitlijnen,\c!lijnkleur,\c!lijndikte,EQ]%
\setvalue{\e!start#1::#2}{\dofinalstarttabulate[#1][#2][#3]}%
\setvalue{\e!start#1}{\bgroup\dosubstarttabulate[#1]}%
\else\ifsecondargument
@@ -377,11 +389,10 @@
{\getvalue{\e!start#1::\ifundefined{\e!start#1::#2}\else#2\fi}}
\setvalue{\e!start\e!tabulate}%
- {\dodoubleempty\donormalstarttabulate}
+ {\bgroup\dodoubleempty\donormalstarttabulate}
\def\donormalstarttabulate[#1][#2]%
- {\bgroup
- \ifsecondargument
+ {\ifsecondargument
\getparameters[\??tt\e!tabulate::][#2]%
\fi
\iffirstargument
@@ -458,13 +469,57 @@
{\let#1=\tabulateautocolumn
\let\\=\tabulateautocolumn}
-\def\processtabulate[|#1|]%
+%\def\tabulateruleseperator
+% {\vskip\dp\strutbox}
+
+\def\tabulateruleseperator%
+ {\bgroup
+ \def\factor{1}%
+ \scratchskip=\dp\strutbox
+ \ExpandFirstAfter\processallactionsinset
+ [\getvalue{\??tt\currenttabulate\c!afstand}]
+ [ \v!blanko=>\scratchskip=\bigskipamount,
+ \v!diepte=>\scratchskip=\dp\strutbox,
+ \v!klein=>\def\factor{.25},
+ \v!middel=>\def\factor{.5},
+ \v!groot=>,
+ \v!geen=>\scratchskip=\!!zeropoint\def\factor{0},
+ \s!unknown=>\scratchskip=\commalistelement]%
+ \scratchdimen=\factor\scratchskip
+ \vskip\scratchdimen\relax
+ \egroup}
+
+\def\tabulaterule%
+ {\color
+ [\getvalue{\??tt\currenttabulate\c!lijnkleur}]
+ {\scratchdimen=\getvalue{\??tt\currenttabulate\c!lijndikte}%
+ \hrule\!!height.5\scratchdimen\!!depth.5\scratchdimen}}
+
+%D When set to true, no (less) break optimization is done.
+
+\newif\iftolerantTABLEbreak
+
+%D
+
+\def\processtabulate[|#1|]% in the process of optimizing
{\tabulateunit=\getvalue{\??tt\currenttabulate\c!eenheid}%
+ \ExpandFirstAfter\processaction
+ [\getvalue{\??tt\currenttabulate\c!uitlijnen}]
+ [ \v!rechts=>\def\@@tabulatealign{1},
+ \v!links=>\def\@@tabulatealign{2},
+ \v!midden=>\def\@@tabulatealign{3},
+ \s!default=>\def\@@tabulatealign{0},
+ \s!unknown=>\def\@@tabulatealign{0}]%
+ \dorecurse\noftabcolumns % NEW
+ {\@EA\global\@EA\setbox\csname\@@tabbox@@\recurselevel\endcsname
+ =\box\voidb@x}%
\let\pretabskip\!!zeropoint
\def\postabskip{.5\tabulateunit}%
\doglobal\newcounter\tabulatecolumns
\doglobal\newcounter\nofautotabulate
\doglobal\newcounter\noftabulatelines
+ \let\totalnoftabulatelines\noftabulatelines
+ \let\minusnoftabulatelines\noftabulatelines
\global\tabulatepwidth=\!!zeropoint
\global\tabulateequalfalse
\def\NC{\tabulatenormalcolumn0}%
@@ -473,17 +528,23 @@
\def\EQ{\tabulateequalcolumn 0}%
\def\RQ{\tabulateequalcolumn 1}%
\def\HQ{\tabulateequalcolumn 2}%
- \def\NR% next row
+ \def\NR% next row
{\doglobal\increment\noftabulatelines
- \global\tabulateequalfalse
+ \global\tabulateequalfalse
\xdef\tabulatecolumn{0}%
- \unskip\unskip\crcr\flushtabulated}%
- \let\HL\empty
- \let\FL\empty
- \let\ML\empty
- \let\LL\empty
+ \unskip\unskip\crcr\flushtabulated
+ \TABLEnoalign
+ {\iftolerantTABLEbreak\else
+ \ifnum\noftabulatelines=1 \noalign{\nobreak}%
+ \else\ifnum\noftabulatelines=\minusnoftabulatelines\noalign{\nobreak}%
+ \fi\fi
+ \fi}}%
+ \let\HL\empty \let\SR\NR \let\AR\NR
+ \let\FL\empty \let\FR\NR
+ \let\ML\empty \let\MR\NR
+ \let\LL\empty \let\LR\NR
\global\let\flushtabulated\empty
- \let\savedbar=|\let|\nexttabulate
+ \let\savedbar=|\let|=\nexttabulate
\tabskip\!!zeropoint
\!!toksa{&\hbox to \tabulateindent{}##\strut&##}%
\tabulatewidth\!!zeropoint
@@ -496,22 +557,24 @@
{\setbox\tabulatebox=\vbox\bgroup
\global\let\tabulatehook\empty}%
\def\eskip
- {\egroup
+ {\par\egroup
\global\let\tabulatehook\dotabulatehook}%
\let|\savedbar
\global\let\tabulatehook\dotabulatehook
\doifvalue{\??tt\currenttabulate\c!inspringen}{\v!nee}
- {\forgetparindent}%
- \ifinsidefloat
+ {\forgetparindent}%
+ \ifinsidefloat
\let\tabulateindent\!!zeropoint
- \else
- \setlocalhsize \hsize=\localhsize
+ \else
+ \setlocalhsize \hsize=\localhsize
\fi
\mindermeldingen
\forgetall
+ \setbox0=\vbox % outside if because of line counting
+ {\footnotesenabledfalse
+ \let\tabulateindent\!!zeropoint
+ \@EA\halign\@EA{\the\!!toksa\cr\tabulatecontent\crcr}}%
\ifnum\nofautotabulate>0
- \setbox0=\ruledvbox
- {\let\tabulateindent\!!zeropoint\@EA\halign\@EA{\the\!!toksa\cr\tabulatecontent\crcr}}%
\tabulatewidth\hsize
\advance\tabulatewidth by -\wd0
\advance\tabulatewidth by -\tabulatepwidth
@@ -534,10 +597,10 @@
\bgroup
\global\let\tabulatehook\empty
\ifautotabulate\hsize\tabulatewidth\fi
- %\begstrut % interferes with pre-\pars
+ %\begstrut % interferes with pre-\pars
\ignorespaces
\def\eskip%
- {\egroup
+ {\par\egroup
\global\let\tabulatehook\dotabulatehook
\splitofftabulatebox}%
\else
@@ -559,12 +622,14 @@
\def\bskip%
{\vtop\bgroup
\ifautotabulate\hsize\tabulatewidth\fi
- %\begstrut % interferes with pre-\pars
+ %\begstrut % interferes with pre-\pars
\ignorespaces}%
\def\eskip%
- {\egroup}%
+ {\par\egroup}%
\fi
\let\totalnoftabulatelines\noftabulatelines
+ \let\minusnoftabulatelines\noftabulatelines
+ \decrement\minusnoftabulatelines
\doglobal\newcounter\noftabulatelines
\def\HL{\TABLEnoalign
{\ifnum\noftabulatelines=0 \FL
@@ -579,34 +644,35 @@
\baselinecorrection}%
\def\FL{\TABLEnoalign
{\ifinsidefloat\else
- \doifvaluenothing{\??tt\currenttabulate\c!voor}
+ \doifemptyvalue{\??tt\currenttabulate\c!voor\endcsname} % no expansion
{\tablebaselinecorrection}%
\fi
- \hrule \!!height .2pt \!!depth .2pt
+ \tabulaterule
\nobreak
- \vskip\dp\strutbox
+ \tabulateruleseperator
+ \prevdepth\dp\strutbox
\nobreak}}%
\def\ML{\TABLEnoalign
- {\vskip\dp\strutbox
- \hrule \!!height .2pt \!!depth .2pt
- \vskip\topskip\allowbreak\vskip-\topskip\vskip-.4pt
- \hrule \!!height .2pt \!!depth .2pt
- \vskip\dp\strutbox}}%
+ {\tabulateruleseperator
+ \tabulaterule
+ \ifnum\noftabulatelines>1 \ifnum\noftabulatelines<\minusnoftabulatelines
+ \vskip\topskip\allowbreak\vskip-\topskip\vskip-.4pt
+ \tabulaterule
+ \fi\fi
+ \tabulateruleseperator}}%
\def\LL{\TABLEnoalign
{\nobreak
- \vskip\dp\strutbox
+ \tabulateruleseperator
\nobreak
- \hrule \!!height .2pt \!!depth .2pt
+ \tabulaterule
\ifinsidefloat\else
- \doifvaluenothing{\??tt\currenttabulate\c!na}
+ \doifemptyvalue{\??tt\currenttabulate\c!na\endcsname} % no expansion
{\vskip\dp\strutbox
\vbox{\strut}
\vskip-\lineheight}%
\fi}}%
- %\def\FL{\dotoptextrule {}}%
- %\def\ML{\domiddletextrule{}}%
- %\def\LL{\dobottomtextrule {}}%
\@EA\halign\@EA{\the\!!toksa\cr\tabulatecontent\crcr}%
+ \prevdepth\dp\strutbox % nog eens beter, temporary hack
\egroup
\ifinsidefloat \else
\getvalue{\??tt\currenttabulate\c!na}%
@@ -628,9 +694,13 @@
\setuptabulate
[\c!eenheid=1em,
EQ={:},
+ \c!lijnkleur=,
+ \c!lijndikte=\linewidth,
\c!binnen=,
\c!voor=\blanko,
\c!na=\blanko,
+ \c!afstand={\v!diepte,\v!middel},
+ \c!uitlijnen=\v!normaal,
\c!inspringen=\v!nee]
\protect
diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex
index 1f0a56d17..d42f57784 100644
--- a/tex/context/base/core-var.tex
+++ b/tex/context/base/core-var.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Variables}
@@ -38,6 +38,11 @@
{\fastmodetrue
\the\everyfastmode}
+\def\silentmode% ook hier \everysilentmode net als \fastmode
+ {\showmessagesfalse
+ \showwarningsfalse
+ \let\writestatus\gobbletwoarguments}
+
%D \macros
%D {pdfoutput}
%D
diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex
index a334948c1..5b2e0a8c3 100644
--- a/tex/context/base/core-ver.tex
+++ b/tex/context/base/core-ver.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Core Macros / Verbatim}
@@ -28,6 +28,11 @@
1: Datei -- existiert nicht
\stopmessages
+\startmessages czech library: verbatims
+ title: verbatim
+ 1: soubor -- neexistuje
+\stopmessages
+
\unprotect
% \type{ <crlf> char} geeft bagger
@@ -51,7 +56,9 @@
{\def\prettyidentifier{MP}}
{\doifinstringelse{\prettyidentifier}{javascript,js,java,jv,JAVASCRIPT,JS,JAVA,JV}
{\def\prettyidentifier{JV}}
- {\def\prettyidentifier{TEX}}}}}%
+ {\doifinstringelse{\prettyidentifier}{sql,SQL}
+ {\def\prettyidentifier{SQL}}
+ {\def\prettyidentifier{TEX}}}}}}%
\doifundefined{setuppretty\prettyidentifier type}%
{\bgroup
\setbox0=\hbox % get rid of spaces when in-line \newpretty loading
@@ -65,22 +72,26 @@
{\def\setupprettytype{\getvalue{setuppretty\prettyidentifier type}}}
{\let\setupprettytype=\relax}}
-\installnewpretty M {\setupprettiesintype{MP}\setupprettytype}
-\installnewpretty P {\setupprettiesintype{PL}\setupprettytype}
+\installnewpretty M {\setupprettiesintype {MP}\setupprettytype}
+\installnewpretty P {\setupprettiesintype {PL}\setupprettytype}
\installnewpretty T {\setupprettiesintype{TEX}\setupprettytype}
-\installnewpretty J {\setupprettiesintype{JV}\setupprettytype}
+\installnewpretty J {\setupprettiesintype {JV}\setupprettytype}
+\installnewpretty S {\setupprettiesintype{SQL}\setupprettytype}
\def\setupcommonverbatim#1%
- {\def\verbatimfont {\tttf}%
- \def\prettyidentifierfont {\ttsl}%
- \def\prettyvariablefont {}%
- \def\prettyidentifier {TEX}%
- \doifvalue{#1\c!spatie}{\v!aan}
- {\def\obeyspaces{\setcontrolspaces}}%
- \doifvalue{#1\c!tab}{\v!aan}
- {\def\obeytabs{\settabskips}}%
- \doifvalue{#1\c!pagina}{\v!nee}
- {\def\obeypages{\ignorepages}}%
+ {\def\verbatimfont{\tttf}%
+ \def\prettyidentifier{TEX}%
+ %
+ \doifelsevalue{#1\c!tekst}{\v!ja}
+ {\naturaltextexttrue}{\naturaltextextfalse}%
+ \def\prettyidentifierfont{\getvalue{#1\c!icommando}}%
+ \def\prettyvariablefont {\getvalue{#1\c!vcommando}}%
+ \def\prettynaturalfont {\getvalue{#1\c!ccommando}}%
+ %
+ \doifvalue{#1\c!spatie}{\v!aan}{\def\obeyspaces{\setcontrolspaces}}%
+ \doifvalue{#1\c!tab} {\v!aan}{\def\obeytabs {\settabskips}}%
+ \doifvalue{#1\c!pagina}{\v!nee}{\def\obeypages {\ignorepages}}%
+ %
\ExpandFirstAfter\processaction
[\getvalue{#1\c!optie}]
[ \v!geen=>\let\obeycharacters=\relax,
@@ -142,6 +153,7 @@
\unexpanded\def\type%
{\bgroup
+ \getvalue{\getvalue{\??ty\c!kleur}}% hm, assumes \somecolor
\catcode`\<=\@@other
\catcode`\>=\@@other
\futurelet\next\dotype}
@@ -326,11 +338,13 @@
\let\next=\relax
\else\ifx\next\bgroup
\let\next=\relax
+ \else\ifx\next\egroup % takes care of \type{}
+ \let\next=\relax
\else\ifx\next\activeleftargument
\let\next=\relax
\else
\let\next=\string
- \fi\fi\fi
+ \fi\fi\fi\fi
\next}
\egroup
@@ -348,13 +362,21 @@
%D \macros
%D {setuptype}
-%D {}
%D
%D Some characteristics of \type{\type} can be set up by:
\def\setuptype%
{\dodoubleargument\getparameters[\??ty]}
+%D The setups for inline verbatim default to:
+
+\setuptype
+ [\c!spatie=\v!uit,
+ \c!kleur=,
+ \c!pagina=\v!nee,
+ \c!tab=\v!nee,
+ \c!optie=\v!normaal]
+
%D \macros
%D {typ,obeyhyphens}
%D
@@ -380,7 +402,6 @@
%D \macros
%D {tex,arg,mat,dis}
-%D {}
%D
%D Sometimes, for instance when we pass verbatim text as an
%D argument, the fixed \CATCODES\ interfere with our wishes. An
@@ -506,15 +527,74 @@
\def\dostarttyping#1%
{\getvalue{\??tp#1\c!voor}%
\startopelkaar % includes \bgroup
+ \startcolor[\getvalue{\??tp#1\c!kleur}]%
\initializetyping{#1}%
\expandafter\processdisplayverbatim\expandafter{\s!stop#1}}
\def\dostoptyping#1%
- {\stopopelkaar % includes \egroup
+ {\stopcolor
+ \stopopelkaar % includes \egroup
\getvalue{\??tp#1\c!na}%
\doifvalue{\??tp#1\c!springvolgendein}{\v!nee}{\noindentation}}
%D \macros
+%D {setuptyping}
+%D
+%D The setup of typing accepts two arguments. The optional
+%D first one identifies the user defined ones. If only one
+%D argument is given, the values apply to both the standard
+%D command \type{\starttyping} and \type{\typefile}.
+
+%\indirect\def\setuptyping\dodoubleempty[#1][#2]%
+% {\iffirstargument
+% \getparameters[\??tp#1][#2]%
+% \else
+% \getparameters[\??tp][#1]%
+% \fi}
+%
+%\doubleemptied\def\setuptyping[#1][#2]%
+% {\iffirstargument
+% \getparameters[\??tp#1][#2]%
+% \else
+% \getparameters[\??tp][#1]%
+% \fi}
+
+\def\dosetuptyping[#1][#2]%
+ {\ifsecondargument
+ \getparameters[\??tp#1][#2]%
+ \else
+ \getparameters[\??tp][#1]%
+ \fi}
+
+\def\setuptyping%
+ {\dodoubleempty\dosetuptyping}
+
+%D The setups for display verbatim and file verbatim are
+%D shared. One can adapt the extra defined typing environments,
+%D but they also default to the values below. Watch the
+%D alternative escape character.
+
+\setuptyping
+ [ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!kleur=,
+ \c!spatie=\v!uit,
+ \c!pagina=\v!nee,
+ \c!tab=\v!aan,
+ \c!optie=\v!geen,
+ \c!palet=colorpretty,
+ \c!tekst=\v!nee,
+ \c!icommando=\ttsl,
+ \c!vcommando=,
+ \c!ccommando=\tf,
+ \c!springvolgendein=\v!ja,
+ \c!marge=\!!zeropoint,
+ \c!evenmarge=\!!zeropoint,
+ \c!onevenmarge=\!!zeropoint,
+ \c!blanko=\v!regel,
+ \c!escape=/]
+
+%D \macros
%D {definetyping}
%D
%D For most users the standard \type{\start}||\type{\stop}||pair
@@ -534,7 +614,8 @@
\def\presettyping[#1][#2]%
{\copyparameters
[\??tp#1][\??tp]
- [\c!voor,\c!na,\c!spatie,\c!pagina,\c!tab,
+ [\c!voor,\c!na,\c!spatie,\c!pagina,\c!tab,\c!kleur,
+ \c!tekst,\c!icommando,\c!vcommando,\c!ccommando,
\c!optie,\c!palet,\c!marge,\c!evenmarge,\c!onevenmarge,
\c!springvolgendein,\c!blanko,\c!escape]%
\getparameters
@@ -556,40 +637,9 @@
\definetyping[PM] [\c!optie=PL]
\definetyping[JS] [\c!optie=JS]
\definetyping[JV] [\c!optie=JV]
+\definetyping[SQL][\c!optie=SQL]
\definetyping[TEX][\c!optie=TEX]
-%D \macros
-%D {setuptyping}
-%D
-%D The setup of typing accepts two arguments. The optional
-%D first one identifies the user defined ones. If only one
-%D argument is given, the values apply to both the standard
-%D command \type{\starttyping} and \type{\typefile}.
-
-%\indirect\def\setuptyping\dodoubleempty[#1][#2]%
-% {\iffirstargument
-% \getparameters[\??tp#1][#2]%
-% \else
-% \getparameters[\??tp][#1]%
-% \fi}
-%
-%\doubleemptied\def\setuptyping[#1][#2]%
-% {\iffirstargument
-% \getparameters[\??tp#1][#2]%
-% \else
-% \getparameters[\??tp][#1]%
-% \fi}
-
-\def\dosetuptyping[#1][#2]%
- {\ifsecondargument
- \getparameters[\??tp#1][#2]%
- \else
- \getparameters[\??tp][#1]%
- \fi}
-
-\def\setuptyping%
- {\dodoubleempty\dosetuptyping}
-
%D We use the \CONTEXT\ color system for switching to and from
%D color mode. We can always redefine these colors afterwards.
@@ -631,6 +681,8 @@
\definepalet [JVgraypretty] [graypretty]
\definepalet [JScolorpretty] [colorpretty]
\definepalet [JSgraypretty] [graypretty]
+\definepalet [SQLcolorpretty] [colorpretty]
+\definepalet [SQLgraypretty] [graypretty]
%D We can use some core color commands. These are faster than
%D the standard color switching ones and work ok on a line by
@@ -641,9 +693,98 @@
\def\beginofpretty[#1]{\startcolormode{\prettypalet:#1}}
\def\endofpretty {\stopcolormode}
+%D In the verbatim module, there are some examples given of
+%D the more obscure features of the verbatim environments.
+%D
+%D \startbuffer
+%D \startTEX
+%D \def\mathematics#1% % usage: \type {\mathematics{x^2}}
+%D {\ifmmode#1\else$#1$\fi} % becomes: \mathematics{x^2}
+%D \stopTEX
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This gives, as can be expected:
+%D
+%D \haalbuffer
+%D
+%D When we want to see some typeset \TEX\ too, we can say:
+%D
+%D \startbuffer
+%D \startTEX
+%D \def\mathematics#1% %%\ N usage: \type {\mathematics{x^2}}
+%D {\ifmmode#1\else$#1$\fi} %%\ N becomes: \mathematics{x^2}
+%D \stopTEX
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D or:
+%D
+%D \haalbuffer
+%D
+%D In a similar way:
+%D
+%D \startbuffer
+%D \startSQL
+%D select * -- indeed, here we {\em do} select
+%D from tableA
+%D where 1 = 2
+%D \stopSQL
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D gives:
+%D
+%D \haalbuffer
+%D
+%D The next examples sow how we can directly call for natural
+%D \TEX\ comments:
+%D
+%D \startbuffer
+%D \setuptyping
+%D [TEX]
+%D [tekst=ja]
+%D
+%D \startTEX
+%D \def\mathematics#1% % usage: \type {\mathematics{x^2}}
+%D {\ifmmode#1\else$#1$\fi} % becomes: \mathematics{x^2}
+%D \stopTEX
+%D
+%D \setuptyping
+%D [SQL]
+%D [tekst=ja,palet=,icommando=\bf,vcommando=,ccommando=\it]
+%D
+%D \startSQL
+%D select * -- indeed, here we {\em do} select
+%D from tableA
+%D where 1 = 2
+%D \stopSQL
+%D
+%D \setuptyping
+%D [SQL]
+%D [ccommando=\tf\underbar]
+%D
+%D \startSQL
+%D select * -- indeed, here we {\em do} select
+%D from tableA
+%D where 1 = 2
+%D \stopSQL
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Now watch:
+%D
+%D \haalbuffer
+%D
+%D The natural \TEX\ typesetting was introduced when Tobias
+%D and Berend started using verbatim \JAVASCRIPT\ and \SQL.
+
%D \macros
%D {EveryPar, EveryLine, iflinepar}
-%D {}
%D
%D One of the features of these commands is the support of
%D \type{\EveryPar}, \type{\EveryLine} and \type{\iflinepar}.
@@ -665,6 +806,7 @@
{\getvalue{\??tp\v!file\c!voor}%
\doiffileelse{#1}
{\startopelkaar % includes \bgroup
+ \startcolor[\getvalue{\??tp\v!file\c!kleur}]%
\doifinset{\getvalue{\??tp\v!file\c!optie}}{\v!commandos,\v!schuin,\v!normaal}
{\setuptyping[\v!file][\c!optie=\v!geen]}%
\doifvalue{\??tp\v!file\c!optie}{\v!kleur}
@@ -672,6 +814,7 @@
\letvalue{\??tp\v!file\c!optie}=\prettyidentifier}%
\initializetyping\v!file
\processfileverbatim{#1}%
+ \stopcolor
\stopopelkaar} % includes \egroup
{{\tttf[\makemessage{\m!verbatims}{1}{#1}]}%
\showmessage{\m!verbatims}{1}{#1}}%
@@ -690,36 +833,9 @@
\def\filename#1{{\tttf\hyphenatedfile{#1}}}
-%D The setups for inline verbatim default to:
-
-\setuptype
- [\c!spatie=\v!uit,
- \c!pagina=\v!nee,
- \c!tab=\v!nee,
- \c!optie=\v!normaal]
-
-%D The setups for display verbatim and file verbatim are
-%D shared. One can adapt the extra defined typing environments,
-%D but they also default to the values below. Watch the
-%D alternative escape character.
-
-\setuptyping
- [ \c!voor=\blanko,
- \c!na=\blanko,
- \c!spatie=\v!uit,
- \c!pagina=\v!nee,
- \c!tab=\v!aan,
- \c!optie=\v!geen,
- \c!palet=colorpretty,
- \c!springvolgendein=\v!ja,
- \c!marge=\!!zeropoint,
- \c!evenmarge=\!!zeropoint,
- \c!onevenmarge=\!!zeropoint,
- \c!blanko=\v!regel,
- \c!escape=/]
+%D This leaves some settings:
\permitshiftedendofverbatim
-
\optimizeverbatimtrue
\protect
diff --git a/tex/context/base/core-vis.tex b/tex/context/base/core-vis.tex
index bb5f9aba9..d39482ee6 100644
--- a/tex/context/base/core-vis.tex
+++ b/tex/context/base/core-vis.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module adds some more visualization cues to the ones
@@ -188,10 +188,14 @@
%D \egroup
%D
%D These examples also demonstrate the visualization of
-%D \type{\leftskip} and \type{\rightskip}.
+%D \type {\leftskip} and \type {\rightskip}. The macro
+%D \type {\nofruledbaselines} determines the number of lines
+%D shown.
\newcounter\ruledbaselines
+\def\nofruledbaselines{3}
+
\def\debuggertext#1%
{\ifx\ttxx\undefined
$\scriptscriptstyle#1$%
@@ -204,7 +208,7 @@
\bgroup
\dontinterfere
\doglobal\increment\ruledbaselines
- \scratchdimen=3\baselineskip
+ \scratchdimen=\nofruledbaselines\baselineskip
\setbox\scratchbox=\normalvbox to 2\scratchdimen
{\leaders
\normalhbox
diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex
index 3bc177013..55ffd06e9 100644
--- a/tex/context/base/enco-ans.tex
+++ b/tex/context/base/enco-ans.tex
@@ -8,7 +8,7 @@
%D copyright=J. Hagen]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This is \YandY's texnansi encoding vector, which combines
@@ -116,22 +116,36 @@
\defineaccent " {\dotlessi} 239
\defineaccent ^ {\dotlessi} 238
-\definecharacter ae 230
-\definecharacter oe 156
-\definecharacter o 248
+\defineaccent ` {\i} 236
+\defineaccent ' {\i} 237
+\defineaccent " {\i} 239
+\defineaccent ^ {\i} 238
+
+\defineaccent c C 199
+\defineaccent c c 231
+
\definecharacter AE 198
+\definecharacter ae 230
\definecharacter OE 140
+\definecharacter oe 156
\definecharacter O 216
+\definecharacter o 248
\definecharacter ss 223
+\definecharacter SS 223
\definecharacter aa 229
\definecharacter AA 197
-\definecharacter cc 231
-\definecharacter CC 199
+%D Some accents are positioned somewhere else.
+
+\defineaccentcommand . 5
+\defineaccentcommand H 6
%D The next piece of code is rather ugly:
+\defineaccentcommand b {\texnansiencodedb}
+\defineaccentcommand c {\texnansiencodedc}
+
\def\texnansiencodedb#1%
{\oalign{#1\crcr\hidewidth\vbox to.2ex{\hbox{\char175}\vss}\hidewidth}}
@@ -139,9 +153,6 @@
{\setbox0\hbox{#1}\ifdim\ht0=1ex\accent184 #1\else
{\ooalign{\hidewidth\char184\hidewidth\crcr\unhbox0}}\fi}
-\definecommand b {\texnansiencodedb}
-\definecommand c {\texnansiencodedc}
-
%D We still have to take care of:
%D
%D \starttypen
diff --git a/tex/context/base/enco-chi.tex b/tex/context/base/enco-chi.tex
new file mode 100644
index 000000000..b5c5161c7
--- /dev/null
+++ b/tex/context/base/enco-chi.tex
@@ -0,0 +1,183 @@
+%D \module
+%D [ file=enco-chi,
+%D version=1999.12.02,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Traditional and Simplified Chinese,
+%D author={Wang Lei \& Hans Hagen},
+%D date=\currentdate,
+%D copyright=Hans Hagen]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is an experimental definition. Since we are dealing
+%D with unicode's, the registered values are not saved, so
+%D actually we're dealing with an pseudo encoding. The digits
+%D on the other hand are encoding specific.
+
+% chinese classes: left=1|right=2|center=3
+
+\startencoding[big5]
+
+\defineuclass 1 161 93
+\defineuclass 1 161 95
+\defineuclass 1 161 97
+\defineuclass 1 161 99
+\defineuclass 1 161 101
+\defineuclass 1 161 103
+\defineuclass 1 161 105
+\defineuclass 1 161 107
+\defineuclass 1 161 111
+\defineuclass 1 161 111
+\defineuclass 1 161 113
+\defineuclass 1 161 115
+\defineuclass 1 161 117
+\defineuclass 1 161 119
+\defineuclass 1 161 121
+\defineuclass 1 161 123
+\defineuclass 1 161 125
+\defineuclass 1 161 161
+\defineuclass 1 161 163
+\defineuclass 1 161 165
+\defineuclass 1 161 167
+\defineuclass 1 161 169
+\defineuclass 1 161 171
+
+\defineuclass 3 161 69
+\defineuclass 3 161 75
+\defineuclass 3 161 76
+
+\defineuclass 2 161 65
+\defineuclass 2 161 66
+\defineuclass 2 161 67
+\defineuclass 2 161 68
+\defineuclass 2 161 70
+\defineuclass 2 161 71
+\defineuclass 2 161 72
+\defineuclass 2 161 73
+\defineuclass 2 161 74
+\defineuclass 2 161 77
+\defineuclass 2 161 78
+\defineuclass 2 161 79
+\defineuclass 2 161 80
+\defineuclass 2 161 81
+\defineuclass 2 161 82
+\defineuclass 2 161 83
+\defineuclass 2 161 84
+\defineuclass 2 161 88
+\defineuclass 2 161 94
+\defineuclass 2 161 96
+\defineuclass 2 161 98
+\defineuclass 2 161 100
+\defineuclass 2 161 102
+\defineuclass 2 161 104
+\defineuclass 2 161 106
+\defineuclass 2 161 108
+\defineuclass 2 161 110
+\defineuclass 2 161 112
+\defineuclass 2 161 114
+\defineuclass 2 161 116
+\defineuclass 2 161 118
+\defineuclass 2 161 120
+\defineuclass 2 161 122
+\defineuclass 2 161 124
+\defineuclass 2 161 126
+\defineuclass 2 161 162
+\defineuclass 2 161 164
+\defineuclass 2 161 166
+\defineuclass 2 161 168
+\defineuclass 2 161 170
+\defineuclass 2 161 172
+\defineuclass 2 161 196
+\defineuclass 2 161 227
+\defineuclass 2 162 88
+\defineuclass 2 163 223
+
+\defineudigit 0 185 115
+\defineudigit 1 164 64
+\defineudigit 2 164 71
+\defineudigit 3 164 84
+\defineudigit 4 165 124
+\defineudigit 5 164 173
+\defineudigit 6 164 187
+\defineudigit 7 164 67
+\defineudigit 8 164 75
+\defineudigit 9 164 69
+\defineudigit 10 164 81
+\defineudigit 100 166 202
+\defineudigit 1000 164 100
+\defineudigit 10000 201 69
+\defineudigit 100000000 187 245
+
+\stopencoding
+
+\startencoding[gbk]
+
+\defineuclass 1 161 174
+\defineuclass 1 161 176
+\defineuclass 1 161 178
+\defineuclass 1 161 180
+\defineuclass 1 161 182
+\defineuclass 1 161 184
+\defineuclass 1 161 186
+\defineuclass 1 161 188
+\defineuclass 1 161 190
+\defineuclass 1 163 168
+\defineuclass 1 163 219
+\defineuclass 1 163 224
+\defineuclass 1 163 251
+
+\defineuclass 3 161 164
+\defineuclass 3 161 167
+\defineuclass 3 161 173
+\defineuclass 3 163 190
+
+\defineuclass 2 161 162
+\defineuclass 2 161 163
+\defineuclass 2 161 170
+\defineuclass 2 161 171
+\defineuclass 2 161 175
+\defineuclass 2 161 177
+\defineuclass 2 161 179
+\defineuclass 2 161 181
+\defineuclass 2 161 183
+\defineuclass 2 161 185
+\defineuclass 2 161 187
+\defineuclass 2 161 189
+\defineuclass 2 161 191
+\defineuclass 2 161 203
+\defineuclass 2 161 227
+\defineuclass 2 161 228
+\defineuclass 2 161 229
+\defineuclass 2 163 161
+\defineuclass 2 163 162
+\defineuclass 2 163 167
+\defineuclass 2 163 169
+\defineuclass 2 163 172
+\defineuclass 2 163 174
+\defineuclass 2 163 186
+\defineuclass 2 163 187
+\defineuclass 2 163 191
+\defineuclass 2 163 221
+\defineuclass 2 163 253
+
+\defineudigit 0 193 227
+\defineudigit 1 210 187
+\defineudigit 2 182 254
+\defineudigit 3 200 253
+\defineudigit 4 203 196
+\defineudigit 5 206 229
+\defineudigit 6 193 249
+\defineudigit 7 198 223
+\defineudigit 8 176 203
+\defineudigit 9 190 197
+\defineudigit 10 202 174
+\defineudigit 100 176 217
+\defineudigit 1000 199 167
+\defineudigit 10000 205 242
+\defineudigit 100000000 210 218
+
+\stopencoding
+
+\endinput
diff --git a/tex/context/base/enco-ec.tex b/tex/context/base/enco-ec.tex
new file mode 100644
index 000000000..5a377e54b
--- /dev/null
+++ b/tex/context/base/enco-ec.tex
@@ -0,0 +1,236 @@
+%D \module
+%D [ file=enco-ec,
+%D version=1999.16.7,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=\LATEX\ EC Encoding,
+%D author=Taco Hoekwater,
+%D date=\currentdate,
+%D copyright={Hans Hagen \& Taco Hoekwater}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is \LATEX2e's T1 encoding vector. All standard \LATEX\
+%D accents will work, including \type{\k}. The only accent that
+%D does not work is \type{\t} (there is no tie in T1 encoding).
+%D
+%D Annoyingly, most \POSTSCRIPT\ fonts do not have \type
+%D {\dotlessj}, and T1 encoding does not make the various
+%D prebuilts with \type {j} available.
+%D
+%D There is hardly a point in supporting TS1 encoding.
+
+\startmapping[ec]
+
+%D The case mappings are fairly simple.
+
+\definecasemaps 128 to 156 lc 0 uc 0
+
+%D 157 Idotaccent
+%D 158 dcroat (with bar)
+%D 159 sectionmark
+
+\definecasemaps 160 to 188 lc +32 uc 0
+
+%D 189 exclamdown
+%D 190 questiondown
+%D 191 sterling pound
+
+\definecasemaps 192 to 255 lc 0 uc -32
+
+%D So far for the mapping.
+
+\stopmapping
+
+\startencoding[ec]
+
+\defineaccent u A 128
+\defineaccent v C 131
+\defineaccent v D 132
+\defineaccent v E 133
+\defineaccent u G 135
+\defineaccent v l 137 % Lcaron
+\defineaccent v N 140
+\defineaccent H O 142
+\defineaccent v R 144
+\defineaccent v S 146
+\defineaccent v T 148
+\defineaccent H U 150
+\defineaccent r U 151
+\defineaccent v Z 154
+\defineaccent . Z 155
+\defineaccent . I 157
+\defineaccent = d 158
+
+\defineaccent u a 160
+\defineaccent v c 163
+\defineaccent v d 164
+\defineaccent v e 165
+\defineaccent u g 167
+\defineaccent v l 169
+\defineaccent v n 172
+\defineaccent H o 174
+\defineaccent v r 176
+\defineaccent v s 178
+\defineaccent v t 180
+\defineaccent H u 182
+\defineaccent r u 183
+\defineaccent v z 186
+\defineaccent . z 187
+
+\defineaccent ' C 130
+\defineaccent ' L 136
+\defineaccent ' N 139
+\defineaccent ' R 143
+\defineaccent ' S 145
+\defineaccent " Y 152
+\defineaccent ' Z 153
+\defineaccent ' c 162
+\defineaccent ' l 168
+\defineaccent ' n 171
+\defineaccent ' r 175
+\defineaccent ' s 177
+\defineaccent " y 184
+\defineaccent ' z 185
+\defineaccent ` A 192
+\defineaccent ' A 193
+\defineaccent ^ A 194
+\defineaccent ~ A 195
+\defineaccent " A 196
+\defineaccent r A 197
+\defineaccent ` E 200
+\defineaccent ' E 201
+\defineaccent ^ E 202
+\defineaccent " E 203
+\defineaccent ` I 204
+\defineaccent ' I 205
+\defineaccent ^ I 206
+\defineaccent " I 207
+\defineaccent ~ N 209
+\defineaccent ` O 210
+\defineaccent ' O 211
+\defineaccent ^ O 212
+\defineaccent ~ O 213
+\defineaccent " O 214
+\defineaccent ` U 217
+\defineaccent ' U 218
+\defineaccent ^ U 219
+\defineaccent " U 220
+\defineaccent ' Y 221
+\defineaccent ` a 224
+\defineaccent ' a 225
+\defineaccent ^ a 226
+\defineaccent ~ a 227
+\defineaccent " a 228
+\defineaccent r a 229
+\defineaccent ` e 232
+\defineaccent ' e 233
+\defineaccent ^ e 234
+\defineaccent " e 235
+\defineaccent ` i 236
+\defineaccent ' i 237
+\defineaccent ^ i 238
+\defineaccent " i 239
+\defineaccent ~ n 241
+\defineaccent ` o 242
+\defineaccent ' o 243
+\defineaccent ^ o 244
+\defineaccent ~ o 245
+\defineaccent " o 246
+\defineaccent ` u 249
+\defineaccent ' u 250
+\defineaccent ^ u 251
+\defineaccent " u 252
+\defineaccent ' y 253
+
+\defineaccent ` {\dotlessi} 236
+\defineaccent ' {\dotlessi} 237
+\defineaccent " {\dotlessi} 239
+\defineaccent ^ {\dotlessi} 238
+
+\defineaccent ` {\i} 236
+\defineaccent ' {\i} 237
+\defineaccent " {\i} 239
+\defineaccent ^ {\i} 238
+
+%D These are special, see below.
+
+\defineaccent k A 129
+\defineaccent k E 134
+\defineaccent k a 161
+\defineaccent k e 166
+\defineaccent c T 149
+\defineaccent c S 147
+\defineaccent c C 199
+\defineaccent c c 231
+\defineaccent c s 179
+\defineaccent c t 181
+
+\definecharacter ae 230
+\definecharacter AE 198
+\definecharacter oe 247
+\definecharacter OE 215
+\definecharacter o 248
+\definecharacter O 216
+\definecharacter ss 255
+\definecharacter SS 223
+
+\definecharacter th 254
+\definecharacter TH 222
+
+\definecharacter ng 173
+\definecharacter NG 141
+
+\definecharacter ij 188
+\definecharacter IJ 156
+
+%D These two are strictly unneeded:
+
+\definecharacter aa 229
+\definecharacter AA 197
+
+\definecharacter l 170
+\definecharacter L 138
+
+\definecharacter i 25
+\definecharacter j 26
+
+%D Next come the accent||commands.
+
+\defineaccentcommand ` 0
+\defineaccentcommand ' 1
+\defineaccentcommand ^ 2
+\defineaccentcommand ~ 3
+\defineaccentcommand " 4
+\defineaccentcommand H 5
+\defineaccentcommand r 6
+\defineaccentcommand v 7
+\defineaccentcommand u 8
+\defineaccentcommand = 9
+\defineaccentcommand . 10
+
+%D The ogonek does not normally exist in \CONTEXT.
+
+% The rather weird construction that follows is needed because
+% otherwise (using \type {\definecommand}) the pre||built
+% chars are never used.
+
+\defineaccentcommand b {\ecencodedb}
+\defineaccentcommand c {\ecencodedc}
+\defineaccentcommand k {\ecencodedk}
+
+\def\ecencodedb#1%
+ {\oalign{#1\crcr\hidewidth\vbox to.2ex{\hbox{\char9}\vss}\hidewidth}}
+
+\def\ecencodedc#1%
+ {\setbox0\hbox{#1}\ifdim\ht0=1ex\accent11 #1\else
+ {\ooalign{\hidewidth\char11\hidewidth\crcr\unhbox0}}\fi}
+
+\def\ecencodedk#1%
+ {\setbox0\hbox{#1}\ifdim\ht0=1ex\accent12 #1\else
+ {\ooalign{\hidewidth\char12\hidewidth\crcr\unhbox0}}\fi}
+
+\stopencoding
+
+\endinput
diff --git a/tex/context/base/enco-ibm.tex b/tex/context/base/enco-ibm.tex
index f155cd782..28d84d4fa 100644
--- a/tex/context/base/enco-ibm.tex
+++ b/tex/context/base/enco-ibm.tex
@@ -2,61 +2,62 @@
%D [ file=enco-ibm,
%D version=1995.1.1,
%D title=\CONTEXT\ Encoding Macros,
-%D subtitle=IBM Keys,
+%D subtitle=The Good Old MSDOS IBM codepage,
%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 licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module activates the \kap{IBM PC} high \ASCII\
%D characters, such as ‰ and á.
-\unprotect
+\startregime [ibm]
-\catcode`\‰=\@@active \unexpanded\def‰{\"e}
-\catcode`\‚=\@@active \unexpanded\def‚{\'e}
-\catcode`\Š=\@@active \unexpanded\defŠ{\`e}
-\catcode`\ˆ=\@@active \unexpanded\defˆ{\^e}
+\defineactivecharacter ‰ {\"e}
+\defineactivecharacter ‚ {\'e}
+\defineactivecharacter Š {\`e}
+\defineactivecharacter ˆ {\^e}
-\catcode`\„=\@@active \unexpanded\def„{\"a}
-\catcode`\ =\@@active \unexpanded\def {\'a}
-\catcode`\…=\@@active \unexpanded\def…{\`a}
-\catcode`\ƒ=\@@active \unexpanded\defƒ{\^a}
+\defineactivecharacter „ {\"a}
+\defineactivecharacter   {\'a}
+\defineactivecharacter … {\`a}
+\defineactivecharacter ƒ {\^a}
-\catcode`\”=\@@active \unexpanded\def”{\"o}
-\catcode`\¢=\@@active \unexpanded\def¢{\'o}
-\catcode`\•=\@@active \unexpanded\def•{\`o}
-\catcode`\“=\@@active \unexpanded\def“{\^o}
+\defineactivecharacter ” {\"o}
+\defineactivecharacter ¢ {\'o}
+\defineactivecharacter • {\`o}
+\defineactivecharacter “ {\^o}
-\catcode`\‹=\@@active \unexpanded\def‹{\"\dotlessi}
-\catcode`\¡=\@@active \unexpanded\def¡{\'\dotlessi}
-\catcode`\=\@@active \unexpanded\def{\`\dotlessi}
-\catcode`\Œ=\@@active \unexpanded\defŒ{\^\dotlessi}
+\defineactivecharacter ‹ {\"\dotlessi}
+\defineactivecharacter ¡ {\'\dotlessi}
+\defineactivecharacter {\`\dotlessi}
+\defineactivecharacter Œ {\^\dotlessi}
-\catcode`\=\@@active \unexpanded\def{\"u}
-\catcode`\£=\@@active \unexpanded\def£{\'u}
-\catcode`\—=\@@active \unexpanded\def—{\`u}
-\catcode`\–=\@@active \unexpanded\def–{\^u}
+\defineactivecharacter {\"u}
+\defineactivecharacter £ {\'u}
+\defineactivecharacter — {\`u}
+\defineactivecharacter – {\^u}
-\catcode`\=\@@active \unexpanded\def{\'E}
-\catcode`\Ž=\@@active \unexpanded\defŽ{\"A}
-\catcode`\š=\@@active \unexpanded\defš{\"U}
+\defineactivecharacter {\'E}
+\defineactivecharacter Ž {\"A}
+\defineactivecharacter š {\"U}
-\catcode`\‡=\@@active \unexpanded\def‡{\c c}
-\catcode`\€=\@@active \unexpanded\def€{\c C}
+\defineactivecharacter ‡ {\c c}
+\defineactivecharacter € {\c C}
-\catcode`\¤=\@@active \unexpanded\def¤{\~n}
+\defineactivecharacter ¤ {\~n}
-\catcode`\á=\@@active \unexpanded\defá{\SS}
+\defineactivecharacter á {\SS}
-\catcode`\®=\@@active
-\catcode`\¯=\@@active
+\defineactivecharacter ® {\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
+\defineactivecharacter ¯ {\prewordbreak\rightguillemot}
-\unexpanded\def®{\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
-\unexpanded\def¯{\prewordbreak\rightguillemot}
+\stopregime
+
+\enableregime[windows]
%D The next section will be changed as soon as we get grip on
%D the other encodings.
@@ -102,6 +103,4 @@
%D \appendtoks\lccode`¯=`<\to\everysanitize
%D \stoptypen
-\protect
-
\endinput
diff --git a/tex/context/base/enco-il2.tex b/tex/context/base/enco-il2.tex
index a06999d44..f2e6986ad 100644
--- a/tex/context/base/enco-il2.tex
+++ b/tex/context/base/enco-il2.tex
@@ -8,7 +8,7 @@
%D copyright=J. Hagen]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This Czech/Slovak encoding is dedicated to Han The Thanh.
@@ -17,6 +17,8 @@
\startmapping[il2]
+\definecasemap 127 to 255 % we map them all to themselves
+
\definecasemap 165 181 165 \definecasemap 169 185 169
\definecasemap 171 187 171 \definecasemap 174 190 174
\definecasemap 181 181 165 \definecasemap 185 185 169
@@ -89,52 +91,56 @@
\defineaccent r u ^^f9 \defineaccent r U ^^d9
-\def\csencodedrA%
- {\leavevmode\setbox0\hbox{h}\dimen@\ht0\advance\dimen@-1ex%
- \rlap{\raise.67\dimen@\hbox{\char'27}}A}
+\defineaccent r A {\ilencodedrA}
- \defineaccent r A {\csencodedrA}
+\def\ilencodedrA%
+ {\leavevmode\hbox\bgroup
+ \setbox0\hbox{h}%
+ \dimen0=\ht0
+ \advance\dimen0 by -1ex
+ \rlap{\raise.67\dimen0\hbox{\char'27}}A%
+ \egroup}
\definecharacter ae 26 \definecharacter AE 29
\definecharacter oe 27 \definecharacter OE 30
\definecharacter o 28 \definecharacter O 31
\definecharacter i 16
-\definecharacter j 17
- \definecharacter SS 25
+\definecharacter j 17 \definecharacter SS 25
%D Some rather \PLAIN\ \TEX\ redefinitions.
-\def\csencodedb#1
- {\oalign{\null#1\crcr\hidewidth\sh@ft{29}%
- \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}
+\defineaccentcommand b {\ilencodedb}
+\defineaccentcommand c {\ilencodedc}
+\defineaccentcommand d {\ilencodedd}
+
+\def\ilencodedb#1
+ {\oalign%
+ {\null#1\crcr\hidewidth\sh@ft{29}%
+ \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}
-\def\csencodedc#1
+\def\ilencodedc#1
{\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1\else
{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
-\def\csencodedd#1%
+\def\ilencodedd#1%
{\oalign{\null#1\crcr\hidewidth\sh@ft{08}.\hidewidth}}
-\definecommand b {\csencodedb}
-\definecommand c {\csencodedc}
-\definecommand d {\csencodedd}
-
%D Some less \PLAIN\ ones:
-\redefinecommand l
-\redefinecommand L
+\definecharacter l {\ilencodedl}
+\definecharacter L {\ilencodedL}
-\def\csencodedl%
+\def\ilencodedl%
{{\char32l}}
-\def\csencodedL% I don't like the \leavevmode here, better \enterhmode
- {\leavevmode\setbox0\hbox{L}\hbox to\wd0{\hss\char32L}}
-
-\definecommand l {\csencodedl}
-\definecommand L {\csencodedL}
+\def\ilencodedL% I don't like the \leavevmode here, better \enterhmode
+ {\leavevmode\hbox\bgroup
+ \setbox0\hbox{L}%
+ \hbox to\wd0{\hss\char32L}%
+ \egroup}
\stopcoding
-
+
% \everyuppercase, font/language specifics ?
% \uccode152=152 \lccode152=184
@@ -177,3 +183,4 @@
% \defineaccent " u '374 \defineaccent " U '334
% \defineaccent r u '371 \defineaccent r U '331
+\endinput
diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex
index af7ffcc8c..0ff61d384 100644
--- a/tex/context/base/enco-ini.tex
+++ b/tex/context/base/enco-ini.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% \everyuppercase
@@ -75,12 +75,119 @@
3: Unbekannte Kodierung --
\stopmessages
-%D First we define a few local constants.
+\startmessages czech library: encodings
+ title: kodovani
+ 1: kodovani --
+ 2: je nacteno kodovani --
+ 3: nezname kodovani --
+\stopmessages
+
+%D First we define a few local or not yet initialized constants.
+
+\def\@map@{@m@ap@} % mapping prefix
+\def\@reg@{@r@eg@} % regime prefix
-\def\@map@ {@m@ap@} % mapping prefix
-\def\@plain@ {@e@pl@} % plain TeX encoding vector
+\ifx\currentlanguage\undefined \let\currentlanguage\s!en \fi
%D \macro
+%D {protectregime}
+%D
+%D The next boolean is used later on to prevent unwanted
+%D catcode changes. Use it with care.
+
+\newif\ifprotectregime \protectregimetrue
+
+\def\setregimecode#1#2%
+ {\ifprotectregime\ifnum\catcode#1=\active\else
+ \catcode#1=#2\relax
+ \fi\else
+ \catcode#1=#2\relax
+ \fi}
+
+%D \macros
+%D {startregime, enableregime}
+%D
+%D Sometimes it makes sense to activate the characters in the
+%D upper half of the character table. Such a bundle of
+%D characters can be packages in a regime. Later we will see
+%D encodings (that links characters slots to glyphs) and
+%D mappings (that take care of hyphenation and case changes).
+%D
+%D When character~231 is of category code letter, it
+%D directly maps to glyph~231 (unless of course some virtual
+%D font is used). By making character~231 active, we can map
+%D it onto for instance the glyph in slot 233. This mapping
+%D can in itself be indirect, in the sense that it is for
+%D instance handled by an accent command.
+%D
+%D Regimes are implemented roughly the same as mappings, but
+%D enabled under different circumstances. In the future, the
+%D low level implementation may change.
+
+\def\startregime[#1]%
+ {\pushmacro\characterregime
+ \edef\characterregime{@#1@}%
+ \doifundefined{\@reg@\characterregime}
+ {\expanded{\newtoks\csname\@reg@\characterregime\endcsname}}}
+
+\def\stopregime%
+ {\popmacro\characterregime}
+
+%\long\def\startregime[#1]#2\stopregime{}
+
+\def\setregimetoks%
+ {\@EA\let\@EA\regimetoks\csname\@reg@\characterregime\endcsname}
+
+\let\enabledregime\empty
+
+\def\enableregime[#1]%
+ {\edef\characterregime{@#1@}%
+ \ifx\enabledregime\characterregime \else
+ \doifdefined{\@reg@\characterregime}
+ {\the\csname\@reg@\characterregime\endcsname}%
+ \let\enabledregime\characterregime
+ \fi}
+
+%D \macros
+%D {defineactivedecimal, defineactivedecimals, defineactivetoken}
+%D
+%D The following commands are rather ugly ones. It makes a
+%D character active and assigns it a value. When expanded,
+%D the decimal number of the character is passed as first
+%D argument.
+%D
+%D \starttypen
+%D \def\decimalcharacter#1{\message{#1 is now active}}
+%D
+%D \defineactivedecimal 122 {\decimalcharacter}
+%D
+%D \defineactivedecimals 128 to 255 as {\decimalcharacter}
+%D \stoptypen
+%D
+%D This command is typically used in coding definitions,
+%D like the \UNICODE\ one.
+
+\def\dodefineactivedecimal#1#2%
+ {\catcode#1=\active % maybe \protectregimetrue
+ \scratchcounter=\the\uccode`~
+ \uccode`~=#1\relax
+ \uppercase{\unexpanded\edef~{\noexpand#2{\number#1}}}%
+ \uccode`~=\scratchcounter}
+
+\def\defineactivedecimal#1 #2 %
+ {\setregimetoks
+ \appendtoks\dodefineactivedecimal{#1}{#2}\to\regimetoks}
+
+\def\defineactivedecimals#1 to #2 as #3 %
+ {\setregimetoks
+ \dostepwiserecurse{#1}{#2}{1}
+ {\@EA\appendtoks\@EA\dodefineactivedecimal\@EA{\recurselevel}{#3}\to\regimetoks}}
+
+\def\defineactivetoken #1 #2%
+ {\setregimetoks
+ \appendtoks\defineactivecharacter#1 {#2}\to\regimetoks}
+
+%D \macros
%D {useencoding}
%D
%D Encodings things are defined in separate files and are
@@ -102,7 +209,7 @@
{\processcommalist[#1]\douseencoding}
%D \macros
-%D {startmapping,usemapping}
+%D {startmapping,enablemapping}
%D
%D In order to process patterns, convert from lower to
%D uppercase and vise versa and some more, we provide a
@@ -122,11 +229,11 @@
%D \stoptypen
%D
%D So, character 165 becomes 181 in uppercase and 165 in
-%D lowercase. A mapping is activated with \type {\usemapping}.
+%D lowercase. A mapping is activated with \type {\enablemapping}.
\def\startmapping[#1]%
{\pushmacro\charactermapping
- \def\charactermapping{#1}%
+ \edef\charactermapping{@#1@}%
\doifundefined{\@map@\charactermapping}
{\expanded{\newtoks\csname\@map@\charactermapping\endcsname}}}
@@ -138,11 +245,40 @@
\def\definecasemap #1 #2 #3 % code lower upper
{\setmappingtoks
- \appendtoks\setcasemap #1 #2 #3 \to\mappingtoks
+ \doifelse{#2}{to}
+ {\appendtoks\presetcaserange{#1}{#3}\to\mappingtoks}
+ {\appendtoks\setcasemap #1 #2 #3 \to\mappingtoks}%
\ignorespaces}
+%D Watch the \type {\definecasemap 127 to 255} option!
+%D Dedicated to Taco there is also:
+
+\def\definecasemaps #1 to #2 lc #3 uc #4 % from to lc+ uc+
+ {\dostepwiserecurse{#1}{#2}{1}
+ {\!!counta=\recurselevel\advance\!!counta by #3\relax
+ \!!countb=\recurselevel\advance\!!countb by #4\relax
+ \expanded{\definecasemap
+ \recurselevel\space\the\!!counta\space\the\!!countb\space}}%
+ \ignorespaces}
+
+%D This can be used like:
+%D
+%D \starttypen
+%D \definecasemaps 128 to 156 lc 32 uc 0
+%D \definecasemaps 160 to 188 lc -32 uc 0
+%D \definecasemaps 192 to 255 lc 32 uc 0
+%D \stoptypen
+%D
+%D and saves a lot of typing (copying).
+
+\def\presetcaserange#1#2%
+ {\dostepwiserecurse{#1}{#2}{1}
+ {\setregimecode\recurselevel\@@letter
+ \lccode \recurselevel=\recurselevel
+ \uccode \recurselevel=\recurselevel}}
+
\def\setcasemap #1 #2 #3 %
- {\catcode#1=\@@letter
+ {\setregimecode{#1}\@@letter
\lccode #1=#2
\uccode #1=#3 }
@@ -152,7 +288,7 @@
\ignorespaces}
\def\setspacemap #1 #2 %
- {\catcode#1=\@@other
+ {\setregimecode{#1}\@@other
\lccode #1=0
\uccode #1=0
\sfcode #1=#2 }
@@ -172,8 +308,22 @@
\def\setcasecom#1#2{\def#1{#2}}
-\def\usemapping[#1]%
- {\doifdefined{\@map@#1}{\the\csname\@map@#1\endcsname}}
+\let\enabledmapping\empty % indirect, needed to handle default too
+
+\def\enablemapping[#1]%
+ {\edef\charactermapping{@#1@}%
+ \ifx\enabledmapping\charactermapping \else
+ \doifdefined{\@map@\charactermapping}
+ {\the\csname\@map@\charactermapping\endcsname}%
+ \enablelanguagespecifics[\currentlanguage]% new
+ \edef\enabledmapping{\charactermapping\currentlanguage}%
+ \fi}
+
+%D This macro wil be implemented in \type {lang-ini.tex}.
+
+\ifx\enablelanguagespecifics\undefined
+ \def\enablelanguagespecifics[#1]{}
+\fi
%D Further on we have to take some precautions when dealing
%D with special characters like~\type{~}, \type{_}
@@ -189,11 +339,6 @@
\catcode`_=\@@letter
\catcode`^=\@@letter\relax}
-% \def\unprotectfontcharacters%
-% {\catcode`\~=\@@active
-% \catcode`\_=\@@subscript
-% \catcode`\^=\@@superscript\relax}}
-
%D The completeness of the Computer Modern Roman typefaces
%D makes clear how incomplete other faces are. To honour 7~bit
%D \ASCII, these fonts were designed using only the first 127
@@ -270,22 +415,38 @@
%D contain the current and default encoding vectors and both
%D default to the \PLAIN\ one.
-\let\characterencoding = \@plain@
-\let\nocharacterencoding = \@plain@
-\let\charactermapping = \@plain@
+\edef\characterencoding {@\s!default @}
+\edef\nocharacterencoding {@\s!default @}
+\edef\charactermapping {@\s!default @}
+\edef\characterregime {@\s!default @}
%D \macros
-%D {startcoding, setcoding}
+%D {startcoding, reducetocoding}
%D
%D Before we can redefine accents and special characters, we
%D have to tell \CONTEXT\ what encoding is in force. The next
%D command is responsible for doing this and also takes care of
%D the definition of the recoding commands. We use the \type
%D {\start}||\type {\stop}||commands for definitions and the
-%D \type {\set}||command for local switching.
+%D \type {\reduceto}||command for local switching to
+%D simplified commands.
-\def\donthandleaccent#1#2%
- {\getvalue{\characterencoding#1\string#2}}
+\def\donthandleaccent#1#2% \empty makes #2={} save % no \unexpanded
+ {\ifundefined{\characterencoding#1\string#2\empty}%
+ #2%
+ \else
+ \getvalue{\characterencoding#1\string#2\empty}%
+ \fi}
+
+\def\donthandlecommand#1% % no \unexpanded, otherwise pdfdoc will fail
+ {\ifundefined{\characterencoding#1}%
+ #1%
+ \else
+ \getvalue{\characterencoding#1}%
+ \fi}
+
+\def\enablecoding[#1]%
+ {\edef\characterencoding{@#1@}}
\def\startcoding[#1]%
{\doifelsenothing{#1}
@@ -293,27 +454,77 @@
{%\protectfontcharacters % problematic in language loading
\showmessage{\m!encodings}{1}{#1}%
\pushmacro\dohandleaccent
+ \pushmacro\dohandlecommand
+ \pushmacro\definesortkey
\let\dohandleaccent\donthandleaccent
- \def\characterencoding{@#1@}%
+ \let\dohandlecommand\donthandlecommand
+ \let\definesortkey\savesortkey
+ \enablecoding[#1]%
\def\stopcoding%
- {\popmacro\dohandleaccent
- \let\characterencoding=\@plain@
+ {\popmacro\definesortkey
+ \popmacro\dohandlecommand
+ \popmacro\dohandleaccent
+ \enablecoding[\s!default]%
\unprotectfontcharacters}}} % ??
-\def\setcoding[#1]% use grouped!
+\def\reducetocoding[#1]% use grouped!
{\doifsomething{#1}
{\let\dohandleaccent\donthandleaccent
- \def\characterencoding{@#1@}%
+ \let\dohandlecommand\donthandlecommand
+ \enablecoding[#1]%
\enablelanguagespecifics[\currentlanguage]}}
-\def\startencoding{\startcoding}
-\def\stopencoding {\stopcoding}
-\def\setencoding {\setcoding}
+\def\startencoding {\startcoding}
+\def\stopencoding {\stopcoding}
+\def\enableencoding{\enablecoding}
%D The use of these macros are not limited to font
%D definition files, but may also be used when loading
%D patterns.
+%D \macros
+%D {definesortkey,flushsortkeys,flushsortkey}
+%D
+%D Yet another definition concerns sorting of indexes and
+%D lists.
+%D
+%D \starttypen
+%D \definesortkey {\'e} {e} {a} {\'e}
+%D \stoptypen
+%D
+%D The first argument denotes the string to be treated. The
+%D second argument is the raw replacement, while the second
+%D argument determines the sort order given the replacement.
+%D The last argument is used as entry in the index (a, b, etc).
+%D
+%D The keys can be flished using \type {\flushsortkeys}
+%D which in turn results in a sequence of calls to \type
+%D {\flushsortkey}, a macro taking 4~arguments.
+%D
+%D This mechanism is currently being tested and subjected to
+%D changes!
+
+\def\savesortkey#1#2#3#4%
+ {\let\flushsortkey\relax % important
+ \edef\!!stringa{sort:\characterencoding}%
+ \ifundefined\!!stringa
+ \let\!!stringb\empty
+ \else
+ \@EA\def\@EA\!!stringb\@EA{\csname\!!stringa\endcsname}%
+ \fi
+ \convertargument#1\to\asciiA \convertargument#2\to\asciiB
+ \convertargument#3\to\asciiC \convertargument#4\to\asciiD
+ \setevalue{\!!stringa}{\!!stringb\flushsortkey{\asciiA}{\asciiB}{\asciiC}{\asciiD}}}
+
+\def\definesortkey#1#2#3#4%
+ {}
+
+\def\flushsortkeys%
+ {\enablelanguagespecifics[\currentlanguage]%
+ \getvalue{sort:\characterencoding}}
+
+\let\flushsortkey\relax
+
%D \macros
%D {defineaccent, definecharacter, definecommand}
%D
@@ -329,20 +540,23 @@
\dododefineaccent#1 #2 }
\def\dododefineaccent#1 #2 #3 %
- {\doifnumberelse{#3}
+ {\redefineaccent #1 % just to be sure
+ \doifnumberelse{\string#3}
{\setvalue{\characterencoding#1\string#2}{\char#3}}
{\setvalue{\characterencoding#1\string#2}{#3}}%
\unprotectfontcharacters}
\def\definecharacter#1 #2 %
- {\doifnumberelse{#2}
+ {\redefinecharacter #1 % just to be sure
+ \doifnumberelse{\string#2}
{\setvalue{\characterencoding\string#1}{\char#2}}
{\setvalue{\characterencoding\string#1}{#2}}}
%D Instead of numbers, a command may be entered.
\def\definecommand#1 #2 %
- {\setvalue{\characterencoding\string#1}{#2}}
+ {\redefinecommand #1 % just to be sure
+ \setvalue{\characterencoding\string#1}{#2}}
%D Here we see that redefining accents is characters is more
%D or less the same as redefining commands. We also could have
@@ -385,7 +599,8 @@
{\def\!!stringa{\nocharacterencoding\string#1}%
\doifundefined{\!!stringa}
{\@EA\letvalue\@EA\!!stringa\@EA=\csname\string#1\endcsname}%
- \setvalue{\string#1}{\dohandleaccent#1}%
+ % no \unexpanded, else pdfdoc fails
+ \setvalue{\string#1}{\dohandleaccent#1}%
\unprotectfontcharacters}
%D \macros
@@ -411,50 +626,72 @@
{\protectfontcharacters
\dodefineaccentcommand}
-\def\dodefineaccentcommand#1 #2 %
- {\doifnumberelse{#2}
+\def\dodefineaccentcommand#1 #2 % \string toegevoegd
+ {\doifnumberelse{\string#2}
{\setvalue{\characterencoding\string#1}##1{{\accent#2 ##1}}}
{\setvalue{\characterencoding\string#1}##1{{#2##1}}}%
\unprotectfontcharacters}
-%D We don't have to define them for the default \PLAIN\ case. Commands
-%D may be used instead of character codes.
+%D We don't have to define them for the default \PLAIN\ case.
+%D Commands may be used instead of character codes.
%D \macros
%D {normalaccent}
%D
-%D The next (in fact three) macros to take care of \type{\"e}
-%D as well as \type{\"{e}} situations. The latter one is always
-%D handled by \TEX's \type{\accent} primitive, but the former
-%D one can put the accents on top of characters as well as use
-%D \type{\char} to call for a character directly.
-
-% kan met minder def's en \expandafter...
+%D
+%D Accents are either placed by \TEX's \type {\accent}
+%D primitive, or part of the glyph. By default the former
+%D method is used, unless overruled in the encoding
+%D definitions.
\let\normalaccent=\accent
-\unexpanded\def\dohandleaccent#1%
- {\def\dodohandleaccent%
- {\ifx\next\bgroup
- \def\next{\getvalue{\nocharacterencoding#1}}%
- \else
- \def\next{\dododohandleaccent#1}%
- \fi
- \next}%
- \futurelet\next\dodohandleaccent}
-
-\def\dododohandleaccent#1#2%
- {\bgroup
- \ifundefined{\characterencoding#1\string#2}%
- \def\\{\getvalue{\nocharacterencoding#1}#2\egroup}%
+\beginETEX \ifcsname
+
+\unexpanded\def\dohandleaccent#1#2%
+ {\def\glyph{#2}%
+ \ifx\glyph\empty
+ \dohandleaccent#1\relax
+ \else\ifx\glyph\space
+ \dohandleaccent#1\relax
+ \else\ifcsname\characterencoding#1\string#2\empty\endcsname
+ \csname\characterencoding#1\string#2\endcsname
+ \else\ifcsname\characterencoding#1\endcsname
+ \csname\characterencoding#1\endcsname#2%
\else
- \def\\{\getvalue{\characterencoding#1\string#2}\egroup}%
- \fi
- \\}
+ \csname\nocharacterencoding#1\endcsname#2%
+ \fi\fi\fi\fi
+ \relax} % prevents further reading
+
+\endETEX
+
+\beginTEX
+
+\unexpanded\def\dohandleaccent#1#2%
+ {\def\glyph{#2}%
+ \ifx\glyph\empty
+ \dohandleaccent#1\relax
+ \else\ifx\glyph\space
+ \dohandleaccent#1\relax
+ \else\expandafter\ifx\csname\characterencoding#1\string#2\empty\endcsname\relax
+ \expandafter\ifx\csname\characterencoding#1\endcsname\relax
+ \csname\nocharacterencoding#1\endcsname#2%
+ \else
+ \csname\characterencoding#1\endcsname#2%
+ \fi
+ \else
+ \csname\characterencoding#1\string#2\endcsname
+ \fi\fi\fi
+ \relax} % prevents further reading
+
+\endTEX
%D The trick with \type{\\} is needed to prevent spaces from
%D being gobbled after the accented character, should we have
-%D \type{\next}, we should have ended up with gobbled spaces.
+%D used \type{\next}, we should have ended up with gobbled
+%D spaces. The \type {\empty} after \type {#2} takes care of
+%D empty arguments, so that we can savely say~\type{\"{}}
+%D and alike.
%D \macros
%D {redefinecommand}
@@ -478,7 +715,9 @@
\def\redefinecommand#1 %
{\def\!!stringa{\nocharacterencoding#1}%
\doifundefined{\!!stringa}
- {\@EA\letvalue\@EA\!!stringa\@EA=\csname#1\endcsname}%
+ {\doifundefined{#1}{\letvalue{#1}\relax}%
+ \@EA\letvalue\@EA\!!stringa\csname#1\endcsname}%
+ % no \unexpanded, else pdfdoc fails
\setvalue{#1}{\dohandlecommand{#1}}}%
\unexpanded\def\dohandlecommand#1%
@@ -503,6 +742,64 @@
\let\redefinecharacter=\redefinecommand
+%D \macros
+%D {currentencoding, currentmapping, showencoding}
+%D
+%D Encoding is a tricky business. Therefore we provide a
+%D macro that show most of the characters involved. The next
+%D two tables show the result of \type {\showencoding}.
+%D
+%D \plaatstabel
+%D {The special glyphs in default encoding.}
+%D {\showencoding}
+%D
+%D \plaatstabel
+%D {The special glyphs in texnansi encoding.}
+%D {\switchtobodyfont[lbr]\showencoding}
+
+\def\currentencoding%
+ {\expandafter\docurrentencoding\characterencoding}
+
+\def\currentmapping%
+ {\expandafter\docurrentencoding\charactermapping}
+
+\def\docurrentencoding @#1@%
+ {#1}
+
+\def\showencoding%
+ {\bgroup
+ \setupcolors[\c!status=\v!lokaal]
+ \starttextrule{\currentencoding:\ {\red accent}\ {\blue char}\ hardcoded}
+ \let\normalaccent=\accent
+ \def\accent%
+ {\red\normalaccent}
+ \let\normalchar =\char
+ \def\char%
+ {\bgroup
+ \def\char{\blue\normalchar\scratchcounter\egroup}%
+ \afterassignment\char\scratchcounter=}%
+ \def\do##1%
+ {\def\dodo####1%
+ {\hbox spread .5em{\hss##1####1\hss}}%
+ \hbox
+ {\hbox to 2em{\tttf\string##1\hss}%
+ \handletokens abcdefghijklmnopqrstuvwxyz\i\j\with\dodo}
+ \par
+ \hbox
+ {\hskip2em
+ \handletokens ABCDEFGHIJKLMNOPQRSTUVWXYZ\i\j\with\dodo}
+ \par}
+ \do\'\do\`\do\^\do\~\do\"
+ \do\H\do\r\do\v\do\u\do\=
+ \do\.\do\b\do\d\do\k\do\c
+ \def\do##1{\hbox spread .5em{\hss##1\hss}}
+ \hbox
+ {\hskip2em
+ \handletokens\ae\AE\oe\OE\o\O\SS\aa\AA\cc\CC\i\j\with\do}
+ \par
+ \stoptextrule
+ \egroup}
+
%D \macros
%D {everyuppercase, EveryUppercase,
%D everyuppercase, EveryUppercase}
@@ -534,9 +831,6 @@
\appendtoks\let\setuppercasecom\setcasecom\to\everyuppercase
\appendtoks\let\setlowercasecom\setcasecom\to\everylowercase
-\appendtoks\usemapping[\charactermapping]\to\everyuppercase
-\appendtoks\usemapping[\charactermapping]\to\everylowercase
-
%D \macros
%D {everysanitize, EverySanitize}
%D
@@ -569,6 +863,14 @@
\repeat
\fi}
+%D \macros
+%D {cc,CC}
+%D
+%D Hm, not in plain at all, those \cc's and \CC's.
+
+\def\CC{\c{C}}
+\def\cc{\c{c}}
+
%D \macros
%D {dotlessi,dotlessj}
%D
@@ -579,6 +881,20 @@
\let\dotlessi=\i
\let\dotlessj=\j
+%D \macros
+%D {defineuclass,defineudigit,udigit}
+%D
+%D The next few macros are experimental and needed for unicoded
+%D chinese characters.
+
+\def\defineuclass #1 #2 #3 {\setvalue{uc#2#3}{#1}}
+\def\defineudigit #1 #2 #3 {\setvalue{\characterencoding uc#1}{\uchar{#2}{#3}}}
+
+%D It may look strange, but for the moment, we want the encoding
+%D to be part of the digit specification. This may change!
+
+\unexpanded\def\udigit#1#2{\getvalue{@#1@uc\number#2}}
+
%D Here come the definitions.
\redefineaccent ' % grave
@@ -592,6 +908,11 @@
\redefineaccent H % hungarumlaut
\redefineaccent t % ........
\redefineaccent r % ........
+\redefineaccent =
+\redefineaccent b
+\redefineaccent c
+\redefineaccent d
+\redefineaccent k
\redefinecharacter ae % ae
\redefinecharacter AE % AE
@@ -603,15 +924,19 @@
\redefinecharacter SS % germandbls
\redefinecharacter aa % aring
\redefinecharacter AA % Aring
-\redefinecharacter cc % ccedilla
-\redefinecharacter CC % Ccedilla
-\redefinecommand b
-\redefinecommand c
-\redefinecommand d
+\redefinecharacter th
+\redefinecharacter TH
+\redefinecharacter ng
+\redefinecharacter NG
+\redefinecharacter ij
+\redefinecharacter IJ
+
+\redefinecharacter i \redefinecharacter dotlessi
+\redefinecharacter j \redefinecharacter dotlessj
-\redefinecommand i % \definecharacter i "10
-\redefinecommand j % \definecharacter j "11
+\redefinecharacter l
+\redefinecharacter L
\defineaccent " i {\"\i} \defineaccent " j {\"\j}
\defineaccent ^ i {\^\i} \defineaccent ^ j {\^\j}
@@ -621,7 +946,7 @@
%D Some more:
-\startmapping[\nocharacterencoding]
+\startmapping[\s!default]
\defineuppercasecom \i {I}
\defineuppercasecom \j {J}
@@ -641,7 +966,7 @@
%D We preload several encodings:
-\useencoding[ans,il2,pdf]
+\useencoding[mis,ans,il2,ec,x5,pol,pdf,uni]
\protect
diff --git a/tex/context/base/enco-lat.tex b/tex/context/base/enco-lat.tex
new file mode 100644
index 000000000..49f7485ea
--- /dev/null
+++ b/tex/context/base/enco-lat.tex
@@ -0,0 +1,32 @@
+%D \module
+%D [ file=enco-lat,
+%D version=1999.11.16,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Pseudo Latin 2,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=Hans Hagen]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This file maps \ISO~latin~2 characters onto standard
+%D \ASCII\ characters. Some more definitions will be added.
+
+\startregime[latin2]
+
+\defineactivecharacter è {\v{c}}
+\defineactivecharacter È {\v{C}}
+\defineactivecharacter æ {\'{c}}
+\defineactivecharacter Æ {\'{C}}
+\defineactivecharacter ¹ {\v{s}}
+\defineactivecharacter © {\v{S}}
+\defineactivecharacter ¾ {\v{z}}
+\defineactivecharacter ® {\v{Z}}
+\defineactivecharacter ð {\pseudoencodeddj}
+\defineactivecharacter Ð {\pseudoencodedDJ}
+
+\stopregime
+
+\endinput
diff --git a/tex/context/base/enco-mis.tex b/tex/context/base/enco-mis.tex
new file mode 100644
index 000000000..9de15de2e
--- /dev/null
+++ b/tex/context/base/enco-mis.tex
@@ -0,0 +1,59 @@
+%D \module
+%D [ file=enco-mis,
+%D version=1999.11.11,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Missing Glyphs,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D In this file we collect some definitions that construct
+%D pseudo characters. Some day we will move some definitions
+%D from \type {plain.tex} to this file. Some definitions are
+%D derived from definitions in the \LATEX\ distribution,
+%D especially Johannes Braams' Babel system.
+
+\startmapping[\s!default]
+
+\defineuppercasecom \dj \DJ
+\defineuppercasecom \Dj \dj
+\defineuppercasecom \DJ \dj
+
+\stopmapping
+
+\definecharacter dj {\pseudoencodeddj}
+\definecharacter Dj {\pseudoencodedDJ}
+\definecharacter DJ {\pseudoencodedDJ}
+
+\unprotect
+
+\def\pseudoencodeddj% like in babel
+ {\leavevmode\hbox\bgroup
+ \setbox0=\hbox{d}%
+ \dimen0=\ht0
+ \advance\dimen0 by 1ex
+ \dimen0=.45\dimen0
+ \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0
+ \advance\dimen2 by .5ex
+ \rlap{\raise\dimen0\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}%
+ \box0
+ \egroup}
+
+\def\pseudoencodedDJ% like in babel
+ {\leavevmode
+ \hbox\bgroup
+ \setbox0=\hbox{D}%
+ \dimen0=.55\ht0
+ \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0
+ \advance\dimen2 by .15ex
+ \advance\dimen2 by -.15\fontdimen7\font
+ \dimen4\expandafter\withoutpt\the\fontdimen7\font\dimen0
+ \rlap{\raise\dimen0\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.33em}}}%
+ \box0
+ \egroup}
+
+\protect \endinput
diff --git a/tex/context/base/enco-pdf.tex b/tex/context/base/enco-pdf.tex
index 2dfb5137c..5b3729660 100644
--- a/tex/context/base/enco-pdf.tex
+++ b/tex/context/base/enco-pdf.tex
@@ -8,7 +8,7 @@
%D copyright=J. Hagen]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This is the \PDF\ document encoding.
@@ -39,7 +39,7 @@
\defineaccent ' u ^^fa
\defineaccent ' Y ^^dd
\defineaccent ' y ^^fd
-
+
\defineaccent ^ A ^^c2
\defineaccent ^ a ^^e2
\defineaccent ^ E ^^ca
@@ -69,19 +69,39 @@
\defineaccent ~ O ^^d5
\defineaccent ~ o ^^f5
-\defineaccent , C ^^c7
-\defineaccent , c ^^e7
-
-\defineaccent < < ^^ab
-\defineaccent > > ^^bb
-
+\defineaccent c c ^^e7
+\defineaccent C C ^^c7
+
+\defineaccent ' c c % c acute
+\defineaccent ' C C % C acute
+\defineaccent ' n n % n acute
+\defineaccent ' N N % N acute
+\defineaccent ' S S % S acute
+\defineaccent ' s s % s acute
+\defineaccent ' Z Z % Z acute
+\defineaccent ' z z % z acute
+
+\defineaccent . Z Z % Z dot
+\defineaccent . z z % z dot
+
+\defineaccent k a a % a ogonek
+\defineaccent k A A % A ogonek
+\defineaccent k e e % e ogonek
+\defineaccent k E E % E ogonek
+
\definecharacter AE ^^c6
\definecharacter ae ^^e6
-\definecharacter oA ^^c5
+\definecharacter OA ^^c5
\definecharacter oa ^^e5
\definecharacter oe ^^9c
\definecharacter ss ^^df
-
+\definecharacter SS ^^df
+
+\definecharacter leftguillemot ^^ab
+\definecharacter rightguillemot ^^bb
+\definecharacter leftsubguillemot ^^ab
+\definecharacter rightsubguillemot ^^bb
+
\stopencoding
\endinput
diff --git a/tex/context/base/enco-pol.tex b/tex/context/base/enco-pol.tex
new file mode 100644
index 000000000..40c9dfa86
--- /dev/null
+++ b/tex/context/base/enco-pol.tex
@@ -0,0 +1,254 @@
+%D \module
+%D [ file=enco-pol,
+%D version=1999.28.8,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Polish Mixed Encoding,
+%D author=Taco Hoekwater,
+%D date=\currentdate,
+%D copyright=Hans Hagen]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Polish native encoding.
+
+\startmapping[pl0]
+
+\definecasemap 161 185 165 % a ogonek
+\definecasemap 162 230 198 % c acute
+\definecasemap 166 234 202 % e ogonek
+\definecasemap 170 179 163 % l crossed
+\definecasemap 171 241 209 % n acute
+\definecasemap 243 243 211 % o acute
+\definecasemap 177 156 140 % s acute
+\definecasemap 185 159 143 % z acute
+\definecasemap 187 191 175 % z dot
+
+\definecasemap 129 165 185 % A ogonek
+\definecasemap 130 198 230 % C accute
+\definecasemap 134 202 234 % E ogonek
+\definecasemap 138 163 179 % L crossed
+\definecasemap 139 209 241 % N accute
+\definecasemap 211 211 243 % O acute
+\definecasemap 145 140 156 % S acute
+\definecasemap 153 143 159 % Z acute
+\definecasemap 155 175 191 % Z dot
+
+\stopmapping
+
+\startmapping[pl0]
+
+\definespacemap 129 999 % A ogonek
+\definespacemap 130 999 % C acute
+\definespacemap 134 999 % E ogonek
+\definespacemap 138 999 % L crossed
+\definespacemap 139 999 % N acute
+\definespacemap 211 999 % O acute
+\definespacemap 145 999 % S acute
+\definespacemap 153 999 % Z acute
+\definespacemap 155 999 % Z dot
+
+\stopmapping
+
+\startencoding[pl0]
+
+\defineaccent k a 161 % a ogonek
+\defineaccent ' c 162 % c acute
+\defineaccent k e 166 % e ogonek
+\definecharacter l 170 % l crossed
+\defineaccent ' n 171 % n acute
+\defineaccent ' o 243 % o acute
+\defineaccent ' s 177 % s acute
+\defineaccent ' z 185 % z acute
+\defineaccent . z 187 % z dot
+\defineaccent k A 129 % A ogonek
+\defineaccent ' C 130 % C accute
+\defineaccent k E 134 % E ogonek
+\definecharacter L 138 % L crossed
+\defineaccent ' N 139 % N accute
+\defineaccent ' O 211 % O acute
+\defineaccent ' S 145 % S acute
+\defineaccent ' Z 153 % Z acute
+\defineaccent . Z 155 % Z dot
+
+\stopencoding
+
+\startencoding[pl0]
+
+\definecharacter leftguillemot 174 % ok ?
+\definecharacter rightguillemot 175 % ok ?
+\definecharacter leftsubguillemot 174 % ok ?
+\definecharacter rightsubguillemot 175 % ok ?
+
+\stopencoding
+
+\startencoding[pl0]
+
+\definesortkey {161} {a}{a}{\k a} \definesortkey {129} {a}{a}{\k a}
+\definesortkey {162} {c}{a}{\'c} \definesortkey {130} {c}{a}{\'c}
+\definesortkey {166} {e}{a}{\k e} \definesortkey {134} {e}{a}{\k e}
+\definesortkey {170} {l}{a}{\l } \definesortkey {138} {l}{a}{\l }
+\definesortkey {171} {n}{a}{\'n} \definesortkey {139} {n}{a}{\'n}
+\definesortkey {177} {s}{a}{\'s} \definesortkey {145} {s}{a}{\'s}
+\definesortkey {185} {z}{a}{\'z} \definesortkey {153} {z}{a}{\'z}
+\definesortkey {187} {z}{b}{\.z} \definesortkey {155} {z}{b}{\.z}
+\definesortkey {243} {o}{a}{\'o} \definesortkey {211} {o}{a}{\'o}
+
+\definesortkey {\'c} {c}{a}{\'c} \definesortkey {\'C} {c}{a}{\'c}
+\definesortkey {\'n} {n}{a}{\'n} \definesortkey {\'N} {n}{a}{\'n}
+\definesortkey {\'o} {o}{a}{\'o} \definesortkey {\'O} {o}{a}{\'o}
+\definesortkey {\'s} {s}{a}{\'s} \definesortkey {\'S} {s}{a}{\'s}
+\definesortkey {\'z} {z}{a}{\'z} \definesortkey {\'Z} {z}{a}{\'z}
+\definesortkey {\.z} {z}{b}{\.z} \definesortkey {\.Z} {z}{b}{\.z}
+\definesortkey {\k a}{a}{a}{\k a} \definesortkey {\k A}{a}{a}{\k a}
+\definesortkey {\k e}{e}{a}{\k e} \definesortkey {\k E}{e}{a}{\k e}
+\definesortkey {\l } {l}{a}{\l} \definesortkey {\L } {l}{a}{\l}
+
+\stopencoding
+
+%D Polish CP-1250 encoding.
+
+\startmapping[pl1]
+
+\definecasemap 185 185 165 % a ogonek
+\definecasemap 230 230 198 % c acute
+\definecasemap 234 234 202 % e ogonek
+\definecasemap 179 179 163 % l crossed
+\definecasemap 241 241 209 % n acute
+\definecasemap 243 243 211 % o acute
+\definecasemap 156 156 140 % s acute
+\definecasemap 159 159 143 % z acute
+\definecasemap 191 191 175 % z dot
+
+\definecasemap 165 165 185 % A ogonek
+\definecasemap 198 198 230 % C accute
+\definecasemap 202 202 234 % E ogonek
+\definecasemap 163 163 179 % L crossed
+\definecasemap 209 209 241 % N accute
+\definecasemap 211 211 243 % O acute
+\definecasemap 140 140 156 % S acute
+\definecasemap 143 143 159 % Z acute
+\definecasemap 175 175 191 % Z dot
+
+\stopmapping
+
+\startmapping[pl1]
+
+\definespacemap 165 999 % A ogonek
+\definespacemap 198 999 % C acute
+\definespacemap 202 999 % E ogonek
+\definespacemap 163 999 % L crossed
+\definespacemap 209 999 % N acute
+\definespacemap 211 999 % O acute
+\definespacemap 140 999 % S acute
+\definespacemap 143 999 % Z acute
+\definespacemap 175 999 % Z dot
+
+\stopmapping
+
+\startencoding[pl1]
+
+\defineaccent k a 185 % a ogonek
+\defineaccent ' c 230 % c acute
+\defineaccent k e 234 % e ogonek
+\definecharacter l 179 % l crossed
+\defineaccent ' n 241 % n acute
+\defineaccent ' o 243 % o acute
+\defineaccent ' s 156 % s acute
+\defineaccent ' z 159 % z acute
+\defineaccent . z 191 % z dot
+\defineaccent k A 165 % A ogonek
+\defineaccent ' C 198 % C accute
+\defineaccent k E 202 % E ogonek
+\definecharacter L 163 % L crossed
+\defineaccent ' N 209 % N accute
+\defineaccent ' O 211 % O acute
+\defineaccent ' S 140 % S acute
+\defineaccent ' Z 143 % Z acute
+\defineaccent . Z 175 % Z dot
+
+\stopencoding
+
+\startencoding[pl1]
+
+\definecharacter leftguillemot 174 % ok ?
+\definecharacter rightguillemot 175 % ok ?
+\definecharacter leftsubguillemot 174 % ok ?
+\definecharacter rightsubguillemot 175 % ok ?
+
+\stopencoding
+
+%D Polish ISO-8859-2 encoding.
+
+\startmapping[pl2]
+
+\definecasemap 177 177 161 % a ogonek
+\definecasemap 230 230 198 % c acute
+\definecasemap 234 234 202 % e ogonek
+\definecasemap 179 179 163 % l crossed
+\definecasemap 241 241 209 % n acute
+\definecasemap 243 243 211 % o acute
+\definecasemap 182 182 166 % s acute
+\definecasemap 188 188 172 % z acute
+\definecasemap 191 191 175 % z dot
+
+\definecasemap 161 161 177 % A ogonek
+\definecasemap 198 198 230 % C accute
+\definecasemap 202 202 234 % E ogonek
+\definecasemap 163 163 179 % L crossed
+\definecasemap 209 209 241 % N accute
+\definecasemap 211 211 243 % O acute
+\definecasemap 166 166 182 % S acute
+\definecasemap 172 172 188 % Z acute
+\definecasemap 175 175 191 % Z dot
+
+\stopmapping
+
+\startmapping[pl2]
+
+\definespacemap 161 999 % A ogonek
+\definespacemap 198 999 % C acute
+\definespacemap 202 999 % E ogonek
+\definespacemap 163 999 % L crossed
+\definespacemap 209 999 % N acute
+\definespacemap 211 999 % O acute
+\definespacemap 166 999 % S acute
+\definespacemap 172 999 % Z acute
+\definespacemap 175 999 % Z dot
+
+\stopmapping
+
+\startencoding[pl2]
+
+\defineaccent k a 177 % a ogonek
+\defineaccent ' c 230 % c acute
+\defineaccent k e 234 % e ogonek
+\definecharacter l 179 % l crossed
+\defineaccent ' n 241 % n acute
+\defineaccent ' o 243 % o acute
+\defineaccent ' s 182 % s acute
+\defineaccent ' z 188 % z acute
+\defineaccent . z 191 % z dot
+\defineaccent k A 161 % A ogonek
+\defineaccent ' C 198 % C accute
+\defineaccent k E 202 % E ogonek
+\definecharacter L 163 % L crossed
+\defineaccent ' N 209 % N accute
+\defineaccent ' O 211 % O acute
+\defineaccent ' S 166 % S acute
+\defineaccent ' Z 172 % Z acute
+\defineaccent . Z 175 % Z dot
+
+\stopencoding
+
+\startencoding[pl2]
+
+\definecharacter leftguillemot 174 % ok ?
+\definecharacter rightguillemot 175 % ok ?
+\definecharacter leftsubguillemot 174 % ok ?
+\definecharacter rightsubguillemot 175 % ok ?
+
+\stopencoding
+
+\endinput
diff --git a/tex/context/base/enco-uni.tex b/tex/context/base/enco-uni.tex
new file mode 100644
index 000000000..2b749967f
--- /dev/null
+++ b/tex/context/base/enco-uni.tex
@@ -0,0 +1,23 @@
+%D \module
+%D [ file=enco-uni,
+%D version=1998.10.18,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Unicode,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module activates all characters in the upper range
+%D and sets them to the basic unicodehandler.
+
+\startregime[unicode]
+
+\defineactivedecimals 128 to 255 as {\handleunicodeflowglyph}
+
+\stopregime
+
+\endinput
diff --git a/tex/context/base/enco-vis.tex b/tex/context/base/enco-vis.tex
new file mode 100644
index 000000000..38ac6b0af
--- /dev/null
+++ b/tex/context/base/enco-vis.tex
@@ -0,0 +1,154 @@
+% temporary module
+
+\startregime[viscii]
+
+\defineactivecharacter 2 {\h{uA}}
+\defineactivecharacter 5 {\~{uA}}
+\defineactivecharacter 6 {\~{^A}}
+\defineactivecharacter 20 {\h{Y}}
+\defineactivecharacter 23 {\h{Y}}
+\defineactivecharacter 24 {\d{Y}}
+\defineactivecharacter 25 {\~{Y}}
+\defineactivecharacter 30 {\d{Y}}
+
+\defineactivecharacter 128 {\d{A}}
+\defineactivecharacter 129 {\'{uA}}
+\defineactivecharacter 130 {\`{uA}}
+\defineactivecharacter 131 {\d{uA}}
+\defineactivecharacter 132 {\'{^A}}
+\defineactivecharacter 133 {\`{^A}}
+\defineactivecharacter 134 {\h{^A}}
+\defineactivecharacter 135 {\d{^A}}
+\defineactivecharacter 136 {\~{E}}
+\defineactivecharacter 137 {\d{E}}
+\defineactivecharacter 138 {\'{^E}}
+\defineactivecharacter 139 {\`{^E}}
+\defineactivecharacter 140 {\h{^E}}
+\defineactivecharacter 141 {\~{^E}}
+\defineactivecharacter 142 {\d{^E}}
+\defineactivecharacter 143 {\'{^O}}
+
+\defineactivecharacter 144 {\`{^O}}
+\defineactivecharacter 145 {\h{^O}}
+\defineactivecharacter 146 {\~{^O}}
+\defineactivecharacter 147 {\d{^O}}
+\defineactivecharacter 148 {\d{hO}}
+\defineactivecharacter 149 {\'{hO}}
+\defineactivecharacter 150 {\`{hO}}
+\defineactivecharacter 151 {\h{hO}}
+\defineactivecharacter 152 {\d{I}}
+\defineactivecharacter 153 {\h{O}}
+\defineactivecharacter 154 {\d{O}}
+\defineactivecharacter 155 {\h{I}}
+\defineactivecharacter 156 {\h{U}}
+\defineactivecharacter 157 {\~{U}}
+\defineactivecharacter 158 {\d{U}}
+\defineactivecharacter 159 {\`{Y}}
+
+\defineactivecharacter 160 {\~{O}}
+\defineactivecharacter 161 {\'{ua}}
+\defineactivecharacter 162 {\`{ua}}
+\defineactivecharacter 163 {\d{ua}}
+\defineactivecharacter 164 {\'{^a}}
+\defineactivecharacter 165 {\`{^a}}
+\defineactivecharacter 166 {\h{^a}}
+\defineactivecharacter 167 {\d{^a}}
+\defineactivecharacter 168 {\~{e}}
+\defineactivecharacter 169 {\d{ e}}
+\defineactivecharacter 170 {\'{^e}}
+\defineactivecharacter 171 {\`{^e}}
+\defineactivecharacter 172 {\h{^e}}
+\defineactivecharacter 173 {\~{^e}}
+\defineactivecharacter 174 {\d{^e}}
+\defineactivecharacter 175 {\'{^o}}
+
+\defineactivecharacter 176 {\`{^o}}
+\defineactivecharacter 177 {\h{^o}}
+\defineactivecharacter 178 {\~{^o}}
+\defineactivecharacter 179 {\~{hO}}
+\defineactivecharacter 180 {\h{O}}
+\defineactivecharacter 181 {\d{^o}}
+\defineactivecharacter 182 {\`{ho}}
+\defineactivecharacter 183 {\h{ho}}
+\defineactivecharacter 184 {\d{i}}
+\defineactivecharacter 185 {\d{hU}}
+\defineactivecharacter 186 {\'{hU}}
+\defineactivecharacter 187 {\`{hU}}
+\defineactivecharacter 188 {\h{hU}}
+\defineactivecharacter 189 {\h{o}}
+\defineactivecharacter 190 {\'{ho}}
+\defineactivecharacter 191 {\h{U}}
+
+\defineactivecharacter 192 {\`{A}}
+\defineactivecharacter 193 {\'{A}}
+\defineactivecharacter 194 {\^{A}}
+\defineactivecharacter 195 {\~{A}}
+\defineactivecharacter 196 {\h{A}}
+\defineactivecharacter 197 {\u{A}}
+\defineactivecharacter 198 {\h{ua}}
+\defineactivecharacter 199 {\~{ua}}
+\defineactivecharacter 200 {\`{E}}
+\defineactivecharacter 201 {\'{E}}
+\defineactivecharacter 202 {\^{E}}
+\defineactivecharacter 203 {\h{E}}
+\defineactivecharacter 204 {\`{I}}
+\defineactivecharacter 205 {\'{I}}
+\defineactivecharacter 206 {\~{I}}
+\defineactivecharacter 207 {\`{y}}
+
+\defineactivecharacter 208 {\DJ}
+\defineactivecharacter 209 {\'{hu}}
+\defineactivecharacter 210 {\`{O}}
+\defineactivecharacter 211 {\'{O}}
+\defineactivecharacter 212 {\^{O}}
+\defineactivecharacter 213 {\d{a}}
+\defineactivecharacter 214 {\h{y}}
+\defineactivecharacter 215 {\`{hu}}
+\defineactivecharacter 216 {\h{hu}}
+\defineactivecharacter 217 {\`{U}}
+\defineactivecharacter 218 {\'{U}}
+\defineactivecharacter 219 {\~{y}}
+\defineactivecharacter 220 {\d{y}}
+\defineactivecharacter 221 {\'{Y}}
+\defineactivecharacter 222 {\~{ho}}
+\defineactivecharacter 223 {\h{u}}
+
+\defineactivecharacter 224 {\`{a}}
+\defineactivecharacter 225 {\'{a}}
+\defineactivecharacter 226 {\^{a}}
+\defineactivecharacter 227 {\~{a}}
+\defineactivecharacter 228 {\h{a}}
+\defineactivecharacter 229 {\u{a}}
+\defineactivecharacter 230 {\~{hu}}
+\defineactivecharacter 231 {\~{^a}}
+\defineactivecharacter 232 {\`{e}}
+\defineactivecharacter 233 {\'{e}}
+\defineactivecharacter 234 {\^{e}}
+\defineactivecharacter 235 {\h{e}}
+\defineactivecharacter 236 {\`{i}}
+\defineactivecharacter 237 {\'{i}}
+\defineactivecharacter 238 {\~{i}}
+\defineactivecharacter 239 {\h{i}}
+
+\defineactivecharacter 240 {\dj}
+\defineactivecharacter 241 {\d{hu}}
+\defineactivecharacter 242 {\`{o}}
+\defineactivecharacter 243 {\'{o}}
+\defineactivecharacter 244 {\^{o}}
+\defineactivecharacter 245 {\~{o}}
+\defineactivecharacter 246 {\h{o}}
+\defineactivecharacter 247 {\d{o}}
+\defineactivecharacter 248 {\d{u}}
+\defineactivecharacter 249 {\`{u}}
+\defineactivecharacter 250 {\'{u}}
+\defineactivecharacter 251 {\~{u}}
+\defineactivecharacter 252 {\h{u}}
+\defineactivecharacter 253 {\'{y}}
+\defineactivecharacter 254 {\d{ho}}
+\defineactivecharacter 255 {\~{hU}}
+
+\stopregime
+
+\enableregime[viscii]
+
+\endinput
diff --git a/tex/context/base/enco-win.tex b/tex/context/base/enco-win.tex
index bdef12c7e..73140490c 100644
--- a/tex/context/base/enco-win.tex
+++ b/tex/context/base/enco-win.tex
@@ -1,124 +1,122 @@
-%D \module
-%D [ file=enco-win,
-%D version=1997.08.29,
-%D title=\CONTEXT\ Encoding Macros,
-%D subtitle=Windows 1252 ANSI keys,
-%D author=Hans Hagen / Tobias Burnus,
-%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
-
-%D This module activates the (western) \kap{windows} high \ANSI\
-%D characters, such as ë and á.
-
-\unprotect
-
-\catcode`\À=\@@active \unexpanded\defÀ{\`A}
-\catcode`\Á=\@@active \unexpanded\defÁ{\'A}
-\catcode`\Â=\@@active \unexpanded\defÂ{\^A}
-\catcode`\Ã=\@@active \unexpanded\defÃ{\~A}
-\catcode`\Ä=\@@active \unexpanded\defÄ{\"A}
-\catcode`\Å=\@@active \unexpanded\defÅ{\AA}
-\catcode`\Æ=\@@active \unexpanded\defÆ{\AE}
-
-\catcode`\à=\@@active \unexpanded\defà{\`a}
-\catcode`\á=\@@active \unexpanded\defá{\'a}
-\catcode`\â=\@@active \unexpanded\defâ{\^a}
-\catcode`\ã=\@@active \unexpanded\defã{\~a}
-\catcode`\ä=\@@active \unexpanded\defä{\"a}
-\catcode`\å=\@@active \unexpanded\defå{\aa}
-\catcode`\æ=\@@active \unexpanded\defæ{\ae}
-
-\catcode`\Ç=\@@active \unexpanded\defÇ{\c C}
-\catcode`\ç=\@@active \unexpanded\defç{\c c}
-
-\catcode`\È=\@@active \unexpanded\defÈ{\`E}
-\catcode`\É=\@@active \unexpanded\defÉ{\'E}
-\catcode`\Ê=\@@active \unexpanded\defÊ{\^E}
-\catcode`\Ë=\@@active \unexpanded\defË{\"E}
-
-\catcode`\è=\@@active \unexpanded\defè{\`e}
-\catcode`\é=\@@active \unexpanded\defé{\'e}
-\catcode`\ê=\@@active \unexpanded\defê{\^e}
-\catcode`\ë=\@@active \unexpanded\defë{\"e}
-
-\catcode`\Ì=\@@active \unexpanded\defÌ{\`I}
-\catcode`\Í=\@@active \unexpanded\defÍ{\'I}
-\catcode`\Î=\@@active \unexpanded\defÎ{\^I}
-\catcode`\Ï=\@@active \unexpanded\defÏ{\"I}
-
-\catcode`\ì=\@@active \unexpanded\defì{\`i}
-\catcode`\í=\@@active \unexpanded\defí{\'i}
-\catcode`\î=\@@active \unexpanded\defî{\^i}
-\catcode`\ï=\@@active \unexpanded\defï{\"i}
-
-\catcode`\Ñ=\@@active \unexpanded\defÑ{\~N}
-\catcode`\ñ=\@@active \unexpanded\defñ{\~n}
-
-\catcode`\Ò=\@@active \unexpanded\defÒ{\`O}
-\catcode`\Ó=\@@active \unexpanded\defÓ{\'O}
-\catcode`\Ô=\@@active \unexpanded\defÔ{\^O}
-\catcode`\Õ=\@@active \unexpanded\defÕ{\~O}
-\catcode`\Ö=\@@active \unexpanded\defÖ{\"O}
-\catcode`\Œ=\@@active \unexpanded\defŒ{\OE}
-\catcode`\Ø=\@@active \unexpanded\defØ{\O}
-
-\catcode`\ò=\@@active \unexpanded\defò{\`o}
-\catcode`\ó=\@@active \unexpanded\defó{\'o}
-\catcode`\ô=\@@active \unexpanded\defô{\^o}
-\catcode`\õ=\@@active \unexpanded\defõ{\~o}
-\catcode`\ö=\@@active \unexpanded\defö{\"o}
-\catcode`\œ=\@@active \unexpanded\defœ{\oe}
-\catcode`\ø=\@@active \unexpanded\defø{\o}
-
-\catcode`\Š=\@@active \unexpanded\defŠ{\v{S}}
-\catcode`\š=\@@active \unexpanded\defš{\v{s}}
-\catcode`\ß=\@@active \unexpanded\defß{\SS}
-
-\catcode`\Ù=\@@active \unexpanded\defÙ{\`U}
-\catcode`\Ú=\@@active \unexpanded\defÚ{\'U}
-\catcode`\Û=\@@active \unexpanded\defÛ{\^U}
-\catcode`\Ü=\@@active \unexpanded\defÜ{\"U}
-
-\catcode`\ù=\@@active \unexpanded\defù{\`u}
-\catcode`\ú=\@@active \unexpanded\defú{\'u}
-\catcode`\û=\@@active \unexpanded\defû{\^u}
-\catcode`\ü=\@@active \unexpanded\defü{\"u}
-
-\catcode`\Ý=\@@active \unexpanded\defÝ{\'Y}
-\catcode`\ý=\@@active \unexpanded\defý{\'y}
-\catcode`\ÿ=\@@active \unexpanded\defÿ{\"y}
-
-\catcode`\¿=\@@active \unexpanded\def¿{?`}
-\catcode`\¡=\@@active \unexpanded\def¡{!`}
-\catcode`\†=\@@active \unexpanded\def†{\dag}
-\catcode`\‡=\@@active \unexpanded\def‡{\ddag}
-\catcode`\¶=\@@active \unexpanded\def¶{\P}
-\catcode`\§=\@@active \unexpanded\def§{\S}
-\catcode`\–=\@@active \unexpanded\def–{--}
-\catcode`\—=\@@active \unexpanded\def—{---}
-\catcode`\…=\@@active \unexpanded\def…{\dots}
-\catcode`\©=\@@active \unexpanded\def©{\copyright}
-\catcode`\£=\@@active \unexpanded\def£{\pounds}
-
-\catcode`\„=\@@active \unexpanded\def„{\char44\kern-.1em\char44}
-\catcode`\“=\@@active \unexpanded\def“{\char96\kern-.1em\char96}
-\catcode`\”=\@@active \unexpanded\def”{\char34}
-\catcode`\‘=\@@active \unexpanded\def‘{\upperleftsinglesixquote}
-\catcode`\’=\@@active \unexpanded\def’{\char39}
-\catcode`\›=\@@active \unexpanded\def›{\rightsubguillemot}
-\catcode`\‹=\@@active \unexpanded\def‹{\leftsubguillemot}
-
-\catcode`\«=\@@active
-\catcode`\»=\@@active
-
-\unexpanded\def«{\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
-\unexpanded\def»{\prewordbreak\rightguillemot}
-
-\protect
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=enco-win,
+%D version=1997.08.29,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Windows 1252 ANSI keys,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module activates the (western) \MSWINDOWS\ high \ANSI\
+%D characters, such as ë and á.
+
+\startregime [windows]
+
+\defineactivecharacter À {\`A}
+\defineactivecharacter Á {\'A}
+\defineactivecharacter  {\^A}
+\defineactivecharacter à {\~A}
+\defineactivecharacter Ä {\"A}
+\defineactivecharacter Å {\AA}
+\defineactivecharacter Æ {\AE}
+
+\defineactivecharacter à {\`a}
+\defineactivecharacter á {\'a}
+\defineactivecharacter â {\^a}
+\defineactivecharacter ã {\~a}
+\defineactivecharacter ä {\"a}
+\defineactivecharacter å {\aa}
+\defineactivecharacter æ {\ae}
+
+\defineactivecharacter Ç {\c C}
+\defineactivecharacter ç {\c c}
+
+\defineactivecharacter È {\`E}
+\defineactivecharacter É {\'E}
+\defineactivecharacter Ê {\^E}
+\defineactivecharacter Ë {\"E}
+
+\defineactivecharacter è {\`e}
+\defineactivecharacter é {\'e}
+\defineactivecharacter ê {\^e}
+\defineactivecharacter ë {\"e}
+
+\defineactivecharacter Ì {\`I}
+\defineactivecharacter Í {\'I}
+\defineactivecharacter Î {\^I}
+\defineactivecharacter Ï {\"I}
+
+\defineactivecharacter ì {\`i}
+\defineactivecharacter í {\'i}
+\defineactivecharacter î {\^i}
+\defineactivecharacter ï {\"i}
+
+\defineactivecharacter Ñ {\~N}
+\defineactivecharacter ñ {\~n}
+
+\defineactivecharacter Ò {\`O}
+\defineactivecharacter Ó {\'O}
+\defineactivecharacter Ô {\^O}
+\defineactivecharacter Õ {\~O}
+\defineactivecharacter Ö {\"O}
+\defineactivecharacter Œ {\OE}
+\defineactivecharacter Ø {\O}
+
+\defineactivecharacter ò {\`o}
+\defineactivecharacter ó {\'o}
+\defineactivecharacter ô {\^o}
+\defineactivecharacter õ {\~o}
+\defineactivecharacter ö {\"o}
+\defineactivecharacter œ {\oe}
+\defineactivecharacter ø {\o}
+
+\defineactivecharacter Š {\v{S}}
+\defineactivecharacter š {\v{s}}
+\defineactivecharacter ß {\SS}
+
+\defineactivecharacter Ù {\`U}
+\defineactivecharacter Ú {\'U}
+\defineactivecharacter Û {\^U}
+\defineactivecharacter Ü {\"U}
+
+\defineactivecharacter ù {\`u}
+\defineactivecharacter ú {\'u}
+\defineactivecharacter û {\^u}
+\defineactivecharacter ü {\"u}
+
+\defineactivecharacter Ý {\'Y}
+\defineactivecharacter ý {\'y}
+\defineactivecharacter ÿ {\"y}
+
+\defineactivecharacter ¿ {?`}
+\defineactivecharacter ¡ {!`}
+\defineactivecharacter † {\dag}
+\defineactivecharacter ‡ {\ddag}
+\defineactivecharacter ¶ {\P}
+\defineactivecharacter § {\S}
+\defineactivecharacter – {--}
+\defineactivecharacter — {---}
+\defineactivecharacter … {\dots}
+\defineactivecharacter © {\copyright}
+\defineactivecharacter £ {\pounds}
+
+\defineactivecharacter „ {\char44\kern-.1em\char44}
+\defineactivecharacter “ {\char96\kern-.1em\char96}
+\defineactivecharacter ” {\char34}
+\defineactivecharacter ‘ {\upperleftsinglesixquote}
+\defineactivecharacter ’ {\char39}
+\defineactivecharacter › {\rightsubguillemot}
+\defineactivecharacter ‹ {\leftsubguillemot}
+
+\defineactivecharacter « {\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
+\defineactivecharacter » {\prewordbreak\rightguillemot}
+
+\stopregime
+
+\enableregime[windows]
+
+\endinput
diff --git a/tex/context/base/enco-x5.tex b/tex/context/base/enco-x5.tex
new file mode 100644
index 000000000..f654be0ec
--- /dev/null
+++ b/tex/context/base/enco-x5.tex
@@ -0,0 +1,235 @@
+%D \module
+%D [ file=enco-x5,
+%D version=1999.12.12,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Vietnamese Encoding,
+%D author=J. Hagen,
+%D date=\currentdate,
+%D copyright=J. Hagen]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module is derived from the some files Han The Thanh
+%D prepared for \LATEX. The dual accent support is still
+%D preliminary, but works ok.
+
+\startencoding[x5]
+
+\defineaccentcommand ` 0
+\defineaccentcommand ' 1
+\defineaccentcommand ^ 2
+\defineaccentcommand ~ 3
+\defineaccentcommand " 4
+\defineaccentcommand d 5
+\defineaccentcommand r 6
+\defineaccentcommand v 7
+\defineaccentcommand u 8
+\defineaccentcommand = 9
+\defineaccentcommand . 10
+
+\defineaccentcommand h 12
+
+\defineaccent ` A 128
+\defineaccent ' A 129
+\defineaccent ~ A 130
+\defineaccent h A 131
+\defineaccent d A 132
+\defineaccent ^ A 133
+\defineaccent ` ^A 134
+\defineaccent ' ^A 135
+\defineaccent ~ ^A 136
+\defineaccent h ^A 137
+\defineaccent d ^A 138
+\defineaccent u A 139
+\defineaccent ` uA 140
+\defineaccent ' uA 141
+\defineaccent ~ uA 142
+\defineaccent h uA 143
+\defineaccent d uA 144
+\defineaccent ` E 145
+\defineaccent ' E 146
+\defineaccent ~ E 147
+\defineaccent h E 148
+\defineaccent d E 149
+\defineaccent ^ E 150
+\defineaccent ` ^E 151
+\defineaccent ' ^E 152
+\defineaccent ~ ^E 153
+\defineaccent h ^E 154
+\defineaccent d ^E 155
+\defineaccent ` I 156
+\defineaccent ' I 157
+\defineaccent ~ I 158
+\defineaccent h I 159
+\defineaccent d I 192
+\defineaccent ` O 193
+\defineaccent ' O 194
+\defineaccent ~ O 195
+\defineaccent h O 196
+\defineaccent d O 197
+\defineaccent ^ O 198
+\defineaccent ` ^O 199
+\defineaccent ' ^O 200
+\defineaccent ~ ^O 201
+\defineaccent h ^O 202
+\defineaccent d ^O 203
+\defineaccent h O 204
+\defineaccent ` hO 205
+\defineaccent ' hO 206
+\defineaccent ~ hO 207
+\defineaccent h hO 208
+\defineaccent d hO 209
+\defineaccent ` U 210
+\defineaccent ' U 211
+\defineaccent ~ U 212
+\defineaccent h U 213
+\defineaccent d U 214
+\defineaccent h U 215
+\defineaccent ` hU 216
+\defineaccent ' hU 217
+\defineaccent ~ hU 218
+\defineaccent h hU 219
+\defineaccent d hU 220
+\defineaccent ` Y 221
+\defineaccent ' Y 222
+\defineaccent ~ Y 223
+\defineaccent h Y 26
+\defineaccent d Y 28
+\defineaccent ` a 160
+\defineaccent ' a 161
+\defineaccent ~ a 162
+\defineaccent h a 163
+\defineaccent d a 164
+\defineaccent ^ a 165
+\defineaccent ` ^a 166
+\defineaccent ' ^a 167
+\defineaccent ~ ^a 168
+\defineaccent h ^a 169
+\defineaccent d ^a 170
+\defineaccent u a 171
+\defineaccent ` ua 172
+\defineaccent ' ua 173
+\defineaccent ~ ua 174
+\defineaccent h ua 175
+\defineaccent d ua 176
+\defineaccent ` e 177
+\defineaccent ' e 178
+\defineaccent ~ e 179
+\defineaccent h e 180
+\defineaccent d e 181
+\defineaccent ^ e 182
+\defineaccent ` ^e 183
+\defineaccent ' ^e 184
+\defineaccent ~ ^e 185
+\defineaccent h ^e 186
+\defineaccent d ^e 187
+\defineaccent ` i 188
+\defineaccent ' i 189
+\defineaccent ~ i 190
+\defineaccent h i 191
+\defineaccent d i 224
+\defineaccent ` o 225
+\defineaccent ' o 226
+\defineaccent ~ o 227
+\defineaccent h o 228
+\defineaccent d o 229
+\defineaccent ^ o 230
+\defineaccent ` ^o 231
+\defineaccent ' ^o 232
+\defineaccent ~ ^o 233
+\defineaccent h ^o 234
+\defineaccent d ^o 235
+\defineaccent h o 236
+\defineaccent ` ho 237
+\defineaccent ' ho 238
+\defineaccent ~ ho 239
+\defineaccent h ho 240
+\defineaccent d ho 241
+\defineaccent ` u 242
+\defineaccent ' u 243
+\defineaccent ~ u 244
+\defineaccent h u 245
+\defineaccent d u 246
+\defineaccent h u 247
+\defineaccent ` hu 248
+\defineaccent ' hu 249
+\defineaccent ~ hu 250
+\defineaccent h hu 251
+\defineaccent d hu 252
+\defineaccent ` y 253
+\defineaccent ' y 254
+\defineaccent ~ y 255
+\defineaccent h y 27
+\defineaccent d y 29
+
+\definecharacter i 25
+\definecharacter DJ 30
+\definecharacter dj 31
+
+\definecommand b {\xfiveencodedb}
+\definecommand c {\xfiveencodedc}
+\definecommand aa {\xfiveencodeda}
+\definecommand AA {\xfiveencodedaa}
+
+\stopencoding
+
+\def\xfiveencodedb#1%
+ {\o@lign
+ {\relax
+ #1%
+ \crcr
+ \hidewidth
+ \sh@ft{29}%
+ \vbox to.2ex{\hbox{\char9}\vss}%
+ \hidewidth}}
+
+\def\xfiveencodedc#1%
+ {\leavevmode
+ \setbox\z@\hbox{#1}%
+ \ifdim\ht\z@ = 1ex
+ \accent11 #1
+ \else
+ {\ooalign{\hidewidth\char11\hidewidth\crcr\unhbox\z@}}%
+ \fi}
+
+\def\xfiveencodedaa%
+ {\accent23a}
+
+\def\xfiveencodedAA%
+ {\leavevmode
+ \setbox\z@\hbox{h}%
+ \dimen@\ht\z@
+ \advance\dimen@ -1ex
+ \rlap{\raise.67\dimen@\hbox{\char23}}A}
+
+\endinput
+
+% \quotesinglbase 13
+% \guilsinglleft 14
+% \guilsinglright 15
+% \textquotedblleft 16
+% \textquotedblright 17
+% \quotedblbase 18
+% \guillemotleft 19
+% \guillemotright 20
+% \textendash 21
+% \textemdash 22
+% \textcompwordmark 23
+% \textperthousand \% \char 24
+% \textpertenthousand \%\char 24\char 24
+% \textvisiblespace 32
+% \textquotedbl `\"
+% \textdollar `\$
+% \textquoteright `\'
+% \textless `\<
+% \textgreater `\>
+% \textbackslash `\
+% \textasciicircum `\^
+% \textunderscore 95
+% \textquoteleft `\`
+% \textbraceleft `\{
+% \textbar `\|
+% \textbraceright `\}
+% \textasciitilde `\~
diff --git a/tex/context/base/font-ant.tex b/tex/context/base/font-ant.tex
new file mode 100644
index 000000000..b3e41e1d0
--- /dev/null
+++ b/tex/context/base/font-ant.tex
@@ -0,0 +1,28 @@
+%D \module
+%D [ file=font-ant,
+%D version=1998.8.25,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=AntykwaTorunska,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The Antikwa Torunska font family is a rather nice
+%D and subtle one. Although primary meant for the polish
+%D language, it can be used for other languages as well.
+
+\definefontsynonym [Serif] [AntykwaTorunska-Regular]
+\definefontsynonym [SerifBold] [AntykwaTorunska-Bold]
+\definefontsynonym [SerifItalic] [AntykwaTorunska-Italic]
+\definefontsynonym [SerifSlanted] [AntykwaTorunska-Italic]
+\definefontsynonym [SerifBoldItalic] [AntykwaTorunska-Bold]
+\definefontsynonym [SerifBoldSlanted] [AntykwaTorunska-Bold]
+\definefontsynonym [SerifCaps] [AntykwaTorunska-Regular]
+
+\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt] [rm] [default]
+
+\endinput
diff --git a/tex/context/base/font-arb.tex b/tex/context/base/font-arb.tex
new file mode 100644
index 000000000..2303381e6
--- /dev/null
+++ b/tex/context/base/font-arb.tex
@@ -0,0 +1,327 @@
+% I still need to hook in some features into the setup
+% macro. I also have to (re)define farsi etc. in ways
+% similar to arab, so that we have dedicated environments.
+%
+% keywords needed: vocalize transscribe
+%
+% \startarabic[option=vocalize] % or vocalize=yes
+% ......
+% \stoparabic
+
+%D \module
+%D [ file=font-arb,
+%D version=1999.11.06,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Arabic,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Font Macros / ArabTeX support}
+
+%D At the \NTG\ 10\hoog{th} anniversary meeting Klaus Lagally
+%D introduced the audience to arabic typesetting, and after
+%D that I knew that some day I really had to look into his
+%D generic package. And then, sort of simultaniously Maarten
+%D Wisse and Imran Ahsan Nyazee asked me if \CONTEXT\ could
+%D support \ARABTEX, a package that provides right to left
+%D typesetting of (several variants of) arab and hebrew.
+%D Having implemented support for chinese a few weeks before,
+%D I could not resist to build in support for arab and hebrew
+%D too. Writing support for languages that don't give me any
+%D cue on how to pronounce their script, is kind of special.
+
+%D This is a beta version, since I still have to take care of some
+%D macros that conflict with existing stuff.
+
+\unprotect
+
+\definesystemvariable{ARABTEX}
+
+%D This will go to into font-ini.tex (moved from font-uni.tex):
+
+\def\fontstylesuffix%
+ {\ifnum\fam=\tffam \s!Regular \else
+ \ifnum\fam=\bffam \s!Bold \else
+ \ifnum\fam=\slfam \s!Slanted \else
+ \ifnum\fam=\itfam \s!Italic \else
+ \ifnum\fam=\bsfam \s!BoldSlanted \else
+ \ifnum\fam=\bifam \s!BoldItalic \else
+ \s!Regular \fi\fi\fi\fi\fi\fi}
+
+%D A few (maybe too) simple hooks into the font mechanism. The
+%D hook into the language module is not yet done.
+
+\unexpanded\def\setarabicfont#1%
+ {\scratchdimen=1.2\bodyfontsize
+ \font\arbfont=\truefontname{Arabic#1} at \currentfontscale\scratchdimen
+\setx@skels
+\newfonttrue
+ \arbfont}
+
+%D Just to be compatible with Arab\TEX\ we define:
+
+\unexpanded\def\nash {\setarabicfont\s!Regular}
+\unexpanded\def\nashbf {\setarabicfont\s!Bold }
+\unexpanded\def\pnash {\setarabicfont\s!Regular}
+\unexpanded\def\pnashbf {\setarabicfont\s!Bold }
+\unexpanded\def\xnash {\setarabicfont\s!Regular}
+\unexpanded\def\xnashbf {\setarabicfont\s!Bold }
+
+%D The display arabic environment (will be an installable
+%D object) uses a few conditionals. Let's do it the
+%D \CONTEXT\ way and define an anvironment that we later can
+%D adapt.
+
+\newif\if@ignore
+\newif\if@endpe
+
+\def\setupARABTEXalternative[#1]%
+ {\dodoubleempty\getparameters[\??ARABTEX#1]}
+
+\def\defineARABTEXalternative%
+ {\dodoubleempty\dodefineARABTEXalternative}
+
+\def\dodefineARABTEXalternative[#1][#2]%
+ {\iffirstargument % \startarab is defined but used already
+ \getparameters
+ [\??ARABTEX#1]
+ [\c!voor=,\c!na=,\c!binnen=\setarab,
+ \c!letter=\setarabfont{Arabic\fontstylesuffix}, % evt ArabicRegular
+ #2]%
+ \expandafter\all@wcmd\csname\e!stop#1\endcsname
+ \setvalue{\e!start#1}%
+ {\dodoubleempty\dostartARABTEXalternative[#1]}%
+ \unexpanded\setvalue{#1}##1%
+ {{\initializeARABTEXinternals{#1}\a@RL{##1}}}%
+ \unexpanded\def\RL{\getvalue{#1}}%
+ \unexpanded\def\LR{\a@LR}%
+ \let\R=\RL
+ \let\L=\LR
+ \else
+ \defineARABTEXalternative[arabic]%
+ \fi}
+
+\def\initializeARABTEXinternals#1%
+ {\getvalue{\??ARABTEX#1\c!binnen}%
+ \let \\=\ARABTEXbreakA
+ \let \|=\ARABTEXbreakB
+ \let \cap=\ARABTEXcap
+ \let \sh@ft=\ARABTEXsh@ft
+ \let \b=\ARABTEXb
+ \let \d=\ARABTEXd
+ \let |=\ARABTEXbar
+ \let \,=\ARABTEXcomma
+ \let\protect=\ARABTEXprotect
+ \let\normaltx \tx \def\tx {\normaltx \setarabicfont\fontstylesuffix}%
+ \let\normaltxx\txx\def\txx{\normaltxx\setarabicfont\fontstylesuffix}}
+
+\def\dostartARABTEXalternative[#1][#2]%
+ {\begingroup
+ \getparameters[\??ARABTEX#1][#2]%
+ \ifnum1<0\getvalue{\??ARABTEX#1\c!n}\relax
+ \startkolommen
+ \else
+ \getvalue{\??ARABTEX#1\c!voor}%
+ \fi
+ \initializeARABTEXinternals{#1}%
+ \initializeARABTEXend{#1}%
+ \arabtext
+ \initializeARABTEXalternative{#1}}
+
+\def\initializeARABTEXalternative#1%
+ {\getvalue{\??ARABTEX#1\c!letter}}
+
+\def\initializeARABTEXend#1% \CONTEXT\ does use \end quite differently
+ {\long\def\end##1%
+ {\endarabtext
+ \ifnum1<0\getvalue{\??ARABTEX#1\c!n}\relax
+ \stopkolommen
+ \else
+ \getvalue{\??ARABTEX#1\c!na}%
+ \fi
+ \endgroup}%
+ \let\a@l@end\end
+ \letvalue{\e!stop#1}=\end
+ \long\def\end##1%
+ {\endarabtext
+ \endgroup
+ \if@ignore\global\@ignorefalse\expandafter\ignorespaces\fi}}
+
+%D Arabic verbatim.
+
+\def\typearab{\a@@verb}
+
+%D Some \LATEX\ macros.
+
+\def \makeatletter {\unprotect}
+\def \makeatother {\protect}
+\def \typeout #1{\writestatus{arabtex}{#1}}
+
+%D We have to save some macros.
+
+\let\ARABTEXversion=\empty
+
+\def\startloadingARABTEX% ugly hacks
+ {\catcode`!=12
+ \catcode`?=12
+ \pushmacro\output \let \output \scratchtokens
+ \pushmacro\LaTeX \let \LaTeX \undefined
+ \pushmacro\CJK \let \CJK \undefined
+ \pushmacro\year \let \year \normalyear
+ \pushmacro\month \let \month \normalmonth
+ \pushmacro\day \let \day \normalday
+ \pushmacro\input \def \input ##1 {\normalinput ##1 }
+ \pushmacro\linewidth
+ \pushmacro\datum \def\datum {\toks0}
+ \pushmacro\version \def\version {\toks2}
+ \pushmacro\theversion \let\theversion \ARABTEXversion
+ \pushmacro\emphasize
+ \pushmacro\cap}
+
+\def\stoploadingARABTEX%
+ {\catcode`!=11
+ \catcode`?=11
+ \popmacro\cap
+ \popmacro\emphasize
+ \popmacro\theversion
+ \popmacro\version
+ \popmacro\datum
+ \popmacro\linewidth
+ \popmacro\input
+ \popmacro\day
+ \popmacro\month
+ \popmacro\year
+ \popmacro\CJK
+ \popmacro\LaTeX
+ \popmacro\output}
+
+%D We save some macros:
+
+\startloadingARABTEX
+
+%D When loading \ARABTEX\ we have to set back the~! and~?.
+
+\input arabtex.sty
+
+%D Since \ARABTEX\ has its own \type {\cap}, we save the
+%D new meaning. We also redefine some \PLAIN\ macros, which
+%D happen to have a different meaning in \LATEX.
+
+\let\ARABTEXversion=\theversion
+
+\let\ARABTEXcap=\cap
+
+\def\ARABTEXsh@ft#1%
+ {\dimen@.00#1ex
+ \multiply\dimen@\fontdimen1\font
+ \kern-.0156\dimen@}
+
+\def\ARABTEXd#1%
+ {{\o@lign{\relax#1\crcr\hidewidth\sh@ft{10}%
+ .\hidewidth}}}
+
+\def\ARABTEXb#1%
+ {{\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
+ \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}}
+
+%D A few internals:
+
+\def \ARABTEXcomma {\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
+\def \ARABTEXbreakA {\hfill\break}
+\def \ARABTEXbreakB {\break}
+\edef\ARABTEXbar {\string|}
+\let \ARABTEXprotect \relax
+
+%D Now we can pop the saved macros.
+
+\stoploadingARABTEX
+
+%D Ah, we have to get rid of some \type {\protect} stuff but
+%D to permit testing we add it in the \CONTEXT\ way.
+
+\bgroup
+\catcode`\<=\@other
+\unexpanded\gdef\a@ins%
+ {\ifmmode
+ \expandafter<%
+ \else
+ \leavevmode \bgroup
+ \arab@codes \set@arabfont \@waslafalse \@wasfalse
+ \expandafter\arab@insert
+ \fi}
+\unexpanded\gdef\<{\a@ins}
+\catcode`\<=\active
+\global\let<=\a@ins
+\egroup
+
+%D We also need to register a few macros:
+
+\all@w@ne\initializeARABTEXalternative % one argument, internal command
+\all@wcmd\tx % no argument, small font
+\all@wcmd\txx % no argument, smaller font
+
+%D The main definitions are:
+
+\definefontsynonym [ArabicRegular] [xnsh14]
+\definefontsynonym [ArabicBold] [xnsh14bf]
+
+\defineARABTEXalternative
+ [arabic]
+ [\c!binnen=\setarab,
+ \c!letter=\setarabfont\fontstylesuffix]
+
+\defineARABTEXalternative
+ [farsi]
+ [\c!binnen=\setfarsi,
+ \c!letter=\setarabfont\fontstylesuffix]
+
+\defineARABTEXalternative
+ [urdu]
+ [\c!binnen=\seturdu,
+ \c!letter=\setarabfont\fontstylesuffix]
+
+\defineARABTEXalternative
+ [maghribi]
+ [\c!binnen=\setmaghribi,
+ \c!letter=\setarabfont\fontstylesuffix]
+
+%D Apart from such definitions, one can adapt the settings
+%D using \type {\setupARABTEXalternative}.
+%D
+%D A few years ago at the Holland Festivities, I attended {\em
+%D The Cave}, one of the most impressive combinations of music
+%D and video I know. This composition of Steve Reich (music)
+%D and .. (video) concentrates on the common grounds of arabs
+%D and jews: their ancestor Abram. Listening to the \CDROM's
+%D of {\em The Cave}, provided me the right ambiance for
+%D filling in the details of this module. In {\em The Cave},
+%D interviews, music, and |<|believe it or not|>| rhythmic
+%D typography are the cornerstones. Remembering those big
+%D screens, it strikes me that like music, \TEX\ too is a
+%D perfect instrument to cross cultural and linguistic
+%D borders. So, let's:
+
+\protect
+
+%D those macros,
+
+\endinput
+
+%D and use them!
+
+% \defineconversion [abjad] [\abj@d]
+%
+% voetnoten verbatim lijsten indexen tabellen uitlijnen
+%
+% \v!hoofdstuk=al-fa.slu
+% \v!inhoud=al-mu.htawayAtu
+% \v!figuren=qA'imaTu al-.suwaru
+% \v!tabellen=qA'imaTu al-^gadAwilu
+% \v!grafieken=qA'imaTu al-rusUmu
+% \v!index=al-fihrisu
+% \v!bijlage=al-mul.haqu
diff --git a/tex/context/base/font-ber.tex b/tex/context/base/font-ber.tex
index 74fc271d8..f18bdd868 100644
--- a/tex/context/base/font-ber.tex
+++ b/tex/context/base/font-ber.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=font-ber,
-%D version=1998.4.11,
+%D version=1998.7.16,
%D title=\CONTEXT\ Font Macros,
%D subtitle=Karl Berry Font Names,
%D author=Hans Hagen,
@@ -8,26 +8,34 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\definefontsynonym [Baskerville] [mbvr8a]
-\definefontsynonym [Baskerville-Italic] [mbvri8a]
-\definefontsynonym [Baskerville-Bold] [mbvb8a]
-\definefontsynonym [Baskerville-BoldItalic] [mbvbi8a]
-\definefontsynonym [Baskerville-SemiBold] [mbvs8a]
-\definefontsynonym [Baskerville-SemiBoldItalic] [mbvsi8a]
+\definefontsynonym [Baskerville] [mbvr8t] [encoding=ec]
+\definefontsynonym [Baskerville-Italic] [mbvri8t] [encoding=ec]
+\definefontsynonym [Baskerville-Bold] [mbvb8t] [encoding=ec]
+\definefontsynonym [Baskerville-BoldItalic] [mbvbi8t] [encoding=ec]
+\definefontsynonym [Baskerville-SemiBold] [mbvs8t] [encoding=ec]
+\definefontsynonym [Baskerville-SemiBoldItalic] [mbvsi8t] [encoding=ec]
-\definefontsynonym [Courier] [pcrr]
-\definefontsynonym [Courier-Oblique] [pcrro]
-\definefontsynonym [Helvetica] [phvr]
-\definefontsynonym [Helvetica-Oblique] [phvro]
-\definefontsynonym [Helvetica-Bold] [phvb]
-\definefontsynonym [Helvetica-BoldOblique] [phvbo]
-\definefontsynonym [Times-Roman] [ptmr]
-\definefontsynonym [Times-Italic] [ptmri]
-\definefontsynonym [Times-Bold] [ptmb]
-\definefontsynonym [Times-BoldItalic] [ptmbi]
+\definefontsynonym [Courier] [pcrr8t] [encoding=ec]
+\definefontsynonym [Courier-Bold] [pcrb8t] [encoding=ec]
+\definefontsynonym [Courier-Oblique] [pcrro8t] [encoding=ec]
+\definefontsynonym [Courier-BoldOblique] [pcrbo8t] [encoding=ec]
+
+\definefontsynonym [Helvetica] [phvr8t] [encoding=ec]
+\definefontsynonym [Helvetica-Oblique] [phvro8t] [encoding=ec]
+\definefontsynonym [Helvetica-Bold] [phvb8t] [encoding=ec]
+\definefontsynonym [Helvetica-BoldOblique] [phvbo8t] [encoding=ec]
+
+\definefontsynonym [Times-Roman] [ptmr8t] [encoding=ec]
+\definefontsynonym [Times-Italic] [ptmri8t] [encoding=ec]
+\definefontsynonym [Times-Bold] [ptmb8t] [encoding=ec]
+\definefontsynonym [Times-BoldItalic] [ptmbi8t] [encoding=ec]
+
+\definefontsynonym [AntykwaTorunska-Regular] [zatr8t] [encoding=ec]
+\definefontsynonym [AntykwaTorunska-Italic] [zatri8t] [encoding=ec]
+\definefontsynonym [AntykwaTorunska-Bold] [zatb8t] [encoding=ec]
\definefontsynonym [AvantGarde] [pag]
\definefontsynonym [BookmanLight] [pbk]
diff --git a/tex/context/base/font-chi.tex b/tex/context/base/font-chi.tex
new file mode 100644
index 000000000..25fafaa82
--- /dev/null
+++ b/tex/context/base/font-chi.tex
@@ -0,0 +1,943 @@
+% still to be implemented:
+%
+% - columns left right touch
+% - distance = (hsize-n*bodyfontsize)/(n-1)
+% - char grids
+% - char tables
+% - all kind of rotated combinations
+% - hanging puctuation
+% - a few more encodings
+% - rotation list
+%
+% currently under testing: big5
+%
+% misschien een andere suffix: tux of tuc
+
+%D \module
+%D [ file=font-chi,
+%D version=1999.10.10,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Chinese,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D suggestions=Wang Lei,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Font Macros / Chinese}
+
+%M \stelkorpsin[chi]
+%M
+%M \def\WangLei%
+%M {\purechinese{\uchar{205}{245}\uchar{192}{218}}}
+
+\useencoding[chi]
+
+%D When \WangLei\ sent me a mail asking if \CONTEXT\ was able
+%D to support Chinese, I wasn't sure if the answer could be
+%D yes. I knew that those languages, rich of glyphs, were
+%D typeset by \TEX, so in principle it should be possible. I
+%D asked or some more input and was told that there were
+%D \LATEX\ styles regarding those languages. When I unzipped
+%D the accompanying files, it became clear that I had to
+%D implement support for Chinese from scratch. There was a
+%D multitude of font, with rather unfamiliar encodings, a
+%D large collection of files with |<|at least for me|>|
+%D unknown purposes, and worse, the documentation was mainly
+%D in Chinese.
+%D
+%D So, \WangLei\ and I started exchanging some emails and it
+%D soon became clear that supporting Chinese was not that
+%D complicated at all. It mostly came to dealing with handling
+%D \UNICODE\ fonts. It also became clear that everything
+%D Chinese took place in the upper region of the eight bit
+%D character set. I wrote some macros that could process the
+%D small \type {Hello World} file \WangLei\ had send me, and
+%D after some bug fixes real Chinese came out. I started to
+%D like the look and fel of Chinese glyphs, so on we went.
+%D
+%D The first comments concerned spacing. The mix of English
+%D and Chinese demands some rather deliberate handling of
+%D spacing. Breaking lines was not so much a problem, and
+%D could be solved by adding some glue between Chinese glyphs.
+%D
+%D In the meantime had asked \WangLei\ for some language bound
+%D labels and texts, and implementing these was rather
+%D straightforward. But, there were still some issues to deal
+%D with: conversion of numbers, date handling and index
+%D sorting.
+%D
+%D I consider(ed) writing Chinese support to be a nice puzzle,
+%D since I have to act on chinese \CONTEXT\ code, where I only
+%D understand the \CONTEXT\ part. The drawings \WangLei\ made
+%D me (in drawing packages) were of great help. Since I write
+%D these modules from scratch, although I fall back on some
+%D basic encoding and font modules, I consider them to be
+%D rather clean. This cannot be said of all \CONTEXT\ font
+%D modules \type {-)}.
+
+\unprotect
+
+%D Because Chinese glyphs have more height than the average
+%D Latin glyph, and at the same time don't have much depth,
+%D we adapt the scale.
+%D
+%D Before and after the glyph we have to deal with Chinese
+%D spacing. Special attention is given to punctuation.
+%D
+%D \starttypen
+%D [some short nice chinese text with () and english]
+%D \stoptypen
+%D
+%D We insert a bit of stretch and introduce a signal to
+%D keep track of previous characters.
+
+%D \macros
+%D {chineseunicodescale, chineseinterglyphskip,
+%D chineseunicodeheight, chineseunicodedepth, chinesespace}
+%D
+%D There are a few variables, that can be (re|)|set
+%D depending on the current font. They default to:
+
+\def\chineseunicodescale {1.00} % not smaller than .85
+\def\chineseunicodeheight {1.00}
+\def\chineseunicodedepth {1.00}
+\def\chineseinterglyphskip{0pt plus .05em minus .01em}
+\def\chinesesurroundskip {.25em plus .15em minus .05em}
+
+%D We define a few signals. (Another examples of using
+%D such signals can be found in the module \type {m-units}.)
+
+\newsignal\chineseLsignal % left boundary character
+\newsignal\chineseRsignal % right boundary character
+\newsignal\chineseSsignal % any other character (symbol)
+
+\chardef\chineseBstatus=0 % 0=unknown 1=left 2=right 3=chinese 4=nospace
+\chardef\chineseAstatus=0 % 0=unknown 1=left 2=right 3=space
+\chardef\chineseSstatus=0 % 0=unknown 1=left 2=right
+
+\sfcode`(=2000 % a temporary hack
+
+\def\chinesenobreak%
+ {\relax
+ \iftracechinese
+ \nobreak
+ \kern-.5pt\color[red]{\vrule\!!width1pt}\kern-.5pt
+ \nobreak
+ \else
+ \nobreak
+ \fi}
+
+\newif\ifcorrectchineseboundarychars
+
+\def\chineseunskip%
+ {\unskip\unskip\unskip\unskip}
+
+\def\insertchineseglyph%
+ {\iftracechinese\tracedchineseglyph\else\insertunicodeglyph\fi}
+
+\newif\ifverticalchinese
+
+\def\handlechineseunicodeglyph%
+ {\ifinpagebody
+ \horizontalchineseunicodeglyph
+ \else\ifverticalchinese
+ \verticalchineseunicodeglyph
+ \else
+ \horizontalchineseunicodeglyph
+ \fi\fi}
+
+% This is a previous, very encoding specific, attempt. The
+% current implementation is more versatile.
+%
+% \starttypen
+% \def\chineseleftglyph {\chardef\chineseSstatus=1 }
+% \def\chineserightglyph {\chardef\chineseSstatus=2 }
+% \def\chinesecenterglyph {\chardef\chineseSstatus=3 }
+%
+% \def\analyzechineseunicodeglyph%
+% {% left
+% \ifnum\unicodeposition=161174 \chineseleftglyph \else
+% \ifnum\unicodeposition=161176 \chineseleftglyph \else
+% \ifnum\unicodeposition=161178 \chineseleftglyph \else
+% \ifnum\unicodeposition=161180 \chineseleftglyph \else
+% \ifnum\unicodeposition=161182 \chineseleftglyph \else
+% \ifnum\unicodeposition=161184 \chineseleftglyph \else
+% \ifnum\unicodeposition=161186 \chineseleftglyph \else
+% \ifnum\unicodeposition=161188 \chineseleftglyph \else
+% \ifnum\unicodeposition=161190 \chineseleftglyph \else
+% \ifnum\unicodeposition=163168 \chineseleftglyph \else
+% \ifnum\unicodeposition=163219 \chineseleftglyph \else
+% \ifnum\unicodeposition=163224 \chineseleftglyph \else
+% \ifnum\unicodeposition=163251 \chineseleftglyph \else
+% % right
+% \ifnum\unicodeposition=161162 \chineserightglyph \else
+% \ifnum\unicodeposition=161163 \chineserightglyph \else
+% \ifnum\unicodeposition=161175 \chineserightglyph \else
+% \ifnum\unicodeposition=161177 \chineserightglyph \else
+% \ifnum\unicodeposition=161179 \chineserightglyph \else
+% \ifnum\unicodeposition=161181 \chineserightglyph \else
+% \ifnum\unicodeposition=161183 \chineserightglyph \else
+% \ifnum\unicodeposition=161185 \chineserightglyph \else
+% \ifnum\unicodeposition=161187 \chineserightglyph \else
+% \ifnum\unicodeposition=161189 \chineserightglyph \else
+% \ifnum\unicodeposition=161191 \chineserightglyph \else
+% \ifnum\unicodeposition=161227 \chineserightglyph \else
+% \ifnum\unicodeposition=161228 \chineserightglyph \else
+% \ifnum\unicodeposition=161229 \chineserightglyph \else
+% \ifnum\unicodeposition=163161 \chineserightglyph \else
+% \ifnum\unicodeposition=163162 \chineserightglyph \else
+% \ifnum\unicodeposition=163167 \chineserightglyph \else
+% \ifnum\unicodeposition=163169 \chineserightglyph \else
+% \ifnum\unicodeposition=163172 \chineserightglyph \else
+% \ifnum\unicodeposition=163174 \chineserightglyph \else
+% \ifnum\unicodeposition=163186 \chineserightglyph \else
+% \ifnum\unicodeposition=163187 \chineserightglyph \else
+% \ifnum\unicodeposition=163191 \chineserightglyph \else
+% \ifnum\unicodeposition=163221 \chineserightglyph \else
+% \ifnum\unicodeposition=163253 \chineserightglyph \else
+% % center
+% \ifnum\unicodeposition=161164 \chinesecenterglyph \else
+% \ifnum\unicodeposition=161167 \chinesecenterglyph \else
+% \ifnum\unicodeposition=161173 \chinesecenterglyph \else
+% \ifnum\unicodeposition=163190 \chinesecenterglyph \else
+% % unknown
+% \chardef\chineseSstatus=0
+% \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi
+% \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi}
+% \stoptypen
+%
+% chinese classes: left=1|right=2|center=3
+
+\def\analyzechineseunicodeglyph%
+ {\chardef\chineseSstatus=0\getvalue{uc\the\unicodeposition}\relax}
+
+\def\analyzechineseunicodeenviroment%
+ {% left
+ \ifx (\nextglyph \chardef\chineseAstatus=1 \else
+ \ifx [\nextglyph \chardef\chineseAstatus=1 \else
+ % right
+ \ifx ,\nextglyph \chardef\chineseAstatus=2 \else
+ \ifx .\nextglyph \chardef\chineseAstatus=2 \else
+ \ifx ?\nextglyph \chardef\chineseAstatus=2 \else
+ \ifx ;\nextglyph \chardef\chineseAstatus=2 \else
+ \ifx :\nextglyph \chardef\chineseAstatus=2 \else
+ \ifx !\nextglyph \chardef\chineseAstatus=2 \else
+ \ifx )\nextglyph \chardef\chineseAstatus=2 \else
+ \ifx ]\nextglyph \chardef\chineseAstatus=2 \else
+ % space
+ \ifx\nextglyph\blankspace \chardef\chineseAstatus=3 \else
+ \ifx\nextglyph\space \chardef\chineseAstatus=3 \else
+ \chardef\chineseAstatus=0
+ % unknown
+ \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi
+ % maybe save the last skip?
+ \chardef\chineseBstatus=\ifdim\lastskip=\!!zeropoint 4 \else0 \fi
+ \ifdim\lastskip=\chineseLsignal \chardef\chineseBstatus=1 \else
+ \ifdim\lastskip=\chineseRsignal \chardef\chineseBstatus=2 \else
+ \ifdim\lastskip=\chineseSsignal \chardef\chineseBstatus=3 \else
+ \scratchskip=\lastskip \unskip
+ \ifdim\lastskip=\chineseLsignal \chardef\chineseBstatus=1 \else
+ \ifdim\lastskip=\chineseRsignal \chardef\chineseBstatus=2 \else
+ \ifdim\lastskip=\chineseSsignal \chardef\chineseBstatus=3 \else
+ \space\scratchskip=\lastskip \unskip
+ \setbox\scratchbox=\hbox\bgroup
+ (\space
+ \ifdim\lastskip=\scratchskip
+ \egroup \chardef\chineseBstatus=1
+ \else
+ \egroup
+ \ifdim\scratchskip=\!!zeropoint \chardef\chineseBstatus=4 \fi
+ \fi
+ \fi\fi\fi
+ \fi\fi\fi}
+
+\def\horizontalchineseunicodeglyph
+ {\relax
+ \ifprocessingverbatim
+ \insertunicodeglyph
+ \else
+ \ifhmode\else\dontleavehmode\fi % added
+ \setunicodescale\chineseunicodescale
+ \setunicodestrut\chineseunicodeheight\chineseunicodedepth
+ \analyzechineseunicodeglyph
+ \analyzechineseunicodeenviroment
+ \ifcase\chineseSstatus\relax
+ \ifcase\chineseBstatus\relax
+ \chineseunskip
+ \hskip\chinesesurroundskip % unknown
+ \or
+ \chineseunskip
+ \chinesenobreak % left
+ \or
+ \ifcorrectchineseboundarychars\else\chineseunskip\fi
+ \hskip\chineseinterglyphskip % right
+ \or
+ \chineseunskip
+ \hskip\chineseinterglyphskip % chinese
+ \or
+ % whatever
+ \fi
+ \insertchineseglyph
+ \ifcase\chineseAstatus\relax
+ \hskip\chineseinterglyphskip % unknown
+ \hskip\chinesesurroundskip
+ \ifcase\chineseSstatus
+ \hskip\chineseSsignal
+ \or
+ \hskip\chineseLsignal
+ \else
+ \hskip\chineseRsignal
+ \fi
+ \or
+ \hskip\chineseinterglyphskip % left
+ \chinesenobreak
+ \hskip\chineseLsignal
+ \or
+ \chinesenobreak % right
+ \hskip\chineseinterglyphskip
+ \chinesenobreak
+ \hskip\chineseRsignal
+ \or
+ \hskip\chineseinterglyphskip % space
+ \hskip\chinesesurroundskip
+ \hskip\chineseSsignal
+ \fi
+ \or % left
+ \ifcorrectchineseboundarychars
+ \let\unicodecharcommand\chineseleftcharcommand
+ \fi
+ \chineseunskip
+ \insertchineseglyph
+ \chinesenobreak
+ \hskip\chineseLsignal
+ \or % right
+ \ifcorrectchineseboundarychars
+ \let\unicodecharcommand\chineserightcharcommand
+ \fi
+ \chineseunskip
+ \chinesenobreak
+ \insertchineseglyph
+ \hskip\chineseRsignal
+ \else % center
+ \chineseunskip
+ \chinesenobreak
+ \insertchineseglyph
+ \hskip\chineseinterglyphskip
+ \hskip\chineseRsignal
+ \fi
+ \aftergroup\ignorespaces % watch this
+ \fi}
+
+\def\verticalchineseunicodeglyph%
+ {\relax
+ \ifprocessingverbatim
+ \insertunicodeglyph
+ \else
+ \setunicodescale\chineseunicodescale
+ \setunicodestrut\chineseunicodeheight\chineseunicodedepth
+ \analyzechineseunicodeglyph
+ \setbox\scratchbox=\hbox to \hsize
+ {\hss
+ \ifcase\chineseSstatus\relax
+ \insertchineseglyph
+ \else % left / right
+ \setbox\scratchbox=\hbox{\insertchineseglyph}%
+ \rotate[\c!rotatie=270]{\box\scratchbox}%
+ \fi
+ \hss}%
+ \ht\scratchbox=\unicodeheight\ht\strutbox
+ \dp\scratchbox=\unicodedepth \dp\strutbox
+ \nointerlineskip
+ \ifcase\prevchineseSstatus\relax
+ \ifnum\chineseSstatus=2\nobreak\else\allowbreak\fi
+ \or % left
+ \nobreak
+ \or % right
+ \ifnum\chineseSstatus=2\nobreak\else\allowbreak\fi
+ \fi
+ \global\chardef\prevchineseSstatus=\chineseSstatus % pagebody ...
+ \box\scratchbox
+ \aftergroup\ignorespaces % watch this
+ \fi}
+
+%D \macros
+%D {setupchinese,startvertical,nochinese}
+%D
+%D The previous macros implement horizontal as well as
+%D vertical typesetting. Vertical typesetting is implemented
+%D on top of the multi||column routines.
+
+\def\setupchinese%
+ {\dodoubleargument\getparameters[\??vt]}
+
+\def\startvertical%
+ {\dosingleempty\dostartvertical}
+
+\def\dostartvertical[#1]%
+ {\bgroup
+ \def\maxnofcolumns{25}%
+ \verticalchinesetrue
+ \global\chardef\prevchineseSstatus=0
+ \let\nochinese=\nochineseinvertical
+ \startkolommen
+ [\c!richting=\@@vtrichting,
+ \c!balanceren=\@@vtbalanceren,
+ \c!afstand=\@@vtafstand,
+ \c!n=\@@vtn,
+ #1]}
+
+\def\stopvertical%
+ {\stopkolommen
+ \egroup}
+
+\setupchinese
+ [\c!richting=\v!links,
+ \c!balanceren=\v!nee,
+ \c!n=12,
+ \c!afstand=1.5\bodyfontsize]
+
+%D We can set up vertical typesetting with \type
+%D {\setupchinese}.
+
+%D \macros
+%D {nochineseinvertical}
+%D
+%D English (non chinese) text is typeset rotated:
+
+\def\nochineseinvertical#1%
+ {\par
+ \setbox\scratchbox=\hbox{\strut#1}
+ \getnoflines{\wd\scratchbox}
+ \setbox\scratchbox=\hbox to \noflines\openlineheight
+ {\hss\box\scratchbox\hss}
+ \hbox to \hsize
+ {\hss
+ \rotate
+ [\c!rotatie=270]
+ {\vbox to \ht\scratchbox{\vss\box\scratchbox\vss}}%
+ \hss}
+ \par}
+
+%D \macros
+%D {correctchineseboundarychars}
+%D
+%D Careful reading of the previous macro learns that we
+%D treat left and right glyphs differently. When we say
+%D
+%D \starttypen
+%D \correctchineseboundarycharstrue
+%D \stoptypen
+%D
+%D For the moment correction in on by default.
+
+\correctchineseboundarycharstrue
+
+\def\chineserightcharcommand#1%
+ {\iftracechinese\ruledhbox\else\hbox\fi \!!to .5em{#1\hss}%
+ \hskip.25em\!!plus .25em\relax}%
+
+\def\chineseleftcharcommand#1%
+ {\ifnum\chineseBstatus<4 \hskip.25em \!!plus .25em\relax\fi
+ \iftracechinese\ruledhbox\else\hbox\fi \!!to .5em{\hss#1}}%
+
+% \def\chineserightcharcommand#1%
+% {\setbox\scratchbox=\hbox{#1}%
+% \scratchdimen=.5em
+% \ifdim\wd\scratchbox>\scratchdimen
+% \iftracechinese\ruledhbox\else\hbox\fi \!!to \scratchdimen
+% {\box\scratchbox\hss}%
+% \hskip.5\scratchdimen\!!plus.5\scratchdimen\relax
+% \else
+% \box\scratchbox
+% \fi}
+
+% \def\chineseleftcharcommand#1%
+% {\setbox\scratchbox=\hbox{#1}%
+% \scratchdimen=.5em
+% \ifdim\wd\scratchbox>\scratchdimen
+% \ifnum\chineseBstatus<4
+% \hskip.5\scratchdimen\!!plus.5\scratchdimen\relax
+% \fi
+% \iftracechinese\ruledhbox\else\hbox\fi \!!to \scratchdimen
+% {\hss\box\scratchbox}%
+% \else
+% \box\scratchbox
+% \fi}
+
+%D The long list of numbers in the previous macro identify the
+%D characters where special care is needed for breaking lines.
+%D A linebreak is not permitted before:
+%D
+%D \def\DoIt #1 #2 %
+%D {\hbox{\hbox to 2em{\uchar{#1}{#2}\hss}#1 #2}\par}
+%D
+%D \startcolumns[n=5]
+%D \DoIt 161 162 \DoIt 161 163 \DoIt 161 164 \DoIt 161 167 \DoIt 161 173
+%D \DoIt 161 175 \DoIt 161 177 \DoIt 161 179 \DoIt 161 181 \DoIt 161 183
+%D \DoIt 161 185 \DoIt 161 187 \DoIt 161 189 \DoIt 161 191 \DoIt 161 227
+%D \DoIt 161 228 \DoIt 161 229 \DoIt 163 161 \DoIt 163 162 \DoIt 163 167
+%D \DoIt 163 169 \DoIt 163 172 \DoIt 163 174 \DoIt 163 186 \DoIt 163 187
+%D \DoIt 163 190 \DoIt 163 191 \DoIt 163 221 \DoIt 163 253
+%D \stopcolumns
+%D
+%D A linebreak is not permitted after the following glyphs:
+%D
+%D \startcolumns[n=5]
+%D \DoIt 161 174 \DoIt 161 176 \DoIt 161 178 \DoIt 161 180 \DoIt 161 182
+%D \DoIt 161 184 \DoIt 161 186 \DoIt 161 188 \DoIt 161 190 \DoIt 163 168
+%D \DoIt 163 219 \DoIt 163 224 \DoIt 163 251
+%D \stopcolumns
+
+%D \macros
+%D {tracechinesetrue, showchinesetracelegend}
+%D
+%D When we say \type {\tracechinesetrue}, we get some
+%D insight in the way \CONTEXT\ handles the Chinese glyphs.
+%D The symbols and color used represent:
+%D
+%D \showchinesetracelegend
+
+\newif\iftracechinese
+
+\def\showchinesetracelegend%
+ {\starttabulate[|c|l|l|l|]
+ \HL \NC \bf key \NC \bf meaning \NC \bf glyph \NC \bf keys \NC \NR \HL
+ \NC u \NC unknown character type \NC \color[green]{current} \NC u l r \NC\NR
+ \NC l \NC left boundary character \NC \color[red]{previous} \NC u l r c n \NC\NR
+ \NC r \NC right boundary character \NC \color[blue]{next} \NC u l r s \NC\NR
+ \NC c \NC chinese character \NC \NC \NC\NR
+ \NC s \NC following space \NC \NC \NC\NR
+ \NC n \NC no preceding space \NC \NC \NC\NR \HL
+ \stoptabulate}
+
+\def\tracedchineseglyph%
+ {\leavevmode
+ \ruledhbox
+ {\setbox\scratchbox=\hbox{\insertunicodeglyph}%
+ \hbox to \wd\scratchbox
+ {\localcolortrue
+ \copy\scratchbox
+ \infofont
+ \hskip-\wd\scratchbox
+ \hbox to \wd\scratchbox
+ {\hss
+ \color[green]
+ {\ifcase\chineseSstatus\relax u\or l\or r\fi}%
+ \hss}%
+ \hskip-\wd\scratchbox
+ \lower\dp\scratchbox\hbox to \wd\scratchbox
+ {\hss
+ \color[red]
+ {\ifcase\chineseBstatus\relax u\or l\or r\or c\or n\fi}%
+ \hss
+ \color[blue]
+ {\ifcase\chineseAstatus\relax u\or l\or r\or s\fi}%
+ \hss}}}}
+
+%D The following example shows how tracing works.
+%D
+%D \start \tracechinesetrue
+%D ÔÚÕâÒ»´Î¸üÐÂÖÐÎÒÃǽ«½éÉܶÔÖÐÎĵÄÖ§³Ö¡£µ±±¾ÎĵÄÖÐÎÄÒëÕßÍõÀÚ
+%D ѯÎÊÎÒ \nochinese{\CONTEXT} ÊÇ·ñÄÜ´¦ÀíººÓïʱ£¬ËûÒѾ­³¢ÊÔ¹ý
+%D ÔËÐÐÏÖÓеĺ꼯£¬µ«ÊÇûÓеõ½½á¹û¡£ÕâÒâζ×ŶÔÖÐÎĵÄÖ§³Ö»¹Ã»
+%D ÓÐʵÏÖ¡£
+%D
+%D ÔÚÕâÒ»(´Î¸üÐÂ)ÖÐÎÒÃÇ (½«½é) ÉܶÔÖÐÎĵÄÖ§³Ö¡£µ±±¾ÎĵÄÖÐÎÄÒë,
+%D ÕßÍõÀÚѯÎÊÎÒ\nochinese{\CONTEXT}ÊÇ·ñÄÜ´¦ÀíººÓïʱ£¬ËûÒѾ­³¢
+%D ÊÔ¹ýÔËÐÐÏÖÓеĺ꼯£¬µ«ÊÇûÓеõ½½á¹û¡£ÕâÒâζ×ŶÔÖÐÎĵÄÖ§³Ö
+%D »¹Ã»ÓÐʵÏÖ¡£.
+%D \stop
+
+%D Because fonts are defined each time a \UNICODE\ is
+%D encountered |<|which is less inefficient than one would
+%D imagine, because \TEX\ is optimized quite well in this
+%D repect|>| we can define macros like this to take care of
+%D font switches. When available, one can add definitions
+%D for italic, slanted, bold fonts and combinations of these.
+
+%D \macros
+%D {chinesenumber}
+%D
+%D The chinese numbering systems rather straightforward. First
+%D there are the digits:
+%D
+%D \starttabulatie[|c|c|c|c|c|c|c|c|c|c|]
+%D \NC 0 \NC 1 \NC 2 \NC 3 \NC 4 \NC 5 \NC 6 \NC 7 \NC 8 \NC 9 \NC\NR
+%D \NC \chinesenumber{0} \NC \chinesenumber{1} \NC \chinesenumber{2}
+%D \NC \chinesenumber{3} \NC \chinesenumber{4} \NC \chinesenumber{5}
+%D \NC \chinesenumber{6} \NC \chinesenumber{7} \NC \chinesenumber{8}
+%D \NC \chinesenumber{9} \NC\NR
+%D \stoptabulatie
+%D
+%D Apart from these numbers, we have dedicated representations
+%D of some powers of~$10$.
+%D
+%D \starttabulatie[|c|c|c|c|c|]
+%D \NC 10 \NC 100 \NC 1000 \NC 10000 \NC 100000000 \NC\NR
+%D \NC \chinesenumber{10} \NC \chinesenumber{100}
+%D \NC \chinesenumber{1000} \NC \chinesenumber{10000}
+%D \NC \chinesenumber{100000000} \NC\NR
+%D \stoptabulatie
+%D
+%D The number~12 is a combination of $1\times10+2$, or:
+%D \chinesenumber {12}, while~22 becomes \chinesenumber {22}.
+%D The numbers below 20 are treated a bit different, just like
+%D numbers with series of $0$'s. So $2\times10$ comes out as
+%D two glyphs, but $1\times10$ as one, because in the latter
+%D case the~$1$ is redundant. The same is true for the powers
+%D of~10.
+%D
+%D \starttabulatie[|r|r|r|r|r|r|]
+%D \NC 1 \NC \chinesenumber {1} \NC
+%D 9 \NC \chinesenumber {9} \NC
+%D 4 \NC \chinesenumber {4} \NC\NR
+%D \NC 11 \NC \chinesenumber {11} \NC
+%D 99 \NC \chinesenumber {99} \NC
+%D 16 \NC \chinesenumber {16} \NC\NR
+%D \NC 111 \NC \chinesenumber {111} \NC
+%D 999 \NC \chinesenumber {999} \NC
+%D 256 \NC \chinesenumber {256} \NC\NR
+%D \NC 1111 \NC \chinesenumber {1111} \NC
+%D 9999 \NC \chinesenumber {9999} \NC
+%D 65536 \NC \chinesenumber {65536} \NC\NR
+%D \stoptabulatie
+%D
+%D The implementation is rather simple. For internal purposes,
+%D we let zero expand to~0. The digits $0-9$ and numbers $10$,
+%D $100$, $1000$, $10000$ and $100000000$ are hard coded.
+
+% This was the first implementation, before \WangLei\ asked
+% me to look into Big Five encoding, so, like everthing in
+% \TEX, things become a bit more complicated, but also more
+% versatile.
+%
+% \starttypen
+% \def\chinesedigit#1%
+% {\ifnum #1=100000000 \uchar{210}{218}% 100000000
+% \else\ifnum #1=10000 \uchar{205}{242}% 10000
+% \else\ifnum #1=1000 \uchar{199}{167}% 1000
+% \else\ifnum #1=100 \uchar{176}{217}% 100
+% \else\ifnum #1=10 \uchar{202}{174}% 10
+% \else\ifcase#1 \uchar{193}{227}% 0
+% \or \uchar{210}{187}% 1
+% \or \uchar{182}{254}% 2
+% \or \uchar{200}{253}% 3
+% \or \uchar{203}{196}% 4
+% \or \uchar{206}{229}% 5
+% \or \uchar{193}{249}% 6
+% \or \uchar{198}{223}% 7
+% \or \uchar{176}{203}% 8
+% \or \uchar{190}{197}% 9
+% \fi\fi\fi\fi\fi\fi}
+% \stoptypen
+
+\def\chinesedigit#1%
+ {\udigit{\chineseencoding}{\number#1}}
+
+\def\chinesenumber#1%
+ {\expandafter\dochinesenumber\number#1\relax}
+
+\def\dochinesenumber#1#2\relax
+ {\ifnum#1#2<10 % 1-10
+ \chinesedigit{#1}%
+ \else\ifnum#1#2<20 % 11-99
+ \chinesedigit{10}%
+ \dodochinesenumberA#2\relax
+ \else
+ \dodochinesenumber#1#2\relax
+ \fi\fi}
+
+\def\dodochinesenumber#1#2\relax
+ {\ifnum#1=0
+ \chinesedigit{0}%
+ \dododochinesenumber0#2\relax
+ \else\ifnum#1#2<10 % 1-10
+ \chinesedigit{#1#2}%
+ \dodochinesenumberA#2\relax
+ \else\ifnum#1#2<100 % 11-99
+ \dodochinesenumber#1\relax
+ \chinesedigit{10}%
+ \dodochinesenumberA#2\relax
+ \else\ifnum#1#2<1000 % 100-999
+ \dodochinesenumber#1\relax
+ \chinesedigit{100}%
+ \dodochinesenumberA#2\relax
+ \else\ifnum#1#2<10000 % 1000-9999
+ \dodochinesenumber#1\relax
+ \chinesedigit{1000}%
+ \dodochinesenumberA#2\relax
+ \else\ifnum#1#2<100000 % 10000-99999
+ \dodochinesenumber#1\relax
+ \chinesedigit{10000}%
+ \dodochinesenumberA#2\relax
+ \else\ifnum#1#2<1000000 % 100000-999999
+ \dodochinesenumberB#1#2\relax
+ \else\ifnum#1#2<10000000 % 1000000-9999999
+ \dodochinesenumberC#1#2\relax
+ \else\ifnum#1#2<100000000 % 10000000-99999999
+ \dodochinesenumberD#1#2\relax
+ \else\ifnum#1#2<1000000000 % 10000000-99999999
+ \dochinesenumber#1\relax
+ \chinesedigit{100000000}%
+ \dododochinesenumber#2\relax
+ \else
+ \dodochinesenumberE#1#2\relax
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+\def\dododochinesenumber#1#2\relax
+ {\ifnum#1=0
+ \ifnum0#2>0 \dododochinesenumber#2\relax \fi
+ \else
+ \dodochinesenumber#1#2\relax
+ \fi}
+
+\def\dodochinesenumberA#1\relax
+ {\ifcase0#1 \else\dodochinesenumber#1\relax\fi}
+
+\def\dodochinesenumberB#1#2#3\relax
+ {\dochinesenumber#1#2\relax
+ \chinesedigit{10000}%
+ \dododochinesenumber#3\relax}
+
+\def\dodochinesenumberC#1#2#3#4\relax
+ {\dochinesenumber#1#2#3\relax
+ \chinesedigit{10000}%
+ \dododochinesenumber#4\relax}
+
+\def\dodochinesenumberD#1#2#3#4#5\relax
+ {\dochinesenumber#1#2#3#4\relax
+ \chinesedigit{10000}%
+ \dododochinesenumber#5\relax}
+
+\def\dodochinesenumberE#1#2#3\relax
+ {\dochinesenumber#1#2\relax
+ \chinesedigit{100000000}%
+ \dododochinesenumber#3\relax}
+
+%D The next gtable demonstates the correctness of the
+%D conversion macro.
+%D
+%D \starybuffer
+%D \starttable[|l|l|l|l|l|l|]
+%D \HL
+%D \NC number \NC converter \NC hard coded \NC
+%D number \NC converter \NC hard coded\NC \SR
+%D \HL
+%D \NC 1 \NC \chinesenumber{1} \NC Ò» \NC
+%D 0 \NC \chinesenumber{0} \NC Áã \NC\FR
+%D \NC 11 \NC \chinesenumber{11} \NC ʮһ \NC
+%D 10 \NC \chinesenumber{10} \NC Ê® \NC\MR
+%D \NC 111 \NC \chinesenumber{111} \NC Ò»°Ùһʮһ \NC
+%D 100 \NC \chinesenumber{100} \NC Ò»°Ù \NC\MR
+%D \NC 101 \NC \chinesenumber{101} \NC Ò»°ÙÁãÒ» \NC
+%D 120 \NC \chinesenumber{120} \NC Ò»°Ù¶þÊ® \NC\MR
+%D \NC 1111 \NC \chinesenumber{1111} \NC һǧһ°Ùһʮһ \NC
+%D 1000 \NC \chinesenumber{1000} \NC һǧ \NC\MR
+%D \NC 1001 \NC \chinesenumber{1001} \NC һǧÁãÒ» \NC
+%D 1020 \NC \chinesenumber{1020} \NC һǧÁã¶þÊ® \NC\MR
+%D \NC 11111 \NC \chinesenumber{11111} \NC Ò»Íòһǧһ°Ùһʮһ \NC
+%D 10000 \NC \chinesenumber{10000} \NC Ò»Íò \NC\MR
+%D \NC 10001 \NC \chinesenumber{10001} \NC Ò»ÍòÁãÒ» \NC
+%D 10200 \NC \chinesenumber{10200} \NC Ò»ÍòÁã¶þ°Ù \NC\LR
+%D \HL
+%D \NC 111111 \NC \chinesenumber{111111} \NC ʮһÍòһǧһ°Ùһʮһ \NC
+%D 100000 \NC \chinesenumber{100000} \NC Ê®Íò \NC\FR
+%D \NC 1111111 \NC \chinesenumber{1111111} \NC Ò»°ÙһʮһÍòһǧһ°Ùһʮһ \NC
+%D 1000000 \NC \chinesenumber{1000000} \NC Ò»°ÙÍò \NC\MR
+%D \NC 11111111 \NC \chinesenumber{11111111} \NC һǧһ°ÙһʮһÍòһǧһ°Ùһʮһ \NC
+%D 10000000 \NC \chinesenumber{10000000} \NC һǧÍò \NC\MR
+%D \NC 111111111 \NC \chinesenumber{111111111} \NC Ò»ÒÚһǧһ°ÙһʮһÍòһǧһ°Ùһʮһ \NC
+%D 100000000 \NC \chinesenumber{100000000} \NC Ò»ÒÚ \NC\MR
+%D \NC 1111111111 \NC \chinesenumber{1111111111} \NC ʮһÒÚһǧһ°ÙһʮһÍòһǧһ°Ùһʮһ \NC
+%D 1000000000 \NC \chinesenumber{1000000000} \NC Ê®ÒÚ \NC\LR
+%D \HL
+%D \stoptable
+%D \stopbuffer
+%D
+%D \plaatstabel{Some Chinese number examples.}{\getbuffer}
+
+%D Although the conversion can be hooked into most commands
+%D that deal with numbers |<|those familiar with \TEX\ macro
+%D programming will notice that the macro if fully
+%D expandable|>| in many cases Chinese documents use western
+%D digits. So, in practice, the change that the next example
+%D shows up, is minimal.
+%D
+%D \starttabulatie[|r|r|c|]
+%D \NC 2546 \NC \chinesenumber {2546} \NC \NC\NR
+%D \NC 9258 \NC \chinesenumber {9258} \NC $+$ \NC\NR
+%D \HL
+%D \NC 11804 \NC \chinesenumber {11804} \NC \NC\NR
+%D \stoptabulatie
+%D
+%D While in arabic arithmics addition leads to more digits, in
+%D Chinese the number of glyphs can (temporary) decrease.
+%D Given that the number of people dealing with Chinese is
+%D considerably larger than the number of latin speaking
+%D people, a successor of \TEX\ definitely must provide a
+%D \type {\chinesenumeral} primitive.
+
+\defineconversion[c] [\chinesenumber]
+\defineconversion[chinese][\chinesenumber]
+
+%D \macros
+%D {SimChi, TraChi}
+%D
+%D These components enable us to construct dedicated Chinese
+%D font switches, like:
+
+\setupunicodefont
+ [chinese]
+ [ \c!schaal=\chineseunicodescale,
+ \c!hoogte=\chineseunicodeheight,
+ \c!diepte=\chineseunicodedepth,
+ \c!conversie=\chinesenumber,
+ \c!commandos=\setchineseencoding, % needed for digits
+ \c!commando=\handlechineseunicodeglyph]
+
+\defineunicodefont [SimChi] [SimplifiedChinese] [chinese]
+\defineunicodefont [TraChi] [TraditionalChinese] [chinese]
+
+%D For the moment, this encoding is implemented rather ugly. The
+%D trick is to move the encoding value from the current font
+%D definition to the \type {\chineseencoding} macro.
+
+\def\setchineseencoding% normally SomeChineseRegular
+ {\getfontfileparameters\unicodestyle
+ \ifx\currentfontfileencoding\undefined \else
+ \let\chineseencoding\currentfontfileencoding
+ \fi}
+
+%D We could have said:
+%D
+%D \starttypen
+%D \defineunicodefont
+%D [SimChi]
+%D [SimplifiedChinese]
+%D [ \c!schaal=\chineseunicodescale,
+%D \c!hoogte=\chineseunicodeheight,
+%D \c!diepte=\chineseunicodedepth,
+%D \c!conversie=\chinesenumber,
+%D \c!commandos=\setchineseencoding, % needed for digits
+%D \c!commando=\handlechineseunicodeglyph]
+%D \stoptypen
+%D
+%D However, the former definitions is more general. Next we
+%D map a few fonts:
+
+\definefontsynonym [SimplifiedChineseRegular] [gbsong] [encoding=gbk]
+\definefontsynonym [SimplifiedChineseSlanted] [gbsongsl] [encoding=gbk]
+\definefontsynonym [SimplifiedChineseItalic] [gbsongsl] [encoding=gbk]
+\definefontsynonym [SimplifiedChineseBold] [gbhei] [encoding=gbk]
+\definefontsynonym [SimplifiedChineseBoldSlanted] [gbheisl] [encoding=gbk]
+\definefontsynonym [SimplifiedChineseBoldItalic] [gbheisl] [encoding=gbk]
+
+% Yet to be defined:
+
+\definefontsynonym [TraditionalChineseRegular] [b5ming] [encoding=big5]
+\definefontsynonym [TraditionalChineseSlanted] [b5mingsl] [encoding=big5]
+\definefontsynonym [TraditionalChineseItalic] [b5mingsl] [encoding=big5]
+\definefontsynonym [TraditionalChineseBold] [b5hei] [encoding=big5]
+\definefontsynonym [TraditionalChineseBoldSlanted] [b5heisl] [encoding=big5]
+\definefontsynonym [TraditionalChineseBoldItalic] [b5heisl] [encoding=big5]
+
+%D We default to these so called Simplified Chinese fonts.
+
+\SimChi
+
+%D \macros
+%D {purechinese}
+%D
+%D Use this macro to suppress spacing around Chinese text.
+
+\def\purechinese#1% evt geen rek
+ {\hskip\chineseSsignal\relax
+ #1\unskip\unskip\unskip
+ \hskip\chineseSsignal\relax}
+
+%D \macros
+%D {stillchinese}
+%D
+%D Use the next macro when you want the next item to be put
+%D tight to the previous chinese character.
+
+\def\stillchinese%
+ {\hskip\chineseSsignal\relax}
+
+%D \macros
+%D {nochinese}
+%D
+%D When we want to be sure of non||Chinese inline text,
+%D we can package the for instance english text in \type
+%D {\nochinese}.
+
+\def\nochinese#1%
+ {\unskip\unskip\unskip
+ \hskip\chinesesurroundskip
+ \hskip\chineseinterglyphskip\relax
+ #1%
+ \hskip\chineseinterglyphskip\relax
+ \hskip\chinesesurroundskip
+ \ignorespaces}
+
+%D Now it's time for some real Chinese. This example
+%D also shows that font switching is supported.
+%D
+%D \startnarrower
+%D \midalligned{\bfb Ë®µ÷¸èÍ·}
+%D \blank
+%D \midaligned{\sl ±û³½ÖÐÇ»¶Òû´ïµ©£¬´ó×í×÷´Ëƪ£¬¼æ»³×ÓÓÉ¡£}
+%D \blank
+%D \midaligned{\bs ËÕéø}
+%D \blank
+%D Ã÷Ô¼¸Ê±ÓУ¿°Ñ¾ÆÎÊÇàÌì¡£²»ÖªÌìÉϹ¬ãÚ£¬½ñϦÊǺÎÄꣿÎÒÓû³Ë·ç¹éÈ¥
+%D £¬ÓÖ¿ÖÇíÂ¥ÓñÓ¸ß´¦²»Ê¤º®¡£ÆðÎèŪÇåÓ°£¬ºÎËÆÔÚÈ˼䣿
+%D \blank
+%D תÖì¸ó£¬µÍ»§£¬ÕÕÎÞÃß¡£²»Ó¦Óкޣ¬ºÎÊÂÆ«Ïò±ðʱԲ£¿ÈËÓб¯»¶ÀëºÏ£¬
+%D ÔÂÓÐÒõÇçԲȱ£¬´ËʹÅÄÑÈ«¡£µ«Ô¸È˳¤¾Ã£¬Ç§Àﹲ濾ꡣ
+%D \stopnarrower
+%D
+%D The english translation is:
+%D
+%D \startnarrower
+%D \midaligned{\slb Tune: Prelude to the Melody of Water}
+%D \blank
+%D \midaligned{\sl On the night of the Mid||Autumn Festival of
+%D 1076, I drank happily till dawn and wrote this in my cups
+%D while thinking of Zi||you.}
+%D \blank
+%D \midaligned{\bf Su Shi}
+%D \blank
+%D How long will the bright moon appear? Wine||cup in hand, I
+%D ask the sky. I do not know waht time of year it would be
+%D tonight in the palace on high. Riding the wind, there I
+%D would fly, yet I fear the crystal palace would be far too
+%D high and cold for me. I rise and dance, with my shadow I
+%D play. On high as on earth, would it be as gay?
+%D \blank
+%D The moon goes round the mansion red though gauze||draped
+%D windows soft to shed her light upon the sleepless bed.
+%D Against man she should have no spite. Why then when people
+%D part is she oft full and bright? Men have sorrow and joy,
+%D they part or meet again; The moon may be bright or dim, she
+%D may wax or wane. There has been nothing perfect since the
+%D olden days. So let us wish that man will live long as he
+%D can! Though miles apart, we'll share the beauty she
+%D displays.
+%D \stopnarrower
+
+%D This package is written in the city of Hasselt, a pretty
+%D small town in the |<|compare to China real small|>|
+%D Netherlands. Like most dutch cities, even this small one
+%D has a chinese restaurant, run by chinese, speaking chinese,
+%D and |<|indeed|>| writing chinese. Eating there will never
+%D be the same, since now I can at least pretend to know the
+%D glyphs all around the place. The numbers should pose me no
+%D problems, but I fear I will never manage to recognize those
+%D scribles they draw on their pads when thay take your order.
+
+\protect \endinput
diff --git a/tex/context/base/font-cmr.tex b/tex/context/base/font-cmr.tex
index 30fef6e13..8927b08f2 100644
--- a/tex/context/base/font-cmr.tex
+++ b/tex/context/base/font-cmr.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D The Computer Modern Roman is derived from the Monotype~8a
@@ -402,8 +402,8 @@
mi=cmmi10 at 4pt,
sy=cmsy10 at 4pt]
-%D We also define some large alternatives that can be used for
-%D titlepages and section headings.
+%D At the cost of some more memory we preload a few more
+%D fonts.
\definebodyfont [12pt] [rm]
[bfa=cmbx12 scaled \magstep1,
@@ -543,4 +543,51 @@
slc=cmsltt10 scaled \magstep3,
sld=cmsltt10 scaled \magstep4]
+%D Small is beautiful, but sometimes large is needed. We
+%D therefore define some rather large Computer Modern Roman
+%D bodyfont sizes, that can be used in for instance headings.
+
+%D We can use \type{sa} here because there are no genuine
+%D design sizes larger than 12pt (exept from cmr17).
+
+\definebodyfont [14.4pt,17.3pt,20.7pt] [rm]
+ [tf=cmr12 sa 1,
+ bf=cmbx12 sa 1,
+ it=cmti12 sa 1,
+ sl=cmsl12 sa 1,
+ bi=cmbxti10 sa 1,
+ bs=cmbxsl10 sa 1,
+ tfa=cmr12 sa 1.200,
+ tfb=cmr12 sa 1.440,
+ tfc=cmr12 sa 1.728,
+ tfd=cmr12 sa 2.074,
+ sc=cmcsc10 sa 1.200]
+
+\definebodyfont [14.4pt,17.3pt,20.7pt] [ss]
+ [tf=cmss12 sa 1,
+ bf=cmssbx10 sa 1,
+ it=cmssi12 sa 1,
+ sl=cmssi12 sa 1,
+ bi=cmssbx10 sa 1,
+ bs=cmssbx10 sa 1,
+ tfa=cmss12 sa 1.200,
+ tfb=cmss12 sa 1.440,
+ tfc=cmss12 sa 1.728,
+ tfd=cmss12 sa 2.074,
+ sc=cmss12 sa 1]
+
+\definebodyfont [14.4pt,17.3pt,20.7pt] [tt]
+ [tf=cmtt12 sa 1,
+ sl=cmsltt10 sa 1,
+ it=cmitt10 sa 1,
+ tfa=cmtt12 sa 1.200,
+ tfb=cmtt12 sa 1.440,
+ tfc=cmtt12 sa 1.728,
+ tfd=cmtt12 sa 2.074]
+
+\definebodyfont [14.4pt,17.3pt,20.7pt] [mm]
+ [ex=cmex10 sa 1,
+ mi=cmmi12 sa 1,
+ sy=cmsy10 sa 1]
+
\endinput
diff --git a/tex/context/base/font-cmx.tex b/tex/context/base/font-cmx.tex
deleted file mode 100644
index c4fd4649d..000000000
--- a/tex/context/base/font-cmx.tex
+++ /dev/null
@@ -1,98 +0,0 @@
-%D \module
-%D [ file=font-cmx,
-%D version=1996.11.10,
-%D title=\CONTEXT\ Font Macros,
-%D subtitle=Large Computer Modern,
-%D author=J. Hagen,
-%D date=\currentdate,
-%D copyright=J. Hagen]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
-
-%D Small is beautiful, but sometimes large is needed. We
-%D therefore define some rather large Computer Modern Roman
-%D bodyfont sizes, that cna be used in for instance headings.
-%D
-%D First we define some bodyfont environments. This enables us
-%D to typeset lerge math.
-
-\unprotect
-
-\definebodyfontenvironment
- [14.4pt]
- [ \s!text=14.4pt,
- \s!script=11pt,
- \s!scriptscript=9pt,
- \c!x=12pt,
- \c!xx=10pt,
- \c!groot=17.3pt,
- \c!klein=12pt]
-
-\definebodyfontenvironment
- [17.3pt]
- [ \s!text=17.3pt,
- \s!script=12pt,
- \s!scriptscript=10pt,
- \c!x=14.4pt,
- \c!xx=12pt,
- \c!groot=20.7pt,
- \c!klein=14.4pt]
-
-\definebodyfontenvironment
- [20.7pt]
- [ \s!text=20.7pt,
- \s!script=14.4pt,
- \s!scriptscript=12pt,
- \c!x=17.3pt,
- \c!xx=14.4pt,
- \c!groot=20.7pt, % !!!!
- \c!klein=17.3pt]
-
-\protect
-
-%D We can use \type{sa} here because there are no genuine design
-%D sizes larger than 12pt (exept from cmr17).
-
-\definebodyfont [14.4pt,17.3pt,20.7pt] [rm]
- [tf=cmr12 sa 1,
- bf=cmbx12 sa 1,
- it=cmti12 sa 1,
- sl=cmsl12 sa 1,
- bi=cmbxti10 sa 1,
- bs=cmbxsl10 sa 1,
- tfa=cmr12 sa 1.200,
- tfb=cmr12 sa 1.440,
- tfc=cmr12 sa 1.728,
- tfd=cmr12 sa 2.074,
- sc=cmcsc10 sa 1.200]
-
-\definebodyfont [14.4pt,17.3pt,20.7pt] [ss]
- [tf=cmss12 sa 1,
- bf=cmssbx10 sa 1,
- it=cmssi12 sa 1,
- sl=cmssi12 sa 1,
- bi=cmssbx10 sa 1,
- bs=cmssbx10 sa 1,
- tfa=cmss12 sa 1.200,
- tfb=cmss12 sa 1.440,
- tfc=cmss12 sa 1.728,
- tfd=cmss12 sa 2.074,
- sc=cmss12 sa 1]
-
-\definebodyfont [12pt,17.3pt,20.7pt] [tt]
- [tf=cmtt12 sa 1,
- sl=cmsltt10 sa 1,
- it=cmitt10 sa 1,
- tfa=cmtt12 sa 1.200,
- tfb=cmtt12 sa 1.440,
- tfc=cmtt12 sa 1.728,
- tfd=cmtt12 sa 2.074]
-
-\definebodyfont [14.4pt,17.3pt,20.7pt] [mm]
- [ex=cmex10 sa 1,
- mi=cmmi12 sa 1,
- sy=cmsy10 sa 1]
-
-\endinput
diff --git a/tex/context/base/font-con.tex b/tex/context/base/font-con.tex
index 23aefec21..4f180904b 100644
--- a/tex/context/base/font-con.tex
+++ b/tex/context/base/font-con.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D The Concrete Modern Roman is just an alternative Computer
diff --git a/tex/context/base/font-csr.tex b/tex/context/base/font-csr.tex
index 48e8dad24..c9149f666 100644
--- a/tex/context/base/font-csr.tex
+++ b/tex/context/base/font-csr.tex
@@ -8,45 +8,104 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D For Than.
-\definefontsynonym [Serif] [csr10] [encoding=il2]
-\definefontsynonym [SerifBold] [csbx10] [encoding=il2]
-\definefontsynonym [SerifItalic] [csti10] [encoding=il2]
-\definefontsynonym [SerifSlanted] [cssl10] [encoding=il2]
-\definefontsynonym [SerifBoldItalic] [csbxti10] [encoding=il2]
-\definefontsynonym [SerifBoldSlanted] [csbxsl10] [encoding=il2]
-\definefontsynonym [SerifCaps] [csr10] [encoding=il2]
+% \definefontsynonym [Serif] [csr10] [encoding=il2]
+% \definefontsynonym [SerifBold] [csbx10] [encoding=il2]
+% \definefontsynonym [SerifItalic] [csti10] [encoding=il2]
+% \definefontsynonym [SerifSlanted] [cssl10] [encoding=il2]
+% \definefontsynonym [SerifBoldItalic] [csbxti10] [encoding=il2]
+% \definefontsynonym [SerifBoldSlanted] [csbxsl10] [encoding=il2]
+% \definefontsynonym [SerifCaps] [csr10] [encoding=il2]
+%
+% \definefontsynonym [Sans] [csss10] [encoding=il2]
+% \definefontsynonym [SansBold] [csssbx10] [encoding=il2]
+% \definefontsynonym [SansItalic] [csssi10] [encoding=il2]
+% \definefontsynonym [SansSlanted] [csssi10] [encoding=il2]
+% \definefontsynonym [SansBoldItalic] [csssbx10] [encoding=il2]
+% \definefontsynonym [SansBoldSlanted] [csssbx10] [encoding=il2]
+% \definefontsynonym [SansCaps] [csss10] [encoding=il2]
+%
+% \definefontsynonym [Mono] [cstt10] [encoding=il2]
+% \definefontsynonym [MonoBold] [cstt10] [encoding=il2]
+% \definefontsynonym [MonoItalic] [csitt10] [encoding=il2]
+% \definefontsynonym [MonoSlanted] [cssltt10] [encoding=il2]
+% \definefontsynonym [MonoBoldItalic] [cstt10] [encoding=il2]
+% \definefontsynonym [MonoBoldSlanted] [cstt10] [encoding=il2]
+% \definefontsynonym [MonoCaps] [cstt10] [encoding=il2]
+%
+% \definefontsynonym [MathRoman] [csr10] [encoding=il2]
+% \definefontsynonym [MathExtension] [cmex10]
+% \definefontsynonym [MathItalic] [cmmi10]
+% \definefontsynonym [MathSymbol] [cmsy10]
+%
+% \definefontsynonym [OldStyle] [MathItalic]
+%
+% \definebodyfont
+% [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt]
+% [rm,ss,tt,mm]
+% [default]
-\definefontsynonym [Sans] [csss10] [encoding=il2]
-\definefontsynonym [SansBold] [csssbx10] [encoding=il2]
-\definefontsynonym [SansItalic] [csssi10] [encoding=il2]
-\definefontsynonym [SansSlanted] [csssi10] [encoding=il2]
-\definefontsynonym [SansBoldItalic] [csssbx10] [encoding=il2]
-\definefontsynonym [SansBoldSlanted] [csssbx10] [encoding=il2]
-\definefontsynonym [SansCaps] [csss10] [encoding=il2]
-
-\definefontsynonym [Mono] [cstt10] [encoding=il2]
-\definefontsynonym [MonoBold] [cstt10] [encoding=il2]
-\definefontsynonym [MonoItalic] [csitt10] [encoding=il2]
-\definefontsynonym [MonoSlanted] [cssltt10] [encoding=il2]
-\definefontsynonym [MonoBoldItalic] [cstt10] [encoding=il2]
-\definefontsynonym [MonoBoldSlanted] [cstt10] [encoding=il2]
-\definefontsynonym [MonoCaps] [cstt10] [encoding=il2]
-
-\definefontsynonym [MathRoman] [csr10] [encoding=il2]
-\definefontsynonym [MathExtension] [cmex10]
-\definefontsynonym [MathItalic] [cmmi10]
-\definefontsynonym [MathSymbol] [cmsy10]
-
-\definefontsynonym [OldStyle] [MathItalic]
-
-\definebodyfont
- [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt]
- [rm,ss,tt,mm]
- [default]
+\input font-cmr.tex
+\definefontsynonym [cmr10] [csr10] [encoding=il2]
+\definefontsynonym [cmr12] [csr12] [encoding=il2]
+\definefontsynonym [cmr17] [csr17] [encoding=il2]
+\definefontsynonym [cmr9] [csr9] [encoding=il2]
+\definefontsynonym [cmr8] [csr8] [encoding=il2]
+\definefontsynonym [cmr7] [csr7] [encoding=il2]
+\definefontsynonym [cmr6] [csr6] [encoding=il2]
+\definefontsynonym [cmr5] [csr5] [encoding=il2]
+\definefontsynonym [cmbx10] [csbx10] [encoding=il2]
+\definefontsynonym [cmbx12] [csbx12] [encoding=il2]
+\definefontsynonym [cmbx9] [csbx9] [encoding=il2]
+\definefontsynonym [cmbx8] [csbx8] [encoding=il2]
+\definefontsynonym [cmbx7] [csbx7] [encoding=il2]
+\definefontsynonym [cmbx6] [csbx6] [encoding=il2]
+\definefontsynonym [cmbx5] [csbx5] [encoding=il2]
+\definefontsynonym [cmb10] [csb10] [encoding=il2]
+\definefontsynonym [cmti10] [csti10] [encoding=il2]
+\definefontsynonym [cmti12] [csti12] [encoding=il2]
+\definefontsynonym [cmti9] [csti9] [encoding=il2]
+\definefontsynonym [cmti8] [csti8] [encoding=il2]
+\definefontsynonym [cmti7] [csti7] [encoding=il2]
+\definefontsynonym [cmtt10] [cstt10] [encoding=il2]
+\definefontsynonym [cmtt12] [cstt12] [encoding=il2]
+\definefontsynonym [cmtt9] [cstt9] [encoding=il2]
+\definefontsynonym [cmtt8] [cstt8] [encoding=il2]
+\definefontsynonym [cmsltt10] [cssltt10] [encoding=il2]
+\definefontsynonym [cmvtt10] [csvtt10] [encoding=il2]
+\definefontsynonym [cmss10] [csss10] [encoding=il2]
+\definefontsynonym [cmss12] [csss12] [encoding=il2]
+\definefontsynonym [cmss17] [csss17] [encoding=il2]
+\definefontsynonym [cmss9] [csss9] [encoding=il2]
+\definefontsynonym [cmss8] [csss8] [encoding=il2]
+\definefontsynonym [cmssi10] [csssi10] [encoding=il2]
+\definefontsynonym [cmssi12] [csssi12] [encoding=il2]
+\definefontsynonym [cmssi17] [csssi17] [encoding=il2]
+\definefontsynonym [cmssi9] [csssi9] [encoding=il2]
+\definefontsynonym [cmssi8] [csssi8] [encoding=il2]
+\definefontsynonym [cmsl10] [cssl10] [encoding=il2]
+\definefontsynonym [cmsl12] [cssl12] [encoding=il2]
+\definefontsynonym [cmsl9] [cssl9] [encoding=il2]
+\definefontsynonym [cmsl8] [cssl8] [encoding=il2]
+\definefontsynonym [cmssq8] [csssq8] [encoding=il2]
+\definefontsynonym [cmssqi8] [csssqi8] [encoding=il2]
+\definefontsynonym [cmssdc10] [csssdc10] [encoding=il2]
+\definefontsynonym [cmssbx10] [csssbx10] [encoding=il2]
+\definefontsynonym [cminch] [csinch] [encoding=il2]
+\definefontsynonym [cmdunh10] [csdunh10] [encoding=il2]
+\definefontsynonym [cmbxsl10] [csbxsl10] [encoding=il2]
+\definefontsynonym [cmff10] [csff10] [encoding=il2]
+\definefontsynonym [cmfib8] [csfib8] [encoding=il2]
+\definefontsynonym [cmbxti10] [csbxti10] [encoding=il2]
+\definefontsynonym [cmitt10] [csitt10] [encoding=il2]
+\definefontsynonym [cmu10] [csu10] [encoding=il2]
+\definefontsynonym [cmfi10] [csfi10] [encoding=il2]
+\definefontsynonym [cmcsc10] [cscsc10] [encoding=il2]
+\definefontsynonym [cmtcsc10] [cstcsc10] [encoding=il2]
+
\endinput
diff --git a/tex/context/base/font-eul.tex b/tex/context/base/font-eul.tex
index a35157a8b..0d8b747cc 100644
--- a/tex/context/base/font-eul.tex
+++ b/tex/context/base/font-eul.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D The Euler Fonts are designed by Herman Zapf and can be
diff --git a/tex/context/base/font-fil.tex b/tex/context/base/font-fil.tex
index f19289f60..3a71f9529 100644
--- a/tex/context/base/font-fil.tex
+++ b/tex/context/base/font-fil.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\definefontsynonym [ComputerModern] [cmr10]
@@ -42,10 +42,14 @@
\definefontsynonym [Courier] [com] [encoding=texnansi]
\definefontsynonym [Courier-Oblique] [coo] [encoding=texnansi]
+\definefontsynonym [Courier-Bold] [cob] [encoding=texnansi]
+\definefontsynonym [Courier-BoldOblique] [cobo] [encoding=texnansi]
+
\definefontsynonym [Helvetica] [hv] [encoding=texnansi]
\definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi]
\definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi]
\definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi]
+
\definefontsynonym [Times-Roman] [tir] [encoding=texnansi]
\definefontsynonym [Times-Italic] [tii] [encoding=texnansi]
\definefontsynonym [Times-Bold] [tib] [encoding=texnansi]
@@ -97,6 +101,15 @@
\definefontsynonym [AntykwaTorunska-Regular] [anttr]
\definefontsynonym [AntykwaTorunska-Italic] [anttri]
+\definefontsynonym [AntykwaTorunska-Regular] [zatr8t]
+[encoding=ec]
+\definefontsynonym [AntykwaTorunska-Italic] [zatri8t]
+[encoding=ec]
+\definefontsynonym [AntykwaTorunska-Bold] [zatb8t]
+[encoding=ec]
+
\definefontsynonym [ContextNavigation] [contnav]
+\definefontsynonym [RalfSmithFormalScript] [rsfs10]
+
\endinput
diff --git a/tex/context/base/font-heb.tex b/tex/context/base/font-heb.tex
new file mode 100644
index 000000000..573189618
--- /dev/null
+++ b/tex/context/base/font-heb.tex
@@ -0,0 +1,50 @@
+\input font-arb.tex
+
+\writestatus{loading}{Context Font Macros / Hebrew (ArabTeX) support}
+
+%D This module is build on top of \ARABTEX\ and arabic
+%D support. I dedicate this module to my father Hein Hagen,
+%D who did not live long enough to become a user. His huge
+%D library contains math, science, history, english literature,
+%D philisophy and theology books, but his most favoured ones
+%D were those traditional hebrew printings. I must admit
+%D that some of those make clear that traditonal typesetting
+%D can still beat \TEX. Those nested multicolumn documents with
+%D complicated can give even the experienced macro writer a
+%D rather persistent headache.
+
+\unprotect
+
+%D A few fonts.
+
+\unexpanded\def\sethebrewfont#1% strange font dimensions / scale
+ {\scratchdimen=10\bodyfontsize
+ \font\hebfont=\truefontname{Hebrew#1} at \currentfontscale\scratchdimen
+ \fontdimen5\hebfont=.8\fontdimen2\hebfont
+ \fontdimen6\hebfont=3\fontdimen5\hebfont
+ \hebfont}
+
+\let \setheb \sethebrew
+
+\unexpanded\def\pheb {\sethebrewfont\s!Regular}
+\unexpanded\def\phebbf{\sethebrewfont\s!Bold}
+
+\startloadingARABTEX
+
+\input hebtex.sty
+\input apatch.sty
+\input hepatch.sty
+
+\stoploadingARABTEX
+
+%D The main definition is:
+
+\definefontsynonym [HebrewRegular] [hclassic]
+\definefontsynonym [HebrewBold] [hcaption]
+
+\defineARABTEXalternative
+ [hebrew]
+ [\c!binnen=\sethebrew,
+ \c!letter=\sethebrewfont{\fontstylesuffix}]
+
+\protect \endinput
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index ce8fe5ca2..61ee1b90b 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Font Macros (ini)}
@@ -57,6 +57,20 @@
10: unbekanntes Font --
\stopmessages
+\startmessages czech library: fonts
+ title: zakladnifont
+ 1: kodovani --
+ 2: varianta -- je nactena
+ 3: neznama varianta --
+ 4: zakladni font -- neni definovan
+ 5: styl -- neni definovan
+ 6: -- je nacten
+ 7: neznamy format --
+ 8: styl -- definovan
+ 9: mapovani -- je nacteno
+ 10: neznamy font --
+\stopmessages
+
%D This module is one of the oldest modules of \CONTEXT. The
%D macros below evolved out of the \PLAIN\ \TEX\ macros and
%D therefore use a similar naming scheme (\type{\rm},
@@ -557,9 +571,8 @@
%D numbers, so we have to convert the \type{\fam}'s value.
\def\hexnumber#1%
- {\ifcase#1
- 0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or A\or B\or C\or D\or E\or F%
- \fi}
+ {\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
+ 8\or 9\or A\or B\or C\or D\or E\or F\fi}
\edef\hexmrfam {\hexnumber\mrfam} \edef\hexbsfam {\hexnumber\bsfam}
\edef\hexmifam {\hexnumber\mifam} \edef\hexbifam {\hexnumber\bifam}
@@ -571,6 +584,47 @@
\edef\hexnnfam {\hexnumber\nnfam}
+%D \macros
+%D {lchexnumber,uchexnumber,lchexnumbers}
+%D
+%D In addition to the uppercase hex conversion, we
+%D occasionally need a lowercase one, for instance when we
+%D want to compose gbsong fontnames.
+
+\def\lchexnumber#1%
+ {\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
+ 8\or 9\or a\or b\or c\or d\or e\or f\fi}
+
+\let\uchexnumber=\hexnumber
+
+\def\lchexnumbers#1%
+ {\ifcase#1
+ 00\or 01\or 02\or 03\or 04\or 05\or 06\or 07\or 08\or 09\or 0a\or 0b\or 0c\or 0d\or 0e\or 0f\or
+ 10\or 11\or 12\or 13\or 14\or 15\or 16\or 17\or 18\or 19\or 1a\or 1b\or 1c\or 1d\or 1e\or 1f\or
+ 20\or 21\or 22\or 23\or 24\or 25\or 26\or 27\or 28\or 29\or 2a\or 2b\or 2c\or 2d\or 2e\or 2f\or
+ 30\or 31\or 32\or 33\or 34\or 35\or 36\or 37\or 38\or 39\or 3a\or 3b\or 3c\or 3d\or 3e\or 3f\or
+ 40\or 41\or 42\or 43\or 44\or 45\or 46\or 47\or 48\or 49\or 4a\or 4b\or 4c\or 4d\or 4e\or 4f\or
+ 50\or 51\or 52\or 53\or 54\or 55\or 56\or 57\or 58\or 59\or 5a\or 5b\or 5c\or 5d\or 5e\or 5f\or
+ 60\or 61\or 62\or 63\or 64\or 65\or 66\or 67\or 68\or 69\or 6a\or 6b\or 6c\or 6d\or 6e\or 6f\or
+ 70\or 71\or 72\or 73\or 74\or 75\or 76\or 77\or 78\or 79\or 7a\or 7b\or 7c\or 7d\or 7e\or 7f\or
+ 80\or 81\or 82\or 83\or 84\or 85\or 86\or 87\or 88\or 89\or 8a\or 8b\or 8c\or 8d\or 8e\or 8f\or
+ 90\or 91\or 92\or 93\or 94\or 95\or 96\or 97\or 98\or 99\or 9a\or 9b\or 9c\or 9d\or 9e\or 9f\or
+ a0\or a1\or a2\or a3\or a4\or a5\or a6\or a7\or a8\or a9\or aa\or ab\or ac\or ad\or ae\or af\or
+ b0\or b1\or b2\or b3\or b4\or b5\or b6\or b7\or b8\or b9\or ba\or bb\or bc\or bd\or be\or bf\or
+ c0\or c1\or c2\or c3\or c4\or c5\or c6\or c7\or c8\or c9\or ca\or cb\or cc\or cd\or ce\or cf\or
+ d0\or d1\or d2\or d3\or d4\or d5\or d6\or d7\or d8\or d9\or da\or db\or dc\or dd\or de\or df\or
+ e0\or e1\or e2\or e3\or e4\or e5\or e6\or e7\or e8\or e9\or ea\or eb\or ec\or ed\or ee\or ef\or
+ f0\or f1\or f2\or f3\or f4\or f5\or f6\or f7\or f8\or f9\or fa\or fb\or fc\or fd\or fe\or ff\fi}
+
+%D \macros
+%D {uchar}
+%D
+%D This macro prepares \CONTEXT\ for \UNICODE\ support. By
+%D defining it here, we have at least an safeguard for utility
+%D file reading.
+
+\unexpanded\def\uchar#1#2{[#1,#2]}
+
%D We define some (very private) constants to improve speed,
%D memory usage and consistency.
@@ -717,11 +771,11 @@
\scaledfont=#4\relax
\def\somefontspec{ at \fontscale\scaledfont}%
\fi
- \edef\fontfile{\truefontname{\somefontname}}%
+ \edef\fontfile{\truefontname\somefontname}%
\ifx\fontfile\s!unknown
\let\fontfile\defaultfontfile
\else
- \edef\fontdata{\truefontdata{\somefontname}}%
+ \edef\fontdata{\truefontdata\somefontname}%
\ifx\fontdata\empty \else
%\@EA\getparameters\@EA[\@EA\fontfile\@EA]\@EA[\fontdata]%
\@EA\rawgetparameters\@EA[\@EA\fontfile\@EA]\@EA[\fontdata]%
@@ -798,6 +852,26 @@
\fi}
%D \macros
+%D {getfontfileparameters}
+%D
+%D For special purposes, one can use the next macro to
+%D access font file characteristics, for instance:
+%D
+%D \starttypen
+%D \getfontfileparameters{Regular}
+%D \stoptypen
+%D
+%D can result in:
+%D
+%D \starttypen
+%D \def\currentfontfileencoding{texnansi}
+%D \stoptypen
+
+\def\getfontfileparameters#1%
+ {\edef\fontdata{\truefontdata{#1}}%
+ \expanded{\getparameters[currentfontfile][\fontdata]}}
+
+%D \macros
%D {definefont}
%D
%D Before we implement the main definition macro, we first show
@@ -843,13 +917,12 @@
\def\dodoloadfont#1#2#3#4%
{\edef\calculatedfont{\csname\??ft#1#2#3\endcsname\space}%
\expandafter\docalculatefont\calculatedfont sa sa*#1*#2#3*%
- \@EA\ifx\csname#1#2\s!hyphenchar\endcsname\relax
- \@EA\hyphenchar\csname#1#2#3\endcsname=
- #4\relax
- \else
- \@EA\hyphenchar\csname#1#2#3\endcsname=
- \csname#1#2\s!hyphenchar\endcsname\relax
- \fi
+ \@EA\hyphenchar\csname#1#2#3\endcsname=
+ \@EA\ifx\csname\??ft#1#2\s!hyphenchar\endcsname\relax
+ #4%
+ \else
+ \csname\??ft#1#2\s!hyphenchar\endcsname
+ \fi\relax
\csname#1#2#3\endcsname}
\endTEX
@@ -859,13 +932,12 @@
\def\dodoloadfont#1#2#3#4%
{\edef\calculatedfont{\csname\??ft#1#2#3\endcsname\space}%
\expandafter\docalculatefont\calculatedfont sa sa*#1*#2#3*%
- \ifcsname#1#2\s!hyphenchar\endcsname
- \@EA\hyphenchar\csname#1#2#3\endcsname=
- \csname#1#2\s!hyphenchar\endcsname\relax
- \else
- \@EA\hyphenchar\csname#1#2#3\endcsname=
- #4\relax
- \fi
+ \@EA\hyphenchar\csname#1#2#3\endcsname=
+ \ifcsname\??ft#1#2\s!hyphenchar\endcsname
+ \csname\??ft#1#2\s!hyphenchar\endcsname
+ \else
+ #4%
+ \fi\relax
\csname#1#2#3\endcsname}
\endETEX
@@ -874,11 +946,11 @@
%D care of fixed width teletype fonts.
\def\doloadfont#1#2#3%
- {\debuggerinfo{\m!fonts}{loaded #1#2#3}%
+ {%\debuggerinfo{\m!fonts}{loaded #1#2#3}%
\dodoloadfont{#1}{#2}{#3}{45}}
\def\doloadttfont#1#2#3%
- {\debuggerinfo{\m!fonts}{loaded fixed #1#2#3}%
+ {%\debuggerinfo{\m!fonts}{loaded fixed #1#2#3}%
\dodoloadfont{#1}{#2}{#3}{-1}}
%D \macros
@@ -902,14 +974,14 @@
\beginTEX
\def\currentfontscale%
- {\@EA\ifx\csname\??ft\s!default\fontsize\endcsname\relax
+ {\@EA\ifx\csname\??ft\s!default\xfontsize\endcsname\relax
\@EA\ifx\csname\??ft\s!default\s!text\endcsname\relax
1%
\else
\csname\??ft\s!default\s!text\endcsname
\fi
\else
- \csname\??ft\s!default\fontsize\endcsname
+ \csname\??ft\s!default\xfontsize\endcsname
\fi}
\endTEX
@@ -917,8 +989,8 @@
\beginETEX
\def\currentfontscale%
- {\ifcsname\??ft\s!default\fontsize\endcsname
- \csname\??ft\s!default\fontsize\endcsname
+ {\ifcsname\??ft\s!default\xfontsize\endcsname
+ \csname\??ft\s!default\xfontsize\endcsname
\else\ifcsname\??ft\s!default\s!text\endcsname
\csname\??ft\s!default\s!text\endcsname
\else
@@ -927,6 +999,19 @@
\endETEX
+%D Both alternatives use \type {\xfontsize}, a macro that
+%D expands to the current size in terms of \type {a} \unknown
+%D \type {d}, nothing, or \type {x} \unknown \type {xx}.
+
+\def\xfontsize{\ifcase\currentxfontsize\fontsize\or\c!x\else\c!xx\fi}
+
+%D A typical use of this command is in commands that switch
+%D to another font bypassing the font mechanism:
+%D
+%D \starttyping
+%D \font\myfont=\truefontname{MyFont} at \currentfontscale\bodyfontsize
+%D \stoptyping
+
%D Now we enter the area of font switching. The switching
%D mechanism has to take care of several situations, like:
%D
@@ -989,15 +1074,34 @@
\def\definebodyfontenvironment%
{\dodoubleempty\dodefinebodyfontenvironment}
+\newcount\@@fontdefhack
+
+\def\@@beginfontdef%
+ {\ifcase\@@fontdefhack
+ \let\k!savedtext =\k!text \let\k!text =\s!text
+ \let\k!k!savedtext =\k!k!text \def\k!k!text {1}%
+ \let\k!saveddefault =\k!default \let\k!default =\s!default
+ \let\k!k!saveddefault=\k!k!default \def\k!k!default {1}%
+ \fi
+ \advance\@@fontdefhack by 1 }
+
+\def\@@endfontdef%
+ {\advance\@@fontdefhack by -1
+ \ifcase\@@fontdefhack
+ \let\k!k!default=\k!k!saveddefault
+ \let\k!default =\k!saveddefault
+ \let\k!k!text =\k!k!savedtext
+ \let\k!text =\k!savedtext
+ \fi}
+
\def\dodefinebodyfontenvironment[#1][#2]%
- {\let\c!savedtext=\c!text
- \let\c!text=\s!text
+ {\@@beginfontdef
\doifelse{#1}{\s!default}
{\getparameters[\??ft\s!default][#2]}
{\normalizebodyfontsize#1\to\tempbodyfontsize
\addtocommalist\tempbodyfontsize\bodyfontenvironmentlist
\@EA\dododefinebodyfontenvironment\@EA[\tempbodyfontsize][#2]}%
- \let\c!text=\c!savedtext}
+ \@@endfontdef}
\def\dododefinebodyfontenvironment[#1][#2]%
{\doifundefined{\??ft#1\s!text}
@@ -1012,14 +1116,18 @@
\copyparameters
[\??ft#1][\??ft\s!default]
[\c!interlinie,\c!em]}%
+ \@@beginfontdef
\getparameters[\??ft#1][#2]%
+ \@@endfontdef
\setvalue{\@size@#1}{\docompletefontswitch[#1]}}
\def\setupbodyfontenvironment%
{\dodoubleargument\dosetupbodyfontenvironment}
-\def\dosetupbodyfontenvironment[#1]%
- {\getparameters[\??ft#1]}
+\def\dosetupbodyfontenvironment[#1][#2]%
+ {\@@beginfontdef
+ \getparameters[\??ft#1][#2]%
+ \@@endfontdef}
%D We default all parameters to the main bodyfont size (begin
%D \type{#1}), so the next setup is valid too:
@@ -1137,7 +1245,7 @@
%D definitions like \type{\tfw} or \type{\bfq} for real large
%D alternatives.
-\def\dodododefinebodyfont[#1][#2][#3]%
+\def\dodododefinebodyfont[#1][#2][#3]% er kan wat naar buiten
{\doifelse{#1}{\s!default}
{\setvalue{\s!default#2}##1{\definebodyfont[##1][#2][#3]}}
{\geteparameters[\??ft#1#2][#3]% We expand them!
@@ -1153,7 +1261,7 @@
{\getvalue{##1##2}\getvalue{##1##2\c!x}}%
\unexpanded\setvalue{##1##2\c!xx}%
{\getvalue{##1##2}\getvalue{##1##2\c!xx}}}%
- \doifsomething{##3}
+ \doifsomething{##3}
{\unexpanded\setvalue{#2##3}% eg: \rma, \ssa
{\switchtofontstyle{#2}{##3}}%
\unexpanded\setvalue{##1##2##3}% eg: \tfa, \bfa
@@ -1163,14 +1271,15 @@
\def\dododododefinebodyfont##1%
{\doifnot{##1}{\s!hyphenchar}
{\doifdefined{\??ft#1#2##1}
- {\letvalue{@#1#2##1@}=\characterencoding
+ {%\letvalue{@#1#2##1@}=\characterencoding
+ \setevalue{@#1#2##1@}{\currentencoding}% strips @
\doifelse{#2}{\c!tt}
{\unexpanded\setvalue{#1#2##1}{\doloadttfont{#1}{#2}{##1}}}
{\unexpanded\setvalue{#1#2##1}{\doloadfont{#1}{#2}{##1}}}%
\bgroup
\let\relax=\empty
- \debuggerinfo
- {\m!fonts}{\getvalue{\??ft#1#2##1} defined as #1 #2 ##1}%
+ %\debuggerinfo
+ % {\m!fonts}{\getvalue{\??ft#1#2##1} defined as #1 #2 ##1}%
\egroup}%
\doifnot{#2}{\c!mm} % new!
{\expandafter\doiffamily##1\\}}}%
@@ -1369,7 +1478,7 @@
\def\doreadfontdefinitionfile#1%
{\doifundefined{\c!file\f!fontprefix#1}%
{\setvalue{\c!file\f!fontprefix#1}{}%
- \makeshortfilename[\f!fontprefix\truefontname{#1}]%
+ \makeshortfilename[\truefilename{\f!fontprefix#1}]%
\startreadingfile
\readsysfile{\shortfilename}
{\showmessage{\m!fonts}{2}{#1}}
@@ -1684,19 +1793,19 @@
{\@EA\ifx\csname#5\c!mm#2\endcsname\relax
\@EA\ifx\csname#5#1#2\endcsname\relax
\@EA\ifx\csname#5#1\c!tf\endcsname\relax
- \debuggerinfo{\m!fonts}{not defined #5#1#2}%
+ %\debuggerinfo{\m!fonts}{not defined #5#1#2}%
\else
- \debuggerinfo{\m!fonts}{#5#1#2 replaced by #5#1\c!tf}%
+ %\debuggerinfo{\m!fonts}{#5#1#2 replaced by #5#1\c!tf}%
\csname#5#1\c!tf\endcsname% activate font
\@EA#4\csname#3\s!fam\endcsname\csname#5#1\c!tf\endcsname
\fi
\else
- \debuggerinfo{\m!fonts}{defined #5#1#2}%
+ %\debuggerinfo{\m!fonts}{defined #5#1#2}%
\csname#5#1#2\endcsname% activate font
\@EA#4\csname#3\s!fam\endcsname\csname#5#1#2\endcsname
\fi
\else
- \debuggerinfo{\m!fonts}{#5#1#2 overruled by #5\c!mm#2}%
+ %\debuggerinfo{\m!fonts}{#5#1#2 overruled by #5\c!mm#2}%
\csname#5\c!mm#2\endcsname % activate font
\@EA#4\csname#3\s!fam\endcsname\csname#5\c!mm#2\endcsname
\fi}
@@ -1707,19 +1816,19 @@
\def\dosettextfamily#1#2#3#4#5%
{\ifcsname#5\c!mm#2\endcsname
- \debuggerinfo{\m!fonts}{#5#1#2 overruled by #5\c!mm#2}%
+ %\debuggerinfo{\m!fonts}{#5#1#2 overruled by #5\c!mm#2}%
\csname#5\c!mm#2\endcsname % activate font
\@EA#4\csname#3\s!fam\endcsname\csname#5\c!mm#2\endcsname
\else\ifcsname#5#1#2\endcsname
- \debuggerinfo{\m!fonts}{defined #5#1#2}%
+ %\debuggerinfo{\m!fonts}{defined #5#1#2}%
\csname#5#1#2\endcsname% activate font
\@EA#4\csname#3\s!fam\endcsname\csname#5#1#2\endcsname
\else\ifcsname#5#1\c!tf\endcsname
- \debuggerinfo{\m!fonts}{#5#1#2 replaced by #5#1\c!tf}%
+ %\debuggerinfo{\m!fonts}{#5#1#2 replaced by #5#1\c!tf}%
\csname#5#1\c!tf\endcsname% activate font
\@EA#4\csname#3\s!fam\endcsname\csname#5#1\c!tf\endcsname
\else
- \debuggerinfo{\m!fonts}{not defined #5#1#2}%
+ %\debuggerinfo{\m!fonts}{not defined #5#1#2}%
\fi\fi\fi}
\endETEX
@@ -1751,10 +1860,10 @@
\def\dodefinefontstyle[#1][#2]%
{\rawdoifinsetelse{#2}{\stylelist}
- {\debuggerinfo{\m!fonts}{unknown style #2}}
+ {}%\debuggerinfo{\m!fonts}{unknown style #2}}
{\addtocommalist{#2}\stylelist
\showmessage{\m!fonts}{8}{#2 (#1)}}%
-\unexpanded\setvalue{#2}{\setfontstyle{#2}{#2}}%
+ \unexpanded\setvalue{#2}{\setfontstyle{#2}{#2}}%
\setvalue{#2\c!x}%
{\getvalue{#2}\getvalue{\c!tf\c!x}}%
\setvalue{#2\c!xx}%
@@ -1994,7 +2103,7 @@
\let\globalfontstyle=\fontstyle
\the\everybodyfont}}
-\unexpanded\def\switchtobodyfont[#1]%
+\unexpanded\def\switchtobodyfont[#1]%
{\doifsomething{#1}
{\doifdefinedelse{\??ft\normalizedbodyfontsize\interfaced{#1}}
{\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\interfaced{#1}}]%
@@ -2024,8 +2133,9 @@
\def\dosettypeface#1#2%
{\doifdefinedelse{@\normalizedbodyfontsize#1#2@} % the definition bound one
- {\edef\characterencoding{\getvalue{@\normalizedbodyfontsize#1#2@}}}
- {\let\characterencoding=\nocharacterencoding}%
+% {\edef\characterencoding{\getvalue{@\normalizedbodyfontsize#1#2@}}}
+ {\enablecoding[\getvalue{@\normalizedbodyfontsize#1#2@}]}
+ {\enablecoding[\s!default]}%
\edef\fontalternative{#2}%
\unexpanded\def\tx%
{\dosetxtypeface{#2\fontsize}}%
@@ -2037,10 +2147,11 @@
\getvalue{#1#2}%
\ifcase\currentxfontsize\or\tx\or\txx\fi
\doifdefined{\purefontname\font\s!encoding} % the file bound one
- {\edef\characterencoding{@\getvalue{\purefontname\font\s!encoding}@}}%
+ {\enablecoding[\getvalue{\purefontname\font\s!encoding}]}%
\doifdefinedelse{\purefontname\font\s!mapping} % the file bound one
- {\edef\charactermapping{@\getvalue{\purefontname\font\s!mapping}@}}%
- {\let\charactermapping\characterencoding}}
+ {\enablemapping[\getvalue{\purefontname\font\s!mapping}]}%
+ {\doifdefined{\purefontname\font\s!encoding}
+ {\enablemapping[\getvalue{\purefontname\font\s!encoding}]}}}
%D The next auxilliary macro is an alternative to \type
%D {\fontname}.
@@ -2082,7 +2193,7 @@
\definefontsynonym[OldStyle][Serif]
%D \macros
-%D {frac, goth, cal}
+%D {frak, goth, cal}
%D
%D On behalf of {\frac Tobias Burnus}, we define some more of
%D these:
@@ -2095,6 +2206,15 @@
\definefontsynonym [Gothic] [Serif]
\definefontsynonym [Caligraphic] [Serif]
+%D \macros
+%D {fraktur, gothic, caligraphic}
+%D
+%D For Tobias and friends:
+
+\def\fraktur #1{\ifmmode\hbox\fi{\frak#1}}
+\def\gothic #1{\ifmmode\hbox\fi{\goth#1}}
+\def\caligraphic#1{\ifmmode\hbox\fi{\cal #1}}
+
%D In \type {font-cmr} we will link these to real file names.
%D \macros
@@ -2580,10 +2700,17 @@
%D \getglyph{fontname}{character}
%D \stoptypen
%D
-%D This macro is used in for instance the symbol modules.
+%D This macro is used in for instance the symbol modules and
+%D as one can see, it does obey the small and even smaller
+%D sizes.
\def\getglyph#1#2%
- {{\font\temp=\truefontname{#1} at \bodyfontsize\temp#2\relax}}
+ {{\ifcase\currentxfontsize\or
+ \bodyfontsize=\getvalue{\??ft\normalizedbodyfontsize\c!x}%
+ \else
+ \bodyfontsize=\getvalue{\??ft\normalizedbodyfontsize\c!xx}%
+ \fi
+ \font\temp=\truefontname{#1} at \bodyfontsize \temp#2\relax}}
%D Fonts can only be used when loaded. In \CONTEXT\ we
%D postpone the loading of fonts, even when we load \PLAIN.
@@ -2893,6 +3020,41 @@
\definebodyfontswitch [viii] [\!!eightpoint]
\definebodyfontswitch [vii] [\!!sevenpoint]
\definebodyfontswitch [vi] [\!!sixpoint]
+
+%D Well, why not define a few more big ones. Nowadays memory
+%D is not so much a problem any more.
+
+\definebodyfontenvironment
+ [14.4pt]
+ [ \s!text=14.4pt,
+ \s!script=11pt,
+ \s!scriptscript=9pt,
+ \c!x=12pt,
+ \c!xx=10pt,
+ \c!groot=17.3pt,
+ \c!klein=12pt]
+
+\definebodyfontenvironment
+ [17.3pt]
+ [ \s!text=17.3pt,
+ \s!script=12pt,
+ \s!scriptscript=10pt,
+ \c!x=14.4pt,
+ \c!xx=12pt,
+ \c!groot=20.7pt,
+ \c!klein=14.4pt]
+
+\definebodyfontenvironment
+ [20.7pt]
+ [ \s!text=20.7pt,
+ \s!script=14.4pt,
+ \s!scriptscript=12pt,
+ \c!x=17.3pt,
+ \c!xx=14.4pt,
+ \c!groot=20.7pt, % !!!!
+ \c!klein=17.3pt]
+
+%D So far.
\definefontstyle [\c!rm,\v!roman,\v!serif,\v!regular] [\c!rm]
\definefontstyle [\c!ss,\v!sansserif,\v!sans,\v!support] [\c!ss]
@@ -2916,10 +3078,26 @@
\definealternativestyle [\v!kleinvetitalic,\v!kleinitalicvet] [\bix] []
%D We treat {\sc Small Caps} and \kap {Pseudo Caps} a bit
-%D different.
+%D different. We also provide an \WOORD {uppercase} style.
\definealternativestyle [\v!kap,\v!kapitaal] [\normalkap] [\normalkap]
\definealternativestyle [\v!smallcaps] [\sc] [\sc]
+\definealternativestyle [\v!WOORD] [\WORD] [\WORD]
+
+%D \macros
+%D {fontstylesuffix}
+%D
+%D The next macro is used to map non latin fontnames on
+%D fonts. See \type {font-uni} for an example of its use.
+
+\def\fontstylesuffix%
+ {\ifnum\fam=\tffam \s!Regular \else
+ \ifnum\fam=\bffam \s!Bold \else
+ \ifnum\fam=\slfam \s!Slanted \else
+ \ifnum\fam=\itfam \s!Italic \else
+ \ifnum\fam=\bsfam \s!BoldSlanted \else
+ \ifnum\fam=\bifam \s!BoldItalic \else
+ \s!Regular \fi\fi\fi\fi\fi\fi}%
%D We still have to take care of \type{\xi}, so:
@@ -2935,3 +3113,16 @@
\protect
\endinput
+
+%D Some unused left||overs:
+%D
+%D \starttypen
+%D \def\doiffontpresentelse#1#2#3%
+%D {\bgroup
+%D \batchmode\font\dummy=\truefontname{#1}\errorstopmode
+%D \edef\lastfontname{\fontname\dummy}%
+%D \ifx\lastfontname\nullfontname\egroup#3\else\egroup#2\fi}
+%D
+%D \def\abortiffontnotfound#1%
+%D {\doiffontpresentelse{#1}{}{\showmessage{\m!fonts}{10}{\truefontname{#1}}\endinput}}
+%D \stoptypen
diff --git a/tex/context/base/font-lbr.tex b/tex/context/base/font-lbr.tex
index d0e9810f0..a6d76f3e5 100644
--- a/tex/context/base/font-lbr.tex
+++ b/tex/context/base/font-lbr.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D The Lucida Bright fonts are both good looking and and
@@ -65,9 +65,6 @@
[hw,cg]
[default]
-%D Defining the larger alternatives takes only a few
-%D commands, thanks to \type{sa}.
-
%D The Lucida Bright TeleType font does not contain \TEX's
%D visual space. The next definition offers an alternative.
diff --git a/tex/context/base/font-map.tex b/tex/context/base/font-map.tex
index a124f63b9..fcdeca0d8 100644
--- a/tex/context/base/font-map.tex
+++ b/tex/context/base/font-map.tex
@@ -8,7 +8,7 @@
%D copyright=NTG Maps]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\startnotmode[localfonts]
diff --git a/tex/context/base/font-pcr.tex b/tex/context/base/font-pcr.tex
index 7c81b22a0..1dbe06f10 100644
--- a/tex/context/base/font-pcr.tex
+++ b/tex/context/base/font-pcr.tex
@@ -8,17 +8,17 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module defines the Standard Adobe Courier fonts.
\definefontsynonym [Mono] [Courier]
-\definefontsynonym [MonoBold] [Courier]
+\definefontsynonym [MonoBold] [Courier-Bold]
\definefontsynonym [MonoItalic] [Courier-Oblique]
\definefontsynonym [MonoSlanted] [Courier-Oblique]
-\definefontsynonym [MonoBoldItalic] [Courier]
-\definefontsynonym [MonoBoldSlanted] [Courier]
+\definefontsynonym [MonoBoldItalic] [Courier-BoldOblique]
+\definefontsynonym [MonoBoldSlanted] [Courier-BoldOblique]
\definefontsynonym [MonoCaps] [Courier]
\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [tt] [default]
diff --git a/tex/context/base/font-phv.tex b/tex/context/base/font-phv.tex
index 4c96ad035..7a4a3c899 100644
--- a/tex/context/base/font-phv.tex
+++ b/tex/context/base/font-phv.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module defines the Standard Adobe Helvetica fonts.
diff --git a/tex/context/base/font-plr.tex b/tex/context/base/font-plr.tex
new file mode 100644
index 000000000..3f4b2306d
--- /dev/null
+++ b/tex/context/base/font-plr.tex
@@ -0,0 +1,130 @@
+%D \module
+%D [ file=font-plr,
+%D version=1999.08.28,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Computer Modern Polish,
+%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.
+
+% \definefontsynonym [Serif] [plr10] [encoding=pl0]
+% \definefontsynonym [SerifBold] [plbx10] [encoding=pl0]
+% \definefontsynonym [SerifItalic] [plti10] [encoding=pl0]
+% \definefontsynonym [SerifSlanted] [plsl10] [encoding=pl0]
+% \definefontsynonym [SerifBoldItalic] [plbxti10] [encoding=pl0]
+% \definefontsynonym [SerifBoldSlanted] [plbxsl10] [encoding=pl0]
+% \definefontsynonym [SerifCaps] [plr10] [encoding=pl0]
+%
+% \definefontsynonym [Sans] [plss10] [encoding=pl0]
+% \definefontsynonym [SansBold] [plssbx10] [encoding=pl0]
+% \definefontsynonym [SansItalic] [plssi10] [encoding=pl0]
+% \definefontsynonym [SansSlanted] [plssi10] [encoding=pl0]
+% \definefontsynonym [SansBoldItalic] [plssbx10] [encoding=pl0]
+% \definefontsynonym [SansBoldSlanted] [plssbx10] [encoding=pl0]
+% \definefontsynonym [SansCaps] [plss10] [encoding=pl0]
+%
+% \definefontsynonym [Mono] [pltt10] [encoding=pl0]
+% \definefontsynonym [MonoBold] [pltt10] [encoding=pl0]
+% \definefontsynonym [MonoItalic] [plitt10] [encoding=pl0]
+% \definefontsynonym [MonoSlanted] [plsltt10] [encoding=pl0]
+% \definefontsynonym [MonoBoldItalic] [pltt10] [encoding=pl0]
+% \definefontsynonym [MonoBoldSlanted] [pltt10] [encoding=pl0]
+% \definefontsynonym [MonoCaps] [pltt10] [encoding=pl0]
+%
+% \definefontsynonym [MathRoman] [plr10] [encoding=pl0]
+% \definefontsynonym [MathExtension] [cmex10]
+% \definefontsynonym [MathItalic] [cmmi10]
+% \definefontsynonym [MathSymbol] [cmsy10]
+%
+% \definefontsynonym [OldStyle] [MathItalic]
+%
+% \definebodyfont
+% [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt]
+% [rm,ss,tt,mm]
+% [default]
+
+\input font-cmr.tex
+
+\definefontsynonym [cmb10] [plb10] [encoding=pl0]
+\definefontsynonym [cmbsy10] [plbsy10] [encoding=pl0]
+\definefontsynonym [cmbx10] [plbx10] [encoding=pl0]
+\definefontsynonym [cmbx12] [plbx12] [encoding=pl0]
+\definefontsynonym [cmbx5] [plbx5] [encoding=pl0]
+\definefontsynonym [cmbx6] [plbx6] [encoding=pl0]
+\definefontsynonym [cmbx7] [plbx7] [encoding=pl0]
+\definefontsynonym [cmbx8] [plbx8] [encoding=pl0]
+\definefontsynonym [cmbx9] [plbx9] [encoding=pl0]
+\definefontsynonym [cmbxsl10] [plbxsl10] [encoding=pl0]
+\definefontsynonym [cmbxti10] [plbxti10] [encoding=pl0]
+\definefontsynonym [cmcsc10] [plcsc10] [encoding=pl0]
+\definefontsynonym [cmdunh10] [pldunh10] [encoding=pl0]
+\definefontsynonym [cmex10] [plex10] [encoding=pl0]
+\definefontsynonym [cmex9] [plex9] [encoding=pl0]
+\definefontsynonym [cmff10] [plff10] [encoding=pl0]
+\definefontsynonym [cmfi10] [plfi10] [encoding=pl0]
+\definefontsynonym [cmfib8] [plfib8] [encoding=pl0]
+\definefontsynonym [cminch] [plinch] [encoding=pl0]
+\definefontsynonym [cmitt10] [plitt10] [encoding=pl0]
+\definefontsynonym [cmmi10] [plmi10] [encoding=pl0]
+\definefontsynonym [cmmi12] [plmi12] [encoding=pl0]
+\definefontsynonym [cmmi5] [plmi5] [encoding=pl0]
+\definefontsynonym [cmmi6] [plmi6] [encoding=pl0]
+\definefontsynonym [cmmi7] [plmi7] [encoding=pl0]
+\definefontsynonym [cmmi8] [plmi8] [encoding=pl0]
+\definefontsynonym [cmmi9] [plmi9] [encoding=pl0]
+\definefontsynonym [cmmib10] [plmib10] [encoding=pl0]
+\definefontsynonym [cmr10] [plr10] [encoding=pl0]
+\definefontsynonym [cmr12] [plr12] [encoding=pl0]
+\definefontsynonym [cmr17] [plr17] [encoding=pl0]
+\definefontsynonym [cmr5] [plr5] [encoding=pl0]
+\definefontsynonym [cmr6] [plr6] [encoding=pl0]
+\definefontsynonym [cmr7] [plr7] [encoding=pl0]
+\definefontsynonym [cmr8] [plr8] [encoding=pl0]
+\definefontsynonym [cmr9] [plr9] [encoding=pl0]
+\definefontsynonym [cmsl10] [plsl10] [encoding=pl0]
+\definefontsynonym [cmsl12] [plsl12] [encoding=pl0]
+\definefontsynonym [cmsl8] [plsl8] [encoding=pl0]
+\definefontsynonym [cmsl9] [plsl9] [encoding=pl0]
+\definefontsynonym [cmsltt10] [plsltt10] [encoding=pl0]
+\definefontsynonym [cmss10] [plss10] [encoding=pl0]
+\definefontsynonym [cmss12] [plss12] [encoding=pl0]
+\definefontsynonym [cmss17] [plss17] [encoding=pl0]
+\definefontsynonym [cmss8] [plss8] [encoding=pl0]
+\definefontsynonym [cmss9] [plss9] [encoding=pl0]
+\definefontsynonym [cmssbi10] [plssbi10] [encoding=pl0]
+\definefontsynonym [cmssbx10] [plssbx10] [encoding=pl0]
+\definefontsynonym [cmssdc10] [plssdc10] [encoding=pl0]
+\definefontsynonym [cmssi10] [plssi10] [encoding=pl0]
+\definefontsynonym [cmssi12] [plssi12] [encoding=pl0]
+\definefontsynonym [cmssi17] [plssi17] [encoding=pl0]
+\definefontsynonym [cmssi8] [plssi8] [encoding=pl0]
+\definefontsynonym [cmssi9] [plssi9] [encoding=pl0]
+\definefontsynonym [cmssq8] [plssq8] [encoding=pl0]
+\definefontsynonym [cmssqi8] [plssqi8] [encoding=pl0]
+\definefontsynonym [cmsy10] [plsy10] [encoding=pl0]
+\definefontsynonym [cmsy5] [plsy5] [encoding=pl0]
+\definefontsynonym [cmsy6] [plsy6] [encoding=pl0]
+\definefontsynonym [cmsy7] [plsy7] [encoding=pl0]
+\definefontsynonym [cmsy8] [plsy8] [encoding=pl0]
+\definefontsynonym [cmsy9] [plsy9] [encoding=pl0]
+\definefontsynonym [cmtcsc10] [pltcsc10] [encoding=pl0]
+\definefontsynonym [cmtex10] [pltex10] [encoding=pl0]
+\definefontsynonym [cmtex8] [pltex8] [encoding=pl0]
+\definefontsynonym [cmtex9] [pltex9] [encoding=pl0]
+\definefontsynonym [cmti10] [plti10] [encoding=pl0]
+\definefontsynonym [cmti12] [plti12] [encoding=pl0]
+\definefontsynonym [cmti7] [plti7] [encoding=pl0]
+\definefontsynonym [cmti8] [plti8] [encoding=pl0]
+\definefontsynonym [cmti9] [plti9] [encoding=pl0]
+\definefontsynonym [cmtt10] [pltt10] [encoding=pl0]
+\definefontsynonym [cmtt12] [pltt12] [encoding=pl0]
+\definefontsynonym [cmtt8] [pltt8] [encoding=pl0]
+\definefontsynonym [cmtt9] [pltt9] [encoding=pl0]
+\definefontsynonym [cmu10] [plu10] [encoding=pl0]
+\definefontsynonym [cmvtt10] [plvtt10] [encoding=pl0]
+
+\endinput
diff --git a/tex/context/base/font-pos.tex b/tex/context/base/font-pos.tex
index 1193db8fb..7894110e7 100644
--- a/tex/context/base/font-pos.tex
+++ b/tex/context/base/font-pos.tex
@@ -8,7 +8,7 @@
%D copyright=J. Hagen]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This file load the Adobe Times Roman, Helvetica and
diff --git a/tex/context/base/font-ptm.tex b/tex/context/base/font-ptm.tex
index 6b375a539..d5ef35dab 100644
--- a/tex/context/base/font-ptm.tex
+++ b/tex/context/base/font-ptm.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module defines the Standard Adobe Times Roman.
diff --git a/tex/context/base/font-uni.tex b/tex/context/base/font-uni.tex
new file mode 100644
index 000000000..8f0a0bfbd
--- /dev/null
+++ b/tex/context/base/font-uni.tex
@@ -0,0 +1,439 @@
+%D \module
+%D [ file=font-uni,
+%D version=1999.10.10,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=\UNICODE\ Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Font Macros / UNICODE Support}
+
+%D I wrote this module when \WangLei\ asked me how to use
+%D Chinese in \CONTEXT. From the samples he sent me, I deduced
+%D that some mixture of one and two byte encoding was used,
+%D which he confirmed. Since \TEX\ normally does not use the
+%D characters $>127$, so as long as the two byte characters
+%D have a first character with code $>127$, we can use active
+%D characters to handle them. In an optimistic mood, I called
+%D this module the \UNICODE\ font module. In the module that
+%D handles Chinese, we will see that some more interpretation
+%D is involved, which is why the macros handling those
+%D characters look ahead.
+
+\startmessages dutch library: fonts
+ 21: het is veiliger om (pdf)eTeX te gebruiken
+\stopmessages
+
+\startmessages english library: fonts
+ 21: using (pdf)eTeX is more save
+\stopmessages
+
+\startmessages german library: fonts
+ 21: Verwenden von (pdf)eTeX ist sicherer
+\stopmessages
+
+\unprotect
+
+%D \macros
+%D {handleunicodeflowglyph, uchar,
+%D handleunicodeglyph, insertunicodeglyph,
+%D unicodeposition, unicodeone, unicodetwo}
+%D
+%D For the moment \UNICODE\ support is rather primitive but
+%D nevertheless effective. The reference to \UNICODE\ is not
+%D entirely correct, since in many cases one will use \quote
+%D {older} mappings, but in principle, \UNICODE\ can be
+%D supported.
+%D
+%D We expect each character to come as two eight bit
+%D characters. Those doubles are handled by making all
+%D characters in the range $>127$ active, so that they can
+%D pick up the next one, and act upon both their values.
+%D Internally only numbers are used. A first implementation
+%D simply internally prefixed the second part of the \UNICODE\
+%D pair with \type {\string} or \type {\char}, but this was
+%D not that handy when it came to testing those values.
+%D Because in principle we are dealing with an encoding, the
+%D making active is handled in \type {enco-uni}.
+%D
+%D There are two commands to handle unicode characters:
+%D
+%D \starttypen
+%D \handleunicodeflowglyph{number}{character}
+%D \uchar{number}{number}
+%D \stoptypen
+%D
+%D The first one can be assigned to an active character, the
+%D second one can be used to directly access a glyph. Both
+%D command call \type {\handleunicodeglyph} that in turn
+%D calls \type {\insertunicodeglyph}. Both can be overruled
+%D in specialized modules. The low level command \type
+%D {\unicodeglyph} can best be left untouched, which is not
+%D so much a problem because there is a hook into this macro:
+%D \type {\unicodecharcommand}.
+%D
+%D In most cases one will redefine \type {\handleunicodeglyph}
+%D in such a way that it identifies special situations first,
+%D takes some actions next, calls \type {\insertunicodeglyph},
+%D if needed with \type {\unicodecharcommand} changed, and
+%D finally does some finishing:
+%D
+%D \starttyping
+%D \def\handleunicodeglyph%
+%D {take actions based on \unicodeone-two-position cq. \nextglyph
+%D redefine \unicodecharcommand if needed
+%D expand \insertunicodeglyph
+%D take some final actions}
+%D \stoptyping
+
+\newcount\unicodeposition
+
+% \def\handleunicodeflowglyph#1#2%
+% {\def\dohandleunicodeflowglyph{\dodohandleunicodeflowglyphA{#1}{#2}}%
+% \futurelet\nextglyph\dohandleunicodeflowglyph}
+%
+% %D The first alternative (A) takes a character as second
+% %D argument and is used in the primary handler introduced
+% %D earlier.
+%
+% \def\dodohandleunicodeflowglyphA#1#2%
+% {\bgroup
+% \def\unicodeone{#1}%
+% \edef\unicodetwo{\number\expandafter`\string#2}% takes also <128 !
+% \unicodeposition=\unicodeone\unicodetwo\relax
+% \handleunicodeglyph
+% \egroup}
+%
+% %D The second alternative (B) takes numbers and is used in
+% %D the \type {\uchar} command. This command takes two
+% %D decimal numbers.
+%
+% \def\dodohandleunicodeflowglyphB#1#2%
+% {\bgroup
+% \def\unicodeone{#1}%
+% \def\unicodetwo{#2}%
+% \unicodeposition=\unicodeone\unicodetwo\relax
+% \handleunicodeglyph
+% \egroup}
+%
+% \unexpanded\def\uchar%
+% {\let\nextglyph\relax
+% \dodohandleunicodeflowglyphB}
+
+%D The multistep approach is needed to pick up the second
+%D token, since this token can have any value and any
+%D catcode.
+
+\def\handleunicodeflowglyph#1%
+ {\bgroup
+ \edef\unicodeone{#1}%
+ \@EA\afterassignment\@EA\dohandleunicodeflowglyph
+ \@EA\chardef\@EA\nexttoken\@EA=\@EA`\string}
+
+\def\dohandleunicodeflowglyph%
+ {\futurelet\nextglyph\dodohandleunicodeflowglyph}
+
+\def\dodohandleunicodeflowglyph%
+ {\edef\unicodetwo{\the\nexttoken}%
+ \unicodeposition=\unicodeone\unicodetwo\relax
+ \handleunicodeglyph
+ \egroup}
+
+\unexpanded\def\uc#1#2% used in tricky situations
+ {\bgroup
+ \edef\unicodeone{#1}%
+ \afterassignment\dohandleunicodeflowglyph\chardef\nexttoken}
+
+\unexpanded\def\uchar#1#2% use as standalone glyph
+ {\bgroup
+ \let\nextglyph\relax
+ \edef\unicodeone{#1}%
+ \edef\unicodetwo{#2}%
+ \unicodeposition=\unicodeone\unicodetwo\relax
+ \handleunicodeglyph
+ \egroup}
+
+% Alternative, handles [char >127]{number} too.
+%
+% \def\handleunicodeflowglyph#1%
+% {\bgroup
+% \edef\unicodeone{#1}%
+% \futurelet\nexttoken\dohandleunicodeflowglyph}
+%
+% \def\dohandleunicodeflowglyph%
+% {\ifx\nexttoken\bgroup
+% \expandafter\dohandleunicodeflowglyphA
+% \else
+% \expandafter\dohandleunicodeflowglyphB
+% \fi}
+%
+% \def\dohandleunicodeflowglyphA#1%
+% {\chardef\nexttoken=#1\relax
+% \dodohandleunicodeflowglyph}
+%
+% \def\dohandleunicodeflowglyphB%
+% {\@EA\afterassignment\@EA\dodohandleunicodeflowglyph
+% \@EA\chardef\@EA\nexttoken\@EA=\@EA`\string}
+%
+% \def\dodohandleunicodeflowglyph%
+% {\futurelet\nextglyph\dododohandleunicodeflowglyph}
+%
+% \def\dododohandleunicodeflowglyph%
+% {\edef\unicodetwo{\the\nexttoken}%
+% \unicodeposition=\unicodeone\unicodetwo\relax
+% \handleunicodeglyph
+% \egroup}
+%
+% Can be used with (the less byte hungry alternative):
+%
+% sub unirecode
+% { my ($a,$b) = @_ ;
+% if ((ord($b)<0x80)&&($b !~ /[a-zA-Z0-9]/))
+% { print "$b" ; ++$recoded ;
+% #return "\\uc\{" . ord($a) . "\}\{". ord($b) . "\}" }
+% return "$a\{". ord($b) . "\}" }
+% else
+% { return "$a$b" } }
+
+\def\insertunicodeglyph%
+ {\unicodeglyph\unicodeone\unicodetwo}
+
+\let\handleunicodeglyph=\insertunicodeglyph
+
+%D One can use the \type {\unicodeposition} in the macros
+%D that handle pre and post material.
+
+%D \macros
+%D {unicodestyle, unicodecharcommand}
+%D
+%D Each character pair will become one glyph. Because \TEX\
+%D cannot handle fonts with more that 256 characters, we use
+%D \TFM\ files for each range. The first character of the pair
+%D is appended to the name of a font, and the second is used to
+%D access the glyph in that font. This means that a particular
+%D font is split up in subfonts with names in the range:
+%D
+%D \starttypen
+%D <filename>80 ... <filename>ff
+%D \stoptypen
+%D
+%D The \type {<filename>} as well as the composed name are
+%D mapped ones. The next macros take care of this mapping.
+%D Let us assume that the next mapping has taken place,
+%D
+%D \starttyping
+%D \definefontsynonym [UnicodeRegular] [gbsong]
+%D \stoptyping
+%D
+%D Let us also assume that we are dealing with the range \type
+%D {b1}. Given that a font name results from:
+%D
+%D \starttyping
+%D \truefontname{\truefontname{UnicodeRegular}b1}
+%D \stoptyping
+%D
+%D we get \type {gbsongb1}. The outer \type {\truefontname}
+%D takes care of additional mapping, so when we say:
+%D
+%D \starttyping
+%D \definefontsynonym [gbsongb1] [gbsong-b1]
+%D \stoptyping
+%D
+%D the filename used will be \type {gbsong-b1}. From the next
+%D definition it will be clear that other fontshapes are also
+%D supported. The prefix \type {Unicode} is mapped!
+%D
+%D The command \type {\unicodecharcommand} can be used to
+%D handle special cases. At that moment \type {1em} is known.
+
+\def\unicodestyle%
+ {\truefontname\s!Unicode\fontstylesuffix}
+
+\let\unicodecharcommand\firstofoneargument
+
+\unexpanded\def\unicodeglyph#1#2% watch the double mapping
+ {\bgroup
+ \bodyfontsize=\unicodescale\bodyfontsize
+ \font\unicodefont=\truefontname{\truefontname\unicodestyle\lchexnumbers{#1}}
+ at \currentfontscale\bodyfontsize
+ \unicodestrut\unicodefont\unicodecharcommand{\char#2\relax}%
+ \egroup}
+
+%D \macros
+%D {setunicodestrut, setunicodescale, nextglyph,
+%D handleunicodeglyph, insertunicodeglyph}
+%D
+%D A careful analysis of the previous macros, learns that the
+%D process of mapping comes down to:
+%D
+%D \startopsomming[opelkaar,n]
+%D \som taking care of preceding material (and spacing)
+%D \som defining the font at \type {\currentfontscale} $\times$
+%D \type {\unicodescale} $\times$ \type {\bodyfontsize}
+%D \som inserting a \type {\unicodestrut}
+%D \som inserting the character (glyph)
+%D \som executing some actions afterwards
+%D \stopopsomming
+%D
+%D The actions before and after placing the glyph, is up to
+%D the user supplied handler. This handler (\type
+%D {\handleunicodeglpyh}) must, at a certain moment, insert
+%D the glyph using \type {\insertunicodeglyph}
+
+\def\setunicodescale#1%
+ {\def\unicodescale{#1}}
+
+\def\dosetunicodestrut#1#2% height depth
+ {\def\unicodestrut%
+ {\vrule
+ \!!width\!!zeropoint
+ \!!height#1\ht\strutbox
+ \!!depth#2\dp\strutbox
+ \relax}}
+
+\def\setunicodestrut#1#2% height depth
+ {\ifdim#1\ht\strutbox>\!!zeropoint
+ \dosetunicodestrut{#1}{#2}%
+ \else\ifdim#1\dp\strutbox>\!!zeropoint
+ \dosetunicodestrut{#1}{#2}%
+ \else
+ \let\unicodestrut\empty
+ \fi\fi}
+
+%D The additional scaling and strut default to:
+
+\setunicodescale{1}
+\setunicodestrut{1}{1}
+
+%D The actual code for the additional actions as well as
+%D specific spacing is handled outside these routines. The
+%D character after the two that are under treatment is
+%D available in \type {\nextglyph}.
+
+%D \macros
+%D {defineunicodefont, setupunicodefont}
+%D
+%D Apart from this rather low level implementation, we also
+%D provide a more user friendly alternative. Given that one
+%D has defined:
+%D
+%D \starttypen
+%D \defineunicodefont
+%D [SimChi] [SimplifiedChinese]
+%D [ \c!schaal=0.85,
+%D \c!hoogte=1.25,
+%D \c!diepte=1.00,
+%D \c!interlinie=yes,
+%D \c!conversie=\chinesenumber,
+%D \c!commando=\handlechineseunicodeglyph]
+%D \stoptypen
+%D
+%D Together with:
+%D
+%D \starttypen
+%D \definefontsynonym [SimplifiedChineseRegular] [gbsong]
+%D \definefontsynonym [SimplifiedChineseSlanted] [gbsongsl]
+%D \stoptypen
+%D
+%D we can now switch to Simplified Chinese by saying \type
+%D {SimChi}. Some values can be changed afterwards with
+%D
+%D \starttypen
+%D \setupunicodefont[SimChi][...=...]
+%D \stoptypen
+%D
+%D Specific initializations can be assigned to \type
+%D {commands}.
+
+\beginTEX
+
+ \def\unicodeTEXwarning%
+ {\writeline\showmessage{\m!fonts}{21}{}\writeline
+ \global\let\unicodeTEXwarning\relax}
+
+\endTEX
+
+
+\beginETEX \protected
+
+ \let\unicodeTEXwarning\relax
+
+\endETEX
+
+\def\defineunicodefont%
+ {\dotripleempty\dodefineunicodefont}
+
+\def\dodefineunicodefont[#1][#2][#3]%
+ {\unicodeTEXwarning
+ \doifinstringelse{=}{#3}
+ {\setupunicodefont[#1][#3]}
+ {\copyparameters
+ [\??uc#1][\??uc#3]
+ [\c!hoogte,\c!diepte,\c!schaal,\c!commandos,
+ \c!interlinie,\c!commando,\c!conversie]}%
+ \doifelsenothing{#2}
+ {\setvalue{#1}{[uc font #1 undefined]}}
+ {\setvalue{\??uc#1\c!file}{#2}%
+ \doifundefined{\??ff#2\s!Bold}
+ {\definefontsynonym[#2\s!Bold] [#2\s!Regular]%
+ \definefontsynonym[#2\s!Slanted] [#2\s!Regular]%
+ \definefontsynonym[#2\s!Italic] [#2\s!Regular]%
+ \definefontsynonym[#2\s!BoldSlanted][#2\s!Slanted]%
+ \definefontsynonym[#2\s!BoldItalic] [#2\s!Italic]}%
+ \setvalue{#1}{\enableunicodefont{#1}}}}
+
+\def\setupunicodefont%
+ {\dodoubleempty\dosetupunicodefont}
+
+\def\dosetupunicodefont[#1][#2]%
+ {\doifundefined{\??uc#1\c!commando}
+ {\copyparameters
+ [\??uc#1][\??uc\s!default]
+ [\c!hoogte,\c!diepte,\c!schaal,\c!commandos,
+ \c!interlinie,\c!commando,\c!conversie]}%
+ \getparameters[\??uc#1][#2]}
+
+\def\enableunicodefont#1%
+ {\definefontsynonym[\s!Unicode][\getvalue{\??uc#1\c!file}]%
+ \def\unicodescale {\getvalue{\??uc#1\c!schaal}}%
+ \def\unicodeheight {\getvalue{\??uc#1\c!hoogte}}%
+ \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}%
+ \getvalue{\??uc#1\c!commandos}\relax}
+
+%D \macros
+%D {unicodedigits}
+%D
+%D For convenience we also predefine a number conversion
+%D macro:
+
+\let\unicodedigits\number
+
+%D Because we cannot be sure of the pressence of all font
+%D styles, we remap some by default.
+
+\definefontsynonym [\s!Unicode\s!Bold] [\s!Unicode\s!Regular]
+\definefontsynonym [\s!Unicode\s!Slanted] [\s!Unicode\s!Regular]
+\definefontsynonym [\s!Unicode\s!Italic] [\s!Unicode\s!Regular]
+\definefontsynonym [\s!Unicode\s!BoldSlanted] [\s!Unicode\s!Slanted]
+\definefontsynonym [\s!Unicode\s!BoldItalic] [\s!Unicode\s!Italic]
+
+\setupunicodefont
+ [\s!default]
+ [\c!hoogte=1,
+ \c!diepte=1,
+ \c!schaal=1,
+ \c!interlinie=\v!ja,
+ \c!commando=\insertunicodeglyph,
+ \c!conversie=\number]
+
+\protect \endinput
diff --git a/tex/context/base/font-unk.tex b/tex/context/base/font-unk.tex
index de87ec30a..3cdb226c4 100644
--- a/tex/context/base/font-unk.tex
+++ b/tex/context/base/font-unk.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module is rather important, because it enables us to
@@ -24,7 +24,7 @@
\definefontsynonym [SerifBoldSlanted] [unknown]
\definefontsynonym [SerifCaps] [unknown]
-\definefontsynonym [Sans]
+\definefontsynonym [Sans] [unknown]
\definefontsynonym [SansBold] [unknown]
\definefontsynonym [SansItalic] [unknown]
\definefontsynonym [SansSlanted] [unknown]
@@ -145,20 +145,20 @@
itc=SansItalic sa c,
itd=SansItalic sa d,
sl=SansSlanted sa 1,
- ita=SansSlanted sa a,
- itb=SansSlanted sa b,
- itc=SansSlanted sa c,
- itd=SansSlanted sa d,
+ sla=SansSlanted sa a,
+ slb=SansSlanted sa b,
+ slc=SansSlanted sa c,
+ sld=SansSlanted sa d,
bi=SansBoldItalic sa 1,
- ita=SansBoldItalic sa a,
- itb=SansBoldItalic sa b,
- itc=SansBoldItalic sa c,
- itd=SansBoldItalic sa d,
+ bia=SansBoldItalic sa a,
+ bib=SansBoldItalic sa b,
+ bic=SansBoldItalic sa c,
+ bid=SansBoldItalic sa d,
bs=SansBoldSlanted sa 1,
- ita=SansBoldSlanted sa a,
- itb=SansBoldSlanted sa b,
- itc=SansBoldSlanted sa c,
- itd=SansBoldSlanted sa d,
+ bsa=SansBoldSlanted sa a,
+ bsb=SansBoldSlanted sa b,
+ bsc=SansBoldSlanted sa c,
+ bsd=SansBoldSlanted sa d,
sc=SansCaps sa 1,
sca=SansCaps sa a,
scb=SansCaps sa b,
@@ -166,21 +166,41 @@
scd=SansCaps sa d]
\definebodyfont [default] [tt]
- [ tf=Mono sa 1,
- tfa=Mono sa a,
- tfb=Mono sa b,
- tfc=Mono sa c,
- tfd=Mono sa d,
- sl=MonoSlanted sa 1,
- sla=MonoSlanted sa a,
- slb=MonoSlanted sa b,
- slc=MonoSlanted sa c,
- sld=MonoSlanted sa d,
- it=MonoItalic sa 1,
- ita=MonoItalic sa a,
- itb=MonoItalic sa b,
- itc=MonoItalic sa c,
- itd=MonoItalic sa d]
+ [ tf=Mono sa 1,
+ tfa=Mono sa a,
+ tfb=Mono sa b,
+ tfc=Mono sa c,
+ tfd=Mono sa d,
+ bf=MonoBold sa 1,
+ bfa=MonoBold sa a,
+ bfb=MonoBold sa b,
+ bfc=MonoBold sa c,
+ bfd=MonoBold sa d,
+ it=MonoItalic sa 1,
+ ita=MonoItalic sa a,
+ itb=MonoItalic sa b,
+ itc=MonoItalic sa c,
+ itd=MonoItalic sa d,
+ sl=MonoSlanted sa 1,
+ sla=MonoSlanted sa a,
+ slb=MonoSlanted sa b,
+ slc=MonoSlanted sa c,
+ sld=MonoSlanted sa d,
+ bi=MonoBoldItalic sa 1,
+ bia=MonoBoldItalic sa a,
+ bib=MonoBoldItalic sa b,
+ bic=MonoBoldItalic sa c,
+ bid=MonoBoldItalic sa d,
+ bs=MonoBoldSlanted sa 1,
+ bsa=MonoBoldSlanted sa a,
+ bsb=MonoBoldSlanted sa b,
+ bsc=MonoBoldSlanted sa c,
+ bsd=MonoBoldSlanted sa d,
+ sc=MonoCaps sa 1,
+ sca=MonoCaps sa a,
+ scb=MonoCaps sa b,
+ scc=MonoCaps sa c,
+ scd=MonoCaps sa d]
\definebodyfont [default] [mm]
[mr=MathRoman sa 1,
@@ -193,14 +213,14 @@
\definebodyfont [default] [hw]
[ tf=Handwriting sa 1,
tfa=Handwriting sa a,
- tfb=Handwriting sa b
+ tfb=Handwriting sa b,
tfc=Handwriting sa c,
tfd=Handwriting sa d]
\definebodyfont [default] [cg]
[ tf=Calligraphy sa 1,
tfa=Calligraphy sa a,
- tfb=Calligraphy sa b
+ tfb=Calligraphy sa b,
tfc=Calligraphy sa c,
tfd=Calligraphy sa d]
diff --git a/tex/context/base/font-vnr.tex b/tex/context/base/font-vnr.tex
new file mode 100644
index 000000000..67bdbebe1
--- /dev/null
+++ b/tex/context/base/font-vnr.tex
@@ -0,0 +1,50 @@
+%D \module
+%D [ file=font-vnr,
+%D version=1999.12.12,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Computer Modern Vietnamese,
+%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.
+
+\definefontsynonym [Serif] [vnb10] [encoding=x5]
+\definefontsynonym [SerifBold] [vnb10] [encoding=x5]
+\definefontsynonym [SerifItalic] [vnb10] [encoding=x5]
+\definefontsynonym [SerifSlanted] [vnb10] [encoding=x5]
+\definefontsynonym [SerifBoldItalic] [vnb10] [encoding=x5]
+\definefontsynonym [SerifBoldSlanted] [vnb10] [encoding=x5]
+\definefontsynonym [SerifCaps] [vnb10] [encoding=x5]
+
+\definefontsynonym [Sans] [vnb10] [encoding=x5]
+\definefontsynonym [SansBold] [vnb10] [encoding=x5]
+\definefontsynonym [SansItalic] [vnb10] [encoding=x5]
+\definefontsynonym [SansSlanted] [vnb10] [encoding=x5]
+\definefontsynonym [SansBoldItalic] [vnb10] [encoding=x5]
+\definefontsynonym [SansBoldSlanted] [vnb10] [encoding=x5]
+\definefontsynonym [SansCaps] [vnb10] [encoding=x5]
+
+\definefontsynonym [Mono] [vnb10] [encoding=x5]
+\definefontsynonym [MonoBold] [vnb10] [encoding=x5]
+\definefontsynonym [MonoItalic] [vnb10] [encoding=x5]
+\definefontsynonym [MonoSlanted] [vnb10] [encoding=x5]
+\definefontsynonym [MonoBoldItalic] [vnb10] [encoding=x5]
+\definefontsynonym [MonoBoldSlanted] [vnb10] [encoding=x5]
+\definefontsynonym [MonoCaps] [vnb10] [encoding=x5]
+
+\definefontsynonym [MathRoman] [vnb10] [encoding=x5]
+\definefontsynonym [MathExtension] [cmex10]
+\definefontsynonym [MathItalic] [cmmi10]
+\definefontsynonym [MathSymbol] [cmsy10]
+
+\definefontsynonym [OldStyle] [MathItalic]
+
+\definebodyfont
+ [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt]
+ [rm,ss,tt,mm]
+ [default]
+
+\endinput
diff --git a/tex/context/base/java-ans.tex b/tex/context/base/java-ans.tex
index f038c8677..ab10bb2a8 100644
--- a/tex/context/base/java-ans.tex
+++ b/tex/context/base/java-ans.tex
@@ -2,13 +2,13 @@
%D [ file=java-ans,
%D version=1998.06.01,
%D title=\CONTEXT\ JavaScript Macros,
-%D subtitle=Answer Analyzation,
+%D subtitle=Answer Analization,
%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 licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\startJSpreamble{Do_Check_Answer} used later
diff --git a/tex/context/base/java-fil.tex b/tex/context/base/java-fil.tex
index 041eeb163..2875998dd 100644
--- a/tex/context/base/java-fil.tex
+++ b/tex/context/base/java-fil.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\startJSpreamble{Auxiliary} used now
@@ -19,8 +19,10 @@
return(Paths[0]) }
function Print_Page_Range(From, To) % gaat mis, nog geen args mogelijk
- { if ((From>0)&&(To>=From))
- { this.print(false,From,To,true) } }
+ { if ((Number(From)>0)&&(Number(To)>=Number(From)))
+ { var myFrom = Number(From)-1 ;
+ var myTo = Number(To)-1 ;
+ this.print(false,myFrom,myTo,true) } }
function Print_This_Page ()
{ this.print(false,this.pageNum,this.pageNum,true) }
diff --git a/tex/context/base/java-fld.tex b/tex/context/base/java-fld.tex
index 1178aaa75..d349392e8 100644
--- a/tex/context/base/java-fld.tex
+++ b/tex/context/base/java-fld.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% nu nog alles geladen, moet dus anders
@@ -125,7 +125,7 @@
event.value = Sanitized_TeX_String(event.value) ;
\stopJScode
-\startJSpreamble {Do_With_Field}
+\startJSpreamble {Do_With_Field} used now
var visible_field = new Array() ; % no garbage collection !
var visible_fields = 0 ;
@@ -135,13 +135,16 @@ function Hide_When_Down ()
function Hide_Field ( Name )
{ var v = this.getField(Name) ;
- if (v) { v.hidden = true } }
+ if (v)
+ { % this.dirty = false ;
+ v.hidden = true } }
function Vide_Field ( Name )
{ var v = this.getField(Name) ;
if (v)
{ ++visible_fields ;
visible_field[visible_fields] = Name ;
+ % this.dirty = false ;
v.hidden = false } }
function Hide_Fields ()
@@ -199,31 +202,33 @@ function Flip_Fields ( Name )
\startJScode{Forget_Changes} this.dirty = false \stopJScode
-\startJSpreamble {Walk_Field} used later
-
-function Walk_Field ( FieldSet )
- { var i = 1 ;
- while (true)
- { v = this.getField(FieldSet+":"+i) ;
- if (v)
- { if (v.value=="On")
- { v.value = "Off" ;
- var ii = i ; ii++ ;
- v = this.getField(FieldSet+":"+ii) ;
- if (!v)
- { v = this.getField(FieldSet+":"+1) }
- if (v)
- { v.value = "On" }
- break }
- i++ }
- else
- { break } } }
-
-\stopJSpreamble
-
-\startJScode {Walk_Field} uses {Walk_Field}
- Walk_Field (JS_S_1) ;
-\stopJScode
+\definereference[ForgetChanges][JS(Forget_Changes)]
+
+% \startJSpreamble {Walk_Field} used later
+%
+% function Walk_Field ( FieldSet )
+% { var i = 1 ;
+% while (true)
+% { v = this.getField(FieldSet+":"+i) ;
+% if (v)
+% { if (v.value=="On")
+% { v.value = "Off" ;
+% var ii = i ; ii++ ;
+% v = this.getField(FieldSet+":"+ii) ;
+% if (!v)
+% { v = this.getField(FieldSet+":"+1) }
+% if (v)
+% { v.value = "On" }
+% break }
+% i++ }
+% else
+% { break } } }
+%
+% \stopJSpreamble
+%
+% \startJScode {Walk_Field} uses {Walk_Field}
+% Walk_Field (JS_S_1) ;
+% \stopJScode
\startJSpreamble {Walk_Field} used later
diff --git a/tex/context/base/java-ini.tex b/tex/context/base/java-ini.tex
index 34e9e6a71..885292578 100644
--- a/tex/context/base/java-ini.tex
+++ b/tex/context/base/java-ini.tex
@@ -8,16 +8,21 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context JavaScript Macros / Initialization}
+% BUG: preamble zonder used/used en split
+
% JavaScript support is under development. In the near future
% a slightly different model will be used. The JScode stuff
% will probably become just auto function inclusion and the
% JS_* things will disappear. First I have to find a way to
% deal with global variables so the 'uses' thing will remain.
+
+% ook p{ref}
+% documentation should be corrected to JS(
% Also, obeylines will be supported.
@@ -46,6 +51,12 @@
2: unbekannte Preamble --
\stopmessages
+\startmessages czech library: javascript
+ title: javascript
+ 1: nacita se soubor skriptu --
+ 2: neznama preambule --
+\stopmessages
+
%D \TEX\ is not the right tool to check the \JAVA\ code; the
%D most we can do is reporting some passed variables:
@@ -232,8 +243,9 @@
\def\docommando##1%
{\doifundefinedelse{\r!java\r!java##1}
{\showmessage{\m!javascript}{2}{##1}}
- {\doglobal\increment\currentJSpreamble
- \doglobal\addtocommalist{##1}\allJSpreambles}}%
+ {\useJSpreamblenow{##1}}}%
+% {\doglobal\increment\currentJSpreamble
+% \doglobal\addtocommalist{##1}\allJSpreambles}}%
\def\do##1##2%
{\xdef\JScode{\ifdirectJScode#1(\JScode)\else\JScode##2\fi}%
%\xdef\JScode{JS\string_N=\the\scratchcounter;\JScode}%
@@ -327,30 +339,58 @@
\newcounter\nofJSpreambles
\newcounter\currentJSpreamble
-\long\gdef\startJSpreamble#1 #2
- {\doifelse{#2}{used}
- {\def\next{\dostartJSpreamble{#1} }}
- {\def\next{\dostartJSpreamble{#1} now #2 }}%
+\long\def\startJSpreamble#1 #2 %
+ {\bgroup % we need to restore the catcodes
+ \popendofline % just in case it happens while reading lists
+ \doifelse{#2}{used}
+ {\def\next{\dostartJSpreamble#1 }}
+ {\def\next{\dostartJSpreamble#1 now #2 }}%
\next}
-
+
\long\def\dostartJSpreamble#1 #2 #3\stopJSpreamble%
- {\bgroup
- \processaction
+ {\processaction
[#2]
[ later=>\chardef\JSstatus=0,
now=>\chardef\JSstatus=1,
\s!default=>\chardef\JSstatus=2,
\s!unknown=>\chardef\JSstatus=2]%
- \presetJSfunctions #3function ()\end%
- \ifcase\JSstatus
- \long\setgvalue{\r!java\r!java#1}{#3}%
- \else
- \long\setgvalue{\r!java\r!java#1}{#3}%
- \doglobal\increment\currentJSpreamble
- \doglobal\addtocommalist{#1}\allJSpreambles
+ \presetJSfunctions #3function ()\end
+ \long\setgvalue{\r!java\r!java#1}{#3}%
+ \ifcase\JSstatus \else
+ \useJSpreamblenow{#1}%
\fi
\egroup}
+%D \macros
+%D {setJSpreamble, addtoJSpreamble}
+%D
+%D In addition to the previous preamble definitions, we can
+%D set a preamble \citeer {in||line} and add tokens to a
+%D preamble.
+
+\def\setJSpreamble#1#2%
+ {\doifundefined{\r!java\r!java#1}
+ {\setgvalue{\r!java\r!java#1}{#2;}%
+ \doglobal\increment\currentJSpreamble
+ \doglobal\addtocommalist{#1}\allJSpreambles}}
+
+\def\addtoJSpreamble#1#2%
+ {\doifdefinedelse{\r!java\r!java#1}
+ {\edef\!!stringa{\r!java\r!java#1}%
+ \edef\!!stringb{\csname\!!stringa\endcsname}%
+ \@EA\setgvalue\@EA\!!stringa\@EA{\!!stringb #2;}}
+ {\setJSpreamble{#1}{#2}}}
+
+%D \macros
+%D {useJSpreamblenow}
+%D
+%D The next macro can be used to force inclusion of postponed
+%D \JAVASCRIPT\ preambles.
+
+\def\useJSpreamblenow#1%
+ {\doglobal\increment\currentJSpreamble
+ \doglobal\addtocommalist{#1}\allJSpreambles}
+
%D Because we want to check for valid calls, we preload the
%D functions. This means that we can call them directly as
%D well as indirectly when defined by \type {\startJScode} etc.
@@ -390,18 +430,6 @@
\egroup
\fi}
-%\def\flushJSpreamble%
-% {\iflocation\ifx\allJSpreambles\empty\else
-% \bgroup
-% \presetJSpreamble
-% \expanded{\doflushJSpreamble{\allJSpreambles}}%
-% \global\let\flushJSpreamble=\relax
-% \global\let\allJSpreambles=\empty
-% \egroup
-% \fi\fi}
-%
-%\prependtoks \flushJSpreamble \to \everylastshipout
-
\def\flushJSpreamble%
{\iflocation\ifx\allJSpreambles\empty\else
\ifcase\nofJSpreambles\else\ifnum\nofJSpreambles=\currentJSpreamble
@@ -539,7 +567,7 @@
%D The magic 500 in the next hack prevents the input stack from
%D overflowing when large scripts are sanitized.
-\beginTEX
+%\beginTEX
\def\dododoPSsanitizeJScode%
{\ifcase\JSisTEX\ifcase\JScomment
@@ -560,13 +588,15 @@
\aftergroup\sanitizedJScode
\let\next=}}
-\endTEX
-
-\beginETEX \aftergroup
-
-\let\dododoPSsanitizeJScode\relax
-
-\endETEX
+%\endTEX
+%
+% Why is \aftergroup not doing what I expect?
+%
+% \beginETEX \aftergroup
+%
+% \let\dododoPSsanitizeJScode\relax
+%
+% \endETEX
%D The macro \type{\doPSsanitizeJScode} converts its argument
%D into the macro \type{\sanitizedJScode}, thereby prefixing
diff --git a/tex/context/base/lang-alt.tex b/tex/context/base/lang-alt.tex
index df39d7fa3..beb746f33 100644
--- a/tex/context/base/lang-alt.tex
+++ b/tex/context/base/lang-alt.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% Uigur, Uzbek
@@ -57,8 +57,8 @@
\setuplabeltext [\s!tr] [\v!sub\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!tr] [\v!bijlage=]
\setuplabeltext [\s!tr] [\v!deel=Fas\i l ]
-\setuplabeltext [\s!tr] [\v!regel=sat\i r]
-\setuplabeltext [\s!tr] [\v!regels=sat\i r..]
+\setuplabeltext [\s!tr] [\v!regel=sat\i r ]
+\setuplabeltext [\s!tr] [\v!regels=sat\i r ]
\setuplabeltext [\s!tr] [\v!january=ocak]
\setuplabeltext [\s!tr] [\v!february=\c{s}ubat]
diff --git a/tex/context/base/lang-ana.tex b/tex/context/base/lang-ana.tex
index 04aca1031..19fecb0c9 100644
--- a/tex/context/base/lang-ana.tex
+++ b/tex/context/base/lang-ana.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Anatolian Languages}
diff --git a/tex/context/base/lang-art.tex b/tex/context/base/lang-art.tex
index db814af60..87d243a62 100644
--- a/tex/context/base/lang-art.tex
+++ b/tex/context/base/lang-art.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% Esperanto
diff --git a/tex/context/base/lang-bal.tex b/tex/context/base/lang-bal.tex
index 96f589572..7ef8e8e49 100644
--- a/tex/context/base/lang-bal.tex
+++ b/tex/context/base/lang-bal.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% Lettish/Latvian, Lithuanian
diff --git a/tex/context/base/lang-cel.tex b/tex/context/base/lang-cel.tex
index 949ca493b..b4eae8b52 100644
--- a/tex/context/base/lang-cel.tex
+++ b/tex/context/base/lang-cel.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% Breton, Welsh, Irish, Manx, Scottish Gaelic
diff --git a/tex/context/base/lang-chi.tex b/tex/context/base/lang-chi.tex
new file mode 100644
index 000000000..bb80bb249
--- /dev/null
+++ b/tex/context/base/lang-chi.tex
@@ -0,0 +1,91 @@
+%D \module
+%D [ file=lang-chi,
+%D version=1998.10.10,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Chinese,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D suggestions=Wang Lei,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Language Macros / Chinese}
+
+%D This module is coded using the \UNICODE\ support built in
+%D \CONTEXT. Therefore, \type {\uchar} is used instead of latin
+%D characters.
+
+\unprotect
+
+\definesystemconstant {chinese} \definesystemconstant {cn}
+
+\installlanguage[\s!cn][\c!status=\v!start]
+
+\setupheadtext [\s!cn] [\v!inhoud=\uchar{196}{191}\uchar{194}{188}]
+\setupheadtext [\s!cn] [\v!tabellen=\uchar{196}{191}\uchar{177}{237}]
+\setupheadtext [\s!cn] [\v!figuren=\uchar{196}{191}\uchar{205}{188}]
+\setupheadtext [\s!cn] [\v!grafieken=Graphics]
+\setupheadtext [\s!cn] [\v!intermezzos=Intermezzos]
+\setupheadtext [\s!cn] [\v!index=\uchar{203}{247}\uchar{210}{253}]
+\setupheadtext [\s!cn] [\v!afkortingen=Abbreviations]
+\setupheadtext [\s!cn] [\v!logos=Logos]
+\setupheadtext [\s!cn] [\v!eenheden=Units]
+
+\setuplabeltext [\s!cn] [\v!tabel=\uchar{177}{237} ]
+\setuplabeltext [\s!cn] [\v!figuur=\uchar{205}{188} ]
+\setuplabeltext [\s!cn] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!cn] [\v!grafiek=Illustration ]
+\setuplabeltext [\s!cn] [\v!bijlage=]
+\setuplabeltext [\s!cn] [\v!deel={\cnencoding\cnencodedintro,\cnencoding\cnencodedpart}]
+\setuplabeltext [\s!cn] [\v!hoofdstuk={\cnencoding\cnencodedintro,\cnencoding\cnencodedchapter}]
+\setuplabeltext [\s!cn] [\v!paragraaf={\cnencoding\cnencodedintro,\cnencoding\cnencodedsection}]
+\setuplabeltext [\s!cn] [\v!regel=line ]
+\setuplabeltext [\s!cn] [\v!regels=lines ]
+
+\setuplabeltext [\s!cn] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!cn] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!cn] [\v!sub\v!sub\v!sub\v!paragraaf=]
+
+%D One can specify a split labeltext, as demonstrated in
+%D the definition of the \type {part} label. Unfortunately
+%D the glyphs of both part depend on the encoding. Therefore,
+%D we have an encoding section here.
+
+\def\cnencoding{\enableencoding[\chineseencoding]} % ugly and temporary
+
+\startencoding[gbk]
+ \definecommand cnencodedintro {\uchar{181}{218}}
+ \definecommand cnencodedpart {\uchar{178}{191}\uchar{183}{214}}
+ \definecommand cnencodedchapter {\uchar{213}{194}}
+ \definecommand cnencodedsection {\uchar{189}{218}}
+\stopencoding
+
+\startencoding[big5]
+ \definecommand cnencodedintro {\uchar{178}{196}}
+ \definecommand cnencodedpart {\uchar{179}{161}\uchar{164}{192}}
+ \definecommand cnencodedchapter {\uchar{179}{185}}
+ \definecommand cnencodedsection {\uchar{184} {96}}
+\stopencoding
+
+%D From this definition one can deduce that language, input
+%D encoding, font encoding, and glyph meaning form a pretty
+%D complex four dimensional space.
+
+\startlanguagespecifics[\s!cn]
+
+\stelsectiein[\v!sectionlevel-1][\c!conversie=\s!chinese]
+\stelsectiein[\v!sectionlevel-2][\c!conversie=\s!chinese]
+\stelsectiein[\v!sectionlevel-3][\c!conversie=\s!chinese]
+\stelsectiein[\v!sectionlevel-4][\c!conversie=\s!chinese]
+\stelsectiein[\v!sectionlevel-5][\c!conversie=\s!chinese]
+\stelsectiein[\v!sectionlevel-6][\c!conversie=\s!chinese]
+\stelsectiein[\v!sectionlevel-7][\c!conversie=\s!chinese]
+
+% \stelblokkopjesin[\c!conversie=\s!chinese]
+
+\stoplanguagespecifics
+
+\protect \endinput
diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex
index 966c2ee62..0281c164e 100644
--- a/tex/context/base/lang-ger.tex
+++ b/tex/context/base/lang-ger.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% Danish, Faeroese, Icelandic, Norwegian, Swedish, German, Yiddish
@@ -158,8 +158,6 @@
%D The next section is dedicated to Tobias Burnus.
-\let\normaldoublequote="
-
\startlanguagespecifics[\s!de]
\installcompoundcharacter "a {\moveaccent{-.1ex}\"a\midworddiscretionary}
@@ -224,11 +222,41 @@
%D An experimental hack:
\startencoding[pdfdoc]
- \startlanguagespecifics[de]% hm
+ \startlanguagespecifics[\s!de]% hm, a % is needed
\defineactivecharacter " {\"}
\stoplanguagespecifics
\stopencoding
+\startencoding[ec]
+ \startlanguagespecifics[\s!de]%
+ \installcompoundcharacter "a {\"a}
+ \installcompoundcharacter "e {\"e}
+ \installcompoundcharacter "i {\"\i}
+ \installcompoundcharacter "o {\"o}
+ \installcompoundcharacter "u {\"u}
+ \installcompoundcharacter "A {\"A}
+ \installcompoundcharacter "E {\"E}
+ \installcompoundcharacter "I {\"I}
+ \installcompoundcharacter "O {\"O}
+ \installcompoundcharacter "U {\"U}
+ \stoplanguagespecifics
+\stopencoding
+
+\startencoding[texnansi]
+ \startlanguagespecifics[\s!de]%
+ \installcompoundcharacter "a {\"a}
+ \installcompoundcharacter "e {\"e}
+ \installcompoundcharacter "i {\"\i}
+ \installcompoundcharacter "o {\"o}
+ \installcompoundcharacter "u {\"u}
+ \installcompoundcharacter "A {\"A}
+ \installcompoundcharacter "E {\"E}
+ \installcompoundcharacter "I {\"I}
+ \installcompoundcharacter "O {\"O}
+ \installcompoundcharacter "U {\"U}
+ \stoplanguagespecifics
+\stopencoding
+
%D This hack should be perfected.
\setupheadtext [\s!en] [\v!inhoud=Contents]
@@ -244,7 +272,7 @@
\setupheadtext [\s!de] [\v!tabellen=Tabellen]
\setupheadtext [\s!da] [\v!tabellen=Tablen]
\setupheadtext [\s!sv] [\v!tabellen=Tabellen]
-\setupheadtext [\s!af] [\v!tabellen=Tabellen]
+\setupheadtext [\s!af] [\v!tabellen=Tabelle]
\setupheadtext [\s!no] [\v!tabellen=Tabellen]
\setupheadtext [\s!en] [\v!figuren=Figures]
@@ -252,7 +280,7 @@
\setupheadtext [\s!de] [\v!figuren=Abbildungen]
\setupheadtext [\s!da] [\v!figuren=Figuren]
\setupheadtext [\s!sv] [\v!figuren=Figuren]
-\setupheadtext [\s!af] [\v!figuren=Afbeeldingen]
+\setupheadtext [\s!af] [\v!figuren=Figure]
\setupheadtext [\s!no] [\v!figuren=Avbildningen]
\setupheadtext [\s!en] [\v!grafieken=Graphics]
@@ -260,7 +288,7 @@
\setupheadtext [\s!de] [\v!grafieken=Graphiken]
\setupheadtext [\s!da] [\v!grafieken=Grafiken]
\setupheadtext [\s!sv] [\v!grafieken=Grafiskt]
-\setupheadtext [\s!af] [\v!grafieken=Grafieken]
+\setupheadtext [\s!af] [\v!grafieken=Grafieke]
\setupheadtext [\s!no] [\v!grafieken=Grafikken]
\setupheadtext [\s!en] [\v!intermezzos=Intermezzos]
@@ -284,7 +312,7 @@
\setupheadtext [\s!de] [\v!afkortingen=Abk\"urzungen]
\setupheadtext [\s!da] [\v!afkortingen=Abbreviations]
\setupheadtext [\s!sv] [\v!afkortingen=F\"orkortningen]
-\setupheadtext [\s!af] [\v!afkortingen=Afkortingen]
+\setupheadtext [\s!af] [\v!afkortingen=Afkortings]
\setupheadtext [\s!no] [\v!afkortingen=Forkortelsen]
\setupheadtext [\s!en] [\v!logos=Logos]
@@ -300,7 +328,7 @@
\setupheadtext [\s!de] [\v!eenheden=Einheiten]
\setupheadtext [\s!da] [\v!eenheden=Enheden]
\setupheadtext [\s!sv] [\v!eenheden=Enheten]
-\setupheadtext [\s!af] [\v!eenheden=Eenheiden]
+\setupheadtext [\s!af] [\v!eenheden=Eenhede]
\setupheadtext [\s!no] [\v!eenheden=Enheten]
\setuplabeltext [\s!en] [\v!tabel=Table ]
@@ -316,7 +344,7 @@
\setuplabeltext [\s!de] [\v!figuur=Abbildung ]
\setuplabeltext [\s!da] [\v!figuur=Figur ]
\setuplabeltext [\s!sv] [\v!figuur=Figur ]
-\setuplabeltext [\s!af] [\v!figuur=Afbeelding ]
+\setuplabeltext [\s!af] [\v!figuur=Figuur ]
\setuplabeltext [\s!no] [\v!figuur=Avbildning ]
\setuplabeltext [\s!en] [\v!intermezzo=Intermezzo ]
@@ -340,7 +368,7 @@
\setuplabeltext [\s!de] [\v!hoofdstuk=]
\setuplabeltext [\s!da] [\v!hoofdstuk=]
\setuplabeltext [\s!sv] [\v!hoofdstuk=]
-\setuplabeltext [\s!af] [\v!hoofdstuk=]
+\setuplabeltext [\s!af] [\v!hoofdstuk=] % [\v!hoofdstuk=hoofstuk]
\setuplabeltext [\s!no] [\v!hoofdstuk=]
\setuplabeltext [\s!en] [\v!paragraaf=]
@@ -348,7 +376,7 @@
\setuplabeltext [\s!de] [\v!paragraaf=]
\setuplabeltext [\s!da] [\v!paragraaf=]
\setuplabeltext [\s!sv] [\v!paragraaf=]
-\setuplabeltext [\s!af] [\v!paragraaf=]
+\setuplabeltext [\s!af] [\v!paragraaf=] % [\v!paragraaf=paragraaf]
\setuplabeltext [\s!no] [\v!paragraaf=]
\setuplabeltext [\s!en] [\v!sub\v!paragraaf=]
@@ -380,7 +408,7 @@
\setuplabeltext [\s!de] [\v!bijlage=]
\setuplabeltext [\s!da] [\v!bijlage=]
\setuplabeltext [\s!sv] [\v!bijlage=]
-\setuplabeltext [\s!af] [\v!bijlage=]
+\setuplabeltext [\s!af] [\v!bijlage=] % [\v!bijlage=bylae]
\setuplabeltext [\s!no] [\v!bijlage=]
\setuplabeltext [\s!en] [\v!deel=Part ]
@@ -391,21 +419,21 @@
\setuplabeltext [\s!af] [\v!deel=Deel ]
\setuplabeltext [\s!no] [\v!deel=Del ]
-\setuplabeltext [\s!en] [\v!regel=line]
-\setuplabeltext [\s!nl] [\v!regel=regel]
-\setuplabeltext [\s!de] [\v!regel=Zeile]
-\setuplabeltext [\s!da] [\v!regel=linie]
-\setuplabeltext [\s!sv] [\v!regel=rad]
-\setuplabeltext [\s!af] [\v!regel=re\"el]
-\setuplabeltext [\s!no] [\v!regel=linje]
-
-\setuplabeltext [\s!en] [\v!regels=lines]
-\setuplabeltext [\s!nl] [\v!regels=regels]
-\setuplabeltext [\s!de] [\v!regels=Zeilen]
-\setuplabeltext [\s!da] [\v!regels=linien]
-\setuplabeltext [\s!sv] [\v!regels=raden]
-\setuplabeltext [\s!af] [\v!regels=re\"elen]
-\setuplabeltext [\s!no] [\v!regels=linjen]
+\setuplabeltext [\s!en] [\v!regel=line ]
+\setuplabeltext [\s!nl] [\v!regel=regel ]
+\setuplabeltext [\s!de] [\v!regel=Zeile ]
+\setuplabeltext [\s!da] [\v!regel=linie ]
+\setuplabeltext [\s!sv] [\v!regel=rad ]
+\setuplabeltext [\s!af] [\v!regel=re\"el ]
+\setuplabeltext [\s!no] [\v!regel=linje ]
+
+\setuplabeltext [\s!en] [\v!regels=lines ]
+\setuplabeltext [\s!nl] [\v!regels=regels ]
+\setuplabeltext [\s!de] [\v!regels=Zeilen ]
+\setuplabeltext [\s!da] [\v!regels=linien ]
+\setuplabeltext [\s!sv] [\v!regels=raden ]
+\setuplabeltext [\s!af] [\v!regels=re\"els ]
+\setuplabeltext [\s!no] [\v!regels=linjen ]
\setuplabeltext [\s!en] [\v!january=January]
\setuplabeltext [\s!en] [\v!february=February]
@@ -556,20 +584,23 @@
%D Rather new ...
-\setuplabeltext [\s!nl] [\v!oppagina=op pagina]
+\setuplabeltext [\s!nl] [\v!pagina=pagina ]
+\setuplabeltext [\s!nl] [\v!oppagina=op pagina ]
\setuplabeltext [\s!nl] [\v!hierboven=hierboven]
\setuplabeltext [\s!nl] [\v!hieronder=hieronder]
-\setuplabeltext [\s!nl] [\v!zie=zie]
+\setuplabeltext [\s!nl] [\v!zie=zie ]
-\setuplabeltext [\s!en] [\v!oppagina=at page]
+\setuplabeltext [\s!en] [\v!pagina=page ]
+\setuplabeltext [\s!en] [\v!oppagina=at page ]
\setuplabeltext [\s!en] [\v!hierboven=as we show above]
\setuplabeltext [\s!en] [\v!hieronder=as we show below]
-\setuplabeltext [\s!en] [\v!zie=see]
+\setuplabeltext [\s!en] [\v!zie=see ]
-\setuplabeltext [\s!de] [\v!oppagina=auf Seite]
+\setuplabeltext [\s!de] [\v!pagina=Seite ]
+\setuplabeltext [\s!de] [\v!oppagina=auf Seite ]
\setuplabeltext [\s!de] [\v!hierboven=siehe oben]
\setuplabeltext [\s!de] [\v!hieronder=siehe unten]
-\setuplabeltext [\s!de] [\v!zie=sieh]
+\setuplabeltext [\s!de] [\v!zie=sieh ]
%D ... and to be completed!
@@ -578,7 +609,7 @@
%D \ShowAllLanguageValues [\s!de] [german] duitse degelijkheid
%D \ShowAllLanguageValues [\s!da] [danish] deense ...
%D \ShowAllLanguageValues [\s!sv] [swedish] zweedse ...
-%D \ShowAllLanguageValues [\s!af] [afrikaans] afrikaanse ...
+%D \ShowAllLanguageValues [\s!af] [afrikaans] afrikaanse gasvryheid
%D \ShowAllLanguageValues [\s!no] [norwegian] noorse ...
\protect
diff --git a/tex/context/base/lang-grk.tex b/tex/context/base/lang-grk.tex
index ed3bfb03d..4ecfdd95c 100644
--- a/tex/context/base/lang-grk.tex
+++ b/tex/context/base/lang-grk.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% Modern Greek
diff --git a/tex/context/base/lang-hnl.tex b/tex/context/base/lang-hnl.tex
deleted file mode 100644
index 5932769c3..000000000
--- a/tex/context/base/lang-hnl.tex
+++ /dev/null
@@ -1,32 +0,0 @@
-%I n=Afbreekregels
-%I c=\taal,\vertaal
-%I
-%I Er kunnen verschillende afbreekregels worden gehanteerd.
-%I Deze worden ingesteld met het commando:
-%I
-%I \taal[taal]
-%I
-%I waarbij voor taal kan worden ingevuld:
-%I
-%I nl nederlands
-%I en engels
-%I du duits
-%I fa frans
-%I
-%I Er zijn ook verkorte commando's beschikbaar:
-%I
-%I \nl \en \du \fa
-%P
-%I Er kan automatisch van taal gewisseld worden met het
-%I commando:
-%I
-%I \vertaal[nl=,en=,nl=,fa=,...]
-%I
-%I Afhankelijk van de actuele taal, wordt de toegekende tekst
-%I gezet: \en this is an \vertaal[nl=voorbeeld,en=example],
-%I \nl of in goed nederlands: een \vertaal.
-%I
-%I Als niets wordt meegegeven, dan wordt de laatst opgegeven
-%I waarde gebruikt.
-
-\endinput
diff --git a/tex/context/base/lang-ind.tex b/tex/context/base/lang-ind.tex
index 9b48ecbe4..f00e6ab19 100644
--- a/tex/context/base/lang-ind.tex
+++ b/tex/context/base/lang-ind.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% 34 languages
diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex
index b3090854b..8a15a3136 100644
--- a/tex/context/base/lang-ini.tex
+++ b/tex/context/base/lang-ini.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module implements the (for the moment still simple)
@@ -30,6 +30,8 @@
6: taal -- is niet gedefinieerd
7: taal specifieke opties [--] introduceren een skip van --
8: taal specifieke opties [--] naadloos toegevoegd
+ 9: taal -- is actief
+ 10: patronen --geladen
\stopmessages
\startmessages english library: linguals
@@ -42,6 +44,8 @@
6: language -- is undefined
7: language specific options [--] introduce a -- skip
8: language specific options [--] seamless appended
+ 9: language -- is active
+ 10: patterns --loaded
\stopmessages
\startmessages german library: linguals
@@ -54,12 +58,31 @@
6: Sprache -- ist undefiniert
7: Sprachenspezifische Option [--] fuegt eine Luecke von -- ein
8: Sprachenspezifische Option [--] nahtlos hinzugefuegt
+ 9: Sprache -- ist aktiv
+ 10: Trennmuster --geladen
+\stopmessages
+
+% TOM: 9 and 10
+
+\startmessages czech library: linguals
+ title: jazyky
+ 1: vzory -- pro -- nacteny (n=--)
+ 2: zadne vzory -- pro -- (n=--)
+ 3: deleni slov -- pro -- nacteno (n=--)
+ 4: zadne deleni slov -- pro -- (n=--)
+ 5: vzory pro -- nenacteny
+ 6: jazyk -- neni definovan
+ 7: specificke volby jazyka [--] zavadeji -- (zavlecenou) mezeru
+ 8: specificke volby jazyka [--] bez mezer pripojeny
+ 9: language -- is active
+ 10: vzory --nacteny
\stopmessages
% dutch : \lccode`\'=`\'
% english : \lccode`\'=0
% german : \lccode`\'=`\'
% french : \lccode`\'=`\'
+% czech : \lccode`\'=`\'
%D When loading hyphenation patterns, \TEX\ assign a number to
%D each loaded table, starting with~0. Switching to a specific
@@ -78,13 +101,17 @@
\newcounter\loadedlanguage
%D \macros
-%D {currentlanguage}
+%D {currentlanguage, setcurrentlanguage}
%D
%D Instead of numbers,we are going to use symbolic names for
%D the languages. The current langage is saved in the macro
-%D \type{\currentlanguage}.
+%D \type {\currentlanguage}. The setup macro is mainly used
+%D for cosmetic purposes.
+
+\let\currentlanguage=\empty
-\let\currentlanguage = \empty
+\def\setupcurrentlanguage[#1]%
+ {\edef\currentlanguage{#1}}
%D \macros
%D {installlanguage}
@@ -123,12 +150,28 @@
\expanded{\noexpand\uppercase{\noexpand\edef\noexpand\ascii{#1}}}%
\doifundefined{\ascii}{\setvalue{\ascii}{\language[#2]}}}
+%D \macros
+%D {preloadlanguages}
+%D
%D We first try to load the files defined as file synonym
%D for \type {lang-*.pat} and \type {lang-*.hyp}. After that we
-%D fall back on those files.
+%D fall back on those files. The macro \type {\preloadpatterns}
+%D reports which patterns are loaded and what hyphenmin
+%D values are set.
+
+\let\preloadedpatterns\empty
+
+\def\showpatterns#1%
+ {\getvalue{\??la#1\s!lefthyphenmin}%
+ -#1-%
+ \getvalue{\??la#1\s!righthyphenmin} }
+
+\def\preloadlanguages%
+ {\doifsomething{\preloadedpatterns}
+ {\showmessage{\m!linguals}{10}{\preloadedpatterns}}}
\def\doinstalllanguage[#1][#2]%
- {\doifinstringelse{=}{#2}
+ {\ConvertConstantAfter\doifinstringelse{=}{#2}
{\doifdefinedelse{\??la#1\c!status}
{\getparameters[\??la#1][#2]}
{\setvalue{\l!prefix!#1}{#1}%
@@ -172,8 +215,10 @@
\s!mapping=\languagedefault{#1}\s!mapping,
\s!encoding=\languagedefault{#1}\s!encoding,
#2]}}}%
- \doifvalue{\??la#1\c!default}{#1} {\letvalue{\??la#1\c!default}\empty}%
- \doifvalue{\??la#1\s!patterns}{#1}{\letvalue{\??la#1\c!default}\empty}%
+ \doifvalue{\??la#1\c!default}{#1}{\letvalue{\??la#1\c!default}\empty}%
+% loop in deo
+% \doifvalue{\??la#1\s!patterns}{#1}{\letvalue{\??la#1\c!default}\empty}%
+%
\doifelsevalue{\??la#1\c!status}{\v!start}
{\doifelsevaluenothing{\??la#1\s!patterns}
{\edef\languagesuffix{#1}}
@@ -182,20 +227,19 @@
{\normallanguage=\loadedlanguage
\letvalue{\??la\??la\languagesuffix}=\loadedlanguage
\bgroup
+ \scratchtoks=\everyjob % we don't want additional junk put there
+ \let\showpatterns\relax
\startencoding[\getvalue{\??la\languagesuffix\s!encoding}]%
- \usemapping[\getvalue{\??la\languagesuffix\s!mapping}]%
- %\readsysfile{\f!languageprefix\languagesuffix.\f!patternsextension}
- % {\setxvalue{\??la#1\s!patterns}{\languagesuffix}%
- % \showmessage{\m!linguals}{1}{\languagesuffix,#1,\loadedlanguage}}
- % {\showmessage{\m!linguals}{2}{\languagesuffix,#1,\loadedlanguage}}%
- %\readsysfile{\f!languageprefix\languagesuffix.\f!hyphensextension}
- % {\showmessage{\m!linguals}{3}{\languagesuffix,#1,\loadedlanguage}}
- % {\showmessage{\m!linguals}{4}{\languagesuffix,#1,\loadedlanguage}}%
+ \enablemapping[\getvalue{\??la\languagesuffix\s!mapping}]%
+\startreadingfile
+\let\dohandleaccent\donthandleaccent % no checking done
\readsysfile{\truefilename{\f!languageprefix\languagesuffix.\f!patternsextension}}
{\setxvalue{\??la#1\s!patterns}{\languagesuffix}%
+ \xdef\preloadedpatterns{\preloadedpatterns\showpatterns{\languagesuffix}}%
\showmessage{\m!linguals}{1}{\languagesuffix,#1,\loadedlanguage}}
{\readsysfile{\f!languageprefix\languagesuffix.\f!patternsextension}
{\setxvalue{\??la#1\s!patterns}{\languagesuffix}%
+ \xdef\preloadedpatterns{\preloadedpatterns\showpatterns{\languagesuffix}}%
\showmessage{\m!linguals}{1}{\languagesuffix,#1,\loadedlanguage}}
{\showmessage{\m!linguals}{2}{\languagesuffix,#1,\loadedlanguage}}}%
\readsysfile{\truefilename{\f!languageprefix\languagesuffix.\f!hyphensextension}}
@@ -203,7 +247,9 @@
{\readsysfile{\f!languageprefix\languagesuffix.\f!hyphensextension}
{\showmessage{\m!linguals}{3}{\languagesuffix,#1,\loadedlanguage}}
{\showmessage{\m!linguals}{4}{\languagesuffix,#1,\loadedlanguage}}}%
+\stopreadingfile
\stopencoding
+ \global\everyjob=\scratchtoks
\egroup
\increment\loadedlanguage}
{\bgroup
@@ -213,7 +259,7 @@
\egroup}}
{\showmessage{\m!linguals}{5}{#1}}}
{\setvalue{\l!prefix!#1}{#2}%
- \dodoinstalllanguage{#1}{#2}}}
+ \dodoinstalllanguage{#1}{#2}}}
% ^^ \language[#1] gave unwanted side effect of loading language specifics
@@ -314,7 +360,7 @@
\fi
\edef\currentlanguage{#1}%
\enablelanguagespecifics[#1]%
- \usemapping[\getvalue{\??la#1\s!mapping}]%
+ \enablemapping[\getvalue{\??la#1\s!mapping}]%
\lefthyphenmin =0\getvalue{\??la#1\s!lefthyphenmin}\relax
\righthyphenmin=0\getvalue{\??la#1\s!righthyphenmin}\relax
\processaction
@@ -400,7 +446,7 @@
%D be sure, we check on spurious spaces.
\def\languageencoding%
- {\ifx\characterencoding\@plain@\else
+ {\ifx\characterencoding\nocharacterencoding \else
\characterencoding-%
\fi}
@@ -415,9 +461,9 @@
\bgroup
\setbox0=\hbox{\enablelanguagespecifics[##1]}%
\ifdim\wd0>\!!zeropoint
- \showmessage{\m!linguals}{7}{##1,\the\wd0\space}\wait
+ \showmessage{\m!linguals}{7}{\currentencoding-##1,\the\wd0\space}\wait
\else
- \showmessage{\m!linguals}{8}{##1}%
+ \showmessage{\m!linguals}{8}{\currentencoding-##1}%
\fi
\egroup
\doif{##1}{\currentmainlanguage}
@@ -428,12 +474,14 @@
%D define \type{\do} in such a way that \type{{ }} is removed
%D and the language key is gobbled.
-%\def\enablelanguagespecifics[#1]%
-% {\long\def\do##1##2{##2}%
-% \getvalue{\??la#1\??la}}
-
\def\enablelanguagespecifics[#1]%
{\long\def\do##1##2{##2}%
+ \doifvaluesomething{\??la#1\c!default}
+ {\getvalue{\??la\getvalue{\??la#1\c!default}\??la}%
+ \getvalue{\??la\languageencoding\getvalue{\??la#1\c!default}\??la}}%
+ % or
+ %\doifvaluesomething{\??la#1\c!default}
+ % {\expanded{\enablelanguagespecifics[\getvalue{\??la#1\c!default}]}}%
\getvalue{\??la#1\??la}%
\getvalue{\??la\languageencoding#1\??la}}
@@ -482,18 +530,25 @@
%D Yes I know, they are ugly:
-\unexpanded\def\leftguillemot%
+\def\leftguillemot%
{\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle\ll$}}}
-\unexpanded\def\rightguillemot%
+\def\rightguillemot%
{\hbox{\raise.25ex\hbox{$\scriptscriptstyle\gg$}}}
-\unexpanded\def\leftsubguillemot%
+\def\leftsubguillemot%
{\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle<$}}}
-\unexpanded\def\rightsubguillemot%
+\def\rightsubguillemot%
{\hbox{\raise.25ex\hbox{$\scriptscriptstyle>$}}}
+%D We enable proper substititutions by:
+
+\redefinecharacter leftguillemot
+\redefinecharacter rightguillemot
+\redefinecharacter leftsubguillemot
+\redefinecharacter rightsubguillemot
+
%D Just like with subsentence boundary symbols, quotes
%D placement depends on the current language, therefore we show
%D the defaults here.
@@ -517,22 +572,23 @@
%D \stopregelcorrectie
%D \blanko}
%D
-%D \ShowLanguageValues [nl] [dutch] nederlandse zuinigheid
-%D \ShowLanguageValues [en] [english] engelse humor
+%D \ShowLanguageValues [af] [afrikaans] afrikaanse ...
+%D \ShowLanguageValues [cz] [czech] tjechisch tex
+%D \ShowLanguageValues [cz] [slovak] slowaakse ...
+%D \ShowLanguageValues [da] [danish] deense ...
%D \ShowLanguageValues [de] [german] duitse degelijkheid
+%D \ShowLanguageValues [en] [english] engelse humor
+%D \ShowLanguageValues [fi] [finnish] finse ...
%D \ShowLanguageValues [fr] [french] franse slag
-%D \ShowLanguageValues [sp] [spanish] spaans benauwd
%D \ShowLanguageValues [it] [italian] italiaanse ...
-%D \ShowLanguageValues [da] [danish] deense ...
+%D \ShowLanguageValues [la] [latin] latijnse missen
+%D \ShowLanguageValues [nl] [dutch] nederlandse zuinigheid
+%D \ShowLanguageValues [no] [norwegian] noorse ...
+%D \ShowLanguageValues [pl] [polish] poolse ...
%D \ShowLanguageValues [pt] [portuguese] portugese ...
+%D \ShowLanguageValues [sp] [spanish] spaans benauwd
%D \ShowLanguageValues [sv] [swedish] zweedse ...
-%D \ShowLanguageValues [pl] [polish] poolse ...
-%D \ShowLanguageValues [fi] [finnish] finse ...
-%D \ShowLanguageValues [af] [afrikaans] afrikaanse ...
-%D \ShowLanguageValues [no] [norwegian] noorse ...
%D \ShowLanguageValues [tr] [turkish] turks fruit
-%D \ShowLanguageValues [cz] [czech] tjechisch tex
-%D \ShowLanguageValues [cz] [slovak] slowaakse ...
%D We support a lot of languages. These are specified and
%D loaded in separate files, according to their roots. Here
@@ -565,6 +621,7 @@
%D \NC \s!fr \NC french \NC italic \NC\FR
%D \NC \s!sp \NC spanish \NC italic \NC\MR
%D \NC \s!it \NC italian \NC italic \NC\MR
+%D \NC \s!la \NC latin \NC italic \NC\MR
%D \NC \s!pt \NC portuguese \NC italic \NC\LR
%D \HL
%D \stoptabel
@@ -607,27 +664,16 @@
%D is one of the few places outside the interface modules where
%D \type{\startinterface} is used.
-% \language[\s!en] \mainlanguage[\currentlanguage]
-
-% \startinterface dutch \appendtoks \language[\s!nl]\to \everyjob \stopinterface
-% \startinterface english \appendtoks \language[\s!en]\to \everyjob \stopinterface
-% \startinterface german \appendtoks \language[\s!de]\to \everyjob \stopinterface
-%
-% \startinterface czech \appendtoks \language[\s!cz]\to \everyjob \stopinterface
-%
-% \startinterface french \appendtoks \language[\s!fr]\to \everyjob \stopinterface
-% \startinterface spanish \appendtoks \language[\s!sp]\to \everyjob \stopinterface
-% \startinterface italian \appendtoks \language[\s!it]\to \everyjob \stopinterface
-% \startinterface danish \appendtoks \language[\s!da]\to \everyjob \stopinterface
-% \startinterface portuguese \appendtoks \language[\s!pt]\to \everyjob \stopinterface
-% \startinterface swedish \appendtoks \language[\s!sv]\to \everyjob \stopinterface
-% \startinterface polish \appendtoks \language[\s!pl]\to \everyjob \stopinterface
-% \startinterface finish \appendtoks \language[\s!fi]\to \everyjob \stopinterface
-% \startinterface afrikaans \appendtoks \language[\s!af]\to \everyjob \stopinterface
-% \startinterface norwegian \appendtoks \language[\s!no]\to \everyjob \stopinterface
-% \startinterface turkish \appendtoks \language[\s!tr]\to \everyjob \stopinterface
-
-% \appendtoks \mainlanguage[\currentlanguage] \to \everyjob
+\let\normaldoublequote ="
+\let\normalforwardslash=/
+
+%D We default to english:
+
+\setupcurrentlanguage[\s!en]
+
+\appendtoks\mainlanguage[\currentlanguage]\to\everyjob
+
+\appendtoks\showmessage{\m!linguals}{9}{\currentlanguage}\to\everyjob
\protect
diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex
index 751cad0fe..af1f93d94 100644
--- a/tex/context/base/lang-ita.tex
+++ b/tex/context/base/lang-ita.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% Latin, Italian, Rhaeto-Romanic, Rumanian, Sardian
@@ -60,6 +60,20 @@
\c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar},
\c!status=\v!stop]
+\installlanguage % the same as italian
+ [\s!la]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\lowerrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\lowerrightdoubleninequote,
+ \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar},
+ \c!status=\v!stop]
+
\installlanguage
[\s!pt]
[\c!spatiering=\v!opelkaar,
@@ -81,6 +95,7 @@
\installlanguage [french] [\s!fr]
\installlanguage [spanish] [\s!sp]
\installlanguage [italian] [\s!it]
+\installlanguage [latin] [\s!la]
\installlanguage [portuguese] [\s!pt]
%D Labels and header texts.
@@ -88,112 +103,134 @@
\setupheadtext [\s!fr] [\v!inhoud=Table des mati\`eres]
\setupheadtext [\s!sp] [\v!inhoud=\'Indice]
\setupheadtext [\s!it] [\v!inhoud=Indice]
+\setupheadtext [\s!la] [\v!inhoud=Quod in libro continetur] %Argumentum
\setupheadtext [\s!pt] [\v!inhoud=Conte\'ud]
\setupheadtext [\s!fr] [\v!tabellen=Tables]
\setupheadtext [\s!sp] [\v!tabellen=Tablas]
\setupheadtext [\s!it] [\v!tabellen=Tabelle]
+\setupheadtext [\s!la] [\v!tabellen=Tabulae]
\setupheadtext [\s!pt] [\v!tabellen=Tabelas]
\setupheadtext [\s!fr] [\v!figuren=Figures]
\setupheadtext [\s!sp] [\v!figuren=Ilustraci\'ons]
\setupheadtext [\s!it] [\v!figuren=Illustrazioni]
+\setupheadtext [\s!la] [\v!figuren=Imagines]
\setupheadtext [\s!pt] [\v!figuren=Figuras]
\setupheadtext [\s!fr] [\v!grafieken=Graphiques]
\setupheadtext [\s!sp] [\v!grafieken=Gr\'aficos]
\setupheadtext [\s!it] [\v!grafieken=Grafice]
+\setupheadtext [\s!la] [\v!grafieken=Typi]
\setupheadtext [\s!pt] [\v!grafieken=Gr\'aficos]
\setupheadtext [\s!fr] [\v!intermezzos=Interm\`edes]
\setupheadtext [\s!sp] [\v!intermezzos=intermedios]
\setupheadtext [\s!it] [\v!intermezzos=Intermezzi]
+\setupheadtext [\s!la] [\v!intermezzos=Intermissa]
\setupheadtext [\s!pt] [\v!intermezzos=Intermezzi]
\setupheadtext [\s!fr] [\v!index=Index]
\setupheadtext [\s!sp] [\v!index=\'Indice]
\setupheadtext [\s!it] [\v!index=Indice]
+\setupheadtext [\s!la] [\v!index=Indices]
\setupheadtext [\s!pt] [\v!index=\'Indice]
\setupheadtext [\s!fr] [\v!afkortingen=Abr\'eviations]
\setupheadtext [\s!sp] [\v!afkortingen=Abreviaci\'ons]
\setupheadtext [\s!it] [\v!afkortingen=Abbreviazioni]
+\setupheadtext [\s!la] [\v!afkortingen=Notae]
\setupheadtext [\s!pt] [\v!afkortingen=Abreviaturas]
\setupheadtext [\s!fr] [\v!logos=Logos]
\setupheadtext [\s!sp] [\v!logos=Logotipos]
\setupheadtext [\s!it] [\v!logos=Logotipi]
+\setupheadtext [\s!la] [\v!logos=Typi negotiales]
\setupheadtext [\s!pt] [\v!logos=Logotipos]
\setupheadtext [\s!fr] [\v!eenheden=Unit\'es]
\setupheadtext [\s!sp] [\v!eenheden=Unidads]
\setupheadtext [\s!it] [\v!eenheden=Unit\`a]
+\setupheadtext [\s!la] [\v!eenheden=Modi]
\setupheadtext [\s!pt] [\v!eenheden=Unidades]
\setuplabeltext [\s!fr] [\v!tabel=Table ]
\setuplabeltext [\s!sp] [\v!tabel=Tablas ]
\setuplabeltext [\s!it] [\v!tabel=Tabella ]
+\setuplabeltext [\s!la] [\v!tabel=Tabula ]
\setuplabeltext [\s!pt] [\v!tabel=Tabela ]
\setuplabeltext [\s!fr] [\v!figuur=Figure ]
\setuplabeltext [\s!sp] [\v!figuur=Ilustraci\'on ]
\setuplabeltext [\s!it] [\v!figuur=Illustrazione ]
+\setuplabeltext [\s!la] [\v!figuur=Imago ]
\setuplabeltext [\s!pt] [\v!figuur=Figura ]
\setuplabeltext [\s!fr] [\v!intermezzo=Interm\`ede ]
\setuplabeltext [\s!sp] [\v!intermezzo=intermedio ]
\setuplabeltext [\s!it] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!la] [\v!intermezzo=Intermissum ]
\setuplabeltext [\s!pt] [\v!intermezzo=Intermezzo ]
\setuplabeltext [\s!fr] [\v!grafiek=Illustration ]
\setuplabeltext [\s!sp] [\v!grafiek=Gr\'afico ]
\setuplabeltext [\s!it] [\v!grafiek=Grafica ]
+\setuplabeltext [\s!la] [\v!grafiek=Typus ]
\setuplabeltext [\s!pt] [\v!grafiek=Gr\'afico ]
\setuplabeltext [\s!fr] [\v!hoofdstuk=]
\setuplabeltext [\s!sp] [\v!hoofdstuk=]
\setuplabeltext [\s!it] [\v!hoofdstuk=]
+\setuplabeltext [\s!la] [\v!hoofdstuk=]
\setuplabeltext [\s!pt] [\v!hoofdstuk=]
\setuplabeltext [\s!fr] [\v!paragraaf=]
\setuplabeltext [\s!sp] [\v!paragraaf=]
\setuplabeltext [\s!it] [\v!paragraaf=]
+\setuplabeltext [\s!la] [\v!paragraaf=]
\setuplabeltext [\s!pt] [\v!paragraaf=]
\setuplabeltext [\s!fr] [\v!sub\v!paragraaf=]
\setuplabeltext [\s!sp] [\v!sub\v!paragraaf=]
\setuplabeltext [\s!it] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!la] [\v!sub\v!paragraaf=]
\setuplabeltext [\s!pt] [\v!sub\v!paragraaf=]
\setuplabeltext [\s!fr] [\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!sp] [\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!it] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!la] [\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!pt] [\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!fr] [\v!sub\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!sp] [\v!sub\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!it] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!la] [\v!sub\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!pt] [\v!sub\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!fr] [\v!bijlage=]
\setuplabeltext [\s!sp] [\v!bijlage=]
\setuplabeltext [\s!it] [\v!bijlage=]
+\setuplabeltext [\s!la] [\v!bijlage=]
\setuplabeltext [\s!pt] [\v!bijlage=]
\setuplabeltext [\s!fr] [\v!deel=Section ]
\setuplabeltext [\s!sp] [\v!deel=Parte ]
\setuplabeltext [\s!it] [\v!deel=Parte ]
+\setuplabeltext [\s!la] [\v!deel=Pars ]
\setuplabeltext [\s!pt] [\v!deel=Parte ]
-\setuplabeltext [\s!fr] [\v!regel=ligne]
-\setuplabeltext [\s!sp] [\v!regel=l\'\i nea]
-\setuplabeltext [\s!it] [\v!regel=riga]
-\setuplabeltext [\s!pt] [\v!regel=linha]
+\setuplabeltext [\s!fr] [\v!regel=ligne ]
+\setuplabeltext [\s!sp] [\v!regel=l\'\i nea ]
+\setuplabeltext [\s!it] [\v!regel=riga ]
+\setuplabeltext [\s!la] [\v!regel=versus ]
+\setuplabeltext [\s!pt] [\v!regel=linha ]
-\setuplabeltext [\s!fr] [\v!regels=lignes]
-\setuplabeltext [\s!sp] [\v!regels=l\'\i neas]
-\setuplabeltext [\s!it] [\v!regels=rige]
-\setuplabeltext [\s!pt] [\v!regels=linhas]
+\setuplabeltext [\s!fr] [\v!regels=lignes ]
+\setuplabeltext [\s!sp] [\v!regels=l\'\i neas ]
+\setuplabeltext [\s!it] [\v!regels=rige ]
+\setuplabeltext [\s!la] [\v!regels=versus ]
+\setuplabeltext [\s!pt] [\v!regels=linhas ]
\setuplabeltext [\s!fr] [\v!january=janvier]
\setuplabeltext [\s!fr] [\v!february=f\'evrier]
@@ -234,6 +271,19 @@
\setuplabeltext [\s!it] [\v!november=novembre]
\setuplabeltext [\s!it] [\v!december=dicembre]
+\setuplabeltext [\s!la] [\v!january=Ianuarius]
+\setuplabeltext [\s!la] [\v!february=Februarius]
+\setuplabeltext [\s!la] [\v!march=Martius]
+\setuplabeltext [\s!la] [\v!april=Aprilis]
+\setuplabeltext [\s!la] [\v!may=Maius]
+\setuplabeltext [\s!la] [\v!june=Iunius]
+\setuplabeltext [\s!la] [\v!july=Iulius] % formerly Quintilis
+\setuplabeltext [\s!la] [\v!august=Augustus] % formerly Sextilis
+\setuplabeltext [\s!la] [\v!september=September]
+\setuplabeltext [\s!la] [\v!october=October]
+\setuplabeltext [\s!la] [\v!november=November]
+\setuplabeltext [\s!la] [\v!december=December]
+
\setuplabeltext [\s!pt] [\v!january=janeiro]
\setuplabeltext [\s!pt] [\v!february=fevereiro]
\setuplabeltext [\s!pt] [\v!march=mar\c{c}o]
@@ -271,6 +321,14 @@
\setuplabeltext [\s!it] [\v!friday=venerd\`\i]
\setuplabeltext [\s!it] [\v!saturday=sabato]
+\setuplabeltext [\s!la] [\v!sunday=Dies Solis]
+\setuplabeltext [\s!la] [\v!monday=Dies Lunae]
+\setuplabeltext [\s!la] [\v!tuesday=Dies Martis]
+\setuplabeltext [\s!la] [\v!wednesday=Dies Mercuri]
+\setuplabeltext [\s!la] [\v!thursday=Dies Iovis]
+\setuplabeltext [\s!la] [\v!friday=Dies Veneris]
+\setuplabeltext [\s!la] [\v!saturday=Dies Saturni]
+
\setuplabeltext [\s!pt] [\v!sunday=domingo]
\setuplabeltext [\s!pt] [\v!monday=segunda-feira]
\setuplabeltext [\s!pt] [\v!tuesday=ter\c{c}a-feira]
@@ -282,6 +340,7 @@
%D \ShowAllLanguageValues [\s!fr] [french] franse slag
%D \ShowAllLanguageValues [\s!sp] [spanish] spaans benauwd
%D \ShowAllLanguageValues [\s!it] [italian] italiaanse ...
+%D \ShowAllLanguageValues [\s!la] [latin] latijnse missen
%D \ShowAllLanguageValues [\s!pt] [portuguese] portugese ...
\protect
diff --git a/tex/context/base/lang-lab.tex b/tex/context/base/lang-lab.tex
index 733f5367e..714188dab 100644
--- a/tex/context/base/lang-lab.tex
+++ b/tex/context/base/lang-lab.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Language Head and Label Texts}
@@ -24,6 +24,11 @@
%D Burnus, who's extensive languages oriented library helped us
%D a lot in finding the right translations. All those labels
%D are collected in files that reflect their common ancestor.
+%D
+%D Not all languages can be satisfied with the labeling
+%D mechanism as provided here. Chinese for instance put a label
+%D in front as well as after a part number. This is why the
+%D current implementation of labels supports two labels too.
%D \macros
%D {setupheadtext, setuplabeltext}
@@ -38,7 +43,7 @@
%D of its use.
\def\setupheadtext%
- {\dosetupsometextprefix\v!kop}
+ {\dosetupsometextprefix\c!titel}
\def\setuplabeltext%
{\dosetupsometextprefix\c!label}
@@ -56,14 +61,17 @@
\fi}%
\dodoubleempty\dododosetupsometextprefix}
+\def\doassignsometextprefix[#1][#2,#3,#4]%
+ {\setvalue{#1}{\handletextprefix{#2}{#3}}}
+
\def\dosetupsometextprefix#1%
{\def\dodocommando[##1][##2=##3]%
- {\setvalue{##1##2}{\handletextprefix{##3}}}%
+ {\doassignsometextprefix[##1##2][##3,,]}%
\dodosetupsometextprefix{#1}}
-%D By setting \type{\handletextprefix} to something else than
-%D \type{\relax}, like \type{\uppercase}, one can influence the
-%D conversion.
+%D By changing the meaning of \type {\handletextprefix} we
+%D can filter the left and right labeltext as well as convert
+%D labels to uppercase.
%D
%D These commands accept all kind of inputs:
%D
@@ -77,7 +85,9 @@
%D The last two cases concern the current language.
%D \macros
-%D {headtext, labeltext, LABELTEXT}
+%D {headtext,
+%D labeltext, leftlabeltext, rightlabeltext, labeltexts,
+%D LABELTEXT, LEFTLABELTEXT, RIGHTLABELTEXT, LABELTEXTS}
%D
%D Once defined, head and label texts can be called upon using:
%D
@@ -90,18 +100,34 @@
\def\headlanguage {\currentmainlanguage}
\def\headtext%
- {\dogetupsometextprefix\headlanguage\v!kop}
+ {\let\handletextprefix\firstoftwoarguments
+ \dogetupsometextprefix\headlanguage\c!titel}
-\def\labeltext%
- {\dogetupsometextprefix\labellanguage\c!label}
+\def\leftlabeltext%
+ {\let\handletextprefix\firstoftwoarguments
+ \dogetupsometextprefix\labellanguage\c!label}
-\def\LABELTEXT#1%
+\def\rightlabeltext%
+ {\let\handletextprefix\secondoftwoarguments
+ \dogetupsometextprefix\labellanguage\c!label}
+
+\def\DOLABELTEXT#1%
{\bgroup
- \let\handletextprefix=\uppercase
\the\everyuppercase
\dogetupsometextprefix\labellanguage\c!label{#1}% not \labeltext (see \MONTH)
\egroup}
+\def\LEFTLABELTEXT%
+ {\def\handletextprefix##1##2{\uppercase{##1}}\DOLABELTEXT}
+
+\def\RIGHTLABELTEXT%
+ {\def\handletextprefix##1##2{\uppercase{##2}}\DOLABELTEXT}
+
+\let\labeltext \leftlabeltext
+\let\LABELTEXT \LEFTLABELTEXT
+\def\labeltexts#1#2{\leftlabeltext{#1}#2\rightlabeltext{#1}}
+\def\LABELTEXTS#1#2{\LEFTLABELTEXT{#1}#2\RIGHTLABELTEXT{#1}}
+
\def\dodogetupsometextprefix#1#2#3#4%
{\doifdefinedelse{#2#1#3}
{\getvalue{#2#1#3}}
@@ -109,12 +135,15 @@
{\getvalue{#2#3}}
{#4}}}
+\newif\iflabeltextdone % needs to be reset elsewhere
+
\unexpanded\def\dogetupsometextprefix#1#2#3%
- {\dodogetupsometextprefix{#1}{#2}{#3}
+ {\global\labeltextdonetrue
+ \dodogetupsometextprefix{#1}{#2}{#3}
{\dodogetupsometextprefix{\defaultlanguage{#1}}{#2}{#3}
{\dodogetupsometextprefix{\s!en}{#2}{#3}
{\dodogetupsometextprefix{\s!nl}{#2}{#3}
- {{\tttf[#2: #3/#1]~}}}}}}
+ {{\tttf[#2:~#3/#1]~}}}}}}
%D \macros
%D {presetheadtext,presetlabeltext}
@@ -126,11 +155,11 @@
\def\dopresetsometextprefix#1%
{\def\dodocommando[##1][##2=##3]%
{\doifundefined{##1##2}
- {\setvalue{##1##2}{\handletextprefix{##3}}}}%
+ {\doassignsometextprefix[##1##2][##3,,]}}%
\dodosetupsometextprefix{#1}}
\def\presetheadtext%
- {\dopresetsometextprefix\v!kop}
+ {\dopresetsometextprefix\c!titel}
\def\presetlabeltext%
{\dopresetsometextprefix\c!label}
@@ -175,7 +204,6 @@
%D \macros
%D {assigntranslation}
-%D {}
%D
%D This macro is a system macro, and can be used to assign a
%D translation to a macro. Its form is:
diff --git a/tex/context/base/lang-sla.tex b/tex/context/base/lang-sla.tex
index 1a8b6df17..83b36e2ca 100644
--- a/tex/context/base/lang-sla.tex
+++ b/tex/context/base/lang-sla.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=lang-sla,
-%D version=1997.09.03,
+%D version=1999.09.13, % 1997.09.03
%D title=\CONTEXT\ Language Macros,
%D subtitle=Slavic Languages,
%D author=Hans Hagen / Tobias Burnus,
@@ -8,9 +8,12 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+%D Thanks to Grzegorz Sapijaszko for fine||tuning the Polish
+%D section and Zeljko Vrba for the Croation translations.
+
% Belarussian, Russian, Ukrainian, Bulgarian, Macedonian,
% Serbo-Croatian, Slovenian, Czech, Kushubian,
% Lusatian/Sorbian/Wendish, Polish, Slovak, Albanian,
@@ -27,14 +30,14 @@
\c!rightsentence=---,
\c!leftsubsentence=---,
\c!rightsubsentence=---,
- \c!leftquote=\upperleftsinglesixquote,
+ \c!leftquote=\lowerleftsingleninequote,
\c!rightquote=\upperrightsingleninequote,
- \c!leftquotation=\upperleftdoublesixquote,
+ \c!leftquotation=\lowerleftdoubleninequote,
\c!rightquotation=\upperrightdoubleninequote,
- \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!datum={\v!dag,{.},\ ,\v!maand,\ ,\v!jaar},
\c!status=\v!stop]
-\installlanguage % not yet set up
+\installlanguage
[\s!cz]
[\c!spatiering=\v!opelkaar,
\c!leftsentence=---,
@@ -45,10 +48,10 @@
\c!rightquote=\upperrightsingleninequote,
\c!leftquotation=\upperleftdoublesixquote,
\c!rightquotation=\upperrightdoubleninequote,
- \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar},
\c!status=\v!stop]
-\installlanguage % not yet set up
+\installlanguage
[\s!sk]
[\c!spatiering=\v!opelkaar,
\c!leftsentence=---,
@@ -62,110 +65,245 @@
\c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
\c!status=\v!stop]
-\installlanguage [polish] [\s!pl]
-\installlanguage [czech] [\s!cz]
-\installlanguage [slovak] [\s!sk]
+\installlanguage
+ [\s!hr]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar},
+ \c!status=\v!stop]
-\setupheadtext [\s!pl] [\v!inhoud=Spis rzeczy]
+\installlanguage [polish] [\s!pl]
+\installlanguage [czech] [\s!cz]
+\installlanguage [slovak] [\s!sk]
+\installlanguage [croatian] [\s!hr]
+
+% specifics
+
+\startlanguagespecifics[\s!pl]
+
+ \installcompoundcharacter /a {\k a}
+ \installcompoundcharacter /c {\'c}
+ \installcompoundcharacter /e {\k e}
+ \installcompoundcharacter /l {\l}
+ \installcompoundcharacter /n {\'n}
+ \installcompoundcharacter /o {\'o}
+ \installcompoundcharacter /s {\'s}
+ \installcompoundcharacter /x {\'z}
+ \installcompoundcharacter /z {\.z}
+ \installcompoundcharacter /A {\k A}
+ \installcompoundcharacter /C {\'C}
+ \installcompoundcharacter /E {\k E}
+ \installcompoundcharacter /L {\L}
+ \installcompoundcharacter /N {\'N}
+ \installcompoundcharacter /O {\'O}
+ \installcompoundcharacter /S {\'S}
+ \installcompoundcharacter /X {\'Z}
+ \installcompoundcharacter /Z {\.Z}
+
+\stoplanguagespecifics
+
+\startlanguagespecifics[\s!pl]
+
+ \installcompoundcharacter /, {\handlequotation\c!leftquotation}
+ \installcompoundcharacter /' {\handlequotation\c!rightquotation}
+
+ \def\setupPLlanguage%
+ {\setuplanguage
+ [\s!pl]
+ [\c!leftsentence=\leftguillemot,
+ \c!rightsentence=\rightguillemot,
+ \c!leftsubsentence=\leftsubguillemot,
+ \c!rightsubsentence=\rightsubguillemot]}
+
+ \installcompoundcharacter /< {{\setupPLlanguage|<|}}
+ \installcompoundcharacter /> {{\setupPLlanguage|>|}}
+
+ \installcompoundcharacter /- {|-|}
+
+\stoplanguagespecifics
+
+\startlanguagespecifics[\s!pl]
+
+ \definesortkey {/a}{a}{a}{\k a}
+ \definesortkey {/A}{a}{a}{\k a}
+ \definesortkey {/c}{c}{a}{\'c}
+ \definesortkey {/C}{c}{a}{\'c}
+ \definesortkey {/e}{e}{a}{\k e}
+ \definesortkey {/E}{e}{a}{\k e}
+ \definesortkey {/l}{l}{a}{\l }
+ \definesortkey {/L}{l}{a}{\l }
+ \definesortkey {/n}{n}{a}{\'n}
+ \definesortkey {/N}{n}{a}{\'n}
+ \definesortkey {/o}{o}{a}{\'o}
+ \definesortkey {/O}{o}{a}{\'o}
+ \definesortkey {/s}{s}{a}{\'s}
+ \definesortkey {/S}{s}{a}{\'s}
+ \definesortkey {/x}{z}{a}{\'x}
+ \definesortkey {/X}{z}{a}{\'x}
+ \definesortkey {/z}{z}{b}{\.z}
+ \definesortkey {/Z}{z}{b}{\.z}
+
+\stoplanguagespecifics
+
+\startencoding[pdfdoc]
+ \startlanguagespecifics[pl]% hm
+ \defineactivecharacter / {\simplifiedcompoundcharacter/}
+ \stoplanguagespecifics
+\stopencoding
+
+% this can best be handled by \quotation and ||
+%
+% \startlanguagespecifics[\s!hr]
+%
+% %\installcompoundcharacter /, {\handlequotation\c!leftquotation}
+% %\installcompoundcharacter /' {\handlequotation\c!rightquotation}
+%
+% \def\setupHRlanguage%
+% {\setuplanguage
+% [\s!hr]
+% [\c!leftsentence=\leftguillemot,
+% \c!rightsentence=\rightguillemot,
+% \c!leftsubsentence=\leftsubguillemot,
+% \c!rightsubsentence=\rightsubguillemot]}
+%
+% \installcompoundcharacter /< {{\setupHRlanguage|<|}}
+% \installcompoundcharacter /> {{\setupHRlanguage|>|}}
+%
+% \installcompoundcharacter /- {|-|}
+%
+% \stoplanguagespecifics
+
+% labels
+
+\setupheadtext [\s!pl] [\v!inhoud=Spis tre\'sci]
\setupheadtext [\s!cz] [\v!inhoud=Obsah]
\setupheadtext [\s!sk] [\v!inhoud=Obsah]
+\setupheadtext [\s!hr] [\v!inhoud=Sadr\v{z}aj]
\setupheadtext [\s!pl] [\v!tabellen=Tabele]
\setupheadtext [\s!cz] [\v!tabellen=Tabulek]
\setupheadtext [\s!sk] [\v!tabellen=Tabuliek]
+\setupheadtext [\s!hr] [\v!tabellen=Tablice]
\setupheadtext [\s!pl] [\v!figuren=Ilustracje]
\setupheadtext [\s!cz] [\v!figuren=Obr\'azk\r{u}]
\setupheadtext [\s!sk] [\v!figuren=Obr\'azkov]
+\setupheadtext [\s!hr] [\v!figuren=Slike]
\setupheadtext [\s!pl] [\v!grafieken=Grafika]
\setupheadtext [\s!cz] [\v!grafieken=...]
\setupheadtext [\s!sk] [\v!grafieken=...]
+\setupheadtext [\s!hr] [\v!grafieken=Slike]
-\setupheadtext [\s!pl] [\v!intermezzos=Intermezzi]
+\setupheadtext [\s!pl] [\v!intermezzos=Intermezza]
\setupheadtext [\s!cz] [\v!intermezzos=...]
\setupheadtext [\s!sk] [\v!intermezzos=...]
+\setupheadtext [\s!hr] [\v!intermezzos=Intermezza]
\setupheadtext [\s!pl] [\v!index=Indeks]
\setupheadtext [\s!cz] [\v!index=Rejst\v{r}\'{\i}k]
\setupheadtext [\s!sk] [\v!index=Zoznam]
+\setupheadtext [\s!hr] [\v!index=Indeks]
\setupheadtext [\s!pl] [\v!afkortingen=Skr\'ocenie]
\setupheadtext [\s!cz] [\v!afkortingen=...]
\setupheadtext [\s!sk] [\v!afkortingen=...]
+\setupheadtext [\s!hr] [\v!afkortingen=Kratice]
-\setupheadtext [\s!pl] [\v!logos=Snaki]
+\setupheadtext [\s!pl] [\v!logos=Znaki]
\setupheadtext [\s!cz] [\v!logos=...]
\setupheadtext [\s!sk] [\v!logos=...]
+\setupheadtext [\s!hr] [\v!logos=Znakovi]
\setupheadtext [\s!pl] [\v!eenheden=Jednostki]
\setupheadtext [\s!cz] [\v!eenheden=...]
\setupheadtext [\s!sk] [\v!eenheden=...]
+\setupheadtext [\s!hr] [\v!eenheden=Jednostki]
\setuplabeltext [\s!pl] [\v!tabel=Tabela ]
\setuplabeltext [\s!cz] [\v!tabel=Tabulka ]
\setuplabeltext [\s!sk] [\v!tabel=Tabu\v{l}ka ]
+\setuplabeltext [\s!hr] [\v!tabel=Tablica ]
\setuplabeltext [\s!pl] [\v!figuur=Ilustracja ]
\setuplabeltext [\s!cz] [\v!figuur=Obr\'azek ]
\setuplabeltext [\s!sk] [\v!figuur=... ]
+\setuplabeltext [\s!hr] [\v!figuur=Slika ]
\setuplabeltext [\s!pl] [\v!intermezzo=Intermezzo ]
\setuplabeltext [\s!cz] [\v!intermezzo=... ]
\setuplabeltext [\s!sk] [\v!intermezzo=... ]
+\setuplabeltext [\s!hr] [\v!intermezzo=Intermezzo ]
\setuplabeltext [\s!pl] [\v!grafiek=Grafika ]
\setuplabeltext [\s!cz] [\v!grafiek=... ]
\setuplabeltext [\s!sk] [\v!grafiek=... ]
+\setuplabeltext [\s!hr] [\v!grafiek=Slika ]
-\setuplabeltext [\s!pl] [\v!hoofdstuk=]
-\setuplabeltext [\s!cz] [\v!hoofdstuk=Kapitola]
-\setuplabeltext [\s!sk] [\v!hoofdstuk=Kapitola]
+\setuplabeltext [\s!pl] [\v!hoofdstuk=] % Rozdzia\l
+\setuplabeltext [\s!cz] [\v!hoofdstuk=] % Kapitola
+\setuplabeltext [\s!sk] [\v!hoofdstuk=] % Kapitola
+\setuplabeltext [\s!hr] [\v!hoofdstuk=] % Rozdzia\l
-\setuplabeltext [\s!pl] [\v!paragraaf=]
+\setuplabeltext [\s!pl] [\v!paragraaf=] % Podrozdzia\l
\setuplabeltext [\s!cz] [\v!paragraaf=]
\setuplabeltext [\s!sk] [\v!paragraaf=]
+\setuplabeltext [\s!hr] [\v!paragraaf=] % Podrozdzia\l
\setuplabeltext [\s!pl] [\v!sub\v!paragraaf=]
\setuplabeltext [\s!cz] [\v!sub\v!paragraaf=]
\setuplabeltext [\s!sk] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!hr] [\v!sub\v!paragraaf=]
\setuplabeltext [\s!pl] [\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!cz] [\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!sk] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!hr] [\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!pl] [\v!sub\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!cz] [\v!sub\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!sk] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!hr] [\v!sub\v!sub\v!sub\v!paragraaf=]
-\setuplabeltext [\s!pl] [\v!bijlage=]
+\setuplabeltext [\s!pl] [\v!bijlage=] % Dodatek
\setuplabeltext [\s!cz] [\v!bijlage=]
\setuplabeltext [\s!sk] [\v!bijlage=]
+\setuplabeltext [\s!hr] [\v!bijlage=Dodatak ]
\setuplabeltext [\s!pl] [\v!deel=Ust\c{e}p]
\setuplabeltext [\s!cz] [\v!deel=\v{C}\'ast]
\setuplabeltext [\s!sk] [\v!deel=\v{C}as\v{t}]
-
-\setuplabeltext [\s!pl] [\v!regel=wiersz]
-\setuplabeltext [\s!cz] [\v!regel=...]
-\setuplabeltext [\s!sk] [\v!regel=...]
-
-\setuplabeltext [\s!pl] [\v!regels=wiersze]
-\setuplabeltext [\s!cz] [\v!regels=...]
-\setuplabeltext [\s!sk] [\v!regels=...]
-
-\setuplabeltext [\s!pl] [\v!january=stycze\'n]
-\setuplabeltext [\s!pl] [\v!february=luty]
-\setuplabeltext [\s!pl] [\v!march=marzec]
-\setuplabeltext [\s!pl] [\v!april=kwiecie\'n]
-\setuplabeltext [\s!pl] [\v!may=maj]
-\setuplabeltext [\s!pl] [\v!june=czerwcowy]
-\setuplabeltext [\s!pl] [\v!july=lipiec]
-\setuplabeltext [\s!pl] [\v!august=sierpie\'n]
-\setuplabeltext [\s!pl] [\v!september=wrzesie\'n]
-\setuplabeltext [\s!pl] [\v!october=pa\'zdziernik]
-\setuplabeltext [\s!pl] [\v!november=listopad]
-\setuplabeltext [\s!pl] [\v!december=grudzie\'n]
+\setuplabeltext [\s!hr] [\v!deel=Dio]
+
+\setuplabeltext [\s!pl] [\v!regel=wiersz ]
+\setuplabeltext [\s!cz] [\v!regel=... ]
+\setuplabeltext [\s!sk] [\v!regel=... ]
+\setuplabeltext [\s!hr] [\v!regel=red ]
+
+\setuplabeltext [\s!pl] [\v!regels=wiersze ]
+\setuplabeltext [\s!cz] [\v!regels=... ]
+\setuplabeltext [\s!sk] [\v!regels=... ]
+\setuplabeltext [\s!hr] [\v!regels=redovi ]
+
+\setuplabeltext [\s!pl] [\v!january=stycznia]
+\setuplabeltext [\s!pl] [\v!february=lutego]
+\setuplabeltext [\s!pl] [\v!march=marca]
+\setuplabeltext [\s!pl] [\v!april=kwietnia]
+\setuplabeltext [\s!pl] [\v!may=maja]
+\setuplabeltext [\s!pl] [\v!june=czerwca]
+\setuplabeltext [\s!pl] [\v!july=lipca]
+\setuplabeltext [\s!pl] [\v!august=sierpnia]
+\setuplabeltext [\s!pl] [\v!september=wrze\'snia]
+\setuplabeltext [\s!pl] [\v!october=pa\'zdziernika]
+\setuplabeltext [\s!pl] [\v!november=listopada]
+\setuplabeltext [\s!pl] [\v!december=grudnia]
\setuplabeltext [\s!cz] [\v!january=ledna]
\setuplabeltext [\s!cz] [\v!february=\'unora]
@@ -193,17 +331,39 @@
\setuplabeltext [\s!sk] [\v!november=novembra]
\setuplabeltext [\s!sk] [\v!december=decembra]
+\setuplabeltext [\s!hr] [\v!january=sije\v{c}anj]
+\setuplabeltext [\s!hr] [\v!february=velja\v{c}a]
+\setuplabeltext [\s!hr] [\v!march=o\v{z}ujak]
+\setuplabeltext [\s!hr] [\v!april=travanj]
+\setuplabeltext [\s!hr] [\v!may=svibanj]
+\setuplabeltext [\s!hr] [\v!june=lipanj]
+\setuplabeltext [\s!hr] [\v!july=srpanj]
+\setuplabeltext [\s!hr] [\v!august=kolovoz]
+\setuplabeltext [\s!hr] [\v!september=rujan]
+\setuplabeltext [\s!hr] [\v!october=listopad]
+\setuplabeltext [\s!hr] [\v!november=studeni]
+\setuplabeltext [\s!hr] [\v!december=prosinac]
+
\setuplabeltext [\s!pl] [\v!sunday=niedziela]
\setuplabeltext [\s!pl] [\v!monday=poniedzia\l ek]
\setuplabeltext [\s!pl] [\v!tuesday=wtorek]
\setuplabeltext [\s!pl] [\v!wednesday=\'sroda]
\setuplabeltext [\s!pl] [\v!thursday=czwartek]
-\setuplabeltext [\s!pl] [\v!friday=pi\c{a}tek] %%% NOTE: Below the a should be something which looks rather like |_ than like _| (\c{c}edile), suggestions?
+\setuplabeltext [\s!pl] [\v!friday=pi\k{a}tek]
\setuplabeltext [\s!pl] [\v!saturday=sobota]
+\setuplabeltext [\s!hr] [\v!sunday=nedjelja]
+\setuplabeltext [\s!hr] [\v!monday=ponedjeljak]
+\setuplabeltext [\s!hr] [\v!tuesday=utorak]
+\setuplabeltext [\s!hr] [\v!wednesday=srijeda]
+\setuplabeltext [\s!hr] [\v!thursday=\v{c}etvrtak]
+\setuplabeltext [\s!hr] [\v!friday=petak]
+\setuplabeltext [\s!hr] [\v!saturday=subota]
+
%D \ShowAllLanguageValues [\s!pl] [polish] poolse ...
%D \ShowAllLanguageValues [\s!cz] [czech] tsjechische ...
%D \ShowAllLanguageValues [\s!sk] [slovak] slovaakse ...
+%D \ShowAllLanguageValues [\s!hr] [croatian] croatian ...
\protect
diff --git a/tex/context/base/lang-ura.tex b/tex/context/base/lang-ura.tex
index 6caf89041..8ec95b5e3 100644
--- a/tex/context/base/lang-ura.tex
+++ b/tex/context/base/lang-ura.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% Cheremiss, Estonian, Finnish, Karelian, Laap, Mordvinian,
@@ -55,8 +55,8 @@
\setuplabeltext [\s!fi] [\v!sub\v!sub\v!sub\v!paragraaf=]
\setuplabeltext [\s!fi] [\v!bijlage=]
\setuplabeltext [\s!fi] [\v!deel=Osa ]
-\setuplabeltext [\s!fi] [\v!regel=rivi]
-\setuplabeltext [\s!fi] [\v!regels=rivie]
+\setuplabeltext [\s!fi] [\v!regel=rivi ]
+\setuplabeltext [\s!fi] [\v!regels=rivie ]
\setuplabeltext [\s!fi] [\v!january=tammikuu]
\setuplabeltext [\s!fi] [\v!february=helmikuu]
diff --git a/tex/context/base/lang-vn.tex b/tex/context/base/lang-vn.tex
new file mode 100644
index 000000000..78866750e
--- /dev/null
+++ b/tex/context/base/lang-vn.tex
@@ -0,0 +1,83 @@
+%D \module
+%D [ file=lang-vn,
+%D version=1999.12.12,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Vietnamese,
+%D author={Hans Hagen \& Han The Thanh},
+%D date=\currentdate,
+%D 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.
+
+\unprotect
+
+\definesystemconstant {vietnamese} \definesystemconstant {vn}
+
+\installlanguage
+ [\s!vn]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={{Ng\`ay },dd,{ th\'ang },\v!maand,{ n\u a m },yy},
+ \c!status=\v!stop]
+
+\installlanguage [vietnamese] [\s!vn]
+
+\installlanguage [\s!vn] [\c!status=\v!start]
+
+\setupheadtext [\s!vn] [\v!inhoud=M\d{u}c l\d{u}c]
+\setupheadtext [\s!vn] [\v!tabellen=Danh s\'ach b\h{a}ng]
+\setupheadtext [\s!vn] [\v!figuren=Danh s\'ach h\`inh v\~e]
+\setupheadtext [\s!vn] [\v!grafieken=Graphics]
+\setupheadtext [\s!vn] [\v!intermezzos=Intermezzos]
+\setupheadtext [\s!vn] [\v!index=Ch\h{i} s\'{^o}]
+\setupheadtext [\s!vn] [\v!afkortingen=Abbreviations]
+\setupheadtext [\s!vn] [\v!logos=Logos]
+\setupheadtext [\s!vn] [\v!eenheden=Units]
+
+\setuplabeltext [\s!vn] [\v!tabel=B\h{a}ng]
+\setuplabeltext [\s!vn] [\v!figuur=H\`inh]
+\setuplabeltext [\s!vn] [\v!intermezzo=intermezzo]
+\setuplabeltext [\s!vn] [\v!grafiek=graphic]
+\setuplabeltext [\s!vn] [\v!hoofdstuk=chapter]
+\setuplabeltext [\s!vn] [\v!paragraaf=] % not set
+\setuplabeltext [\s!vn] [\v!sub\v!paragraaf=] % not set
+\setuplabeltext [\s!vn] [\v!sub\v!sub\v!paragraaf=] % not set
+\setuplabeltext [\s!vn] [\v!sub\v!sub\v!sub\v!paragraaf=] % not set
+\setuplabeltext [\s!vn] [\v!bijlage=] % not set
+\setuplabeltext [\s!vn] [\v!deel=Ph\`{^a} n ]
+\setuplabeltext [\s!vn] [\v!regel=line ]
+\setuplabeltext [\s!vn] [\v!regels=lines ]
+
+\setuplabeltext [\s!vn] [\v!sunday=Sunday]
+\setuplabeltext [\s!vn] [\v!monday=Monday]
+\setuplabeltext [\s!vn] [\v!tuesday=Tuesday]
+\setuplabeltext [\s!vn] [\v!wednesday=Wednesday]
+\setuplabeltext [\s!vn] [\v!thursday=Thursday]
+\setuplabeltext [\s!vn] [\v!friday=Friday]
+\setuplabeltext [\s!vn] [\v!saturday=Saturday]
+
+\setuplabeltext [\s!vn] [\v!january=gi\^e ng]
+\setuplabeltext [\s!vn] [\v!february=hai]
+\setuplabeltext [\s!vn] [\v!march=ba]
+\setuplabeltext [\s!vn] [\v!april=t\h{u}]
+\setuplabeltext [\s!vn] [\v!may=n\u a m]
+\setuplabeltext [\s!vn] [\v!june=s\'au]
+\setuplabeltext [\s!vn] [\v!july=b\h{a}y]
+\setuplabeltext [\s!vn] [\v!august=t\'am]
+\setuplabeltext [\s!vn] [\v!september=ch\'in]
+\setuplabeltext [\s!vn] [\v!october=m\h{u}\`{ho}i]
+\setuplabeltext [\s!vn] [\v!november=m\h{u}\`{ho}im\d{^o}t]
+\setuplabeltext [\s!vn] [\v!december=m\h{u}\`{ho}ihai]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/m-chart.tex b/tex/context/base/m-chart.tex
new file mode 100644
index 000000000..481368416
--- /dev/null
+++ b/tex/context/base/m-chart.tex
@@ -0,0 +1,939 @@
+%D \module
+%D [ file=m-chart,
+%D version=1998.10.10,
+%D title=\CONTEXT\ Modules,
+%D subtitle=Flow Charts,
+%D author={Hans Hagen \& Ton Otten},
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is an experimental module. Pieces of code will be moved
+%D to other modules. More features are possible but will be
+%D interfaces later.
+%D
+%D When finished this module will be documented. The main macro
+%D is a rather big one. I'm not sure if splitting it up is wise.
+
+% The 1pt offset is due to 'error' in pdftex form placement,
+% version 14a+ will be ok. This needs checking.
+
+% arrow, dash
+% crossing
+% \goto -> \normalgoto
+% class -> class:name (ref prefix)
+% c, automatisch geen overlap zoeken
+% eind eerder chart connecties
+% relateren aan korps
+% check op bestaan naam, bestaan shape
+% auto als extern figuur
+% subchart
+% pijlen
+% focus
+% ook nog \MPmessage
+% areapath -> krappe vlak
+% clippath -> gehele vlak
+%
+% offset : clip offset
+% breedte : breedte cel
+% hoogte : hoogte cel
+% dx : halve afstand in breedte (grid breedte = breedte + 2dx)
+% dy : halve afstand in hoogte (grid hoogte = hoogte + 2dy)
+% x : x offset (clipping)
+% y : y offset (clipping)
+% nx : minimaal aantal cellen horizontaal
+% ny : minimaal aantal cellen vertikaal
+
+% kaderkleur achtergrondkleur
+% lijnkleur lijndikte
+% focus focuskaderkleur focusachtergrondkleur
+% richting
+%
+% focus koppelen aan kleur
+
+\unprotect
+
+\def\setFLOWname#1#2%
+ {\bgroup
+ \lccode`0=`a\lccode`1=`b\lccode`2=`c\lccode`3=`d\lccode`4=`e%
+ \lccode`5=`f\lccode`6=`g\lccode`7=`h\lccode`8=`i\lccode`9=`j%
+ \lccode` =`\_\lccode`-=`\_\lccode`_=`\_%
+ \lowercase{\gdef#1{#2}}%
+ \egroup}
+
+\def\resetFLOWcell%
+ {\global\let\FLOWname \empty
+ \global\let\FLOWalign \empty
+ \global\let\FLOWshape \empty
+ \global\let\FLOWlocation \empty
+ \global\let\FLOWtext \empty
+ \global\let\FLOWhelp \empty
+ \global\let\FLOWdestination\empty
+ \global\let\FLOWoverlay \empty
+ \global\let\FLOWfocus \empty
+ \global\let\tFLOWlabel \empty
+ \global\let\bFLOWlabel \empty
+ \global\let\bcFLOWlabel \empty
+ \global\let\lFLOWlabel \empty
+ \global\let\rFLOWlabel \empty
+ \def\name ##1{\def\FLOWcell{##1}\setFLOWname\FLOWname{name_##1}\ignorespaces}%
+ \def\shape ##1{\gdef\FLOWshape{##1}\ignorespaces}%
+ \def\destination ##1{\gdef\FLOWdestination{##1}\ignorespaces}%
+ \def\location ##1{\setFLOWlocation##1\end\ignorespaces}%
+ \def\focus ##1{\gdef\FLOWfocus{##1}\ignorespaces}%
+ \def\overlay ##1{\gdef\FLOWoverlay{##1}\ignorespaces}%
+ \def\figure ##1{\defineoverlay
+ [dummy]
+ [{\externalfigure
+ [##1]
+ [\c!breedte=\overlaywidth,
+ \c!hoogte=\overlayheight]}]%
+ \overlay{dummy}}%
+ \def\dotext [##1]##2{\gdef\FLOWalign{##1}\gdef\FLOWtext{##2}}%
+ \def\text {\dosingleempty\dotext}%
+ \def\comment [##1]##2{\ignorespaces\dogobblesingleempty}%
+ \def\label [##1]##2{\setgvalue{##1FLOWlabel}{##2}\ignorespaces}%
+ \def\help ##1{\gdef\FLOWhelp{##1}\ignorespaces}%
+ \def\connection[##1]##2{\ignorespaces}%
+ \def\connect {\connection}%
+ \def\locate {\location}}
+
+\def\startFLOWchart%
+ {\bgroup
+ \let\stopFLOWchart\egroup
+ \obeylines % lelijk, buffers nog eens fatsoeneren
+ \dodoubleempty\dostartFLOWchart}
+
+\def\dostartFLOWchart[#1][#2]%
+ {\doglobal\increment\nofFLOWcharts
+ \setxvalue{FLOW-#1}%
+ {\noexpand\dosetFLOWchart[\nofFLOWcharts][#2]}%
+ \dostartbuffer[flw-\nofFLOWcharts][startFLOWchart][stopFLOWchart]}
+
+\def\setupFLOWcharts%
+ {\dodoubleargument\getparameters[@@FLOW]}
+
+\def\setupFLOWlines%
+ {\dodoubleargument\getparameters[@@FLOL]}
+
+\def\setupFLOWshapes%
+ {\dodoubleargument\getparameters[@@FLOS]}
+
+\def\setupFLOWfocus%
+ {\dodoubleargument\getparameters[@@FLOF]}
+
+\setupFLOWcharts
+ [\c!optie=,
+ \c!punt=, % private option
+ \c!breedte=12\bodyfontsize,
+ \c!hoogte=7\bodyfontsize,
+ \c!maxbreedte=,
+ \c!maxhoogte=,
+ \c!offset=0pt, % auto offset: .5\bodyfontsize,
+ \c!dx=2\bodyfontsize,
+ \c!dy=2\bodyfontsize,
+ \c!nx=0, % 1,
+ \c!ny=0, % 1,
+ \c!x=1,
+ \c!y=1,
+ \c!autofocus=,
+ \c!focus=,
+ \c!achtergrond=, % \v!kleur,
+ \c!achtergrondkleur=white,
+ \c!kader=\v!uit,
+ \c!kaderkleur=]
+
+\setupFLOWlines
+ [\c!hoek=\v!rond,
+ \c!pijl=\v!ja,
+ \c!streep=\v!nee,
+ \c!straal=.375\bodyfontsize, % 2.5\c!lijndikte
+ \c!kleur=FLOWlinecolor,
+ \c!lijndikte=.15\bodyfontsize, % 2pt,
+ \c!offset=\v!geen]
+
+\setupFLOWshapes
+ [\c!default=action,
+ \c!kaderkleur=FLOWframecolor,
+ \c!achtergrond=\v!kleur,
+ \c!achtergrondkleur=FLOWbackgroundcolor,
+ \c!achtergrondraster=\@@rsraster,
+ \c!lijndikte=.15\bodyfontsize, % 2pt,
+ \c!offset=.5\bodyfontsize]
+
+\setupFLOWfocus
+ [\c!kaderkleur=FLOWfocuscolor,
+ \c!achtergrond=\@@FLOSachtergrond,
+ \c!achtergrondkleur=\@@FLOSachtergrondkleur,
+ \c!achtergrondraster=\@@FLOSachtergrondraster,
+ \c!lijndikte=\@@FLOSlijndikte,
+ \c!offset=\@@FLOSoffset]
+
+\definecolor[FLOWfocuscolor] [s=.2]
+\definecolor[FLOWlinecolor] [s=.5]
+\definecolor[FLOWframecolor] [s=.7]
+\definecolor[FLOWbackgroundcolor] [s=.9]
+
+\newcounter\includeFLOWx
+\newcounter\includeFLOWy
+
+\def\includeFLOWchart%
+ {\dodoubleempty\doincludeFLOWchart}
+
+\def\doincludeFLOWchart[#1][#2]%
+ {\pushmacro\includeFLOWx
+ \pushmacro\includeFLOWy
+ \getparameters[FLOWi][x=1,y=1,#2]%
+ \increment(\includeFLOWx,0\FLOWix)%
+ \decrement(\includeFLOWx,1)%
+ \increment(\includeFLOWy,0\FLOWiy)%
+ \decrement(\includeFLOWy,1)%
+ \def\dodoincludeFLOWchart##1%
+ {\doifdefined{FLOW-##1}
+ {\pushmacro\dosetFLOWchart
+ \def\dosetFLOWchart[####1][####2]%
+ {\popmacro\dosetFLOWchart
+ \haalbuffer[flw-####1]}%
+ \getvalue{FLOW-##1}}}%
+ \processcommalist[#1]\dodoincludeFLOWchart
+ \popmacro\includeFLOWx
+ \popmacro\includeFLOWy}
+
+\def\setFLOWlocation#1,#2\end%
+ {\scratchcounter=0#1\advance\scratchcounter\includeFLOWx
+ \xdef\FLOWlocation{\the\scratchcounter}%
+ \scratchcounter=0#2\advance\scratchcounter\includeFLOWy
+ \xdef\FLOWlocation{\FLOWlocation,\the\scratchcounter}}
+
+\def\FLOWshapes%
+ {node, action, procedure, product, decision, archive,
+ loop, wait, subprocedure, singledocument, multidocument,
+ sub procedure, single document, multi document, up, down,
+ left, right}
+
+\def\FLOWlines%
+ {up, down, left, right}
+
+\def\FLOWsetconnect#1%
+ {\donefalse
+ \let\cFLOWfrom\empty
+ \let\cFLOWto\empty
+ \def\zFLOWfrom{0}%
+ \def\zFLOWto{0}%
+ \handletokens#1\with\doFLOWsetconnect
+ \ifx\cFLOWto\empty\let\cFLOWfrom\empty\fi}
+
+\def\doFLOWsetconnect#1%
+ {\ifx #1p%
+ \ifdone\def\zFLOWto{+1}\else\def\zFLOWfrom{+1}\fi
+ \else\ifx#1+%
+ \ifdone\def\zFLOWto{+1}\else\def\zFLOWfrom{+1}\fi
+ \else\ifx#1n%
+ \ifdone\def\zFLOWto{-1}\else\def\zFLOWfrom{-1}\fi
+ \else\ifx#1-%
+ \ifdone\def\zFLOWto{-1}\else\def\zFLOWfrom{-1}\fi
+ \else\ifdone
+ \edef\cFLOWto{\FLOWconnector#1}%
+ \else
+ \edef\cFLOWfrom{\FLOWconnector#1}%
+ \donetrue
+ \fi\fi\fi\fi\fi}
+
+\def\FLOWconnector#1%
+ {\if#1bbottom\else\if#1ttop\else\if#1lleft\else\if#1rright\fi\fi\fi\fi}
+
+\newif\ifFLOWscaling \FLOWscalingtrue
+
+\def\getFLOWchart%
+ {\dodoubleempty\dogetFLOWchart}
+
+\def\dogetFLOWchart[#1][#2]%
+ {\doifundefinedelse{FLOW-#1}
+ {\writestatus{FLOW}{unknown chart #1}%
+ \framed
+ [\c!breedte=12\bodyfontsize,\c!hoogte=8\bodyfontsize]
+ {\tttf [chart #1]}}
+ {\dodogetFLOWchart[#1][#2]}}
+
+\def\dodogetFLOWchart[#1][#2]%
+ {\bgroup
+\forgetall
+\offinterlineskip
+ \def\dosetFLOWchart[##1][##2]%
+ {\def\currentFLOWnumber{##1}%
+ \getparameters[@@FLOW][##2]}%
+ \getvalue{FLOW-#1}%
+ \getparameters[@@FLOW][#2]% dubbelop ?
+ \doifsomething{\@@FLOWautofocus}
+ {\def\@@FLOWminx{100}\let\@@FLOWminy\@@FLOWminx
+ \def\@@FLOWmaxx {0}\let\@@FLOWmaxy\@@FLOWmaxx
+ \def\@@FLOWabsx {0}\let\@@FLOWabsy\@@FLOWabsx
+ \def\startFLOWcell%
+ {\resetFLOWcell}%
+ \def\dodolocation##1##2##3##4%
+ {\ifnum##1##2##4\relax
+ \!!counta=##1\advance\!!counta by ##31\relax
+ \edef##4{\ifnum\!!counta<1 1\else\the\!!counta\fi}%
+ \fi}%
+ \def\dolocation##1,##2\end%
+ {\ifnum##1>\@@FLOWabsx\def\@@FLOWabsx{##1}\fi
+ \ifnum##2>\@@FLOWabsy\def\@@FLOWabsy{##2}\fi
+ \ExpandBothAfter\doifinset{\FLOWcell}{\@@FLOWautofocus}
+ {\dodolocation{##1}<-\@@FLOWminx
+ \dodolocation{##1}>+\@@FLOWmaxx
+ \dodolocation{##2}<-\@@FLOWminy
+ \dodolocation{##2}>+\@@FLOWmaxy}}%
+ \def\stopFLOWcell%
+ {\expandafter\dolocation\FLOWlocation\end}%
+ \haalbuffer[flw-\currentFLOWnumber]%
+ %\message{AUTOSHAPE 1: (\@@FLOWminx,\@@FLOWminy)->(\@@FLOWmaxx,\@@FLOWmaxy)}%
+ \ifnum\@@FLOWabsx<\@@FLOWmaxx\let\@@FLOWmaxx\@@FLOWabsx\fi
+ \ifnum\@@FLOWabsy<\@@FLOWmaxy\let\@@FLOWmaxy\@@FLOWabsy\fi
+ %\message{AUTOSHAPE 2: (\@@FLOWminx,\@@FLOWminy)->(\@@FLOWmaxx,\@@FLOWmaxy)}%
+ \donetrue
+ \ifnum\@@FLOWminx=100 \donefalse\fi
+ \ifnum\@@FLOWminy=100 \donefalse\fi
+ \ifnum\@@FLOWmaxx=0 \donefalse\fi
+ \ifnum\@@FLOWmaxy=0 \donefalse\fi
+ \def\do##1##2##3##4%
+ {\ifdone
+ \let##1=##2%
+ \!!counta=##3%
+ \advance\!!counta 1\advance\!!counta -##2\relax
+ \ifnum\!!counta<1 \!!counta=1 \fi
+ \edef##4{\the\!!counta}%
+ \else
+ \def##1{1}\def##4{0}% {1}%
+ \fi}%
+ \do\@@FLOWx\@@FLOWminx\@@FLOWmaxx\@@FLOWnx
+ \do\@@FLOWy\@@FLOWminy\@@FLOWmaxy\@@FLOWny}%
+ %\message{AUTOSHAPE 3: (\@@FLOWx,\@@FLOWy)->(\@@FLOWnx,\@@FLOWny)}\wait
+ \let\FLOWwidth \@@FLOWnx
+ \let\FLOWheight\@@FLOWny
+ \def\getFLOWlocation##1,##2\end%
+ {\ifnum0##1>\FLOWwidth \edef\FLOWwidth {##1}\fi
+ \ifnum0##2>\FLOWheight\edef\FLOWheight{##2}\fi}%
+ \long\def\startFLOWcell##1\stopFLOWcell%
+ {\resetFLOWcell
+ \ignorespaces##1\unskip
+ \expandafter\getFLOWlocation\FLOWlocation\end
+ \ignorespaces}%
+ \haalbuffer[flw-\currentFLOWnumber]%
+ \ifcase\@@FLOWnx\relax
+ \let\@@FLOWnx\FLOWwidth
+ \fi
+ \ifcase\@@FLOWny\relax
+ \let\@@FLOWny\FLOWheight
+ \fi
+ \doifnothing{\@@FLOWmaxbreedte\@@FLOWmaxhoogte}{\FLOWscalingfalse}%
+ \ifFLOWscaling
+ \doifnothing{\@@FLOWmaxbreedte}{\let\@@FLOWmaxbreedte\maxdimen}%
+ \doifnothing{\@@FLOWmaxhoogte} {\let\@@FLOWmaxhoogte \maxdimen}%
+ \scratchcounter=\bodyfontpoints
+ \doloop % NOG FONTSWITCH OM EX EN EM TE LATEN WERKEN
+ {\ifnum\scratchcounter>1 % NU DIMENSIONS IN TERMS OF BODYFONTSIZE
+ \bodyfontsize=\the\scratchcounter pt
+ \dimen0=\@@FLOWmaxbreedte
+ \dimen2=\@@FLOWbreedte
+ \dimen4=\@@FLOWdx
+ \advance\dimen2 by 2\dimen4
+ \dimen2=\@@FLOWnx\dimen2
+ \advance\dimen2 by 2\dimen4
+ \ifdim\dimen2>\dimen0
+ \advance\scratchcounter by -1
+ \else
+ \dimen0=\@@FLOWmaxhoogte
+ \dimen2=\@@FLOWhoogte
+ \dimen4=\@@FLOWdy
+ \advance\dimen2 by 2\dimen4
+ \dimen2=\@@FLOWny\dimen2
+ \advance\dimen2 by 2\dimen4
+ \ifdim\dimen2>\dimen0
+ \advance\scratchcounter by -1
+ \else
+ \exitloop
+ \fi
+ \fi
+ \else
+ \exitloop
+ \fi}%
+ \expanded{\switchtobodyfont[\the\scratchcounter pt]}%
+ \forgetall
+ \offinterlineskip
+ \fi
+ \global\let\FLOWcells\empty
+ \dimen0=\@@FLOWbreedte
+ \edef\FLOWshapewidth{\the\dimen0}%
+ \dimen2=\@@FLOWdx
+ \advance\dimen0 by 2\dimen2
+ \edef\FLOWgridwidth{\the\dimen0}%
+ \dimen0=\@@FLOWhoogte
+ \edef\FLOWshapeheight{\the\dimen0}%
+ \dimen2=\@@FLOWdy
+ \advance\dimen0 by 2\dimen2
+ \edef\FLOWgridheight{\the\dimen0}%
+ \scratchdimen=\@@FLOSlijndikte
+ \edef\@@FLOSlijndikte{\the\scratchdimen}%
+ \scratchdimen=\@@FLOFlijndikte
+ \edef\@@FLOFlijndikte{\the\scratchdimen}%
+ \scratchdimen=\@@FLOLlijndikte
+ \edef\@@FLOLlijndikte{\the\scratchdimen}%
+ \ifdim\@@FLOLstraal<2.5\scratchdimen
+ \scratchdimen=2.5\scratchdimen
+ \edef\@@FLOLstraal{\the\scratchdimen}%
+ \ifdim\@@FLOLstraal>\@@FLOWdx
+ \scratchdimen=\@@FLOWdx
+ \edef\@@FLOLstraal{\the\scratchdimen}%
+ \fi
+ \ifdim\@@FLOLstraal>\@@FLOWdy
+ \scratchdimen=\@@FLOWdy
+ \edef\@@FLOLstraal{\the\scratchdimen}%
+ \fi
+ \else
+ \scratchdimen=\@@FLOLstraal
+ \edef\@@FLOLstraal{\the\scratchdimen}%
+ \fi
+ \ifdim\@@FLOWoffset=\!!zeropoint
+ \edef\@@FLOWoffset{\the\scratchdimen}%
+ \else
+ \scratchdimen=\@@FLOWoffset
+ \edef\@@FLOWoffset{\the\scratchdimen}%
+ \fi
+ \forgetall
+ \offinterlineskip
+ \resetMPdrawing
+ \doglobal\newcounter\FLOWcomment
+ \startMPdrawing
+ input mp-chart.mp ;
+ grid_width := \FLOWgridwidth ;
+ grid_height := \FLOWgridheight ;
+ shape_width := \FLOWshapewidth ;
+ shape_height := \FLOWshapeheight ;
+ connection_line_width := \@@FLOLlijndikte ;
+ connection_smooth_size := \@@FLOLstraal ; % 2.5connection_line_width ;
+ connection_arrow_size := \@@FLOLstraal ; % 2.5connection_line_width ;
+ connection_dash_size := \@@FLOLstraal ; % 2.5connection_line_width ;
+ \stopMPdrawing
+% \def\getFLOWlocation##1,##2\end%
+% {\ifnum0##1>\FLOWwidth \edef\FLOWwidth {##1}\fi
+% \ifnum0##2>\FLOWheight\edef\FLOWheight{##2}\fi}%
+% \long\def\startFLOWcell##1\stopFLOWcell%
+% {\resetFLOWcell
+% \ignorespaces##1\unskip
+% \expandafter\getFLOWlocation\FLOWlocation\end
+% \ignorespaces}%
+% \haalbuffer[flw-\currentFLOWnumber]%
+% \ifnum\@@FLOWnx\@@FLOWny=11 % listig
+% \let\@@FLOWnx\FLOWwidth
+% \let\@@FLOWny\FLOWheight
+% \fi
+ \startMPdrawing
+ begin_chart(0,\FLOWwidth,\FLOWheight);
+ reverse_y := true ;
+ chart_offset := \@@FLOWoffset ;
+ \stopMPdrawing
+ \doifelsenothing{\@@FLOWachtergrondkleur}
+ {\startMPdrawing
+ chart_background_color := white ;
+ \stopMPdrawing}
+ {\startMPdrawing
+ chart_background_color := \MPcolor{\@@FLOWachtergrondkleur} ;
+ \stopMPdrawing}%
+ \doif{\@@FLOWoptie}{\v!test}
+ {\startMPdrawing
+ show_con_points := true ;
+ show_mid_points := true ;
+ show_all_points := true ;
+ \stopMPdrawing}
+ \processaction % private
+ [\@@FLOWpunt]
+ [ \v!ja=>\startMPdrawing
+ show_con_points := true ;
+ show_mid_points := true ;
+ show_all_points := true ;
+ \stopMPdrawing,
+ \s!unknown=>\startMPdrawing
+ show_\@@FLOWpunt_points := true ;
+ \stopMPdrawing]%
+ \long\def\startFLOWcell##1\stopFLOWcell%
+ {\resetFLOWcell
+ \ignorespaces##1\unskip
+ \setxvalue{FLOW-loc-\FLOWname}{\FLOWlocation}%
+ \ifx\FLOWshape\empty
+ \global\let\FLOWshape\@@FLOSdefault
+ \fi
+ \ifx\FLOWshape\v!geen \else
+ \ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWshapes}
+ {\edef\FLOWshapetag{shape_\FLOWshape}%
+ \@EA\setFLOWname\@EA\FLOWshapetag\@EA{\FLOWshapetag}}
+ {\doifnumberelse{\FLOWshape}
+ {\let\FLOWshapetag\FLOWshape}
+ {\let\FLOWshapetag\empty}}%
+ \ifx\FLOWshapetag\empty \else
+ \ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWlines}
+ {\chardef\FLOWstate=0 }
+ {\ExpandBothAfter\doifcommonelse{\FLOWcell,\FLOWfocus}{\@@FLOWfocus}
+ {\chardef\FLOWstate=1 }
+ {\chardef\FLOWstate=2 }}%
+ \startMPdrawing
+ begin_sub_chart ;
+ \ifcase\FLOWstate
+ shape_line_color := \MPcolor{\@@FLOLkleur} ;
+ shape_fill_color := \MPcolor{\@@FLOLkleur} ;
+ shape_line_width := \@@FLOLlijndikte ;
+ \or
+ shape_line_color := \MPcolor{\@@FLOFkaderkleur} ;
+ shape_fill_color := \MPcolor{\@@FLOFachtergrondkleur} ;
+ shape_line_width := \@@FLOFlijndikte ;
+ \or
+ shape_line_color := \MPcolor{\@@FLOSkaderkleur} ;
+ shape_fill_color := \MPcolor{\@@FLOSachtergrondkleur} ;
+ shape_line_width := \@@FLOSlijndikte ;
+ \fi
+ \ifx\FLOWoverlay\empty
+ peepshape := false ;
+ \else
+ peepshape := true ;
+ \fi
+ new_shape(\FLOWlocation,\FLOWshapetag) ;
+ end_sub_chart ;
+ \stopMPdrawing
+ \fi
+ \fi
+ \ignorespaces}%
+ \haalbuffer[flw-\currentFLOWnumber]%
+ \long\def\startFLOWcell##1\stopFLOWcell%
+ {\resetFLOWcell
+ \def\connection[####1]####2%
+ {\doglobal\increment\FLOWcomment
+ \setFLOWname\otherFLOWname{name_####2}%
+ \doifdefinedelse{FLOW-loc-\FLOWname}
+ {\edef\FLOWfrom{\getvalue{FLOW-loc-\FLOWname}}}
+ {\edef\FLOWfrom{0,0}}%
+ \doifdefinedelse{FLOW-loc-\otherFLOWname}
+ {\edef\FLOWto {\getvalue{FLOW-loc-\otherFLOWname}}}
+ {\edef\FLOWto {0,0}}%
+ \FLOWsetconnect{####1}%
+ \ifx\cFLOWfrom\empty\else
+ \doifelse{\@@FLOLhoek}{\v!rond}
+ {\startMPdrawing smooth := true ; \stopMPdrawing}
+ {\startMPdrawing smooth := false ; \stopMPdrawing}%
+ \doifelse{\@@FLOLstreep}{\v!ja}
+ {\startMPdrawing dashline := true ; \stopMPdrawing}
+ {\startMPdrawing dashline := false ; \stopMPdrawing}%
+ \doifelse{\@@FLOLpijl}{\v!ja}
+ {\startMPdrawing arrowtip := true ; \stopMPdrawing}
+ {\startMPdrawing arrowtip := false ; \stopMPdrawing}%
+ \doifelse{\@@FLOLoffset}{\v!geen}
+ {\startMPdrawing touchshape := true ; \stopMPdrawing}
+ {\startMPdrawing touchshape := false ; \stopMPdrawing}%
+ \startMPdrawing
+ connection_line_color := \MPcolor{\@@FLOLkleur} ;
+ connection_line_width := \@@FLOLlijndikte ;
+ connect_\cFLOWfrom_\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ;
+ \stopMPdrawing
+ \fi
+ \ignorespaces}%
+ \ignorespaces##1\unskip}%
+ \haalbuffer[flw-\currentFLOWnumber]%
+ \startMPdrawing
+ clip_chart(\@@FLOWx,\@@FLOWy,\@@FLOWnx,\@@FLOWny) ;
+ end_chart ;
+ \stopMPdrawing
+ \MPdrawingdonetrue
+ \setbox0=\hbox{\MPshiftdrawingfalse\getMPdrawing}%
+ \def\MPmessage##1%
+ {\writestatus{MP charts}{##1}}%
+ \def\MPposition##1##2##3%
+ {\setvalue{MPx##1}{##2}\setvalue{MPy##1}{##3}}%
+ \def\MPclippath##1##2##3##4%
+ {\def\clipMPllx{##1bp}\def\clipMPlly{##2bp}%
+ \def\clipMPurx{##3bp}\def\clipMPury{##4bp}}%
+ \def\MPareapath##1##2##3##4%
+ {\def\areaMPllx{##1bp}\def\areaMPlly{##2bp}%
+ \def\areaMPurx{##3bp}\def\areaMPury{##4bp}}%
+ \readfile{mpgraph.tmp}{}{}%
+ \doglobal\newcounter\FLOWcomment
+ \long\def\startFLOWcell##1\stopFLOWcell%
+ {\resetFLOWcell
+ \ignorespaces##1\unskip
+ \def\doprocessFLOWcell####1,####2\end % kan ook met area
+ {\!!counta=####1\relax
+ \!!countb=####2\relax
+ \!!countc=\@@FLOWx
+ \!!countd=\@@FLOWy
+ \advance\!!countc \@@FLOWnx
+ \advance\!!countd \@@FLOWny
+ \advance\!!countc -1
+ \advance\!!countd -1
+ \ifnum\!!counta<\@@FLOWx\relax
+ \donefalse
+ \else\ifnum\!!counta>\!!countc
+ \donefalse
+ \else\ifnum\!!countb<\@@FLOWy\relax
+ \donefalse
+ \else\ifnum\!!countb>\!!countd
+ \donefalse
+ \else
+ \donetrue
+ \doglobal\addtocommalist\FLOWcell\FLOWcells
+ \advance\!!counta by -\@@FLOWx\advance\!!counta by 1
+ \advance\!!countb by -\@@FLOWy\advance\!!countb by 1
+ \dimen0=\FLOWgridwidth\dimen0=\!!counta\dimen0
+ \advance\dimen0 by -\FLOWgridwidth
+ \dimen4=\FLOWgridwidth\advance\dimen4 by -\FLOWshapewidth
+ \advance\dimen0 by .5\dimen4
+ \dimen2=\FLOWgridheight\dimen2=\!!countb\dimen2
+ \dimen4=\FLOWgridheight\advance\dimen4 by -\FLOWshapeheight
+ \advance\dimen2 by -.5\dimen4
+ \setbox0=\hbox
+ {\ifx\FLOWalign\empty\else
+ \setupframed
+ [\c!uitlijnen=\v!normaal,\c!onder=\vfill,\c!boven=\vfill]%
+ \@EA\processallactionsinset\@EA
+ [\FLOWalign]
+ [t=>{\setupframed[\c!onder=\vfill,\c!boven=]},
+ b=>{\setupframed[\c!onder=,\c!boven=\vfill]},
+ l=>{\setupframed[\c!uitlijnen=\v!rechts]},
+ r=>{\setupframed[\c!uitlijnen=\v!links]},
+ m=>{\setupframed[\c!uitlijnen=\v!midden]},
+ c=>{\setupframed[\c!uitlijnen=\v!midden]}]%
+ \fi
+ \ifx\FLOWshape\v!geen
+ \setupframed[\c!offset=\v!overlay]%
+ \else
+ \setupframed[\c!offset=.5\bodyfontsize]%
+ \fi
+ \framed
+ [\c!kader=\v!uit,\c!breedte=\FLOWshapewidth,\c!hoogte=\FLOWshapeheight]
+ {\FLOWtext}}%
+ \showFLOWhelp0
+ \ifx\FLOWdestination\empty\else
+ \setbox0=\hbox
+ {\setupinteraction[\c!kleur=,\c!contrastkleur=]%
+ \naarbox{\box0}[\FLOWdestination]}%
+ \fi
+ \edef\FLOWdx{\the\dimen0}%
+ \edef\FLOWdy{\the\dimen2}%
+ \def\positionFLOWzero%
+ {\setbox0=\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}%
+ \smashbox0
+ \box0} %
+ \positionFLOWzero
+ \dimen0=\FLOWshapewidth \dimen2=.5\dimen0
+ \dimen4=\FLOWshapeheight\dimen6=.5\dimen4
+ \boxoffset=.5\bodyfontsize
+ \setbox0=\hbox{\hskip\dimen2\raise\dimen4
+ \hbox{\righttopbox{\strut\tFLOWlabel}}}%
+ \positionFLOWzero
+ \setbox0=\hbox{\hskip\dimen2
+ \hbox{\rightbottombox{\strut\bFLOWlabel}}}%
+ \positionFLOWzero
+ \setbox0=\hbox{\raise\dimen6
+ \hbox{\lefttopbox {\strut\lFLOWlabel}}}%
+ \positionFLOWzero
+ \setbox0=\hbox{\hskip\dimen0\raise\dimen6
+ \hbox{\righttopbox{\strut\rFLOWlabel}}}%
+ \positionFLOWzero
+ \setbox0=\hbox{\hskip\dimen2 % for me only
+ \hbox{\bottombox{\strut\bcFLOWlabel}}}%
+ \positionFLOWzero
+ \fi\fi\fi\fi}%
+ \expandafter\doprocessFLOWcell\FLOWlocation\end
+ \def\connection[####1]####2%
+ {\doglobal\increment\FLOWcomment
+ \ignorespaces}%
+ \def\comment[####1]####2%
+ {\bgroup
+ \let\FLOW \middlebox
+ \let\FLOWb \bottombox
+ \let\FLOWbl\bottomleftbox
+ \let\FLOWbr\bottomrightbox
+ \let\FLOWt \topbox
+ \let\FLOWtl\topleftbox
+ \let\FLOWtr\toprightbox
+ \let\FLOWl \leftbox
+ \let\FLOWlt\lefttopbox
+ \let\FLOWlb\leftbottombox
+ \let\FLOWr \rightbox
+ \let\FLOWrt\righttopbox
+ \let\FLOWrb\rightbottombox
+ \let\FLOWc \middlebox
+ \ifcase0\getvalue{MPx\FLOWcomment}\getvalue{MPy\FLOWcomment}\relax
+ \else
+ \ifdim\getvalue{MPx\FLOWcomment}bp<\areaMPllx\relax\else
+ \ifdim\getvalue{MPx\FLOWcomment}bp>\areaMPurx\relax\else
+ \ifdim\getvalue{MPy\FLOWcomment}bp<\areaMPlly\relax\else
+ \ifdim\getvalue{MPy\FLOWcomment}bp>\areaMPury\relax\else
+ \dimen0=\getvalue{MPx\FLOWcomment}bp
+ \advance\dimen0 by -\@@FLOWoffset
+ \advance\dimen0 by -\clipMPllx
+ \dimen2=\clipMPury
+ \advance\dimen2 by -\@@FLOWoffset
+ \advance\dimen2 by -\getvalue{MPy\FLOWcomment}bp
+ \setbox0=\hbox{\strut####2}%
+ \boxoffset=.5\bodyfontsize
+ \setbox0=\hbox
+ {\hskip\dimen0\lower\dimen2\getvalue{FLOW####1}{\box0}}%
+ \wd0=\!!zeropoint\ht0=\!!zeropoint\dp0=\!!zeropoint
+ \box0
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \egroup
+ \ignorespaces}%
+ \ignorespaces##1\unskip
+ \ignorespaces}%
+ \setbox2=\vbox to \ht0
+ {\forgetall%%%\offinterlineskip
+ \haalbuffer[flw-\currentFLOWnumber]\vss}%
+ \setbox2=\hbox
+ {\hskip\@@FLOWoffset\lower\@@FLOWoffset\box2}%
+ \wd2=\wd0\ht2=\ht0\dp2=\dp0
+ %%%%%%%%
+ \long\def\startFLOWcell##1\stopFLOWcell%
+ {\resetFLOWcell
+ \ignorespaces##1\unskip
+ \def\doprocessFLOWcell####1,####2\end % redundant
+ {\ifx\FLOWoverlay\empty \else
+ \!!counta=####1\relax
+ \!!countb=####2\relax
+ \!!countc=\@@FLOWx
+ \!!countd=\@@FLOWy
+ \advance\!!countc \@@FLOWnx
+ \advance\!!countd \@@FLOWny
+ \advance\!!countc -1
+ \advance\!!countd -1
+ \ifnum\!!counta<\@@FLOWx\relax
+ \donefalse
+ \else\ifnum\!!counta>\!!countc
+ \donefalse
+ \else\ifnum\!!countb<\@@FLOWy\relax
+ \donefalse
+ \else\ifnum\!!countb>\!!countd
+ \donefalse
+ \else
+ \donetrue
+ \fi\fi\fi\fi
+ \ifdone
+ \advance\!!counta by -\@@FLOWx\advance\!!counta by 1
+ \advance\!!countb by -\@@FLOWy\advance\!!countb by 1
+ \dimen0=\FLOWgridwidth\dimen0=\!!counta\dimen0
+ \advance\dimen0 by -\FLOWgridwidth
+ \dimen4=\FLOWgridwidth\advance\dimen4 by -\FLOWshapewidth
+ \advance\dimen0 by .5\dimen4
+ \dimen2=\FLOWgridheight\dimen2=\!!countb\dimen2
+ \dimen4=\FLOWgridheight\advance\dimen4 by -\FLOWshapeheight
+ \advance\dimen2 by -.5\dimen4
+ \edef\FLOWdx{\the\dimen0}%
+ \edef\FLOWdy{\the\dimen2}%
+ \setbox0=\hbox
+ {\framed
+ [\c!kader=\v!uit,
+ \c!achtergrond={\@@FLOWachtergrond,\FLOWoverlay},
+ \c!achtergrondkleur=\@@FLOSachtergrondkleur,
+ \c!breedte=\FLOWshapewidth,\c!hoogte=\FLOWshapeheight]
+ {}}%
+ \setbox0=\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}%
+ \smashbox0
+ \box0
+ \fi
+ \fi}%
+ \expandafter\doprocessFLOWcell\FLOWlocation\end}%
+ \setbox4=\vbox to \ht0
+ {\forgetall%%%\offinterlineskip
+ \haalbuffer[flw-\currentFLOWnumber]\vss}%
+ \setbox4=\hbox
+ {\hskip\@@FLOWoffset\lower\@@FLOWoffset\box4}%
+ \wd4=\wd0\ht4=\ht0\dp4=\dp0
+ %%%%%%%%
+ \doifelse{\@@FLOWoptie}{\v!test}
+ {\setbox6=\vbox
+ {\forgetall
+ \vskip\@@FLOWoffset
+ \hskip\@@FLOWoffset
+ \rooster
+ [\c!x=\@@FLOWx,\c!nx=\@@FLOWnx,\c!dx=\withoutpt\FLOWgridwidth,
+ \c!y=\@@FLOWy,\c!ny=\@@FLOWny,\c!dy=\withoutpt\FLOWgridheight,
+ \c!xstap=1,\c!ystap=1,
+ \c!eenheid=pt,\c!plaats=\v!midden]}%
+ \wd6=\wd0\ht6=\ht0\dp6=\dp0
+ \setbox8=\vbox
+ {\forgetall\offinterlineskip
+ \vskip\@@FLOWoffset
+ \dostepwiserecurse{\@@FLOWy}{\@@FLOWny}{1}
+ {\vbox to \FLOWgridheight
+ {\vfill
+ \hskip\@@FLOWoffset
+ \hbox
+ {\dostepwiserecurse{\@@FLOWx}{\@@FLOWnx}{1}
+ {\hbox to \FLOWgridwidth
+ {\hfill
+ \framed
+ [\c!kaderkleur=red,
+ \c!breedte=\FLOWshapewidth,
+ \c!hoogte=\FLOWshapeheight]
+ {}%
+ \hfill}}}
+ \vfill}}}%
+ \wd8=\wd0\ht8=\ht0\dp8=\dp0
+ \framed
+ [\c!offset=\v!overlay,\c!kaderkleur=green]
+ {\hbox{\box4\hskip-\wd0 \raise1pt \box0\hskip-\wd2\box2\hskip-\wd6\box6\hskip-\wd8\box8}}}
+ {\framed
+ [\c!offset=\v!overlay,
+ \c!kader=\@@FLOWkader,
+ \c!kaderkleur=\@@FLOWkaderkleur,
+ \c!achtergrond=\@@FLOWachtergrond,
+ \c!achtergrondkleur=\@@FLOWachtergrondkleur]
+% {\hbox{\box4\hskip-\wd0 \raise1pt \box0\hskip-\wd2\box2}}}% raise is a bug
+ {\hbox{\box4\hskip-\wd0 \box0\hskip-\wd2\box2}}}%
+ %\message{[\FLOWcells]}\wait
+ \egroup}
+
+% \useFLOWchart[name][parent][setting,setting][additional settings]
+% \useFLOWchart[name][parent][additional settings]
+
+\def\useFLOWchart
+ {\doquadrupleempty\douseFLOWchart}
+
+\def\douseFLOWchart[#1][#2][#3][#4]% name parent sets mainsettings
+ {\iffourthargument
+ \setvalue{FLOW--#1}[##1]{\setgetFLOWchart[#2][#3][#4,##1]}%
+ \else
+ \checkparameters[#3]%
+ \ifparameters
+ \setvalue{FLOW--#1}[##1]{\setgetFLOWchart[#2][][#3,##1]}%
+ \else
+ \setvalue{FLOW--#1}[##1]{\setgetFLOWchart[#2][#3][##1]}%
+ \fi
+ \fi}
+
+\def\setgetFLOWchart[#1][#2][#3]%
+ {\def\docommando##1%
+ {}% cell line focus
+ \processcommalist[#2]\docommando
+ \getFLOWchart[#1][#3]}
+
+\def\doFLOWchart[#1][#2]%
+ {\hbox\bgroup\vbox\bgroup % vmode suppresses spaces
+ \doifundefinedelse{FLOW--#1}
+ {\getFLOWchart[#1][#2]}
+ {\getvalue{FLOW--#1}[#2]}%
+ \egroup\egroup}
+
+\def\FLOWchart%
+ {\dodoubleempty\doFLOWchart}
+
+%D A hook into the help system.
+
+\def\showFLOWhelp#1%
+ {\doifhelpinfo{\FLOWhelp}
+ {\setbox#1=\hbox
+ {\setbox\scratchbox=\hbox{\lower\@@FLOWdy\hbox
+ {\helpbutton
+ [\c!breedte=\wd0,\c!kleur=,\c!hoogte=\@@FLOWdy,\c!kader=\v!nee]
+ [\FLOWhelp]}}%
+ \smashbox\scratchbox
+ \setbox#1=\vbox
+ {\forgetall\offinterlineskip\box#1\box\scratchbox}%
+ \box#1}}}
+
+%D The next section is dedicated to splitting up charts.
+
+\def\getFLOWsize[#1]%
+ {\bgroup\let\dodogetFLOWchart\dogetFLOWsize\FLOWchart[#1]\egroup}
+
+\def\dogetFLOWsize[#1][#2]%
+ {\setbox\scratchbox=\vbox
+ {\xdef\FLOWmaxwidth {0}%
+ \xdef\FLOWmaxheight{0}%
+ \def\getFLOWlocation##1,##2\end%
+ {\ifnum0##1>\FLOWmaxwidth \xdef\FLOWmaxwidth {##1}\fi
+ \ifnum0##2>\FLOWmaxheight\xdef\FLOWmaxheight{##2}\fi}%
+ \long\def\startFLOWcell##1\stopFLOWcell%
+ {\resetFLOWcell##1\expandafter\getFLOWlocation\FLOWlocation\end}%
+ \def\dosetFLOWchart[##1][##2]%
+ {\haalbuffer[flw-##1]}%
+ \getvalue{FLOW-#1}}}
+
+\def\setupFLOWsplit%
+ {\dodoubleargument\getparameters[@@FLOT]}
+
+\setupFLOWsplit%
+ [\c!nx=3,\c!ny=3,
+ \c!dx=1,\c!dy=1,
+ \c!commando=,
+ \c!markering=\v!aan,
+ \c!voor=,\c!na=]
+
+\def\FLOWcharts%
+ {\dodoubleempty\doFLOWcharts}
+
+\def\doFLOWcharts[#1][#2]%
+ {\bgroup
+ \getFLOWsize[#1]%
+ \def\@@FLOTx{1}%
+ \doloop
+ {\def\@@FLOTy{1}%
+ \doloop
+ {\bgroup
+ \scratchcounter=\FLOWmaxwidth
+ \advance\scratchcounter by -\@@FLOTx
+ \advance\scratchcounter by 1
+ \ifnum\scratchcounter<\@@FLOTnx\edef\@@FLOTnx{\the\scratchcounter}\fi
+ \scratchcounter=\FLOWmaxheight
+ \advance\scratchcounter by -\@@FLOTy
+ \advance\scratchcounter by 1
+ \ifnum\scratchcounter<\@@FLOTny\edef\@@FLOTny{\the\scratchcounter}\fi
+ \doifnot{\@@FLOTmarkering}{\v!aan}{\let\cuthbox\relax}%
+ \@@FLOTvoor
+ \cuthbox
+ {\@@FLOTcommando
+ {\FLOWchart[#1][#2,
+ \c!x=\@@FLOTx,\c!nx=\@@FLOTnx,
+ \c!y=\@@FLOTy,\c!ny=\@@FLOTny]}}%
+ \@@FLOTna
+ \egroup
+ \increment(\@@FLOTy,\@@FLOTny)%
+ \ifnum\@@FLOTy>\FLOWmaxheight
+ \exitloop
+ \else
+ \decrement(\@@FLOTy,\@@FLOTdy)%
+ \fi}%
+ \increment(\@@FLOTx,\@@FLOTnx)%
+ \ifnum\@@FLOTx>\FLOWmaxwidth
+ \exitloop
+ \else
+ \decrement(\@@FLOTx,\@@FLOTdx)%
+ \fi}%
+ \egroup}
+
+%D An example of splitting is given below:
+%D
+%D \starttypen
+%D \setupFLOWsplit
+%D [nx=5,ny=10,
+%D dx=0,dy=0,
+%D before=,
+%D after=\pagina]
+%D
+%D \FLOWcharts[mybigflow]
+%D \stoptypen
+%D
+%D Or, one can say:
+%D
+%D \starttypen
+%D \splitsplaatsblok
+%D {\plaatsfiguur{What a big flowchart this is!}}
+%D {\FLOWcharts[mybigflow]}
+%D \stoptypen
+
+\protect
+
+\endinput
diff --git a/tex/context/base/m-chemic.tex b/tex/context/base/m-chemic.tex
index 600521f23..f03dc4260 100644
--- a/tex/context/base/m-chemic.tex
+++ b/tex/context/base/m-chemic.tex
@@ -9,7 +9,7 @@
%D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\ifx\beginpicture\undefined
diff --git a/tex/context/base/m-pictex.tex b/tex/context/base/m-pictex.tex
index 6f97c551f..182cdc027 100644
--- a/tex/context/base/m-pictex.tex
+++ b/tex/context/base/m-pictex.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module is one big hack. This hack is not needed when
diff --git a/tex/context/base/m-pstric.tex b/tex/context/base/m-pstric.tex
index 0e5c49845..c093cc7fa 100644
--- a/tex/context/base/m-pstric.tex
+++ b/tex/context/base/m-pstric.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\edef\oldbarcode{\the\catcode`\|} % \chardef
diff --git a/tex/context/base/m-units.tex b/tex/context/base/m-units.tex
index 5699f0de7..f0f13c48f 100644
--- a/tex/context/base/m-units.tex
+++ b/tex/context/base/m-units.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D Scientific units can be typeset in math mode pretty well,
diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex
index 6c693222b..e2664de00 100644
--- a/tex/context/base/mult-com.tex
+++ b/tex/context/base/mult-com.tex
@@ -19,6 +19,9 @@
%D {\em Because the original interface to \CONTEXT\ is dutch,
%D the words left of the \type{:} are in dutch. In the near
%D future english will be the core language.}
+%D
+%D The German translations were provided by Tobias Burnus,
+%D and the Czech ones by Tom Hudec.
\writestatus{loading}{Context Multilingual Macros / Commands}
@@ -36,1224 +39,1238 @@
%D \startcompressdefinitions
\startcommands dutch english
- german
+ german czech
language: taal language
- sprache
+ sprache jazyk
mainlanguage: hoofdtaal mainlanguage
- hauptsprache
+ hauptsprache hlavnijazyk
translate: vertaal translate
- uebersetzten
+ uebersetzten prelozit
installlanguage: installeertaal installlanguage
- installieresprache
+ installieresprache jazykinstalace
setuplanguage: steltaalin setuplanguage
- stellespracheein
+ stellespracheein nastavjazyk
showmakeup: toonopmaak showmakeup
- zeigeumbruch
+ zeigeumbruch ukazupravu
useencoding: usecodering useencoding
- benutzekodierung
+ benutzekodierung uzijkodovani
usespecials: gebruikspecials usespecials
- benutzespezielles
+ benutzespezielles uzijspeciality
defineoutput: definieeruitvoer defineoutput
- defineoutput
+ defineoutput definujvystup
setupoutput: steluitvoerin setupoutput
- stelleausgabeein
+ stelleausgabeein nastavvystup
% system redefineaccent: herdefinieeraccent redefineaccent
-% redefiniereakzent
+% redefiniereakzent redefinujakcent
% system redefinecharacter: herdefinieerkarakter redefinecharacter
-% redefinierezeichen
+% redefinierezeichen redefinujznak
% system redefinecommand: herdefinieercommando redefinecommand
-% redefinierbefehl
+% redefinierbefehl redefinujprikaz
defineaccent: definieeraccent defineaccent
- definiereakzent
+ definiereakzent definujakcent
definecharacter: definieerkarakter definecharacter
- definierezeichen
+ definierezeichen definujznak
definecommand: definieercommando definecommand
- definierebefehl
+ definierebefehl definujprikaz
startcoding: startcodering startcoding
- startkodierung
+ startkodierung startkodovani
stopcoding: stopcodering stopcoding
- stopkodierung
+ stopkodierung stopkodovani
definebodyfontenvironment: definieerkorpsomgeving definebodyfontenvironment
- definierefliesstextumgebung
+ definierefliesstextumgebung definujzakladnifont
setupbodyfontenvironment: stelkorpsomgevingin setupbodyfontenvironment
- stellefliesstextumgebungein
+ stellefliesstextumgebungein nastavprostredizakladnihofont
definebodyfont: definieerkorps definebodyfont
- definierefliesstext
+ definierefliesstext definujzakladnifont
definefont: definieerfont definefont
- definiereschrift
+ definiereschrift definujfont
definefontsynonym: definieerfontsynoniem definefontsynonym
- defineschriftsynonym
+ defineschriftsynonym definujsynonumumfontu
definestyle: definieerletter definestyle
- definierestil
+ definierestil definujstyl
definefontstyle: definieerfontstijl definefontstyle
- definierefontstil % tobias
+ definiereschriftstil definujstylfontu
setuptype: steltypein setuptype
- stelletipein
+ stelletipein nastavtype
type: type type
- tippen
+ tippen type
typ: typ typ
- tip
+ tip typ
arg: arg arg
- arg
+ arg arg
tex: tex tex
- tex
+ tex tex
definetyping: definieertypen definetyping
- definieretippen
+ definieretippen definujopis
setuptyping: steltypenin setuptyping
- stelletippenein
+ stelletippenein nastavopis
% generated starttyping: starttypen starttyping
-% starttippen
+% starttippen startopis
% generated stoptyping: stoptypen stoptyping
-% stoptippen
+% stoptippen stopopis
typefile: typefile typefile
- tippedatei
+ tippedatei typesoubor
setupfootnotes: stelvoetnotenin setupfootnotes
- stellefussnotenein
+ stellefussnotenein nastavpoznamkypodcarou
setupfootnotedefinition: stelvoetnootdefinitiein setupfootnotedefinition
- stellefussnotendefinitionein
+ stellefussnotendefinitionein nastavdefinicipoznamekpodcarou
note: noot note
- notiz
+ notiz poznamka
footnote: voetnoot footnote
- fussnote
+ fussnote poznamkapodcarou
startlocalfootnotes: startlokalevoetnoten startlocalfootnotes
- startlokalefussnoten
+ startlokalefussnoten startlokalnipoznamkypodcarou
stoplocalfootnotes: stoplokalevoetnoten stoplocalfootnotes
- stoplokalefussnoten
+ stoplokalefussnoten stoplokalnipoznamkypodcarou
placelocalfootnotes: plaatslokalevoetnoten placelocalfootnotes
- platzierelokalefussnoten
+ platzierelokalefussnoten umistilokalnipoznamkypodcarou
placefootnotes: plaatsvoetnoten placefootnotes
- platzierefussnoten
+ platzierefussnoten umistipoznamkypodcarou
currentdate: huidigedatum currentdate
- heutigesdatum
+ heutigesdatum aktualnidatum
date: datum date
- datum
+ datum datum
weekday: weekdag weekday
- wochentag
+ wochentag vsedniden
WEEKDAY: WEEKDAG WEEKDAY
- WOCHENTAG
+ WOCHENTAG VSEDNIDEN
month: maand month
- monat
+ monat mesic
MONTH: MAAND MONTH
- MONAT
+ MONAT MESIC
Numbers: Cijfers Numbers
- Ziffern
+ Ziffern Cisla
numbers: cijfers numbers
- ziffern
+ ziffern cisla
romannumerals: romeins romannumerals
- roemischezahlen
+ roemischezahlen rimskecislice
Romannumerals: Romeins Romannumerals
- Roemischezahlen
+ Roemischezahlen Rimskecislice
character: letter character
- buchstabe
+ buchstabe znak
Character: Letter Character
- Buchstabe
+ Buchstabe Znak
characters: letters characters
- buchstaben
+ buchstaben znaky
Characters: Letters Characters
- Buchstaben
+ Buchstaben Znaky
unknown: onbekend unknown
- unbekant
+ unbekant neznamo
definesymbol: definieersymbool definesymbol
- definieresymbol
+ definieresymbol definujsymbol
definefiguresymbol: definieerfiguursymbool definefiguresymbol
- definiereabbsymbol
+ definiereabbsymbol definujobrazeksymbol
symbol: symbool symbol
- symbol
+ symbol symbol
setupsymbolset: stelsymboolsetin setupsymbolset
- stellesymbolsetein
+ stellesymbolsetein nastavsadusymbolu
showsymbolset: toonsymboolset showsymbolset
- showsymbolset
+ showsymbolset ukazsadusymbolu
startsymbolset: startsymboolset startsymbolset
- startsymbolset
+ startsymbolset startsadasymbolu
usesymbols: gebruiksymbolen usesymbols
- verwendesymbole
+ verwendesymbole uzijsymbol
defineconversion: definieerconversie defineconversion
- definierekonversion
+ definierekonversion definujkonverzi
convertnumber: converteernummer convertnumber
- konvertierezahl
+ konvertierezahl konvertujcislo
setupcapitals: stelkapitalenin setupcapitals
- setupversalien % TOBIAS
+ stelleversalienein nastavverzalky
kap: kap kap
- kap
+ kap kap
KAP: KAP CAP
- KAP
+ KAP KAP
nokap: nokap nocap
- nokap
+ nokap nokap
Kap: Kap Cap
- Kap
+ Kap Kap
Kaps: Kaps Caps
- Kaps
+ Kaps Kaps
WORD: WOORD WORD
- WORT
+ WORT SLOVO
WORDS: WOORDEN WORDS
- WOERTER
+ WOERTER SLOVA
Word: Woord Word
- Wort
+ Wort Slovo
Words: Woorden Words
- Woerter
+ Woerter Slova
stretched: uitgerekt stretched
- gestreckt
+ gestreckt roztazene
overstrike: doorstreep overstrike
- durchgestrichen
+ durchgestrichen preskrtnuto
overstrikes: doorstrepen overstrikes
- durchstreichen
+ durchstreichen preskrtnuti
overbar: overstreep overbar
- ueberstrichen
+ ueberstrichen nadtrzeno
overbars: overstrepen overbars
- ueberstreichen
+ ueberstreichen nadtrzeni
underbar: onderstreep underbar
- unterstrichen
+ unterstrichen podtrzeno
underbars: onderstrepen underbars
- unterstreichen
+ unterstreichen podtrzeni
setupunderbar: stelonderstrepenin setupunderbar
- stelleunterstreichenein
+ stelleunterstreichenein nastavpodtrzeni
setupbodyfont: stelkorpsin setupbodyfont
- stellefliesstextein
+ stellefliesstextein nastavzakladnifont
switchtobodyfont: switchnaarkorps switchtobodyfont
- wechselezumfliesstext
+ wechselezumfliesstext prepninazakladnifont
showbodyfont: toonkorps showbodyfont
- zeigefliesstext
+ zeigefliesstext ukazzakladnifont
showbodyfontenvironment: toonkorpsomgeving showbodyfontenvironment
- zeigefliesstextumgebung
+ zeigefliesstextumgebung ukazpostredizakladnihofont
headtext: koptekst headtext
- ueberschrift
+ ueberschrifttext texthlavicky
labeltext: labeltekst labeltext
- labeltext
+ labeltext textpopisku
LABELTEXT: LABELTEKST LABELTEXT
- LABELTEXT
+ LABELTEXT TEXTPOPISKU
setupheadtext: stelkoptekstin setupheadtext
- stelleueberschriftein
+ stelleueberschrifttextein nastavtexthlavicky
setuplabeltext: stellabeltekstin setuplabeltext
- stellelabeltextein
+ stellelabeltextein nastavtextpopisku
marginrule: kantlijn marginrule
- marginallinie
+ marginallinie marginalnilinka
startmarginrule: startkantlijn startmarginrule
- startmarginallinie
+ startmarginallinie startmarginalnilinka
stopmarginrule: stopkantlijn stopmarginrule
- stopmarginallinie
+ stopmarginallinie stopmarginalnilinka
setupmarginrules: stelkantlijnin setupmarginrules
- stellemarginallinieein
+ stellemarginallinieein nastavmarginalnilinky
blackrule: blokje blackrule
- rechteck
+ rechteck cernalinka
blackrules: blokjes blackrules
- rechtecke
+ rechtecke cernelinky
setupblackrules: stelblokjesin setupblackrules
- stellerechteckein
+ stellerechteckein nastavcernelinky
setupscreens: stelrastersin setupscreens
- stellerasterein
+ stellerasterein nastavrastr
framed: omlijnd framed
- umrahmt
+ umrahmt oramovani
inframed: inlijnd inframed
- imumriss
+ imumriss zaramovani
mframed: wilijnd maframed
- maframed
+ maframed mazaramovani
setupframed: stelomlijndin setupframed
- stelleumrahmtein
+ stelleumrahmtein nastavoramovani
% setuprules: stellijnenin setuprules
-% stelleumrissein
+% stelleumrissein nastavobrys
setuplinewidth: stellijndiktein setuplinewidth
- stellelinienbreiteein
+ stellelinienbreiteein nastavsirkucary
setupthinrules: steldunnelijnenin setupthinrules
- stelleduennerumrissein
+ stelleduennerumrissein nastavtenkelinky
thinrule: dunnelijn thinrule
- duennelinie
+ duennelinie tenkalinka
thinrules: dunnelijnen thinrules
- duennerumriss
+ duennerumriss tenkelinky
hairline: haarlijn hairline
- haarlinie
+ haarlinie vlasovalinka
vl: vl vl
- vl
+ vl vl
hl: hl hl
- hl
+ hl hl
defineframed: definieeromlijnd defineframed
- definiereumrahmt
+ definiereumrahmt definujoramovani
defineframedtext: definieerkadertekst defineframedtext
- definiereumrahmtertext
+ definiereumrahmtertext definujoramovanytext
% startframedtext: startkadertekst startframedtext
-% startumrahmtertext
+% startumrahmtertext startoramovanytext
% stopframedtext: stopkadertekst stopframedtext
-% stopumrahmtertext
+% stopumrahmtertext stoporamovanytext
setupframedtexts: stelkadertekstenin setupframedtexts
- stelleumrahmtetexteein
+ stelleumrahmtetexteein nastavoramovanetexty
defineoverlay: definieeroverlay defineoverlay
- definiereoverlay
+ definiereoverlay definujprekryv
background: achtergrond background
- hintergrund
+ hintergrund pozadi
startbackground: startachtergrond startbackground
- starthintergrund
+ starthintergrund startpozadi
stopbackground: stopachtergrond stopbackground
- stophintergrund
+ stophintergrund stoppozadi
setupbackground: stelachtergrondin setupbackground
- stellehintergrundein
+ stellehintergrundein nastavpozadi
fillinrules: invullijnen fillinrules
- gefuelltesrechteck
+ gefuelltesrechteck vyplnovelinky % ve formulari
setupfillinrules: stelinvullijnenin setupfillinrules
- stellegefuelltesrechteckein
+ stellegefuelltesrechteckein nastavvyplnovelinky
fillintext: invultekst fillintext
- ausfuelltext
+ ausfuelltext vyplnenytext
setupfillinlines: stelinvulregelsin setupfillinlines
- stellegefuelltezeileein
+ stellegefuelltezeileein nastavvyplnoveradky
fillinline: invulregel fillinline
- gefuelltezeile
+ gefuelltezeile vyplnovyradek
setuptextrules: steltekstlijnenin setuptextrules
- stelletextumrissein
+ stelletextumrissein nastavtextovelinky
textrule: tekstlijn textrule
- textlinie
+ textlinie textovalinka
starttextrule: starttekstlijn starttextrule
- starttextlinie
+ starttextlinie starttextovalinka
stoptextrule: stoptekstlijn stoptextrule
- stoptextlinie
+ stoptextlinie stoptextovalinka
usemodule: gebruikmodule usemodule
- verwendemodul
+ verwendemodul uzijmodul
usemodules: gebruikmodules usemodules
- verwendemodule
+ verwendemodule uzijmoduly
starttekst: starttekst starttext
- starttext
+ starttext starttext
stoptekst: stoptekst stoptext
- stoptext
+ stoptext stoptext
margetitel: margetitel margintitle
- marginaltitel
+ marginaltitel marginalninadpis
margewoord: margewoord marginword
- marginalwort
+ marginalwort marginalnislovo
% dit wordt:
margetekst: margetekst margintext
- marginaltext
+ marginaltext marginalnitext
inlinker: inlinker inleft
- imlinken
+ imlinken vlevo
inmarge: inmarge inmargin
- inmarginalie
+ inmarginalie naokraj
inanderemarge: inanderemarge inothermargin
- inanderermarginale
+ inanderermarginale nadruhyokraj
inrechter: inrechter inright
- imrechten
+ imrechten vpravo
startmargeblok: startmargeblok startmarginblock
- startmarginalblock
+ startmarginalblock startmarginalniblok
stopmargeblok: stopmargeblok stopmarginblock
- stopmarginalblock
+ stopmarginalblock stopmarginalniblok
stelinmargein: stelinmargein setupinmargin
- stelleinmarginalieein
+ stelleinmarginalieein nastavmarginalie
stelmargeblokkenin: stelmargeblokkenin setupmarginblocks
- stellemarginalblockein
+ stellemarginalblockein nastavmarginalniblok
inleftside: inlinkerrand inleftside
- imlinkenrand
+ imlinkenrand nalevo
inleftmargin: inlinkermarge inleftmargin
- inlinkermarginale
+ inlinkermarginale nalevyokraj
inrightmargin: inrechtermarge inrightmargin
- inrechtermarginale
+ inrechtermarginale napravyokraj
inrightside: inrechterrand inrightside
- imrechtenrand
+ imrechtenrand napravo
woordrechts: woordrechts wordright
- wortrechts
+ wortrechts slovovpravo
definieerblanko: definieerblanko defineblank
- definiereblanko
+ definiereblanko definujbilemisto
blanko: blanko blank
- blanko
+ blanko bilemisto
stelblankoin: stelblankoin setupblank
- stelleblankoein
+ stelleblankoein nastavbilemisto
corrigeerwitruimte: corrigeerwitruimte correctwhitespace
- korrigierezwischenraum
+ korrigierezwischenraum korekcebilehomista
fixedspaces: vastespaties fixedspaces
- festesspatium % TOBIAS
+ festesspatium tvrdemezery
fixedspace: vastespatie fixedspace
- festesspatium % TOBIAS
+ festesspatium tvrdamezera
nospace: geenspatie nospace
- keinspatium
+ keinspatium zadnamezera
space: spatie space
- spatium
+ spatium mezera
geenwitruimte: geenwitruimte nowhitespace
- keinzwischenraum
+ keinzwischenraum zadnebilemisto
opelkaar: opelkaar packed
- kleinerdurchschuss
+ kleinerdurchschuss zhustene
startopelkaar: startopelkaar startpacked
- startkleinerdurchschuss
+ startkleinerdurchschuss startzhustene
stopopelkaar: stopopelkaar stoppacked
- stopkleinerdurchschuss
+ stopkleinerdurchschuss stopzhustene
startvanelkaar: startvanelkaar startunpacked
- startgrosserdurchschuss
+ startgrosserdurchschuss startnezhustene
stopvanelkaar: stopvanelkaar stopunpacked
- stopgrosserdurchschuss
+ stopgrosserdurchschuss stopnezhustene
startregelcorrectie: startregelcorrectie startlinecorrection
- startzeilenkorrektur
+ startzeilenkorrektur startkorekceradku
stopregelcorrectie: stopregelcorrectie stoplinecorrection
- stopzeilenkorrektur
+ stopzeilenkorrektur stopkorekceradku
omlaag: omlaag godown
- nachunten
+ nachunten jdidolu
witruimte: witruimte whitespace
- zwischenraum
+ zwischenraum bilemisto
nietinspringen: nietinspringen noindenting
- nichteinziehen
+ nichteinziehen zadneodsazovani
inspringen: inspringen indenting
- einziehen
+ einziehen odsazovani
stelinspringenin: stelinspringenin setupindenting
- stelleeinziehenein
+ stelleeinziehenein nastavodsazovani
startuitlijnen: startuitlijnen startalignment
- startausrichtung
+ startausrichtung startzarovnavani
stopuitlijnen: stopuitlijnen stopalignment
- stopausrichtung
+ stopausrichtung stopzarovnavani
startregels: startregels startlines
- startzeilen
+ startzeilen startradky
stopregels: stopregels stoplines
- stopzeilen
+ stopzeilen stopradky
stelregelnummerenin: stelregelnummerenin setuplinenumbering
- stellezeilennummerierungein
+ stellezeilennummerierungein nastavcislovaniradku
startregelnummeren: startregelnummeren startlinenumbering
- startzeilennummerierung
+ startzeilennummerierung startcislovaniradku
stopregelnummeren: stopregelnummeren stoplinenumbering
- stopzeilennummerierung
+ stopzeilennummerierung stopcislovaniradku
startregel: startregel startline
- startzeile
+ startzeile startradek
stopregel: stopregel stopline
- stopzeile
+ stopzeile stopradek
eenregel: eenregel someline
- einezeile
+ einezeile nejakyradek
inregel: inregel inline
- inzeile
+ inzeile vradku
crlf: crlf crlf
- crlf
+ crlf crlf
stelregelsin: stelregelsin setuplines
- stellezeilenein
+ stellezeilenein nastavradky
startsmaller: startsmaller startnarrower
- startenger
+ startenger startzuzeni
stopsmaller: stopsmaller stopnarrower
- stopenger
+ stopenger stopzuzeni
stelsmallerin: stelsmallerin setupnarrower
- stelleengerein
+ stelleengerein nastavzuzeni
definetabulate: definieertabulatie definetabulate
- definieretabulator
+ definieretabulator definujtabelaci
setuptabulate: steltabulatiein setuptabulate
- stelletabulatorein
+ stelletabulatorein nastavtabelaci
starttabel: starttabel starttable
- starttabelle
+ starttabelle starttabulka
stoptabel: stoptabel stoptable
- stoptabelle
+ stoptabelle stoptabulka
starttabellen: starttabellen starttables
- starttabellen
+ starttabellen starttabulky
stoptabellen: stoptabellen stoptables
- stoptabellen
+ stoptabellen stoptabulky
steltabellenin: steltabellenin setuptables
- stelletabellenein
+ stelletabellenein nastavtabulky
definetabletemplate: definieertabelvorm definetabletemplate
- definetabletemplate
-
+ definieretabellenvorlage definujsablonutabulky
+
pagina: pagina page
- seite
+ seite strana
koppelpagina: koppelpagina couplepage
- doppelseite
+ doppelseite parovastrana
soortpagina: soortpagina pagetype
- seitentyp
+ seitentyp typstrany
verwerkpagina: verwerkpagina processpage
- bearbeiteseite
+ bearbeiteseite zpracujstranu
koppelpapier: koppelpapier couplepaper
- doppelseitigespapier
+ doppelseitigespapier dvoustrannypapir
selecteerpapier: selecteerpapier selectpaper
- waehlepapieraus
+ waehlepapieraus vyberpapir
scherm: scherm screen
- bildschirm
+ bildschirm obrazovka
definieersectie: definieersectie definesection
- definiereabschnitt
+ definiereabschnitt definujsekci
definieersectieblok: definieersectieblok definesectionblock
- definiereabschnittsblock
+ definiereabschnittsblock definujbloksekce
stelsectieblokin: stelsectieblokin setupsectionblock
- stelleabschnittsblockein
+ stelleabschnittsblockein nastavbloksekce
stelsectiein: stelsectiein setupsection
- stelleabschnittein
+ stelleabschnittein nastavsekci
geenbovenenonderregels: geenbovenenonderregels notopandbottomlines
- keinzeilenobenundunten
+ keinzeilenobenundunten zadnehorniadolniradky
geenhoofdenvoetregels: geenhoofdenvoetregels noheaderandfooterlines
- keinekopfundfusszeilen
+ keinekopfundfusszeilen zadnezahlaviaupati
stelbovenin: stelbovenin setuptop
- stellenobenein
+ stellenobenein nastavhorejsek
stelboventekstenin: stelboventekstenin setuptoptexts
- stelletextobenein
+ stelletextobenein nastavhornitexty
stelhoofdin: stelhoofdin setupheader
- stellekopfzeileein
+ stellekopfzeileein nastavzahlavi
stelhoofdtekstenin: stelhoofdtekstenin setupheadertexts
- stellekopfzeilentextein
+ stellekopfzeilentextein nastavtextyzahlavi
stelnummeringin: stelnummeringin setuppagenumbering
- stelleseitennummeriernungein
+ stelleseitennummeriernungein nastavcislovanistran
stelonderin: stelonderin setupbottom
- stelleuntenein
+ stelleuntenein nastavspodek
stelondertekstenin: stelondertekstenin setupbottomtexts
- stelletextuntenein
+ stelletextuntenein nastavdolnitexty
stelvoetin: stelvoetin setupfooter
- stellefusszeileein
+ stellefusszeileein nastavupati
stelvoettekstenin: stelvoettekstenin setupfootertexts
- stellefusszeilentextein
+ stellefusszeilentextein nastavtextyupati
stelpaginanummerin: stelpaginanummerin setuppagenumber
- stelleseitennummerein
+ stelleseitennummerein nastavcislostrany
stelsubpaginanummerin: stelsubpaginanummerin setupsubpagenumber
- stelleunterseitennummerein
+ stelleunterseitennummerein nastavpodcislostrany
steltekstin: steltekstin setuptext
- stelletextein
+ stelletextein nastavtext
stelteksttekstenin: stelteksttekstenin setuptexttexts
- stelletexttexteein
+ stelletexttexteein nastavtexttexty
definieertekst: definieertekst definetext
- definieretext
+ definieretext definujtext
pagenumber: paginanummer pagenumber
- seitenummer
+ seitenummer cislostrany
items: items items
- posten
+ posten polozky
stelitemsin: stelitemsin setupitems
- stellepostenein
+ stellepostenein nastavpolozky
regellinks: regellinks leftaligned
- linksbuendig
+ linksbuendig zarovnanovlevo
regelmidden: regelmidden midaligned
- zentriert
+ zentriert zarovnanonastred
regelrechts: regelrechts rightaligned
- rechtsbuendig
+ rechtsbuendig zarovnanovpravo
startkolommen: startkolommen startcolumns
- startspalten
+ startspalten startsloupce
stopkolommen: stopkolommen stopcolumns
- stopspalten
+ stopspalten stopsloupce
stelkolommenin: stelkolommenin setupcolumns
- stellespaltenein
+ stellespaltenein nastavsloupce
kolom: kolom column
- spalte
+ spalte sloupec
kop: kop head
- kopf
+ kopf nadpis
but: but but
- but
+ but spodek % bottom
som: som item
- pos
+ pos polozka
nop: nop nop
- nop
+ nop nop
mar: mar mar
- mar
+ mar okr % okraj
sym: sym sym
- sym
+ sym sym
its: its its
- its
+ its pol % abbr. of polozka (item)
ran: ran ran
- ran
+ ran ran
startopsomming: startopsomming startitemize
- startaufzaehlung
+ startaufzaehlung startvycet
stelopsommingenin: stelopsommingenin setupitemizations
- stelleaufzaehlungeein % Tobias, plural
+ stelleaufzaehlungenein nastavvycty
stelopsommingin: stelopsommingin setupitemize
- stelleaufzaehlungein
+ stelleaufzaehlungein nastavvycet
stopopsomming: stopopsomming stopitemize
- stopaufzaehlung
+ stopaufzaehlung stopvycet
definieerkop: definieerkop definehead
- definiereueberschrift
+ definiereueberschrift definujnadpis
stelkopin: stelkopin setuphead
- stelleueberschriftein
+ stelleueberschriftein nastavnadpis
stelkoppenin: stelkoppenin setupheads
- stelleueberschriftenein
+ stelleueberschriftenein nastavnadpisy
stelkopnummerin: stelkopnummerin setupheadnumber
- stellekopfzahlein
+ stellekopfzahlein nastavcislonadpisu
kopnummer: kopnummer headnumber
- kopfnummer
+ kopfnummer cislonadpisu
huidigekopnummer: huidigekopnummer currentheadnumber
- heutigeskopfnummer % TOBIAS
+ heutigeskopfnummer aktualnicislonadpisu
bepaalkopnummer: bepaalkopnummer determineheadnumber
- bestimmekopfnummer % TOBIAS
+ bestimmekopfnummer stanovcislonadpisu
resetmarkering: resetmarkering resetmarking
- ruecksetztenbeschriftung
+ ruecksetztenbeschriftung resetznaceni
stelmarkeringin: stelmarkeringin setupmarking
- stellebeschriftungein
+ stellebeschriftungein nastavznaceni
definieermarkering: definieermarkering definemarking
- definierebeschriftung
+ definierebeschriftung definujznaceni
geenmarkering: geenmarkering nomarking
- keinebeschriftung
+ keinebeschriftung zadneznaceni
marking: markeer marking
- beschriftung
+ beschriftung znaceni
ontkoppelmarkering: ontkoppelmarkering decouplemarking
- entknuepfebeschriftung
+ entknuepfebeschriftung rozpojeneznaceni
koppelmarkering: koppelmarkering couplemarking
- verknuepfebeschriftung
+ verknuepfebeschriftung propojeneznaceni
haalmarkering: haalmarkering getmarking
- holebeschriftung
+ holebeschriftung ziskejznaceni
stellayoutin: stellayoutin setuplayout
- stellelayoutein
+ stellelayoutein nastavvzhled
paslayoutaan: paslayoutaan adaptlayout
- passelayoutan
+ passelayoutan prizpusobvzhled
steloffsetin: steloffsetin setupoffset
- stelleoffsetein
+ stelleoffsetein nastavoffset
plaatsopgrid: plaatsopgrid placeongrid
- amgitterausrichten
+ amgitterausrichten umistinamrizku
verplaatsopgrid: verplaatsopgrid moveongrid
- amgitterneuausrichten
+ amgitterneuausrichten premistinamrizku
tooninstellingen: tooninstellingen showsetups
- zeigeeinstellungen
+ zeigeeinstellungen ukaznastaveni
toonkader: toonkader showframe
- zeigerahmen
+ zeigerahmen ukazramecek
toongrid: toongrid showgrid
- zeigegitter
+ zeigegitter ukazmrizku
toonopbouw: toonopbouw showbuildup
- zeigeaufbau
+ zeigeaufbau ukazstrukturu
toonlayout: toonlayout showlayout
- zeigelayout
+ zeigelayout ukazvzhled
toonprint: toonprint showprint
- zeigedruck
+ zeigedruck ukazvytisk
toonstruts: toonstruts showstruts
- zeigestruts
+ zeigestruts ukazpodpery
definieerpapierformaat: definieerpapierformaat definepapersize
- definierepapierformat
+ definierepapierformat definujvelikostpapiru
stelpapierformaatin: stelpapierformaatin setuppapersize
- stellepapierformatin
+ stellepapierformatein nastavvelikostpapiru
stelarrangerenin: stelarrangerenin setuparranging
- stelleanordnenein
+ stelleanordnenein nastavusporadani
versie: versie version
- version
+ version verze
stelachtergrondenin: stelachtergrondenin setupbackgrounds
- stellehintergruendeein
+ stellehintergruendeein nastavpozadi
steluitlijnenin: steluitlijnenin setupalign
- stelleausrichtungein
+ stelleausrichtungein nastavzarovnani
stelwitruimtein: stelwitruimtein setupwhitespace
- stellezwischenraumein
+ stellezwischenraumein nastavbilamista
- stelinteractiein: stelinteractiein setupinteraction
- stelleinteraktionein
+ setupinteraction: stelinteractiein setupinteraction
+ stelleinteraktionein nastavinterakci
stelinteractiemenuin: stelinteractiemenuin setupinteractionmenu
- stelleinteraktionsmenueein
+ stelleinteraktionsmenueein nastavinterakcnimenu
definieerinteractiemenu: definieerinteractiemenu defineinteractionmenu
- definiereinteraktionsmenue
+ definiereinteraktionsmenue definujinterakcnimenu
% startinteractiemenu: startinteractiemenu startinteractionmenu
-% startinteraktionsmenue
+% startinteraktionsmenue startinterakcnimenu
blokkeerinteractiemenu: blokkeerinteractiemenu disableinteractionmenu
- inaktiviereinteraktionsmenue
+ inaktiviereinteraktionsmenue zablokujinterakcnimenu
interactiebuttons: interactiebuttons interactionbuttons
- interaktionsknopfe
+ interaktionsknopfe interakcnitlacitka
interactiebalk: interactiebalk interactionbar
- interaktionsbalken
+ interaktionsbalken interakcnilista
stelinteractiebalkin: stelinteractiebalkin setupinteractionbar
- stelleinteraktionsbalkenein
+ stelleinteraktionsbalkenein nastavinterakcnilistu
stelinteractieschermin: stelinteractieschermin setupinteractionscreen
- stelleinteraktionsbildschirmein
+ stelleinteraktionsbildschirmein nastavinterakcniobrazovku
placebookmarks: plaatsbookmarks placebookmarks
- platzierebookmarks
+ platzierebookmarks umistizalozky
bookmark: bookmark bookmark
- bookmark
+ bookmark zalozka
definieerbeeldmerk: definieerbeeldmerk definelogo
- definierelogo
+ definierelogo definujlogo
plaatsbeeldmerken: plaatsbeeldmerken placelogos
- platzierelogo
+ platzierelogo umistiloga
definecolor: definieerkleur definecolor
- definierefarbe
+ definierefarbe definujbarvu
definecolorgroup: definieerkleurgroep definecolorgroup
- definierefarbengruppe
+ definierefarbengruppe definujskupinubarev
definepalet: definieerpalet definepalet
- definierepalette
+ definierepalette definujpaletu
graycolor: grijskleur graycolor
- graufarbe
+ graufarbe sedabarva
color: kleur color
- farbe
+ farbe barva
startcolor: startkleur startcolor
- startfarbe
+ startfarbe startbarva
stopcolor: stopkleur stopcolor
- stopfarbe
+ stopfarbe stopbarva
setupcolors: stelkleurenin setupcolors
- stellefarbenein
+ stellefarbenein nastavbarvy
setupcolor: stelkleurin setupcolor
- stellefarbeein
+ stellefarbeein nastavbarvu
setuppalet: stelpaletin setuppalet
- stellepaletteein
+ stellepaletteein nastavpaletu
showcolor: toonkleur showcolor
- zeigefarbe
+ zeigefarbe ukazbarvu
showcolorgroup: toonkleurgroep showcolorgroup
- zeigefarbengruppe
+ zeigefarbengruppe ukazskupinubarev
showpalet: toonpalet showpalet
- zeigepalette
+ zeigepalette ukazpaletu
comparecolorgroup: vergelijkkleurgroep comparecolorgroup
- vergleichefarbengruppe
+ vergleichefarbengruppe porovnejskupinubarev
comparepalet: vergelijkpalet comparepalet
- vergleichepalette
+ vergleichepalette porovnejpaletu
colorvalue: kleurwaarde colorvalue
- farbewert
+ farbewert hodnotabarvy
greyvalue: grijswaarde greyvalue
- grauwert
+ grauwert hodnotasedi
startraster: startraster startraster
- startraster
+ startraster startrastr
stopraster: stopraster stopraster
- stopraster
+ stopraster stoprastr
definieerblok: definieerblok defineblock
- definiereblock
+ definiereblock definujblok
stelblokin: stelblokin setupblock
- stelleblockein
+ stelleblockein nastavblok
gebruikblokken: gebruikblokken useblocks
- verwendebloecke
+ verwendebloecke uzijbloky
verwerkblokken: verwerkblokken processblocks
- bearbeitebloecke
+ bearbeitebloecke zpracujbloky
handhaafblokken: handhaafblokken keepblocks
- behaltebloecke
+ behaltebloecke zachovejbloky
selecteerblokken: selecteerblokken selectblocks
- waehlebloeckeaus
+ waehlebloeckeaus vyberbloky
verbergblokken: verbergblokken hideblocks
- verbergebloecke
+ verbergebloecke schovejbloky
geenblokkenmeer: geenblokkenmeer nomoreblocks
- keinebloeckemehr
+ keinebloeckemehr zadnedalsibloky
definieerlijst: definieerlijst definelist
- definiereliste
+ definiereliste definujseznam
definieersamengesteldelijst: definieersamengesteldelijst definecombinedlist
- definierezusammengestellteliste
+ definierezusammengestellteliste definujkombinovanyseznam
plaatslijst: plaatslijst placelist
- platziereliste
+ platziereliste umistiseznam
plaatssamengesteldelijst: plaatssamengesteldelijst placecombinedlist
- platzierezusammengestellteliste
+ platzierezusammengestellteliste umistikombinovanyseznam
schrijfnaarlijst: schrijfnaarlijst writetolist
- schreibezurliste
+ schreibezurliste zapisdoseznamu
schrijftussenlijst: schrijftussenlijst writebetweenlist
- schreibezwischenliste
+ schreibezwischenliste zapismeziseznam
stellijstin: stellijstin setuplist
- stellelisteein
+ stellelisteein nastavseznam
stelsamengesteldelijstin: stelsamengesteldelijstin setupcombinedlist
- stellezusammengestelltelisteein
+ stellezusammengestelltelisteein nastavkombinovanyseznam
bepaallijstkenmerken: bepaallijstkenmerken determinelistcharacteristics
- bestimmelistencharakeristika
+ bestimmelistencharakeristika stanovcharakteristickuseznamu
lijstlengte: lijstlengte listlength
- listlength % TOBIAS
+ listenlaenge delkaseznamu
lijstbreedte: lijstbreedte listwidth
- listwidth % TOBIAS
+ listenbreite sirkaseznamu
lijsthoogte: lijsthoogte listheight
- listheight % TOBIAS
+ listenhoehe vyskaseznamu
geenlijst: geenlijst nolist
- keineliste % TOBIAS
+ keineliste zadnyseznam
% zal vervallen
definieerreferentielijst: definieerreferentielijst definereferencelist
- definierereferenzliste
+ definierereferenzliste definujseznamodkazu
plaatsreferentielijst: plaatsreferentielijst placereferencelist
- platzierereferenzliste
+ platzierereferenzliste umistiseznamodkazu
schrijfnaarreferentielijst: schrijfnaarreferentielijst writetoreferencelist
- schreibezurreferenzliste
+ schreibezurreferenzliste zapisdoseznamuodkazu
stelreferentielijstin: stelreferentielijstin setupreferencelist
- stellereferenzlisteein
+ stellereferenzlisteein nastavseznamodkazu
definieerplaatsblok: definieerplaatsblok definefloat
- definieregleitobjekt
+ definieregleitobjekt definujplvouciobjekt
stelplaatsblokin: stelplaatsblokin setupfloat
- stellegleitobjektein
+ stellegleitobjektein nastavplvouciobjekt
stelplaatsblokkenin: stelplaatsblokkenin setupfloats
- stellegleitobjekteein
+ stellegleitobjekteein nastavplvouciobjekty
splitsplaatsblok: splitsplaatsblok splitfloat
- teilegleitobjekt
+ teilegleitobjekt rozdelplvouciobjekt
stelplaatsblokkensplitsenin: stelplaatsblokkensplitsenin setupfloatsplitting
- stelleplatziegeteiltegleitobjekteein
+ stelleplatziegeteiltegleitobjekteein nastavdeleniplvoucichobjektu
startcombinatie: startcombinatie startcombination
- startkombination
+ startkombination startspojeni
stopcombinatie: stopcombinatie stopcombination
- stopkombination
+ stopkombination stopspojeni
plaatsnaastelkaar: plaatsnaastelkaar placesidebyside
- platzierenebeneinander
+ platzierenebeneinander umistivedlesebe
plaatsonderelkaar: plaatsonderelkaar placeontopofeachother
- platziereuntereinander
+ platziereuntereinander umistinadsebe
stelblokkopjein: stelblokkopjein setupcaption
- stellebildunterschriftein
+ stellebildunterschriftein nastavpopisek
stelblokkopjesin: stelblokkopjesin setupcaptions
- stellebilderunterschriftein
+ stellebilderunterschriftein nastavpopisky
stelcombinatiesin: stelcombinatiesin setupcombinations
- stellekombinationein
+ stellekombinationein nastavspojeni
startoverlay: startoverlay startoverlay
- startoverlay
+ startoverlay startprekryv
stopoverlay: stopoverlay stopoverlay
- stopoverlay
+ stopoverlay stopprekryv
definieerregister: definieerregister defineregister
- definiereregister
+ definiereregister definujrejstrik
koppelregister: koppelregister coupleregister
- verknuepfregister
+ verknuepfregister propojenyrejstrik
stelregisterin: stelregisterin setupregister
- stelleregisterein
+ stelleregisterein nastavrejstrik
schrijfnaarregister: schrijfnaarregister writetoregister
- schreibezumregister
+ schreibezumregister zapisdorejstriku
plaatsregister: plaatsregister placeregister
- platziereregister
+ platziereregister umistirejstrik
bepaalregisterkenmerken: bepaalregisterkenmerken determineregistercharacteristics
- bestimmeregistercharakteristika
+ bestimmeregistercharakteristika urcicharakteristikurejstriku
definieersorteren: definieersorteren definesorting
- definieresortieren
+ definieresortieren definujtrideni
definieersynoniemen: definieersynoniemen definesynonyms
- definieresynonyme
+ definieresynonyme definujsynonyma
stelsorterenin: stelsorterenin setupsorting
- stellesortierenein
+ stellesortierenein nastavtrideni
stelsynoniemenin: stelsynoniemenin setupsynonyms
- stellesynonymein
+ stellesynonymein nastavsynonyma
startsynchronisatie: startsynchronisatie startsynchronization
- startsynchronisation
+ startsynchronisation startsynchronizace
stopsynchronisatie: stopsynchronisatie stopsynchronization
- stopsynchronisation
+ stopsynchronisation stopsynchronizace
stelsynchronisatiebalkin: stelsynchronisatiebalkin setupsynchronizationbar
- stellesynchronisationsbalkenein
+ stellesynchronisationsbalkenein nastavsynchronizacnilistu
stelsynchronisatiein: stelsynchronisatiein setupsynchronization
- stellesynchronisationein
+ stellesynchronisationein nastavsynchronizaci
synchronisatiebalk: synchronisatiebalk synchronizationbar
- synchronisationsbalken
+ synchronisationsbalken synchronizacnilista
synchroniseer: synchroniseer synchronize
- synchronisieren
+ synchronisieren synchronizovat
gebruikexterndocument: gebruikexterndocument useexternaldocument
- verwendeexteresdokument
+ verwendeexteresdokument uzijexternidokument
gebruikURL: gebruikURL useURL
- verwendeURL
+ verwendeURL uzijURL
gebruikurl: gebruikurl useurl
- verwendeurl
+ verwendeurl uzijurl
setupurl: stelurlin setupurl
- stelleurlein
+ stelleurlein nastavurl
coupledocument: koppeldocument coupledocument
- verknuepfedokument
+ verknuepfedokument propojenydokument
stelprogrammasin: stelprogrammasin setupprograms
- stelleprogrammein
+ stelleprogrammein nastavprogramy
definieerprogramma: definieerprogramma defineprogram
- definiereprogramme
+ definiereprogramme definujprogram
programma: programma program
- programm
+ programm program
stelpaginaovergangenin: stelpaginaovergangenin setuppagetransitions
- stelleseitenuebergangein
+ stelleseitenuebergangein nastavprechodstrany
definieerprofiel: definieerprofiel defineprofile
- definiereprofil
+ definiereprofil definujprofil
definieerversie: definieerversie defineversion
- definiereversion
+ definiereversion definujverzi
markeerversie: markeerversie markversion
- beschrifteversion
+ beschrifteversion oznacverzi
selecteerversie: selecteerversie selectversion
- waehleversionaus
+ waehleversionaus vyberverzi
startprofiel: startprofiel startprofile
- startprofil
+ startprofil startprofil
startversie: startversie startversion
- startversion
+ startversion startverze
stelprofielenin: stelprofielenin setupprofiles
- stelleprofilein
+ stelleprofilein nastavprofily
stelversiesin: stelversiesin setupversions
- stelleversionein
+ stelleversionein nastavverze
stopprofiel: stopprofiel stopprofile
- stopprofil
+ stopprofil stopprofil
stopversie: stopversie stopversion
- stopversion
+ stopversion stopverze
volgprofiel: volgprofiel followprofile
- folgeprofil
+ folgeprofil dodrzujprofil
volgprofielversie: volgprofielversie followprofileversion
- folgeprofilversion
+ folgeprofilversion dodrzujverziprofilu
volgversie: volgversie followversion
- folgeversion
+ folgeversion dodrzujverzi
doordefinieren: doordefinieren definedescription
- definierebeschreibung
+ definierebeschreibung definujpopis
doorlabelen: doorlabelen definelabel
- definierelabel
+ definierelabel definujpopisek
doornummeren: doornummeren defineenumeration
- definierenummerierung
+ definierenummerierung definujvycet
doorspringen: doorspringen defineindenting
- definiereeinzug
+ definiereeinzug definujodsazovani
steldoordefinierenin: steldoordefinierenin setupdescriptions
- definierebeschreibungen
+ definierebeschreibungen nastavpopisy
steldoornummerenin: steldoornummerenin setupenumerations
- stellebeschreibungein
+ stellebeschreibungein nastavvycty
steldoorspringenin: steldoorspringenin setupindentations
- stelleeinzuegein
+ stelleeinzuegein nastavodsazovani
steltabin: steltabin setuptab
- stelletabein
+ stelletabein nastavtab
tab: tab tab
- tab
+ tab tab
setupexternalfigures: stelexternefigurenin setupexternalfigures
- stelleexterneabbildungenein
+ stelleexterneabbildungenein nastavexterniobrazy
showexternalfigures: toonexternefiguren showexternalfigures
- zeigeexterneabbildungen
+ zeigeexterneabbildungen ukazexterniobrazy
externalfigure: externfiguur externalfigure
- externeabbildung
+ externeabbildung externiobraz
% showexternalfigure: toonexternfiguur showexternalfigure
-% zeigeexterneabbildung
+% zeigeexterneabbildung ukazexterniobrazy
useexternalfigure: gebruikexternfiguur useexternalfigure
- verwendeexterneabbildung
+ verwendeexterneabbildung uzijexterniobraz
startfigure: startfiguur startfigure
- startabbildung
+ startabbildung startobraz
% stopfigure: stopfiguur stopfigure
-% stopabbildung
+% stopabbildung stopobraz
referring: refereer referring
- referieren
+ referieren odkazujici
% marking: markeer marking
-% beschriftung
+% beschriftung oznacujici
remark: toelichting remark
- bemerkung
+ bemerkung poznamka
colorbar: kleurenbalk colorbar
- farbbalken
+ farbbalken barevnalista
rooster: rooster grid
- gitter
+ gitter mrizka
button: button button
- knopf
+ knopf tlacitko
menubutton: menubutton menubutton
- menueknopf
+ menueknopf tlacitkomenu
stelbuttonsin: stelbuttonsin setupbuttons
- stelleknopfein
+ stelleknopfein nastavtlacitka
usereferences: gebruikreferenties usereferences
- verwendereferenzen
+ verwendereferenzen uzijodkazy
reflijst: reflijst reflist
- refliste
+ refliste seznamodkazu
stelreferentielijstin: stelreferentielijstin setupreferencelist
- stellereferenzlisteein
+ stellereferenzlisteein nastavseznamodkazu
setupreferencing: stelrefererenin setupreferencing
- stellereferenzierenein
+ stellereferenzierenein nastavodkazovani
textreference: tekstreferentie textreference
- textreferenz
+ textreferenz odkaznatext
pagereference: paginareferentie pagereference
- seitenreferenz
+ seitenreferenz odkaznastranu
reference: referentie reference
- referenz
+ referenz odkaz
definereference: definieerreferentie definereference
- definierereferenz
+ definierereferenz definujodkaz
useJSscripts: gebruikJSscripts useJSscripts
- verwendeJSscript
+ verwendeJSscript uzijJSscripts
uit: uit from
- von
+ von z
in: in in
- in
+ in v
op: op at
- bei
+ bei v
over: over about
- euber
+ euber o
naar: naar goto
- zu
+ zu jdina
atpage: oppagina atpage
- atpage % TOBIAS
+ aufseite nastrane
somewhere: ergens somewhere
- irgendwo
+ irgendwo nekde
ref: ref ref
- ref
+ ref odkaz
naarbox: naarbox gotobox
- zurbox
+ zurbox jdinabox
naarpagina: naarpagina gotopage
- zurseite % - old but forgotten
+ zurseite jdinastranu
+% zurseite % - old but forgotten
% startformule: startformule startformula
-% startformel
+% startformel startrovnice
% stopformule: stopformule stopformula
-% stopformel
+% stopformel stoprovnice
plaatsformule: plaatsformule placeformula
- platziereformel
+ platziereformel umistirovnici
plaatssubformule: plaatssubformule placesubformula
- platziereunterformel
+ platziereunterformel umistipodrovnici
stelformulesin: stelformulesin setupformulae
- stelleformelnein
+ stelleformelnein nastavrovnice
% startgegeven: startgegeven startfact
-% startgegeben
+% startgegeben startfakt
% stopgegeven: stopgegeven stopfact
-% stopgegeben
+% stopgegeben stopfakt
% startlegenda: startlegenda startlegend
-% startlegende
+% startlegende startlegenda
% stoplegenda: stoplegenda stoplegend
-% stoplegende
+% stoplegende stoplegenda
leg: leg leg
- leg
+ leg leg
geg: geg fact
- geg
+ geg fakt
mathematics: wiskunde mathematics
- mathematik
+ mathematik matematika
dimension: dimensie dimension
- dimension
+ dimension rozmer
nodimension: geendimensie nodimension
- keindimension
+ keindimension zadnyrozmer
startomgeving: startomgeving startenvironment
- startumgebung
+ startumgebung startprostredi
stopomgeving: stopomgeving stopenvironment
- stopumgebung
+ stopumgebung stopprostredi
startdeelomgeving: startdeelomgeving startlocalenvironment
- startlokaleumgebung
+ startlokaleumgebung startlokalnihoprostredi
startonderdeel: startonderdeel startcomponent
- startkomponente
+ startkomponente startkomponenta
stoponderdeel: stoponderdeel stopcomponent
- stopkomponente
+ stopkomponente stopkomponenta
startprodukt: startprodukt startproduct
- startprodukt
+ startprodukt startprodukt
stopprodukt: stopprodukt stopproduct
- stopprodukt
+ stopprodukt stopprodukt
startproject: startproject startproject
- startprojekt
+ startprojekt startprojekt
stopproject: stopproject stopproject
- stopprojekt
+ stopprojekt stopprojekt
setups: instellingen setups
- einstellungen
+ einstellungen nastaveni
project: project project
- projekt
+ projekt projekt
onderdeel: onderdeel component
- komponente
+ komponente komponenta
produkt: produkt product
- produkt
+ produkt produkt
omgeving: omgeving environment
- umgebung
+ umgebung prostredi
geenfilesmeer: geenfilesmeer nomorefiles
- keinedateienmehr
+ keinedateienmehr zadnedalsisoubory
haalbuffer: haalbuffer getbuffer
- holepuffer
+ holepuffer ziskejbuffer
% startbuffer: startbuffer startbuffer
-% startbuffer
+% startbuffer startbuffer
% stopbuffer: stopbuffer stopbuffer
-% stopbuffer
+% stopbuffer stopbuffer
stelbufferin: stelbufferin setupbuffer
- stellepufferein
+ stellepufferein nastavbuffer
typebuffer: typebuffer typebuffer
- tippepuffer
+ tippepuffer typebuffer
definieerbuffer: definieerbuffer definebuffer
- definierepuffer % TOBIAS
+ definierepuffer definujbuffer
betekenis: betekenis unitmeaning
- bedeutung
+ bedeutung vyznam
voluit: voluit infull
- volleswort
+ volleswort plnezneni
citaat: citaat quotation
- zitat
+ zitat citace
citeer: citeer quote
- zitieren
+ zitieren citovat
startcitaat: startcitaat startquotation
- startzitat
+ startzitat startcitace
stopcitaat: stopcitaat stopquotation
- stopzitat
+ stopzitat stopcitace
stelciterenin: stelciterenin setupquote
- stellezitierenein
+ stellezitierenein nastavcitaci
definieer: definieer define
- definieren
+ definieren definuj
herhaal: herhaal redo
- wiederholen
+ wiederholen opakovat
gebruikcommandos: gebruikcommandos usecommands
- verwendebefehl
+ verwendebefehl uzijprikazy
definieerstartstop: definieerstartstop definestartstop
- definierestartstop
+ definierestartstop definujstartstop
startlocal: startlokaal startlocal
- startlokal
+ startlokal startlokalni
stoplocal: stoplokaal stoplocal
- stoplokal
+ stoplokal stoplokalni
startglobal: startglobaal startglobal
- startglobal
+ startglobal startglobalni
stopglobal: stopglobaal stopglobal
- stopglobal
+ stopglobal stopglobalni
naam: naam name
- name
+ name jmeno
definieeropmaak: definieeropmaak definemakeup
- definiereumbruch
+ definiereumbruch definujupravu
stelopmaakin: stelopmaakin setupmakeup
- stelleumbruchein
+ stelleumbruchein nastavupravu
startopmaak: startopmaak startmakeup
- startumbruch
+ startumbruch startuprava
stopopmaak: stopopmaak stopmakeup
- stopumbruch
+ stopumbruch stopuprava
gebruikexternefile: gebruikexternefile useexternalfile
- verwendeexternedatei
+ verwendeexternedatei uzijexternisoubor
gebruikexternefiles: gebruikexternefiles useexternalfiles
- verwendeexternedateien
+ verwendeexternedateien uzijexternisoubory
kenmerk: kenmerk referral
- verweis
+ verweis odkaz
kenmerkdatum: kenmerkdatum referraldate
- verweisdatum
+ verweisdatum odkaznadatum
hoog: hoog high
- hoch
+ hoch vysoky
laho: laho lohi
- hoti
+ hoti nivy
laag: laag low
- tief
+ tief nizky
% startuitstellen: startuitstellen startpostponing
-% startverschieben
+% startverschieben startodsunuti
% stopuitstellen: stopuitstellen stoppostponing
-% stopverschieben
+% stopverschieben stopodsunuti
% startverbergen: startverbergen starthiding
-% startverbergen
+% startverbergen startukryti
% stopverbergen: stopverbergen stophiding
-% stopverbergen
+% stopverbergen stopukryti
breuk: breuk fraction
- bruch
+ bruch zlomek
chem: chem chem
- chem
+ chem chem
startnaast: startnaast startopposite
- startgegenueber
+ startgegenueber startprotejsek
stopnaast: stopnaast stopopposite
- stopgegenueber
+ stopgegenueber stopprotejsek
stelnaastplaatsenin: stelnaastplaatsenin setupoppositeplacing
- stellegegenueberplatzierenein
+ stellegegenueberplatzierenein nastavumisteniprotejsku
startpositioneren: startpositioneren startpositioning
- startpositionieren
+ startpositionieren startumistovani
stoppositioneren: stoppositioneren stoppositioning
- stoppositionieren
+ stoppositionieren stopumistovani
positioneer: positioneer position
- position
+ position pozice
stelpositionerenin: stelpositionerenin setuppositioning
- stellepositionierenein
+ stellepositionierenein nastavumistovani
roteer: roteer rotate
- drehen
+ drehen otocit
stelroterenin: stelroterenin setuprotate
- stelledrehenein
+ stelledrehenein nastavotoceni
spiegel: spiegel mirror
- spiegeln
+ spiegeln zrcadlit
schaal: schaal scale
- format
+ format meritko
stelnummerenin: stelnummerenin setupnumbering
- stellenummerierungein
+ stellenummerierungein nastavcislovani
reset: reset reset
- ruecksetzten
+ ruecksetzten reset
stelpublicatiesin: stelpublicatiesin setuppublications
- stellepublikationein
+ stellepublikationein nastavpublikace
publicatie: publicatie publication
- publikation
+ publikation publikace
definieerhbox: definieerhbox definehbox
- definierehbox
+ definierehbox definujhbox
toevoegen: toevoegen adding
- zusatz
+ zusatz scitani
punten: punten periods
- punkt
+ punkt tecky
stelkoppeltekenin: stelkoppeltekenin setuphyphenmark
- stellebindestrichein
+ stellebindestrichein nastavdelitko
stelinterliniein: stelinterliniein setupinterlinespace
- stellezeilenabstandein
+ stellezeilenabstandein nastavmeziradkovoumezeru
stelspatieringin: stelspatieringin setupspacing
- stellespatiumein
+ stellespatiumein nastavradkovani
steltolerantiein: steltolerantiein setuptolerance
- stelletoleranzein
+ stelletoleranzein nastavtoleranci
setupsystem: stelsysteemin setupsystem
- stellesystemein
+ stellesystemein nastavsystem
usepath: gebruikgebied usepath
- usepath % TOBIAS
+ benutzepfad uzijcestu
definieeralineas: definieeralineas defineparagraphs
- definiereabsaetze
+ definiereabsaetze definujodstavce
stelalineasin: stelalineasin setupparagraphs
- stelleabsaetzeein
+ stelleabsaetzeein nastavodstavce
geentest: geentest donttest
- keintest
+ keintest zadnytest
stelcommentaarin: stelcommentaarin setupcomment
- stellekommentarein
+ stellekommentarein nastavkomentar
commentaar: commentaar comment
- kommentar
+ kommentar komentar
definefield: definieerveld definefield
- definierefeld
+ definierefeld definujpole
definemainfield: definieerhoofdveld definemainfield
- definemainfield % TOBIAS
+ definierehauptfeld definujhlavnipole
definesubfield: definieersubveld definesubfield
- definieresubfeld
+ definieresubfeld definujpodpole
clonefield: kloonveld clonefield
- klonierefeld
+ klonierefeld klonujpole
copyfield: copieerveld copyfield
- kopierefeld
+ kopierefeld kopirujpole
setupfield: stelveldin setupfield
- stellefeldein
+ stellefeldein nastavpole
setupfields: stelveldenin setupfields
- stellefelderin
+ stellefelderin nastavvsechnapole
field: veld field
- feld
+ feld pole
fitfield: passendveld fitfield
- passendfeld
+ passendfeld prizpusobivepole % or vhodnepole ?
logfields: registreervelden logfields
- registrierefelder
+ registrierefelder zaznamovepole
showfields: toonvelden showfields
- zeigefelder
+ zeigefelder ukazpole
tooltip: suggestie tooltip
- tooltip
+ tooltip bublinkovanapoveda
fillinfield: invulveld fillinfield
- ausfuellfeld
+ ausfuellfeld vyplnovepole % or vyplnenepole ?
definefieldstack: definieerveldstapel definefieldstack
- definierefeldstapel
+ definierefeldstapel definujzasobnikpoli
fieldstack: veldstapel fieldstack
- feldstapel
+ feldstapel zasobnikpoli
+
+ setupclipping: stelclipin setupclipping
+ stelleausschnittein setupclipping % TOM
+ clip: clip clip
+ ausschnitt clip % TOM
+
+ placelegend: plaatslegenda placelegend
+ platzierelegende placelegend % TOM
+ setuplegend: stellegendain setuplegend
+ stellelegendeein setuplegend % TOM
+
+ setuppagecomment: stelpaginacommentaarin setuppagecomment
+ setuppagecomment setuppagecomment % TOBIAS % TOM
\stopcommands
@@ -1266,78 +1283,78 @@
%D \startcompressdefinitions
\startcommands dutch english
- german
+ german czech
bovenhoogte: bovenhoogte topheight
- hoeheoben
+ hoeheoben vyskahorejsku
bovenafstand: bovenafstand topdistance
- abstandoben
+ abstandoben vzdalenosthorejsku
hoofdhoogte: hoofdhoogte headerheight
- kopfzeilenhoehe
+ kopfzeilenhoehe vyskazahlavi
hoofdafstand: hoofdafstand headerdistance
- kopfzeilenabstand
+ kopfzeilenabstand vzdalenostzahlavi
teksthoogte: teksthoogte textheight
- texthoehe
+ texthoehe vyskatextu
voetafstand: voetafstand footerdistance
- fusszeileabstand
+ fusszeileabstand vzdalenostupati
voethoogte: voethoogte footerheight
- fusszeilenhoehe
+ fusszeilenhoehe vyskaupati
onderafstand: onderafstand bottomdistance
- abstandunten
+ abstandunten vzdalenostspodku
onderhoogte: onderhoogte bottomheight
- hoeheunten
+ hoeheunten vyskaspodku
margebreedte: margebreedte marginwidth
- marginalbreite
+ marginalbreite sirkamarginalie
linkermargebreedte: linkermargebreedte leftmarginwidth
- linkemarginalbreite
+ linkemarginalbreite sirkalevemarginalie
rechtermargebreedte: rechtermargebreedte rightmarginwidth
- rechtemarginalbreite
+ rechtemarginalbreite sirkapravemarginalie
margeafstand: margeafstand margindistance
- marginalafstand
+ marginalafstand vzdalenostmarginalie
linkermargeafstand: linkermargeafstand leftmargindistance
- linkemarginalafstand
+ linkemarginalafstand vzdalenostlevemarginalie
rechtermargeafstand: rechtermargeafstand rightmargindistance
- rechtemarginalafstand
+ rechtemarginalafstand vzdalenostpravemarginalie
randbreedte: randbreedte edgewidth
- randbreite
+ randbreite sirkaokraje
linkerrandbreedte: linkerrandbreedte leftedgewidth
- breitelinkerrand
+ breitelinkerrand sirkalevehookraje
rechterrandbreedte: rechterrandbreedte rightedgewidth
- breiterechterrand
+ breiterechterrand sirkapravehookraje
randafstand: randafstand edgedistance
- randabstand
+ randabstand vzdalenostokraje
linkerrandafstand: linkerrandafstand leftedgedistance
- abstandlinkerrand
+ abstandlinkerrand vzdalenostlevehookraje
rechterrandafstand: rechterrandafstand rightedgedistance
- abstandrechterrand
+ abstandrechterrand vzdalenostpravehookraje
tekstbreedte: tekstbreedte textwidth
- textbreite
+ textbreite sirkatextu
zetbreedte: zetbreedte makeupwidth
- satzbreite
+ satzbreite sirkasazby
zethoogte: zethoogte makeupheight
- satzhoehe
+ satzhoehe vyskasazby
kopwit: kopwit topspace
- kopfweite
+ kopfweite hornimezera
rugwit: rugwit backspace
- rumpfweite
+ rumpfweite spodnimezera
papierbreedte: papierbreedte paperwidth
- papierbreite
+ papierbreite sirkapapiru
papierhoogte: papierhoogte paperheight
- papierhoehe
+ papierhoehe vyskapapiru
printpapierbreedte: printpapierbreedte printpaperwidth
- printpapierbreite
+ printpapierbreite sirkatiskpapiru
printpapierhoogte: printpapierhoogte printpaperheight
- printpapierhoehe
+ printpapierhoehe vyskatiskpapiru
kopniveau: kopniveau headlevel
- kopfniveau
+ kopfniveau hlavniuroven
linewidth: lijndikte linethickness
- liniendicke
+ liniendicke tloustkacary
totaalaantalpaginas: totaalaantalpaginas totalnumberofpages
- gesamtseitenanzahl
+ gesamtseitenanzahl celkovypocetstran
\stopcommands
@@ -1350,34 +1367,34 @@
%D \startcompressdefinitions
\startcommands dutch english
- german
+ german czech
startdocument: startdocument startdocument
- startdokument
+ startdokument startdokument
stopdocument: stopdocument stopdocument
- stopdokument
+ stopdokument stopdokument
startoverzicht: startoverzicht startoverview
- startueberblick
+ startueberblick startprehled
stopoverzicht: stopoverzicht stopoverview
- stopueberblick
+ stopueberblick stopprehled
stelbrievenin: stelbrievenin setupcorrespondence
- stellekorrespondenzein
+ stellekorrespondenzein nastavkorespondenci
brieven: brieven letters
- briefe
+ briefe dopisy
brief: brief letter
- brief
+ brief dopis
label: label label
- label
+ label poppisek
sheet: sheet sheet
- blatt
+ blatt list
stelstickersin: stelstickersin setupstickers
- stellestickerein
+ stellestickerein nastavetikety
stelsheetsin: stelsheetsin setupsheets
- stelleblattein
+ stelleblattein nastavlisty
labels: labels labels
- labels
+ labels popisky
woonplaats: woonplaats domicile
- wohnort
+ wohnort bydliste
\stopcommands
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index aaf2f0683..03b370db8 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -8,11 +8,14 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
%D In this rather large definition file we are going to tell
%D \CONTEXT\ which constants, variables and elements we use.
+%D
+%D The German translations were provided by Tobias Burnus,
+%D and the Czech ones by Tom Hudec.
\writestatus{loading}{Context Multilingual Macros / Constants}
@@ -23,13 +26,13 @@
%D \startcompressdefinitions
-\startvariables dutch english german
+\startvariables dutch english german czech
- een: een one eins
- twee: twee two zwei
- drie: drie three drei
- vier: vier four vier
- vijf: vijf five fuenf
+ een: een one eins jedna
+ twee: twee two zwei dve
+ drie: drie three drei tri
+ vier: vier four vier ctyri
+ vijf: vijf five fuenf pet
\stopvariables
@@ -39,42 +42,42 @@
%D \startcompressdefinitions
-\startvariables dutch english german
+\startvariables dutch english german czech
- sunday: zondag sunday sonntag
- monday: maandag monday montag
- tuesday: dinsdag tuesday dienstag
- wednesday: woensdag wednesday mittwoch
- thursday: donderdag thursday donnerstag
- friday: vrijdag friday freitag
- saturday: zaterdag saturday samstag
+ sunday: zondag sunday sonntag nedele
+ monday: maandag monday montag pondeli
+ tuesday: dinsdag tuesday dienstag utery
+ wednesday: woensdag wednesday mittwoch streda
+ thursday: donderdag thursday donnerstag ctvrtek
+ friday: vrijdag friday freitag patek
+ saturday: zaterdag saturday samstag sobota
\stopvariables
-\startvariables dutch english german
-
- january: januari January Januar
- february: februari February Februar
- march: maart March Maerz
- april: april April April
- may: mei May Mai
- june: juni June Juni
- july: juli July Juli
- august: augustus August August
- september: september September September
- october: oktober October Oktober
- november: november November November
- december: december December Dezember
+\startvariables dutch english german czech
+
+ january: januari January Januar leden
+ february: februari February Februar unor
+ march: maart March Maerz brezen
+ april: april April April duben
+ may: mei May Mai kveten
+ june: juni June Juni cerven
+ july: juli July Juli cervenec
+ august: augustus August August srpen
+ september: september September September zari
+ october: oktober October Oktober rijen
+ november: november November November listopad
+ december: december December Dezember prosinec
\stopvariables
%D Next we introduce some general label bound variables:
-\startvariables dutch english german
+\startvariables dutch english german czech
- oppagina: oppagina atpage aufseite
- hierboven: hierboven hencefore vorher
- hieronder: hieronder hereafter nachher
+ oppagina: oppagina atpage aufseite nastrane
+ hierboven: hierboven hencefore vorher vyse
+ hieronder: hieronder hereafter nachher nize
\stopvariables
@@ -87,37 +90,62 @@
%D \startcompressdefinitions
\startvariables dutch english german
+ czech
sectionlevel: sectie section abschnitt
+ oddil
deel: deel part teil
+ cast
hoofdstuk: hoofdstuk chapter kapitel
+ kapitola
onderwerp: onderwerp subject thema
+ tema
paragraaf: paragraaf section absatz
+ sekce
titel: titel title titel
+ titul
+
+ margetitel: margetitel margintitle marginaltitel
+ margetitel % TOM
inhoud: inhoud content inhalt
+ obsah
inhouden: inhouden contents inhalte
+ obsah
bijlage: bijlage appendix anhang
+ dodatek
bijlagen: bijlagen appendices anhaenge
+ dodatky
hoofdtekst: hoofdtekst bodypart haupttext
+ hlavnicast
hoofdteksten: hoofdteksten bodymatter haupttexte
+ hlavnicasti
inleiding: inleiding frontpart einleitung
+ prednicast
inleidingen: inleidingen frontmatter einleitungen
+ prednicasti
uitleiding: uitleiding backpart epilog
+ epilog
uitleidingen: uitleidingen backmatter epiloge
+ epilogy
voetnoot: voetnoot footnote fussnote
+ poznamkapodcarou
systeem: systeem system systeme
+ system
\stopvariables
\startvariables dutch english german
+ czech
typen: typen typing tippen
+ typing
file: file file datei
+ soubor
\stopvariables
@@ -130,33 +158,55 @@
%D \startcompressdefinitions
\startvariables dutch english german
+ czech
formule: formule formula formel
+ rovnice
formules: formules formulae formeln
+ rovnice
figuur: figuur figure abbildung
+ obrazek
figuren: figuren figures abbildungen
+ obrazky
tabel: tabel table tabelle
+ tabulka
tabellen: tabellen tables tabellen
+ tabulky
grafiek: grafiek graphic grafik
+ graf
grafieken: grafieken graphics grafiken
+ grafy
intermezzo: intermezzo intermezzo intermezzo
+ intermezzo
intermezzos: intermezzos intermezzi intermezzi
+ intermezzi
index: index index index
+ rejstrik
indices: indices indices indizies
+ rejstriky
afkorting: afkorting abbreviation abkuerzung
+ zkratka
afkortingen: afkortingen abbreviations abkuerzungen
+ zkratky
logo: logo logo logo
+ logo
logos: logos logos logos
+ loga
eenheid: eenheid unit einheit
+ jednotka
eenheden: eenheden units einheiten
+ jednotky
regel: regel line zeile
+ radek
regels: regels lines zeilen
+ radky
framedtext: kadertekst framedtext umrahmtertext
+ oramovanytext
\stopvariables
@@ -170,298 +220,609 @@
%D \startcompressdefinitions
\startconstants dutch english german
+ czech
leftquotation: linkercitaat leftquotation linkerzitat
+ citacevlevo
rightquotation: rechtercitaat rightquotation rechterzitat
+ citacevpravo
leftquote: linkerciteer leftquote linkerzitieren
+ citovatvlevo
rightquote: rechterciteer rightquote rechterzitieren
+ citovatvpravo
leftsentence: linkerzin leftsentence linkersatz
+ vetavlevo
rightsentence: rechterzin rightsentence rechtersatz
+ vetavpravo
leftsubsentence: linkersubzin leftsubsentence linkersubsatz
+ podvetavlevo
rightsubsentence: rechtersubzin rightsubsentence rechtersubsatz
+ podvetavpravo
datum: datum date datum
+ datum
voorwit: voorwit spacebefore vorspatium
+ mezerapred
nawit: nawit spaceafter nachspatium
+ mezeraza
zijvoorwit: zijvoorwit sidespacebefore nebenvorspatium
+ bocnimezerapred
zijnawit: zijnawit sidespaceafter nebennachspatium
+ bocnimezeraza
aan: aan to zu
+ na
aanduiding: aanduiding indicator indikator
+ indikator
achtergrond: achtergrond background hintergrund
+ pozadi
achtergronddiepte: achtergronddiepte backgrounddepth hintergrundtiefe
+ hloubkapozadi
achtergrondhoek: achtergrondhoek backgroundcorner hintergrundwinkel
+ rohpozadi
achtergrondkleur: achtergrondkleur backgroundcolor hintergrundfarbe
+ barvapozadi
achtergrondoffset: achtergrondoffset backgroundoffset hintergrundoffset
+ offsetpozadi
achtergrondraster: achtergrondraster backgroundscreen hintergrundraster
+ rastrpozadi
achtergrondstraal: achtergrondstraal backgroundradius hintergrundradius
+ polomerpozadi
adres: adres address adresse
+ adresa
afsluiter: afsluiter stopper abschnitttrenner
+ predel
afstand: afstand distance abstand
+ vzdalenost
assenstelsel: assenstelsel axis achsen
+ osa
auteur: auteur author autor
+ autor
balanceren: balanceren balance ausgleichen
+ rovnovaha
bfactor: bfactor wfactor bfaktor
+ sfaktor
binnen: binnen inner innen
+ vnitrni
blanko: blanko blank blanko
+ prazdny
blokkade: blokkade obstruction gesperrt
+ prekazka
blokwijze: blokwijze blockway blockauf
+ dobloku
boven: boven top oben
+ vrsek
bovenafstand: bovenafstand topdistance obenabstand
+ vzdalenostvrsku
bovenkader: bovenkader topframe obenrahmen
+ vrchniramecek
bovenoffset: bovenoffset topoffset obenoffset
+ offsetvrsku
bovenstatus: bovenstatus topstate statusoben
+ statusvrsku
breedte: breedte width breite
- maxbreedte: maxbreedte maxwidth maxbreite
+ sirka
+ maxbreedte: maxbreedte maxwidth maxbreite
+ maxsirka
bron: bron source quelle
+ zdroj
commando: commando command befehl
+ prikaz
commandos: commandos commands befehle
+ prikazy
contrastkleur: contrastkleur contrastcolor kontrastfarbe
+ kontrastnibarva
conversie: conversie conversion konversion
+ konverze
criterium: criterium criterium kriterium
+ kriterium
datum: datum date datum
- default: default default norm
+ datum
+ default: default default default
+ implicitni
diepte: diepte depth tiefe
+ hloubka
dieptecorrectie: dieptecorrectie depthcorrection tiefekorrektur
+ korekcehloubky
dikte: dikte thickness dicke
+ tloustka
doorgaan: doorgaan continue fortsetzen
+ pokracovat
dubbelzijdig: dubbelzijdig doublesided doppelseitig
+ dvoustranny
dummy: dummy dummy dummy
+ dummy
eenheid: eenheid unit einheit
+ jednotka
eigennummer: eigennummer ownnumber eigenenummer
+ vlastnicislo
evenmarge: evenmarge evenmargin geraderand
+ sudamarginalie
expansie: expansie expansion expansion
+ expanzen
factor: factor factor faktor
+ faktor
+ converteerfile: converteerfile convertfile konvertieredatei
+ converteerfile % TOM
file: file file datei
+ soubor
formaat: formaat size groesse
- autofocus: autofocus autofocus autofocus
- focus: focus focus focus
+ velikost
+ autofocus: autofocus autofocus autofocus
+ autoostreni
+ focus: focus focus focus
+ zaostreni
gebied: gebied directory verzeichnis
+ adresar
grid: grid grid gritter
- groot: groot big gross
+ mrizka
+ groot: groot big gross velky
haal: haal get hole
+ ziskat
hang: hang hang haengend
+ viset
+ herhaal: herhaal repeat wiederholen
+ opakovat
hfactor: hfactor hfactor hfaktor
+ vfaktor
hoek: hoek corner winkel
+ roh
hoffset: hoffset hoffset hoffset
+ hoffset
hokjes: hokjes frames umrahmen
+ ramecky
hoofd: hoofd header kopfzeile
+ zahlavi
hoofdafstand: hoofdafstand headerdistance kopfzeilenabstand
+ vzdalenostzahlavi
hoofdstatus: hoofdstatus headerstate kopfzeilenstatus
+ statuszahlavi
hoogte: hoogte height hoehe
+ vyska
maxhoogte: maxhoogte maxheight maxhoehe
+ maxvyska
huidige: huidige current aktuell
+ aktualni
in: in in in
+ v
inspringen: inspringen indenting einziehen
+ odsazovani
interactie: interactie interaction interaktion
+ interakce
interlinie: interlinie interlinespace zeilenabstande
+ meziradkovamezera
items: items items posten
+ polozky
kader: kader frame rahmen
+ ramecek
kaderdiepte: kaderdiepte framedepth rahmentiefe
+ hloubkaramecku
kaderhoek: kaderhoek framecorner rahmenwinkel
+ rohramecku
kaderkleur: kaderkleur framecolor rahmenfarbe
+ barvaramecku
kaderoffset: kaderoffset frameoffset rahmenoffset
+ offsetramecku
kaderstraal: kaderstraal frameradius rahmenradius
+ polomerramecku
kantlijn: kantlijn marginedge marginalkante
+ textovahrana
kantlijntekst: kantlijntekst marginedgetext marginalkantetext
+ textmarginalnihookraje
klein: klein small klein
+ male
kleur: kleur color farbe
+ barva
kolom: kolom column spalte
+ sloupec
kolomafstand: kolomafstand columndistance spaltenabstand
+ vzdalenostsloupcu
kopkleur: kopkleur headcolor kopffarbe
+ barvahlavy
kopletter: kopletter headstyle kopfstil
+ stylhlavy
kopna: kopna afterhead nachkopf
+ pohlave
kopoffset: kopoffset veroffset kopfoffset
+ offsethlavy
koppeling: koppeling coupling verknuepfung
+ propojeni
+ koppelwijze: koppelwijze couplingway verkopplungsart
+ zpusobpropojeni
kopvoor: kopvoor beforehead vorkopf
+ predhlavou
kopwit: kopwit topspace kopfspatium
+ svrchnimezera
korps: korps bodyfont fliesstext
+ zakladnifont
label: label label label
+ popisek
leeg: leeg empty leer
+ prazdne
letter: letter style stil
+ pismeno
lijn: lijn rule linie
+ linka
lijndikte: lijndikte rulethickness liniendicke
+ tloustkalinky
lijnkleur: lijnkleur rulecolor linienfarbe
+ barvalinky
lijst: lijst list liste
+ seznam
linkerbreedte: linkerbreedte leftwidth linkerbreite
+ sirkavlevo
linkerkader: linkerkader leftframe linkerrahmen
+ ramecekvlevo
linkerkleur: linkerkleur leftcolor linkerfarbe
+ barvavlevo
linkerletter: linkerletter leftstyle linkerstil
+ stylvlevo
linkermarge: linkermarge leftmargin linkerrand
+ levyokraj
linkermargeafstand: linkermargeafstand leftmargindistance linkerrandabstand
+ vzdalenostlevehookraje
linkeroffset: linkeroffset leftoffset linkeroffset
+ levyoffset
linkerrand: linkerrand leftedge linkekante
+ levahrana
linkerrandafstand: linkerrandafstand leftedgedistance linkerkantenabstand
+ vzdalenostlevehrany
linkertekst: linkertekst lefttext linkertext
+ textvlevo
links: links left links
+ vlevo
logo: logo logo logo
+ logo
logos: logos logos logos
+ loga
lokaal: lokaal local lokal
+ lokalni
marge: marge margin marginalie
+ marginalie
margeafstand: margeafstand margindistance marginalabstand
+ vzdalenostokraje
margetekst: margetekst margintext marginaltext
+ margetekst % TOM: must be unique
markering: markering marking beschriftung
+ znaceni
markleur: markleur marcolor beschrfarbe
+ barvaznacky
marletter: marletter marstyle beschrstil
+ stylsnacky
menu: menu menu menue
+ menu
methode: methode method methode
+ metoda
midden: midden middle mittig
+ stredni
middentekst: middentekst middletext mittigertext
+ strednitext
min: min min min
+ min
monster: monster sample muster
+ vzor
na: na after nach
+ po
naam: naam name name
+ jmeno
nacommando: nacommando commandafter zumbefehl
+ prikazpo
nboven: nboven ntop noben
+ nvrsek
niveau: niveau level niveau
+ uroven
niveaus: niveaus levels niveaus
+ urovne
nonder: nonder nbottom nunten
+ nspodek
norm: norm norm norm
+ norm
nregels: nregels nlines zzeile
+ nradky
nummer: nummer number nummer
+ cislo
nummercommando: nummercommando numbercommand nummerbefehl
+ ciselnyprikaz
nummeren: nummeren numbering nummerierung
+ cislovani
nummerkleur: nummerkleur numbercolor nummernfarbe
+ barvacisla
nummerletter: nummerletter numberstyle nummernstil
+ stylcisla
nummerscheider: nummerscheider numberseparator nummernseperator
+ oddelovaccisla
object: object object objekt
+ objekt
offset: offset offset offset
+ offset
onder: onder bottom unten
+ spodek
onderafstand: onderafstand bottomdistance abstandunten
+ vzdalenostspodku
onderkader: onderkader bottomframe untenrahmen
+ ramecekspodku
onderoffset: onderoffset bottomoffset untenoffset
+ offsetspodku
onderstatus: onderstatus bottomstate untenstatus
+ statusspodku
onevenmarge: onevenmarge oddmargin ungeraderand
+ lichyokraj
op: op at bei
+ op % TOM: not 'na', since that's already taken by aan:
optie: optie option option
+ volba
pagina: pagina page seite
+ strana
paginacommando: paginacommando pagecommand seitenbefehl
+ strankovyprikaz
paginakleur: paginakleur pagecolor seitenfarbe
+ barvastrany
paginaletter: paginaletter pagestyle seitenstil
+ stylstrany
paginanummer: paginanummer pagenumber seitennummer
+ cislostrany
paginaovergangen: paginaovergangen pageboundaries seitenbegrenzung
+ hranicestrany
palet: palet palet palette
+ paleta
papier: papier paper papier
+ papir
plaats: plaats location platz
+ misto
plaatsafsluiter: plaatsafsluiter placestopper setzetrenner
+ predelmista
plaatsen: plaatsen place platziere
+ plaatsen % TOM: must be unique, 'to place' or 'place it'
plaatskop: plaatskop placehead setzekopf
+ hlavamista
prefix: prefix prefix prefix
+ prefix
preset: preset preset voreinstellung
- preview: preview preview preview
+ prednastaveni
+ preview: preview preview vorschau
+ nahled
punt: punt dot punkt
- pijl: pijl arrow arrow % TOBIAS
+ tecka
+ pijl: pijl arrow pfeil
+ sipka
rand: rand edge kante
+ hrana
randafstand: randafstand edgedistance kantenabstand
+ vzdalenosthrany
raster: raster screen raster
+ rastr
rechterbreedte: rechterbreedte rightwidth rechterbreite
+ sirkavpravo
rechterkader: rechterkader rightframe rechterrahmen
+ ramecekvpravo
rechterkleur: rechterkleur rightcolor rechterfarbe
+ barvavpravo
rechterletter: rechterletter rightstyle rechterstil
+ stylvpravo
rechtermarge: rechtermarge rightmargin rechterrand
+ pravyokraj
rechtermargeafstand: rechtermargeafstand rightmargindistance rechterrandabstand
+ vzdalenostpravehookraje
rechteroffset: rechteroffset rightoffset rechterabstand
+ pravyoffset
rechterrand: rechterrand rightedge rechtekante
+ pravahrana
rechterrandafstand: rechterrandafstand rightedgedistance rechterkantenabstand
+ vzdalenostpravehrany
rechtertekst: rechtertekst righttext rechtertext
+ textvpravo
rechts: rechts right rechts
+ vpravo
reductie: reductie reduction reduktion
+ redukce
refereren: refereren referencing referieren
+ odkazujici
regel: regel line zeile
+ radek
regelcorrectie: regelcorrectie linecorrection zeilekorrektur
+ korekceradku
regels: regels lines zeilen
+ radky
resolutie: resolutie resolution aufloesung
+ rozliseni
rotatie: rotatie rotation rotation
+ rotace
rugoffset: rugoffset horoffset rumpfabstand
+ horoffset
rugwit: rugwit backspace rumpfspatium
+ zpetnamezera
+ richting: richting direction richtung
+ richting % TOM
schaal: schaal scale format
+ meritko
scheider: scheider separator seperator
+ oddelovac
scherm: scherm display bildschirm
+ obrazovka
scope: scope scope bereich
+ rozsah
sectie: sectie section abschnitt
+ oddil
sectienummer: sectienummer sectionnumber abschnittsnummer
+ cislooddilu
soort: soort family familie
+ rodina
spatie: spatie space spatium
+ mezera
spatiering: spatiering spacing spatiumausgleich
+ mezerovani
springvolgendein: springvolgendein indentnext ziehefolgendeein
+ odsadpristi
stap: stap step schritt
+ krok
start: start start start
+ start
status: status state status
+ status
stop: stop stop stop
+ stop
straal: straal radius radius
- streep: streep dash dash % TOBIAS
+ polomer
+ streep: streep dash strich
+ pomlcka
sub: sub sub unter
+ pod
subtitel: subtitel subtitle untertitel
+ podtitulek
symbool: symbool symbol symbol
- symboolset: symboolset symbolset symbolset
+ symbol
+ symboolset: symboolset symbolset symbolset
+ sadasymbolu
symkleur: symkleur symcolor symfarbe
+ barvasymbolu
symletter: symletter symstyle symstil
+ stylsymboly
synoniem: synoniem synonym synonym
+ synonymum
synoniemkleur: synoniemkleur synonymcolor synonymfarbe
- synoniemletter: synoniemletter synonymstyle synonymstil
+ barvasynonyma
+ synoniemletter: synoniemletter synonymstyle synonymstil stylsynonyma
tab: tab tab tab
+ tab
teken: teken sign zeichen
+ znak
tekst: tekst text text
+ text
tekstcommando: tekstcommando textcommand textbefehl
+ textovyprikaz
tekstformaat: tekstformaat textsize textgroesse
+ velikosttextu
tekstkleur: tekstkleur textcolor textfarbe
+ barvatextu
tekstletter: tekstletter textstyle textstil
+ styltextu
tekstscheider: tekstscheider textseparator textseparator
+ oddelovactextu
tekststatus: tekststatus textstate textstatus
+ statustextu
titel: titel title titel
+ titul
titeluitlijnen: titeluitlijnen aligntitle titelausrichten
+ zarovnejtitul
tolerantie: tolerantie tolerance toleranz
+ tolerance
tussen: tussen inbetween zwischen
+ mezi
type: type type typ
+ type
uitlijnen: uitlijnen align ausrichtung
+ zarovnani
urlspatie: urlspatie urlspace urlspatium
+ prostorurl
urlvariant: urlvariant urlalternative urlalternative
+ urlalternativa
van: van from von
+ z
variant: variant alternative alternative
+ alternativa
verhoog: verhoog increment erhoehen
+ zvysit
verhoognummer: verhoognummer incrementnumber nummererhoehen
+ zvysujicicislo
verwijzing: verwijzing reference referenz
+ odkaz
onbekendeverwijzing: onbekendeverwijzing unknownreference unbekantereferenz
+ neznamyodkaz
voet: voet footer fusszeile
+ upati
voetafstand: voetafstand footerdistance fusszeilenabstand
+ vzdalenostupati
voetstatus: voetstatus footerstate fusszeilenstatus
+ statusupati
voffset: voffset voffset voffset
+ voffset
volgende: volgende next folgende
+ dalsi
voor: voor before vor
+ pred
voorcommando: voorcommando commandbefore vorbefehl
+ predchoziprikaz
vorige: vorige previous vorige
+ predchozi
vorigenummer: vorigenummer previousnumber vorigenummer
+ predchozicislo
+ wachttijd: wachttijd delay wartezeit
+ wachttijd % TOM
wijze: wijze way art
+ zpusob
+ willekeur: willekeur random zufaellig
+ willekeur % TOM
wit: wit white weiss
+ bily
xfactor: xfactor xfactor xfaktor
+ xfaktor
xmax: xmax xmax xmax
+ xmax
xoffset: xoffset xoffset xoffset
+ xoffset
xschaal: xschaal xscale xformat
+ xmeritko
xstap: xstap xstep xschritt
+ xkrok
yfactor: yfactor yfactor yfaktor
+ yfaktor
ymax: ymax ymax ymax
+ ymax
yoffset: yoffset yoffset yoffset
+ yoffset
yschaal: yschaal yscale yformat
+ ymeritko
ystap: ystap ystep yschritt
+ ykrok
zelfdepagina: zelfdepagina samepage selbeseite
+ stejnastrana
zij: zij side objektabstand
+ zij % TOM: was strana must be unique, see pagina:
veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrundfarbe
+ barvapozadipole
veldkaderkleur: veldkaderkleur fieldframecolor feldrahmenfarbe
+ barvarameckupole
veldoffset: veldoffset fieldoffset feldoffset
+ offsetpole
- openactie: openactie openaction oeffenaktion
+ openactie: openactie openaction oeffenaktion
+ otevriakci
sluitactie: sluitactie closeaction schliessenaktion
+ zavriakci
+
+ openpaginaactie: openpaginaactie openpageaction openpageaction
+ openpageaction % TOBIAS % TOM
+ sluitpaginaactie: sluitpaginaactie closepageaction closepageaction
+ closepageaction % TOBIAS % TOM
klikin: klikin clickin klickin
+ klikuvnitr
klikuit: klikuit clickout klickaus
+ klikvne
gebiedin: gebiedin regionin regionin
+ oblastuvnitr
gebieduit: gebieduit regionout regionaus
+ oblastvne
natoets: natoets afterkey nachtaste
+ klavesapo
formatteer: formatteer format formatieren
+ formatovat
valideer: valideer validate validieren
+ validovat
bereken: bereken calculate berechnen
+ pocitat
+
+ klik: klik click klick
+ klik % TOM
+
+ vcommando: vcommando vcommand vbefehl
+ vcommando % TOM
+ icommando: icommando icommand ibefehl
+ icommando % TOM
+ ccommando: ccommando ccommand cbefehl
+ ccommando % TOM
\stopconstants
@@ -474,230 +835,480 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
%D \startcompressdefinitions
\startvariables dutch english german
+ czech
aan: aan on an
+ na
aanelkaar: aanelkaar serried kleinerabstand
+ semknuto
aansluitend: aansluitend joinedup keinabstand
+ spojeno
absoluut: absoluut absolute absolut
+ absolutni
achtergrond: achtergrond background hintergrund
+ pozadi
achteruit: achteruit backward rueckwaerts
+ zpet
actie: actie action aktion
+ akce
afsluiter: afsluiter stopper trenner
+ predel
+ alinea: alinea paragraph absaetze
+ odstavce % TOBIAS % TOM -> singular
alles: alles all alles
+ vse
altijd: altijd always immer
+ vzdy
autointro: autointro autointro autointro
+ autouvod
beide: beide both beide
+ obe
binnen: binnen inner innen
+ vnitrni
blanko: blanko blank blanko
+ prazdny
blokkeer: blokkeer disable sperren
+ zablokovat
boven: boven top oben
+ vrsek
breed: breed wide breit
+ siroky
breedte: breedte width breite
+ sirka
+ buffer: buffer buffer puffer
+ buffer
buiten: buiten outer aussen
+ vnejsi
cijfers: cijfers numbers ziffern
+ cisla
Cijfers: Cijfers Numbers Ziffern
+ Cisla
commando: commando command befehl
+ prikaz
commandos: commandos commands befehle
+ prikazy
concept: concept concept konzept
+ koncept
dag: dag day tag
+ den
datum: datum date datum
+ datum
default: default default default
+ implicitni
definitief: definitief final endfassung
+ finalni
diepte: diepte depth tiefe
+ hloubka
dubbelzijdig: dubbelzijdig doublesided doppelseitig
+ dvoustranny
eerste: eerste first erste
+ prvni
elk: elk each jede
+ kazdy
enkelzijdig: enkelzijdig singlesided einzelseitig
+ jednostranny
ergens: ergens somewhere irgendwo
+ nekde
nergens: nergens nowhere nirgens
+ nikde
even: even even gerade
+ sude
extern: extern external extern
+ externi
file: file file datei
+ soubor
flexibel: flexibel flexible flexibel
+ prizpusobivy
forceer: forceer force zwinge
+ sila
gebruikt: gebruikt used verwende
+ uzito
geen: geen none kein
+ zadny
geenmarkering: geenmarkering nomarking keinebeschriftung
+ zadneznaceni
geenwit: geenwit nowhite keinweiss
+ zadnabila
geroteerd: geroteerd rotated gedreht
+ otoceno
gespiegeld: gespiegeld mirrored gespiegelt
+ zrcadleno
globaal: globaal global global
+ globalni
grid: grid grid gritter
+ mrizka
groot: groot big gross
+ velky
grotevoorkeur: grotevoorkeur bigpreference grosszuegig
+ velkaprednost
grijs: grijs gray grau
+ seda
halveregel: halveregel halfline halbezeile
+ pulradku
handhaaf: handhaaf keep behalte
+ drzet
hangend: hangend hanging haengend
+ visici
herhaal: herhaal repeat wiederholen
+ opakovat
herstel: herstel fix stellewiederher
+ fixuj
hier: hier here hier
+ zde
hoofd: hoofd header kopfzeile
+ zahlavi
hoog: hoog high hoch
+ vysoko
hoogte: hoogte height hoehe
+ vyska
horizontaal: horizontaal horizontal horizontal
+ horizontalni
huidige: huidige current aktuell
- italic: italic italic italic
+ aktualni
+ italic: italic italic italic
+ kurziva
inlinker: inlinker inleft imlinken
+ vlevo
inmarge: inmarge inmargin imrand
+ naokraji
inrechter: inrechter inright imrechten
+ vpravo
intekst: intekst intext imtext
+ dotextu
intro: intro intro intro
+ uvod
its: its its its
+ pol
ja: ja yes ja
+ ano
jaar: jaar year jahr
+ rok
kader: kader frame rahmen
+ ramecek
kantlijn: kantlijn marginedge marginalkante
+ textovahrana
kap: kap cap kap
+ kap
kapitaal: kapitaal capital versalien
+ verzalky
kenmerk: kenmerk referral merkmal
+ znacka
klein: klein small klein
+ male
kleinnormaal: kleinnormaal smallnormal kleinnormal
+ malenormalni
kleinschuin: kleinschuin smallslanted kleingeneigt
+ malesklonene
kleinschuinvet: kleinschuinvet smallslantedbold kleingeneigtfett
+ malesklonenetucne
kleinitalic: kleinitalic smallitalic kleinitalic
+ malekurzivni
kleinitalicvet: kleinitalicvet smallitalicbold kleinitalicfett
+ malekurzivnitucne
kleintype: kleintype smalltype kleintippen
+ maletype
kleinvet: kleinvet smallbold kleinfett
+ maletucne
kleinvetschuin: kleinvetschuin smallboldslanted kleinfettgeneigt
+ maletucnesklonene
kleinvetitalic: kleinvetitalic smallbolditalic kleinfettitalic
+ maletucnekurzivni
kleur: kleur color farbe
+ barva
kolommen: kolommen columns spalten
+ sloupce
kop: kop head kopf
+ hlava
laag: laag low tief
+ nizko
laatste: laatste last letzte
+ posledni
label: label label label
+ popisek
lang: lang tall lang
+ vysoky
leeg: leeg empty leer
+ prazdne
Letter: Letter Character Buchstabe
+ Pismeno
letter: letter character buchstabe
+ pismeno
Letters: Letters Characters Buchstaben
+ Pismena
letters: letters characters buchstaben
+ pismena
liggend: liggend landscape querformat
+ nasirku
lijn: lijn rule linie
+ linka
linkermarge: linkermarge leftmargin linkerrand
+ levyokraj
linkerpagina: linkerpagina leftpage linkerseite
+ levastrana
linkerrand: linkerrand leftedge linkekante
+ levahrana
links: links left links
+ vlevo
lokaal: lokaal local lokal
+ lokalni
+ nieuw: nieuw new neu
+ nieuw % TOM
MAAND: MAAND MONTH MONAT
+ MESIC
maand: maand month monat
+ mesic
mar: mar mar mar
+ mar
marge: marge margin marginalie
+ marginalie
max: max max max
+ max
mediaeval: mediaeval mediaeval mittelalterlich
+ stredoveky
middel: middel medium mittel
+ stredni
midden: midden middle mittig
+ stredni
na: na after nach
+ po
naam: naam name name
+ jmeno
naast: naast opposite gegenueber
+ opacny
nee: nee no nein
+ ne
negatief: negatief negative negativ
+ negativ
niet: niet not nicht
+ ne
nooit: nooit never nie
+ nikdy
normaal: normaal normal normal
+ normalni
nummer: nummer number nummer
+ cislo
offset: offset offset offset
+ offset
onbekend: onbekend unknown unbekannt
+ neznamy
onder: onder bottom unten
+ spodek
oneven: oneven odd ungerade
+ liche
opelkaar: opelkaar packed gepackt
+ zhustene
+ vanelkaar: vanelkaar unpacked ungepackt
+ vanelkaar % TOM
opmaak: opmaak markup umbruch
+ zlom
opmarge: opmarge atmargin amrand
+ naokraji
overlay: overlay overlay overlay
+ prekryv
pagina: pagina page seite
+ strana
paginanummer: paginanummer pagenumber seitennummer
+ cislostrany
papier: papier paper papier
+ papir
scherm: scherm display bildschirm
+ obrazovka
passend: passend fit passend
+ prizpusobivy
per: per by pro
+ skrz
postscript: postscript postscript postscript
+ postscript
+ preview: preview preview vorschau
+ nahled
programma: programma program programm
+ program
punt: punt dot punkt
+ tecka
ran: ran ran ran
+ rozsah
rand: rand edge kante
+ hrana
raster: raster screen raster
- recht: recht rectangular rechteckig
+ rastr
+ recht: recht rectangular rechteckig
+ pravouhly
rechtermarge: rechtermarge rightmargin rechterrand
+ pravyokraj
rechterpagina: rechterpagina rightpage rechterseite
+ pravastrana
rechterrand: rechterrand rightedge rechterkante
+ pravahrana
rechts: rechts right rechts
+ vpravo
regel: regel line zeile
+ radek
relatief: relatief relative relativ
+ relativni
reset: reset reset zuruecksetzten
+ reset
Romeins: Romeins Romannumerals Roemischezahlen
+ Rimskecislice
romeins: romeins romannumerals roemischezahlen
- grieks: grieks greek greek
- Grieks: Grieks Greek Greek
+ rimskecislice
+ grieks: grieks greek griechisch
+ recky
+ Grieks: Grieks Greek Griechisch
+ Recky
rond: rond round rund
+ kolo
roteer: roteer rotate drehe
+ otoc
+ rek: rek stretch strecken
+ rek % TOM
ruim: ruim broad breit
+ siroky
schuin: schuin slanted geneigt
+ sklonene
schuinvet: schuinvet slantedbold geneigtfett
+ sklonenetucne
italicvet: italicvet italicbold italicfett
+ kurzivnitucne
sectienummer: sectienummer sectionnumber abschnittsnummer
+ cislooddilu
smal: smal narrow schmall
+ uzky
soepel: soepel tolerant tolerant
+ tolerantni
standaard: standaard standard standard
+ standardni
start: start start start
+ start
stop: stop stop stop
+ stop
streng: streng strict streng
+ striktni
+ strut: strut strut strut
+ strut
sub: sub sub unter
+ pod
sym: sym sym sym
+ sym
symbool: symbool symbol symbol
+ symbol
tekst: tekst text text
+ text
back: terug back zurueck
+ zpet
test: test test test
+ test
tussen: tussen inbetween zwischen
+ mezi
type: type type tippen
+ type
uit: uit off aus
+ pryc
url: url url url
+ url
URL: URL URL URL
+ URL
vast: vast fixed fest
- los: los loose lose
+ fixne
+ los: los loose lose
+ uvolnene
verder: verder continue fortsetzten
+ pokracovat
vertikaal: vertikaal vertical vertikal
+ vertikalne
vet: vet bold fett
+ tucne
vetschuin: vetschuin boldslanted fettgeneigt
+ tucnesklonene
vetitalic: vetitalic bolditalic fettitalic
+ tucnekurzivni
viertal: viertal quadruple viertel
+ ctyrnasobny
voet: voet footer fusszeile
+ upati
volgende: volgende next folgende
+ dalsi
voor: voor before vor
+ pred
+ voorgrond: voorgrond foreground vordergrund
+ voorgrond % TOM
voorkeur: voorkeur preference einstellung
+ nastaveni
voorlopig: voorlopig temporary temporaer
+ docasny
vooruit: vooruit forward vorwaerts
+ vpred
vorige: vorige previous vorig
+ predchozi
waarde: waarde value wert
+ hodnota
week: week week woche
+ tyden
weekdag: weekdag weekday wochentag
+ vsedniden
WEEKDAG: WEEKDAG WEEKDAY WOCHENTAG
+ VSEDNIDEN
willekeurig: willekeurig random zufaellig
+ nahodny
wit: wit white weiss
+ bily
zeer: zeer very sehr
+ velmi
zeersoepel: zeersoepel verytolerant sehrtolerant
+ velmitolerantni
zeerstreng: zeerstreng verystrict sehrstreng
+ velmistriktni
zie: zie see sieh
+ viz
- smallcaps: smallcaps smallcaps smallcaps
+ smallcaps: smallcaps smallcaps smallcaps
+ maleverzalky
+ WOORD: WOORD WORD WORT
+ WOORD % TOM
eerstepagina: eerstepagina firstpage ersteseite
+ prvnistrana
vorigepagina: vorigepagina previouspage vorigeseite
+ predchozistrana
volgendepagina: volgendepagina nextpage folgendeseite
+ dalsistrana
laatstepagina: laatstepagina lastpage letzteseite
+ poslednistrana
eerstesubpagina: eerstesubpagina firstsubpage ersteunterseite
+ prvnipodstrana
vorigesubpagina: vorigesubpagina previoussubpage vorigeunterseite
+ predchozipodstrana
volgendesubpagina: volgendesubpagina nextsubpage folgendeunterseite
+ dalsipodstrana
laatstesubpagina: laatstesubpagina lastsubpage letzteunterseite
+ poslaednipodstrana
+
+ volgendeevenpagina: volgendeevenpagina nextevenpage naechstegeradeseite
+ volgendeevenpagina % TOM
+volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungeradeseite
+ volgendeonevenpagina % TOM
+ vorigeevenpagina: vorigeevenpagina previousevenpage vorigegeradeseite
+ vorigeevenpagina % TOM
+ vorigeonevenpagina: vorigeonevenpagina previousoddpage vorigeungeradeseite
+ vorigeonevenpagina % TOM
alleenleesbaar: alleenleesbaar readonly nurlesbar
+ pouzeprocteni
verplicht: verplicht required obligatorisch
+ pozadovane
beschermd: beschermd protected geschuetzt
+ chranene
gesorteerd: gesorteerd sorted sortiert
+ tridene
nietbeschikbaar: nietbeschikbaar unavailable nichtverfuegbar
+ nedostupne
verborgen: verborgen hidden versteckt
+ skryte
printbaar: printbaar printable druckbar
-
+ tisknutelne
+
+ bookmark: bookmark bookmark bookmark
+ bookmark
+
\stopvariables
%D \stopcompressdefinitions
@@ -736,20 +1347,32 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
%D \startcompressdefinitions
\startvariables dutch english german
+ czech
calligraphic: calligrafie calligraphic kalligraphie
+ krasopisne
handwritten: handschrift handwritten handschrift
+ rukopisne
sansserif: schreefloos sansserif grotesk
+ bezserifu
roman: romaan roman antiqua
+ antikva
teletype: teletype teletype fernschreiber
+ dalnopis
type: type type tippen
+ type
- serif: serif serif serif
- regular: regular regular regular
+ serif: serif serif serif
+ serif
+ regular: regular regular regular
+ radne
support: support support support
- sans: sans sans sans
+ podpora
+ sans: sans sans sans
+ sans
mono: mono mono mono
+ mono
\stopvariables
@@ -764,23 +1387,40 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
%D \startcompressdefinitions
\startsetupvariables dutch english german
+ czech
doornummering: doornummering enumeration nummerierung
+ vycet
doordefinitie: doordefinitie description beschreibung
+ popis
doorsprong: doorsprong indentation einzug
+ odsazovani
doorlabel: doorlabel labeling beschriften
+ oznacovani
samengesteldelijst: samengesteldelijst combinedlist kombiniereliste
+ kombinovanyseznam
sectie: sectie section abschnitt
+ oddil
register: register register register
+ rejstrik
synoniem: synoniem synonym synonym
+ synonymum
synoniemen: synoniemen synonyms synonyme
+ synonyma
sorteer: sorteer sort sortiere
+ trid
sorteren: sorteren sorts sortieren
+ tridit
naam: naam name name
+ jmeno
blok: blok block block
+ blok
blokken: blokken blocks bloecke
- alinea: alinea paragraphs absaetze
+ bloky
+ alinea: alinea paragraph absaetze
+ odstavce % TOBIAS % TOM -> singular
framedtext: kadertekst framedtext umrahmtertext
+ oramovanytext
\stopsetupvariables
@@ -793,47 +1433,93 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
%D \startcompressdefinitions
\startelements dutch english german
+ czech
beginvan: beginvan begin anfang
+ zacatek
buffer: buffer buffer puffer
+ buffer
commentaar: commentaar comment kommentar
+ komentar
eindvan: eindvan end ende
+ konec
formule: formule formula formel
+ rovnice
gekoppelde: gekoppelde coupled verknuepft
+ propojeny
haal: haal get get
+ ziskat
huidigelokale: huidigelokale currentlocal aktuelllokal
+ aktualnelokalni
in: in - ein
+ v % TOM needed?
instellingen: instellingen setups einstellungen
+ nastaveni
interactiemenu: interactiemenu interactionmenu interaktionsmenue
+ interaktivnimenu
laad: laad load laden
+ nacist
leeg: leeg empty leer
+ prazdne
lege: lege empty leer
-% TOBIAS, what does this auf in auflisten mean?
+ prazdne
lijst: lijst list auflisten
+ seznam
lijstmet: lijstmet listof auflistenvon
+ seznam
lokale: lokale local lokal
+ lokalni
opmaak: opmaak makeup umbruch
+ zlom
plaats: plaats place platziere
+ misto
reserveer: reserveer reserve reservieren
+ rezervovat
start: start start start
+ start
stel: stel setup stelle
+ nastaveni
stop: stop stop stop
+ stop
tabelkop: tabelkop tablehead tabellenueberschrift
+ zahlavitabulky
tabelstaart: tabelstaart tabletail tabellenende
+ konectabulky
tabulate: tabulatie tabulate tabulator
+ tabelator
tekst: tekst text text
+ text
type: type type type
+ type
uitstellen: uitstellen postponing verschieben
+ odlozit
verbergen: verbergen hiding verbergen
+ skryt
verhoog: verhoog increment erhoehen
+ zvysit
volgende: volgende next folgende
+ dalsi
volledige: volledige complete vollende
+ uplny
vorige: vorige previous vorige
+ predchozi
vorigelokale: vorigelokale previouslocal voriglokal
+ predchozilokalni
zie: zie see sieh
+ viz
+ register: register register register
+ rejstrik
gegeven: gegeven fact gegeben
+ fakt
legenda: legenda legend legende
+ legenda
+
+ helptext: helptekst helptext hilfetext
+ helptekst % TOM
+
+ pagecomment: paginacommentaar pagecomment pagecomment
+ pagecomment % TOBIAS % TOM
\stopelements
@@ -846,34 +1532,82 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
%D \startcompressdefinitions
\startvariables dutch english german
+ czech
FirstPage: EerstePagina FirstPage ErsteSeite
+ PrvniStrana
PreviousPage: VorigePagina PreviousPage VorigeSeite
+ PredchoziStrana
NextPage: VolgendePagina NextPage FolgendeSeite
+ DalsiStrana
LastPage: LaatstePagina LastPage LetzteSeite
+ PosledniStrana
PreviousJump: VorigeSprong PreviousJump VorigerSprung
+ PredchoziSkok
NextJump: VolgendeSprong NextJump NaechsterSprung
+ DalsiSkok
SwapViewer: WisselViewer SwapViewer WechseleViewer
+ ZamenitProhlizec
ExitViewer: VerlaatViewer ExitViewer BeendeViewer
+ SkoncitProhlizec
CloseDocument: SluitDocument CloseDocument SchliesseDokument
+ ZavritDokument
SaveDocument: BewaarDocument SaveDocument SpeichereDokument
+ UlozitDokument
ViewerHelp: ViewerHelp ViewerHelp ViewerHilfe
+ NapovedaProhlizece
PrintDocument: PrintDocument PrintDocument DruckeDokument
+ VytisknoutDokument
SearchDocument: DoorzoekDocument SearchDocument DokumentDurchsuchen
+ ProhledatDokument
SearchAgain: HerhaalZoeken SearchAgain WeiterSuchen
+ HledatZnovu
+ GotoPage: GaNaarPagina GotoPage GotoPage % Tobias
+ GaNaarPagina % TOM
StartMovie: StartFilm StartMovie StartFilm
+ SpustitFilmu
StopMovie: StopFilm StopMovie StopFilm
+ ZastavitFilm
PauseMovie: PauzeerFilm PauseMovie PauseFilm
+ PozastavitFilm
ResumeMovie: HervatFilm ResumeMovie FortsetzenFilm
+ PokracovatVeFilmu
SaveForm: BewaarFormulier SaveForm SpeicheFormular
+ UlozitFormular
LoadForm: LaadFormulier LoadForm LadeFormular
+ NacistFormular
ResetForm: ResetFormulier ResetForm ZuruecksetzenFormular
+ ResetFormulare
SubmitForm: VerzendFormulier SubmitForm VersendeFormular
+ PoslatFormular
HideField: VerbergVeld HideField VerbergeFeld
+ SkryjPole
ShowField: ToonVeld ShowField ZeigeFeld
+ UkazPole
+
+\stopvariables
+
+%D Here are some symbol names. We capitalize them because they are
+%D viewer specific.
+
+\startvariables dutch english german
+ czech
+
+ New: Nieuw New Neu
+ Nieuw % TOM
+ Balloon: Ballon Balloon Ballon
+ Ballon % TOM
+ Addition: Toevoeging Addition Zusatz
+ Toevoeging % TOM
+ Help: Help Help Hilfe
+ Help % TOM
+ Paragraph: Paragraaf Paragraph Absatz
+ Paragraaf % TOM
+ Key: Sleutel Key Schluessel
+ Sleutel % TOM
\stopvariables
diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex
index 40ca10e23..ffdd61f85 100644
--- a/tex/context/base/mult-ini.tex
+++ b/tex/context/base/mult-ini.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
%D This module implements the multi||lingual interface to
%D \CONTEXT. These capabilities concern messages, commands and
@@ -21,8 +21,7 @@
%D \macros
%D [constanten,variabelen,commandos]
-%D {v!,c!,s!,e!,m!,l!,r!,f!,p!,x!,y!}
-%D {}
+%D {v!,c!,k!,s!,e!,m!,l!,r!,f!,p!,x!,y!}
%D
%D In the system modules we introduced some prefixed constants,
%D variables (both macros) and registers. Apart from a
@@ -36,19 +35,20 @@
%D \startregelcorrectie
%D \starttabel[|c|c|c|]
%D \HL
-%D \NC \bf prefix \NC \bf meaning \NC \bf application \NC\SR
+%D \NC \bf prefix \NC \bf meaning \NC \bf application \NC\SR
%D \HL
-%D \NC \type{\v!prefix!} \NC v! \NC variable \NC\FR
-%D \NC \type{\c!prefix!} \NC c! \NC constant \NC\MR
-%D \NC \type{\s!prefix!} \NC s! \NC system \NC\MR
-%D \NC \type{\e!prefix!} \NC e! \NC element \NC\MR
-%D \NC \type{\m!prefix!} \NC m! \NC message \NC\MR
-%D \NC \type{\l!prefix!} \NC l! \NC language \NC\MR
-%D \NC \type{\r!prefix!} \NC r! \NC reference \NC\MR
-%D \NC \type{\f!prefix!} \NC f! \NC file \NC\MR
-%D \NC \type{\p!prefix!} \NC p! \NC procedure \NC\MR
-%D \NC \type{\x!prefix!} \NC x! \NC setup constant \NC\MR
-%D \NC \type{\y!prefix!} \NC y! \NC setup variable \NC\LR
+%D \NC \type{\c!prefix!} \NC c! \NC constant (direct) \NC\FR
+%D \NC \type{\e!prefix!} \NC e! \NC element \NC\MR
+%D \NC \type{\f!prefix!} \NC f! \NC file \NC\MR
+%D \NC \type{\k!prefix!} \NC k! \NC constant (indirect) \NC\MR
+%D \NC \type{\l!prefix!} \NC l! \NC language \NC\MR
+%D \NC \type{\m!prefix!} \NC m! \NC message \NC\MR
+%D \NC \type{\p!prefix!} \NC p! \NC procedure \NC\MR
+%D \NC \type{\r!prefix!} \NC r! \NC reference \NC\MR
+%D \NC \type{\s!prefix!} \NC s! \NC system \NC\MR
+%D \NC \type{\v!prefix!} \NC v! \NC variable \NC\MR
+%D \NC \type{\x!prefix!} \NC x! \NC setup constant \NC\MR
+%D \NC \type{\y!prefix!} \NC y! \NC setup variable \NC\LR
%D \HL
%D \stoptabel
%D \stopregelcorrectie
@@ -56,28 +56,27 @@
%D In the single||lingual version we used \type{!}, \type{!!},
%D \type{!!!} and \type{!!!!}.
-\def\v!prefix!{v!} \def\c!prefix!{c!} \def\s!prefix!{s!}
-\def\e!prefix!{e!} \def\m!prefix!{m!} \def\r!prefix!{r!}
-\def\f!prefix!{f!} \def\p!prefix!{p!} \def\x!prefix!{x!}
-\def\y!prefix!{y!} \def\l!prefix!{l!}
+\def\c!prefix!{c!} \def\e!prefix!{e!} \def\f!prefix!{f!}
+\def\k!prefix!{k!} \def\l!prefix!{l!} \def\m!prefix!{m!}
+\def\p!prefix!{p!} \def\r!prefix!{r!} \def\s!prefix!{s!}
+\def\v!prefix!{v!} \def\x!prefix!{x!} \def\y!prefix!{y!}
%D \macros
%D [constants,variables,commands]
%D {@@,??}
-%D {}
%D
%D Variables generated by the system can be recognized on their
%D prefix \type{@@}. They are composed of a command (class)
%D specific tag, which can be recognized on \type{??}, and a
-%D system constant, which has the prefix \type{c!}. We'll se
-%D some more of this.
+%D system constant, which has the prefix \type{c!}. We'll se
+%D some more of this.
\def\??prefix {??}
\def\@@prefix {@@}
-%D Just to be complete we repeat some of the already defined
-%D system constants here. Maybe their prefix \type{\s!} now
-%D falls into place.
+%D Just to be complete we repeat some of the already defined
+%D system constants here. Maybe their prefix \type{\s!} now
+%D falls into place.
\def\s!next {next} \def\s!default {default}
\def\s!dummy {dummy} \def\s!unknown {unknown}
@@ -100,7 +99,6 @@
%D definemessageconstant,
%D definereferenceconstant,
%D definefileconstant}
-%D {}
%D
%D The first part of this module is dedicated to dealing with
%D multi||lingual constants and variables. When \CONTEXT\ grew
@@ -147,8 +145,8 @@
%D And finaly we have the one argument, space saving constants
%D
%D \starttypen
-%D \definesystemconstant {name}
-%D \definemessageconstant {name}
+%D \definesystemconstant {name}
+%D \definemessageconstant {name}
%D \stoptypen
\def\definesystemconstant #1{\setvalue{\s!prefix!#1}{#1}}
@@ -160,25 +158,27 @@
%D with:
%D
%D \starttypen
-%D \definesystemvariable {name}
+%D \definesystemvariable {name}
%D \stoptypen
\def\definesystemvariable #1{\setevalue{\??prefix#1}{\@@prefix#1}}
+
+\definesystemvariable {ms}
%D \macros
-%D {selectinterface,
+%D {selectinterface,
%D defaultinterface, currentinterface, currentresponses}
%D
%D With \type{\selectinterface} we specify the language we are
%D going to use. The system asks for the language wanted, and
%D defaults to \type{\currentinterface} when we just give
-%D \type{enter}. By default the message system uses the
+%D \type{enter}. By default the message system uses the
%D current interface language, but \type{\currentresponses}
-%D can specify another language too.
+%D can specify another language too.
%D
-%D Because we want to generate formats directly too, we do
-%D not ask for interface specifications when these are already
-%D defined (like in cont-nl.tex and alike).
+%D Because we want to generate formats directly too, we do
+%D not ask for interface specifications when these are already
+%D defined (like in cont-nl.tex and alike).
\ifx\defaultinterface\undefined
@@ -229,20 +229,19 @@
%D \stopinterface
%D \stoptypen
-\def\startinterface #1
+\def\startinterface #1
{\doifinsetelse{\currentinterface}{#1}
{\let\next\relax}
{\long\def\next##1\stopinterface{}}%
\next}
-\let\stopinterface=\relax
+\let\stopinterface=\relax
%D \macros
%D {startmessages,
%D getmessage,
%D showmessage,
%D makemessage}
-%D {}
%D
%D A package as large as \CONTEXT\ can hardly function without
%D a decent message mechanism. Due to its multi||lingual
@@ -319,12 +318,16 @@
%D Because we want to check for duplicate tags, the macros
%D are a bit more complicated than neccessary. The \NEWLINE\
%D token is used as message separator.
+%D
+%D For internal purposes one can use \type {\dogetmessage},
+%D which puts the message text asked for in \type
+%D {\currentmessagetext}.
\def\findinterfacemessage#1#2%
{\let#2\empty
\def\dofindinterfacemessage##1 #1: ##2\relax##3\end%
{\def#2{##2}}%
- \edef\!!stringa{\getvalue{@@ms\currentmessagelibrary} #1: \relax}%
+ \edef\!!stringa{\getvalue{\??ms\currentmessagelibrary} #1: \relax}%
\expandafter\dofindinterfacemessage\!!stringa\end}
\def\composemessagetext#1--#2--#3--#4--#5--#6\\%
@@ -332,6 +335,10 @@
{\edef\currentmessagetext{#1##1#2##2#3##3#4##4#5##5}}%
\docomposemessagetext}
+\def\dogetmessage#1#2%
+ {\def\currentmessagelibrary{#1}%
+ \findinterfacemessage{#2}\currentmessagetext}
+
\unexpanded\def\getmessage#1#2%
{\def\currentmessagelibrary{#1}%
\findinterfacemessage{#2}\currentmessagetext
@@ -347,16 +354,18 @@
{\def\currentmessagelibrary{#1}%
\findinterfacemessage{#2}\currentmessagetext
\findinterfacemessage{title}\currentmessagetitle
- \doifelse{\currentmessagetext}{}
- {\def\currentmessagetext{<unknown message #2>}}
- {\@EA\composemessagetext\currentmessagetext----------\\#3,,,,,\\}%
+ \ifx\currentmessagetext\empty
+ \def\currentmessagetext{<unknown message #2>}%
+ \else
+ \@EA\composemessagetext\currentmessagetext----------\\#3,,,,,\\%
+ \fi
\@EA\writestatus\@EA{\currentmessagetitle}{\currentmessagetext}}
\def\doaddinterfacemessage#1#2%
{\findinterfacemessage{#1}\currentmessagetext
\doifelse{\currentmessagetext}{}
- {\setxvalue{@@ms\currentmessagelibrary}%
- {\getvalue{@@ms\currentmessagelibrary} #1: #2\relax}}
+ {\setxvalue{\??ms\currentmessagelibrary}%
+ {\getvalue{\??ms\currentmessagelibrary} #1: #2\relax}}
{\debuggerinfotrue % we consider this an important error
\debuggerinfo
{message}
@@ -380,14 +389,14 @@
\next}
\gdef\startmessages #1 library: #2
- {\definemessageconstant{#2}% handy for modules
+ {\definemessageconstant{#2}% handy for modules
\bgroup
\obeylines
\doifinsetelse{#1}{\currentresponses,all}
{\def\next%
{\def\currentmessagelibrary{#2}%
- \doifundefined{@@ms\currentmessagelibrary}
- {\setgvalue{@@ms\currentmessagelibrary}{}}%
+ \doifundefined{\??ms\currentmessagelibrary}
+ {\setgvalue{\??ms\currentmessagelibrary}{}}%
\futurelet\next\getinterfacemessage}}
{\long\def\next##1\stopmessages{\egroup}}%
\next}
@@ -395,17 +404,17 @@
%D \macros
%D {ifshowwarnings, ifshowmessages}
%D
-%D Sometimes displaying message can slow down processing
-%D considerably. We therefore introduce warnings. Users can
+%D Sometimes displaying message can slow down processing
+%D considerably. We therefore introduce warnings. Users can
%D turn of warnings and messages by saying:
-%D
+%D
%D \starttypen
%D \showwarningstrue
%D \showmessagestrue
%D \stoptypen
-%D
-%D Turning off messages also turns off warnings, which is
-%D quote logical because they are less important.
+%D
+%D Turning off messages also turns off warnings, which is
+%D quote logical because they are less important.
\newif\ifshowwarnings \showwarningstrue
\newif\ifshowmessages \showmessagestrue
@@ -427,15 +436,13 @@
\fi}
%D \macros
-%D {dosetvalue,dosetevalue,docopyvalue,doresetvalue,
-%D dogetvalue}
-%D {}
+%D {dosetvalue,dosetevalue,docopyvalue,doresetvalue} % dogetvalue
%D
%D We already defined these auxiliary macros in the system
%D modules. Starting with this module however, we have to take
%D multi||linguality a bit more serious.
%D
-%D First we show a well||defined alternative:
+%D First we show a well||defined (simplified) alternative:
%D
%D \starttypen
%D \def\dosetvalue#1#2#3%
@@ -449,56 +456,62 @@
%D {\getvalue{#2\getvalue{\c!prefix!#3}}}}
%D {\setvalue{#1#3}%
%D {\getvalue{#2#3}}}}
-%D
-%D \def\dogetvalue#1#2%
-%D {\getvalue{#1\getvalue{\c!prefix!#2}}}
%D \stoptypen
%D
-%D These macros are called upon quite often and so we optimized
-%D them a bit.
+%D These macros are called upon quite often and so we optimized
+%D them a bit.
-\def\dosetvalue#1#2#3%
- {\p!doifundefined{\c!prefix!#2}%
+\def\dosetvalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \p!doifundefined{\k!prefix!#2}%
+ \let\c!internal!\c!internal!y
\let\donottest\doprocesstest
\@EA\def\csname#1#2\endcsname{#3}%
\else
+ \let\c!internal!\c!internal!y
\let\donottest\doprocesstest
- \@EA\def\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \@EA\def\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}%
\fi}
-\def\dosetevalue#1#2#3%
- {\p!doifundefined{\c!prefix!#2}%
+\def\dosetevalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \p!doifundefined{\k!prefix!#2}%
+ \let\c!internal!\c!internal!y
\let\donottest\doprocesstest
\@EA\edef\csname#1#2\endcsname{#3}%
\else
+ \let\c!internal!\c!internal!y
\let\donottest\doprocesstest
- \@EA\edef\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}%
\fi}
-\def\docopyvalue#1#2#3%
- {\p!doifundefined{\c!prefix!#3}%
+\def\docopyvalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \p!doifundefined{\k!prefix!#3}%
+ \let\c!internal!\c!internal!y
\let\donottest\doprocesstest
\@EA\def\csname#1#3\endcsname%
{\csname#2#3\endcsname}%
\else
+ \let\c!internal!\c!internal!y
\let\donottest\doprocesstest
- \@EA\def\csname#1\csname\c!prefix!#3\endcsname\endcsname%
- {\csname#2\csname\c!prefix!#3\endcsname\endcsname}%
+ \@EA\def\csname#1\csname\k!prefix!#3\endcsname\endcsname%
+ {\csname#2\csname\k!prefix!#3\endcsname\endcsname}%
\fi}
\def\doresetvalue#1#2%
{\dosetvalue{#1}{#2}{}}
-\def\dogetvalue#1#2%
- {\csname#1\csname\c!prefix!#2\endcsname\endcsname}
+%\def\dogetvalue#1#2%
+% {\csname#1\csname\k!prefix!#2\endcsname\endcsname}
%D Although maybe not clearly visible, there is a
%D considerable profit in further optimalization. By expanding
-%D the embedded \type{\csname} we can reduce the format file
+%D the embedded \type {\csname} we can reduce the format file
%D by about 5\% (60~KB out of 1.9~MB).
-\def\docopyvalue#1#2#3%
- {\p!doifundefined{\c!prefix!#3}%
+\def\docopyvalue#1#2#3% c -> k
+ {\p!doifundefined{\k!prefix!#3}%
\let\donottest\doprocesstest
\@EA\@EA\@EA\def\@EA
\csname\@EA#1\@EA#3\@EA
@@ -506,74 +519,92 @@
\else
\let\donottest\doprocesstest
\@EA\@EA\@EA\def\@EA
- \csname\@EA#1\@EA\csname\@EA\c!prefix!\@EA#3\@EA\endcsname\@EA
- \endcsname\@EA{\csname#2\csname\c!prefix!#3\endcsname\endcsname}%
+ \csname\@EA#1\@EA\csname\@EA\k!prefix!\@EA#3\@EA\endcsname\@EA
+ \endcsname\@EA{\csname#2\csname\k!prefix!#3\endcsname\endcsname}%
\fi}
-%D A slightly faster alternative:
+%D The next alternatives are slightly faster.
\beginTEX
-\def\dosetvalue#1#2#3%
- {\@EA\ifx\csname\c!prefix!#2\endcsname\relax
+\def\dosetvalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \@EA\ifx\csname\k!prefix!#2\endcsname\relax
+ \let\c!internal!\c!internal!y
\@EA\def\csname#1#2\endcsname{#3}%
\else
- \@EA\def\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \let\c!internal!\c!internal!y
+ \@EA\def\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}%
\fi}
-\def\dosetevalue#1#2#3%
- {\@EA\ifx\csname\c!prefix!#2\endcsname\relax
+\def\dosetevalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \@EA\ifx\csname\k!prefix!#2\endcsname\relax
+ \let\c!internal!\c!internal!y
\@EA\edef\csname#1#2\endcsname{#3}%
\else
- \@EA\edef\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \let\c!internal!\c!internal!y
+ \@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}%
\fi}
-\def\docopyvalue#1#2#3%
- {\@EA\ifx\csname\c!prefix!#3\endcsname\relax
+\def\docopyvalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \@EA\ifx\csname\k!prefix!#3\endcsname\relax
+ \let\c!internal!\c!internal!y
\@EA\@EA\@EA\def\@EA
\csname\@EA#1\@EA#3\@EA
\endcsname\@EA{\csname#2#3\endcsname}%
\else
+ \let\c!internal!\c!internal!y
\@EA\@EA\@EA\def\@EA
- \csname\@EA#1\@EA\csname\@EA\c!prefix!\@EA#3\@EA\endcsname\@EA
- \endcsname\@EA{\csname#2\csname\c!prefix!#3\endcsname\endcsname}%
+ \csname\@EA#1\@EA\csname\@EA\k!prefix!\@EA#3\@EA\endcsname\@EA
+ \endcsname\@EA{\csname#2\csname\k!prefix!#3\endcsname\endcsname}%
\fi}
\endTEX
\beginETEX \protected
-\def\dosetvalue#1#2#3%
- {\ifcsname\c!prefix!#2\endcsname
- \@EA\def\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+\def\dosetvalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \ifcsname\k!prefix!#2\endcsname
+ \let\c!internal!\c!internal!y
+ \@EA\def\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}%
\else
+ \let\c!internal!\c!internal!y
\@EA\def\csname#1#2\endcsname{#3}%
\fi}
-\def\dosetevalue#1#2#3%
- {\ifcsname\c!prefix!#2\endcsname
- \@EA\edef\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+\def\dosetevalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \ifcsname\k!prefix!#2\endcsname
+ \let\c!internal!\c!internal!y
+ \@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}%
\else
+ \let\c!internal!\c!internal!y
\@EA\edef\csname#1#2\endcsname{#3}%
\fi}
-\def\docopyvalue#1#2#3%
- {\ifcsname\c!prefix!#3\endcsname
+\def\docopyvalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \ifcsname\k!prefix!#3\endcsname
+ \let\c!internal!\c!internal!y
\@EA\@EA\@EA\def\@EA
- \csname\@EA#1\@EA\csname\@EA\c!prefix!\@EA#3\@EA\endcsname\@EA
- \endcsname\@EA{\csname#2\csname\c!prefix!#3\endcsname\endcsname}%
+ \csname\@EA#1\@EA\csname\@EA\k!prefix!\@EA#3\@EA\endcsname\@EA
+ \endcsname\@EA{\csname#2\csname\k!prefix!#3\endcsname\endcsname}%
\else
+ \let\c!internal!\c!internal!y
\@EA\@EA\@EA\def\@EA
- \csname\@EA#1\@EA#3\@EA
- \endcsname\@EA{\csname#2#3\endcsname}%
+ \csname\@EA#1\@EA#3\@EA
+ \endcsname\@EA{\csname#2#3\endcsname}%
\fi}
\endETEX
%D We take this opportunity of redefining to adapt an
%D assignment macro. The change has to do with the fact that the
-%D generated error message must be multi||lingual. We can not
-%D define the message yet, because we still have to select the
+%D generated error message must be multi||lingual. We can not
+%D define the message yet, because we still have to select the
%D interface language.
%\def\p!doassign#1[#2][#3=#4=#5]%
@@ -606,9 +637,9 @@
\let\expectedarguments\noexpectedarguments
#4\dodogetargument#1#2}}
-\def\dogetgroupargument#1#2%
+\def\dogetgroupargument#1#2%
{\def\nextnextargument%
- {\ifx\nextargument\bgroup
+ {\ifx\nextargument\bgroup
\let\expectedarguments\noexpectedarguments
\def\nextargument{#1\dodogetargument}%
%\else\ifx\nextargument\lineending % this can be an option
@@ -624,7 +655,7 @@
\fi%\fi\fi % so let's get rid of it
\nextargument}%
\futurelet\nextargument\nextnextargument}
-
+
\def\checkdefined#1#2#3%
{\doifdefined{#3}
{\showmessage{check}{3}{#2,#3}}}
@@ -881,7 +912,6 @@
%D \macros
%D {startconstants,startvariables}
-%D {}
%D
%D It's time to introduce the macro's that are responsible for
%D this translations process, but first we show how constants
@@ -914,21 +944,21 @@
%D less free format. All setups accept the keyword \type{all}
%D which equals every language.
-%D The next few macros come into action when we generate
-%D interface log files:
+%D The next few macros come into action when we generate
+%D interface log files:
\ifx\undefined\scratchwrite \newwrite\scratchwrite \fi
-\newif\iflogginginterface
+\newif\iflogginginterface
\def\flushinterfaceelementline%
- {\iflogginginterface
+ {\iflogginginterface
\immediate\write\scratchwrite{\interfaceelementline}%
\let\interfaceelementline\empty
\fi}
\def\saveinterfaceelementline#1%
- {\iflogginginterface
+ {\iflogginginterface
\edef\interfaceelementline{\interfaceelementline#1\space}%
\fi}
@@ -938,16 +968,16 @@
\immediate\openout\scratchwrite=./#1\relax}
\def\stoplogginginterface%
- {\flushinterfaceelementline
+ {\flushinterfaceelementline
\immediate\closeout\scratchwrite
\logginginterfacefalse}
-%D By default we don't log at all.
+%D By default we don't log at all.
\def\startlogginginterface #1 {}
\def\stoplogginginterface {}
-%D These logging commands are used in the next macros.
+%D These logging commands are used in the next macros.
\def\nointerfaceobject{-}
@@ -1016,17 +1046,21 @@
%D those reference cards for each language without further
%D interference.
+\let\c!internal!y \string
+\def\c!internal!n {-}
+\let\c!internal! \c!internal!y
+
\def\setinterfaceconstant#1#2%
- {\setvalue{\c!prefix!#1}{#1}%
+ {\setvalue{\c!prefix!#1}{\c!internal!#1}%
\doifelse{#2}{\nointerfaceobject}
- {\debuggerinfo{constant}{#1 defined as #1 by default}}
+ {\debuggerinfo{constant}{#1 defined as #1 by default}%
+ \setvalue{\k!prefix!#2}{#1}}
{\debuggerinfo{constant}{#1 defined as #2}%
\ifinterfacetranslation
\setvalue{\x!prefix!#1}{#2}%
\fi
- \doifnot{#1}{#2}
- {\checksetvalue{\c!prefix!#2}{#1}%
- \setvalue{\c!prefix!#2}{#1}}}}
+ \checksetvalue{\k!prefix!#2}{#1}%
+ \setvalue{\k!prefix!#2}{#1}}}
\def\setinterfacevariable#1#2%
{\doifelse{#2}{\nointerfaceobject}
@@ -1038,9 +1072,8 @@
\setvalue{\v!prefix!#1}{#2}}}
\def\checksetvalue#1#2%
- {\doifdefined{#1}{\doifvaluesomething{#1}{\doifnotvalue{#1}{#2}
- {\writestatus{problems}{set #1 to #2 overloads \getvalue{#1}}%
- \wait}}}}
+ {\doifdefined{#1}{\doifvaluesomething{#1}{\doifnotvalue{#1}{#2}
+ {\writestatus{problems}{set #1 to #2 overloads \getvalue{#1}}}}}}
\def\startvariables%
{\startinterfaceobjects\setinterfacevariable\stopvariables}
@@ -1051,9 +1084,9 @@
%D \macros
%D {defineinterfaceconstant}
%D
-%D Next we redefine a previously defined macro to take care of
-%D interface translation too. It's a bit redundant, because
-%D in thise situations we could use the c||version, but for
+%D Next we redefine a previously defined macro to take care of
+%D interface translation too. It's a bit redundant, because
+%D in these situations we could use the c||version, but for
%D documentation purposes the x||alternative comes in handy.
\def\defineinterfaceconstant#1#2%
@@ -1064,7 +1097,6 @@
%D \macros
%D {startinterfacesetupconstant}
-%D {}
%D
%D The next command, \type{\startinterfacesetupconstant}, which
%D behavior also depends on the boolean, is used for constants
@@ -1225,7 +1257,6 @@
%D \macros
%D {interfaced}
-%D {}
%D
%D The setup commands translate the constants automatically.
%D When we want to translate 'by hand' we can use the simple
@@ -1236,24 +1267,25 @@
%D \stoptypen
%D
%D Giving \type{\interfaced{breedte}} results in \type{width}
-%D or, when not defined, in \type{breedte} itself.
+%D or, when not defined, in \type{breedte} itself. This
+%D macro is used in the font switching mechanism.
\beginTEX
-\def\interfaced#1%
- {\expandafter\ifx\csname\c!prefix!#1\endcsname\relax
+\def\interfaced#1%
+ {\expandafter\ifx\csname\k!prefix!#1\endcsname\relax
#1%
\else
- \csname\c!prefix!#1\endcsname
+ \csname\k!prefix!#1\endcsname
\fi}
\endTEX
\beginETEX \ifcsname
-\def\interfaced#1%
- {\ifcsname\c!prefix!#1\endcsname
- \csname\c!prefix!#1\endcsname
+\def\interfaced#1%
+ {\ifcsname\k!prefix!#1\endcsname
+ \csname\k!prefix!#1\endcsname
\else
#1%
\fi}
@@ -1264,29 +1296,33 @@
%D macro's can be enhanced with more testing facilities, but
%D for the moment they suffice.
-%D Out of convenience we define the banners here.
+%D Out of convenience we define the banners here.
-\def\contextbanner%
- {ConTeXt
- ver: \contextversion \space
- fmt: \formatversion \space
- int: \currentinterface\space
- mes: \currentresponses}
+\edef\contextbanner%
+ {ConTeXt \space
+ ver: \noexpand \contextversion \space \space
+ fmt: \noexpand \formatversion \space \space
+ int: \noexpand \currentinterface \space \space
+ mes: \noexpand \currentresponses}
\def\showcontextbanner%
{\writeline\writestring{\contextbanner}\writeline}
-\edef\formatversion%
+\edef\formatversion%
{\ifx\normalyear \undefined\the\year \else\the\normalyear \fi.%
\ifx\normalmonth\undefined\the\month\else\the\normalmonth\fi.%
\ifx\normalday \undefined\the\day \else\the\normalday \fi}
\ifx\contextversion\undefined \def\contextversion{unknown} \fi
-\ifx\undefined\normaldump
- \let\normaldump\dump \def\dump{\showcontextbanner\normaldump}
+\ifx\undefined\normaldump
+ \newtoks\everydump
+ \let\normaldump\dump
+ \def\dump{\the\everydump\normaldump}
\fi
+\appendtoks \showcontextbanner \to \everydump
+
\protect
\endinput
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index c57021d0a..4203fda89 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D In boring module we define a lot of obscure but useful
@@ -32,24 +32,38 @@
%D First we define some system constants used for both the
%D multi||lingual interface and multi||linguag typesetting.
+\definesystemconstant {afrikaans} \definesystemconstant {af}
+\definesystemconstant {chinese} \definesystemconstant {cn}
+\definesystemconstant {czech} \definesystemconstant {cz}
+\definesystemconstant {danish} \definesystemconstant {da}
\definesystemconstant {dutch} \definesystemconstant {nl}
-\definesystemconstant {usenglish} \definesystemconstant {us}
-\definesystemconstant {ukenglish} \definesystemconstant {uk}
\definesystemconstant {english} \definesystemconstant {en}
+\definesystemconstant {finish} \definesystemconstant {fi}
\definesystemconstant {french} \definesystemconstant {fr}
\definesystemconstant {german} \definesystemconstant {de}
-\definesystemconstant {spanish} \definesystemconstant {sp}
\definesystemconstant {italian} \definesystemconstant {it}
-\definesystemconstant {danish} \definesystemconstant {da}
+\definesystemconstant {latin} \definesystemconstant {la}
+\definesystemconstant {norwegian} \definesystemconstant {no}
+\definesystemconstant {polish} \definesystemconstant {pl}
\definesystemconstant {portuguese} \definesystemconstant {pt}
+\definesystemconstant {slovak} \definesystemconstant {sk}
+\definesystemconstant {spanish} \definesystemconstant {sp}
\definesystemconstant {swedish} \definesystemconstant {sv}
-\definesystemconstant {polish} \definesystemconstant {pl}
-\definesystemconstant {finish} \definesystemconstant {fi}
-\definesystemconstant {afrikaans} \definesystemconstant {af}
-\definesystemconstant {norwegian} \definesystemconstant {no}
\definesystemconstant {turkish} \definesystemconstant {tr}
-\definesystemconstant {czech} \definesystemconstant {cz}
-\definesystemconstant {slovak} \definesystemconstant {sk}
+\definesystemconstant {ukenglish} \definesystemconstant {uk}
+\definesystemconstant {usenglish} \definesystemconstant {us}
+\definesystemconstant {croation} \definesystemconstant {hr}
+
+%D For proper \UNICODE\ support we need a few font related
+%D constants.
+
+\definesystemconstant {Unicode}
+\definesystemconstant {Regular}
+\definesystemconstant {Bold}
+\definesystemconstant {Slanted}
+\definesystemconstant {Italic}
+\definesystemconstant {BoldSlanted}
+\definesystemconstant {BoldItalic}
%D As the name of their define command states, the next set of
%D constants is used in the message macro's.
@@ -316,6 +330,7 @@
\definesystemvariable {ci} % CItaat
\definesystemvariable {cl} % kleur (CoLor setup)
\definesystemvariable {co} % COmbinaties
+\definesystemvariable {cp} % CliP
\definesystemvariable {cr} % kleur (ColoR)
\definesystemvariable {cv} % ConVersie
\definesystemvariable {da} % DAte
@@ -345,6 +360,7 @@
\definesystemvariable {il} % stelInvulRegelsin
\definesystemvariable {im} % InMarge
\definesystemvariable {in} % INspringen
+\definesystemvariable {ip} % InsertPages
\definesystemvariable {is} % Items
\definesystemvariable {it} % stelInTerliniein
\definesystemvariable {iv} % stelInvulLijnenin
@@ -361,6 +377,7 @@
\definesystemvariable {kw} % KontaktWaarde
\definesystemvariable {la} % LAnguage
\definesystemvariable {lg} % taal (LanGuage)
+\definesystemvariable {ld} % LegenDa
\definesystemvariable {li} % LIjst
\definesystemvariable {ln} % LijNen
\definesystemvariable {lo} % LOgos
@@ -380,6 +397,7 @@
\definesystemvariable {os} % OffSet
\definesystemvariable {pa} % PAlet
\definesystemvariable {pb} % PuBlicatie
+\definesystemvariable {pc} % PageComment
\definesystemvariable {pf} % ProFiel
\definesystemvariable {pg} % KoppelPagina
\definesystemvariable {pl} % PLaats
@@ -413,16 +431,19 @@
\definesystemvariable {sy} % SYnchronisatie
\definesystemvariable {ta} % TAb
\definesystemvariable {tb} % TekstBlokken
+\definesystemvariable {te} % TEmplate
\definesystemvariable {ti} % TabelInstellingen
\definesystemvariable {tk} % Teksten
\definesystemvariable {tl} % TekstLijnen
\definesystemvariable {tp} % TyPen
\definesystemvariable {tt} % TabulaTe
\definesystemvariable {ty} % TYpe
+\definesystemvariable {uc} % Unicode
\definesystemvariable {ui} % UItvoer
\definesystemvariable {ur} % URl
\definesystemvariable {ve} % VErsie
\definesystemvariable {vn} % VoetNoten
+\definesystemvariable {vt} % VerTical
\definesystemvariable {wr} % WitRuimte
\definesystemvariable {xy} % schaal
\definesystemvariable {za} % ZetspiegelAanpassing
@@ -467,6 +488,10 @@
\defineinterfacevariable {s} {s}
+\defineinterfacevariable {a} {a}
+\defineinterfacevariable {b} {b}
+\defineinterfacevariable {c} {c}
+
%D The names of files and their extensions are fixed.
%D \CONTEXT\ uses as less files as possible. Utility files can
%D be recognized by the first two characters of the extension:
@@ -477,7 +502,8 @@
\definefileconstant {blockextension} {tub}
\definefileconstant {figureextension} {tuf}
\definefileconstant {inputextension} {tui}
-\definefileconstant {outputextension} {tuo}
+\definefileconstant {outputextension} {tuo} % tup for previous run
+\definefileconstant {optionextension} {top}
\definefileconstant {temporaryextension} {tmp}
\definefileconstant {patternsextension} {pat}
\definefileconstant {hyphensextension} {hyp}
@@ -491,7 +517,12 @@
\definefileconstant {oldfilename} {cont-old}
\definefileconstant {newfilename} {cont-new}
\definefileconstant {filfilename} {cont-fil}
-\definefileconstant {optfilename} {cont-opt}
+
+%D The next two files specify user settings as well as
+%D \TEXEXEC\ settings when generating a format.
+
+\definefileconstant {usrfilename} {cont-usr}
+\definefileconstant {fmtfilename} {cont-fmt}
%D The setup files for the language, font, color and special
%D subsystems have a common prefix. This means that we have at
@@ -512,6 +543,7 @@
%D The macros that are responsible for this 'clever' searching
%D make use of two (very important) path specifiers.
+\definefileconstant {pathseparator} {/}
\definefileconstant {currentpath} {.}
\definefileconstant {parentpath} {..}
@@ -596,6 +628,13 @@
3: -- -- ersetzt ein Makro, verwende VERSALIEN!
\stopmessages
+\startmessages czech library: check
+ title: kontrola
+ 1: postradam '=' po '--' na radku --
+ 2: ocekavam -- argument(y) na radku --
+ 3: -- -- nahrazuje makro, uzijte VERZALKY!
+\stopmessages
+
\fi
%D Ok, here are some more, because we've got ouselves some
diff --git a/tex/context/base/ppchtex.tex b/tex/context/base/ppchtex.tex
index 1e33953d7..4d7de633e 100644
--- a/tex/context/base/ppchtex.tex
+++ b/tex/context/base/ppchtex.tex
@@ -15,7 +15,7 @@
%D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% Deze module ondersteunt het zetten van chemische
@@ -52,7 +52,7 @@
% \gebruikextras[chemie]. Daarbij wordt een passende melding
% getoont. Buiten Context genereren we een melding:
-\doifundefined{gebruikextras}
+\doifundefined{usemodule}
{\writestatus{loading}{Context Chemical Macro's / 1996.3.1}}
% Er kan gebruik worden gemaakt van PiCTeX of PStricks. Een
@@ -2125,17 +2125,35 @@
\doresetsubscripts}%
\chemicalspace}
+%\def\chemicaloutermolecule#1#2#3%
+% {\chemicalspace
+% \setbox0=\hbox % else the font is reset
+% {\dosetsubscripts
+% \hbox{$\@@chemicalletter{\strut#1}$}%
+% \doresetsubscripts}%
+% \mathop{\box0}%
+% \doifnot{#2}{}
+% {_{\@@chemicalletter{\strut\ifthirdargument#3\else#2\fi}}}%
+% \doifnot{#3}{}
+% {^{\@@chemicalletter{\strut\ifthirdargument#2\else#3\fi}}}%
+% \chemicalspace}
+
\def\chemicaloutermolecule#1#2#3%
{\chemicalspace
- \setbox0=\hbox % else the font is reset
+ \setbox0=\hbox % else the font is reset
{\dosetsubscripts
\hbox{$\@@chemicalletter{\strut#1}$}%
\doresetsubscripts}%
\mathop{\box0}%
- \doifnot{#2}{}
- {_{\@@chemicalletter{\strut\ifthirdargument#3\else#2\fi}}}%
- \doifnot{#3}{}
- {^{\@@chemicalletter{\strut\ifthirdargument#2\else#3\fi}}}%
+ \ifthirdargument
+ \doifnot{#2}{}
+ {^{\@@chemicalletter{\strut#2}}}%
+ \doifnot{#3}{}
+ {_{\@@chemicalletter{\strut#3}}}%
+ \else
+ \doifnot{#2}{}
+ {_{\@@chemicalletter{\strut#2}}}%
+ \fi
\chemicalspace}
\def\chemicalsinglepicturearrow#1%
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index 9ba92d90f..d11fd3633 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\unprotect
@@ -25,12 +25,15 @@
\logo [ANSI] {ansi}
\logo [ASCIITEX] {ascii\TeX}
\logo [ASCII] {ascii}
+\logo [BIBTEX] {bib\TeX}
+\logo [CDROM] {cdrom}
\logo [CMR] {cmr}
\logo [CMYK] {cmyk}
\logo [CONTEXT] {\ConTeXt}
\logo [CTAN] {ctan}
\logo [CWEB] {cweb}
\logo [DISTILLER] {distiller}
+\logo [DTK] {dtk}
\logo [DVIPSONE] {dvipsone}
\logo [DVIPS] {dvips}
\logo [DVISCR] {dviscr}
@@ -41,8 +44,10 @@
\logo [EMTEX] {em\TeX}
\logo [EPS] {eps}
\logo [ETEX] {\eTeX}
+\logo [FPTEX] {fp\TeX}
\logo [FDF] {fdf}
\logo [FGBBS] {fgbbs}
+\logo [GUST] {Gust}
\logo [GNU] {gnu}
\logo [GHOSTSCRIPT]{GhostScript}
\logo [GHOSTVIEW] {GhostView}
@@ -57,7 +62,9 @@
\logo [LATEXTE] {\LaTeX2e}
\logo [LATEXTN] {\LaTeX2.09}
\logo [LATEX] {\LaTeX}
+\logo [LISP] {Lisp}
\logo [MAPS] {Maps}
+\logo [MIKTEX] {Mik\TeX}
\logo [METAFONT] {\MetaFont}
\logo [METAPOST] {\MetaPost}
\logo [MODULA] {Modula}
@@ -73,7 +80,7 @@
\logo [PERL] {Perl}
\logo [PERLTK] {Perl/Tk}
\logo [PICTEX] {\PiCTeX}
-\logo [PLAIN] {\kap{PLAIN}}
+\logo [PLAIN] {Plain}
\logo [PNG] {png}
\logo [POSTSCRIPT] {PostScript}
\logo [PPCHTEX] {\PPCHTeX}
@@ -86,6 +93,7 @@
\logo [PS] {PostScript}
\logo [RGB] {rgb}
\logo [SGML] {sgml}
+\logo [SQL] {sql}
\logo [SI] {si}
\logo [TABLE] {\TaBlE}
\logo [TEXMF] {texmf}
@@ -93,9 +101,11 @@
\logo [TEXADRES] {\TeX adress}
\logo [TEXBASE] {\TeX base}
\logo [TEXEDIT] {\TeX edit}
+\logo [TEXWORK] {\TeX work}
\logo [TEXEXEC] {\TeX exec}
\logo [TEXFORM] {\TeX form}
-\logo [TEXNL] {\kap{TEX-NL}}
+\logo [TEXSHOW] {\TeX show}
+\logo [TEXNL] {TEX-NL}
\logo [TEXSPELL] {\TeX spell}
\logo [TEXUTIL] {\TeX util}
\logo [TEX] {\TeX}
@@ -112,13 +122,18 @@
\logo [URI] {uri}
\logo [URL] {url}
\logo [USA] {usa}
+\logo [UNICODE] {Unicode}
\logo [UNIX] {unix}
+\logo [LINUX] {linux}
\logo [WEBC] {web2c}
\logo [WDT] {wdt}
\logo [WWW] {www}
\logo [XML] {xml}
+\logo [XDVI] {Xdvi}
\logo [XINDY] {Xindy}
\logo [YandY] {y\&y}
+\logo [WINNX] {Win9x}
+\logo [WINNT] {WinNT}
\def\SystemSpecialA#1{$\langle\it#1\rangle$}
\def\SystemSpecialB#1{{\tttf<#1>}}
@@ -151,4 +166,6 @@
\def\NEWPAGE {\SystemSpecialB{newpage}}
\def\NEWLINE {\SystemSpecialB{newline}}
+\def\THANH {H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh}
+
\endinput
diff --git a/tex/context/base/s-abr-02.tex b/tex/context/base/s-abr-02.tex
index 82dfe6d73..1e99dbe00 100644
--- a/tex/context/base/s-abr-02.tex
+++ b/tex/context/base/s-abr-02.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\usemodule[abr-01]
diff --git a/tex/context/base/s-abr-03.tex b/tex/context/base/s-abr-03.tex
new file mode 100644
index 000000000..3dfe080d9
--- /dev/null
+++ b/tex/context/base/s-abr-03.tex
@@ -0,0 +1,22 @@
+%D \module
+%D [ file=s-abr-03,
+%D version=1998.8.10,
+%D title=\CONTEXT\ Style File,
+%D subtitle=General Abbreviations 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[abr-01]
+
+\unprotect
+
+\stelsorterenin[logo][\c!letter=\v!WOORD]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/s-dtk-01.tex b/tex/context/base/s-dtk-01.tex
new file mode 100644
index 000000000..6e98d17c2
--- /dev/null
+++ b/tex/context/base/s-dtk-01.tex
@@ -0,0 +1,257 @@
+%D \module
+%D [ file=s-dtk-01,
+%D version=1999.08.15,
+%D title=\CONTEXT\ Style File,
+%D subtitle=\DTK\ basis stijl,
+%D author=Hans Hagen \& Taco Hoekwater,
+%D date=\currentdate,
+%D copyright=PRAGMA]
+%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 Preliminary. Still dutch and english intermixed.
+
+\unprotect
+
+%D Temp hack.
+
+\def\doverbatimgoodbreak{}
+
+%D Fonts.
+
+\definebodyfontenvironment
+ [8pt]
+ [\c!interlinie=9pt,
+ \c!groot=9pt,
+ \c!klein=7pt]
+
+\definebodyfontenvironment
+ [9pt]
+ [\c!interlinie=11pt,
+ \c!groot=10pt,
+ \c!klein=8pt]
+
+\definebodyfontenvironment
+ [10pt]
+ [\c!interlinie=12pt,
+ \c!groot=12pt,
+ \c!klein=8pt]
+
+\definebodyfontenvironment
+ [12pt]
+ [\c!interlinie=14pt,
+ \c!groot=14.4pt,
+ \c!klein=10pt]
+
+\definebodyfontenvironment
+ [14.4pt]
+ [\c!interlinie=18pt,
+ \c!groot=14.4pt,
+ \c!klein=12pt]
+
+\setupbodyfont
+ [10pt,cmx,ams]
+
+%D Color.
+
+\setupcolors
+ [\c!conversie=\v!altijd]
+
+%D Default language.
+
+\mainlanguage[en] \language[en]
+
+%D Paper size and layout. The Dante style depends on the
+%D driver to sort out the margins. Therefore we are not
+%D really typesetting in A5, but on something larger.
+
+\definieerpapierformaat
+ [DanteA5]
+ [breedte=486.54pt]
+
+\stelpapierformaatin
+ [DanteA5][A4]
+
+\stellayoutin % w=342pt h=484pt
+ [\c!rugwit=1in,
+ \c!kopwit=1in,
+ \c!plaats=\v!enkelzijdig,
+ \c!breedte=342pt,
+ \c!hoogte=548pt,
+ \c!hoofd=17pt,
+ \c!hoofdafstand=17pt,
+ \c!voetafstand=17pt,
+ \c!voet=17pt]
+
+%D Headers and footers.
+
+\stelhoofdin [\c!voor=\vfill,\c!na=]
+\stelvoetin [\c!voor=\vfill,\c!na=]
+
+%D Numbering.
+
+\stelnummeringin
+ [\c!plaats=,
+ \c!variant=\v!dubbelzijdig]
+
+%D Spacing.
+
+\stelwitruimtein [\v!halveregel]
+\stelblankoin [\v!halveregel]
+
+%D Itemize.
+
+\stelopsommingin [\v!elk] [\c!afstand=0pt,\c!marge=.5em]
+\stelopsommingin [1] [\c!breedte=1.0em,\c!symbool=circle]
+\stelopsommingin [2] [\c!breedte=0.9em,\c!symbool=triangle]
+\stelopsommingin [3] [\c!breedte=0.8em,\c!symbool=diamond]
+\stelopsommingin [4] [\c!breedte=0.7em,\c!symbool=dash]
+
+\stelopsommingin [1] [\v!opelkaar]
+
+%D Verbatim.
+
+\setuptyping [\c!optie=,\c!blanko=halveregel]
+
+%D Footnotes.
+
+\def\VoetNootLijn%
+ {\hrule width 5pc height .4pt}
+
+\setupfootnotes
+ [\c!korps=8pt,
+ \c!lijn=\VoetNootLijn,
+ \c!voor=\vskip24pt,
+ \c!nummercommando=]
+
+\setupfootnotedefinition
+ [\c!plaats=\v!aansluitend,
+ \c!breedte=\v!passend,
+ \c!kopletter=\v!normaal,
+ \c!afstand=.5em]
+
+% Abbreviations and logos.
+
+\usemodule[abr-03]
+
+
+%D Some real macros:
+
+\def\startAbstract%
+ {\dostartbuffer[abstract][startAbstract][stopAbstract]}
+
+%D And some dummies (for \MAPS\ style compatibility):
+
+\def\startKeywords#1\stopKeywords
+ {}
+
+\def\Keywords#1%
+ {}
+
+%D We will pick up some user settings.
+
+\def\DTKTypering[#1]%
+ {\getparameters
+ [DTK]
+ [Jaar=1998,
+ Volume=19,
+ Nummer=3,
+ Pagina=99,
+ Titel=Publish or Perish,
+ Subtitel=,
+ Auteur=D.T.K. Auteur,
+ Adres=PRAGMA Advanced Document Engineering \\
+ Ridderstraat 27 \\ 8061GH Hasselt NL,
+ Email=pragma@wxs.nl,
+ #1]}
+
+\DTKTypering[]
+
+%D Some of those are shown in headers and footers.
+
+\def\DTKFooter%
+ {Die \TeX nische Kom\"odie \DTKVolume/\DTKJaar
+ \space---\space
+ Proceedings of the \DTKJaar\ Euro\TeX\ Meeting}
+
+\stelhoofdin[\c!linkerletter=\ss\sl,\c!rechterletter=\ss]
+\stelvoetin [\c!letter={\switchtobodyfont[9pt]\ss\sl}]
+
+\stelhoofdtekstenin [\DTKTitel] [\pagenumber]
+\stelvoettekstenin [\DTKFooter] []
+
+%D It all starts here:
+
+\def\dostartBijdrage[#1]%
+ {\pagina
+ \DTKTypering[#1]
+ \stelhoofdin[\c!status=\v!leeg]
+ \stelpaginanummerin[\c!nummer=\DTKPagina]
+ \bgroup
+ \stelwitruimtein[\v!geen]
+ \bgroup
+ \switchtobodyfont[14.4pt,ss]
+ \steluitlijnenin[\v!rechts]
+ \let\\=\par
+ \DTKTitel\par
+ \doifsomething{\DTKSubtitel}
+ {\bgroup
+ \vskip3pt
+ \switchtobodyfont[12pt,ss]
+ \DTKSubtitel\par
+ \egroup}
+ \egroup
+ \vskip12pt
+ \bgroup
+ \switchtobodyfont[12pt,ss]
+ \def\\{\unskip\space\ignorespaces}
+ \DTKAuteur
+ \par
+ \egroup
+ \vskip12pt
+ \bgroup
+ \switchtobodyfont[9pt]
+ \stelsmallerin[voor=,na=]
+ \startsmaller[.05\hsize]
+ \stelwitruimtein[\v!halveregel]
+ \haalbuffer[abstract]
+ \stopsmaller
+ \egroup
+ \vskip20pt
+ \egroup}
+
+\def\startBijdrage%
+ {\starttekst
+ \dosingleempty\dostartBijdrage}
+
+\def\stopBijdrage%
+ {\stoptekst}
+
+%D Sectioning.
+
+\stelkopin
+ [\v!paragraaf]
+ [\c!letter={\ss\bfa},
+ \c!uitlijnen=\v!rechts,
+ \c!voor={\blanko[\v!regel,\v!halveregel]},
+ \c!na={\blanko[\v!halveregel]}]
+
+\stelkopin
+ [\v!sub\v!paragraaf]
+ [\c!letter=\ss,
+ \c!uitlijnen=\v!rechts,
+ \c!voor={\blanko[\v!halveregel]},
+ \c!na={\blanko[\v!halveregel]}]
+
+\stelkopin
+ [\v!sub\v!sub\v!paragraaf]
+ [\c!letter=\ss,
+ \c!variant=\v!tekst,
+ \c!voor=,
+ \c!na=]
+
+%D Done.
+
+\endinput
diff --git a/tex/context/base/s-faq-00.tex b/tex/context/base/s-faq-00.tex
index b8816f13e..db03f666f 100644
--- a/tex/context/base/s-faq-00.tex
+++ b/tex/context/base/s-faq-00.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\usemodule[abr-01]
diff --git a/tex/context/base/s-faq-01.tex b/tex/context/base/s-faq-01.tex
index e3fe2bf9c..41618a375 100644
--- a/tex/context/base/s-faq-01.tex
+++ b/tex/context/base/s-faq-01.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\usemodule[faq-00]
@@ -35,25 +35,37 @@
\setupinteraction
[state=start,
page=yes,
- color=red,
+ color=darkred,
+ contrastcolor=black,
menu=on]
\setupcolors
[state=start]
\setupbackgrounds
+ [state=repeat]
+
+\setupbackgrounds
[page]
[offset=3pt]
\setupbackgrounds
- [text,bottom]
+ [text]
+ [text]
+ [background={screen,go-on}]
+
+\setupbackgrounds
+ [bottom]
[text]
[background=screen]
\setupframedtexts
- [background=color,
+ [background=MyFrame,
backgroundcolor=white,
- framecolor=red]
+ framecolor=darkred,
+ frame=overlay]
+
+\defineoverlay[go-on][\overlaybutton{forward}]
\useexternaldocument
[paperfaq]
@@ -62,7 +74,8 @@
\setupregister
[index]
- [coupling=yes]
+ [coupling=yes,
+ interaction=text]
\coupleregister
[index]
@@ -72,12 +85,15 @@
\setupinteractionmenu
[bottom, bottom 1, bottom 2]
- [background=color,
+ [background=MyFrame,
backgroundcolor=white,
color=black,
- framecolor=red,
+ contrastcolor=black,
+ frame=overlay,
+ framecolor=darkred,
dummy=yes,
middle=\hskip1em,
+ height=\bottomheight,
distance=overlay]
\setupinteractionmenu
@@ -116,8 +132,9 @@
\bgroup
\tfx\setstrut
\framed
- [framecolor=red,
- background=color,
+ [frame=overlay,
+ framecolor=darkred,
+ background=MyFrame,
backgroundcolor=white]
{\AuthorOfFAQ}
\egroup}
@@ -133,7 +150,7 @@
\blank[3*big]
\midaligned{\tta \ListOfFAQ}
\vfill
- \midaligned{\tta pragma@pi.net}
+ \midaligned{\tta pragma@wxs.nl}
\blank[3*big]
\stopstandardmakeup}
@@ -163,7 +180,7 @@
\def\EndFAQ%
{\stopframedtext
\egroup
- \button[frame=off,offset=overlay]{\copy0}[faq:\CurrentNOfFAQ]
+ \button[color=,contrastcolor=,frame=overlay,offset=overlay]{\copy0}[faq:\CurrentNOfFAQ]
\vskip6pt}
\def\AllFAQs%
@@ -175,4 +192,15 @@
\pagereference[faqs]
\useblocks[question]}
+\def\MyFrame%
+ {\startreusableMPgraphic{Frame:\overlaywidth:\overlayheight}
+ path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+ pickup pencircle scaled 2pt ;
+ fill p withcolor \MPcolor{\overlaycolor} ;
+ draw p withcolor \MPcolor{\overlaylinecolor} ;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{Frame:\overlaywidth:\overlayheight}}
+
+\defineoverlay[MyFrame][\MyFrame]
+
\endinput
diff --git a/tex/context/base/s-faq-02.tex b/tex/context/base/s-faq-02.tex
index 49d153c0a..7247ee6a1 100644
--- a/tex/context/base/s-faq-02.tex
+++ b/tex/context/base/s-faq-02.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\usemodule[faq-00]
@@ -37,7 +37,7 @@
\blank[3*big]
\midaligned{\tta \ListOfFAQ}
\vfill
- \midaligned{\tta pragma@pi.net}
+ \midaligned{\tta pragma@wxs.nl}
\blank[3*big]
\stopstandardmakeup}
diff --git a/tex/context/base/s-faq-03.tex b/tex/context/base/s-faq-03.tex
index 498da0c0e..7d4b5edc4 100644
--- a/tex/context/base/s-faq-03.tex
+++ b/tex/context/base/s-faq-03.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\def\PDFscreenFAQ \name #1 \tag #2 \language #3 \hyphenation #4 \list #5
diff --git a/tex/context/base/s-map-01.tex b/tex/context/base/s-map-01.tex
index 26be67bcf..13923377c 100644
--- a/tex/context/base/s-map-01.tex
+++ b/tex/context/base/s-map-01.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=s-map-01,
+%D [ file=s-map-01,
%D version=1998.05.05,
%D title=\CONTEXT\ Style File,
%D subtitle=\MAPS\ basis stijl,
@@ -8,9 +8,13 @@
%D copyright={NTG / MAPS}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+%D The \MAPS\ layout is designed by Taco Hoekwater and Siep
+%D Kroonenberg, who on behalf of the \MAPS/\NTG\ own the
+%D copyright to the design.
+
%D In deze file wordt zowel de dubbelzijdig als de enkelzijdige
%D layout van de \MAPS\ gedefinieerd. Naast deze file
%D zijn|/|komen wat aanvullende stijlen voor specifieke
@@ -435,7 +439,11 @@
\bgroup
\forgetall
\kern 7.5pt
- \ifMapsInKolommen \steluitlijnenin[\v!links] \fi
+ \ifMapsInKolommen
+ \steluitlijnenin[\v!links]
+ \else
+ \steluitlijnenin[\v!rechts]
+ \fi
{\bf\MapsTitel\par}
{\bfx\MapsSubtitel\par}
\blanko[\v!regel]
diff --git a/tex/context/base/s-pre-00.tex b/tex/context/base/s-pre-00.tex
new file mode 100644
index 000000000..b04a80e6f
--- /dev/null
+++ b/tex/context/base/s-pre-00.tex
@@ -0,0 +1,169 @@
+%D \module
+%D [ file=s-pre-01,
+%D version=1997.07.22,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 0,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module provides some non core functionality that can
+%D be used in the presentations styles. This module contains
+%D experimental macros.
+%D
+%D The presentation environments are independent of each other.
+%D Although they have much in common, and in many cases can be
+%D exchanged, the common components are not collected in this
+%D file. That way they can serve as examples of style
+%D definitions.
+
+\unprotect
+
+\newbox \presentationstack
+\newcounter \presentationcounter
+\newdimen \presentationheight
+
+\appendtoks\doglobal\newcounter\presentationcounter\to\everyshipout
+
+\defineframedtext
+ [presentationshield]
+
+\setupframedtexts
+ [presentationshield]
+ [\c!achtergrond=\v!kleur,
+ \c!achtergrondkleur=StepColor,
+ \c!offset=\v!overlay,
+ \c!kader=\v!uit]
+
+\definecolor[StepColor][white]
+
+\def\enablepresentationstep%
+ {\let\enablepresentationstep\relax
+ \useJSpreamblenow{presentation}%
+ \stelteksttekstenin
+ [\vbox to \teksthoogte
+ {\dopresentationstep1\box\presentationstack\vfill}]}
+
+\def\presentationstep%
+ {\dopresentationstep0}
+
+\def\dopresentationstep#1%
+ {\global\setbox\presentationstack=\vbox
+ {\ifnum\presentationcounter=0
+ \global\presentationheight=\!!zeropoint
+ \fi
+ \ifcase#1\relax
+ \scratchdimen=\pagetotal
+ \else
+ \scratchdimen=\textheight
+ \fi
+ \advance\scratchdimen by -\presentationheight
+ \global\presentationheight=\pagetotal
+ \forgetall
+ \offinterlineskip
+ \mindermeldingen
+ \box\presentationstack
+ \doglobal\increment\presentationcounter
+ \scratchcounter=\realpageno \multiply\scratchcounter by 100
+ \advance\scratchcounter by \presentationcounter
+ \edef\presentationtag{presentation:\the\scratchcounter}
+ \setupfield
+ [presentation]
+ [\c!breedte=\v!passend,\c!hoogte=\v!passend,\c!offset=\v!overlay,
+ \c!strut=\v!nee,\c!kader=\v!uit,\c!optie={\v!alleenleesbaar}]
+ \definesymbol
+ [\presentationtag]
+ [\presentationshade]
+ \def\presentationshade%
+ {\presentationshield
+ [\c!breedte=\tekstbreedte,\c!hoogte=\scratchdimen]{}}
+ \definefield[\presentationtag][check][presentation][\presentationtag][\presentationtag]
+ \fitfield[\presentationtag]}}
+
+\startJSpreamble {presentation} used later
+ var presentation = new Array() ;
+ for (i=1;i<=\lastpage;i++)
+ { presentation[i] = 0 }
+ this.dirty = false ;
+ function NextPresentation (pagenumber)
+ { % ++presentation[pagenumber] ;
+ presentation[pagenumber] = presentation[pagenumber] + 1 ;
+ var dummy = 100*pagenumber + presentation[pagenumber] ;
+ var v = this.getField("presentation:"+dummy) ;
+ if (v)
+ { v.hidden = true }
+ else
+ { ++pagenumber ;
+ if (pagenumber<=\lastpage)
+ { presentation[pagenumber] = presentation[pagenumber] + 1 ;
+ dummy = 100*(pagenumber) + presentation[pagenumber] ;
+ v = this.getField("presentation:"+dummy) ;
+ if (v) { v.hidden = true }
+ ++this.pageNum } }
+ this.dirty = false }
+\stopJSpreamble
+
+\definereference[NextStep][JS(NextPresentation{\realfolio})]
+
+%D \macros
+%D {presentationstep}
+%D
+%D The macro \type {\presentationstep} provides a basic slide
+%D show functionality. It sort of records pieces of the page
+%D that will show up stepwise. It can be used like:
+%D
+%D \starttypen
+%D \startitemize
+%D \item eerste
+%D \item tweede
+%D \stopitemize
+%D
+%D \presentationstep
+%D
+%D \startformula
+%D ax^2+bx+c
+%D \stopformula
+%D
+%D \presentationstep
+%D \stoptypen
+%D
+%D When the document is opened, the two text fragments are
+%D covered by a shield. Each page has its own shield stack. The
+%D logical reference \type {NextStep} can be used to hide the
+%D shield.
+%D
+%D \starttypen
+%D \setupfootertexts[{\button{Show Up}[NextStep]}]
+%D \stoptypen
+%D
+%D Special effects can be reached with:
+%D
+%D \starttypen
+%D \setupframedtexts
+%D [presentationshield]
+%D [background=color,backgroundcolor=red]
+%D \stoptypen
+%D
+%D There is also:
+%D
+%D \autopresentationsteptrue
+%D
+%D One can enable this feature as \type {step} mode.
+
+\newif\ifautopresentationstep
+
+\appendtoks \ifautopresentationstep\presentationstep\fi \to \everypar
+
+\doifmode{step}{\enablepresentationstep}
+
+%D When in \type {comment} mode, embedded page comments are
+%D processed and put below the page. The default space of
+%D 5cm should be adequate but can of course be changed.
+
+\doifmode{comment}{\setuppagecomment[state=start,location=bottom]}
+
+\protect \endinput
diff --git a/tex/context/base/s-pre-01.tex b/tex/context/base/s-pre-01.tex
index 8cc3a906d..982c2b93f 100644
--- a/tex/context/base/s-pre-01.tex
+++ b/tex/context/base/s-pre-01.tex
@@ -8,13 +8,15 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This environment can be used to typeset interactive
%D presentations. This module was first used at the 1997 \TUG\
%D meeting.
+\usemodule[pre-general] % mode=step
+
%D \macros
%D {language}
%D
@@ -59,7 +61,7 @@
%D the width and height of the page and start up full screen.
\setuppapersize
- [S6]
+ [S6][S6]
\setuplayout
[topspace=12pt,
@@ -142,7 +144,7 @@
\framed
[framecolor=white,linethickness=1pt,
height=\bottomheight,strut=no]
- {\interactionbar[alternative=f,width=.5\textwidth,height=1ex]}
+ {\interactionbar[alternative=f,width=.5\makeupwidth,height=1ex]}
\fi}
%D \macros
@@ -188,7 +190,7 @@
\def\StartTitlePage%
{\startstandardmakeup
- \bfd
+ \bfd\setupinterlinespace
\setupalign[middle]
\vfil
\let\\=\vfil}
@@ -236,9 +238,11 @@
%D \macros
%D {setuphead}
%D
-%D We use our own command for typesetting the titles. We hide
-%D sectionnumbers from viewing. Each topic is followed by a
-%D list of subjects that belong to the topic.
+%D Because chapters and sections do not make sense in
+%D presentations, we use our own command for typesetting the
+%D titles. Sectionnumbers are of course hidden from viewing.
+%D Each topic is followed by a list of subjects that belong
+%D to the topic.
\setuphead
[Topic, Nopic, Subject]
@@ -261,7 +265,7 @@
%D
%D The command used to typeset the head lines is rather simple.
%D We just center the framed title. The frame macro optimizes
-%D the alignment and at the same time enables us to typset a
+%D the alignment and at the same time enables us to typeset a
%D nice colored rule.
\def\HeadLine#1#2%
@@ -289,7 +293,9 @@
%D {\midaligned{#2}}
%D \stoptypen
%D
-%D But why should we complicate things when we can say:
+%D But why should we complicate things when we can use
+%D alternative~\type{g}. The test is only needed if one
+%D does not automatically goes a new page with each subject.
\def\PlaceSubjectList%
{\blank
@@ -340,18 +346,19 @@
%D
%D Because topic lines can be rather long, so we use \type
%D {\limitatetext} to limit their length to the width of the
-%D right edge. This macro is part of the support macros.
+%D right edge. When needed, some dots are added (\unknown).
+%D This macro is part of the collection of low level support
+%D macros.
\def\TopicLine#1#2#3%
- {\limitatetext{#2}{\rightedgewidth}{...}
- \par}
+ {\limitatetext{#2}{\rightedgewidth}{\unknown}\par}
%D \macros
%D {setuptexttexts, button}
%D
%D During a presentation, we want to use the cursor to point to
%D parts of the text. Furthermore we want to be able to jump to
-%D the next page, without too much positioning on buttons.
+%D the next page, without the need to move the cursor on buttons.
%D Therefore we make the text part of the screen into an
%D invisible button.
@@ -365,7 +372,8 @@
%D {setupsubpagenumber}
%D
%D The left bottom navigation bar shows the subpages, which will
-%D be counted by topic.
+%D be counted by text. One can change this in the preentation
+%D itself by saying \type {[way=byTopic]}.
\setupsubpagenumber
[way=bytext, % Topic,
diff --git a/tex/context/base/s-pre-02.tex b/tex/context/base/s-pre-02.tex
index f5c4e7381..865a9fb08 100644
--- a/tex/context/base/s-pre-02.tex
+++ b/tex/context/base/s-pre-02.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This environment can be used to typeset interactive
@@ -16,6 +16,8 @@
%D publishers conference of the European Portable Document
%D Association.
+\usemodule[pre-general] % mode=step
+
%D \macros
%D {setupbodyfont, switchtobodyfont, setuplayout}
%D
@@ -36,7 +38,7 @@
%D have navigational tools at the bottom of the screen.
\setuppapersize
- [S6]
+ [S6][S6]
\setuplayout
[backspace=1cm,
@@ -108,9 +110,19 @@
%D
%D The navigational elements and the backgrounds are
%D provided by \METAPOST. The next few macros are meant for the
-%D more experienced \CONTEXT\ user.
+%D more experienced \CONTEXT\ user. When, as demonstrated
+%D here, we make the dimensions part of the name, we can be
+%D sure that new ones are generated when we change the page
+%D size in between.
+%D
+%D When \METAPOST\ is used, it makes sense to generate the
+%D graphics at runtime. This is supported when one enables
+%D system calls in the local \type {texmf.cnf} file and add the
+%D switch \type {\runMPgraphicstrue} to the local file \type
+%D {cont-sys.tex}. When direct processing is disabled or not
+%D supported, \TEXEXEC\ will tke care of graphic generation.
-\MPinclusions{input mp-tool}
+\MPinclusions{input mp-tool}
\def\MPpagebackground#1#2#3%
{\startreusableMPgraphic{pb:#1#2#3}
@@ -138,6 +150,17 @@
%D {setuptexttexts}
%D
%D By clicking on the text area, one goes to the next page.
+%D We could also have use the overlay mechanism, but this
+%D takes more settings and requires to generate the backgounds
+%D each page.
+%D
+%D \starttypen
+%D \defineoverlay[BackgroundButton][\BackgroundButton]
+%D \setupbackgrounds[text][text][background=BackgroundButton]
+%D \setupbackgrounds[state=repeat]
+%D \stoptypen
+%D
+%D We go for the fast one.
\def\MPtextbackground#1#2#3%
{\startreusableMPgraphic{tx:#1#2#3}
@@ -177,7 +200,7 @@
z2 = (#1, .5y3) ;
z3 = ( 0, #2) ;
path p ; p := z1--z2--z3--cycle;
- lw = #2/5 ; pickup pencircle scaled lw;
+ lw := #2/5 ; pickup pencircle scaled lw;
filldraw p withcolor \MPcolor{Backgrounds} ;
set_outer_boundingbox currentpicture;
\stopreusableMPgraphic
@@ -189,7 +212,7 @@
z2 = ( 0, .5y3) ;
z3 = (#1, #2) ;
path p ; p := z1--z2--z3--cycle;
- lw = #2/5 ; pickup pencircle scaled lw;
+ lw := #2/5 ; pickup pencircle scaled lw;
filldraw p withcolor \MPcolor{Backgrounds} ;
set_outer_boundingbox currentpicture;
\stopreusableMPgraphic
@@ -197,9 +220,9 @@
\def\MPcircle#1#2%
{\startreusableMPgraphic{ci:#1#2}
- rx = #1; ry = #2;
+ rx := #1; ry := #2;
path p ; p := fullcircle xscaled rx yscaled ry;
- lw = #2/5 ; pickup pencircle scaled lw;
+ lw := #2/5 ; pickup pencircle scaled lw;
filldraw p withcolor \MPcolor{Backgrounds} ;
set_outer_boundingbox currentpicture;
\stopreusableMPgraphic
@@ -211,24 +234,24 @@
z2 = ( #1, 0) ;
z3 = (.5x2, #2) ;
path p ; p := z1--z2--z3--cycle;
- lw = #2/5 ; pickup pencircle scaled lw;
+ lw := #2/5 ; pickup pencircle scaled lw;
filldraw p withcolor \MPcolor{Backgrounds} ;
set_outer_boundingbox currentpicture;
\stopreusableMPgraphic
\reuseMPgraphic{wh:#1#2}}
\unexpanded\def\BackwardButton%
- {\naarbox{\MPleft{\the\bottomheight}{\the\bottomheight}}[previouspage]}
+ {\gotobox{\MPleft{\the\bottomheight}{\the\bottomheight}}[previouspage]}
\unexpanded\def\ForwardButton%
- {\naarbox{\MPright{\the\bottomheight}{\the\bottomheight}}[nextpage]}
+ {\gotobox{\MPright{\the\bottomheight}{\the\bottomheight}}[nextpage]}
\unexpanded\def\ExitButton%
- {\naarbox{\MPcircle{\the\bottomheight}{\the\bottomheight}}[CloseDocument]}
+ {\gotobox{\MPcircle{\the\bottomheight}{\the\bottomheight}}[CloseDocument]}
\unexpanded\def\WhateverButton%
{\doifreferencefoundelse{Whatever}
- {\naarbox{\MPwhat{\the\bottomheight}{\the\bottomheight}}[Whatever]}
+ {\gotobox{\MPwhat{\the\bottomheight}{\the\bottomheight}}[Whatever]}
{}}
\def\BottomButton%
@@ -248,7 +271,27 @@
\kern.5\bottomheight
\ForwardButton
\kern.5\bottomheight]
- []
+ [] % redundant
+
+% an alternative way:
+%
+% \setupinteractionmenu[bottom][state=start]
+%
+% \setupinteraction[menu=on]
+%
+% \startinteractionmenu[bottom]
+% \button[frame=off,height=\bottomheight,width=.3\textwidth]{}[Topics]
+% \hfill
+% \doifreferencefoundelse{Whatever}
+% {\gotobox{\MPwhat{\the\bottomheight}{\the\bottomheight}}[Whatever]}{}%
+% \kern2\bottomheight
+% \gotobox{\MPleft{\the\bottomheight}{\the\bottomheight}}[previouspage]%
+% \kern.5\bottomheight
+% \gotobox{\MPcircle{\the\bottomheight}{\the\bottomheight}}[CloseDocument]%
+% \kern.5\bottomheight
+% \gotobox{\MPright{\the\bottomheight}{\the\bottomheight}}[nextpage]%
+% \kern.5\bottomheight
+% \stopinteractionmenu
%D \macros
%D {TitlePage, Topics, Topic, Subject}
@@ -281,7 +324,7 @@
%D \StopTitlepage
%D \stoptypen
%D
-%D or more straightforward:
+%D or as one||liner:
%D
%D \starttypen
%D \TitlePage{text\\text\\text}
@@ -292,7 +335,7 @@
\def\StartTitlePage%
{\startstandardmakeup
- \bfd
+ \bfd\setupinterlinespace
\setupalign[middle]
\vfil
\let\\=\vfil}
@@ -339,25 +382,13 @@
continue=no,
style=\tfa]
+%D The next piece of code is new.
+
%D \macros
%D {setuplist}
%D
-%D The subject list is automatically placed. We center each
-%D subject line by using one of the default alternatives (g). We
-%D could have said:
-%D
-%D \starttypen
-%D \setuplist
-%D [Subject]
-%D [alternative=none,
-%D command=\SubjectListLine,
-%D interaction=all]
-%D
-%D \def\SubjectListLine#1#2#3%
-%D {\midaligned{#2}}
-%D \stoptypen
-%D
-%D But why should we complicate things when we can say:
+%D When found, the subject list is automatically placed
+%D after the topic head.
\setuplist
[Topic,Subject]
@@ -376,6 +407,13 @@
\fi}
\def\Subjects%
- {\placelist[Subject]}
+ {\determinelistcharacteristics[Subject][criterium=Topic]
+ \ifcase\utilitylistlength\else
+ \placelist[Subject][criterium=Topic]
+ \fi}
+
+\setuphead
+ [Topic]
+ [after={\blank[3*medium]\Subjects}]
\endinput
diff --git a/tex/context/base/s-pre-03.tex b/tex/context/base/s-pre-03.tex
new file mode 100644
index 000000000..6eae357cb
--- /dev/null
+++ b/tex/context/base/s-pre-03.tex
@@ -0,0 +1,200 @@
+%D \module
+%D [ file=s-pre-03,
+%D version=1998.09.06,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 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.
+
+%D This is the third environment for typesetting interactive
+%D presentations. I used this style for a talk on \TEX\ and
+%D \JAVASCRIPT\ at \TUG98, mainly because I didn't want to
+%D use the same style three times. Therefore this is a rather
+%D simple, silly style.
+
+\usemodule[pre-general] % mode=step
+
+%D \macros
+%D {setupbodyfont}
+%D
+%D We use a large bodyfont. Combined with the fancy
+%D background, this does not leave that much room for text, but
+%D presentations should use much text anyway.
+
+\setupbodyfont
+ [lbr,14.4pt]
+
+%D \macros
+%D {setuppapersize,setuplayout,setupinteractionscreen}
+%D
+%D The page dimensions are set to size \type {S6}, being
+%D 600pt by 450pt. We use wide margins and discard headers
+%D and footers. We also launch the document full screen.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [width=middle,
+ height=middle,
+ topspace=75pt,
+ backspace=100pt,
+ header=0pt,
+ footer=0pt]
+
+\setupinteractionscreen
+ [option=max]
+
+%D \macros
+%D {setupcolors,definecolor}
+%D
+%D Next, color support is turned on and a dark red color is
+%D defined. Other red shades will be derived from this one
+%D color.
+
+\setupcolors
+ [state=start]
+
+\definecolor
+ [DarkRed][r=.5]
+
+%D \macros
+%D {setupinteraction}
+%D
+%D We turn on interaction mode and use the same color for
+%D hyperlinks and redundant hyperlinks (the ones that point
+%D to the current page).
+
+\setupinteraction
+ [state=start,
+ contrastcolor=DarkRed,
+ color=DarkRed]
+
+%D \macros
+%D {defineoverlay, setupbackgrounds}
+%D
+%D The joke in this presentation is the elliptical shape of
+%D which the bottom part includes a page indication.
+
+\defineoverlay
+ [PageShape][\useMPgraphic{PageShape}]
+
+\startuseMPgraphic{PageShape}
+ input mp-tool ;
+ color fillcolor ; fillcolor := .85white ;
+ color drawcolor ; drawcolor := .75red ;
+ color backcolor ; backcolor := black ;
+ color pagecolor ; pagecolor := .50red ;
+ lin := 20pt ; off := .75lin ;
+ wid := \overlaywidth ; hei := \overlayheight ;
+ pos := \currentpage ; tot := \lastpage ;
+ path bb; bb := unitsquare xscaled wid yscaled hei ;
+ filldraw bb withcolor backcolor ;
+ pickup pencircle xscaled .5lin yscaled lin rotated 45 ;
+ pair r, t, l, b ;
+ r := (wid-off,.5hei) ; t := (.5wid,hei-off) ;
+ l := (off,.5hei) ; b := (.5wid,off) ;
+ path p; p := superellipse(r,t,l,b,.8) ;
+ fill p withcolor fillcolor ;
+ draw p withcolor drawcolor ;
+ if (pos>0) and (tot>0):
+ pair pa ; pa := point 5 of p ;
+ pair pb ; pb := point 7 of p ;
+ draw pa withcolor pagecolor ;
+ draw pb withcolor pagecolor ;
+ len := 2/tot ;
+ pair pa ; pa := point (5+len*pos) of p ;
+ pair pb ; pb := point (5+len*(pos-1)) of p ;
+ p := p cutafter pa ;
+ p := p cutbefore pb ;
+ draw p withcolor pagecolor;
+ fi ;
+ setbounds currentpicture to bb ;
+\stopuseMPgraphic
+
+%D We use the viewer provided feature to go to the previous or
+%D next page.
+
+\defineoverlay[PrevButton][\overlaybutton{PreviousPage}]
+\defineoverlay[NextButton][\overlaybutton{NextPage}]
+
+\setupbackgrounds
+ [page][background={PageShape,PrevButton}]
+
+\setupbackgrounds
+ [text][text][background=NextButton]
+
+% \setupbackgrounds
+% [state=repeat]
+
+%D \macros
+%D {definehead, setuphead}
+%D
+%D Like the other presentation styles, we use \type {\Topic}
+%D instead of \type {\chapters}. This time we don't provide
+%D an additional sectioning. So we have:
+%D
+%D \starttypen
+%D \TitlePage{How nice}
+%D
+%D \Topics{This is about ...}
+%D
+%D \Topic{The first one}
+%D
+%D \Topic{Another one}
+%D \stoptypen
+
+\definehead [Topic] [chapter]
+\definehead [Nopic] [title]
+
+\setuphead
+ [Topic,Nopic]
+ [after={\blank[3*medium]},
+ number=no,
+ style=\tfb,
+ page=yes,
+ alternative=middle]
+
+\setuplist
+ [Topic]
+ [alternative=g,
+ interaction=all,
+ before=,
+ after=]
+
+%D The tables of contents is associated with \type
+%D {\Topics}.
+
+\def\Topics#1%
+ {\Nopic[Topics]{#1}
+ \placelist[Topic][criterium=all]}
+
+%D Instead of \type {\TitlePage}, one can use the pair
+%D \type {\StartTitlePage} -- \type {\StopTitlePage}:
+%D
+%D \starttypen
+%D \StartTitlePage
+%D A Self Made Title
+%D \StopTitlePage
+%D \stoptypen
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \bfd\setupinterlinespace
+ \setupalign[middle]
+ \vfil
+ \def\\{\vfil\bfb\setupinterlinespace}}
+
+\def\StopTitlePage%
+ {\vfil\vfil\vfil
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+\endinput
diff --git a/tex/context/base/s-pre-04.tex b/tex/context/base/s-pre-04.tex
new file mode 100644
index 000000000..da4865e80
--- /dev/null
+++ b/tex/context/base/s-pre-04.tex
@@ -0,0 +1,376 @@
+%D \module
+%D [ file=s-pre-04,
+%D version=1998.09.06,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 4,
+%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[pre-general] % mode=step
+
+%D \macros
+%D {setupbodyfont}
+%D
+%D This is just another environment for typesetting interactive
+%D presentations. I wrote this module on behalf of a course I
+%D gave for the United Kingdom \TeX\ users group.
+
+\setupbodyfont
+ [ams,pos,14.4pt]
+
+%D \macros
+%D {setupcolors,definecolor}
+%D
+%D I started using dark blue for the navigational elements. In
+%D that context, dark red is a logical choice for the contrast
+%D color. While playing around with the navigational elements
+%D I decided to use the not so dominant color yellow for the
+%D status bar.
+%D
+%D A few days before I wrote this style, the recent acquisition
+%D of Mondriaans last painting by the Dutch governement was a
+%D hot topic in the dutch news scenary. Therefore I decided to
+%D replace the rather dull title page by something more
+%D colorful, in mondriaan colors, but far more random than any
+%D of his paintings. For consistence we remap the already
+%D defined primary colors.
+
+\setupcolors [state=start]
+
+\definecolor [NoneColor] [s=.6]
+\definecolor [GotoColor] [b=.6] \definecolor[blue] [GotoColor]
+\definecolor [ExitColor] [r=.6] \definecolor[red] [ExitColor]
+\definecolor [JumpColor] [s=.6]
+\definecolor [UserColor] [g=.6] \definecolor[green] [UserColor]
+\definecolor [StepColor] [r=.6,g=.6] \definecolor[yellow][StepColor]
+
+\definecolor [PageColor] [s=.80] \definecolor[gray] [PageColor]
+\definecolor [TextColor] [s=.90]
+
+%D \macros
+%D {setuppapersize}
+%D
+%D As usual, we take a screen oriented paper size:
+
+\setuppapersize
+ [S6][S6]
+
+%D \macros
+%D {setuplayout,setupinteractionscreen}
+%D
+%D The layout definition fits into this $600\times450$ point
+%D area, but the dimensions are somewhat diffused by the text
+%D background offset.
+
+\setuplayout
+ [width=530pt,
+ height=400pt,
+ header=0pt,
+ footer=0pt,
+ backspace=15pt,
+ topspace=15pt,
+ bottomdistance=15pt,
+ bottom=10pt,
+ margin=0pt,
+ rightedgedistance=15pt,
+ rightedge=30pt]
+
+\setupinteractionscreen
+ [option=max]
+
+%D \macros
+%D {setupbackgrounds}
+%D
+%D Both the page and the text area have a gray background.
+%D The \type {[text,text]} area also has an offset. Later we
+%D will see that we have to compensate for that in the
+%D navigational areas.
+
+\setupbackgrounds
+ [page]
+ [background=color,
+ backgroundcolor=PageColor]
+
+\setupbackgrounds
+ [text][text]
+ [background=color,
+ backgroundcolor=TextColor,
+ backgroundoffset=5pt]
+
+%D \macros
+%D {setupinteraction}
+%D
+%D For convenient navigation, we turn on interaction.
+
+\setupinteraction
+ [state=start,
+ menu=on,
+ color=UserColor,
+ contrastcolor=NoneColor]
+
+%D \macros
+%D {setupsubpagenumber}
+%D
+%D When navigating the document, we keep the title page out
+%D of sight, therefore we use sub page numbers.
+
+\setupsubpagenumber
+ [state=start,
+ way=bytext]
+
+%D \macros
+%D {setupinteractionmenu}
+%D
+%D There is only one interaction menu, located in the right
+%D edge of the screen. Both offsets enlarge the edge by the
+%D same amount as the text background offset.
+
+\setupinteractionmenu
+ [right]
+ [state=start,
+ frame=off,
+ strut=no,
+ offset=0pt,
+ inbetween=,
+ bottomoffset=-5pt,
+ topoffset=-5pt]
+
+%D \macros
+%D {startinteractionmenu}
+%D
+%D The menu itself is not that spectacular. We use the
+%D start||stop alternative for setting the content. The macro
+%D \type {\interactioncolor} expands into either the
+%D interaction color or the contrast color, the latter only
+%D when no jump is possible.
+
+\startinteractionmenu[right]
+ \setupinteraction[color=GotoColor]
+ \but [previoussubpage] \MPup \framedwidth \interactioncolor \\
+ \vskip10pt
+ \but [nextsubpage] \MPdown \framedwidth \interactioncolor \\
+ \vfill
+ \but [PreviousJump] \MPleft \framedwidth {NoneColor} \\
+ \vskip-5pt
+ \but [NextJump] \MPright \framedwidth {NoneColor} \\
+\stopinteractionmenu
+
+%D \macros
+%D {setupinteractionbar}
+%D
+%D The interaction bar at the bottom is also larger than the
+%D normal width of the bottom area.
+
+\setupinteractionbar
+ [alternative=f,
+ width=540pt,
+ height=10pt,
+ distance=10pt,
+ color=NoneColor,
+ contrastcolor=StepColor]
+
+%D \macros
+%D {setupbottomtexts}
+%D
+%D The bar is centered in the middle.
+
+\setupbottomtexts
+ [\interactionbar]
+
+%D We can exit viewing with a close button, located on the
+%D rightmost bottom area.
+
+\def\CloseButton
+ {\button
+ [width=\hsize,height=10pt,offset=overlay,
+ background=color,backgroundcolor=ExitColor,frame=off]
+ {}%
+ [CloseDocument]}
+
+\setupbottomtexts
+ [edge][][\CloseButton]
+
+%D \macros
+%D {definesymbol,setupitemize}
+%D
+%D Because some prominent things are rectangular or triangular,
+%D we prefer some different symbols in itemizations:
+
+\definesymbol[1][$\blacktriangleright$]
+\definesymbol[2][$\blacktriangledown$]
+\definesymbol[3][$\blacktriangleright$]
+\definesymbol[4][$\blacktriangledown$]
+
+\setupitemize[each][color=NoneColor]
+
+%D \macros
+%D {TitlePage,defineoverlay,button,setupalign,
+%D setupbackgrounds,setupinteraction,setupinteractionbar,
+%D startstandardmakeup,switchtobodyfont,setupinterlinespace}
+%D
+%D Now the main layout and navigational definitions are
+%D done, it makes sense to define and tune some structuring
+%D commands. First we build the titlepage.
+
+\defineoverlay [TitleGraphic] [\TitleGraphic]
+\defineoverlay [NextPage] [\NextPageButton]
+
+\def\NextPageButton%
+ {\button
+ [width=\overlaywidth,height=\overlayheight,frame=off]
+ {}[nextpage]}
+
+\def\StartTitlePage%
+ {\setupbackgrounds[page][background={color,TitleGraphic,NextPage}]
+ \setupbackgrounds[text][text][background=]
+ \setupinteraction[menu=off]
+ \setupinteractionbar[state=stop]
+ \startstandardmakeup
+ \switchtobodyfont[24pt]
+ \bfd\setupinterlinespace
+ \setupalign[middle]
+ \vfil
+ \let\\=\vfil}
+
+\def\StopTitlePage%
+ {\vfil\vfil\vfil
+ \stopstandardmakeup
+ \setupinteraction[menu=on]
+ \setupinteractionbar[state=start]
+ \setupbackgrounds[page][background=color]
+ \setupbackgrounds[text][text][background=color]
+ \setupsubpagenumber[reset]}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D \macros
+%D {Topic, Nopic, Subject,
+%D definehead, setuphead}
+%D
+%D We use \type {\Topic} and \type {\Subject} instead of
+%D chapters and sections. The \type {\Nopic} alternative is
+%D meant for internal use.
+
+\definehead [Topic] [chapter]
+\definehead [Nopic] [title]
+\definehead [Subject] [section]
+
+\setuphead
+ [Topic, Nopic]
+ [after={\blank[3*medium]},
+ number=no,
+ style=\tfb,
+ page=yes,
+ alternative=middle]
+
+\setuphead
+ [Subject]
+ [after=\blank,
+ number=no,
+ page=yes,
+ continue=no,
+ style=\tfa]
+
+%D \macros
+%D {Topics, Subjects,
+%D setuplist, placelist, startcolumns}
+%D
+%D This style is meant for the more large presentations, and
+%D therefore provided for a list of topics as well as local
+%D lists of subjects. When many topics are introduces, the
+%D list is typeset in columns.
+
+\setuplist
+ [Topic,Subject]
+ [alternative=g,
+ interaction=all,
+ before=,
+ after=]
+
+\def\Topics#1%
+ {\determinelistcharacteristics[Topic]
+ \ifnum\utilitylistlength>0
+ \Nopic[Topics]{#1}
+ \ifnum\utilitylistlength>12
+ \startcolumns
+ \placelist[Topic][criterium=all]
+ \stopcolumns
+ \else
+ \placelist[Topic][criterium=all]
+ \fi
+ \fi}
+
+\def\Subjects%
+ {\placelist[Subject]}
+
+%D Last we define the overlays. Look at the way colors are
+%D linked into the macros.
+
+\startMPinclusions
+ input mp-tool ;
+ def triangle (expr wid,rot)(text col) =
+ x1 := x3 := y1 := 0 ;
+ x2 := y3 := wid ;
+ y2 := .5y3 ;
+ fill (z1--z2--z3--cycle) rotated rot withcolor col ;
+ scale_currentpicture (wid,wid) ;
+ enddef ;
+\stopMPinclusions
+
+\def\MPright#1#2%
+ {\startreusableMPgraphic{r:#1:#2}
+ triangle (#1, 0, \MPcolor{#2} ) ;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{r:#1:#2}}
+
+\def\MPleft#1#2%
+ {\startreusableMPgraphic{l:#1:#2}
+ triangle (#1, 180, \MPcolor{#2} ) ;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{l:#1:#2}}
+
+\def\MPup#1#2%
+ {\startreusableMPgraphic{u:#1:#2}
+ triangle (#1, 90, \MPcolor{#2} ) ;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{u:#1:#2}}
+
+\def\MPdown#1#2%
+ {\startreusableMPgraphic{d:#1:#2}
+ triangle (#1, 270, \MPcolor{#2} ) ;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{d:#1:#2}}
+
+\def\TitleGraphic%
+ {\startuseMPgraphic{title}
+ color c ;
+ path p ;
+ for i=1 upto 250 :
+ x0 := uniformdeviate \overlaywidth ;
+ y0 := uniformdeviate \overlayheight ;
+ sx := uniformdeviate 20 ;
+ sy := uniformdeviate 20 ;
+ cc := round(uniformdeviate 2) ;
+ if cc=0 : c := \MPcolor{GotoColor} fi ;
+ if cc=1 : c := \MPcolor{ExitColor} fi ;
+ if cc=2 : c := \MPcolor{StepColor} fi ;
+ qq := round(uniformdeviate 1) ;
+ if qq=0 :
+ p := unitsquare xscaled sx yscaled sy ;
+ else :
+ rr := round(uniformdeviate 3) * 90 ;
+ x1 := x3 := y1 := 0 ; x2 := y3 := sx; y2 := .5y3 ;
+ p := (z1--z2--z3--cycle) rotated rr ;
+ fi ;
+ fill p shifted z0 withcolor c ;
+ endfor ;
+ \stopuseMPgraphic
+ \useMPgraphic{title}}
+
+\endinput
diff --git a/tex/context/base/s-pre-05.tex b/tex/context/base/s-pre-05.tex
new file mode 100644
index 000000000..ec4c6e372
--- /dev/null
+++ b/tex/context/base/s-pre-05.tex
@@ -0,0 +1,214 @@
+%D \module
+%D [ file=s-pre-05,
+%D version=1998.12.12,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 5,
+%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[pre-general] % mdode=step
+
+%D Yet undocumented, mostly copied from s-pre-04; much can be
+%D moved to s-pre-00!
+
+\setupbodyfont
+ [lbr,14.4pt]
+
+\setupcolors [state=start]
+
+\definecolor [FrameColor] [r=.6,g=.7,b=.8]
+\definecolor [BackgroundColor] [s=.95]
+\definecolor [GotoColor] [FrameColor]
+\definecolor [NoneColor] [blank]
+
+\setuppapersize
+ [S6]
+
+\setuplayout
+ [width=430pt,
+ height=400pt,
+ header=0pt,
+ footer=0pt,
+ margin=0pt,
+ backspace=25pt,
+ topspace=25pt,
+ rightedgedistance=20pt,
+ rightedge=110pt]
+
+\setupinteractionscreen
+ [option=max,
+ width=600pt, % fit
+ height=450pt] % fit
+
+\setupbackgrounds
+ [state=repeat]
+
+\setupbackgrounds
+ [text][text]
+ [background={HashFrameA,NextPage},
+ backgroundoffset=20pt]
+
+\defineoverlay
+ [HashFrameA]
+ [\HashFrame\overlaywidth\overlayheight{15pt}]
+
+\defineoverlay
+ [HashFrameB]
+ [\HashFrame\overlaywidth\overlayheight{5pt}]
+
+\setupinteraction
+ [state=start,
+ menu=on,
+ color=GotoColor,
+ contrastcolor=NoneColor]
+
+\startinteractionmenu[right]
+ \setupbuttons
+ [background=HashFrameB,
+ frame=off,
+ offset=10pt,
+ height=30pt,
+ width=\rightedgewidth]
+ \placelist
+ [Topic]
+ [criterium=all,
+ alternative=e,
+ background=HashFrameB,
+ frame=off,
+ offset=10pt,
+ % align=middle, % this is a nice alternative
+ width=\rightedgewidth,
+ interaction=all,
+ textcommand=\TopicLine,
+ before=,
+ after=]
+ \vfill
+ \button{Close}[CloseDocument]
+\stopinteractionmenu
+
+%D \macros
+%D {TitlePage}
+%D
+%D Now the main layout and navigational definitions are
+%D done, it makes sense to define and tune some structuring
+%D commands. First we build the titlepage.
+
+\defineoverlay [TitleGraphic] [\TitleGraphic\overlaywidth\overlayheight]
+\defineoverlay [NextPage] [\NextPageButton]
+
+\def\NextPageButton%
+ {\button
+ [width=\overlaywidth,height=\overlayheight,frame=off]
+ {}[forward]}
+
+\def\StartTitlePage%
+ {\setupbackgrounds[page][background={TitleGraphic,NextPage}]
+ \setupbackgrounds[text][text][background=]
+ \setupinteraction[menu=off]
+ \setupinteractionbar[state=stop]
+ \setuplayout[width=550pt,rightedge=0pt]
+ \startstandardmakeup
+ \switchtobodyfont[24pt]
+ \bfd\stelinterliniein
+ \setupalign[middle]
+ \vfil
+ \let\\=\vfil}
+
+\def\StopTitlePage%
+ {\vfil\vfil\vfil
+ \stopstandardmakeup
+ \setuplayout[width=430pt,rightedge=110pt]
+ \setupinteraction[menu=on]
+ \setupinteractionbar[state=start]
+ \setupbackgrounds[page][background=]
+ \setupbackgrounds[text][text][background={HashFrameA,NextPage}]}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D \macros
+%D {Topics}
+%D
+%D ...
+
+\def\Topics#1{}
+
+%D \macros
+%D {Topic, Nopic, Subject}
+%D
+%D ...
+
+\definehead [Topic] [chapter]
+\definehead [Nopic] [title]
+\definehead [Subject] [section]
+
+\setuphead
+ [Topic, Nopic]
+ [after={\blank[3*medium]},
+ number=no,
+ style=\tfb,
+ page=yes,
+ alternative=middle]
+
+\setuphead
+ [Subject]
+ [after=\blank,
+ number=no,
+ page=yes,
+ continue=no,
+ style=\tfa]
+
+\def\TopicLine#1%
+ {\limitatetext{#1}{80pt}{...}}
+
+\startMPinclusions
+ input mp-tool ;
+
+ def random_hash_frame (expr width, height, offset, linewidth ) =
+
+ def delta = ((uniformdeviate .5offset) + .25offset) enddef ;
+ x1 := offset ; y1 := offset ; x2 := width-offset ; y2 := height-offset ;
+
+ drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{BackgroundColor}) ;
+ fill z1--(x2,y1)--z2--(x1,y2)--cycle ;
+
+ drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{FrameColor}) ;
+ draw (x1-delta,y1)--(x2+delta,y1) ;
+ draw (x2,y1-delta)--(x2,y2+delta) ;
+ draw (x2+delta,y2)--(x1-delta,y2) ;
+ draw (x1,y2+delta)--(x1,y1-delta) ;
+
+ setbounds currentpicture to unitsquare xscaled width yscaled height ;
+ enddef ;
+\stopMPinclusions
+
+\def\HashFrame#1#2#3%
+ {\startuseMPgraphic{HashFrame}
+ random_hash_frame(#1,#2,#3,2pt) ;
+ \stopuseMPgraphic
+ \useMPgraphic{HashFrame}}
+
+\def\TitleGraphic#1#2%
+ {\startuseMPgraphic{title}
+ picture savedpicture ;
+ savedpicture := nullpicture ;
+ def MakeOne =
+ offset := uniformdeviate 10pt ;
+ width := 2*offset + 30pt + uniformdeviate 30pt ;
+ height := 2*offset + 10pt + uniformdeviate 10pt ;
+ random_hash_frame(width,height,offset,1pt) ;
+ addto savedpicture also (currentpicture shifted
+ (uniformdeviate #1, uniformdeviate #2)) ;
+ currentpicture := nullpicture ;
+ enddef ;
+ for i=1 upto 300 : MakeOne ; endfor ;
+ currentpicture := savedpicture ;
+ \stopuseMPgraphic
+ \useMPgraphic{title}}
+
+\endinput
diff --git a/tex/context/base/s-pre-06.tex b/tex/context/base/s-pre-06.tex
new file mode 100644
index 000000000..03817cc8d
--- /dev/null
+++ b/tex/context/base/s-pre-06.tex
@@ -0,0 +1,294 @@
+%D \module
+%D [ file=s-pre-06,
+%D version=1999.04.28,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 6,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D I wrote this sixth presentation style on behalf of a
+%D presentation at Bachotek~'99. The joke in this style is
+%D (ab)using the Antikwa Torunska, a rather Polish font. When I
+%D was first confronted with this font, the backward slant
+%D stoke me as very characteristic.
+%D
+%D Each page has a slightly different background consisting of
+%D three O's. Although \TEX\ could do the randomization,
+%D scaling and placement, I prefered to use \METAPOST. The
+%D backward slant is also reflected in the stepwise increasing
+%D left margin. Due to this characteristic and the trick used,
+%D this style is only suited for simple presentations, using
+%D itemizations.
+
+\usemodule[pre-general] % mode=step
+
+%D \macros
+%D {setupbodyfont}
+%D
+%D As said, we will use the Antikwa Torunska, and because we
+%D want it to show up well, we use it large.
+
+\setupbodyfont
+ [ant,14.4pt]
+
+%D \macros
+%D {definecolor, setupcolors}
+%D
+%D Thus style only uses gray scales, but nevertheless we turn
+%D on color. We only use a few logical color names.
+
+\setupcolors
+ [state=start]
+
+\definecolor [InteractionColor] [s=.6]
+\definecolor [PrimaryColor] [s=.8]
+\definecolor [SecondaryColor] [s=.9]
+
+%D \macros
+%D {setuppapersize}
+%D
+%D As (nearly) always, we use a 600 pt times 450 pt screen
+%D width, mapped on ditto paper dimensions.
+
+\setuppapersize
+ [S6][S6]
+
+%D \macros
+%D {setuplayout}
+%D
+%D The layout is rather symmetrical. We don't use headers and
+%D footers, and thereby automatically turn off the page
+%D numbering: no room, no number. We use the bottom to present
+%D a rather trivial menu.
+
+\setuplayout
+ [backspace=2cm,
+ topspace=2cm,
+ width=middle,
+ header=0pt,
+ height=middle,
+ footer=0pt,
+ bottomdistance=.5cm,
+ bottom=1cm]
+
+%D \macros
+%D {setupinteractionmenu,startinteractionmenu}
+%D
+%D This menu is slighly moved to the right because that looks
+%D better. The menu itself has one goto (\type {\got}) entry,
+%D which is forced to the right.
+
+\setupinteractionmenu
+ [bottom]
+ [rightoffset=-1cm]
+
+\startinteractionmenu[bottom]
+ \hfill \got [CloseDocument] \bfd Quit \\
+\stopinteractionmenu
+
+%D \macros
+%D {setupbackgrounds}
+%D
+%D Page background are calculated at each page, opposite to the
+%D other backgrounds, that are reused and only calculated when
+%D \CONTEXT\ is explictly told to do so. There are three
+%D overlays: a gray fill, the graphic, and a button that
+%D circulates the pages.
+
+\setupbackgrounds
+ [page]
+ [background={color,Joke,GoAround},
+ backgroundcolor=PrimaryColor]
+
+%D \macros
+%D {defineoverlay}
+%D
+%D The \type {forward} reference action circulates over the
+%D pages, so, at the last page, we are led back to the first.
+
+\defineoverlay [GoAround] [\overlaybutton{forward}]
+
+%D The joke is a simple \METAPOST\ routine. The picture is
+%D actually larger than the screen, but is clipped of when
+%D included.
+
+\defineoverlay [Joke] [\useMPgraphic{background}]
+
+\startuseMPgraphic{background}
+ input mp-tool ;
+ width := \overlaywidth ;
+ height := \overlayheight ;
+ picture p ; p := char 79 infont "\truefontname{Regular}" scaled 1 ;
+ pwidth := xpart urcorner bbox p - xpart llcorner bbox p ;
+ pheight := ypart urcorner bbox p - ypart llcorner bbox p ;
+ def do (expr r) =
+ addto currentpicture also p shifted - center p scaled r
+ xscaled (width/pwidth) yscaled (height/pheight)
+ withcolor \MPcolor{SecondaryColor} ;
+ enddef ;
+ do (0.9+uniformdeviate0.1) ;
+ do (1.4+uniformdeviate0.1) ;
+ do (1.9+uniformdeviate0.1) ;
+\stopuseMPgraphic
+
+%D \macros
+%D {setupinteraction,setupinteractionscreen}
+%D
+%D We did not yet turn on the interaction, so let's do that
+%D now. When opened, the document will fil the screen.
+
+\setupinteraction
+ [state=start,
+ color=InteractionColor,
+ menu=on]
+
+\setupinteractionscreen
+ [option=max]
+
+%D \macros
+%D {TitlePage, Topics, Topic}
+%D
+%D A presentation normally consists of a title page, a list of
+%D topics, and the content itself. In this style, a further
+%D subdivision does not make sense, but because we want to be
+%D compatible with the other styles, they are added. A
+%D presentation looks like:
+%D
+%D \starttypen
+%D \usemodule[pre-antikwa]
+%D
+%D \startext
+%D
+%D \TitlePage{The Title}
+%D
+%D \Topics{Contents}
+%D
+%D \Topic{Some Topic}
+%D
+%D \startitemize
+%D \item first
+%D \item second
+%D \stopitemize
+%D
+%D \Topic{Some Topic}
+%D
+%D ...
+%D
+%D \stoptext
+%D \stoptypen
+
+%D \macros
+%D {definehead, Topic, Subject}
+%D
+%D We use dedicated sectioning commands.
+
+\definehead [Topic] [chapter]
+\definehead [Subject] [section]
+
+\definehead [Nopic] [title]
+
+%D \macros
+%D {setuphead}
+%D
+%D We turn of numbering. The assignment to \type {after} takes
+%D care of the increasing indentation. This indentation is the
+%D only low level \TEX\ code needed. Including this
+%D functionality in the core of \CONTEXT\ is not that useful
+%D and I would forget about this feature being present anyway.
+
+\setuphead
+ [Topic, Nopic, Subject]
+ [number=no,
+ after={\blank[2*big]\ToTheLeft\everypar{\ToTheRight}}]
+
+%D After section titles we set the \type {\leftskip} to a value
+%D that suits the Antikwa slant.
+
+\def\ToTheLeft%
+ {\gdef\LeftSkip{30}%
+ \rightskip0pt\relax
+ \leftskip30pt\relax}
+
+%D Each new paragraph adds to the \type {\leftskip}.
+
+\def\ToTheRight%
+ {\doglobal\increment(\LeftSkip,20)%
+ \leftskip=\LeftSkip pt\relax}
+
+%D \macros
+%D {Topics}
+%D
+%D The \type {\Topics} command uses a bot of low level
+%D \CONTEXT. We could have done with:
+%D
+%D \starttypen
+%D \def\Topics#1%
+%D {\Nopic[Topics]{#1}
+%D \placelist[Topic][criterium=all]}
+%D \stoptypen
+%D
+%D but the next alternative sort of ignores this command when
+%D no list is found.
+
+\def\Topics#1%
+ {\determinelistcharacteristics[Topic]
+ \ifcase\utilitylistlength\else
+ \Nopic[Topics]{#1}
+ \placelist[Topic][criterium=all]
+ \fi}
+
+%D \macros
+%D {setuplist}
+%D
+%D We use the single item command to achieve a result similar
+%D to the itemizations.
+
+\setuplist
+ [Topic]
+ [alternative=command,
+ command=\TopicListCommand]
+
+\def\TopicListCommand#1#2#3%
+ {\item#2\par}
+
+%D A dummy command, needed to be compatible with the other
+%D presentation styles.
+
+\def\Subjects%
+ {}
+
+%D \macros
+%D {StartTitlePage}
+%D
+%D We use a nested \type {\everypar}; everything in there
+%D will be put in front of each paragraph. The nesting prevents
+%D the first paragraph from indenting. The struts give the
+%D lines a decent height, which looks better inrelation to the
+%D next pages.
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \bfd\setupinterlinespace
+ \everypar{\everypar{\advance\leftskip30pt\relax}}
+ \let\\=\blank
+ \begstrut}
+
+\def\StopTitlePage%
+ {\endstrut
+ \vfill
+ \stopstandardmakeup}
+
+%D \macros
+%D {TitlePage}
+%D
+%D The title page can be generated with one command:
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+\endinput
diff --git a/tex/context/base/spec-dvi.tex b/tex/context/base/spec-dvi.tex
index 0d190bd2e..4266b36c4 100644
--- a/tex/context/base/spec-dvi.tex
+++ b/tex/context/base/spec-dvi.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\unprotect
@@ -17,7 +17,6 @@
%D {dostartobject,
%D dostopobject,
%D doinsertobject}
-%D {}
%D
%D Reuse of object is not supported by the \DVI\ format. We
%D therefore just duplicate them using boxes.
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
index f71e623f3..e1482d397 100644
--- a/tex/context/base/spec-fdf.tex
+++ b/tex/context/base/spec-fdf.tex
@@ -2,26 +2,26 @@
%D [ file=spec-fdf,
%D version=1998.05.18,
%D title=\CONTEXT\ \PDF\ Macros,
-%D subtitle=Adobe \PDF/\FDF\ version 2.1,
+%D subtitle=Adobe \PDF/\FDF\ version 2.1,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\unprotect
-%D \macros
+%D \macros
%D {setPDFdestination}
-%D
-%D \PDF\ destinations should obey the specifications laid down
-%D in the \PDF\ reference manual. The next macro strips illegal
-%D characters from the destination name.
-%D
+%D
+%D \PDF\ destinations should obey the specifications laid down
+%D in the \PDF\ reference manual. The next macro strips illegal
+%D characters from the destination name.
+%D
%D The \ACROBAT\ programs are not bug free. By setting the next
-%D switch, we will at least try to prevent problems.
+%D switch, we will at least try to prevent problems.
\newif\ifovercomePDFbugs \overcomePDFbugstrue
@@ -38,14 +38,14 @@
%D \macros
%D {sanitizePDFstring}
%D
-%D This macro at least tries to convert a arbitrary string
-%D into a sequence of characters valid for \PDF\ bookmarks and
-%D alike. It's a slow one, that uses \type{\lccode}'s to
-%D change the glyph as well as converts sensisitve ones into a
+%D This macro at least tries to convert a arbitrary string
+%D into a sequence of characters valid for \PDF\ bookmarks and
+%D alike. It's a slow one, that uses \type{\lccode}'s to
+%D change the glyph as well as converts sensisitve ones into a
%D \PDF\ command sequence, so \type{(} becomes \type{\(}. In
-%D fact we translate the string to lowercase inactive and non
-%D special characters, limit their number and finaly convert
-%D some of the characters to save ones.
+%D fact we translate the string to lowercase inactive and non
+%D special characters, limit their number and finaly convert
+%D some of the characters to save ones.
\chardef\maxPDFstringsize=60
@@ -58,7 +58,7 @@
\lccode`\\=1 \lccode`/ =1
\lowercase{\convertargument#1\to\ascii}%
% by integrating the split in the loop below
- % \splitofftokens\maxPDFstringsize\from\ascii\to\ascii
+ % \splitofftokens\maxPDFstringsize\from\ascii\to\ascii
% we diminish the processing time considerably
\scratchcounter=\maxPDFstringsize
\def\docommando##1%
@@ -72,38 +72,36 @@
\xdef#2{#2##1}%
\fi
\fi}%
- %\global\let#2=\empty
+ %\global\let#2=\empty
% or to permit #2 to be \ascii too:
\@EA\global\@EA\let\@EA#2\@EA\empty
\@EA\handletokens\ascii\with\docommando
\egroup}
-%D \macros
-%D {doPDFdestination,
-%D doPDFaction,
-%D doPDFannotation,
-%D doPDFtextannotation,
-%D doPDFannotationobject,
-%D doPDFdictionaryobject,
-%D doPDFarrayobject,
-%D doPDFaddtocatalog,
-%D doPDFpageattribute,
-%D doPDFpagesattribute,
-%D doPDFbookmark,
+%D \macros
+%D {doPDFdestination,
+%D doPDFaction,
+%D doPDFannotation,
+%D doPDFannotationobject,
+%D doPDFdictionaryobject,
+%D doPDFarrayobject,
+%D doPDFaddtocatalog,
+%D doPDFpageattribute,
+%D doPDFpagesattribute,
+%D doPDFbookmark,
%D defaultobjectreference,
%D doPDFgetobjectreference}
-%D
+%D
%D This module deals with \PDF\ support, including fill||in
%D forms. Before we present the largely unreadable bunch of
%D macros, we introduce the here||not||defined low level
%D interface macros. These must be provided by the special
-%D drivers \type{pdf} (\ACROBAT) and \type{tpd} (\PDFTEX).
-%D
+%D drivers \type{pdf} (\ACROBAT) and \type{tpd} (\PDFTEX).
+%D
%D \starttypen
%D \doPDFdestination name #1
%D \doPDFaction width #1 height #2 action #3
-%D \doPDFannotation width #1 height #2 data #3 % 'negative'
-%D \doPDFtextannotation width #1 height #2 data #3 % 'positive'
+%D \doPDFannotation width #1 height #2 data #3
%D \doPDFannotationobject class #1 name #2 width #3 height #4 data #5
%D \doPDFdictionaryobject class #1 name #2 data #3
%D \doPDFarrayobject class #1 name #2 data #3
@@ -112,17 +110,17 @@
%D \doPDFpagesattribute #1
%D \doPDFbookmark level #1 n #2 text #3 page #4 open #5
%D
-%D \defaultobjectreference #1#2 % class name
-%D \doPDFgetobjectreference #1#2#3 % class name \PDFobjectreference
+%D \defaultobjectreference #1#2 % class name
+%D \doPDFgetobjectreference #1#2#3 % class name \PDFobjectreference
%D \stoptypen
%D
%D The keywords reflect their use. For the moment we stick to
-%D keywords, because that way at we get an indication of what
-%D we're doing.
+%D keywords, because that way at we get an indication of what
+%D we're doing.
\startspecials[fdf]
-%D Due to the fact that \PDFTEX\ has a different concept of
+%D Due to the fact that \PDFTEX\ has a different concept of
%D page attributes, we need:
\let\doPDFresetpageattributes=\relax
@@ -137,42 +135,38 @@
\fi
\fi
-%D \macros
+%D \macros
%D {doPDFsetupscreen}
-%D
+%D
%D Opposite to \DVI\ drivers, \PDF\ ones must know which what
-%D page dimensions they are dealing. We also use the
-%D opportunity to launch full screen.
+%D page dimensions they are dealing. We also use the
+%D opportunity to launch full screen (1) or show bookmarks (2).
-\def\doPDFsetupscreen#1#2#3#4#5#6% watch the extra argument
+\def\doPDFsetupscreen#1#2#3#4#5#6% watch the extra argument
{\bgroup
\!!widtha=#4sp
\advance\!!widtha by #2sp
\!!heighta=-#5sp
- \!!heightb=#1% extra argument
+ \!!heightb=#1% extra argument
\advance\!!heightb by -#3sp
\advance\!!heighta by \!!heightb
\ScaledPointsToWholeBigPoints{#2}\left
\ScaledPointsToWholeBigPoints{\number\!!heighta}\bottom
- \ScaledPointsToWholeBigPoints{\number\!!widtha}\width
+ \ScaledPointsToWholeBigPoints{\number\!!widtha }\width
\ScaledPointsToWholeBigPoints{\number\!!heightb}\height
\doPDFpagesattribute
{/CropBox [\left\space\bottom\space\width\space\height]}%
\doPDFaddtocatalog
- {/PageMode \ifcase#6 /UseNone \else /FullScreen\fi}%
+ {/PageMode \ifcase#6 /UseNone\or/FullScreen\or/UseOutlines\fi}%
\egroup}
-%D \macros
-%D {doPDFsetupopenaction,doPDFsetupcloseaction}
+%D \macros
+%D {doPDFsetupopenaction,doPDFsetupcloseaction,
+%D doPDFsetupopenpageaction,doPDFsetupclosepageaction}
%D
-%D Setting the open and close actions is kind of fuzzy
-%D because action chains are derived from the reference
-%D mechanism.
-
-% \def\doPDFsetopenaction% some day a real reference
-% {\doPDFaddtocatalog
-% {/OpenAction << /S /ResetForm
-% /Next << /S /GoTo /D [0\PDFpageviewwrd] >> >>}}
+%D Setting the open and close actions is kind of fuzzy
+%D because action chains are derived from the reference
+%D mechanism.
\let\lastPDFaction\empty
@@ -182,14 +176,37 @@
\def\doPDFsetupcloseaction%
{\doPDFaddtocatalog{/CloseAction \lastPDFaction}}
+\let\PDFopenpageaction \empty
+\let\PDFclosepageaction\empty
+
+\def\doPDFsetupopenpageaction%
+ {\global\let\PDFopenpageaction\lastPDFaction}
+
+\def\doPDFsetupclosepageaction%
+ {\global\let\PDFclosepageaction\lastPDFaction}
+
+\def\checkPDFpageactions%
+ {\donefalse
+ \ifx\PDFopenpageaction \empty\!!doneafalse\else\donetrue\!!doneatrue\fi
+ \ifx\PDFclosepageaction\empty\!!donebfalse\else\donetrue\!!donebtrue\fi
+ \ifdone
+ \doPDFpageattribute
+ {/AA <<\if!!donea/O \PDFopenpageaction \fi
+ \if!!doneb/C \PDFclosepageaction\fi>>}%
+ \fi
+ \global\let\PDFopenpageaction \empty
+ \global\let\PDFclosepageaction\empty}
+
+\appendtoks \checkPDFpageactions \to \everyshipout
+
%D \macros
%D {doPDFstartthisislocation}
-%D
+%D
%D Next we define the macros that deal with hyperreferencing,
%D graphic inclusion and general document features. These are
%D the olderst ones. I won't comment much because one needs
%D knowledge of \PDF\ itself, and explaning \PDF\ is beyond
-%D this documentation.
+%D this documentation.
\def\doPDFstartthisislocation#1%
{\bgroup
@@ -204,9 +221,9 @@
%D doPDFstartgotoJS}
%D
%D The goto macros use the switch \type{\ifsecondaryreference}
-%D to determine if actions should be linked.
+%D to determine if actions should be linked.
-\def\doPDFstartgotolocation#1#2#3#4#5#6%
+\def\doPDFstartgotolocation#1#2#3#4#5#6%
{\bgroup
\doifelsenothing{#3}
{\setPDFdestination{#5}%
@@ -216,25 +233,26 @@
{\let\PDFfile\empty}
{\doifparentfileelse{#4}
{\let\PDFfile\empty}
- {\uppercasestring R /F (#4.pdf)\to\PDFfile}}% /GotoR
+ {\setreferencefilename R /F (#4.pdf)\to\PDFfile
+ \ifgotonewwindow\edef\PDFfile{\PDFfile\space/NewWindow true}\fi}}%
\edef\action%
{/S /GoTo\PDFfile\space /D (\PDFdestination)}}}
{\doifelsenothing{#4}
{\let\PDFfile\empty
\let\PDFdestination\empty}
- {\uppercasestring/#4\to\PDFfile
+ {\setreferencefilename/#4\to\PDFfile
\setPDFdestination{#5}%
\doifsomething{\PDFdestination}
{\edef\PDFdestination{\URLhash\PDFdestination}}}%
- \edef\action
+ \edef\action%
{/S /URI /URI (#3\PDFfile\PDFdestination)}}%
\ifx\action\empty\else
\ifsecondaryreference
\savesecondaryPDFreference\action
\else
\getsecondaryPDFreferences
- \doPDFaction
- width #1 height #2
+ \doPDFaction
+ width #1 height #2
action {\action \secondaryPDFreferences}%
\fi
\fi
@@ -251,16 +269,17 @@
{\let\PDFfile\empty}
{\doifparentfileelse{#4}
{\let\PDFfile\empty}
- {\uppercasestring R /F (#4.pdf)\to\PDFfile}}% /GotoR
+ {\setreferencefilename R /F (#4.pdf)\to\PDFfile % becomes /GotoR
+ \ifgotonewwindow\edef\PDFfile{\PDFfile\space/NewWindow true}\fi}}%
\edef\action%
- {/S /GoTo\PDFfile\space
+ {/S /GoTo\PDFfile\space
/D [\PDFdestination\PDFpageviewwrd]}%
\else
\let\action\empty
\fi}
{\doifelsenothing{#4}
{\let\PDFfile\empty}
- {\uppercasestring/#4\to\PDFfile}%
+ {\setreferencefilename/#4\to\PDFfile}%
\edef\action%
{/S /URI /URI (#3\PDFfile)}}%
\ifx\action\empty\else
@@ -268,8 +287,8 @@
\savesecondaryPDFreference\action
\else
\getsecondaryPDFreferences
- \doPDFaction
- width #1 height #2
+ \doPDFaction
+ width #1 height #2
action {\action \secondaryPDFreferences}%
\fi
\fi
@@ -277,15 +296,15 @@
\def\doPDFstartgotoJS#1#2#3%
{\bgroup
- \doPSsanitizeJScode#3\to\sanitizedJScode
+ \doPSsanitizeJScode#3\to\sanitizedJScode
\edef\action%
{/S /JavaScript /JS (\sanitizedJScode)}%
\ifsecondaryreference
\savesecondaryPDFreference\action
\else
\getsecondaryPDFreferences
- \doPDFaction
- width #1 height #2
+ \doPDFaction
+ width #1 height #2
action {\action \secondaryPDFreferences}%
\fi
\egroup}
@@ -293,13 +312,13 @@
%D \macros
%D {doPDFstartexecutecommand}
%D
-%D At the cost of much auxiliary placeholders, we can pretty
-%D fast convert the command asked for. This is how \PDF\
-%D looks like.
+%D At the cost of much auxiliary placeholders, we can pretty
+%D fast convert the command asked for. This is how the \PDF\
+%D code looks like.
\def\PDFmoviecode%
- {/Movie
- /T (movie \ifx\argumentA\empty\currentmovie\else\argumentA\fi)
+ {/Movie
+ /T (movie \ifx\argumentA\empty\currentmovie\else\argumentA\fi)
/Operation\space}
\def\PDFexecutestart {\PDFmoviecode /Play}
@@ -308,18 +327,18 @@
\def\PDFexecuteresume {\PDFmoviecode /Resume}
\def\PDFformcode#1%
- {\doFDFiffieldset{#1}/Fields [\doFDFgetfieldset{#1}]\fi}
+ {\doFDFiffieldset{#1}{/Field [\doFDFgetfieldset{#1}]}}
-\chardef\PDFsubmitformat=0 % 0=FDF 1=HTML
+\chardef\PDFsubmitformat=1 % 0=FDF 1=HTML
\def\PDFexecuteimport {/Named /N /AcroForm:ImportFDF}
\def\PDFexecuteexport {/Named /N /AcroForm:ExportFDF}
\def\PDFexecutereset {/ResetForm \PDFformcode\argumentA}
-\def\PDFexecutesubmit {/SubmitForm \PDFformcode\argumentB
- /F (\argumentA)
- /Flags \ifnum\PDFsubmitformat=1 12\fi}
- %/Flags \ifnum\PDFsubmitformat=1 4\fi}
-
+\def\PDFexecutesubmit {/SubmitForm \PDFformcode\argumentB
+ %/Flags \ifnum\PDFsubmitformat=1 12\fi
+ %/Flags \ifnum\PDFsubmitformat=1 4\fi
+ /F (\argumentA)}
+
\def\PDFexecutehide {/Hide /T (\argumentA) /H true}
\def\PDFexecuteshow {/Hide /T (\argumentA) /H false}
@@ -337,6 +356,7 @@
\def\PDFexecuteswap {/Named /N /FullScreen}
\def\PDFexecutesearch {/Named /N /Find}
\def\PDFexecutesearchagain {/Named /N /FindAgain}
+\def\PDFexecutegotopage {/Named /N /GoToPage}
\def\doPDFstartexecutecommand#1#2#3#4%
{\doifdefined{PDFexecute#3}
@@ -350,8 +370,8 @@
\savesecondaryPDFreference\action
\else
\getsecondaryPDFreferences
- \doPDFaction
- width #1 height #2
+ \doPDFaction
+ width #1 height #2
action {\action \secondaryPDFreferences}%
\fi
\egroup}}
@@ -360,7 +380,7 @@
%D {doPDFstartrunprogram}
%D
%D Running programs is possible, but rather non portable, and
-%D therefore ill advized.
+%D therefore ill advized.
\def\doPDFstartrunprogram#1#2#3%
{\bgroup
@@ -373,18 +393,18 @@
\savesecondaryPDFreference\action
\else
\getsecondaryPDFreferences
- \doPDFaction
- width #1 height #2
+ \doPDFaction
+ width #1 height #2
action {\action \secondaryPDFreferences}%
\fi
\egroup}
-%D \macros
+%D \macros
%D {doPDFstartgotoprofile}
%D
%D Far from perfect, but nevertheless present, is the profile
-%D handler. We want to misuse article threads for reder
-%D profiles.
+%D handler. We want to misuse article threads for reder
+%D profiles.
\def\doPDFstartgotoprofile#1#2#3% to be done: file
{\bgroup
@@ -396,8 +416,8 @@
\savesecondaryPDFreference\action
\else
\getsecondaryPDFreferences
- \doPDFaction
- width #1 height #2
+ \doPDFaction
+ width #1 height #2
action {\action \secondaryPDFreferences}%
\fi}%
\egroup}
@@ -405,12 +425,12 @@
%D \macros
%D {doPDFsetpagetransition}
%D
-%D This array holds a reasonable selection of transitions
-%D (watch out: \type{replace} is not in this list). Most of
+%D This array holds a reasonable selection of transitions
+%D (watch out: \type{replace} is not in this list). Most of
%D the transitions look awful anyway. By the way, \CONTEXT\ is
-%D able to select transitions randomly.
+%D able to select transitions randomly.
-\def\pagetransitions
+\def\pagetransitions
{{split,in,vertical},{split,in,horizontal},
{split,out,vertical},{split,out,horizontal},
{blinds,horizontal},{blinds,vertical},
@@ -419,14 +439,14 @@
dissolve,
{glitter,east},{glitter,south}}
-%D Again, we use macros as placeholders for \PDF\ key||value
-%D pairs.
+%D Again, we use macros as placeholders for \PDF\ key||value
+%D pairs.
-\def\PDFpagesplit {/S /Split }
+\def\PDFpagesplit {/S /Split }
\def\PDFpageblinds {/S /Blinds }
\def\PDFpagebox {/S /Box }
-\def\PDFpagewipe {/S /Wipe }
-\def\PDFpagedissolve {/S /Dissolve }
+\def\PDFpagewipe {/S /Wipe }
+\def\PDFpagedissolve {/S /Dissolve }
\def\PDFpageglitter {/S /Glitter }
\def\PDFpagereplace {/S /R }
@@ -443,30 +463,37 @@
{\doifdefined{PDFpage#1}
{\edef\PDFpagetransitions{\PDFpagetransitions\getvalue{PDFpage#1}}}}
-\def\doPDFsetpagetransition#1%
+\def\doPDFsetpagetransition#1#2%
{\let\PDFpagetransitions\empty
\processcommalist[#1]\dodoPDFsetpagetransition
- \doPDFpageattribute{/Trans <<\PDFpagetransitions>>}}
+ \doPDFpageattribute
+ %{\ifnum#2>0 /Dur #2 \fi
+ {\ifnum0<0#2 /Dur #2 \fi
+ \ifx\PDFpagetransitions\empty\else/Trans <<\PDFpagetransitions>>\fi}}
%D \macros
%D {doPDFinsertmov}
%D
-%D Most of the annotations we use here are of type {\em
+%D Most of the annotations we use here are of type {\em
%D link}, but here is another one: the {\em movie} annotation.
-%D The driver module must implement \type {setcurrentmovie}.
+%D The driver module must implement \type {setcurrentmovie}.
\def\doPDFinsertmov#1#2#3#4#5#6#7#8#9%
{\bgroup
\setcurrentmovie{#1}%
\ScaledPointsToBigPoints{#7}\width
\ScaledPointsToBigPoints{#8}\height
- \edef\pdf@@posterize{\ifcase#9 \or/Poster true\fi}%
- \doPDFannotation width #7 height #8 data
+ \let\pdf@@options\empty
+ \def\pdf@@actions{/ShowControls false }%
+ \@EA\processallactionsinset\@EA
+ [#9]
+ [\v!herhaal=>\edef\pdf@@actions{\pdf@@actions /Mode /Repeat },
+ \v!preview=>\edef\pdf@@options{\pdf@@options /Poster true }]%
+ \doPDFannotation width #7 height #8 data
{/Subtype /Movie
/T (movie \currentmovie)
- /Movie << /F (#1)
- /Aspect [\width\space \height] \pdf@@posterize >>
- /A << /ShowControls false >>}
+ /Movie << /F (#1) /Aspect [\width\space\height] \pdf@@options >>
+ /A << \pdf@@actions>>}
\egroup}
%D \macros
@@ -474,25 +501,25 @@
%D
%D Well, here is the dreadfull bookmark, rather useless because
%D only standard encoding is possible, no typography is done,
-%D and a maximum of 32~characters is advized.
+%D and a maximum of 32~characters is advized.
\def\doPDFinsertbookmark#1#2#3#4#5% level sublevels text page open=1
- {\bgroup
+ {\bgroup
\sanitizePDFdocencoding#3\to\bookmarktext % uses scratchcounter
\scratchcounter=#4%
- \advance\scratchcounter by -1
+ \advance\scratchcounter by -1
%\sanitizePDFstring#3\to\bookmarktext
- \doPDFbookmark level #1 n #2 text {\bookmarktext}
- page {\the\scratchcounter} open #5
+ \doPDFbookmark level #1 n #2 text {\bookmarktext}
+ page {\the\scratchcounter} open #5
\egroup}
-%D The next section of this module is dedicated to form
-%D support. These macros are complicated by the fact that
-%D cloning is possible.
+%D The next section of this module is dedicated to form
+%D support. These macros are complicated by the fact that
+%D cloning is possible.
%D \macros
%D {FDFflag...,FDFplus...}
-%D
+%D
%D The \type{/FT} key determines the type of field: text,
%D button or choice. The latter two come in several disguises,
%D which are set by flipping bits in the \type{/Ff}. Other bits
@@ -507,25 +534,25 @@
\def\FDFflagEdit {262144} % 19
%D The next bits (watch how strange the bits are organized)
-%D take care of the states:
+%D take care of the states:
-\def\FDFflagReadOnly {1} % 1
-\def\FDFflagRequired {2} % 2
-\def\FDFflagNoExport {4} % 3
-\def\FDFflagPassword {8192} % 14
-\def\FDFflagSort {524288} % 20
+\def\FDFflagReadOnly {1} % 1
+\def\FDFflagRequired {2} % 2
+\def\FDFflagNoExport {4} % 3
+\def\FDFflagPassword {8192} % 14
+\def\FDFflagSort {524288} % 20
-%D There is a second, again bitset oriented, \type{/F} flag:
+%D There is a second, again bitset oriented, \type{/F} flag:
\def\FDFplusInvisible {1} % 1
-\def\FDFplusHidden {2} % 2
-\def\FDFplusPrintable {4} % 3
+\def\FDFplusHidden {2} % 2
+\def\FDFplusPrintable {4} % 3
%D \macros
%D {setFDFswitches}
%D
-%D The non||type bits are mapped onto user||interface
-%D swithes, to be used later on:
+%D The non||type bits are mapped onto user||interface
+%D swithes, to be used later on:
\def\@@FDFflag{FDFflag}
\def\@@FDFplus{FDFplus}
@@ -539,16 +566,16 @@
\letvalue {\@@FDFplus\v!verborgen}=\FDFplusHidden
\letvalue {\@@FDFplus\v!printbaar}=\FDFplusPrintable
-%D A set of switches is collected into the flags we mentioned
-%D before by the next macro (we don't handle negations yet,
+%D A set of switches is collected into the flags we mentioned
+%D before by the next macro (we don't handle negations yet,
%D but do take care of redundancy):
\def\FDFflag{0}
\def\FDFplus{0}
\def\setFDFswitches[#1]%
- {\bgroup
- \!!counta=0
+ {\bgroup
+ \!!counta=0
\!!countb=0
\def\docommando##1%
{\doifsomething{##1}
@@ -564,7 +591,7 @@
%D \macros
%D {setFDFvalues}
%D
-%D Menu items are passed as an array of \type{(string)}'s and
+%D Menu items are passed as an array of \type{(string)}'s and
%D the content of this array is build with:
\let\FDFvalues\empty
@@ -580,12 +607,12 @@
\@EA\processcommalist\@EA[#1]\docommando}
%D This macro accepts comma separated \type{visual=>result}
-%D pairs.
+%D pairs.
%D \macros
%D {setFDFalignment}
-%D
-%D Text and line fields can be entered and showed in three
+%D
+%D Text and line fields can be entered and showed in three
%D alternative alingments, indicated by a digit:
\def\FDFalign{0}
@@ -593,22 +620,22 @@
\def\setFDFalignment[#1]%
{\processaction
[#1]
- [ \v!links=>\edef\FDFalign{2}, % raggedleft
- \v!midden=>\edef\FDFalign{1}, % raggedcenter
+ [ \v!links=>\edef\FDFalign{2}, % raggedleft
+ \v!midden=>\edef\FDFalign{1}, % raggedcenter
\v!rechts=>\edef\FDFalign{0}]} % raggedright
%D \macros
%D {setFDFattributes}
-%D
+%D
%D The weak part of (at least version 2.1 \PDF) is that only
%D default fonts are handled well. Another restriction is that
%D the encoding vector must be the standard \PDF\ document one.
%D Although the \PDF\ reference explictly states that one could
-%D use the normal text operators, leading is not yet handled.
+%D use the normal text operators, leading is not yet handled.
%D
-%D For the moment the current \CONTEXT\ font is mapped onto
-%D one best suitable default font. The color attribute is
-%D less problematic and is directly derived from the \CONTEXT\
+%D For the moment the current \CONTEXT\ font is mapped onto
+%D one best suitable default font. The color attribute is
+%D less problematic and is directly derived from the \CONTEXT\
%D color.
\def\FDFattributes{/Helv 12 Tf 0 g 14.4 TL}
@@ -634,7 +661,7 @@
{\doifdefinedelse{FDF\fontstyle}
{\xdef\FDFattributes{\getvalue{FDF\fontstyle}}}
{\xdef\FDFattributes{\FDFrm}}}%
- \doglobal\addtocommalist\FDFattributes\FDFusedfonts
+ \doglobal\addtocommalist\FDFattributes\FDFusedfonts
\xdef\FDFattributes% move up with "x.y Ts"
{/\FDFattributes\space\size\space Tf\space\PDFcolor{#2}}%
\doifelsenothing{#3}
@@ -650,10 +677,10 @@
%D \macros
%D {setFDFactions}
-%D
+%D
%D Depending on the type of the field, one can assign
%D \JAVASCRIPT\ code to a mouse event or keystroke. The next
-%D preparation macro shows what events are handled.
+%D preparation macro shows what events are handled.
\let\FDFactions\empty
@@ -671,11 +698,11 @@
\fi
\setFDFaction A#2}% mouseup % becomes U !
-%D The event handler becomes something:
-%D
+%D The event handler becomes something:
+%D
%D \starttypen
-%D /AA << /D << /S ... >> ... /C << /S ... >>
-%D /A << /S /JavaScript /JS (...) >>
+%D /AA << /D << /S ... >> ... /C << /S ... >>
+%D /A << /S /JavaScript /JS (...) >>
%D \stoptypen
\def\setFDFaction#1#2%
@@ -691,7 +718,7 @@
\xdef\sanitizedJScode{\sanitizedJScode\space\JScode}}
{\invalidreference{##1}}}
{\unknownreference{##1}}}%
- \@EA\processcommalist\@EA[#2]\setFDFaction % one level expansion
+ \@EA\processcommalist\@EA[#2]\setFDFaction % one level expansion
\ifx\sanitizedJScode\empty \else
\xdef\FDFactions%
{\FDFactions /#1 << /S /JavaScript /JS (\sanitizedJScode) >> }%
@@ -701,15 +728,15 @@
%D \macros
%D {testFDFactions}
%D
-%D This rather confusion prone series of script can be tested
+%D This rather confusion prone series of script can be tested
%D with:
-%D
+%D
%D \starttypen
%D \testFDFactions
%D \stoptypen
-%D
-%D which simply redefined the previous macro to one that prints
-%D a message to the console.
+%D
+%D which simply redefined the previous macro to one that prints
+%D a message to the console.
\def\testFDFactions%
{\def\setFDFaction##1##2%
@@ -718,27 +745,39 @@
\edef\FDFactions%
{\FDFactions /##1 << /S /JavaScript /JS (\sanitizedJScode) >> }}}
-%D \macros
+%D \macros
+%D {doFDFregistercalculationset}
+%D
+%D There is at most one calculation order list, which defines
+%D the order in which fields are calculated.
+
+\let\PDFcalculationset\empty
+
+\def\doFDFregistercalculationset#1%
+ {\def\PDFcalculationset{#1}}
+
+%D \macros
%D {registerFDFobject,everylastshipout}
%D
-%D Officially one needs to embed some general datastructures
-%D that tell the viewer what fields are present in the file, as
+%D Officially one needs to embed some general datastructures
+%D that tell the viewer what fields are present in the file, as
%D well as what resources they use. The next mechanism does that
-%D job automatically when one registers the field.
+%D job automatically when one registers the field.
\def\flushFDFnames%
{\ifbuildFDFdictionary
\ifx\FDFcollection\empty\else
- \ifbuildFDFencodingvector
- \doPDFdictionaryobject class FDF name local:encodingvector data
+ \ifbuildFDFencodingvector
+ \doPDFdictionaryobject class FDF name local:encodingvector data
\FDFencodingvector
\fi
\defineFDFfonts
\doPDFarrayobject class FDF name local:fields data \FDFcollection
\doPDFgetobjectreference{FDF}{local:fields}\PDFobjectreference
- \doPDFdictionaryobject class FDF name local:acroform data
+ \doPDFdictionaryobject class FDF name local:acroform data
{/Fields \PDFobjectreference\space
- /DR << /Font << \FDFfonts >> >>
+ \doFDFiffieldset\PDFcalculationset{/CO [\doFDFgetfieldset\PDFcalculationset]}
+ /DR << /Font << \FDFfonts >> >>
/DA (/Helv 10 Tf 0 g)}%
\doPDFgetobjectreference{FDF}{local:acroform}\PDFobjectreference
\doPDFaddtocatalog
@@ -767,8 +806,8 @@
%D ifbuildFDFdictionary,
%D ifbuildFDFencodingvector}
%D
-%D Another datastruture concerns the fonts used. We only
-%D define the fonts we use.
+%D Another datastruture concerns the fonts used. We only
+%D define the fonts we use.
\newif\ifbuildFDFdictionary \buildFDFdictionarytrue
\newif\ifbuildFDFencodingvector \buildFDFencodingvectortrue
@@ -778,15 +817,15 @@
\processcommacommand[\FDFusedfonts]\defineFDFfont}
\def\defineFDFfont#1%
- {\ifbuildFDFencodingvector
+ {\ifbuildFDFencodingvector
\doPDFgetobjectreference{FDF}{local:encodingvector}\PDFobjectreference
\fi
- \doPDFdictionaryobject class FDF name local:#1 data
- {/Type /Font
- /Subtype /Type1
+ \doPDFdictionaryobject class FDF name local:#1 data
+ {/Type /Font
+ /Subtype /Type1
/Name /#1
\ifbuildFDFencodingvector /Encoding \PDFobjectreference\space\fi
- /BaseFont /\getvalue{FDFname#1}}%
+ /BaseFont /\getvalue{FDFname#1}}%
\doPDFgetobjectreference{FDF}{local:#1}\PDFobjectreference
\edef\FDFfonts{\FDFfonts \space/#1 \PDFobjectreference}}
@@ -803,56 +842,56 @@
\def\FDFnameCour {Courier}
\def\FDFnameCoBo {Courier-Bold}
\def\FDFnameCoOb {Courier-Oblique}
-\def\FDFnameCoBO {Courier-BoldOblique}
+\def\FDFnameCoBO {Courier-BoldOblique}
%D And a big one:
\def\FDFencodingvector
- {/Type /Encoding
- /Differences
- [ 24 /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek
- /ring /tilde
- 39 /quotesingle
- 96 /grave
- 128 /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin
- /fraction /guilsinglleft /guilsinglright /minus /perthousand
+ {/Type /Encoding
+ /Differences
+ [ 24 /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek
+ /ring /tilde
+ 39 /quotesingle
+ 96 /grave
+ 128 /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin
+ /fraction /guilsinglleft /guilsinglright /minus /perthousand
/quotedblbase /quotedblleft /quotedblright /quoteleft
- /quoteright /quotesinglbase /trademark /fi /fl /Lslash /OE
- /Scaron /Ydieresis /Zcaron /dotlessi /lslash /oe /scaron
- /zcaron
+ /quoteright /quotesinglbase /trademark /fi /fl /Lslash /OE
+ /Scaron /Ydieresis /Zcaron /dotlessi /lslash /oe /scaron
+ /zcaron
164 /currency
- 166 /brokenbar
+ 166 /brokenbar
168 /dieresis /copyright /ordfeminine
- 172 /logicalnot /.notdef /registered /macron /degree /plusminus
- /twosuperior /threesuperior /acute /mu
+ 172 /logicalnot /.notdef /registered /macron /degree /plusminus
+ /twosuperior /threesuperior /acute /mu
183 /periodcentered /cedilla /onesuperior /ordmasculine
- 188 /onequarter /onehalf /threequarters 192 /Agrave /Aacute
- /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave
- /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex
- /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde
- /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
- /Udieresis /Yacute /Thorn /germandbls /agrave /aacute
- /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave
+ 188 /onequarter /onehalf /threequarters 192 /Agrave /Aacute
+ /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave
+ /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex
+ /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde
+ /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
+ /Udieresis /Yacute /Thorn /germandbls /agrave /aacute
+ /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave
/eacute /ecircumflex /edieresis /igrave /iacute /icircumflex
/idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde
- /odieresis /divide /oslash /ugrave /uacute /ucircumflex
+ /odieresis /divide /oslash /ugrave /uacute /ucircumflex
/udieresis /yacute /thorn /ydieresis ]}
-%D \macros
+%D \macros
%D {currentFDFmode,currentFDFparent,currentFDFkids,currenrFDFroot}
%D
-%D There are three more quasi global interfacing variables
-%D that need to be set.
+%D There are three more quasi global interfacing variables
+%D that need to be set.
\let\currentFDFmode =\fieldlonermode
-\let\currentFDFkids =\empty
-\let\currentFDFparent=\empty
-\let\currentFDFroot =\empty
+\let\currentFDFkids =\empty
+\let\currentFDFparent=\empty
+\let\currentFDFroot =\empty
%D \macros
%D {dosetfieldstatus}
%D
-%D And here comes the special that deals with them.
+%D And here comes the special that deals with them.
\definespecial\dosetfieldstatus#1#2#3#4%
{\chardef\currentFDFmode=#1%
@@ -863,38 +902,38 @@
%D \macros
%D {dosetuppageview}
%D
-%D Because this command will seldom be called, we can permit
-%D slow action processing. We need three settings, one for
-%D direct \PDF\ inclusion, the other as \PDFTEX\ keyword, an
-%D a last one for form. All determine in what way the
-%D screen is adapted when going to a destination. Watch the
-%D space.
+%D Because this command will seldom be called, we can permit
+%D slow action processing. We need three settings, one for
+%D direct \PDF\ inclusion, the other as \PDFTEX\ keyword, an
+%D a last one for form. All determine in what way the
+%D screen is adapted when going to a destination. Watch the
+%D space.
\def\PDFpageviewkey{ fit}
\def\PDFpageviewwrd{ /Fit}
-\def\PDFpageview {/View [\PDFpageviewwrd] }
+\def\PDFpageview {/View [\PDFpageviewwrd] }
\definespecial\dosetuppageview#1%
{%\processaction
% [#1]
% [\v!passend=>\def\PDFpageviewkey{ fit}%
% \def\PDFpageviewwrd{ /Fit},
- % \v!breedte=>\def\PDFpageviewkey{ fith}% % watch the v-h
+ % \v!breedte=>\def\PDFpageviewkey{ fith}% % watch the v-h
% \def\PDFpageviewwrd{ /FitH}, % swapping here
- % \v!hoogte=>\def\PDFpageviewkey{ fitv}% % and here and
+ % \v!hoogte=>\def\PDFpageviewkey{ fitv}% % and here and
% \def\PDFpageviewwrd{ /FitV}, % here too
% \v!geen=>\def\PDFpageviewkey{ xyz}%
% \def\PDFpageviewwrd{ /XYZ 0 0 0},
% \s!unknown=>\def\PDFpageviewkey{ fitv}%
- % \def\PDFpageviewwrd{ /FitV}]%
- }%\edef\PDFpageview{/View [\PDFpageviewwrd] }}
+ % \def\PDFpageviewwrd{ /FitV}]%
+ }%\edef\PDFpageview{/View [\PDFpageviewwrd] }}
-%D \macros
+%D \macros
%D {setFDFkids}
%D
-%D Clones as well as radiofields (which themselves can have
-%D cloned components) need a list fo kids. The next macro
-%D builds one.
+%D Clones as well as radiofields (which themselves can have
+%D cloned components) need a list fo kids. The next macro
+%D builds one.
\def\setFDFkids[#1][#2]% tag commalist
{\let\FDFkids\empty
@@ -903,15 +942,15 @@
\edef\FDFkids{\FDFkids\PDFobjectreference\space}}%
\@EA\processcommalist\@EA[#2]\docommando}
-%D \macros
+%D \macros
%D {doFDFpresetlinefield,doFDFpresettextfield,
%D doFDFpresetchoicefield,doFDFpresetpopupfield,doFDFpresetcombofield,
%D doFDFpresetpushfield,doFDFpresetcheckfield,
%D doFDFpresetradiofield,doFDFpresetradiorecord}
-%D
+%D
%D I would say: read the \PDF\ reference manual first and see
%D what happens here next. Lucky us that they have so much in
-%D common.
+%D common.
\def\doFDFpresetlinefield#1#2#3#4#5#6#7#8#9%
{\bgroup
@@ -921,7 +960,7 @@
\setFDFactions[#9]%
\ifcase\currentFDFmode
\doPDFannotationobject class FDF name #1 width #2 height #3 data
- {/Subtype /Widget /T (#1) /FT /Tx
+ {/Subtype /Widget /T (#1) /FT /Tx
/MaxLen \ifcase0#5 1000 \else#5 \fi
/DV (#4) /V ()
/Ff \FDFflag\space
@@ -934,7 +973,7 @@
\or
\setFDFkids[kids:][\currentFDFkids]%
\doPDFdictionaryobject class FDF name #1 data
- {/T (#1) /FT /Tx
+ {/T (#1) /FT /Tx
/MaxLen \ifcase0#5 1000 \else#5 \fi
/Kids [\FDFkids]
/DV (#4) /V ()
@@ -949,7 +988,7 @@
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
- {/Subtype /Widget
+ {/Subtype /Widget
/Parent \PDFobjectreference
/Ff \FDFflag\space
/F \FDFplus\space
@@ -961,7 +1000,7 @@
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
- {/Subtype /Widget
+ {/Subtype /Widget
/Parent \PDFobjectreference
/F \FDFplus}%
\fi
@@ -978,8 +1017,8 @@
\setFDFactions[#8]%
\ifcase\currentFDFmode
\doPDFannotationobject class FDF name #1 width #2 height #3 data
- {/Subtype /Widget
- /T (#1) /FT /Ch
+ {/Subtype /Widget
+ /T (#1) /FT /Ch
/DV (#4) /V ()
/Ff \FDFflag\space
/F \FDFplus\space
@@ -991,7 +1030,7 @@
\or
\setFDFkids[kids:][\currentFDFkids]%
\doPDFdictionaryobject class FDF name #1 data
- {/T (#1) /FT /Ch
+ {/T (#1) /FT /Ch
/Kids [\FDFkids]
/DV (#4) /V ()
/Ff \FDFflag\space
@@ -1005,7 +1044,7 @@
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
- {/Subtype /Widget
+ {/Subtype /Widget
/Parent \PDFobjectreference
/Ff \FDFflag\space
/F \FDFplus\space
@@ -1016,7 +1055,7 @@
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
- {/Subtype /Widget
+ {/Subtype /Widget
/Parent \PDFobjectreference
/F \FDFplus}%
\fi
@@ -1038,18 +1077,18 @@
\doFDFappearance{On}{#6}%
\doFDFdefault{#6}{#4}%
\doPDFannotationobject class FDF name #1 width #2 height #3 data
- {/Subtype /Widget /T (#1) /FT /Btn
+ {/Subtype /Widget /T (#1) /FT /Btn
\ifFDFvalues /DV (\FDFdefault) /V ()\fi
/Ff \FDFflag\space
/F \FDFplus\space
\FDFappearance\space
\FDFactions}%
\registerFDFobject{#1}%
- \or
+ \or
\doFDFdefault{#6}{#4}%
\setFDFkids[kids:][\currentFDFkids]%
\doPDFdictionaryobject class FDF name #1 data
- {/T (#1) /FT /Btn
+ {/T (#1) /FT /Btn
/Kids [\FDFkids]
\ifFDFvalues /DV (\FDFdefault) /V ()\fi
/Ff \FDFflag\space
@@ -1062,7 +1101,7 @@
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
- {/Subtype /Widget
+ {/Subtype /Widget
/Parent \PDFobjectreference\space
/Ff \FDFflag\space
/F \FDFplus\space
@@ -1074,7 +1113,7 @@
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
- {/Subtype /Widget
+ {/Subtype /Widget
/Parent \PDFobjectreference\space
/F \FDFplus\space
\FDFappearance}%
@@ -1091,6 +1130,7 @@
\def\doFDFpresetradiofield#1#2#3#4#5#6#7%
{\bgroup
+ \FDFvaluestrue
\setFDFswitches[#4]%
\setFDFactions[#7]%
\ifcase\currentFDFmode
@@ -1117,7 +1157,7 @@
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
- {/Subtype /Widget
+ {/Subtype /Widget
/Parent \PDFobjectreference\space
/F \FDFplus\space
\FDFappearance\space
@@ -1127,22 +1167,22 @@
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
- {/Subtype /Widget
+ {/Subtype /Widget
/Parent \PDFobjectreference\space
/F \FDFplus\space
\FDFappearance\space}
\fi
\egroup}
-\def\doFDFpresetradiorecord#1#2#3#4#5%
+\def\doFDFpresetradiorecord#1#2#3#4#5%
{\bgroup
\setFDFswitches[Radio,NoToggleToOff,#3]%
\setFDFkids[][#4]%
\setFDFactions[#5]%
\doPDFdictionaryobject class FDF name #1 data
- {/Subtype /Widget /FT /Btn /T (#1) /Rect [0 0 0 0]
+ {/Subtype /Widget /FT /Btn /T (#1) /Rect [0 0 0 0]
/DV /#2 % /V ()
- /H /N
+ /H /N
/Ff \FDFflag\space /F \FDFplus\space /Kids [\FDFkids]
\FDFactions}%
\egroup}
@@ -1150,77 +1190,76 @@
%D At the cost of some more references, we can save bytes,
%D by sharing appearance dictionaries. Surprise:
-\def\dodoFDFappearance#1#2%
+\def\dodoFDFappearance#1#2%
{\ifx#2\empty\else
\dogetcommacommandelement1\from#2\to\commalistelement
\ifx\commalistelement\empty\else
\doPDFgetobjectreference{SYM}\commalistelement\PDFobjectreference
- \edef\N{\N /#1 \PDFobjectreference\space}%
+ \edef\N{\ifFDFvalues\N /#1 \fi\PDFobjectreference\space}%
\fi
\dogetcommacommandelement2\from#2\to\commalistelement
\ifx\commalistelement\empty\else
\doPDFgetobjectreference{SYM}\commalistelement\PDFobjectreference
- \edef\R{\R /#1 \PDFobjectreference\space}%
+ \edef\R{\ifFDFvalues\R /#1 \fi\PDFobjectreference\space}%
\fi
\dogetcommacommandelement3\from#2\to\commalistelement
\ifx\commalistelement\empty\else
\doPDFgetobjectreference{SYM}\commalistelement\PDFobjectreference
- \edef\D{\D /#1 \PDFobjectreference\space}%
+ \edef\D{\ifFDFvalues\D /#1 \fi\PDFobjectreference\space}%
\def\FDFappearance{/H /P}%
\fi
\fi}
-\def\redoFDFappearance#1%
+\def\redoFDFappearance#1%
{\ifx#1\empty\else
- \dogetcommacommandelement1\from#1\to\commalistelement
- \dogetcommacommandelement3\from\commalistelement\to\commalistelement
+ \dogetcommacommandelement3\from#1\to\commalistelement
\ifx\commalistelement\empty\else
\def\FDFappearance{/H /P}%
\fi
\fi}
-\def\doFDFappearance#1#2%
+\def\doFDFappearance#1#2%
{\dogetcommacommandelement1\from#2,\to\yes
\dogetcommacommandelement2\from#2,\to\no
\def\FDFappearance{/H /N}%
- \doifobjectfoundelse{FDF}{ap:#1:\yes:\no}
+ \doifobjectfoundelse{FDF}{ap:#1:\yes:\no}
{\redoFDFappearance\yes
\redoFDFappearance\no}
- {\presetobject{FDF}{ap:#1:\yes:\no}% funny hack
+ {\presetobject{FDF}{ap:#1:\yes:\no}% funny hack
\let\N\empty\let\R\empty\let\D\empty
\dodoFDFappearance{#1}\yes
\dodoFDFappearance{Off}\no
- \doPDFdictionaryobject class FDF name {ap:#1:\yes:\no} data
- {\ifx\N\empty\else /N <<\N>>\fi
- \ifx\R\empty\else /R <<\R>>\fi
- \ifx\D\empty\else /D <<\D>>\fi}}%
+ \doPDFdictionaryobject class FDF name {ap:#1:\yes:\no} data
+ {\ifx\N\empty\else/N \ifFDFvalues<<\N>>\else\N\fi\fi
+ \ifx\R\empty\else/R \ifFDFvalues<<\R>>\else\R\fi\fi
+ \ifx\D\empty\else/D \ifFDFvalues<<\D>>\else\D\fi\fi}}%
\doPDFgetobjectreference{FDF}{ap:#1:\yes:\no}\PDFobjectreference
\edef\FDFappearance{\FDFappearance /AP \PDFobjectreference}}
-\def\doFDFdefault#1#2%
+\def\doFDFdefault#1#2%
{\dogetcommacommandelement1\from#1,\to\commalistelement
\dogetcommacommandelement1\from\commalistelement\to\commalistelement
\doifelse{\commalistelement}{#2} % kan ook met \ifx
{\def\FDFdefault{On}}{\def\FDFdefault{Off}}}
-%D The three appearances {\em normal}, \type{roll over} and
-%D \type{push down} are passed as comma separated triplets,
+%D The three appearances {\em normal}, \type{roll over} and
+%D \type{push down} are passed as comma separated triplets,
%D that is, the second argument can look like:
-%D
+%D
%D \starttypen
%D {yes,ok,fine},{no,rubish,awful}
%D \stoptypen
%D \macros
%D {doFDFdefinefieldset,doFDFgetfieldset,doFDFiffieldset}
-%D
-%D Field sets, the ones we use in submitting and resetting
+%D
+%D Field sets, the ones we use in submitting and resetting
%D fields, are implemented using the next low level specials:
-%D
+%D
%D \starttypen
%D \doFDFdefinefieldset{TAG}{name,name,...}
%D \doFDFgetfieldset{TAG}
-%D \doFDFiffieldset{TAG}
+%D \doFDFiffieldset{TAG}{sequence}
%D \stoptypen
\def\doFDFdefinefieldset#1#2% tag commalist
@@ -1228,14 +1267,14 @@
\def\docommando##1%
{\doPDFgetobjectreference{FDF}{##1}\PDFobjectreference
\edef\FDFfieldset{\FDFfieldset\PDFobjectreference\space}}%
- \processcommacommand[#2]\docommando % nb: command
+ \processcommacommand[#2]\docommando % nb: command
\setevalue{FDF:set:#1}{\FDFfieldset}}
\def\doFDFgetfieldset#1%
{\getvalue{FDF:set:#1}}
-\def\doFDFiffieldset#1%
- {\ifundefined{FDF:set:#1}\else}
+\def\doFDFiffieldset#1#2%
+ {\ifundefined{FDF:set:#1}\else#2\fi}
%D In the goto specials we took care of secondary references.
%D Here we define the macros used.
@@ -1262,58 +1301,58 @@
%D {loadFDFfields, showFDFfields,
%D getFDFfield, setFDFfield}
%D
-%D Once filled in, we can export or submit the field in the
+%D Once filled in, we can export or submit the field in the
%D \FDF\ file format. Such a file can be loaded by
%D
%D \starttypen
%D \loadFDFfields{fiel-ini}
%D \stoptypen
%D
-%D or inspected by
+%D or inspected by
%D
%D \starttypen
%D \showFDFfields{fiel-ini}
%D \stoptypen
%D
-%D After both commands, one can use
+%D After both commands, one can use
%D
%D \starttypen
%D \getFDFfield{name}
%D \setFDFfield{name}{value}
%D \stoptypen
%D
-%D to inspect and overrule the data.
-%D
+%D to inspect and overrule the data.
+%D
%D By default \CONTEXT\ calls the perl script \type{fdf2tex}.
%D This script reads the \type{fdf} file and produces a file
%D named \type{filename.fdt}. If one disables the call to this
-%D script, by saying:
-%D
+%D script, by saying:
+%D
%D \starttypen
%D \runFDFconverterfalse
%D \stoptypen
-%D
-%D or when \CONTEXT\ cannot find the \type{fdt} file, it tries
-%D to interpret the \type{fdf} file directly. Both mechanisms
-%D are rather crude.
+%D
+%D or when \CONTEXT\ cannot find the \type{fdt} file, it tries
+%D to interpret the \type{fdf} file directly. Both mechanisms
+%D are rather crude.
\newif\ifrunFDFconverter \runFDFconvertertrue
%D The \PERL\ script produces a file formatted as:
-%D
+%D
%D \starttypen
%D \beginFDFobject
-%D \beginFDFdata
+%D \beginFDFdata
%D \beginFDFfields
%D \FDFfield[name=,value=]
%D \endFDFfields
-%D \endFDFdata
+%D \endFDFdata
%D \endFDFobject
%D \stoptypen
%D
-%D One reason for using key value pairs is that we cannot be
-%D sure or the order in which the name and value are given
-%D (actually the reverse).
+%D One reason for using key value pairs is that we cannot be
+%D sure or the order in which the name and value are given
+%D (actually the reverse).
\def\PERLloadFDFfields#1%
{\bgroup
@@ -1332,48 +1371,48 @@
\egroup}
%D The next macro does the same job, but now in the \TEX\ way
-%D of doing things. Easy eh?
+%D of doing things. Easy eh?
\bgroup
-\catcode`\/=\@@other
+\catcode`\/=\@@other
\global\let\normalslash=/
-\catcode`\/=\@@escape
+\catcode`\/=\@@escape
\gdef\TEXloadFDFfields#1%
{\bgroup
\setbox0=\hbox
{\global\let\allFDFfields\empty
- \scratchcounter=0
+ \scratchcounter=0
\escapechar=-1
- \catcode`\/=\@@escape
+ \catcode`\/=\@@escape
\catcode`\(=\@@begingroup
\catcode`\)=\@@endgroup
\catcode`\%=\@@letter
\let/A =\relax \let/AS =\relax \let/Kids=\relax \let/Fields=\relax
\let/F =\relax \let/ID =\relax \let/SetF=\relax \let/setFf =\relax
- \let/Ff=\relax \let/Opt=\relax \let/ClrF=\relax \let/ClrFf =\relax
+ \let/Ff=\relax \let/Opt=\relax \let/ClrF=\relax \let/ClrFf =\relax
\let/AP=\relax \let/FDF=\relax \let/Root=\relax
- \def/T##1{\check\Title{##1}}
+ \def/T##1{\check\Title{##1}}
\def/V{\bgroup\catcode`\/=\@@other\futurelet\next/doV}
\def/doV{\ifx\next\normalslash\@EA/doVb\else\@EA/doVa\fi}
\def/doVa##1{\egroup\check\Value{##1}}
\def/doVb##1##2 {\egroup\check\Value{##2}} % watch the space
\def\check##1##2%
{\def##1{##2}
- \advance\scratchcounter by 1
+ \advance\scratchcounter by 1
\ifodd\scratchcounter \else
\convertcommand\Title\to\asciiA
\global\setFDFfield{\asciiA}{\Value}
\doglobal\addtocommalist\Title\allFDFfields
- \fi}
+ \fi}
\ReadFile{#1.fdf}}%
\egroup}
\egroup
-%D Whatever mechanism is used, the next macros can be used to
-%D fetch the values.
+%D Whatever mechanism is used, the next macros can be used to
+%D fetch the values.
\def\getFDFfield#1%
{\getvalue{FDFfield::#1}}
@@ -1381,7 +1420,7 @@
\def\setFDFfield#1#2%
{\setevalue{FDFfield::#1}{#2}}
-%D Of course the fields are only present when the file is
+%D Of course the fields are only present when the file is
%D loaded.
\def\loadFDFfields#1%
@@ -1397,18 +1436,19 @@
\processcommacommand[\allFDFfields]\docommando
\egroup}
-%D \macros
+%D \macros
%D {sanitizePDFdocencoding}
%D
%D We already dealt with the encoding vector. Conversion from
%D \TEX\ \ASCII\ encoding to the other one, is accomplished by
-%D the next few macros. Wach out: we don't group here.
+%D the next few macros. Wach out: we don't group here.
-%D This will be reimplemented using the mapping mechsnism.
+%D This will be reimplemented using the mapping mechanism.
\long\def\sanitizePDFdocencoding#1\to#2%
{\enablePDFcrlf
\enablePDFdocencoding
+\honorunexpanded
\edef#2{#1}}
\bgroup
@@ -1416,76 +1456,34 @@
\gdef\enablePDFcrlf%
{\def\\{\string\r}%
\def\par{\\\\}%
- \catcode`\^^M=\@@active
+ \catcode`\^^M=\@@active%
\let^^M=\\}
\egroup
-% \def\enablePDFdocencoding%
-% {\def\"##1{\if##1A\string ^^c4\else\if##1a\string ^^e4\else
-% \if##1E\string ^^cb\else\if##1e\string ^^eb\else
-% \if##1I\string ^^cf\else\if##1i\string ^^ef\else
-% \if##1O\string ^^d6\else\if##1o\string ^^f6\else
-% \if##1U\string ^^dc\else\if##1u\string ^^fc\else
-% \if##1y\string ^^ff\else
-% \string\"##1%
-% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
-% \def\'##1{\if##1A\string ^^c1\else\if##1a\string ^^e1\else
-% \if##1E\string ^^c9\else\if##1e\string ^^e9\else
-% \if##1I\string ^^cd\else\if##1i\string ^^ed\else
-% \if##1O\string ^^d3\else\if##1o\string ^^f3\else
-% \if##1U\string ^^da\else\if##1u\string ^^fa\else
-% \if##1Y\string ^^dd\else\if##1y\string ^^fd\else
-% \string\'##1%
-% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
-% \def\^##1{\if##1A\string ^^c2\else\if##1a\string ^^e2\else
-% \if##1E\string ^^ca\else\if##1e\string ^^ea\else
-% \if##1I\string ^^ce\else\if##1i\string ^^ee\else
-% \if##1O\string ^^d4\else\if##1o\string ^^f4\else
-% \if##1U\string ^^db\else\if##1u\string ^^fb\else
-% \string\^##1%
-% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
-% \def\`##1{\if##1A\string ^^c0\else\if##1a\string ^^e0\else
-% \if##1E\string ^^c8\else\if##1e\string ^^e8\else
-% \if##1I\string ^^cc\else\if##1i\string ^^ec\else
-% \if##1O\string ^^d2\else\if##1o\string ^^f2\else
-% \if##1U\string ^^d9\else\if##1u\string ^^f9\else
-% \string\`##1%
-% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
-% \def\~##1{\if##1A\string ^^c3\else\if##1a\string ^^e3\else
-% \if##1N\string ^^d1\else\if##1n\string ^^f1\else
-% \if##1O\string ^^d5\else\if##1o\string ^^f5\else
-% \string\~##1%\string
-% \fi\fi\fi\fi\fi\fi}%
-% \def\,##1{\if##1C\string ^^c7\else\if##1c\string ^^e7\else
-% \string\,##1%
-% \fi\fi}%
-% \def\<##1{\if##1<\string ^^ab\else
-% \string\<##1%
-% \fi}%
-% \def\>##1{\if##1>\string ^^bb\else
-% \string\>##1%
-% \fi}%
-% \def\AE{\string ^^c6}\def\ae{\string ^^e6}%
-% \def\oA{\string ^^c5}\def\oa{\string ^^e5}%
-% \def\oe{\string ^^9c}\def\ss{\string ^^df}}%
-
-\def\enablePDFdocencoding%
- {\setencoding[pdfdoc]\simplifycommands}
+\def\enablePDFdocencoding%
+ {\reducetocoding[pdfdoc]\simplifycommands}
%D A bit out of place, but useful:
-\newevery\everysetfield\relax
+\newevery\everysetfield\relax
-\appendtoks \enablePDFcrlf \to \everysetfield
\appendtoks \enablePDFdocencoding \to \everysetfield
+\appendtoks \enablePDFcrlf \to \everysetfield
%D \macros
%D {doPDFinsertcomment}
-%D
-%D An example its use is the next special, one that deals with
-%D text annotations.
+%D
+%D An example its use is the next special, one that deals with
+%D text annotations.
-\long\def\doPDFinsertcomment#1#2#3#4#5#6% title width height color open data
+\def\PDFcommentNew {/Insert}
+\def\PDFcommentBalloon {/Comment}
+\def\PDFcommentAddition {/NewParagraph}
+\def\PDFcommentHelp {/Help}
+\def\PDFcommentParagraph {/Paragraph}
+\def\PDFcommentKey {/Key }
+
+\long\def\doPDFinsertcomment#1#2#3#4#5#6#7% title width height color open data
{\bgroup
\doifelsenothing{#1}
{\let\PDFidentifier\empty}
@@ -1493,36 +1491,46 @@
\doifelsenothing{#4}
{\let\PDFattributes\empty}
{\def\PDFattributes{/C \FDFcolor{#4}}}%
- \sanitizePDFdocencoding#6\to\PDFdata
- \doPDFtextannotation width #2 height #3 data
- {/Subtype /Text
- \ifcase#5 \else/Open false\fi
- /Contents (\PDFdata)
- \PDFidentifier
- \PDFattributes}%
+ \doifundefinedelse{PDFcomment#6}
+ {\let\PDFcomment\empty}
+ {\def\PDFcomment{/Name \getvalue{PDFcomment#6} }}%
+ \sanitizePDFdocencoding#7\to\PDFdata
+ \setbox\scratchbox=\vbox to #3sp
+ {\vfill
+ \doPDFannotation width #2 height #3 data
+ {/Subtype /Text
+ \ifcase#5 \else/Open false\fi
+ /Contents (\PDFdata)
+ \PDFcomment
+ \PDFidentifier
+ \PDFattributes}}%
+ \wd\scratchbox=\!!zeropoint
+ \ht\scratchbox=\!!zeropoint
+ \dp\scratchbox=\!!zeropoint
+ \box\scratchbox
\egroup}
-%D Hooked into \CONTEXT, this special supports
-%D
+%D Hooked into \CONTEXT, this special supports
+%D
%D \starttypen
%D \startcomment
%D hello beautiful\\world
%D \stopcomment
-%D
+%D
%D \startcomment[hello]
%D de \'e\'erste keer
-%D the f\'irst time
+%D the f\'irst time
%D \stopcommen
-%D
+%D
%D \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm]
-%D first
-%D
+%D first
+%D
%D second
%D \stopcommentaar
%D \stoptypen
-%D
+%D
%D So, special characters, forced linebreaks using \type{\\}
-%D and \type{\par} are handled in the appropriate way.
+%D and \type{\par} are handled in the appropriate way.
%D \macros
%D {doPDFovalbox}
@@ -1539,12 +1547,12 @@
\def\doPDFovalbox#1#2#3#4#5#6#7%
{\bgroup
\dimen0=#4sp\divide\dimen0 by 2
- \doPDFovalcalc{0} {+\dimen0}\xmin
+ \doPDFovalcalc{0}{+\dimen0}\xmin
\doPDFovalcalc{#1}{-\dimen0}\xmax
\doPDFovalcalc{#2}{-\dimen0}\ymax
\doPDFovalcalc{-#3}{+\dimen0}\ymin
\advance\dimen0 by #5sp
- \doPDFovalcalc{0} {+\dimen0}\xxmin
+ \doPDFovalcalc{0}{+\dimen0}\xxmin
\doPDFovalcalc{#1}{-\dimen0}\xxmax
\doPDFovalcalc{#2}{-\dimen0}\yymax
\doPDFovalcalc{-#3}{+\dimen0}\yymin
@@ -1554,6 +1562,9 @@
\edef\dofill{#7}%
\setbox0=\hbox
{\ifnum\dostroke\dofill>0
+ \ifPDFstrokecolor\else\ifnum\dostroke=1
+ \writestatus{\m!colors}{pdf stroke color will fail}\wait
+ \fi\fi
\PDFcode
{q
\stroke\space w
@@ -1581,25 +1592,29 @@
%D In \PDF\ there are two color states, one for strokes and one
%D for fills. This means that we have to set the color in a
%D rather redundant looking way. Unfortunately this makes the
-%D \PDF\ file much larger than needed.
+%D \PDF\ file much larger than needed. We can save few bytes
+%D by not setting the stroke color. Due to zip compression we
+%D only save a few percent.
+
+% \newif\ifPDFstrokecolor \PDFstrokecolortrue
\def\doPDFstartgraymode#1%
- {\PDFcode{#1 g #1 G}}
+ {\PDFcode{#1 g\ifPDFstrokecolor\space#1 G\fi}}
\def\doPDFstopgraymode%
- {\PDFcode{0 g 0 G}}
+ {\PDFcode{0 g\ifPDFstrokecolor\space0 G\fi}}
\def\doPDFstartrgbcolormode#1#2#3%
- {\PDFcode{#1 #2 #3 rg #1 #2 #3 RG}}
+ {\PDFcode{#1 #2 #3 rg\ifPDFstrokecolor\space#1 #2 #3 RG\fi}}
\def\doPDFstartcmykcolormode#1#2#3#4%
- {\PDFcode{#1 #2 #3 #4 k #1 #2 #3 #4 K}}
+ {\PDFcode{#1 #2 #3 #4 k\ifPDFstrokecolor\space#1 #2 #3 #4 K\fi}}
\def\doPDFstartgraycolormode#1%
- {\PDFcode{#1 g #1 G}}
+ {\PDFcode{#1 g\ifPDFstrokecolor\space#1 G\fi}}
\def\doPDFstopcolormode%
- {\PDFcode{0 g 0 G}}
+ {\PDFcode{0 g\ifPDFstrokecolor\space0 G\fi}}
%D \macros
%D {doPDFstartrotation,doPDFstoprotation}
@@ -1647,14 +1662,19 @@
%D
%D When producing output for an image setter, sometimes negative
%D output is needed.
-
+
\def\doPDFstartnegative%
- {\writestatus{system}{negative not yet supported}}
+ {\ifx\initializePDFnegative\undefined\else
+ \initializePDFnegative
+ \PDFcode{/GSnegative gs}%
+ \fi}
\def\doPDFstopnegative%
- {}
+ {\ifx\initializePDFnegative\undefined\else
+ \PDFcode{/GSpositive gs}%
+ \fi}
-%D And that was all.
+%D And that was all.
\stopspecials
diff --git a/tex/context/base/spec-ini.tex b/tex/context/base/spec-ini.tex
index aa54c63c0..8117cb8fc 100644
--- a/tex/context/base/spec-ini.tex
+++ b/tex/context/base/spec-ini.tex
@@ -1,3 +1,5 @@
+% \dogetfiguresize will be a special !
+
%D \module
%D [ file=spec-ini,
%D version=1996.01.25,
@@ -8,7 +10,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D Specials are \TEX's channel to the outside world. They make
@@ -55,6 +57,17 @@
7: unbekante Driver --
\stopmessages
+\startmessages czech library: specials
+ title: speciality
+ 1: -- nacteno
+ 2: neni dovoleno hlubsi zanoreni --
+ 3: -- je resetovano
+ 4: prikaz -- neexistuje
+ 5: nacita se definicni soubor --
+ 6: zanoreni neni dovoleno
+ 7: neznamy ovladac (driver) --
+\stopmessages
+
\startmessages dutch library: interactions
21: -- code tussengevoegd
\stopmessages
@@ -67,6 +80,10 @@
21: -- Code eingefuegt
\stopmessages
+\startmessages czech library: interactions
+ 21: -- kod vlozen
+\stopmessages
+
%D \macros
%D {everyresetspecials}
%D
@@ -174,7 +191,6 @@
%D \macros
%D {preloadspecials}
-%D {}
%D
%D The following command can be used to show the loaded list
%D of specials.
@@ -185,7 +201,6 @@
%D \macros
%D {startspecials}
-%D {}
%D
%D Every library has a unique name, which is given as the first
%D argument to \type{\startspecials}. When another library is
@@ -230,7 +245,7 @@
{\let\currentspecial\s!unknown}
{\def\currentspecial{#1}}%
\unprotect
- \addtocommalist{\currentspecial}\preloadedspecials}
+ \addtocommalist\currentspecial\preloadedspecials}
\def\startspecials%
{\pushmacro\currentspecial
@@ -243,7 +258,6 @@
%D \macros
%D {installspecial,
%D resetspecials}
-%D {}
%D
%D We have to install specials before we can define and use
%D them. The command itself is defined as a call to another
@@ -313,7 +327,6 @@
%D \macros
%D {usespecials}
-%D {}
%D
%D We use \type{\usespecials} to load a specific library.
%D This command is only permitted outside de definition part.
@@ -338,7 +351,6 @@
%D \macros
%D {executespecials}
-%D {}
%D
%D The command \type{\executespecials} is used to execute the
%D defined specials. Once a special is installed, the special
@@ -567,7 +579,6 @@
%D \macros
%D {dostartgraymode,dostopgraymode,
%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode,dostopcolormode}
-%D {}
%D
%D We start with the installation of color and grayscale
%D specials. The values are in the range 0..1 (e.g. 0.25).
@@ -594,7 +605,6 @@
%D \macros
%D {doinsertfile}
-%D {}
%D
%D Probably the most problematic special is the following
%D one. Because we want to be able to support different
@@ -611,7 +621,7 @@
%D
%D The special is implemented as \type{or}. Because
%D \DVIPSONE\ understands them all, a chain of alternatives
-%D would generate multiple courrences of the same
+%D would generate multiple occurrences of the same
%D illustration.
%D
%D When option 1 is passed, the viewers is asked to present a
@@ -620,9 +630,25 @@
\installspecial [\doinsertfile] [or] [9]
%D \macros
+%D {dogetnofinsertpages}
+%D
+%D Some file formats support more than one page, like \PDF,
+%D and for special applications, one may want to have access
+%D to the total number of pages.
+%D
+%D \starttyping
+%D \dogetnofinsertpages\nofinsertpages
+%D \stoptyping
+%D
+%D The number is available after the insert is placed,
+%D since inclusion may take place immediate when an insert is
+%D called upon.
+
+\installspecial [\dogetnofinsertpages] [or] [1]
+
+%D \macros
%D {dostartrotation,
%D dostoprotation}
-%D {}
%D
%D We support rotation with the special:
%D
@@ -639,7 +665,6 @@
%D \macros
%D {dostartscaling,
%D dostopscaling}
-%D {}
%D
%D Scaling is also supported:
%D
@@ -656,7 +681,6 @@
%D \macros
%D {dostartmirroring,
%D dostopmirroring}
-%D {}
%D
%D And indeed, mirroring is there too:
%D
@@ -672,7 +696,6 @@
%D \macros
%D {dostartnegative,
%D dostopnegative}
-%D {}
%D
%D When producing output for an image setter, negating the
%D page comes into view. Here are the tools:
@@ -683,7 +706,6 @@
%D \macros
%D {doselectfirstpaperbin,
%D doselectsecondpaperbin}
-%D {}
%D
%D Here are some very printer||specific ones. No further
%D comment.
@@ -693,7 +715,6 @@
%D \macros
%D {doovalbox}
-%D {}
%D
%D When we look at the implementation, this is a complicated
%D one. There are seven arguments.
@@ -709,9 +730,24 @@
\installspecial [\doovalbox] [or] [7]
+%D \macros
+%D {dostartclipping,dostopclipping}
+%D
+%D Clipping is implemented in such a way that an arbitrary
+%D can be fed.
+%D
+%D \starttypen
+%D \dostartclipping {pathname}{width} {height}
+%D \dostopclipping
+%D \stoptyping
+%D
+%D
+
+\installspecial [\dostartclipping] [or] [3]
+\installspecial [\dostopclipping] [or] [0]
+
%D \macros
%D {dosetupidentity}
-%D {}
%D
%D We can declare some characteristics of the document with
%D
@@ -725,7 +761,6 @@
%D \macros
%D {dosetuppaper}
-%D {}
%D
%D This special can be used to tell the driver what page size
%D to use. The special takes three arguments.
@@ -741,7 +776,6 @@
%D \macros
%D {dosetupprinter}
-%D {}
%D
%D Some drivers enable the user to specify the paper type
%D used and/or page dimensions to be taken into account.
@@ -759,10 +793,10 @@
%D \macros
%D {% dosetuppage,
%D dosetupopenaction, dosetupclosaction,
+%D dosetupopenpageaction, dosetupclospageaction,
%D dosetupinteraction,
%D dosetupscreen,
%D dosetupviewmode}
-%D {}
%D
%D Here come some obscure interactive commands. Probably the
%D specs will change with the development of the macros that
@@ -801,16 +835,17 @@
%D
%D For the moment we only support \type{fit}.
-\installspecial [\dosetupinteraction] [and] [0]
-\installspecial [\dosetupopenaction] [and] [0]
-\installspecial [\dosetupcloseaction] [and] [0]
-\installspecial [\dosetupscreen] [and] [5]
-\installspecial [\dosetuppageview] [and] [1]
+\installspecial [\dosetupinteraction] [and] [0]
+\installspecial [\dosetupopenaction] [and] [0]
+\installspecial [\dosetupcloseaction] [and] [0]
+\installspecial [\dosetupopenpageaction] [and] [0]
+\installspecial [\dosetupclosepageaction] [and] [0]
+\installspecial [\dosetupscreen] [and] [5]
+\installspecial [\dosetuppageview] [and] [1]
%D \macros
%D {dostarthide,
%D dostophide}
-%D {}
%D
%D Not every part of the screen is suitable for paper. Menus
%D for instance have no meaning on an non||interactive medium.
@@ -821,13 +856,12 @@
%D \dostophide
%D \stoptypen
-\installspecial [\dostarthide] [or] [0]
-\installspecial [\dostophide] [or] [0]
+\installspecial [\dostarthide] [or] [0]
+\installspecial [\dostophide] [or] [0]
%D \macros
%D {dostartgotolocation, dostopgotolocation,
%D dostartgotorealpage, dostopgotorealpage}
-%D {}
%D
%D The interactive real work is done by the following four
%D specials. The reason for providing the first one with both
@@ -882,7 +916,6 @@
%D \macros
%D {dostartthisislocation, dostopthisislocation,
%D dostartthisisrealpage, dostopthisisrealpage}
-%D {}
%D
%D The opposite commands of \type{\dogotosomething} have only
%D one argument:
@@ -907,7 +940,7 @@
\installspecial [\dostartthisisrealpage] [and] [1]
\installspecial [\dostopthisisrealpage] [and] [0]
-%D \macro
+%D \macros
%D {doresetgotowhereever}
%D
%D These and others need:
@@ -978,6 +1011,19 @@
\installspecial [\dostopobject] [or] [0]
\installspecial [\doinsertobject] [or] [2]
+%D \macros
+%D {doregisterfigure}
+%D
+%D Images can be objects as well and it's up to the driver to
+%D handle this. Alternative images are also up to the driver,
+%D and the next macro tells the driver that the previous image
+%D is somehow followed by another and that both have to be
+%D handled together. This is a rather fuzzy model, but for the
+%D moment it suits its purpose: low res screen versions combined
+%D with high res printable ones.
+
+\installspecial [\doregisterfigure][or] [2]
+
% %D \macros
% %D {dogetobjectreference}
% %D
@@ -994,7 +1040,6 @@
%D dostartgotoprofile, dostopgotoprofile,
%D dobeginofprofile,
%D doendofprofile}
-%D {}
%D
%D These specials are still experimental. They are not yet
%D supported by the programs the way they should be.
@@ -1034,13 +1079,14 @@
%D previous one, this special is very \PDF.
%D
%D \starttypen
-%D \dosetpagetransition{dissolve}
+%D \dosetpagetransition{dissolve}{0}
%D \stoptypen
%D
%D Transitions have symbolic names, like dissolve, box, split,
-%D blinds, wipe and glitter.
+%D blinds, wipe and glitter. The second argument determines
+%D the wait time (unless zero).
-\installspecial [\dosetpagetransition] [or] [1]
+\installspecial [\dosetpagetransition] [or] [2]
%D \macros
%D {dopresettextfield,dopresetlinefield,
@@ -1096,7 +1142,7 @@
\installspecial [\dodefinefieldset] [or] [2]
\installspecial [\dogetfieldset] [or] [1]
-\installspecial [\doiffieldset] [or] [1]
+\installspecial [\doiffieldset] [or] [2]
%D \macros
%D {dosetfieldstatus}
@@ -1118,6 +1164,17 @@
\def\fieldcopymode {3} % no \chardef here
%D \macros
+%D {doregistercalculationset}
+%D
+%D We can define a calculation order list with:
+%D
+%D \starttypen
+%D \doregistercalculationset {set identifier}
+%D \stoptypen
+
+\installspecial [\doregistercalculationset] [or] [1]
+
+%D \macros
%D {doinsertcomment}
%D
%D Not so much out ot need, but to be complete, we also
@@ -1125,10 +1182,10 @@
%D
%D \starttypen
%D \doinsertcomment
-%D {title} {width} {height} {color} {open} {data}
+%D {title} {width} {height} {color} {open} {symbol} {data}
%D \stoptypen
-\installspecial[\doinsertcomment] [and] [6]
+\installspecial[\doinsertcomment] [and] [7]
%D So far for the installation. For quite some time the
%D \CONTEXT\ way of specifying the output format has been:
@@ -1183,6 +1240,7 @@
\defineoutput [dviwindo] [dvi,ps,yy,win]
\defineoutput [dvips] [dvi,ps,tr]
\defineoutput [dviview] [dvi,ps,tr,dv]
+\defineoutput [dvipdfm] [dpm]
\defineoutput [pdftex] [tpd]
\defineoutput [pdf] [tpd]
\defineoutput [acrobat] [pdf,ps,tr] % use: [acrobat,dvipsone]
diff --git a/tex/context/base/spec-mis.tex b/tex/context/base/spec-mis.tex
index 224a3c85b..2722ee686 100644
--- a/tex/context/base/spec-mis.tex
+++ b/tex/context/base/spec-mis.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D Quite some modules in this group are dedicated to supporting
@@ -44,6 +44,34 @@
\newif\ifusepagedestinations
%D \macros
+%D {ifhighlighthyperlinks}
+%D
+%D The next switch can be used to make user hyperlinks are
+%D not highlighted when clicked on.
+
+\newif\ifhighlighthyperlinks
+
+%D \macros
+%D {ifgotonewwindow}
+%D
+%D To make the {\em goto previous jump} feature more
+%D convenient when using more than one file, it makes sense
+%D to force the viewer to open a new window for each file
+%D opened.
+
+\newif\ifgotonewwindow
+
+%D \macros
+%D {ifPDFstrokecolor}
+%D
+%D We can reduce the filesize a bit by setting the next switch
+%D to false. The amount of reduction depends on the use of
+%D color, but don't expect more than a few percent. Zip
+%D compression is already rather efficient in itself.
+
+\newif\ifPDFstrokecolor \PDFstrokecolortrue
+
+%D \macros
%D {dodoinsertfile,dofileinsertion,
%D definefileinsertion,doiffileinsertionsupported}
%D
@@ -84,6 +112,15 @@
%D second argument is a \type{{type,method}} pair and the
%D third the filename.
+%D Just in case this one is undefined (which can happen if
+%D this module is used outside \CONTEXT):
+
+\ifx\setreferencefilename\undefined
+
+ \def\setreferencefilename#1\to#2{\edef#2{#1}}
+
+\fi
+
\protect
\endinput
diff --git a/tex/context/base/spec-pdf.tex b/tex/context/base/spec-pdf.tex
index cbc5fafcb..21080bac7 100644
--- a/tex/context/base/spec-pdf.tex
+++ b/tex/context/base/spec-pdf.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% funny things: mail to yeny: "please geen auto-crlf in special"
@@ -184,6 +184,8 @@
%D \POSTSCRIPT\ drivers. We just link the movie annotation
%D handled to the file inclusion system.
+\let\currentmovie\s!unknown
+
\def\setcurrentmovie{\xdef\currentmovie}
\definefileinsertion{yy}{mov}{\doPDFinsertmov}
@@ -285,6 +287,13 @@
\definespecial\doiffieldset {\doFDFiffieldset}
%D \macros
+%D {doregistercalculationset}
+%D
+%D The calculation order is defined using:
+
+\definespecial\doregistercalculationset{\doFDFregistercalculationset}
+
+%D \macros
%D {doPDFdestination}
%D
%D Last we implement the low level pdfmark macros. The
@@ -365,6 +374,7 @@
[ /Action \lastPDFaction\space
/Rect [0 0 \width\space \height]
/Border [0 0 0]
+ \ifhighlighthyperlinks \else /H /N \fi
/Subtype /Link
/ANN
pdfmark}%
@@ -382,8 +392,6 @@
pdfmark}%
\egroup}
-\let\doPDFtextannotation=\doPDFannotation
-
\def\doPDFannotationobject class #1 name #2 width #3 height #4 data #5%
{\bgroup
\ScaledPointsToBigPoints{#3}\width
diff --git a/tex/context/base/spec-ps.tex b/tex/context/base/spec-ps.tex
index 648a11c36..2906f0e6b 100644
--- a/tex/context/base/spec-ps.tex
+++ b/tex/context/base/spec-ps.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D \macros
@@ -192,6 +192,23 @@
\definespecial\doovalbox%
{\dosomeovalbox}
+%D \macros
+%D {dostartclipping,dostopclipping}
+%D
+%D These two specials are not yet working as expected.
+
+\definespecial\dostartclipping#1#2#3%
+ {\ScaledPointsToBigPoints{#2}\width
+ \ScaledPointsToBigPoints{#3}\height
+ \grabMPclippath{#1}{0}{\width}{\height}
+ {0 0 moveto \width 0 lineto \width \height lineto 0 \height\space lineto}%
+ \special
+ {\@@insertpostscriptliteral\space
+ save newpath \MPclippath\space closepath clip}}
+
+\definespecial\dostopclipping%
+ {\special{\@@insertpostscriptliteral\space restore}}
+
\stopspecials
\endinput
diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex
index 47fedb47e..77a097cc7 100644
--- a/tex/context/base/spec-tpd.tex
+++ b/tex/context/base/spec-tpd.tex
@@ -8,12 +8,9 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% funny things: negative height by \pdfannot
-% immediate versus deferred
-
%D \macros
%D {jobsuffix}
%D
@@ -40,26 +37,37 @@
%D \PDFTEX\ primitives are permitted. If no primitives are
%D available, we just stop reading any further.
-\ifx\pdftexversion\undefined \endinput \else \unprotect \fi
+\unprotect
-%D For the time being \type {\pdfimage} is redefined in
-%D versions older than 12s. In the new syntax, the filename
-%D is surrounded by braces.
+\ifx\pdftexversion\undefined
+ \writestatus{\m!systems}{you should use pdfTeX binaries}\wait
+ \protect\expandafter\endinput
+\fi
\ifnum\pdftexversion<13
- \let\normalpdfimage\pdfimage
- \def\grabpdfimage#1#2{\normalpdfimage#1 #2\relax}
- \def\pdfimage#1#{\grabpdfimage{#1}}
+ \writestatus{\m!systems}{your pdfTeX version is much too old}\wait
+ \protect\expandafter\endinput
+\fi
+
+\ifnum\pdftexversion<14
+ \writestatus{\m!systems}{please update your pdfTeX binaries}
\fi
%D We default to 300 dots per inch image resolution.
-\ifx\pdfimageresolution\undefined % < version 14
+\ifx\pdfimageresolution\undefined
\newcount\pdfimageresolution
\fi
\pdfimageresolution=300
+% %D Why are the Acrobat viewers so buggy? To prevent font cache
+% %D mismatches, we say:
+%
+% \ifx\pdfuniqueresname\undefined \else
+% \pdfuniqueresname=1
+% \fi
+
%D Once we are sure that we're indeed supporting \PDFTEX, we
%D force \PDF\ output at the highest compression. For debugging
%D purposes one can set the compresslevel to~0. We also have to
@@ -90,14 +98,11 @@
%D Some more internal settings.
-\appendtoks \pdfoutput=0 \to \everyresetspecials
+\appendtoks \pdfoutput=0 \to \everyresetspecials
\pdfoutput =1 % we reset that one with \everyresetspecials
\pdfcompresslevel=9 % apart from debugging, no reason for value 0
-% \pdfthreadhoffset=\maxdimen
-% \pdfthreadvoffset=\maxdimen
-
%D Just in case we mimmick specials, we have to make sure no
%D default specials end up in the process.
@@ -118,7 +123,7 @@
\global\pdfpageheight=#3\relax}
%D \macros
-%D {doinsertfile}
+%D {doinsertfile,dogetnofinsertpages}
%D
%D Graphics are not part of \TEX\ and therefore not part of the
%D \DVI\ standard. \PDF\ on the other hand has several graphic
@@ -143,6 +148,12 @@
\dodoinsertfile{tpd}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}%
\egroup}
+%D The number of pages in (for instance an \PDF) insert
+%D file, can be asked for using:
+
+\definespecial\dogetnofinsertpages#1% global !
+ {\global\let#1\PDFimagenofpages}
+
%D Currently we support \type{pdf} for \PDF\ files, \type{mps}
%D for \METAPOST\ graphics, \type{png} and \type{jpg} for
%D bitmap graphics.
@@ -164,12 +175,12 @@
%D \convertPDFtoPDF{\filename.pdf}\xscale\yscale{#5sp}{#6sp}{#7sp}{#8sp}}
%D \stoptypen
%D
-%D superseded by
+%D superseded by the next macros.
-\definefileinsertion{tpd}{pdf}{\dopdfimage}
-\definefileinsertion{tpd}{png}{\dopdfimage}
-\definefileinsertion{tpd}{jpg}{\dopdfimage}
-% \definefileinsertion{tpd}{tif}{\dopdfimage} % unstable
+\definefileinsertion{tpd}{pdf}{\handlepdfimage}
+\definefileinsertion{tpd}{png}{\handlepdfimage}
+\definefileinsertion{tpd}{jpg}{\handlepdfimage}
+%definefileinsertion{tpd}{tif}{\handlepdfimage} % unstable
%D The main file insertion macro is as follows. Because
%D \PDFTEX\ does not support arbitrary suffixes, we double
@@ -177,27 +188,64 @@
%D on unknown suffixes.
\def\doifvalidpdfimagefileelse#1%
- {\edef\filesuffix{#1}%
- \doloop
- {\@EA\aftersplitstring\filesuffix\at.\to\temp
- \ifx\temp\empty
- \exitloop
- \else
- \let\filesuffix\temp
- \fi}%
+ {\doiffileelse{#1}
+ {\edef\filesuffix{#1}%
+ \doloop
+ {\@EA\aftersplitstring\filesuffix\at.\to\temp
+ \ifx\temp\empty
+ \exitloop
+ \else
+ \let\filesuffix\temp
+ % a temporary hack
+ \doif{\filesuffix}{PDF}{\pdfimageresolution=72}%
+ \doif{\filesuffix}{pdf}{\pdfimageresolution=72}%
+ % because pdfTeX scales back
+ \fi}}
+ {\let\filesuffix\s!unknown}%
\doiffileinsertionsupportedelse{\filesuffix}}
-\def\dopdfimage#1#2#3#4#5#6#7#8#9%
- {\doiffileelse{#1}
- {\bgroup
- \doifvalidpdfimagefileelse{#1}
- {\pdfimage
- \ifcase#7 \else \!!width #7sp\fi
- \ifcase#8 \else \!!height #8sp\fi
- {#1}}
- {\framed[\c!breedte=#7sp,\c!hoogte=#8sp]{#1}}%
- \egroup}
- {\framed[\c!breedte=#7sp,\c!hoogte=#8sp]{#1}}}
+\ifx\pdflastximagepages\undefined \chardef\pdflastximagepages=1 \fi
+
+\ifnum\pdftexversion>13
+
+\def\checkpdfimagepagenumber#1%
+ {\let\pdfimagepagenumber\empty
+ \getfromcommacommand[#1][1]%
+ \doifnumberelse{\commalistelement}
+ {\ifcase\commalistelement\else
+ \edef\pdfimagepagenumber{page \commalistelement}%
+ \message{(pdf image page \pdfimagepagenumber)}%
+ \fi}
+ {}}
+
+\def\handlepdfimage#1#2#3#4#5#6#7#8#9%
+ {\bgroup
+ \doifvalidpdfimagefileelse{#1}
+ {\checkpdfimagepagenumber{#9}%
+ \immediate\pdfximage
+ \ifcase#7 \else \!!width #7sp\fi
+ \ifcase#8 \else \!!height #8sp\fi
+ \pdfimagepagenumber
+ {#1}%
+ \xdef\PDFimagereference{\the\pdflastximage}%
+ \xdef\PDFimagenofpages{\the\pdflastximagepages}%
+ \pdfrefximage\pdflastximage}
+ {\framed[\c!breedte=#7sp,\c!hoogte=#8sp]{#1}}%
+ \egroup}
+
+\else
+
+\def\handlepdfimage#1#2#3#4#5#6#7#8#9%
+ {\bgroup
+ \doifvalidpdfimagefileelse{#1}
+ {\pdfimage
+ \ifcase#7 \else \!!width #7sp\fi
+ \ifcase#8 \else \!!height #8sp\fi
+ {#1}}%
+ {\framed[\c!breedte=#7sp,\c!hoogte=#8sp]{#1}}%
+ \egroup}
+
+\fi
%D As we will see now, \PDFTEX\ not only directly supports
%D \type{mps}, \type{png}, \type{pdf}, \type{jpg} but also
@@ -205,6 +253,8 @@
%D similar to figure inclusion. The next macro calls the
%D general \PDF\ one.
+\newcounter\currentmovie
+
\def\setcurrentmovie#1%
{\doglobal\increment\currentmovie}
@@ -219,20 +269,74 @@
\newif\ifmeasureTPDfiguresize \measureTPDfiguresizetrue
-\def\dogetTPDfiguresize#1#2#3#4#5#6%
- {\ifmeasureTPDfiguresize
- #3=\!!zeropoint
- #4=\!!zeropoint
- \doifvalidpdfimagefileelse{#2}
- {\global\setbox\foundexternalfigure=\vbox{\pdfimage{#2}}%
- #5=\wd\foundexternalfigure
- #6=\ht\foundexternalfigure}
- {#5=\!!zeropoint
- #6=\!!zeropoint}%
+%D For the moment we don't test for alternatives that
+%D themselves have alternatives, especially cylcic
+%D dependencies.
+
+\ifnum\pdftexversion>13
+
+\def\checkpdfimageattributes%
+ {\ifx\PDFfigurereference\empty
+ \global\let\pdfimageattributes\empty
\else
- #1{#2}{#3}{#4}{#5}{#6}% \normaldogetfiguresize...
+ \immediate\pdfobj%
+ {[ << /Image \PDFfigurereference\space0 R
+ /DefaultForPrinting true >> ]}%
+ \xdef\pdfimageattributes%
+ {attr {/Alternates \the\pdflastobj\space0 R}}%
\fi}
+\def\dogetTPDfiguresize#1#2#3#4#5#6#7%
+ {\ifmeasureTPDfiguresize
+ #4=\!!zeropoint
+ #5=\!!zeropoint
+ \doifvalidpdfimagefileelse{#2}
+ {\ifvoid\foundexternalfigure
+ \donetrue
+ \else\ifx\PDFfigurereference\empty
+ \donetrue
+ \else
+ \doifinstringelse{\filesuffix}{\c!png,\c!jpg}\donetrue\donefalse
+ \fi\fi}
+ {\donefalse}%
+ \ifdone
+ \checkpdfimagepagenumber{#3}%
+ \checkpdfimageattributes
+ \global\setbox\foundexternalfigure=\vbox
+ {\immediate\pdfximage \pdfimageattributes \pdfimagepagenumber{#2}%
+ \xdef\PDFimagereference{\the\pdflastximage}%
+ \xdef\PDFimagenofpages{\the\pdflastximagepages}%
+ \pdfrefximage\pdflastximage}%
+ #6=\wd\foundexternalfigure
+ #7=\ht\foundexternalfigure
+ \global\let\PDFfigurereference\empty
+ \global\let\PDFimageattributes\empty
+ \else
+ #6=\!!zeropoint
+ #7=\!!zeropoint
+ \fi
+ \else
+ #1{#2}{#3}{#4}{#5}{#6}{#7}% \normaldogetfiguresize...
+ \fi}
+
+\else
+
+\def\dogetTPDfiguresize#1#2#3#4#5#6#7%
+ {\ifmeasureTPDfiguresize
+ #4=\!!zeropoint
+ #5=\!!zeropoint
+ \doifvalidpdfimagefileelse{#2}
+ {\global\setbox\foundexternalfigure=\vbox{\pdfimage{#2}}%
+ #6=\wd\foundexternalfigure
+ #7=\ht\foundexternalfigure}
+ {#6=\!!zeropoint
+ #7=\!!zeropoint}%
+ \else
+ #1{#2}{#3}{#4}{#5}{#6}{#7}% \normaldogetfiguresize...
+ \fi}
+
+\fi
+
\let\normaldogetfiguresizepdf=\dogetfiguresizepdf
\let\normaldogetfiguresizepng=\dogetfiguresizepng
\let\normaldogetfiguresizetif=\dogetfiguresizetif
@@ -244,6 +348,22 @@
\def\dogetfiguresizejpg{\dogetTPDfiguresize\normaldogetfiguresizejpg}
%D \macros
+%D {doregisterfigure}
+%D
+%D Here is the fuzzy, very special dependant figure
+%D registration special. We need to refer to the innermost
+%D object (ximage).
+
+\ifnum\pdftexversion>13
+
+ \definespecial\doregisterfigure#1#2%
+ {\doifundefined{IM::#1::#2}
+ {\setxvalue{IM::#1::#2}{\the\pdflastximage}}%
+ \xdef\PDFfigurereference{\getvalue{IM::#1::#2}}}
+
+\fi
+
+%D \macros
%D {doovalbox}
%D
%D Drawing frames with round corners is inherited from the
@@ -278,6 +398,23 @@
\definespecial\dostartnegative {\doPDFstartnegative}
\definespecial\dostopnegative {\doPDFstopnegative}
+%D \macros
+%D {dostartclipping,dostopclipping}
+%D
+%D Clipping in \PDFTEX\ is rather trivial. We can even hook
+%D in \METAPOST\ without problems.
+
+\definespecial\dostartclipping#1#2#3%
+ {\ScaledPointsToBigPoints{#2}\width
+ \ScaledPointsToBigPoints{#3}\height
+ \grabMPclippath{#1}{1}{\width}{\height}
+ {0 0 m \width\space 0 l \width \height l 0 \height l}%
+ \pdfliteral
+ {q 0 w \MPclippath\space W n}}
+
+\definespecial\dostopclipping%
+ {\pdfliteral{Q}}
+
%D \macros
%D {dosetupinteraction,
%D dosetupopenaction,dosetupcloseaction}
@@ -330,11 +467,11 @@
\def\docommando##1%
{\edef\sanitizedJScode{\getJSpreamble{##1}}%
\@EA\doPSsanitizeJScode\sanitizedJScode\to\sanitizedJScode
- \pdfobj {<< /S /JavaScript /JS (\sanitizedJScode) >>}%
+ \immediate\pdfobj {<< /S /JavaScript /JS (\sanitizedJScode) >>}%
\edef\compositeJScode%
{\compositeJScode\space (##1) \the\pdflastobj\space 0 R}}%
\processcommalist[#1]\docommando
- \pdfobj{<< /Names [ \compositeJScode ] >>}%
+ \immediate\pdfobj{<< /Names [ \compositeJScode ] >>}%
\pdfnames{/JavaScript \the\pdflastobj\space 0 R}%
\egroup}
@@ -379,11 +516,11 @@
{\bgroup
\enablePDFdocencoding
\pdfinfo
- {/Title (#1)
+ {%Producer (pdfTeX) % already there
+ /Title (#1)
/Subject (#2)
/Author (#3)
- /Creator (#4)
- /Producer (pdfTeX)}%
+ /Creator (#4)}%
\egroup}
%D \macros
@@ -408,13 +545,20 @@
%D Some day, I'll reimplement threading in a useful way.
%D Currently the viewers handle threads rather diffuse.
+\ifnum\pdftexversion>13
+
\definespecial\dobeginofprofile#1#2#3#4%
{\setPDFdestination{#1}%
\doifsomething{\PDFdestination}
- {\pdfthread name {\PDFdestination}}}
+ {\pdfthread
+ width #2sp height #3sp
+ attr {/Title (\PDFdestination)} % can be omitted
+ name {\PDFdestination}}}
\definespecial\doendofprofile%
- {\pdfendthread}
+ {}
+
+\fi
%D \macros
%D {doinsertbookmark}
@@ -436,28 +580,82 @@
%D reuse objects. These can be compared with \TEX's boxes. The
%D \TEX\ counterpart is defined in the module \type{spec-dvi}.
%D We don't use the dimensions here.
-
-% Forms can interfere with page dimension settings. Therefore
-% calling macros can best postpone flushing.
-
-\definespecial\dostartobject#1#2#3#4#5%
- {\bgroup
- \setbox\nextbox=\vbox\bgroup
+%D
+%D The next solution is not that beautiful. Because objects are
+%D containers for whatever kind of content, graphics can be
+%D part of this content, and a graphic object can be part of
+%D the more general type. In practice this means that an ximage
+%D would be embedded in an xform, which in itself is not that
+%D big a problem, apart from a few bytes overhead. However, for
+%D reasons unknown to me alternative images must be pure
+%D ximages |<|indeed, somehow one cannot use a vector graphic
+%D as alternative|>| that are not embedded into forms, so this
+%D is why the object handler treats them different. This
+%D implies knowledge of the calling routines, especially the
+%D \type{FIG} trigger, that signals that we just embedded an
+%D image. Alternatively I could have introduced a dual object
+%D system, but the overhead in duplicate specials is currently
+%D not what we want. I'd rather implement a more mature
+%D object support system from scratch.
+
+\let\currentPDFresources\empty
+\let\PDFimageattributes \empty
+\let\PDFfigurereference \empty
+\let\PDFimagereference \empty
+
+\ifnum\pdftexversion>13
+
+ \definespecial\dostartobject#1#2#3#4#5%
+ {\bgroup
+ \setbox\nextbox=\vbox\bgroup
+ \def\dodostopobject%
+ {\egroup
+ \ifx\PDFimagereference\empty
+ \immediate\pdfxform resources {\currentPDFresources}\nextbox
+ \global\let\currentPDFresources\empty
+ \dosetobjectreference{#1}{#2}{\the\pdflastxform}%
+ \else
+ \dosetobjectreference{#1}{#2}{-\PDFimagereference}%
+ \global\let\PDFimagereference\empty
+ \fi}}
+
+ \definespecial\dostopobject%
+ {\dodostopobject
+ \egroup}
+
+ \definespecial\doinsertobject#1#2%
+ {\bgroup
+ \doifobjectreferencefoundelse{#1}{#2}
+ {\dogetobjectreference{#1}{#2}\PDFobjectreference
+ \ifnum\PDFobjectreference<0
+ \@EA\@EA\@EA\pdfrefximage\@EA\gobbleoneargument\PDFobjectreference
+ \else
+ \pdfrefxform\PDFobjectreference
+ \fi}%
+ {}%
+ \egroup}
+
+\else
+
+ \definespecial\dostartobject#1#2#3#4#5%
+ {\bgroup
+ \setbox\nextbox=\vbox\bgroup
\def\dodostopobject%
{\egroup
- %\immediate
\pdfform\nextbox
- \dosetobjectreference{#1}{#2}{\the\pdflastform}}}%
-
-\definespecial\dostopobject%
- {\dodostopobject
- \egroup}
+ \dosetobjectreference{#1}{#2}{\the\pdflastform}}}
+
+ \definespecial\dostopobject%
+ {\dodostopobject
+ \egroup}
+
+ \definespecial\doinsertobject#1#2%
+ {\bgroup
+ \dogetobjectreference{#1}{#2}\PDFobjectreference
+ \pdfrefform\PDFobjectreference
+ \egroup}
-\definespecial\doinsertobject#1#2%
- {\bgroup
- \dogetobjectreference{#1}{#2}\PDFobjectreference
- \pdfrefform\PDFobjectreference
- \egroup}
+\fi
%D \macros
%D {dosetpagetransition}
@@ -511,6 +709,13 @@
\definespecial\dogetfieldset {\doFDFgetfieldset}
\definespecial\doiffieldset {\doFDFiffieldset}
+%D \macros
+%D {doregistercalculationset}
+%D
+%D The calculation order is defined using:
+
+\definespecial\doregistercalculationset{\doFDFregistercalculationset}
+
%D \macros
%D {doPDFdestination}
%D
@@ -521,8 +726,7 @@
{\pdfdest name {#1}\PDFpageviewkey}
%D \macros
-%D {doPDFaction,doPDFannotation,doPDFtextannotation,
-%D ifsharePDFactions}
+%D {doPDFaction,doPDFannotation,ifsharePDFactions}
%D
%D Next we handle annotations. All link annotations are
%D implemented using the action dictionary. This enables us to
@@ -531,45 +735,71 @@
\newif\ifsharePDFactions \sharePDFactionstrue
-% \def\doPDFaction width #1 height #2 action #3%
-% {\ifnum\similarreference=1
-% \ifsharePDFactions
-% \pdfobj{<<#3>>}\xdef\ lastPDFaction{\the\pdflastobj\space0 R}%
-% \else
-% \xdef\lastPDFaction{<<#3>>}%
-% \fi
-% \fi
-% \pdfannotlink
-% width #1sp height #2sp depth 0sp
-% user {/Subtype /Link
-% /Border [0 0 0]
-% /A \ifcase\similarreference<<#3>>\else\lastPDFaction\fi}%
-% \pdfendlink}
-
-\def\doPDFaction width #1 height #2 action #3%
- {\ifcase\similarreference\relax
- \xdef\lastPDFaction{<<#3>>}%
- \or
- \ifsharePDFactions
- \pdfobj{<<#3>>}\xdef\lastPDFaction{\the\pdflastobj\space0 R}%
- \else
+\ifnum\pdftexversion>13
+
+ \def\doPDFaction width #1 height #2 action #3%
+ {\ifcase\similarreference\relax
\xdef\lastPDFaction{<<#3>>}%
+ \or
+ \ifsharePDFactions
+ \immediate\pdfobj{<<#3>>}%
+ \xdef\lastPDFaction{\the\pdflastobj\space0 R}%
+ \else
+ \xdef\lastPDFaction{<<#3>>}%
+ \fi
\fi
- \fi
- \ifcollectreferenceactions \else
- \pdfannotlink
- width #1sp height #2sp depth 0sp
- user {/Subtype /Link
- /Border [0 0 0]
- /A \lastPDFaction}%
- \pdfendlink
- \fi}
+ \ifcollectreferenceactions \else
+ \pdfannot
+ width #1sp height #2sp depth 0sp
+ {/Subtype /Link
+ /Border [0 0 0]
+ \ifhighlighthyperlinks \else /H /N \fi
+ /A \lastPDFaction}%
+ \fi}
+
+\else
+
+ \def\doPDFaction width #1 height #2 action #3%
+ {\ifcase\similarreference\relax
+ \xdef\lastPDFaction{<<#3>>}%
+ \or
+ \ifsharePDFactions
+ \immediate\pdfobj{<<#3>>}\xdef\lastPDFaction{\the\pdflastobj\space0 R}%
+ \else
+ \xdef\lastPDFaction{<<#3>>}%
+ \fi
+ \fi
+ \ifcollectreferenceactions \else
+ \pdfannotlink % could be \pdfannot if not the - problem was there
+ width #1sp height #2sp depth 0sp
+ user {/Subtype /Link
+ /Border [0 0 0]
+ \ifhighlighthyperlinks \else /H /N \fi
+ /A \lastPDFaction}%
+ \pdfendlink
+ \fi}
+
+\fi
+
+% pdftex and viewers give problems with this one (printing forms)
+%
+%\def\doPDFannotation width #1 height #2 data #3%
+% {\pdfannot width #1sp height -#2sp depth 0sp {#3}}
+%
+% This is corrected in version 14. When this version is wide
+% spread, this will be cleaned up.
+
+\ifnum\pdftexversion>13
-\def\doPDFannotation width #1 height #2 data #3%
- {\pdfannot width #1sp height -#2sp depth 0sp {#3}}
+ \def\doPDFannotation width #1 height #2 data #3%
+ {\pdfannot width #1sp height #2sp depth 0sp {#3}}
-\def\doPDFtextannotation width #1 height #2 data #3%
- {\pdfannot width #1sp height #2sp depth 0sp {#3}}
+\else
+
+ \def\doPDFannotation width #1 height #2 data #3%
+ {\hbox{\raise#2sp\hbox{\pdfannot width #1sp height #2sp depth 0sp {#3}}}}
+
+\fi
%D \macros
%D {doPDFannotationobject}
@@ -579,8 +809,12 @@
%D the last annotation object number directly), we take the
%D save route.
+%\def\doPDFannotationobject class #1 name #2 width #3 height #4 data #5%
+% {\pdfannot width #3sp height -#4sp depth 0sp {#5}%
+% \dosetobjectreference{#1}{#2}{\the\pdflastannot}}
+
\def\doPDFannotationobject class #1 name #2 width #3 height #4 data #5%
- {\pdfannot width #3sp height -#4sp depth 0sp {#5}%
+ {\doPDFannotation width #3 height #4 data {#5}%
\dosetobjectreference{#1}{#2}{\the\pdflastannot}}
%D \macros
@@ -599,8 +833,9 @@
{\expanded{\global\pdfpagesattr{\the\pdfpagesattr#1}}}
\def\doPDFresetattributes%
- {\global\pdfpageattr{}%
- \global\pdfpagesattr{}}
+ {\global\pdfpageattr{}}
+
+% \global\pdfpagesattr{}}
\appendtoks\doPDFresetattributes\to\everyaftershipout
@@ -632,11 +867,11 @@
\def\doPDFdictionaryobject class #1 name #2 data #3%
{\flushatshipout
- {\pdfobj{<< #3 >>}\dosetobjectreference{#1}{#2}{\the\pdflastobj}}}
+ {\immediate\pdfobj{<< #3 >>}\dosetobjectreference{#1}{#2}{\the\pdflastobj}}}
\def\doPDFarrayobject class #1 name #2 data #3%
{\flushatshipout
- {\pdfobj{[ #3 ]}\dosetobjectreference{#1}{#2}{\the\pdflastobj}}}
+ {\immediate\pdfobj{[ #3 ]}\dosetobjectreference{#1}{#2}{\the\pdflastobj}}}
%D \macros
%D {defaultobjectreference,doPDFgetobjectreference}
@@ -652,6 +887,26 @@
{\dogetobjectreference{#1}{#2}#3%
\edef#3{\ifx#3\empty null\else#3\space0 R\fi}}
+%D \macros
+%D {initializePDFnegative}
+%D
+%D Here follow some rather obscure macros. They will only
+%D come into action when one wants negated output.
+
+\let\PDFextgstates\empty
+
+\def\initializePDFnegative%
+ {\bgroup
+ \pdfcompresslevel=0
+ \immediate\pdfobj attr {/FunctionType 4 /Range [0 1] /Domain [0 1]} stream {{1 exch sub}}
+ \immediate\pdfobj{<</Type /ExtGState /TR \the\pdflastobj\space0 R>>}
+ \xdef\PDFextgstates{\PDFextgstates/GSnegative \the\pdflastobj\space0 R}
+ \immediate\pdfobj{<</Type /ExtGState /TR /Identity>>}
+ \xdef\PDFextgstates{\PDFextgstates/GSpositive \the\pdflastobj\space0 R}
+ \global\let\initializePDFnegative\relax
+ \egroup
+ \expanded{\pdfpageresources{/ExtGState <<\PDFextgstates>>}}}
+
%D Now we can finish this module.
\stopspecials
diff --git a/tex/context/base/spec-tr.tex b/tex/context/base/spec-tr.tex
index 7d6708765..5a29ed1e0 100644
--- a/tex/context/base/spec-tr.tex
+++ b/tex/context/base/spec-tr.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D Especially the rotation proved to be incompatible with
diff --git a/tex/context/base/spec-win.tex b/tex/context/base/spec-win.tex
index ba25de527..caa9df149 100644
--- a/tex/context/base/spec-win.tex
+++ b/tex/context/base/spec-win.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\unprotect
@@ -43,11 +43,12 @@
{\!!doneafalse}
{\!!doneatrue}}%
%\hsmash{[l:#5]}%
+ \setreferencefilename#4\to\DVIfile
\special
{button:
#1 #2
\if!!donea
- file: #4,
+ file: \DVIfile,
\fi
"#5"}}
{}% nog uri afhandelen
@@ -62,11 +63,12 @@
{\!!doneafalse}
{\!!doneatrue}}%
%\hsmash{[p:#5]}%
+ \setreferencefilename#4\to\DVIfile
\special
{button:
#1 #2
\if!!donea
- file: #4,
+ file: \DVIfile,
\fi
\ifnum0#5=0 \else
page: #5
diff --git a/tex/context/base/spec-yy.tex b/tex/context/base/spec-yy.tex
index 551ad2e63..31360dc24 100644
--- a/tex/context/base/spec-yy.tex
+++ b/tex/context/base/spec-yy.tex
@@ -8,14 +8,13 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D \macros
%D {dostartgraymode,dostopgraymode,
%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode,dostopcolormode,
%D doinsertfile}
-%D {}
%D
%D We implement a nice and simple figure||insertion special
%D and make use of \YandY's color specials. Otherwise \DVIWINDO\
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index 4f4c6720d..3e85c3940 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module implements some box manipulation macros. Some
@@ -57,7 +57,6 @@
%D \macros
%D {hsmash,vsmash,
%D hsmashed,vsmashed}
-%D {}
%D
%D While the previous macros expected a \BOX, the next act on a
%D content. They are some subtle differences betreen the smash
@@ -144,8 +143,7 @@
{\doiftextelse{#1}{#2}{}}
%D \macros
-%D {dowithnextbox,
-%D nextbox}
+%D {dowithnextbox,nextbox}
%D
%D Sometimes we want a macro to grab a box and do something
%D on the content. One could pass an argument to a box, but
@@ -171,7 +169,7 @@
%D \dowithnextbox\handlefloat\vbox}
%D \stoptypen
%D
-%D in stead of:
+%D instead of:
%D
%D \starttypen
%D \def\getfloat#1%
@@ -826,8 +824,6 @@
%D the first two lines would have ended up in the text. This
%D macro can be useful when building complicated menus, headers
%D and footers and|/|or margin material.
-%D
-%D {\em This macro still needs some improvement.}
\def\sbox% in handleiding, voorbeeld \inlinker{xx} \extern..
{\dowithnextbox
@@ -892,7 +888,7 @@
\bgroup
\mindermeldingen
\forgetall
- \setbox0=\hbox{\vrule\!!width\!!zeropoint#1}%
+ \setbox0=\hbox{\vrule\!!width \!!zeropoint#1}%
\setbox2=\vbox{\hrule\!!height\!!zeropoint#1}%
\advance\vsize by \ht2
\advance\hsize by \wd0
@@ -975,7 +971,7 @@
%D footnotes.
%D
%D Men kan het proces van breken enigzins beinvloeden met de
-%D volgende twee swithes:
+%D volgende twee switches:
\newif\ifalignrigidcolumns
\newif\ifstretchrigidcolumns
@@ -984,7 +980,8 @@
%D individuele kolommen op naar \type{\vsize}.
\def\setrigidcolumnhsize#1#2#3%
- {\hsize=#1\relax
+ {\xdef\savedrigidhsize{\the\hsize}%
+ \hsize=#1\relax
\global\chardef\rigidcolumns=#3\relax
\scratchdimen=-#2\relax
\multiply\scratchdimen by #3\relax
@@ -997,28 +994,35 @@
\ifnum\rigidcolumns=1
\ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi\rigidcolumnbox
\else
- \line
+ \hbox to \savedrigidhsize % was \hsize
{\vbadness=10000
\tabskip\!!zeropoint
+ \setbox\rigidcolumnbox=\vbox
+ {\unvbox\rigidcolumnbox
+ \unpenalty\removelastskip}% get rid of \blank's
\splittopskip=\openstrutheight
- %\scratchdimen=\ht\rigidcolumnbox % sensitive for overflow
- %\divide\scratchdimen by \rigidcolumns % therefore we need the hack:
- \scratchdimen=1pt
+ %\scratchdimen=\ht\rigidcolumnbox % sensitive for overflow
+ %\divide\scratchdimen by \rigidcolumns % therefore we need the hack:
+ \scratchdimen=1pt
\divide\scratchdimen by \rigidcolumns
\expanded{\scratchdimen=\withoutpt{\the\scratchdimen}\ht\rigidcolumnbox}%
- \advance\scratchdimen by \ht\strutbox
+ \advance\scratchdimen by \ht\strutbox
\valign{##\vfill\cr\dorigidcolumnsplits}}%
\fi}
\def\dorigidcolumnsplits%
{\ifnum\rigidcolumns>0
\setbox\scratchbox=\vsplit\rigidcolumnbox to \scratchdimen
- \ifalignrigidcolumns
- \vbox to \ifstretchrigidcolumns\vsize\else\scratchdimen\fi
- {\unvbox\scratchbox}%
- \else
- \vbox{\unvbox\scratchbox}%
- \fi
+ \hbox to \hsize
+ \bgroup
+ \ifalignrigidcolumns
+ \vbox to \ifstretchrigidcolumns\vsize\else\scratchdimen\fi
+ {\unvbox\scratchbox}%
+ \else
+ \vbox{\unvbox\scratchbox}%
+ \fi
+ \hss
+ \egroup
\doglobal\decrement\rigidcolumns
\cr
\ifnum\rigidcolumns>0\noalign{\hfil}\fi
@@ -1056,7 +1060,7 @@
\multiply\dimen0 by 1024
\else
\message{cropping \baselineskip to 16pt}%
- \baselineskip=\maxdimen
+ \dimen0=\maxdimen
\fi
\divide\dimen0 by \hsize
\multiply\dimen0 by 64
@@ -1075,6 +1079,33 @@
\box0
\egroup}
+% % to be done: start halfway a line combined with one line
+% % extra to start with (skip) and one line less than counted.
+%
+% \def\stopvboxtohbox%
+% {\egroup
+% \setbox2=\vbox
+% {\forgetall\unhcopy0\par\xdef\globalvhlines{\the\prevgraf}}%
+% \setbox2=\vbox
+% {\unvbox2
+% \setbox2=\lastbox
+% \setbox2=\hbox{\unhbox2}%
+% \xdef\globalvhwidth{\the\wd2}}%
+% \decrement\globalvhlines
+% \dimen0=\globalvhwidth
+% \dimen0=\vboxtohboxfactor\dimen0
+% \advance\dimen0 by \globalvhlines\lineheight
+% \dp0=\!!zeropoint
+% \ht0=\dimen0
+% %\writestatus{guessed size}
+% % {w:\the\wd0\space\space
+% % b:\the\baselineskip\space
+% % l:\globalvhlines\space
+% % e:\globalvhwidth\space
+% % h:\the\dimen0}%
+% \box0
+% \egroup}
+
\def\convertvboxtohbox%
{\setvboxtohbox
\makehboxofhboxes
@@ -1443,6 +1474,38 @@
\box\nextbox
\egroup}
\hbox}
+
+%D \macros
+%D {boxofsize}
+%D
+%D Sometimes we need to construct a box with a height or
+%D width made up of several dimensions. Instead of cumbersome
+%D additions, we can use:
+%D
+%D \starttypen
+%D \boxofsize \vbox 10cm 3cm -5cm {the text to be typeset}
+%D \stoptypen
+%D
+%D This example demonstrates that one can use positive and
+%D negative values. Dimension registers are also accepted.
+
+\newdimen\sizeofbox
+
+\def\boxofsize#1%
+ {\bgroup
+ \sizeofbox\!!zeropoint
+ \scratchdimen\!!zeropoint
+ \def\docommando%
+ {\advance\sizeofbox\scratchdimen
+ \futurelet\next\dodocommando}%
+ \def\dodocommando%
+ {\ifx\next\bgroup
+ \expanded{\egroup#1 to \the\sizeofbox}%
+ \else
+ \@EA\afterassignment\@EA\docommando\@EA\scratchdimen
+ \fi}%
+ \docommando}
+
%D Some new, still undocumented features:
@@ -1482,12 +1545,97 @@
\egroup}
\vbox}
-% Handy:
+%D Some more undocumented macros (used in m-chart).
+
+\newif\iftraceboxplacement % \traceboxplacementtrue
+
+\def\boxcursor%
+ {\iftraceboxplacement
+ \bgroup
+ \setbox0=\hbox
+ {\hskip-1pt\vrule\!!width2pt\!!height2pt\!!depth2pt}%
+ \wd0=\!!zeropoint\ht0=\!!zeropoint\dp0=\!!zeropoint\box0
+ \egroup
+ \else
+ \hbox
+ {\vrule\!!width\!!zeropoint\!!height\!!zeropoint\!!depth\!!zeropoint}%
+ \fi}
+
+\def\placedbox%
+ {\iftraceboxplacement\ruledhbox\else\hbox\fi}
+
+\newdimen\boxoffset
+
+\def\rightbox#1%
+ {\hbox
+ {\setbox0=\placedbox{#1}%
+ \dimen0=.5\ht0\advance\dimen0 by -.5\dp0
+ \boxcursor\hskip\boxoffset\lower\dimen0\box0}}
+
+\def\leftbox#1%
+ {\hbox
+ {\setbox0=\placedbox{#1}%
+ \dimen0=.5\ht0\advance\dimen0 by -.5\dp0
+ \boxcursor\hskip-\wd0\hskip-\boxoffset\lower\dimen0\box0}}
+
+\def\topbox#1%
+ {\hbox
+ {\setbox0=\placedbox{#1}%
+ \dimen0=\boxoffset\advance\dimen0 by \dp0
+ \boxcursor\hskip-.5\wd0\raise\dimen0\box0}}
+
+\def\bottombox#1%
+ {\hbox
+ {\setbox0=\placedbox{#1}%
+ \dimen0=\boxoffset\advance\dimen0 by \ht0
+ \boxcursor\hskip-.5\wd0\lower\dimen0\box0}}
+
+\def\lefttopbox#1%
+ {\hbox
+ {\setbox0=\placedbox{#1}%
+ \dimen0=\boxoffset\advance\dimen0 by \dp0
+ \advance\boxoffset\wd0
+ \boxcursor\hskip-\boxoffset\raise\dimen0\box0}}
+
+\def\righttopbox#1%
+ {\hbox
+ {\setbox0=\placedbox{#1}%
+ \dimen0=\boxoffset\advance\dimen0 by \dp0
+ \boxcursor\hskip\boxoffset\raise\dimen0\box0}}
+
+\def\leftbottombox#1%
+ {\hbox
+ {\setbox0=\placedbox{#1}%
+ \dimen0=\boxoffset\advance\dimen0 by \ht0
+ \advance\boxoffset\wd0
+ \boxcursor\hskip-\boxoffset\lower\dimen0\box0}}
+
+\def\rightbottombox#1%
+ {\hbox
+ {\setbox0=\placedbox{#1}%
+ \dimen0=\boxoffset\advance\dimen0 by \ht0
+ \boxcursor\hskip\boxoffset\lower\dimen0\box0}}
+
+\let\topleftbox \lefttopbox
+\let\toprightbox \righttopbox
+\let\bottomleftbox \leftbottombox
+\let\bottomrightbox\rightbottombox
+
+\def\middlebox#1%
+ {\hbox{\setbox0=\placedbox{#1}\boxoffset=-.5\wd0\rightbox{\box0}}}
+
+%D \macros
+%D {removedepth, obeydepth}
+%D
+%D While \type {\removedepth} removes the preceding depth,
+%D \type {\obeydepth} makes sure we have depth. Both macros
+%D leave the \type {\prevdepth} untouched.
\def\removedepth%
- {\ifvmode\ifdim\prevdepth>\!!zeropoint
- \kern-\prevdepth
- \fi\fi}
+ {\ifvmode \ifdim\prevdepth>\!!zeropoint \kern-\prevdepth \fi \fi}
+
+\def\obeydepth%
+ {\par \removedepth \ifvmode \kern\dp\strutbox \fi}
% maybe some day we need this
%
diff --git a/tex/context/base/supp-eps.tex b/tex/context/base/supp-eps.tex
index 65581ee7f..24e9da14c 100644
--- a/tex/context/base/supp-eps.tex
+++ b/tex/context/base/supp-eps.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
@@ -48,6 +48,11 @@
%D are typesetting sources and putting eps coded logos into
%D a heading. Temporary restoring the \CATCODES\ is done in
%D the calling routine.
+%D
+%D The creator as well as external support for specials are
+%D analyzed as well and their status is available in \type
+%D {\EPScreator} and \type {\EPSshading}. The boundingbox
+%D components are available in \type {\EPSllx} etc.
\unprotect
@@ -56,10 +61,13 @@
\let\EPSurx\!!zeropoint \let\MPurx\EPSurx % in fast mode we set
\let\EPSury\!!zeropoint \let\MPury\EPSury % them to 0pt.
+\chardef\EPSfound=0 \chardef\EPScreator=0 \chardef\EPSspecial=0
+
\def\dogetEPSboundingbox#1#2#3#4#5%
{\bgroup
\global\chardef\EPSfound=0
\global\chardef\EPScreator=0
+ \global\chardef\EPSspecial=0
\uncatcodespecials
\def\doprocessEPSline%
{\expandafter\checkEPSboundingbox\fileline:. \end}%
@@ -90,6 +98,7 @@
\gdef\EPSexactboundingboxtag{%ExactBoundingBox}
\gdef\EPScreatortag {%Creator}
\gdef\EPSmetaposttag { MetaPost :. }
+\gdef\EPSmetapostspecialtag {%MetaPostSpecial}
\egroup
\long\def\checkEPSboundingbox#1#2:#3\end%
@@ -109,7 +118,9 @@
\expandafter \getEPSboundingbox #3 . . . \end
\global\chardef\EPSfound=2
\dofinishfile
- \fi\fi\fi\fi
+ \else\ifx\!!stringa\EPSmetapostspecialtag % only before finish!
+ \global\chardef\EPSspecial=1
+ \fi\fi\fi\fi\fi
\else\ifnum\EPSfound>0
\dofinishfile
\fi\fi}
diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex
index 5c6c7057e..94fb6ed8c 100644
--- a/tex/context/base/supp-fil.tex
+++ b/tex/context/base/supp-fil.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D \TEX\ operates on files, so one wouldn't wonder that there
@@ -41,7 +41,6 @@
%D \macros
%D {pushendofline,popendofline}
-%D {}
%D
%D When we are loading files in the middle of the typesetting
%D process, for instance when we load references, we have to be
@@ -59,6 +58,8 @@
%D Just to be sure, we save the current meaning of \type{^^M}
%D in \type{\poppedendofline}.
+\chardef\poppedendofline=\the\catcode`\^^M
+
\def\pushendofline
{\chardef\poppedendofline=\the\catcode`\^^M\relax
\catcode`\^^M=\@@comment\relax}
@@ -68,7 +69,6 @@
%D \macros
%D {scratchread, scratchwrite}
-%D {}
%D
%D We define a scratch file for reading. Keep in mind that
%D the number of files is limited to~16, so use this one when
@@ -76,6 +76,17 @@
\ifx\undefined\scratchread \newread \scratchread \fi
\ifx\undefined\scratchwrite \newwrite\scratchwrite \fi
+
+%D \macros
+%D {unlinkfile}
+%D
+%D Sometimes we want to make sure a file is deleted, so here
+%D is a macro that does the job. It's named after the \PERL\
+%D one.
+
+\def\unlinkfile#1%
+ {\immediate\openout\scratchwrite=#1\immediate\closeout\scratchwrite}
+
%D \macros
%D {doprocessfile,fileline,fileprocessedtrue,dofinishfile}
@@ -95,6 +106,8 @@
\newif\iffileprocessed
+\let\fileline\empty
+
\def\doprocessfile#1#2#3%
{\openin#1=#2\relax
\ifeof#1%
@@ -117,7 +130,7 @@
\fi}
%D \macros
-%D {pathplusfile}
+%D {pathplusfile,sanitizefilename}
%D
%D Use \type{\pathplusfile} to compose a full file name, like
%D in:
@@ -128,7 +141,23 @@
%D
%D By default, this expands into {\tt \pathplusfile{path}{file}}.
-\def\pathplusfile#1#2{#1/#2}
+\def\pathplusfile#1#2{#1\f!pathseparator#2}
+
+%D For the moment, we limit sanitizing to taking care of
+%D active \type {/}.
+
+\bgroup
+
+\catcode`\/=\@@active
+
+\gdef\sanitizefilename#1\to#2%
+ {\bgroup
+ \let/=\f!pathseparator
+ \expanded{\xdef\noexpand\sanitizedfilename{#1}}%
+ \egroup
+ \let#2\sanitizedfilename}
+
+\egroup
%D \macros
%D {readfile,ReadFile,maxreadlevel,
@@ -160,7 +189,7 @@
%D When some \TEX\ implementation starts looking for a file, it
%D normally first looks in the current directory. When no file
%D is found, \TEX\ starts searching on the path where format
-%D and/or style files are stored. Depending on the implementation
+%D and|/|or style files are stored. Depending on the implementation
%D this can considerably slow down processing speed.
%D
%D In \CONTEXT, we support a project||wise ordening of files.
@@ -189,10 +218,11 @@
\let\normalinput=\input
-\def\maxreadlevel {3}
+\def\maxreadlevel{3}
\def\doreadfile#1#2#3%
- {\immediate\openin\scratchread=#1\relax
+ {\sanitizefilename#1\to\readfilename
+ \immediate\openin\scratchread=\readfilename\relax
\ifeof\scratchread
\immediate\closein\scratchread
\decrement\readlevel
@@ -204,7 +234,7 @@
\else
\immediate\closein\scratchread
#2%
- \normalinput #1\relax
+ \normalinput\readfilename\relax
\fi}
\def\readfile#1%
@@ -421,12 +451,14 @@
\catcode`#1=\@@other
\fi}
-\def\startreadingfile%
+\def\startreadingfile% beter een every
{\doglobal\increment\readingfilelevel
\setxvalue{popfilecharacters::\readingfilelevel}%
- {\noexpand\popfilecharacter{"}{\the\catcode`"}%
+ {\noexpand\popfilecharacter{/}{\the\catcode`/}%
+ \noexpand\popfilecharacter{"}{\the\catcode`"}%
\noexpand\popfilecharacter{<}{\the\catcode`<}%
\noexpand\popfilecharacter{>}{\the\catcode`>}}%
+ \pushfilecharacter{/}%
\pushfilecharacter{"}%
\pushfilecharacter{<}%
\pushfilecharacter{>}}
diff --git a/tex/context/base/supp-fun.tex b/tex/context/base/supp-fun.tex
index 61bceef76..769ec848f 100644
--- a/tex/context/base/supp-fun.tex
+++ b/tex/context/base/supp-fun.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\unprotect
diff --git a/tex/context/base/supp-ini.tex b/tex/context/base/supp-ini.tex
index 134a6381d..4eca9b051 100644
--- a/tex/context/base/supp-ini.tex
+++ b/tex/context/base/supp-ini.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Support Macros / Initializations}
diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex
index 83c0a49fd..94918583a 100644
--- a/tex/context/base/supp-lan.tex
+++ b/tex/context/base/supp-lan.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D \gdef\starttest%
@@ -229,7 +229,7 @@
%D {\let\nextnextnext=\egroup
%D \ifx |\next
%D \checkafterdiscretionary
-%D \prewordbreak\hbox{\compoundhyphen\nextnext}\allowbreak
+%D \prewordbreak\hbox{\compoundhyphen\nextnext}\allowbreak\postwordbreak
%D \else\ifx=\next
%D \prewordbreak\compoundhyphen
%D \else\ifx~\next
@@ -242,7 +242,7 @@
%D \prewordbreak\discretionary{-}{}{'}\postwordbreak
%D \else
%D \checkafterdiscretionary
-%D \prewordbreak\hbox{\betweendiscretionaries\nextnext}\allowbreak
+%D \prewordbreak\hbox{\betweendiscretionaries\nextnext}\allowbreak\postwordbreak
%D \fi\fi\fi\fi\fi\fi
%D \nextnextnext}
%D
@@ -350,31 +350,45 @@
%D In \type {lang-ger.tex} we define some language specific
%D commands for german input, like:
%D
-%D \starttyping
+%D \starttypen
%D \startlanguagespecifics[de]
%D \installcompoundcharacter "a {\moveaccent{-.1ex}\"a\midworddiscretionary}
%D \stoplanguagespecifics
-%D \stoptyping
+%D \stoptypen
%D
%D Occasionally we have to redefine such an active character,
%D like in:
%D
-%D \starttyping
+%D \starttypen
%D \startencoding[pdfdoc]
%D \startlanguagespecifics[de]
%D \defineactivecharacter " {\"}
%D \stoplanguagespecifics
%D \stopencoding
-%D \stoptyping
+%D \stoptypen
%D
%D Here is the command we used:
+% \def\next{#2}% \unexpanded\def\next is wrong in non||etex
+% \uppercase{\let~\next}%
+
\def\defineactivecharacter #1 #2%
{\catcode`#1=\@@active
\scratchcounter=\the\uccode`~
\uccode`~=`#1\relax
- \def\next{#2}%
- \uppercase{\let~\next}%
+ \uppercase{\def\next{~}}%
+ \expandafter\unexpanded\expandafter\def\next{#2}%
+ \uccode`~=\scratchcounter}
+
+%D The next alternative also supports character numbers:
+
+\def\defineactivecharacter #1 #2%
+ {\scratchcounter=\the\uccode`~
+ \expandafter\doifnumberelse\expandafter{\string#1}
+ {\catcode #1=\@@active \uccode`~= #1\relax}
+ {\catcode`#1=\@@active \uccode`~=`#1\relax}%
+ \uppercase{\def\next{~}}%
+ \expandafter\unexpanded\expandafter\def\next{#2}%
\uccode`~=\scratchcounter}
%D Although adapting character codes and making characters
@@ -405,7 +419,7 @@
\checkafterdiscretionary
\bgroup
\checkbeforediscretionary
- \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak
+ \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak\postwordbreak
\egroup
\else\ifx=\next
\prewordbreak\textmodediscretionary
@@ -436,10 +450,9 @@
\checkafterdiscretionary
\bgroup
\checkbeforediscretionary
- %\prewordbreak\hbox{\betweendiscretionary\nextnext}\allowbreak
\prewordbreak
\discretionary{\hbox{\betweendiscretionary}}{}{\hbox{\betweendiscretionary}}%
- \postwordbreak
+ \allowbreak\postwordbreak
\egroup
\fi\fi\fi\fi\fi\fi\fi\fi\fi
\nextnextnext}
@@ -550,7 +563,7 @@
\checkafterdiscretionary
\bgroup
\checkbeforediscretionary
- \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak
+ \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak\postwordbreak
\egroup
\else\ifnum\uccode`==\nextuccode
\prewordbreak\textmodediscretionary
@@ -584,7 +597,7 @@
%\prewordbreak\hbox{\betweendiscretionary\nextnext}\allowbreak
\prewordbreak
\discretionary{\hbox{\betweendiscretionary}}{}{\hbox{\betweendiscretionary}}%
- \postwordbreak
+ \allowbreak\postwordbreak
\egroup
\fi\fi\fi\fi\fi\fi\fi\fi\fi
\nextnextnext}
@@ -725,7 +738,8 @@
\long\def\handlecompoundcharacterone#1#2%
{\ifx#1#2%
- \def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}}%
+ %\def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}}%
+ \def\next{\getvalue{\@nc@\string#1}}%
\else\expandafter\ifx\csname\@cc@\string#1\string#2\endcsname\relax
\def\next{\getvalue{\@nc@\string#1}#2}%
\else
@@ -735,7 +749,8 @@
\long\def\handlecompoundcharactertwo#1#2#3%
{\ifx#1#2%
- \def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}#3}%
+ %\def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}#3}%
+ \def\next{\getvalue{\@nc@\string#1}#3}%
\else\@EA\ifx\csname\@cs@\string#1\string#2\string#3\endcsname\relax
\expandafter\ifx\csname\@cc@\string#1\string#2\endcsname\relax
\def\next{\getvalue{\@nc@\string#1}#2#3}%
@@ -753,7 +768,8 @@
\long\def\handlecompoundcharacterone#1#2%
{\ifx#1#2%
- \def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}}%
+ %\def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}}%
+ \def\next{\getvalue{\@nc@\string#1}}%
\else\ifcsname\@cc@\string#1\string#2\endcsname
\def\next{\getvalue{\@cc@\string#1\string#2}}%
\else
@@ -763,7 +779,8 @@
\long\def\handlecompoundcharactertwo#1#2#3%
{\ifx#1#2%
- \def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}#3}%
+ %\def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}#3}%
+ \def\next{\getvalue{\@nc@\string#1}#3}%
\else\ifcsname\@cs@\string#1\string#2\string#3\endcsname
\def\next{\getvalue{\@cs@\string#1\string#2\string#3}}%
\else\ifcsname\@cc@\string#1\string#2\endcsname
@@ -775,6 +792,34 @@
\endETEX
+%D For very obscure applications (see for an application \type
+%D {lang-sla.tex}) we provide:
+
+\def\dosimplifiedcompoundcharacter#1%
+ {#1}
+
+\beginTEX
+
+\def\simplifiedcompoundcharacter#1#2%
+ {\@EA\ifx\csname\@cc@\string#1\string#2\endcsname\relax
+ #2%
+ \else
+ \@EA\@EA\@EA\dosimplifiedcompoundcharacter\csname\@cc@\string#1\string#2\endcsname
+ \fi}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\simplifiedcompoundcharacter#1#2%
+ {\ifcsname\@cc@\string#1\string#2\endcsname
+ \@EA\@EA\@EA\dosimplifiedcompoundcharacter\csname\@cc@\string#1\string#2\endcsname
+ \else
+ #2%
+ \fi}
+
+\endETEX
+
%D \macros
%D {midworddiscretionary}
%D
@@ -808,7 +853,7 @@
%D which breaks at the appropriate places. Watch the \type{#}
%D hack.
%D
-%D When passed as argument, lik ein \type {\goto}, one needs
+%D When passed as argument, like in \type {\goto}, one needs
%D to substitute a \type {\\} for each \type{#}.
%D
%D \startbuffer
@@ -826,7 +871,20 @@
% 2 => alles na
% 3 => alles voor
-\unexpanded\def\hyphenatedurl#1%
+\bgroup
+\catcode`\&=12\gdef\ampercentletter {&}
+\catcode`\#=12\gdef\hashletter {#}
+\catcode`\_=12\gdef\underscoreletter {_}
+\catcode`\~=12\gdef\tildeletter {~}
+\catcode`\%=12\gdef\percentletter {%}
+\catcode`\?=12\gdef\questionmarkletter{?}
+\catcode`\@=12\gdef\atletter {@}
+\catcode`\/=12\gdef\slashletter {/}
+\egroup
+
+\bgroup \catcode`\~=\active \catcode`\/=\active
+
+\unexpanded\gdef\hyphenatedurl#1% {}{} handles accents
{\bgroup
\obeyhyphens
\def\splitbefore##1%
@@ -842,49 +900,45 @@
\fi}%
\def\splitafter##1%
{\ifcase\urlsplitmode
- ##1%
+ ##1{}{}%
\or
- \prewordbreak\discretionary{##1}{}{##1}\prewordbreak
+ \prewordbreak\discretionary{##1{}{}}{}{##1{}{}}\prewordbreak
\or
- \prewordbreak\discretionary{##1}{}{##1}\prewordbreak
+ \prewordbreak\discretionary{##1{}{}}{}{##1{}{}}\prewordbreak
\else
- \prewordbreak\discretionary{}{##1}{##1}\prewordbreak
+ \prewordbreak\discretionary{}{##1{}{}}{##1{}{}}\prewordbreak
\fi}%
\def\flushurl%
{\savedurl\let\savedurl\empty}%
\def\\%
{\spliturl\#}%
- \let~\~%
+ \let\~=\tildeletter \let~=\~%
+ \let\/=\slashletter \let/=\/%
\let\savedurl\empty
\handletokens#1\with\scanurl
\egroup}
-\bgroup
-\catcode`\#=12\gdef\hashletter {#}
-\catcode`\_=12\gdef\underscoreletter {_}
-\catcode`\~=12\gdef\tildeletter {~}
-\catcode`\%=12\gdef\percentletter {%}
-\catcode`\?=12\gdef\questionmarkletter{?}
-\catcode`\@=12\gdef\atletter {@}
\egroup
\def\scanurl#1%
{\ifx#1\~%
- \flushurl\splitbefore{\~{}}%
+ \flushurl\splitbefore\~%
\else\ifx#1\#%
- \flushurl\splitbefore\#%
+ \flushurl\splitbefore\#%
\else\ifx#1\&%
- \flushurl\splitbefore\&%
+ \flushurl\splitbefore\&%
\else\ifx#1\%%
- \flushurl\splitbefore\%%
+ \flushurl\splitbefore\%%
\else\ifx#1\_%
- \flushurl\splitbefore\_%
+ \flushurl\splitbefore\_%
\else\if\noexpand#1\relax
#1%
\else\ifnum\catcode`#1=8
- \flushurl\splitbefore\_%
+ \flushurl\splitbefore\_%
\else\ifnum\catcode`#1=6
- \flushurl\splitbefore\#%
+ \flushurl\splitbefore\#%
+ \else\ifnum\catcode`#1=4
+ \flushurl\splitbefore\&%
\else\if#1\tildeletter
\flushurl\splitbefore\~%
\else\if#1\percentletter
@@ -895,21 +949,21 @@
\flushurl\splitafter\questionmarkletter
\else\if#1\atletter
\flushurl\splitafter\atletter
+ \else\if#1\slashletter
+ \edef\savedurl{\savedurl\slashletter}%
\else\if#1+%
\flushurl\splitafter+%
\else\if#1:%
\flushurl\splitafter:%
\else\if#1.%
\flushurl\splitafter.%
- \else\if#1/%
- \edef\savedurl{\savedurl/}%
\else
\ifx\savedurl\empty\else
\splitbefore\savedurl
\let\savedurl\empty
\fi
#1%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
%D \macros
%D {hyphenatedfile}
diff --git a/tex/context/base/supp-mat.tex b/tex/context/base/supp-mat.tex
index 58613ca33..810b71c02 100644
--- a/tex/context/base/supp-mat.tex
+++ b/tex/context/base/supp-mat.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D For practical reasons, I decided to move some math things to
diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex
index 8eb0e68ba..c8071bf55 100644
--- a/tex/context/base/supp-mis.tex
+++ b/tex/context/base/supp-mis.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D Some support modules are more or less independant. This
diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex
index c7c920e21..51ea39dea 100644
--- a/tex/context/base/supp-mps.tex
+++ b/tex/context/base/supp-mps.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% E-tex : a primitive that tells us that \write18 works
@@ -154,7 +154,11 @@
%D process the \METAPOST\ file \type{mpgraph} between two
%D succesive \TEX\ runs.
-\def\MPgraphicfile{mp\ifMPrun run\else graph\fi}
+\ifx\MPgraphicfile\undefined
+
+ \def\MPgraphicfile{mp\ifMPrun run\else graph\fi}
+
+\fi
%D \macros
%D {MPgraphic}
@@ -182,23 +186,30 @@
%D implement both schemes.
%D \macros
-%D {MPinclusions, startMPinclusions}
+%D {MPinclusions, startMPinclusions, MPinitializations}
%D
%D One can include for instance common input commands by
%D passing them to \type{\MPinclusions}:
%D
%D \starttypen
-%D \MPinclusions{input tools}
+%D \MPinclusions{input mp-mine}
%D \stoptypen
+%D
+%D The token register type {\MPinitializations} is expanded
+%D before all other inclusions.
-\let\theMPinclusions=\empty
+\newtoks \MPinitializations
\long\def\startMPinclusions#1\stopMPinclusions%
- {\long\def\theMPinclusions{\writeMPgraphic{#1}}}
+ {\long\def\theMPinclusions%
+ {\@EA\expanded\@EA{\@EA\writeMPgraphic\@EA{\the\MPinitializations;}}%
+ \writeMPgraphic{#1}}}
\long\def\MPinclusions#1%
{\startMPinclusions#1\stopMPinclusions}
+\startMPinclusions \stopMPinclusions
+
%D \macros
%D {iflongMPlines}
%D
@@ -211,8 +222,15 @@
\newif\iflongMPlines
+\ifx \overlaywidth \undefined \def \overlaywidth {4cm} \fi
+\ifx \overlayheight \undefined \def \overlayheight {3cm} \fi
+\ifx \overlaylinewidth \undefined \def \overlaylinewidth {0pt} \fi
+
\long\def\writeMPgraphic#1%
{\bgroup
+ \edef\overlaywidth {\overlaywidth \space}%
+ \edef\overlayheight {\overlayheight \space}%
+ \edef\overlaylinewidth {\overlaylinewidth\space}%
\iflongMPlines
\let\par=\empty
\long\def\flush##1##2\par%
@@ -224,20 +242,22 @@
\else
\long\def\flush##1##2;%
{\ifx##1\relax \else
- \dowriteMPgraphicline##1##2btex\relax etex\MPend
+ \dowriteMPgraphicline##1##2tex \relax etex\MPend
\expandafter\flush
\fi}%
\flush#1\empty;\relax;%
\fi
\egroup}
-%D The \type{;} aware method (the \type{\else} branch) also
-%D takes care of \type{btex}||\type{etex} bound data.
+%D The \type {;} aware method (the \type {\else} branch) also
+%D takes care of \type {btex}||\type {etex}, \type
+%D {verbatimtex}||\type {etex}. The space after \type {tex}
+%D is essential, since it protects \type {text}.
\def\dowriteMPgraphicline%
{\futurelet\next\dodowriteMPgraphicline}
-\long\def\dodowriteMPgraphicline#1btex#2#3etex#4\MPend%
+\long\def\dodowriteMPgraphicline#1tex #2#3etex#4\MPend%
{\ifx\next\empty\else\ifx\next\relax\else
\bgroup
\let\par=\empty
@@ -246,9 +266,9 @@
\egroup
\else
\convertargument#2#3\to\ascii
- \immediate\write\MPwrite{#1btex \ascii etex;}%
+ \immediate\write\MPwrite{#1tex \ascii etex}%
\egroup
- \dowriteMPgraphicline#4btex\relax etex\MPend
+ \dowriteMPgraphicline#4tex \relax etex\MPend
\fi
\fi\fi}
@@ -257,22 +277,37 @@
%D can handle this and users may consider it being a sort
%D of error prevention bonus.
+%D \macros
+%D {everyMPgraphic}
+%D
+%D Because some graphics interact with \TEX\ (i.e.\ \CONTEXT), we
+%D provide a hook for additional actions: \type {\everyMPgraphic}.
+
+\bgroup
+\catcode`\%=12\gdef\percentletter{%}
+\egroup
+
+\newtoks\everyMPgraphic
+
\def\writeMPgraph%
{\immediate\write\MPwrite{mpgraph:=\the\currentMPgraphic;}}
\def\startwritingMPgraphic%
{\ifMPrun \else
- \global\advance\currentMPgraphic by 1
+ \allocateMPslot\currentMPgraphic
\fi
\ifrunMPgraphics
+ \the\everyMPgraphic
\xdef\MPgraphic{\the\currentMPgraphic}%
\immediate\openout\MPwrite=\MPgraphicfile.mp
+ \immediate\write\MPwrite{\percentletter\space runtime generated graphic}%
\writeMPgraph
\setMPrandomseed
\theMPinclusions
\else
\xdef\MPgraphic{\the\currentMPgraphic}%
\ifnum\currentMPgraphic=1
+ \the\everyMPgraphic
\immediate\openout\MPwrite=\MPgraphicfile.mp
\writeMPgraph
\setMPrandomseed
@@ -311,6 +346,11 @@
\let\stopwritingMPgraphic=\relax
\let\flushMPgraphics =\relax
+%D By default each graphic gets its own slot (number):
+
+\def \allocateMPslot#1{\global\advance#1 by 1 }
+\def\deallocateMPslot#1{}
+
%D \macros
%D {setMPrandomseed}
%D
@@ -394,6 +434,7 @@
\vbox
{\forgetall
\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
+ \deallocateMPslot\currentMPgraphic
\placeMPgraphic}%
\setgvalue{#1}%
{\getobject{MP}{#1}}}
@@ -418,17 +459,30 @@
% \nouseMPbox{MP:#1}%
% \fi}}
+%\long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic%
+% {\doifundefined{MP:#1}
+% {\long\setgvalue{MP:#1}%
+% {\startMPgraphic#2\stopMPgraphic
+% \doifobjectssupportedelse{}{\useMPboxfalse}%
+% \ifuseMPbox
+% \douseMPbox{MP:#1}%
+% \else
+% \nouseMPbox{MP:#1}%
+% \fi
+% \getvalue{MP:#1}}}}
+
\long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic%
- {\doifundefined{MP:#1}
- {\setgvalue{MP:#1}%
- {\startMPgraphic#2\stopMPgraphic
- \doifobjectssupportedelse{}{\useMPboxfalse}%
- \ifuseMPbox
- \douseMPbox{MP:#1}%
- \else
- \nouseMPbox{MP:#1}%
- \fi
- \getvalue{MP:#1}}}}
+ {\ifundefined{MP:#1}%
+ \long\setgvalue{MP:#1}%
+ {\startMPgraphic#2\stopMPgraphic
+ \doifobjectssupportedelse{}{\useMPboxfalse}%
+ \ifuseMPbox
+ \douseMPbox{MP:#1}%
+ \else
+ \nouseMPbox{MP:#1}%
+ \fi
+ \getvalue{MP:#1}}%
+ \fi}
\def\reuseMPgraphic#1%
{\getvalue{MP:#1}}
@@ -443,7 +497,8 @@
{%\reuseMPgraphicstrue
\long\setgvalue{MP:#1}%
{\startMPgraphic#2\stopMPgraphic
- \loadcurrentMPgraphic{}%
+ \loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
+ \deallocateMPslot\currentMPgraphic
\placeMPgraphic}}
\let\useMPgraphic=\reuseMPgraphic
@@ -796,7 +851,7 @@
%D because MP can generate them anew.
\def\convertMPcolorpath{}
-\def\convertMPcolorfile{metacmyk.eps}
+\def\convertMPcolorfile{metacmyk.tmp}
\def\convertMPcolors#1%
{\bgroup
@@ -1038,7 +1093,8 @@
\setbox0=\hbox
{\expandafter\startMPgraphic\MPdrawingdata\stopMPgraphic
\loadcurrentMPgraphic\empty
- \placeMPgraphic}%
+%\deallocateMPslot\currentMPgraphic
+ \placeMPgraphic}%
\ifMPshiftdrawing
\dimen0=\MPllx bp
\dimen2=\MPlly bp
@@ -1075,6 +1131,63 @@
\def\dodoMPdivtenE #1#2{#1.#2}
\def\dodoMPdivtenF #1{.#1}
+%D \macros
+%D {startMPclip,grabMPclippath}
+%D
+%D We can use \METAPOST\ to calculate arbitrary clipping
+%D paths. Such a path is defined by (for instance):
+%D
+%D \starttypen
+%D \startMPclip{window}
+%D clip currentpicture to fullcircle xscaled \width yscaled \height ;
+%D \stopMPclip
+%D \stoptypen
+%D
+%D Such a path can be extracted (processed) by:
+%D
+%D \starttypen
+%D \grabMPpath{window}{method}{width}{height}{default path}
+%D \stoptypen
+%D
+%D Currently only method 1 makes sense; it produces \PDF\
+%D code. This macro only makes sense when hooked into a
+%D special routine.
+
+\long\def\startMPclip#1#2\stopMPclip%
+ {\long\setgvalue{MPC:#1}%
+ {\startMPgraphic#2\stopMPgraphic\dograbMPclippath}}
+
+\def\grabMPclippath#1#2#3#4#5%
+ {\bgroup
+ \edef\width {#3\space}\let\overlaywidth \width
+ \edef\height{#4\space}\let\overlayheight\height
+ \doifdefinedelse{MPC:#1}
+ {\getvalue{MPC:#1}%
+ \setxvalue{MPC:#1}{\noexpand\xdef\noexpand\MPclippath{\MPclippath}}}%
+ {\xdef\MPclippath{#5}}%
+ \ifcase#2\else
+ \doglobal\stripcharacter urveto\from\MPclippath\to\MPclippath
+ \doglobal\stripcharacter oveto\from\MPclippath\to\MPclippath
+ \doglobal\stripcharacter ineto\from\MPclippath\to\MPclippath
+ \fi
+ \egroup}
+
+%D We pose some restrictions to the \METAPOST\ code and pickup
+%D the last path in the file.
+
+\bgroup
+\catcode`\%=\@@active
+\catcode`\/=\@@comment
+\gdef\dograbMPclippath/ / the slash is now comment
+ {\setbox\scratchbox=\hbox\bgroup/ / the box grabs spaces
+ \catcode`\%=\@@active / the % token is a trigger
+ \obeylines\let\obeyedline\space / lines are ignores
+ \def%##1newpath##2closepath##3showpage/ we only need the path
+ {\xdef\MPclippath{##2}\endinput}/ / and can ignore the rest
+ \readfile{\MPgraphicfile.\the\currentMPgraphic}{}{}/
+ \egroup}
+\egroup
+
\protect
\endinput
diff --git a/tex/context/base/supp-mrk.tex b/tex/context/base/supp-mrk.tex
index 1f3a16bf1..e8144b778 100644
--- a/tex/context/base/supp-mrk.tex
+++ b/tex/context/base/supp-mrk.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D Remark: due to the lack of \type {\clearmark}, the \ETEX\
@@ -409,48 +409,82 @@
%D
%D However, I prefer the less \type{\cs} hungry ones. Beware,
%D these ones (and the next) do no longer support direct marks.
+%D
+%D \starttypen
+%D \newif\ifexpandmarks \expandmarkstrue
+%D
+%D \let\newmark \newmarks
+%D \let\gettopmark \topmarks
+%D \let\getbottommark \botmarks
+%D \let\getfirstmark \firstmarks
+%D \let\getsplitbottommark\splitbotmarks
+%D \let\getsplitfirstmark \splitfirstmarks
+%D
+%D \let\getbotmark \botmarks
+%D \let\getsplitbotmark \splitbotmarks
+%D \let\getsplittopmark \splitfirstmarks
+%D
+%D \long\def\setmark#1#2%
+%D {\ifexpandmarks
+%D \expanded{\normalmarks#1{#2}}%
+%D \else
+%D \normalmarks#1{#2}%
+%D \fi}
+%D \stoptypen
+
+%D Resetting marks in not compatible with the old method.
+%D Here a node is inserted, which can interfere badly. In
+%D fact, a real \type {\clearmarks\name} is needed.
+%D
+%D \starttypen
+%D \def\resetmark#1%
+%D {\marks#1{}}
+%D \stoptypen
-\newif\ifexpandmarks \expandmarkstrue
+%D A possible macro solution is presented here. When discussing
+%D \type {\clearmarks} on the \ETEX\ discussion list, Chris
+%D Rowley suggested to use a reset flag. Although suitable, a
+%D more natural low level solution would be better. So, for the
+%D moment, we could end up with a solution similar to the macro
+%D based multiple marks as implemented before. Alas, this
+%D alternative is useless too, because it does not synchronize
+%D well with previous values.
-\let\newmark \newmarks
-\let\gettopmark \topmarks
-\let\getbottommark \botmarks
-\let\getfirstmark \firstmarks
-\let\getsplitbottommark\splitbotmarks
-\let\getsplitfirstmark \splitfirstmarks
+\def\@m@{@m@}
-\let\getbotmark \botmarks
-\let\getsplitbotmark \splitbotmarks
-\let\getsplittopmark \splitfirstmarks
+\def\newmark#1%
+ {\newmarks#1%
+ \expandafter\gdef\csname\@m@\number#1\endcsname{0}}
\long\def\setmark#1#2%
- {\ifexpandmarks
+ {\expandafter\gdef\csname\@m@\number#1\endcsname{1}%
+ \ifexpandmarks
\expanded{\normalmarks#1{#2}}%
\else
\normalmarks#1{#2}%
\fi}
-%D Resetting marks in not compatible with the old method.
-%D Here a node is inserted, which can interfere badly. In
-%D fact, a real \type {\clearmarks\name} is needed.
+\def\gettopmark {\getsomemark\topmarks}
+\def\getbottommark {\getsomemark\botmarks}
+\def\getfirstmark {\getsomemark\firstmarks}
+\def\getsplitbottommark{\getsomemark\splitbotmarks}
+\def\getsplitfirstmark {\getsomemark\splitfirstmarks}
-\def\resetmark#1% interferes ! test this one on the big manual footers
- {\marks#1{}}
+\def\getsomemark#1#2%
+ {\ifnum\csname\@m@\number#2\endcsname=1 #1#2\fi}
-%D What a hack!
-
-\newcount\resettedmarks
-
-\def\clearmarks#1% a rather memory hungry alternative
- {\edef\rubish{\topmarks#1\botmarks#1\firstmarks#1}%
- \ifx\rubish\empty\else
- %\global\advance\resettedmarks by 1 \message{(m:\the\resettedmarks)}%
- \newmarks#1%
- \fi}
+\def\clearmarks#1%
+ {\expandafter\gdef\csname\@m@\number#1\endcsname{0}}
\def\resetmark%
{\clearmarks}
+\let\getbotmark \getbottommark
+\let\getsplitbotmark \getsplitbottommark
+\let\getsplittopmark \getsplitfirstmark
+
+%D Hm.
+
\def\noninterferingmarks%
{\let\savedsetmark\setmark
\let\noninterferingmarks\relax
diff --git a/tex/context/base/supp-num.tex b/tex/context/base/supp-num.tex
index b5f347f52..d0d72a191 100644
--- a/tex/context/base/supp-num.tex
+++ b/tex/context/base/supp-num.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Support Macros / Number (Digit) Handling}
diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex
index 9d56fb47d..972a4b02a 100644
--- a/tex/context/base/supp-pdf.tex
+++ b/tex/context/base/supp-pdf.tex
@@ -8,19 +8,22 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D These macros are written as generic as possible. Some
%D general support macro's are loaded from a small module
%D especially made for non \CONTEXT\ use. In this module I
%D use a matrix transformation macro written by Tanmoy
-%D Bhattacharya. Thanks to extensive testing of Sebastian
+%D Bhattacharya. Thanks to extensive testing by Sebastian
%D Ratz I was able to complete this module within reasonable
-%D time. First we take care of non||\CONTEXT\ use:
+%D time. This module has support for \METAPOST\ extensions
+%D built in.
-\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
-\ifx \undefined \convertPDFtoPDF \else \expandafter \endinput \fi
+%D First we take care of non||\CONTEXT\ use:
+
+\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
+\ifx \undefined \convertMPtoPDF \else \expandafter \endinput \fi
%D This module handles some \PDF\ conversion and insertions
%D topics. By default, the macros use the \PDFTEX\ primitive
@@ -36,6 +39,54 @@
\let\PDFcode=\pdfliteral
\fi
+%D \macros
+%D {pdfimage,pdfimages}
+%D
+%D Starting with pdftex version 14, images are included more
+%D natural to the form embedding. This enables alternative
+%D images to be embedded.
+%D
+%D \starttypen
+%D \pdfimage <optional dimensions> {file}
+%D \pdfimages <optional dimensions> {high res file} {low res file}
+%D \stoptypen
+%D
+%D The first one replaces the pre||version||14 original,
+%D while the latter provides alternative images.
+
+\ifx\pdftexversion\undefined
+
+ \writestatus{\m!systems}{Why not use pdf(e)TeX binaries?}
+
+\else\ifnum\pdftexversion>13
+
+ \def\pdfimage#1#%
+ {\dopdfimage{#1}}
+
+ \def\dopdfimage#1#2%
+ {\immediate\pdfximage#1{#2}%
+ \pdfrefximage\pdflastximage}
+
+ \def\pdfimages#1#%
+ {\dopdfimages{#1}}
+
+ \def\dopdfimages#1#2#3%
+ {\immediate\pdfximage#1{#2}%
+ \immediate\pdfobj
+ {[ << /Image \the\pdflastximage\space0 R
+ /DefaultForPrinting true >> ]}%
+ \immediate\pdfximage#1
+ attr {/Alternates \the\pdflastobj\space0 R}{#3}%
+ \pdfrefximage\pdflastximage}
+
+%D For old times sake:
+
+ \let\pdfform =\pdfxform
+ \let\pdflastform=\pdflastxform
+ \let\pdfrefform =\pdfrefxform
+
+\fi\fi
+
%D \macros
%D {convertPDFtoPDF}
%D
@@ -274,11 +325,13 @@
\def \PSconcat {concat}
\def \PSdtransform {dtransform}
-\def \PSnfont {nfont}
-
+\def \PSnfont {nfont} % was needed for TUG98 proceedings
+\def \PSspecial {special} % extensions to MetaPost
+
\def \PSBoundingBox {BoundingBox:}
\def \PSHiResBoundingBox {HiResBoundingBox:}
\def \PSExactBoundingBox {ExactBoundingBox:}
+\def \PSMetaPostSpecial {MetaPostSpecial:}
\def \PSPage {Page:}
%D By the way, the \type {setcmykcolor} operator is not
@@ -367,12 +420,17 @@
%D When we reset the stack, we can assume that all further
%D comment is to be ignored as well as handled in strings.
%D By redefining the reset macro after the first call, we
-%D save some run time.
+%D save some run time. Only use this macro after all
+%D comments are processed and use the simple alternative
+%D when dealing with comments.
+
+\def\doresetMPstack%
+ {\nofMParguments=0 }
\def\resetMPstack%
{\catcode`\%=\@@active
\let\handleMPgraphic=\handleMPendgraphic
- \def\resetMPstack{\nofMParguments=0 }%
+ \let\resetMPstack\doresetMPstack
\resetMPstack}
%D The arguments are saved with the preceding command
@@ -480,59 +538,62 @@
\ifx\somestring\PSmoveto
\edef\lastMPmoveX{\gMPa1}%
\edef\lastMPmoveY{\gMPa2}%
- \pdfliteral{\!MP{\gMPa1} \!MP{\gMPa2} m}%
+ \PDFcode{\!MP{\gMPa1} \!MP{\gMPa2} m}%
\resetMPstack
\else\ifx\somestring\PSnewpath
\let\handleMPsequence=\handleMPpath
\else\ifx\somestring\PSgsave
- \pdfliteral{q}%
+ \PDFcode{q}%
\resetMPstack
\else\ifx\somestring\PSgrestore
- \pdfliteral{Q}%
+ \PDFcode{Q}%
\resetMPstack
\else\ifx\somestring\PSdtransform % == setlinewidth
\let\handleMPsequence=\handleMPdtransform
\else\ifx\somestring\PSconcat
- \pdfliteral{\gMPa1 \gMPa2 \gMPa3 \gMPa4 \gMPa5 \gMPa6 cm}%
+ \PDFcode{\gMPa1 \gMPa2 \gMPa3 \gMPa4 \gMPa5 \gMPa6 cm}%
\resetMPstack
\else\ifx\somestring\PSsetrgbcolor
- \pdfliteral{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} rg
+ \PDFcode{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} rg
\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} RG}%
\resetMPstack
\else\ifx\somestring\PSsetcmykcolor
- \pdfliteral{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} \!MP{\gMPa4} k
+ \PDFcode{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} \!MP{\gMPa4} k
\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} \!MP{\gMPa4} K}%
\resetMPstack
\else\ifx\somestring\PSsetgray
- \pdfliteral{\!MP{\gMPa1} g \!MP{\gMPa1} G}%
+ \PDFcode{\!MP{\gMPa1} g \!MP{\gMPa1} G}%
\resetMPstack
\else\ifx\somestring\PStranslate
- \pdfliteral{1 0 0 1 \gMPa1 \gMPa2 cm}%
+ \PDFcode{1 0 0 1 \gMPa1 \gMPa2 cm}%
\resetMPstack
\else\ifx\somestring\PSsetdash
\handleMPsetdash
\resetMPstack
\else\ifx\somestring\PSsetlinejoin
- \pdfliteral{\gMPa1 j}%
+ \PDFcode{\gMPa1 j}%
\resetMPstack
\else\ifx\somestring\PSsetmiterlimit
- \pdfliteral{\gMPa1 M}%
+ \PDFcode{\gMPa1 M}%
\resetMPstack
\else\ifx\somestring\PSfshow
\handleMPfshow
\resetMPstack
\else\ifx\somestring\PSsetlinecap
- \pdfliteral{\gMPa1 J}%
+ \PDFcode{\gMPa1 J}%
\resetMPstack
\else\ifx\somestring\PSrlineto
- \pdfliteral{\!MP{\lastMPmoveX} \!MP{\lastMPmoveY} l S}%
+ \PDFcode{\!MP{\lastMPmoveX} \!MP{\lastMPmoveY} l S}%
\resetMPstack
\else\ifx\somestring\PSscale
- \pdfliteral{\gMPa1 0 0 \gMPa2 0 0 cm}%
+ \PDFcode{\gMPa1 0 0 \gMPa2 0 0 cm}%
+ \resetMPstack
+ \else\ifx\somestring\PSspecial
+ \handleMPspecialcommand
\resetMPstack
\else
\handleMPgraphic{#1#2}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi
\else
\edef\somestring{#1#2}%
@@ -562,9 +623,11 @@
\let\handleMPsequence=\finishMPgraphic
\else\ifx\somestring\PSPage
\let\handleMPsequence=\handleMPpage
+ \else\ifx\somestring\PSMetaPostSpecial
+ \let\handleMPsequence=\handleMPspecialcomment
\else
\setMPargument{#1}% kan weg
- \fi\fi\fi\fi\fi}
+ \fi\fi\fi\fi\fi\fi}
\let\handleMPgraphic=\handleMPbegingraphic
@@ -602,7 +665,7 @@
\xdef\MPheight{\the\dimen2}%
\chardef\currentMPboundingbox=#1\relax
\fi
- \nofMParguments=0
+ \doresetMPstack
\let\handleMPsequence=\dohandleMPsequence
\let\next=\handleMPsequence
\ifskipemptyMPgraphic
@@ -612,15 +675,29 @@
\fi
\next}
+%D Unless defined otherwise, we simply ignore specialcomments.
+
+\def\handleMPspecialcomment%
+ {\doresetMPstack
+ \let\handleMPsequence=\dohandleMPsequence
+ \handleMPsequence}
+
%D We use the \type{page} comment as a signal that
%D stackbuilding can be started.
\def\handleMPpage #1 #2
- {\nofMParguments=0
+ {\doresetMPstack
\donetrue
\let\handleMPsequence=\dohandleMPsequence
\handleMPsequence}
+%D The same applies to the special extensions.
+
+\def\handleMPspecialcommand
+ {\doresetMPstack
+ \let\handleMPsequence=\dohandleMPsequence
+ \handleMPsequence}
+
%D \METAPOST\ draws it dots by moving to a location and
%D invoking \type{0 0 rlineto}. This operator is not
%D available in \PDF. Our solution is straightforward: we draw
@@ -790,15 +867,15 @@
\nofMPsegments=1
\loop
\expandafter\ifcase\getMPkeyword{\the\nofMPsegments}\relax
- \pdfliteral{\!MP{\gMPs1} \!MP{\gMPs2} l}%
+ \PDFcode{\!MP{\gMPs1} \!MP{\gMPs2} l}%
\or
- \pdfliteral{\!MP{\gMPs1} \!MP{\gMPs2} \!MP{\gMPs3} \!MP{\gMPs4} \!MP{\gMPs5} \!MP{\gMPs6} c}%
+ \PDFcode{\!MP{\gMPs1} \!MP{\gMPs2} \!MP{\gMPs3} \!MP{\gMPs4} \!MP{\gMPs5} \!MP{\gMPs6} c}%
\or
- \pdfliteral{\!MP{\lastMPmoveX} \!MP{\lastMPmoveY} l S}%
+ \PDFcode{\!MP{\lastMPmoveX} \!MP{\lastMPmoveY} l S}%
\or
\edef\lastMPmoveX{\gMPs1}%
\edef\lastMPmoveY{\gMPs2}%
- \pdfliteral{\!MP{\lastMPmoveX} \!MP{\lastMPmoveY} m}%
+ \PDFcode{\!MP{\lastMPmoveX} \!MP{\lastMPmoveY} m}%
\fi
\advance\nofMPsegments by 1\relax
\ifnum\nofMPsegments<\scratchcounter
@@ -810,23 +887,23 @@
\loop
\expandafter\ifcase\getMPkeyword{\the\nofMPsegments}\relax
\doMPconcat{\gMPs1}\a{\gMPs2}\b%
- \pdfliteral{\!MP{\a} \!MP{\b} l}%
+ \PDFcode{\!MP{\a} \!MP{\b} l}%
\or
\doMPconcat{\gMPs1}\a{\gMPs2}\b%
\doMPconcat{\gMPs3}\c{\gMPs4}\d%
\doMPconcat{\gMPs5}\e{\gMPs6}\f%
- \pdfliteral{\!MP{\a} \!MP{\b} \!MP{\c} \!MP{\d} \!MP{\e} \!MP{\f} c}%
+ \PDFcode{\!MP{\a} \!MP{\b} \!MP{\c} \!MP{\d} \!MP{\e} \!MP{\f} c}%
\or
\bgroup
\noMPtranslate
\doMPconcat\lastMPmoveX\a\lastMPmoveY\b%
- \pdfliteral{\!MP{\a} \!MP{\b} l S}%
+ \PDFcode{\!MP{\a} \!MP{\b} l S}%
\egroup
\or
\edef\lastMPmoveX{\gMPs1}%
\edef\lastMPmoveY{\gMPs2}%
\doMPconcat\lastMPmoveX\a\lastMPmoveY\b%
- \pdfliteral{\!MP{\a} \!MP{\b} m}%
+ \PDFcode{\!MP{\a} \!MP{\b} m}%
\fi
\advance\nofMPsegments by 1\relax
\ifnum\nofMPsegments<\scratchcounter
@@ -1155,10 +1232,13 @@
%D The path is output using the values saved on the stack. If
%D needed, all coordinates are recalculated.
+\def\finishMPpath%
+ {\PDFcode{\ifcase\finiMPpath W n\or S\or f\or B\fi}}
+
\def\processMPpath%
{\flushMPpath
\closeMPpath
- \PDFcode{\ifcase\finiMPpath W n\or S\or f\or B\fi}%
+ \finishMPpath
\let\handleMPsequence=\dohandleMPsequence
\resetMPstack
\nofMPsegments=0
@@ -1235,15 +1315,38 @@
%D \convertMPtoPDF{mp-pra-1.eps}{.5}{.5}
%D \stoptypen
+%D \macros
+%D {makeMPintoPDFobject,lastPDFMPobject}
+%D
+%D For experts there are a few more options. When attributes
+%D are to be added, the code muts be embedded in an object
+%D accompanied with the appropriate directives. One can
+%D influence this process with \type {\makeMPintoPDFobject}.
+%D
+%D This option defaults to~0, because \CONTEXT\ takes care
+%D of objects at another level, which saves some bytes.
+%D
+%D \starttabulatie[|l|l|p|]
+%D \NC 0 \NC never \NC don't use an object \NC\NR
+%D \NC 1 \NC always \NC always use an object \NC\NR
+%D \NC 2 \NC optional \NC use object when needed \NC\NR
+%D \stoptabulatie
+%D
+%D The last object number used is avaliable in the macro
+%D \type {\lastPDFMPobject}.
+
+\chardef\makeMPintoPDFobject=0 \def\lastPDFMPobject{0}
+
+%D The additional code needed can be made available in the
+%D (global) macro \type {\currentPDFresources}.
+
+\let\currentPDFresources\empty
+
\def\processMPtoPDFfile% file xscale yscale
{\bgroup
\let\finishMPgraphic=\egroup
\doprocessMPtoPDFfile}
-\ifx\deleteMPgraphic\undefined
- \def\deleteMPgraphic#1{}
-\fi
-
\def\doprocessMPtoPDFfile#1#2#3% file xscale yscale
{\setMPspecials
\catcode`\^^M=\@@endofline
@@ -1263,12 +1366,22 @@
\forgetall
\offinterlineskip
\PDFcode{q}%
+ \startMPresources
\doprocessMPtoPDFfile{#1}{#2}{#3}}
\def\finishMPgraphic%
- {\PDFcode{Q}%
+ {\stopMPresources
+ \PDFcode{Q}%
\egroup
\wd0=\MPwidth
+ \ifx\pdftexversion\undefined\else\ifnum\pdftexversion<14 % for the moment
+ \chardef\makeMPintoPDFobject=0
+ \fi\fi
+ \ifcase\makeMPintoPDFobject\or
+ \setbox0=
+ \or\ifx\currentPDFresources\empty\else
+ \chardef\makeMPintoPDFobject=1 \setbox0=
+ \fi\fi
\vbox to \MPheight
{\forgetall
\vfill
@@ -1276,8 +1389,30 @@
\MPxoffset\space \MPyoffset\space cm}%
\box0
\PDFcode{Q}}%
+ \ifcase\makeMPintoPDFobject\or
+ \immediate\pdfxform attr{\currentPDFresources}0%
+ \xdef\lastPDFMPobject{\the\pdflastxform}%
+ \pdfrefxform\lastPDFMPobject
+ \global\let\currentPDFresources\empty
+ \fi
\egroup}
+%D \macros
+%D {deleteMPgraphic,
+%D startMPresources,
+%D stopMPresources}
+%D
+%D Here are a few hooks for \CONTEXT\ specific things.
+
+\ifx\deleteMPgraphic\undefined
+ \def\deleteMPgraphic#1{}
+\fi
+
+\ifx\startMPresources\undefined
+ \let\startMPresources\relax
+ \let\stopMPresources\relax
+\fi
+
%D \macros
%D {twodigitMPoutput}
%D
diff --git a/tex/context/base/supp-ran.tex b/tex/context/base/supp-ran.tex
new file mode 100644
index 000000000..efac4fa94
--- /dev/null
+++ b/tex/context/base/supp-ran.tex
@@ -0,0 +1,87 @@
+%D \module
+%D [ file=supp-ran,
+%D version=1998.01.21,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Random Number Generation,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Third Party Macros / Random Number Generation}
+
+%D \macros
+%D {getrandomcount, getrandomdimen,
+%D getrandomfloat, getrandomnumber,
+%D setrandomseed}
+%D
+%D This module load Donald Arseneau's generic file
+%D \type{random.tex}. A small shell is needed because we
+%D redefine some \TEX\ primitives. We also use different names
+%D for the two generators and add an extra one.
+%D
+%D \starttypen
+%D \getrandomcount \countregister {minimum} {maximum}
+%D \getrandomdimen \dimenregister {minimum} {maximum}
+%D \getrandomnumber \macroname {minimum} {maximum}
+%D \getrandomfloat \macroname {minimum} {maximum}
+%D \stoptypen
+%D
+%D Of course the file \type{random.tex} needs to be present.
+%D To prevent name clashes, the \CONTEXT\ distribution
+%D contains a copy in \type {thrd-ran.tex}.
+%D
+%D The randomseed can be set by:
+%D
+%D \starttypen
+%D \setrandomseed{number>0]
+%D \stoptypen
+
+
+\ifx\nextrandom\undefined
+
+ \readfile{random.tex}
+ {\writestatus{loading}{Donald Arseneau's 'random.tex' (found)}}
+ {\writestatus{loading}{Donald Arseneau's 'random.tex' (not found)}}
+
+\fi
+
+\ifx\nextrandom\undefined
+
+ \def\setrannum#1#2#3{#1=1 }
+ \def\setrandim#1#2#3{#1=1pt}
+
+\else
+
+ \let\normalnextrandom=\nextrandom
+
+ \def\nextrandom%
+ {\bgroup
+ \let\time =\normaltime
+ \let\day =\normalday
+ \let\month=\normalmonth
+ \let\year =\normalyear
+ \normalnextrandom
+ \global\let\nextrandom=\normalnextrandom
+ \egroup}
+
+\fi
+
+\let\getrandomcount = \setrannum
+\let\getrandomdimen = \setrandim
+
+\def\getrandomnumber#1#2#3%
+ {\getrandomcount{\scratchcounter}{#2}{#3}%
+ \edef#1{\the\scratchcounter}}
+
+\def\getrandomfloat#1#2#3%
+ {\getrandomdimen{\scratchdimen}{#2pt}{#3pt}%
+ \edef#1{\withoutpt\the\scratchdimen}}
+
+\def\setrandomseed#1%
+ {\randomi=#1\relax}
+
+\endinput
diff --git a/tex/context/base/supp-spe.tex b/tex/context/base/supp-spe.tex
index 405ccaf6d..1e68478f2 100644
--- a/tex/context/base/supp-spe.tex
+++ b/tex/context/base/supp-spe.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module implements some \type{\special} manipulation
diff --git a/tex/context/base/supp-tpi.tex b/tex/context/base/supp-tpi.tex
index cfc50e87b..47bb4d5b5 100644
--- a/tex/context/base/supp-tpi.tex
+++ b/tex/context/base/supp-tpi.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This modules implements the conversion of graphic \TPIC\
@@ -125,8 +125,8 @@
%D reflect the current \METAPOST\ picture, stored in the system
%D variable {\it currentpicture}, around the $x$-axis.
-\def\stopTPICspecials%
- {\writeMPgraphic
+\def\stopTPICspecials% needs to be adapted to direct run -> \useMPgraphic
+ {\writeMPgraphic % otherwise \flushMPgraphics interferes
{currentpicture:=currentpicture reflectedabout ((0,0),(4095,0));}%
\stopwritingMPgraphic
\flushMPgraphics
diff --git a/tex/context/base/supp-vis.tex b/tex/context/base/supp-vis.tex
index cf6320d62..8d0a41d07 100644
--- a/tex/context/base/supp-vis.tex
+++ b/tex/context/base/supp-vis.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D \gdef\ShowBufferedExample% private typeseting macro
diff --git a/tex/context/base/symb-ini.tex b/tex/context/base/symb-ini.tex
index a204ff2bf..b58a496d2 100644
--- a/tex/context/base/symb-ini.tex
+++ b/tex/context/base/symb-ini.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D The macros described here used to be part of the \type
@@ -32,10 +32,15 @@
\stopmessages
\startmessages german library: symbols
- title: symbole
+ title: Symbole
1: Lade Symboldatei --
\stopmessages
+\startmessages czech library: symbols
+ title: symboly
+ 1: nacita se soubor symbolu --
+\stopmessages
+
%D \macros
%D {definesymbol, symbol}
%D
@@ -224,24 +229,16 @@
%D We predefine some common symbols and conversions that will
%D be understood by many commands.
-% \definesymbol [1] [$\bullet$]
-% \definesymbol [2] [$-$]
-% \definesymbol [3] [$\star$]
-% \definesymbol [4] [$\triangleright$]
-% \definesymbol [5] [$\circ$]
-% \definesymbol [6] [\hbox{\setsmallbodyfont\raise\!!onepoint\hbox{$\bigcirc$}}]
-% \definesymbol [7] [$\bigcirc$]
-% \definesymbol [8] [\hbox{\hsmash{$\sqcup$}$\sqcap$}]
-
\definesymbol [\v!geen] []
-\definesymbol [bullet] [$\bullet$]
-\definesymbol [dash] [$-$]
-\definesymbol [star] [$\star$]
-\definesymbol [triangle] [$\triangleright$]
-\definesymbol [circle] [$\circ$]
+\definesymbol [bullet] [\mathematics{\bullet}]
+\definesymbol [dash] [\mathematics{-}]
+\definesymbol [star] [\mathematics{\star}]
+\definesymbol [triangle] [\mathematics{\triangleright}]
+\definesymbol [circle] [\mathematics{\circ}]
\definesymbol [medcircle] [\hbox{\setsmallbodyfont\raise\!!onepoint\hbox{$\bigcirc$}}]
-\definesymbol [bigcircle] [$\bigcirc$]
+\definesymbol [bigcircle] [\mathematics{\bigcirc}]
\definesymbol [square] [\hbox{\hsmash{$\sqcup$}$\sqcap$}]
+\definesymbol [diamond] [\mathematics{\diamond}]
\definesymbol [1] [{\symbol[bullet]}]
\definesymbol [2] [{\symbol[dash]}]
@@ -288,10 +285,10 @@
\def\gotobegincharacter%
{\hbox
{\dogotocharacter\blacktriangleleft
- {\setbox0=\hbox{$\triangleleft$}%
+ {\setbox0=\hbox{\mathematics{\triangleleft}}%
\vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0
\kern-.11ex\box0}
- {\setbox0=\hbox{$\blacktriangleleft$}%
+ {\setbox0=\hbox{\mathematics{\blacktriangleleft}}%
\setbox2=\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
\hbox{\lower.03ex\box2\kern-.35ex\box0}}}}
@@ -301,7 +298,7 @@
{\setbox0=\hbox{\mathematics{\triangleright}}%
\copy0\kern-.11ex
\vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0}
- {\setbox0=\hbox{$\blacktriangleright$}%
+ {\setbox0=\hbox{\mathematics{\blacktriangleright}}%
\setbox2=\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
\hbox{\box0\kern-.35ex\lower.03ex\box2}}}}
@@ -309,7 +306,7 @@
{\mathematics{\dogotocharacter\blacktriangleright\triangleleft\blacktriangleleft}}
\def\goforwardcharacter%
- {\mathematics{\dogotocharacter\blacktriangleleft\triangleright\blacktriangleright}}
+ {\mathematics{\dogotocharacter\blacktriangleright\triangleright\blacktriangleright}}
\def\gonowherecharacter%
{\mathematics{\bullet}}
diff --git a/tex/context/base/symb-nav.tex b/tex/context/base/symb-nav.tex
index bb2caaa80..3e59ef5da 100644
--- a/tex/context/base/symb-nav.tex
+++ b/tex/context/base/symb-nav.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\unprotect
diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex
index 51d7c36e7..1c8ad40e0 100644
--- a/tex/context/base/syst-ext.tex
+++ b/tex/context/base/syst-ext.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context System Macro's / Extras}
@@ -129,7 +129,6 @@
%D \macros
%D {newcounter,
%D increment,decrement}
-%D {}
%D
%D Unfortunately the number of \COUNTERS\ in \TEX\ is limited,
%D but fortunately we can store numbers in a macro. We can
@@ -273,7 +272,6 @@
%D \macros
%D {strippedcsname}
-%D {}
%D
%D The next macro can be very useful when using \type{\csname}
%D like in:
@@ -291,7 +289,6 @@
%D {newconditional,
%D settrue, setfalse,
%D ifconditional}
-%D {}
%D
%D \TEX's lacks boolean variables, although the \PLAIN\ format
%D implements \type{\newif}. The main disadvantage of this
@@ -391,15 +388,15 @@
\def\recursedepth%
{\the\outerrecurse}
+\let\nextrecurse\relax
+
\long\def\dostepwiserecurse#1#2#3#4%
- {\ifcase#2\relax
+ {%\let\nextrecurse\relax
+ \ifcase#2\relax
\let\recurselevel\zerocountervalue
- \let\next\relax
+ \let\nextrecurse\relax
\else
\global\advance\outerrecurse by 1
-% \innerrecurse=#1\setevalue{\@@irecurse\recursedepth}{\the\innerrecurse}%
-% \innerrecurse=#2\setevalue{\@@nrecurse\recursedepth}{\the\innerrecurse}%
-% \innerrecurse=#3\setevalue{\@@srecurse\recursedepth}{\the\innerrecurse}%
\setevalue{\@@irecurse\recursedepth}{\number#1}%
\setevalue{\@@nrecurse\recursedepth}{\number#2}%
\setevalue{\@@srecurse\recursedepth}{\number#3}%
@@ -407,16 +404,16 @@
\else
\setevalue{\@@drecurse\recursedepth}{>}%
\long\setvalue{\@@arecurse\recursedepth}{#4}%
- \let\next\dodorecurse
+ \let\nextrecurse\dodorecurse
\fi\fi
\ifnum#3<0\relax\ifnum#1<#2\relax
\else
\setevalue{\@@drecurse\recursedepth}{<}%
\long\setvalue{\@@arecurse\recursedepth}{#4}%
- \let\next\dodorecurse
+ \let\nextrecurse\dodorecurse
\fi\fi
\fi
- \next}
+ \nextrecurse}
\def\donorecurse%
{}
@@ -424,7 +421,7 @@
\def\dododorecurse%
{\edef\recurselevel{\getvalue{\@@irecurse\recursedepth}}%
\getvalue{\@@arecurse\recursedepth}%
-\edef\recurselevel{\getvalue{\@@irecurse\recursedepth}}%
+ \edef\recurselevel{\getvalue{\@@irecurse\recursedepth}}%
\innerrecurse=\recurselevel
\advance\innerrecurse by \getvalue{\@@srecurse\recursedepth}\relax
\setevalue{\@@irecurse\recursedepth}{\the\innerrecurse}%
@@ -582,7 +579,6 @@
%D \macros
%D {newevery,everyline,EveryLine,EveryPar}
-%D {}
%D
%D Lets skip to something quite different. It's common use
%D to use \type{\everypar} for special purposes. In \CONTEXT\
@@ -770,7 +766,6 @@
%D \macros
%D {ExpandFirstAfter,ExpandSecondAfter,ExpandBothAfter}
-%D {}
%D
%D These three commands support expansion of arguments before
%D executing the commands that uses them. We can best
@@ -834,7 +829,6 @@
%D \macros
%D {ConvertToConstant,ConvertConstantAfter}
-%D {}
%D
%D When comparing arguments with a constant, we can get into
%D trouble when this argument consists of tricky expandable
@@ -1143,7 +1137,7 @@
%D
%D \starttypen
%D \kleur[groen]
-%D {as gras}
+%D {as grass}
%D \stoptypen
%D
%D was not interpreted as one would expect. This is due to the
@@ -1177,7 +1171,6 @@
%D \macros
%D {checkdefined}
-%D {}
%D
%D The bigger the system, the greater the change that
%D user defined commands collide with those that are part of
@@ -1199,7 +1192,6 @@
%D \macros
%D {GotoPar,GetPar}
-%D {}
%D
%D Typesetting a paragraph in a special way can be done by
%D first grabbing the contents of the paragraph and processing
@@ -1255,6 +1247,8 @@
\newtoks\BeforePar
\newtoks\AfterPar
+\let\endoflinetoken=^^M
+
\def\doGotoPar%
{\ifx\nextchar\blankspace
\let\donext\GotoPar
@@ -1292,7 +1286,6 @@
%D \macros
%D {dowithpargument,dowithwargument}
-%D {}
%D
%D The next macros are a variation on \type{\GetPar}. When
%D macros expect an argument, it interprets a grouped sequence
@@ -1410,7 +1403,6 @@
%D \macros
%D {dorepeat,dorepeatwithcommand}
-%D {}
%D
%D When doing repetitive tasks, we stromgly advice to use
%D \type{\dorecurse}. The next alternative however, suits
@@ -1558,7 +1550,6 @@
%D \macros
%D {makecounter,pluscounter,minuscounter,
%D resetcounter,setcounter,countervalue}
-%D {}
%D
%D Declaring, setting and resetting \COUNTERS\ can be doen
%D with the next set of commands.
@@ -1642,14 +1633,13 @@
%D values. Only one level is saved.
\def\savecounter#1%
- {\expanded{\setgvalue{!#1}{\getvalue{#1}}}}
+ {{\scratchcounter=\getvalue {#1}\setxvalue{!#1}{\the\scratchcounter}}}
\def\restorecounter#1%
- {\expanded{\setgvalue{#1}{\getvalue{!#1}}}}
+ {{\scratchcounter=\getvalue{!#1}\setxvalue {#1}{\the\scratchcounter}}}
%D \macros
%D {beforesplitstring,aftersplitstring}
-%D {}
%D
%D These both commands split a string at a given point in two
%D parts, so \type{x.y} becomes \type{x} or \type{y}.
@@ -1677,7 +1667,6 @@
%D \macros
%D {removesubstring}
-%D {}
%D
%D A first application of the two routines defined above is:
%D
@@ -1697,8 +1686,7 @@
\next}
%D \macros
-%D {addtocommalist,removefromcommalist}
-%D {}
+%D {appendtocommalist,addtocommalist,removefromcommalist}
%D
%D When working with comma separated lists, one sooner or
%D later want the tools to append or remove items from such a
@@ -1706,10 +1694,10 @@
%D there. This means that every item in the list is unique.
%D
%D \starttypen
-%D \addtocommalist {alfa} \naam
-%D \addtocommalist {beta} \naam
-%D \addtocommalist {gamma} \naam
-%D \removefromcommalist {beta} \naam
+%D \addtocommalist {alfa} \name
+%D \addtocommalist {beta} \name
+%D \addtocommalist {gamma} \name
+%D \removefromcommalist {beta} \name
%D \stoptypen
%D
%D These commands can be prefixed with \type{\doglobal}. The
@@ -1725,6 +1713,20 @@
%D \stoptypen
%D
%D Removing an item takes more time than adding one.
+%D
+%D A fast appending alternative, without any testing, is
+%D also provided:
+%D
+%D \starttypen
+%D \appendtocommalist {something} \name
+%D \stoptypen
+
+\def\appendtocommalist#1#2%
+ {\ifx#2\empty
+ \dodoglobal\edef#2{#1}%
+ \else % no test on empty
+ \dodoglobal\edef#2{#2,#1}%
+ \fi}
\def\addtocommalist#1#2%
{\doifelse{#2}{}
@@ -1764,6 +1766,61 @@
\dodoglobal\edef#2{#2}}
%D \macros
+%D {replaceincommalist}
+%D
+%D The next macro can be used to replace an indexed element
+%D in a commalist:
+%D
+%D \starttypen
+%D \replaceincommalist\MyList{2}
+%D \stoptypen
+%D
+%D Element~2 will be replaced by the current meaning of the macro
+%D \type {\newcommalistelement}. The old meaning is saved in
+%D \type {\commalistelement}. The replacement honors grouped items,
+%D like in:
+%D
+%D \starttypen
+%D \def\MyList{a,b,c,d,e,f} \replaceincommalist\MyList{3}
+%D \def\MyList{a,b,c,d,e,f} \replaceincommalist\MyList{3}
+%D \def\MyList{a,{b,c},d,e,f} \replaceincommalist\MyList{3}
+%D \def\MyList{a,b,c,{d,e,f}} \replaceincommalist\MyList{3}
+%D \stoptypen
+
+\let\newcommalistelement\empty
+
+\def\replaceincommalist#1#2% #1 = commalistelement #2 = position starts at 1
+ {\def\doreplaceincommalist##1%
+ {\ifnum\commalistcounter=#2\relax
+ \ifnum\commalistcounter=1
+ \let\newcommalist\newcommalistelement
+ \else
+ \@EA\@EA\@EA\def\@EA\@EA\@EA\newcommalist\@EA\@EA\@EA{\@EA\newcommalist\@EA,\newcommalistelement}%
+ \fi
+ \def\commalistelement{##1}%
+ \else
+ \ifnum\commalistcounter=1
+ \ifx\nexttoken\bgroup % is known -)
+ \def\newcommalist{{##1}}%
+ \else
+ \def\newcommalist{##1}%
+ \fi
+ \else
+ \ifx\nexttoken\bgroup % is known -)
+ \@EA\def\@EA\newcommalist\@EA{\newcommalist,{##1}}%
+ \else
+ \@EA\def\@EA\newcommalist\@EA{\newcommalist,##1}%
+ \fi
+ \fi
+ \fi
+ \advance\commalistcounter by 1 }%
+ \let\commalistelement\empty
+ \let\newcommalist\empty
+ \commalistcounter=1
+ \@EA\processcommalist\@EA[#1]\doreplaceincommalist
+ \dodoglobal\let#1\newcommalist}
+
+%D \macros
%D {globalprocesscommalist}
%D
%D The commalist processing commands are characterized by the
@@ -1858,7 +1915,6 @@
%D \macros
%D {swapdimens,swapmacros}
-%D {}
%D
%D Simple but effective are the next two macros. There name
%D exactly states their purpose. The \type{\scratchdimen} and
@@ -1995,7 +2051,6 @@
%D {doifvalue,doifnotvalue,doifelsevalue,
%D doifnothing,doifsomething,doifelsenothing,
%D doifvaluenothing,doifvaluesomething,doifelsevaluenothing}
-%D {}
%D
%D These long named \type{\if} commands can be used to access
%D macros (or variables) that are normally accessed by using
@@ -2003,32 +2058,53 @@
%D tokens per call. Anyone familiar with the not||values
%D ones, can derive their meaning from the definitions.
- \def\doifvalue#1{\doif{\getvalue{#1}}}
- \def\doifnotvalue#1{\doifnot{\getvalue{#1}}}
- \def\doifelsevalue#1{\doifelse{\getvalue{#1}}}
+ \def\doifvalue#1{\doif {\csname#1\endcsname}}
+ \def\doifnotvalue#1{\doifnot {\csname#1\endcsname}}
+ \def\doifelsevalue#1{\doifelse{\csname#1\endcsname}}
- \def\doifnothing#1{\doif{#1}{}}
- \def\doifsomething#1{\doifnot{#1}{}}
+ \def\doifnothing#1{\doif {#1}{}}
+ \def\doifsomething#1{\doifnot {#1}{}}
\def\doifelsenothing#1{\doifelse{#1}{}}
- \def\doifvaluenothing#1{\doif{\getvalue{#1}}{}}
- \def\doifvaluesomething#1{\doifnot{\getvalue{#1}}{}}
-\def\doifelsevaluenothing#1{\doifelse{\getvalue{#1}}{}}
+ \def\doifvaluenothing#1{\doif {\csname#1\endcsname}{}}
+ \def\doifvaluesomething#1{\doifnot {\csname#1\endcsname}{}}
+\def\doifelsevaluenothing#1{\doifelse{\csname#1\endcsname}{}}
+
+%D Faster but spoiling inheritance (copying parameters):
+%D
+%D \starttypen
+%D \def\doifelsevaluesomething#1#2#3%
+%D {\expandafter\ifx\csname#1\endcsname\empty#3\else#2\fi}
+%D
+%D \def\doifvaluesomething#1#2%
+%D {\expandafter\ifx\csname#1\endcsname\empty\else#2\fi}
+%D
+%D \def\doifvaluenothing#1#2%
+%D {\expandafter\ifx\csname#1\endcsname\empty#2\fi}
+%D \stoptypen
+%D
+%D Slightly more efficient:
+
+ \def\doifnothing{\doif {}}
+ \def\doifsomething{\doifnot {}}
+\def\doifelsenothing{\doifelse{}}
-%D Faster:
+%D \macros
+%D {doifemptyelsevalue, doifemptyvalue, doifnotemptyvalue}
+%D
+%D Also handy:
-\def\doifelsevaluesomething#1#2#3%
- {\expandafter\ifx\csname#1\endcsname\empty#3\else#2\fi}
+\long\def\doifemptyelsevalue#1#2#3%
+ {\@EA\ifx\csname#1\endcsname\empty#2\else#3\fi}
-\def\doifvaluesomething#1#2%
- {\expandafter\ifx\csname#1\endcsname\empty\else#2\fi}
+\long\def\doifemptyvalue#1#2%
+ {\@EA\ifx\csname#1\endcsname\empty#2\fi}
-\def\doifvaluenothing#1#2%
- {\expandafter\ifx\csname#1\endcsname\empty#2\fi}
+\long\def\doifnotemptyvalue#1#2%
+ {\@EA\ifx\csname#1\endcsname\empty\else#2\fi}
%D \macros
%D {DOIF,DOIFELSE,DOIFNOT}
-%D {}
%D
%D \TEX\ is case sensitive. When comparing arguments, this
%D feature sometimes is less desirable, for instance when we
@@ -2076,7 +2152,6 @@
%D \macros
%D {stripcharacters,stripspaces}
-%D {}
%D
%D The next command was needed first when we implemented
%D the \CONTEXT\ interactivity macros. When we use labeled
@@ -2110,14 +2185,13 @@
\let\!!strippedstring=\empty
\edef\!!stringa{#2}%
\@EA\dostripcharacter\!!stringa#1\end
- \let#3=\!!strippedstring}
+ \dodoglobal\let#3=\!!strippedstring}
\def\stripspaces\from#1\to#2%
{\stripcharacter{ }\from#1\to#2}
%D \macros
%D {executeifdefined}
-%D {}
%D
%D \CONTEXT\ uses one auxiliary file for all data concerning
%D tables of contents, references, two||pass optimizations,
@@ -2173,7 +2247,6 @@
%D \macros
%D {doifsomespaceelse}
-%D {}
%D
%D The next command checks a string on the presence of a space
%D and executed a command accordingly.
@@ -2197,7 +2270,6 @@
%D \macros
%D {adaptdimension,balancedimensions}
-%D {}
%D
%D Again we introduce some macros that are closely related to
%D an interface aspect of \CONTEXT. The first command can be
@@ -2247,7 +2319,6 @@
%D \macros
%D {processconcanatedlist}
-%D {}
%D
%D Maybe a bit late, but here is a more general version of the
%D \type{\processcommalist} command. This time we don't handle
@@ -2281,7 +2352,6 @@
%D \macros
%D {processassignlist}
-%D {}
%D
%D Is possible to combine an assignment list with one
%D containing keywords. Assignments are treated accordingly,
@@ -2303,7 +2373,6 @@
%D \macros
%D {DoAfterFi,DoAfterFiFi}
-%D {}
%D
%D Sometimes \type{\fi}'s can get into the way. We can reach
%D over such a troublemaker with:
@@ -2411,6 +2480,7 @@
\def\dontleavehmode{\ifmmode\else$ $\fi}
+
%D \macros
%D {uppercasestring,lowercasestring}
%D
@@ -2697,6 +2767,188 @@
%
%\endETEX
+%D \macros
+%D {dogobblesingleempty, dogobbledoubleempty}
+%D
+%D These two macros savely grab and dispose two arguments.
+
+\def\dogobblesingleempty%
+ {\dosingleempty\dodogobblesingleempty}
+
+\def\dogobbledoubleempty%
+ {\dodoubleempty\dodogobbledoubleempty}
+
+\def\dodogobblesingleempty [#1]{}
+\def\dodogobbledoubleempty[#1][#2]{}
+
+%D \macros
+%D {sortcommalist,sortcommacommand,
+%D donumericcompare,comparedresult}
+%D
+%D Sometimes we need to sort a commalist, so here is Taco's
+%D solution. This will in many cases be a list that is stored
+%D in a \type{\csname}, so both commalist and commacommands are
+%D supported. The sorting algorithm is very simple, so the list
+%D should not be too long or sorting will be very slow.
+%D
+%D \starttypen
+%D \sortcommalist[10,2,4,5,6,1,2,3,4,10,20]\donumericcompare
+%D
+%D \def\test{10,2,4,5,6,1,2,3,4,10,20}
+%D
+%D \sortcommacommand[\test]\donumericcompare
+%D \stoptypen
+%D
+%D In both cases, the result is available in the macro \type
+%D {\sortedcommalist}.
+%D
+%D Parameter \type{#2} is a macro that should accept two
+%D parameters, and it has to decide which one is larger, by
+%D setting the counter \type{\comparedresult} to~0 (for equal),
+%D 1~(if it's first argument is larger), or~2 (if it's second
+%D argument is larger).
+%D
+%D As said, these macro are largely written by Taco, and are
+%D (maybe therefore) also the first application of \type
+%D {\replaceincommalist}.
+
+\newcount\comparedresult
+
+\def\sortcommacommand[#1]%
+ {\@EA\sortcommalist\@EA[#1]}
+
+\def\sortcommalist[#1]#2%
+ {\getcommalistsize[#1]%
+ \let\sortedcommalist\empty
+ \ifnum\commalistsize>1
+ \let\comparecommand#2%
+ \processcommalist[#1]\dosortcommacommand
+ \fi}
+
+\def\dosortcommacommand#1%
+ {\ifx\sortedcommalist\empty
+ \def\sortedcommalist{#1}%
+ \else
+ \def\!!tempa{#1}%
+ \ifx\!!tempa\empty\else
+ \scratchcounter=1
+ \@EA\getcommalistsize\@EA[\sortedcommalist]%
+ \@EA\processcommalist\@EA[\sortedcommalist]\docompareitems
+ \fi
+ \fi}
+
+%D All those \type{\expandafter}'s are there because I do not
+%D want to use \type{\edef}.
+
+\def\docompareitems#1%
+ {\doifnotempty{#1}
+ {\@EA\comparecommand\@EA{\!!tempa}{#1}\relax
+ %\ifcase\compareresult % equal
+ \ifnum\comparedresult<2
+ \ifnum\scratchcounter=\commalistsize
+ \@EA\@EA\@EA\def\@EA\@EA\@EA\sortedcommalist
+ \@EA\@EA\@EA{\@EA\sortedcommalist\@EA,\!!tempa}%
+ \fi
+ %\or % new element larger
+ % \ifnum\scratchcounter=\commalistsize
+ % \@EA\@EA\@EA\def\@EA\@EA\@EA\sortedcommalist
+ % \@EA\@EA\@EA{\@EA\sortedcommalist\@EA,\!!tempa}%
+ % \fi
+ \else % old element larger
+ \@EA\def\@EA\newcommalistelement\@EA{\!!tempa,#1}%
+ \replaceincommalist\sortedcommalist\scratchcounter
+ \quitcommalist
+ \fi}%
+ \advance\scratchcounter 1 }
+
+%D The macro \type{\donumericcompare} considers everything
+%D that is not a number to be larger than any number.
+
+\def\donumericcompare#1#2%
+ {\doifnumberelse{#1}
+ {\doifnumberelse{#2}
+ {\ifnum#1>#2\relax
+ \comparedresult=1 % #1 is larger
+ \else\ifnum#1<#2\relax
+ \comparedresult=2 % #2 is larger
+ \else
+ \comparedresult=0 % both are equal
+ \fi\fi}
+ {\comparedresult=2 }}
+ {\comparedresult=1 }}
+
+%D \macros
+%D {firstofoneargument, firstoftwoarguments, firstofthreearguments
+%D secondoftwoarguments, secondofthreearguments,
+%D thirdofthreearguments}
+%D
+%D The next six macros (dedicated to Taco) can conveniently
+%D used to select arguments. Their names explain their
+%D functionality.
+
+\def\firstofoneargument #1{#1}
+\def\firstoftwoarguments #1#2{#1}
+\def\firstofthreearguments #1#2#3{#1}
+\def\secondoftwoarguments #1#2{#2}
+\def\secondofthreearguments#1#2#3{#2}
+\def\thirdofthreearguments #1#2#3{#3}
+
+%D \macros
+%D {@saveprimitive}
+%D
+%D The next definition originates in the \type {amsgen} package. In
+%D case some preceding package redefined a primitive that we also
+%D want to redefine, we had better do some checking to make sure
+%D that we are able to save the primitive meaning for internal use.
+%D Primitive control sequences can be distinguished by the fact that
+%D \type {\string} and \type {\meaning} return the same information.
+
+\def\@saveprimitive#1#2%
+ {\begingroup
+ \edef\@tempa{\string#1}%
+ \edef\@tempb{\meaning#1}%
+ \ifx\@tempa\@tempb
+ \global\let#2#1%
+ \debuggerinfo{prim}{Saving \string#1 as \string#2}%
+ \else
+ \edef\@tempb{\meaning#2}%
+ \ifx\@tempa\@tempb
+ \debuggerinfo{prim}{Saving \string#1 as \string#2}%
+ \else
+ \debuggerinfo{prim}{Can't define \string#2 properly;
+ primitive \noexpand#1 is no longer primitive}%
+ \fi
+ \fi
+ \endgroup}
+
+\def\saveprimitive#1%
+ {\begingroup
+ \@EA\edef\@EA\@tempa\@EA{\@EA\gobbleoneargument\string#1}%
+ \@EA\let\csname normal\@tempa\endcsname\relax
+ \@EA\@saveprimitive\@EA#1\csname normal\@tempa\endcsname
+ \endgroup }
+
+%D In this macro, the message only shows up when the debugging
+%D is turned on.
+
+%D \macros
+%D {emptytoks}
+%D
+%D Constant empty token register, analogous to \type {\empty}.
+
+\newtoks\emptytoks
+
+%D \macros
+%D {@True, @False, @Not, @And}
+%D
+%D Some predicate logic functions, used in for instance the
+%D math module.
+
+\def\@True {00}
+\def\@False {01}
+\def\@Not #1{0\ifcase#11 \or\@EA 1\else \@EA 0\fi}
+\def\@And #1#2{0\ifcase#1#2 \@EA 0\else \@EA 1\fi}
+
\protect
\endinput
diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex
index 277ad5616..83879d0fa 100644
--- a/tex/context/base/syst-gen.tex
+++ b/tex/context/base/syst-gen.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% nagaan : \ifinstringelse in syst-ext.tex
@@ -348,12 +348,9 @@
%D \doifnextcharelse {karakter} {then ...} {else ...}
%D \stoptypen
%D
-%D This macro differs from the original in testing on
-%D \type{\endoflinetoken}, which of course we have to define
-%D first. We also use \type{\localnext} because we don't want
-%D clashes with \type{\next}.
-
-\let\endoflinetoken=^^M
+%D This macro differs from the original in the use of \type
+%D {\localnext} because we don't want clashes with \type
+%D {\next}.
\long\def\doifnextcharelse#1#2#3%
{\let\charactertoken=#1%
@@ -364,15 +361,20 @@
\def\inspectnextcharacter%
{\ifx\nexttoken\blankspace
\let\localnext\reinspectnextcharacter
- \else\ifx\!!stringc\endoflinetoken
- \let\localnext\reinspectnextcharacter
+ %\else\ifx\nexttoken\endoflinetoken
+ % \let\localnext\reinspectaftercharacter
\else\ifx\nexttoken\charactertoken
\let\localnext\!!stringa
\else
\let\localnext\!!stringb
- \fi\fi\fi
+ \fi\fi%\fi
\localnext}
+%\let\endoflinetoken=^^M
+%
+%\long\def\reinspectaftercharacter#1%
+% {\futurelet\nexttoken\inspectnextcharacter}
+
%D This macro uses some auxiliary macros. Although we were able
%D to program quite complicated things, I only understood these
%D after rereading the \TEX book. The trick is in using a
@@ -499,6 +501,9 @@
%D process the test, we have to remove the braces and
%D therefore explictly gobble \type{#1}.
+%D \macros
+%D {honorunexpanded}
+%D
%D The fact that many macros have the same prefix, could have
%D a negative impact on searching in the hash table. Because
%D some simple testing does not show differences, we just use:
@@ -509,14 +514,18 @@
%D \@EA#1\csname\s!do\string#2\endcsname}
%D \stoptypen
%D
-%D Well, in fact we use the bit more versatile alternative:
+%D Well, in fact we use the bit more versatile alternative. The
+%D \type {\honorunexpanded} can be used to \type {\string}
+%D the protected command, which by the way is seldom needed
+%D in \CONTEXT.
\beginTEX
\def\dosetunexpanded#1#2%
{\@EA#1\@EA{\@EA#2\@EA}%
\@EA{\@EA\donottest\csname\s!do\@EA\string\csname#2\endcsname\endcsname}%
- \@EA#1{\s!do\@EA\string\csname#2\endcsname}}
+% \@EA#1{\s!do\@EA\string\csname#2\endcsname}}
+ \@EA#1\@EA{\@EA\s!do\@EA\string\csname#2\endcsname}}
\def\docomunexpanded#1#2%
{\@EA#1\@EA#2\@EA{\@EA\donottest\csname\s!do\string#2\endcsname}%
@@ -531,11 +540,15 @@
\fi#1}%
\futurelet\next\dounexpanded}
+\def\honorunexpanded%
+ {\def\donottest##1{\expandafter\gobblethreearguments\string##1}}
+
\endTEX
\beginETEX \protected
-\let\unexpanded\normalprotected
+\let \unexpanded \normalprotected
+\let \honorunexpanded \relax
\endETEX
@@ -746,6 +759,9 @@
\endETEX
+%D Beware, being \type {\undefined} in \ETEX\ means that the macro
+%D {\em is} defined!
+
%D Before we start using this variant, we used another one,
%D which is even a bit faster. This one looked like:
%D
@@ -2360,7 +2376,7 @@
\commalistcounter=#3\relax
\processcommalist[#1]\p!dogetfromcommalist}
-\def\getfromcommacommand[#1]%
+\def\getfromcommacommand[#1]% why so complicated, still needed?
{\edef\commacommand{#1}%
\toks0=\expandafter{\expandafter[\commacommand]}%
\expandafter\getfromcommalist\the\toks0 }
@@ -2368,21 +2384,27 @@
%D Because 0, 1 and~2 are often asked for, we optimize this
%D macro for those cases. The indirect call however slows
%D down the other cases.
-
-\def\p!dogetfirstfromcommalist [#1,#2]{\def\commalistelement{#1}}
-\def\p!dogetsecondfromcommalist[#1,#2,#3]{\def\commalistelement{#2}}
-\let\p!dogetotherfromcommalist=\getfromcommalist
-
-\def\getfromcommalist[#1]#2[#3]% optimized for 0,1,2
- {\ifcase#3\relax
- \let\commalistelement\empty
- \or
- \p!dogetfirstfromcommalist[#1,]%
- \or
- \p!dogetsecondfromcommalist[#1,,]%
- \else
- \p!dogetotherfromcommalist[#1][#3]%
- \fi}
+%D
+%D \starttypen
+%D \def\p!dogetfirstfromcommalist [#1,#2]{\def\commalistelement{#1}}
+%D \def\p!dogetsecondfromcommalist[#1,#2,#3]{\def\commalistelement{#2}}
+%D \let\p!dogetotherfromcommalist=\getfromcommalist
+%D
+%D \def\getfromcommalist[#1]#2[#3]% optimized for 0,1,2
+%D {\ifcase#3\relax
+%D \let\commalistelement\empty
+%D \or
+%D \p!dogetfirstfromcommalist[#1,]%
+%D \or
+%D \p!dogetsecondfromcommalist[#1,,]%
+%D \else
+%D \p!dogetotherfromcommalist[#1][#3]%
+%D \fi}
+%D \stoptypen
+%D
+%D Even worse, this alternative does not strip preceding
+%D spaces, which is what we want. So, we stick to the slow
+%D alternative.
%D Watertight (and efficient) solutions are hard to find, due
%D to the handling of braces during parameters passing and
@@ -2420,9 +2442,15 @@
\def\dodogetcommalistelement#1\from#2,#3,#4,#5,#6,#7,#8\to#9%
{\edef#9{\ifcase#1\relax\or#2\or#3\or#4\or#5\or#6\or#7\or#8\fi}}
+% maybe better:
+%
+% {\@EA\edef\@EA#9\@EA{\ifcase#1\relax\or#2\or#3\or#4\or#5\or#6\or#7\or#8\fi}}
+
\def\dogetcommalistelement#1\from#2\to%
{\dodogetcommalistelement#1\from#2,,,,,,\to}
+% check sources
+
\def\dogetcommacommandelement#1\from#2\to%
{\@EA\dodogetcommalistelement\@EA#1\@EA\from#2,,,,,,\to}
@@ -2480,33 +2508,13 @@
%D us to do some checking, we reimplemented the non||empty
%D ones.
-\def\dosingleargument%
- {\chardef\expectedarguments=1
- \dosingleempty}
-
-\def\dodoubleargument%
- {\chardef\expectedarguments=2
- \dodoubleempty}
-
-\def\dotripleargument%
- {\chardef\expectedarguments=3
- \dotripleempty}
-
-\def\doquadrupleargument%
- {\chardef\expectedarguments=4
- \doquadrupleempty}
-
-\def\doquintupleargument%
- {\chardef\expectedarguments=5
- \doquintupleempty}
-
-\def\dosixtupleargument%
- {\chardef\expectedarguments=6
- \dosixtupleempty}
-
-\def\doseventupleargument%
- {\chardef\expectedarguments=7
- \doseventupleempty}
+\def\dosingleargument {\chardef\expectedarguments=1 \dosingleempty }
+\def\dodoubleargument {\chardef\expectedarguments=2 \dodoubleempty }
+\def\dotripleargument {\chardef\expectedarguments=3 \dotripleempty }
+\def\doquadrupleargument {\chardef\expectedarguments=4 \doquadrupleempty }
+\def\doquintupleargument {\chardef\expectedarguments=5 \doquintupleempty }
+\def\dosixtupleargument {\chardef\expectedarguments=6 \dosixtupleempty }
+\def\doseventupleargument{\chardef\expectedarguments=7 \doseventupleempty}
%D \macros
%D {iffirstagument,ifsecondargument,ifthirdargument,
diff --git a/tex/context/base/syst-new.tex b/tex/context/base/syst-new.tex
index ab5765a79..419dcbe97 100644
--- a/tex/context/base/syst-new.tex
+++ b/tex/context/base/syst-new.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\unprotect
@@ -187,6 +187,39 @@
\featuretest=-1 \dotestfeature
\message{feature test done}\wait}
+%D \macros
+%D {adddimenregister,adddimenmacro}
+%D
+%D Instead of using numerous \type {\advance}'s, one can use
+%D the next macros to add|/|subtract a series of dimensions
+%D to a register or macro.
+%D
+%D \starttypen
+%D \adddimenregister 10pt 5pt \papierbreedte \to \somedimen
+%D \adddimenmacro 10pt 5pt \papierbreedte \to \bagger
+%D \stoptypen
+
+\newdimen\dimentoaddto
+
+\def\adddimenregister#1\to#2%
+ {\bgroup
+ #2=\!!zeropoint
+ \dimentoaddto\!!zeropoint
+ \def\docommando%
+ {\advance#2 by \dimentoaddto
+ \futurelet\next\dodocommando}%
+ \def\dodocommando%
+ {\ifx\next\relax
+ \expanded{\egroup#2=\the#2}%
+ \else
+ \@EA\afterassignment\@EA\docommando\@EA\dimentoaddto
+ \fi}%
+ \docommando#1\relax}
+
+\def\adddimenmacro#1\to#2%
+ {\adddimenregister#1\to\scratchdimen
+ \edef#2{\the\scratchdimen}}
+
\protect
\endinput
diff --git a/tex/context/base/syst-tex.tex b/tex/context/base/syst-tex.tex
index 5817f9a39..de41c84f5 100644
--- a/tex/context/base/syst-tex.tex
+++ b/tex/context/base/syst-tex.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D We've build \CONTEXT\ on top of \PLAIN\ \TEX. Because we
@@ -166,7 +166,7 @@
\egroup
%D Well, this redefintion of \type {\input} fails on \ETEX,
-%D because of some \type {\cs\fi} construts. So now we use:
+%D because of some \type {\cs\fi} constructs. So now we use:
\beginETEX etex.src etexdefs.lib
@@ -185,6 +185,8 @@
\let\fmtversion\normalfmtversion
+ \savinghyphcodes=1
+
\endETEX
\let\normalprotected = \protected
@@ -263,4 +265,14 @@
\tracingstats=1
+%D To circumvent dependencies, we can postpone certain
+%D initializations to dumping time, by appending them to the
+%D \type {\everydump} token register.
+
+\newtoks \everydump
+
+\let\normaldump \dump
+
+\def\dump{\the\everydump\normaldump}
+
\endinput
diff --git a/tex/context/base/thrd-ran.tex b/tex/context/base/thrd-ran.tex
index 9372de5a1..ee3a7f6ac 100644
--- a/tex/context/base/thrd-ran.tex
+++ b/tex/context/base/thrd-ran.tex
@@ -1,70 +1,95 @@
-%D \module
-%D [ file=thrd-ran,
-%D version=1998.01.21,
-%D title=\CONTEXT\ Support Macros,
-%D subtitle=Random Number Generation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+% RANDOM.TEX v.1 (Donald Arseneau)
+% Generating "random" numbers in TeX.
+%
+% Random integers are generated in the range 1 to 2147483646 by the
+% macro \nextrandom. The result is returned in the counter \randomi.
+% Do not change \randomi except, perhaps, to initialize it at some
+% random value. If you do not initialize it, it will be initialized
+% using the time and date. (This is a sparse initialization, giving
+% fewer than a million different starting values, but you should use
+% other sources of numbers if they are available--just remember that
+% most of the numbers available to TeX are not at all random.)
+%
+% The \nextrandom command is not very useful by itself, unless you
+% have exactly 2147483646 things to choose from. Much more useful
+% is the \setrannum command which sets a given counter to a random
+% value within a specified range. There are three parameters:
+% \setrannum {<counter>} {<minimum>} {<maximum>}. For example, to
+% simulate a die-roll: \setrannum{\die}{1}{6} \ifcase\die... .
+%
+% If you need random numbers that are not integers, you will have to
+% use dimen registers and \setrandimen. For example, to set a random
+% page width: \setrandimen \hsize{3in}{6.5in}. The "\pointless" macro
+% will remove the "pt" that TeX gives so you can use the dimensions
+% as pure `real' numbers. In that case, specify the range in pt units.
+% For example,
+%
+% \setrandimen\answer{2.71828pt}{3.14159pt}
+% The answer is \pointless\answer.
+%
+% The random number generator is the one by Lewis, Goodman, and Miller
+% (1969) and used as "ran0" in "Numerical Recipies" using Schrage's
+% method for avoiding overflows. The multiplier is 16807 (7^5), the
+% added constant is 0, and the modulus is 2147483647 (2^{31}-1). The
+% range of integers generated is 1 - 2147483646. A smaller range would
+% reduce the complexity of the macros a bit, but not much--most of the
+% code deals with initialization and type-conversion. On the other hand,
+% the large range may be wasted due to the sparse seed initialization.
-\writestatus{loading}{Third Party Macros / Random Number Generation}
+\newcount\randomi % the random number seed (while executing)
+\global\randomi\catcode`\@ % scratch variable during definitions
+\catcode`\@=11
-%D \macros
-%D {getrandomcount, getrandomdimen,
-%D getrandomfloat, getrandomnumber}
-%D
-%D This module load Donald Arseneau's generic file
-%D \type{random.tex}. A small shell is needed because we
-%D redefine some \TEX\ primitives. We also use different names
-%D for the two generators and add an extra one.
-%D
-%D \starttypen
-%D \getrandomcount \countregister {minimum} {maximum}
-%D \getrandomdimen \dimenregister {minimum} {maximum}
-%D \getrandomnumber \macroname {minimum} {maximum}
-%D \getrandomfloat \macroname {minimum} {maximum}
-%D \stoptypen
-%D
-%D Of course the file \type{random.tex} needs to be present.
+\def\nextrandom{\begingroup
+ \ifnum\randomi<\@ne % then initialize with time
+ \global\randomi\time
+ \global\multiply\randomi388 \global\advance\randomi\year
+ \global\multiply\randomi31 \global\advance\randomi\day
+ \global\multiply\randomi97 \global\advance\randomi\month
+ \message{Randomizer initialized to \the\randomi.}%
+ \nextrandom \nextrandom \nextrandom
+ \fi
+ \count@ii\randomi
+ \divide\count@ii 127773 % modulus = multiplier * 127773 + 2836
+ \count@\count@ii
+ \multiply\count@ii 127773
+ \global\advance\randomi-\count@ii % random mod 127773
+ \global\multiply\randomi 16807
+ \multiply\count@ 2836
+ \global\advance\randomi-\count@
+ \ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi
+ \endgroup
+}
-\readfile{random.tex}
- {\writestatus{loading}{Donald Arseneau's 'random.tex' (found)}}
- {\writestatus{loading}{Donald Arseneau's 'random.tex' (not found)}}
+\countdef\count@ii=2 % use only in boxes!
+\ifx\@tempcnta\undefined \csname newcount\endcsname \@tempcnta \fi
+\ifx\@tempcntb\undefined \csname newcount\endcsname \@tempcntb \fi
-\ifx\nextrandom\undefined
+\def\setrannum#1#2#3{% count register, minimum, maximum
+ \@tempcnta#3\advance\@tempcnta-#2\advance\@tempcnta\@ne
+ \@tempcntb 2147483645 % = m - 2 = 2^{31} - 3
+ \divide\@tempcntb\@tempcnta
+ \getr@nval
+ \advance\ranval#2\relax
+ #1\ranval
+}
- \def\setrannum#1#2#3{#1=1 }
- \def\setrandim#1#2#3{#1=1pt}
+\def\setrandim#1#2#3{% dimen register, minimum length, maximum length
+ \dimen@#2\dimen@ii#3\relax
+ \setrannum\ranval\dimen@\dimen@ii
+ #1\ranval sp\relax
+}
-\else
+\def\getr@nval{% The values in \@tempcnta and \@tempcntb are parameters
+ \nextrandom
+ \ranval\randomi \advance\ranval\m@ne \divide\ranval\@tempcntb
+ \ifnum\ranval<\@tempcnta\else \expandafter\getr@nval \fi
+}
- \let\normalnextrandom=\nextrandom
+\def\pointless{\expandafter\PoinTless\the}
+{\catcode`p=12 \catcode`t=12
+\gdef\PoinTless#1pt{#1}}
- \def\nextrandom%
- {\bgroup
- \let\time =\normaltime
- \let\day =\normalday
- \let\month=\normalmonth
- \let\year =\normalyear
- \normalnextrandom
- \global\let\nextrandom=\normalnextrandom
- \egroup}
-
-\fi
-
-\let\getrandomcount = \setrannum
-\let\getrandomdimen = \setrandim
-
-\def\getrandomnumber#1#2#3%
- {\getrandomcount{\scratchcounter}{#2}{#3}%
- \edef#1{\the\scratchcounter}}
-
-\def\getrandomfloat#1#2#3%
- {\getrandomdimen{\scratchdimen}{#2pt}{#3pt}%
- \edef#1{\withoutpt\the\scratchdimen}}
-
-\endinput
+\catcode`\@=\randomi
+\global\randomi=0
+\newcount\ranval
diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex
index 1e7a4edd7..e9ac25290 100644
--- a/tex/context/base/verb-ini.tex
+++ b/tex/context/base/verb-ini.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D Because this module is quite independant of system macros,
@@ -86,7 +86,6 @@
%D \macros
%D {verbatimfont}
-%D {}
%D
%D When we are typesetting verbatim we use a non||proportional
%D (mono spaced) font. Normally this font is available by
@@ -98,7 +97,6 @@
%D \macros
%D {obeyedspace, obeyedtab, obeyedline, obeyedpage}
-%D {}
%D
%D We have followed Knuth in naming macros that make \SPACE,
%D \NEWLINE\ and \NEWPAGE\ active and assigning them
@@ -127,7 +125,6 @@
%D \macros
%D {obeytabs, obeylines, obeypages,
%D ignoretabs, ignorelines, ignorepages}
-%D {}
%D
%D Next we take care of \NEWLINE\ and \NEWPAGE\ and because we
%D want to be able to typeset listings that contain \TAB, we
@@ -168,7 +165,6 @@
%D \macros
%D {settabskips}
-%D {}
%D
%D The macro \type{\settabskip} can be used to enable tab
%D handling. Processing tabs is sometimes needed when one
@@ -188,7 +184,6 @@
%D \macros
%D {processinlineverbatim}
-%D {}
%D
%D Although the inline verbatim commands presented here will be
%D extended and embedded in the core modules of \CONTEXT,
@@ -223,7 +218,7 @@
%D construction to keep the closing command local.
\def\setupinlineverbatim%
- {\verbatimfont
+ {\verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip
\let\obeytabs=\ignoretabs
\let\obeylines=\ignorelines
\let\obeypages=\ignorepages
@@ -255,7 +250,6 @@
%D \macros
%D {processingverbatim}
-%D {}
%D
%D Typesetting a file in most cases results in more than one
%D page. Because we don't want problems with files that are
@@ -406,7 +400,6 @@
%D \macros
%D {processdisplayverbatim}
-%D {}
%D
%D We can define a display verbatim environment with the
%D command \type{\processdisplayverbatim} in the following way:
@@ -452,7 +445,7 @@
\expandafter\let\csname\verbatimname\endcsname=\relax
\edef\endofverbatimcommand{\csname\verbatimname\endcsname}%
\edef\endofverbatimcommand{\meaning\endofverbatimcommand}%
- \verbatimfont
+ \verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip
\setupcopyverbatim
\initializeverbatimline
\copyverbatimline}
@@ -483,7 +476,6 @@
%D setcatcodes,uncatcodespecials,
%D uncatcodecharacters,
%D setnaturalcatcodes}
-%D {}
%D
%D As its name says, \type{\uncatcodecharacters} resets the
%D \CATCODE\ of characters. When we use an upper bound of
@@ -543,7 +535,6 @@
%D {localcatcodes,
%D restorecatcodes,
%D beginrestorecatcodes,endrestorecatcodes}
-%D {}
%D
%D We're not finished dealing \CATCODES\ yet. In \CONTEXT\ we
%D use only one auxiliary file, which deals with tables of
@@ -645,7 +636,6 @@
%D \macros
%D {iflinepar}
-%D {}
%D
%D A careful reader will see that \type{\linepar} is reset.
%D This boolean can be used to determine if the current line is
@@ -666,6 +656,9 @@
% \global\lineparfalse
% \obeyedline\par}
+\let\beginverbatimline\relax
+\let\endverbatimline \relax
+
\long\def\dodoverbatimline#1% we don't want to group
{\bgroup % due to pretty status
\iflinepar\else\EveryPar{}\fi
@@ -680,13 +673,24 @@
\dokeepverbatimlinedata
\doopenupverbatimline
\the\everyline\strut
- \processverbatimline{#1\relax}%
+ \beginverbatimline
+ \processverbatimline{#1\relax\flushrestofverbatimline}%
+ \endverbatimline
\global\lineparfalse
\obeyedline\par}
%D \macros
+%D {flushrestofverbatimline}
+%D
+%D Some pretty drivers will collect tokens for the sake of
+%D testing on keywords. This collected string needs to be
+%D flushed. The \type {\relax} can serve as signal that there
+%D is nothing more to be interpreted.
+
+\let\flushrestofverbatimline\empty
+
+%D \macros
%D {obeyemptylines,verbatimbaselineskip}
-%D {}
%D
%D Empty lines in verbatim can lead to white space on top of
%D a new page. Because this is not what we want, we turn
@@ -728,7 +732,6 @@
%D \macros
%D {EveryPar, EveryLine}
-%D {}
%D
%D In this module we've reserved \type{\everypar} for the
%D things to be done with paragraphs and \type{\everyline} for
@@ -816,7 +819,7 @@
\processingverbatimtrue
\global\linepartrue
\uncatcodecharacters
- \verbatimfont
+ \verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip
\frenchspacing
\obeyspaces
\obeytabs
@@ -1001,10 +1004,18 @@
%D
%D We'll show some more examples:
%D
+%D \startbuffer[pretty]
+%D \installnewpretty R \red
+%D \installnewpretty G \green
+%D \installnewpretty B \blue
+%D \stopbuffer
+%D
+%D \haalbuffer[pretty]
+%D
%D \startbuffer
-%D %%\R{Red
-%D %%\G\Green
-%D %%\B[Blue
+%D %%\ R{Red
+%D %%\ G\Green
+%D %%\ B[Blue
%D \stopbuffer
%D
%D {\newprettytrue\typebuffer}
@@ -1013,6 +1024,10 @@
%D
%D \typebuffer
%D
+%D along with:
+%D
+%D \typebuffer[pretty]
+%D
%D When needed, one can use grouping.
%D
%D \startbuffer
@@ -1024,7 +1039,8 @@
%D
%D \typebuffer
%D
-%D This leads to:
+%D Here we tell the visualizer that the \type +{+ should be
+%D treated like a \type +[+ so we get:
%D
%D {\newprettytrue\typebuffer}
%D
@@ -1078,8 +1094,56 @@
\installnewpretty P \setupprettyPLtype
\installnewpretty T \setupprettyTEXtype
+%D \macros
+%D {ifnaturaltextext}
+%D
+%D When one uses \ETEX, switching to normal \TEX\ is possible
+%D too. We also introduce a switch that can be used in the
+%D drivers and set in higher level shell macros.
+
+\newif\ifnaturaltextext
+
+\beginETEX \scantokens
+
+%\def\naturaltextext#1#2\relax%
+% {\bgroup\prettynaturalfont{\restorecatcodes\scantokens{\ignorespaces#2}}\egroup}
+
+\def\naturaltextext#1\relax%
+ {\bgroup
+ \prettynaturalfont{\restorecatcodes\scantokens{\ignorespaces#1}}%
+ \egroup}
+
+\endETEX
+
+\beginTEX
+
+%\def\naturaltextext#1%
+% {\disableprettynow}
+
+\def\naturaltextext%
+ {\disableprettynow}
+
+\endTEX
+
+\installnewpretty N \naturaltextext
+
+%D When seen in action this gives:
+%D
+%D \startbuffer
+%D \startTEX
+%D \def\mathematics#1% %%\ N usage: \type {\mathematics{x^2}}
+%D {\ifmmode#1\else$#1$\fi} %%\ N becomes: \mathematics{X^2}
+%D \stopTEX
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D
+%D This is keyed in as:
+%D
+%D \typebuffer
+
%D This means that when the interpreter modules support this
-%D mechanism, by default we have four options at available.
+%D mechanism, by default we have some keys already available.
\def\newpretty#1%
{\getprettydata{#1}%
@@ -1217,7 +1281,7 @@
{\doifincsnameelse{\space#1\space}}
%D \macros
-%D {prettyidentifierfont,prettyvariablefont}
+%D {prettyidentifierfont,prettyvariablefont,prettynaturalfont}
%D
%D When one want to typeset identifiers and system variables
%D in a different typeface, one has to set the next two
@@ -1225,6 +1289,7 @@
\let\prettyidentifierfont=\relax
\let\prettyvariablefont =\relax
+\let\prettynaturalfont =\relax
%D The interpreter macros are loaded at run time. The main
%D reason lays in the fact that we don't want to have the
@@ -1240,10 +1305,59 @@
%D \stoptypen
%D
%D In \CONTEXT\ we follow a different thread, and therefore all
-%D macros in the additional modules use \type{\gdef}'s and
-%D \type{\doglobal}'s. Manipulating \type{\globaldef} is
+%D macros in the additional modules use \type {\gdef}'s and
+%D \type {\doglobal}'s. Manipulating \type {\globaldef} is
%D possible but leads to fuzzy situations.
+%D \macros
+%D {ifdisablepretty,disablepretynow,disableprettyafterwards}
+%D
+%D Although for pretty printing \PERL\ and \JAVASCRIPT\ code
+%D one has to implement a bit more clever mechanism, the next
+%D switches can be used to turn off prety printing. The
+%D boolean turns on this feature.
+
+\newif\ifdisablepretty \disableprettyfalse
+\newif\ifprettydisabled \prettydisabledfalse
+
+\def\disableprettynow%
+ {\ifdisablepretty\ifprettydisabled\else
+ \let\prettyidentifierfont\relax
+ \let\prettyvariablefont\relax
+ \let\prettycomment\relax
+ \def\beginofpretty[##1]{}%
+ \let\endofpretty\relax
+ \prettydisabledtrue
+ \fi\fi}
+
+\def\disableprettyafterwards%
+ {\ifdisablepretty\ifprettydisabled\else
+ \def\endofpretty{\normalendofpretty\disableprettynow}%
+ \fi\fi}
+
+\def\enableprettynow%
+ {\prettydisabledfalse
+ \let\prettyidentifierfont\normalprettyidentifierfont
+ \let\prettyvariablefont \normalprettyvariablefont
+ \let\prettynaturalfont \normalprettynaturalfont
+ \let\beginofpretty \normalbeginofpretty
+ \let\endofpretty \normalendofpretty}
+
+%D This feature is hooked into the verbatim line handling
+%D routine with:
+
+\def\beginverbatimline%
+ {\prettydisabledfalse
+ \ifnewpretty\else\let\handlenewpretty\empty\fi % moved
+ \let\normalprettyidentifierfont\prettyidentifierfont
+ \let\normalprettyvariablefont \prettyvariablefont
+ \let\normalprettynaturalfont \prettynaturalfont
+ \let\normalbeginofpretty \beginofpretty
+ \let\normalendofpretty \endofpretty}
+
+\def\endverbatimline%
+ {\enableprettynow}
+
%D The rest of this module is dedicated to non \CONTEXT\ users
%D and shows an example of an verbatim environment based on the
%D previous macros.
@@ -1295,6 +1409,8 @@
\def\type%
{\bgroup
+ \def\_{\string_}%
+ \def\^{\string^}%
\presettyping
\processinlineverbatim{\egroup}}
@@ -1339,6 +1455,7 @@
\input verb-mp
\input verb-pl
\input verb-jv
+ \input verb-sql
\def\startTEX%
{\bgroup \everypar{}%
@@ -1360,10 +1477,16 @@
\let\obeycharacters=\setupprettyJVtype
\processdisplayverbatim{\stopJV}}
+ \def\startSQL%
+ {\bgroup \everypar{}%
+ \let\obeycharacters=\setupprettySQLtype
+ \processdisplayverbatim{\stopSQL}}
+
\let\stopTEX=\egroup
\let\stopMP =\egroup
\let\stopPL =\egroup
\let\stopJV =\egroup
+ \let\stopSQL=\egroup
\fi
@@ -1585,7 +1708,7 @@
\expandafter\let\csname\verbatimname\endcsname=\relax
\expandafter\convertargument\csname\verbatimname\endcsname
\to\endofverbatimcommand
- \verbatimfont
+ \verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip
\setupcopyverbatim
\initializeverbatimline
\copyverbatimline}
diff --git a/tex/context/base/verb-jv.tex b/tex/context/base/verb-jv.tex
index 2ab40223b..4de1a92b3 100644
--- a/tex/context/base/verb-jv.tex
+++ b/tex/context/base/verb-jv.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Support Macros / Pretty JavaScript Verbatim}
@@ -69,12 +69,11 @@
\gdef\JVsetcontrols%
{\PLsetcontrols
- \def\obeyedline%
+ \def\flushrestofverbatimline%
{\endPLtypesix
\ifcase\JVcommentlevel \inPLcommentfalse \fi
\PLverbosefalse
- \PLverboseskipped=0
- \oldobeyedline}}
+ \PLverboseskipped=0}}
\gdef\JVsetvariables
{\PLsetvariables
@@ -122,9 +121,6 @@
{\endPLtypesix
\handlenextnextpretty\dododoJVtypefourthree\dodododoPLtypefourthree}
-% \gdef\dododoJVtypefourthree%
-% {\handlenewpretty\dodododoPLtypefourthree}
-
\gdef\dododoJVtypefourthree%
{\ifnewpretty\expandafter\handlenewpretty\fi\dodododoJVtypefourthree}
@@ -134,7 +130,12 @@
\else
\global\inPLcommenttrue
\PLverbosecorrection
- \beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty
+ \ifnaturaltextext
+ \let\next\naturaltextext
+ \else
+ \def\next{\beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty}%
+ \fi
+ \expandafter\next
\fi}
\gdef\JVtypefourfour%
@@ -147,7 +148,9 @@
\global\advance\JVcommentlevel by -1
\ifcase\JVcommentlevel \global\inPLcommentfalse \fi
\else
- \beginofpretty[\!!prettyfour]#1\endofpretty\expandafter#2%
+ \endPLtypesix
+ \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
+ \expandafter#2%
\fi}
%D We need different (less) reserved words. This list replaces
diff --git a/tex/context/base/verb-mp.tex b/tex/context/base/verb-mp.tex
index f7e13c0fd..7a5c788a7 100644
--- a/tex/context/base/verb-mp.tex
+++ b/tex/context/base/verb-mp.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Support Macros / Pretty METAPOST Verbatim}
@@ -48,19 +48,12 @@
\gdef\MPsetcontrols%
{\saveprettycontrols
\everyprettyend
- {\global\inMPcommentfalse
- \endMPtypesix}%
+ {\endMPtypesix}%
\def\obeyedspace%
{\endMPtypesix
\oldobeyedspace}%
- \def\obeyedline%
- {\endMPtypesix
- \global\inMPcommentfalse
- \oldobeyedline}%
- \def\obeyedpage%
- {\endMPtypesix
- \global\inMPcommentfalse
- \oldobeyedpage}%
+ \def\flushrestofverbatimline%
+ {\endMPtypesix}%
\let\obeytabs=\ignoretabs}
\gdef\setupprettyMPtype%
@@ -70,12 +63,10 @@
\MPsethandlers
\MPsetspecials}
-\doglobal\newif\ifinMPcomment
\doglobal\newif\ifinMPtexmode
\gdef\MPsetvariables%
- {\global\inMPcommentfalse
- \global\inMPtexmodefalse
+ {\global\inMPtexmodefalse
\global\let\MPsequence=\empty}
\gdef\MPsetspecials%
@@ -127,21 +118,20 @@
\gdef\MPtypeone#1%
{\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
+ \ifinMPtexmode
\getpretty{#1}%
\else
\beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty%
- \fi\fi}
+ \fi}
\gdef\doMPtypetwo#1%
- {\ifinMPcomment
- \getpretty{#1}%
+ {\ifnaturaltextext
+ \let\next\naturaltextext
\else
- \global\inMPcommenttrue
- \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \fi}
+ \disableprettytrue\disableprettyafterwards
+ \def\next{\beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty}%
+ \fi
+ \next}
\gdef\MPtypetwo%
{\endMPtypesix
@@ -149,43 +139,35 @@
\gdef\MPtypethreeA#1%
{\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
+ \ifinMPtexmode
\getpretty{#1}%
\else
\beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi\fi}
+ \fi}
\gdef\MPtypethreeB#1%
{\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
+ \ifinMPtexmode
\getpretty{#1}%
\else
\beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
- \fi\fi}
+ \fi}
\gdef\MPtypefour#1%
{\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
+ \ifinMPtexmode
\getpretty{#1}%
\else
\beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \fi\fi}
+ \fi}
\gdef\MPtypefive#1%
{\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
+ \ifinMPtexmode
\getpretty{#1}%
\else
\beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty
- \fi\fi}
+ \fi}
\gdef\endMPtypesix%
{\ifx\MPsequence\empty\else
@@ -219,51 +201,39 @@
\getpretty}
\gdef\MPtypesixtwo#1%
- {\ifinMPcomment
- \getpretty{#1}%
- \else
- \xdef\MPsequence{\MPsequence\getpretty{#1}}%
- \fi}
+ {\xdef\MPsequence{\MPsequence\getpretty{#1}}}
\gdef\MPtypeseven#1%
{\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
+ \ifinMPtexmode
\getpretty{#1}%
\else
\beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \fi\fi}
+ \fi}
\gdef\MPtypeeightone#1%
{\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode%
+ \ifinMPtexmode%
\getpretty{#1}%
\else
\beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi\fi}
+ \fi}
\gdef\MPtypeeighttwo#1%
{\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
+ \ifinMPtexmode
\getpretty{#1}%
\else
\beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi\fi}
+ \fi}
\gdef\MPtypenine#1%
{\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
+ \ifinMPtexmode
\getpretty{#1}%
\else
\getpretty{#1}%
- \fi\fi}
+ \fi}
%D \METAPOST\ \TEX||ies:
@@ -331,13 +301,13 @@
\useprettyidentifiers \MPvariables \MPsetspecials
cutdraw draw drawarrow drawdblarrow fill filldraw
loggingall pickup tracingall tracingnone undraw unfill
- unfilldraw
+ unfilldraw drawdot
%D \METAPOST\ macro||like functions:
\useprettyidentifiers \MPvariables \MPsetspecials
buildcycle dashpattern decr dotlabel dotlabels drawoptions
- incr label labels max min thelabel z
+ incr label labels max min thelabel z
%D More \METAPOST:
diff --git a/tex/context/base/verb-pl.tex b/tex/context/base/verb-pl.tex
index bdc5ba7da..9ac354c7c 100644
--- a/tex/context/base/verb-pl.tex
+++ b/tex/context/base/verb-pl.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Support Macros / Pretty PERL Verbatim}
@@ -66,18 +66,24 @@
\else
\oldobeyedspace
\fi}%
- \def\obeyedline%
+ \def\flushrestofverbatimline%
{\endPLtypesix
- \global\inPLcommentfalse
- \PLverbosefalse
+ \global\inPLcommentfalse}%
+ \def\obeyedline%
+ {\PLverbosefalse
\PLverboseskipped=0
\oldobeyedline}%
- \def\obeyedpage%
- {\endPLtypesix
- \global\inPLcommentfalse
- \oldobeyedpage}%
\let\obeytabs=\ignoretabs}
+\gdef\JVsetcontrols%
+ {\PLsetcontrols
+ {\endPLtypesix
+ \ifcase\JVcommentlevel \inPLcommentfalse \fi
+ \PLverbosefalse
+ \PLverboseskipped=0}}
+
+
+
\gdef\setupprettyPLtype%
{\def\prettyidentifier{PL}%
\PLsetvariables
@@ -367,10 +373,6 @@
\beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
\fi\fi\fi}
-% \gdef\PLtypezero%
-% {\endPLtypesix
-% \handlenewpretty\doPLtypezero}
-
\gdef\PLtypezero%
{\endPLtypesix
\ifnewpretty\expandafter\handlenewpretty\fi\doPLtypezero}
@@ -381,7 +383,12 @@
\else
\global\inPLcommenttrue
\PLverbosecorrection
- \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
+ \ifnaturaltextext % non tested yet
+ \let\next\naturaltextext
+ \else
+ \def\next{\beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty}%
+ \fi
+ \expandafter\next
\fi}
\gdef\doreportprettyPLtype#1#2#3#4%
diff --git a/tex/context/base/verb-sql.tex b/tex/context/base/verb-sql.tex
new file mode 100644
index 000000000..7efd0127a
--- /dev/null
+++ b/tex/context/base/verb-sql.tex
@@ -0,0 +1,218 @@
+%D \module
+%D [ file=verb-sql,
+%D version=1999.06.08,
+%D title=\CONTEXT\ Verbatim Macros,
+%D subtitle=Pretty \SQL\ Verbatim,
+%D author={Berend de Boer, Hans Hagen},
+%D date=\currentdate,
+%D copyright={Berend de Boer, Hans Hagen}]
+%C
+
+\writestatus{loading}{Context Support Macros / Pretty SQL Verbatim}
+
+%D \citaat {He, I want pretty pretting too!}, Berend cried out
+%D one day, \citaat {But now for \SQL.}. This query language
+%D shows code like:
+%D
+%D \startbuffer
+%D \startSQL
+%D select * -- some comment
+%D from tableA
+%D where 1 = 2
+%D \stopSQL
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D and this should become something pretty like:
+%D
+%D \haalbuffer
+%D
+%D or, with Berend's preferences:
+%D
+%D \startbuffer[setup]
+%D \steltypenin
+%D [SQL]
+%D [tekst=ja,palet=,icommando=\bf,vcommando=,ccommando=\it]
+%D \stopbuffer
+%D
+%D \haalbuffer[setup]
+%D \haalbuffer
+%D
+%D This kind of pretty printing is accomplished by:
+%D
+%D \typebuffer
+
+%D Like we did with the \JAVASCRIPT\ driver, we will borrow
+%D most of the macros from the \PERL\ driver.
+
+\ifx\undefined\setupprettyPLtype \input verb-pl \relax \fi
+
+\unprotect
+
+%D \SQL\ has the one line comment sequence \type{--} and the
+%D multi line comment delimiters \type{/*} and \type{*/}. The
+%D next counter keeps track of multi line comment nesting.
+
+\newcount\SQLcommentlevel
+
+%D We need to handle \type{%}, \type{#} and \type{-} a bit
+%D different than in the \PERL\ driver. Compared to the
+%D \JAVASCRIPT\ driver |<|we copied most of the code from
+%D that one|>|, we now also have type~45.
+
+\gdef\SQLsetspecials%
+ {\PLsetspecials
+ \setpretty`\#=32
+ \setpretty`\%=41
+ \setpretty`\/=43
+ \setpretty`\*=44
+ \setpretty`\-=45 }
+
+%D We need three additional handlers:
+
+\gdef\SQLsethandlers%
+ {\PLsethandlers
+ \installprettyhandler 43 \SQLtypefourthree
+ \installprettyhandler 44 \SQLtypefourfour
+ \installprettyhandler 45 \SQLtypefourfive }
+
+%D Next we have to do some general housekeeping.
+
+\gdef\SQLsetcontrols%
+ {\PLsetcontrols
+ \def\flushrestofverbatimline%
+ {\endPLtypesix
+ \ifcase\SQLcommentlevel \inPLcommentfalse \fi
+ \PLverbosefalse
+ \PLverboseskipped=0}}
+
+\gdef\SQLsetvariables
+ {\PLsetvariables
+ \global\SQLcommentlevel=0 }
+
+\gdef\setupprettySQLtype%
+ {\def\prettyidentifier{SQL}%
+ \let\PLidentifiers=\SQLidentifiers
+ \let\PLvariables=\SQLvariables
+ \SQLsetvariables
+ \SQLsetcontrols
+ \SQLsethandlers
+ \SQLsetspecials
+ \PLsetdiagnostics}
+
+%D We have to look upto four characters ahead. If you don't
+%D grab the picture, just skip reading these macros.
+
+\gdef\SQLtypefourthree%
+ {\handlenextnextpretty\doSQLtypefourthree\PLtypefourtwo}
+
+\gdef\doSQLtypefourthree#1#2%
+ {\getprettydata{#2}%
+ \ifnum\prettytype=43
+ \let\next=\dodoSQLtypefourthree
+ \else\ifnum\prettytype=44
+ \global\advance\SQLcommentlevel by 1
+ \global\inPLcommenttrue
+ \PLverbosecorrection
+ \let\next=\SQLtogglecomment
+ \else
+ \let\next=\PLtypefourtwo
+ \fi\fi
+ \next{#1}#2}
+
+\gdef\SQLtogglecomment#1#2%
+ {\ifnum\SQLcommentlevel=1
+ \beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty
+ \else
+ \getpretties{#1}{#2}%
+ \fi}
+
+\gdef\dodoSQLtypefourthree% #1%
+ {\endPLtypesix
+ \handlenextnextpretty\dododoSQLtypefourthree\dodododoPLtypefourthree}
+
+\gdef\dododoSQLtypefourthree%
+ {\ifnewpretty\expandafter\handlenewpretty\fi\dodododoSQLtypefourthree}
+
+\gdef\dodododoSQLtypefourthree#1#2%
+ {\ifinPLcomment
+ \getpretties{#1}{#2}%
+ \else
+ \global\inPLcommenttrue
+ \PLverbosecorrection
+ \beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty
+ \fi}
+
+\gdef\SQLtypefourfour%
+ {\handlenextnextpretty\doSQLtypefourfour\PLtypefourtwo}
+
+\gdef\doSQLtypefourfour#1#2%
+ {\getprettydata{#2}%
+ \ifnum\prettytype=43
+ \SQLtogglecomment{#1}#2%
+ \global\advance\SQLcommentlevel by -1
+ \ifcase\SQLcommentlevel \global\inPLcommentfalse \fi
+ \else
+ \endPLtypesix
+ \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
+ \expandafter#2%
+ \fi}
+
+%D Much of the indirect calls (\type {dodo..}) is due to
+%D looking ahead as well as midway pretty print changing.
+
+\gdef\SQLtypefourfive%
+ {\handlenextnextpretty\doSQLtypefourfive\PLtypefourtwo}
+
+\gdef\doSQLtypefourfive#1#2%
+ {\getprettydata{#2}%
+ \ifnum\prettytype=45
+ \let\next=\dodoSQLtypefourfive
+ \else
+ \let\next=\PLtypefourtwo
+ \fi
+ \next{#1}#2}
+
+\gdef\dodoSQLtypefourfive% #1%
+ {\endPLtypesix
+ \handlenextnextpretty\dododoSQLtypefourfive\dodododoPLtypefourfive}
+
+\gdef\dododoSQLtypefourfive%
+ {\ifnewpretty\expandafter\handlenewpretty\fi\dodododoSQLtypefourfive}
+
+\gdef\dodododoSQLtypefourfive#1#2%
+ {\ifinPLcomment
+ \getpretties{#1}{#2}%
+ \else
+ \global\inPLcommenttrue
+ \PLverbosecorrection
+ \ifnaturaltextext
+ \let\next\naturaltextext
+ \else
+ \def\next{\beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty}%
+ \fi
+ \expandafter\next
+ \fi}
+
+%D We need a different list of reserved words. This list
+%D replaces the \PERL\ one.
+
+\useprettyidentifiers \SQLidentifiers \SQLsetspecials
+ add all alter and any as asc avg begin between break
+ browse bulk by cascade case check close clustered coalesce
+ column commit constraint contains count create cross
+ cursor database default delete desc distinct drop else end
+ exec execute exists exit fetch for foreign from grant
+ group having if in index inner insert into is join key
+ left like max min nocheck nonclustered not null of on open
+ or order outer over plan prepare proc procedure public
+ references return revoce right rollback rule select set
+ sum table then to tran transaction trigger truncate
+ uncommited union unique update use values varying view
+ when where while with work
+
+\useprettyidentifiers \SQLvariables \SQLsetspecials
+ not-yet-defined
+
+\protect \endinput
diff --git a/tex/context/base/verb-tex.tex b/tex/context/base/verb-tex.tex
index 6d53ac9fd..a7366a9ca 100644
--- a/tex/context/base/verb-tex.tex
+++ b/tex/context/base/verb-tex.tex
@@ -8,7 +8,7 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Context Support Macros / Pretty TEX Verbatim}
@@ -29,7 +29,6 @@
%D \macros
%D {ifsplitTEXparameters}
-%D {}
%D
%D The mechanism described here, is meant to be used with
%D color. It is nevertheless possible to use different fonts
@@ -42,7 +41,6 @@
%D \macros
%D {ifsplitTEXcontrols}
-%D {}
%D
%D With \type{\splittexcontrols} we can influence the way
%D control characters are processed in macro names. By default,
@@ -95,14 +93,9 @@
{\TEXendofcommand
\TEXendofparameter
\oldobeyedspace}%
- \def\obeyedline%
+ \def\flushrestofverbatimline%
{\TEXendofcommand
- \TEXendofparameter
- \oldobeyedline}%
- \def\obeyedpage%
- {\TEXendofcommand
- \TEXendofparameter
- \oldobeyedpage}%
+ \TEXendofparameter}%
\let\obeytabs=\ignoretabs}
\gdef\TEXsetspecials%
@@ -131,7 +124,6 @@
\setpretty`\u=9 \setpretty`\v=9 \setpretty`\w=9 \setpretty`\x=9 \setpretty`\y=9
\setpretty`\z=9
\setpretty`\?=9 \setpretty`\!=9 \setpretty`\@=9
- %\setpretty`\%=\ifnewpretty 0 \else 3 \fi}
\setpretty`\%=0 }
\gdef\TEXsethandlers%
@@ -276,11 +268,34 @@
\global\firstinTEXcommandfalse
\getpretty}
-% \gdef\TEXtypezero%
-% {\handlenewpretty\TEXtypethree}
+%\gdef\TEXtypezero%
+% {\disableprettyafterwards % only when enabled of course
+% \ifnewpretty\expandafter\handlenewpretty\fi\TEXtypethree}
+
+\bgroup
+\catcode`\%=\@@other
+\xdef\texcommentsymbol{%}
+\egroup
+
+\beginETEX \scantokens
+
+\long\gdef\naturalTEXtext#1#2\relax% local alternative for \naturaltextext
+ {\convertargument#2\to\ascii
+ \doifinstringelse{\texcommentsymbol}{\ascii}
+ {\long\def\next{\TEXtypethree{#1}#2\relax}}
+ %{\long\def\next{\bgroup\prettynaturalfont\restorecatcodes\scantokens{\ignorespaces#2}\egroup}}%
+ {\long\def\next{\bgroup\prettynaturalfont{\restorecatcodes\scantokens{\ignorespaces#2}}\egroup}}%
+ \next}
+
+\endETEX
\gdef\TEXtypezero%
- {\ifnewpretty\expandafter\handlenewpretty\fi\TEXtypethree}
+ {\ifnaturaltextext
+ \expandafter\naturalTEXtext
+ \else
+ \disableprettyafterwards % only when enabled of course
+ \expandafter\handlenewpretty\expandafter\TEXtypethree
+ \fi}
\protect
diff --git a/tex/context/config/cont-usr.tex b/tex/context/config/cont-usr.tex
new file mode 100644
index 000000000..db2526542
--- /dev/null
+++ b/tex/context/config/cont-usr.tex
@@ -0,0 +1,122 @@
+%D \module
+%D [ file=cont-usr,
+%D version=1997.10.05,
+%D title=\CONTEXT\ User Format Specifications,
+%D subtitle=System Specific Setups,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%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 In this file users can specify what hyphenation patterns
+%D they want to load into the format file. Normally, when
+%D using the \type {cont-..} files, this file can best be
+%D left unchanged. The default language and font settings
+%D done in the \type {cont-.} files take precedence! This file
+%D is subject to changes.
+
+\unprotect
+
+%D Hyphenation patterns are normally sought in filed named
+%D \type {lang-xx.pat}. When present on the system, those
+%D patterns take precedence. (The next list is inspired on
+%D Thomas Esser's \TETEX\ distribution.) This list will be
+%D adapted to the actual situation.
+
+\definefilesynonym [lang-cz.pat] [czhyph.tex]
+\definefilesynonym [lang-da.pat] [dkhyph.tex]
+\definefilesynonym [lang-de.pat] [dehyphn.tex]
+\definefilesynonym [lang-en.pat] [ushyph1.tex]
+\definefilesynonym [lang-fi.pat] [fihyph.tex]
+\definefilesynonym [lang-fr.pat] [frhyph.tex]
+\definefilesynonym [lang-it.pat] [ithyph.tex]
+\definefilesynonym [lang-la.pat] [lahyph7.tex]
+\definefilesynonym [lang-nl.pat] [nehyph.tex]
+\definefilesynonym [lang-no.pat] [nohyph.tex]
+\definefilesynonym [lang-pl.pat] [plhyph.tex]
+\definefilesynonym [lang-pt.pat] [pthyph.tex]
+\definefilesynonym [lang-sk.pat] [skhyph.tex]
+\definefilesynonym [lang-sp.pat] [sphyph.tex]
+\definefilesynonym [lang-sv.pat] [sehyph.tex]
+\definefilesynonym [lang-hr.pat] [hrhyph.tex]
+\definefilesynonym [lang-tr.pat] [trhyph.tex]
+\definefilesynonym [lang-uk.pat] [ukhyphen.tex]
+\definefilesynonym [lang-us.pat] [ushyph1.tex]
+
+%D Pattern files are (can be) encoded! And, alas, not all
+%D pattern files are self contained, which is why (for the
+%D moment) we specify encodings here.
+
+\installlanguage [\s!cz] [\s!mapping=il2,\s!encoding=il2]
+\installlanguage [\s!sk] [\s!mapping=il2,\s!encoding=il2]
+\installlanguage [\s!pl] [\s!mapping=pl0,\s!encoding=pl0]
+\installlanguage [\s!hr] [\s!mapping=il2,\s!encoding=il2] % ans ?
+
+%D Sometimes these are not wanted:
+
+%\definefilesynonym [lang-deo.pat] [dehypht.tex] % old patterns
+%\definefilesynonym [lang-nlx.pat] [dutch96.pat] % new patterns
+
+%D Additional languages can be defined here. Beware of
+%D encoding incompatibilities. Please take a look at the
+%D \type {cont-en.tex}, \type {cont-nl.tex}, enz.\ files
+%D first. Normally you don't have to change a byte.
+
+% \installlanguage [\s!af] [\c!status=\v!start] % afrikaans
+% \installlanguage [\s!da] [\c!status=\v!start] % danish
+% \installlanguage [\s!de] [\c!status=\v!start] % german
+% \installlanguage [\s!en] [\c!status=\v!start] % english us
+% \installlanguage [\s!fi] [\c!status=\v!start] % finnish
+% \installlanguage [\s!fr] [\c!status=\v!start] % french
+% \installlanguage [\s!it] [\c!status=\v!start] % italian
+% \installlanguage [\s!la] [\c!status=\v!start] % latin
+% \installlanguage [\s!nl] [\c!status=\v!start] % dutch
+% \installlanguage [\s!no] [\c!status=\v!start] % norwegian
+% \installlanguage [\s!pl] [\c!status=\v!start] % polish
+% \installlanguage [\s!pt] [\c!status=\v!start] % portuguese
+% \installlanguage [\s!sp] [\c!status=\v!start] % spanish
+% \installlanguage [\s!sv] [\c!status=\v!start] % swedish
+% \installlanguage [\s!tr] [\c!status=\v!start] % turkish
+% \installlanguage [\s!uk] [\c!status=\v!start] % english uk
+% \installlanguage [\s!hr] [\c!status=\v!start] % croatian
+
+\installlanguage [deo] [\c!status=\v!start] % old german
+% \installlanguage [nlx] [\c!status=\v!start] % dutch 8 bit
+
+%D The next lines can be used for setting the language to be
+%D used at startup time.
+
+% \setupcurrentlanguage[\s!af]
+% \setupcurrentlanguage[\s!cz]
+% \setupcurrentlanguage[\s!da]
+% \setupcurrentlanguage[\s!de]
+% \setupcurrentlanguage[\s!en]
+% \setupcurrentlanguage[\s!fi]
+% \setupcurrentlanguage[\s!fr]
+% \setupcurrentlanguage[\s!it]
+% \setupcurrentlanguage[\s!la]
+% \setupcurrentlanguage[\s!nl]
+% \setupcurrentlanguage[\s!no]
+% \setupcurrentlanguage[\s!pl]
+% \setupcurrentlanguage[\s!pt]
+% \setupcurrentlanguage[\s!sk]
+% \setupcurrentlanguage[\s!sp]
+% \setupcurrentlanguage[\s!sv]
+% \setupcurrentlanguage[\s!tr]
+% \setupcurrentlanguage[\s!hr]
+
+%D Local font settings can go here. Normally suitable
+%D defaults are already preloaded, almost certainly the
+%D Computer Modern Roman typefaces or some derivate. So, the
+%D next line is only meant as sample, take a look at the
+%D format related files first.
+
+% \definefilesynonym [font-cmr] [font-csr]
+% \definefilesynonym [font-cmr] [font-plr]
+
+%D Don't remove the next few lines.
+
+\protect
diff --git a/tex/generic/context/m-ch-de.tex b/tex/generic/context/m-ch-de.tex
new file mode 100644
index 000000000..467cdc670
--- /dev/null
+++ b/tex/generic/context/m-ch-de.tex
@@ -0,0 +1,10 @@
+% name : PPCHTEX / german interface
+% version : 1997.03.05
+% author : J. Hagen
+% copyright : J. Hagen, A.F. Otten
+
+\chardef\interfacenumber=2
+
+\input ppchtex.noc
+
+\endinput
diff --git a/tex/generic/context/m-ch-en.tex b/tex/generic/context/m-ch-en.tex
new file mode 100644
index 000000000..8c55a5669
--- /dev/null
+++ b/tex/generic/context/m-ch-en.tex
@@ -0,0 +1,10 @@
+% name : PPCHTEX / english interface
+% version : 1997.03.05
+% author : J. Hagen
+% copyright : J. Hagen, A.F. Otten
+
+\chardef\interfacenumber=0
+
+\input ppchtex.noc
+
+\endinput
diff --git a/tex/generic/context/m-ch-nl.tex b/tex/generic/context/m-ch-nl.tex
new file mode 100644
index 000000000..c9d77733a
--- /dev/null
+++ b/tex/generic/context/m-ch-nl.tex
@@ -0,0 +1,10 @@
+% name : PPCHTEX / english interface
+% version : 1997.03.05
+% author : J. Hagen
+% copyright : J. Hagen, A.F. Otten
+
+\chardef\interfacenumber=1
+
+\input ppchtex.noc
+
+\endinput
diff --git a/tex/generic/context/m-metapo.tex b/tex/generic/context/m-metapo.tex
new file mode 100644
index 000000000..6c2fa6fee
--- /dev/null
+++ b/tex/generic/context/m-metapo.tex
@@ -0,0 +1,89 @@
+%D \module
+%D [ file=m-metapo,
+%D version=1999.03.26,
+%D title=\LATEX\ Modules,
+%D subtitle=\METAPOST\ Inclusion,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ distribution and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D We quit when \CONTEXT\ is found and use some deep down
+%D macro to trigger this:
+
+\ifx\undefined\dodoplaceexternalfigure \else \expandafter \endinput \fi
+
+%D \macros
+%D {includeMPgraphics}
+%D
+%D This rather small \LATEX\ module is dedicated to David
+%D Arnold. It takes care of including the fonts used in
+%D \METAPOST\ graphics in the file. This hack is needed when
+%D one uses another \DVI\ driver than \DVIPS. This module
+%D falls back on the generic \CONTEXT\ support module:
+
+\ifx\undefined\includeMPfonts \input supp-mps.tex \relax \fi
+
+%D Instead of using \type {\includegraphics}, one should use its
+%D little brother \type {\includeMPgraphics}. This macro takes
+%D the same arguments.
+
+\def\includeMPgraphics#1#%
+ {\leavevmode\vbox\bgroup\hbox\bgroup
+ \def\includeMPgraphics##1%
+ {\includeMPfonts{##1}%
+ \includegraphics#1{##1}%
+ \egroup\egroup}%
+ \includeMPgraphics}
+
+%D An example of using this module is given below:
+%D
+%D \starttypen
+%D \documentclass[10pt]{article}
+%D
+%D \usepackage{graphicx}
+%D \usepackage{m-metapo}
+%D
+%D \begin{document}
+%D \includeMPgraphics{somefile.1}
+%D \includeMPgraphics[angle=90]{somefile.2}
+%D \end{document}
+%D \stoptypen
+%D
+%D This module needs \type {supp-mps} and \type {supp-mis},
+%D that both are present in the \CONTEXT\ path.
+%D
+%D Pleas do not forget to say \type {prologues:=2} at the
+%D top of the metapost file!
+%D
+%D For non \LATEX\ (and \CONTEXT) users we provide an
+%D alternative inclusion macro. This one has no optional
+%D arguments.
+
+\ifx\includegraphics\undefined
+
+ \ifx\undefined\dogetEPSboundingbox \input supp-eps.tex \relax \fi
+
+ \def\includeMPgraphics#1%
+ {\hbox\bgroup
+ \includeMPfonts{#1}%
+ \dogetEPSboundingbox{#1}{\dimen2}{\dimen4}{\dimen6}{\dimen8}%
+ \vbox to \dimen8
+ {\forgetall
+ \hsize\dimen6
+ \vfill
+ \hbox to \hsize
+ {\special
+ {PSfile="#1"\space
+ llx=\EPSllx\space
+ lly=\EPSlly\space
+ urx=\EPSurx\space
+ ury=\EPSury\space}}}%
+ \egroup}
+
+\fi
+
+\endinput
diff --git a/tex/generic/context/ppchtex.noc b/tex/generic/context/ppchtex.noc
new file mode 100644
index 000000000..7e47e1563
--- /dev/null
+++ b/tex/generic/context/ppchtex.noc
@@ -0,0 +1,205 @@
+%D \module
+%D [ file=ppchtex (m-chemie),
+%D version=1997.03.19,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX),
+%D author=Hans Hagen,
+%D date=\huidigedatum,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten},
+%D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
+
+%D This module facilitates the use of \PPCHTEX\ in macro
+%D packages other than \CONTEXT. One of the features of
+%D \CONTEXT\ is that the user interface can be in any
+%D language. This language is defined at loading time.
+%D
+%D This module is indeed a surrogate one and is only a poor
+%D man's alternative to the more extensive \type{mult-***}
+%D modules of \CONTEXT. The extra overhead in terms of macros
+%D and functionality that these modules offer is only useful
+%D in \CONTEXT.
+%D
+%D Two interfaces are supported here, but others can easily be
+%D defined. This module expects the general system macros to be
+%D loaded as wel as a interface switch \type{\ifalternativeinterface}
+%D to be set.
+
+%D First we load some auxiliary macro's:
+
+\input supp-mis.tex \let\writestatus\undefined
+\input syst-gen.tex
+
+%D after which we can go on with:
+
+\unprotect
+
+%D 0 = english
+%D 1 = dutch
+%D 2 = german
+
+\ifx\interfacenumber\undefined
+ \chardef\interfacenumber=0
+\fi
+
+\def\definesystemvariable #1 %
+ {\setvalue{??#1}{@@#1}}
+
+\def\definesystemconstant #1 %
+ {\setvalue{s!#1}{#1}}
+
+\def\definevariable #1 #2 #3 %
+ {\ifcase\interfacenumber
+ \setvalue{v!#2}{#1}
+ \or
+ \setvalue{v!#2}{#2}
+ \or
+ \setvalue{v!#2}{#3}
+ \fi}
+
+\def\defineconstant #1 #2 #3 %
+ {\ifcase\interfacenumber
+ \setvalue{c!#2}{#2}
+ \setvalue{c!#1}{#2}
+ \or
+ \setvalue{c!#2}{#2}
+ \or
+ \setvalue{c!#2}{#2}
+ \setvalue{c!#3}{#2}
+ \fi}
+
+\def\definecommand #1 #2 #3 %
+ {\ifcase\interfacenumber
+ % core commands are english
+ \or
+ \doifnot{#1}{#2}{\setvalue{#2}{\getvalue{#1}}}
+ \or
+ \doifnot{#1}{#3}{\setvalue{#3}{\getvalue{#1}}}
+ \fi}
+
+\long\def\startcommands#1\stopcommands%
+ {}
+
+\def\dosetvalue#1#2#3%
+ {\p!doifundefined{\c!prefix!#2}%
+ \let\donottest=\doprocesstest
+ \@EA\def\csname#1#2\endcsname{#3}%
+ \else
+ \let\donottest=\doprocesstest
+ \@EA\def\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \fi}
+
+\def\dosetevalue#1#2#3%
+ {\p!doifundefined{\c!prefix!#2}%
+ \let\donottest=\doprocesstest
+ \@EA\edef\csname#1#2\endcsname{#3}%
+ \else
+ \let\donottest=\doprocesstest
+ \@EA\edef\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \fi}
+
+\def\docopyvalue#1#2#3%
+ {\p!doifundefined{\c!prefix!#3}%
+ \let\donottest=\doprocesstest
+ \@EA\def\csname#1#3\endcsname%
+ {\csname#2#3\endcsname}%
+ \else
+ \let\donottest=\doprocesstest
+ \@EA\def\csname#1\csname\c!prefix!#3\endcsname\endcsname%
+ {\csname#2\csname\c!prefix!#3\endcsname\endcsname}%
+ \fi}
+
+\def\doresetvalue#1#2%
+ {\dosetvalue{#1}{#2}{}}
+
+\def\dogetvalue#1#2%
+ {\csname#1\csname\c!prefix!#2\endcsname\endcsname}
+
+\defineconstant axis assenstelsel achsen
+\defineconstant top boven oben
+\defineconstant width breedte breite
+\defineconstant size formaat groesse
+\defineconstant number getal nummer
+\defineconstant height hoogte hoehe
+\defineconstant frame kader rahmen
+\defineconstant bodyfont korps fliesstext
+\defineconstant style letter schriftstil
+\defineconstant left links links
+\defineconstant offset offset offset
+\defineconstant bottom onder unten
+\defineconstant option optie option
+\defineconstant location plaats platz
+\defineconstant right rechts rechts
+\defineconstant resolution resolutie aufloesung
+\defineconstant scale schaal format
+\defineconstant status status status
+\defineconstant text tekst text
+\defineconstant textsize tekstformaat textgroesse
+\defineconstant alternative variant alternative
+\defineconstant x x x
+\defineconstant y y y
+
+\definevariable on aan an
+\definevariable big groot gross
+\definevariable intext intekst imtext
+\definevariable small klein klein
+\definevariable medium middel mittel
+\definevariable fit passend passend
+\definevariable start start start
+\definevariable stop stop stop
+\definevariable test test test
+\definevariable off uit aus
+
+\definecommand definechemical definieerchemie definierechemie
+\definecommand setupchemical stelchemiein stellechemieein
+\definecommand chemical chemie chemie
+\definecommand tochemical naarchemie zurchemie
+\definecommand startchemical startchemie startchemie
+\definecommand stopchemical stopchemie stopchemie
+\definecommand toptext boventekst textueber
+\definecommand bottext ondertekst textunter
+\definecommand midtext middentekst textmitte
+
+\protect
+
+%D After those definitions we actually load \PPCHTEX:
+
+\input ppchtex.tex
+
+%D We also change some setup values. Let's hope that the next
+%D setups forever suits \LATEX.
+
+\unprotect
+
+\ifx\bodyfontsize\undefined
+ \ifx\f@size\undefined
+ \ifx\@ptsize\undefined
+ \setupchemical[\c!korps=11pt]
+ \else
+ \setupchemical[\c!korps=1\@ptsize pt]
+ \fi
+ \else
+ \setupchemical[\c!korps=\f@size pt]
+ \fi
+\else
+ \setupchemical[\c!korps=\bodyfontsize]
+\fi
+
+\ifx\mathrm\undefined
+ \setupchemical[\c!letter=\rm]
+\else
+ \setupchemical[\c!letter=\mathrm]
+\fi
+
+\ifx\outputresolution\undefined
+ \setupchemical[\c!resolutie=300]
+\else
+ \setupchemical[\c!resolutie=\outputresolution]
+\fi
+
+\protect
+
+\endinput
diff --git a/tex/latex/context/m-ch-de.sty b/tex/latex/context/m-ch-de.sty
new file mode 100644
index 000000000..d52078728
--- /dev/null
+++ b/tex/latex/context/m-ch-de.sty
@@ -0,0 +1 @@
+\input m-ch-de.tex \relax \endinput
diff --git a/tex/latex/context/m-ch-en.sty b/tex/latex/context/m-ch-en.sty
new file mode 100644
index 000000000..ba5a5e16c
--- /dev/null
+++ b/tex/latex/context/m-ch-en.sty
@@ -0,0 +1 @@
+\input m-ch-en.tex \relax \endinput
diff --git a/tex/latex/context/m-ch-nl.sty b/tex/latex/context/m-ch-nl.sty
new file mode 100644
index 000000000..492f5efd3
--- /dev/null
+++ b/tex/latex/context/m-ch-nl.sty
@@ -0,0 +1 @@
+\input m-ch-nl.tex \relax \endinput
diff --git a/tex/latex/context/m-metapo.sty b/tex/latex/context/m-metapo.sty
new file mode 100644
index 000000000..1df781eae
--- /dev/null
+++ b/tex/latex/context/m-metapo.sty
@@ -0,0 +1 @@
+\input m-metapo.tex \relax \endinput
diff --git a/tex/latex/context/m-pictex.sty b/tex/latex/context/m-pictex.sty
new file mode 100644
index 000000000..da9c18ed7
--- /dev/null
+++ b/tex/latex/context/m-pictex.sty
@@ -0,0 +1 @@
+\input m-pictex.tex \relax \endinput