summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2002-05-15 00:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2002-05-15 00:00:00 +0200
commiteec06cd3ed759e8101b6cafa16d46884e479a4f6 (patch)
tree07d5af570abdb3dd80d37e74bba1a0759855557d
parent64f02e3e5cbd20af19a0089553db5ee5c7d5eca1 (diff)
downloadcontext-eec06cd3ed759e8101b6cafa16d46884e479a4f6.tar.gz
stable 2002.05.15
-rw-r--r--context/data/cont-cz.tws3
-rw-r--r--context/data/cont-de.tws3
-rw-r--r--context/data/cont-en.tws3
-rw-r--r--context/data/cont-it.tws3
-rw-r--r--context/data/cont-nl.tws3
-rw-r--r--context/data/cont-ro.tws3
-rw-r--r--context/perltk/texexec.pl14
-rw-r--r--metapost/context/mp-tool.mp11
-rw-r--r--pdftex/config/context/original-ams-logo.map8
-rw-r--r--pdftex/config/context/original-vogel-symbol.map3
-rw-r--r--pdftex/config/context/pl0-ams-cmr.map154
-rw-r--r--tex/context/base/cont-new.tex720
-rw-r--r--tex/context/base/cont-sys.ori14
-rw-r--r--tex/context/base/cont-usr.ori1
-rw-r--r--tex/context/base/context.tex18
-rw-r--r--tex/context/base/core-box.tex518
-rw-r--r--tex/context/base/core-buf.tex51
-rw-r--r--tex/context/base/core-def.tex34
-rw-r--r--tex/context/base/core-fig.tex12
-rw-r--r--tex/context/base/core-fil.tex10
-rw-r--r--tex/context/base/core-fld.tex26
-rw-r--r--tex/context/base/core-grd.tex48
-rw-r--r--tex/context/base/core-ins.tex13
-rw-r--r--tex/context/base/core-itm.tex4
-rw-r--r--tex/context/base/core-job.tex8
-rw-r--r--tex/context/base/core-lst.tex108
-rw-r--r--tex/context/base/core-mak.tex4
-rw-r--r--tex/context/base/core-mat.tex112
-rw-r--r--tex/context/base/core-mis.tex349
-rw-r--r--tex/context/base/core-nav.tex33
-rw-r--r--tex/context/base/core-new.tex93
-rw-r--r--tex/context/base/core-not.tex259
-rw-r--r--tex/context/base/core-obj.tex86
-rw-r--r--tex/context/base/core-pos.tex32
-rw-r--r--tex/context/base/core-ref.tex66
-rw-r--r--tex/context/base/core-reg.tex7
-rw-r--r--tex/context/base/core-rul.tex136
-rw-r--r--tex/context/base/core-sec.tex384
-rw-r--r--tex/context/base/core-spa.tex71
-rw-r--r--tex/context/base/core-tab.tex4
-rw-r--r--tex/context/base/core-uti.tex44
-rw-r--r--tex/context/base/core-var.tex7
-rw-r--r--tex/context/base/enco-ans.tex300
-rw-r--r--tex/context/base/enco-cas.tex2
-rw-r--r--tex/context/base/enco-def.tex663
-rw-r--r--tex/context/base/enco-ec.tex322
-rw-r--r--tex/context/base/enco-ecm.tex33
-rw-r--r--tex/context/base/enco-ffr.tex36
-rw-r--r--tex/context/base/enco-il2.tex94
-rw-r--r--tex/context/base/enco-ini.tex17
-rw-r--r--tex/context/base/enco-lat.tex31
-rw-r--r--tex/context/base/enco-mis.tex124
-rw-r--r--tex/context/base/enco-pol.tex48
-rw-r--r--tex/context/base/enco-run.tex43
-rw-r--r--tex/context/base/enco-tbo.tex219
-rw-r--r--tex/context/base/filt-bas.tex63
-rw-r--r--tex/context/base/filt-ini.tex119
-rw-r--r--tex/context/base/font-ini.tex123
-rw-r--r--tex/context/base/font-run.tex12
-rw-r--r--tex/context/base/hand-def.tex13
-rw-r--r--tex/context/base/hand-ini.tex11
-rw-r--r--tex/context/base/java-ini.tex2
-rw-r--r--tex/context/base/lang-ger.tex20
-rw-r--r--tex/context/base/lang-ini.tex261
-rw-r--r--tex/context/base/lang-ita.tex9
-rw-r--r--tex/context/base/lang-lab.tex6
-rw-r--r--tex/context/base/lang-spa.tex19
-rw-r--r--tex/context/base/lang-spe.tex208
-rw-r--r--tex/context/base/m-gamma.tex230
-rw-r--r--tex/context/base/m-newmat.tex5
-rw-r--r--tex/context/base/m-tryout.tex51
-rw-r--r--tex/context/base/m-units.tex17
-rw-r--r--tex/context/base/math-pln.tex4
-rw-r--r--tex/context/base/meta-ini.tex69
-rw-r--r--tex/context/base/mult-com.tex27
-rw-r--r--tex/context/base/mult-con.tex8
-rw-r--r--tex/context/base/mult-sys.tex18
-rw-r--r--tex/context/base/page-bck.tex25
-rw-r--r--tex/context/base/page-flt.tex496
-rw-r--r--tex/context/base/page-ini.tex13
-rw-r--r--tex/context/base/page-lay.tex26
-rw-r--r--tex/context/base/page-lyr.tex327
-rw-r--r--tex/context/base/page-mar.tex2
-rw-r--r--tex/context/base/page-mul.tex33
-rw-r--r--tex/context/base/page-new.tex12
-rw-r--r--tex/context/base/page-not.tex55
-rw-r--r--tex/context/base/page-num.tex54
-rw-r--r--tex/context/base/page-one.tex5
-rw-r--r--tex/context/base/page-run.tex7
-rw-r--r--tex/context/base/page-set.tex553
-rw-r--r--tex/context/base/page-sid.tex19
-rw-r--r--tex/context/base/page-txt.tex26
-rw-r--r--tex/context/base/regi-ibm.tex60
-rw-r--r--tex/context/base/regi-il1.tex265
-rw-r--r--tex/context/base/regi-lat.tex34
-rw-r--r--tex/context/base/regi-win.tex4
-rw-r--r--tex/context/base/setupb.tex14
-rw-r--r--tex/context/base/spec-fdf.tex6
-rw-r--r--tex/context/base/supp-box.tex169
-rw-r--r--tex/context/base/supp-fun.tex26
-rw-r--r--tex/context/base/supp-mis.tex3
-rw-r--r--tex/context/base/supp-mps.tex61
-rw-r--r--tex/context/base/supp-num.tex4
-rw-r--r--tex/context/base/supp-pdf.tex94
-rw-r--r--tex/context/base/symb-eur.tex8
-rw-r--r--tex/context/base/symb-glm.tex54
-rw-r--r--tex/context/base/symb-ini.tex133
-rw-r--r--tex/context/base/symb-mis.tex135
-rw-r--r--tex/context/base/symb-mvs.tex8
-rw-r--r--tex/context/base/syst-etx.tex13
-rw-r--r--tex/context/base/syst-ext.tex17
-rw-r--r--tex/context/base/syst-gen.tex4
-rw-r--r--tex/context/base/syst-new.tex1
-rw-r--r--tex/context/base/syst-omg.tex113
-rw-r--r--tex/context/base/syst-prm.tex20
-rw-r--r--tex/context/base/type-enc.tex408
-rw-r--r--tex/context/base/type-ini.tex2
-rw-r--r--tex/context/base/type-map.tex1
-rw-r--r--tex/context/base/type-omg.tex200
-rw-r--r--tex/context/base/xtag-ext.tex9
-rw-r--r--tex/context/base/xtag-ini.tex18
-rw-r--r--tex/context/config/cont-usr.tex1
-rw-r--r--tex/context/user/cont-sys.rme14
123 files changed, 6804 insertions, 3455 deletions
diff --git a/context/data/cont-cz.tws b/context/data/cont-cz.tws
index e7cd36b33..099fd9b37 100644
--- a/context/data/cont-cz.tws
+++ b/context/data/cont-cz.tws
@@ -707,7 +707,7 @@ var:strut:ano,ne::
var:zarovnani:ne,vlevo,vpravo,nastred,normalni,vysoko,nizko,nivy::
var:spodek:*prikaz::
var:vrsek:*prikaz::
-var:ramecek:zap,vyp,prekryv::
+var:ramecek:zap,vyp,zadny,prekryv::
var:rameceknahore:zap,vyp::
var:ramecekdole:zap,vyp::
var:ramecekvlevo:zap,vyp::
@@ -809,6 +809,7 @@ var:vnitrni:*prikaz::
var:korekceradku:zap,vyp::
var:korekcehloubky:zap,vyp::
var:marginalie:standardni,ano,ne::
+var:misto:vlevo,vpravo,nastred,zadny::
ivr:nastavoramovani::
stopsetup
diff --git a/context/data/cont-de.tws b/context/data/cont-de.tws
index 5b9038082..6d1e1c6b5 100644
--- a/context/data/cont-de.tws
+++ b/context/data/cont-de.tws
@@ -707,7 +707,7 @@ var:strut:ja,nein::
var:ausrichtung:nein,links,rechts,mittig,normal,hoch,tief,hoti::
var:unten:*Befehl::
var:oben:*Befehl::
-var:rahmen:an,aus,overlay::
+var:rahmen:an,aus,kein,overlay::
var:obenrahmen:an,aus::
var:untenrahmen:an,aus::
var:linkerrahmen:an,aus::
@@ -809,6 +809,7 @@ var:innen:*Befehl::
var:zeilekorrektur:an,aus::
var:tiefekorrektur:an,aus::
var:marginalie:standard,ja,nein::
+var:platz:links,rechts,mittig,kein::
ivr:stelleumrahmtein::
stopsetup
diff --git a/context/data/cont-en.tws b/context/data/cont-en.tws
index 5f64d0276..1072c529d 100644
--- a/context/data/cont-en.tws
+++ b/context/data/cont-en.tws
@@ -707,7 +707,7 @@ var:strut:yes,no::
var:align:no,left,right,middle,normal,high,low,lohi::
var:bottom:*command::
var:top:*command::
-var:frame:on,off,overlay::
+var:frame:on,off,none,overlay::
var:topframe:on,off::
var:bottomframe:on,off::
var:leftframe:on,off::
@@ -809,6 +809,7 @@ var:inner:*command::
var:linecorrection:on,off::
var:depthcorrection:on,off::
var:margin:standard,yes,no::
+var:location:left,right,middle,none::
ivr:setupframed::
stopsetup
diff --git a/context/data/cont-it.tws b/context/data/cont-it.tws
index fc4b20a3b..63702568b 100644
--- a/context/data/cont-it.tws
+++ b/context/data/cont-it.tws
@@ -707,7 +707,7 @@ var:strut:si,no::
var:allinea:no,sinistra,destra,centro,normale,alto,basso,pedap::
var:fondo:*comando::
var:cima:*comando::
-var:cornice:attivo,disattivo,sovrapponi::
+var:cornice:attivo,disattivo,nessuno,sovrapponi::
var:cornicecima:attivo,disattivo::
var:cornicefondo:attivo,disattivo::
var:cornicesinistra:attivo,disattivo::
@@ -809,6 +809,7 @@ var:interno:*comando::
var:correzioneriga:attivo,disattivo::
var:correzioneprofondita:attivo,disattivo::
var:margine:standard,si,no::
+var:luogo:sinistra,destra,centro,nessuno::
ivr:impostaincorniciato::
stopsetup
diff --git a/context/data/cont-nl.tws b/context/data/cont-nl.tws
index ca6148024..d5ce25503 100644
--- a/context/data/cont-nl.tws
+++ b/context/data/cont-nl.tws
@@ -707,7 +707,7 @@ var:strut:ja,nee::
var:uitlijnen:nee,links,rechts,midden,normaal,hoog,laag,laho::
var:onder:*commando::
var:boven:*commando::
-var:kader:aan,uit,overlay::
+var:kader:aan,uit,geen,overlay::
var:bovenkader:aan,uit::
var:onderkader:aan,uit::
var:linkerkader:aan,uit::
@@ -809,6 +809,7 @@ var:binnen:*commando::
var:regelcorrectie:aan,uit::
var:dieptecorrectie:aan,uit::
var:marge:standaard,ja,nee::
+var:plaats:links,rechts,midden,geen::
ivr:stelomlijndin::
stopsetup
diff --git a/context/data/cont-ro.tws b/context/data/cont-ro.tws
index 5a04875d5..fc3a27748 100644
--- a/context/data/cont-ro.tws
+++ b/context/data/cont-ro.tws
@@ -707,7 +707,7 @@ var:strut:da,nu::
var:aliniere:nu,stanga,dreapta,centru,normal,inalt,jos,lohi::
var:jos:*comanda::
var:sus:*comanda::
-var:frame:on,dezactivat,overlay::
+var:frame:on,dezactivat,niciunul,overlay::
var:framesus:on,dezactivat::
var:framejos:on,dezactivat::
var:framestanga:on,dezactivat::
@@ -809,6 +809,7 @@ var:intern:*comanda::
var:corectielinie:on,dezactivat::
var:corectieadancime:on,dezactivat::
var:margine:standard,da,nu::
+var:locatie:stanga,dreapta,centru,niciunul::
ivr:seteazainconjurat::
stopsetup
diff --git a/context/perltk/texexec.pl b/context/perltk/texexec.pl
index f2db16a90..e020cddcd 100644
--- a/context/perltk/texexec.pl
+++ b/context/perltk/texexec.pl
@@ -792,9 +792,9 @@ sub MPJobName
{ my $JobName = shift ;
my $MPfile = shift ;
my $MPJobName = '' ;
- if (-s "$JobName-$MPfile.mp">100)
+ if (-s "$JobName-$MPfile.mp">50)
{ $MPJobName = "$JobName-$MPfile.mp" }
- elsif (-s "$MPfile.mp">100)
+ elsif (-s "$MPfile.mp">50)
{ $MPJobName = "$MPfile.mp" }
else
{ $MPJobName = "" }
@@ -804,12 +804,14 @@ sub RunPerlScript
{ my ($ScriptName, $Options) = @_ ;
if ($dosish)
# { if (-e "$TeXScriptsPath$ScriptName.pl")
- { if (-e "$TeXScriptsPath$ScriptName$own_type")
+ { # print "$TeXScriptsPath$ScriptName$own_type" ;
+ if (-e "$TeXScriptsPath$ScriptName$own_type")
# { system ("perl $TeXScriptsPath$ScriptName.pl $Options") } }
{ system ("$own_stub$TeXScriptsPath$ScriptName$own_type $Options") } }
else
{ system ("$ScriptName $Options") } }
+
sub ConvertXMLFile
{ my $FileName = shift ; RunPerlScript($SGMLtoTeX, "$FileName.xml") }
@@ -839,7 +841,9 @@ sub CheckOutputFormat
sub MakeOptionFile
{ my ($FinalRun, $FastDisabled, $JobName, $JobSuffix) = @_ ;
- open (OPT, ">$JobName.top") ;
+ unless (open (OPT, ">$JobName.top"))
+ { print " problem with writing : $JobName.top\n" ;
+ open (OPT, ">$JobName-opt.log") }
print OPT "\\unprotect\n" ;
if ($Result) # no '' test
{ print OPT "\\setupsystem[file=$Result]\n" }
@@ -1321,7 +1325,7 @@ sub RunConTeXtFile
if ($Mode)
{ print " current mode : $Mode\n" }
else
- { print " current mode : all\n" }
+ { print " current mode : none\n" }
if ($Arguments)
{ print " arguments : $Arguments\n" }
if ($Modules)
diff --git a/metapost/context/mp-tool.mp b/metapost/context/mp-tool.mp
index e24bd45e9..1c8dc83f2 100644
--- a/metapost/context/mp-tool.mp
+++ b/metapost/context/mp-tool.mp
@@ -1732,11 +1732,18 @@ enddef ;
% handy
vardef bbwidth (expr p) =
- (if known p : xpart (lrcorner p - llcorner p) else : 0 fi)
+ (if known p :
+ if path p or picture p :
+ xpart (lrcorner p - llcorner p)
+ else : 0 fi else : 0
+ fi )
enddef ;
vardef bbheight (expr p) =
- (if known p : ypart (urcorner p - lrcorner p) else : 0 fi)
+ (if known p : if path p or picture p :
+ ypart (urcorner p - lrcorner p)
+ else : 0 fi else : 0
+ fi)
enddef ;
color nocolor ; numeric noline ; % both unknown signals
diff --git a/pdftex/config/context/original-ams-logo.map b/pdftex/config/context/original-ams-logo.map
deleted file mode 100644
index 83a0d6892..000000000
--- a/pdftex/config/context/original-ams-logo.map
+++ /dev/null
@@ -1,8 +0,0 @@
-logo8 < logo8.pfb
-logo9 < logo9.pfb
-logo10 < logo10.pfb
-logobf10 < logobf10.pfb
-logod10 < logod10.pfb
-logosl8 < logosl8.pfb
-logosl9 < logosl9.pfb
-logosl10 < logosl10.pfb
diff --git a/pdftex/config/context/original-vogel-symbol.map b/pdftex/config/context/original-vogel-symbol.map
index fe1fa3b2f..601d0317d 100644
--- a/pdftex/config/context/original-vogel-symbol.map
+++ b/pdftex/config/context/original-vogel-symbol.map
@@ -1 +1,2 @@
-fmvr8x Marvosym < fmvr8x.pfb
+fmvr8x Marvosym < marvosym.pfb
+
diff --git a/pdftex/config/context/pl0-ams-cmr.map b/pdftex/config/context/pl0-ams-cmr.map
index a217781bd..781bcb106 100644
--- a/pdftex/config/context/pl0-ams-cmr.map
+++ b/pdftex/config/context/pl0-ams-cmr.map
@@ -1,77 +1,77 @@
-plb10 <plb10.pfb
-plbsy10 <plbsy10.pfb
-plbx10 <plbx10.pfb
-plbx12 <plbx12.pfb
-plbx5 <plbx5.pfb
-plbx6 <plbx6.pfb
-plbx7 <plbx7.pfb
-plbx8 <plbx8.pfb
-plbx9 <plbx9.pfb
-plbxsl10 <plbxsl10.pfb
-plbxti10 <plbxti10.pfb
-plcsc10 <plcsc10.pfb
-pldunh10 <pldunh10.pfb
-plex10 <plex10.pfb
-plex9 <plex9.pfb
-plff10 <plff10.pfb
-plfi10 <plfi10.pfb
-plfib8 <plfib8.pfb
-plinch <plinch.pfb
-plitt10 <plitt10.pfb
-plmi10 <plmi10.pfb
-plmi12 <plmi12.pfb
-plmi5 <plmi5.pfb
-plmi6 <plmi6.pfb
-plmi7 <plmi7.pfb
-plmi8 <plmi8.pfb
-plmi9 <plmi9.pfb
-plmib10 <plmib10.pfb
-plr10 <plr10.pfb
-plr12 <plr12.pfb
-plr17 <plr17.pfb
-plr5 <plr5.pfb
-plr6 <plr6.pfb
-plr7 <plr7.pfb
-plr8 <plr8.pfb
-plr9 <plr9.pfb
-plsl10 <plsl10.pfb
-plsl12 <plsl12.pfb
-plsl8 <plsl8.pfb
-plsl9 <plsl9.pfb
-plsltt10 <plsltt10.pfb
-plss10 <plss10.pfb
-plss12 <plss12.pfb
-plss17 <plss17.pfb
-plss8 <plss8.pfb
-plss9 <plss9.pfb
-plssbi10 <plssbi10.pfb
-plssbx10 <plssbx10.pfb
-plssdc10 <plssdc10.pfb
-plssi10 <plssi10.pfb
-plssi12 <plssi12.pfb
-plssi17 <plssi17.pfb
-plssi8 <plssi8.pfb
-plssi9 <plssi9.pfb
-plssq8 <plssq8.pfb
-plssqi8 <plssqi8.pfb
-plsy10 <plsy10.pfb
-plsy5 <plsy5.pfb
-plsy6 <plsy6.pfb
-plsy7 <plsy7.pfb
-plsy8 <plsy8.pfb
-plsy9 <plsy9.pfb
-pltcsc10 <pltcsc10.pfb
-pltex10 <pltex10.pfb
-pltex8 <pltex8.pfb
-pltex9 <pltex9.pfb
-plti10 <plti10.pfb
-plti12 <plti12.pfb
-plti7 <plti7.pfb
-plti8 <plti8.pfb
-plti9 <plti9.pfb
-pltt10 <pltt10.pfb
-pltt12 <pltt12.pfb
-pltt8 <pltt8.pfb
-pltt9 <pltt9.pfb
-plu10 <plu10.pfb
-plvtt10 <plvtt10.pfb
+plb10 <plrm.enc <plb10.pfb
+plbsy10 <plms.enc <plbsy10.pfb
+plbx10 <plrm.enc <plbx10.pfb
+plbx12 <plrm.enc <plbx12.pfb
+plbx5 <plrm.enc <plbx5.pfb
+plbx6 <plrm.enc <plbx6.pfb
+plbx7 <plrm.enc <plbx7.pfb
+plbx8 <plrm.enc <plbx8.pfb
+plbx9 <plrm.enc <plbx9.pfb
+plbxsl10 <plrm.enc <plbxsl10.pfb
+plbxti10 <plit.enc <plbxti10.pfb
+plcsc10 <plsc.enc <plcsc10.pfb
+pldunh10 <plrm.enc <pldunh10.pfb
+plex10 <plme.enc <plex10.pfb
+plex9 <plme.enc <plex9.pfb
+plff10 <plrm.enc <plff10.pfb
+plfi10 <plit.enc <plfi10.pfb
+plfib8 <plrm.enc <plfib8.pfb
+plinch <plin.enc <plinch.pfb
+plitt10 <plitt.enc <plitt10.pfb
+plmi10 <plmi.enc <plmi10.pfb
+plmi12 <plmi.enc <plmi12.pfb
+plmi5 <plmi.enc <plmi5.pfb
+plmi6 <plmi.enc <plmi6.pfb
+plmi7 <plmi.enc <plmi7.pfb
+plmi8 <plmi.enc <plmi8.pfb
+plmi9 <plmi.enc <plmi9.pfb
+plmib10 <plmi.enc <plmib10.pfb
+plr10 <plrm.enc <plr10.pfb
+plr12 <plrm.enc <plr12.pfb
+plr17 <plrm.enc <plr17.pfb
+plr5 <plsc.enc <plr5.pfb
+plr6 <plrm.enc <plr6.pfb
+plr7 <plrm.enc <plr7.pfb
+plr8 <plrm.enc <plr8.pfb
+plr9 <plrm.enc <plr9.pfb
+plsl10 <plrm.enc <plsl10.pfb
+plsl12 <plrm.enc <plsl12.pfb
+plsl8 <plrm.enc <plsl8.pfb
+plsl9 <plrm.enc <plsl9.pfb
+plsltt10 <pltt.enc <plsltt10.pfb
+plss10 <plrm.enc <plss10.pfb
+plss12 <plrm.enc <plss12.pfb
+plss17 <plrm.enc <plss17.pfb
+plss8 <plrm.enc <plss8.pfb
+plss9 <plrm.enc <plss9.pfb
+plssbi10 <plrm.enc <plssbi10.pfb
+plssbx10 <plrm.enc <plssbx10.pfb
+plssdc10 <plrm.enc <plssdc10.pfb
+plssi10 <plrm.enc <plssi10.pfb
+plssi12 <plrm.enc <plssi12.pfb
+plssi17 <plrm.enc <plssi17.pfb
+plssi8 <plrm.enc <plssi8.pfb
+plssi9 <plrm.enc <plssi9.pfb
+plssq8 <plrm.enc <plssq8.pfb
+plssqi8 <plrm.enc <plssqi8.pfb
+plsy10 <plms.enc <plsy10.pfb
+plsy5 <plms.enc <plsy5.pfb
+plsy6 <plms.enc <plsy6.pfb
+plsy7 <plms.enc <plsy7.pfb
+plsy8 <plms.enc <plsy8.pfb
+plsy9 <plms.enc <plsy9.pfb
+pltcsc10 <pltt.enc <pltcsc10.pfb
+pltex10 <plte.enc <pltex10.pfb
+pltex8 <plte.enc <pltex8.pfb
+pltex9 <plte.enc <pltex9.pfb
+plti10 <plit.enc <plti10.pfb
+plti12 <plit.enc <plti12.pfb
+plti7 <plit.enc <plti7.pfb
+plti8 <plit.enc <plti8.pfb
+plti9 <plit.enc <plti9.pfb
+pltt10 <pltt.enc <pltt10.pfb
+pltt12 <pltt.enc <pltt12.pfb
+pltt8 <pltt.enc <pltt8.pfb
+pltt9 <pltt.enc <pltt9.pfb
+plu10 <plit.enc <plu10.pfb
+plvtt10 <plrm.enc <plvtt10.pfb
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 7c918b33e..cad90244f 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -12,27 +12,299 @@
%C details.
% manual : offsetbox alignbox
+
+% todo achtergronden in kolommen
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks and new features.
\unprotect
+
+\appendtoks \checkcurrentlayout \to \everystarttext
+
+\def\flushfootnotes {\flushnotes}
+\def\doflushfootnotes{\doflushnotes}
+
+\def\usesubpath[#1]%
+ {\ifx\allinputpaths\empty
+ \edef\allinputpaths{#1}%
+ \else
+ \def\docommando##1%
+ {\def\dodocommando####1{\addtocommalist{##1/####1}\allinputpaths}%
+ \processcommalist[#1]\dodocommando}%
+ \processcommacommand[\allinputpaths]\docommando
+ \fi}
+
+\newif\ifboxhasframe
+
+\def\startlocalframed[#1][#2]%
+ {\bgroup
+ \inframedtrue
+ \edef\@@framed{#1}%
+ % this piece of pre expansion is needed (sometimes used in frameoffset)
+ % \doifvaluesomething{\@@framed\c!lijndikte} % obsolete
+ % {\ruledlinewidth\getvalue{\@@framed\c!lijndikte}}% obsolete
+ % this piece of pre expansion is needed (sometimes used circular)
+ \scratchdimen\getvalue{\@@framed\c!kaderoffset}%
+ \setevalue{\@@framed\c!kaderoffset}{\the\scratchdimen}%
+ \doifnotvalue{\@@framed\c!achtergrondoffset}\v!kader
+ {\scratchdimen\getvalue{\@@framed\c!achtergrondoffset}%
+ \setevalue{\@@framed\c!achtergrondoffset}{\the\scratchdimen}}%
+ % we need to register the (outer) color
+ \startregistercolor[\getvalue{\@@framed\c!voorgrondkleur}]%
+ % to prevent deadlock in case of self refering
+ \ifsecondargument % faster
+ \getparameters[\@@framed][#2]% here !
+ \fi
+ % to get the right spacing
+ \doifvaluesomething{\@@framed\c!voorgrondletter}
+ {\@EA\doconvertfont\csname\@@framed\c!voorgrondletter\endcsname\empty}%
+ % beware, both the frame and background offset can be overruled
+ %
+ % the next macros are visible
+ \edef\localoffset{\getvalue{\@@framed\c!offset }}%
+ \edef\localwidth {\getvalue{\@@framed\c!breedte }}%
+ \edef\localheight{\getvalue{\@@framed\c!hoogte }}%
+ \edef\localformat{\getvalue{\@@framed\c!uitlijnen}}%
+ \edef\localstrut {\getvalue{\@@framed\c!strut }}%
+ % these are not
+ \edef\@@localframing {\getvalue{\@@framed\c!kader }}%
+ \edef\@@locallocation{\getvalue{\@@framed\c!plaats}}%
+ %
+ \ifx\@@localframing\v!overlay % no frame, no offset, no framewidth
+ \boxhasframefalse
+ \let\localoffset\v!overlay
+ \else\ifx\@@localframing\v!geen % no frame, no framewidth
+ \boxhasframefalse
+ \else
+ \boxhasframetrue
+ \fi\fi
+ \ifboxhasframe
+ \doifvaluesomething{\@@framed\c!lijndikte}
+ {\ruledlinewidth\getvalue{\@@framed\c!lijndikte}\relax
+ \ifinheritruledlinewidth\linewidth\ruledlinewidth\fi}%
+ \else
+ \ruledlinewidth\zeropoint
+ \fi
+ \ifx\localformat\empty
+ \boxhasformatfalse
+ \else
+ \boxhasformattrue
+ \dosetraggedcommand\localformat
+ \edef\dobeforeframedbox{\raggedtopcommand\getvalue{\@@framed\c!boven}}%
+ \edef\doafterframedbox {\getvalue{\@@framed\c!onder}\raggedbottomcommand}%
+ \fi
+ \ifx\localoffset\v!geen
+ \boxhasoffsetfalse
+ \boxhasstrutfalse
+ \boxisoverlaidfalse
+ \@@localoffset\ruledlinewidth
+ \else\ifx\localoffset\v!overlay
+% \ifx\@@localframing\v!nee \boxhasframefalse \fi % test first
+ \boxhasoffsetfalse
+ \boxhasstrutfalse
+ \boxisoverlaidtrue
+ \@@localoffset\zeropoint
+ \else
+ \boxhasoffsettrue
+ \boxhasstruttrue
+ \boxisoverlaidfalse
+ \ifx\localoffset\v!default % new per 2-6-2000
+ \let\localoffset\defaultframeoffset
+ \letvalue{\@@framed\c!offset}\defaultframeoffset
+ \else
+ \let\defaultframeoffset\localoffset
+ \fi
+ \@@localoffset\localoffset
+ \advance\@@localoffset \ruledlinewidth
+ \fi\fi
+ \ifx\localwidth\v!passend
+ \ifboxhasformat
+ \boxhaswidthtrue
+ \!!widtha\hsize
+ \else
+ \boxhaswidthfalse
+ \fi
+ \else\ifx\localwidth\v!ruim
+ \boxhaswidthtrue
+ \!!widtha\hsize
+ \else
+ \boxhaswidthtrue
+ \!!widtha\localwidth
+ \fi\fi
+ \ifx\localheight\v!passend
+ \boxhasheightfalse % no longer: \boxhasstrutfalse
+ \else\ifx\localheight\v!ruim
+ \boxhasheightfalse
+ \else
+ \boxhasheighttrue
+ \!!heighta\localheight
+ \fi\fi
+ \ifdim\!!widtha=\hsize
+ \parindent\zeropoint
+ \setlocalhsize
+ \!!widtha\localhsize
+ \fi
+ \advance\!!widtha -2\@@localoffset
+ \advance\!!heighta -2\@@localoffset
+ \ifx\localstrut\v!nee
+ \boxhasstrutfalse
+ \fi
+ \ifboxhasstrut
+ \setstrut
+ \let\localbegstrut\begstrut
+ \let\localendstrut\endstrut
+ \let\localstrut \strut
+ \else
+ \let\localbegstrut\pseudobegstrut % was: \relax
+ \let\localendstrut\pseudoendstrut % was: \relax
+ \let\localstrut \pseudostrut % was: \relax
+ %\ifboxhasheight\ifdim\!!heighta<\ht\strutbox % saveguard
+ % \let\localbegstrut\relax % but not that
+ % \let\localstrut \relax % save afterall
+ %\fi\fi
+ \fi
+ \ifboxhasheight
+ \let\\\vboxednewline
+ \ifboxhaswidth
+ \let\hairline\vboxedhairline
+ \ifboxhasformat
+ \let\next\doformatboxSomeFormat
+ \else
+ \let\next\doformatboxNoFormat
+ \fi
+ \else
+ \let\hairline\hboxedhairline
+ \ifboxhasformat
+ \let\next\doformatboxHeight
+ \else
+ \let\next\doformatboxVSize
+ \fi
+ \fi
+ \else
+ \ifboxhaswidth
+ \ifboxhasformat
+ \let\hairline\vboxedhairline
+ \let\\\vboxednewline
+ \let\next\doformatboxWidth
+ \else
+ \let\hairline\hboxedhairline
+ \let\\\hboxednewline
+ \let\next\doformatboxHSize
+ \fi
+ \else
+ \let\hairline\hboxedhairline
+ \let\\\hboxednewline
+ \let\next\doformatboxNoSize
+ \fi
+ \fi
+ \edef\framedwidth % a new feature, visible fo ruser
+ {\ifdim\!!widtha >\zeropoint\the\!!widtha \else\zeropoint\fi}%
+ \edef\framedheight% a new feature, visible fo ruser
+ {\ifdim\!!heighta>\zeropoint\the\!!heighta\else\zeropoint\fi}%
+ % first alternative
+ %\def\dowithframedbox%
+ % {\let\postprocessframebox\undefined %new
+ % \aftergroup\stoplocalframed}%
+ % \afterassignment\dowithframedbox
+ % \setbox\framebox=\next}
+ % second alternative
+ %\dowithnextbox
+ % {\setbox\framebox=\box\nextbox
+ % \let\postprocessframebox\undefined %new
+ % \stoplocalframed}
+ % \next}
+ % third alternative
+ \afterassignment\dodowithframebox
+ \setbox\framebox\next}
+
+\def\stoplocalframed%
+ {\dontshowcomposition
+ \ifboxhasformat
+ \ifx\localwidth\v!passend
+ \ifreshapeframebox\doreshapeframedbox\fi
+ \boxhaswidthfalse
+ \else
+ \resetshapeframebox
+ \fi
+ \else
+ \resetshapeframebox
+ \fi
+ \ifboxhaswidth
+ \wd\framebox\!!widtha
+ \fi
+ \ifboxhasheight
+ \ht\framebox\!!heighta
+ \fi
+ \doifvalue{\@@framed\c!leeg}\v!ja
+ {\setbox\scratchbox\null
+ \wd\scratchbox\wd\framebox
+ \ht\scratchbox\ht\framebox
+ \dp\scratchbox\dp\framebox
+ \setbox\framebox\box\scratchbox}%
+ \stopregistercolor
+ \docolorframebox
+ \ifboxhasoffset
+ \dooffsetframebox
+ \fi
+ \ifboxisoverlaid \else
+ \dolocateframebox
+ \fi
+ \ifx\postprocessframebox\undefined \else
+ \postprocessframebox\framebox
+ \fi
+ \edef\overlaylinecolor{\getvalue{\@@framed\c!kaderkleur}}%
+ \edef\overlaylinewidth{\the\ruledlinewidth}% \@@...
+ \ifboxhasframe % real or invisible frame
+ \doframedbox
+ \fi
+ \doifvaluesomething{\@@framed\c!achtergrond}\dobackedbox
+ \ifx\@@locallocation\v!laag
+ \doinlineframedbox
+ \else\ifx\@@locallocation\v!diepte
+ \doloweredframedbox
+ \fi\fi
+ \box\framebox
+ \egroup
+ \egroup}
+
+\def\fontclassname#1#2%
+ {\ifcsname\??ff#1#2\endcsname
+ \fontclassname{#1}{\csname\??ff#1#2\endcsname}%
+ \else\ifcsname\??ff#2\endcsname
+ \fontclassname{#1}{\csname\??ff#2\endcsname}%
+ \else
+ #2%
+ \fi\fi}
+\def\defineclassfontsynonym
+ {\dotripleargument\dodefineclassfontsynonym}
+
+\def\dodefineclassfontsynonym[#1][#2][#3]%
+ {\definefontsynonym[#1][\fontclassname{#2}{#3}]}
+
+%\definefontsynonym [KopFont] [\fontclassname{officina}{SerifBold}]
+%
+%\defineclassfontsynonym [KopFont] [officina] [SerifBold]
\def\woordrechts % zie naw
{\groupedcommand
{\hfill\allowbreak\strut\hfill\hbox}
{\parfillskip\zeropoint\par}}
-\def\startkolomopmaak
+\def\startkolomopmaak % don't change
{\bgroup
- \getnoflines\vsize
+ \getrawnoflines\teksthoogte % teksthoogte kan topskip hebben, dus raw
\scratchdimen\noflines\lineheight
- \vbox to \scratchdimen\bgroup}
+ \advance\scratchdimen-\lineheight
+ \advance\scratchdimen\topskip
+ \setbox\scratchbox\vbox to \scratchdimen\bgroup}
\def\stopkolomopmaak
- {\vss % niet meer aanpassen
- \egroup
+ {\egroup
+ \dp\scratchbox\zeropoint
+ \wd\scratchbox\tekstbreedte
+ \box\scratchbox
\egroup}
% transparency !
@@ -64,121 +336,6 @@
\fi
\fi}
-\unexpanded\def\placeheadtext
- {\doquintupleempty\doplaceheadtextornumber
- [\c!tekstletter][\c!tekstkleur][\empty]}
-
-\unexpanded\def\placeheadnumber
- {\doquintupleempty\doplaceheadtextornumber
- [\c!nummerletter][\c!nummerkleur][\v!nummer]}
-
-\def\doplaceheadtextornumber[#1][#2][#3][#4][#5]%
- {\bgroup
- \edef\@@sectie{\??ko\iffifthargument#5\else#4\fi}%
- \dostartattributes\@@sectie\c!letter\c!kleur\empty
- \dontconvertfont
- \dostartattributes\@@sectie#1#2\empty
- \stelinterliniein % \setupinterlinespace
- \begstrut\getmarking[\hoofdmarkering{#4#3}]\endstrut
- \endgraf
- \dostopattributes
- \dostopattributes
- \egroup}
-
-\def\doplaatskoptekst#1#2#3#4%
- {\beginheadplacement{#1}%
- \iflegekop
- \setbox0\ifvertical\vbox\else\hbox\fi to \zeropoint
- {\headnumbercontentfalse
- \resetsystemmode\v!sectienummer
- #2}%
- \makestrutofbox0
- \else
- \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox
- {\headnumbercontentfalse
- \resetsystemmode\v!sectienummer
- % outerside font determines distance
- \dosetfontattribute{\??ko#1}\c!letter
- % but we don't want color to influence user commands
- \getvalue{\??ko#1\c!commando}
- {} % no number
- {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty
- \dostartattributes{\??ko#1}\c!tekstletter\c!tekstkleur\empty
- \dontconvertfont
- \ifdisplaysectionhead
- \stelinterliniein
- \else
- \stelspatieringin
- \fi
- #2%
- \getvalue{\??ko#1\c!voorcommando}%
- \ifdisplaysectionhead
- \getvalue{\??ko#1\c!tekstcommando}%
- {\setstrut\begstrut#3\endstrut}%
- \xdef\localheaddepth{\the\dp\strutbox}%
- \else
- \getvalue{\??ko#1\c!tekstcommando}{#3}%
- \fi
- \getvalue{\??ko#1\c!nacommando}%
- \ifdisplaysectionhead\endgraf\fi
- \dostopattributes
- \dostopattributes}}%
- \fi
- \endheadplacement{#1}{#4}}
-
-\def\doplaatskopnummertekst#1#2#3#4#5%
- {\beginheadplacement{#1}%
- \iflegekop
- \setbox0\ifvertical\vbox\else\hbox\fi to \zeropoint
- {\doiftextelse{#3}
- {\setsystemmode \v!sectienummer\headnumbercontenttrue }
- {\resetsystemmode\v!sectienummer\headnumbercontentfalse}%
- #2}%
- \makestrutofbox0
- \else
- \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox
- {\doiftextelse{#3}
- {\setsystemmode \v!sectienummer\headnumbercontenttrue }
- {\resetsystemmode\v!sectienummer\headnumbercontentfalse}%
- % outerside font determines distance
- \dosetfontattribute{\??ko#1}\c!letter
- % but we don't want color to influence user commands
- \getvalue{\??ko#1\c!commando}%
- {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty
- \dostartattributes{\??ko#1}\c!nummerletter\c!nummerkleur\empty
- \getvalue{\??ko#1\c!voorcommando}%
- \ifdisplaysectionhead
- \getvalue{\??ko#1\c!nummercommando}%
- {\setstrut\begstrut#3\endstrut}%
- \else
- \getvalue{\??ko#1\c!nummercommando}{#3}%
- \fi
- \dostopattributes
- \dostopattributes}
- {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty
- \dostartattributes{\??ko#1}\c!tekstletter\c!tekstkleur\empty
- \dontconvertfont
- \ifdisplaysectionhead
- \stelinterliniein
- \else
- \stelspatieringin
- \fi
- #2%
- \ifdisplaysectionhead
- \getvalue{\??ko#1\c!tekstcommando}%
- {\setstrut\begstrut#4\endstrut}%
- \xdef\localheaddepth{\the\dp\strutbox}%
- \else
- \getvalue{\??ko#1\c!tekstcommando}{#4}%
- \fi
- \getvalue{\??ko#1\c!nacommando}%
- \ifdisplaysectionhead\endgraf\fi
- \dostopattributes
- \dostopattributes}}%
- \fi
- \endheadplacement{#1}{#5}}
-
-
\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!}
% todo : hoe komt box er uit
@@ -221,114 +378,205 @@
\doanalyzefigurefiles\doanalyzefigurefilesB
\doanalyzefigurefiles\doanalyzefigurefilesC}
-\definesystemvariable {bl} % bleeding
-
-\newcounter\nofbleeds % per pag
-
-\def\setupbleeding
- {\dodoubleempty\getparameters[\??bl]}
-
-\setupbleeding
- [\c!plaats=l,
- \c!rek=\v!ja,
- \c!breedte=3cm,
- \c!hoogte=3cm,
- \c!offset=2mm,
- \c!voffset=\@@bloffset,
- \c!hoffset=\@@bloffset]
-
-\def\bleed
- {\dosingleempty\dobleed}
-
-\def\dobleed[#1]#2%
- {\hbox\bgroup
- \def\bleedwidth {\hsize}%
- \def\bleedheight{\vsize}%
- \doglobal\increment\nofbleeds
- \getparameters[\??bl][#1]%
- \!!doneafalse % left
- \!!donebfalse % right
- \!!donecfalse % top
- \!!donedfalse % bottom
- \processaction
- [\@@blplaats]
- [ t=>\!!donectrue\let\@@blhoffset\!!zeropoint,
- b=>\!!donedtrue\let\@@blhoffset\!!zeropoint,
- l=>\!!doneatrue\let\@@blvoffset\!!zeropoint,
- r=>\!!donebtrue\let\@@blvoffset\!!zeropoint,
- bl=>\!!doneatrue\!!donedtrue,
- lb=>\!!doneatrue\!!donedtrue,
- br=>\!!donebtrue\!!donedtrue,
- rb=>\!!donebtrue\!!donedtrue,
- tl=>\!!doneatrue\!!donectrue,
- lt=>\!!doneatrue\!!donectrue,
- tr=>\!!donebtrue\!!donectrue,
- rt=>\!!donebtrue\!!donectrue]%
- \doifelse\@@blrek\v!ja\donetrue\donefalse
- \scratchdimen\@@blbreedte
- \ifdone
- \if!!donea
- \advance\scratchdimen\MPx{\??bl:\nofbleeds}%
- \else\if!!doneb
- \scratchdimen\papierbreedte
- \advance\scratchdimen-\MPx{\??bl:\nofbleeds}%
- \fi\fi
- \fi
- \advance\scratchdimen\@@blhoffset
- \edef\bleedwidth{\the\scratchdimen}%
- \scratchdimen\@@blhoogte
- \ifdone
- \if!!donec
- \scratchdimen\papierhoogte
- \advance\scratchdimen-\MPy{\??bl:\nofbleeds}%
- \else\if!!doned
- \advance\scratchdimen\MPy{\??bl:\nofbleeds}%
- \fi\fi
- \fi
- \advance\scratchdimen\@@blvoffset
- \edef\bleedheight{\the\scratchdimen}%
- \hsize\bleedwidth
- \vsize\bleedheight
- \setbox\scratchbox\hbox{#2}%
- \setbox\scratchbox\hbox to \@@blbreedte
- {\if!!donea\hss\fi\box\scratchbox\if!!doneb\hss\fi}%
- \if!!doned
- \setbox\scratchbox\hbox
- {\lower\bleedheight\hbox{\raise\@@blhoogte\box\scratchbox}}%
- \fi
- \wd\scratchbox\@@blbreedte
- \ht\scratchbox\@@blhoogte
- \dp\scratchbox\zeropoint
- \ifdone
- \hpos{\??bl:\nofbleeds}{\box\scratchbox}%
+\def\regelweergave
+ {\@@rnlinks\convertnumber\@@rnconversie\linenumber\@@rnrechts}
+
+% extension to page-lin
+
+\def\dodoschrijfregelnummer%
+ {% beware of em's, the font is already switched !
+ \setbox0=\hbox{\@@rncommando{\regelweergave}}%
+ \vsmashbox0%
+ \ifcase\linenumberlocation
+ \rlap{\hbox to \@@rnbreedte{\box0\hss}}% was \llap, nog testen !!
+ \or
+ %\llap{\hbox to \@@rnbreedte{\hss\box0\hskip\linkermargeafstand}}%
+ \inleftmargin
+ {\forgetall
+ \doifelse\@@rnbreedte\v!marge
+ {\hsize\linkermargebreedte}{\hsize\@@rnbreedte}%
+ \alignedline\@@rnuitlijnen\v!rechts{\box0\hskip\@@rnafstand}}%
\else
- \box\scratchbox
+ \inrightmargin
+ {\forgetall
+ \doifelse\@@rnbreedte\v!marge
+ {\hsize\rechtermargebreedte}{\hsize\@@rnbreedte}%
+ \alignedline\@@rnuitlijnen\v!links{\hskip\@@rnafstand\box0}}%
+ \fi}
+
+\stelregelnummerenin
+ [\c!breedte=\ifcase\linenumberlocation2em\else\v!marge\fi,
+ \c!links=,
+ \c!rechts=,
+ \c!commando=,
+ \c!afstand=\zeropoint,
+ \c!uitlijnen=\ifcase\linenumberlocation\v!rechts\or\v!rechts\or\v!links\fi]
+
+% another one
+
+\newevery \everylinenumber \relax
+
+\let\normaldodoschrijfregelnummer\dodoschrijfregelnummer
+
+\def\dodoschrijfregelnummer
+ {\normaldodoschrijfregelnummer
+ \the\everylinenumber}
+
+% new
+
+\newcounter\linenotecounter
+\newtoks \collectedlinenotes
+\newif \iftracelinenotes
+
+\appendtoks
+ \the\collectedlinenotes
+\to \everylinenumber
+
+\appendtoks
+ \global\collectedlinenotes\emptytoks
+\to \beforeeverylinenumbering
+
+\def\handlelinenote#1#2%
+ {\bgroup
+ \expanded{\beforesplitstring#1}\at--\to\linenotelinenumber
+ \ifnum\linenotelinenumber=\linenumber\relax
+ % todo: \onlyfootnote{#1}{#2}% == configurable
+ \setupfootnotes[\c!nummercommando=\gobbleoneargument]%
+ \footnotetext{#1: #2}%
\fi
\egroup}
-\setupbleeding[\c!rek=\v!ja]
-
-\defineexternalfigure[bleed][\c!breedte=\bleedwidth,\c!hoogte=\bleedheight]
+\def\tracedlinenote#1%
+ {\iftracelinenotes
+ \hbox to \zeropoint
+ {\forgetall
+ \localcolortrue
+ \hsize\zeropoint
+ \hss
+ \vbox to \strutheight{\llap{\red\infofont\setstrut\linenotecounter}\vss}%
+ {\blue\vl}%
+ \vbox to \strutheight{\rlap{\red\infofont\setstrut#1}\vss}%
+ \hss}%
+ \prewordbreak
+ \fi}
-% \placefloat[left]{none}
-% {\bleed[width=5cm,height=3cm,location=lt]{\externalfigure[koe][bleed]}}
+\def\linenote#1%
+ {\doglobal\increment\linenotecounter
+ \doifreferencefoundelse{\??rr:\linenotecounter}%
+ {\doglobal\@EA\appendtoks\@EA\handlelinenote\@EA
+ {\currenttextreference}{#1}\to\collectedlinenotes}
+ {}%
+ \tracedlinenote\empty
+ \expanded{\eenregel[\??rr:\linenotecounter]}}
+
+\def\startlinenote[#1]#2%
+ {\doifreferencefoundelse{\??rr:#1}%
+ {\doglobal\@EA\appendtoks\@EA\handlelinenote\@EA
+ {\currenttextreference}{#2}\to\collectedlinenotes}
+ {}%
+ \tracedlinenote{#1}%
+ \startregel[\??rr:#1]}
+
+\def\stoplinenote[#1]%
+ {\stopregel[\??rr:#1]}
+
+% \startbuffer[test]
+% \startlinenumbering[100]
+% test \linenote {oeps} test test test test test test
+% test \startlinenote [well] {oeps} test test test test test test
+% test \linenote {oeps} test test test test test test
+% test \linenote {oeps} test test test test test test
+% test \linenote {oeps} test test test test test test
+% test \linenote {oeps} test test test test test test
+% test \stoplinenote [well] test test test test test test
+% \stoplinenumbering
+% \stopbuffer
+%
+% {\typebuffer[test] \getbuffer[test]} \page
+%
+% \startbuffer[setup]
+% \setuplinenumbering
+% [align=left]
+% \stopbuffer
+%
+% {\typebuffer[setup] \getbuffer[setup,test]} \page
+%
+% \startbuffer[setup]
+% \setuplinenumbering
+% [width=1em,
+% align=left]
+% \stopbuffer
+%
+% {\typebuffer[setup] \getbuffer[setup,test]} \page
%
-% \input tufte
+% \startbuffer[setup]
+% \setuplinenumbering
+% [width=2em,
+% distance=.5em,
+% align=left]
+% \stopbuffer
%
-% \placefloat[left]{none}
-% {\bleed[width=5cm,height=3cm,location=l]{\externalfigure[koe][bleed]}}
+% {\typebuffer[setup] \getbuffer[setup,test]} \page
%
-% \input tufte
+% \startbuffer[setup]
+% \setuplinenumbering
+% [width=2em,
+% align=middle]
+% \stopbuffer
%
-% \placesomefloat[right]{none}
-% {\bleed[width=5cm,height=3cm,location=r]{\externalfigure[koe][bleed]}}
+% {\typebuffer[setup] \getbuffer[setup,test]} \page
%
-% \input tufte
+% \startbuffer[setup]
+% \setuplinenumbering
+% [conversion=romannumerals,
+% start=1,
+% step=1,
+% location=text,
+% style=slanted,
+% color=blue,
+% width=1.5em]
+% \stopbuffer
%
-% \placesomefloat[right]{none}
-% {\bleed[width=5cm,height=3cm,location=rb]{\externalfigure[koe][bleed]}}
+% {\typebuffer[setup] \startnarrower\getbuffer[setup,test]\stopnarrower} \page
%
-% \input tufte
+% \startbuffer[setup]
+% \setuplinenumbering
+% [width=4em,
+% left=--,
+% right=--,
+% align=middle]
+% \stopbuffer
+%
+% {\typebuffer[setup] \getbuffer[setup,test]} \page
+%
+% \startbuffer[setup-1]
+% \setuplinenumbering
+% [style=\bfxx,
+% command=\WatchThis]
+% \stopbuffer
+%
+% \startbuffer[setup-2]
+% \def\WatchThis#1%
+% {\ifodd\linenumber
+% \definecolor[linecolor][red]%
+% \else
+% \definecolor[linecolor][green]%
+% \fi
+% \inframed
+% [offset=1pt,frame=off,background=color,backgroundcolor=linecolor]
+% {#1}}
+% \stopbuffer
+%
+% {\typebuffer[setup-1,setup-2] \getbuffer[setup-1,setup-2,test]} \page
+%
+% \startbuffer[setup-1]
+% \setuplinenumbering
+% [location=inright,
+% style=\bfxx,
+% command=\WatchThis]
+% \stopbuffer
+%
+% {\typebuffer[setup-1] \getbuffer[setup-1,setup-2,test]} \page
\def\OTRSETgotocell#1#2% not that robust
{\endgraf
@@ -429,11 +677,23 @@
{\doifassignmentelse{#3}
{\stelinterliniein[#3]\stelspatieringin}
{\setups[#3]}}}
+
+% \def\defineclassfont
+% {\doquadrupleempty\dodefineclassfont}
+%
+% \def\dodefineclassfont[#1][#2][#3][#4]% #2 = class
+% {\iffourthargument
+% \definefont[#1][#2#3][#4]%
+% %\else\ifthirdargument
+% % \definefont[#1][#2#3]%
+% \else
+% \definefont[#1][#2]%
+% \fi}
% todo, but now more easy to do:\definepage
\def\docomplexpagina[#1]%
- {\flushfootnotes
+ {\flushnotes
\bgroup
\def\dodocomplexpagina##1%
{\csname
@@ -576,32 +836,6 @@
\od
\filluparrangedpages}
-% \setlayerframed[layer id][layer settings][framed setting]{data}
-% \setlayerframed[layer id][combined settings]{data}
-
-\def\setlayerframed
- {\dotripleempty\dosetlayerframed}
-
-\def\dosetlayerframed
- {\ifthirdargument
- \expandafter\dosetlayerframedT
- \else
- \expandafter\dosetlayerframedS
- \fi}
-
-\def\dosetlayerframedT[#1][#2][#3]%
- {\dowithnextbox{\setlayer[#1][#2]{\box\nextbox}}%
- \hbox\framed[#3]}
-
-\def\dosetlayerframedS[#1][#2][#3]%
- {\dowithnextbox
- {\setlayer
- [#1]
- [\c!breedte=\wd\nextbox,\c!hoogte=\ht\nextbox,
- \c!offset=\!!zeropoint,#2]
- {\box\nextbox}}%
- \hbox\framed[\c!plaats=\v!normaal,#2]}
-
\beginETEX \dimexpr
\definepapersize
diff --git a/tex/context/base/cont-sys.ori b/tex/context/base/cont-sys.ori
index 7ea324ae3..8923364cd 100644
--- a/tex/context/base/cont-sys.ori
+++ b/tex/context/base/cont-sys.ori
@@ -68,14 +68,6 @@
% Loading a specific special driver:
%
% \setupoutput [dviwindo]
-%
-% Enabling \CONTEXT\ navigation symbols as well as \euro's.
-
-\usesymbols [nav,mvs]
-
-\setupsymbolset [navigation 1] % not that clever
-
-\setupinteraction [\c!symboolset=navigation 1]
% Changing language defaults:
%
@@ -95,8 +87,6 @@
% \runMPgraphicstrue
% \runMPTEXgraphicstrue
-% \recycleMPslotstrue
-
% This saves some runtime, but needs a format, which you can
% make with 'texexec --make --alone metafun'. Make sure that
% the mem files are moved to the used web2c path (locate with
@@ -113,8 +103,8 @@
\protectbufferstrue
-% You can enable a rigurous figure searching, but normally
-% this is not really needed and even annoying.
+% You can enable a more extensive figure searching, but
+% normally this is not really needed and even annoying.
%
% \runutilityfiletrue
diff --git a/tex/context/base/cont-usr.ori b/tex/context/base/cont-usr.ori
index f70072c9a..eaab96693 100644
--- a/tex/context/base/cont-usr.ori
+++ b/tex/context/base/cont-usr.ori
@@ -150,6 +150,7 @@
%D are used to get accented and non latin characters.
\useencoding[fde] % german
+% \useencoding[ffr] % french
% \useencoding[fro] % romanian
% \useencoding[fpl] % polish
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 2e65ebc2f..29bc8ab95 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -15,7 +15,7 @@
\catcode`\{=1 \catcode`\}=2
-\def\contextversion{2002.4.17}
+\def\contextversion{2002.5.15}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type{tex -i} or \type{whatevertex} using
@@ -36,7 +36,8 @@
\input math-pln.tex % basic plain math
-\input syst-etx.tex
+\input syst-etx.tex % etex
+\input syst-omg.tex % omega
\input syst-gen.tex
\input syst-ext.tex
\input syst-new.tex
@@ -126,6 +127,7 @@
%D load additional definition modules when needed.
\input enco-ini.tex
+\input filt-ini.tex
\input hand-ini.tex
\input regi-ini.tex
\input lang-ini.tex
@@ -139,6 +141,7 @@
%D For the moment we load a lot of languages. In the future
%D we'll have to be more space conservative.
+\input lang-spe.tex
\input lang-lab.tex
\input lang-alt.tex
@@ -155,7 +158,7 @@
\input lang-vn.tex % vietnamese, will be grouped
-%D All kind of symbols are handles in:
+%D All kind of symbols are handled in:
\input symb-ini.tex
@@ -228,7 +231,7 @@
%D On which the next one depends:
-\input core-pos.tex
+\input core-pos.tex
%D A few more languages, that have specifics using core
%D functionality:
@@ -267,6 +270,8 @@
\input core-fig.tex % after page body
\input core-par.tex
+\input core-box.tex
+
%D Language specific spacing.
\input lang-spa.tex
@@ -295,6 +300,11 @@
\input cont-log.tex
+%D Defaults go here (more will be moved to this module
+%D later):
+
+\input core-def.tex
+
%D At run time, a few more files are loaded, like:
%D
%D \startopsomming[opelkaar]
diff --git a/tex/context/base/core-box.tex b/tex/context/base/core-box.tex
new file mode 100644
index 000000000..fe52203ab
--- /dev/null
+++ b/tex/context/base/core-box.tex
@@ -0,0 +1,518 @@
+%D \module
+%D [ file=core-box,
+%D version=2002.04.12,
+%D title=\CONTEXT\ Box Macros,
+%D subtitle=New Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module contains all kind of macros for moving content
+%D around. Many macros here come from other modules, but
+%D depencies made it more clear to isolate them.
+
+% \placeornament
+
+\unprotect
+
+\definelayer[\v!tekst-2][\c!positie=\v!ja]
+\definelayer[\v!tekst-1][\c!positie=\v!ja]
+\definelayer[\v!tekst+1][\c!positie=\v!ja]
+\definelayer[\v!tekst+2][\c!positie=\v!ja]
+
+\def\internaltextoverlay#1% will become more generic and installable
+ {\startoverlay % i.e. probably an overlay by itself
+ {\positionoverlay{\v!tekst#1}} % see later
+ {\composedlayer {\v!tekst#1}}
+ \stopoverlay}
+
+%\def\internaltextoverlay#1%
+% {\hbox to \zeropoint{\positionoverlay{\v!tekst#1}\hss}%
+% \composedlayer{\v!tekst#1}}
+
+\defineoverlay[\v!tekst-2][\internaltextoverlay{-2}]
+\defineoverlay[\v!tekst-1][\internaltextoverlay{-1}]
+\defineoverlay[\v!tekst+1][\internaltextoverlay{+1}]
+\defineoverlay[\v!tekst+2][\internaltextoverlay{+2}]
+
+% to be documented
+
+\definelayer[anchor]
+
+\def\anchor
+ {\dosingleargument\doanchor}
+
+\def\doanchor[#1]%
+ {\ifundefined{\??an#1}\@EA\dodoanchor\else\@EA\nonoanchor\fi[#1]}
+
+\def\nonoanchor[#1]%
+ {\getvalue{\??an#1}}
+
+\def\dodoanchor[#1]%
+ {\dotripleempty\dododoanchor[#1]}
+
+\def\dododoanchor
+ {\ifthirdargument
+ \expandafter\dodoanchorT
+ \else
+ \expandafter\dodoanchorS
+ \fi}
+
+\def\dodoanchorS[#1][#2][#3]%
+ {\dodoanchorT[#1][#2][#2]}
+
+\def\dodoanchorT[#1][#2][#3]%
+ {\dowithnextbox
+ {\bgroup
+ \checktextbackgrounds
+ \setbox\scratchbox\null
+ \wd\scratchbox\wd\nextbox
+ \ht\scratchbox\ht\nextbox
+ \dp\scratchbox\dp\nextbox
+ \setlayer
+ [anchor]
+ [\c!breedte=\wd\scratchbox,
+ \c!hoogte=\ht\scratchbox,
+ \c!offset=\!!zeropoint,
+ #2,#3]
+ {\setlayer[#1]{\box\nextbox}}%
+ \framed
+ [#2,
+ \c!achtergrond=anchor,
+ \c!offset=\v!overlay,
+ \c!kader=\v!uit,
+ #3]
+ {\box\scratchbox}%
+ \egroup}%
+ \vbox}
+
+\def\defineanchor
+ {\doquadrupleempty\dodefineanchor}
+
+\def\dodefineanchor[#1][#2][#3][#4]%
+ {\setvalue{\??an#1}{\dodefinedanchor[#2][#3][#4]}}
+
+\def\dodefinedanchor[#1][#2][#3]%
+ {\def\docommando[##1][##2]%
+ {\ifsecondargument
+ \def\next{\dodoanchorT[#1][#2,##1][#3,##2]}%
+ \else\iffirstargument
+ \def\next{\dodoanchorT[#1][#2,##1][#2,##1]}%
+ \else
+ \def\next{\dodoanchorT[#1][#2][#3]}%
+ \fi\fi
+ \next}%
+ \dodoubleempty\docommando}
+
+\def\@@collectorbox{@@collectorbox}
+
+\def\definecollector
+ {\dodoubleargument\dodefinecollector}
+
+\def\dodefinecollector[#1][#2]%
+ {\ifundefined{\@@collectorbox#1}%
+ \expandafter\newbox\csname\@@collectorbox#1\endcsname
+ \fi
+ \resetcollector[#1]%
+ \setupcollector
+ [#1]
+ [\c!status=\v!start,
+ \c!x=\!!zeropoint,\c!y=\!!zeropoint,
+ \c!offset=\!!zeropoint,\c!rotatie=, % geen 0 !
+ \c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint,
+ \c!plaats=rb,\c!hoek=,#2]}
+
+\def\setupcollector
+ {\dodoubleargument\dosetupcollector}
+
+\def\dosetupcollector[#1][#2]%
+ {\def\docommando##1{\getparameters[\??cb##1][#2]}%
+ \processcommalist[#1]\docommando}
+
+\def\setcollector
+ {\dodoubleargument\dosetcollector}
+
+\def\dosetcollector[#1][#2]%
+ {\bgroup
+ \forgetall
+ \dontcomplain
+ \dowithnextbox
+ {\ifundefined{\@@collectorbox#1}%
+ \writestatus{collector}{unknown layer #1}%
+ \else
+ \dodosetcollector[#1][#2]%
+ \fi
+ \egroup}
+ \hbox}
+
+\def\dodosetcollector[#1][#2]% todo: keep reference point
+ {\getparameters[\??cb#1][#2]%
+ \@@layerxsiz\wd\csname\@@collectorbox#1\endcsname
+ \@@layerysiz\ht\csname\@@collectorbox#1\endcsname
+ \doifvaluesomething{\??cb#1\c!rotatie}
+ {\setbox\nextbox\hbox
+ {\rotate
+ [\c!plaats=\v!hoog,
+ \c!rotatie=\getvalue{\??cb#1\c!rotatie}]
+ {\box\nextbox}}}%
+ \advance\@@layerysiz\dp\csname\@@collectorbox#1\endcsname
+ \@@layerxpos\getvalue{\??cb#1\c!x}%
+ \advance\@@layerxpos\getvalue{\??cb#1\c!hoffset}%
+ \@@layerypos\getvalue{\??cb#1\c!y}%
+ \advance\@@layerypos\getvalue{\??cb#1\c!voffset}%
+ \ExpandBothAfter\doifinset{\v!onder}{\getvalue{\??cb#1\c!hoek}}
+ {\ifdim\@@layerysiz>\zeropoint
+ \advance\@@layerypos-\@@layerysiz
+ \@@layerypos-\@@layerypos
+ \fi}%
+ \ExpandBothAfter\doifinset{\v!rechts}{\getvalue{\??cb#1\c!hoek}}
+ {\ifdim\@@layerxsiz>\zeropoint
+ \advance\@@layerxpos-\@@layerxsiz
+ \@@layerxpos-\@@layerxpos
+ \fi}%
+ \setbox\nextbox\hbox
+ {\alignedbox[\getvalue{\??cb#1\c!plaats}]\vbox{\box\nextbox}}%
+ \boxmaxdepth\zeropoint % really needed, nice example
+ \global\advance\boxhdisplacement\@@layerxpos
+ \ifdim\boxhdisplacement<\zeropoint
+ \global\setbox\csname\@@collectorbox#1\endcsname\hbox
+ {\hskip-\boxhdisplacement
+ \box\csname\@@collectorbox#1\endcsname}%
+ \fi
+ \global\advance\boxvdisplacement\@@layerypos
+ \ifdim\boxvdisplacement<\zeropoint
+ \global\setbox\csname\@@collectorbox#1\endcsname=\hbox
+ {\lower-\boxvdisplacement
+ \box\csname\@@collectorbox#1\endcsname}%
+ \fi
+ \@@layerxsiz\wd\csname\@@collectorbox#1\endcsname
+ \@@layerysiz\ht\csname\@@collectorbox#1\endcsname
+ \advance\@@layerysiz\dp\csname\@@collectorbox#1\endcsname
+ \global\setbox\csname\@@collectorbox#1\endcsname=\hbox
+ {\box\csname\@@collectorbox#1\endcsname
+ \hskip-\@@layerxsiz
+ \hskip\@@layerxpos\relax
+ \ifdim\boxhdisplacement<\zeropoint
+ \hskip-\boxhdisplacement
+ \fi
+ \lower\@@layerypos\hbox
+ {\ifdim\boxvdisplacement<\zeropoint
+ \lower-\boxvdisplacement\box\nextbox
+ \else
+ \box\nextbox
+ \fi}}%
+ \ifdim\wd\csname\@@collectorbox#1\endcsname<\@@layerxsiz
+ \global\wd\csname\@@collectorbox#1\endcsname\@@layerxsiz
+ \fi}
+
+\def\flushcollector[#1]%
+ {\ifundefined{\@@collectorbox#1}%
+ \writestatus{collector}{unknown collector #1}%
+ \else
+ \doifnotvalue{\??cb#1\c!status}\v!stop
+ {\vbox
+ {\hbox
+ {\doifelsevalue{\??cb#1\c!status}\v!herhaal
+ {\let\next\copy}{\let\next\box}%
+ \raise\dp\csname\@@collectorbox#1\endcsname
+ \next\csname\@@collectorbox#1\endcsname}}}%
+ \fi}
+
+\def\composedcollector#1{\flushcollector[#1]}
+
+\def\resetcollector[#1]%
+ {\ifundefined{\@@collectorbox#1}\else
+ \global\setbox\csname\@@collectorbox#1\endcsname\emptybox
+ \fi}
+
+%\definecollector[test]
+%\setcollector[test]
+% [location=rb]
+% {\externalfigure[koe][frame=on,width=3cm]}
+%\setcollector[test]
+% [corner={right,bottom},location={left,top}]
+% {\framed{gans}}
+%\composedcollector{test}
+
+\definecollector
+ [caption]
+
+\def\collectedtext
+ {\dodoubleempty\docollectedtext}
+
+\def\docollectedtext[#1][#2]#3%
+ {\bgroup
+ \dowithnextbox
+ {\setcollector
+ [caption]
+ {\box\nextbox}%
+ \setcollector
+ [caption][#1]
+ {\getparameters[\??du][#2]%
+ \dosetfontattribute\??du\c!letter\stelinterliniein
+ \framed % watch the special setting of kader/overlay
+ [\c!kader=\v!overlay,#2]
+ {\doattributes\??du\c!letter\c!kleur{#3}}}%
+ \composedcollector{caption}%
+ \egroup}%
+ \hbox}
+
+% \collectedtext
+% [corner={right,bottom},location={left,top}]
+% [background=color,backgroundcolor=white,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+%
+% \collectedtext
+% [rotation=90,corner={right,bottom},location={right,top}]
+% [frame=on,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+%
+% \collectedtext
+% [rotation=90,corner={left,bottom},location={left,top}]
+% [frame=on,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+
+\definelayer
+ [caption]
+
+\def\layeredtext
+ {\dodoubleempty\dolayeredtext}
+
+\def\dolayeredtext[#1][#2]#3%
+ {\bgroup
+ \dowithnextbox
+ {\!!widtha\nextboxwd
+ \!!heighta\nextboxht
+ \bgroup % preserve \nextbox
+ \setlayer
+ [caption]
+ [\c!breedte=\!!widtha,\c!hoogte=\!!heighta,#1]
+ {\getparameters[\??du][#2]%
+ \dosetfontattribute\??du\c!letter\stelinterliniein
+ \framed
+ [\c!kader=\v!overlay,,#2]
+ {\doattributes\??du\c!letter\c!kleur{#3}}}%
+ \egroup
+ \framed
+ [\c!offset=\v!overlay,
+ \c!kader=\v!uit,
+ \c!achtergrond={\v!voorgrond,caption},
+ \c!breedte=\!!widtha,
+ \c!hoogte=\!!heighta]
+ {\box\nextbox}%
+ \egroup}%
+ \hbox}
+
+% \layeredtext
+% [corner={right,bottom},location={left,top}]
+% [background=color,backgroundcolor=white,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+%
+% \layeredtext
+% [rotation=90,corner={right,bottom},location={right,top}]
+% [frame=on,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+%
+% \layeredtext
+% [rotation=90,corner={left,bottom},location={left,top}]
+% [frame=on,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+
+\def\ornamenttext
+ {\dodoubleempty\doornamenttext}
+
+\def\doornamenttext[#1][#2]%
+ {\bgroup
+ \doifassignmentelse{#1}
+ {\getparameters[\s!dummy][\c!variant=\v!a,#2]%
+ \doifelse\dummyvariant\v!a
+ {\egroup\collectedtext}%
+ {\egroup\layeredtext }%
+ [#1][#2]}%
+ {\egroup\getvalue{#1}}}
+
+\def\defineornament
+ {\dotripleempty\dodefineornament}
+
+\def\dodefineornament[#1][#2][#3]%
+ {\setvalue{#1}{\doornamenttext[#2][#3]}}
+
+% \defineornament
+% [affiliation]
+% [rotation=90,corner={right,bottom},location={right,top},
+% hoffset=-.25ex]
+% [frame=on,background=color,backgroundcolor=red,offset=0pt]
+%
+% \ruledhbox{\affiliation{gans}{\externalfigure[koe][width=3cm]}}
+%
+% \defineornament
+% [affiliation]
+% [rotation=90,corner={right,bottom},location={right,top},
+% hoffset=-.25ex,alternative=b]
+% [frame=on,background=color,backgroundcolor=red,offset=0pt]
+%
+% \ruledhbox{\affiliation{gans}{\externalfigure[koe][width=3cm]}}
+%
+% \defineornament
+% [affiliation]
+% [rotation=90,corner={right,bottom},location={left,top},
+% hoffset=.25ex,voffset=.25ex,alternative=a]
+% [background=color,style=\ss\tfxx,backgroundcolor=white,offset=0pt]
+%
+% \affiliation{photo}{\externalfigure[molen][width=3cm]}
+%
+% \defineornament
+% [affiliation]
+% [rotation=90,corner={right,bottom},location={left,top},
+% hoffset=.25ex,voffset=.25ex,alternative=b]
+% [background=color,style=\ss\tfxx,backgroundcolor=white,offset=0pt]
+%
+% \affiliation{drawing}{\externalfigure[hakker][width=3cm]}
+
+% pas op: aanpassen aan nieuwe layer hoek ankers
+
+\newcounter\nofbleeds % per pag
+
+\def\setupbleeding
+ {\dodoubleempty\getparameters[\??bg]}
+
+\setupbleeding
+ [\c!plaats=l,
+ \c!rek=\v!ja,
+ \c!breedte=3cm,
+ \c!hoogte=3cm,
+ \c!offset=2mm,
+ \c!voffset=\@@bgoffset,
+ \c!hoffset=\@@bgoffset]
+
+\def\bleed
+ {\dosingleempty\dobleed}
+
+\def\dobleed[#1]#2%
+ {\hbox\bgroup
+ \def\bleedwidth {\hsize}%
+ \def\bleedheight{\vsize}%
+ \doglobal\increment\nofbleeds
+ \getparameters[\??bg][#1]%
+ \!!doneafalse % left
+ \!!donebfalse % right
+ \!!donecfalse % top
+ \!!donedfalse % bottom
+% replace this part !
+ \processaction
+ [\@@bgplaats]
+ [ t=>\!!donectrue\let\@@bghoffset\!!zeropoint,
+ b=>\!!donedtrue\let\@@bghoffset\!!zeropoint,
+ l=>\!!doneatrue\let\@@bgvoffset\!!zeropoint,
+ r=>\!!donebtrue\let\@@bgvoffset\!!zeropoint,
+ bl=>\!!doneatrue\!!donedtrue,
+ lb=>\!!doneatrue\!!donedtrue,
+ br=>\!!donebtrue\!!donedtrue,
+ rb=>\!!donebtrue\!!donedtrue,
+ tl=>\!!doneatrue\!!donectrue,
+ lt=>\!!doneatrue\!!donectrue,
+ tr=>\!!donebtrue\!!donectrue,
+ rt=>\!!donebtrue\!!donectrue]%
+ \doifelse\@@bgrek\v!ja\donetrue\donefalse
+ \scratchdimen\@@bgbreedte
+ \ifdone
+ \if!!donea
+ \advance\scratchdimen\MPx{\??bg:\nofbleeds}%
+ \else\if!!doneb
+ \scratchdimen\papierbreedte
+ \advance\scratchdimen-\MPx{\??bg:\nofbleeds}%
+ \fi\fi
+ \fi
+ \advance\scratchdimen\@@bghoffset
+ \edef\bleedwidth{\the\scratchdimen}%
+ \scratchdimen\@@bghoogte
+ \ifdone
+ \if!!donec
+ \scratchdimen\papierhoogte
+ \advance\scratchdimen-\MPy{\??bg:\nofbleeds}%
+ \else\if!!doned
+ \advance\scratchdimen\MPy{\??bg:\nofbleeds}%
+ \fi\fi
+ \fi
+ \advance\scratchdimen\@@bgvoffset
+ \edef\bleedheight{\the\scratchdimen}%
+ \hsize\bleedwidth
+ \vsize\bleedheight
+ \setbox\scratchbox\hbox{#2}%
+ \setbox\scratchbox\hbox to \@@bgbreedte
+ {\if!!donea\hss\fi\box\scratchbox\if!!doneb\hss\fi}%
+ \if!!doned
+ \setbox\scratchbox\hbox
+ {\lower\bleedheight\hbox{\raise\@@bghoogte\box\scratchbox}}%
+ \fi
+ \wd\scratchbox\@@bgbreedte
+ \ht\scratchbox\@@bghoogte
+ \dp\scratchbox\zeropoint
+ \ifdone
+ \hpos{\??bg:\nofbleeds}{\box\scratchbox}%
+ \else
+ \box\scratchbox
+ \fi
+ \egroup}
+
+\setupbleeding[\c!rek=\v!ja]
+
+\defineexternalfigure[bleed][\c!breedte=\bleedwidth,\c!hoogte=\bleedheight]
+
+% \placefloat[left]{none}
+% {\bleed[width=5cm,height=3cm,location=lt]{\externalfigure[koe][bleed]}}
+%
+% \input tufte
+%
+% \placefloat[left]{none}
+% {\bleed[width=5cm,height=3cm,location=l]{\externalfigure[koe][bleed]}}
+%
+% \input tufte
+%
+% \placesomefloat[right]{none}
+% {\bleed[width=5cm,height=3cm,location=r]{\externalfigure[koe][bleed]}}
+%
+% \input tufte
+%
+% \placesomefloat[right]{none}
+% {\bleed[width=5cm,height=3cm,location=rb]{\externalfigure[koe][bleed]}}
+%
+% \input tufte
+
+% \setlayerframed[layer id][layer settings][framed setting]{data}
+% \setlayerframed[layer id][combined settings]{data}
+
+\def\setlayerframed
+ {\dotripleempty\dosetlayerframed}
+
+\def\dosetlayerframed
+ {\ifthirdargument
+ \expandafter\dosetlayerframedT
+ \else
+ \expandafter\dosetlayerframedS
+ \fi}
+
+\def\dosetlayerframedT[#1][#2][#3]%
+ {\dowithnextbox{\setlayer[#1][#2]{\box\nextbox}}%
+ \hbox\framed[#3]}
+
+\def\dosetlayerframedS[#1][#2][#3]%
+ {\dowithnextbox
+ {\setlayer
+ [#1]
+ [\c!breedte=\wd\nextbox,\c!hoogte=\ht\nextbox,
+ \c!offset=\!!zeropoint,#2]
+ {\box\nextbox}}%
+ \hbox\framed[\c!plaats=\v!normaal,#2]}
+
+\protect \endinput
diff --git a/tex/context/base/core-buf.tex b/tex/context/base/core-buf.tex
index ecf42b81f..46db44213 100644
--- a/tex/context/base/core-buf.tex
+++ b/tex/context/base/core-buf.tex
@@ -405,17 +405,30 @@
\global\copyingblocksfalse
\fi}
-\def\dodosetblockcounters[#1:#2]#3%
- {\setvalue{\??se\s!old#3}{#1}%
- \doifnot{#3}{\lastsection}
- {\dodosetblockcounters[#2:0]{\getvalue{\??se#3\c!na}}}}
-
-\def\dosetblockcounters[#1#2::#3]%
+% \def\dodosetblockcounters[#1:#2]#3%
+% {\setvalue{\??se\s!old#3}{#1}%
+% \doifnot{#3}{\lastsection}
+% {\dodosetblockcounters[#2:0]{\getvalue{\??se#3\c!na}}}}
+%
+% \def\dosetblockcounters[#1#2::#3]%
+% {\ifblockpermitted
+% \dodosetblockcounters[#3:0]\firstsection
+% \setsectiontype[#1]%
+% \def\@@sectionvalue##1{\getvalue{\??se\s!old##1}}%
+% \def\@@sectionconversion##1##2{##2}% to get rid of {##2}
+% \fi}
+
+\def\dodosetblockcounters[#1]#2%
+ {\expanded{\setvalue{\??se\s!old#2}{\@@filterheadpart[#1]}}%
+ \doifnot{#2}{\lastsection}
+ {\expanded{\dodosetblockcounters[\@@filtertailpart[#1]]}{\getvalue{\??se#2\c!na}}}}
+
+\def\dosetblockcounters[#1]%
{\ifblockpermitted
- \dodosetblockcounters[#3:0]\firstsection
- \setsectiontype[#1]%
+ \expanded{\dodosetblockcounters[\@@filtersecondpart[#1]]}\firstsection
+ \expanded{\setsectiontype[\@@filterfirstpart[#1]]}%
\def\@@sectionvalue##1{\getvalue{\??se\s!old##1}}%
- \def\@@sectionconversion##1##2{##2}% to get rid of {##2}
+ \let\@@sectionconversion\secondoftwoarguments
\fi}
\let\blockstatus\empty
@@ -425,9 +438,16 @@
\@EA\dosetblockcounters\@EA[\blockstatus]%
\fi}
+%\def\getblockstatus#1%
+% {\dosetblklevel{\getvalue{\??by\@@bscriterium}}%
+% \doifblklevelelse[#1]
+% {\global\blockpermittedtrue}
+% {\global\blockpermittedfalse}%
+% \def\blockstatus{#1}}
+
\def\getblockstatus#1%
{\dosetblklevel{\getvalue{\??by\@@bscriterium}}%
- \doifblklevelelse[#1]
+ \expanded{\doifblklevelelse[#1\sectionseparator\sectionseparator0]}
{\global\blockpermittedtrue}
{\global\blockpermittedfalse}%
\def\blockstatus{#1}}
@@ -466,9 +486,15 @@
\newcount\blocklevel \blocklevel=0
-\def\setblocklevel#1%
+%\def\setblocklevel#1%
+% {\global\advance\blocklevel by #11
+% \ifnum\blocklevel>2\relax\doingblockstrue\else\doingblocksfalse\fi}
+%
+% oeps, got bugged
+
+\def\setblocklevel#1% sign
{\global\advance\blocklevel by #11
- \ifnum\blocklevel>2\relax\doingblockstrue\else\doingblocksfalse\fi}
+ \ifcase\blocklevel\doingblocksfalse\else\doingblockstrue\fi}
\def\opentmpblock%
{\immediate\openout\tmpblocks=\TEXbufferfile{\f!utilityfilename\the\blocklevel}}
@@ -503,6 +529,7 @@
\else
\immediate\openout\outblocks\f!utilityfilename.\f!blockextension
\immediate\write\outblocks{\string\thisisblockversion{\blockversion}}%
+ \immediate\write\outblocks{\string\thisissectionseparator{\sectionseparator}}%
\global\copyingblockstrue
\fi}
diff --git a/tex/context/base/core-def.tex b/tex/context/base/core-def.tex
new file mode 100644
index 000000000..6121865d9
--- /dev/null
+++ b/tex/context/base/core-def.tex
@@ -0,0 +1,34 @@
+%D \module
+%D [ file=core-def,
+%D version=2002.05.07,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Defaults,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Defaults}
+
+%D Here we collect default settings. More code will moved to
+%D this module later.
+
+\unprotect
+
+%D We preload a couple of symbol|(|sets): a few defaults,
+%D the marvo symbols and a few guillemot replacements.
+
+\usesymbols[mis,mvs,glm]
+
+%D We also choose a navigation symbol set:
+
+\usesymbols[nav] \setupsymbolset[navigation 1]
+
+\setupinteraction[\c!symboolset=navigation 1]
+
+%D In \type {core-nav}, we choose this set as well.
+
+\protect \endinput
diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex
index 77a098acb..f322875fa 100644
--- a/tex/context/base/core-fig.tex
+++ b/tex/context/base/core-fig.tex
@@ -695,12 +695,12 @@
%D from over 110 seconds down to less than 105 seconds. The
%D tremendously faster (but uglier) implementation is:
-\def\resetexternalfigures%
- {\let\@@efoptie \empty
- \let\@@efmaxbreedte\empty
- \let\@@efmaxhoogte \empty
- \let\@@efkader \v!uit
- \let\@@efchtergrond\empty}
+\def\resetexternalfigures
+ {\let\@@efoptie \empty
+ \let\@@efmaxbreedte \empty
+ \let\@@efmaxhoogte \empty
+ \let\@@efkader \v!uit
+ \let\@@efachtergrond\empty}
% The following code will move:
diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex
index 49506bda7..b866f478e 100644
--- a/tex/context/base/core-fil.tex
+++ b/tex/context/base/core-fil.tex
@@ -257,6 +257,7 @@
{\doifnotflagged{#2}
{\let#1\undefined
\startreadingfile
+ \cleanupfeatures % better \setnormalcatcodes / test first
\readfile{#2}\donothing\donothing
\stopreadingfile
\doglobal\setflag{#2}}%
@@ -266,6 +267,15 @@
\fi
#1}
+%D To be documented and probably moved
+
+\def\stelexternebronnenin
+ {\dodoubleargument\getparameters[\??er]}
+
+\def\documentresources{\@@erurl}
+
+\stelexternebronnenin[url=]
+
%D This module will be perfected / changed / weeded.
\protect \endinput
diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex
index 50a70e1e1..bc0e0e8a7 100644
--- a/tex/context/base/core-fld.tex
+++ b/tex/context/base/core-fld.tex
@@ -340,11 +340,11 @@
{\immediatewriteutilitycommand{\fieldreference{#1}{#2}}}
\def\checkfieldreferences%
- {\bgroup
- \setbox0=\hbox
- {\doutilities{fieldreferences}{\jobname}{}{}{}}%
- \global\let\checkfieldreferences=\relax
- \egroup}
+ {\startnointerference
+ \protectlabels
+ \doutilities{fieldreferences}{\jobname}{}{}{}%
+ \global\let\checkfieldreferences\relax
+ \stopnointerference}
\def\setfieldreferences%
{\def\fieldreference##1##2%
@@ -531,11 +531,11 @@
\def\docommando##1{\appendtocommalist{##1}\@@FieldKids}%
\processcommalist[#2]\docommando
\changefield{#1}%
- \let\@@FieldAutoParent=\@@FieldAuto
+ \let\@@FieldAutoParent\@@FieldAuto
\def\@@FieldParent{#1}%
- \let\@@FieldKids=\empty
- \let\@@FieldRoot=\empty
- \let\@@FieldMode=\fieldchildmode
+ \let\@@FieldKids\empty
+ \let\@@FieldRoot\empty
+ \let\@@FieldMode\fieldchildmode
\def\@@FieldFree{0}%
\def\@@FieldAuto{0}%
\doifsomething{#3}{\edef\@@FieldGroup{#3}}%
@@ -562,16 +562,16 @@
\ifx\@@FieldType\empty
\writestatus{\m!fields}{unknown field #1}%
\else
- \let\@@FieldMode=\fieldparentmode
+ \let\@@FieldMode\fieldparentmode
%\def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
\def\docommando##1{\appendtocommalist{##1}\@@FieldKids}%
\processcommalist[#2]\docommando
\changefield{#1}%
\let\@@FieldAutoParent=\@@FieldAuto
\def\@@FieldParent{#1}%
- \let\@@FieldKids=\empty
- \let\@@FieldRoot=\empty
- \let\@@FieldMode=\fieldcopymode
+ \let\@@FieldKids\empty
+ \let\@@FieldRoot\empty
+ \let\@@FieldMode\fieldcopymode
\def\@@FieldFree{0}%
\def\@@FieldAuto{0}%
\def\docommando##1%
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index 0bb39eddd..ee1548ddd 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -311,13 +311,13 @@
\expandafter\dodosnaptogrid
\fi}
-\def\forcedpresnapcorrection
- {\ifforcepresnap
- % we don't want top of page space when 'top' option
- %\vbox{\strut}\nobreak\vskip-\openlineheight
- \vbox{\strut}\vskip-\openlineheight
- \fi}
-
+% \def\forcedpresnapcorrection
+% {\ifforcepresnap
+% % we don't want top of page space when 'top' option
+% %\vbox{\strut}\nobreak\vskip-\openlineheight
+% \vbox{\strut}\vskip-\openlineheight
+% \fi}
+%
%\def\forcedpresnapcorrection
% {\ifforcepresnap
% \ifvmode \else \par \fi
@@ -328,9 +328,26 @@
% \fi
% \fi}
+\def\forcedpresnapcorrection
+ {\ifforcepresnap
+ \ifvmode \else \par \fi % new
+ % we don't want top of page space when 'top' option
+ %\vbox{\strut}\nobreak\vskip-\openlineheight
+ \vbox{\strut}\vskip-\openlineheight
+%\ifdim\pagetotal>\topskip \else
+%% eigenlijk signal
+%\writestatus{grid}{removing dummy at top of page}%
+%\bgroup
+%\output{\setbox\scratchbox\box255}%
+%\penalty\outputpenalty
+%\egroup
+%\fi
+ \fi}
+
\def\dodosnaptogrid
{\dowithnextbox
{\bgroup
+\ifdim\nextboxht<\teksthoogte % handle special case (like page fig)
\ifcase\@@alignsnapbox\relax
\ifcase\@@alignsnap\else % 1=top 2=high 3=middle 4=low
\ifshowgridboxes
@@ -498,6 +515,18 @@
\nointerlineskip
\box\nextbox
\fi
+\else
+ \setbox\nextbox\vbox to \teksthoogte
+ {\ifdim\nextboxdp=\zeropoint
+ \hbox{\lower\strutdepth\box\nextbox}
+ \else % this branch is yet untested
+ \vss
+ \hbox{\lower\nextboxdepth\box\nextbox}
+ \vskip-\strutdepth
+ \fi}%
+ \nextboxdp\strutdepth
+ \box\nextbox
+\fi
\extrasnapreset
\enablepresnapcorrection
\global\chardef\@@alignsnap0
@@ -507,7 +536,7 @@
\def\tracedgridamount#1#2%
{\color[grid:four]{\vrule\!!width\wd\nextbox\!!height#1\!!depth#2}}
-\def\snaptomathgrid% probably not working ok
+\def\snaptomathgrid% probably not working ok, also kind of obsolete
{\ifgridsnapping
\dowithnextbox
{\blanko[\v!regel]
@@ -576,7 +605,8 @@
\hsize=#2
\baselinerulefalse
\ruledvbox % calculated size
- {\getnoflines{#3}%
+% {\getnoflines{#3}%
+ {\getrawnoflines{#3}%
\vskip\topskip
\vskip-\ht\strutbox
\scratchdimen=#2\advance\scratchdimen by \lineheight
diff --git a/tex/context/base/core-ins.tex b/tex/context/base/core-ins.tex
index a46fe6dba..221512aba 100644
--- a/tex/context/base/core-ins.tex
+++ b/tex/context/base/core-ins.tex
@@ -26,8 +26,20 @@
\let\doprocessinsert\gobbleoneargument
+%\def\installinsertion#1%
+% {\ifx#1\undefined
+% \newinsert#1%
+% \count#1\!!thousand
+% \skip #1\zeropoint
+% \dimen#1\maxdimen
+% \appendtoks\doprocessinsert#1\to\@@insertionlist
+% \fi}
+
\def\installinsertion#1%
{\ifx#1\undefined
+ \let#1\relax
+ \fi
+ \ifx#1\relax % permits \csname...\endcsname
\newinsert#1%
\count#1\!!thousand
\skip #1\zeropoint
@@ -35,6 +47,7 @@
\appendtoks\doprocessinsert#1\to\@@insertionlist
\fi}
+
\def\synchronizeinsertions
{\def\doprocessinsert##1{\ifvoid##1\else\insert##1{\unvbox##1}\fi}%
\processinsertions}
diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex
index 9651315f0..c0dbad663 100644
--- a/tex/context/base/core-itm.tex
+++ b/tex/context/base/core-itm.tex
@@ -520,10 +520,10 @@
\appendtoks \letvalue\v!mar \itemgroupmargin \to \itemgroupcommands
\def\itembreak % -10
- {\flushfootnotes\penalty-5\relax}
+ {\flushnotes\penalty-5\relax}
\def\itemnobreak % +5
- {\flushfootnotes\penalty+5\ifbinnenkolommen\else00\fi\relax}
+ {\flushnotes\penalty+5\ifbinnenkolommen\else00\fi\relax}
\def\dolistitem % evt aantal items opslaan per niveau, scheelt zoeken
{\iftextitems
diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex
index 1943c8769..94336ebe6 100644
--- a/tex/context/base/core-job.tex
+++ b/tex/context/base/core-job.tex
@@ -167,7 +167,7 @@
\appendtoks \openutilities \to \everyjob
\appendtoks \loadoptionfile \to \everyjob
%appendtoks \loadtwopassdata \to \everyjob
-\appendtoks \setupfootnotes \to \everyjob % depends on bodyfont
+\appendtoks \checknotes \to \everyjob % depends on bodyfont
\appendtoks \initializeMPgraphics \to \everyjob % after loading system files
\appendtoks \pagina[\v!laatste] \pagina \to \everybye
@@ -355,15 +355,15 @@
\neverypar=\emptytoks
-\appendtoks \flushfootnotes \to \everypar
+\appendtoks \flushnotes \to \everypar
\appendtoks \ifinner\else\checksidefloat\fi \to \everypar
\appendtoks \checkindentation \to \everypar
\appendtoks \showparagraphnumber \to \everypar
\appendtoks \flushmargincontents \to \everypar
\appendtoks \flushcommentanchors \to \everypar
-\appendtoks \synchronizefootnotes \to \everypar
+\appendtoks \synchronizenotes \to \everypar
-\appendtoks \flushfootnotes \to \everydisplay
+\appendtoks \flushnotes \to \everydisplay
\appendtoks \adjustsidefloatdisplaylines \to \everydisplay
% Default-instellingen (verborgen)
diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex
index cd900c3ca..d103360d0 100644
--- a/tex/context/base/core-lst.tex
+++ b/tex/context/base/core-lst.tex
@@ -27,96 +27,12 @@
{\edef#2{#3}}}
{\edef#2{#3}}}
-% \def\doschrijfnaarlijst#1#2#3#4%
-% {\doifvalue{\??li#1\c!status}{\v!start}
-% {\begingroup
-% \thisisnextinternal{#1}%
-% %
-% % Dit gaat goed als #2 geen commando's bevat. Dit is
-% % bij interactieve teksten echter soms wel het geval.
-% % Vandaar dat we dit optioneel moeten maken, bijvoorbeeld
-% % met \stellijstin[referentie=ja].
-% %
-% \ExpandFirstAfter\processaction
-% [\getvalue{\??li#1\c!expansie}]
-% [ \v!ja=>{\edef\ascii{#3}},
-% \v!commando=>{\convertcommand#3\to\ascii},
-% \s!unknown=>{\convertargument#3\to\ascii}]%
-% \makesectionformat
-% \doifelse{\@@nmstatus}{\v!start}
-% {\def\dopaginanummer{\noexpand\pagenumber}}
-% {\def\dopaginanummer{0}}%
-% \edef\schrijfwegnaarlijst%
-% {\writeutilitycommand%
-% {\listentry%
-% {#1}%
-% {\nextinternalreference}%
-% {#2}%
-% {\ascii}%
-% {\sectionformat::\dopaginanummer}%
-% {\noexpand\realfolio}}}%
-% \schrijfwegnaarlijst
-% \endgroup}}
-
% Auto cross document links work by either using logical or
% page references, depending on the general settings. The
% locations are stored in global references where the auto tag
% number uses the text container. We use reference mapping
% (define reference) to keep track of the current ref.
-% \def\doschrijfnaarlijst#1#2#3#4%
-% {\doifvalue{\??li#1\c!status}{\v!start}
-% {\dodoschrijfnaarlijst{#1}{#2}{#3}{#4}}}
-%
-% \def\dodoschrijfnaarlijst#1#2#3#4%
-% {\begingroup
-% \convertexpanded{\??li#1}{#3}\asciilistentry
-% \makesectionformat
-% \doifelse{\@@nmstatus}{\v!start}
-% {\def\dopaginanummer{\noexpand\pagenumber}}
-% {\def\dopaginanummer{0}}%
-% % niet waterdicht, wat te doen met figuren en zo
-% % first hack: scheelt rommel, second hack: alleen koppen
-% \doifelsevalue{\??rf#1\c!status}{\v!start}
-% {\doif{\@@sectionlevel\@@sectie}{0}{\autocrossdocumentfalse}}
-% {\autocrossdocumentfalse}%
-% % blijft nog wat zwakjes en inefficient
-% \ifautocrossdocument
-% \bgroup
-% \thisisnextinternal{#1}%
-% %\thisisdestination{#1::\sectionformat}%
-% \@EA\setsectieenkoppeling\@EA{#1}%
-% \edef\currentlevel{\@@sectionlevel\@@sectie}%
-% \def\docommando##1% naar buiten brengen
-% {\def\dodocommando####1%
-% {\doifvalue{\??rf####1\c!status}{\v!start}
-% {\setsectieenkoppeling{####1}%
-% \def\level{\@@sectionlevel\@@sectie}%
-% \ifnum\level>\currentlevel
-% \expanded{\definereference[##1::####1][\v!geen]}%
-% \else\ifnum\level=\currentlevel
-% \expanded{\definereference[##1::####1][##1::{####1::\sectionformat}]}%
-% \fi\fi}}%
-% \processcommacommand[\crossdocumentelements]\dodocommando}%
-% \processcommacommand[\crossdocumentreferences]\docommando
-% \egroup
-% \else
-% \thisisnextinternal{#1}%
-% \fi
-% \edef\schrijfwegnaarlijst%
-% {\writeutilitycommand%
-% {\listentry%
-% {#1}%
-% {\nextinternalreference}%
-% {#2}%
-% {\asciilistentry}%
-% {\sectionformat::\dopaginanummer}%
-% {\noexpand\realfolio}}}%
-% \schrijfwegnaarlijst
-% \endgroup}
-%
-% adapted
-
\def\doschrijfnaarlijst#1%
{\doifelsevalue{\??li#1\c!status}{\v!start}
\dodoschrijfnaarlijst\gobblefourarguments{#1}}
@@ -153,7 +69,7 @@
{\nextinternalreference}%
{#2}%
{\asciilistentry}%
- {\sectionformat::\dopaginanummer}%
+ {\sectionformat\sectionseparator\sectionseparator\dopaginanummer}%
{\noexpand\realfolio}}}%
\schrijfwegnaarlijst
\endgroup}
@@ -188,7 +104,7 @@
{\listbetween%
{#1}%
{\ascii}%
- {\sectionformat::\dopaginanummer}%
+ {\sectionformat\sectionseparator\sectionseparator\dopaginanummer}%
{\noexpand\realfolio}}}%
\schrijfwegnaarlijst
\endgroup}
@@ -690,15 +606,19 @@
\par % should be an option
\getvalue{\??li#3\c!tussen}}
-\def\strippedlistentry[#1::#2::#3]{#1::#2}%
+% better:
+%
+% \def\linklisttoelement#1#2#3#4#5% % list location format page data
+% {\ifautocrossdocument
+% \gotodestination{}{}{#1::\@@filterblocknumberpart[#3]}{#4}{#5}%
+% \else
+% \gotonextinternal{#1}{#2}{#4}{#5}%
+% \fi}
+%
+% but for the moment:
\def\linklisttoelement#1#2#3#4#5% % list location format page data
- {%\ifautocrossdocument
- % \gotodestination{}{}{#1::\strippedlistentry[#3]}{#4}{#5}%
- %\else
- \gotonextinternal{#1}{#2}{#4}{#5}%
- %\fi}
- }
+ {\gotonextinternal{#1}{#2}{#4}{#5}}
\def\schrijfnaarlijst[#1]#2#3%
{\doifsomething{#1}
@@ -835,7 +755,7 @@
{#1}% tag
{#2}% number
{#3}% data
- {\sectionformat::\dopaginanummer}%
+ {\sectionformat\sectionseparator\sectionseparator\dopaginanummer}%
{\noexpand\realfolio}}}%
\schrijfwegnaarlijst
\endgroup}}
diff --git a/tex/context/base/core-mak.tex b/tex/context/base/core-mak.tex
index 56d4cdb23..3f081f466 100644
--- a/tex/context/base/core-mak.tex
+++ b/tex/context/base/core-mak.tex
@@ -58,6 +58,4 @@
\egroup}
\vbox}
-\protect
-
-\endinput
+\protect \endinput
diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex
index c175d2e64..8ca5aa031 100644
--- a/tex/context/base/core-mat.tex
+++ b/tex/context/base/core-mat.tex
@@ -162,7 +162,7 @@
{\doifsomething{#1}
{\copyparameters
[\??fm#1][\??fm]
- [\c!voorwit,\c!nawit,
+ [\c!voorwit,\c!nawit,\c!grid,
\c!linkermarge,\c!rechtermarge,\c!marge,
\c!springvolgendein,\c!variant,
\c!strut,\c!uitlijnen,\c!afstand]%
@@ -204,10 +204,11 @@
\def\currentformula {}
\def\predisplaysizethreshhold{3em}
-\def\leftdisplayskip {\leftskip}
-\def\rightdisplayskip {\rightskip}
-\def\leftdisplaymargin {\getvalue{\??fm\currentformula\c!linkermarge}}
-\def\rightdisplaymargin{\getvalue{\??fm\currentformula\c!rechtermarge}}
+\def\leftdisplayskip {\leftskip}
+\def\rightdisplayskip {\rightskip}
+\def\leftdisplaymargin {\getvalue{\??fm\currentformula\c!linkermarge}}
+\def\rightdisplaymargin {\getvalue{\??fm\currentformula\c!rechtermarge}}
+\def\displaygridsnapping{\getvalue{\??fm\currentformula\c!grid}}
\def\beforedisplayspace
{\doifnotvalue{\??fm\currentformula\c!voorwit}{\v!geen}
@@ -276,37 +277,19 @@
\doifvalue{\??fm\currentformula\c!springvolgendein}{\v!nee}
{\noindentation}}
-% \def\predisplaycorrection%
-% {\par\ifvmode\vbox{\strut}\vskip-2\baselineskip\fi}
-%
-% \def\startdisplaymath%
-% {\ifgridsnapping
-% \beforedisplayspace
-% \snaptogrid\vbox\bgroup
-% % \vskip\parskip
-% \forgetall
-% \else
-% \bgroup
-% \par\ifvmode\vskip-\parskip\fi
-% \beforedisplayspace
-% \predisplaycorrection
-% \fi
-% $$\setdisplaydimensions
-% \setpredisplaysize\lastlinewidth}
-%
-% \def\stopdisplaymath%
-% {$$\egroup
-% \par\ifvmode\vskip-\parskip\fi
-% \afterdisplayspace}
+\newif\ifinformula
% \def\startdisplaymath%
% {\ifgridsnapping
% \beforedisplayspace
-% \snaptogrid\vbox\bgroup
-% % \vskip\parskip
+% \snaptogrid[\displaygridsnapping]\vbox
+% \bgroup
+% \informulatrue
% \forgetall
-% \else
+% \else
% \bgroup
+% \informulatrue
+% %\forgetall % otherwise backgrounds fail
% \ifdim\lastskip<\!!zeropoint\else
% \par\ifvmode\ifdim\parskip>\!!zeropoint\relax\vskip-\parskip\fi\fi
% \fi
@@ -319,25 +302,27 @@
%
% \def\stopdisplaymath%
% {\stopinnermath
-% $$\egroup
-% \par\ifvmode\ifdim\parskip>\!!zeropoint\relax\vskip-\parskip\fi\fi
-% \afterdisplayspace}
-
-\newif\ifinformula
+% $$%
+% \ifgridsnapping
+% \else
+% \par\ifvmode\ifdim\parskip>\zeropoint\vskip-\parskip\fi\fi
+% \fi
+% \afterdisplayspace
+% \egroup}
\def\startdisplaymath%
{\ifgridsnapping
\beforedisplayspace
- \snaptogrid\vbox
+ \snapmathtogrid\vbox
\bgroup
\informulatrue
\forgetall
- \else
+ \else
\bgroup
\informulatrue
%\forgetall % otherwise backgrounds fail
\ifdim\lastskip<\!!zeropoint\else
- \par\ifvmode\ifdim\parskip>\!!zeropoint\relax\vskip-\parskip\fi\fi
+ \par\ifvmode\ifdim\parskip>\zeropoint\relax\vskip-\parskip\fi\fi
\fi
\beforedisplayspace
\par\ifvmode\vbox{\strut}\vskip-2\baselineskip\fi
@@ -350,11 +335,53 @@
{\stopinnermath
$$%
\ifgridsnapping
+ \egroup
+ \afterdisplayspace
\else
\par\ifvmode\ifdim\parskip>\zeropoint\vskip-\parskip\fi\fi
- \fi
- \afterdisplayspace
- \egroup}
+ \afterdisplayspace
+ \egroup
+ \fi}
+
+\newif\ifclipdisplaymath \clipdisplaymathtrue
+\def\displaymathclipfactor{1.1}
+
+\def\snapmathtogrid % to do \dp
+ {\dowithnextbox
+ {\bgroup
+ \donefalse
+ \ifclipdisplaymath
+ \ifdim\nextboxht<\displaymathclipfactor\lineheight
+ \donetrue
+ \fi
+ \fi
+ \ifdone
+ \nextboxht\lineheight
+ \else
+ \getnoflines{\ht\nextbox}%
+ \setbox\nextbox\vbox to \noflines\lineheight
+ {\vfill\box\nextbox\vfill}%
+ \setbox\nextbox\hbox{\lower\strutdepth\box\nextbox}%
+ \fi
+ \snaptogrid[\displaygridcorrection]\hbox{\box\nextbox}%
+ \gdef\displaygridcorrection{\displaygridsnapping}%
+ \egroup}}
+
+\def\displaygridcorrection{\displaygridsnapping}
+
+\def\moveformula
+ {\dosingleempty\domoveformula}
+
+\def\domoveformula[#1]%
+ {\ifgridsnapping
+ \iffirstargument
+ \xdef\displaygridcorrection{#1}%
+ \else
+ \gdef\displaygridcorrection{-\v!boven}% handy with short preline
+ \fi
+ \else
+ \gdef\displaygridcorrection{\displaygridsnapping}
+ \fi}
\let\startinnermath\empty
\let\stopinnermath \empty
@@ -948,6 +975,7 @@
\c!nummerkleur=,
\c!nummercommando=,
\c!voorwit=\v!groot,
- \c!nawit=\@@fmvoorwit]
+ \c!nawit=\@@fmvoorwit,
+ \c!grid=]
\protect \endinput
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
index ab2166fae..b623961ea 100644
--- a/tex/context/base/core-mis.tex
+++ b/tex/context/base/core-mis.tex
@@ -515,25 +515,16 @@
% \def\bedragprefix{\mathematics{f\normalfixedspace}}
-\def\bedragprefix{\euro\normalfixedspace}
-\def\bedragsuffix{}
+\def\bedragprefix {\euro\normalfixedspace}
+\def\bedragsuffix {}
+\def\bedragempty {\euro}
-\def\bedrag#1%
+\unexpanded\def\bedrag#1%
{\strut\hbox\bgroup
\let\normalfixedspace~%
- % \def~{\futurelet\next\dofixedspace}%
- % \def\dofixedspace%
- % {\hskip.5em\relax
- % \ifx\next,%
- % \hphantom{,}\let\next\gobbleoneargument
- % \else\ifx\next.%
- % \hphantom{.}\let\next\gobbleoneargument
- % \else
- % \let\next\relax
- % \fi\fi
- % \next}%
- % \bedragprefix#1\bedragsuffix
- \bedragprefix\digits{#1}\bedragsuffix
+ \doifelsenothing{#1}
+ {\bedragempty}
+ {\bedragprefix\digits{#1}\bedragsuffix}%
\egroup}
% \definieeralineas[test][n=3]
@@ -571,70 +562,20 @@
\def\ongeveer%
{\mathematics{\pm}}
-\def\permille%
- {\mathematics{^{\scriptscriptstyle0}\kern-.25em/\kern-.2em_{\scriptscriptstyle00}}}
-
-\def\percent%
- {\mathematics{^{\scriptscriptstyle0}\kern-.25em/\kern-.2em_{\scriptscriptstyle0}}}
-
-\let\promille=\permille
-\let\procent =\percent
-
-\def\permine%
- {\dontleavehmode
- \bgroup
- \setbox0=\hbox
- {\mathematics{+}}%
- \hbox to \wd0
- {\hss
- \mathematics{^{\scriptscriptstyle-}\kern-.4em/\kern-.3em_{\scriptscriptstyle-}}%
- \hss}%
- \egroup}
-
% for compatibility
\def\unknown%
{\dontleavehmode\punten[3]}
-
-% currency
-
-\def\dollar%
- {\bgroup
- \ifnum\fam=\itfam
- \sl
- \else\ifnum\fam=\bifam
- \bs
- \fi\fi
- \$%
- \egroup}
-
-\def\sterling%
- {\bgroup
- \ifnum\fam=\bffam
- \bi
- \else\ifnum\fam=\bifam
- \bi
- \else\ifnum\fam=\bsfam
- \bi
- \else
- \it
- \fi\fi\fi
- \$%
- \egroup}
-
-\def\florijn%
- {\bgroup
- \ifnum\fam=\bffam
- \bi
- \else\ifnum\fam=\bifam
- \bi
- \else\ifnum\fam=\bsfam
- \bi
- \else
- \it
- \fi\fi\fi
- f%
- \egroup}
+
+\def\leftboundarycharacter#1#2%
+ {\languageparameter#1%
+ \nobreak
+ \hskip\hspaceamount\currentlanguage{#2}}
+
+\def\rightboundarycharacter#1#2%
+ {\nobreak
+ \hskip\hspaceamount\currentlanguage{#2}%
+ \languageparameter#1}
% actually this is pretty old, but temporary moved here
@@ -649,27 +590,23 @@
\definesymbol
[\c!leftsentence]
- [\languageparameter\c!leftsentence
- \hskip\hspaceamount\currentlanguage{sentence}]
+ [\leftboundarycharacter\c!leftsentence{sentence}]
\definesymbol
[\c!rightsentence]
- [\hskip\hspaceamount\currentlanguage{sentence}%
- \languageparameter\c!rightsentence]
+ [\rightboundarycharacter\c!rightsentence{sentence}]
\definesymbol
[\c!leftsubsentence]
- [\languageparameter\c!leftsubsentence
- \hskip\hspaceamount\currentlanguage{sentence}]
+ [\leftboundarycharacter\c!leftsubsentence{sentence}]
\definesymbol
[\c!rightsubsentence]
- [\hskip\hspaceamount\currentlanguage{sentence}%
- \languageparameter\c!rightsubsentence]
+ [\rightboundarycharacter\c!rightsubsentence{sentence}]
\installdiscretionaries || \@@kpteken
-\newsignal\subsentencesignal
+\newsignal \subsentencesignal
\newcounter\subsentencelevel
\def\beginofsubsentence%
@@ -713,60 +650,58 @@
\definehspace [quotation] [\zeropoint]
\definehspace [interquotation] [.125em]
+%definehspace [quote] [\zeropoint]
+%definehspace [speech] [\zeropoint]
+
+\definehspace [quote] [\hspaceamount\currentlanguage{quotation}]
+\definehspace [speech] [\hspaceamount\currentlanguage{quotation}]
+
\definesymbol
[\c!leftquotation]
- [\languageparameter\c!leftquotation
- \hskip\hspaceamount\currentlanguage{quotation}]
+ [\leftboundarycharacter\c!leftquotation{quotation}]
\definesymbol
- [\c!rightquotation]
- [\hskip\hspaceamount\currentlanguage{quotation}%
- \languageparameter\c!rightquotation]
+ [\c!rightquotation]
+ [\rightboundarycharacter\c!rightquotation{quotation}]
\definesymbol
- [\c!leftquote]
- [\languageparameter\c!leftquote
- \hskip\hspaceamount\currentlanguage{quote}]
+ [\c!leftquote]
+ [\leftboundarycharacter\c!leftquote{quote}]
\definesymbol
- [\c!rightquote]
- [\hskip\hspaceamount\currentlanguage{quote}%
- \languageparameter\c!rightquote]
+ [\c!rightquote]
+ [\rightboundarycharacter\c!rightquote{quote}]
\definesymbol
[\c!leftspeech]
- [\languageparameter\c!leftspeech
- \hskip\hspaceamount\currentlanguage{speech}]
+ [\leftboundarycharacter\c!leftspeech{speech}]
\definesymbol
- [\c!rightspeech]
- [\hskip\hspaceamount\currentlanguage{speech}%
- \languageparameter\c!rightspeech]
+ [\c!rightspeech]
+ [\rightboundarycharacter\c!rightspeech{speech}]
\definesymbol
- [\c!middlespeech]
- [\hspace\hspaceamount\currentlanguage{speech}% brr
- \languageparameter\c!middlespeech]
+ [\c!middlespeech]
+ [\leftboundarycharacter\c!middlespeech{speech}]
\newsignal\quotationsignal
-\def\stelciterenin%
+\def\stelciterenin
{\dodoubleargument\getparameters[\??ci]}
-\def\stelcitatenin%
+\def\stelcitatenin
{\stelciterenin}
-\def\startcitaat%
- {\bgroup
- \dosingleempty\dostartcitaat}
+\def\startcitaat
+ {\bgroup\dosingleempty\dostartcitaat}
-\def\leftquotationmark%
- {\setbox\scratchbox\hbox{\leftquotation}%
+\def\leftquotationmark
+ {\setbox\scratchbox\hbox{\symbol[\c!leftquotation]}%
\doif\@@ciplaats\v!marge{\hskip-\wd\scratchbox}%
\box\scratchbox}
-\def\rightquotationmark%
- {\hsmash{\rightquotation}}
+\def\rightquotationmark
+ {\hsmash{\symbol[\c!rightquotation]}}
\def\dostartcitaat[#1]%
{\@@civoor
@@ -803,23 +738,26 @@
\def\handlequotation#1%
{\dohandlequotation{#1}\relax}
-\unexpanded\def\citaat%
+\unexpanded\def\citaat
{\groupedcommand
- {\dohandlequotation\c!leftquotation\relax}
+ {\dohandlequotation\c!leftquotation \relax}
{\dohandlequotation\c!rightquotation\removelastskip}}
-\unexpanded\def\citeer%
- {\doifelse{\@@ciletter}{\v!normaal}
- {\let\next\doquotedcite}
- {\let\next\doattributedcite}%
- \next}
+%\unexpanded\def\citeer
+% {\doifelse\@@ciletter\v!normaal
+% {\let\next\doquotedcite}
+% {\let\next\doattributedcite}%
+% \next}
-\def\doquotedcite%
+\unexpanded\def\citeer
+ {\doifelse\@@ciletter\v!normaal\doquotedcite\doattributedcite}
+
+\def\doquotedcite
{\groupedcommand
{\dohandlequotation\c!leftquote \relax}
{\dohandlequotation\c!rightquote\removelastskip}}
-\def\doattributedcite%
+\def\doattributedcite
{\groupedcommand
{\dostartattributes\??ci\c!letter\c!kleur}
{\dostopattributes}}
@@ -1815,68 +1753,132 @@
\presetlocalframed[\??ro]
-\def\stelroterenin%
+\def\setuprotate
{\dodoubleargument\getparameters[\??ro]}
% \ht, \vfillvoor, \vfillna, \wd, \hfillvoor, \hfillna
-\def\dodostoproteer#1#2#3#4#5#6%
+% \def\dodostoprotate#1#2#3#4#5#6%
+% {\dontshowcomposition
+% \vbox to #1\nextbox
+% {#2\relax
+% \hbox to #4\nextbox
+% {#5\relax % \number removes leading spaces too
+% \edef\@@rorotatie{\number\@@rorotatie}%
+% \doifelsenothing{\@@rorotatie}
+% {\dostartrotation{90}}
+% {\dostartrotation{\@@rorotatie}}%
+% \wd\nextbox\zeropoint
+% \ht\nextbox\zeropoint
+% \box\nextbox
+% \dostoprotation
+% #6}
+% #3}%
+% \egroup}
+%
+% \def\dostoprotate%
+% {\!!counta=\@@rorotatie
+% \divide\!!counta by 90
+% \ifcase\!!counta
+% \dodostoprotate\ht\relax\vfill\wd\relax\hfill
+% \or
+% \dodostoprotate\wd\vfill\relax\ht\relax\hfill
+% \or
+% \dodostoprotate\ht\vfill\relax\wd\hfill\relax
+% \or
+% \dodostoprotate\wd\relax\vfill\ht\hfill\relax
+% \or
+% \dodostoprotate\ht\relax\vfill\wd\relax\hfill
+% \else
+% \def\@@rotatie{90}%
+% \dodostoprotate\ht\relax\vfill\wd\relax\hfill
+% \fi}
+%
+% \def\dorotatebox#1% {angle} \hbox/\vbox/\vtop
+% {\bgroup
+% \hbox\bgroup % compatibility hack
+% \dowithnextbox
+% {\edef\@@rorotatie{#1}%
+% \setbox\nextbox=\vbox{\box\nextbox}%
+% \dostoprotate
+% \egroup}}
+
+\def\dorotatebox#1% {angle} \hbox/\vbox/\vtop
+ {\bgroup
+ \hbox\bgroup % compatibility hack
+ \dowithnextbox
+ {\edef\@@rorotatie{#1}%
+ \setbox\nextbox=\vbox{\box\nextbox}%
+ \dostoprotate
+ \egroup}}
+
+\def\dodostoprotate#1#2#3#4#5#6%
{\dontshowcomposition
- \vbox to #1\nextbox
+\scratchdimen\nextboxht\advance\scratchdimen\nextboxdp
+\doif\@@roplaats\v!hoog
+ {\setbox\nextbox\vbox{\hbox{\raise\nextboxdp\box\nextbox}}}%
+\setbox\nextbox=\vbox to #1
{#2\relax
- \hbox to #4\nextbox
+ \hbox to #4
{#5\relax % \number removes leading spaces too
\edef\@@rorotatie{\number\@@rorotatie}%
\doifelsenothing{\@@rorotatie}
{\dostartrotation{90}}
{\dostartrotation{\@@rorotatie}}%
- \wd\nextbox=\!!zeropoint
- \ht\nextbox=\!!zeropoint
+ \nextboxwd\zeropoint
+ \nextboxht\zeropoint
+ %\nextboxdp\zeropoint
\box\nextbox
\dostoprotation
#6}
#3}%
+\nextboxdp\zeropoint
+\box\nextbox
\egroup}
-
-\def\dostoproteer%
+\def\dostoprotate%
{\!!counta=\@@rorotatie
- \divide\!!counta by 90
+ \divide\!!counta 90
\ifcase\!!counta
- \dodostoproteer\ht\relax\vfill\wd\relax\hfill
+ \dodostoprotate\nextboxht\relax\vfill\nextboxwd\relax\hfill
\or
- \dodostoproteer\wd\vfill\relax\ht\relax\hfill
+ %\dodostoprotate\nextboxwd\vfill\relax\nextboxht\relax\hfill
+ \dodostoprotate\nextboxwd\vfill\relax\scratchdimen\relax\hfill
\or
- \dodostoproteer\ht\vfill\relax\wd\hfill\relax
+ \dodostoprotate\nextboxht\vfill\relax\nextboxwd\hfill\relax
\or
- \dodostoproteer\wd\relax\vfill\ht\hfill\relax
+ %\dodostoprotate\nextboxwd\relax\vfill\nextboxht\hfill\relax
+ \dodostoprotate\nextboxwd\relax\vfill\scratchdimen\hfill\relax
\or
- \dodostoproteer\ht\relax\vfill\wd\relax\hfill
+ \dodostoprotate\nextboxht\relax\vfill\nextboxwd\relax\hfill
\else
\def\@@rotatie{90}%
- \dodostoproteer\ht\relax\vfill\wd\relax\hfill
+ \dodostoprotate\nextboxht\relax\vfill\nextboxwd\relax\hfill
\fi}
-\def\dorotatebox#1% {angle} \hbox/\vbox/\vtop
- {\bgroup
- \hbox\bgroup % compatibility hack
- \dowithnextbox
- {\edef\@@rorotatie{#1}%
- \setbox\nextbox=\vbox{\box\nextbox}%
- \dostoproteer
- \egroup}}
+%D A couple of examples, demonstrating how the depth ios
+%D taken care of:
+%D
+%D \startbuffer
+%D test\rotate[frame=on, rotation=0] {gans}%
+%D test\rotate[frame=on, rotation=90] {gans}%
+%D test\rotate[frame=on, rotation=180]{gans}%
+%D test\rotate[frame=on, rotation=270]{gans}%
+%D test
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
-\def\complexroteer[#1]%
+\def\complexrotate[#1]%
{\dowithnextbox
{\getparameters[\??ro][#1]%
- \dostoproteer}%
+ \dostoprotate}%
\vbox\localframed[\??ro][#1]}
-\def\roteer%
- {\bgroup % \roteer kan argument zijn
- \complexorsimpleempty\roteer}
+\unexpanded\def\rotate % \bgroup: \rotate kan argument zijn
+ {\bgroup\complexorsimpleempty\rotate}
-\stelroterenin
+\setuprotate
[\c!rotatie=90,
\c!breedte=\v!passend,
\c!hoogte=\v!passend,
@@ -1917,6 +1919,7 @@
\c!sx=1,\c!sy=1,#1]%
\dowithnextbox
{\dontshowcomposition
+\ifdim\ht\nextbox>\zeropoint \ifdim\wd\nextbox>\zeropoint
\doscalelikeafigure
\dimen0=\@@xysy\ht\nextbox
\dimen2=\@@xysy\dp\nextbox
@@ -1930,11 +1933,12 @@
\ht\nextbox=\dimen0
\dp\nextbox=\dimen2
\wd\nextbox=\dimen4
+\fi \fi
\box\nextbox
\egroup}
\hbox}
-\def\schaal%
+\def\schaal
{\dosingleempty\doschaal}
% mirror
@@ -2077,4 +2081,45 @@
%D \HL
%D \stoptabulate
+%D Under construction:
+%D
+%D \starttypen
+%D \commalistsentence[aap,noot,mies]
+%D \commalistsentence[aap,noot]
+%D \commalistsentence[aap]
+%D \stoptypen
+
+\let\handlecommalistsentence\firstofoneargument
+
+\def\commalistsentence[#1]%
+ {\bgroup
+ \getcommalistsize[#1]%
+ \ifcase\commalistsize\relax
+ \def\serializedcommalist{#1}%
+ \else
+ \let\serializedcommalist\empty
+ \scratchcounter\zerocount
+ \def\docommando##1%
+ {\advance\scratchcounter 1
+ \ifnum\scratchcounter=1
+ \scratchtoks{\handlecommalistsentence{##1}}%
+ \else
+ \ifnum\scratchcounter=\commalistsize
+ \appendtoks\labeltext{and-2}\handlecommalistsentence{##1}\to\scratchtoks
+ \else
+ \appendtoks\labeltext{and-1}\handlecommalistsentence{##1}\to\scratchtoks
+ \fi
+ \fi}%
+ \processcommacommand[#1]\docommando
+ \edef\serializedcommalist{\the\scratchtoks}%
+ \fi
+ \serializedcommalist
+ \egroup}
+
+\ifx\textcomma\undefined \def\textcomma{,} \fi
+
+\setuplabeltext [\s!nl] [and-1=\textcomma\ , and-2= en ]
+\setuplabeltext [\s!en] [and-1=\textcomma\ , and-2=\textcomma\ and ]
+\setuplabeltext [\s!de] [and-1=\textcomma\ , and-2= und ]
+
\protect \endinput
diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex
index 9fab3742d..c15635fed 100644
--- a/tex/context/base/core-nav.tex
+++ b/tex/context/base/core-nav.tex
@@ -157,37 +157,38 @@
\def\dostartgoto\data#1\start#2\stop#3\dostopgoto
{\ifsecondaryreference
- \bgroup\setbox0=\hbox{#2#3}\egroup
+ \bgroup\setbox0\hbox{#2#3}\egroup
\else
\hbox
- {\setbox0=\hbox{#1}%
+ {\setbox0\hbox{#1}%
\ifdim\wd0<\@@iabreedte\relax
- \buttonwidth=\@@iabreedte\relax
+ \buttonwidth\@@iabreedte\relax
\else
- \buttonwidth=\wd0\relax
+ \buttonwidth\wd0
\fi
\ifdim\ht0<\@@ia@@hoogte\relax
- \buttonheight=\@@ia@@hoogte\relax
+ \buttonheight\@@ia@@hoogte\relax
\else
- \buttonheight=\ht0
+ \buttonheight\ht0
\fi
\ifdim\dp0<\@@ia@@diepte\relax
- \dimen0=\@@ia@@diepte\relax
+ \dimen0=\@@ia@@diepte\relax % = !
\else
- \dimen0=\dp0\relax
+ \dimen0\dp0
\fi
- \advance\buttonheight by \dimen0
- \setbox2=\hbox
+ \advance\buttonheight \dimen0
+ \setbox2\hbox
{\lower\dimen0\hbox
{\mindermeldingen
\dimen0=.5\wd0 % direct skipping is faster of course
- \advance\dimen0 by -.5\buttonwidth % buts this is nicer
+ \advance\dimen0 -.5\buttonwidth % buts this is nicer
\hskip\dimen0#2#3}}% when visualizing things
- \ifreversegoto
- \dimen0=\wd0\box0\kern-\dimen0\smashbox2\box2\kern\dimen0
- \else
- \smashbox2\box2\box0
- \fi
+ \naturalhbox % needed for omega / moved from plus-omg
+ {\ifreversegoto
+ \dimen0=\wd0\box0\kern-\dimen0\smashbox2\box2\kern\dimen0
+ \else
+ \smashbox2\box2\box0
+ \fi}%
\resetgoto}%
\fi}
diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex
index 9ad3e6fb9..05ffb0c11 100644
--- a/tex/context/base/core-new.tex
+++ b/tex/context/base/core-new.tex
@@ -244,22 +244,61 @@
\def\alignedbox%
{\dodoubleempty\doalignedbox[]}
+% \def\doalignedbox[#1][#2]%
+% {\bgroup
+% %\let\iftraceboxplacement\iftracelayers % ugly
+% \dowithnextbox
+% {\let\next\middlebox
+% \processaction
+% [#2]
+% [ t=>\let\next\topbox , b=>\let\next\bottombox ,
+% l=>\let\next\leftbox , r=>\let\next\rightbox ,
+% bl=>\let\next\bottomleftbox,br=>\let\next\bottomrightbox,
+% tl=>\let\next\topleftbox ,tr=>\let\next\toprightbox ,
+% lt=>\let\next\lefttopbox ,lb=>\let\next\leftbottombox ,
+% rt=>\let\next\righttopbox ,rb=>\let\next\rightbottombox]%
+% \next{\box\nextbox}%
+% \egroup}#1}
+
\def\doalignedbox[#1][#2]%
{\bgroup
%\let\iftraceboxplacement\iftracelayers % ugly
\dowithnextbox
- {\let\next\middlebox
- \processaction
- [#2]
- [ t=>\let\next\topbox , b=>\let\next\bottombox ,
- l=>\let\next\leftbox , r=>\let\next\rightbox ,
- bl=>\let\next\bottomleftbox,br=>\let\next\bottomrightbox,
- tl=>\let\next\topleftbox ,tr=>\let\next\toprightbox ,
- lt=>\let\next\lefttopbox ,lb=>\let\next\leftbottombox ,
- rt=>\let\next\righttopbox ,rb=>\let\next\rightbottombox]%
- \next{\box\nextbox}%
+ {\serializecommalist[#2]%
+ \executeifdefined{\??ab\??ab\serializedcommalist}\middlebox{\box\nextbox}%
\egroup}#1}
+\setvalue{\??ab\??ab }{\middlebox}
+\setvalue{\??ab\??ab\v!midden}{\middlebox}
+\setvalue{\??ab\??ab\v!links }{\leftbox }
+\setvalue{\??ab\??ab\v!rechts}{\rightbox }
+\setvalue{\??ab\??ab\v!onder }{\bottombox}
+\setvalue{\??ab\??ab\v!boven }{\topbox }
+
+\setvalue{\??ab\??ab\v!links \v!boven }{\lefttopbox}
+\setvalue{\??ab\??ab\v!links \v!onder }{\leftbottombox}
+\setvalue{\??ab\??ab\v!rechts\v!boven }{\righttopbox}
+\setvalue{\??ab\??ab\v!rechts\v!onder }{\rightbottombox}
+\setvalue{\??ab\??ab\v!boven \v!links }{\topleftbox}
+\setvalue{\??ab\??ab\v!onder \v!links }{\bottomleftbox}
+\setvalue{\??ab\??ab\v!boven \v!rechts}{\toprightbox}
+\setvalue{\??ab\??ab\v!onder \v!rechts}{\bottomrightbox}
+
+\setvalue{\??ab\??ab c}{\middlebox}
+\setvalue{\??ab\??ab l}{\leftbox}
+\setvalue{\??ab\??ab r}{\rightbox}
+\setvalue{\??ab\??ab o}{\bottombox}
+\setvalue{\??ab\??ab b}{\topbox}
+
+\setvalue{\??ab\??ab lt}{\lefttopbox}
+\setvalue{\??ab\??ab lb}{\leftbottombox}
+\setvalue{\??ab\??ab rt}{\righttopbox}
+\setvalue{\??ab\??ab rb}{\rightbottombox}
+\setvalue{\??ab\??ab tl}{\topleftbox}
+\setvalue{\??ab\??ab bl}{\bottomleftbox}
+\setvalue{\??ab\??ab tr}{\toprightbox}
+\setvalue{\??ab\??ab br}{\bottomrightbox}
+
\def\offsetbox%
{\dodoubleempty\dooffsetbox[]}
@@ -270,7 +309,7 @@
[\c!x=\zeropoint,
\c!y=\zeropoint,
\c!breedte=\wd\nextbox,
- \c!hoogte=\wd\nextbox,
+ \c!hoogte=\ht\nextbox,
\c!diepte=\dp\nextbox,
\c!plaats=,
#2]%
@@ -445,6 +484,34 @@
\endETEX
-\protect
+\bgroup
+
+\gdef\cleanedupcolon{:} \catcode`:=\@@active
+
+\gdef\cleanuplabel#1%
+ {\bgroup\let:\cleanedupcolon
+ \xdef\cleanlabel{#1}%
+ \egroup}
+
+\gdef\cleanupprefixedlabel#1#2%
+ {\bgroup\let:\cleanedupcolon
+ \xdef\cleanprefix{#1}%
+ \xdef\cleanlabel {#2}%
+ \egroup}
+
+\gdef\protectlabels
+ {\let:\cleanedupcolon}
+
+\global\def\blabelgroup {\bgroup \let:\cleanedupcolon}
+\global\let\elabelgroup \egroup
+
+\gdef\labelcsname
+ {\bgroup\let:\cleanedupcolon
+ \expandafter\egroup\csname}
+
+\gdef\labelvalue#1%
+ {\labelcsname#1\endcsname}
+
+\egroup
-\endinput
+\protect \endinput
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 36a61db1d..cc5a055d0 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -8,20 +8,20 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Core Macros / Footnote Handling}
-%D Unfortunately we cannot force an even number of lines in
-%D a two column footnote placement.
+%D Unfortunately we cannot force an even number of lines in
+%D a two column footnote placement.
%D There are some (still) dutch core commands used in this
%D file.
\unprotect
-% splitskips setten
+% splitskips setten
%D Footnotes are can be characterized by three components:
%D
@@ -72,7 +72,7 @@
%D The footnoterule can be a graphic and therefore calling this
%D setup macro at every skipswitch is tricky (many many MP
%D runs). Let's just reserve a few points, that probably match
-%D those of the stretch component.
+%D those of the stretch component.
\def\setupfootnotedefinition%
{\steldoordefinierenin[\??vn\??vn]}
@@ -89,10 +89,10 @@
\presetlocalframed
[\??vn]
-%D The previous definitions indicate that we can frame
-%D the footnote area. The footnotes themselves are treated as
-%D definitions.
-%D
+%D The previous definitions indicate that we can frame
+%D the footnote area. The footnotes themselves are treated as
+%D definitions.
+%D
%D \showsetup{\y!setupfootnotes}
\newif\ifcleverfootnotes % being [plaats=kolommen]
@@ -108,11 +108,11 @@
\kern\strutdepth
\fi}
-%D The following switch can be used to disable limiting the
-%D height of the footnote area, something that is needed in
-%D multi column balancing. Use this switch with care.
+%D The following switch can be used to disable limiting the
+%D height of the footnote area, something that is needed in
+%D multi column balancing. Use this switch with care.
-\newif\iffootnotelimit \footnotelimittrue
+\newif\iffootnotelimit \footnotelimittrue
\def\dosetupfootnotes[#1]%
{\iffirstargument
@@ -130,12 +130,12 @@
\v!zeerstreng=>\footnotepenalty\maxdimen,
\s!default=>\footnotepenalty\zeropoint,
\v!unknown=>\footnotepenalty\commalistelement]%
- \fi
+ \fi
\setfootnotedistance
\count\footins=1000
\ExpandBothAfter\doifinsetelse{\v!kolommen}{\@@vnplaats}
- {\cleverfootnotestrue % global ?
- \ifnum\@@kln=0
+ {\cleverfootnotestrue % global ?
+ \ifnum\@@kln=0
\scratchcounter=1
\else
\scratchcounter=\@@vnn\relax
@@ -144,14 +144,14 @@
\global\bottomnotestrue
\setcleverfootnotes}
{\cleverfootnotesfalse
- \ifnum\@@vnn=0
- \settextfootnotes
+ \ifnum\@@vnn=0
+ \settextfootnotes
\scratchcounter=1
\else
- \setcolumnfootnotes
+ \setcolumnfootnotes
\scratchcounter=\@@vnn\relax
- \divide\count\footins by \scratchcounter
- \fi
+ \divide\count\footins \scratchcounter
+ \fi
\ExpandBothAfter\doifinsetelse{\v!pagina}{\@@vnplaats}
{\global\endnotesfalse
\ExpandBothAfter\doifinsetelse{\v!hoog}{\@@vnplaats}
@@ -161,27 +161,29 @@
\global\bottomnotestrue
\postponefootnotes}}%
\iffootnotelimit
- \dimen\footins=\@@vnhoogte
- \multiply\dimen\footins by \scratchcounter
+ \dimen\footins\@@vnhoogte
+ \multiply\dimen\footins \scratchcounter
\fi}
+\def\checknotes{\setupfootnotes\relax} % will be replaced
+
\def\setfootnotedistance
- {\setbox\scratchbox=\vbox
+ {\setbox\scratchbox\vbox
{\forgetall
\@@vnvoor
- \dofootnoterule
+ \dofootnoterule
\@@vnna}%
- \skip\footins=\ht\scratchbox
- \setbox\scratchbox=\box\voidb@x} % scratchbox can be in use
+ \global\skip\footins\ht\scratchbox
+ \setbox\scratchbox\box\voidb@x} % scratchbox can be in use
\ifx\setfootnotehsize\undefined
- \def\setfootnotehsize{\hsize=\@@vnbreedte} % can be overloaded
+ \def\setfootnotehsize{\hsize\@@vnbreedte} % can be overloaded
-\fi
+\fi
\def\setcleverfootnotes%
- {\def\startpushfootnote {\bgroup % wellicht ooit kopuitlijnen
+ {\def\startpushfootnote {\bgroup % wellicht ooit kopuitlijnen
\stelinmargein[\c!uitlijnen=\v!links]%
\getvalue{\e!start\??vn\??vn}}%
\def\stoppushfootnote {\getvalue{\e!stop\??vn\??vn}%
@@ -189,8 +191,8 @@
\def\startpopfootnotes {}%
\def\stoppopfootnotes {}}
-\def\setcolumnfootnotes%
- {\def\startpushfootnote {\setfootnotehsize % possibly overloaded
+\def\setcolumnfootnotes%
+ {\def\startpushfootnote {\setfootnotehsize % possibly overloaded
\setrigidcolumnhsize\hsize\@@vnkolomafstand\@@vnn
\bgroup
\stelinmargein[\c!uitlijnen=\v!links]%
@@ -198,7 +200,7 @@
\def\stoppushfootnote {\getvalue{\e!stop\??vn\??vn}%
\egroup}%
\def\startpopfootnotes {\bgroup
- \setfootnotehsize
+ \setfootnotehsize
\setrigidcolumnhsize\hsize\@@vnkolomafstand\@@vnn
\setbox0=\vbox\bgroup}%
\def\stoppopfootnotes {\egroup
@@ -208,25 +210,25 @@
\rigidcolumnbalance0\egroup}}
% \def\settextfootnotes%
-% {\def\startpushfootnote {\startvboxtohbox
+% {\def\startpushfootnote {\startvboxtohbox
% \dostartattributes\??vn\c!letter\c!kleur{}}%
% \def\stoppushfootnote {\hskip\@@vnkolomafstand % plus.5em minus.5em
% \dostopattributes
% \stopvboxtohbox}%
% \def\startpopfootnotes {\vbox\bgroup % \doifdimenelse
% \doifnotinset{\@@vnbreedte}{\v!passend,\v!ruim}
-% {\setfootnotehsize}}%
+% {\setfootnotehsize}}%
% \def\stoppopfootnotes {\convertvboxtohbox\egroup}}
\def\settextfootnotes%
- {\def\startpushfootnote {\startvboxtohbox
+ {\def\startpushfootnote {\startvboxtohbox
\dostartattributes\??vn\c!letter\c!kleur{}}%
\def\stoppushfootnote {\hskip\@@vnkolomafstand % plus.5em minus.5em
\dostopattributes
\stopvboxtohbox}%
- \def\startpopfootnotes {\vbox\bgroup
+ \def\startpopfootnotes {\vbox\bgroup
\doifnotinset{\@@vnbreedte}{\v!passend,\v!ruim}
- {\setfootnotehsize}%
+ {\setfootnotehsize}%
\beginofshapebox}%
\def\stoppopfootnotes {\endofshapebox
\reshapebox
@@ -235,7 +237,7 @@
\flushshapebox
\egroup}}
-%D The formatting depends on the width of the table, so we
+%D The formatting depends on the width of the table, so we
%D have to set \type {n} to zero.
%D
%D \starttypen
@@ -245,7 +247,7 @@
%D \bTR \bTD three fout five six seven eight nine \eTD \bTD ten \eTD \eTR
%D \eTABLE
%D \stopbuffer
-%D
+%D
%D \startlocalfootnotes[n=0,location={text,none}]
%D \placelegend[n=2]{\getbuffer}{\placelocalfootnotes}
%D \stoplocalfootnotes
@@ -305,12 +307,12 @@
%D Typesetting footnotes is, at least for the moment, disabled
%D when reshaping boxes.
%D
-%D The additional macro \type {\footnotetext} and the
-%D associated \type {\note} macro were implemented at
-%D request of users on the mailing list and a suggestion by
-%D taco to split of the symbol placement. I decided to
-%D merge this functionality with the existing \type {\note}
-%D functionality.
+%D The additional macro \type {\footnotetext} and the
+%D associated \type {\note} macro were implemented at
+%D request of users on the mailing list and a suggestion by
+%D taco to split of the symbol placement. I decided to
+%D merge this functionality with the existing \type {\note}
+%D functionality.
\newif\iffootnotesymbol
@@ -322,7 +324,7 @@
% \ifcase#1\relax
% \global\footnotesymbolfalse
% \else
-% \global\footnotesymboltrue
+% \global\footnotesymboltrue
% \fi
% \ifvisible
% \ifreshapingbox
@@ -340,7 +342,7 @@
\ifcase#1\relax
\global\footnotesymbolfalse
\else
- \global\footnotesymboltrue
+ \global\footnotesymboltrue
\fi
\ifvisible
\ifreshapingbox
@@ -348,7 +350,7 @@
\else
\@EAEAEA\dodofootnote
\fi
- \else % todo: \iftrialtypesetting
+ \else % todo: \iftrialtypesetting
\@EA\gobbletwoarguments
\fi{#2}}
@@ -365,8 +367,8 @@
%D \stoptypen
%D
%D which can be handy while for instance typesetting tables
-%D of contents. The pagewise footnote numbering is dedicated
-%D to Han The Thanh, who needed it first.
+%D of contents. The pagewise footnote numbering is dedicated
+%D to Han The Thanh, who needed it first.
\newif\iffootnotesenabled \footnotesenabledtrue
@@ -378,7 +380,7 @@
{\ifconditional\pagewisefootnotes
\doifreferencefoundelse{\s!fnt:t:\internalfootreference}
{\let\savedrealreference\currentrealreference
- \doifreferencefoundelse{\s!fnt:f:\internalfootreference}
+ \doifreferencefoundelse{\s!fnt:f:\internalfootreference}
{\ifnum\savedrealreference<\currentrealreference\relax\symbol[#1]\else
\ifnum\savedrealreference>\currentrealreference\relax\symbol[#2]\fi\fi}
{}}
@@ -421,8 +423,8 @@
\@EA\gobbletwoarguments
\fi}
-\def\nododofootnote#1%
- {\doifnot{#1}{-}{\kern.5em}% quick hack, approximation
+\def\nododofootnote#1%
+ {\doifnot{#1}{-}{\kern.5em}% quick hack, approximation
\gobbleoneargument}
\def\dododofootnote#1%
@@ -469,14 +471,14 @@
\let\stoppushfootnote = \relax
\newsignal\footnotesignal
-\newcount \footnotepenalty
+\newcount \footnotepenalty
\footnotepenalty=0 % needed in order to split in otrset
\def\dostartfootnote% nog gobble als in pagebody
{\bgroup
- %\restorecatcodes % to be tested first
- \ifinregels % otherwise problems with \type <crlf> {xxx}
+ %\restorecatcodes % to be tested first
+ \ifinregels % otherwise problems with \type <crlf> {xxx}
\ignorelines % makes footnotes work in \startlines ... \stoplines
\fi
\iffootnotesymbol
@@ -493,14 +495,14 @@
\redoconvertfont % to undo \undo calls in in headings etc
\splittopskip\ht\strutbox % not actually needed here
\splitmaxdepth\dp\strutbox % not actually needed here
- \iffixedlayoutdimensions % ugly hack, will change
+ \iffixedlayoutdimensions % ugly hack, will change
\linkermargeafstand\@@vnmargeafstand
\rechtermargeafstand\linkermargeafstand
\else
\def\linkermargeafstand{\@@vnmargeafstand}%
\let\rechtermargeafstand\linkermargeafstand
\fi
- \ifcase\@@vnn\relax % new 31-07-99 ; always ?
+ \ifcase\@@vnn\relax % new 31-07-99 ; always ?
\doifnotinset{\@@vnbreedte}{\v!passend,\v!ruim}
{\setfootnotehsize}%
\fi
@@ -595,17 +597,17 @@
\let\stoppopfootnotes = \relax
\def\placefootnoteinserts%
- {%\ifvoid\footins \else % unsafe, strange
+ {%\ifvoid\footins \else % unsafe, strange
\ifdim\ht\footins>\!!zeropoint\relax
\ifendnotes \else
\@@vnvoor
\dofootnoterule % alleen in ..mode
\bgroup
\setfootnotebodyfont
- \setbox0=\hbox
+ \setbox0=\hbox
{\startpopfootnotes
- \setfootnotebodyfont
-% % this should be checked, smells like a mix-up
+ \setfootnotebodyfont
+% % this should be checked, smells like a mix-up
% % does not split: \ifcase\@@vnn\unvbox\else\box\fi\footins
% \ifcase\@@vnn
\box\footins
@@ -614,19 +616,19 @@
% \fi
% this is too ugly actually
\stoppopfootnotes}%
- \localframed
+ \localframed
[\??vn]
[\c!breedte=\v!passend,
\c!hoogte=\v!passend,
\c!strut=\v!nee,
- \c!offset=\v!overlay]
+ \c!offset=\v!overlay]
{\ifdim\dp0=\zeropoint % this hack is needed because \vadjust
- \hbox{\lower\dp\strutbox\box0}% % in margin number placement
+ \hbox{\lower\dp\strutbox\box0}% % in margin number placement
\else % hides the (always) present depth
\box0
\fi}%
\egroup
- \@@vnna
+ \@@vnna
\fi
\fi}
@@ -638,7 +640,7 @@
%D \starttypen
%D \postponefootnotes
%D \.box{whatever we want with footnotes}
-%D \flushfootnotes
+%D \flushnotes
%D \stoptypen
%D
%D This alternative can be used in headings, captions, tables
@@ -655,8 +657,8 @@
%D insert operation. A not too robust method uses the
%D \type{\insert} primitive when possible. This method fails in
%D situations where it's not entirely clear in what mode \TEX\
-%D is. Therefore the auto method can is to be overruled when
-%D needed.
+%D is. Therefore the auto method can is to be overruled when
+%D needed.
\newbox\postponedfootnotes
@@ -678,7 +680,7 @@
\def\postponefootnotes%
{\let\autopostponefootnotes=\postponefootnotes
- \let\postponefootnotes\relax % prevent loops
+ \let\postponefootnotes\relax % prevent loops
% \gdef\localfootinsert%
\def\localfootinsert%
{%\message{[postponed footnote]}%
@@ -686,9 +688,9 @@
\unvbox\postponedfootnotes
\gobbletwoarguments}}
-\def\doflushfootnotes% also called directly, \ifvoid is needed !
- {\ifendnotes \else
- \ifvoid\postponedfootnotes
+\def\doflushnotes% also called directly, \ifvoid is needed !
+ {\ifendnotes \else
+ \ifvoid\postponedfootnotes
% \global\let\localfootinsert=\insert
\let\localfootinsert=\insert
\else
@@ -704,49 +706,34 @@
% \global\let\localfootinsert=\insert
\let\localfootinsert=\insert
\insert\footins\bgroup\unvbox\postponedfootnotes\egroup
- \fi
+ \fi
\fi}
-% \def\flushfootnotes%
-% {\ifinpagebody \else
-% \ifinner \else
-% \ifendnotes \else
-% \ifvoid\postponedfootnotes \else
-% %\ifvmode % less interference, but also less secure
-% \doflushfootnotes
-% %\fi
-% \fi
-% \fi
-% \fi
-% \fi}
-%
-% more efficient
-
-\def\flushfootnotes%
+\def\flushnotes
{\ifvoid\postponedfootnotes \else
\ifinner \else
- \ifendnotes \else
- \ifinpagebody \else
+ \ifendnotes \else
+ \ifinpagebody \else
%\ifvmode % less interference, but also less secure
- \doflushfootnotes
+ \doflushnotes
%\fi
\fi
\fi
\fi
\fi}
-%D This is a nasty and new secondary footnote flusher. It
-%D can be hooked into \type {\everypar} like:
-%D
-%D \starttypen
-%D \appendtoks \synchronizefootnotes \to \everypar
+%D This is a nasty and new secondary footnote flusher. It
+%D can be hooked into \type {\everypar} like:
+%D
+%D \starttypen
+%D \appendtoks \synchronizenotes \to \everypar
%D \stoptypen
-\def\dosynchronizefootnotes%
+\def\dosynchronizenotes
{\insert\footins{\unvbox\footins}}
-\def\synchronizefootnotes% indirect because of everypar
- {\ifvoid\footins\else\dosynchronizefootnotes\fi}
+\def\synchronizenotes% indirect because of everypar
+ {\ifvoid\footins\else\dosynchronizenotes\fi}
\def\placefootnotesintext#1%
{\ifdim\ht#1>\zeropoint
@@ -755,27 +742,27 @@
\witruimte
\@@vnvoor
\fi
- \snaptogrid\hbox
+ \snaptogrid\hbox
{\setfootnotebodyfont
\setbox0=\hbox
{\startpopfootnotes
\unvbox#1\endgraf\relax
\stoppopfootnotes}%
- \doif{\@@vnbreedte}{\v!passend} % new, auto width
- {\setbox0=\hbox % uggly but ok.
- {\beginofshapebox
+ \doif{\@@vnbreedte}{\v!passend} % new, auto width
+ {\setbox0=\hbox % uggly but ok.
+ {\beginofshapebox
\unhbox0\setbox0=\lastbox\unvbox0
\endofshapebox
\reshapebox{\hbox{\unhbox\shapebox}}%
\vbox{\flushshapebox}}}%
- \localframed
+ \localframed
[\??vn]
[\c!breedte=\v!passend,
\c!hoogte=\v!passend,
\c!strut=\v!nee,
\c!offset=\v!overlay]
{\ifdim\dp0=\!!zeropoint % this hack is needed because \vadjust
- \hbox{\lower\dp\strutbox\box0}% % in margin number placement
+ \hbox{\lower\dp\strutbox\box0}% % in margin number placement
\else % hides the (always) present depth
\box0
\fi}}%
@@ -786,19 +773,19 @@
%D A stupid alternative is also provided:
%D
-%D \starttypen
+%D \starttypen
%D \setupfootnotes[location={text,none}]
-%D \stoptypen
+%D \stoptypen
-\def\placefootnotesasnone#1% is grouped already
+\def\placefootnotesasnone#1% is grouped already
{\ifdim\ht#1>\zeropoint
\@@vnvoor
- \setfootnotebodyfont
- \startpopfootnotes % make sure that fake height is killed
+ \setfootnotebodyfont
+ \startpopfootnotes % make sure that fake height is killed
\unvbox#1\endgraf
\stoppopfootnotes
- \setbox0=\lastbox \ifvbox0 \unvbox0\else\box0\fi % enable columns
- \@@vnna
+ \setbox0=\lastbox \ifvbox0 \unvbox0\else\box0\fi % enable columns
+ \@@vnna
\fi}
%D \macros
@@ -840,7 +827,7 @@
\def\stoplocalfootnotes%
{\restorenumber[\v!voetnoot]%
\egroup
- \setupfootnotes\relax} % really needed, else wrong main settings
+ \checknotes} % really needed, else wrong main settings
\def\doplacelocalfootnotes[#1]%
{\bgroup
@@ -849,7 +836,7 @@
{\placefootnotesasnone\localpostponedfootnotes}%
{\placefootnotesintext\localpostponedfootnotes}%
\egroup
- \setupfootnotes\relax}
+ \checknotes}
\def\placelocalfootnotes%
{\dosingleempty\doplacelocalfootnotes}
@@ -900,8 +887,8 @@
\ExpandBothAfter\doifinsetelse{\v!geen}{\@@vnplaats}
{\placefootnotesasnone\postponedfootnotes}%
{\placefootnotesintext\postponedfootnotes}%
- \fi \fi
- \else \ifdim\ht\footins>\zeropoint
+ \fi \fi
+ \else \ifdim\ht\footins>\zeropoint
\iffirstargument\setupfootnotes[#1,\c!hoogte=\teksthoogte]\fi
\placefootnoteinserts
\fi \fi
@@ -909,27 +896,29 @@
\def\fakefootnotes
{\ifhmode \endgraf \fi
- \ifvmode
- \calculatefootnotevsize
- \ifdim\footnotevsize>\zeropoint \kern\footnotevsize \fi
+ \ifvmode
+ \calculatetotalnoteheight
+ \ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi
\fi}
-\newdimen\footnotevsize
+\def\placebottomnotes{\placefootnotes}
+
+\newdimen\totalnoteheight
-\def\calculatefootnotevsize
- {\footnotevsize\zeropoint
+\def\calculatetotalnoteheight
+ {\totalnoteheight\zeropoint
\ifdim\ht\footins>\zeropoint
- \advance\footnotevsize\ht\footins
- \advance\footnotevsize\skip\footins
+ \advance\totalnoteheight\ht\footins
+ \advance\totalnoteheight\skip\footins
\fi}
-\newif\iffootnotespresent % global ?
+\newif\ifnotespresent % global ?
-\def\checkfootnotepresence
- {\ifdim\ht\footins>\zeropoint
- \footnotespresenttrue
+\def\checknotepresence
+ {\ifdim\ht\footins>\zeropoint
+ \notespresenttrue
\else
- \footnotespresentfalse
+ \notespresentfalse
\fi}
%D Now how can this mechanism be hooked into \CONTEXT\ without
@@ -937,7 +926,7 @@
%D be rather simple:
%D
%D \starttypen
-%D \everypar {...\flushfootnotes...}
+%D \everypar {...\flushnotes...}
%D \neverypar {...\postponefootnoes}
%D \stoptypen
%D
@@ -946,7 +935,7 @@
%D \starttypen
%D \def\ejectinsert%
%D {...
-%D \flushfootnotes
+%D \flushnotes
%D ...}
%D \stoptypen
%D
diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex
index 8898fe410..5e88eefc5 100644
--- a/tex/context/base/core-obj.tex
+++ b/tex/context/base/core-obj.tex
@@ -88,18 +88,20 @@
\def\objectplaceholder{NOT YET FLUSHED}%
-\def\presetobject#1#2%
- {\ifundefined{\r!object#1::#2}%
-\global % added
- \@EA\let\csname\r!object#1::#2\endcsname\objectplaceholder
- \fi}
+\def\presetobject#1#2% \global added
+ {\blabelgroup
+ \ifundefined{\r!object#1::#2}%
+ \global\@EA\let\csname\r!object#1::#2\endcsname\objectplaceholder
+ \fi
+ \elabelgroup}
\def\dosetobject#1#2#3% \initializepaper this will move to \everyshipout
- {\initializepaper
+ {\initializepaper
+ \blabelgroup
\ifundefined{\r!object#2::#3}%
- \expandafter\dodosetobject
+ \elabelgroup \expandafter\dodosetobject
\else
- \expandafter\gobblefivearguments
+ \elabelgroup \expandafter\gobblefivearguments
\fi
{#1}{#2}{#3}}
@@ -116,7 +118,8 @@
\dowithnextbox{\dododosetobject{#1}{#2}{#3}\egroup}}
\def\dododosetobject#1#2#3%
- {\dontshowcomposition % rather fuzzy in \setxvalue ... \hbox
+ {\blabelgroup
+ \dontshowcomposition % rather fuzzy in \setxvalue ... \hbox
\@EA\xdef\csname\r!object#2::#3\endcsname
{\noexpand\dohandleobject{#2}{#3}%
{\ifhbox\nextbox\hbox\else\vbox\fi}%
@@ -140,11 +143,16 @@
\dp\nextbox\depth
\fi \fi
\box\nextbox
- \dostopobject}
+ \dostopobject
+ \elabelgroup}
+
+\def\getobject#1#2%
+ {\blabelgroup
+ \let\dohandleobject\dogetobject
+ \csname\r!object#1::#2\endcsname}
\def\dogetobject#1#2#3#4#5#6%
{\initializepaper
- \bgroup
\forgetall
\dontshowcomposition
\setbox\scratchbox\vbox
@@ -161,11 +169,7 @@
\ht\scratchbox#5\s!sp
\dp\scratchbox#6\s!sp
\box\scratchbox
- \egroup}
-
-\def\getobject#1#2%
- {\let\dohandleobject\dogetobject
- \csname\r!object#1::#2\endcsname}
+ \elabelgroup}
%D If needed one can ask for the dimensions of an object with:
%D
@@ -186,7 +190,7 @@
\let\objectwidth \!!zeropoint
\let\objectheight\!!zeropoint
\let\objectdepth \!!zeropoint
- \csname\r!object#1::#2\endcsname}
+ \labelcsname\r!object#1::#2\endcsname}
%D Apart from this kind of objects, that have typeset content,
%D we can have low level driver specific objects. Both types
@@ -208,16 +212,11 @@
\def\checkobjectreferences%
{\startnointerference
+ \protectlabels
\doutilities{objectreferences}\jobname\empty\empty\empty
\global\let\checkobjectreferences\relax
\stopnointerference}
-% \def\setobjectreferences
-% {\def\objectreference##1##2##3%
-% {\doifundefinedelse{\r!driver##1::##2}
-% {\setxvalue{\r!driver##1::##2}{##3}}
-% {\showmessage{\m!references}{31}{[##1 ##2=>##3]}}}}
-
\def\setobjectreferences
{\def\objectreference##1##2##3%
{\ifundefined{\r!driver##1::##2}%
@@ -233,34 +232,29 @@
\def\dosetobjectreference#1#2#3%
{\checkobjectreferences
+ \blabelgroup
\ifobjectreferencing
- \bgroup
\edef\dowritereference% why not immediate ?
{\writeutilitycommand{\objectreference{#1}{#2}{#3}}}%
\dowritereference
- \egroup
\else
\global\objectreferencingtrue
\fi
- \setxvalue{\r!driver#1::#2}{#3}}
+ \setxvalue{\r!driver#1::#2}{#3}%
+ \elabelgroup}
\def\defaultobjectreference#1#2{0}
-% \def\dogetobjectreference#1#2#3%
-% {\checkobjectreferences
-% \doifdefinedelse{\r!driver#1::#2}
-% {\@EA\xdef\@EA#3\@EA{\csname\r!driver#1::#2\endcsname}}
-% {\showmessage{\m!references}{30}{[#1 #2=>\defaultobjectreference{#1}{#2}]}%
-% \xdef#3{\defaultobjectreference{#1}{#2}}}}
-
\def\dogetobjectreference#1#2#3%
{\checkobjectreferences
+ \blabelgroup
\ifundefined{\r!driver#1::#2}%
\showmessage{\m!references}{30}{[#1 #2=>\defaultobjectreference{#1}{#2}]}%
\xdef#3{\defaultobjectreference{#1}{#2}}%
\else
\global\@EA\let\@EA#3\csname\r!driver#1::#2\endcsname
- \fi}
+ \fi
+ \elabelgroup}
\def\setobject {\global\objectreferencingfalse\dosetobject1}
\def\settightobject{\global\objectreferencingfalse\dosetobject0}
@@ -279,18 +273,18 @@
\beginTEX
\def\doifobjectfoundelse#1#2%
- {\@EA\ifx\csname\r!object#1::#2\endcsname\relax
- \expandafter\secondoftwoarguments
+ {\blabelgroup \@EA\ifx\csname\r!object#1::#2\endcsname\relax
+ \elabelgroup \expandafter\secondoftwoarguments
\else
- \expandafter\firstoftwoarguments
+ \elabelgroup \expandafter\firstoftwoarguments
\fi}
\def\doifobjectreferencefoundelse#1#2%
{\checkobjectreferences
- \@EA\ifx\csname\r!driver#1::#2\endcsname\relax
- \expandafter\secondoftwoarguments
+ \blabelgroup \@EA\ifx\csname\r!driver#1::#2\endcsname\relax
+ \elabelgroup \expandafter\secondoftwoarguments
\else
- \expandafter\firstoftwoarguments
+ \elabelgroup \expandafter\firstoftwoarguments
\fi}
\endTEX
@@ -298,18 +292,18 @@
\beginETEX
\def\doifobjectfoundelse#1#2%
- {\ifcsname\r!object#1::#2\endcsname
- \expandafter\firstoftwoarguments
+ {\blabelgroup \ifcsname\r!object#1::#2\endcsname
+ \elabelgroup \expandafter\firstoftwoarguments
\else
- \expandafter\secondoftwoarguments
+ \elabelgroup \expandafter\secondoftwoarguments
\fi}
\def\doifobjectreferencefoundelse#1#2%
{\checkobjectreferences
- \ifcsname\r!driver#1::#2\endcsname
- \expandafter\firstoftwoarguments
+ \blabelgroup \ifcsname\r!driver#1::#2\endcsname
+ \elabelgroup \expandafter\firstoftwoarguments
\else
- \expandafter\secondoftwoarguments
+ \elabelgroup \expandafter\secondoftwoarguments
\fi}
\endETEX
diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex
index 02d49db16..9191c1c2d 100644
--- a/tex/context/base/core-pos.tex
+++ b/tex/context/base/core-pos.tex
@@ -13,6 +13,8 @@
\writestatus{loading}{Context Positioning Support}
+% todo: topskip als optie voor eerste regel achtergrond
+
%D Although \TEX\ has a rather powerful channel to the outside
%D world, called \type {\special}, real communication with
%D other programs is complicated by the fact that no positional
@@ -150,10 +152,11 @@
{\xdef#1{\number#2}}
\def\checkpositions%
- {\bgroup
- \setbox0=\hbox{\doutilities{positions}{\jobname}{}{}{}}%
- \global\let\checkpositions=\relax
- \egroup}
+ {\startnointerference
+ \protectlabels
+ \doutilities{positions}{\jobname}{}{}{}%
+ \global\let\checkpositions\relax
+ \stopnointerference}
%D Since the positional values are to be fully expandable, we
%D need to preload them as soon as possible, which is why we
@@ -964,6 +967,13 @@
\let\dohandleMPpositiongraphicrange\docleanMPpositiongraphicrange
\to \everycleanpositionaction
+% will be overloaded, and/or code below moved to core-box
+
+\defineoverlay[\v!tekst-2][\positionoverlay{\v!tekst-2}]
+\defineoverlay[\v!tekst-1][\positionoverlay{\v!tekst-1}]
+\defineoverlay[\v!tekst+1][\positionoverlay{\v!tekst+1}]
+\defineoverlay[\v!tekst+2][\positionoverlay{\v!tekst+2}]
+
%D The auxiliary \METAPOST\ macros are defined by default,
%D by saying:
@@ -1123,6 +1133,8 @@
%D So far for the unreadable alternative.
+\newcounter\textbackgrounddepth
+
\appendtoks
\savecurrentvalue\totalnofparbackgrounds\nofparbackgrounds
\to \everybye
@@ -1140,8 +1152,9 @@
\global\positioningpartrue
\fi}
-\unexpanded\def\starttextbackground%
+\unexpanded\def\starttextbackground
{\bgroup
+ \increment\textbackgrounddepth
\dodoubleempty\dostarttextbackground}
\let\dodostarttextbackground\relax
@@ -1181,6 +1194,10 @@
\let\dodostoptextbackground \dostoptextbackgroundtxt,
\v!alinea=>\let\dodostarttextbackground\dostarttextbackgroundpar
\let\dodostoptextbackground \dostoptextbackgroundpar]%
+ \ifnum\textbackgrounddepth>1 % new
+ \let\dodostarttextbackground\dostarttextbackgroundtxt
+ \let\dodostoptextbackground \dostoptextbackgroundtxt
+ \fi
\doifelsevalue{\??td#1\c!kader}{\v!aan}
{\doifelsevalue{\??td#1\c!hoek}{\v!rond}
{\setvalue{\??td#1\c!kader}{2}}
@@ -1370,11 +1387,6 @@
\def\checktextbackgrounds
{\ifproductionrun \enablehiddenbackground \fi}
-\defineoverlay[\v!tekst-2][\positionoverlay{\v!tekst-2}]
-\defineoverlay[\v!tekst-1][\positionoverlay{\v!tekst-1}]
-\defineoverlay[\v!tekst+1][\positionoverlay{\v!tekst+1}]
-\defineoverlay[\v!tekst+2][\positionoverlay{\v!tekst+2}]
-
\setuptextbackground
[\c!mp=mpos:par:shape,
\c!status=\v!start,
diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex
index 6f9d18917..63c6bd582 100644
--- a/tex/context/base/core-ref.tex
+++ b/tex/context/base/core-ref.tex
@@ -157,29 +157,32 @@
%D full reference, but it's the concept that counts. The low
%D level implementation is:
-\def\rawpagereference#1#2%
+\def\rawreference#1#2#3%
{\bgroup
\the\everyreference
\makesectionformat
\writereference{#2}
- {\sectionformat::\noexpand\pagenumber}{\noexpand\realfolio}{}%
+ {\sectionformat\sectionseparator\sectionseparator\noexpand\pagenumber}
+ {\noexpand\realfolio}{#3}%
\egroup}
-\def\rawtextreference#1#2#3%
+\def\rawpagereference#1#2%
{\bgroup
\the\everyreference
+ \makesectionformat
\writereference{#2}
- {}{\noexpand\realfolio}{#3}%
+ {\sectionformat\sectionseparator\sectionseparator\noexpand\pagenumber}
+ {\noexpand\realfolio}{}%
\egroup}
-\def\rawreference#1#2#3%
+\def\rawtextreference#1#2#3%
{\bgroup
\the\everyreference
- \makesectionformat
\writereference{#2}
- {\sectionformat::\noexpand\pagenumber}{\noexpand\realfolio}{#3}%
+ {}{\noexpand\realfolio}{#3}%
\egroup}
+
%D As we can see, these macros depend on three other ones,
%D \type {\makesectionformat}, that generated \type
%D {\sectionformat}, \type {\pagenumber}. The not yet used
@@ -409,7 +412,7 @@
% \egroup}
\def\usereferences[#1]%
- {\bgroup\setbox\scratchbox=\hbox\bgroup
+ {\startnointerference
\checkreferences
\doifparentfileelse{#1}
{\ifconditional\jobreferencesloaded\else
@@ -421,8 +424,7 @@
\ifx\fileprefix\empty\else
\doglobal\addtocommalist{#1}\loadedreferences
\fi}}
- \egroup\egroup}
-
+ \stopnointerference}
%D As mentioned we will also use the cross reference mechanism
%D for navigational purposes. The main reason for this is that
@@ -1479,20 +1481,20 @@
\ifx\currentreferencearguments\empty
\@EA\ifx\csname\r!cross\referenceprefix\currentfullreference\endcsname\relax
\let\referenceprefix\empty
- \ifcsname\r!cross\currentfullreference\endcsname
- \global\referencefoundtrue
- \else
+ \@EA\ifx\csname\r!cross\currentfullreference\endcsname\relax
\global\referencefoundfalse
+ \else
+ \global\referencefoundtrue
\fi
\else
\global\referencefoundtrue
\fi
\else % [SomeThing{with,me}]
\let\referenceprefix\empty
- \ifcsname\r!cross\currentinnerreference\endcsname
- \global\referencefoundtrue
- \else
+ \@EA\ifx\csname\r!cross\currentinnerreference\endcsname\relax
\global\referencefoundfalse
+ \else
+ \global\referencefoundtrue
\fi
\fi
\doifpredefinedreferenceelse{\global\referencefoundfalse}\donothing}
@@ -2795,10 +2797,11 @@
%D specified. This is logical when one keeps in mind that a
%D valid \URL\ can also be a mail address.
-\def\gebruikURL%
+\def\gebruikURL
{\bgroup
+ \protectlabels
\catcode`\#=12\catcode`\%=12\catcode`\/=12
- \catcode`\_=12\catcode`\~=12
+ \catcode`\_=12\catcode`\~=12\catcode`\:=12
\dodoubleempty\dogebruikURL}
\def\dogebruikURL[#1][#2]%
@@ -2815,7 +2818,7 @@
\fi\fi\fi
\fi}
-\let\gebruikurl=\gebruikURL
+\let\gebruikurl\gebruikURL
%D \macros
%D {url,setupurl}
@@ -2933,6 +2936,7 @@
\def\simpleuit
{\bgroup
+ \protectlabels
\ifundefined{\v!file:::\otherlabel}%
{\tttf[\otherlabel]}%
\else
@@ -2940,13 +2944,25 @@
\csname\v!file:::\otherlabel\endcsname
\egroup}
-\def\complexuit[#1]%
- {\doifinstringelse{::}{#1}{\docomplexuit[#1]}{\docomplexuit[#1::]}}
+% normal version:
+%
+% \def\complexuit[#1]%
+% {\dontleavehmode % added, but probably not needed
+% \bgroup
+% \doifinstringelse{::}{#1}{\docomplexuit[#1]}{\docomplexuit[#1::]}}
+%
+% since we need to serve active :'s we need the less readable:
-\def\docomplexuit[#1::#2]%
+\def\complexuit[#1]%
{\dontleavehmode % added, but probably not needed
\bgroup
- \ifundefined{\v!file:::#1}%
+ \protectlabels % needed for active french :'s
+ \edef\!!stringa{#1}%
+ \doifincsnameelse{::}\!!stringa\donothing{\edef\!!stringa{#1::}}%
+ \@EA\docomplexuit\@EA[\!!stringa]}
+
+\def\docomplexuit[#1::#2]%
+ {\ifundefined{\v!file:::#1}%
{\tttf[#1]}%
\else
\def\doexternaldocument[##1][##2][##3]{\naar{##3}[#1::#2]}%
@@ -3266,12 +3282,12 @@
\newif\ifautocrossdocument
-\def\docoupledocument[#1][#2][#3][#4]%
+\def\docoupledocument[#1][#2][#3][#4]% is this :/- safe ?
{\ifthirdargument
\begingroup
\def\dolijstelement##1##2##3##4##5##6% 2=aut 6=pag / 2 goes into text ref slot
{\global\utilitydonetrue %{Watch the braces here below!}
- \setglobalcrossreference{{##1::\strippedlistentry[##5]}}{}{##6}{##2}}%
+ \setglobalcrossreference{{##1::\@@filterblocknumberpart[##5]}}{}{##6}{##2}}%
\def\usereferences[##1]%
{\setbox0=\vbox{\doutilities{#3}{##1}{#3}{}{}}}%
\dogebruikexterndocument[#1][#2][#4]%
diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex
index 793ba16d3..4f835faca 100644
--- a/tex/context/base/core-reg.tex
+++ b/tex/context/base/core-reg.tex
@@ -88,7 +88,8 @@
{\nextinternalreference} %
{#1} %
{\asciiregisterentry} %
- {\sectionformat::\ifdone#2\else\noexpand\pagenumber\fi} %
+ {\sectionformat\sectionseparator\sectionseparator
+ \ifdone#2\else\noexpand\pagenumber\fi} %
{\noexpand\realfolio}}}%
\schrijfwegnaarregister
\getfirstcharacter\currentregister
@@ -333,8 +334,8 @@
\fi
\global\firstregisterpagefalse}
-\def\dosetpageregistersee#1#2#3#4%
- {\doifreglevelelse[#4::0]
+\def\dosetpageregistersee#1#2#3#4% ugly separator hack
+ {\expanded{\doifreglevelelse[#4\sectionseparator\sectionseparator0]}%
{{\global\utilitydonetrue
\setregisterhowto[#2]%
\def\dohandleregisterentry##1% dubbelop | \strut nieuw
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index 434889e85..7a400695c 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -192,7 +192,7 @@
\def\dofilledbox\width#1\height#2\depth#3\corner#4\radius#5\\%
{\bgroup
- \doifelse{#4}{\v!rond}
+ \doifelse{#4}\v!rond
{\dimen0=#5\relax % just in case of .x\bodyfontsize
\ifzeropt\dimen0
\dofilledlinedbox\width#1\height#2\depth#3\\%
@@ -206,7 +206,7 @@
{\vrule\!!width#1\!!height#2\!!depth#3}%
\def\dofilledroundbox\width#1\height#2\depth#3\radius#4\\%
- {\ovalbox{#1}{#2}{#3}{\ruledlinewidth}{#4}{\v!uit}{\v!aan}}
+ {\ovalbox{#1}{#2}{#3}{\ruledlinewidth}{#4}\v!uit\v!aan}
\def\ovalbox#1#2#3#4#5#6#7% direct #1 etc passeren
{\bgroup
@@ -504,18 +504,20 @@
\dimen4=\ht#1\advance\dimen4 \dimen0
\dimen6=\dp#1\advance\dimen6 \dimen0\advance\dimen6 by #6\relax
\ifdim\dimen6<\zeropoint
- \advance\dimen4 by \dimen6 \dimen8=-\dimen6 \dimen6=\zeropoint
+ \advance\dimen4 \dimen6
+ \dimen8=-\dimen6
+ \dimen6=\zeropoint
\else
\dimen8=\zeropoint
\fi
- \setbox\extraframebox=\hbox
+ \setbox\extraframebox\hbox
{\dostrokedbox\width\dimen2\height\dimen4\depth\dimen6%
\corner#4\radius#5\toggle#7\\}%
- \setbox\extraframebox=\hbox
+ \setbox\extraframebox\hbox
{\raise\dimen8\vbox{\moveleft#3\box\extraframebox}}%
- \wd\extraframebox=\wd#1%
- \ht\extraframebox=\ht#1%
- \dp\extraframebox=\dp#1%
+ \wd\extraframebox\wd#1%
+ \ht\extraframebox\ht#1%
+ \dp\extraframebox\dp#1%
\hbox
{%\copy#1\hskip-\wd#1%
\box#1\hskip-\wd\extraframebox % faster
@@ -525,7 +527,7 @@
\def\dostrokedbox\width#1\height#2\depth#3\corner#4\radius#5\toggle#6\\%
{\bgroup
- \doifelse{#4}{\v!rond}
+ \doifelse{#4}\v!rond
{\dimen0=#5\relax % just in case of .x\bodyfontsize
\ifzeropt\dimen0
\dostrokedlinedbox\width#1\height#2\depth#3\toggle#6\\%
@@ -691,9 +693,9 @@
{\bgroup
\inframedtrue
\edef\@@framed{#1}%
-% % this piece of pre expansion is needed (sometimes used in frameoffset)
-% \doifvaluesomething{\@@framed\c!lijndikte}
-% {\ruledlinewidth\getvalue{\@@framed\c!lijndikte}}%
+ % this piece of pre expansion is needed (sometimes used in frameoffset)
+ % \doifvaluesomething{\@@framed\c!lijndikte} % obsolete
+ % {\ruledlinewidth\getvalue{\@@framed\c!lijndikte}}% obsolete
% this piece of pre expansion is needed (sometimes used circular)
\scratchdimen\getvalue{\@@framed\c!kaderoffset}%
\setevalue{\@@framed\c!kaderoffset}{\the\scratchdimen}%
@@ -710,14 +712,27 @@
\doifvaluesomething{\@@framed\c!voorgrondletter}
{\@EA\doconvertfont\csname\@@framed\c!voorgrondletter\endcsname\empty}%
% beware, both the frame and background offset can be overruled
- \edef\localoffset{\getvalue{\@@framed\c!offset}}%
- \edef\localwidth{\getvalue{\@@framed\c!breedte}}%
- \edef\localheight{\getvalue{\@@framed\c!hoogte}}%
+ %
+ % the next macros are visible
+ \edef\localoffset{\getvalue{\@@framed\c!offset }}%
+ \edef\localwidth {\getvalue{\@@framed\c!breedte }}%
+ \edef\localheight{\getvalue{\@@framed\c!hoogte }}%
\edef\localformat{\getvalue{\@@framed\c!uitlijnen}}%
- \edef\localstrut{\getvalue{\@@framed\c!strut}}%
- \doifvaluesomething{\@@framed\c!lijndikte}
- {\ruledlinewidth\getvalue{\@@framed\c!lijndikte}\relax
- \ifinheritruledlinewidth\linewidth\ruledlinewidth\fi}%
+ \edef\localstrut {\getvalue{\@@framed\c!strut }}%
+ % these are not
+ \edef\@@localframing {\getvalue{\@@framed\c!kader }}%
+ \edef\@@locallocation{\getvalue{\@@framed\c!plaats}}%
+ %
+ \ifx\@@localframing\v!overlay % no frame, no offset, no framewidth
+ \linewidth\zeropoint
+ \let\localoffset\v!overlay
+ \else\ifx\@@localframing\v!geen % no frame, no framewidth
+ \linewidth\zeropoint
+ \else % \v!ja or \v!nee % if no frame then still framewidth
+ \doifvaluesomething{\@@framed\c!lijndikte}
+ {\ruledlinewidth\getvalue{\@@framed\c!lijndikte}\relax
+ \ifinheritruledlinewidth\linewidth\ruledlinewidth\fi}%
+ \fi\fi
\ifx\localformat\empty
\boxhasformatfalse
\else
@@ -747,7 +762,7 @@
\let\defaultframeoffset\localoffset
\fi
\@@localoffset\localoffset
- \advance\@@localoffset by \ruledlinewidth
+ \advance\@@localoffset \ruledlinewidth
\fi\fi
\ifx\localwidth\v!passend
\ifboxhasformat
@@ -829,9 +844,9 @@
\let\next\doformatboxNoSize
\fi
\fi
- \edef\framedwidth % a new feature
+ \edef\framedwidth % a new feature, visible fo ruser
{\ifdim\!!widtha >\zeropoint\the\!!widtha \else\zeropoint\fi}%
- \edef\framedheight% a new feature
+ \edef\framedheight% a new feature, visible fo ruser
{\ifdim\!!heighta>\zeropoint\the\!!heighta\else\zeropoint\fi}%
% first alternative
%\def\dowithframedbox%
@@ -879,10 +894,6 @@
\def\stoplocalframed%
{\dontshowcomposition
\ifboxhasformat
-% \doifelse{\localwidth}{\v!passend}
-% {\ifreshapeframebox\doreshapeframedbox\fi
-% \boxhaswidthfalse}%
-% {\resetshapeframebox}%
\ifx\localwidth\v!passend
\ifreshapeframebox\doreshapeframedbox\fi
\boxhaswidthfalse
@@ -916,12 +927,21 @@
\postprocessframebox\framebox
\fi
\edef\overlaylinecolor{\getvalue{\@@framed\c!kaderkleur}}%
- \edef\overlaylinewidth{\the\ruledlinewidth}%
- \doifnotvalue {\@@framed\c!kader }\v!overlay\doframedbox
+ \edef\overlaylinewidth{\the\ruledlinewidth}% \@@...
+ \ifx\@@localframing\v!overlay
+ % rather tight, not even linewidth as offset, can be
+ % used with offset=0pt and auto strut
+ \else\ifx\@@localframing\v!geen
+ % idem
+ \else
+ \doframedbox
+ \fi\fi
\doifvaluesomething{\@@framed\c!achtergrond}\dobackedbox
- \doifelsevalue{\@@framed\c!plaats}\v!laag
- {\doinlineframedbox}
- {\doifvalue{\@@framed\c!plaats}\v!diepte\doloweredframedbox}%
+ \ifx\@@locallocation\v!laag
+ \doinlineframedbox
+ \else\ifx\@@locallocation\v!diepte
+ \doloweredframedbox
+ \fi\fi
\box\framebox
\egroup
\egroup}
@@ -2340,6 +2360,9 @@
%D because we have to handle an optional identifier (and
%D because these commands evolved out of a single case).
+\def\framedtextparameter#1#2%
+ {\csname\??kd#1#2\endcsname}
+
\def\dosetupframedtexts[#1][#2]%
{\ifsecondargument
\def\docommando##1{\getparameters[\??kd##1][#2]}%
@@ -2415,9 +2438,44 @@
% \dostartattributes{\??kd#1}\c!letter\c!kleur{}%
% \def\dostopframedtext{\dodostopframedtext{#1}{#2}}}
+% \def\dododostartframedtext[#1][#2][#3]%
+% {\processaction
+% [#2]
+% [ \v!links=>\letvalue{\??kd#1\c!links }\relax
+% \letvalue{\??kd#1\c!rechts}\hfill,
+% \v!rechts=>\letvalue{\??kd#1\c!links }\hfill
+% \letvalue{\??kd#1\c!rechts}\relax,
+% \v!midden=>\letvalue{\??kd#1\c!links }\hfill
+% \letvalue{\??kd#1\c!rechts}\hfill,
+% \v!geen=>\letvalue{\??kd#1\c!links }\relax % new
+% \letvalue{\??kd#1\c!rechts}\relax]% new
+% % removed 06/2001
+% % \forgetparindent
+% % added 06/2001 [see demo-bbv]
+% \localhsize\hsize \checkframedtext
+% % so far
+% \setbox\framebox=\vbox
+% \startboxedcontent
+% \hsize\localhsize
+% % \insidefloattrue % ? better
+% \expanded{\switchtobodyfont[\getvalue{\??kd#1\c!korps}]}%
+% \startcolor[\getvalue{\??kd#1\c!kleur}]%
+% \localframed[\??kd#1][\c!strut=\v!nee,#3]%
+% \bgroup
+% \let\\=\endgraf
+% \getvalue{\??kd#1\c!binnen}%
+% \doifvalue{\??kd#1\c!dieptecorrectie}{\v!aan} % new, inside box
+% {\bgroup
+% \vbox{\strut}
+% \vskip-\lineheight}%
+% \blanko[\v!blokkeer]% plaatst signal
+% \doconvertfont{\getvalue{\??kd#1\c!letter}}{}%
+% \def\dostopframedtext{\dodostopframedtext{#1}{#2}}}
+
\def\dododostartframedtext[#1][#2][#3]%
- {\processaction
- [#2]
+ {\doifsomething{#2}{\setvalue{\??kd#1\c!plaats}{#2}}%
+ \processaction % \v!laag en \v!diepte are already taken !
+ [\getvalue{\??kd#1\c!plaats}]
[ \v!links=>\letvalue{\??kd#1\c!links }\relax
\letvalue{\??kd#1\c!rechts}\hfill,
\v!rechts=>\letvalue{\??kd#1\c!links }\hfill
@@ -2426,6 +2484,7 @@
\letvalue{\??kd#1\c!rechts}\hfill,
\v!geen=>\letvalue{\??kd#1\c!links }\relax % new
\letvalue{\??kd#1\c!rechts}\relax]% new
+ \letvalue{\??kd#1\c!plaats}\empty
% removed 06/2001
% \forgetparindent
% added 06/2001 [see demo-bbv]
@@ -2990,19 +3049,18 @@
%D \egroup
%D \macros
-%D {copyright, registered}
+%D {encircled}
%D
%D Some not so robust left||overs (borrowed from Knuth,
%D \TEX Book\ page 356):
-\def\omcirkeld#1%
+\def\encircled#1%
{{\ooalign{\hfil\raise0.07ex\hbox{{\tx#1}}\hfil\crcr\mathhexbox20D}}}
-\def\copyright%
- {\omcirkeld{C}}
+\let\omcirkeld\encircled
-\def\registered%
- {\omcirkeld{R}}
+% \def\copyright {\encircled{C}}
+% \def\registered{\encircled{R}}
% \setuprules
% [\c!dikte=\v!middel]
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index 26085ce06..03006bb13 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -66,8 +66,27 @@
% from now on, internaly numbers are separated by a period
% and postprocessed on demand
-\def\numberseparator{.} % reasonable default
+\def\numberseparator {.} % reasonable default
+\def\sectionseparator{:} % was : but is now -
+\def\@@filterfirstpart [#1::#2]{#1}
+\def\@@filtersecondpart [#1::#2]{#2}
+
+\def\@@filterblockpart [#1::#2::#3]{#1}
+\def\@@filternumberpart [#1::#2::#3]{#2}
+\def\@@filterpagepart [#1::#2::#3]{#3}
+\def\@@filterblocknumberpart[#1::#2::#3]{#1::#2}
+
+\def\@@filterheadpart[#1]{\@EA\@@dofilterheadpart\@EA[#1:0]}
+\def\@@filtertailpart[#1]{\@EA\@@dofiltertailpart\@EA[#1:0]}
+
+\def\@@dofilterheadpart[#1:#2]{#1}
+\def\@@dofiltertailpart[#1:#2]{#2}
+
+\def\@@filterlevelpart[#1::#2::#3]{\@@dofilterlevelpart[#2:0:0:0:0]}
+
+\def\@@dofilterlevelpart[#1:0:0:0:#2]{#1}
+
\def\gobbleuntilrelax#1\relax{}
\def\separatednumber #1{\doseparatednumber #1.\empty\relax}
@@ -365,11 +384,20 @@
% \donexttracklevel{#1}}%
% {\fastresetmarker[\hoofdmarkering{#1}]}} % redundant \hoofdmarkering
+% \def\doresetsectionmarks#1%
+% {\ifundefined{\??se#1\c!markering}\else % skip zero level
+% \fastresetmarkerlist[\csname\??se#1\c!markering\endcsname]%
+% \fi
+% \donexttracklevel{#1}}
+%
+% not sure if the next one is better:
+
\def\doresetsectionmarks#1%
- {\ifundefined{\??se#1\c!markering}\else % skip zero level
+ {\ifundefined{\??se#1\c!markering} % skip zero level
+ \donexttracklevel{#1}%
+ \else
\fastresetmarkerlist[\csname\??se#1\c!markering\endcsname]%
- \fi
- \donexttracklevel{#1}}
+ \fi}
\def\resetsectionmarks#1%
{\ifundefined{\??se#1}%
@@ -402,9 +430,10 @@
% evt ook level gaan opslaan tbv snelle selectie
-\def\makesectionformat%
- {\@EA\edef\@EA\sectionformat\@EA%
- {\@@sectiontype:\getvalue{\lastsection\s!format}}}
+\def\makesectionformat
+ {\edef\sectionformat
+ {\@@sectiontype\sectionseparator
+ \csname\lastsection\s!format\endcsname}}
\def\dobacktracklevel#1%
{\doifnot{\previoussection{#1}}\zerosection
@@ -641,8 +670,8 @@
\def\somesavedlevel{0}
-\def\dosavesomelevel[#1:0:0:0:#2]%
- {\def\somesavedlevel{:#1}}
+% \def\dosavesomelevel[#1:0:0:0:#2]%
+% {\def\somesavedlevel{:#1}}
% \def\doifnextlevelelse[#1::#2]%
% {\dosavesomelevel[#2:0:0:0:0]%
@@ -678,17 +707,55 @@
%
% again faster:
-\def\doifnextlevelelse[#1::#2]% beware: this one is \let
- {\dosavesomelevel[#2:0:0:0:0]%
+% \def\doifnextlevelelse[#1::#2]% beware: this one is \let
+% {\dosavesomelevel[#2:0:0:0:0]%
+% \ifalllevels
+% \donetrue
+% \else\ifnum\@@sectiontype=#1
+% \def\levelstring{=:#2:}%
+% \doifincsnameelse{=\currentlevel:}\levelstring
+% {\doifincsnameelse{=\currentlevel:0}\levelstring\donefalse\donetrue}
+% \donefalse
+% \else
+% \donefalse
+% \fi\fi
+% \ifdone
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+%
+%\def\doifprevlevelelse[#1::#2]% beware: this one is \let
+% {\dosavesomelevel[#2:0:0:0:0]%
+% \ifalllevels
+% \donetrue
+% \else\ifnum\@@sectiontype=#1
+% \doifinstringelse{=\currentlevel:}{=:#2:}\donetrue\donefalse
+% \else
+% \donefalse
+% \fi\fi
+% \ifdone
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+%
+% \let\doiftoclevelelse\doifnextlevelelse
+% \let\doifreglevelelse\doifprevlevelelse
+% \let\doifblklevelelse\doifprevlevelelse
+%
+% we want to be able to overload them globally
+
+\def\doifnextlevelelse[#1]% !! this one is \let / uti seperator --
+ {\edef\somesavedlevel{\sectionseparator\@@filterlevelpart[#1]}%
\ifalllevels
\donetrue
- \else\ifnum\@@sectiontype=#1
-% \doifinstringelse{=\currentlevel:}{=:#2:}
-% {\doifinstringelse{=\currentlevel:0}{=:#2:}\donefalse\donetrue}
-% \donefalse
- \def\levelstring{=:#2:}%
- \doifincsnameelse{=\currentlevel:}\levelstring
- {\doifincsnameelse{=\currentlevel:0}\levelstring\donefalse\donetrue}
+ \else\ifnum\@@sectiontype=\@@filterblockpart[#1]\relax
+ \edef\levelstring{=\sectionseparator\@@filternumberpart[#1]\sectionseparator}%
+ \doifincsnameelse{=\currentlevel\sectionseparator}\levelstring
+ {\doifincsnameelse{=\currentlevel\sectionseparator0}\levelstring
+ \donefalse
+ \donetrue}
\donefalse
\else
\donefalse
@@ -699,12 +766,15 @@
\expandafter\secondoftwoarguments
\fi}
-\def\doifprevlevelelse[#1::#2]% beware: this one is \let
- {\dosavesomelevel[#2:0:0:0:0]%
+\def\doifprevlevelelse[#1]% !! this one is \let / uti seperator --
+ {\edef\somesavedlevel{\sectionseparator\@@filterlevelpart[#1]}%
\ifalllevels
\donetrue
- \else\ifnum\@@sectiontype=#1
- \doifinstringelse{=\currentlevel:}{=:#2:}\donetrue\donefalse
+ \else\ifnum\@@sectiontype=\@@filterblockpart[#1]\relax
+ \doifinstringelse
+ {=\currentlevel\sectionseparator}
+ {=\sectionseparator\@@filternumberpart[#1]\sectionseparator}
+ \donetrue\donefalse
\else
\donefalse
\fi\fi
@@ -714,21 +784,18 @@
\expandafter\secondoftwoarguments
\fi}
-% \def\doiftoclevelelse{\doifnextlevelelse}
-% \def\doifreglevelelse{\doifprevlevelelse}
-% \def\doifblklevelelse{\doifprevlevelelse}
-
-\let\doiftoclevelelse\doifnextlevelelse
-\let\doifreglevelelse\doifprevlevelelse
-\let\doifblklevelelse\doifprevlevelelse
+\def\doiftoclevelelse{\doifnextlevelelse}
+\def\doifreglevelelse{\doifprevlevelelse}
+\def\doifblklevelelse{\doifprevlevelelse}
\def\@@longformatnumber#1%
- {\getvalue{\previoussection{#1}\s!format}:\@@shortsectionnumber{#1}}
+ {\csname\previoussection{#1}\s!format\endcsname
+ \sectionseparator
+ \@@shortsectionnumber{#1}}
\def\@@longsectionnumber#1%
{\ifnum\countervalue{\??se\previoussection{#1}}>0
- %\getvalue{\previoussection{#1}\c!nummer}\@@koscheider
- \getvalue{\previoussection{#1}\c!nummer}.%
+ \csname\previoussection{#1}\c!nummer\endcsname.%
\fi
\@@shortsectionnumber{#1}}
@@ -752,10 +819,10 @@
\@@sectionconversion{#1}{\@@sectionvalue{#1}}%
\fi}
-\def\dosetlocalsectieblok#1#2#3%
- {\def\@@sectiontype{#1}%
- \def\@@sectieblok{#2}%
- \def\@@sectieblokken{#3}}
+\def\dosetlocalsectieblok#1#2#3% new \edef's
+ {\edef\@@sectiontype {#1}%
+ \edef\@@sectieblok {#2}%
+ \edef\@@sectieblokken{#3}}
\def\doaroundsectieblok#1%
{\doifvaluesomething{\??sb#1\c!pagina}
@@ -984,24 +1051,35 @@
\fi
\fi}
-\def\findsectionnumber#1#2#3% class file title
+\def\findsectionnumber#1#2#3% class file title / uti seperator --
{\begingroup
\setsectieenkoppeling{#1}%
\xdef\foundsectionnumber{1}%
\def\dolijstelement##1##2##3##4##5##6%
{\doif{##1}{#1}
{\ConvertConstantAfter\doif{##4}{#3}
- {\global\utilitydonetrue
+ {\wait
+ \global\utilitydonetrue
\scratchcounter=0\getvalue{\??se\@@sectie\c!niveau}%
- \advance\scratchcounter by 2
- \def\do####1:####2]%
- {\advance\scratchcounter by -1
+ %
+ %\advance\scratchcounter 2
+ %\@EA\def\@EA\do\@EA####\@EA1\sectionseparator####2]%
+ % {\advance\scratchcounter -1
+ % \ifcase\scratchcounter
+ % \xdef\foundsectionnumber{####1}%
+ % \else
+ % \do####2]%
+ % \fi}%
+ %\do##5]}}}%
+ %
+ \def\do####1\relax % :/- clean
+ {\advance\scratchcounter -1
\ifcase\scratchcounter
- \xdef\foundsectionnumber{####1}%
+ \xdef\foundsectionnumber{\@@filterheadpart[####1]}%
\else
- \do####2]%
+ \@EAEAEA\do\@@filtertailpart[####1]\relax
\fi}%
- \do##5]}}}%
+ \@EA\do\@@filternumberpart[##5]\relax}}}%
\setbox0=\vbox
{\doutilities{#1}{#2}{#1}{}{}}%
\endgroup
@@ -1364,6 +1442,112 @@
% todo: kap
+% \def\doplaatskoptekst#1#2#3#4%
+% {\beginheadplacement{#1}%
+% \iflegekop
+% \setbox0\ifvertical\vbox\else\hbox\fi to \zeropoint
+% {\headnumbercontentfalse
+% \resetsystemmode\v!sectienummer
+% #2}%
+% \makestrutofbox0
+% \else
+% \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox
+% {\headnumbercontentfalse
+% \resetsystemmode\v!sectienummer
+% \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}%
+% \ifdisplaysectionhead
+% \getvalue{\??ko#1\c!tekstcommando}%
+% {\setstrut\begstrut#3\endstrut}%
+% \xdef\localheaddepth{\the\dp\strutbox}%
+% \else
+% \getvalue{\??ko#1\c!tekstcommando}{#3}%
+% \fi
+% \getvalue{\??ko#1\c!nacommando}%
+% \ifdisplaysectionhead\endgraf\fi}}}}%
+% \fi
+% \endheadplacement{#1}{#4}}
+%
+% \def\doplaatskopnummertekst#1#2#3#4#5%
+% {\beginheadplacement{#1}%
+% \iflegekop
+% \setbox0\ifvertical\vbox\else\hbox\fi to \zeropoint
+% {\doiftextelse{#3}
+% {\setsystemmode \v!sectienummer\headnumbercontenttrue }
+% {\resetsystemmode\v!sectienummer\headnumbercontentfalse}%
+% #2}%
+% \makestrutofbox0
+% \else
+% \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox
+% {\doiftextelse{#3}
+% {\setsystemmode \v!sectienummer\headnumbercontenttrue }
+% {\resetsystemmode\v!sectienummer\headnumbercontentfalse}%
+% \getvalue{\??ko#1\c!commando}%
+% {\doattributes{\??ko#1}\c!letter\c!kleur
+% {\doattributes{\??ko#1}\c!nummerletter\c!nummerkleur
+% {\getvalue{\??ko#1\c!voorcommando}%
+% \ifdisplaysectionhead
+% \getvalue{\??ko#1\c!nummercommando}%
+% {\setstrut\begstrut#3\endstrut}%
+% \else
+% \getvalue{\??ko#1\c!nummercommando}{#3}%
+% \fi}}}
+% {\doattributes{\??ko#1}\c!letter\c!kleur
+% {\doattributes{\??ko#1}\c!tekstletter\c!tekstkleur
+% {\dontconvertfont
+% \ifdisplaysectionhead
+% \stelinterliniein
+% \else
+% \stelspatieringin
+% \fi
+% #2%
+% \ifdisplaysectionhead
+% \getvalue{\??ko#1\c!tekstcommando}%
+% {\setstrut\begstrut#4\endstrut}%
+% \xdef\localheaddepth{\the\dp\strutbox}%
+% \else
+% \getvalue{\??ko#1\c!tekstcommando}{#4}%
+% \fi
+% \getvalue{\??ko#1\c!nacommando}%
+% \ifdisplaysectionhead\endgraf\fi}}}}%
+% \fi
+% \endheadplacement{#1}{#5}}
+
+% to be documented: \placeheadtext \placeheadnumber
+
+\unexpanded\def\placeheadtext
+ {\doquintupleempty\doplaceheadtextornumber
+ [\c!tekstletter][\c!tekstkleur][\empty]}
+
+\unexpanded\def\placeheadnumber
+ {\doquintupleempty\doplaceheadtextornumber
+ [\c!nummerletter][\c!nummerkleur][\v!nummer]}
+
+\def\doplaceheadtextornumber[#1][#2][#3][#4][#5]%
+ {\bgroup
+ \edef\@@sectie{\??ko\iffifthargument#5\else#4\fi}%
+ \dostartattributes\@@sectie\c!letter\c!kleur\empty
+ \dontconvertfont
+ \dostartattributes\@@sectie#1#2\empty
+ \stelinterliniein % \setupinterlinespace
+ \begstrut\getmarking[\hoofdmarkering{#4#3}]\endstrut
+ \endgraf
+ \dostopattributes
+ \dostopattributes
+ \egroup}
+
\def\doplaatskoptekst#1#2#3#4%
{\beginheadplacement{#1}%
\iflegekop
@@ -1376,29 +1560,32 @@
\setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox
{\headnumbercontentfalse
\resetsystemmode\v!sectienummer
- \getvalue{\??ko#1\c!commando}
+ % outerside font determines distance
+ \dosetfontattribute{\??ko#1}\c!letter
+ % but we don't want color to influence user commands
+ \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}%
- \ifdisplaysectionhead
- \getvalue{\??ko#1\c!tekstcommando}%
- {\setstrut\begstrut#3\endstrut}%
- \xdef\localheaddepth{\the\dp\strutbox}%
- \else
- \getvalue{\??ko#1\c!tekstcommando}{#3}%
- \fi
- \getvalue{\??ko#1\c!nacommando}%
- \ifdisplaysectionhead\endgraf\fi}}}}%
+ {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty
+ \dostartattributes{\??ko#1}\c!tekstletter\c!tekstkleur\empty
+ \dontconvertfont
+ \ifdisplaysectionhead
+ \stelinterliniein
+ \else
+ \stelspatieringin
+ \fi
+ #2%
+ \getvalue{\??ko#1\c!voorcommando}%
+ \ifdisplaysectionhead
+ \getvalue{\??ko#1\c!tekstcommando}%
+ {\setstrut\begstrut#3\endstrut}%
+ \xdef\localheaddepth{\the\dp\strutbox}%
+ \else
+ \getvalue{\??ko#1\c!tekstcommando}{#3}%
+ \fi
+ \getvalue{\??ko#1\c!nacommando}%
+ \ifdisplaysectionhead\endgraf\fi
+ \dostopattributes
+ \dostopattributes}}%
\fi
\endheadplacement{#1}{#4}}
@@ -1416,34 +1603,41 @@
{\doiftextelse{#3}
{\setsystemmode \v!sectienummer\headnumbercontenttrue }
{\resetsystemmode\v!sectienummer\headnumbercontentfalse}%
+ % outerside font determines distance
+ \dosetfontattribute{\??ko#1}\c!letter
+ % but we don't want color to influence user commands
\getvalue{\??ko#1\c!commando}%
- {\doattributes{\??ko#1}\c!letter\c!kleur
- {\doattributes{\??ko#1}\c!nummerletter\c!nummerkleur
- {\getvalue{\??ko#1\c!voorcommando}%
- \ifdisplaysectionhead
- \getvalue{\??ko#1\c!nummercommando}%
- {\setstrut\begstrut#3\endstrut}%
- \else
- \getvalue{\??ko#1\c!nummercommando}{#3}%
- \fi}}}
- {\doattributes{\??ko#1}\c!letter\c!kleur
- {\doattributes{\??ko#1}\c!tekstletter\c!tekstkleur
- {\dontconvertfont
- \ifdisplaysectionhead
- \stelinterliniein
- \else
- \stelspatieringin
- \fi
- #2%
- \ifdisplaysectionhead
- \getvalue{\??ko#1\c!tekstcommando}%
- {\setstrut\begstrut#4\endstrut}%
- \xdef\localheaddepth{\the\dp\strutbox}%
- \else
- \getvalue{\??ko#1\c!tekstcommando}{#4}%
- \fi
- \getvalue{\??ko#1\c!nacommando}%
- \ifdisplaysectionhead\endgraf\fi}}}}%
+ {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty
+ \dostartattributes{\??ko#1}\c!nummerletter\c!nummerkleur\empty
+ \getvalue{\??ko#1\c!voorcommando}%
+ \ifdisplaysectionhead
+ \getvalue{\??ko#1\c!nummercommando}%
+ {\setstrut\begstrut#3\endstrut}%
+ \else
+ \getvalue{\??ko#1\c!nummercommando}{#3}%
+ \fi
+ \dostopattributes
+ \dostopattributes}
+ {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty
+ \dostartattributes{\??ko#1}\c!tekstletter\c!tekstkleur\empty
+ \dontconvertfont
+ \ifdisplaysectionhead
+ \stelinterliniein
+ \else
+ \stelspatieringin
+ \fi
+ #2%
+ \ifdisplaysectionhead
+ \getvalue{\??ko#1\c!tekstcommando}%
+ {\setstrut\begstrut#4\endstrut}%
+ \xdef\localheaddepth{\the\dp\strutbox}%
+ \else
+ \getvalue{\??ko#1\c!tekstcommando}{#4}%
+ \fi
+ \getvalue{\??ko#1\c!nacommando}%
+ \ifdisplaysectionhead\endgraf\fi
+ \dostopattributes
+ \dostopattributes}}%
\fi
\endheadplacement{#1}{#5}}
@@ -1523,14 +1717,14 @@
\else
\hbox{\box0}%
\fi}%
- \doflushfootnotes % new, not really needed
+ \doflushnotes % new, not really needed
\endgraf
\nointerlineskip
\dosomebreak\nobreak
#2%
\else
\strut
- \doflushfootnotes % new, here since we're in par mode
+ \doflushnotes % new, here since we're in par mode
\iflocation
\ifautocrossdocument
\hhboxindent=\ifcontinuoushead\headlastlinewidth\else\zeropoint\fi
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index 1b6f51f4e..a4e111f06 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -28,7 +28,7 @@
\appendtoks \simplestelinspringenin \to \everybodyfont
\appendtoks \simplestelblankoin \to \everybodyfont
\appendtoks \simplestelwitruimtein \to \everybodyfont
-%appendtoks \setupfootnotes \to \everybodyfont % not
+%appendtoks \checknotes \to \everybodyfont % not
\appendtoks \simplestelspatieringin \to \everybodyfont % nieuw
\appendtoks \setdisplayskips \to \everybodyfont % nieuw
@@ -340,7 +340,7 @@
% \presetindentation}
%
% \def\complexdodoblanko[#1]%
-% {\flushfootnotes
+% {\flushnotes
% \ifopelkaar
% \ifinpagebody
% \expanded{\docomplexdoblanko[#1]}% \expanded=nieuw
@@ -497,7 +497,7 @@
{\relax\complexorsimple\doblanko}
\def\complexdoblanko
- {\flushfootnotes
+ {\flushnotes
\ifmmode
\let\next\nocomplexdoblanko
\else
@@ -737,9 +737,8 @@
\newif\ifindentfirstparagraph % \indentfirstparagraphtrue
-\def\presetindentation%
- {\doifoutervmode
- {\ifindentfirstparagraph\else\noindentation\fi}}
+\def\presetindentation
+ {\doifoutervmode{\ifindentfirstparagraph\else\noindentation\fi}}
\definecomplexorsimple\stelinspringenin
@@ -754,7 +753,7 @@
\def\simplestelinspringenin
{\assigndimension{\currentvoorwit}{\voorwit}{1em}{1.5em}{2em}%
- \parindent=\voorwit\relax}
+ \parindent\voorwit\relax}
\def\doinspringen[#1]% too many relaxes
{\processallactionsinset
@@ -1954,6 +1953,8 @@
{\doglobalstopcolor
\endgroup}
+\endETEX
+
%D Bonus macro, see core-sec.tex
\beginTEX
@@ -1977,6 +1978,8 @@
%D Since this happens a lot, and sometimes large arguments
%D are passed in \type {#4}, we just copy some code:
+\beginETEX \ifcsname
+
\unexpanded\def\doattributes#1#2#3#4%
{\begingroup % geen \bgroup, anders in mathmode lege \hbox
\ifincolor
@@ -2560,17 +2563,35 @@
\unexpanded\def\hspace
{\dodoubleempty\dohspace}
+%\def\dohspace[#1][#2]%
+% {\ifhmode
+% \removeunwantedspaces
+% \hskip
+% \ifsecondargument
+% \hspaceamount{#1}{#2}%
+% \else
+% \hspaceamount\empty{\iffirstargument#1\else\s!default\fi}%
+% \fi
+% \expandafter\ignorespaces
+% \fi}
+
\def\dohspace[#1][#2]%
+ {\ifsecondargument
+ \dodohspace[#1][#2]%
+ \else\iffirstargument
+ \hspace[][#1]%
+ \else
+ \hspace[][\s!default]%
+ \fi\fi}
+
+\def\dodohspace[#1][#2#3]%
{\ifhmode
\removeunwantedspaces
- \hskip
- \ifsecondargument
- \hspaceamount{#1}{#2}%
- \else
- \hspaceamount\empty{\iffirstargument#1\else\s!default\fi}%
- \fi
+ \doifelse{#2}{-}
+ {{\scratchskip\hspaceamount{#1}{#3}\hskip-\scratchskip}}
+ {\hskip\hspaceamount{#1}{#2#3}}%
\expandafter\ignorespaces
- \fi}
+ \fi}
\def\hspaceamount#1#2%
{\executeifdefined{\??hs#1:#2}{\executeifdefined{\??hs:#2}\zeropoint}}
@@ -2583,6 +2604,28 @@
\definehspace [\v!groot] [1\emspaceamount]
\definehspace [\v!normaal] [1\spaceamount]
\definehspace [\v!default] [\spaceamount]
+
+%D Taken from Taco's math module (cq. \AMS\ macros), but
+%D adapted to \type {\hspace}:
+
+\unexpanded\def\textormathspace#1#2#3%
+ {\ifmmode\mskip#1#2\else\kern#1\hspaceamount\empty{#3}\fi\relax}
+
+\def\thinspace {\textormathspace+\thinmuskip 1}
+\def\medspace {\textormathspace+\medmuskip 2}
+\def\thickspace {\textormathspace+\thickmuskip3}
+\def\negthinspace {\textormathspace-\thinmuskip 1}
+\def\negmedspace {\textormathspace-\medmuskip 2}
+\def\negthickspace{\textormathspace-\thickmuskip3}
+
+\let \, \thinspace
+\let \: \medspace
+\let \; \thickspace
+\let \! \negthinspace
+
+\definehspace[1][.1667em]
+\definehspace[2][.2222em]
+\definehspace[3][.2777em]
% Very nasty but needed for margin stuff inside colored
% paragraphs.
diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex
index 383f9d8d5..978d2fc68 100644
--- a/tex/context/base/core-tab.tex
+++ b/tex/context/base/core-tab.tex
@@ -1131,7 +1131,7 @@
{\bgroup
\ifinsidefloat\else
\baselinecorrection
- \flushfootnotes
+ \flushnotes
\topbaselinecorrection
\fi
\forgetall
@@ -1144,7 +1144,7 @@
{\TABLEtail
\finishTABLE
\ifinsidefloat\else
- \flushfootnotes
+ \flushnotes
\botbaselinecorrection
\fi
\egroup}
diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex
index 3988e1ff9..25e05b560 100644
--- a/tex/context/base/core-uti.tex
+++ b/tex/context/base/core-uti.tex
@@ -46,15 +46,33 @@
\newif\ifutilitydone
\def\@@utilityerrormessage%
- {\showmessage{\m!systems}{8}{}%
- \global\let\@@utilityerrormessage=\relax}
+ {\showmessage\m!systems{8}{}%
+ \global\let\@@utilityerrormessage\relax}
\def\thisisutilityversion#1%
- {\doifnot{\utilityversion}{#1}%
+ {\doifelse\utilityversion{#1}%
+ {\checksectionseparator}
{\@@utilityerrormessage
\resetutilities
\endinput}}
+\def\checksectionseparator % catches backward compatibility conflict
+ {\doifnot\sectionseparator:\endinput}
+
+\def\thisissectionseparator#1%
+ {\bgroup
+ \global\let\checksectionseparator\relax
+ \convertcommand \sectionseparator\to\asciiA
+ \convertargument #1\to\asciiB
+ \ifx\asciiA\asciiB
+ \egroup
+ \else
+ \egroup
+ % todo \@@utilityerrormessage
+ \resetutilities
+ \endinput
+ \fi}
+
\def\writeutility%
{\write\uti}
@@ -67,9 +85,14 @@
\def\immediatewriteutilitycommand#1%
{\immediate\write\uti{c \string#1}}
-\def\openutilities%
+%\def\openutilities%
+% {\immediate\openout\uti=\jobname.\f!inputextension
+% \immediatewriteutilitycommand{\thisisutilityversion{\utilityversion}}}
+
+\def\openutilities
{\immediate\openout\uti=\jobname.\f!inputextension
- \immediatewriteutilitycommand{\thisisutilityversion{\utilityversion}}}
+ \immediatewriteutilitycommand{\thisissectionseparator{\sectionseparator}}%
+ \immediatewriteutilitycommand{\thisisutilityversion {\utilityversion}}}
\def\closeutilities%
{%\savenofsubpages
@@ -80,6 +103,10 @@
\let\immediatewriteutilitycommand\gobbleoneargument
\let\immediatewriteutility\gobbleoneargument}
+\def\reopenutilities
+ {\immediate\closeout\uti
+ \openutilities}
+
\def\abortutilitygeneration%
{\immediatewriteutilitycommand{\utilitygenerationaborted}%
\immediatewriteutility{q {quit}}}
@@ -328,11 +355,14 @@
\def\doloadtwopassdata#1%
{\doifundefined{#1:\s!list}
- {\global\letvalue{#1:\s!list}\empty
+ {\startnointerference
+ \global\letvalue{#1:\s!list}\empty
+ \protectlabels
\doutilities{#1\s!pass}{\jobname}{}{}{}%
\ifx\twopassdata\empty\else
\appendtwopasselement{#1}{0}\twopassdata
- \fi}}
+ \fi
+ \stopnointerference}}
\def\loadtwopassdata%
{\ifx\alltwopasslists\empty\else
diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex
index 9974060ae..d8105611f 100644
--- a/tex/context/base/core-var.tex
+++ b/tex/context/base/core-var.tex
@@ -42,6 +42,13 @@
\def\cleanupfeatures{\the\everycleanupfeatures}
+%D \macros
+%D {ifprocessingXML}
+%D
+%D We need this one even if no \XML\ is supported.
+
+\newif\ifprocessingXML
+
%D \macros
%D {ifproductionrun}
%D
diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex
index 758126593..8d41449c7 100644
--- a/tex/context/base/enco-ans.tex
+++ b/tex/context/base/enco-ans.tex
@@ -1,11 +1,11 @@
%D \module
%D [ file=enco-ans,
-%D version=1995.1.1,
+%D version=2000.5.7, % 1995.1.1,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=\YandY\ texnansi Encoding,
-%D author=Hans Hagen,
+%D author={Patrick Gundlach, Hans Hagen},
%D date=\currentdate,
-%D copyright=Hans Hagen]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
@@ -47,117 +47,178 @@
\definecasemap 241 241 209 \definecasemap 209 241 209
\definecasemap 245 245 213 \definecasemap 213 245 213
-% texnansx
-
-%\definecasemap 26 26 29 \definecasemap 29 26 29
-%\definecasemap 27 27 30 \definecasemap 30 27 30
-%\definecasemap 28 28 31 \definecasemap 31 28 31
-
\stopmapping
\startencoding[texnansi]
-\definecharacter textdotaccent 5
-\definecharacter texthungarumlaut 6
-\definecharacter textmacron 175
-\definecharacter textcedilla 184
-
-\definecharacter textunderscore 95
-
-\definecharacter dotlessi 16 % 105
-
-\definecharacter Lstroke 128
-
-\definecharacter Scaron 138
-
-\definecharacter OEligature 140
-\definecharacter Zcaron 141
-
-\definecharacter lstroke 144
-
-\definecharacter scaron 154
-
-\definecharacter oeligature 156
-\definecharacter zcaron 157
-
-\definecharacter Ydiaeresis 159
-
-\definecharacter Agrave 192
-\definecharacter Aacute 193
-\definecharacter Acircumflex 194
-\definecharacter Atilde 195
-\definecharacter Adiaeresis 196
-\definecharacter Aring 197
-\definecharacter AEligature 198
-\definecharacter cCedile 199
-\definecharacter Egrave 200
-\definecharacter Eacute 201
-\definecharacter Ecircumflex 202
-\definecharacter Ediaeresis 203
-\definecharacter Igrave 204
-\definecharacter Iacute 205
-\definecharacter Icircumflex 206
-\definecharacter Idiaeresis 207
-
-\definecharacter Ntilde 209
-\definecharacter Ograve 210
-\definecharacter Oacute 211
-\definecharacter Ocircumflex 212
-\definecharacter Otilde 213
-\definecharacter Odiaeresis 214
-
-\definecharacter Ostoke 216
-\definecharacter Ugrave 217
-\definecharacter Uacute 218
-\definecharacter Ucircumflex 219
-\definecharacter Udiaeresis 220
-\definecharacter Yacute 221
-\definecharacter Thorn 222
-\definecharacter ssharp 223
-\definecharacter agrave 224
-\definecharacter aacute 225
-\definecharacter acircumflex 226
-\definecharacter atilde 227
-\definecharacter adiaeresis 228
-\definecharacter aring 229
-\definecharacter aeligature 230
-\definecharacter ccedile 231
-\definecharacter egrave 232
-\definecharacter eacute 233
-\definecharacter ecircumflex 234
-\definecharacter ediaeresis 235
-\definecharacter igrave 236
-\definecharacter iacute 237
-\definecharacter icircumflex 238
-\definecharacter idiaeresis 239
-
-\definecharacter ntilde 241
-\definecharacter ograve 242
-\definecharacter oacute 243
-\definecharacter ocircumflex 244
-\definecharacter otilde 245
-\definecharacter odiaeresis 246
-
-\definecharacter ostroke 248
-\definecharacter ugrave 249
-\definecharacter uacute 250
-\definecharacter ucircumflex 251
-\definecharacter udiaeresis 252
-\definecharacter yacute 253
-\definecharacter thorn 254
-\definecharacter ydiaeresis 255
-
-% texnansx
-
-%\definecharacter aeligature 26
-%\definecharacter oeligature 27
-%\definecharacter ostroke 28
-%
-%\definecharacter AEligature 29
-%\definecharacter OEligature 30
-%\definecharacter Ostroke 31
-%
-%\definecharacter ssharp 25
+\definecharacter textacute 19
+\definecharacter textbreve 21
+\definecharacter textcaron 20
+\definecharacter textcedilla 184
+\definecharacter textcircumflex 94 % 136
+\definecharacter textdiaeresis 168
+\definecharacter textdotaccent 5
+\definecharacter textgrave 18
+\definecharacter texthungarumlaut 6
+\definecharacter textmacron 175
+\definecharacter textogonek 7
+\definecharacter textring 23
+\definecharacter texttilde 152
+
+\definecharacter dotlessi 16 % 105
+\definecharacter dotlessj 17
+
+\definecharacter endash 150 % lig
+\definecharacter emdash 151 % lig
+
+\definecharacter aeligature 230
+\definecharacter AEligature 198
+\definecharacter oeligature 156
+\definecharacter OEligature 140
+
+\definecharacter ssharp 223
+
+\definecharacter thorn 254
+\definecharacter Thorn 222
+
+\definecharacter exclamdown 161
+\definecharacter questiondown 191
+
+\definecharacter copyright 169
+\definecharacter registered 174
+\definecharacter trademark 153
+
+\definecharacter sectionmark 167
+\definecharacter paragraphmark 182
+
+\definecharacter onequarter 188
+\definecharacter onehalf 189
+\definecharacter threequarter 190
+
+\definecharacter onesuperior 185
+\definecharacter twosuperior 178
+\definecharacter threesuperior 179
+
+\definecharacter textcent 162 % ?
+\definecharacter textcurrency 164
+\definecharacter texteuro 1
+\definecharacter textflorin 131
+\definecharacter textsterling 163
+\definecharacter textyen 165
+
+\definecharacter percent 37
+\definecharacter perthousand 137
+
+\definecharacter softhyphen 45
+\definecharacter periodcentered 183
+
+\definecharacter textasciicircum 142
+\definecharacter textasciitilde 158
+\definecharacter textbackslash 92
+\definecharacter textbraceleft 123
+\definecharacter textbraceright 125
+\definecharacter textunderscore 95
+
+\definecharacter textbrokenbar 166
+\definecharacter textbullet 149
+\definecharacter textdag 134
+\definecharacter textddag 135
+\definecharacter textdegree 176
+\definecharacter textdiv 247
+\definecharacter textellipsis 133
+\definecharacter textfraction 4
+\definecharacter textlognot 172
+\definecharacter textminus 143
+\definecharacter textmu 181
+\definecharacter textmultiply 215
+\definecharacter textpm 177
+
+\definecharacter quotedbl 34
+\definecharacter quotedblbase 132
+\definecharacter quotedblleft 147
+\definecharacter quotedblright 148
+
+\definecharacter quotesingle 129
+\definecharacter quotesinglebase 130
+
+\definecharacter quoteleft 145
+\definecharacter quoteright 146
+
+\definecharacter guilsingleleft 139
+\definecharacter guilsingleright 155
+\definecharacter leftguillemot 171
+\definecharacter rightguillemot 187
+
+\definecharacter aacute 225
+\definecharacter Aacute 193
+\definecharacter eacute 233
+\definecharacter Eacute 201
+\definecharacter iacute 237
+\definecharacter Iacute 205
+\definecharacter oacute 243
+\definecharacter Oacute 211
+\definecharacter uacute 250
+\definecharacter Uacute 218
+\definecharacter yacute 253
+\definecharacter Yacute 221
+
+\definecharacter scaron 154
+\definecharacter Scaron 138
+\definecharacter zcaron 157
+\definecharacter Zcaron 141
+
+\definecharacter ccedilla 231
+\definecharacter Ccedilla 199
+
+\definecharacter acircumflex 226
+\definecharacter Acircumflex 194
+\definecharacter ecircumflex 234
+\definecharacter Ecircumflex 202
+\definecharacter icircumflex 238
+\definecharacter Icircumflex 206
+\definecharacter ocircumflex 244
+\definecharacter Ocircumflex 212
+\definecharacter ucircumflex 251
+\definecharacter Ucircumflex 219
+
+\definecharacter adiaeresis 228
+\definecharacter Adiaeresis 196
+\definecharacter ediaeresis 235
+\definecharacter Ediaeresis 203
+\definecharacter idiaeresis 239
+\definecharacter Idiaeresis 207
+\definecharacter odiaeresis 246
+\definecharacter Odiaeresis 214
+\definecharacter udiaeresis 252
+\definecharacter Udiaeresis 220
+\definecharacter ydiaeresis 255
+\definecharacter Ydiaeresis 159
+
+\definecharacter agrave 224
+\definecharacter Agrave 192
+\definecharacter egrave 232
+\definecharacter Egrave 200
+\definecharacter igrave 236
+\definecharacter Igrave 204
+\definecharacter ograve 242
+\definecharacter Ograve 210
+\definecharacter ugrave 249
+\definecharacter Ugrave 217
+
+\definecharacter aring 229
+\definecharacter Aring 197
+
+\definecharacter Lstroke 128
+\definecharacter lstroke 144
+\definecharacter ostroke 248
+\definecharacter Ostoke 216
+
+\definecharacter atilde 227
+\definecharacter Atilde 195
+\definecharacter ntilde 241
+\definecharacter Ntilde 209
+\definecharacter otilde 245
+\definecharacter Otilde 213
\stopencoding
@@ -175,22 +236,3 @@
\stopencoding
\endinput
-
-% \startencoding[texnansi]
-%
-% \definecommand b {\texnansiencodedb}
-% \definecommand c {\texnansiencodedc}
-%
-% \stopencoding
-%
-% \def\texnansiencodedb#1%
-% {\oalign{#1\crcr\hidewidth\vbox to.2ex{\hbox{\textmacron}\vss}\hidewidth}}
-%
-% \def\texnansiencodedc#1%
-% {\setbox\scratchbox\hbox{#1}%
-% \ifdim\ht\scratchbox=1ex
-% \buildtextaccent\textcedilla{#1}%
-% \else
-% {\ooalign{\hidewidth\textcedilla\hidewidth\crcr
-% \unhbox\scratchbox}}%
-% \fi}
diff --git a/tex/context/base/enco-cas.tex b/tex/context/base/enco-cas.tex
index 8ca17a56f..7629a4b38 100644
--- a/tex/context/base/enco-cas.tex
+++ b/tex/context/base/enco-cas.tex
@@ -5,7 +5,7 @@
%D subtitle=Named Glyph Case Mapping,
%D author=Hans Hagen,
%D date=\currentdate,
-%D copyright=Hans Hagen \& Ton Otten]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
diff --git a/tex/context/base/enco-def.tex b/tex/context/base/enco-def.tex
index 0a0e5095c..507844bf1 100644
--- a/tex/context/base/enco-def.tex
+++ b/tex/context/base/enco-def.tex
@@ -1,319 +1,418 @@
%D \module
%D [ file=enco-def,
-%D version=2000.20.12, % split from less verbose base file
+%D version=2000.5.7, % 2000.20.12, % split from less verbose base file
%D title=\CONTEXT\ Encoding Macros,
-%D subtitle=Default Character Definitions,
+%D subtitle=Default Character Definitions,
%D author=Hans Hagen,
%D date=\currentdate,
-%D copyright=Hans Hagen \& Ton Otten]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
%D Instead of overloading plain \TEX\ macros (and keeping them
%D available as an escape), we now use the more verbose
%D definitions in this file. Since memory is less a problem
%D these days, this verbosity has only a small price, but we
-%D gain readability. The following definitions are based on
-%D usage of the the original \TEX\ fonts, where composed
-%D characters were not part of the design. So, occasionally
-%D we have to revert to hacks.
+%D gain readability. The following definitions are based on
+%D usage of the the original \TEX\ fonts, where composed
+%D characters were not part of the design. So, occasionally
+%D we have to revert to hacks.
\startencoding[default]
-\definecharacter textgrave 18
\definecharacter textacute 19
-\definecharacter textcaron 20
+\definecharacter textbottomdot 46
\definecharacter textbreve 21
-\definecharacter textmacron 22
-\definecharacter textring 23
-\definecharacter textcedilla 24
-\definecharacter textogonek 24 % no !
-\definecharacter textbottomdot 46
-\definecharacter textcircumflex 94
+\definecharacter textcaron 20
+\definecharacter textcedilla 24
+\definecharacter textcircumflex 94
+\definecharacter textdiaeresis 127
\definecharacter textdotaccent 95
+\definecharacter textgrave 18
\definecharacter texthungarumlaut 125
-\definecharacter texttilde 126
-\definecharacter textdiaeresis 127
-
-\definecharacter textunderscore {\fakeunderscore}
-
-\definecharacter Acircumflex {\buildtextaccent\textcircumflex A}
-\definecharacter acircumflex {\buildtextaccent\textcircumflex a}
-\definecharacter Ccircumflex {\buildtextaccent\textcircumflex C}
-\definecharacter ccircumflex {\buildtextaccent\textcircumflex c}
-\definecharacter Ecircumflex {\buildtextaccent\textcircumflex E}
-\definecharacter ecircumflex {\buildtextaccent\textcircumflex e}
-\definecharacter Gcircumflex {\buildtextaccent\textcircumflex G}
-\definecharacter gcircumflex {\buildtextaccent\textcircumflex g}
-\definecharacter Hcircumflex {\buildtextaccent\textcircumflex H}
-\definecharacter hcircumflex {\buildtextaccent\textcircumflex h}
-\definecharacter Icircumflex {\buildtextaccent\textcircumflex \dotlessI}
-\definecharacter icircumflex {\buildtextaccent\textcircumflex \dotlessi}
-\definecharacter Jcircumflex {\buildtextaccent\textcircumflex \dotlessJ}
-\definecharacter jcircumflex {\buildtextaccent\textcircumflex \dotlessj}
-\definecharacter Ocircumflex {\buildtextaccent\textcircumflex O}
-\definecharacter ocircumflex {\buildtextaccent\textcircumflex o}
-\definecharacter Scircumflex {\buildtextaccent\textcircumflex S}
-\definecharacter scircumflex {\buildtextaccent\textcircumflex s}
-\definecharacter Ucircumflex {\buildtextaccent\textcircumflex U}
-\definecharacter ucircumflex {\buildtextaccent\textcircumflex u}
-\definecharacter Wcircumflex {\buildtextaccent\textcircumflex W}
-\definecharacter wcircumflex {\buildtextaccent\textcircumflex w}
-\definecharacter Ycircumflex {\buildtextaccent\textcircumflex Y}
-\definecharacter ycircumflex {\buildtextaccent\textcircumflex y}
-
-\definecharacter Agrave {\buildtextaccent\textgrave A}
-\definecharacter agrave {\buildtextaccent\textgrave a}
-\definecharacter Egrave {\buildtextaccent\textgrave E}
-\definecharacter egrave {\buildtextaccent\textgrave e}
-\definecharacter Igrave {\buildtextaccent\textgrave \dotlessI}
-\definecharacter igrave {\buildtextaccent\textgrave \dotlessi}
-\definecharacter Ograve {\buildtextaccent\textgrave O}
-\definecharacter ograve {\buildtextaccent\textgrave o}
-\definecharacter Ugrave {\buildtextaccent\textgrave U}
-\definecharacter ugrave {\buildtextaccent\textgrave u}
-\definecharacter Ygrave {\buildtextaccent\textgrave Y}
-\definecharacter ygrave {\buildtextaccent\textgrave y}
-
-\definecharacter Atilde {\buildtextaccent\texttilde A}
-\definecharacter atilde {\buildtextaccent\texttilde a}
-\definecharacter Itilde {\buildtextaccent\texttilde \dotlessI}
-\definecharacter itilde {\buildtextaccent\texttilde \dotlessi}
-\definecharacter Ntilde {\buildtextaccent\texttilde N}
-\definecharacter ntilde {\buildtextaccent\texttilde n}
-\definecharacter Otilde {\buildtextaccent\texttilde O}
-\definecharacter otilde {\buildtextaccent\texttilde o}
-\definecharacter Utilde {\buildtextaccent\texttilde U}
-\definecharacter utilde {\buildtextaccent\texttilde u}
-
-\definecharacter Adiaeresis {\buildtextaccent\textdiaeresis A}
-\definecharacter adiaeresis {\buildtextaccent\textdiaeresis a}
-\definecharacter Ediaeresis {\buildtextaccent\textdiaeresis E}
-\definecharacter ediaeresis {\buildtextaccent\textdiaeresis e}
-\definecharacter Idiaeresis {\buildtextaccent\textdiaeresis \dotlessI}
-\definecharacter idiaeresis {\buildtextaccent\textdiaeresis \dotlessi}
-\definecharacter Odiaeresis {\buildtextaccent\textdiaeresis O}
-\definecharacter odiaeresis {\buildtextaccent\textdiaeresis o}
-\definecharacter Udiaeresis {\buildtextaccent\textdiaeresis U}
-\definecharacter udiaeresis {\buildtextaccent\textdiaeresis u}
-\definecharacter Ydiaeresis {\buildtextaccent\textdiaeresis Y}
-\definecharacter ydiaeresis {\buildtextaccent\textdiaeresis y}
-
-\definecharacter Aacute {\buildtextaccent\textacute A}
-\definecharacter aacute {\buildtextaccent\textacute a}
-\definecharacter Cacute {\buildtextaccent\textacute C}
-\definecharacter cacute {\buildtextaccent\textacute c}
-\definecharacter Eacute {\buildtextaccent\textacute E}
-\definecharacter eacute {\buildtextaccent\textacute e}
-\definecharacter Iacute {\buildtextaccent\textacute \dotlessI}
-\definecharacter iacute {\buildtextaccent\textacute \dotlessi}
-\definecharacter Lacute {\buildtextaccent\textacute L}
-\definecharacter lacute {\buildtextaccent\textacute l}
-\definecharacter Nacute {\buildtextaccent\textacute N}
-\definecharacter nacute {\buildtextaccent\textacute n}
-\definecharacter Oacute {\buildtextaccent\textacute O}
-\definecharacter oacute {\buildtextaccent\textacute o}
-\definecharacter Racute {\buildtextaccent\textacute R}
-\definecharacter racute {\buildtextaccent\textacute r}
-\definecharacter Sacute {\buildtextaccent\textacute S}
-\definecharacter sacute {\buildtextaccent\textacute s}
-\definecharacter Uacute {\buildtextaccent\textacute U}
-\definecharacter uacute {\buildtextaccent\textacute u}
-\definecharacter Yacute {\buildtextaccent\textacute Y}
-\definecharacter yacute {\buildtextaccent\textacute y}
-\definecharacter Zacute {\buildtextaccent\textacute Z}
-\definecharacter zacute {\buildtextaccent\textacute z}
-
-\definecharacter Dstroke {D}
-\definecharacter dstroke {d}
-\definecharacter Hstroke {H}
-\definecharacter hstroke {h}
-\definecharacter Tstroke {T}
-\definecharacter tstroke {t}
-
-\definecharacter Cdotaccent {\buildtextaccent\textdotaccent C}
-\definecharacter cdotaccent {\buildtextaccent\textdotaccent c}
-\definecharacter Edotaccent {\buildtextaccent\textdotaccent E}
-\definecharacter edotaccent {\buildtextaccent\textdotaccent e}
-\definecharacter Gdotaccent {\buildtextaccent\textdotaccent G}
-\definecharacter gdotaccent {\buildtextaccent\textdotaccent g}
-\definecharacter Idotaccent {\buildtextaccent\textdotaccent \dotlessI}
-\definecharacter idotaccent {\buildtextaccent\textdotaccent \dotlessi}
-\definecharacter Zdotaccent {\buildtextaccent\textdotaccent Z}
-\definecharacter zdotaccent {\buildtextaccent\textdotaccent z}
-
-\definecharacter Amacron {\buildtextaccent\textmacron A}
-\definecharacter amacron {\buildtextaccent\textmacron a}
-\definecharacter Emacron {\buildtextaccent\textmacron E}
-\definecharacter emacron {\buildtextaccent\textmacron e}
-\definecharacter Imacron {\buildtextaccent\textmacron \dotlessI}
-\definecharacter imacron {\buildtextaccent\textmacron \dotlessi}
-\definecharacter Omacron {\buildtextaccent\textmacron O}
-\definecharacter omacron {\buildtextaccent\textmacron o}
-\definecharacter Umacron {\buildtextaccent\textmacron U}
-\definecharacter umacron {\buildtextaccent\textmacron u}
-
-\definecharacter Ccedilla {\buildtextcedilla C}
-\definecharacter ccedilla {\buildtextcedilla c}
-\definecharacter Kcedilla {\buildtextcedilla K}
-\definecharacter kcedilla {\buildtextcedilla k}
-\definecharacter Lcedilla {\buildtextcedilla L}
-\definecharacter lcedilla {\buildtextcedilla l}
-\definecharacter Ncedilla {\buildtextcedilla N}
-\definecharacter ncedilla {\buildtextcedilla n}
-\definecharacter Rcedilla {\buildtextcedilla R}
-\definecharacter rcedilla {\buildtextcedilla r}
-\definecharacter Scedilla {\buildtextcedilla S}
-\definecharacter scedilla {\buildtextcedilla s}
-\definecharacter Tcedilla {\buildtextcedilla T}
-\definecharacter tcedilla {\buildtextcedilla t}
-
-\definecharacter Ohungarumlaut {\buildtextaccent\texthungarumlaut O}
-\definecharacter ohungarumlaut {\buildtextaccent\texthungarumlaut o}
-\definecharacter Uhungarumlaut {\buildtextaccent\texthungarumlaut U}
-\definecharacter uhungarumlaut {\buildtextaccent\texthungarumlaut u}
-
-\definecharacter Aogonek {\buildtextogonek A}
-\definecharacter aogonek {\buildtextogonek a}
-\definecharacter Eogonek {\buildtextogonek E}
-\definecharacter eogonek {\buildtextogonek e}
-\definecharacter Iogonek {\buildtextogonek I}
-\definecharacter iogonek {\buildtextogonek i}
-\definecharacter Uogonek {\buildtextogonek U}
-\definecharacter uogonek {\buildtextogonek u}
-
-\definecharacter Aring {\buildtextaccent\textring A}
-\definecharacter aring {\buildtextaccent\textring a}
-\definecharacter Uring {\buildtextaccent\textring U}
-\definecharacter uring {\buildtextaccent\textring u}
-
-\definecharacter Abreve {\buildtextaccent\textbreve A}
-\definecharacter abreve {\buildtextaccent\textbreve a}
-\definecharacter Ebreve {\buildtextaccent\textbreve E}
-\definecharacter ebreve {\buildtextaccent\textbreve e}
-\definecharacter Gbreve {\buildtextaccent\textbreve G}
-\definecharacter gbreve {\buildtextaccent\textbreve g}
-\definecharacter Ibreve {\buildtextaccent\textbreve \dotlessI}
-\definecharacter ibreve {\buildtextaccent\textbreve \dotlessi}
-\definecharacter Obreve {\buildtextaccent\textbreve O}
-\definecharacter obreve {\buildtextaccent\textbreve o}
-\definecharacter Ubreve {\buildtextaccent\textbreve U}
-\definecharacter ubreve {\buildtextaccent\textbreve u}
-
-\definecharacter Ccaron {\buildtextaccent\textcaron C}
-\definecharacter ccaron {\buildtextaccent\textcaron c}
-\definecharacter Dcaron {\buildtextaccent\textcaron D}
-\definecharacter dcaron {\buildtextaccent\textcaron d}
-\definecharacter Ecaron {\buildtextaccent\textcaron E}
-\definecharacter ecaron {\buildtextaccent\textcaron e}
-\definecharacter Lcaron {\buildtextaccent\textcaron L}
-\definecharacter lcaron {\buildtextaccent\textcaron l}
-\definecharacter Ncaron {\buildtextaccent\textcaron N}
-\definecharacter ncaron {\buildtextaccent\textcaron n}
-\definecharacter Rcaron {\buildtextaccent\textcaron R}
-\definecharacter rcaron {\buildtextaccent\textcaron r}
-\definecharacter Scaron {\buildtextaccent\textcaron S}
-\definecharacter scaron {\buildtextaccent\textcaron s}
-\definecharacter Tcaron {\buildtextaccent\textcaron T}
-\definecharacter tcaron {\buildtextaccent\textcaron t}
-\definecharacter Ycaron {\buildtextaccent\textcaron Y}
-\definecharacter ycaron {\buildtextaccent\textcaron y}
-\definecharacter Zcaron {\buildtextaccent\textcaron Z}
-\definecharacter zcaron {\buildtextaccent\textcaron z}
-
-\definecharacter dotlessi {\char"10 }
-\definecharacter dotlessj {\char"11 }
-\definecharacter dotlessI {I}
-\definecharacter dotlessJ {J}
-
-% \definecharacter ffligature {\char11 }
-% \definecharacter filigature {\char12 }
-% \definecharacter flligature {\char13 }
-% \definecharacter ffiligature {\char14 }
-% \definecharacter fflligature {\char15 }
-
-\definecharacter AEligature {\char29 } % "1D
-\definecharacter aeligature {\char26 } % "1A
-\definecharacter Lstroke {\hsmash{\char32}L}
-\definecharacter lstroke {\hsmash{\char32}l}
-\definecharacter Ostroke {\char31 } % "1F
-\definecharacter ostroke {\char28 } % "1C
-\definecharacter OEligature {\char30 } % "1E
-\definecharacter oeligature {\char27 } % "1B
-\definecharacter Ssharp {SS}
-\definecharacter ssharp {\char25 } % "19
-\definecharacter IJligature {IJ}
-\definecharacter ijligature {ij}
-
-\definecharacter aumlaut {\moveaccent{-.1ex}\adiaeresis}
-\definecharacter eumlaut {\moveaccent{-.1ex}\ediaeresis}
-\definecharacter iumlaut {\moveaccent{-.1ex}\idiaeresis}
-\definecharacter oumlaut {\moveaccent{-.1ex}\odiaeresis}
-\definecharacter uumlaut {\moveaccent{-.1ex}\udiaeresis}
-
-\definecharacter Aumlaut {\smashaccent\Adiaeresis}
-\definecharacter Eumlaut {\smashaccent\Ediaeresis}
-\definecharacter Iumlaut {\smashaccent\Idiaeresis}
-\definecharacter Oumlaut {\smashaccent\Odiaeresis}
-\definecharacter Uumlaut {\smashaccent\Udiaeresis}
-
-\definecharacter Lslash {\Lstroke}
-\definecharacter lslash {\lstroke}
-\definecharacter Dslash {\Dstroke}
-\definecharacter dslash {\dstroke}
-\definecharacter Oslash {\Ostroke}
-\definecharacter oslash {\ostroke}
-
-\definecharacter Eszett {\Ssharp}
-\definecharacter eszett {\ssharp}
-
-\definecharacter Thorn {[]}
-\definecharacter thorn {[]}
+\definecharacter textmacron 22
+\definecharacter textogonek 24 % fake
+\definecharacter textring 23
+\definecharacter texttilde 126
+
+\definecharacter dotlessi {\char"10 }
+\definecharacter dotlessj {\char"11 }
+\definecharacter dotlessI {I}
+\definecharacter dotlessJ {J}
+
+\definecharacter endash 123
+\definecharacter emdash 124
+
+\definecharacter aeligature {\char26 } % "1A
+\definecharacter AEligature {\char29 } % "1D
+\definecharacter ijligature {ij}
+\definecharacter IJligature {IJ}
+\definecharacter oeligature {\char27 } % "1B
+\definecharacter OEligature {\char30 } % "1E
+
+\definecharacter ssharp {\char25 } % "19
+\definecharacter Ssharp {SS}
+
+\definecharacter thorn {\missingglyph}
+\definecharacter Thorn {\missingglyph}
+
+\definecharacter eth {\missingglyph}
+\definecharacter Eth {\missingglyph}
+
+\definecharacter exclamdown 60
+\definecharacter questiondown 62
+
+\definecharacter copyright {\encircled{\txx C}}
+\definecharacter registered {\encircled{\txx R}}
+\definecharacter trademark {\high{\txx TM}}
+
+\definecharacter sectionmark {\mathematics{\mathhexbox278}}
+\definecharacter paragraphmark {\mathematics{\mathhexbox27B}}
+
+\definecharacter onequarter {\vulgarfraction{1}{4}}
+\definecharacter onehalf {\vulgarfraction{1}{2}}
+\definecharacter threequarter {\vulgarfraction{3}{4}}
+
+\definecharacter onesuperior {\high{1}}
+\definecharacter twosuperior {\high{2}}
+\definecharacter threesuperior {\high{3}}
+
+\definecharacter textcent {c}
+\definecharacter textcurrency {\missingglyph}
+\definecharacter textdollar {\fakedollar}
+\definecharacter texteuro {E}
+\definecharacter textflorin {\fakeflorin}
+\definecharacter textsterling {\fakesterling}
+\definecharacter textyen {Y}
+
+\definecharacter percent {\fakepercent}
+\definecharacter perthousand {\fakeperthousand}
+
+\definecharacter softhyphen 45
+\definecharacter periodcentered {\mathematics{\cdot}}
+\definecharacter compoundwordmark 23
+
+\definecharacter textasciicircum 94
+\definecharacter textasciitilde 126
+\definecharacter textslash 47
+\definecharacter textbackslash {\tex{}} % todo
+\definecharacter textbraceleft {\mathematics{\{}}
+\definecharacter textbraceright {\mathematics{\}}}
+\definecharacter textunderscore {\fakeunderscore}
+\definecharacter textvisiblespace {\fakevisiblespace}
+
+\definecharacter textbrokenbar {\mathematics{\vert}}
+\definecharacter textbullet {\mathematics{\bullet}}
+\definecharacter textdag {\mathematics{\dag}}
+\definecharacter textddag {\mathematics{\ddag}}
+\definecharacter textdegree {\mathematics{{}^{\circ}}}
+\definecharacter textdiv {\mathematics{/}}
+\definecharacter textellipsis {\mathematics{\cdots}}
+\definecharacter textfraction {\mathematics{/}}
+\definecharacter textlognot {\mathematics{\neg}}
+\definecharacter textminus {\mathematics{-}}
+\definecharacter textmu {\mathematics{\mu}}
+\definecharacter textmultiply {\mathematics{\times}}
+\definecharacter textpm {\mathematics{\pm}}
+
+\definecharacter quotedbl {"}
+\definecharacter quotedblbase {,,}
+\definecharacter quotedblleft {``}
+\definecharacter quotedblright {''}
+
+\definecharacter quotesingle {`}
+\definecharacter quotesinglebase {,}
+
+\definecharacter quoteleft {`}
+\definecharacter quoteright {'}
+
+\definecharacter guilsingleleft {\fakeleftsubguillemot }
+\definecharacter guilsingleright {\fakerightsubguillemot}
+
+\definecharacter leftguillemot {\fakeleftguillemot }
+\definecharacter rightguillemot {\fakerightguillemot}
+
+\definecharacter Acircumflex {\buildtextaccent\textcircumflex A}
+\definecharacter acircumflex {\buildtextaccent\textcircumflex a}
+\definecharacter Ccircumflex {\buildtextaccent\textcircumflex C}
+\definecharacter ccircumflex {\buildtextaccent\textcircumflex c}
+\definecharacter Ecircumflex {\buildtextaccent\textcircumflex E}
+\definecharacter ecircumflex {\buildtextaccent\textcircumflex e}
+\definecharacter Gcircumflex {\buildtextaccent\textcircumflex G}
+\definecharacter gcircumflex {\buildtextaccent\textcircumflex g}
+\definecharacter Hcircumflex {\buildtextaccent\textcircumflex H}
+\definecharacter hcircumflex {\buildtextaccent\textcircumflex h}
+\definecharacter Icircumflex {\buildtextaccent\textcircumflex \dotlessI}
+\definecharacter icircumflex {\buildtextaccent\textcircumflex \dotlessi}
+\definecharacter Jcircumflex {\buildtextaccent\textcircumflex \dotlessJ}
+\definecharacter jcircumflex {\buildtextaccent\textcircumflex \dotlessj}
+\definecharacter Ocircumflex {\buildtextaccent\textcircumflex O}
+\definecharacter ocircumflex {\buildtextaccent\textcircumflex o}
+\definecharacter Scircumflex {\buildtextaccent\textcircumflex S}
+\definecharacter scircumflex {\buildtextaccent\textcircumflex s}
+\definecharacter Ucircumflex {\buildtextaccent\textcircumflex U}
+\definecharacter ucircumflex {\buildtextaccent\textcircumflex u}
+\definecharacter Wcircumflex {\buildtextaccent\textcircumflex W}
+\definecharacter wcircumflex {\buildtextaccent\textcircumflex w}
+\definecharacter Ycircumflex {\buildtextaccent\textcircumflex Y}
+\definecharacter ycircumflex {\buildtextaccent\textcircumflex y}
+
+\definecharacter Agrave {\buildtextaccent\textgrave A}
+\definecharacter agrave {\buildtextaccent\textgrave a}
+\definecharacter Egrave {\buildtextaccent\textgrave E}
+\definecharacter egrave {\buildtextaccent\textgrave e}
+\definecharacter Igrave {\buildtextaccent\textgrave \dotlessI}
+\definecharacter igrave {\buildtextaccent\textgrave \dotlessi}
+\definecharacter Ograve {\buildtextaccent\textgrave O}
+\definecharacter ograve {\buildtextaccent\textgrave o}
+\definecharacter Ugrave {\buildtextaccent\textgrave U}
+\definecharacter ugrave {\buildtextaccent\textgrave u}
+\definecharacter Ygrave {\buildtextaccent\textgrave Y}
+\definecharacter ygrave {\buildtextaccent\textgrave y}
+
+\definecharacter Atilde {\buildtextaccent\texttilde A}
+\definecharacter atilde {\buildtextaccent\texttilde a}
+\definecharacter Itilde {\buildtextaccent\texttilde \dotlessI}
+\definecharacter itilde {\buildtextaccent\texttilde \dotlessi}
+\definecharacter Ntilde {\buildtextaccent\texttilde N}
+\definecharacter ntilde {\buildtextaccent\texttilde n}
+\definecharacter Otilde {\buildtextaccent\texttilde O}
+\definecharacter otilde {\buildtextaccent\texttilde o}
+\definecharacter Utilde {\buildtextaccent\texttilde U}
+\definecharacter utilde {\buildtextaccent\texttilde u}
+
+\definecharacter Adiaeresis {\buildtextaccent\textdiaeresis A}
+\definecharacter adiaeresis {\buildtextaccent\textdiaeresis a}
+\definecharacter Ediaeresis {\buildtextaccent\textdiaeresis E}
+\definecharacter ediaeresis {\buildtextaccent\textdiaeresis e}
+\definecharacter Idiaeresis {\buildtextaccent\textdiaeresis \dotlessI}
+\definecharacter idiaeresis {\buildtextaccent\textdiaeresis \dotlessi}
+\definecharacter Odiaeresis {\buildtextaccent\textdiaeresis O}
+\definecharacter odiaeresis {\buildtextaccent\textdiaeresis o}
+\definecharacter Udiaeresis {\buildtextaccent\textdiaeresis U}
+\definecharacter udiaeresis {\buildtextaccent\textdiaeresis u}
+\definecharacter Ydiaeresis {\buildtextaccent\textdiaeresis Y}
+\definecharacter ydiaeresis {\buildtextaccent\textdiaeresis y}
+
+\definecharacter Aacute {\buildtextaccent\textacute A}
+\definecharacter aacute {\buildtextaccent\textacute a}
+\definecharacter Cacute {\buildtextaccent\textacute C}
+\definecharacter cacute {\buildtextaccent\textacute c}
+\definecharacter Eacute {\buildtextaccent\textacute E}
+\definecharacter eacute {\buildtextaccent\textacute e}
+\definecharacter Iacute {\buildtextaccent\textacute \dotlessI}
+\definecharacter iacute {\buildtextaccent\textacute \dotlessi}
+\definecharacter Lacute {\buildtextaccent\textacute L}
+\definecharacter lacute {\buildtextaccent\textacute l}
+\definecharacter Nacute {\buildtextaccent\textacute N}
+\definecharacter nacute {\buildtextaccent\textacute n}
+\definecharacter Oacute {\buildtextaccent\textacute O}
+\definecharacter oacute {\buildtextaccent\textacute o}
+\definecharacter Racute {\buildtextaccent\textacute R}
+\definecharacter racute {\buildtextaccent\textacute r}
+\definecharacter Sacute {\buildtextaccent\textacute S}
+\definecharacter sacute {\buildtextaccent\textacute s}
+\definecharacter Uacute {\buildtextaccent\textacute U}
+\definecharacter uacute {\buildtextaccent\textacute u}
+\definecharacter Yacute {\buildtextaccent\textacute Y}
+\definecharacter yacute {\buildtextaccent\textacute y}
+\definecharacter Zacute {\buildtextaccent\textacute Z}
+\definecharacter zacute {\buildtextaccent\textacute z}
+
+\definecharacter Dstroke {D}
+\definecharacter dstroke {d}
+\definecharacter Hstroke {H}
+\definecharacter hstroke {h}
+\definecharacter Tstroke {T}
+\definecharacter tstroke {t}
+
+\definecharacter Cdotaccent {\buildtextaccent\textdotaccent C}
+\definecharacter cdotaccent {\buildtextaccent\textdotaccent c}
+\definecharacter Edotaccent {\buildtextaccent\textdotaccent E}
+\definecharacter edotaccent {\buildtextaccent\textdotaccent e}
+\definecharacter Gdotaccent {\buildtextaccent\textdotaccent G}
+\definecharacter gdotaccent {\buildtextaccent\textdotaccent g}
+\definecharacter Idotaccent {\buildtextaccent\textdotaccent \dotlessI}
+\definecharacter idotaccent {\buildtextaccent\textdotaccent \dotlessi}
+\definecharacter Zdotaccent {\buildtextaccent\textdotaccent Z}
+\definecharacter zdotaccent {\buildtextaccent\textdotaccent z}
+
+\definecharacter Amacron {\buildtextaccent\textmacron A}
+\definecharacter amacron {\buildtextaccent\textmacron a}
+\definecharacter Emacron {\buildtextaccent\textmacron E}
+\definecharacter emacron {\buildtextaccent\textmacron e}
+\definecharacter Imacron {\buildtextaccent\textmacron \dotlessI}
+\definecharacter imacron {\buildtextaccent\textmacron \dotlessi}
+\definecharacter Omacron {\buildtextaccent\textmacron O}
+\definecharacter omacron {\buildtextaccent\textmacron o}
+\definecharacter Umacron {\buildtextaccent\textmacron U}
+\definecharacter umacron {\buildtextaccent\textmacron u}
+
+\definecharacter Ccedilla {\buildtextcedilla C}
+\definecharacter ccedilla {\buildtextcedilla c}
+\definecharacter Kcedilla {\buildtextcedilla K}
+\definecharacter kcedilla {\buildtextcedilla k}
+\definecharacter Lcedilla {\buildtextcedilla L}
+\definecharacter lcedilla {\buildtextcedilla l}
+\definecharacter Ncedilla {\buildtextcedilla N}
+\definecharacter ncedilla {\buildtextcedilla n}
+\definecharacter Rcedilla {\buildtextcedilla R}
+\definecharacter rcedilla {\buildtextcedilla r}
+\definecharacter Scedilla {\buildtextcedilla S}
+\definecharacter scedilla {\buildtextcedilla s}
+\definecharacter Tcedilla {\buildtextcedilla T}
+\definecharacter tcedilla {\buildtextcedilla t}
+
+\definecharacter Ohungarumlaut {\buildtextaccent\texthungarumlaut O}
+\definecharacter ohungarumlaut {\buildtextaccent\texthungarumlaut o}
+\definecharacter Uhungarumlaut {\buildtextaccent\texthungarumlaut U}
+\definecharacter uhungarumlaut {\buildtextaccent\texthungarumlaut u}
+
+\definecharacter Aogonek {\buildtextogonek A}
+\definecharacter aogonek {\buildtextogonek a}
+\definecharacter Eogonek {\buildtextogonek E}
+\definecharacter eogonek {\buildtextogonek e}
+\definecharacter Iogonek {\buildtextogonek I}
+\definecharacter iogonek {\buildtextogonek i}
+\definecharacter Uogonek {\buildtextogonek U}
+\definecharacter uogonek {\buildtextogonek u}
+
+\definecharacter Aring {\buildtextaccent\textring A}
+\definecharacter aring {\buildtextaccent\textring a}
+\definecharacter Uring {\buildtextaccent\textring U}
+\definecharacter uring {\buildtextaccent\textring u}
+
+\definecharacter Abreve {\buildtextaccent\textbreve A}
+\definecharacter abreve {\buildtextaccent\textbreve a}
+\definecharacter Ebreve {\buildtextaccent\textbreve E}
+\definecharacter ebreve {\buildtextaccent\textbreve e}
+\definecharacter Gbreve {\buildtextaccent\textbreve G}
+\definecharacter gbreve {\buildtextaccent\textbreve g}
+\definecharacter Ibreve {\buildtextaccent\textbreve \dotlessI}
+\definecharacter ibreve {\buildtextaccent\textbreve \dotlessi}
+\definecharacter Obreve {\buildtextaccent\textbreve O}
+\definecharacter obreve {\buildtextaccent\textbreve o}
+\definecharacter Ubreve {\buildtextaccent\textbreve U}
+\definecharacter ubreve {\buildtextaccent\textbreve u}
+
+\definecharacter Ccaron {\buildtextaccent\textcaron C}
+\definecharacter ccaron {\buildtextaccent\textcaron c}
+\definecharacter Dcaron {\buildtextaccent\textcaron D}
+\definecharacter dcaron {\buildtextaccent\textcaron d}
+\definecharacter Ecaron {\buildtextaccent\textcaron E}
+\definecharacter ecaron {\buildtextaccent\textcaron e}
+\definecharacter Lcaron {\buildtextaccent\textcaron L}
+\definecharacter lcaron {\buildtextaccent\textcaron l}
+\definecharacter Ncaron {\buildtextaccent\textcaron N}
+\definecharacter ncaron {\buildtextaccent\textcaron n}
+\definecharacter Rcaron {\buildtextaccent\textcaron R}
+\definecharacter rcaron {\buildtextaccent\textcaron r}
+\definecharacter Scaron {\buildtextaccent\textcaron S}
+\definecharacter scaron {\buildtextaccent\textcaron s}
+\definecharacter Tcaron {\buildtextaccent\textcaron T}
+\definecharacter tcaron {\buildtextaccent\textcaron t}
+\definecharacter Ycaron {\buildtextaccent\textcaron Y}
+\definecharacter ycaron {\buildtextaccent\textcaron y}
+\definecharacter Zcaron {\buildtextaccent\textcaron Z}
+\definecharacter zcaron {\buildtextaccent\textcaron z}
+
+\definecharacter Lstroke {\hsmash{\char32}L}
+\definecharacter lstroke {\hsmash{\char32}l}
+\definecharacter Ostroke {\char31 } % "1F
+\definecharacter ostroke {\char28 } % "1C
+
+\definecharacter aumlaut {\moveaccent{-.1ex}\adiaeresis}
+\definecharacter eumlaut {\moveaccent{-.1ex}\ediaeresis}
+\definecharacter iumlaut {\moveaccent{-.1ex}\idiaeresis}
+\definecharacter oumlaut {\moveaccent{-.1ex}\odiaeresis}
+\definecharacter uumlaut {\moveaccent{-.1ex}\udiaeresis}
+
+\definecharacter Aumlaut {\smashaccent\Adiaeresis}
+\definecharacter Eumlaut {\smashaccent\Ediaeresis}
+\definecharacter Iumlaut {\smashaccent\Idiaeresis}
+\definecharacter Oumlaut {\smashaccent\Odiaeresis}
+\definecharacter Uumlaut {\smashaccent\Udiaeresis}
\stopencoding
-%D Also handy:
+%D A few goodies:
-\startencoding[default]
+\def\eszett {\ssharp}
+\def\Eszett {\Ssharp}
-\definecharacter leftupperninequote 92
-\definecharacter rightupperninequote 34
-\definecharacter endash 123
-\definecharacter emdash 124
-\definecharacter hyphen 45
+\def\lslash {\lstroke}
+\def\Lslash {\Lstroke}
+\def\dslash {\dstroke}
+\def\Dslash {\Dstroke}
+\def\oslash {\ostroke}
+\def\Oslash {\Ostroke}
-\stopencoding
+% for plain tex's sake
-%D And:
+\def\S {\sectionmark }
+\def\P {\paragraphmark}
-\startencoding[default]
+% for latex users sake
-\definecharacter leftguillemot {\leftfakeguillemot }
-\definecharacter rightguillemot {\rightfakeguillemot}
+\def\textS {\sectionmark }
+\def\textP {\paragraphmark}
-\definecharacter leftsubguillemot {\leftsubfakeguillemot }
-\definecharacter rightsubguillemot {\rightsubfakeguillemot}
+% for old times sake
-\stopencoding
+\def\florin {\textflorin } \def\florijn{\textflorin}
+\def\dollar {\textdollar }
+\def\pound {\textsterling}
+\def\sterling{\textsterling}
+
+% idem
+
+\def\promille{\permille}
+\def\procent {\percent }
+\def\permine {\fakepermine}
+
+% some more
+
+\def\hyphen {\softhyphen}
+\def\cwm {\compoundwordmark}
+
+% quotes
+
+\def\lowerleftsingleninequote {\quotesinglebase}
+\def\lowerleftdoubleninequote {\quotedblbase}
+\def\lowerrightsingleninequote {\quotesinglebase}
+\def\lowerrightdoubleninequote {\quotedblbase}
+
+\def\upperleftsingleninequote {\quoteright}
+\def\upperleftdoubleninequote {\quotedblright}
+\def\upperrightsingleninequote {\quoteright}
+\def\upperrightdoubleninequote {\quotedblright}
+
+\def\upperleftsinglesixquote {\quoteleft}
+\def\upperleftdoublesixquote {\quotedblleft}
+\def\upperrightsinglesixquote {\quoteleft}
+\def\upperrightdoublesixquote {\quotedblleft}
-%D We also use symbolic names for math accents.
+\def\leftsubguillemot {\guilsingleleft}
+\def\rightsubguillemot {\guilsingleright}
+
+%D We also use symbolic names for math accents.
\startencoding[default]
-\definecharacter mathacute "7013
-\definecharacter mathgrave "7012
-\definecharacter mathddot "707F
-\definecharacter mathtilde "707E
-\definecharacter mathbar "7016
-\definecharacter mathbreve "7015
-\definecharacter mathcheck "7014
-\definecharacter mathhat "705E
-\definecharacter mathvec "017E
-\definecharacter mathdot "705F
-\definecharacter mathwidetilde "0365
-\definecharacter mathwidehat "0362
+\definecharacter mathacute "7013
+\definecharacter mathgrave "7012
+\definecharacter mathddot "707F
+\definecharacter mathtilde "707E
+\definecharacter mathbar "7016
+\definecharacter mathbreve "7015
+\definecharacter mathcheck "7014
+\definecharacter mathhat "705E
+\definecharacter mathvec "017E
+\definecharacter mathdot "705F
+\definecharacter mathwidetilde "0365
+\definecharacter mathwidehat "0362
\stopencoding
diff --git a/tex/context/base/enco-ec.tex b/tex/context/base/enco-ec.tex
index 3f9bc896f..0a65c4e3c 100644
--- a/tex/context/base/enco-ec.tex
+++ b/tex/context/base/enco-ec.tex
@@ -1,11 +1,11 @@
%D \module
%D [ file=enco-ec,
-%D version=1999.16.7,
+%D version=2000.5.7, % 1999.16.7,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=\LATEX\ EC Encoding,
-%D author={Hans Hagen, Taco Hoekwater, Patrick Gundlach},
+%D author={Patrick Gundlach, Hans Hagen, Taco Hoekwater},
%D date=\currentdate,
-%D copyright={Hans Hagen \& Taco Hoekwater \& Patrick Gundlach}]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
@@ -23,7 +23,7 @@
\startmapping[ec]
-%D The case mappings are fairly simple.
+%D The case mappings are fairly simple.
%\definecasemaps 128 to 156 lc 0 uc 0
@@ -41,175 +41,227 @@
%D So far for the mapping.
+%D The following characters are kind of dangerous,
+%D that is, they are normally not part of fonts, unless
+%D explicitly constructed.
+%D
+%D \startopsomming[columns,two]
+%D \som \type{\dotlessj}
+%D \som \type{\IJligature}
+%D \som \type{\ijligature}
+%D \som \type{\Ssharp}
+%D \som \type{\perthousand}
+%D \som \type{\compoundwordmark}
+% %D \som \type{\textvisiblespace}
+% %D \som \type{\tcaron}
+% %D \som \type{\tcedilla }
+% %D \som \type{\Tcedilla}
+% %D \som \type{\ydiaeresis}
+%D \stopopsomming
+
+%D So, for the moment we nil them; we can always create
+%D another vector if needed.
+
\stopmapping
-\startencoding[ec][ec] % second arg defines auto regime
+\startencoding[ec][ec] % second arg defines auto regime, needed here ?
-\definecharacter textgrave 0
\definecharacter textacute 1
+\definecharacter textbreve 8
+\definecharacter textcaron 7
+\definecharacter textcedilla 11
\definecharacter textcircumflex 2
-\definecharacter texttilde 3
\definecharacter textdiaeresis 4
+\definecharacter textdotaccent 10
+\definecharacter textgrave 0
\definecharacter texthungarumlaut 5
-\definecharacter textring 6
-\definecharacter textcaron 7
-\definecharacter textbreve 8
\definecharacter textmacron 9
-\definecharacter textdotaccent 10
-\definecharacter textcedilla 11
-\definecharacter textogonek 12
-
-\definecharacter quotesinglebase 13 % singlebasequote
-\definecharacter guilsingleleft 14 % singleleftguillemot
-\definecharacter guilsingleright 15 % singlerightguillemot
-\definecharacter quotedblleft 16 % doubleleftquote
-\definecharacter quotedblright 17 % doublerightquote
-\definecharacter quotedblbase 18 % doiublebasequote
-\definecharacter leftguillemot 19
-\definecharacter rightguillemot 20
-\definecharacter endash 21 % lig
-\definecharacter emdash 22 % lig
-\definecharacter cwm 23 % compoundwordmark
-\definecharacter perthousand 24
+\definecharacter textogonek 12
+\definecharacter textring 6
+\definecharacter texttilde 3
+
\definecharacter dotlessi 25
-\definecharacter dotlessj 26
-
-\definecharacter textbackslash 92
-\definecharacter textasciicircum 94 % ?
-\definecharacter textunderscore 95
-\definecharacter textbraceleft 123 % textleftbrace
-\definecharacter textbraceright 125 % textrightbrace
-\definecharacter texttilde 126
+%definecharacter dotlessj 26
+
+\definecharacter endash 21
+\definecharacter emdash 22
+
+\definecharacter aeligature 230
+\definecharacter AEligature 198
+%definecharacter ijligature 188
+%definecharacter IJligature 156
+\definecharacter oeligature 247
+\definecharacter OEligature 215
+
+\definecharacter ssharp 255
+%definecharacter Ssharp 223
+
+\definecharacter thorn 254
+\definecharacter Thorn 222
+
+\definecharacter Eth 208
+\definecharacter eth 240
+
+\definecharacter exclamdown 189 % lig
+\definecharacter questiondown 190 % lig
+
+\definecharacter sectionmark 159
+
+\definecharacter textsterling 191
+
+\definecharacter percent 37
+%definecharacter perthousand 24
+
\definecharacter softhyphen 127 % ?
+%definecharacter compoundwordmark 23
-\definecharacter Abreve 128
-\definecharacter Aogonek 129
+\definecharacter textasciicircum 94
+\definecharacter textasciitilde 126
+\definecharacter textbackslash 92
+\definecharacter textbraceleft 123
+\definecharacter textbraceright 125
+\definecharacter textunderscore 95
+%definecharacter textvisiblespace 32
+
+\definecharacter quotedbl 34
+\definecharacter quotedblbase 18
+\definecharacter quotedblleft 16
+\definecharacter quotedblright 17
+
+\definecharacter quotesingle 17 % fake 'm
+\definecharacter quotesinglebase 13
+
+\definecharacter quoteleft 96
+\definecharacter quoteright 39
+
+\definecharacter guilsingleleft 14
+\definecharacter guilsingleright 15
+\definecharacter leftguillemot 19
+\definecharacter rightguillemot 20
+
+\definecharacter aacute 225
+\definecharacter Aacute 193
+\definecharacter cacute 162
\definecharacter Cacute 130
-\definecharacter Ccaron 131
-\definecharacter Dcaron 132
-\definecharacter Ecaron 133
-\definecharacter Eogonek 134
-\definecharacter Gbreve 135
+\definecharacter eacute 233
+\definecharacter Eacute 201
+\definecharacter iacute 237
+\definecharacter Iacute 205
+\definecharacter lacute 168
\definecharacter Lacute 136
-\definecharacter Lcaron 137
-\definecharacter Lstroke 138
\definecharacter Nacute 139
-\definecharacter Ncaron 140
-%definecharacter NG 141
-\definecharacter Ohungarumlaut 142
+\definecharacter Oacute 211
+\definecharacter nacute 171
+\definecharacter oacute 243
+\definecharacter racute 175
\definecharacter Racute 143
-\definecharacter Rcaron 144
+\definecharacter sacute 177
\definecharacter Sacute 145
-\definecharacter Scaron 146
-\definecharacter Scedilla 147
-\definecharacter Tcaron 148
-\definecharacter Tcedilla 149
-\definecharacter Uhungarumlaut 150
-\definecharacter Uring 151
-\definecharacter Ydiaeresis 152
+\definecharacter uacute 250
+\definecharacter Uacute 218
+\definecharacter yacute 253
+\definecharacter Yacute 221
+\definecharacter zacute 185
\definecharacter Zacute 153
-\definecharacter Zcaron 154
-\definecharacter Zdotaccent 155
-\definecharacter IJligature 156
-\definecharacter Idotaccent 157
-\definecharacter dmacron 158
-\definecharacter sectionmark 159
+
\definecharacter abreve 160
-\definecharacter aogonek 161
-\definecharacter cacute 162
+\definecharacter Abreve 128
+\definecharacter gbreve 167
+\definecharacter Gbreve 135
+
\definecharacter ccaron 163
+\definecharacter Ccaron 131
\definecharacter dcaron 164
+\definecharacter Dcaron 132
\definecharacter ecaron 165
-\definecharacter eogonek 166
-\definecharacter gbreve 167
-\definecharacter lacute 168
+\definecharacter Ecaron 133
\definecharacter lcaron 169
-\definecharacter lstroke 170
-\definecharacter nacute 171
+\definecharacter Lcaron 137
\definecharacter ncaron 172
-%definecharacter ng 173
-\definecharacter ohungarumlaut 174
-\definecharacter racute 175
+\definecharacter Ncaron 140
\definecharacter rcaron 176
-\definecharacter sacute 177
+\definecharacter Rcaron 144
\definecharacter scaron 178
-\definecharacter scedilla 179
+\definecharacter Scaron 146
\definecharacter tcaron 180
-\definecharacter tcedilla 181
-\definecharacter uhungarumlaut 182
-\definecharacter uring 183
-\definecharacter ydiaeresis 184
-\definecharacter zacute 185
+\definecharacter Tcaron 148
\definecharacter zcaron 186
-\definecharacter zdotaccent 187
-\definecharacter ijligature 188
-\definecharacter exclamdown 189 % lig
-\definecharacter questiondown 190 % lig
-\definecharacter pounds 191
-\definecharacter Agrave 192
-\definecharacter Aacute 193
-\definecharacter Acircumflex 194
-\definecharacter Atilde 195
-\definecharacter Adiaeresis 196
-\definecharacter Aring 197
-\definecharacter AEligature 198
+\definecharacter Zcaron 154
+
+\definecharacter ccedilla 231
\definecharacter Ccedilla 199
-\definecharacter Egrave 200
-\definecharacter Eacute 201
+\definecharacter scedilla 179
+\definecharacter Scedilla 147
+\definecharacter tcedilla 181
+\definecharacter Tcedilla 149
+
+\definecharacter acircumflex 226
+\definecharacter Acircumflex 194
+\definecharacter ecircumflex 234
\definecharacter Ecircumflex 202
-\definecharacter Ediaeresis 203
-\definecharacter Igrave 204
-\definecharacter Iacute 205
+\definecharacter icircumflex 238
\definecharacter Icircumflex 206
-\definecharacter Idiaeresis 207
-\definecharacter Eth 208
-\definecharacter Ntilde 209
-\definecharacter Ograve 210
-\definecharacter Oacute 211
+\definecharacter ocircumflex 244
\definecharacter Ocircumflex 212
-\definecharacter Otilde 213
-\definecharacter Odiaeresis 214
-\definecharacter OEligature 215
-\definecharacter Ostroke 216
-\definecharacter Ugrave 217
-\definecharacter Uacute 218
+\definecharacter ucircumflex 251
\definecharacter Ucircumflex 219
+
+\definecharacter adiaeresis 228
+\definecharacter Adiaeresis 196
+\definecharacter ediaeresis 235
+\definecharacter Ediaeresis 203
+\definecharacter idiaeresis 239
+\definecharacter Idiaeresis 207
+\definecharacter odiaeresis 246
+\definecharacter Odiaeresis 214
+\definecharacter udiaeresis 252
\definecharacter Udiaeresis 220
-\definecharacter Yacute 221
-\definecharacter Thorn 222
-\definecharacter Ssharp 223
+\definecharacter ydiaeresis 184
+\definecharacter Ydiaeresis 152
+
+\definecharacter Idotaccent 157
+\definecharacter zdotaccent 187
+\definecharacter Zdotaccent 155
+
\definecharacter agrave 224
-\definecharacter aacute 225
-\definecharacter acircumflex 226
-\definecharacter atilde 227
-\definecharacter adiaeresis 228
-\definecharacter aring 229
-\definecharacter aeligature 230
-\definecharacter ccedilla 231
+\definecharacter Agrave 192
\definecharacter egrave 232
-\definecharacter eacute 233
-\definecharacter ecircumflex 234
-\definecharacter ediaeresis 235
+\definecharacter Egrave 200
\definecharacter igrave 236
-\definecharacter iacute 237
-\definecharacter icircumflex 238
-\definecharacter idiaeresis 239
-\definecharacter eth 240
-\definecharacter ntilde 241
+\definecharacter Igrave 204
\definecharacter ograve 242
-\definecharacter oacute 243
-\definecharacter ocircumflex 244
-\definecharacter otilde 245
-\definecharacter odiaeresis 246
-\definecharacter oeligature 247
-\definecharacter ostroke 248
+\definecharacter Ograve 210
\definecharacter ugrave 249
-\definecharacter uacute 250
-\definecharacter ucircumflex 251
-\definecharacter udiaeresis 252
-\definecharacter yacute 253
-\definecharacter thorn 254
-\definecharacter ssharp 255
+\definecharacter Ugrave 217
+
+\definecharacter ohungarumlaut 174
+\definecharacter Ohungarumlaut 142
+\definecharacter uhungarumlaut 182
+\definecharacter Uhungarumlaut 150
+
+\definecharacter dmacron 158
+
+\definecharacter aogonek 161
+\definecharacter Aogonek 129
+\definecharacter eogonek 166
+\definecharacter Eogonek 134
+
+\definecharacter aring 229
+\definecharacter Aring 197
+\definecharacter uring 183
+\definecharacter Uring 151
+
+\definecharacter lstroke 170
+\definecharacter Lstroke 138
+\definecharacter ostroke 248
+\definecharacter Ostroke 216
+
+\definecharacter atilde 227
+\definecharacter Atilde 195
+\definecharacter ntilde 241
+\definecharacter Ntilde 209
+\definecharacter otilde 245
+\definecharacter Otilde 213
\stopencoding
diff --git a/tex/context/base/enco-ecm.tex b/tex/context/base/enco-ecm.tex
new file mode 100644
index 000000000..329f66a9c
--- /dev/null
+++ b/tex/context/base/enco-ecm.tex
@@ -0,0 +1,33 @@
+%D \module
+%D [ file=enco-ec,
+%D version=2000.5.7,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Glyphs that may not be present in EC,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA-ADE]
+%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 next typescript removes a few problematic characters
+%D from the ec encoding vector. So, in case of troubles, say
+%D
+%D \starttypen
+%D \useencoding[ecm] % ec minus
+%D \stoptypen
+
+\startencoding[ec][ec]
+
+\definecharacter ijligature {ij}
+\definecharacter IJligature {IJ}
+\definecharacter Ssharp {SS}
+\definecharacter tcaron {\buildtextaccent\textcaron t}
+\definecharacter Tcedilla {\buildtextcedilla T}
+\definecharacter tcedilla {\buildtextcedilla t}
+\definecharacter ydiaeresis {\buildtextaccent\textdiaeresis y}
+
+\stopencoding
+
+\endinput
diff --git a/tex/context/base/enco-ffr.tex b/tex/context/base/enco-ffr.tex
new file mode 100644
index 000000000..a18e3c94e
--- /dev/null
+++ b/tex/context/base/enco-ffr.tex
@@ -0,0 +1,36 @@
+%D \module
+%D [ file=enco-ffr,
+%D version=2002.05.07,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=French Input Filter,
+%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.
+
+\enablemode[activecolon] \usemodule[tryout] % for the moment
+
+\unprotect
+
+\startlanguagespecifics[\s!fr]
+
+ \defineactivecharacter : {\directdiscretionary{:}}
+ \defineactivecharacter ; {\directdiscretionary{;}}
+ \defineactivecharacter ! {\directdiscretionary{!}}
+ \defineactivecharacter ? {\directdiscretionary{?}}
+
+\stoplanguagespecifics
+
+% maybe tricky due to possible name clashes:
+%
+% \def\ieme {\highordinalstr{e}}
+% \def\iemes{\highordinalstr{es}}
+% \def\ier {\highordinalstr{er}}
+% \def\iers {\highordinalstr{ers}}
+% \def\iere {\highordinalstr{re}}
+% \def\ieres{\highordinalstr{res}}
+
+\protect \endinput
diff --git a/tex/context/base/enco-il2.tex b/tex/context/base/enco-il2.tex
index dd94b7401..e8348195f 100644
--- a/tex/context/base/enco-il2.tex
+++ b/tex/context/base/enco-il2.tex
@@ -1,11 +1,11 @@
%D \module
%D [ file=enco-il2,
-%D version=1998.12.1,
+%D version=2000.5.7, % 1998.12.1,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=Czech and Slovak ISO Latin 2 Encoding,
%D author=Hans Hagen,
%D date=\currentdate,
-%D copyright=Hans Hagen]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
@@ -59,78 +59,86 @@
\definecharacter texttilde 126
\definecharacter textdiaeresis 127
+\definecharacter dotlessi 16
+\definecharacter dotlessj 17
+
\definecharacter aeligature 26
\definecharacter AEligature 29
\definecharacter oeligature 27
\definecharacter OEligature 30
-\definecharacter ostroke 28
-\definecharacter Ostroke 31
-\definecharacter dotlessi 16
-\definecharacter dotlessj 17
+
\definecharacter ssharp 25
-\definecharacter Agrave 152
+\definecharacter Racute 192
+\definecharacter Aacute 193
+\definecharacter Lacute 197
+\definecharacter Eacute 201
+\definecharacter Iacute 205
+\definecharacter Oacute 211
+\definecharacter Uacute 218
+\definecharacter Yacute 221
+\definecharacter racute 224
+\definecharacter aacute 225
+\definecharacter lacute 229
+\definecharacter eacute 233
+\definecharacter iacute 237
+\definecharacter oacute 243
+\definecharacter uacute 250
+\definecharacter yacute 253
+
\definecharacter Lcaron 165
\definecharacter Scaron 169
\definecharacter Tcaron 171
\definecharacter Zcaron 174
\definecharacter lcaron 181
-\definecharacter agrave 184
\definecharacter scaron 185
\definecharacter tcaron 187
\definecharacter zcaron 190
-\definecharacter Racute 192
-\definecharacter Aacute 193
-\definecharacter Adiaeresis 196
-\definecharacter Lacute 197
\definecharacter Ccaron 200
-\definecharacter Eacute 201
\definecharacter Ecaron 204
-\definecharacter Iacute 205
\definecharacter Dcaron 207
\definecharacter Ncaron 210
-\definecharacter Oacute 211
-\definecharacter Ocircumflex 212
-\definecharacter Ohungarumlaut 213
-\definecharacter Odiaeresis 214
\definecharacter Rcaron 216
-\definecharacter Uring 217
-\definecharacter Uacute 218
-\definecharacter Uhungarumlaut 219
-\definecharacter Udiaeresis 220
-\definecharacter Yacute 221
-\definecharacter racute 224
-\definecharacter aacute 225
-\definecharacter adiaeresis 228
-\definecharacter lacute 229
\definecharacter ccaron 232
-\definecharacter eacute 233
\definecharacter ecaron 236
-\definecharacter iacute 237
\definecharacter dcaron 239
\definecharacter ncaron 242
-\definecharacter oacute 243
+\definecharacter rcaron 248
+
+\definecharacter Ocircumflex 212
\definecharacter ocircumflex 244
-\definecharacter ohungarumlaut 245
+
+\definecharacter Adiaeresis 196
+\definecharacter Odiaeresis 214
+\definecharacter Udiaeresis 220
+\definecharacter adiaeresis 228
\definecharacter odiaeresis 246
-\definecharacter rcaron 248
-\definecharacter uring 249
-\definecharacter uacute 250
-\definecharacter uhungarumlaut 251
\definecharacter udiaeresis 252
-\definecharacter yacute 253
+\definecharacter Agrave 152
+\definecharacter agrave 184
+
+\definecharacter Ohungarumlaut 213
+\definecharacter Uhungarumlaut 219
+\definecharacter ohungarumlaut 245
+\definecharacter uhungarumlaut 251
+
+\definecharacter Uring 217
+\definecharacter uring 249
\definecharacter Aring {\ilencodedrA}
-\definecharacter lstroke {\ilencodedl}
+
+\definecharacter ostroke 28
+\definecharacter Ostroke 31
\definecharacter Lstroke {\ilencodedL}
+\definecharacter lstroke {\ilencodedl}
\def\ilencodedrA%
- {\leavevmode\hbox\bgroup
- \setbox0\hbox{h}%
- \dimen0=\ht0
- \advance\dimen0 by -1ex
- \rlap{\raise.67\dimen0\hbox{\char'27}}A%
- \egroup}
+ {\leavevmode\hbox\bgroup
+ \setbox0\hbox{h}%
+ \dimen0=\ht0
+ \advance\dimen0 by -1ex
+ \rlap{\raise.67\dimen0\hbox{\char'27}}A%
+ \egroup}
\def\ilencodedl%
{{\char32l}}
diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex
index 21a9326aa..117e20ee4 100644
--- a/tex/context/base/enco-ini.tex
+++ b/tex/context/base/enco-ini.tex
@@ -329,7 +329,7 @@
\doifundefined{\@map@\charactermapping}
{\expanded{\newtoks\csname\@map@\charactermapping\endcsname}}}
-\def\stopmapping%
+\def\stopmapping
{\popmacro\charactermapping}
\def\setmappingtoks%
@@ -783,6 +783,9 @@
\endETEX
+\def\defaultcharacter#1%
+ {\csname\nocharacterencoding\strippedcsname#1\endcsname}
+
%D Instead of numbers, a command may be entered.
\def\definecommand#1 #2 %
@@ -1017,7 +1020,8 @@
\def\docurrentencoding @#1@{#1}
%D \macros
-%D {showaccents, showcharacters, showhyphenations}
+%D {showaccents, showcharacters,
+%D showcharacterbounds, showhyphenations}
%D
%D Encoding is a tricky business. Therefore we provide a
%D a few macros that show most of the characters involved. The
@@ -1040,9 +1044,10 @@
%D can be used to check the correct loading of hyphenation
%D patterns.
-\fetchruntimecommand \showaccents {\f!encodingprefix\s!run}
-\fetchruntimecommand \showcharacters {\f!encodingprefix\s!run}
-\fetchruntimecommand \showhyphenations {\f!encodingprefix\s!run}
+\fetchruntimecommand \showaccents {\f!encodingprefix\s!run}
+\fetchruntimecommand \showcharacters {\f!encodingprefix\s!run}
+\fetchruntimecommand \showcharacterbounds {\f!encodingprefix\s!run}
+\fetchruntimecommand \showhyphenations {\f!encodingprefix\s!run}
%D \macros
%D {everyuppercase, EveryUppercase,
@@ -1439,6 +1444,6 @@
\useencoding[ans,il2,ec,tbo,pdf,uc,pol,x5]
-\setupencoding[\s!default=\s!default]
+\setupencoding[\s!default=ec] % was: [\s!default=\s!default]
\protect \endinput
diff --git a/tex/context/base/enco-lat.tex b/tex/context/base/enco-lat.tex
index 41f57a14d..3b52c9701 100644
--- a/tex/context/base/enco-lat.tex
+++ b/tex/context/base/enco-lat.tex
@@ -1,32 +1,7 @@
-%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.
+% temporary module, needed for downward compatibility
-%D This file maps \ISO~latin~2 characters onto standard
-%D \ASCII\ characters. Some more definitions will be added.
+\input regi-lat.tex
-\startregime[latin2]
-
-\defineactivetoken è {\ccaron}
-\defineactivetoken È {\Ccaron}
-\defineactivetoken æ {\cacute}
-\defineactivetoken Æ {\Cacute}
-\defineactivetoken ¹ {\scaron}
-\defineactivetoken © {\Scaron}
-\defineactivetoken ¾ {\zcaron}
-\defineactivetoken ® {\Zcaron}
-\defineactivetoken ð {\pseudoencodeddj}
-\defineactivetoken Ð {\pseudoencodedDJ}
-
-\stopregime
+\enableregime[latin2]
\endinput
diff --git a/tex/context/base/enco-mis.tex b/tex/context/base/enco-mis.tex
index 6c8064d57..20aae235a 100644
--- a/tex/context/base/enco-mis.tex
+++ b/tex/context/base/enco-mis.tex
@@ -1,11 +1,11 @@
%D \module
%D [ file=enco-mis,
-%D version=1999.11.11,
+%D version=2000.5.7, % 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}]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
@@ -58,4 +58,124 @@
\box0
\egroup}
+% currency
+
+\def\fakedollar % pretty cmr dependent
+ {\bgroup
+ \ifnum\fam=\itfam
+ \sl
+ \else\ifnum\fam=\bifam
+ \bs
+ \fi\fi
+ \$%
+ \egroup}
+
+\def\fakesterling % pretty cmr dependent
+ {\bgroup
+ \ifnum\fam=\bffam
+ \bi
+ \else\ifnum\fam=\bifam
+ \bi
+ \else\ifnum\fam=\bsfam
+ \bi
+ \else
+ \it
+ \fi\fi\fi
+ \$%
+ \egroup}
+
+\def\fakeflorin
+ {\bgroup
+ \ifnum\fam=\bffam
+ \bi
+ \else\ifnum\fam=\bifam
+ \bi
+ \else\ifnum\fam=\bsfam
+ \bi
+ \else
+ \it
+ \fi\fi\fi
+ f%
+ \egroup}
+
+% perthings
+
+\def\fakeperthousand
+ {\mathematics{^{\scriptscriptstyle0}\kern-.25em/\kern-.2em_{\scriptscriptstyle00}}}
+
+\def\fakepercent
+ {\mathematics{^{\scriptscriptstyle0}\kern-.25em/\kern-.2em_{\scriptscriptstyle0}}}
+
+\def\fakepermine
+ {\dontleavehmode
+ \bgroup
+ \setbox0=\hbox
+ {\mathematics{+}}%
+ \hbox to \wd0
+ {\hss
+ \mathematics{^{\scriptscriptstyle-}\kern-.4em/\kern-.3em_{\scriptscriptstyle-}}%
+ \hss}%
+ \egroup}
+
+% guillemots
+
+%D Yes I know, they are ugly:
+
+\def\fakeleftguillemot
+ {\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle\ll$}}}
+
+\def\fakerightguillemot
+ {\hbox{\raise.25ex\hbox{$\scriptscriptstyle\gg$}}}
+
+\def\fakeleftsubguillemot
+ {\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle<$}}}
+
+\def\fakerightsubguillemot
+ {\hbox{\raise.25ex\hbox{$\scriptscriptstyle>$}}}
+
+%D Needed:
+
+\def\fakevisiblespace
+ {\leavevmode\hbox
+ {\setbox\scratchbox\hbox{(}%
+ \scratchdimen.1\dp\scratchbox
+ \setbox\scratchbox\hbox{\space}%
+ \hbox to \wd\scratchbox
+ {\vrule
+ \!!depth 5\scratchdimen
+ \!!width \scratchdimen
+ \!!height \zeropoint
+ \hss
+ \vrule
+ \!!depth 5\scratchdimen
+ \!!width \wd\scratchbox
+ \!!height-4\scratchdimen
+ \hss
+ \vrule
+ \!!depth 5\scratchdimen
+ \!!width \scratchdimen
+ \!!height \zeropoint}}}
+
+%\def\fakeunderscore{\leavevmode\kern.06em\vbox{\hrule\!!width.3em}}
+
+\def\fakeunderscore
+ {\leavevmode\hbox
+ {\setbox\scratchbox\hbox{(}%
+ \scratchdimen.2\dp\scratchbox
+ \setbox\scratchbox\hbox{\space}%
+ \vrule
+ \!!depth \scratchdimen
+ \!!width \wd\scratchbox
+ \!!height\zeropoint}}
+
+\ifx\mathunderscore\undefined \let\mathunderscore\fakeunderscore \fi
+\ifx\textunderscore\undefined \let\textunderscore\fakeunderscore \fi
+
+\def\_{\ifmmode\mathunderscore\else\textunderscore\fi}
+
+
+%D Handy:
+
+\def\missingglyph{\ruledhbox{?}}
+
\protect \endinput
diff --git a/tex/context/base/enco-pol.tex b/tex/context/base/enco-pol.tex
index 588c5e673..ecc9ee8b1 100644
--- a/tex/context/base/enco-pol.tex
+++ b/tex/context/base/enco-pol.tex
@@ -1,11 +1,11 @@
%D \module
%D [ file=enco-pol,
-%D version=1999.28.8,
+%D version=2000.5.7, % 1999.28.8,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=Polish Mixed Encoding,
%D author={Taco Hoekwater \& Hans Hagen},
%D date=\currentdate,
-%D copyright=Hans Hagen]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
@@ -15,26 +15,6 @@
\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
-
\definecasemap 161 161 129 % a ogonek
\definecasemap 162 162 130 % c acute
\definecasemap 166 166 134 % e ogonek
@@ -96,10 +76,10 @@
\startencoding[pl0]
-\definecharacter leftguillemot 174 % ok ?
-\definecharacter rightguillemot 175 % ok ?
-\definecharacter leftsubguillemot 174 % ok ?
-\definecharacter rightsubguillemot 175 % ok ?
+\definecharacter leftguillemot 174
+\definecharacter rightguillemot 175
+\definecharacter guilsingleleft 174
+\definecharacter guilsingleright 175
\stopencoding
@@ -192,10 +172,10 @@
\startencoding[pl1]
-\definecharacter leftguillemot 174 % ok ?
-\definecharacter rightguillemot 175 % ok ?
-\definecharacter leftsubguillemot 174 % ok ?
-\definecharacter rightsubguillemot 175 % ok ?
+\definecharacter leftguillemot 174
+\definecharacter rightguillemot 175
+\definecharacter guilsingleleft 174
+\definecharacter guilsingleright 175
\stopencoding
@@ -264,10 +244,10 @@
\startencoding[pl2]
-\definecharacter leftguillemot 174 % ok ?
-\definecharacter rightguillemot 175 % ok ?
-\definecharacter leftsubguillemot 174 % ok ?
-\definecharacter rightsubguillemot 175 % ok ?
+\definecharacter leftguillemot 174
+\definecharacter rightguillemot 175
+\definecharacter guilsingleleft 174
+\definecharacter guilsingleright 175
\stopencoding
diff --git a/tex/context/base/enco-run.tex b/tex/context/base/enco-run.tex
index 13f292a08..a12f82f53 100644
--- a/tex/context/base/enco-run.tex
+++ b/tex/context/base/enco-run.tex
@@ -19,19 +19,19 @@
\let\normalbuildtextaccent\buildtextaccent
\let\normalbottomaccent \bottomaccent
%\def\char{\green\normalchar}%
- \def\char% can be used in \oalign
+ \def\char % can be used in \oalign
{\bgroup\def\char{\green\normalchar\scratchcounter\egroup}%
\afterassignment\char\scratchcounter}%
\def\buildtextaccent{\let\green\empty\blue\normalbuildtextaccent}%
\def\bottomaccent{\let\green\empty\red\normalbottomaccent}}
-\unexpanded\gdef\visualizecharacterslegend%
+\unexpanded\gdef\visualizecharacterslegend
{\hbox
{\edef\banner{\currentencoding\space\fontname\font}%
\tttf\banner:\space
{\blue composed}\space{\red bottom}\space{\green char}\space raw}}
-\gdef\showaccents%
+\gdef\showaccents
{\bgroup
\savefont
\setuptextrules[\c!korps=,\c!letter=]
@@ -59,7 +59,7 @@
\stoptextrule
\egroup}
-\gdef\showcharacters%
+\gdef\showcharacters
{\bgroup
\savefont
\setuptextrules[\c!korps=,\c!letter=]
@@ -69,8 +69,8 @@
\forgetall
\def\startencoding[##1]{}
\def\stopencoding{\endinput}
- \dimen0=\!!zeropoint
- \dimen2=\!!zeropoint
+ \dimen0=\zeropoint
+ \dimen2=\zeropoint
\def\definecharacter ##1 ##2 %
{\setbox0=\hbox spread 1em{\getvalue{##1}}%
\ifdim\wd0>\dimen0 \dimen0=\wd0 \fi
@@ -94,6 +94,37 @@
\stoptextrule
\egroup}
+% \hbox
+% {\font\test=uplr8t \test \ruledhbox{t}
+% \font\test=uplr8r \test \ruledhbox{t}}
+
+\beginETEX \fontcharwd
+
+\gdef\showcharacterbounds
+ {\bgroup
+ \localcolortrue
+ \dorecurse{255}
+ {\ifnum\fontcharwd\font\recurselevel>\zeropoint
+ \noindent\ruledhbox{\darkgray\char\recurselevel}\space
+ \fi}\unskip
+ \egroup}
+
+\endETEX
+
+\beginTEX
+
+\gdef\showcharacterbounds
+ {\bgroup
+ \localcolortrue
+ \dorecurse{255}
+ {\setbox\scratchbox\ruledhbox{\darkgray\char\recurselevel}%
+ \ifnum\wd\scratchbox>\zeropoint
+ \noindent\box\scratchbox\space
+ \fi}\unskip
+ \egroup}
+
+\endTEX
+
\gdef\showhyphenations#1%
{\starttabulate[|le|l|]
\NC language \NC \currentlanguage (code:\the\normallanguage) \NC \NR
diff --git a/tex/context/base/enco-tbo.tex b/tex/context/base/enco-tbo.tex
index 6f0d04482..b129eded7 100644
--- a/tex/context/base/enco-tbo.tex
+++ b/tex/context/base/enco-tbo.tex
@@ -1,19 +1,19 @@
%D \module
%D [ file=enco-tbo,
-%D version=2001.8.4,
+%D version=2000.5.7, % 2001.8.4,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=TeXBaseOne Encoding,
-%D author=Hans Hagen,
+%D author={Patrick Gundlach, Hans Hagen},
%D date=\currentdate,
-%D copyright=Hans Hagen]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-\startmapping[8r]
+\startmapping[8r]
-\definecasemap 228 228 196 \definecasemap 196 228 196
+\definecasemap 228 228 196 \definecasemap 196 228 196
\definecasemap 235 235 203 \definecasemap 203 235 203
\definecasemap 239 239 207 \definecasemap 207 239 207
\definecasemap 246 246 214 \definecasemap 214 246 214
@@ -47,105 +47,174 @@
\startencoding[8r]
-\definecharacter textgrave 30
\definecharacter textacute 180
+\definecharacter textbreve 11
+\definecharacter textcaron 16
+\definecharacter textcedilla 184
\definecharacter textcircumflex 136
-\definecharacter texttilde 152
\definecharacter textdiaeresis 168
+\definecharacter textdotaccent 1
+\definecharacter textgrave 30
\definecharacter texthungarumlaut 5
-\definecharacter textring 9
-\definecharacter textcaron 16
-\definecharacter textbreve 11
\definecharacter textmacron 175
-\definecharacter textdotaccent 1
-\definecharacter textcedilla 184
\definecharacter textogonek 8
+\definecharacter textring 9
+\definecharacter texttilde 152
\definecharacter dotlessi 17
-\definecharacter dotlessj 18
+%definecharacter dotlessj 18
-\definecharacter Lslash 6
-\definecharacter lslash 7
-
-\definecharacter Scaron 138
+\definecharacter endash 150
+\definecharacter emdash 151
+\definecharacter oeligature 156
\definecharacter OEligature 140
-\definecharacter Zcaron 141
-
-\definecharacter scaron 154
+\definecharacter aeligature 230
+\definecharacter AEligature 198
-\definecharacter oeligature 156
+\definecharacter ssharp 223
-\definecharacter Ydiaeresis 159
+\definecharacter thorn 254
+\definecharacter Thorn 222
+\definecharacter exclamdown 161
+\definecharacter questiondown 191
+
+\definecharacter copyright 169
+\definecharacter registered 174
+\definecharacter trademark 153
+
+\definecharacter sectionmark 167
+\definecharacter paragraphmark 182
+
+\definecharacter onequarter 188
+\definecharacter onehalf 189
+\definecharacter threequarter 190
+\definecharacter onesuperior 185
+\definecharacter twosuperior 178
+\definecharacter threesuperior 179
+
+\definecharacter textcent 162
+\definecharacter textcurrency 164
+\definecharacter texteuro 128
+\definecharacter textflorin 131
+\definecharacter textsterling 163
+\definecharacter textyen 165
+
+\definecharacter percent 37
+\definecharacter perthousand 137
+
+\definecharacter periodcentered 183
+\definecharacter softhyphen 173
+
+\definecharacter textasciicircum 94
+\definecharacter textasciitilde 126
+\definecharacter textslash 47
+\definecharacter textbackslash 92
+\definecharacter textbraceleft 123
+\definecharacter textbraceright 125
+\definecharacter textunderscore 95
+
+\definecharacter textbrokenbar 166
+\definecharacter textbullet 149
+\definecharacter textdag 134
+\definecharacter textddag 135
+\definecharacter textdegree 176
+\definecharacter textdiv 247
+\definecharacter textellipsis 133
+\definecharacter textfraction 4
+\definecharacter textlognot 172
+\definecharacter textminus 12
+\definecharacter textmu 181
+\definecharacter textmultiply 215
+\definecharacter textpm 177
+
+\definecharacter quotedbl 34
+\definecharacter quotedblbase 132
+\definecharacter quotedblleft 147
+\definecharacter quotedblright 148
+
+\definecharacter quotesingle 31
+\definecharacter quotesinglebase 130
+
+\definecharacter quoteleft 96
+\definecharacter quoteright 39
+
+\definecharacter guilsingleleft 139
+\definecharacter guilsingleright 155
\definecharacter leftguillemot 171
\definecharacter rightguillemot 187
-\definecharacter Agrave 192
+\definecharacter aacute 225
\definecharacter Aacute 193
-\definecharacter Acircumflex 194
-\definecharacter Atilde 195
-\definecharacter Adiaeresis 196
-\definecharacter Aring 197
-\definecharacter AEligature 198
-\definecharacter cCedile 199
-\definecharacter Egrave 200
+\definecharacter eacute 233
\definecharacter Eacute 201
-\definecharacter Ecircumflex 202
-\definecharacter Ediaeresis 203
-\definecharacter Igrave 204
+\definecharacter iacute 237
\definecharacter Iacute 205
-\definecharacter Icircumflex 206
-\definecharacter Idiaeresis 207
-
-\definecharacter Ntilde 209
-\definecharacter Ograve 210
+\definecharacter oacute 243
\definecharacter Oacute 211
-\definecharacter Ocircumflex 212
-\definecharacter Otilde 213
-\definecharacter Odiaeresis 214
-
-\definecharacter Ostoke 216
-\definecharacter Ugrave 217
+\definecharacter uacute 250
\definecharacter Uacute 218
-\definecharacter Ucircumflex 219
-\definecharacter Udiaeresis 220
\definecharacter Yacute 221
-\definecharacter Thorn 222
-\definecharacter ssharp 223
-\definecharacter agrave 224
-\definecharacter aacute 225
+\definecharacter yacute 253
+
+\definecharacter scaron 154
+\definecharacter Scaron 138
+%definecharacter Zcaron 141
+
+\definecharacter ccedilla 231
+\definecharacter Ccedilla 199
+
\definecharacter acircumflex 226
-\definecharacter atilde 227
-\definecharacter adiaeresis 228
-\definecharacter aring 229
-\definecharacter aeligature 230
-\definecharacter ccedile 231
-\definecharacter egrave 232
-\definecharacter eacute 233
+\definecharacter Acircumflex 194
\definecharacter ecircumflex 234
-\definecharacter ediaeresis 235
-\definecharacter igrave 236
-\definecharacter iacute 237
+\definecharacter Ecircumflex 202
\definecharacter icircumflex 238
+\definecharacter Icircumflex 206
+\definecharacter ocircumflex 244
+\definecharacter Ocircumflex 212
+\definecharacter ucircumflex 251
+\definecharacter Ucircumflex 219
+
+\definecharacter adiaeresis 228
+\definecharacter Adiaeresis 196
+\definecharacter ediaeresis 235
+\definecharacter Ediaeresis 203
\definecharacter idiaeresis 239
+\definecharacter Idiaeresis 207
+\definecharacter odiaeresis 246
+\definecharacter Odiaeresis 214
+\definecharacter udiaeresis 252
+\definecharacter Udiaeresis 220
+\definecharacter ydiaeresis 255
+\definecharacter Ydiaeresis 159
-\definecharacter ntilde 241
+\definecharacter agrave 224
+\definecharacter Agrave 192
+\definecharacter egrave 232
+\definecharacter Egrave 200
+\definecharacter igrave 236
+\definecharacter Igrave 204
\definecharacter ograve 242
-\definecharacter oacute 243
-\definecharacter ocircumflex 244
-\definecharacter otilde 245
-\definecharacter odiaeresis 246
+\definecharacter Ograve 210
+\definecharacter ugrave 249
+\definecharacter Ugrave 217
+\definecharacter aring 229
+\definecharacter Aring 197
+
+\definecharacter lstroke 7
+\definecharacter Lstroke 6
\definecharacter ostroke 248
-\definecharacter ugrave 249
-\definecharacter uacute 250
-\definecharacter ucircumflex 251
-\definecharacter udiaeresis 252
-\definecharacter yacute 253
-\definecharacter thorn 254
-\definecharacter ydiaeresis 255
+\definecharacter Ostoke 216
+
+\definecharacter atilde 227
+\definecharacter Atilde 195
+\definecharacter ntilde 241
+\definecharacter Ntilde 209
+\definecharacter otilde 245
+\definecharacter Otilde 213
\stopencoding
-\endinput
+\endinput
diff --git a/tex/context/base/filt-bas.tex b/tex/context/base/filt-bas.tex
new file mode 100644
index 000000000..ca3bc3d70
--- /dev/null
+++ b/tex/context/base/filt-bas.tex
@@ -0,0 +1,63 @@
+%D \module
+%D [ file=filt-bas,
+%D version=2000.09.19,
+%D title=\CONTEXT\ Filter Macros,
+%D subtitle=A Base Collection,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D 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.
+
+% BEWARE: THIS IS A TEST MODULE, NAMES MAY CHANGE!
+
+\definefiltersynonym [utf8 to unicode16] [inutf8]
+
+\definefiltersynonym [persian fix] [FarsiToArabic]
+\definefiltersynonym [arabic analysis] [uni2cuni]
+\definefiltersynonym [arabic glyphs] [cuni2oar]
+
+\definefiltersequence
+ [farsi]
+ [utf8 to unicode16,
+ persian fix,
+ arabic analysis,
+ arabic glyphs]
+
+\definefiltersynonym [basic context analysis step1] [bcaa-1]
+\definefiltersynonym [basic context analysis step2] [bcaa-2]
+\definefiltersynonym [basic context analysis step3] [bcaa-3]
+\definefiltersynonym [farsi processing for uomarab] [uomarab-farsi]
+
+\definefiltersynonym [basic presentation forms to sf] [bpftosf]
+
+\definefiltersynonym [omega persian fix] [FarsiToArabic]
+\definefiltersynonym [omega arabic analysis] [uni2cuni]
+\definefiltersynonym [omega arabic glyphs] [cuni2oar]
+
+\definefiltersequence
+ [farsi-1]
+ [utf8 to unicode16,
+ omega persian fix,
+ omega arabic analysis,
+ omega arabic glyphs]
+
+\definefiltersequence
+ [farsi-2]
+ [utf8 to unicode16,
+ basic context analysis step1,
+ basic context analysis step2,
+ basic context analysis step3,
+ farsi processing for uomarab]
+
+\definefiltersequence
+ [farsi-3]
+ [utf8 to unicode16,
+ basic context analysis step1,
+ basic context analysis step2,
+ basic context analysis step3,
+ basic presentation forms to sf]
+
+\endinput
diff --git a/tex/context/base/filt-ini.tex b/tex/context/base/filt-ini.tex
new file mode 100644
index 000000000..fbc46a518
--- /dev/null
+++ b/tex/context/base/filt-ini.tex
@@ -0,0 +1,119 @@
+%D \module
+%D [ file=filt-ini,
+%D version=2000.09.19,
+%D title=\CONTEXT\ Filter Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Filter Macros (ini)}
+
+\ifx\OmegaVersion\undefined
+
+ \let\definefiltersynonym \gobbledoubleempty
+ \let\definefiltersequence \gobbledoubleempty
+\unexpanded\def\usefiltersequence {\gobblesingleempty}
+ \let\usefilter \gobblesingleempty
+ \let\truefiltername \gobbleoneargument
+
+ \expandafter \endinput
+\fi
+
+\unprotect
+
+%D The real work starts here.
+
+\startmessages dutch library: filters
+ title: filter
+ 1: filter -- wordt geladen
+ 2: onbekend filter --
+\stopmessages
+
+\startmessages english library: filters
+ title: filter
+ 1: filter -- is loaded
+ 2: unknown filter --
+\stopmessages
+
+\startmessages german library: filters
+ title: filter
+ 1: filter -- is loaded
+ 2: unknown filter --
+\stopmessages
+
+\startmessages czech library: filters
+ title: filter
+ 1: filter -- is loaded
+ 2: unknown filter --
+\stopmessages
+
+\startmessages italian library: filters
+ title: filtri
+ 1: filtro -- caricato
+ 2: filtro sconosciuto --
+\stopmessages
+
+%D \macros
+%D {definefiltersynonym}
+
+\def\definefiltersynonym%
+ {\dodoubleargument\dodefinefiltersynonym}
+
+\def\dodefinefiltersynonym[#1][#2]%
+ {\setvalue{\??or#1}{#2}}
+
+%D \macros
+%D {truefiltername}
+
+\def\truefiltername#1%
+ {\ifundefined{\??or#1}#1\else\truefiltername{\getvalue{\??or#1}}\fi}
+
+%D \macros
+%D {definefiltersequence}
+
+\def\definefiltersequence%
+ {\dodoubleargument\dodefinefiltersequence}
+
+\def\dodefinefiltersequence[#1][#2]%
+ {\setvalue{\??ot#1}{#2}}
+
+%D \macros
+%D {usefiltersequence}
+
+\def\magicocpnumber{1}
+
+\def\dodousefiltersequence#1%
+ {\expandafter\ocp\csname\??or:#1\endcsname=\truefiltername{#1}\relax
+ \@EA \appendtoks
+ \@EA \addbeforeocplist \@EA \magicocpnumber \csname\??or:#1\endcsname
+ \to {\toks0}}
+
+\unexpanded\def\usefiltersequence[#1]%
+ {\edef\currentfiltersequence{\getvalue{\??ot#1}}%
+ \toks0=\emptytoks
+ \processcommacommand[\currentfiltersequence]\dodousefiltersequence
+ \expanded{\ocplist\csname\??ot:#1\endcsname=\the\toks0}\nullocplist
+ \expanded{\pushocplist\csname\??ot:#1\endcsname}\relax}
+
+%D \macros
+%D {usefilter}
+
+\def\dousefilter#1%
+ {\doifundefined{\c!file\f!filterprefix#1}%
+ {\setvalue{\c!file\f!filterprefix#1}{}%
+ \makeshortfilename[\f!filterprefix#1]%
+ \startreadingfile
+ \readsysfile{\shortfilename}
+ {\showmessage{\m!filters}{1}{#1}}
+ {\showmessage{\m!filters}{2}{#1}}%
+ \stopreadingfile}}
+
+\def\usefilter[#1]%
+ {\processcommalist[#1]\dousefilter}
+
+\protect \endinput
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index e93da016f..016fcfe56 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -34,7 +34,7 @@
\pushmacro\charactermapping
\pushmacro\characterencoding}
-\def\restorefont%
+\def\restorefont
{\popmacro\characterencoding
\popmacro\charactermapping
\popmacro\characterregime
@@ -1327,10 +1327,10 @@
\beginTEX
\def\truefontdata#1#2%
- {\ifx\csname\??ff#1#2\endcsname\relax
- \ifx\csname\??ff\fontclass#1\endcsname\relax
- \ifx\csname\??ff#1\endcsname\relax
- \ifx\csname\??ff#2\endcsname\relax
+ {\expandafter\ifx\csname\??ff#1#2\endcsname\relax
+ \expandafter\ifx\csname\??ff\fontclass#1\endcsname\relax
+ \expandafter\ifx\csname\??ff#1\endcsname\relax
+ \expandafter\ifx\csname\??ff#2\endcsname\relax
\else
% raw(key)
\csname\??ff#2\endcsname
@@ -1345,7 +1345,7 @@
\fi
\else
% raw(Regular) raw(key)
- \csname\??ff#1#2\endcsname\relax
+ \csname\??ff#1#2\endcsname
\fi}
\def\truefontname#1%
@@ -1523,6 +1523,7 @@
\setfontcharacteristics
\the\everyfontswitch
\fi}
+
\endTEX
\beginETEX \ifcsname
@@ -1674,24 +1675,6 @@
\beginETEX \ifcsname
-% \def\currentfontscale%
-% {\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
-% 1%
-% \fi\fi}
-%
-% \def\currentfontbodyscale%
-% {\ifcsname\??ft\s!default\fontsize\endcsname
-% \csname\??ft\s!default\fontsize\endcsname
-% \else\ifcsname\??ft\s!default\s!text\endcsname
-% \csname\??ft\s!default\s!text\endcsname
-% \else
-% 1%
-% \fi\fi}
-
\def\currentfontscale
{\csname\??ft\s!default
\ifcsname\??ft\s!default\xfontsize\endcsname \xfontsize \else
@@ -1830,7 +1813,6 @@
\copyparameters
[\??ft#2#1][\??ft\s!default]
[\c!interlinie,\c!em]}%
- % \@@beginfontdef
\getparameters[\??ft#2#1][#3]%
\@@endfontdef
% new code, see remark
@@ -1999,26 +1981,6 @@
\definebodyfont[#1][#2][#3]%
\popmacro\fontclass}
-% \def\dodefinebodyfont[#1][#2][#3]% body|identifier style defs|identifier
-% {\ifthirdargument
-% \doifnumberelse{#1}
-% {\doifassignmentelse{#3}
-% {% [12pt] [style] [settings]
-% \doifundefined{#2}{\expanded{\definefontstyle[#2][#2]}}% new
-% \processcommalist[#1]{\dododefinebodyfont{#2}{#3}}}
-% {% [12pt] [style] [identifier]
-% \dodefinedefaultbodyfont[#1][#2][#3]}} % body style identifier
-% {% [identifier] [style] [settings]
-% \setvalue{\s!default#1#2}##1##2{\expanded{\dodefinebodyfont[##1][##2][#3]}}}%
-% \else\ifsecondargument
-% \definebodyfont[#1][\c!rm][#2]%
-% \else
-% \doifundefined{\@size@#1} % Maybe there are default dependancies
-% {\defineunknownfont{#1}}% defined which we can use ([unknown])
-% \doifundefined{\@size@#1} % and if not, then we have at least to
-% {\definebodyfont[#1][\c!rm][]}% make sure some basics are set up.
-% \fi\fi}
-
\def\dodefinebodyfont[#1][#2][#3]% body|identifier style defs|identifier
{\ifthirdargument
\doifnumberelse{#1}
@@ -2057,7 +2019,7 @@
\def\xdodefinebodyfont[#1][#2][#3]% body|identifier style defs|identifier
{%\writestatus{[#1]}{[#2][#3]}%
- \doifundefined{#2}{\expanded{\definefontstyle[#2][#2]}}% new
+ \ifundefined{#2}\expanded{\definefontstyle[#2][#2]}\fi % new
\processcommalist[#1]{\dododefinebodyfont{#2}{#3}}}
\def\dododefinebodyfont#1#2#3% style defs body
@@ -2165,8 +2127,8 @@
\ifdefiningunknownfont \else
\definingunknownfonttrue
\def\defineunknownsubfont##1%
- {\doifundefined{\@size@\getvalue{\??ft#1##1}}
- {\defineunknownfont{\getvalue{\??ft#1##1}}}}%
+ {\doifundefined{\@size@\getvalue{\??ft#1##1}}
+ {\defineunknownfont{\getvalue{\??ft#1##1}}}}%
\processcommalist
[\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!groot,\c!klein]
\defineunknownsubfont
@@ -2178,6 +2140,11 @@
\fi
\fi}
+\def\defineunknownfontstyles#1%
+ {\def\defineunknownbodyfont##1% see ***
+ {\executeifdefined{\s!default\s!default##1}\gobbletwoarguments{#1}{##1}}%
+ \rawprocesscommacommand[\stylelist]\defineunknownbodyfont}
+
%D These macros show that quite some definitions take place.
%D Fonts are not loaded yet! This means that at format
%D generation time, no font files are preloaded.
@@ -2349,8 +2316,9 @@
{\expanded{\dodoswitchpoints{#1}}}
\def\dodoswitchpoints#1%
- {\doifundefined{\@size@#1}
- {\defineunknownfont{#1}}%
+ {\doifundefined{\@size@#1}
+ {\defineunknownfont{#1}}%
+ \defineunknownfontstyles{#1}%
\doifdefinedelse{\@size@#1}
{\getvalue{\@size@#1}%
\localbodyfontsize=#1\relax
@@ -2848,7 +2816,7 @@
{\edef#1{\bodyfontcsname\normalizedbodyfontsize#2\endcsname}}
\def\docompletefontswitch[#1]%
- {\bodyfontsize=#1\relax
+ {\bodyfontsize#1\relax
\dimensiontocount\bodyfontsize\bodyfontpoints
\edef\bodyfontfactor{\withoutpt\the\bodyfontsize}%
\normalizebodyfontsize\bodyfontsize\to\normalizedbodyfontsize
@@ -2888,15 +2856,15 @@
\definecomplexorsimple\setupbodyfont
-\def\simplesetupbodyfont%
+\def\simplesetupbodyfont
{\restoreglobalbodyfont}
\def\complexsetupbodyfont[#1]%
{\doifsomething{#1}
{\dosetfont1{#1}%
- \globalbodyfontsize=\localbodyfontsize
+ \globalbodyfontsize\localbodyfontsize
\normalizebodyfontsize\globalbodyfontsize\to\normalizedglobalbodyfontsize
- \let\globalfontstyle=\fontstyle
+ \let\globalfontstyle\fontstyle
\ifloadingfonts\else
\the\everybodyfont % indeed needed in case \dosetfont is not executed
\fi}}
@@ -2973,31 +2941,6 @@
\edef\@@fonthandling{\truefontdata\somefontname\s!handling}%
\edef\@@fontskewchar{\truefontdata\fontfile \s!skewchar}}
-% \def\setfontcharacteristics%
-% {\updatefontparameters
-% \enableencoding
-% [\ifx\@@fontencoding\empty
-% \s!default
-% \else
-% \@@fontencoding
-% \fi]%
-% \enablemapping
-% [\ifx\@@fontmapping\empty
-% \ifx\@@fontencoding\empty
-% \s!default
-% \else
-% \@@fontencoding
-% \fi
-% \else
-% \@@fontmapping
-% \fi]%
-% \enablehandling
-% [\ifx\@@fonthandling\empty
-% \s!default
-% \else
-% \@@fonthandling
-% \fi][\lastfontidentifier]}
-
\def\setfontcharacteristics%
{\updatefontparameters
\fastenableencoding
@@ -3161,7 +3104,7 @@
\ifx\normalizedbodyfontsize\normalizedglobalbodyfontsize
\partialrestoreglobalbodyfont
\else
- \fullrestoreglobalbodyfont
+ \fullrestoreglobalbodyfont
\fi
\else
\fullrestoreglobalbodyfont
@@ -3294,26 +3237,6 @@
%D \type{\noconvertfont}. In nested calls, we can restore the
%D conversion by saying \type{\redoconvertfont}.
-% \unexpanded\def\dodoconvertfont#1#2%
-% {\doifdefinedelse{\@letter@#1}
-% {\doifelsenothing{#1}
-% {\let\next\empty}
-% {\def\next{\getvalue{\@letter@#1}}}}
-% {\doifdefinedelse{#1}
-% {\def\next{\getvalue{#1}}}
-% {\def\next{#1}}}%
-% \next{#2}}
-%
-% \let\doconvertfont=\dodoconvertfont
-%
-% \def\noconvertfont#1#2%
-% {\doifdefinedelse{\@noletter@#1}
-% {\doifelsenothing{#1}
-% {\let\next\empty}
-% {\def\next{\getvalue{\@noletter@#1}}}}
-% {\def\next{#1}}%
-% \next{#2}}
-
\def\@@dodoconvertfont#1{\csname\@letter@ #1\endcsname}
\def\@@donoconvertfont#1{\csname\@noletter@#1\endcsname}
diff --git a/tex/context/base/font-run.tex b/tex/context/base/font-run.tex
index 85e533c57..0770b5d98 100644
--- a/tex/context/base/font-run.tex
+++ b/tex/context/base/font-run.tex
@@ -100,7 +100,7 @@
\@EA\globalprocesscommalist\@EA[\bodyfontenvironmentlist]\next}}
\ifinsidefloat\else\stopbaselinecorrection\fi}
-\gdef\showfont%
+\gdef\showfont
{\dosingleempty\doshowfont}
\beginTEX \iffontchar
@@ -180,17 +180,17 @@
\nointerlineskip
\vskip2pt
\edef\ascii % \noexpand needed for non etex
- {name:~{\noexpand\black\fontname\font}\quad
- encoding:~{\noexpand\black\currentencoding}\quad
- mapping:~{\noexpand\black\currentmapping}\quad
- handling:~{\noexpand\black\fonthandling}}%
+ {name: {\noexpand\black\fontname\font }\quad
+ encoding: {\noexpand\black\currentencoding}\quad
+ mapping: {\noexpand\black\currentmapping }\quad
+ handling: {\noexpand\black\fonthandling }}%
\tf\hbox to 40em
{\blue\hfill\tinyfont\setstrut\strut\ascii}
\egroup
\ifinsidefloat\else\stopbaselinecorrection\fi
\egroup}
-\gdef\showfontstyle%
+\gdef\showfontstyle
{\dotripleempty\doshowfontstyle}
\gdef\doshowfontstyle[#1][#2][#3]%
diff --git a/tex/context/base/hand-def.tex b/tex/context/base/hand-def.tex
index 04eb0a8c0..935a79b84 100644
--- a/tex/context/base/hand-def.tex
+++ b/tex/context/base/hand-def.tex
@@ -314,4 +314,17 @@
\definefonthandling [boldslanted] [punctuation] [\c!rechts=1.5]
\definefonthandling [bolditalic] [punctuation] [\c!rechts=1.5]
+% A special case of guillemots, beware: when used ungriuped,
+% it overloads all successive (current) encoding vector
+% instances!
+
+\startfonthandling [glm]
+
+ \overloadcharacter guilsingleleft {\defaultcharacter\guilsingleleft }
+ \overloadcharacter guilsingleright {\defaultcharacter\guilsingleright}
+ \overloadcharacter leftguillemot {\defaultcharacter\leftguillemot }
+ \overloadcharacter rightguillemot {\defaultcharacter\rightguillemot }
+
+\stopfonthandling
+
\protect \endinput
diff --git a/tex/context/base/hand-ini.tex b/tex/context/base/hand-ini.tex
index d2d02ee54..863b83de5 100644
--- a/tex/context/base/hand-ini.tex
+++ b/tex/context/base/hand-ini.tex
@@ -313,6 +313,17 @@
\def\usehandling[#1]%
{\processcommalist[#1]\dousehandling}
+%D New:
+
+\def\overloadcharacter#1 #2 %
+ {\setfonttoks
+ \doifnumberelse{\string#2}
+ {\appendtoks\dooverloadcharacter{#1}{\char#2 }\to\fonttoks}
+ {\appendtoks\dooverloadcharacter{#1}{#2}\to\fonttoks}}
+
+\def\dooverloadcharacter#1%
+ {\setvalue{\characterencoding\string#1}}
+
%D Let's now see if this macro works:
\setupfonthandling[\s!default][\c!links=1,\c!rechts=1]
diff --git a/tex/context/base/java-ini.tex b/tex/context/base/java-ini.tex
index 81054a5f5..666a1c89e 100644
--- a/tex/context/base/java-ini.tex
+++ b/tex/context/base/java-ini.tex
@@ -273,7 +273,7 @@
\getvalue{\r!java#1}}
\def\dopresetJSvariables#1%
- {\advance\scratchcounter by 1
+ {\advance\scratchcounter 1
\donefalse
\dodopresetJSvariables#1\end}%
diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex
index d02ddc2f9..82b5132fa 100644
--- a/tex/context/base/lang-ger.tex
+++ b/tex/context/base/lang-ger.tex
@@ -663,6 +663,26 @@
%D ... and to be completed!
+%D Next we implement couple of ordinal mumber converters:
+
+\def\enordinaldaynumber#1%
+ {#1\ifnum\lasttwodigits{#1}=11
+ \ordinalstr{th}%
+ \else\ifcase\lastdigit{#1}%
+ \ordinalstr{th}%
+ \or % 1
+ \ordinalstr{rst}%
+ \or % 2
+ \ordinalstr{nd}%
+ \or % 3
+ \ordinalstr{rd}%
+ \else
+ \ordinalstr{th}%
+ \fi\fi}
+
+\def\nlordinaldaynumber#1%
+ {#1\highordinalstr{e}}
+
%D \ShowAllLanguageValues [\s!en] [english] engelse humor
%D \ShowAllLanguageValues [\s!nl] [dutch] nederlandse zuinigheid
%D \ShowAllLanguageValues [\s!de] [german] duitse degelijkheid
diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex
index 9d25eae31..ed5126a76 100644
--- a/tex/context/base/lang-ini.tex
+++ b/tex/context/base/lang-ini.tex
@@ -470,7 +470,8 @@
\endETEX
-\newevery \everylanguage \relax
+\newevery \everylanguage \relax
+\newevery \everyresetlanguagespecifics \relax
\def\setnormallanguage#1%
{\dosetnormallanguage{:\currentencoding:\currentmapping:}{#1}{%
@@ -512,6 +513,12 @@
\doifelsevalue{\??la\currentlanguage\c!spatiering}\v!ruim
\nonfrenchspacing\frenchspacing}
+\ifx\enablelanguagespecifics\undefined
+
+ \def\enablelanguagespecifics[#1]{}
+
+\fi
+
\beginETEX
\def\complexlanguage[#1]%
@@ -614,200 +621,64 @@
\def\languageparameter#1%
{\csname\??la\defaultlanguage\currentlanguage#1\endcsname}
-%D \macros
-%D {startlanguagespecifics,enablelanguagespecifics}
-%D
-%D Each language has its own typographic pecularities. Some of
-%D those can be influenced by parameters, others are handled by
-%D the interface, but as soon as specific commands come into
-%D view we need another mechanism. In the macro that activates
-%D a language, we call \type{\enablelanguagespecifics}. This
-%D macro in return calls for the setup of language specific
-%D macros. Such specifics are defined as:
-%D
-%D \starttypen
-%D \startlanguagespecifics[de]
-%D \installcompoundcharacter "a {\"a}
-%D \installcompoundcharacter "e {\"e}
-%D \installcompoundcharacter "s {\SS}
-%D \stoplanguagespecifics
-%D \stoptypen
-%D
-%D Instead of \type{[du]} we can pass a comma separated
-%D list, like \type{[du,nl]}. Next calls to this macro add the
-%D specifics to the current list.
-%D
-%D Before we actually read the specifics, we first take some
-%D precautions that will prevent spurious spaces to creep into
-%D the list.
-
-\def\startlanguagespecifics% % we use double to
- {\bgroup
- \catcode`\^^I=\@@ignore
- \catcode`\^^M=\@@ignore
- \catcode`\^^L=\@@ignore
- \dodoubleempty\dostartlanguagespecifics} % get rid of spaces
-
-%D The main macro looks quite complicated but actually does
-%D nothing special. By embedding \type{\do} we can easily
-%D append to the lists and also execute them at will. Just to
-%D be sure, we check on spurious spaces. The second dummy
-%D argument gobbles spaces.
-
-\def\languageencoding%
- {\ifx\characterencoding\nocharacterencoding \else
- \characterencoding-%
- \fi}
-
-% \long\def\dostartlanguagespecifics[#1][#2]#3\stoplanguagespecifics%
-% {\egroup
-% \long\def\docommando##1%
-% {\doifdefinedelse{\??la\languageencoding##1\??la}
-% {\long\def\do####1####2####3%
-% {\setvalue{\??la\languageencoding####1\??la}{\do{####1}{####2####3}}}%
-% \getvalue{\??la\languageencoding##1\??la}{#3}}
-% {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{#3}}}%
-% \bgroup
-% \setbox0=\hbox{\enablelanguagespecifics[##1]}%
-% \ifdim\wd0>\!!zeropoint
-% \showmessage{\m!linguals}{7}{\currentencoding-##1,\the\wd0\space}\wait
-% \else
-% \showmessage{\m!linguals}{8}{\currentencoding-##1}%
-% \fi
-% \egroup
-% \doif{##1}{\currentmainlanguage}
-% {\enablelanguagespecifics[##1]}}%
-% \processcommalist[#1]\docommando}
-
-% This saves 3K in the fmt file.
-
-\long\def\dostartlanguagespecifics[#1][#2]#3\stoplanguagespecifics%
- {\egroup
- \processcommalist[#1]{\dosetlanguagespecifics{#3}}}
-
-\long\def\dosetlanguagespecifics#1#2%
- {\doifdefinedelse{\??la\languageencoding#2\??la}
- {\long\def\do##1##2##3%
- {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{##2##3}}}%
- \getvalue{\??la\languageencoding#2\??la}{#1}}
- {\setvalue{\??la\languageencoding#2\??la}{\do{#2}{#1}}}%
- \bgroup
- \setbox0=\hbox{\enablelanguagespecifics[#2]}%
- \ifdim\wd0>\!!zeropoint
- \showmessage{\m!linguals}{7}{\currentencoding-#2,\the\wd0\space}\wait
- \else
- \showmessage{\m!linguals}{8}{\currentencoding-#2}%
- \fi
- \egroup
- \doif{#2}{\currentmainlanguage}
- {\enablelanguagespecifics[#2]}}
-
-%D Enabling them is rather straightforward. We only have to
-%D define \type{\do} in such a way that \type{{ }} is removed
-%D and the language key is gobbled.
-
-%\def\enablelanguagespecifics[#1]%
-% {\let\do\secondoftwoarguments
-% \doifvaluesomething{\??la#1\c!default}
-% {\getvalue{\??la\getvalue{\??la#1\c!default}\??la}%
-% \getvalue{\??la\languageencoding\??la}}%
-% \getvalue{\??la#1\??la}%
-% \getvalue{\??la\languageencoding#1\??la}}
+% moved
%
-% sped up since used often:
-
-\def\enablelanguagespecifics[#1]%
- {\let\do\secondoftwoarguments
- \csname
- \??la
- \@EA\ifx\csname\??la#1\c!default\endcsname\relax
- \languageencoding
- \else
- \csname\??la#1\c!default\endcsname
- \fi
- \??la
- \endcsname
- \csname\??la#1\??la\endcsname
- \csname\??la\languageencoding#1\??la\endcsname} % dup ?
-
-%D \macros
-%D {everyresetlanguagespecifics,resetlanguagespecifics}
-%D
-%D Cleanup macros.
-
-\newtoks\everyresetlanguagespecifics
-
-\def\resetlanguagespecifics{\the\everyresetlanguagespecifics}
-
-\appendtoks
- \resetlanguagespecifics
-\to \everycleanupfeatures
-
-%D \macros
-%D {leftguillemot,rightguillemot,leftsubguillemot,rightsubguillemot,
-%D ...single...quote,...double...quote}
-%D
-%D We assign logical names to all kind of quote and sentence
-%D boundary characters.
-%D
-%D When using Computer Modern Roman, the next definitions
-%D looks a bit better than the default ligatures.
-%D
-%D \starttypen
-%D \def\lowerleftsingleninequote {,}
-%D \def\lowerleftdoubleninequote {,\kern-.1em,}
-%D \def\upperleftsingleninequote {'}
-%D \def\upperleftdoubleninequote {''\kern-.1em}
-%D \def\upperleftsinglesixquote {`}
-%D \def\upperleftdoublesixquote {`\kern-.1em`}
-%D
-%D \def\lowerrightsingleninequote {,}
-%D \def\lowerrightdoubleninequote {,\kern-.1em,}
-%D \def\upperrightsingleninequote {'}
-%D \def\upperrightdoubleninequote {''}
-%D \def\upperrightsinglesixquote {`}
-%D \def\upperrightdoublesixquote {\kern-.125em``}
-%D \stoptypen
-%D
-%D But in other fonts, these definitions can give problems, so
-%D we just say:
-
-\def\lowerleftsingleninequote {,}
-\def\lowerleftdoubleninequote {,,}
-\def\upperleftsingleninequote {'}
-\def\upperleftdoubleninequote {''}
-\def\upperleftsinglesixquote {`}
-\def\upperleftdoublesixquote {``}
-
-\def\lowerrightsingleninequote {,}
-\def\lowerrightdoubleninequote {,,}
-\def\upperrightsingleninequote {'}
-\def\upperrightdoubleninequote {''}
-\def\upperrightsinglesixquote {`}
-\def\upperrightdoublesixquote {``}
-
-%D Yes I know, they are ugly:
-
-\def\leftfakeguillemot
- {\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle\ll$}}}
-
-\def\rightfakeguillemot
- {\hbox{\raise.25ex\hbox{$\scriptscriptstyle\gg$}}}
-
-\def\leftsubfakeguillemot
- {\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle<$}}}
-
-\def\rightsubfakeguillemot
- {\hbox{\raise.25ex\hbox{$\scriptscriptstyle>$}}}
-
-%D Pretty Plain:
-
-\def\fakeunderscore{\leavevmode\kern.06em\vbox{\hrule\!!width.3em}}
-
-\ifx\mathunderscore\undefined \let\mathunderscore\fakeunderscore \fi
-\ifx\textunderscore\undefined \let\textunderscore\fakeunderscore \fi
-
-\def\_{\ifmmode\mathunderscore\else\textunderscore\fi}
+% %D \macros
+% %D {leftguillemot,rightguillemot,leftsubguillemot,rightsubguillemot,
+% %D ...single...quote,...double...quote}
+% %D
+% %D We assign logical names to all kind of quote and sentence
+% %D boundary characters.
+% %D
+% %D When using Computer Modern Roman, the next definitions
+% %D looks a bit better than the default ligatures.
+% %D
+% %D \starttypen
+% %D \def\lowerleftsingleninequote {,}
+% %D \def\lowerleftdoubleninequote {,\kern-.1em,}
+% %D \def\upperleftsingleninequote {'}
+% %D \def\upperleftdoubleninequote {''\kern-.1em}
+% %D \def\upperleftsinglesixquote {`}
+% %D \def\upperleftdoublesixquote {`\kern-.1em`}
+% %D
+% %D \def\lowerrightsingleninequote {,}
+% %D \def\lowerrightdoubleninequote {,\kern-.1em,}
+% %D \def\upperrightsingleninequote {'}
+% %D \def\upperrightdoubleninequote {''}
+% %D \def\upperrightsinglesixquote {`}
+% %D \def\upperrightdoublesixquote {\kern-.125em``}
+% %D \stoptypen
+% %D
+% %D But in other fonts, these definitions can give problems, so
+% %D we just say:
+%
+% \def\lowerleftsingleninequote {,}
+% \def\lowerleftdoubleninequote {,,}
+% \def\upperleftsingleninequote {'}
+% \def\upperleftdoubleninequote {''}
+% \def\upperleftsinglesixquote {`}
+% \def\upperleftdoublesixquote {``}
+%
+% \def\lowerrightsingleninequote {,}
+% \def\lowerrightdoubleninequote {,,}
+% \def\upperrightsingleninequote {'}
+% \def\upperrightdoubleninequote {''}
+% \def\upperrightsinglesixquote {`}
+% \def\upperrightdoublesixquote {``}
+%
+% %D Yes I know, they are ugly:
+%
+% \def\leftfakeguillemot
+% {\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle\ll$}}}
+%
+% \def\rightfakeguillemot
+% {\hbox{\raise.25ex\hbox{$\scriptscriptstyle\gg$}}}
+%
+% \def\leftsubfakeguillemot
+% {\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle<$}}}
+%
+% \def\rightsubfakeguillemot
+% {\hbox{\raise.25ex\hbox{$\scriptscriptstyle>$}}}
%D Just like with subsentence boundary symbols, quotes
%D placement depends on the current language, therefore we show
@@ -922,8 +793,6 @@
%D \stoptabel
%D \protect
-%D
-
% \bgroup \normallanguage255 \patterns{} \egroup
% \def\nopatterns{\normallanguage255 }
diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex
index 963c7dcf1..6f515f1ee 100644
--- a/tex/context/base/lang-ita.tex
+++ b/tex/context/base/lang-ita.tex
@@ -271,7 +271,7 @@
\setuplabeltext [\s!pt] [\v!bijlage=]
\setuplabeltext [\s!ro] [\v!bijlage=]
-\setuplabeltext [\s!fr] [\v!deel=Section ]
+\setuplabeltext [\s!fr] [\v!deel=Partie ]
\setuplabeltext [\s!es] [\v!deel=Parte ]
\setuplabeltext [\s!it] [\v!deel=Parte ]
\setuplabeltext [\s!la] [\v!deel=Pars ]
@@ -441,6 +441,13 @@
\setuplabeltext [\s!it] [\v!hieronder=come mostrato sotto]
\setuplabeltext [\s!it] [\v!zie=cf. ]
+%D Ordinal converters:
+
+\def\frordinaldaynumber#1% date is masculine
+ {#1\ifcase#1\or
+ \highordinalstr{er}%
+ \fi}
+
%D \ShowAllLanguageValues [\s!fr] [french] franse slag
%D \ShowAllLanguageValues [\s!es] [spanish] spaans benauwd
%D \ShowAllLanguageValues [\s!it] [italian] italiaanse ...
diff --git a/tex/context/base/lang-lab.tex b/tex/context/base/lang-lab.tex
index 794cdf4c3..0db599889 100644
--- a/tex/context/base/lang-lab.tex
+++ b/tex/context/base/lang-lab.tex
@@ -145,9 +145,9 @@
% {\dodogetupsometextprefix{\s!en}{#2}{#3}
% {\dodogetupsometextprefix{\s!nl}{#2}{#3}
% {\iftracinglabels{\tttf[#2:~#3/#1]~}\fi}}}}}
-
-\beginETEX
-
+%
+% \beginETEX
+%
% \def\dodogetupsometextprefix#1#2#3#4%
% {\ifcsname#2#1#3\endcsname
% \csname#2#1#3\endcsname
diff --git a/tex/context/base/lang-spa.tex b/tex/context/base/lang-spa.tex
index 1fb4f3f0e..f2ec7916e 100644
--- a/tex/context/base/lang-spa.tex
+++ b/tex/context/base/lang-spa.tex
@@ -21,18 +21,21 @@
\definehspace [\s!fr] [quotation] [\flexiblespaceamount{.8}{.3}{.8}]
\definehspace [\s!fr] [sentence] [\fixedspaceamount{1}]
+%definehspace [\s!fr] [quote] [\flexiblespaceamount{.8}{.3}{.8}]
+%definehspace [\s!fr] [speech] [\flexiblespaceamount{.8}{.3}{.8}]
+
\definehspace [\s!fr] [interquotation] [\zeropoint]
\definehspace [\s!fr] [intersentence] [\zeropoint]
-\definehspace [:] [\zeropoint]
-\definehspace [;] [\zeropoint]
-\definehspace [!] [\zeropoint]
-\definehspace [?] [\zeropoint]
+\definehspace [\string :] [\zeropoint]
+\definehspace [\string ;] [\zeropoint]
+\definehspace [\string !] [\zeropoint]
+\definehspace [\string ?] [\zeropoint]
-\definehspace [\s!fr] [:] [\spaceamount]
-\definehspace [\s!fr] [;] [.16667em]
-\definehspace [\s!fr] [!] [.16667em]
-\definehspace [\s!fr] [?] [.16667em]
+\definehspace [\s!fr] [\string :] [\spaceamount]
+\definehspace [\s!fr] [\string ;] [.16667em]
+\definehspace [\s!fr] [\string !] [.16667em]
+\definehspace [\s!fr] [\string ?] [.16667em]
\protect
diff --git a/tex/context/base/lang-spe.tex b/tex/context/base/lang-spe.tex
new file mode 100644
index 000000000..845040dce
--- /dev/null
+++ b/tex/context/base/lang-spe.tex
@@ -0,0 +1,208 @@
+%D \module
+%D [ file=lang-spe,
+%D version=2002.05.07, % 1996.01.25,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Specifics,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D 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 code was originally placed in the language
+%D initialization module, but isolating it is clearer.
+
+\writestatus{loading}{Context Language Macros / Specifics}
+
+\unprotect
+
+%D \macros
+%D {everyresetlanguagespecifics,resetlanguagespecifics}
+%D
+%D Cleanup macros.
+
+\newevery \everyresetlanguagespecifics \relax
+
+\def\resetlanguagespecifics{\the\everyresetlanguagespecifics}
+
+\appendtoks
+ \resetlanguagespecifics
+\to \everycleanupfeatures
+
+%D \macros
+%D {startlanguagespecifics,enablelanguagespecifics}
+%D
+%D Each language has its own typographic pecularities. Some of
+%D those can be influenced by parameters, others are handled by
+%D the interface, but as soon as specific commands come into
+%D view we need another mechanism. In the macro that activates
+%D a language, we call \type{\enablelanguagespecifics}. This
+%D macro in return calls for the setup of language specific
+%D macros. Such specifics are defined as:
+%D
+%D \starttypen
+%D \startlanguagespecifics[de]
+%D \installcompoundcharacter "a {\"a}
+%D \installcompoundcharacter "e {\"e}
+%D \installcompoundcharacter "s {\SS}
+%D \stoplanguagespecifics
+%D \stoptypen
+%D
+%D Instead of \type{[du]} we can pass a comma separated
+%D list, like \type{[du,nl]}. Next calls to this macro add the
+%D specifics to the current list.
+%D
+%D Before we actually read the specifics, we first take some
+%D precautions that will prevent spurious spaces to creep into
+%D the list.
+
+\def\startlanguagespecifics% % we use double to
+ {\bgroup
+ \catcode`\^^I=\@@ignore
+ \catcode`\^^M=\@@ignore
+ \catcode`\^^L=\@@ignore
+ \dodoubleempty\dostartlanguagespecifics} % get rid of spaces
+
+%D The main macro looks quite complicated but actually does
+%D nothing special. By embedding \type{\do} we can easily
+%D append to the lists and also execute them at will. Just to
+%D be sure, we check on spurious spaces. The second dummy
+%D argument gobbles spaces.
+
+\def\languageencoding%
+ {\ifx\characterencoding\nocharacterencoding \else
+ \characterencoding-%
+ \fi}
+
+% \long\def\dostartlanguagespecifics[#1][#2]#3\stoplanguagespecifics%
+% {\egroup
+% \long\def\docommando##1%
+% {\doifdefinedelse{\??la\languageencoding##1\??la}
+% {\long\def\do####1####2####3%
+% {\setvalue{\??la\languageencoding####1\??la}{\do{####1}{####2####3}}}%
+% \getvalue{\??la\languageencoding##1\??la}{#3}}
+% {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{#3}}}%
+% \bgroup
+% \setbox0=\hbox{\enablelanguagespecifics[##1]}%
+% \ifdim\wd0>\!!zeropoint
+% \showmessage{\m!linguals}{7}{\currentencoding-##1,\the\wd0\space}\wait
+% \else
+% \showmessage{\m!linguals}{8}{\currentencoding-##1}%
+% \fi
+% \egroup
+% \doif{##1}{\currentmainlanguage}
+% {\enablelanguagespecifics[##1]}}%
+% \processcommalist[#1]\docommando}
+
+% This saves 3K in the fmt file.
+
+\long\def\dostartlanguagespecifics[#1][#2]#3\stoplanguagespecifics%
+ {\egroup
+ \processcommalist[#1]{\dosetlanguagespecifics{#3}}}
+
+\long\def\dosetlanguagespecifics#1#2%
+ {\doifdefinedelse{\??la\languageencoding#2\??la}
+ {\long\def\do##1##2##3%
+ {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{##2##3}}}%
+ \getvalue{\??la\languageencoding#2\??la}{#1}}
+ {\setvalue{\??la\languageencoding#2\??la}{\do{#2}{#1}}}%
+ \bgroup
+ \setbox0=\hbox{\enablelanguagespecifics[#2]}%
+ \ifdim\wd0>\zeropoint
+ \showmessage{\m!linguals}{7}{\currentencoding-#2,\the\wd0\space}\wait
+ \else
+ \showmessage{\m!linguals}{8}{\currentencoding-#2}%
+ \fi
+ \egroup
+ \doif{#2}{\currentmainlanguage}
+ {\enablelanguagespecifics[#2]}}
+
+%D Enabling them is rather straightforward. We only have to
+%D define \type{\do} in such a way that \type{{ }} is removed
+%D and the language key is gobbled.
+
+%\def\enablelanguagespecifics[#1]%
+% {\let\do\secondoftwoarguments
+% \doifvaluesomething{\??la#1\c!default}
+% {\getvalue{\??la\getvalue{\??la#1\c!default}\??la}%
+% \getvalue{\??la\languageencoding\??la}}%
+% \getvalue{\??la#1\??la}%
+% \getvalue{\??la\languageencoding#1\??la}}
+%
+% sped up since used often:
+
+\def\enablelanguagespecifics[#1]%
+ {\let\do\secondoftwoarguments
+ \csname
+ \??la
+ \@EA\ifx\csname\??la#1\c!default\endcsname\relax
+ \languageencoding
+ \else
+ \csname\??la#1\c!default\endcsname
+ \fi
+ \??la
+ \endcsname
+ \csname\??la#1\??la\endcsname
+ \csname\??la\languageencoding#1\??la\endcsname} % dup ?
+
+%D \macros
+%D {deactivatelanguagespecific}
+%D
+%D The next code makes it possible to disable the specifics.
+
+\def\deactivatelanguagespecific#1%
+ {\ifundefined{l g s \string#1}%
+ \global\letvalue{l g s \string#1}\empty % signal to prevent dup def
+ \bgroup
+ \catcode`#1=\@@active
+ \uccode`~=`#1
+ \uppercase{\doglobal\appendtoks\dodeactivatetoken{~}\to\everyresetlanguagespecifics}%
+ \egroup
+ \expanded{\doglobal\noexpand\appendtoks{#1}{\the\catcode`#1}}\to\everyresetlanguagespecifics
+ \fi}
+
+\def\dodeactivatetoken#1#2#3%
+ {\def#1{#2}\catcode`#2=#3\relax}
+
+%D We cannot hook this into the installer since language
+%D specifics can be anything. So far, we have the following
+%D potentially active characters.
+
+\deactivatelanguagespecific "
+\deactivatelanguagespecific /
+\deactivatelanguagespecific :
+\deactivatelanguagespecific ;
+\deactivatelanguagespecific ?
+\deactivatelanguagespecific !
+
+%D \macros
+%D {ordinaldaynumber, highordinalstr, ordinalstr}
+%D
+%D Efficient general ordinal number converters are sometimes
+%D difficult to implement. Fortunately dates never exceed the
+%D number~31.
+
+\def\highordinalstr#1{\high{\nocap{#1}}}
+\def\ordinalstr #1{\nocap{#1}}
+
+\def\ordinaldaynumber#1% \strippedcsname\ordinaldaynumber
+ {\expanded{\executeifdefined{\currentlanguage ordinaldaynumber}%
+ \noexpand\firstofoneargument{\number#1}}}
+
+%D Language specific converters have definitions like:
+%D
+%D \starttypen
+%D \def\enordinaldaynumber#1{...}
+%D \stoptypen
+%D
+%D Examples can be found in the other \type {lang} modules.
+
+% \ifprocessingXML is a nasty dependency
+
+\appendtoks
+ \ifprocessingXML \else \resetlanguagespecifics \fi
+\to \everylanguage
+
+\protect \endinput
diff --git a/tex/context/base/m-gamma.tex b/tex/context/base/m-gamma.tex
new file mode 100644
index 000000000..698613db9
--- /dev/null
+++ b/tex/context/base/m-gamma.tex
@@ -0,0 +1,230 @@
+%D \module
+%D [ file=m-gamma,
+%D version=2002.05.15,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Basic \OMEGA\ Support,
+%D author={Idris Samawi Hamid, Hans Hagen},
+%D date=\currentdate,
+%D copyright={PRAGMA-ADE, Idris Samawi Hamid}]
+%D
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Most of this module is written by Idris Samawi Hamid.
+
+%D We define a couple of symbolic \OTP\ filters and
+%D sequences. First the filters:
+%D
+%D Todo: better names, no funny abbreviations.
+
+\definefiltersynonym [utf8 to unicode16] [inutf8]
+\definefiltersynonym [IdOCP] [id]
+\definefiltersynonym [BasicLatinTexUni] [lat2uni]
+\definefiltersynonym [BasicLatinUniToFont][uni2lat]
+\definefiltersynonym [GrTexUni] [grpo2uni]
+\definefiltersynonym [GrUniToFont] [uni2greek]
+\definefiltersynonym [ArabUni] [7arb2uni]
+\definefiltersynonym [BerberUni] [7ber2uni]
+\definefiltersynonym [UrduUni] [7urd2uni]
+\definefiltersynonym [AfghaPashtoUni] [7pas2uni]
+\definefiltersynonym [PakiPashtoUni] [7pap2uni]
+\definefiltersynonym [SindhiUni] [7snd2uni]
+\definefiltersynonym [TifinaghUni] [7tbe2uni]
+\definefiltersynonym [LatinBerberUni] [7lbe2uni]
+\definefiltersynonym [UniCUni] [uni2cuni]
+\definefiltersynonym [CUniArab] [cuni2oar]
+\definefiltersynonym [NoKeshidehCUniArab] [cuni2nar]
+
+%D Next we define the sequences.
+
+\definefiltersequence
+ [NilOCP]
+ [IdOCP]
+
+\definefiltersequence
+ [BasicLatinOCP]
+ [BasicLatinTexUni,BasicLatinUniToFont]
+
+\definefiltersequence
+ [GreekOCP]
+ [GrTexUni,GrUniToFont]
+
+\definefiltersequence
+ [ArabicOCP]
+ [ArabUni,UniCUni,CUniArab]
+
+\definefiltersequence
+ [ArabicNoKeshidehOCP]
+ [ArabUni,UniCUni,NoKeshidehCUniArab]
+
+\definefiltersequence
+ [ArabicBerberOCP]
+ [BerberUni,UniCUni,CUniArab]
+
+\definefiltersequence
+ [TifinaghOCP]
+ [TifinaghUni,BasicLatinUniToFont]
+
+\definefiltersequence
+ [LatinBerberOCP]
+ [LatinBerberUni,BasicLatinUniToFont]
+
+\definefiltersequence
+ [UrduOCP]
+ [UrduUni,UniCUni,CUniArab]
+
+\definefiltersequence
+ [UrduNoKeshidehOCP]
+ [UrduUni,UniCUni,NoKeshidehCUniArab]
+
+\definefiltersequence
+ [AfghaPashtoOCP]
+ [AfghaPashtoUni,UniCUni,CUniArab]
+
+\definefiltersequence
+ [PakiPashtoOCP]
+ [PakiPashtoUni,UniCUni,CUniArab]
+
+\definefiltersequence
+ [SindhiOCP]
+ [SindhiUni,UniCUni,CUniArab]
+
+%D We wrap a couple of languages in environmen tmacros.
+%D beware: this solution is far from perfect!
+%D
+%D Todo: better interface to directional primitives.
+%D
+%D Todo: proper language support (labels etc).
+
+\definestartstop
+ [latin]
+ [commands=%
+ {\usefiltersequence[BasicLatinOCP]%
+ \switchtobodyfont[omlgc]}]
+
+\definestartstop
+ [greek]
+ [commands=%
+ {\usefiltersequence[GreekOCP]%
+ \switchtobodyfont[omlgc]%
+ \language=3\lefthyphenmin=2\righthyphenmin=2}]
+
+\definestartstop
+ [arab]
+ [commands=%
+ {\usefiltersequence[ArabicOCP]
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+\definestartstop
+ [smallarab]
+ [commands=%
+ {\usefiltersequence[ArabicNoKeshidehOCP]
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+\definestartstop
+ [latberber]
+ [commands=%
+ {\usefiltersequence[LatinBerberOCP]
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+\definestartstop
+ [tifinagh]
+ [commands=%
+ {\usefiltersequence[TifinaghOCP]
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+\definestartstop
+ [berber]
+ [commands=%
+ {\usefiltersequence[ArabicBerberOCP]
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+\definestartstop
+ [urdu]
+ [commands=%
+ {\usefiltersequence[UrduOCP]%
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+\definestartstop
+ [smallurdu]
+ [commands=%
+ {\usefiltersequence[UrduNoKeshidehOCP]%
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+\definestartstop
+ [pashto]
+ [commands=%
+ {\usefiltersequence[AfghaPashtoOCP]%
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+\definestartstop
+ [pashtop]
+ [commands=%
+ {\usefiltersequence[PakiPashtoOCP]%
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+\definestartstop
+ [sindhi]
+ [commands=%
+ {\usefiltersequence[SindhiOCP]%
+ \switchtobodyfont[omarb]%
+ \textdir TRT\pardir TRT}]
+
+
+\let\typeout\message \input grlccode.tex
+
+%D We (pre)define a couple of fonts:
+
+\usetypescriptfile[type-omg]
+
+\usetypescript[OmegaArab]
+\usetypescript[OmegaLGC]
+
+%D Dangerous definitions:
+
+\startencoding[omega]
+
+ \definecharacter textbraceleft {^^^^f07b}
+ \definecharacter textbraceright {^^^^f07d}
+ \definecharacter textbackslash {^^^^f05c}
+ \definecharacter textbullet {{\clearocplists\mm\sy\char"0F}}
+ \definecharacter dotlessi {^^^^0131}
+ \definecharacter ssharp {^^^^00df}
+
+\stopencoding
+
+\enableencoding [omega]
+
+%D Some logo's:
+
+\unexpanded \def\OMEGA {{\switchtobodyfont[omlgc]^^^^03a9}}
+\unexpanded \def\OTP {\OMEGA TP}
+
+%D A few funny definitions:
+
+\def\#{^^^^f023}
+\def\${^^^^f024}
+\def\%{^^^^f025}
+\def\&{^^^^f026}
+
+%D I have no idea what this has to do with omega:
+
+\def\heshe {\lohi{he} {she}}
+\def\himher{\lohi{him}{her}}
+\def\hisher{\lohi{his}{her}}
+
+% Brrr
+
+\setuptolerance [verytolerant]
+
+\endinput
diff --git a/tex/context/base/m-newmat.tex b/tex/context/base/m-newmat.tex
index ce20e626b..0dd3095e2 100644
--- a/tex/context/base/m-newmat.tex
+++ b/tex/context/base/m-newmat.tex
@@ -15,8 +15,9 @@
%D to be available when typesetting math. Most of them
%D originate in the \AMS\ macro packages. We have taken the
%D freedom to adapt them to \CONTEXT. This module is derived
-%D from the \type {m-math} module by Taco Hoekwater and
-%D adapted|/|extended by Hans Hagen.
+%D from the \type {m-math} module by Taco Hoekwater (partially
+%D derived from AMS math modules) and adapted|/|extended by
+%D Hans Hagen.
%D Here we will add code on demand. So, just let us know what
%D should go in here.
diff --git a/tex/context/base/m-tryout.tex b/tex/context/base/m-tryout.tex
new file mode 100644
index 000000000..0a5374562
--- /dev/null
+++ b/tex/context/base/m-tryout.tex
@@ -0,0 +1,51 @@
+%D \module
+%D [ file=m-tryout,
+%D version=2002.05.10,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Tryout Features,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D 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
+
+%D The following macros make sure that active colons work well
+%D in French, a feature enabled with:
+%D
+%D \starttypen
+%D \useencoding[ffr] \mainlanguage[fr]
+%D \stoptypen
+%D
+%D This trick will disappear when proved robust.
+
+\startmode[activecolon]
+
+\gdef\sectionseparator{-}
+
+\gdef\@@filterfirstpart [#1--#2]{#1}
+\gdef\@@filtersecondpart [#1--#2]{#2}
+
+\gdef\@@filterblockpart [#1--#2--#3]{#1}
+\gdef\@@filternumberpart [#1--#2--#3]{#2}
+\gdef\@@filterpagepart [#1--#2--#3]{#3}
+\gdef\@@filterblocknumberpart[#1--#2--#3]{#1--#2}
+
+\gdef\@@filterheadpart[#1]{\@EA\@@dofilterheadpart\@EA[#1-0]}
+\gdef\@@filtertailpart[#1]{\@EA\@@dofiltertailpart\@EA[#1-0]}
+
+\gdef\@@dofilterheadpart[#1-#2]{#1}
+\gdef\@@dofiltertailpart[#1-#2]{#2}
+
+\gdef\@@filterlevelpart[#1--#2--#3]{\@@dofilterlevelpart[#2-0-0-0-0]}
+
+\gdef\@@dofilterlevelpart[#1-0-0-0-#2]{#1}
+
+\reopenutilities
+
+\stopmode
+
+\protect \endinput
diff --git a/tex/context/base/m-units.tex b/tex/context/base/m-units.tex
index c4be1d3ea..b58e73ac4 100644
--- a/tex/context/base/m-units.tex
+++ b/tex/context/base/m-units.tex
@@ -362,7 +362,8 @@
\def\Kilo {\dimensionprefix{k}}
\def\Mega {\dimensionprefix{M}}
\def\Giga {\dimensionprefix{G}}
-\def\Terra {\dimensionprefix{T}}
+\def\Terra {\dimensionprefix{T}} % for odl times sake
+\def\Tera {\dimensionprefix{T}}
\def\Peta {\dimensionprefix{P}}
\def\Exa {\dimensionprefix{E}}
@@ -654,14 +655,14 @@
%D Computer memory is specified in Bytes:
-\getvalue{\v!eenheid} [Baud] {Baud} {Baud (Bit/s)}
-\getvalue{\v!eenheid} [Bit] {Bit} {Bit}
+\getvalue{\v!eenheid} [Baud] {Baud} {Baud (Bit/s)}
+\getvalue{\v!eenheid} [Bit] {Bit} {Bit}
-\getvalue{\v!eenheid} [Byte] {Byte} {Byte}
-\getvalue{\v!eenheid} [kByte] {\Kilo \Byte} {kilo Byte}
-\getvalue{\v!eenheid} [MByte] {\Mega \Byte} {mega Byte}
-\getvalue{\v!eenheid} [GByte] {\Giga \Byte} {giga Byte}
-\getvalue{\v!eenheid} [TByte] {\Terra \Byte} {terra Byte}
+\getvalue{\v!eenheid} [Byte] {Byte} {Byte}
+\getvalue{\v!eenheid} [kByte] {\Kilo \Byte} {kilo Byte}
+\getvalue{\v!eenheid} [MByte] {\Mega \Byte} {mega Byte}
+\getvalue{\v!eenheid} [GByte] {\Giga \Byte} {giga Byte}
+\getvalue{\v!eenheid} [TByte] {\Tera \Byte} {tera Byte}
%D Some radiation related units:
diff --git a/tex/context/base/math-pln.tex b/tex/context/base/math-pln.tex
index 5bc8c689b..af0d42bdb 100644
--- a/tex/context/base/math-pln.tex
+++ b/tex/context/base/math-pln.tex
@@ -54,8 +54,8 @@
\kern\expandafter\getf@ctor\the\fontdimen1\font
\dimen@}
-\def\copyright
- {{\ooalign{\hfil\raise.07ex\hbox{c}\hfil\crcr\Orb}}}
+% \def\copyright % will be overloaded
+% {{\ooalign{\hfil\raise.07ex\hbox{c}\hfil\crcr\Orb}}}
\def\dots
{\relax\ifmmode\ldots\else$\m@th\ldots\,$\fi}
diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex
index 543648db5..4a9f619b9 100644
--- a/tex/context/base/meta-ini.tex
+++ b/tex/context/base/meta-ini.tex
@@ -62,7 +62,7 @@
%D macros. so let's first preload a few auxiliary \METAPOST\
%D files.
-\maxnofMPgraphics = 8000 % metafun disables the 4K boundary
+\maxnofMPgraphics = 4000 % metafun disables the 4K boundary
\appendtoks
if unknown context_tool : input mp-tool ; fi ;
@@ -212,7 +212,8 @@
%D \stoptypen
\long\def\handleuniqueMPgraphic#1#2#3%
- {\def\@@meta{#1:}%
+ {\blabelgroup
+ \def\@@meta{#1:}%
\extendMPoverlaystamp{#2}% incl prepare
\ifundefined{\@@MPG\overlaystamp:#1}%
\enableincludeMPgraphics
@@ -224,23 +225,28 @@
\@EA\nouseMPbox
\fi {\@@MPG\overlaystamp:#1}%
\fi
- \getvalue{\@@MPG\overlaystamp:#1}}
+ \getvalue{\@@MPG\overlaystamp:#1}%
+ \elabelgroup}
\long\def\startuniqueMPgraphic%
{\dodoublegroupempty\dostartuniqueMPgraphic}
\long\def\dostartuniqueMPgraphic#1#2#3\stopuniqueMPgraphic%
- {\long\setvalue{\@@MPG#1}{\handleuniqueMPgraphic{#1}{#2}{#3}}}
+ {\blabelgroup
+ \long\setgvalue{\@@MPG#1}{\handleuniqueMPgraphic{#1}{#2}{#3}}%
+ \elabelgroup}
-\unexpanded\def\uniqueMPgraphic%
+\unexpanded\def\uniqueMPgraphic
{\dodoublegroupempty\douniqueMPgraphic}
\def\douniqueMPgraphic#1#2%
-% {{\def\@@meta{#1:}\setupMPvariables[#2]\getvalue{\@@MPG#1}{}}}
- {{\setupMPvariables[#1][#2]\getvalue{\@@MPG#1}{}}}
+ {\blabelgroup
+ \setupMPvariables[#1][#2]%
+ \getvalue{\@@MPG#1}{}%
+ \elabelgroup}
\long\def\handleuseMPgraphic#1#2#3%
- {\bgroup
+ {\blabelgroup
\def\@@meta{#1:}%
\prepareMPvariables{#2}%
\enableincludeMPgraphics
@@ -250,22 +256,26 @@
\placeMPgraphic
\fi
\deallocateMPslot\currentMPgraphic
- \egroup}
+ \elabelgroup}
\long\def\startuseMPgraphic%
{\dodoublegroupempty\dostartuseMPgraphic}
\long\def\dostartuseMPgraphic#1#2#3\stopuseMPgraphic%
- {\long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}{#3}}}
+ {\blabelgroup
+ \long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}{#3}}%
+ \elabelgroup}
\long\def\startusableMPgraphic% % redundant but handy
{\dodoublegroupempty\dostartusableMPgraphic}
\long\def\dostartusableMPgraphic#1#2#3\stopusableMPgraphic%
- {\long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}{#3}}}
+ {\blabelgroup
+ \long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}{#3}}%
+ \elabelgroup}
\long\def\handlereusableMPgraphic#1#2#3%
- {\bgroup
+ {\blabelgroup
\def\@@meta{#1:}%
\prepareMPvariables{#2}%
\enableincludeMPgraphics
@@ -277,7 +287,7 @@
\@EA\nouseMPbox
\fi {\@@MPG#1}%
\getvalue{\@@MPG#1}%
- \egroup}
+ \elabelgroup}
\long\def\startreusableMPgraphic%
{\dodoublegroupempty\dostartreusableMPgraphic}
@@ -288,17 +298,22 @@
% \fi}
\long\def\dostartreusableMPgraphic#1#2#3\stopreusableMPgraphic
- {\long\setgvalue{\@@MPG#1}{\handlereusableMPgraphic{#1}{#2}{#3}}}
+ {\blabelgroup
+ \long\setgvalue{\@@MPG#1}{\handlereusableMPgraphic{#1}{#2}{#3}}%
+ \elabelgroup}
\unexpanded\def\useMPgraphic%
{\dodoublegroupempty\douseMPgraphic}
\def\douseMPgraphic#1#2%
- {{\setupMPvariables[#1][#2]\getvalue{\@@MPG#1}{}}}
+ {\blabelgroup
+ \setupMPvariables[#1][#2]%
+ \getvalue{\@@MPG#1}{}%
+ \elabelgroup}
\let\reuseMPgraphic\useMPgraphic
-\def\enableincludeMPgraphics%
+\def\enableincludeMPgraphics
{\let\handleuseMPgraphic \thirdofthreearguments
\let\handlereusableMPgraphic\thirdofthreearguments}
@@ -383,22 +398,26 @@
%D
%D The current data is loaded with:
-\def\getMPdata%
- {\startreadingfile
+\def\getMPdata
+ {\blabelgroup
+ \startreadingfile
\readlocfile{\MPdatafile}{}{}%
- \stopreadingfile}
+ \stopreadingfile
+ \elabelgroup}
%D When we collect graphics in one file, we run into
%D troubles, since \METAPOST\ has a built in limit (of 4)
%D on the number of files it can handle. It's therefore
%D better to collect all data in one file and filter it.
-\def\getMPdata%
- {\long\def\MPdata##1##2%
+\def\getMPdata
+ {\blabelgroup
+ \long\def\MPdata##1##2%
{\ifnum##1=\currentMPgraphic\relax##2\fi}%
\startreadingfile
\readlocfile{\MPgraphicfile.mpd}{}{}%
- \stopreadingfile}
+ \stopreadingfile
+ \elabelgroup}
%D We have to enable this mechanism with:
@@ -426,7 +445,7 @@
\@EA\startMPcode\the\!!toksa\stopMPcode % more efficient
\egroup}}
-\def\runMPbuffer%
+\def\runMPbuffer
{\dosingleempty\dorunMPbuffer}
\def\dorunMPbuffer[#1]% processing only
@@ -540,10 +559,10 @@
\def\@@MPT{@MPT@}
-\def\forceMPTEXgraphic%
+\def\forceMPTEXgraphic
{\long\def\checkMPTEXgraphic##1{\global\MPTEXgraphictrue}}
-\def\setMPtext#1#2%
+\def\setMPtext#1#2% todo : #1 must be made : safe
{%\forceMPTEXgraphic
\convertargument#2\to\ascii
\setevalue{\@@MPT#1}{\ascii}}
diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex
index 8dff7bc76..1b7daad8e 100644
--- a/tex/context/base/mult-com.tex
+++ b/tex/context/base/mult-com.tex
@@ -697,6 +697,9 @@
stelnummeringin: stelnummeringin setuppagenumbering
stelleseitennummeriernungein nastavcislovanistran
impostanumerazionepagina seteazanumerotarepagina
+stelnummerin: stelnummerin setupnumber
+ setupnumber setupnumber
+ impostanumerazione setupnumber
setupbottom: stelonderin setupbottom
stelleuntenein nastavspodek
impostafondo seteazajos
@@ -1370,6 +1373,9 @@
plaatssubformule: plaatssubformule placesubformula
platziereunterformel umistipodrovnici
mettisottoformula punesubformula
+moveformula: verplaatsformule moveformula
+ moveformula moveformula
+ spostaformula moveformula
setupformulas: stelformulesin setupformulae
stelleformelnein nastavrovnice
impostaformule seteazaformule
@@ -1568,10 +1574,10 @@
setuppositioning: stelpositionerenin setuppositioning
stellepositionierenein nastavumistovani
impostaposizionamento setarepozitie
- roteer: roteer rotate
+ rotate: roteer rotate
drehen otocit
ruota roteste % GB
- stelroterenin: stelroterenin setuprotate
+ setuprotate: stelroterenin setuprotate
stelledrehenein nastavotoceni
impostarotazione seteazarotare
spiegel: spiegel mirror
@@ -1739,6 +1745,15 @@
switchtorawfont: switchtorawfont switchtorawfont
switchtorawfont switchtorawfont
passaafontgrezzo trecilafontraw
+
+ placeheadtext: plaatskoptekst placeheadtext
+ placeheadtext placeheadtext
+ posizionatestotesta placeheadtext
+
+placeheadnumber: plaatskopnummer placeheadnumber
+ placeheadnumber placeheadnumber
+ posizionanumerotesta placeheadnumber
+
\stopcommands
% ^ ^ ^ nadenken over \settextvariable vs \setuptextvariable in nl
@@ -1873,16 +1888,16 @@
definecolumnset: definieerkolomgroep definecolumnset
definecolumnset definecolumnset
- definecolumnset definecolumnset
+ definiscigruppocolonne definecolumnset
setupcolumnset: stelkolomgroepin setupcolumnset
setupcolumnset setupcolumnset
- setupcolumnset setupcolumnset
+ impostagruppocolonne setupcolumnset
startcolumnset: startkolomgroep startcolumnset
startcolumnset startcolumnset
- startcolumnset startcolumnset
+ iniziagruppocolonne startcolumnset
stopcolumnset: stopkolomgroep stopcolumnset
stopcolumnset stopcolumnset
- stopcolumnset stopcolumnset
+ terminagruppocolonne stopcolumnset
\stopcommands
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index d3bca3f0d..7ed1002a1 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -1291,7 +1291,7 @@
trefwoord: trefwoord keyword
keyword keyword
- keyword keyword
+ parolachiave keyword
\stopconstants
@@ -1442,6 +1442,12 @@ trefwoord: trefwoord keyword
geenmarkering: geenmarkering nomarking
keinebeschriftung zadneznaceni
nomarcature faramarcare
+ geennummer: geennummer nonumber
+ nonumber nonumber
+ nonumber nonumber % GB ETC NEW
+% geentekst: geentekst notext
+% notext notext
+% notext notext % GB ETC NEW
geenwit: geenwit nowhite
keinweiss zadnabila
nobianco faraalb
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index e1dda1c36..bc33cb955 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -333,21 +333,25 @@
% vervallen : hd hr hm vt vr vm tr tn te br bm bo on om or
+\definesystemvariable {ab} % AlignedBoxes
\definesystemvariable {ag} % AchterGrond
\definesystemvariable {al} % ALinea's
\definesystemvariable {am} % interActieMenu
+\definesystemvariable {an} % ANchor
\definesystemvariable {as} % AlignmentSwitch
\definesystemvariable {ba} % synchronisatieBAlk
\definesystemvariable {be} % startstop (BeginEnd)
\definesystemvariable {bj} % BlokJe
\definesystemvariable {bk} % Blokken (floats)
\definesystemvariable {bl} % BLanko
+\definesystemvariable {bg} % BleedinG
\definesystemvariable {bo} % BlankO (definitions)
\definesystemvariable {bs} % SelecteerBlokken
\definesystemvariable {bt} % BuTton
\definesystemvariable {bu} % BUffer
\definesystemvariable {bv} % Brieven
\definesystemvariable {by} % Per
+\definesystemvariable {cb} % CollectBox
\definesystemvariable {cc} % Comment
\definesystemvariable {ci} % CItaat
\definesystemvariable {cl} % kleur (CoLor setup)
@@ -362,11 +366,13 @@
\definesystemvariable {dl} % DunneLijnen
\definesystemvariable {dn} % DoorNummeren
\definesystemvariable {do} % DefinieerOpmaak
+\definesystemvariable {du} % DUmmy
\definesystemvariable {ds} % DoorSpringen
\definesystemvariable {ef} % ExternFiguur
\definesystemvariable {ec} % EnCoding
\definesystemvariable {en} % ENvironments
\definesystemvariable {ep} % ExternfiguurPreset
+\definesystemvariable {er} % external resources
\definesystemvariable {ex} % ExterneFiguren
\definesystemvariable {ht} % HiddenText
\definesystemvariable {fd} % FielD
@@ -429,7 +435,9 @@
\definesystemvariable {on} % ONderstreep
\definesystemvariable {oo} % OpsOmmingen
\definesystemvariable {op} % OPsomming
+\definesystemvariable {or} % OtpfilteR
\definesystemvariable {os} % OffSet
+\definesystemvariable {ot} % OTpsequence
\definesystemvariable {ov} % OVerlay
\definesystemvariable {ox} % OffsetBox
\definesystemvariable {pa} % PAlet
@@ -448,6 +456,7 @@
\definesystemvariable {rl} % ReferentieLijst
\definesystemvariable {rn} % RegelNummer
\definesystemvariable {ro} % ROteren
+\definesystemvariable {rr} % linenotes
\definesystemvariable {rs} % RaSters
\definesystemvariable {rt} % RoosTers
\definesystemvariable {rv} % ReserVeerfiguur
@@ -586,16 +595,17 @@
\definefileconstant {colorprefix} {colo-}
\definefileconstant {encodingprefix} {enco-}
-\definefileconstant {handlingprefix} {hand-}
-\definefileconstant {regimeprefix} {regi-}
-\definefileconstant {typeprefix} {type-}
+\definefileconstant {filterprefix} {filt-}
\definefileconstant {fontprefix} {font-}
+\definefileconstant {handlingprefix} {hand-}
\definefileconstant {javascriptprefix} {java-}
\definefileconstant {languageprefix} {lang-}
+\definefileconstant {mathprefix} {math-}
\definefileconstant {metapostprefix} {meta-}
+\definefileconstant {regimeprefix} {regi-}
\definefileconstant {specialprefix} {spec-}
-\definefileconstant {mathprefix} {math-}
\definefileconstant {symbolprefix} {symb-}
+\definefileconstant {typeprefix} {type-}
\definefileconstant {xtagprefix} {xtag-}
\definefileconstant {moduleprefix} {m-}
diff --git a/tex/context/base/page-bck.tex b/tex/context/base/page-bck.tex
index 29ba0056e..5c4772b05 100644
--- a/tex/context/base/page-bck.tex
+++ b/tex/context/base/page-bck.tex
@@ -188,10 +188,23 @@
\def\addtextbackground#1%
{\ifconditional\hiddenbackgroundenabled
- \addsomebackground\v!verborgen#1\zetbreedte\teksthoogte % mine !
+ \addsomebackground\v!verborgen#1\zetbreedte\teksthoogte % mine !
\fi
\addsomebackground\v!tekst#1\zetbreedte\teksthoogte}
+% \def\addtextbackground#1%
+% {\ifconditional\hiddenbackgroundenabled
+% \addsomebackground\v!verborgen #1\zetbreedte\teksthoogte % mine !
+% \fi
+% \doifbothsidesoverruled
+% \addsomebackground\v!rechtertekst#1\zetbreedte\teksthoogte
+% \orsideone
+% \addsomebackground\v!rechtertekst#1\zetbreedte\teksthoogte
+% \orsidetwo
+% \addsomebackground\v!linkertekst #1\zetbreedte\teksthoogte
+% \od
+% \addsomebackground\v!tekst #1\zetbreedte\teksthoogte}
+
%D The next couple of macros implement the area backgrounds.
%D As said, these are cached in dedicated boxes. The offsets
%D and depth of the page are used for alignment purposes.
@@ -376,7 +389,9 @@
\processcommalist[#1]\docommando
\else\ifsecondargument
\global\somebackgroundtrue
- \doifcommonelse{#1}{\v!tekst,\v!verborgen,\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina}
+ \doifcommonelse{#1}{\v!tekst,\v!verborgen,%
+ %\v!linkertekst,\v!rechtertekst,%
+ \v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina}
{\def\docommando##1%
{\getparameters[\??ma##1][#2]\checkbackground{##1}}%
\processcommalist[#1]\docommando}%
@@ -461,8 +476,10 @@
%D The stand alone text area inherits from the page too.
-\dodocommando\v!tekst \empty
-\dodocommando\v!verborgen\empty
+\dodocommando\v!tekst \empty
+%dodocommando\v!linkertekst \empty
+%dodocommando\v!rechtertekst\empty
+\dodocommando\v!verborgen \empty
%D We now define all 25 main areas in a row.
diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex
index e009a0b00..6095ad070 100644
--- a/tex/context/base/page-flt.tex
+++ b/tex/context/base/page-flt.tex
@@ -191,8 +191,67 @@
{\edef\floatlocation{#2}}%
\expanded{\dodocomplexplaatsblok[\floattype][\floatlocation]}}
+% \def\dodocomplexplaatsblok[#1][#2][#3]#4%
+% {\flushnotes
+% \ifsomefloatwaiting
+% % this was \checkwaitingfloats spread all over
+% \doifinsetelse{\v!altijd}{#2}
+% {\showmessage{\m!floatblocks}{5}{}}
+% {\doifcommonelse
+% {#2}
+% {\v!tekst,\v!naast,% \v!pagina,
+% \v!links,\v!rechts,\v!inlinker,\v!inrechter,%
+% \v!inmarge}
+% {\doflushfloats}
+% {}}%
+% % but which should be done before using box \floatbox
+% \fi
+% \ifmargeblokken
+% \doifinset{\v!marge}{#2}
+% {\bgroup\everypar{\egroup\the\everypar}%
+% \hsize\@@mbbreedte}%
+% \fi
+% \global\insidefloattrue
+% \let\@@extrafloat\empty
+% \dowithnextboxcontent % better a \the\everyfloattoks
+% {\postponefootnotes} % new
+% {\xdocompletefloat{#1}{#3}{#1}{#2}{#1}{#4}}%
+% \vbox}
+
+\def\presetfloatvariables#1#2#3#4%
+ {\doifcommonelse
+ {#2}
+ {\v!links,\v!rechts,\v!inlinker,\v!inrechter,\v!inmarge,%
+ \v!linkermarge,\v!linkerrand,\v!rechtermarge,\v!rechterrand}
+ {\global\parfloattrue}
+ {\global\parfloatfalse}%
+ \ifbinnenkolommen
+ \global\parfloatfalse
+ \fi
+ \calculatefloatskips{#1}%
+ \ifparfloat
+ \doifinset{\v!hoog}{#2}
+ {\global\sidefloattopskip \zeropoint}%
+ \doifinset{\v!laag}{#2}
+ {\global\sidefloatbottomskip\zeropoint}%
+ \doifinset{\v!passend}{#2}
+ {\global\sidefloattopskip \zeropoint
+ \global\sidefloatbottomskip\zeropoint
+ \global\floatsideskip \zeropoint}%
+ \fi
+ \doifinsetelse{\v!geennummer}{#2}
+ {\doifelsevalue{\??kj#1\c!nummer}{\v!ja}
+ {\global\nofloatnumbertrue}
+ {\global\nofloatnumberfalse}}
+ {\global\nofloatnumberfalse}%
+ \doifinsetelse{\v!geen}{#2}
+ {\global\nofloatcaptiontrue}
+ {\ConvertToConstant\doifelse{#4}{\v!geen}
+ {\global\nofloatcaptiontrue}
+ {\global\nofloatcaptionfalse}}}
+
\def\dodocomplexplaatsblok[#1][#2][#3]#4%
- {\flushfootnotes
+ {\flushnotes
\ifsomefloatwaiting
% this was \checkwaitingfloats spread all over
\doifinsetelse{\v!altijd}{#2}
@@ -215,9 +274,9 @@
\let\@@extrafloat\empty
\dowithnextboxcontent % better a \the\everyfloattoks
{\postponefootnotes} % new
- {\xdocompletefloat{#1}{#3}{#1}{#2}{#1}{#4}}%
+ {\xdocompletefloat{#1}{#3}{#1}{#2}{#1}{#4}}
\vbox}
-
+
\def\xxdocompletefloat#1#2%
{\setbox\nextbox\hbox{\signalrightpage\box\nextbox}%
\doifrightpageelse{\let\@@extrafloat#1}{\let\@@extrafloat#2}}
@@ -264,7 +323,7 @@
\fi}}
\def\docomplexstarttekstblok[#1][#2][#3]%
- {\flushfootnotes
+ {\flushnotes
\flushsidefloats % hoort eigenlijk niet hier
\docomplexplaatsblok[#1][\v!tekst,#2,\v!links][#3]}
@@ -312,7 +371,7 @@
\c!rechterkader=\@@bkrechterkader,
\c!kaderoffset=\@@bkkaderoffset,
\c!paginaovergangen=,
- \c!default=\@@bkdefault]%
+ \c!default=]%
\stelblokkopjein
[#1]
[\c!plaats=\@@kjplaats,
@@ -823,6 +882,9 @@
\newcount\noftopfloats \noftopfloats=2
\newcount\nofbotfloats \nofbotfloats=0
+\newif\ifnofloatcaption
+\newif\ifnofloatnumber
+
\def\docalculatefloatskip#1#2%
{\doifelsenothing{#2}
{\global#1\zeropoint}
@@ -880,27 +942,51 @@
\def\setfloatcaption % \dosetfloatcaption already in use
{\dodoubleempty\dodosetfloatcaption} % beware, name clash
+% \def\dodosetfloatcaption[#1][#2]#3% to do namespace for number/ascii
+% {\doifelsevalue{\??kj#1\c!nummer}{\v!ja} % also handle trialtypesetting
+% {\verhoognummer[#1]%
+% \maakhetnummer[#1]%
+% \global\let\flhetnummer\hetnummer
+% \setgvalue{@fl@r@#1}%
+% {\dofloatreference
+% \redofloatorder{#1}%
+% \doschrijfnaarlijst{#1}{\flhetnummer}{#3}{#1}%
+% \doglobal\convertargument#3\to\flasciititle % \asciititle is global
+% \doifsomething{#2}{\rawreference{\s!flt}{#2}{{\flhetnummer}{\flasciititle}}}%
+% \global\letvalue{@fl@r@#1}\relax}% nills
+% \setgvalue{@fl@t@#1}%
+% {\preparethenumber{\??kj#1}\flhetnummer\preparednumber
+% \doattributes{\??kj#1}\c!letter\c!kleur
+% {\doattributes{\??kj#1}\c!kopletter\c!kopkleur
+% {\labeltexts{#1}{\preparednumber}}%
+% \doattributes{\??kj#1}\c!tekstletter\c!tekstkleur
+% {\tfskip#3}}}}
+% {\global\letvalue{@fl@r@#1}\relax
+% \global\letvalue{@fl@t@#1}\relax}}
+
\def\dodosetfloatcaption[#1][#2]#3% to do namespace for number/ascii
- {\doifelsevalue{\??kj#1\c!nummer}{\v!ja} % also handle trialtypesetting
- {\verhoognummer[#1]%
- \maakhetnummer[#1]%
- \global\let\flhetnummer\hetnummer
- \setgvalue{@fl@r@#1}%
- {\dofloatreference
- \redofloatorder{#1}%
- \doschrijfnaarlijst{#1}{\flhetnummer}{#3}{#1}%
- \doglobal\convertargument#3\to\flasciititle % \asciititle is global
- \doifsomething{#2}{\rawreference{\s!flt}{#2}{{\flhetnummer}{\flasciititle}}}%
- \global\letvalue{@fl@r@#1}\relax}% nills
- \setgvalue{@fl@t@#1}%
- {\preparethenumber{\??kj#1}\flhetnummer\preparednumber
- \doattributes{\??kj#1}\c!letter\c!kleur
- {\doattributes{\??kj#1}\c!kopletter\c!kopkleur
- {\labeltexts{#1}{\preparednumber}}%
- \doattributes{\??kj#1}\c!tekstletter\c!tekstkleur
- {\tfskip#3}}}}
- {\global\letvalue{@fl@r@#1}\relax
- \global\letvalue{@fl@t@#1}\relax}}
+ {\ifnofloatnumber % also handle trialtypesetting
+ \global\letvalue{@fl@r@#1}\relax
+ \global\letvalue{@fl@t@#1}\relax
+ \else
+ \verhoognummer[#1]%
+ \maakhetnummer[#1]%
+ \global\let\flhetnummer\hetnummer
+ \setgvalue{@fl@r@#1}%
+ {\dofloatreference
+ \redofloatorder{#1}%
+ \doschrijfnaarlijst{#1}{\flhetnummer}{#3}{#1}%
+ \doglobal\convertargument#3\to\flasciititle % \asciititle is global
+ \doifsomething{#2}{\rawreference{\s!flt}{#2}{{\flhetnummer}{\flasciititle}}}%
+ \global\letvalue{@fl@r@#1}\relax}% nills
+ \setgvalue{@fl@t@#1}%
+ {\preparethenumber{\??kj#1}\flhetnummer\preparednumber
+ \doattributes{\??kj#1}\c!letter\c!kleur
+ {\doattributes{\??kj#1}\c!kopletter\c!kopkleur
+ {\labeltexts{#1}{\preparednumber}}%
+ \doattributes{\??kj#1}\c!tekstletter\c!tekstkleur
+ {\tfskip#3}}}%
+ \fi}
\def\placefloatcaptiontext [#1]{\getvalue{@fl@t@#1}}
\def\placefloatcaptionreference[#1]{\getvalue{@fl@r@#1}}
@@ -923,18 +1009,35 @@
\newbox\captionbox
+% \def\putcompletecaption#1#2#3#4%
+% {\noindent
+% \xdef\floatcaptionnumber{#1}%
+% \doattributes{\??kj#1}\c!letter\c!kleur
+% {\doifvalue{\??kj#1\c!nummer}{\v!ja}
+% {\hbox{\doattributes{\??kj#1}\c!kopletter\c!kopkleur{\strut#2\floatcaptionsuffix}}%
+% \ConvertToConstant\doifnot{#3}{}
+% {\ifcase#4\relax
+% \tfskip\emergencystretch=.5em
+% \else
+% \ifx\@@kjkjtussen\empty\else\unskip\@@kjkjtussen\fi
+% \fi}}%
+% \doattributes{\??kj#1}\c!tekstletter\c!tekstkleur
+% {\begstrut#3\endstrut\endgraf}}}
+
\def\putcompletecaption#1#2#3#4%
{\noindent
\xdef\floatcaptionnumber{#1}%
\doattributes{\??kj#1}\c!letter\c!kleur
- {\doifvalue{\??kj#1\c!nummer}{\v!ja}
- {\hbox{\doattributes{\??kj#1}\c!kopletter\c!kopkleur{\strut#2\floatcaptionsuffix}}%
- \ConvertToConstant\doifnot{#3}{}
- {\ifcase#4\relax
- \tfskip\emergencystretch=.5em
- \else
- \ifx\@@kjkjtussen\empty\else\unskip\@@kjkjtussen\fi
- \fi}}%
+ {\ifnofloatnumber
+ \else
+ \hbox{\doattributes{\??kj#1}\c!kopletter\c!kopkleur{\strut#2\floatcaptionsuffix}}%
+ \ConvertToConstant\doifnot{#3}{}
+ {\ifcase#4\relax
+ \tfskip\emergencystretch=.5em
+ \else
+ \ifx\@@kjkjtussen\empty\else\unskip\@@kjkjtussen\fi
+ \fi}%
+ \fi
\doattributes{\??kj#1}\c!tekstletter\c!tekstkleur
{\begstrut#3\endstrut\endgraf}}}
@@ -947,6 +1050,35 @@
%\stelblokkopjesin[\c!uitlijnen=\v!links]
%\stelblokkopjesin[\c!uitlijnen=\v!rechts]
+% \def\dosetpagfloat#1#2#3#4% \copy wegwerken
+% {\bgroup
+% \forgetall
+% \postponefootnotes
+% \mindermeldingen
+% \putborderedfloat#4\in\tempfloatbox\\%
+% \def\locatefloat%
+% {\doregelplaats\@@flflplaats}%
+% \ConvertToConstant\doifelse{#3}{\v!geen}
+% {\dopreparenocaption{#1}{#2}{#3}{#4}
+% \edef\width{\the\wd\floatbox}}
+% {\setbox\tempcaptionbox=\hbox
+% {\footnotesenabledfalse\putcompletecaption{#4}{#2}{#3}{0}}%
+% \doifinsetelse{\@@kjkjplaats}{\v!hoog,\v!midden,\v!laag}
+% {\dopreparesidecaption{#1}{#2}{#3}{#4}}
+% {\doifelse{\@@kjkjbreedte}{\v!max}
+% {\dopreparestackcaptionmax{#1}{#2}{#3}{#4}}
+% {\ifdim\wd\tempcaptionbox>\wd\tempfloatbox % wider caption
+% \doifelse{\@@kjkjbreedte}{\v!passend}
+% {\dopreparestackcaptionaut{#1}{#2}{#3}{#4}}
+% {\dopreparestackcaptionwid{#1}{#2}{#3}{#4}}%
+% \else
+% \dopreparestackcaptionmin{#1}{#2}{#3}{#4}%
+% \fi}}
+% \edef\width{\the\wd\tempfloatbox}%
+% \buildfloatbox}%
+% \postcenterfloatbox\width
+% \egroup}
+
\def\dosetpagfloat#1#2#3#4% \copy wegwerken
{\bgroup
\forgetall
@@ -955,24 +1087,26 @@
\putborderedfloat#4\in\tempfloatbox\\%
\def\locatefloat%
{\doregelplaats\@@flflplaats}%
- \ConvertToConstant\doifelse{#3}{\v!geen}
- {\dopreparenocaption{#1}{#2}{#3}{#4}
- \edef\width{\the\wd\floatbox}}
- {\setbox\tempcaptionbox=\hbox
- {\footnotesenabledfalse\putcompletecaption{#4}{#2}{#3}{0}}%
- \doifinsetelse{\@@kjkjplaats}{\v!hoog,\v!midden,\v!laag}
- {\dopreparesidecaption{#1}{#2}{#3}{#4}}
- {\doifelse{\@@kjkjbreedte}{\v!max}
- {\dopreparestackcaptionmax{#1}{#2}{#3}{#4}}
- {\ifdim\wd\tempcaptionbox>\wd\tempfloatbox % wider caption
- \doifelse{\@@kjkjbreedte}{\v!passend}
- {\dopreparestackcaptionaut{#1}{#2}{#3}{#4}}
- {\dopreparestackcaptionwid{#1}{#2}{#3}{#4}}%
- \else
- \dopreparestackcaptionmin{#1}{#2}{#3}{#4}%
- \fi}}
- \edef\width{\the\wd\tempfloatbox}%
- \buildfloatbox}%
+ \ifnofloatcaption
+ \dopreparenocaption{#1}{#2}{#3}{#4}
+ \edef\width{\the\wd\floatbox}%
+ \else
+ \setbox\tempcaptionbox=\hbox
+ {\footnotesenabledfalse\putcompletecaption{#4}{#2}{#3}{0}}%
+ \doifinsetelse{\@@kjkjplaats}{\v!hoog,\v!midden,\v!laag}
+ {\dopreparesidecaption{#1}{#2}{#3}{#4}}
+ {\doifelse{\@@kjkjbreedte}{\v!max}
+ {\dopreparestackcaptionmax{#1}{#2}{#3}{#4}}
+ {\ifdim\wd\tempcaptionbox>\wd\tempfloatbox % wider caption
+ \doifelse{\@@kjkjbreedte}{\v!passend}
+ {\dopreparestackcaptionaut{#1}{#2}{#3}{#4}}
+ {\dopreparestackcaptionwid{#1}{#2}{#3}{#4}}%
+ \else
+ \dopreparestackcaptionmin{#1}{#2}{#3}{#4}%
+ \fi}}
+ \edef\width{\the\wd\tempfloatbox}%
+ \buildfloatbox
+ \fi
\postcenterfloatbox\width
\egroup}
@@ -1175,6 +1309,41 @@
% {\hfill\box\floatbox\hfill}} % geen \hss, gaat mis in kolommen !
{\hss\box\floatbox\hss}} % wel \hss, anders mis in colset
+% \def\dosetparfloat#1#2#3#4%
+% {\bgroup
+% \forgetall
+% \postponefootnotes
+% \mindermeldingen
+% %\showcomposition
+% \putborderedfloat#4\in4\\
+% \ConvertToConstant\doifelse{#3}{\v!geen}
+% {\global\setbox\floatbox=\vbox{\box4}}
+% {\setbox2=\hbox
+% {\forgetall\putcompletecaption{#4}{#2}{#3}{0}}%
+% \doifelse{\@@kjkjbreedte}{\v!max}
+% {\dosetraggedvbox{\@@kjkjuitlijnen}%
+% \setbox2=\raggedbox
+% {\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}}%
+% {\doifelse{\@@kjkjbreedte}{\v!passend}
+% {\ifdim\wd2>\wd4\relax
+% \setbox2=\vbox
+% {\forgetall\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}%
+% \else
+% \setbox2=\hbox to \wd4
+% {\hss\box2\hss}%
+% \fi}
+% {\dosetraggedvbox{\@@kjkjuitlijnen}%
+% \setbox2=\raggedbox
+% {\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}}}%
+% \global\setbox\floatbox=\vbox
+% {\processaction
+% [\@@kjkjplaats]
+% [ \v!boven=>\box2\endgraf\@@kjkjtussen\box4,
+% \v!onder=>\box4\endgraf\@@kjkjtussen\box2,
+% \v!geen=>\box4,
+% \s!unknown=>\box4\endgraf\@@kjkjtussen\box2]}}%
+% \egroup}
+
\def\dosetparfloat#1#2#3#4%
{\bgroup
\forgetall
@@ -1182,63 +1351,103 @@
\mindermeldingen
%\showcomposition
\putborderedfloat#4\in4\\
- \ConvertToConstant\doifelse{#3}{\v!geen}
- {\global\setbox\floatbox=\vbox{\box4}}
- {\setbox2=\hbox
- {\forgetall\putcompletecaption{#4}{#2}{#3}{0}}%
- \doifelse{\@@kjkjbreedte}{\v!max}
- {\dosetraggedvbox{\@@kjkjuitlijnen}%
- \setbox2=\raggedbox
- {\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}}%
- {\doifelse{\@@kjkjbreedte}{\v!passend}
- {\ifdim\wd2>\wd4\relax
- \setbox2=\vbox
- {\forgetall\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}%
- \else
- \setbox2=\hbox to \wd4
- {\hss\box2\hss}%
- \fi}
- {\dosetraggedvbox{\@@kjkjuitlijnen}%
- \setbox2=\raggedbox
- {\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}}}%
- \global\setbox\floatbox=\vbox
- {\processaction
- [\@@kjkjplaats]
- [ \v!boven=>\box2\endgraf\@@kjkjtussen\box4,
- \v!onder=>\box4\endgraf\@@kjkjtussen\box2,
- \v!geen=>\box4,
- \s!unknown=>\box4\endgraf\@@kjkjtussen\box2]}}%
+ \ifnofloatcaption
+ \global\setbox\floatbox=\vbox{\box4}%
+ \else
+ \setbox2=\hbox
+ {\forgetall\putcompletecaption{#4}{#2}{#3}{0}}%
+ \doifelse{\@@kjkjbreedte}{\v!max}
+ {\dosetraggedvbox{\@@kjkjuitlijnen}%
+ \setbox2=\raggedbox
+ {\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}}%
+ {\doifelse{\@@kjkjbreedte}{\v!passend}
+ {\ifdim\wd2>\wd4\relax
+ \setbox2=\vbox
+ {\forgetall\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}%
+ \else
+ \setbox2=\hbox to \wd4
+ {\hss\box2\hss}%
+ \fi}
+ {\dosetraggedvbox{\@@kjkjuitlijnen}%
+ \setbox2=\raggedbox
+ {\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}}}%
+ \global\setbox\floatbox=\vbox
+ {\processaction
+ [\@@kjkjplaats]
+ [ \v!boven=>\box2\endgraf\@@kjkjtussen\box4,
+ \v!onder=>\box4\endgraf\@@kjkjtussen\box2,
+ \v!geen=>\box4,
+ \s!unknown=>\box4\endgraf\@@kjkjtussen\box2]}%
+ \fi
\egroup}
\newif\ifparfloat
+% \long\def\dosetfloatbox#1#2#3#4% todo : \global\setbox
+% {\ifvisible
+% \par
+% \doifcommonelse
+% {#1}
+% {\v!links,\v!rechts,\v!inlinker,\v!inrechter,\v!inmarge,%
+% \v!linkermarge,\v!linkerrand,\v!rechtermarge,\v!rechterrand}
+% {\global\parfloattrue}
+% {\global\parfloatfalse}%
+% \ifbinnenkolommen
+% \global\parfloatfalse
+% \fi
+% \edef\@@kjkjbreedte {\getvalue{\??kj#4\c!breedte }}%
+% \def\@@kjkjtussen {\getvalue{\??kj#4\c!tussen }}% no \edef
+% \edef\@@kjkjplaats {\getvalue{\??kj#4\c!plaats }}%
+% \edef\@@kjkjuitlijnen{\getvalue{\??kj#4\c!uitlijnen}}%
+% \edef\@@flflplaats {\getvalue{\??fl#4\c!plaats }}%
+% \ifparfloat
+% \@EA\dosetparfloat % {#1}{#2}{#3}{#4}%
+% \else
+% \@EA\dosetpagfloat % {#1}{#2}{#3}{#4}%
+% \fi{#1}{#2}{#3}{#4}%
+% \setbox\floatbox=\hbox{\restoretextcolor{\box\floatbox}}%
+% \global\floatheight\ht\floatbox
+% \global\advance\floatheight \dp\floatbox
+% \global\floatwidth\wd\floatbox
+% \global\advance\totalnoffloats 1
+% \doifnotinset{\v!marge}{#1} % gaat namelijk nog fout
+% {\setbox\floatbox=\vbox
+% {\parindent\zeropoint
+% \ifvoorlopig
+% \inleftmargin{\framed{\infofont\the\totalnoffloats}}%
+% \fi
+% \box\floatbox}}%
+% \wd\floatbox\floatwidth
+% \dimen0=\floatheight
+% \advance\dimen0 \lineheight
+% \ifdim\dimen0<\teksthoogte
+% \else
+% \global\floatheight\teksthoogte
+% \global\advance\floatheight -\lineheight
+% \ht\floatbox\floatheight
+% \dp\floatbox\zeropoint
+% \showmessage{\m!floatblocks}{10}{\the\totalnoffloats}%
+% \fi
+% \fi}
+
\long\def\dosetfloatbox#1#2#3#4% todo : \global\setbox
{\ifvisible
\par
- \doifcommonelse
- {#1}
- {\v!links,\v!rechts,\v!inlinker,\v!inrechter,\v!inmarge,%
- \v!linkermarge,\v!linkerrand,\v!rechtermarge,\v!rechterrand}
- {\global\parfloattrue}
- {\global\parfloatfalse}%
- \ifbinnenkolommen
- \global\parfloatfalse
- \fi
\edef\@@kjkjbreedte {\getvalue{\??kj#4\c!breedte }}%
- \def \@@kjkjtussen {\getvalue{\??kj#4\c!tussen }}% no \edef
+ \def\@@kjkjtussen {\getvalue{\??kj#4\c!tussen }}% no \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}%
+ \@EA\dosetparfloat % {#1}{#2}{#3}{#4}%
\else
- \dosetpagfloat{#1}{#2}{#3}{#4}%
- \fi
+ \@EA\dosetpagfloat % {#1}{#2}{#3}{#4}%
+ \fi{#1}{#2}{#3}{#4}%
\setbox\floatbox=\hbox{\restoretextcolor{\box\floatbox}}%
- \global\floatheight=\ht\floatbox
- \global\advance\floatheight by \dp\floatbox
- \global\floatwidth=\wd\floatbox
- \global\advance\totalnoffloats by 1
+ \global\floatheight\ht\floatbox
+ \global\advance\floatheight \dp\floatbox
+ \global\floatwidth\wd\floatbox
+ \global\advance\totalnoffloats 1
\doifnotinset{\v!marge}{#1} % gaat namelijk nog fout
{\setbox\floatbox=\vbox
{\parindent\zeropoint
@@ -1246,15 +1455,15 @@
\inleftmargin{\framed{\infofont\the\totalnoffloats}}%
\fi
\box\floatbox}}%
- \wd\floatbox=\floatwidth
+ \wd\floatbox\floatwidth
\dimen0=\floatheight
- \advance\dimen0 by \lineheight
+ \advance\dimen0 \lineheight
\ifdim\dimen0<\teksthoogte
\else
- \global\floatheight=\teksthoogte
- \global\advance\floatheight by -\lineheight
- \ht\floatbox=\floatheight
- \dp\floatbox=\zeropoint
+ \global\floatheight\teksthoogte
+ \global\advance\floatheight -\lineheight
+ \ht\floatbox\floatheight
+ \dp\floatbox\zeropoint
\showmessage{\m!floatblocks}{10}{\the\totalnoffloats}%
\fi
\fi}
@@ -1292,9 +1501,45 @@
{\dosetfloatbox{#1}{#2}{#3}{#4}%
\dogetfloatbox{#1}}%
+% \long\def\docompletefloat#1#2#3#4#5#6#7%
+% {\flushsidefloats
+% \calculatefloatskips{#1}%
+% \bgroup
+% \global\setbox\floatbox=\vbox{#7}%
+% \dimen0=\ht\floatbox
+% \advance\dimen0 by \dp\floatbox
+% \ifdim\dimen0=\zeropoint
+% \showmessage{\m!floatblocks}{11}{}%
+% \global\setbox\floatbox=\vbox{\getvalue{\e!lege#3}}%
+% \fi
+% \ConvertToConstant\doifelse{#6}{\v!geen}
+% {\global\setbox\floatbox=\vbox
+% {\unvbox\floatbox
+% \vss % gets rid of the depth
+% \rawpagereference{\s!flt}{#2}}%
+% \egroup\dofloat{#4}{}{#6}{#1}}
+% {\doglobal\convertargument#6\to\asciititle % \asciititle is global
+% \doifelsevalue{\??kj#1\c!nummer}{\v!ja}
+% {\verhoognummer[#1]%
+% \maakhetnummer[#1]%
+% \global\setbox\floatbox=\vbox
+% {\unvbox\floatbox % no \vss, keep the depth
+% \dofloatreference
+% \redofloatorder{#1}%
+% \rawreference{\s!flt}{#2}{{\hetnummer}{\asciititle}}%
+% \doschrijfnaarlijst{#3}{\hetnummer}{#6}{#3}}%
+% \egroup
+% \preparethenumber{\??kj#1}\hetnummer\preparednumber
+% \dofloat{#4}{\labeltexts{#5}{\preparednumber}}{#6}{#1}}
+% {\global\setbox\floatbox=\vbox
+% {\unvbox\floatbox % no \vss, keep the depth
+% \rawreference{\s!flt}{#2}{{}{\asciititle}}}%
+% \egroup\dofloat{#4}{}{#6}{#1}}}%
+% \global\insidefloatfalse}
+
\long\def\docompletefloat#1#2#3#4#5#6#7%
{\flushsidefloats
- \calculatefloatskips{#1}%
+\presetfloatvariables{#1}{#4}{#2}{#6}%
\bgroup
\global\setbox\floatbox=\vbox{#7}%
\dimen0=\ht\floatbox
@@ -1303,29 +1548,36 @@
\showmessage{\m!floatblocks}{11}{}%
\global\setbox\floatbox=\vbox{\getvalue{\e!lege#3}}%
\fi
- \ConvertToConstant\doifelse{#6}{\v!geen}
- {\global\setbox\floatbox=\vbox
- {\unvbox\floatbox
+ \ifnofloatcaption
+ \global\setbox\floatbox=\vbox
+ {\unvbox\floatbox
\vss % gets rid of the depth
\rawpagereference{\s!flt}{#2}}%
- \egroup\dofloat{#4}{}{#6}{#1}}
- {\doglobal\convertargument#6\to\asciititle % \asciititle is global
- \doifelsevalue{\??kj#1\c!nummer}{\v!ja}
- {\verhoognummer[#1]%
- \maakhetnummer[#1]%
- \global\setbox\floatbox=\vbox
- {\unvbox\floatbox % no \vss, keep the depth
- \dofloatreference
- \redofloatorder{#1}%
- \rawreference{\s!flt}{#2}{{\hetnummer}{\asciititle}}%
- \doschrijfnaarlijst{#3}{\hetnummer}{#6}{#3}}%
- \egroup
- \preparethenumber{\??kj#1}\hetnummer\preparednumber
- \dofloat{#4}{\labeltexts{#5}{\preparednumber}}{#6}{#1}}
- {\global\setbox\floatbox=\vbox
- {\unvbox\floatbox % no \vss, keep the depth
- \rawreference{\s!flt}{#2}{{}{\asciititle}}}%
- \egroup\dofloat{#4}{}{#6}{#1}}}%
+ \egroup
+ \dofloat{#4}{}{#6}{#1}%
+ \else
+ \doglobal\convertargument#6\to\asciititle % \asciititle is global
+% \doifelsevalue{\??kj#1\c!nummer}{\v!ja}
+ \ifnofloatnumber
+ \global\setbox\floatbox=\vbox
+ {\unvbox\floatbox % no \vss, keep the depth
+ \rawreference{\s!flt}{#2}{{}{\asciititle}}}%
+ \egroup
+ \dofloat{#4}{}{#6}{#1}%
+ \else
+ \verhoognummer[#1]%
+ \maakhetnummer[#1]%
+ \global\setbox\floatbox=\vbox
+ {\unvbox\floatbox % no \vss, keep the depth
+ \dofloatreference
+ \redofloatorder{#1}%
+ \rawreference{\s!flt}{#2}{{\hetnummer}{\asciititle}}%
+ \doschrijfnaarlijst{#3}{\hetnummer}{#6}{#3}}%
+ \egroup
+ \preparethenumber{\??kj#1}\hetnummer\preparednumber
+ \dofloat{#4}{\labeltexts{#5}{\preparednumber}}{#6}{#1}%
+ \fi
+ \fi
\global\insidefloatfalse}
\newif\ifmargeblokken
diff --git a/tex/context/base/page-ini.tex b/tex/context/base/page-ini.tex
index 37a99bdeb..9055997c2 100644
--- a/tex/context/base/page-ini.tex
+++ b/tex/context/base/page-ini.tex
@@ -606,7 +606,6 @@
\def\setvsize {\OTRcommand\setvsize}
\def\sethsize {\OTRcommand\sethsize}
-\def\setfootnotehsize {\OTRcommand\setfootnotehsize}
\def\finalsidefloatoutput {\OTRcommand\finalsidefloatoutput}
\def\dopagecontents {\OTRcommand\dopagecontents}
@@ -690,11 +689,7 @@
\newif\ifinotr
\def\invokeoutputroutine
- {\ifcsname\@@OTR\the\outputpenalty\endcsname
- \csname\@@OTR\the\outputpenalty\endcsname
- \else
- \the\OTRcommand\output
- \fi}
+ {\executeifdefined{\@@OTR\the\outputpenalty}{\the\OTRcommand\output}}
\mainoutput{\invokeoutputroutine} \output{\inotrtrue\the\mainoutput}
@@ -855,7 +850,7 @@
{\doejectpage\supereject}
\def\ejectinsert%
- {\flushfootnotes
+ {\flushnotes
\bgroup
\noftopfloats=\!!thousand
\nofbotfloats=0
@@ -1304,7 +1299,7 @@
\fi}
\def\docomplexpagina[#1]% % will be installable
- {\flushfootnotes
+ {\flushnotes
\bgroup
\processallactionsinset
[#1]
@@ -1410,7 +1405,7 @@
\egroup}
\def\simplepagina
- {\flushfootnotes
+ {\flushnotes
\ifpaginageblokkeerd\else
\ejectinsert
\ejectpage
diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex
index c60928b42..9700ee926 100644
--- a/tex/context/base/page-lay.tex
+++ b/tex/context/base/page-lay.tex
@@ -82,6 +82,13 @@
\getvalue{\??ly\currentlayout#1}%
\fi}
+\def\namedlayoutparameter#1#2%
+ {\ifundefined{\??ly#1#2}%
+ \layoutparameter{#2}%
+ \else
+ \getvalue{\??ly#1#2}%
+ \fi}
+
%D Look how ugly a speed up looks:
\beginTEX
@@ -91,6 +98,14 @@
\??ly\currentlayout#1\endcsname\relax\else\currentlayout
\fi#1\endcsname}
+\def\namedlayoutparameter#1#2%
+ {\csname\??ly
+ \@EA\ifx\csname\??ly#1#2\endcsname\relax
+ \@EA\ifx\csname\??ly\currentlayout#2\endcsname\relax
+ \else\currentlayout\fi
+ \else#1\fi
+ \fi#2\endcsname}
+
\endTEX
%D Its \ETEX\ counterpart is:
@@ -102,6 +117,11 @@
\??ly\currentlayout#1\endcsname\currentlayout
\fi#1\endcsname}
+\def\namedlayoutparameter#1#2%
+ {\csname\??ly\ifcsname\??ly #1#2\endcsname#1\else
+ \ifcsname\??ly\currentlayout#2\endcsname\currentlayout
+ \fi\fi#2\endcsname}
+
\endETEX
%D Beause normal \TEX\ has at most 256 dimensions (of which a
@@ -570,6 +590,9 @@
% inconsistent specification
\fi}}}%
{\global\zethoogte\layoutparameter\c!regels\lineheight
+% new, cleaner
+\global\advance\zethoogte-\strutheight
+\global\advance\zethoogte \topskip
% new, was a bug
\global\advance\zethoogte \hoofdafstand
\global\advance\zethoogte \voetafstand
@@ -603,6 +626,7 @@
\def\checkcurrentevenlayout
{\ifundefined{\??ly\v!even \c!status}\else\stellayoutin[\v!even ]\fi}
+
% not much faster at all
%
% \beginETEX
@@ -915,7 +939,7 @@
\def\freezetextwidth% % \zetbreedte may be set to \tekstbreedte
{\tekstbreedte\zetbreedte % which is a tricky but valid value
\doifsomething{\layoutparameter\c!tekstbreedte}
- {\tekstbreedte\layoutparaneter\c!tekstbreedte}}
+ {\tekstbreedte\layoutparameter\c!tekstbreedte}}
\def\calculatehsizes%
{\freezetextwidth
diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex
index 119702399..ffad4d540 100644
--- a/tex/context/base/page-lyr.tex
+++ b/tex/context/base/page-lyr.tex
@@ -64,26 +64,52 @@
%D Each layer automatically gets an associated overlay,
%D which can be used in any background assignment.
-\def\definelayer%
+% todo : links/rechts
+
+\def\definelayer
{\dodoubleargument\dodefinelayer}
+% \def\dodefinelayer[#1][#2]%
+% {\ifundefined{\@@layerbox#1}%
+% \expandafter\newbox\csname\@@layerbox#1\endcsname
+% \else
+% \resetlayer[#1]%
+% \fi
+% \defineoverlay
+% [#1][\composedlayer{#1}]%
+% \setuplayer
+% [#1]
+% [\c!status=\v!start,\c!richting=\v!normaal,\c!optie=,
+% \c!x=\!!zeropoint,\c!y=\!!zeropoint,\c!positie=\v!nee,
+% \c!breedte=\wd\nextbox,\c!hoogte=\ht\nextbox,
+% \c!offset=\!!zeropoint,\c!rotatie=, % geen 0 !
+% \c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint,
+% \c!plaats=rb,\c!positie=\v!nee,\c!pagina=,
+% \c!sx=1,\c!sy=1,\c!hoek=,#2]}
+
\def\dodefinelayer[#1][#2]%
- {\ifundefined{\@@layerbox#1}%
- \expandafter\newbox\csname\@@layerbox#1\endcsname
- \else
- \resetlayer[#1]%
- \fi
- \defineoverlay
- [#1][\composedlayer{#1}]%
- \setuplayer
+ {\setuplayer
[#1]
- [\c!status=\v!start,\c!richting=\v!normaal,\c!optie=,
+ [\c!dubbelzijdig=,
+ \c!status=\v!start,\c!richting=\v!normaal,\c!optie=,
\c!x=\!!zeropoint,\c!y=\!!zeropoint,\c!positie=\v!nee,
\c!breedte=\wd\nextbox,\c!hoogte=\ht\nextbox,
- \c!offset=\!!zeropoint,
+ \c!offset=\!!zeropoint,\c!rotatie=, % geen 0 !
\c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint,
\c!plaats=rb,\c!positie=\v!nee,\c!pagina=,
- \c!sx=1,\c!sy=1,\c!hoek=,#2]}
+ \c!sx=1,\c!sy=1,\c!hoek=,#2]%
+ \doifvalue{\??ll#1\v!dubbelzijdig}\v!ja
+ {\dopresetlayerbox{\v!links #1}%
+ \dopresetlayerbox{\v!rechts#1}}%
+ \dopresetlayerbox{#1}%
+ \defineoverlay[#1][\composedlayer{#1}]}
+
+\def\dopresetlayerbox#1%
+ {\ifundefined{\@@layerbox#1}%
+ \expandafter\newbox\csname\@@layerbox#1\endcsname
+ \else
+ \resetlayer[#1]%
+ \fi}
%D \macros
%D {setuplayer}
@@ -112,92 +138,78 @@
\def\currentlayerdata{0}
-\def\setlayer%
- {\dodoubleargument\dosetlayer}
+% \def\setlayer
+% {\dodoubleargument\dosetlayer}
+%
+% \def\dosetlayer[#1][#2]%
+% {\doifnotvalue{\??ll#1\c!status}{\v!stop}{\dodosetlayer[#1][#2]}}
+%
+% \def\dodosetlayer[#1][#2]%
+% {\bgroup
+% \recalculatebackgrounds
+% \recalculatelogos
+% \doglobal\increment\currentlayerdata
+% \forgetall
+% \dontcomplain
+% \doifvalue{\??ll#1\c!optie}{\v!test}
+% {\traceboxplacementtrue\tracelayerstrue}%
+% \dowithnextbox % sneller als aparte macro
+% {\ifundefined{\@@layerbox#1}%
+% \writestatus{layer}{unknown layer #1}%
+% \else
+% \dododosetlayer[#1][#2]%
+% \fi
+% \egroup}
+% \hbox}
-\def\dosetlayer[#1][#2]%
- {\doifnotvalue{\??ll#1\c!status}{\v!stop}{\dodosetlayer[#1][#2]}}
+\def\setlayer
+ {\dotripleempty\dosetlayer}
-\def\dodosetlayer[#1][#2]%
+\def\dosetlayer[#1][#2][#3]%
+ {\ifthirdargument
+ \doifnotvalue{\??ll#1\c!status}\v!stop{\dodosetlayer[#1][#2][#3]}%
+ \else
+ \doifnotvalue{\??ll#1\c!status}\v!stop{\dodosetlayer[#1][][#2]}%
+ \fi}
+
+\def\dodosetlayer[#1][#2][#3]% #2 = links/rechts
{\bgroup
\recalculatebackgrounds
\recalculatelogos
\doglobal\increment\currentlayerdata
\forgetall
\dontcomplain
- \doifvalue{\??ll#1\c!optie}{\v!test}
+ \doifvalue{\??ll#1\c!optie}\v!test
{\traceboxplacementtrue\tracelayerstrue}%
\dowithnextbox % sneller als aparte macro
{\ifundefined{\@@layerbox#1}%
\writestatus{layer}{unknown layer #1}%
\else
- \dododosetlayer[#1][#2]%
+ \dododosetlayer[#1][#2][#3]%
\fi
\egroup}
\hbox}
\newbox\layerbox
-% \def\dododosetlayer[#1][#2]%
-% {\getparameters[\??ll#1][#2]%
-% \doifvalue{\??ll#1\c!positie}{\v!overlay}
-% {\getparameters[\??ll#1]
-% [\c!positie=\v!ja,
-% \c!breedte=\!!zeropoint,
-% \c!hoogte=\!!zeropoint]}%
-% \doifelsevalue{\??ll#1\c!positie}{\v!ja}
-% {\edef\layerpage{\MPp{lyr:\currentlayerdata}}%
-% \scratchdimen\MPx{lyr:#1:\layerpage}\scratchdimen-\scratchdimen
-% \advance\scratchdimen\MPx{lyr:\currentlayerdata}%
-% \setevalue{\??ll#1\c!x}{\the\scratchdimen}%
-% \scratchdimen\MPy{lyr:#1:\layerpage}%
-% \advance\scratchdimen-\MPy{lyr:\currentlayerdata}%
-% \setevalue{\??ll#1\c!y}{\the\scratchdimen}%
-% \setxvalue{\??ll#1\layerpage\c!positie}{\v!ja}%
-% \setxvalue{\??ll#1\c!status}{\v!start}% needed ?
-% \setbox\layerbox\vbox to \getvalue{\??ll#1\c!hoogte} % \ht\nextbox
-% {\hbox to \getvalue{\??ll#1\c!breedte} % \wd\nextbox
-% {\xypos{lyr:\currentlayerdata}\hss}%
-% \vss}}
-% {\setbox\layerbox=\emptybox
-% \edef\layerpage{\getvalue{\??ll#1\c!pagina}}}%
-% \doifsomething{\layerpage}
-% {\edef\layerpage{:\layerpage}%
-% \doifundefined{\@@layerbox#1\layerpage}
-% {\global\expandafter\newbox\csname\@@layerbox#1\layerpage\endcsname}}%
-% \global\setbox\csname\@@layerbox#1\layerpage\endcsname=\vbox
-% {\offinterlineskip
-% \ifvoid\csname\@@layerbox#1\layerpage\endcsname\else
-% \ht\csname\@@layerbox#1\layerpage\endcsname\zeropoint
-% \dp\csname\@@layerbox#1\layerpage\endcsname\zeropoint
-% \wd\csname\@@layerbox#1\layerpage\endcsname\zeropoint
-% \doifnotvalue{\??ll#1\c!richting}{\v!omgekeerd}
-% {\box\csname\@@layerbox#1\layerpage\endcsname}%
-% \fi
-% \setbox\nextbox=\hbox
-% {\alignedbox[\getvalue{\??ll#1\c!plaats}]\vbox{\box\nextbox}}%
-% \smashbox\nextbox
-% \scratchdimen=\getvalue{\??ll#1\c!y}%
-% \advance\scratchdimen\getvalue{\??ll#1\c!voffset}%
-% \vskip\scratchdimen
-% \hskip\getvalue{\??ll#1\c!x}%
-% \hskip\getvalue{\??ll#1\c!hoffset}%
-% \box\nextbox % \hfill
-% \ifvoid\csname\@@layerbox#1\layerpage\endcsname
-% % already flushed
-% \else
-% % the reverse case
-% \vskip-\scratchdimen
-% \box\csname\@@layerbox#1\layerpage\endcsname
-% \fi}%
-% \ifvoid\layerbox\else\box\layerbox\fi}
-
\newdimen\@@layerxsiz \newdimen\@@layerxoff \newdimen\@@layerxpos
\newdimen\@@layerysiz \newdimen\@@layeryoff \newdimen\@@layerypos
\let\lastlayerxpos\!!zeropoint
\let\lastlayerypos\!!zeropoint
+% todo left/right
+
+\def\setlastlayerpos#1%
+ {\edef\layerpage{\MPp{lyr:\currentlayerdata}}%
+ \scratchdimen\MPx{lyr:#1:\layerpage}%
+ \scratchdimen-\scratchdimen
+ \advance\scratchdimen\MPx{lyr:\currentlayerdata}%
+ \xdef\lastlayerxpos{\the\scratchdimen}%
+ \scratchdimen\MPy{lyr:#1:\layerpage}%
+ \advance\scratchdimen-\MPy{lyr:\currentlayerdata}%
+ \xdef\lastlayerypos{\the\scratchdimen}}
+
% \def\dododosetlayer[#1][#2]% will be sped up
% {\getparameters[\??ll#1][#2]%
% \doifvalue{\??ll#1\c!positie}\v!overlay % slow
@@ -205,6 +217,12 @@
% [\c!breedte=\!!zeropoint,
% \c!hoogte=\!!zeropoint,
% \c!positie=\v!ja]}%
+% \doifvaluesomething{\??ll#1\c!rotatie}
+% {\setbox\nextbox\hbox
+% {\rotate
+% [\c!plaats=\v!hoog,
+% \c!rotatie=\getvalue{\??ll#1\c!rotatie}]
+% {\box\nextbox}}}%
% \@@layerxsiz\getvalue{\??ll#1\c!breedte}%
% \@@layerysiz\getvalue{\??ll#1\c!hoogte }%
% \@@layerxpos\getvalue{\??ll#1\c!x}%
@@ -222,16 +240,9 @@
% \@@layerxoff\getvalue{\??ll#1\c!sx}\@@layerxoff
% \@@layeryoff\getvalue{\??ll#1\c!sy}\@@layeryoff
% \doifelsevalue{\??ll#1\c!positie}{\v!ja} % combine ^
-% {\edef\layerpage{\MPp{lyr:\currentlayerdata}}%
-% \scratchdimen\MPx{lyr:#1:\layerpage}%
-% \scratchdimen-\scratchdimen
-% \advance\scratchdimen\MPx{lyr:\currentlayerdata}%
-% \xdef\lastlayerxpos{\the\scratchdimen}%
-% \@@layerxpos\scratchdimen
-% \scratchdimen\MPy{lyr:#1:\layerpage}%
-% \advance\scratchdimen-\MPy{lyr:\currentlayerdata}%
-% \@@layerypos\scratchdimen
-% \xdef\lastlayerypos{\the\scratchdimen}%
+% {\setlastlayerpos{#1}%
+% \@@layerxpos\lastlayerxpos
+% \@@layerypos\lastlayerypos
% \setxvalue{\??ll#1\layerpage\c!positie}{\v!ja}%
% \setxvalue{\??ll#1\c!status}{\v!start}% needed ?
% \setbox\layerbox\vbox to \@@layerysiz
@@ -239,12 +250,18 @@
% {\setbox\layerbox=\emptybox
% \global\let\lastlayerxpos\!!zeropoint
% \global\let\lastlayerypos\!!zeropoint
-% \doifvalue{\??ll#1\c!hoek}{\v!onder}
+% \ExpandBothAfter\doifinset{\v!onder}{\getvalue{\??ll#1\c!hoek}}
% {\ifdim\@@layerysiz>\zeropoint
% \advance\@@layerypos-\@@layerysiz
% \@@layerypos-\@@layerypos
% \@@layeryoff-\@@layeryoff
% \fi}%
+% \ExpandBothAfter\doifinset{\v!rechts}{\getvalue{\??ll#1\c!hoek}}
+% {\ifdim\@@layerxsiz>\zeropoint
+% \advance\@@layerxpos-\@@layerxsiz
+% \@@layerxpos-\@@layerxpos
+% \@@layerxoff-\@@layerxoff
+% \fi}%
% \edef\layerpage{\getvalue{\??ll#1\c!pagina}}}%
% \doifsomething{\layerpage}
% {\edef\layerpage{:\layerpage}%
@@ -252,6 +269,7 @@
% {\global\expandafter\newbox\csname\@@layerbox#1\layerpage\endcsname}}%
% \global\setbox\csname\@@layerbox#1\layerpage\endcsname=\vbox
% {\offinterlineskip
+% \hsize\getvalue{\??ll#1\c!breedte}% new, keep box small
% \ifvoid\csname\@@layerbox#1\layerpage\endcsname\else
% \ht\csname\@@layerbox#1\layerpage\endcsname\zeropoint
% \dp\csname\@@layerbox#1\layerpage\endcsname\zeropoint
@@ -277,23 +295,19 @@
% \fi}%
% \ifvoid\layerbox\else\box\layerbox\fi}
-\def\setlastlayerpos#1%
- {\edef\layerpage{\MPp{lyr:\currentlayerdata}}%
- \scratchdimen\MPx{lyr:#1:\layerpage}%
- \scratchdimen-\scratchdimen
- \advance\scratchdimen\MPx{lyr:\currentlayerdata}%
- \xdef\lastlayerxpos{\the\scratchdimen}%
- \scratchdimen\MPy{lyr:#1:\layerpage}%
- \advance\scratchdimen-\MPy{lyr:\currentlayerdata}%
- \xdef\lastlayerypos{\the\scratchdimen}}
-
-\def\dododosetlayer[#1][#2]% will be sped up
- {\getparameters[\??ll#1][#2]%
+\def\dododosetlayer[#1][#2][#3]% will be sped up
+ {\getparameters[\??ll#1][#3]%
\doifvalue{\??ll#1\c!positie}\v!overlay % slow
{\getparameters[\??ll#1]
[\c!breedte=\!!zeropoint,
\c!hoogte=\!!zeropoint,
\c!positie=\v!ja]}%
+ \doifvaluesomething{\??ll#1\c!rotatie}
+ {\setbox\nextbox\hbox
+ {\rotate
+ [\c!plaats=\v!hoog,
+ \c!rotatie=\getvalue{\??ll#1\c!rotatie}]
+ {\box\nextbox}}}%
\@@layerxsiz\getvalue{\??ll#1\c!breedte}%
\@@layerysiz\getvalue{\??ll#1\c!hoogte }%
\@@layerxpos\getvalue{\??ll#1\c!x}%
@@ -311,45 +325,51 @@
\@@layerxoff\getvalue{\??ll#1\c!sx}\@@layerxoff
\@@layeryoff\getvalue{\??ll#1\c!sy}\@@layeryoff
\doifelsevalue{\??ll#1\c!positie}{\v!ja} % combine ^
- {%\edef\layerpage{\MPp{lyr:\currentlayerdata}}%
- %\scratchdimen\MPx{lyr:#1:\layerpage}%
- %\scratchdimen-\scratchdimen
- %\advance\scratchdimen\MPx{lyr:\currentlayerdata}%
- %\xdef\lastlayerxpos{\the\scratchdimen}%
- %\@@layerxpos\scratchdimen
- %\scratchdimen\MPy{lyr:#1:\layerpage}%
- %\advance\scratchdimen-\MPy{lyr:\currentlayerdata}%
- %\@@layerypos\scratchdimen
- %\xdef\lastlayerypos{\the\scratchdimen}%
-\setlastlayerpos{#1}%
-\@@layerxpos\lastlayerxpos
-\@@layerypos\lastlayerypos
+ {\setlastlayerpos{#2#1}% todo l/r %%%%%%%%%%%%
+ \@@layerxpos\lastlayerxpos
+ \@@layerypos\lastlayerypos
\setxvalue{\??ll#1\layerpage\c!positie}{\v!ja}%
\setxvalue{\??ll#1\c!status}{\v!start}% needed ?
\setbox\layerbox\vbox to \@@layerysiz
{\hbox to \@@layerxsiz{\xypos{lyr:\currentlayerdata}\hss}\vss}}
- {\setbox\layerbox=\emptybox
+ {\setbox\layerbox\emptybox
\global\let\lastlayerxpos\!!zeropoint
\global\let\lastlayerypos\!!zeropoint
- \doifvalue{\??ll#1\c!hoek}{\v!onder}
+ \ExpandBothAfter\doifinset{\v!onder}{\getvalue{\??ll#1\c!hoek}}
{\ifdim\@@layerysiz>\zeropoint
\advance\@@layerypos-\@@layerysiz
\@@layerypos-\@@layerypos
\@@layeryoff-\@@layeryoff
\fi}%
+ \ExpandBothAfter\doifinset{\v!rechts}{\getvalue{\??ll#1\c!hoek}}
+ {\ifdim\@@layerxsiz>\zeropoint
+ \advance\@@layerxpos-\@@layerxsiz
+ \@@layerxpos-\@@layerxpos
+ \@@layerxoff-\@@layerxoff
+ \fi}%
+ \ExpandBothAfter\doif{\v!midden}{\getvalue{\??ll#1\c!hoek}}
+ {\ifdim\@@layerxsiz>\zeropoint
+ \advance\@@layerxpos.5\@@layerxsiz
+ \fi
+ \ifdim\@@layerysiz>\zeropoint
+ \advance\@@layerypos.5\@@layerysiz
+ \fi}%
\edef\layerpage{\getvalue{\??ll#1\c!pagina}}}%
\doifsomething{\layerpage}
{\edef\layerpage{:\layerpage}%
- \doifundefined{\@@layerbox#1\layerpage}
- {\global\expandafter\newbox\csname\@@layerbox#1\layerpage\endcsname}}%
- \global\setbox\csname\@@layerbox#1\layerpage\endcsname=\vbox
+ \doifundefined{\@@layerbox#2#1\layerpage}
+ {\global\expandafter\newbox\csname\@@layerbox#2#1\layerpage\endcsname}}%
+\dontcomplain
+ \global\setbox\csname\@@layerbox#2#1\layerpage\endcsname\vbox
+to \getvalue{\??ll#1\c!hoogte}% new, otherwise no negative y possible
{\offinterlineskip
+ \hsize\getvalue{\??ll#1\c!breedte}% new, keep box small
\ifvoid\csname\@@layerbox#1\layerpage\endcsname\else
- \ht\csname\@@layerbox#1\layerpage\endcsname\zeropoint
- \dp\csname\@@layerbox#1\layerpage\endcsname\zeropoint
- \wd\csname\@@layerbox#1\layerpage\endcsname\zeropoint
+ \ht\csname\@@layerbox#2#1\layerpage\endcsname\zeropoint
+ \dp\csname\@@layerbox#2#1\layerpage\endcsname\zeropoint
+ \wd\csname\@@layerbox#2#1\layerpage\endcsname\zeropoint
\doifnotvalue{\??ll#1\c!richting}{\v!omgekeerd}
- {\box\csname\@@layerbox#1\layerpage\endcsname}%
+ {\box\csname\@@layerbox#2#1\layerpage\endcsname}%
\fi
\setbox\nextbox=\hbox
{\alignedbox[\getvalue{\??ll#1\c!plaats}]\vbox{\box\nextbox}}%
@@ -359,13 +379,13 @@
\hskip\@@layerxpos
\hskip\@@layerxoff
\box\nextbox
- \ifvoid\csname\@@layerbox#1\layerpage\endcsname
+ \ifvoid\csname\@@layerbox#2#1\layerpage\endcsname
% already flushed
\else
% the reverse case % check !
\vskip-\@@layerypos
\vskip-\@@layeryoff
- \box\csname\@@layerbox#1\layerpage\endcsname
+ \box\csname\@@layerbox#2#1\layerpage\endcsname
\fi}%
\ifvoid\layerbox\else\box\layerbox\fi}
@@ -383,28 +403,79 @@
%D efficient in \ETEX\ since there testing for an undefined
%D macro does not takes hash space.
+% \unexpanded\def\flushlayer[#1]%
+% {\doifnotvalue{\??ll#1\c!status}{\v!stop}
+% {\startoverlay
+% {\doflushlayer1{#1}{#1}}
+% {\doflushlayer0{#1}{#1:\realfolio}}
+% \stopoverlay}}
+%
+% \def\doflushlayer#1#2#3%
+% {\ifundefined{\@@layerbox#3}%
+% \ifcase#1\else\writestatus{layer}{unknown layer #3}\fi
+% \else
+% \doifvalue{\??ll#2\c!optie}{\v!test}
+% {\traceboxplacementtrue\tracelayerstrue}%
+% \iftracelayers \ruledvbox \else \vbox \fi to \overlayheight
+% {\forgetall
+% \hbox to \overlaywidth
+% {\doifvalue{\??ll#3\realfolio\c!positie}{\v!ja}
+% {\xypos{lyr:#3:\realfolio}}%
+% \let\next\box
+% \ifcase#1\else
+% \doifnotvalue{\??ll#2\c!positie}{\v!ja}
+% {\doifvalue{\??ll#2\c!status}{\v!herhaal}
+% {\let\next\copy}}%
+% \fi
+% \next\csname\@@layerbox#3\endcsname
+% \hss}%
+% \vss}%
+% \fi}
+
\unexpanded\def\flushlayer[#1]%
- {\doifnotvalue{\??ll#1\c!status}{\v!stop}
+ {\doifelsevalue{\??ll#1\v!dubbelzijdig}\v!ja
+ {\doifundefinedelse{\@@layerbox#1}%
+ {\dodoflushlayerA[#1]}
+ {\doifbothsidesoverruled
+ \dodoflushlayerB[#1][\v!links]% left
+ \orsideone
+ \dodoflushlayerB[#1][\v!rechts]% right
+ \orsidetwo
+ \dodoflushlayerB[#1][\v!links]% left
+ \od}}
+ {\dodoflushlayerA[#1]}}
+
+\def\dodoflushlayerA[#1]%
+ {\doifnotvalue{\??ll#1\c!status}\v!stop
+ {\startoverlay
+ {\dodoflushlayer1{#1}{#1}}
+ {\dodoflushlayer0{#1}{#1:\realfolio}}
+ \stopoverlay}}
+
+\def\dodoflushlayerB[#1][#2]%
+ {\doifnotvalue{\??ll#1\c!status}\v!stop
{\startoverlay
- {\doflushlayer1{#1}{#1}}
- {\doflushlayer0{#1}{#1:\realfolio}}
+ {\dodoflushlayer1{#1}{#1}}
+ {\dodoflushlayer0{#1}{#1:\realfolio}}
+ {\dodoflushlayer1{#1}{#2#1}}
+ {\dodoflushlayer0{#1}{#2#1:\realfolio}}
\stopoverlay}}
-\def\doflushlayer#1#2#3%
+\def\dodoflushlayer#1#2#3%
{\ifundefined{\@@layerbox#3}%
\ifcase#1\else\writestatus{layer}{unknown layer #3}\fi
\else
- \doifvalue{\??ll#2\c!optie}{\v!test}
+ \doifvalue{\??ll#2\c!optie}\v!test
{\traceboxplacementtrue\tracelayerstrue}%
\iftracelayers \ruledvbox \else \vbox \fi to \overlayheight
{\forgetall
\hbox to \overlaywidth
- {\doifvalue{\??ll#3\realfolio\c!positie}{\v!ja}
+ {\doifvalue{\??ll#3\realfolio\c!positie}\v!ja
{\xypos{lyr:#3:\realfolio}}%
\let\next\box
\ifcase#1\else
- \doifnotvalue{\??ll#2\c!positie}{\v!ja}
- {\doifvalue{\??ll#2\c!status}{\v!herhaal}
+ \doifnotvalue{\??ll#2\c!positie}\v!ja
+ {\doifvalue{\??ll#2\c!status}\v!herhaal
{\let\next\copy}}%
\fi
\next\csname\@@layerbox#3\endcsname
diff --git a/tex/context/base/page-mar.tex b/tex/context/base/page-mar.tex
index eff06688e..117548a56 100644
--- a/tex/context/base/page-mar.tex
+++ b/tex/context/base/page-mar.tex
@@ -242,7 +242,7 @@
#2{#6}%
\fi]%
\rawpagereference{\s!mar}{#5}%
- \flushfootnotes\egroup % don't forget the group
+ \flushnotes\egroup % don't forget the group
\ignorespaces}
\def\inlinker%
diff --git a/tex/context/base/page-mul.tex b/tex/context/base/page-mul.tex
index cddde6727..c5efdb741 100644
--- a/tex/context/base/page-mul.tex
+++ b/tex/context/base/page-mul.tex
@@ -26,7 +26,6 @@
\let\OTRMULsetvsize \OTRONEsetvsize
\let\OTRMULsethsize \OTRONEsethsize
-\let\OTRMULsetfootnotehsize \OTRONEsetfootnotehsize
\let\OTRMULdopagecontents \OTRONEdopagecontents
\let\OTRMULfinalsidefloatoutput\OTRONEfinalsidefloatoutput
\let\OTRMULflushfloatbox \OTRONEflushfloatbox
@@ -288,8 +287,10 @@
\ifdim\precolumnboxheight>\zeropoint
\global\advance\vsize by -\precolumnboxheight
\fi
- \getinsertionheights\to\dimen0\\%
- \global\advance\vsize by -\dimen0
+ %\getinsertionheights\to\dimen0\\%
+ %\global\advance\vsize by -\dimen0
+ \settotalinsertionheight
+ \global\advance\vsize -\totalinsertionheight
%%%\ifgridsnapping % evt altijd, nog testen, testing now, see columned tocs
\getnoflines\vsize
\vsize=\noflines\openlineheight
@@ -317,7 +318,7 @@
\def\beginmulticolumns%
{\par
- \flushfootnotes
+ \flushnotes
\xdef\precolumndepth{\the\prevdepth}%
\begingroup
\dontshowcomposition
@@ -392,9 +393,9 @@
{%\par
\vskip\lineheight\vskip-\lineheight % take footnotes into account
\dontshowcomposition
- \doflushcolumnfloat % added recently
+ \doflushcolumnfloat % added recently
%\doflushcolumnfloats % no, since it results in wrong top floats
- \flushfootnotes % before start of columns
+ \flushnotes % before start of columns
\par
\ifbalancecolumns
\global\output={\continuousmulticolumnsout}%
@@ -706,16 +707,16 @@
{\relax
\ifcleverfootnotes
\ifnum#1=\lastcolumnbox\relax
- \calculatefootnotevsize
- \advance#2 -\footnotevsize
+ \calculatetotalnoteheight
+ \advance#2 -\totalnoteheight
\fi
\fi}
\def\overlaycolumnfootnotes% VERVANGEN !!!
{\relax
\ifcleverfootnotes
- \checkfootnotepresence
- \iffootnotespresent
+ \checknotepresence
+ \ifnotespresent
\bgroup
\scratchdimen=\ht\firstcolumnbox
\advance\scratchdimen by -\openstrutdepth % \dp\strutbox
@@ -760,7 +761,6 @@
\setbox\restofpage=\vbox{\unvbox\normalpagebox}%
\ifinheritcolumns
\ifr@ggedbottom % vreemd
-%\ifbottomnotes % can better be a state
\dohandleallcolumns
{\global\setbox\currentcolumnbox=\vbox to \ht\firstcolumnbox
{\dimen0=\dp\currentcolumnbox
@@ -769,12 +769,9 @@
\vskip\openstrutdepth % \dp\strutbox
\prevdepth\openstrutdepth % \dp\strutbox
\vfill}}%
-%\else
-% \dimen0=\ht\firstcolumnbox
-%\fi
-\ifbottomnotes \else
- \dimen0=\ht\firstcolumnbox
-\fi
+ \ifbottomnotes \else
+ \dimen0=\ht\firstcolumnbox
+ \fi
\fi
\ifn@rmalbottom
\advance\dimen0 by \maxdepth
@@ -1017,7 +1014,7 @@
\def\setlocalcolumnfloats%
{\everypar=
- {\flushfootnotes\flushcolumnfloat\flushmargincontents\checkindentation}%
+ {\flushnotes\flushcolumnfloat\flushmargincontents\checkindentation}%
\let\flushcolumnfloat=\doflushcolumnfloat
%\let\doroomfloat=\docolumnroomfloat
\let\docheckiffloatfits=\docolumnroomfloat
diff --git a/tex/context/base/page-new.tex b/tex/context/base/page-new.tex
index af4729922..c72c14cfe 100644
--- a/tex/context/base/page-new.tex
+++ b/tex/context/base/page-new.tex
@@ -1,3 +1,7 @@
+\unprotect
+
+% clean up footnotes to notes
+
% We need to set the \dimen globally since we are in the
% OTR. Unfortunately this interferes with local settings,
% although we may assume that they will not cross page
@@ -57,7 +61,7 @@
% prepare trial box
\global\setbox5=\vbox
{\ifdim\ht1>\!!zeropoint
- \unvcopy1 \ifdim\ht3>\!!zeropoint \kern\skip\footins \fi
+ \unvcopy1 \ifdim\ht3>\zeropoint \kern\skip\footins \fi
\fi
\ifdim\ht3>\!!zeropoint \unvcopy3 \fi}
\egroup
@@ -181,9 +185,9 @@
\columnsettextbox\recurselevel=\hbox
{\raise\dp\strutbox\hbox % ugly but needed
{\setfootnotebodyfont % both these moves
- \lower\dp\strutbox\hbox{\placefootnotes}}}
+ \lower\dp\strutbox\hbox{\placebottomnotes}}}
\else
- \columnsetfootbox\recurselevel=\hbox{\placefootnotes}
+ \columnsetfootbox\recurselevel=\hbox{\placebottomnotes}
\fi
\fi
\fi}
@@ -197,3 +201,5 @@
\OTRSETdoflush
\fi
\egroup}
+
+\protect \endinput
diff --git a/tex/context/base/page-not.tex b/tex/context/base/page-not.tex
index e4883edc5..0e36ee314 100644
--- a/tex/context/base/page-not.tex
+++ b/tex/context/base/page-not.tex
@@ -26,22 +26,22 @@
\def\checkbegincolumnfootnotes % should happen inside otr
{\ifcleverfootnotes
- \doflushfootnotes
+ \doflushnotes
\saveinsertionbox\footins
\else
\eraseinsertionbackup\footins
\fi
\saveinsertiondata\footins
- \setupfootnotes}
+ \checknotes}
\def\checkendcolumnfootnotes
- {\restoreinsertiondata\footins
+ {\restoreinsertiondata\footins % maybe better just \checknotes
\ifcleverfootnotes
\restoreinsertionbox\footins
\fi}
\def\checksinglecolumnfootnotes
- {\restoreinsertiondata\footins}
+ {\checknotes} % njet : \restoreinsertiondata\footins
\def\columnfootins % expands to an insert number
{\ifcleverfootnotes
@@ -56,43 +56,40 @@
\def\settotalinsertionheight
{\totalinsertionheight\zeropoint
- \doaddinsertionheight\topins \to\totalinsertionheight
- \doaddinsertionheight\botins \to\totalinsertionheight
- \doaddinsertionheight\columnfootins\to\totalinsertionheight}
-
-% also wrong place + wrong macro
-
-\def\synchronizevsize
- {\ifdim\ht\footins>\zeropoint % updates vsize
- \insert\footins{\unvbox\footins}%
- \fi}
+ \addinsertionheight\topins \to\totalinsertionheight
+ \addinsertionheight\botins \to\totalinsertionheight
+ \addinsertionheight\columnfootins\to\totalinsertionheight}
% idem
-\def\enablecolumnfootnotes
+\def\enablenotes
{\global\count\footins=1000
\global\skip\footins=1\baselineskip\relax}
-\def\disablecolumnfootnotes
+\def\disablenotes
{\global\count\footins=0
\global\skip\footins=\zeropoint}
% also
-\def\flushsavedcolumnfootnotes
- {\insert\footins{\unvbox\OTRSETsavedfootnotes}}
-
-\def\savecolumnfootnotes
- {\global\setbox\OTRSETsavedfootnotes=\vbox
- {\unvbox\OTRSETsavedfootnotes\box\footins}}
+%\def\flushsavedcolumnfootnotes
+% {\insert\footins{\unvbox\OTRSETsavedfootnotes}}
+%
+%\def\savecolumnfootnotes
+% {\global\setbox\OTRSETsavedfootnotes=\vbox
+% {\unvbox\OTRSETsavedfootnotes\box\footins}}
-% hack
+\newbox\savednotes
-\def\savefootnotedimensions
- {\edef\savedfootnotedimen{\the\dimen\footins}}
+\def\flushsavednotes
+ {\ifvoid\savednotes\else
+ \insert\footins{\unvbox\savednotes}%
+ \fi}
-\def\restorefootnotedimensions
- {\dimen\footins\savedfootnotedimen}
+\def\savenotes
+ {\global\setbox\savednotes=\vbox
+ {\ifvoid\savednotes\else\unvbox\savednotes\fi
+ \box\footins}}
% hm
@@ -100,13 +97,13 @@
\def\checkbegincolumnfootnotes % should happen inside otr
{\ifcleverfootnotes
- \doflushfootnotes
+ \doflushnotes
\saveinsertionbox\footins
\else
\eraseinsertionbackup\footins
\fi
\saveinsertiondata\footins
- \setupfootnotes}
+ \checknotes}
\def\checkendcolumnfootnotes
{\restoreinsertiondata\footins
diff --git a/tex/context/base/page-num.tex b/tex/context/base/page-num.tex
index 12785d030..25fe38c0f 100644
--- a/tex/context/base/page-num.tex
+++ b/tex/context/base/page-num.tex
@@ -458,15 +458,6 @@
%
% best, beware, chapter (yes) can be followed by title (no)
-%\def\preparepaginaprefix#1%
-% {\def\dopreparepaginaprefix##1%
-% {\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\preparepaginaprefix#1%
{\def\dopreparepaginaprefix##1%
{\letvalue{#1\getvalue{\??by##1}\v!nummer}\v!nee}% %v
@@ -476,48 +467,42 @@
{\letvalue{#1\getvalue{\??by##1}\v!nummer}\v!ja}}%
\rawprocesscommalist[\@@kolijst]\dopreparepaginaprefix}
-% \def\dopaginaprefix#1#2%
+% \def\dodopaginaprefix#1% uti seperator --
% {\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
+% \doifelsevalue{\paginatype#1\v!nummer}\v!ja % \v! and no \c!
+% {\@EA\beforesplitstring\@EA\postprefix\@EA\at\sectionseparator\to\preprefix
+% \@EA\aftersplitstring \@EA\postprefix\@EA\at\sectionseparator\to\postprefix
% \let\uchar\normaluchar % ugly but needed
-% \doifsomething{\preprefix}
-% {\doifnot{\preprefix}{0}{\preprefix\@@nmnummerscheider}}}%
-% {\@EA\aftersplitstring\@EA{\postprefix}\at:\to\postprefix
+% \ifx\preprefix\empty \else
+% \ifx\preprefix\zerocountervalue\else
+% \preprefix\@@nmnummerscheider
+% \fi
+% \fi}
+% {\@EA\aftersplitstring\@EA\postprefix\@EA\at\sectionseparator\to\postprefix
% \let\uchar\normaluchar}} % ugly but needed
-%
-% \def\paginaprefix#1[#2::#3::#4]% kan wat sneller ####1:0:
-% {\bgroup
-% \edef\postprefix{#3}%
-% \def\donexttrackcommando##1%
-% {\dopaginaprefix{#1}{##1}%
-% \donexttracklevel{##1}}%
-% \donexttrackcommando\firstsection
-% \egroup}
-
-\def\dodopaginaprefix#1%
+
+\def\dodopaginaprefix#1% uti seperator --
{\let\normaluchar\uchar\let\uchar\relax % ugly but needed
\doifelsevalue{\paginatype#1\v!nummer}\v!ja % \v! and no \c!
- {\@EA\beforesplitstring\postprefix\at:\to\preprefix
- \@EA\aftersplitstring\postprefix\at:\to\postprefix
+ {\edef\preprefix {\@@filterheadpart[\postprefix]}%
+ \edef\postprefix{\@@filtertailpart[\postprefix]}%
\let\uchar\normaluchar % ugly but needed
\ifx\preprefix\empty \else
\ifx\preprefix\zerocountervalue\else
\preprefix\@@nmnummerscheider
\fi
\fi}
- {\@EA\aftersplitstring\postprefix\at:\to\postprefix
+ {\edef\postprefix{\@@filtertailpart[\postprefix]}%
\let\uchar\normaluchar}} % ugly but needed
\def\dopaginaprefix#1%
{\dodopaginaprefix{#1}%
\donexttracklevel{#1}}
-\def\paginaprefix#1[#2::#3::#4]% kan wat sneller ####1:0:
+\def\paginaprefix#1[#2]%
{\bgroup
\edef\paginatype{#1}%
- \edef\postprefix{#3}%
+ \edef\postprefix{\@@filternumberpart[#2]}%
\let\donexttrackcommando\dopaginaprefix
\donexttrackcommando\firstsection
\egroup}
@@ -562,8 +547,9 @@
{\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start}
{\labeltexts{\v!paginanummer}{\pagenumber}}}
-\def\translatednumber[#1::#2::#3]%
- {#3}
+% \def\translatednumber[#1::#2::#3]{#3}
+
+\def\translatednumber{\@@filterpagepart}
\unexpanded\def\referencepagenumber[#1]%
{\doifelsenothing{#1}{?}{\paginaprefix\??rf[#1]\translatednumber[#1]}}
diff --git a/tex/context/base/page-one.tex b/tex/context/base/page-one.tex
index 308ccc99e..58ca78858 100644
--- a/tex/context/base/page-one.tex
+++ b/tex/context/base/page-one.tex
@@ -80,7 +80,7 @@
\fi
\setbox2=\hbox
{\checksinglecolumnfootnotes
- \lower\scratchdimen\vbox{\placefootnotes}}%
+ \lower\scratchdimen\vbox{\placebottomnotes}}%
\smashbox2% % needed here
\ifbottomnotes
\ht0\zeropoint
@@ -92,9 +92,6 @@
\def\OTRONEfinalsidefloatoutput%
{\finaloutput\unvbox\normalpagebox}
-\def\OTRONEsetfootnotehsize%
- {\hsize\@@vnbreedte}
-
\OTRONEoutput%
{\sidefloatoutput}
diff --git a/tex/context/base/page-run.tex b/tex/context/base/page-run.tex
index a616f4a8e..b0d6dbf9e 100644
--- a/tex/context/base/page-run.tex
+++ b/tex/context/base/page-run.tex
@@ -92,6 +92,13 @@
\gdef\doshowframe[#1][#2]%
{\ifsecondargument
\setupbackgrounds
+ [\v!pagina]
+ [\c!kader=\v!aan,
+ \c!hoek=\v!recht,
+ \c!kaderoffset=\!!zeropoint,
+ \c!kaderdiepte=\!!zeropoint,
+ \c!kaderkleur=green]
+ \setupbackgrounds
[#1][#2]
[\c!achtergrond=,
\c!kader=\v!aan,
diff --git a/tex/context/base/page-set.tex b/tex/context/base/page-set.tex
index c48c94b19..9dff9163a 100644
--- a/tex/context/base/page-set.tex
+++ b/tex/context/base/page-set.tex
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% getnoflines vs getrawnoflines
+
\writestatus{loading}{Context OTR Macros / Column Sets}
% todo : last longer than previous
@@ -59,7 +61,7 @@
\beginETEX \ifcsname
-\def\columnerasegridboxes%
+\def\columnerasegridboxes
{\bgroup
\increment\columnmaxcells\relax
\ifodd\realpageno
@@ -111,7 +113,7 @@
\beginTEX
-\def\columnerasegridboxes%
+\def\columnerasegridboxes
{\bgroup
\increment\columnmaxcells\relax
\ifodd\realpageno \else % we are on the other page
@@ -245,50 +247,6 @@
\OTRSETdomakegridbox{\nofcolumns}{1}{-1}%
\fi}
-%\def\OTRSETdomakegridbox#1#2#3%
-% {\hbox\bgroup
-% % test first !
-% \hbox to \zetbreedte
-% {\dostepwiserecurse{#1}{#2}{#3}
-% {\mofcolumns=\recurselevel
-% \localcolumnwidth=\OTRSETlocalwidth\mofcolumns
-% \setbox\scratchbox=\hbox\localframed
-% [\??mc\OTRSETidentifier\number\mofcolumns]%
-% [\c!breedte=\localcolumnwidth,\c!hoogte=\teksthoogte]%
-% {}%
-% \ifcase\columndirection
-% \hskip\OTRSETgetparameter\c!afstand\recurselevel\box\scratchbox
-% \else
-% \box\scratchbox\hskip\OTRSETgetparameter\c!afstand\recurselevel
-% \fi}}%
-% \hskip-\zetbreedte
-% % main text
-% \hbox to \zetbreedte
-% {\dostepwiserecurse{#1}{#2}{#3}
-% {\mofcolumns=\recurselevel
-% \localcolumnwidth=\OTRSETlocalwidth\mofcolumns
-% \offinterlineskip
-% \setbox\scratchbox=\vbox to \teksthoogte
-% {\topskipcorrection
-% \dorecurse{\columnmaxcells}
-% {\setbox\scratchbox=\hbox{\OTRSETgetgridcell\mofcolumns\recurselevel}%
-% \ht\scratchbox=\ht\strutbox
-% \dp\scratchbox=\dp\strutbox
-% \ifcase\columndirection
-% \box\scratchbox
-% \else
-% \hbox to \localcolumnwidth
-% {\hskip\localcolumnwidth\llap{\box\scratchbox}}
-% \fi
-% \par}}%
-% \wd\scratchbox=\localcolumnwidth % \tekstbreedte
-% \ifcase\columndirection
-% \hskip\OTRSETgetparameter\c!afstand\recurselevel\box\scratchbox
-% \else
-% \box\scratchbox\hskip\OTRSETgetparameter\c!afstand\recurselevel
-% \fi}}%
-% \egroup}
-
\def\OTRSETdomakegridbox#1#2#3%
{\hbox\bgroup
%
@@ -353,7 +311,7 @@
\def\OTRSETflushfinalfootnotes
{\ifcase\lastcolumnlastcell \else
\setbox\scratchbox=\hbox
- {\placefootnotes}%
+ {\placebottomnotes}%
\ifdim\ht\scratchbox>\zeropoint
\setbox\scratchbox=\hbox
{\hbox to \zeropoint{\OTRSETgetgridcell\nofcolumns\lastcolumnlastcell}%
@@ -403,8 +361,11 @@
{\OTRSETflushfinalfootnotes
\placecolumntextareas
\OTRSETcentergridcells
- \OTRSETreducegridbox
- \global\setbox\OTRfinalpagebox=\OTRSETmakegridbox
+ \bgroup % we want to keep the reduction local
+ \OTRSETreducegridbox
+ \global\setbox\OTRfinalpagebox=\OTRSETmakegridbox
+ \egroup % otherwise we get the wrong number of free cells
+ %\gdef\localcolumnmaxcells{0}% here ?
\global\mofcolumns=\nofcolumns} % otherwise problems in finaloutput
\def\OTRSETdofinaloutput
@@ -423,8 +384,6 @@
\immediatewriteutilitycommand
{\twopassentry{\s!colset}{\the\scratchcounter}{##1}}}%
\processcommacommand[\OTRSETbalancinglist]\docommando}
-
-\let\OTRSETflushsavedfloats\relax
\definesystemvariable {mc}
\definesystemvariable {mt}
@@ -451,7 +410,7 @@
\dosynchronizeoutput
\allowbreak % hm
\fi
- \synchronizevsize
+ \synchronizenotes
\fi}
\def\OTRSETsethsize%
@@ -492,38 +451,36 @@
\def\OTRSETflushtextsofar
{\ifvoid\normalpagebox \else
\setbox\scratchbox=\vbox{\unvbox\normalpagebox}%
- \OTRSETsavefootnotes
+ \OTRSETsavenotes
\OTRSEThandleflushedtext0
\fi}
-\def\OTRSETplacefootnotes
+\def\OTRSETplacebottomnotes
{\iflastcolumnfootnotes
\ifnum\nofcolumns=\mofcolumns
- \ifintermediatefootnotes \placefootnotes \fi
+ \ifintermediatefootnotes \placebottomnotes \fi
\fi
\else
- \placefootnotes
+ \placebottomnotes
\fi}
-\def\OTRSETflushfootnotes
- {\ifvoid\OTRSETsavedfootnotes \else
- \iflastcolumnfootnotes
- \ifnum\nofcolumns=\mofcolumns
- \flushsavedcolumnfootnotes
- \fi
- \else
- \flushsavedcolumnfootnotes
+\def\OTRSETflushsavednotes
+ {\iflastcolumnfootnotes
+ \ifnum\nofcolumns=\mofcolumns
+ \flushsavednotes
\fi
+ \else
+ \flushsavednotes
\fi}
-\def\OTRSETsavefootnotes
+\def\OTRSETsavenotes
{\iflastcolumnfootnotes
\ifnum\nofcolumns=\mofcolumns \else
- \savecolumnfootnotes
+ \savenotes
\fi
\fi}
-\appendtoks \OTRSETflushfootnotes \to \OTRSETeverystartofcolumn
+\appendtoks \OTRSETflushsavednotes \to \OTRSETeverystartofcolumn
\def\OTRSETnaturalflush%
{\setbox0=\vbox to \columnfreecells\lineheight
@@ -533,7 +490,7 @@
\unvbox\normalpagebox
\vfill}%
\setbox2=\hbox
- {\OTRSETplacefootnotes}%
+ {\OTRSETplacebottomnotes}%
\setbox\scratchbox=\hbox
{\wd0=\zeropoint\box0\box2}%
\dp\scratchbox=\dp\strutbox
@@ -667,7 +624,8 @@
\fi}
\def\OTRSETstoreincolumnslotTOPS#1%
- {\OTRSETcheckcolumnslot{#1}%
+ {\OTRSETprepareforcolumnslot1{#1}%
+ \OTRSETcheckcolumnslot{#1}%
\ifenoughcolumncells
\OTRSETcheckcolumnspace\mofcolumns\columnfirstcell{#1}%
\fi
@@ -680,7 +638,8 @@
\fi}
\def\OTRSETstoreincolumnslotBOTS#1%
- {\edef\savedcolumnlastcell{\the\columnlastcell}%
+ {\OTRSETprepareforcolumnslot3{#1}%
+ \edef\savedcolumnlastcell{\the\columnlastcell}%
\OTRSETcheckcolumnslot{#1}%
\ifenoughcolumncells
\advance\columnlastcell -\columnvcells \advance\columnlastcell 1
@@ -782,72 +741,74 @@
\newif\ifquitincurrentcolumn
-\def\OTRSETstoreincolumnslotLRTB%
- {\OTRSETstoreincolumnslotindeed
- \mofcolumns\nofcolumns+\currenthcell1\columnmaxcells+\currentvcell}
+\def\OTRSETstoreincolumnslotLRTB#1%
+ {\OTRSETprepareforcolumnslot1{#1}%
+ \OTRSETstoreincolumnslotindeed
+ \mofcolumns\nofcolumns+\currenthcell
+ 1\columnmaxcells+\currentvcell{#1}}
-\def\OTRSETstoreincolumnslotLRBT%
- {\OTRSETstoreincolumnslotindeed
- \mofcolumns\nofcolumns+\currenthcell\columnmaxcells1-\currentvcell}
+\def\OTRSETstoreincolumnslotLRBT#1%
+ {\OTRSETprepareforcolumnslot3{#1}%
+ \OTRSETstoreincolumnslotindeed
+ \mofcolumns\nofcolumns+\currenthcell
+ \columnmaxcells1-\currentvcell{#1}}
-\def\OTRSETstoreincolumnslotRLTB%
- {\OTRSETstoreincolumnslotindeed
- \nofcolumns\qofcolumns-\currenthcell1\columnmaxcells+\currentvcell}
+\def\OTRSETstoreincolumnslotRLTB#1%
+ {\OTRSETprepareforcolumnslot1{#1}%
+ \OTRSETstoreincolumnslotindeed
+ \nofcolumns\qofcolumns-\currenthcell
+ 1\columnmaxcells+\currentvcell{#1}}
-\def\OTRSETstoreincolumnslotRLBT%
- {\OTRSETstoreincolumnslotindeed
- \nofcolumns\qofcolumns-\currenthcell\columnmaxcells1-\currentvcell}
+\def\OTRSETstoreincolumnslotRLBT#1%
+ {\OTRSETprepareforcolumnslot3{#1}%
+ \OTRSETstoreincolumnslotindeed
+ \nofcolumns\qofcolumns-\currenthcell
+ \columnmaxcells1-\currentvcell{#1}}
-\def\OTRSETstoreincolumnslotTBLR%
- {\OTRSETstoreincolumnslotindeed
- 1\columnmaxcells+\currentvcell\mofcolumns\nofcolumns+\currenthcell}
+\def\OTRSETstoreincolumnslotTBLR#1%
+ {\OTRSETprepareforcolumnslot1{#1}%
+ \OTRSETstoreincolumnslotindeed
+ 1\columnmaxcells+\currentvcell
+ \mofcolumns\nofcolumns+\currenthcell{#1}}
-\def\OTRSETstoreincolumnslotTBRL%
- {\OTRSETstoreincolumnslotindeed
- 1\columnmaxcells+\currentvcell\nofcolumns\qofcolumns-\currenthcell}
+\def\OTRSETstoreincolumnslotTBRL#1%
+ {\OTRSETprepareforcolumnslot1{#1}%
+ \OTRSETstoreincolumnslotindeed
+ 1\columnmaxcells+\currentvcell
+ \nofcolumns\qofcolumns-\currenthcell{#1}}
-\def\OTRSETstoreincolumnslotBTLR%
- {\OTRSETstoreincolumnslotindeed
- \columnmaxcells1-\currentvcell\mofcolumns\nofcolumns+\currenthcell}
+\def\OTRSETstoreincolumnslotBTLR#1%
+ {\OTRSETprepareforcolumnslot3{#1}%
+ \OTRSETstoreincolumnslotindeed
+ \columnmaxcells1-\currentvcell
+ \mofcolumns\nofcolumns+\currenthcell{#1}}
-\def\OTRSETstoreincolumnslotBTRL%
- {\OTRSETstoreincolumnslotindeed
- \columnmaxcells1-\currentvcell\nofcolumns\qofcolumns-\currenthcell}
+\def\OTRSETstoreincolumnslotBTRL#1%
+ {\OTRSETprepareforcolumnslot3{#1}%
+ \OTRSETstoreincolumnslotindeed
+ \columnmaxcells1-\currentvcell
+ \nofcolumns\qofcolumns-\currenthcell{#1}}
-\def\OTRSETstoreincolumnslotFXTB% fixed column
- {\OTRSETstoreincolumnslotindeed
+\def\OTRSETstoreincolumnslotFXTB#1% fixed column
+ {\OTRSETprepareforcolumnslot2{#1}% % 1/2 dependent of place, todo
+ \OTRSETstoreincolumnslotindeed
\pofcolumns\pofcolumns
+\currenthcell\preferedrow
- \columnmaxcells+\currentvcell}
+ \columnmaxcells+\currentvcell{#1}}
-\def\OTRSETstoreincolumnslotFXBT% fixed column
- {\OTRSETstoreincolumnslotindeed
- \pofcolumns\pofcolumns
- +\currenthcell\columnmaxcells
- \preferedrow-\currentvcell}
-
-%\def\OTRSETstoreincolumnslotHERE% fixed column
-% {\OTRSETflushtextsofar
-% \ifdim\pagetotal>\zeropoint
-% \@EA\OTRSETstoreincolumnslotEREH
-% \else
-% \@EA\OTRSETstoreincolumnslotTOPS
-% \fi}
-%
-%\def\OTRSETstoreincolumnslotEREH% fixed column
-% {\getnoflines\pagetotal
-% \OTRSETstoreincolumnslotindeed
-% \mofcolumns\mofcolumns
-% +\currenthcell\noflines
-% \columnmaxcells+\currentvcell}
+\def\OTRSETstoreincolumnslotFXBT#1% fixed column
+ {\OTRSETprepareforcolumnslot2{#1}% % 3/2 dependent on place, todo
+ \OTRSETstoreincolumnslotindeed
+ \pofcolumns\pofcolumns+\currenthcell
+ \columnmaxcells\preferedrow-\currentvcell{#1}}
\def\OTRSETstoreincolumnslotHERE#1% fixed column
- {\OTRSETflushtextsofar
+ {\OTRSETprepareforcolumnslot2{#1}%
+ \OTRSETflushtextsofar
\getnoflines\pagetotal \advance\noflines\columnfirstcell
\OTRSETstoreincolumnslotindeed
- \mofcolumns\mofcolumns
- +\currenthcell\noflines
- \columnmaxcells+\currentvcell{#1}%
+ \mofcolumns\mofcolumns+\currenthcell
+ \noflines\columnmaxcells+\currentvcell{#1}%
\OTRSETsetvsize}
\def\OTRSETstoreincolumnslotindeed#1#2#3#4#5#6#7#8#9%
@@ -923,26 +884,47 @@
\fi
\OTRSETsetvsize
%\message{[fnt]}% float
- %\OTRSETflushfootnotes % not here, better a hook into \everypar
\else
%\message{[rej]}% save box
\OTRSETsavebox{#9}%
\fi}
-% \appendtoks \OTRSETflushfootnotes \to \everypar
-
-\def\columnslotspacing{2}
+% \def\columnslotspacing{2}
+%
+% \def\OTRSETstoreincolumnslot#1#2% {method} {box} % alleen last
+% {\dp#2=\zeropoint
+% \ifcase\columnslotspacing\else
+% \setbox#2=\vbox spread \columnslotspacing\lineheight
+% {\vss\box#2\vss}%
+% \fi
+% %\dp#2=\zeropoint
+% \doifdefinedelse{\strippedcsname\OTRSETstoreincolumnslot#1}
+% {\getvalue{\strippedcsname\OTRSETstoreincolumnslot#1}{#2}}
+% {\copy#2}}
+
+\def\columnslotspacing{1}
\def\OTRSETstoreincolumnslot#1#2% {method} {box} % alleen last
- {\dp#2=\zeropoint
- \ifcase\columnslotspacing\else
- \setbox#2=\vbox spread \columnslotspacing\lineheight
- {\vss\box#2\vss}%
- \fi
- %\dp#2=\zeropoint
+ {%\dp#2=\zeropoint
+ %\ifcase\columnslotspacing\else
+ % \setbox#2=\vbox spread \columnslotspacing\lineheight
+ % {\vss\box#2\vss}%
+ %\fi
\doifdefinedelse{\strippedcsname\OTRSETstoreincolumnslot#1}
{\getvalue{\strippedcsname\OTRSETstoreincolumnslot#1}{#2}}
- {\copy#2}}
+ {\OTRSETstoreincolumnsloUNKNOWN{#1}}}
+
+\def\OTRSETstoreincolumnsloUNKNOWN#1%
+ {\OTRSETprepareforcolumnslot2{#1}\copy#1}
+
+\def\OTRSETprepareforcolumnslot#1#2% 1=hoog 2=midden 3=laag
+ {\dp#2\zeropoint
+ \ifcase\columnslotspacing\else
+ \scratchdimen\columnslotspacing\lineheight
+ \ifnum#1=2 \scratchdimen2\scratchdimen \fi
+ \setbox#2\vbox spread \scratchdimen
+ {\ifnum#1>1\vss\fi\box#2\ifnum#1<3\vss\fi}%
+ \fi}
\def\OTRSETdocheckiffloatfits % eigenlijk moet else float anders
{\ifnofloatpermitted
@@ -1114,7 +1096,7 @@
[\c!offset=\v!overlay,
\c!kader=\v!uit,
\c!uitlijnen=,
- \c!afstand=1.5\bodyfontsize]}
+ \c!afstand=\getvalue{\??mc#1\c!afstand}]}
\def\setupcolumnset%
{\dotripleargument\dosetupcolumnset}
@@ -1158,28 +1140,34 @@
\newcounter\columnsetlevel
\let\currentcolumnset\empty
-\def\startcolumnset%
+\def\startcolumnset
{\dodoubleempty\dostartcolumnset}
\def\dostartcolumnset[#1][#2]%
{\increment\columnsetlevel\relax
+ \doglobal\newcounter\balancingpageno
+ \gdef\localcolumnmaxcells{0}%
\ifnum\columnsetlevel=1
- \OTRSETgetmanualbalance
- \savefootnotedimensions
+ %\OTRSETgetmanualbalance
\bgroup
\def\currentcolumnset{#2}%
- \binnenkolommentrue % will be different flag
- %\let\redofloatorder\gobbleoneargument % will also be a flag
+ %\doifelsenothing{#2}
+ % {\def\currentcolumnset{#1}}%
+ % {\def\currentcolumnset{#2}}%
+ %\global\let\OTRSETidentifier\currentcolumnset
+ \binnenkolommentrue % will be different flag
+ %\let\redofloatorder\gobbleoneargument % will also be a flag
\let\kolom\OTRSETgotocolumn%
- \activateotr{SET}{ONE}% andere naam, activate or so
+ \activateotr{SET}{ONE}% andere naam, activate or so
\xdef\OTRSETlist{#1}%
\OTRSETgotonextpage
+ \OTRSETgetmanualbalance % here
\OTRSETassignwidths
\else
- \bgroup
+ \bgroup
\fi}
-\def\stopcolumnset%
+\def\stopcolumnset
{\relax
\ifnum\columnsetlevel=1
\par
@@ -1187,14 +1175,15 @@
\dostopcolumnset
\egroup
\global\footnotelimittrue
- \restorefootnotedimensions
\setvsize
\sethsize
\ifvoid\OTRfinalpagebox\else
- \dp\OTRfinalpagebox\zeropoint
- \box\OTRfinalpagebox
- \nobreak\vbox{\strut}\vskip-\lineheight
- \prevdepth\dp\strutbox
+ % probably balanced
+ \ifdim\ht\OTRfinalpagebox<\teksthoogte
+ \snaptogrid[\v!pagina]\hbox{\box\OTRfinalpagebox}
+ \else
+ \box\OTRfinalpagebox
+ \fi
\fi
\ifsomefloatwaiting \setvsize \pagina \setvsize \fi
\else
@@ -1213,20 +1202,6 @@
\def\OTRSETdobalance
{\OTRSETnobalance}
-%\def\OTRSETmanualbalance
-% {\ifbalancecolumns
-% \ifnum\realpageno=\balancingpageno\relax
-% \ifnum\mofcolumns=1
-% \dorecurse\nofcolumns
-% {\!!counta=\recurselevel
-% \!!countb=\balancingcolumnmaxcells\!!counta
-% \advance\!!countb 1
-% \dostepwiserecurse\!!countb\columnmaxcells1
-% {\OTRSETsetgridcell\!!counta\recurselevel\copy\placeholderboxe}}%
-% \fi
-% \fi
-% \fi}
-
\def\localcolumnmaxcells{0}
\def\OTRSETmanualbalance
@@ -1247,11 +1222,11 @@
\fi
\fi}
-\def\balancingcolumnmaxcells#1%
- {\ifcsname\??mc\currentcolumnset\number#1\c!regels\endcsname
- \csname\??mc\currentcolumnset\number#1\c!regels\endcsname
- \else\ifcsname\??mc\currentcolumnset\c!regels\endcsname
- \csname\??mc\currentcolumnset\c!regels\endcsname
+\def\balancingcolumnmaxcells#1% pas op: etex
+ {\ifcsname\??mc\OTRSETidentifier\number#1\c!regels\endcsname
+ \csname\??mc\OTRSETidentifier\number#1\c!regels\endcsname
+ \else\ifcsname\??mc\OTRSETidentifier\c!regels\endcsname
+ \csname\??mc\OTRSETidentifier\c!regels\endcsname
\else
\savedcolumnmaxcells
\fi\fi}
@@ -1259,14 +1234,27 @@
\def\OTRSETsetmanualbalance
{\doglobal\addtocommalist{\realfolio}\OTRSETbalancinglist}
+\def\OTRSETpresetmanualbalance
+ {\doifdefined{\??mc\OTRSETidentifier\c!regels}
+ {\getcommacommandsize[\csname\??mc\OTRSETidentifier\c!regels\endcsname]%
+ \ifnum\commalistsize>1
+ \scratchcounter\zerocount
+ \def\docommando##1%
+ {\advance\scratchcounter1
+ \setvalue{\??mc\OTRSETidentifier\the\scratchcounter\c!regels}{##1}}%
+ \processcommacommand
+ [\csname\??mc\OTRSETidentifier\c!regels\endcsname]\docommando
+ \fi}}
+
\def\OTRSETgetmanualbalance
{\gettwopassdata\s!colset
\iftwopassdatafound
+ \OTRSETpresetmanualbalance
\global\let\balancingpageno\twopassdata
\else
\doglobal\newcounter\balancingpageno
\fi
- \global\balancingcolumnsfalse}
+ \global\balancingcolumnsfalse}
%\def\OTRSETnobalance
% {\iflastcolumnfootnotes % testen ! optie
@@ -1327,20 +1315,21 @@
\def\OTRSETinitializefeatures%
{% number of lines
- \getnoflines\teksthoogte\xdef\columnmaxcells{\the\noflines}%
+% new: raw
+ \getrawnoflines\teksthoogte\xdef\columnmaxcells{\the\noflines}%
% direction
- \doifelsevalue{\??mc\OTRSETidentifier\c!richting}{\v!rechts}
- {\chardef\columndirection=0}
- {\chardef\columndirection=1}%
+ \doifelsevalue{\??mc\OTRSETidentifier\c!richting}\v!rechts
+ {\chardef\columndirection0}
+ {\chardef\columndirection1}%
% balancing
- \doifelsevalue{\??mc\OTRSETidentifier\c!balanceren}{\v!ja}
+ \doifelsevalue{\??mc\OTRSETidentifier\c!balanceren}\v!ja
{\balancecolumnstrue}
{\balancecolumnsfalse}}
\installoutput\OTRSETflushpreposttext
- {\global\setbox\precolumnbox=\vbox{\unvbox\normalpagebox}%
+ {\global\setbox\precolumnbox\vbox{\unvbox\normalpagebox}%
\ifcarryoverfootnotes \else
- \global\setbox\postcolumnbox=\vbox{\placefootnotes}%
+ \global\setbox\postcolumnbox\vbox{\placebottomnotes}%
\fi}
\def\OTRSEThandlepreposttext%
@@ -1387,10 +1376,10 @@
\fi}
\def\OTRSETforceinserts%
- {\enablecolumnfootnotes}
+ {\enablenotes}
\def\OTRSETinhibitinserts%
- {\disablecolumnfootnotes}
+ {\disablenotes}
% interface to footnotes
@@ -1424,14 +1413,16 @@
% {#2=\OTRSETlocalwidth\mofcolumns}
\def\OTRSETassignwidths%
- {\scratchdimen=\zetbreedte
- \scratchcounter=0
+ {%\scratchdimen\zetbreedte
+ \freezetextwidth \scratchdimen\tekstbreedte
+ %
+ \scratchcounter0
\dorecurse\nofcolumns
{\doifelsevalue{\??mc\OTRSETidentifier\recurselevel\c!breedte}{\v!passend}
- {\advance\scratchcounter by 1 }
- {\advance\scratchdimen by -\getvalue{\??mc\OTRSETidentifier\recurselevel\c!breedte}}%
- \advance\scratchdimen by -\getvalue{\??mc\OTRSETidentifier\recurselevel\c!afstand}}%
- \divide\scratchdimen by \scratchcounter
+ {\advance\scratchcounter 1 }
+ {\advance\scratchdimen -\getvalue{\??mc\OTRSETidentifier\recurselevel\c!breedte}}%
+ \advance\scratchdimen -\getvalue{\??mc\OTRSETidentifier\recurselevel\c!afstand}}%
+ \divide\scratchdimen \scratchcounter
\dorecurse\nofcolumns
{\doifelsevalue{\??mc\OTRSETidentifier\recurselevel\c!breedte}{\v!passend}
{\dimen0=\scratchdimen}
@@ -1441,13 +1432,6 @@
\def\OTRSETlocalwidth#1%
{\getvalue{\??mc\number#1\??mc\c!breedte}}
-\def\OTRSETsetfootnotehsize%
- {%\ifcarryoverfootnotes
- % \doifdefinedelse{\??mc\@@vnbreedte\c!n} % inherits from columnset
- % {\OTRSETassignwidth\@@vnbreedte\to\hsize}
- % {\hsize\@@vnbreedte}%
- }%\fi}
-
\newbox\placeholderboxa
\newbox\placeholderboxb
\newbox\placeholderboxc
@@ -1514,47 +1498,6 @@
\OTRSETstoreincolumnslot\floatmethod\floatbox
\doinsertfloatinfo}
-% \def\definecolumnsetarea%
-% {\doquadrupleempty\dodefinecolumnsetarea}
-%
-% \def\dodefinecolumnsetarea[#1][#2][#3][#4]% test top n source
-% {\ifsecondargument
-% \doifundefinedelse{#4box}
-% {\@EA\newbox\csname#4box\endcsname}
-% {\setbox\csname#4box\endcsname=\box\voidb@x}%
-% \setvalue{\??mc#1#2\v!tekst#3}{\OTRSETflusharea{#1}{#2}{#3}}%
-% \setxvalue{#1#2#3source}{#4}%
-% \setgvalue{#4setup}%
-% {\OTRSETassignwidth#1\to\tekstbreedte
-% \getcolumnsettextssize[#1][#2][#3]}%
-% \fi}
-%
-% \def\startcolumnsetarea[#1]%
-% {\doifdefinedelse{#1box}
-% {\scratchcounter=\getvalue{#1box}%
-% \global\setbox\scratchcounter=\vbox\bgroup
-% \unvbox\scratchcounter
-% \getvalue{#1setup}
-% \hsize\OTRSETtextswidth}
-% {\setbox\scratchbox=\vbox\bgroup}}
-%
-% \def\stopcolumnsetarea%
-% {\endgraf
-% \vfill
-% \egroup}
-%
-% \def\OTRSETflusharea#1#2#3%
-% {\doifdefined{#1#2#3source}
-% {\scratchcounter=\getvalue{\getvalue{#1#2#3source}box}\relax
-% \ifvoid\scratchcounter\else
-% \ifdim\ht\scratchcounter>\vsize
-% \setbox\scratchbox=\vsplit\scratchcounter to \vsize
-% \unvbox\scratchbox
-% \else
-% \unvbox\scratchcounter
-% \fi
-% \fi}}
-
% set ipv text
% left right 1 2 3 +1 +2 +3
@@ -1567,12 +1510,12 @@
\def\definecolumntextarea%
{\dotripleempty\dodefinecolumntextarea}
-\def\dodefinecolumntextarea[#1][#2][#3]%
+\def\dodefinecolumntextarea[#1][#2][#3]% y=0 is mogelijke en handig !
{\ifthirdargument
- \doifelse{#2}{\v!beide}
+ \doifelse{#2}\v!beide
{\definecolumntextarea[#1][\v!links ][#3]%
\definecolumntextarea[#1][\v!rechts][#3]}
- {\doifelse{#2}{\v!volgende}
+ {\doifelse{#2}\v!volgende
{\doifonevenpaginaelse
{\definecolumntextarea[#1][\v!rechts][#3]}
{\definecolumntextarea[#1][\v!links][#3]}}
@@ -1594,10 +1537,10 @@
\def\dosetupcolumntextarea[#1][#2][#3]%
{\ifthirdargument
- \doifelse{#2}{\v!beide}
+ \doifelse{#2}\v!beide
{\setupcolumntextarea[#1][\v!links ][#3]%
\setupcolumntextarea[#1][\v!rechts][#3]}
- {\doifelse{#2}{\v!volgende}
+ {\doifelse{#2}\v!volgende
{\doifonevenpaginaelse
{\setupcolumntextarea[#1][\v!rechts][#3]}
{\setupcolumntextarea[#1][\v!links][#3]}}
@@ -1615,9 +1558,9 @@
\def\doinitializecolumntextareas#1#2%
{\def\docommando##1%
- {\doifelsevalue{\??mt##1#2\c!status}{\v!start}
+ {\doifelsevalue{\??mt##1#2\c!status}\v!start
{\dodoinitializecolumntextareas{##1}{#2}}
- {\doifvalue{\??mt##1#2\c!status}{\v!herhaal}
+ {\doifvalue{\??mt##1#2\c!status}\v!herhaal
{\dodoinitializecolumntextareas{##1}{#2}}}}%
\processcommacommand[#1]\docommando}
@@ -1639,43 +1582,84 @@
{\bgroup
\forgetall
\def\docommando##1%
- {\doifelsevalue{\??mt##1#2\c!status}{\v!start}
+ {\doifelsevalue{\??mt##1#2\c!status}\v!start
{\doglobal\removefromcommalist{##1}#1%
\dodoplacecolumntextareas{##1}{#2}}
- {\doifvalue{\??mt##1#2\c!status}{\v!herhaal}
+ {\doifvalue{\??mt##1#2\c!status}\v!herhaal
{\dodoplacecolumntextareas{##1}{#2}}}}%
\processcommacommand[#1]\docommando
\egroup}
+\def\columntextlastbackspace{\rugwit}
+
+% \def\dodoplacecolumntextareas#1#2%
+% {\!!counta\getvalue{\??mt#1#2\c!x}%
+% \!!countb\getvalue{\??mt#1#2\c!nx}%
+% \docalculatecolumnsetspan
+% \!!heighta\getvalue{\??mt#1#2\c!ny}\lineheight
+% % option
+% \advance\!!heighta -\lineheight
+% \setbox\scratchbox\vbox
+% {\donetrue\localframed
+% [\??mt#1#2]
+% [\c!breedte=\!!widtha,\c!hoogte=\!!heighta]
+% {\getvalue{\??mt#1#2}}}%
+% \!!counta\getvalue{\??mt#1#2\c!x}%
+% \!!countb\getvalue{\??mt#1#2\c!y}%
+% \advance\!!countb \getvalue{\??mt#1#2\c!ny}%
+% \advance\!!countb -1
+% \OTRSETsetgridcell
+% \!!counta\!!countb
+% \hbox{\clip
+% [\c!breedte=\!!widthb,\c!hoogte=\!!heighta]%
+% {\copy\scratchbox}}%
+% \ifcase\!!countc\else
+% \advance\!!counta \getvalue{\??mt#1#2\c!nx}%
+% \advance\!!counta -\!!countc
+% \advance\!!widtha -\!!widthb
+% \OTRSETsetgridcell
+% \!!counta\!!countb
+% \hbox
+% {\hskip-\namedlayoutparameter\v!oneven\c!rugwit
+% \clip
+% [\c!breedte=\!!widtha,\c!hoogte=\!!heighta,
+% \c!hoffset=\!!widthb]
+% {\copy\scratchbox}}%
+% \fi}
+
\def\dodoplacecolumntextareas#1#2%
{\!!counta\getvalue{\??mt#1#2\c!x}%
\!!countb\getvalue{\??mt#1#2\c!nx}%
\docalculatecolumnsetspan
- \!!heighta=\getvalue{\??mt#1#2\c!ny}\lineheight
- % option
- \advance\!!heighta -\lineheight
- \setbox\scratchbox=\vbox
- {\localframed
+ \!!heighta\getvalue{\??mt#1#2\c!ny}\lineheight
+% to do: met/zonder ht/dp
+\ifnum\getvalue{\??mt#1#2\c!y}=0
+ \advance\!!heighta -\lineheight
+ \advance\!!heighta \topskip
+\fi
+ \advance\!!heighta -\lineheight % option
+ \setbox\scratchbox\ruledvbox
+ {\donetrue\localframed
[\??mt#1#2]
[\c!breedte=\!!widtha,\c!hoogte=\!!heighta]
{\getvalue{\??mt#1#2}}}%
- \!!counta=\getvalue{\??mt#1#2\c!x}%
- \!!countb=\getvalue{\??mt#1#2\c!y}%
+ \!!counta\getvalue{\??mt#1#2\c!x}%
+ \!!countb\getvalue{\??mt#1#2\c!y}%
\advance\!!countb \getvalue{\??mt#1#2\c!ny}%
\advance\!!countb -1
\OTRSETsetgridcell
- {\!!counta}{\!!countb}
+ \!!counta\!!countb
\hbox{\clip
- [\c!breedte=\!!widthb,\c!hoogte=\!!heighta]
+ [\c!breedte=\!!widthb,\c!hoogte=\!!heighta]%
{\copy\scratchbox}}%
\ifcase\!!countc\else
\advance\!!counta \getvalue{\??mt#1#2\c!nx}%
\advance\!!counta -\!!countc
\advance\!!widtha -\!!widthb
\OTRSETsetgridcell
- {\!!counta}{\!!countb}
+ \!!counta\!!countb
\hbox
- {\hskip-\rugwit
+ {\hskip-\namedlayoutparameter\v!oneven\c!rugwit
\clip
[\c!breedte=\!!widtha,\c!hoogte=\!!heighta,
\c!hoffset=\!!widthb]
@@ -1685,8 +1669,22 @@
\def\setupcolumntextareatext%
{\dotripleempty\dosetupcolumntextareatext}
-\def\dosetupcolumntextareatext[#1][#2][#3]%
- {\setvalue{\??mt#1#2}{#3}}
+%\def\dosetupcolumntextareatext[#1][#2][#3]%
+% {\setvalue{\??mt#1#2}{#3}}
+
+\long\def\dosetupcolumntextareatext[#1][#2][#3]%
+ {\ifthirdargument
+ \doifelse{#2}\v!beide
+ {\setvalue{\??mt#1\v!links }{#3}%
+ \setvalue{\??mt#1\v!rechts}{#3}}
+ {\doifelse{#2}\v!volgende
+ {\doifonevenpaginaelse
+ {\setvalue{\??mt#1\v!rechts}{#3}}%
+ {\setvalue{\??mt#1\v!links }{#3}}}%
+ {\setvalue{\??mt#1#2}{#3}}}%
+ \else
+ \setupcolumntextareatext[#1][\v!volgende][{#2}]%
+ \fi}
\def\docalculatecolumnsetspan
{% \!!counta <= x
@@ -1694,25 +1692,27 @@
% \!!widtha => total width
% \!!widthb => left width
% \!!countc => left cols
- \!!widtha=\!!countb\hsize
+ \!!widtha\!!countb\hsize
\advance\!!countb \!!counta \advance\!!countb -1 \relax
\ifnum\!!countb>\nofcolumns
- \!!countc=\!!countb
+ \!!countc\!!countb
\advance\!!countc -\nofcolumns
- \!!countb=\nofcolumns
+ \!!countb\nofcolumns
\else
- \!!countc=0
+ \!!countc0
\fi
\advance\!!counta 1
- \dostepwiserecurse{\!!counta}{\!!countb}{1}
+ \dostepwiserecurse\!!counta\!!countb1
{\advance\!!widtha\OTRSETgetparameter\c!afstand\recurselevel}%
- \!!widthb=\!!widtha
+ \!!widthb\!!widtha
\advance\!!widthb -\!!countc\hsize
\ifodd\realpageno \else
\ifcase\!!countc\else
- \advance\!!widtha 2\rugwit
- \advance\!!widthb \rugwit
- \dorecurse{\!!countc}
+ % nog niet ok voor enkel/dubbelzijdig
+ \advance\!!widtha \namedlayoutparameter\v!even \c!rugwit
+ \advance\!!widtha \namedlayoutparameter\v!oneven\c!rugwit
+ \advance\!!widthb \namedlayoutparameter\v!even \c!rugwit
+ \dorecurse\!!countc
{\advance\!!widtha\OTRSETgetparameter\c!afstand\recurselevel}%
\fi
\fi}
@@ -1727,7 +1727,7 @@
{\dodoubleempty\dodefinecolumnsetspan}
\def\dodefinecolumnsetspan[#1][#2]%
- {\ifsecondargument
+ {%\ifsecondargument
\defineframedtext
[cs:#1]
[\c!kader=\v!uit,
@@ -1735,22 +1735,23 @@
\c!na=,
\c!offset=\v!overlay,
\c!plaats=,
+ \c!regelcorrectie=\v!uit,
\c!dieptecorrectie=\v!uit,
\c!n=2,
#2]%
- \else
- \definecolumnspan[][#1]%
- \fi}
+ %\else
+ % \definecolumnspan[][#1]%
+ }%\fi}
\def\setupcolumnsetspan%
{\dodoubleempty\dosetupcolumnsetspan}
\def\dosetupcolumnsetspan[#1][#2]%
- {\ifsecondargument
+ {%\ifsecondargument
\setupframedtext[cs:#1][#2]%
- \else
- \setupcolumnsetspan[][#1]%
- \fi}
+ %\else
+ % \setupcolumnsetspan[][#1]%
+ }%\fi}
\def\startcolumnsetspan%
{\dotripleempty\dostartcolumnsetspan}
@@ -1759,7 +1760,7 @@
\def\dostartcolumnsetspan[#1][#2][#3]% [#3] gobbles space
{\bgroup
- \!!countc\getvalue{\??kd cs:#1\c!n} % \framedtextparameter{cs:\c!n}%
+ \!!countc\framedtextparameter{cs:#1}\c!n%
\!!countd\nofcolumns \advance\!!countd -\mofcolumns \advance\!!countd 1
\ifnum\!!countc>\!!countd \!!countc\!!countd \fi
\setcolumnsetspanhsize\mofcolumns\!!countc % a/b used
@@ -1767,11 +1768,17 @@
\setupframedtexts[cs:#1][\c!breedte=\columnsetspanhsize,#2]
\setbox\scratchbox\hbox \bgroup
\dostartframedtext[cs:#1][\v!geen]
- \vskip-\lineheight\par\strut\par}
-
-\def\stopcolumnsetspan%
- {\par\kern-\lineheight\prevdepth\dp\strutbox\strut
+ \vskip-\lineheight\par\strut\par
+ \framedtextparameter{cs:#1}\c!voor
+ \def\stopcolumnsetspan{\dostopcolumnsetspan{#1}}}
+
+\def\dostopcolumnsetspan#1%
+ {\par
+ \kern-\lineheight\prevdepth\dp\strutbox\strut
+ \framedtextparameter{cs:#1}\c!na
+ \kern\zeropoint
\dostopframedtext \egroup
+ \chardef\columnslotspacing0 % ! ! !
\OTRSETstoreincolumnslotHERE\scratchbox
\egroup}
diff --git a/tex/context/base/page-sid.tex b/tex/context/base/page-sid.tex
index 23a311f70..681ea29d4 100644
--- a/tex/context/base/page-sid.tex
+++ b/tex/context/base/page-sid.tex
@@ -112,7 +112,9 @@
% so far for option
\kern\!!heighta
\fi
+% == \forgetsidefloats
\global\sidefloatvsize\nofloatvsize
+ \global\floatshortfalse
\global\floatflagfalse}
\def\flushsidefloatsafterpar%
@@ -125,20 +127,21 @@
\fi}}
\def\forgetsidefloats%
- {\global\sidefloatvsize=\nofloatvsize
+ {\global\sidefloatvsize\nofloatvsize
+ \global\floatshortfalse
\global\floatflagfalse}
\let\logsidefloat=\relax
\def\pushpenalties%
- {\widowpenalty=1
- \clubpenalty=2
- \brokenpenalty=1
- \let\pushpenalties=\relax
+ {\widowpenalty1
+ \clubpenalty2
+ \brokenpenalty1
+ \let\pushpenalties\relax
\edef\poppenalties%
- {\widowpenalty=\the\widowpenalty
- \clubpenalty=\the\clubpenalty
- \brokenpenalty=\the\brokenpenalty}}
+ {\widowpenalty\the\widowpenalty
+ \clubpenalty\the\clubpenalty
+ \brokenpenalty\the\brokenpenalty}}
\let\poppenalties=\relax
diff --git a/tex/context/base/page-txt.tex b/tex/context/base/page-txt.tex
index d578e85ea..9fd7ead2e 100644
--- a/tex/context/base/page-txt.tex
+++ b/tex/context/base/page-txt.tex
@@ -767,18 +767,18 @@
\def\dodocommando[#1][#2]%
{\getparameters
[\??tk#1#2]
- [%\c!status=\v!normaal, % moved, kan tzt weg
- \c!voor=,
- \c!na=,
- \c!strut=,
- \c!letter=,
- \c!kleur=,
+ [%\c!status=\v!normaal, % moved
+ \c!voor=, % both global and local are used
+ \c!na=, % both global and local are used
+ \c!strut=, % the local one, not (yet) used
+ \c!letter=\getvalue{\??tk#1\c!letter},% hm, got lost
+ \c!kleur=\getvalue{\??tk#1\c!kleur}, % hm, got lost
\c!linkertekst=,
\c!middentekst=,
\c!rechtertekst=,
\c!kantlijntekst=,
\c!margetekst=,
- \c!breedte=]%
+ \c!breedte=]%
\inheritparameter[\??tk#1#2][\c!linkerletter ][\c!letter ]%
\inheritparameter[\??tk#1#2][\c!rechterletter ][\c!letter ]%
\inheritparameter[\??tk#1#2][\c!linkerkleur ][\c!kleur ]%
@@ -803,16 +803,16 @@
%D While the header and footer lines are moved away from the
%D main text, the top and bottom lines are centered.
-%\setuptop [\c!voor=\vss, \c!na=\vss, \c!strut=]
-%\setupheader [\c!voor=, \c!na=\vss, \c!strut=\v!ja]
-%\setuptext [\c!voor=\vss, \c!na=\vss, \c!strut=]
-%\setupfooter [\c!voor=\vss, \c!na=, \c!strut=\v!ja]
-%\setupbottom [\c!voor=\vss, \c!na=\vss, \c!strut=]
-
\setuptop [\c!status=\v!normaal,\c!voor=\vss,\c!na=\vss,\c!strut=]
\setupheader[\c!status=\v!normaal,\c!voor=, \c!na=\vss,\c!strut=\v!ja]
\setuptext [\c!status=\v!normaal,\c!voor=\vss,\c!na=\vss,\c!strut=]
\setupfooter[\c!status=\v!normaal,\c!voor=\vss,\c!na=, \c!strut=\v!ja]
\setupbottom[\c!status=\v!normaal,\c!voor=\vss,\c!na=\vss,\c!strut=]
+\setuptop [\c!letter=,\c!kleur=]
+\setupheader[\c!letter=,\c!kleur=]
+\setuptext [\c!letter=,\c!kleur=]
+\setupfooter[\c!letter=,\c!kleur=]
+\setupbottom[\c!letter=,\c!kleur=]
+
\protect \endinput
diff --git a/tex/context/base/regi-ibm.tex b/tex/context/base/regi-ibm.tex
index eb52933fe..8f066198b 100644
--- a/tex/context/base/regi-ibm.tex
+++ b/tex/context/base/regi-ibm.tex
@@ -5,7 +5,7 @@
%D subtitle=The Good Old MSDOS IBM codepage,
%D author=Hans Hagen,
%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
@@ -16,40 +16,48 @@
\startregime [ibm]
-\defineactivetoken 128 {\Ccedilla} % €
-\defineactivetoken 129 {\udiaeresis} %
-\defineactivetoken 130 {\eacute} % ‚
-\defineactivetoken 131 {\acircumflex} % ƒ
-\defineactivetoken 132 {\adiaeresis} % „
-\defineactivetoken 133 {\agrave} % …
-\defineactivetoken 134 {\aring} % †
-\defineactivetoken 135 {\ccedilla} % ‡
-\defineactivetoken 136 {\ecircumflex} % ˆ
-\defineactivetoken 137 {\ediaeresis} % ‰
-\defineactivetoken 138 {\egrave} % Š
-\defineactivetoken 139 {\idiaeresis} % ‹
-\defineactivetoken 140 {\icircumflex} % Œ
-\defineactivetoken 141 {\igrave} %
-\defineactivetoken 142 {\Adiaeresis} % Ž
-\defineactivetoken 143 {\Aring} %
-\defineactivetoken 144 {\Eacute} %
\defineactivetoken 145 {\aeligature} % ‘
\defineactivetoken 146 {\AEligature} % ’
-\defineactivetoken 147 {\ocircumflex} % “
-\defineactivetoken 148 {\odiaeresis} % ”
-\defineactivetoken 149 {\ograve} % •
-\defineactivetoken 150 {\ucircumflex} % –
-\defineactivetoken 151 {\ugrave} % —
\defineactivetoken 152 {\ijligature} % ˜
-\defineactivetoken 153 {\Odiaeresis} % ™
-\defineactivetoken 154 {\Udiaeresis} % š
+
+\defineactivetoken 225 {\ssharp} % á
+
\defineactivetoken 160 {\aacute} %  
+\defineactivetoken 130 {\eacute} % ‚
+\defineactivetoken 144 {\Eacute} %
\defineactivetoken 161 {\iacute} % ¡
\defineactivetoken 162 {\oacute} % ¢
\defineactivetoken 163 {\uacute} % £
+
+\defineactivetoken 135 {\ccedilla} % ‡
+\defineactivetoken 128 {\Ccedilla} % €
+
+\defineactivetoken 132 {\adiaeresis} % „
+\defineactivetoken 142 {\Adiaeresis} % Ž
+\defineactivetoken 137 {\ediaeresis} % ‰
+\defineactivetoken 139 {\idiaeresis} % ‹
+\defineactivetoken 148 {\odiaeresis} % ”
+\defineactivetoken 153 {\Odiaeresis} % ™
+\defineactivetoken 129 {\udiaeresis} %
+\defineactivetoken 154 {\Udiaeresis} % š
+
\defineactivetoken 164 {\ntilde} % ¤
\defineactivetoken 165 {\Ntilde} % ¥
-\defineactivetoken 225 {\ssharp} % á
+
+\defineactivetoken 134 {\aring} % †
+\defineactivetoken 143 {\Aring} %
+
+\defineactivetoken 131 {\acircumflex} % ƒ
+\defineactivetoken 136 {\ecircumflex} % ˆ
+\defineactivetoken 140 {\icircumflex} % Œ
+\defineactivetoken 147 {\ocircumflex} % “
+\defineactivetoken 150 {\ucircumflex} % –
+
+\defineactivetoken 133 {\agrave} % …
+\defineactivetoken 138 {\egrave} % Š
+\defineactivetoken 141 {\igrave} %
+\defineactivetoken 149 {\ograve} % •
+\defineactivetoken 151 {\ugrave} % —
\stopregime
diff --git a/tex/context/base/regi-il1.tex b/tex/context/base/regi-il1.tex
index 43cdf80ef..8e283b55f 100644
--- a/tex/context/base/regi-il1.tex
+++ b/tex/context/base/regi-il1.tex
@@ -1,11 +1,11 @@
%D \module
-%D [ file=enco-il1,
-%D version=1997.08.29,
+%D [ file=regi-il1,
+%D version=200.5.7,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=ISO Latin 1 keys,
-%D author={Denis Roegel},
+%D author={Daniel Flipo, Hans Hagen, Denis Roegel},
%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
@@ -16,208 +16,139 @@
\startregime [il1]
-\defineactivetoken 144 {\dotlessi}
-\defineactivetoken 145 {\textgrave}
+\defineactivetoken 180 {\textacute}
\defineactivetoken 146 {\textacute} % also see 180
-\defineactivetoken 147 {\textcircumflex}
-\defineactivetoken 148 {\texttilde}
-\defineactivetoken 149 {\textmacron}
\defineactivetoken 150 {\textbreve}
+\defineactivetoken 159 {\textcaron}
+\defineactivetoken 184 {\textcedilla}
+\defineactivetoken 147 {\textcircumflex}
+\defineactivetoken 168 {\textdiaeresis}
\defineactivetoken 151 {\textdotaccent}
-
-\defineactivetoken 154 {\textring}
-
+\defineactivetoken 145 {\textgrave}
\defineactivetoken 157 {\texthungarumlaut}
+\defineactivetoken 175 {\textmacron}
+\defineactivetoken 149 {\textmacron}
\defineactivetoken 158 {\textogonek}
-\defineactivetoken 159 {\textcaron}
-
-\defineactivetoken 160 {\nonbreakablespace}
-
-% \defineactivetoken 161 {!`}
-
-% this command must be defined (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 162 {\textcent}
-
-\defineactivetoken 163 {\sterling}
-
-% this command must be defined (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 164 {\textcurrency}
-
-% this command must be defined (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 165 {\textyen}
+\defineactivetoken 154 {\textring}
+\defineactivetoken 148 {\texttilde}
-% this command must be defined (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 166 {\textbrokenbar}
+\defineactivetoken 144 {\dotlessi}
-\defineactivetoken 167 {\S}
-\defineactivetoken 168 {\textdiaeresis}
-\defineactivetoken 169 {\copyright}
+\defineactivetoken 162 {\textcent}
+\defineactivetoken 163 {\textsterling}
+\defineactivetoken 164 {\textcurrency}
+\defineactivetoken 165 {\textyen}
-% this command must be defined
-% = $^{\underline {\rm a}}$ (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 170 {\textordfeminine}
+\defineactivetoken 167 {\sectionmark}
+\defineactivetoken 182 {\paragraphmark}
-% we want real guillemots
\defineactivetoken 171 {\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
+\defineactivetoken 187 {\prewordbreak\rightguillemot}
-% = $\neg$ (must be defined) (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 172 {\textlnot}
-
-% = soft hyphen
-% \defineactivetoken 173 {\-}
-
-% this command must be defined (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 174 {\textregistered}
-
-\defineactivetoken 175 {\textmacron}
-
-% = $^\circle$ (must be defined)
-% \defineactivetoken 176 {\textdegree}
-
-% = $\pm$ (must be defined) (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 177 {\textpm}
-
-% = $^2$ (must be defined) (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 178 {\texttwosuperior}
-
-% = $^3$ (must be defined) (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 179 {\textthreesuperior}
-
-\defineactivetoken 180 {\textacute}
-
-% =$\mu$ (must be defined) (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 181 {\textmu}
-
-\defineactivetoken 182 {\P}
+\defineactivetoken 173 {\softhyphen}
+\defineactivetoken 160 {\nonbreakablespace} % ?
-% = $\cdot$ (must be defined)
-% \defineactivetoken 183 {\textperiodcentered}
+\defineactivetoken 169 {\copyright}
+\defineactivetoken 174 {\registered}
-\defineactivetoken 184 {\textcedilla}
+\defineactivetoken 185 {\textonesuperior}
+\defineactivetoken 178 {\texttwosuperior}
+\defineactivetoken 179 {\textthreesuperior}
-% = $^1$ (must be defined) (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 185 {\textonesuperior}
+\defineactivetoken 188 {\textonequarter}
+\defineactivetoken 189 {\textonehalf}
+\defineactivetoken 190 {\textthreequarters}
-% this command must be defined
-% = $^{\underline\circle}$ (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 186 {\textordmasculine}
+\defineactivetoken 183 {\textperiodcentered}
-\defineactivetoken 187 {\prewordbreak\rightguillemot}
+\defineactivetoken 166 {\textbrokenbar}
+\defineactivetoken 176 {\textdegree}
+\defineactivetoken 247 {\textdiv}
+\defineactivetoken 172 {\textlognot}
+\defineactivetoken 215 {\textmultiply}
+\defineactivetoken 181 {\textmu}
+\defineactivetoken 177 {\textpm}
-% = $1\over4$ % to define (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 188 {\textonequarter}
+\defineactivetoken 254 {\thorn}
+\defineactivetoken 222 {\THorn}
-% = $1\over2$ % to define (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 189 {\textonehalf}
+\defineactivetoken 223 {\ssharp}
-% = $3\over4$ % to define (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 190 {\textthreequarters}
+\defineactivetoken 208 {\Eth}
+\defineactivetoken 240 {\eth}
-% \defineactivetoken 191 {?`}
+\defineactivetoken 198 {\AEligature}
+\defineactivetoken 230 {\aeligature}
-\defineactivetoken 192 {\Agrave}
+\defineactivetoken 225 {\aacute}
\defineactivetoken 193 {\Aacute}
-\defineactivetoken 194 {\Acircumflex}
-\defineactivetoken 195 {\Atilde}
-\defineactivetoken 196 {\Adiaeresis}
-\defineactivetoken 197 {\Aring}
-\defineactivetoken 198 {\AEligature}
-\defineactivetoken 199 {\Ccedilla}
-\defineactivetoken 200 {\Egrave}
+\defineactivetoken 233 {\eacute}
\defineactivetoken 201 {\Eacute}
-\defineactivetoken 202 {\Ecircumflex}
-\defineactivetoken 203 {\Ediaeresis}
-\defineactivetoken 204 {\Igrave}
+\defineactivetoken 237 {\iacute}
\defineactivetoken 205 {\Iacute}
-\defineactivetoken 206 {\Icircumflex}
-\defineactivetoken 207 {\Idiaeresis}
-
-% to define (missing in enco-ec.tex)
-% \defineactivetoken 208 {\Eth}
-
-\defineactivetoken 209 {\Ntilde}
-\defineactivetoken 210 {\Ograve}
+\defineactivetoken 243 {\oacute}
\defineactivetoken 211 {\Oacute}
-\defineactivetoken 212 {\Ocircumflex}
-\defineactivetoken 213 {\Otilde}
-\defineactivetoken 214 {\Odiaeresis}
-
-% = $\times$ was wrong in regi-win.tex
-% to define (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 215 {\texttimes}
-
-\defineactivetoken 216 {\Ostroke}
-\defineactivetoken 217 {\Ugrave}
+\defineactivetoken 250 {\uacute}
\defineactivetoken 218 {\Uacute}
-\defineactivetoken 219 {\Ucircumflex}
-\defineactivetoken 220 {\Udiaeresis}
-
-% was wrong in regi-win.tex
+\defineactivetoken 253 {\yacute}
\defineactivetoken 221 {\Yacute}
-\defineactivetoken 222 {\THorn}
-\defineactivetoken 223 {\ssharp}
-\defineactivetoken 224 {\agrave}
-\defineactivetoken 225 {\aacute}
-\defineactivetoken 226 {\acircumflex}
-\defineactivetoken 227 {\atilde}
-\defineactivetoken 228 {\adiaeresis}
-\defineactivetoken 229 {\aring}
-\defineactivetoken 230 {\aeligature}
\defineactivetoken 231 {\ccedilla}
-\defineactivetoken 232 {\egrave}
-\defineactivetoken 233 {\eacute}
+\defineactivetoken 199 {\Ccedilla}
+
+\defineactivetoken 226 {\acircumflex}
+\defineactivetoken 194 {\Acircumflex}
\defineactivetoken 234 {\ecircumflex}
-\defineactivetoken 235 {\ediaeresis}
-\defineactivetoken 236 {\igrave}
-\defineactivetoken 237 {\iacute}
+\defineactivetoken 202 {\Ecircumflex}
\defineactivetoken 238 {\icircumflex}
-\defineactivetoken 239 {\idiaeresis}
+\defineactivetoken 206 {\Icircumflex}
+\defineactivetoken 244 {\ocircumflex}
+\defineactivetoken 212 {\Ocircumflex}
+\defineactivetoken 251 {\ucircumflex}
+\defineactivetoken 219 {\Ucircumflex}
-% to define (missing in enco-ec.tex)
-% \defineactivetoken 240 {\eth}
+\defineactivetoken 228 {\adiaeresis}
+\defineactivetoken 196 {\Adiaeresis}
+\defineactivetoken 235 {\ediaeresis}
+\defineactivetoken 203 {\Ediaeresis}
+\defineactivetoken 239 {\idiaeresis}
+\defineactivetoken 207 {\Idiaeresis}
+\defineactivetoken 246 {\odiaeresis}
+\defineactivetoken 214 {\Odiaeresis}
+\defineactivetoken 252 {\udiaeresis}
+\defineactivetoken 220 {\Udiaeresis}
+\defineactivetoken 255 {\ydiaeresis}
-\defineactivetoken 241 {\ntilde}
+\defineactivetoken 224 {\agrave}
+\defineactivetoken 192 {\Agrave}
+\defineactivetoken 232 {\egrave}
+\defineactivetoken 200 {\Egrave}
+\defineactivetoken 236 {\igrave}
+\defineactivetoken 204 {\Igrave}
\defineactivetoken 242 {\ograve}
-\defineactivetoken 243 {\oacute}
-\defineactivetoken 244 {\ocircumflex}
-\defineactivetoken 245 {\otilde}
-\defineactivetoken 246 {\odiaeresis}
+\defineactivetoken 210 {\Ograve}
+\defineactivetoken 249 {\ugrave}
+\defineactivetoken 217 {\Ugrave}
-% = $.\over.$ % was wrong in regi-win.tex
-% to define (symbol
-% exists in TC fonts; I took the same name)
-% \defineactivetoken 247 {\textdiv}
+\defineactivetoken 229 {\aring}
+\defineactivetoken 197 {\Aring}
\defineactivetoken 248 {\ostroke}
-\defineactivetoken 249 {\ugrave}
-\defineactivetoken 250 {\uacute}
-\defineactivetoken 251 {\ucircumflex}
-\defineactivetoken 252 {\udiaeresis}
-
-% was wrong in regi-win.tex
-\defineactivetoken 253 {\yacute}
+\defineactivetoken 216 {\Ostroke}
-\defineactivetoken 254 {\thorn}
-\defineactivetoken 255 {\ydiaeresis}
+\defineactivetoken 227 {\atilde}
+\defineactivetoken 195 {\Atilde}
+\defineactivetoken 241 {\ntilde}
+\defineactivetoken 209 {\Ntilde}
+\defineactivetoken 245 {\otilde}
+\defineactivetoken 213 {\Otilde}
\stopregime
\endinput
+
+% \defineactivetoken 186 {\textordmasculine}
+% \defineactivetoken 170 {\textordfeminine}
+
+% \defineactivetoken 161 {!`}
+% \defineactivetoken 191 {?`}
diff --git a/tex/context/base/regi-lat.tex b/tex/context/base/regi-lat.tex
new file mode 100644
index 000000000..9a561628a
--- /dev/null
+++ b/tex/context/base/regi-lat.tex
@@ -0,0 +1,34 @@
+%D \module
+%D [ file=regi-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=PRAGMA-ADE]
+%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]
+
+\defineactivetoken æ {\cacute}
+\defineactivetoken Æ {\Cacute}
+
+\defineactivetoken è {\ccaron}
+\defineactivetoken È {\Ccaron}
+\defineactivetoken ¹ {\scaron}
+\defineactivetoken © {\Scaron}
+\defineactivetoken ¾ {\zcaron}
+\defineactivetoken ® {\Zcaron}
+
+\defineactivetoken ð {\pseudoencodeddj}
+\defineactivetoken Ð {\pseudoencodedDJ}
+
+\stopregime
+
+\endinput
diff --git a/tex/context/base/regi-win.tex b/tex/context/base/regi-win.tex
index 85d6c7615..e5082cb0a 100644
--- a/tex/context/base/regi-win.tex
+++ b/tex/context/base/regi-win.tex
@@ -1,11 +1,11 @@
%D \module
-%D [ file=enco-win,
+%D [ file=regi-win,
%D version=1997.08.29,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=Windows 1252 ANSI keys,
%D author={Tobias Burnus \& Hans Hagen},
%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
diff --git a/tex/context/base/setupb.tex b/tex/context/base/setupb.tex
index 92c3f260a..4837ed70b 100644
--- a/tex/context/base/setupb.tex
+++ b/tex/context/base/setupb.tex
@@ -13,6 +13,8 @@
% nieuw: oncomment plaatssamengesteldelijst
+% placeheadtext placeheadnumber placefloatnumber
+
% nog 'reductie=ja/nee' in \setupcolors
\startsetupfile
@@ -1338,7 +1340,7 @@
[]
\variable
[\c!kader]
- [\v!aan,\v!uit,\v!overlay]
+ [\v!aan,\v!uit,\v!geen,\v!overlay]
[\v!aan]
\variable
[\c!bovenkader]
@@ -1613,6 +1615,10 @@
[\c!marge]
[\v!standaard,\v!ja,\v!nee]
[\v!standaard]
+ \variable
+ [\c!plaats]
+ [\v!links,\v!rechts,\v!midden,\v!geen]
+ []
\inheritvariables
[\y!setupframed]
[]
@@ -7206,17 +7212,17 @@
\startsetup
\command
- [\y!roteer]
+ [\y!rotate]
\type
[\c!opt!\c!vars!\c!arg!]
\inheritvariables
- [\y!stelroterenin]
+ [\y!setuprotate]
[]
\stopsetup
\startsetup
\command
- [\y!stelroterenin]
+ [\y!setuprotate]
\type
[\c!vars!]
\variable
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
index d67f94cad..5546ecdb2 100644
--- a/tex/context/base/spec-fdf.tex
+++ b/tex/context/base/spec-fdf.tex
@@ -238,7 +238,7 @@
\appendtoksonce
\doPDFresetpageattributes
\doPDFresetpageresources
-\to \everyshipout
+\to \everyaftershipout
\ifx\PDFcode\undefined
\ifx\pdfliteral\undefined
@@ -264,7 +264,9 @@
\doPDFpageresource{/ExtGState \PDFobjectreference}%
\fi}
-\appendtoks \checkPDFextgstates \to \everyshipout
+\appendtoksonce
+ \checkPDFextgstates
+\to \everyshipout
\def\appendtoPDFdocumentextgstates#1%
{\xdef\docuPDFextgstates{\docuPDFextgstates\space#1}}
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index 59afe1fb6..d9e0e393b 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -397,6 +397,16 @@
%D we don't really need this functionality now.
%D \macros
+%D {nextboxht,nextboxwd,nextboxdp}
+%D
+%D The next couple of shortcuts saves us memory as well as
+%D \type {{}}'s in passing parameters.
+
+\def\nextboxht{\ht\nextbox}
+\def\nextboxwd{\wd\nextbox}
+\def\nextboxdp{\dp\nextbox}
+
+%D \macros
%D {dowithnextboxcontent}
%D
%D But, occasionally we do need to pass some local settings
@@ -1392,7 +1402,7 @@
\multiply\scratchdimen #3\relax
\advance\scratchdimen #2\relax
\advance\hsize \scratchdimen
- \divide\hsize #3\relax}
+ \divide\hsize #3\relax}
\newbox\rigidcolumnbox
@@ -1425,10 +1435,10 @@
\hfill}%
\hfillneg}%
\advance\scratchdimen -\openstrutdepth
- \setbox\scratchbox\normalhbox{\raise\scratchdimen\box\scratchbox}
+ \setbox\scratchbox\normalhbox{\raise\scratchdimen\box\scratchbox}%
\dp\scratchbox\openstrutdepth
\ht\scratchbox\scratchdimen
- \box\scratchbox}
+ \box\scratchbox}%
\fi}
%D \macros
@@ -1988,60 +1998,129 @@
\copy\fakedboxcursor
\fi}
-\def\placedbox%
+\def\placedbox
{\iftraceboxplacement\ruledhbox\else\normalhbox\fi}
\newdimen\boxoffset
+\newdimen\boxhdisplacement
+\newdimen\boxvdisplacement
+
+%\def\rightbox#1%
+% {\normalhbox
+% {\setbox0=\placedbox{#1}%
+% \dimen0=.5\ht0\advance\dimen0 -.5\dp0
+% \boxcursor\hskip\boxoffset\lower\dimen0\box0}}
\def\rightbox#1%
{\normalhbox
- {\setbox0=\placedbox{#1}%
- \dimen0=.5\ht0\advance\dimen0 -.5\dp0
- \boxcursor\hskip\boxoffset\lower\dimen0\box0}}
+ {\setbox0\placedbox{#1}%
+ \global\boxhdisplacement\boxoffset
+ \global\boxvdisplacement.5\ht0
+ \global\advance\boxvdisplacement-.5\dp0
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
+
+%\def\leftbox#1%
+% {\normalhbox
+% {\setbox0=\placedbox{#1}%
+% \dimen0=.5\ht0\advance\dimen0 -.5\dp0
+% \boxcursor\hskip-\wd0\hskip-\boxoffset\lower\dimen0\box0}}
\def\leftbox#1%
{\normalhbox
- {\setbox0=\placedbox{#1}%
- \dimen0=.5\ht0\advance\dimen0 -.5\dp0
- \boxcursor\hskip-\wd0\hskip-\boxoffset\lower\dimen0\box0}}
+ {\setbox0\placedbox{#1}%
+ \global\boxhdisplacement-\wd0
+ \global\advance\boxhdisplacement-\boxoffset
+ \global\boxvdisplacement.5\ht0
+ \global\advance\boxvdisplacement-.5\dp0
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
+
+%\def\topbox#1%
+% {\normalhbox
+% {\setbox0=\placedbox{#1}%
+% \dimen0=\boxoffset\advance\dimen0 \dp0
+% \boxcursor\hskip-.5\wd0\raise\dimen0\box0}}
\def\topbox#1%
{\normalhbox
- {\setbox0=\placedbox{#1}%
- \dimen0=\boxoffset\advance\dimen0 \dp0
- \boxcursor\hskip-.5\wd0\raise\dimen0\box0}}
-
+ {\setbox0\placedbox{#1}%
+ \global\boxhdisplacement-.5\wd0
+ \global\boxvdisplacement-\dp0
+ \global\advance\boxvdisplacement-\boxoffset
+ \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
+
+%\def\bottombox#1%
+% {\normalhbox
+% {\setbox0=\placedbox{#1}%
+% \dimen0=\boxoffset\advance\dimen0 \ht0
+% \boxcursor\hskip-.5\wd0\lower\dimen0\box0}}
+
\def\bottombox#1%
{\normalhbox
- {\setbox0=\placedbox{#1}%
- \dimen0=\boxoffset\advance\dimen0 \ht0
- \boxcursor\hskip-.5\wd0\lower\dimen0\box0}}
+ {\setbox0\placedbox{#1}%
+ \global\boxhdisplacement-.5\wd0
+ \global\boxvdisplacement\ht0
+ \global\advance\boxvdisplacement\boxoffset
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
+
+%\def\lefttopbox#1%
+% {\normalhbox
+% {\setbox0=\placedbox{#1}%
+% \dimen0=\boxoffset\advance\dimen0 \dp0
+% \advance\boxoffset\wd0
+% \boxcursor\hskip-\boxoffset\raise\dimen0\box0}}
\def\lefttopbox#1%
{\normalhbox
- {\setbox0=\placedbox{#1}%
- \dimen0=\boxoffset\advance\dimen0 \dp0
- \advance\boxoffset\wd0
- \boxcursor\hskip-\boxoffset\raise\dimen0\box0}}
+ {\setbox0\placedbox{#1}%
+ \global\boxhdisplacement-\wd0
+ \global\advance\boxhdisplacement-\boxoffset
+ \global\boxvdisplacement-\dp0
+ \global\advance\boxvdisplacement-\boxoffset
+ \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
+
+%\def\righttopbox#1%
+% {\normalhbox
+% {\setbox0=\placedbox{#1}%
+% \dimen0=\boxoffset\advance\dimen0 \dp0
+% \boxcursor\hskip\boxoffset\raise\dimen0\box0}}
\def\righttopbox#1%
{\normalhbox
- {\setbox0=\placedbox{#1}%
- \dimen0=\boxoffset\advance\dimen0 \dp0
- \boxcursor\hskip\boxoffset\raise\dimen0\box0}}
+ {\setbox0\placedbox{#1}%
+ \global\boxhdisplacement\boxoffset
+ \global\boxvdisplacement-\dp0
+ \global\advance\boxvdisplacement-\boxoffset
+ \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
+
+%\def\leftbottombox#1%
+% {\normalhbox
+% {\setbox0=\placedbox{#1}%
+% \dimen0=\boxoffset\advance\dimen0 \ht0
+% \advance\boxoffset\wd0
+% \boxcursor\hskip-\boxoffset\lower\dimen0\box0}}
\def\leftbottombox#1%
{\normalhbox
- {\setbox0=\placedbox{#1}%
- \dimen0=\boxoffset\advance\dimen0 \ht0
- \advance\boxoffset\wd0
- \boxcursor\hskip-\boxoffset\lower\dimen0\box0}}
+ {\setbox0\placedbox{#1}%
+ \global\boxhdisplacement-\wd0
+ \global\advance\boxhdisplacement-\boxoffset
+ \global\boxvdisplacement\ht0
+ \global\advance\boxvdisplacement\boxoffset
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
+
+%\def\rightbottombox#1%
+% {\normalhbox
+% {\setbox0=\placedbox{#1}%
+% \dimen0=\boxoffset\advance\dimen0 \ht0
+% \boxcursor\hskip\boxoffset\lower\dimen0\box0}}
\def\rightbottombox#1%
{\normalhbox
- {\setbox0=\placedbox{#1}%
- \dimen0=\boxoffset\advance\dimen0 \ht0
- \boxcursor\hskip\boxoffset\lower\dimen0\box0}}
+ {\setbox0\placedbox{#1}%
+ \global\boxhdisplacement\boxoffset
+ \global\boxvdisplacement\ht0
+ \global\advance\boxvdisplacement\boxoffset
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
\let\topleftbox \lefttopbox
\let\toprightbox \righttopbox
@@ -2353,16 +2432,32 @@
\def\setdimentoatleast#1#2%
{\ifdim#1>\zeropoint\else#1=#2\fi}
-%D \macros
-%D {vcenter}
-%D
-%D Also new: tex mode \type {\vcenter}.
+%D We need'm raw.
\ifx \normalhbox \undefined \let \normalhbox = \hbox \fi
\ifx \normalvbox \undefined \let \normalvbox = \vbox \fi
\ifx \normalvtop \undefined \let \normalvtop = \vtop \fi
\ifx \normalvcenter \undefined \let \normalvcenter = \vcenter \fi
+%D And even rawer:
+
+\let\naturalhbox \normalhbox
+\let\naturalvbox \normalvbox
+%let\naturalvtop \normalvtop
+
+\beginOMEGA dir
+
+\def\naturalhbox{\normalhbox dir TLT}
+\def\naturalvbox{\normalvbox dir TLT}
+%def\naturalvtop{\normalvtop dir TLT}
+
+\endOMEGA
+
+%D \macros
+%D {vcenter}
+%D
+%D Also new: tex mode \type {\vcenter}.
+
\let\verynormalvcenter \vcenter % since \vcenter can be visualized
\def\vcenter%
@@ -2372,6 +2467,4 @@
\prependtoks \let\vcenter\normalvcenter \to \everymath
- \protect
-
-\endinput
+\protect \endinput
diff --git a/tex/context/base/supp-fun.tex b/tex/context/base/supp-fun.tex
index 6856a21ed..b8c21247c 100644
--- a/tex/context/base/supp-fun.tex
+++ b/tex/context/base/supp-fun.tex
@@ -72,7 +72,7 @@
%D \DroppedCaps
%D {\color[red]} {cmbx12}
%D {2\baselineskip} {0pt} {\baselineskip} {2}
-%D In this ugly
+%D Is this ugly
%D \stopbuffer
%D
%D \haalbuffer example the third argument tells
@@ -156,6 +156,8 @@
\let\globaldropcaps\global % will be an option, but on by default
+\def\localdropcaps{\let\globaldropcaps\relax}
+
\chardef\DroppedStatus=0 % 0=done 1=starting 2=doing 3=error
\def\DroppedCaps#1#2#3#4#5#6#7% does not yet handle accented chars
@@ -194,6 +196,7 @@
\globaldropcaps\edef\DroppedLines {\number\maxdimen}%
\globaldropcaps\chardef\DroppedStatus=3
\def\next{#7}}%
+ \let\globaldropcaps\global
\next}
%D Before we go to the next topic, we summarize this command:
@@ -203,6 +206,27 @@
%D {command} {font}
%D {height} {hoffset} {voffset} {lines}
%D \stoptypen
+%D
+%D Sometimes you need to make sure that the global settings are
+%D kept local, as in:
+%D
+%D \startbuffer
+%D \defineparagraphs[SomePar][n=2,rule=on]
+%D \setupparagraphs [SomePar][1][width=.5\textwidth]
+%D \setupparagraphs [SomePar][2][width=.5\textwidth]
+%D
+%D \startSomePar
+%D \localdropcaps\NiceDroppedCaps{}{cmr12}{0pt}{2}Here we need
+%D to explicitly keep the hanging indentation local, like it or
+%D not.
+%D \SomePar
+%D \localdropcaps\NiceDroppedCaps{}{cmr12}{0pt}{2}Here we need
+%D to explicitly keep the hanging indentation local, like it or
+%D not.
+%D \stopSomePar
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
%D \macros
%D {AutoDroppedCaps, CheckDroppedCaps}
diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex
index 3f2b803f7..631f8f557 100644
--- a/tex/context/base/supp-mis.tex
+++ b/tex/context/base/supp-mis.tex
@@ -76,7 +76,8 @@
%D
%D Outside \CONTEXT\ we will not be \ETEX||aware.
-\long\def\beginETEX#1\endETEX{}
+\long\def\beginETEX #1\endETEX {}
+\long\def\beginOMEGA#1\endOMEGA{}
\let\beginTEX\relax \let\endTEX\relax
diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex
index d30e13ca2..7ba4c2223 100644
--- a/tex/context/base/supp-mps.tex
+++ b/tex/context/base/supp-mps.tex
@@ -390,10 +390,14 @@
%D Because some graphics interact with \TEX\ (i.e.\ \CONTEXT), we
%D provide a hook for additional actions: \type {\everyMPgraphic}.
-\newtoks\everyMPgraphic
+\newtoks\everyMPgraphic \everyMPgraphic{\everyMPgraphic\emptytoks}
-\def\writeMPgraph
- {\immediate\write\MPwrite{mpgraph:=\the\currentMPgraphic;}}
+\ifx\blabelgroup\undefined
+
+ \let\blabelgroup\bgroup
+ \let\elabelgroup\egroup
+
+\fi
\newconditional\firstMPgraphic \settrue\firstMPgraphic
@@ -405,6 +409,9 @@
\let \} \letterclosebrace
\to \everyMPgraphic
+\def\writeMPgraph
+ {\immediate\write\MPwrite{mpgraph:=\the\currentMPgraphic;}}
+
\beginTEX
\ifx \honorunexpanded \undefined \else % not really needed
@@ -414,7 +421,7 @@
\endTEX
\def\startwritingMPgraphic
- {\bgroup
+ {\blabelgroup
\global\advance\nofMPgraphics 1
\ifMPrun \else
\allocateMPslot\currentMPgraphic
@@ -466,7 +473,7 @@
\ifrunMPgraphics
\dodostopwritingMPgraphic
\fi
- \egroup}
+ \elabelgroup}
\def\dodostopwritingMPgraphic%
{\ifnum\currentMPgraphic>0
@@ -641,7 +648,7 @@
\ifCONTEXT \else \let\doifobjectssupportedelse=\relax \fi
\long\def\handlereusableMPgraphic#1#2%
- {\bgroup
+ {\blabelgroup
\enableincludeMPgraphics
\startMPgraphic#2\stopMPgraphic
\doifobjectssupportedelse\donothing\useMPboxfalse
@@ -651,7 +658,7 @@
\expandafter \nouseMPbox
\fi {\@@MPG#1}%
\getvalue{\@@MPG#1}%
- \egroup}
+ \elabelgroup}
% \long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic
% {\ifundefined{\@@MPG#1}%
@@ -659,10 +666,14 @@
% \fi}
\long\def\dostartreusableMPgraphic#1#2\stopreusableMPgraphic
- {\long\setgvalue{\@@MPG#1}{\handlereusableMPgraphic{#1}{#2}}}
+ {\blabelgroup
+ \long\setgvalue{\@@MPG#1}{\handlereusableMPgraphic{#1}{#2}}%
+ \elabelgroup}
\def\reuseMPgraphic#1%
- {\getvalue{\@@MPG#1}}
+ {\blabelgroup
+ \getvalue{\@@MPG#1}%
+ \elabelgroup}
%D \macros
%D {startuseMPgraphic,useMPgraphic}
@@ -688,20 +699,30 @@
\egroup}
\long\def\startuseMPgraphic#1#2\stopuseMPgraphic
- {\long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}}}
+ {\blabelgroup
+ \long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}}%
+ \elabelgroup}
-\long\def\startusableMPgraphic#1#2\stopusableMPgraphicv% dummy
- {\long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}}} % unsafe {}{}
+\long\def\startusableMPgraphic#1#2\stopusableMPgraphic % dummy
+ {\blabelgroup
+ \long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}}%
+ \elabelgroup}
\let\useMPgraphic=\reuseMPgraphic
%D \macro
%D {doifMPgraphicelse}
%D
-%D For (mainly internal) pusposes we provide a test macro.
+%D For (mainly internal) purposes we provide a test macro.
+
+% \def\doifMPgraphicelse#1%
+% {\doifdefinedelse{\@@MPG#1}}
\def\doifMPgraphicelse#1%
- {\doifdefinedelse{\@@MPG#1}}
+ {\blabelgroup
+ \doifdefinedelse{\@@MPG#1}%
+ {\elabelgroup\firstoftwoarguments}
+ {\elabelgroup\secondoftwoarguments}}
%D \macros
%D {includeMPgraphic}
@@ -1459,11 +1480,13 @@
\let\MPclippath\empty
\long\def\startMPclip#1#2\stopMPclip%
- {\long\setgvalue{MPC:#1}%
- {\startMPgraphic#2\stopMPgraphic\dograbMPclippath}}
+ {\blabelgroup
+ \long\setgvalue{MPC:#1}%
+ {\startMPgraphic#2\stopMPgraphic\dograbMPclippath}%
+ \elabelgroup}
\def\grabMPclippath#1#2#3#4#5%
- {\bgroup
+ {\blabelgroup
\edef\width {#3\space}\let\overlaywidth \width
\edef\height{#4\space}\let\overlayheight\height
\doifdefinedelse{MPC:#1}
@@ -1475,7 +1498,7 @@
\doglobal\stripcharacter oveto\from\MPclippath\to\MPclippath
\doglobal\stripcharacter ineto\from\MPclippath\to\MPclippath
\fi
- \egroup}
+ \elabelgroup}
%D We pose some restrictions to the \METAPOST\ code and pickup
%D the clip path from the file.
@@ -1507,7 +1530,7 @@
%D document, one can save quite some disk space by using
%D \PDFTEX\ and setting the next switch:
-\newif\ifrecycleMPslots \recycleMPslotsfalse
+\newif\ifrecycleMPslots \recycleMPslotstrue
% \def\allocateMPslot#1%
% {\ifrunMPgraphics
diff --git a/tex/context/base/supp-num.tex b/tex/context/base/supp-num.tex
index 5bdf99231..13e61a94f 100644
--- a/tex/context/base/supp-num.tex
+++ b/tex/context/base/supp-num.tex
@@ -93,13 +93,13 @@
%D the grouped call, the other branch handles the fuzzy
%D delimited calls.
-\def\digits%
+\unexpanded\def\digits
{\bgroup\let~@\doifnextcharelse\bgroup\dodigits\grabdigit}
\def\dodigits#1%
{\grabdigit#1\relax}
-\def\grabdigit%
+\def\grabdigit
{\futurelet\next\scandigit}
%D Watch the test for \type {\nextobeyedline}, because the
diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex
index a8db878b6..e12dba5f4 100644
--- a/tex/context/base/supp-pdf.tex
+++ b/tex/context/base/supp-pdf.tex
@@ -1221,12 +1221,102 @@
%D
%D But, this one is still too inaccurate, so we now have:
+% \def\doMPconcat#1#2#3#4%
+% {\dimen12=#1pt % p_x
+% \dimen14=#3pt % p_y
+% %
+% % we should test for >-1024 too, but for the moment take the gamble
+% \chardef\MPfactor1\ifdim\dimen12<1024pt \ifdim\dimen14<1024pt 6\fi\fi
+% %
+% \multiply\dimen12 \MPfactor
+% \multiply\dimen14 \MPfactor
+% %
+% \doMPreducedimen12
+% \doMPreducedimen14
+% %
+% \dimen16 \dimen 0
+% \multiply \dimen16 \dimen 6
+% \dimen20 \dimen 2
+% \multiply \dimen20 \dimen 4
+% \advance \dimen16 -\dimen20
+% %
+% \dimen18 \dimen12
+% \multiply \dimen18 \dimen 6
+% \dimen20 \dimen14
+% \multiply \dimen20 \dimen 4
+% \advance \dimen18 -\dimen20
+% \dimen20 \dimen 4
+% \multiply \dimen20 \dimen10
+% \advance \dimen18 \dimen20
+% \dimen20 \dimen 6
+% \multiply \dimen20 \dimen 8
+% \advance \dimen18 -\dimen20
+% %
+% \multiply \dimen12 -\dimen 2
+% \multiply \dimen14 \dimen 0
+% \advance \dimen12 \dimen14
+% \dimen20 \dimen 2
+% \multiply \dimen20 \dimen 8
+% \advance \dimen12 \dimen20
+% \dimen20 \dimen 0
+% \multiply \dimen20 \dimen10
+% \advance \dimen12 -\dimen20
+% %
+% \ifdim\dimen16=1pt \else
+% \ifdim\dimen16>\MPconcatfactor pt
+% \doMPreducedimen16
+% \divide \dimen18 \dimen16 \doMPexpanddimen18
+% \divide \dimen12 \dimen16 \doMPexpanddimen12
+% \else
+% \divide \dimen18 \dimen16 \doMPexpanddimen18 \doMPexpanddimen18
+% \divide \dimen12 \dimen16 \doMPexpanddimen12 \doMPexpanddimen12
+% \fi
+% \fi
+% %
+% \divide\dimen18 \MPfactor
+% \divide\dimen12 \MPfactor
+% %
+% \edef#2{\withoutpt{\the\dimen18}}% % p_x^\prime
+% \edef#4{\withoutpt{\the\dimen12}}} % p_y^\prime
+
+\beginETEX
+
+ \newdimen\MPcriteriumA \MPcriteriumA=512pt
+ \newdimen\MPcriteriumB \MPcriteriumB= 2pt
+
+\endETEX
+
+%D We don't waste dimen registers when uting normal \TEX:
+
+\beginTEX
+
+ \def\MPcriteriumA{512pt} % position
+ \def\MPcriteriumB {2pt} % scale
+
+\endTEX
+
\def\doMPconcat#1#2#3#4%
{\dimen12=#1pt % p_x
\dimen14=#3pt % p_y
%
- % we should test for >-1024 too, but for the moment take the gamble
- \chardef\MPfactor1\ifdim\dimen12<1024pt \ifdim\dimen14<1024pt 6\fi\fi
+\chardef\MPfactor0
+\ifdim\dimen4<\MPcriteriumB\ifdim\dimen4>-\MPcriteriumB
+ \ifdim\dimen6<\MPcriteriumB\ifdim\dimen6>-\MPcriteriumB
+ \ifdim\dimen8<\MPcriteriumB\ifdim\dimen8>-\MPcriteriumB
+ \ifdim\dimen10<\MPcriteriumB\ifdim\dimen10>-\MPcriteriumB
+ \chardef\MPfactor1
+ \fi\fi
+ \fi\fi
+ \fi\fi
+\fi\fi
+\ifcase\MPfactor0
+ \chardef\MPfactor1
+ \ifdim\dimen12<\MPcriteriumA\ifdim\dimen12>-\MPcriteriumA
+ \ifdim\dimen14<\MPcriteriumA\ifdim\dimen14>-\MPcriteriumA
+ \chardef\MPfactor16
+ \fi\fi
+ \fi\fi
+\fi
%
\multiply\dimen12 \MPfactor
\multiply\dimen14 \MPfactor
diff --git a/tex/context/base/symb-eur.tex b/tex/context/base/symb-eur.tex
index dafed479f..ab1d0a2c6 100644
--- a/tex/context/base/symb-eur.tex
+++ b/tex/context/base/symb-eur.tex
@@ -36,7 +36,13 @@
\definesymbol [euro] [\getglyph{Euro}{\char160}]
-\unexpanded\def\euro{\symbol[euro]}
+\startencoding[default]
+
+ \definecharacter texteuro {\symbol[euro]}
+
+\stopencoding
+
+\unexpanded\def\euro{\doiftextelse{\texteuro}{\texteuro}{\symbol[euro]}}
%D The next table shows the complete set of symbols:
%D
diff --git a/tex/context/base/symb-glm.tex b/tex/context/base/symb-glm.tex
new file mode 100644
index 000000000..89b1de730
--- /dev/null
+++ b/tex/context/base/symb-glm.tex
@@ -0,0 +1,54 @@
+%D \module
+%D [ file=symb-glm,
+%D version=2002.05.07,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Guillemots,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D 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 Watch the \type {met} instead of \type {mot}!
+
+\loadmapfile [pl0-ams-cmr]
+
+\definefontsynonym [GuilSerif] [plr10] [encoding=pl0]
+\definefontsynonym [GuilSerifBold] [plbx10] [encoding=pl0]
+\definefontsynonym [GuilSerifItalic] [plti10] [encoding=pl0]
+\definefontsynonym [GuilSerifSlanted] [plsl10] [encoding=pl0]
+\definefontsynonym [GuilSerifBoldItalic] [plbxti10] [encoding=pl0]
+\definefontsynonym [GuilSerifBoldSlanted] [plbxsl10] [encoding=pl0]
+
+\definefontsynonym [GuilSans] [plss10] [encoding=pl0]
+\definefontsynonym [GuilSansBold] [plssbx10] [encoding=pl0]
+\definefontsynonym [GuilSansItalic] [plssi10] [encoding=pl0]
+\definefontsynonym [GuilSansSlanted] [plssi10] [encoding=pl0]
+\definefontsynonym [GuilSansBoldItalic] [plssbi10] [encoding=pl0]
+\definefontsynonym [GuilSansBoldSlanted] [plssbi10] [encoding=pl0]
+
+\definefontsynonym [GuilMono] [pltt10] [encoding=pl0]
+%definefontsynonym [GuilMonoBold] [pltt10] [encoding=pl0]
+%definefontsynonym [GuilMonoSlanted] [pltt10] [encoding=pl0]
+%definefontsynonym [GuilMonoItalic] [pltt10] [encoding=pl0]
+%definefontsynonym [GuilMonoBoldItalic] [pltt10] [encoding=pl0]
+%definefontsynonym [GuilMonoBoldSlanted] [pltt10] [encoding=pl0]
+
+\definesymbol [leftguillemet] [\getglyph{Guil}{\char174}]
+\definesymbol [rightguillemet] [\getglyph{Guil}{\char175}]
+
+%D A strange place, but okay:
+
+\startencoding [default]
+
+ \definecharacter leftguillemot {\symbol[leftguillemet]}
+ \definecharacter rightguillemot {\symbol[rightguillemet]}
+
+ \definecharacter guilsingleleft {\symbol[leftguillemet]}
+ \definecharacter guilsingleright {\symbol[rightguillemet]}
+
+\stopencoding
+
+\endinput
diff --git a/tex/context/base/symb-ini.tex b/tex/context/base/symb-ini.tex
index 3cbfe09cc..6dc5d561b 100644
--- a/tex/context/base/symb-ini.tex
+++ b/tex/context/base/symb-ini.tex
@@ -105,7 +105,7 @@
\def\definesymbol
{\dodoubleargument\dodefinesymbol}
-\unexpanded\def\symbol% % This one always gobbles spaces,
+\unexpanded\def\symbol % This one always gobbles spaces,
{\dodoubleempty\dosymbol} % so never change it again!
%D Since symbols are used frequently in interactive
@@ -132,10 +132,10 @@
\fi}
\def\fetchsymbol#1%
- {\ifnosymbol % will be a \cs anyway, so no test needed
- %\@EA\ifx\csname\??ss:#1:\currentsymbol\endcsname\relax\else
+ {\ifnosymbol
+ \@EA\ifx\csname\??ss:#1:\currentsymbol\endcsname\relax\else
\dodosymbol{#1:\currentsymbol}%
- %\fi
+ \fi
\fi}
\def\redosymbol#1%
@@ -219,10 +219,10 @@
\beginTEX
\def\xfetchsymbol#1%
- {\ifnosymbol % will be a \cs anyway, so no test needed
- %\@EA\ifx\csname\??ss:#1:\currentsymbol\endcsname\relax\else
+ {\ifnosymbol
+ \@EA\ifx\csname\??ss:#1:\currentsymbol\endcsname\relax\else
\nosymbolfalse
- %\fi
+ \fi
\fi}
\def\xredosymbol#1%
@@ -337,123 +337,4 @@
%D itemization macros, we prefer symbols because they can more
%D easier be (partially) redefined.
-%D We predefine some common symbols and conversions that will
-%D be understood by many commands.
-
-\definesymbol [\v!geen] []
-\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] [\mathematics{\bigcirc}]
-\definesymbol [square] [\mathematics{\square}]
-\definesymbol [diamond] [\mathematics{\diamond}]
-
-\definesymbol [1] [{\symbol[bullet]}]
-\definesymbol [2] [{\symbol[dash]}]
-\definesymbol [3] [{\symbol[star]}]
-\definesymbol [4] [{\symbol[triangle]}]
-\definesymbol [5] [{\symbol[circle]}]
-\definesymbol [6] [{\symbol[medcircle]}]
-\definesymbol [7] [{\symbol[bigcircle]}]
-\definesymbol [8] [{\symbol[square]}]
-
-%D Special hyperlinks, namely those to pages or navigational
-%D properties, are associated with symbols.
-
-\definesymbol [\v!eerstepagina] [\gotobegincharacter]
-\definesymbol [\v!vorigepagina] [\gobackwardcharacter]
-\definesymbol [\v!volgendepagina] [\goforwardcharacter]
-\definesymbol [\v!laatstepagina] [\gotoendcharacter]
-\definesymbol [\v!eerstesubpagina] [\gotobegincharacter]
-\definesymbol [\v!vorigesubpagina] [\gobackwardcharacter]
-\definesymbol [\v!volgendesubpagina] [\goforwardcharacter]
-\definesymbol [\v!laatstesubpagina] [\gotoendcharacter]
-\definesymbol [\v!PreviousJump] [\gobackjumpcharacter]
-\definesymbol [\v!NextJump] [\goforjumpcharacter]
-\definesymbol [\v!CloseDocument] [\closecharacter]
-
-\definesymbol [\v!eerste] [{\symbol[\v!eerstepagina]}]
-\definesymbol [\v!vorige] [{\symbol[\v!vorigepagina]}]
-\definesymbol [\v!volgende] [{\symbol[\v!volgendepagina]}]
-\definesymbol [\v!laatste] [{\symbol[\v!laatstepagina]}]
-\definesymbol [\v!ergens] [\gotosomewherecharacter]
-\definesymbol [\v!nergens] [\gonowherecharacter]
-
-\definesymbol [\v!achteruit] [{\symbol[\v!vorigepagina]}]
-\definesymbol [\v!vooruit] [{\symbol[\v!volgendepagina]}]
-
-%D The next two symbols (\symbol[P] and \symbol[S]) are
-%D variations in their math counterparts. The following ones
-%D {\em do} scale.
-
-\definesymbol[S][\getglyph{MathSymbol}{\char"78}]
-\definesymbol[P][\getglyph{MathSymbol}{\char"7B}]
-
-%D These symbols are taken from the Computer Moders Roman
-%D symbol set or, when present, from the additional symbols of
-%D the American Mathematical Society. Of course one can use
-%D his or her own symbols by redefining them.
-
-\def\dogotocharacter#1#2#3%
- {\ifx#1\undefined#2\else#3\fi}
-
-\def\gotobegincharacter%
- {\hbox
- {\dogotocharacter\blacktriangleleft
- {\setbox0=\hbox{\mathematics{\triangleleft}}%
- \vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0
- \kern-.11ex\box0}
- {\setbox0=\hbox{\mathematics{\blacktriangleleft}}%
- \setbox2=\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
- \hbox{\lower.03ex\box2\kern-.35ex\box0}}}}
-
-\def\gotoendcharacter%
- {\hbox
- {\dogotocharacter\blacktriangleright
- {\setbox0=\hbox{\mathematics{\triangleright}}%
- \copy0\kern-.11ex
- \vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0}
- {\setbox0=\hbox{\mathematics{\blacktriangleright}}%
- \setbox2=\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
- \hbox{\box0\kern-.35ex\lower.03ex\box2}}}}
-
-\def\gobackwardcharacter%
- {\mathematics{\dogotocharacter\blacktriangleright\triangleleft\blacktriangleleft}}
-
-\def\goforwardcharacter%
- {\mathematics{\dogotocharacter\blacktriangleright\triangleright\blacktriangleright}}
-
-\def\gonowherecharacter%
- {\mathematics{\bullet}}
-
-%\def\gotosomewherecharacter% {} permits ^\...
-% {{\hbox{\hsmash{\gobackwardcharacter}\goforwardcharacter}}}
-
-\def\gotosomewherecharacter%
- {{\hbox{\hsmash{\symbol[\v!vorige]}\symbol[\v!volgende]}}}
-
-\unexpanded\def\closecharacter%
- {\dogotocharacter\boxtimes
- {\ruledhbox{\mathematics{\times}}}
- {\mathematics{\boxtimes}}}
-
-\def\goforjumpcharacter%
- {\hbox{\goforwardcharacter \kern-.5em\goforwardcharacter}}
-
-\def\gobackjumpcharacter%
- {\hbox{\gobackwardcharacter\kern-.5em\gobackwardcharacter}}
-
-% temporarily here
-
-% gejat van Knuth (zie \copyright, p356)
-
-\def\omcirkeld#1%
- {{\ooalign{\hfil\raise0.07ex\hbox{{\tfx#1}}\hfil\crcr\mathhexbox20D}}}
-
-\def\copyright
- {\omcirkeld{c}}
-
\protect \endinput
diff --git a/tex/context/base/symb-mis.tex b/tex/context/base/symb-mis.tex
new file mode 100644
index 000000000..e4f342fa7
--- /dev/null
+++ b/tex/context/base/symb-mis.tex
@@ -0,0 +1,135 @@
+%D \module
+%D [ file=symb-mis,
+%D version=2002.05.07,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Miscelaneous,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA-ADE]
+%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
+
+%D We predefine some common symbols and conversions that will
+%D be understood by many commands.
+
+\definesymbol [\v!geen] []
+\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] [\mathematics{\bigcirc}]
+\definesymbol [square] [\mathematics{\square}]
+\definesymbol [diamond] [\mathematics{\diamond}]
+
+\definesymbol [1] [{\symbol[bullet]}]
+\definesymbol [2] [{\symbol[dash]}]
+\definesymbol [3] [{\symbol[star]}]
+\definesymbol [4] [{\symbol[triangle]}]
+\definesymbol [5] [{\symbol[circle]}]
+\definesymbol [6] [{\symbol[medcircle]}]
+\definesymbol [7] [{\symbol[bigcircle]}]
+\definesymbol [8] [{\symbol[square]}]
+
+%D Special hyperlinks, namely those to pages or navigational
+%D properties, are associated with symbols.
+
+\definesymbol [\v!eerstepagina] [\gotobegincharacter]
+\definesymbol [\v!vorigepagina] [\gobackwardcharacter]
+\definesymbol [\v!volgendepagina] [\goforwardcharacter]
+\definesymbol [\v!laatstepagina] [\gotoendcharacter]
+\definesymbol [\v!eerstesubpagina] [\gotobegincharacter]
+\definesymbol [\v!vorigesubpagina] [\gobackwardcharacter]
+\definesymbol [\v!volgendesubpagina] [\goforwardcharacter]
+\definesymbol [\v!laatstesubpagina] [\gotoendcharacter]
+\definesymbol [\v!PreviousJump] [\gobackjumpcharacter]
+\definesymbol [\v!NextJump] [\goforjumpcharacter]
+\definesymbol [\v!CloseDocument] [\closecharacter]
+
+\definesymbol [\v!eerste] [{\symbol[\v!eerstepagina]}]
+\definesymbol [\v!vorige] [{\symbol[\v!vorigepagina]}]
+\definesymbol [\v!volgende] [{\symbol[\v!volgendepagina]}]
+\definesymbol [\v!laatste] [{\symbol[\v!laatstepagina]}]
+\definesymbol [\v!ergens] [\gotosomewherecharacter]
+\definesymbol [\v!nergens] [\gonowherecharacter]
+
+\definesymbol [\v!achteruit] [{\symbol[\v!vorigepagina]}]
+\definesymbol [\v!vooruit] [{\symbol[\v!volgendepagina]}]
+
+%D The next two symbols (\symbol[P] and \symbol[S]) are
+%D variations in their math counterparts. The following ones
+%D {\em do} scale.
+
+% todo : hook this into \textsection
+
+\definesymbol[S][\getglyph{MathSymbol}{\char"78}]
+\definesymbol[P][\getglyph{MathSymbol}{\char"7B}]
+
+%D These symbols are taken from the Computer Moders Roman
+%D symbol set or, when present, from the additional symbols of
+%D the American Mathematical Society. Of course one can use
+%D his or her own symbols by redefining them.
+
+\def\dogotocharacter#1#2#3%
+ {\ifx#1\undefined#2\else#3\fi}
+
+\def\gotobegincharacter%
+ {\hbox
+ {\dogotocharacter\blacktriangleleft
+ {\setbox0=\hbox{\mathematics{\triangleleft}}%
+ \vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0
+ \kern-.11ex\box0}
+ {\setbox0=\hbox{\mathematics{\blacktriangleleft}}%
+ \setbox2=\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
+ \hbox{\lower.03ex\box2\kern-.35ex\box0}}}}
+
+\def\gotoendcharacter%
+ {\hbox
+ {\dogotocharacter\blacktriangleright
+ {\setbox0=\hbox{\mathematics{\triangleright}}%
+ \copy0\kern-.11ex
+ \vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0}
+ {\setbox0=\hbox{\mathematics{\blacktriangleright}}%
+ \setbox2=\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
+ \hbox{\box0\kern-.35ex\lower.03ex\box2}}}}
+
+\def\gobackwardcharacter%
+ {\mathematics{\dogotocharacter\blacktriangleright\triangleleft\blacktriangleleft}}
+
+\def\goforwardcharacter%
+ {\mathematics{\dogotocharacter\blacktriangleright\triangleright\blacktriangleright}}
+
+\def\gonowherecharacter%
+ {\mathematics{\bullet}}
+
+%\def\gotosomewherecharacter% {} permits ^\...
+% {{\hbox{\hsmash{\gobackwardcharacter}\goforwardcharacter}}}
+
+\def\gotosomewherecharacter%
+ {{\hbox{\hsmash{\symbol[\v!vorige]}\symbol[\v!volgende]}}}
+
+\unexpanded\def\closecharacter%
+ {\dogotocharacter\boxtimes
+ {\ruledhbox{\mathematics{\times}}}
+ {\mathematics{\boxtimes}}}
+
+\def\goforjumpcharacter%
+ {\hbox{\goforwardcharacter \kern-.5em\goforwardcharacter}}
+
+\def\gobackjumpcharacter%
+ {\hbox{\gobackwardcharacter\kern-.5em\gobackwardcharacter}}
+
+%D The next two symbols are for Daniel Flipo:
+
+\definesymbol [Numero] [N\high{\nocap{o}\kern.2em}]
+\definesymbol [numero] [n\high{\nocap{o}\kern.2em}]
+
+\def\Numero{\symbol[Numero]}
+\def\numero{\symbol[numero]}
+
+\protect \endinput
diff --git a/tex/context/base/symb-mvs.tex b/tex/context/base/symb-mvs.tex
index f8d996642..f853d1d64 100644
--- a/tex/context/base/symb-mvs.tex
+++ b/tex/context/base/symb-mvs.tex
@@ -97,7 +97,13 @@
\stopsymbolset
-\unexpanded\def\euro{\symbol[europe][EUR]}
+\startencoding[default]
+
+ \definecharacter texteuro {\symbol[europe][EUR]}
+
+\stopencoding
+
+\unexpanded\def\euro{\doiftextelse{\texteuro}{\texteuro}{\symbol[europe][EUR]}}
% Numbers 0 to 9, @, A and p
diff --git a/tex/context/base/syst-etx.tex b/tex/context/base/syst-etx.tex
index 865432b95..62ae3c54a 100644
--- a/tex/context/base/syst-etx.tex
+++ b/tex/context/base/syst-etx.tex
@@ -105,7 +105,7 @@
\beginETEX \tracing...
-\def\tracingall%
+\def\tracingall
{\tracingonline \@ne
\tracingcommands \thr@@
\tracingstats \tw@
@@ -124,11 +124,11 @@
\tracingassigns \tw@
\errorstopmode}
-\def\loggingall%
+\def\loggingall
{\tracingall
- \tracingonline=\z@}
+ \tracingonline \z@}
-\def\tracingnone%
+\def\tracingnone
{\tracingassigns \z@
\tracingnesting \z@
\tracingscantokens\z@
@@ -197,6 +197,11 @@
\chardef\@@insallocation=8
+%D But, for critical editions, we may need many more, so
+%D here we go again:
+
+\chardef\@@insallocation=24
+
%D My low level allocation macro now comes down to:
\def\myalloc@#1#2#3#4#5%
diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex
index 75a767938..5a110fe70 100644
--- a/tex/context/base/syst-ext.tex
+++ b/tex/context/base/syst-ext.tex
@@ -3834,15 +3834,15 @@
%D
%D These two macros savely grab and dispose two arguments.
-\def\dogobblesingleempty%
- {\dosingleempty\dodogobblesingleempty}
-
-\def\dogobbledoubleempty%
- {\dodoubleempty\dodogobbledoubleempty}
+\def\dogobblesingleempty{\dosingleempty\dodogobblesingleempty}
+\def\dogobbledoubleempty{\dodoubleempty\dodogobbledoubleempty}
\def\dodogobblesingleempty [#1]{}
\def\dodogobbledoubleempty[#1][#2]{}
+\let\gobblesingleempty\dogobblesingleempty % also used
+\let\gobbledoubleempty\dogobbledoubleempty % also used
+
%D \macros
%D {sortcommalist,sortcommacommand,
%D donumericcompare,comparedresult}
@@ -4079,4 +4079,11 @@
\def\thelasttwodigits#1#2#3% 0 dig ... \relax
{\ifx#3\relax#1#2\else\@EA\thelasttwodigits\@EA#2\@EA#3\fi}
+%D Concatenate commalists:
+
+\def\serializecommalist[#1]%
+ {\let\serializedcommalist\empty
+ \def\docommando##1{\edef\serializedcommalist{\serializedcommalist##1}}%
+ \processcommacommand[#1]\docommando}
+
\protect \endinput
diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex
index f5643fcbd..0f3b7a6ff 100644
--- a/tex/context/base/syst-gen.tex
+++ b/tex/context/base/syst-gen.tex
@@ -113,7 +113,8 @@
\ifx\beginTEX\undefined
\long\def\beginETEX#1\endETEX{}
- \let\beginTEX\relax \let\endTEX\relax
+ \long\def\beginOMEGA#1\endOMEGA{}
+ \let\beginTEX\relax\let\endTEX\relax
\fi
%D \macros
@@ -161,6 +162,7 @@
%D to put it there as a reminder. I only mention this once.
\chardef\protectionthreshold=2
+%chardef\protectionthreshold=0 % for testing
% \def\unprotect
% {\ifcase\protectionlevel
diff --git a/tex/context/base/syst-new.tex b/tex/context/base/syst-new.tex
index d10273e20..eb92a95b0 100644
--- a/tex/context/base/syst-new.tex
+++ b/tex/context/base/syst-new.tex
@@ -122,7 +122,6 @@
\def\unspaceafter#1#2%
{\edef\ascii{\dounspaced#2\end}\@EA#1\@EA{\ascii}}
-
% etex, much faster
%
% \def\unspaceargument#1\to#2%
diff --git a/tex/context/base/syst-omg.tex b/tex/context/base/syst-omg.tex
new file mode 100644
index 000000000..f515ddc0d
--- /dev/null
+++ b/tex/context/base/syst-omg.tex
@@ -0,0 +1,113 @@
+%D \module
+%D [ file=syst-omg,
+%D version=2000.09.09,
+%D title=\CONTEXT\ System Macros,
+%D subtitle=A couple of Omega goodies,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D 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 will become obsolete as soon as Omega
+%D supports \ETEX\ functionality.
+
+\ifx\OmegaVersion\undefined \endinput \fi
+
+% \def\newcount {\myalloc@0\count \countdef \@@maxallocation}
+% \def\newdimen {\myalloc@1\dimen \dimendef \@@maxallocation}
+% \def\newskip {\myalloc@2\skip \skipdef \@@maxallocation}
+% \def\newmuskip {\myalloc@3\muskip \muskipdef \@@maxallocation}
+% \def\newbox {\myalloc@4\box \mathchardef\@@maxallocation}
+% \def\newtoks {\myalloc@5\toks \toksdef \@@maxallocation}
+% \def\newread {\myalloc@6\read \chardef \@@minallocation}
+% \def\newwrite {\myalloc@7\write \chardef \@@minallocation}
+% \def\newmarks {\myalloc@8\marks \mathchardef\@@maxallocation}
+% \def\newlanguage{\myalloc@9\language\chardef \@@minallocation}
+%
+% \def\newfam#1{\chardef#1=15 }
+%
+% \count18=1
+%
+% \mathchardef\@@minallocation= 16
+% \mathchardef\@@medallocation= 256
+% \mathchardef\@@maxallocation=32767
+% \chardef \@@insallocation= 8
+%
+% \def\myalloc@#1#2#3#4#5%
+% {\global\advance\count1#1by\@ne
+% \ifnum\count1#1>\@@medallocation \else
+% \global\advance\insc@unt by -\@@insallocation
+% \ifnum\count1#1<\insc@unt \else
+% \global\count1#1=\@@medallocation % \wait
+% \fi
+% \global\advance\insc@unt by +\@@insallocation
+% \fi
+% \ifnum\count1#1>#4%
+% \global\count1#1=#4%
+% \errmessage{No room for (\string#2) \string#5}%
+% \fi
+% \allocationnumber=\count1#1%
+% \global#3#5=\allocationnumber
+% \wlog{\string#5=\string#2\the\allocationnumber}}
+
+\unprotect
+
+\def\newcount {\myalloc@0\count \countdef \@@maxallocation}
+\def\newdimen {\myalloc@1\dimen \dimendef \@@maxallocation}
+\def\newskip {\myalloc@2\skip \skipdef \@@maxallocation}
+\def\newmuskip {\myalloc@3\muskip \muskipdef \@@maxallocation}
+\def\newbox {\myalloc@4\box \mathchardef\@@maxallocation}
+\def\newtoks {\myalloc@5\toks \toksdef \@@maxallocation}
+\def\newread {\myalloc@6\read \chardef \@@minallocation}
+\def\newwrite {\myalloc@7\write \chardef \@@minallocation}
+\def\newmarks {\myalloc@8\marks \mathchardef\@@maxallocation}
+\def\newlanguage{\myalloc@9\language\chardef \@@minallocation}
+
+\def\newfam#1{\chardef#1=15 }
+
+\count18=1
+
+\mathchardef\@@minallocation = 16
+\mathchardef\@@medallocation = 256
+\mathchardef\@@maxallocation = 32767
+
+\chardef\@@insallocation=8
+
+\def\myalloc@#1#2#3#4#5%
+ {\global\advance\count1#1by\@ne
+ \ifnum\count1#1>\@@medallocation \else
+ \global\advance\insc@unt by -\@@insallocation
+ \ifnum\count1#1<\insc@unt \else
+ \global\count1#1=\@@medallocation % \wait
+ \fi
+ \global\advance\insc@unt by +\@@insallocation
+ \fi
+ \ifnum\count1#1>#4%
+ \global\count1#1=#4%
+ \errmessage{No room for (\string#2) \string#5}%
+ \fi
+ \allocationnumber=\count1#1%
+ \global#3#5=\allocationnumber
+ \wlog{\string#5=\string#2\the\allocationnumber}}
+
+%D We need to catch a (rather crappy) automatic OMEGA
+%D mechanism. Unfortunately loading of the SGML vectors
+%D happens automatically without control over the regime
+%D under which it takes place.
+
+\ifx\SGMLFontEntity\undefined \else
+
+ \let\normalSGMLFontEntity\SGMLFontEntity
+
+ \def\SGMLFontEntity#1#2#3#4#5%
+ {\convertargument#3\to\ascii
+ \ExpandBothAfter\doifinstringelse{\letterbackslash}{\ascii}
+ {\normalSGMLFontEntity{#1}{#2}{#3}{#4}{#5}}
+ {\normalSGMLFontEntity{#1}{#2}{\string#3}{#4}{#5}}}
+
+\fi
+
+\protect \endinput
diff --git a/tex/context/base/syst-prm.tex b/tex/context/base/syst-prm.tex
index a53c1cdef..bb34cb4d8 100644
--- a/tex/context/base/syst-prm.tex
+++ b/tex/context/base/syst-prm.tex
@@ -27,7 +27,7 @@
\long\gdef\beginETEX#1\endETEX%
{}
- \gdef\beginTEX%
+ \gdef\beginTEX%
{\bgroup\obeylines\dobeginTEX}
\gdef\dobeginTEX#1
@@ -51,6 +51,24 @@
\fi
+\ifx\OmegaVersion\undefined
+
+ \long\gdef\beginOMEGA#1\endOMEGA%
+ {}
+
+\else
+
+ \gdef\beginOMEGA%
+ {\bgroup\obeylines\dobeginOMEGA}
+
+ \gdef\dobeginOMEGA#1
+ {\egroup\immediate\write16%
+ {system (OMEGA) : [line \the\inputlineno] \string#1}}
+
+ \global\let\endOMEGA\relax
+
+\fi
+
\egroup
%D Let's get rid of this one:
diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex
index f4e4a6f42..c3d06bd25 100644
--- a/tex/context/base/type-enc.tex
+++ b/tex/context/base/type-enc.tex
@@ -14,60 +14,60 @@
% texfont --ven=public --col=antt --enc=ec --sou=auto
% texfont --ven=public --col=antp --enc=ec --sou=auto
% texfont --ven=urw --col=palatino --enc=ec --sou=auto
-% texfont --ven-lucas --col=sun --enc=ec --sou=.
+% texfont --ven-lucas --col=sun --enc=ec --sou=.
-% Free fonts.
+% Free fonts.
% Computer Modern Roman (AMS)
\starttypescript [all] [computer-modern] [ec]
- \definefontsynonym [cmb10] [aeb10] [encoding=ec]
- \definefontsynonym [cmbx10] [aebx10] [encoding=ec]
- \definefontsynonym [cmbx12] [aebx12] [encoding=ec]
- \definefontsynonym [cmbx5] [aebx5] [encoding=ec]
- \definefontsynonym [cmbx6] [aebx6] [encoding=ec]
- \definefontsynonym [cmbx7] [aebx7] [encoding=ec]
- \definefontsynonym [cmbx8] [aebx8] [encoding=ec]
- \definefontsynonym [cmbx9] [aebx9] [encoding=ec]
- \definefontsynonym [cmbxsl10] [aebxsl10] [encoding=ec]
- \definefontsynonym [cmbxti10] [aebxti10] [encoding=ec]
- \definefontsynonym [cmcsc10] [aecsc10] [encoding=ec]
- \definefontsynonym [cmitt10] [aeitt10] [encoding=ec]
- \definefontsynonym [cmr10] [aer10] [encoding=ec]
- \definefontsynonym [cmr12] [aer12] [encoding=ec]
- \definefontsynonym [cmr17] [aer17] [encoding=ec]
- \definefontsynonym [cmr5] [aer5] [encoding=ec]
- \definefontsynonym [cmr6] [aer6] [encoding=ec]
- \definefontsynonym [cmr7] [aer7] [encoding=ec]
- \definefontsynonym [cmr8] [aer8] [encoding=ec]
- \definefontsynonym [cmr9] [aer9] [encoding=ec]
- \definefontsynonym [cmsl10] [aesl10] [encoding=ec]
- \definefontsynonym [cmsl12] [aesl12] [encoding=ec]
- \definefontsynonym [cmsl8] [aesl8] [encoding=ec]
- \definefontsynonym [cmsl9] [aesl9] [encoding=ec]
- \definefontsynonym [cmsltt10] [aesltt10] [encoding=ec]
- \definefontsynonym [cmss10] [aess10] [encoding=ec]
- \definefontsynonym [cmss12] [aess12] [encoding=ec]
- \definefontsynonym [cmss17] [aess17] [encoding=ec]
- \definefontsynonym [cmss8] [aess8] [encoding=ec]
- \definefontsynonym [cmss9] [aess9] [encoding=ec]
- \definefontsynonym [cmssbx10] [aessbx10] [encoding=ec]
- \definefontsynonym [cmssdc10] [aessdc10] [encoding=ec]
- \definefontsynonym [cmssi10] [aessi10] [encoding=ec]
- \definefontsynonym [cmssi12] [aessi12] [encoding=ec]
- \definefontsynonym [cmssi17] [aessi17] [encoding=ec]
- \definefontsynonym [cmssi8] [aessi8] [encoding=ec]
- \definefontsynonym [cmssi9] [aessi9] [encoding=ec]
- \definefontsynonym [cmtcsc10] [aetcsc10] [encoding=ec]
- \definefontsynonym [cmti10] [aeti10] [encoding=ec]
- \definefontsynonym [cmti12] [aeti12] [encoding=ec]
- \definefontsynonym [cmti7] [aeti7] [encoding=ec]
- \definefontsynonym [cmti8] [aeti8] [encoding=ec]
- \definefontsynonym [cmti9] [aeti9] [encoding=ec]
- \definefontsynonym [cmtt10] [aett10] [encoding=ec]
- \definefontsynonym [cmtt12] [aett12] [encoding=ec]
- \definefontsynonym [cmtt8] [aett8] [encoding=ec]
- \definefontsynonym [cmtt9] [aett9] [encoding=ec]
+ \definefontsynonym [cmb10] [aeb10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmbx10] [aebx10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmbx12] [aebx12] [encoding=ec,handling=glm]
+ \definefontsynonym [cmbx5] [aebx5] [encoding=ec,handling=glm]
+ \definefontsynonym [cmbx6] [aebx6] [encoding=ec,handling=glm]
+ \definefontsynonym [cmbx7] [aebx7] [encoding=ec,handling=glm]
+ \definefontsynonym [cmbx8] [aebx8] [encoding=ec,handling=glm]
+ \definefontsynonym [cmbx9] [aebx9] [encoding=ec,handling=glm]
+ \definefontsynonym [cmbxsl10] [aebxsl10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmbxti10] [aebxti10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmcsc10] [aecsc10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmitt10] [aeitt10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmr10] [aer10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmr12] [aer12] [encoding=ec,handling=glm]
+ \definefontsynonym [cmr17] [aer17] [encoding=ec,handling=glm]
+ \definefontsynonym [cmr5] [aer5] [encoding=ec,handling=glm]
+ \definefontsynonym [cmr6] [aer6] [encoding=ec,handling=glm]
+ \definefontsynonym [cmr7] [aer7] [encoding=ec,handling=glm]
+ \definefontsynonym [cmr8] [aer8] [encoding=ec,handling=glm]
+ \definefontsynonym [cmr9] [aer9] [encoding=ec,handling=glm]
+ \definefontsynonym [cmsl10] [aesl10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmsl12] [aesl12] [encoding=ec,handling=glm]
+ \definefontsynonym [cmsl8] [aesl8] [encoding=ec,handling=glm]
+ \definefontsynonym [cmsl9] [aesl9] [encoding=ec,handling=glm]
+ \definefontsynonym [cmsltt10] [aesltt10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmss10] [aess10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmss12] [aess12] [encoding=ec,handling=glm]
+ \definefontsynonym [cmss17] [aess17] [encoding=ec,handling=glm]
+ \definefontsynonym [cmss8] [aess8] [encoding=ec,handling=glm]
+ \definefontsynonym [cmss9] [aess9] [encoding=ec,handling=glm]
+ \definefontsynonym [cmssbx10] [aessbx10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmssdc10] [aessdc10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmssi10] [aessi10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmssi12] [aessi12] [encoding=ec,handling=glm]
+ \definefontsynonym [cmssi17] [aessi17] [encoding=ec,handling=glm]
+ \definefontsynonym [cmssi8] [aessi8] [encoding=ec,handling=glm]
+ \definefontsynonym [cmssi9] [aessi9] [encoding=ec,handling=glm]
+ \definefontsynonym [cmtcsc10] [aetcsc10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmti10] [aeti10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmti12] [aeti12] [encoding=ec,handling=glm]
+ \definefontsynonym [cmti7] [aeti7] [encoding=ec,handling=glm]
+ \definefontsynonym [cmti8] [aeti8] [encoding=ec,handling=glm]
+ \definefontsynonym [cmti9] [aeti9] [encoding=ec,handling=glm]
+ \definefontsynonym [cmtt10] [aett10] [encoding=ec,handling=glm]
+ \definefontsynonym [cmtt12] [aett12] [encoding=ec,handling=glm]
+ \definefontsynonym [cmtt8] [aett8] [encoding=ec,handling=glm]
+ \definefontsynonym [cmtt9] [aett9] [encoding=ec,handling=glm]
\stoptypescript
\starttypescript [all] [computer-modern] [il2]
@@ -221,7 +221,7 @@
\definefontsynonym [cmbx9] [wcmbx9] [encoding=t2a]
\definefontsynonym [cmbxsl10] [wcmbxsl10] [encoding=t2a]
\definefontsynonym [cmbxti10] [wcmbxti10] [encoding=t2a]
- \definefontsynonym [cmcsc10] [wcmcsc10] [encoding=t2a]
+ \definefontsynonym [cmcsc10] [wcmcsc10] [encoding=t2a]
%definefontsynonym [cmdunh10] [wcmdunh10] [encoding=t2a]
\definefontsynonym [cminch] [wcminch] [encoding=t2a]
\definefontsynonym [cmitt10] [wcmitt10] [encoding=t2a]
@@ -264,7 +264,7 @@
\definefontsynonym [cmtt9] [wcmtt9] [encoding=t2a]
\definefontsynonym [cmu10] [wcmu10] [encoding=t2a]
%definefontsynonym [cmvtt10] [wcmvtt10] [encoding=t2a]
-\stoptypescript
+\stoptypescript
\starttypescript [serif] [computer-modern] [default]
\definefontsynonym [ComputerModern] [cmr10]
@@ -370,14 +370,10 @@
% Math Times (tx)
\starttypescript [math] [times] [all]
-% \definefontsynonym [Times-Roman-Upright] [t1xr] [encoding=ec]
-% \definefontsynonym [Times-Roman-Italic] [t1xi] [encoding=ec]
-% \definefontsynonym [Times-Roman-Slanted] [t1xsl] [encoding=ec]
-% \definefontsynonym [Times-Roman-Caps] [t1xsc] [encoding=ec]
- \definefontsynonym [Times-Roman-Upright] [txr]
- \definefontsynonym [Times-Roman-Italic] [txi]
- \definefontsynonym [Times-Roman-Slanted] [txsl]
- \definefontsynonym [Times-Roman-Caps] [txsc]
+ \definefontsynonym [Times-Roman-Upright] [txr]
+ \definefontsynonym [Times-Roman-Italic] [txi]
+ \definefontsynonym [Times-Roman-Slanted] [txsl]
+ \definefontsynonym [Times-Roman-Caps] [txsc]
\definefontsynonym [Times-Companion-Upright] [tcxr]
\definefontsynonym [Times-Companion-Italic] [tcxi]
\definefontsynonym [Times-Companion-Slanted] [tcxsl]
@@ -424,18 +420,14 @@
% Palatino Math (PX)
\starttypescript [math] [palatino] [all]
-% \definefontsynonym [Palatino-Roman-Upright] [p1xr] [encoding=ec]
-% \definefontsynonym [Palatino-Roman-Italic] [p1xi] [encoding=ec]
-% \definefontsynonym [Palatino-Roman-Slanted] [p1xsl] [encoding=ec]
-% \definefontsynonym [Palatino-Roman-Caps] [p1xsc] [encoding=ec]
- \definefontsynonym [Palatino-Roman-Upright] [pxr]
- \definefontsynonym [Palatino-Roman-Italic] [pxi]
- \definefontsynonym [Palatino-Roman-Slanted] [pxsl]
- \definefontsynonym [Palatino-Roman-Caps] [pxsc]
- \definefontsynonym [Palatino-Companion-Upright] [pcxr]
- \definefontsynonym [Palatino-Companion-Italic] [pcxi]
- \definefontsynonym [Palatino-Companion-Slanted] [pcxsl]
- \definefontsynonym [Palatino-Math-Italic] [pxmi]
+ \definefontsynonym [Palatino-Roman-Upright] [pxr]
+ \definefontsynonym [Palatino-Roman-Italic] [pxi]
+ \definefontsynonym [Palatino-Roman-Slanted] [pxsl]
+ \definefontsynonym [Palatino-Roman-Caps] [pxsc]
+ \definefontsynonym [Palatino-Companion-Upright] [pcxr]
+ \definefontsynonym [Palatino-Companion-Italic] [pcxi]
+ \definefontsynonym [Palatino-Companion-Slanted] [pcxsl]
+ \definefontsynonym [Palatino-Math-Italic] [pxmi]
\definefontsynonym [Palatino-Math-Symbols] [pxsy]
\definefontsynonym [Palatino-Math-Extension] [pxex]
\definefontsynonym [Palatino-Math-SymbolsA] [pxsya]
@@ -490,7 +482,7 @@
\definefontsynonym [Charter-Roman-Caps] [\typefaceencoding-bchr8a-capitalized-800] [encoding=\typefaceencoding]
\stoptypescript
-% Whatever else we need:
+% Whatever else we need:
\starttypescript
\definefontsynonym [ZapfDingbats] [uzdr]
@@ -498,7 +490,7 @@
\definefontsynonym [MartinVogel] [fmvr8x]
\stoptypescript
-% Commercial fonts / still to be sorted out
+% Commercial fonts / still to be sorted out
% Informal (VTEX)
@@ -587,117 +579,181 @@
\stoptypescript
%D For those who want to use the existing tfm and vf files we
-%D provide:
+%D provide:
\starttypescript [berry] [8r]
-\definefontsynonym [8r-utmr8a] [ptmr8r]
-\definefontsynonym [8r-utmri8a] [ptmri8r]
-\definefontsynonym [8r-utmb8a] [ptmb8r]
-\definefontsynonym [8r-utmbi8a] [ptmbi8r]
-
-\definefontsynonym [8r-utmr8a-slanted-167] [ptmro8r]
-\definefontsynonym [8r-utmb8a-slanted-167] [ptmbo8r]
-
-\definefontsynonym [8r-uhvr8a] [phvr8r]
-\definefontsynonym [8r-uhvo8a] [phvro8r]
-\definefontsynonym [8r-uhvb8a] [phvb8r]
-\definefontsynonym [8r-uhvbo8a] [phvbo8r]
-
-\definefontsynonym [8r-ucrr8a] [pcrr8r]
-\definefontsynonym [8r-ucrb8a] [pcrb8r]
-\definefontsynonym [8r-ucrro8a] [pcrro8r]
-\definefontsynonym [8r-ucrbo8a] [pcrbo8r]
-
-\definefontsynonym [8r-uplr8a] [uplr8r]
-\definefontsynonym [8r-uplri8a] [uplri8r]
-\definefontsynonym [8r-uplb8a] [uplb8r]
-\definefontsynonym [8r-uplbi8a] [uplbi8r]
-\definefontsynonym [8r-uplr8a-slanted-167] [uplro8r]
-\definefontsynonym [8r-uplb8a-slanted-167] [uplbo8r]
-\definefontsynonym [8r-uplr8a-capitalized-800] [uplr8r]
-
-\definefontsynonym [8r-ubkl8a] [ubkl8r]
-\definefontsynonym [8r-ubkli8a] [ubkli8r]
-\definefontsynonym [8r-ubkd8a] [ubkd8r]
-\definefontsynonym [8r-ubkdi8a] [ubkdi8r]
-\definefontsynonym [8r-ubkl8a-slanted-167] [ubklo8r]
-\definefontsynonym [8r-ubkd8a-slanted-167] [ubkdo8r]
-\definefontsynonym [8r-ubkl8a-capitalized-800] [ubkl8r]
-
-\definefontsynonym [8r-uzcmi8a] [uzcmi8r]
-
-\definefontsynonym [8r-putr8a] [putr8r]
-\definefontsynonym [8r-putri8a] [putri8r]
-\definefontsynonym [8r-putb8a] [putr8r]
-\definefontsynonym [8r-putbi8a] [putbi8r]
-\definefontsynonym [8r-putr8a-slanted-167] [putro8r]
-\definefontsynonym [8r-putb8a-slanted-167] [putbo8r]
-\definefontsynonym [8r-putr8a-capitalized-800] [putr8r]
-
-\definefontsynonym [8r-bchr8a] [bchr8r]
-\definefontsynonym [8r-bchri8a] [bchri8r]
-\definefontsynonym [8r-bchb8a] [bchb8r]
-\definefontsynonym [8r-bchbi8a] [bchbi8r]
-\definefontsynonym [8r-bchr8a-slanted-167] [bchro8r]
-\definefontsynonym [8r-bchb8a-slanted-167] [bchbo8r]
-\definefontsynonym [8r-bchr8a-capitalized-800] [bchr8r]
+\setupencoding[default=8r]
+
+\definefontsynonym [8r-utmr8a] [utmr8r] [encoding=8r]
+\definefontsynonym [8r-utmri8a] [utmri8r] [encoding=8r]
+\definefontsynonym [8r-utmb8a] [utmb8r] [encoding=8r]
+\definefontsynonym [8r-utmbi8a] [utmbi8r] [encoding=8r]
+
+\definefontsynonym [8r-utmr8a-slanted-167] [utmro8r] [encoding=8r]
+\definefontsynonym [8r-utmb8a-slanted-167] [utmbo8r] [encoding=8r]
+
+\definefontsynonym [8r-uhvr8a] [uhvr8r] [encoding=8r]
+\definefontsynonym [8r-uhvo8a] [uhvro8r] [encoding=8r]
+\definefontsynonym [8r-uhvb8a] [uhvb8r] [encoding=8r]
+\definefontsynonym [8r-uhvbo8a] [uhvbo8r] [encoding=8r]
+
+\definefontsynonym [8r-ucrr8a] [ucrr8r] [encoding=8r]
+\definefontsynonym [8r-ucrb8a] [ucrb8r] [encoding=8r]
+\definefontsynonym [8r-ucrro8a] [ucrro8r] [encoding=8r]
+\definefontsynonym [8r-ucrbo8a] [ucrbo8r] [encoding=8r]
+
+\definefontsynonym [8r-uplr8a] [uplr8r] [encoding=8r]
+\definefontsynonym [8r-uplri8a] [uplri8r] [encoding=8r]
+\definefontsynonym [8r-uplb8a] [uplb8r] [encoding=8r]
+\definefontsynonym [8r-uplbi8a] [uplbi8r] [encoding=8r]
+\definefontsynonym [8r-uplr8a-slanted-167] [uplro8r] [encoding=8r]
+\definefontsynonym [8r-uplb8a-slanted-167] [uplbo8r] [encoding=8r]
+\definefontsynonym [8r-uplr8a-capitalized-800] [uplr8r] [encoding=8r]
+
+\definefontsynonym [8r-ubkl8a] [ubkl8r] [encoding=8r]
+\definefontsynonym [8r-ubkli8a] [ubkli8r] [encoding=8r]
+\definefontsynonym [8r-ubkd8a] [ubkd8r] [encoding=8r]
+\definefontsynonym [8r-ubkdi8a] [ubkdi8r] [encoding=8r]
+\definefontsynonym [8r-ubkl8a-slanted-167] [ubklo8r] [encoding=8r]
+\definefontsynonym [8r-ubkd8a-slanted-167] [ubkdo8r] [encoding=8r]
+\definefontsynonym [8r-ubkl8a-capitalized-800] [ubkl8r] [encoding=8r]
+
+\definefontsynonym [8r-uzcmi8a] [uzcmi8r] [encoding=8r]
+
+\definefontsynonym [8r-putr8a] [putr8r] [encoding=8r]
+\definefontsynonym [8r-putri8a] [putri8r] [encoding=8r]
+\definefontsynonym [8r-putb8a] [putr8r] [encoding=8r]
+\definefontsynonym [8r-putbi8a] [putbi8r] [encoding=8r]
+\definefontsynonym [8r-putr8a-slanted-167] [putro8r] [encoding=8r]
+\definefontsynonym [8r-putb8a-slanted-167] [putbo8r] [encoding=8r]
+\definefontsynonym [8r-putr8a-capitalized-800] [putr8r] [encoding=8r]
+
+\definefontsynonym [8r-bchr8a] [bchr8r] [encoding=8r]
+\definefontsynonym [8r-bchri8a] [bchri8r] [encoding=8r]
+\definefontsynonym [8r-bchb8a] [bchb8r] [encoding=8r]
+\definefontsynonym [8r-bchbi8a] [bchbi8r] [encoding=8r]
+\definefontsynonym [8r-bchr8a-slanted-167] [bchro8r] [encoding=8r]
+\definefontsynonym [8r-bchb8a-slanted-167] [bchbo8r] [encoding=8r]
+\definefontsynonym [8r-bchr8a-capitalized-800] [bchr8r] [encoding=8r]
\stoptypescript
\starttypescript [berry] [ec]
-\definefontsynonym [ec-utmr8a] [ptmr8t]
-\definefontsynonym [ec-utmri8a] [ptmri8t]
-\definefontsynonym [ec-utmb8a] [ptmb8t]
-\definefontsynonym [ec-utmbi8a] [ptmbi8t]
-
-\definefontsynonym [ec-utmr8a-slanted-167] [ptmro8t]
-\definefontsynonym [ec-utmb8a-slanted-167] [ptmbo8t]
-
-\definefontsynonym [ec-uhvr8a] [phvr8t]
-\definefontsynonym [ec-uhvo8a] [phvro8t]
-\definefontsynonym [ec-uhvb8a] [phvb8t]
-\definefontsynonym [ec-uhvbo8a] [phvbo8t]
-
-\definefontsynonym [ec-ucrr8a] [pcrr8t]
-\definefontsynonym [ec-ucrb8a] [pcrb8t]
-\definefontsynonym [ec-ucrro8a] [pcrro8t]
-\definefontsynonym [ec-ucrbo8a] [pcrbo8t]
-
-\definefontsynonym [ec-uplr8a] [uplr8t]
-\definefontsynonym [ec-uplri8a] [uplri8t]
-\definefontsynonym [ec-uplb8a] [uplb8t]
-\definefontsynonym [ec-uplbi8a] [uplbi8t]
-\definefontsynonym [ec-uplr8a-slanted-167] [uplro8t]
-\definefontsynonym [ec-uplb8a-slanted-167] [uplbo8t]
-\definefontsynonym [ec-uplr8a-capitalized-800] [uplr8t]
-
-\definefontsynonym [ec-ubkl8a] [ubkl8t]
-\definefontsynonym [ec-ubkli8a] [ubkli8t]
-\definefontsynonym [ec-ubkd8a] [ubkd8t]
-\definefontsynonym [ec-ubkdi8a] [ubkdi8t]
-\definefontsynonym [ec-ubkl8a-slanted-167] [ubklo8t]
-\definefontsynonym [ec-ubkd8a-slanted-167] [ubkdo8t]
-\definefontsynonym [ec-ubkl8a-capitalized-800] [ubkl8t]
-
-\definefontsynonym [ec-uzcmi8a] [uzcmi8t]
-
-\definefontsynonym [ec-putr8a] [putr8t]
-\definefontsynonym [ec-putri8a] [putri8t]
-\definefontsynonym [ec-putb8a] [putr8t]
-\definefontsynonym [ec-putbi8a] [putbi8t]
-\definefontsynonym [ec-putr8a-slanted-167] [putro8t]
-\definefontsynonym [ec-putb8a-slanted-167] [putbo8t]
-\definefontsynonym [ec-putr8a-capitalized-800] [putr8t]
-
-\definefontsynonym [ec-bchr8a] [bchr8t]
-\definefontsynonym [ec-bchri8a] [bchri8t]
-\definefontsynonym [ec-bchb8a] [bchb8t]
-\definefontsynonym [ec-bchbi8a] [bchbi8t]
-\definefontsynonym [ec-bchr8a-slanted-167] [bchro8t]
-\definefontsynonym [ec-bchb8a-slanted-167] [bchbo8t]
-\definefontsynonym [ec-bchr8a-capitalized-800] [bchr8t]
+\setupencoding[default=ec]
+
+\definefontsynonym [ec-utmr8a] [utmr8t] [encoding=ec]
+\definefontsynonym [ec-utmri8a] [utmri8t] [encoding=ec]
+\definefontsynonym [ec-utmb8a] [utmb8t] [encoding=ec]
+\definefontsynonym [ec-utmbi8a] [utmbi8t] [encoding=ec]
+
+\definefontsynonym [ec-utmr8a-slanted-167] [utmro8t] [encoding=ec]
+\definefontsynonym [ec-utmb8a-slanted-167] [utmbo8t] [encoding=ec]
+
+\definefontsynonym [ec-uhvr8a] [uhvr8t] [encoding=ec]
+\definefontsynonym [ec-uhvo8a] [uhvro8t] [encoding=ec]
+\definefontsynonym [ec-uhvb8a] [uhvb8t] [encoding=ec]
+\definefontsynonym [ec-uhvbo8a] [uhvbo8t] [encoding=ec]
+
+\definefontsynonym [ec-ucrr8a] [ucrr8t] [encoding=ec]
+\definefontsynonym [ec-ucrb8a] [ucrb8t] [encoding=ec]
+\definefontsynonym [ec-ucrro8a] [ucrro8t] [encoding=ec]
+\definefontsynonym [ec-ucrbo8a] [ucrbo8t] [encoding=ec]
+
+\definefontsynonym [ec-uplr8a] [uplr8t] [encoding=ec]
+\definefontsynonym [ec-uplri8a] [uplri8t] [encoding=ec]
+\definefontsynonym [ec-uplb8a] [uplb8t] [encoding=ec]
+\definefontsynonym [ec-uplbi8a] [uplbi8t] [encoding=ec]
+\definefontsynonym [ec-uplr8a-slanted-167] [uplro8t] [encoding=ec]
+\definefontsynonym [ec-uplb8a-slanted-167] [uplbo8t] [encoding=ec]
+\definefontsynonym [ec-uplr8a-capitalized-800] [uplr8t] [encoding=ec]
+
+\definefontsynonym [ec-ubkl8a] [ubkl8t] [encoding=ec]
+\definefontsynonym [ec-ubkli8a] [ubkli8t] [encoding=ec]
+\definefontsynonym [ec-ubkd8a] [ubkd8t] [encoding=ec]
+\definefontsynonym [ec-ubkdi8a] [ubkdi8t] [encoding=ec]
+\definefontsynonym [ec-ubkl8a-slanted-167] [ubklo8t] [encoding=ec]
+\definefontsynonym [ec-ubkd8a-slanted-167] [ubkdo8t] [encoding=ec]
+\definefontsynonym [ec-ubkl8a-capitalized-800] [ubkl8t] [encoding=ec]
+
+\definefontsynonym [ec-uzcmi8a] [uzcmi8t] [encoding=ec]
+
+\definefontsynonym [ec-putr8a] [putr8t] [encoding=ec]
+\definefontsynonym [ec-putri8a] [putri8t] [encoding=ec]
+\definefontsynonym [ec-putb8a] [putr8t] [encoding=ec]
+\definefontsynonym [ec-putbi8a] [putbi8t] [encoding=ec]
+\definefontsynonym [ec-putr8a-slanted-167] [putro8t] [encoding=ec]
+\definefontsynonym [ec-putb8a-slanted-167] [putbo8t] [encoding=ec]
+\definefontsynonym [ec-putr8a-capitalized-800] [putr8t] [encoding=ec]
+
+\definefontsynonym [ec-bchr8a] [bchr8t] [encoding=ec]
+\definefontsynonym [ec-bchri8a] [bchri8t] [encoding=ec]
+\definefontsynonym [ec-bchb8a] [bchb8t] [encoding=ec]
+\definefontsynonym [ec-bchbi8a] [bchbi8t] [encoding=ec]
+\definefontsynonym [ec-bchr8a-slanted-167] [bchro8t] [encoding=ec]
+\definefontsynonym [ec-bchb8a-slanted-167] [bchbo8t] [encoding=ec]
+\definefontsynonym [ec-bchr8a-capitalized-800] [bchr8t] [encoding=ec]
+
+\stoptypescript
+
+% the following fonts are normally not present on tex live
+
+\starttypescript [berry] [texnansi]
+
+\setupencoding[default=texnansi]
+
+\definefontsynonym [ec-utmr8a] [utmr8y] [encoding=texnansi]
+\definefontsynonym [ec-utmri8a] [utmri8y] [encoding=texnansi]
+\definefontsynonym [ec-utmb8a] [utmb8y] [encoding=texnansi]
+\definefontsynonym [ec-utmbi8a] [utmbi8y] [encoding=texnansi]
+
+\definefontsynonym [ec-utmr8a-slanted-167] [ptmro8y] [encoding=texnansi]
+\definefontsynonym [ec-utmb8a-slanted-167] [ptmbo8y] [encoding=texnansi]
+
+\definefontsynonym [ec-uhvr8a] [uhvr8y] [encoding=texnansi]
+\definefontsynonym [ec-uhvo8a] [uhvro8y] [encoding=texnansi]
+\definefontsynonym [ec-uhvb8a] [uhvb8y] [encoding=texnansi]
+\definefontsynonym [ec-uhvbo8a] [uhvbo8y] [encoding=texnansi]
+
+\definefontsynonym [ec-ucrr8a] [pcrr8y] [encoding=texnansi]
+\definefontsynonym [ec-ucrb8a] [pcrb8y] [encoding=texnansi]
+\definefontsynonym [ec-ucrro8a] [pcrro8y] [encoding=texnansi]
+\definefontsynonym [ec-ucrbo8a] [pcrbo8y] [encoding=texnansi]
+
+\definefontsynonym [ec-uplr8a] [uplr8y] [encoding=texnansi]
+\definefontsynonym [ec-uplri8a] [uplri8y] [encoding=texnansi]
+\definefontsynonym [ec-uplb8a] [uplb8y] [encoding=texnansi]
+\definefontsynonym [ec-uplbi8a] [uplbi8y] [encoding=texnansi]
+\definefontsynonym [ec-uplr8a-slanted-167] [uplro8y] [encoding=texnansi]
+\definefontsynonym [ec-uplb8a-slanted-167] [uplbo8y] [encoding=texnansi]
+\definefontsynonym [ec-uplr8a-capitalized-800] [uplr8y] [encoding=texnansi]
+
+\definefontsynonym [ec-ubkl8a] [ubkl8y] [encoding=texnansi]
+\definefontsynonym [ec-ubkli8a] [ubkli8y] [encoding=texnansi]
+\definefontsynonym [ec-ubkd8a] [ubkd8y] [encoding=texnansi]
+\definefontsynonym [ec-ubkdi8a] [ubkdi8y] [encoding=texnansi]
+\definefontsynonym [ec-ubkl8a-slanted-167] [ubklo8y] [encoding=texnansi]
+\definefontsynonym [ec-ubkd8a-slanted-167] [ubkdo8y] [encoding=texnansi]
+\definefontsynonym [ec-ubkl8a-capitalized-800] [ubkl8y] [encoding=texnansi]
+
+\definefontsynonym [ec-uzcmi8a] [uzcmi8y] [encoding=texnansi]
+
+\definefontsynonym [ec-putr8a] [putr8y] [encoding=texnansi]
+\definefontsynonym [ec-putri8a] [putri8y] [encoding=texnansi]
+\definefontsynonym [ec-putb8a] [putr8y] [encoding=texnansi]
+\definefontsynonym [ec-putbi8a] [putbi8y] [encoding=texnansi]
+\definefontsynonym [ec-putr8a-slanted-167] [putro8y] [encoding=texnansi]
+\definefontsynonym [ec-putb8a-slanted-167] [putbo8y] [encoding=texnansi]
+\definefontsynonym [ec-putr8a-capitalized-800] [putr8y] [encoding=texnansi]
+
+\definefontsynonym [ec-bchr8a] [bchr8y] [encoding=texnansi]
+\definefontsynonym [ec-bchri8a] [bchri8y] [encoding=texnansi]
+\definefontsynonym [ec-bchb8a] [bchb8y] [encoding=texnansi]
+\definefontsynonym [ec-bchbi8a] [bchbi8y] [encoding=texnansi]
+\definefontsynonym [ec-bchr8a-slanted-167] [bchro8y] [encoding=texnansi]
+\definefontsynonym [ec-bchb8a-slanted-167] [bchbo8y] [encoding=texnansi]
+\definefontsynonym [ec-bchr8a-capitalized-800] [bchr8y] [encoding=texnansi]
\stoptypescript
diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex
index ce1354e8c..cb25a6036 100644
--- a/tex/context/base/type-ini.tex
+++ b/tex/context/base/type-ini.tex
@@ -432,6 +432,6 @@
\fetchruntimecommand \typetypescript {\f!typeprefix\s!run}
-% \setupbodyfont[fil] % default filenames
+% \usetypescript [berry] [ec]
\protect \endinput
diff --git a/tex/context/base/type-map.tex b/tex/context/base/type-map.tex
index 18724bd92..f1c19dbda 100644
--- a/tex/context/base/type-map.tex
+++ b/tex/context/base/type-map.tex
@@ -18,7 +18,6 @@
\starttypescript [map] [all]
\loadmapfile[original-ams-cmr.map]
\loadmapfile[original-ams-euler.map]
- \loadmapfile[original-ams-logo.map]
\stoptypescript
\starttypescript [map] [il2]
diff --git a/tex/context/base/type-omg.tex b/tex/context/base/type-omg.tex
new file mode 100644
index 000000000..c5be16903
--- /dev/null
+++ b/tex/context/base/type-omg.tex
@@ -0,0 +1,200 @@
+%D \module
+%D [ file=type-omg,
+%D version=2002.05.15,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Basic \OMEGA\ Gamma Definitions,
+%D author={Idris Samawi Hamid, Hans Hagen},
+%D date=\currentdate,
+%D copyright={PRAGMA-ADE, Idris Samawi Hamid}]
+%
+%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 need to document this module a bit. See \type {m-gamma}
+%D for more information.
+
+\definestyle [normalvariant] [\nv] [] % so we can get ucvtt (Unicode Variable Typewriter)
+
+%D omarab:
+
+\starttypescript [naskh] [omega] [name]
+
+ \definefontsynonym [OmegaArabic] [omarab]
+ \definefontsynonym [OmegaArabic-Bold] [omarabb]
+
+ \definefontsynonym [Naskh] [OmegaArabic]
+ \definefontsynonym [NaskhBold] [OmegaArabic-Bold]
+
+\stoptypescript
+
+\starttypescript [naskh] [omega] [size]
+
+ \definebodyfont
+ [20.7pt,17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt]
+ [rm]
+ [tf=Naskh sa 1,
+ bf=NaskhBold sa 1,
+ it=Naskh sa 1,
+ sl=Naskh sa 1,
+ bi=NaskhBold sa 1,
+ bs=NaskhBold sa 1,
+ sc=Naskh sa 1]
+
+\usetypescript [math] [computer-modern] [size]
+
+\stoptypescript
+
+\starttypescript [OmegaArab]
+
+ \definebodyfontenvironment
+ [omarb]
+ [default]
+ [interlinespace=3ex]
+
+ \definetypeface [omarb] [rm] [naskh] [omega] [omega]
+
+\stoptypescript
+
+%D omlgc:
+
+\starttypescript [serif] [omega] [name]
+
+ \definefontsynonym [OmegaSerif] [omlgc]
+ \definefontsynonym [OmegaSerif-Bold] [omlgcb]
+ \definefontsynonym [OmegaSerif-Italic] [omlgci]
+ \definefontsynonym [OmegaSerif-Slanted] [omlgci]
+ \definefontsynonym [OmegaSerif-BoldItalic] [omlgcbi]
+ \definefontsynonym [OmegaSerif-BoldSlanted][omlgcbi]
+ \definefontsynonym [OmegaSerif-Caps] [omlgc]
+
+ \definefontsynonym [Serif] [OmegaSerif]
+ \definefontsynonym [SerifBold] [OmegaSerif-Bold]
+ \definefontsynonym [SerifItalic] [OmegaSerif-Italic]
+ \definefontsynonym [SerifSlanted] [OmegaSerif-Slanted]
+ \definefontsynonym [SerifBoldItalic] [OmegaSerif-BoldItalic]
+ \definefontsynonym [SerifBoldSlanted] [OmegaSerif-BoldSlanted]
+ \definefontsynonym [SerifCaps] [OmegaSerif-Caps]
+
+\stoptypescript
+
+\starttypescript [mono] [omega] [name]
+
+ \definefontsynonym [OmegaMono] [uctt10]
+ \definefontsynonym [OmegaMono-Italic] [ucitt10]
+ \definefontsynonym [OmegaMono-Slanted] [ucsltt10]
+ \definefontsynonym [OmegaMono-Bold] [uctt10]
+ \definefontsynonym [OmegaMono-BoldItalic] [ucitt10]
+ \definefontsynonym [OmegaMono-BoldSlanted] [ucsltt10]
+ \definefontsynonym [OmegaMono-Caps] [uctt10]
+ \definefontsynonym [OmegaMono-Variable] [ucvtt10]
+
+ \definefontsynonym [Mono] [OmegaMono]
+ \definefontsynonym [MonoBold] [OmegaMono-Bold]
+ \definefontsynonym [MonoItalic] [OmegaMono-Italic]
+ \definefontsynonym [MonoSlanted] [OmegaMono-Slanted]
+ \definefontsynonym [MonoBoldItalic] [OmegaMono-BoldItalic]
+ \definefontsynonym [MonoBoldSlanted] [OmegaMono-BoldSlanted]
+ \definefontsynonym [MonoCaps] [OmegaMono-Caps]
+ \definefontsynonym [MonoVariable] [OmegaMono-Variable]
+
+\stoptypescript
+
+\starttypescript [serif] [omega] [size]
+
+ \definebodyfont
+ [20.7pt,17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+ [rm]
+ [tf=Serif sa 1,
+ bf=SerifBold sa 1,
+ it=SerifItalic sa 1,
+ sl=SerifSlanted sa 1,
+ bi=SerifBoldItalic sa 1,
+ bs=SerifBoldSlanted sa 1,
+ sc=SerifCaps sa 1]
+
+\usetypescript [math,sans] [computer-modern] [size]
+
+\stoptypescript
+
+%D In order to get default Unicode Variable Typewriter,
+%D uncomment the first \type {\definebodyfont} and then
+%D comment the rest of this typescript.
+
+\starttypescript [mono] [omega] [size]
+
+% \definebodyfont
+% [20.7pt,17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+% [rm]
+% [tf=MonoVariable sa 1,
+% bf=MonoBold sa 1
+% it=MonoItalic sa 1,
+% sl=MonoSlanted sa 1,
+% bi=MonoBoldItali sa 1,
+% bs=MonoBoldSlanted sa 1,
+% sc=MonoCaps sa 1]
+
+ \definebodyfont
+ [20.7pt,17.3pt,14.4pt,12pt,11pt]
+ [tt]
+ [tf=uctt12 sa 1,
+ bf=uctt12 sa 1,
+ it=ucitt10 sa 1,
+ sl=ucsltt10 sa 1,
+ bi=ucitt10 sa 1,
+ bs=ucsltt10 sa 1,
+ sc=uctt10 sa 1,
+ nv=ucvtt10 sa 1]
+
+ \definebodyfont
+ [10pt]
+ [tt]
+ [tf=uctt10 at 10pt,
+ bf=uctt10 at 10pt,
+ it=ucitt10 at 10pt,
+ sl=ucsltt10 at 10pt,
+ bi=ucitt10 at 10pt,
+ bs=ucsltt10 at 10pt,
+ sc=uctt10 at 10pt,
+ nv=ucvtt10 at 10pt]
+
+ \definebodyfont
+ [9pt]
+ [tt]
+ [tf=uctt9 at 9pt,
+ bf=uctt9 at 9pt,
+ it=ucitt10 at 9pt,
+ sl=ucsltt10 at 9pt,
+ bi=ucitt10 at 9pt,
+ bs=ucsltt10 at 9pt,
+ sc=uctt10 at 9pt,
+ nv=ucvtt10 at 9pt]
+
+ \definebodyfont
+ [8pt,7pt,6pt,5pt,4pt]
+ [tt]
+ [tf=uctt8 sa 1,
+ bf=uctt8 sa 1,
+ it=ucitt10 sa 1,
+ sl=ucsltt10 sa 1,
+ bi=ucitt10 sa 1,
+ bs=ucsltt10 sa 1,
+ sc=uctt10 sa 1,
+ nv=ucvtt10 sa 1]
+
+\stoptypescript
+
+\starttypescript [OmegaLGC]
+
+ \definebodyfontenvironment
+ [omlgc]
+ [default]
+ [interlinespace=2.8ex]
+
+ \definetypeface [omlgc] [rm] [serif] [omega] [omega]
+ \definetypeface [omlgc] [tt] [mono] [omega] [omega]
+
+\stoptypescript
+
+\endinput
diff --git a/tex/context/base/xtag-ext.tex b/tex/context/base/xtag-ext.tex
index 174ac173a..6d35d282a 100644
--- a/tex/context/base/xtag-ext.tex
+++ b/tex/context/base/xtag-ext.tex
@@ -150,6 +150,13 @@
\gdef\flushXMLelement#1%
{\csname\@@XMLsave:#1\endcsname}
+%\gdef\flushXMLelement#1%
+% {\csname
+% \@@XMLsave:\ifcsname\@@XMLsave:#1\endcsname#1\else\@@XMLsave\fi
+% \endcsname}
+%
+%\letvalue{\@@XMLsave:\@@XMLsave}\empty
+
\gdef\showXMLelement#1%
{\showvalue{\@@XMLsave:#1}}
@@ -165,7 +172,7 @@
\gdef\texXMLelement#1%
{\begingroup
\setnormalcatcodes
- \scantokens\@EA\@EA\@EA{\csname\@@XMLsave#1\endcsname}%
+ \scantokens\@EA\@EA\@EA{\csname\@@XMLsave:#1\endcsname}%
\endgroup}
\egroup
diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex
index 2a526e0e6..3b051f477 100644
--- a/tex/context/base/xtag-ini.tex
+++ b/tex/context/base/xtag-ini.tex
@@ -11,9 +11,11 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% todo: XMLfullsave == also attributes
+\writestatus{loading}{Context XML Macros (initialization)}
-% csnames
+%D To be sure:
+
+\newif\ifprocessingXML
\beginTEX
\writestatus{XML}{sorry, XML is only supported in (pdf)etex}
@@ -21,10 +23,6 @@
\endinput
\endTEX
-\writestatus{loading}{Context XML Macros (initialization)}
-
-% XMLelse -> elseXML
-
%D This module is highly optimized for speed, which sometimes
%D reads to rather unreadable code. Sorry for this.
@@ -44,7 +42,9 @@
\endETEX
-\writestatus{loading}{Context XML Macros (ini)}
+% todo: XMLfullsave == also attributes
+% csnames
+% XMLelse -> elseXML
%D Remark: some hard coded character things will be replaced
%D by named glyphs as soon as the upgraded encoding modules
@@ -169,7 +169,7 @@
\newif\ifignoreXMLspaces
\newif\iffixedXMLfont
\newif\iftraceXMLelements
-\newif\ifprocessingXML
+%newif\ifprocessingXML
\newcount\XMLlevel % scratchcounter
\newcount\XMLdepth % used here
@@ -1556,7 +1556,7 @@
\def\XMLunspace#1% kan sneller
{\@EA\ifx\csname\@@XMLdata:#1\endcsname\longempty\else
- \long\@EA\edef\csname\@@XMLdata:#1\csname
+ \long\@EA\edef\csname\@@XMLdata:#1\endcsname
{\@EAEAEA\dounspaced\csname\@@XMLdata:#1\endcsname\end}%
\fi}
diff --git a/tex/context/config/cont-usr.tex b/tex/context/config/cont-usr.tex
index f70072c9a..eaab96693 100644
--- a/tex/context/config/cont-usr.tex
+++ b/tex/context/config/cont-usr.tex
@@ -150,6 +150,7 @@
%D are used to get accented and non latin characters.
\useencoding[fde] % german
+% \useencoding[ffr] % french
% \useencoding[fro] % romanian
% \useencoding[fpl] % polish
diff --git a/tex/context/user/cont-sys.rme b/tex/context/user/cont-sys.rme
index 7ea324ae3..8923364cd 100644
--- a/tex/context/user/cont-sys.rme
+++ b/tex/context/user/cont-sys.rme
@@ -68,14 +68,6 @@
% Loading a specific special driver:
%
% \setupoutput [dviwindo]
-%
-% Enabling \CONTEXT\ navigation symbols as well as \euro's.
-
-\usesymbols [nav,mvs]
-
-\setupsymbolset [navigation 1] % not that clever
-
-\setupinteraction [\c!symboolset=navigation 1]
% Changing language defaults:
%
@@ -95,8 +87,6 @@
% \runMPgraphicstrue
% \runMPTEXgraphicstrue
-% \recycleMPslotstrue
-
% This saves some runtime, but needs a format, which you can
% make with 'texexec --make --alone metafun'. Make sure that
% the mem files are moved to the used web2c path (locate with
@@ -113,8 +103,8 @@
\protectbufferstrue
-% You can enable a rigurous figure searching, but normally
-% this is not really needed and even annoying.
+% You can enable a more extensive figure searching, but
+% normally this is not really needed and even annoying.
%
% \runutilityfiletrue