summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2003-08-21 00:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2003-08-21 00:00:00 +0200
commit309b7e1b8d2422eb36e584f3c57591d960bcc402 (patch)
tree08691435b84e3978f244616c400915719b4c256a
parent3f9c44091f54eb858cfbb71b6346445e606b8687 (diff)
downloadcontext-309b7e1b8d2422eb36e584f3c57591d960bcc402.tar.gz
stable 2003.08.21
-rw-r--r--context/data/cont-cz.tws8
-rw-r--r--context/data/cont-de.tws8
-rw-r--r--context/data/cont-en.tws8
-rw-r--r--context/data/cont-it.tws8
-rw-r--r--context/data/cont-nl.tws8
-rw-r--r--context/data/cont-ro.tws8
-rw-r--r--context/perltk/texexec.pl74
-rw-r--r--context/perltk/texfont.pl92
-rw-r--r--tex/context/base/cont-err.tex24
-rw-r--r--tex/context/base/cont-fil.tex83
-rw-r--r--tex/context/base/cont-new.tex241
-rw-r--r--tex/context/base/cont-sys.ori37
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-box.tex27
-rw-r--r--tex/context/base/core-des.tex35
-rw-r--r--tex/context/base/core-fld.tex23
-rw-r--r--tex/context/base/core-grd.tex511
-rw-r--r--tex/context/base/core-int.tex125
-rw-r--r--tex/context/base/core-itm.tex101
-rw-r--r--tex/context/base/core-job.tex22
-rw-r--r--tex/context/base/core-mis.tex14
-rw-r--r--tex/context/base/core-nav.tex15
-rw-r--r--tex/context/base/core-ntb.tex292
-rw-r--r--tex/context/base/core-obj.tex95
-rw-r--r--tex/context/base/core-rul.tex10
-rw-r--r--tex/context/base/core-sec.tex298
-rw-r--r--tex/context/base/core-spa.tex224
-rw-r--r--tex/context/base/core-tab.tex2
-rw-r--r--tex/context/base/core-tbl.tex413
-rw-r--r--tex/context/base/core-var.tex8
-rw-r--r--tex/context/base/enco-ini.tex26
-rw-r--r--tex/context/base/lang-ini.tex1
-rw-r--r--tex/context/base/meta-dum.tex2
-rw-r--r--tex/context/base/mult-com.tex3
-rw-r--r--tex/context/base/mult-con.tex3
-rw-r--r--tex/context/base/mult-sys.tex2
-rw-r--r--tex/context/base/page-flt.tex289
-rw-r--r--tex/context/base/page-lay.tex2
-rw-r--r--tex/context/base/page-lin.tex10
-rw-r--r--tex/context/base/page-lyr.tex5
-rw-r--r--tex/context/base/page-mar.tex2
-rw-r--r--tex/context/base/page-one.tex89
-rw-r--r--tex/context/base/page-sid.tex110
-rw-r--r--tex/context/base/setupb.tex60
-rw-r--r--tex/context/base/spec-def.tex4
-rw-r--r--tex/context/base/spec-fdf.tex339
-rw-r--r--tex/context/base/spec-tpd.tex4
-rw-r--r--tex/context/base/supp-box.tex23
-rw-r--r--tex/context/base/supp-eps.tex2
-rw-r--r--tex/context/base/supp-lan.tex36
-rw-r--r--tex/context/base/supp-mis.tex4
-rw-r--r--tex/context/base/supp-mps.tex10
-rw-r--r--tex/context/base/supp-pdf.tex88
-rw-r--r--tex/context/base/syst-ext.tex63
-rw-r--r--tex/context/base/syst-new.tex18
-rw-r--r--tex/context/base/thrd-tab.tex2
-rw-r--r--tex/context/base/type-enc.tex212
-rw-r--r--tex/context/base/x-fdf-00.tex4
-rw-r--r--tex/context/base/xtag-ext.tex7
-rw-r--r--tex/context/sample/douglas.tex8
-rw-r--r--tex/context/sample/ward.tex5
-rw-r--r--tex/context/user/cont-sys.rme37
62 files changed, 2345 insertions, 1941 deletions
diff --git a/context/data/cont-cz.tws b/context/data/cont-cz.tws
index 60a6061cd..d80c91eb1 100644
--- a/context/data/cont-cz.tws
+++ b/context/data/cont-cz.tws
@@ -1695,7 +1695,7 @@ stopsetup
startsetup
com:premistinamrizku:
typ:vals/:
-val:vrsek,obe,spodek,-vrsek,-obe,-spodek, vysoko,nastred,nizko,stranka,zadny,standardni, siroky,prizpusobive,podlehloubky,radek,*dimenze:standardni:
+val:vrsek,obe,spodek,-vrsek,-obe,-spodek,text, vysoko,nastred,nizko,stranka,zadny,standardni, siroky,prizpusobive,podlehloubky,radek,*dimenze:standardni:
stopsetup
startsetup
@@ -1799,6 +1799,7 @@ var:zarovnejtitul:ano,ne::
var:tolerance:velmistriktni,striktni,tolerantni,velmitolerantni,natahnout::
var:odsadpristi:ano,ne::
var:prikaz:*\prikaz#1#2::
+var:marginalie:*dimenze::
stopsetup
startsetup
@@ -1806,6 +1807,7 @@ com:nastavpopisky:
typ:vars/:
var:misto:vrsek,spodek,zadny,vysoko,nizko,nastred::
var:sirka:prizpusobive,siroky,max,*dimenze::
+var:minsirka:prizpusobive,*dimenze::
var:stylhlavicky:normalni,tucne,sklonene,tucnesklonene,opis,kap,male...,*prikaz::
var:pismeno:normalni,tucne,sklonene,tucnesklonene,opis,kap,male...,*prikaz::
var:cislo:ano,ne::
@@ -1814,6 +1816,7 @@ var:zarovnani:vlevo,nastred,vpravo,ne::
var:konverze:cisla,pismena,Pismena,rimskecislice,Rimskecislice::
var:zpusob:skrztext,skrz*sekce::
var:oddelovac:*text::
+var:prikaz:*prikaz::
var:vzdalenost:*dimenze::
stopsetup
@@ -3280,6 +3283,7 @@ var:tloustkalinky:*dimenze::
var:vzdalenost:prazdny,mrizka,podlehloubky,*dimenze,male,stredni,velke,zadny::
var:zakladnifont:5pt,...,12pt,male,velke::
var:linka:normalni,radek::
+var:split:ano,ne::
stopsetup
startsetup
@@ -3866,6 +3870,8 @@ var:titul:*text::
var:mezera:ano,ne::
var:symbol:normalni, Novy,Bublinka,Pridavek,Napoveda,Odstavec,Klavesa, *jmeno::
var:volba:max,buffer::
+var:marginalie:*dimenze::
+var:vzdalenost:*dimenze::
stopsetup
startsetup
diff --git a/context/data/cont-de.tws b/context/data/cont-de.tws
index ee420f45e..f63530b65 100644
--- a/context/data/cont-de.tws
+++ b/context/data/cont-de.tws
@@ -1695,7 +1695,7 @@ stopsetup
startsetup
com:amgitterneuausrichten:
typ:vals/:
-val:oben,beide,unten,-oben,-beide,-unten, hoch,mittig,tief,seite,kein,standard, breit,passend,tiefe,zeile,*Dimension:standard:
+val:oben,beide,unten,-oben,-beide,-unten,text, hoch,mittig,tief,seite,kein,standard, breit,passend,tiefe,zeile,*Dimension:standard:
stopsetup
startsetup
@@ -1799,6 +1799,7 @@ var:titelausrichten:ja,nein::
var:toleranz:sehrstreng,streng,tolerant,sehrtolerant,strecken::
var:ziehefolgendeein:ja,nein::
var:befehl:*\Befehl#1#2::
+var:marginalie:*Dimension::
stopsetup
startsetup
@@ -1806,6 +1807,7 @@ com:stellebilderunterschriftein:
typ:vars/:
var:platz:oben,unten,kein,hoch,tief,mittig::
var:breite:passend,breit,max,*Dimension::
+var:minbreite:passend,*Dimension::
var:kopfstil:normal,fett,geneigt,fettgeneigt,tippen,kap,klein...,*Befehl::
var:stil:normal,fett,geneigt,fettgeneigt,tippen,kap,klein...,*Befehl::
var:nummer:ja,nein::
@@ -1814,6 +1816,7 @@ var:ausrichtung:links,mittig,rechts,nein::
var:konversion:ziffern,buchstaben,Buchstaben,roemischezahlen,Roemischezahlen::
var:art:protext,pro*Abschnitt::
var:seperator:*Text::
+var:befehl:*Befehl::
var:abstand:*Dimension::
stopsetup
@@ -3280,6 +3283,7 @@ var:liniendicke:*Dimension::
var:abstand:blanko,gritter,tiefe,*Dimension,klein,mittel,gross,kein::
var:fliesstext:5pt,...,12pt,klein,gross::
var:linie:normal,zeile::
+var:split:ja,nein::
stopsetup
startsetup
@@ -3866,6 +3870,8 @@ var:titel:*Text::
var:spatium:ja,nein::
var:symbol:normal, Neu,Ballon,Zusatz,Hilfe,Absatz,Schluessel, *Name::
var:option:max,puffer::
+var:marginalie:*Dimension::
+var:abstand:*Dimension::
stopsetup
startsetup
diff --git a/context/data/cont-en.tws b/context/data/cont-en.tws
index 80faba9e5..f284dd902 100644
--- a/context/data/cont-en.tws
+++ b/context/data/cont-en.tws
@@ -1695,7 +1695,7 @@ stopsetup
startsetup
com:moveongrid:
typ:vals/:
-val:top,both,bottom,-top,-both,-bottom, high,middle,low,page,none,standard, broad,fit,depth,line,*dimension:standard:
+val:top,both,bottom,-top,-both,-bottom,text, high,middle,low,page,none,standard, broad,fit,depth,line,*dimension:standard:
stopsetup
startsetup
@@ -1799,6 +1799,7 @@ var:aligntitle:yes,no::
var:tolerance:verystrict,strict,tolerant,verytolerant,stretch::
var:indentnext:yes,no::
var:command:*\command#1#2::
+var:margin:*dimension::
stopsetup
startsetup
@@ -1806,6 +1807,7 @@ com:setupcaptions:
typ:vars/:
var:location:top,bottom,none,high,low,middle::
var:width:fit,broad,max,*dimension::
+var:minwidth:fit,*dimension::
var:headstyle:normal,bold,slanted,boldslanted,type,cap,small...,*command::
var:style:normal,bold,slanted,boldslanted,type,cap,small...,*command::
var:number:yes,no::
@@ -1814,6 +1816,7 @@ var:align:left,middle,right,no::
var:conversion:numbers,characters,Characters,romannumerals,Romannumerals::
var:way:bytext,by*section::
var:separator:*text::
+var:command:*command::
var:distance:*dimension::
stopsetup
@@ -3280,6 +3283,7 @@ var:rulethickness:*dimension::
var:distance:blank,grid,depth,*dimension,small,medium,big,none::
var:bodyfont:5pt,...,12pt,small,big::
var:rule:normal,line::
+var:split:yes,no::
stopsetup
startsetup
@@ -3866,6 +3870,8 @@ var:title:*text::
var:space:yes,no::
var:symbol:normal, New,Balloon,Addition,Help,Paragraph,Key, *name::
var:option:max,buffer::
+var:margin:*dimension::
+var:distance:*dimension::
stopsetup
startsetup
diff --git a/context/data/cont-it.tws b/context/data/cont-it.tws
index 783356e55..b5a90dc6b 100644
--- a/context/data/cont-it.tws
+++ b/context/data/cont-it.tws
@@ -1695,7 +1695,7 @@ stopsetup
startsetup
com:spostaagriglia:
typ:vals/:
-val:cima,entrambi,fondo,-cima,-entrambi,-fondo, alto,centro,basso,pagina,nessuno,standard, ampio,adatta,profondita,riga,*dimensione:standard:
+val:cima,entrambi,fondo,-cima,-entrambi,-fondo,testo, alto,centro,basso,pagina,nessuno,standard, ampio,adatta,profondita,riga,*dimensione:standard:
stopsetup
startsetup
@@ -1799,6 +1799,7 @@ var:allineatitolo:si,no::
var:tolleranza:moltorigido,rigido,tollerante,moltotollerante,dilata::
var:rientrasuccessivo:si,no::
var:comando:*\comando#1#2::
+var:margine:*dimensione::
stopsetup
startsetup
@@ -1806,6 +1807,7 @@ com:impostacaptions:
typ:vars/:
var:luogo:cima,fondo,nessuno,alto,basso,centro::
var:ampiezza:adatta,ampio,max,*dimensione::
+var:ampiezzamin:adatta,*dimensione::
var:stiletesta:normale,grassetto,inclinato,grassettoinclinato,type,cap,piccolo...,*comando::
var:stile:normale,grassetto,inclinato,grassettoinclinato,type,cap,piccolo...,*comando::
var:numero:si,no::
@@ -1814,6 +1816,7 @@ var:allinea:sinistra,centro,destra,no::
var:conversione:numeri,lettere,Lettere,numeriromani,Numeriromani::
var:modo:datesto,da*sezione::
var:separatore:*testo::
+var:comando:*comando::
var:distanza:*dimensione::
stopsetup
@@ -3280,6 +3283,7 @@ var:spessorelinea:*dimensione::
var:distanza:rigovuoto,griglia,profondita,*dimensione,piccolo,medio,grande,nessuno::
var:fonttesto:5pt,...,12pt,piccolo,grande::
var:linea:normale,riga::
+var:separa:si,no::
stopsetup
startsetup
@@ -3866,6 +3870,8 @@ var:titolo:*testo::
var:spazio:si,no::
var:simbolo:normale, Nuovo,Pallone,Aggiunta,Aiuto,Capoverso,Tasto, *nome::
var:opzione:max,buffer::
+var:margine:*dimensione::
+var:distanza:*dimensione::
stopsetup
startsetup
diff --git a/context/data/cont-nl.tws b/context/data/cont-nl.tws
index 09d564965..6a2541761 100644
--- a/context/data/cont-nl.tws
+++ b/context/data/cont-nl.tws
@@ -1695,7 +1695,7 @@ stopsetup
startsetup
com:verplaatsopgrid:
typ:vals/:
-val:boven,beide,onder,-boven,-beide,-onder, hoog,midden,laag,pagina,geen,standaard, ruim,passend,diepte,regel,*maat:standaard:
+val:boven,beide,onder,-boven,-beide,-onder,tekst, hoog,midden,laag,pagina,geen,standaard, ruim,passend,diepte,regel,*maat:standaard:
stopsetup
startsetup
@@ -1799,6 +1799,7 @@ var:titeluitlijnen:ja,nee::
var:tolerantie:zeerstreng,streng,soepel,zeersoepel,rek::
var:springvolgendein:ja,nee::
var:commando:*\commando#1#2::
+var:marge:*maat::
stopsetup
startsetup
@@ -1806,6 +1807,7 @@ com:stelblokkopjesin:
typ:vars/:
var:plaats:boven,onder,geen,hoog,laag,midden::
var:breedte:passend,ruim,max,*maat::
+var:minbreedte:passend,*maat::
var:kopletter:normaal,vet,schuin,vetschuin,type,kap,klein...,*commando::
var:letter:normaal,vet,schuin,vetschuin,type,kap,klein...,*commando::
var:nummer:ja,nee::
@@ -1814,6 +1816,7 @@ var:uitlijnen:links,midden,rechts,nee::
var:conversie:cijfers,letters,Letters,romeins,Romeins::
var:wijze:pertekst,per*sectie::
var:scheider:*tekst::
+var:commando:*commando::
var:afstand:*maat::
stopsetup
@@ -3280,6 +3283,7 @@ var:lijndikte:*maat::
var:afstand:blanko,grid,diepte,*maat,klein,middel,groot,geen::
var:korps:5pt,...,12pt,klein,groot::
var:lijn:normaal,regel::
+var:splitsen:ja,nee::
stopsetup
startsetup
@@ -3866,6 +3870,8 @@ var:titel:*tekst::
var:spatie:ja,nee::
var:symbool:normaal, Nieuw,Ballon,Toevoeging,Help,Paragraaf,Sleutel, *naam::
var:optie:max,buffer::
+var:marge:*maat::
+var:afstand:*maat::
stopsetup
startsetup
diff --git a/context/data/cont-ro.tws b/context/data/cont-ro.tws
index 29684165d..8d06df512 100644
--- a/context/data/cont-ro.tws
+++ b/context/data/cont-ro.tws
@@ -1695,7 +1695,7 @@ stopsetup
startsetup
com:mutapegrid:
typ:vals/:
-val:sus,ambele,subsol,-sus,-ambele,-subsol, inalt,centru,jos,pagina,niciunul,standard, broad,ajustat,adancime,linie,*dimensiune:standard:
+val:sus,ambele,subsol,-sus,-ambele,-subsol,text, inalt,centru,jos,pagina,niciunul,standard, broad,ajustat,adancime,linie,*dimensiune:standard:
stopsetup
startsetup
@@ -1799,6 +1799,7 @@ var:alinieretitlu:da,nu::
var:toleranta:foartestrict,strict,tolerant,foartetolerant,dilatat::
var:aliniaturmator:da,nu::
var:comanda:*\comanda#1#2::
+var:margine:*dimensiune::
stopsetup
startsetup
@@ -1806,6 +1807,7 @@ com:seteazalegendele:
typ:vars/:
var:locatie:sus,subsol,niciunul,inalt,jos,centru::
var:latime:ajustat,broad,max,*dimensiune::
+var:latimeminima:ajustat,*dimensiune::
var:stiltitlu:normal,aldin,inclinat,aldininclinat,type,cap,mic...,*comanda::
var:stil:normal,aldin,inclinat,aldininclinat,type,cap,mic...,*comanda::
var:numar:da,nu::
@@ -1814,6 +1816,7 @@ var:aliniere:stanga,centru,dreapta,nu::
var:conversie:numere,caractere,Caractere,numereromane,Numereromane::
var:mod:detext,de*sectiune::
var:separator:*text::
+var:comanda:*comanda::
var:distanta:*dimensiune::
stopsetup
@@ -3280,6 +3283,7 @@ var:grosimerigla:*dimensiune::
var:distanta:blank,grila,adancime,*dimensiune,mic,mediu,mare,niciunul::
var:fonttext:5pt,...,12pt,mic,mare::
var:rigla:normal,linie::
+var:split:da,nu::
stopsetup
startsetup
@@ -3866,6 +3870,8 @@ var:titlu:*text::
var:spatiu:da,nu::
var:simbol:normal, Nou,Balon,Adaugare,Ajutor,Paragraf,Cheie, *nume::
var:optiune:max,buffer::
+var:margine:*dimensiune::
+var:distanta:*dimensiune::
stopsetup
startsetup
diff --git a/context/perltk/texexec.pl b/context/perltk/texexec.pl
index 79c871714..cc63f0926 100644
--- a/context/perltk/texexec.pl
+++ b/context/perltk/texexec.pl
@@ -58,21 +58,21 @@ $ENV{"MPXCOMMAND"} = "0" ; # otherwise loop
my $TotalTime = time ;
-# start random seed hack
+# start random seed hack
#
-# This hack is needed since tex has 1 minute resolution, so
-# we need to be smaller about 1440 (== 24*60 == tex's max time)
-# in which case (david a's) random calculator will overflow.
+# This hack is needed since tex has 1 minute resolution, so
+# we need to be smaller about 1440 (== 24*60 == tex's max time)
+# in which case (david a's) random calculator will overflow.
-my ($sec,$min,$rest) = gmtime ;
-my $RandomSeed = $min*60+$sec ;
-# i have to look up the mod function -)
-if ($RandomSeed>2880) { $RandomSeed -= 2880 }
-if ($RandomSeed>1440) { $RandomSeed -= 1440 }
+my ($sec,$min,$rest) = gmtime ;
+my $RandomSeed = $min*60+$sec ;
+# i have to look up the mod function -)
+if ($RandomSeed>2880) { $RandomSeed -= 2880 }
+if ($RandomSeed>1440) { $RandomSeed -= 1440 }
-# See usage of $Random and $RandomSeed later on.
+# See usage of $Random and $RandomSeed later on.
#
-# end random seed hack
+# end random seed hack
## $dosish = ($Config{'osname'} =~ /dos|mswin/i) ;
## $dosish = ($Config{'osname'} =~ /^(ms)?dos|^os\/2|^(ms|cyg)win/i) ;
@@ -172,7 +172,7 @@ my $GlobalFile = 0 ;
my $AllPatterns = 0 ;
my $ForceXML = 0 ;
my $Random = 0 ;
-my $Filters = '' ;
+my $Filters = '' ;
# makempy :
@@ -1091,7 +1091,7 @@ sub MakeOptionFile
print OPT "\\unprotect\n" ;
if ($ModeFile ne '')
{ print OPT "\\readlocfile{$ModeFile}{}{}" }
- if ($Result ne '')
+ if ($Result ne '')
{ print OPT "\\setupsystem[file=$Result]\n" }
elsif ($Suffix)
{ print OPT "\\setupsystem[file=$JobName$Suffix]\n" }
@@ -1173,7 +1173,7 @@ sub MakeOptionFile
{ print OPT "\\setupsystem[inputfile=$Input]\n" }
else
{ print OPT "\\setupsystem[inputfile=$JobName.$JobSuffix]\n" }
- if ($Random)
+ if ($Random)
{ print OPT "\\setupsystem[\\c!willekeur=$RandomSeed]\n" }
if ($Mode)
{ print OPT "\\enablemode[$Mode]\n" }
@@ -1348,32 +1348,32 @@ sub ScanContent
{ my ($ConTeXtInput) = @_ ;
open (TEX, $ConTeXtInput) ;
while (<TEX>)
- { if (/\\(starttekst|stoptekst|startonderdeel|startdocument|startoverzicht)/)
+ { if (/\\(starttekst|stoptekst|startonderdeel|startdocument|startoverzicht)/o)
{ $ConTeXtInterface = "nl" ; last }
- elsif (/\\(stelle|verwende|umgebung|benutze)/)
+ elsif (/\\(stelle|verwende|umgebung|benutze)/o)
{ $ConTeXtInterface = "de" ; last }
- elsif (/\\(stel|gebruik|omgeving)/)
+ elsif (/\\(stel|gebruik|omgeving)/o)
{ $ConTeXtInterface = "nl" ; last }
- elsif (/\\(use|setup|environment)/)
+ elsif (/\\(use|setup|environment)/o)
{ $ConTeXtInterface = "en" ; last }
- elsif (/\\(usa|imposta|ambiente)/)
+ elsif (/\\(usa|imposta|ambiente)/o)
{ $ConTeXtInterface = "it" ; last }
- elsif (/(height|width|style)=/)
+ elsif (/(height|width|style)=/o)
{ $ConTeXtInterface = "en" ; last }
- elsif (/(hoehe|breite|schrift)=/)
+ elsif (/(hoehe|breite|schrift)=/o)
{ $ConTeXtInterface = "de" ; last }
# brr, can be \c!
- elsif (/(hoogte|breedte|letter)=/)
+ elsif (/(hoogte|breedte|letter)=/o)
{ $ConTeXtInterface = "nl" ; last }
- elsif (/(altezza|ampiezza|stile)=/)
+ elsif (/(altezza|ampiezza|stile)=/o)
{ $ConTeXtInterface = "it" ; last }
- elsif (/externfiguur/)
+ elsif (/externfiguur/o)
{ $ConTeXtInterface = "nl" ; last }
- elsif (/externalfigure/)
+ elsif (/externalfigure/o)
{ $ConTeXtInterface = "en" ; last }
- elsif (/externeabbildung/)
+ elsif (/externeabbildung/o)
{ $ConTeXtInterface = "de" ; last }
- elsif (/figuraesterna/)
+ elsif (/figuraesterna/o)
{ $ConTeXtInterface = "it" ; last } }
close (TEX) }
@@ -1534,12 +1534,12 @@ sub CheckChanges # also tub
my $DummyFile = 0 ;
sub isXMLfile
- { my $Name = shift ;
- if (($ForceXML)||($name =~ /\.xml$/io))
- { return 1 }
+ { my $Name = shift ;
+ if (($ForceXML)||($name =~ /\.xml$/io))
+ { return 1 }
else
{ open(XML,$Name) ;
- my $str = <XML> ;
+ my $str = <XML> ;
close(XML) ;
return ($str =~ /\<\?xml /io) } }
@@ -1550,7 +1550,7 @@ sub RunConTeXtFile
my $OriSuffix = $JobSuffix ;
if (-e "$JobName.$JobSuffix")
{ $DummyFile = (($ForceXML)||($JobSuffix =~ /xml/io)) }
- # to be considered :
+ # to be considered :
# { $DummyFile = isXMLfile("$JobName.$JobSuffix") }
elsif ($RunPath ne "")
{ my @RunPaths = split(/,/,$RunPath) ;
@@ -1646,7 +1646,7 @@ sub RunConTeXtFile
else
{ while (!$StopRunning&&($TeXRuns<$NOfRuns)&&(!$Problems))
{ ++$TeXRuns ;
- if ($TeXRuns==1)
+ if ($TeXRuns==1)
{ MakeOptionFile (0, 0, $JobName, $OriSuffix, 1) }
else
{ MakeOptionFile (0, 0, $JobName, $OriSuffix, 2) }
@@ -1677,7 +1677,7 @@ sub RunConTeXtFile
if ($Purge)
{ PurgeFiles($JobName) }
if ($DummyFile) # $JobSuffix == run
- { unlink "$JobName.$JobSuffix" } } }
+ { unlink "$JobName.$JobSuffix" } } }
sub RunSomeTeXFile
{ my ($JobName, $JobSuffix) = @_ ;
@@ -2045,7 +2045,7 @@ sub RunOneFormat
else
{ $Problems = 1 }
if ($Problems)
- { $Problems = 0 ;
+ { $Problems = 0 ;
if ($TeXExecutable =~ /etex|eetex|pdfetex|pdfeetex|eomega/io)
{$TeXPrefix = "*" }
my $CurrentPath = cwd() ;
@@ -2073,13 +2073,13 @@ sub RunFormats
{ @ConTeXtFormats = $Format; $ConTeXtFormatsPrefix='' ; }
else
{ $ConTeXtFormatsPrefix="cont-" ; }
- if ($TeXHashExecutable ne '')
+ if ($TeXHashExecutable ne '')
{ my $cmd = "$TeXProgramPath$TeXHashExecutable" ;
print "\n" ;
print " TeX hash binary : $TeXProgramPath$TeXHashExecutable\n" ;
print " comment : hashing may take a while ...\n" ;
if ($Verbose) { print "\n$cmd\n\n" }
- system ($cmd) }
+ system ($cmd) }
foreach my $Interface (@ConTeXtFormats)
{ if ($Interface eq $MetaFun)
{ RunMpFormat ($MetaFun) ; $MetaFunDone = 1 }
diff --git a/context/perltk/texfont.pl b/context/perltk/texfont.pl
index e08e4f8ec..ffab32280 100644
--- a/context/perltk/texfont.pl
+++ b/context/perltk/texfont.pl
@@ -89,7 +89,7 @@ my $width = "" ;
my $preproc = 0 ; # atl: formerly OpenType switch
my $variant = "" ; # atl: encoding variant
my $extension = "pfb" ; # atl: default font extension
-my $lcdf = "" ; # atl: trigger for lcdf otftopl
+my $lcdf = "" ; # atl: trigger for lcdf otftotfm
# todo: parse name for style, take face from command line
#
@@ -237,7 +237,7 @@ if ($help)
report "--vendor=name : vendor name/directory" ;
report "--collection=name : font collection" ;
report "--encoding=name : encoding vector (default: $encoding)" ;
- report "--variant=name : encoding variant (.enc file or otftopl)" ;
+ report "--variant=name : encoding variant (.enc file or otftotfm features)" ;
print "\n" ;
report "--slant=s : slant glyphs in font by factor (0.0 - 1.5)" ;
report "--extend=s : extend glyphs in font by factor (0.0 - 1.5)" ;
@@ -306,6 +306,9 @@ if ($lcdf)
{ $varlabel =~ s/,/-/goi ;
$varlabel =~ tr/a-z/A-Z/ }
+if ($varlabel ne "")
+{ $varlabel = "-$varlabel" }
+
my $identifier = "$encoding$varlabel-$vendor-$collection" ;
my $outlinepath = $sourcepath ; my $path = "" ;
@@ -365,11 +368,11 @@ if ($sourcepath eq "auto")
{ $file =~ s/.*\/(.*)\.afm/$1/io }
foreach my $sub ("tfm","vf")
{ foreach my $typ ("","-raw")
- { my $nam = "$path/fonts/$sub/$vendor/$collection/$encoding$variant$typ-$file.$sub" ;
+ { my $nam = "$path/fonts/$sub/$vendor/$collection/$encoding$varlabel$typ-$file.$sub" ;
if (-s $nam)
- { report ("removing : $encoding$variant$typ-$file.$sub") ;
+ { report ("removing : $encoding$varlabel$typ-$file.$sub") ;
unlink $nam } } } }
- my $nam = "$encoding$variant-$vendor-$collection.tex" ;
+ my $nam = "$encoding$varlabel-$vendor-$collection.tex" ;
if (-e $nam)
{ report ("removing : $nam") ;
unlink "$nam" }
@@ -716,9 +719,9 @@ foreach my $file (@files)
{ report ("font identifier : $cleanfont$namesuffix -> text -> tfm") }
# don't handle strange fonts
if ($strange eq "")
- { # atl: experimental support for lcdf otftopl
+ { # atl: experimental support for lcdf otftotfm
if ($lcdf && $extension eq "otf")
- { # no vf, bypass afm, use otftopl to get encoding and tfm
+ { # no vf, bypass afm, use otftotfm to get encoding and tfm
my $varstr = my $encout = my $tfmout = "" ;
report "processing files : otf -> tfm + enc" ;
if ($encoding ne "")
@@ -728,15 +731,17 @@ foreach my $file (@files)
if ($variant ne "")
{ ( $varstr = $variant ) =~ s/,/ -f /goi ;
$varstr = " -f $varstr" }
- $encout = "$encpath/$use$cleanfont.enc" ;
+ $encout = "$encpath/$use$cleanfont.enc" ;
if (-e $encout)
{ report ("renaming : $encout -> $use$cleanfont.bak") ;
unlink "$encpath/$use$cleanfont.bak" ;
rename $encout, "$encpath/$use$cleanfont.bak" }
- $tfmout = "$use$cleanfont.tfm" ;
- my $otfcommand = "otftopl $varstr $encstr $shape --tfm --output=$tfmout --output-encoding=$encout $file" ;
+ unlink "texfont.map" ;
+ $tfmout = "$use$cleanfont" ;
+ my $otfcommand = "otftotfm -a $varstr $encstr $shape --name=\'$tfmout\' --encoding-dir=\'$encpath/\' --tfm-dir=\'$tfmpath/\' --vf-dir=\'$vfpath/\' --no-type1 --map-file=./texfont.map \'$file\'" ;
print "$otfcommand\n" ;
system("$otfcommand") ;
+# $namesuffix = "--base" ; #atl: lcdf currently appends --base to the filename...sometimes
$encfil = $encout }
else
{ # generate tfm and vpl, $file is on afm path
@@ -769,24 +774,25 @@ foreach my $file (@files)
# copy files
my $usename = "$use$cleanname$fontsuffix" ;
my $rawname = "$raw$cleanname$fontsuffix" ;
- if ($strange ne "")
- { unlink "$vfpath/$cleanname.vf", "$tfmpath/$cleanname.tfm" ;
- copy ("$cleanname.tfm","$tfmpath/$cleanname.tfm") ;
- # or when available, use vendor one :
- copy ("$sourcepath/$cleanname.tfm","$tfmpath/$cleanname.tfm") }
- elsif ($virtual)
- { unlink "$vfpath/$rawname.vf", "$vfpath/$usename.vf" ;
- unlink "$tfmpath/$rawname.tfm", "$tfmpath/$usename.tfm" ;
- copy ("$usename.vf" ,"$vfpath/$usename.vf") ;
- copy ("$rawname.tfm","$tfmpath/$rawname.tfm") ;
- copy ("$usename.tfm","$tfmpath/$usename.tfm") }
- else
- { unlink "$vfpath/$usename.vf", "$tfmpath/$usename.tfm" ;
- # slow but prevents conflicting vf's
- my $rubish = `kpsewhich $usename.vf` ; chomp $rubish ;
- if ($rubish ne "") { unlink $rubish }
- #
- copy ("$usename.tfm","$tfmpath/$usename.tfm") }
+ if ($lcdf eq "")
+ { if ($strange ne "")
+ { unlink "$vfpath/$cleanname.vf", "$tfmpath/$cleanname.tfm" ;
+ copy ("$cleanname.tfm","$tfmpath/$cleanname.tfm") ;
+ # or when available, use vendor one :
+ copy ("$sourcepath/$cleanname.tfm","$tfmpath/$cleanname.tfm") }
+ elsif ($virtual)
+ { unlink "$vfpath/$rawname.vf", "$vfpath/$usename.vf" ;
+ unlink "$tfmpath/$rawname.tfm", "$tfmpath/$usename.tfm" ;
+ copy ("$usename.vf" ,"$vfpath/$usename.vf") ;
+ copy ("$rawname.tfm","$tfmpath/$rawname.tfm") ;
+ copy ("$usename.tfm","$tfmpath/$usename.tfm") }
+ else
+ { unlink "$vfpath/$usename.vf", "$tfmpath/$usename.tfm" ;
+ # slow but prevents conflicting vf's
+ my $rubish = `kpsewhich $usename.vf` ; chomp $rubish ;
+ if ($rubish ne "") { unlink $rubish }
+ #
+ copy ("$usename.tfm","$tfmpath/$usename.tfm") } }
# cleanup
foreach my $suf ("tfm", "vf", "vpl")
{ unlink "$rawname.$suf", unlink "$usename.$suf" ;
@@ -822,14 +828,32 @@ foreach my $file (@files)
# now add entry to map
if ($strange eq "")
{ if ($extension eq "otf")
- { if ($preproc)
- { $str = "$thename $cleanfont $option < $fontname.pfb$theencoding\n"}
- else
+ { if ($lcdf)
+ { my $mapline = "";
+ if (open(ALTMAP,"texfont.map"))
+ { while (<ALTMAP>)
+ { chomp ;
+ # atl: we assume this b/c we always force otftotfm --no-type1
+ if (/<<(.*)\.otf$/oi)
+ { $mapline = $_ ; last } }
+ close(ALTMAP) }
+ else
+ { report("no mapfile from otftotfm : texfont.map") }
+ if ($preproc)
+ { $mapline =~ s/^(\S+)/$1 </;
+ $mapline =~ s/<<(\S+)\.otf$// }
+ else
+ { $mapline =~ s/<<(\S+)\.otf$/<< $ttfpath\/$fontname.$extension/ }
+ $str = "$mapline\n" }
+ else
+ { if ($preproc)
+ { $str = "$thename $cleanfont $option < $fontname.pfb$theencoding\n"}
+ else
# PdfTeX can't subset OTF files, so we have to include the whole thing
# It looks like we also need to be explicit on where to find the file
- { $str = "$thename $cleanfont $option << $ttfpath/$fontname.$extension <[$theencoding\n" } }
- else
- { $str = "$thename $cleanfont $option < $fontname.$extension$theencoding\n" } }
+ { $str = "$thename $cleanfont $option << $ttfpath/$fontname.$extension <[$theencoding\n" } } }
+ else
+ { $str = "$thename $cleanfont $option < $fontname.$extension$theencoding\n" } }
else
{ $str = "$thename $cleanfont < $fontname.$extension\n" }
if ($map) # check for redundant entries
diff --git a/tex/context/base/cont-err.tex b/tex/context/base/cont-err.tex
new file mode 100644
index 000000000..f4c503da8
--- /dev/null
+++ b/tex/context/base/cont-err.tex
@@ -0,0 +1,24 @@
+%D \module
+%D [ file=cont-err,
+%D version=2003.08.12,
+%D title=\CONTEXT\ System Files,
+%D subtitle=Just A warning,
+%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.
+
+% todo : translate into language
+
+\writeline
+
+\writestring{>>>> I cannot locate your local setup file. Locate 'cont-sys.rme'}
+\writestring{>>>> and copy this file to '../tex/context/usr/cont-sys.tex'. You}
+\writestring{>>>> can set cq. uncomment your local preferences in this file.}
+
+\writeline
+
+\endinput
diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex
index 56cd4a687..71d6352d3 100644
--- a/tex/context/base/cont-fil.tex
+++ b/tex/context/base/cont-fil.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context File Synonyms}
@@ -36,50 +36,51 @@
\definefilesynonym [res-make] [res-01]
\definefilesynonym [res-base] [res-04]
+\definefilesynonym [res-crop] [res-07]
\definefilesynonym [res-trace] [res-08]
\definefilesynonym [res-log] [res-09]
-\definefilesynonym [pre-general] [pre-00]
-
-\definefilesynonym [pre-original] [pre-01]
-\definefilesynonym [pre-green] [pre-02]
-\definefilesynonym [pre-funny] [pre-03]
-\definefilesynonym [pre-colorful] [pre-04]
-\definefilesynonym [pre-fuzzy] [pre-05]
-\definefilesynonym [pre-polish] [pre-06]
-\definefilesynonym [pre-spider] [pre-07]
-\definefilesynonym [pre-wonder] [pre-08]
-\definefilesynonym [pre-windows] [pre-09]
-\definefilesynonym [pre-grow] [pre-10]
-\definefilesynonym [pre-stack] [pre-11]
-\definefilesynonym [pre-arrows] [pre-12]
-\definefilesynonym [pre-writing] [pre-13]
-\definefilesynonym [pre-split] [pre-14]
-\definefilesynonym [pre-balls] [pre-15]
-\definefilesynonym [pre-knot] [pre-16]
-\definefilesynonym [pre-weird] [pre-17]
-\definefilesynonym [pre-shade] [pre-18]
-\definefilesynonym [pre-organic] [pre-19]
-\definefilesynonym [pre-speckle] [pre-20]
-\definefilesynonym [pre-zoom] [pre-21]
-\definefilesynonym [pre-cycle] [pre-22]
-\definefilesynonym [pre-super] [pre-23]
-
-%definefilesynonym [pre-more] [pre-24]
-%definefilesynonym [pre-more] [pre-25]
-
-\definefilesynonym [pre-more] [pre-26]
-
-%definefilesynonym [pre-more] [pre-27]
-%definefilesynonym [pre-more] [pre-28]
-%definefilesynonym [pre-more] [pre-29]
-%definefilesynonym [pre-more] [pre-30]
+\definefilesynonym [pre-general] [pre-00]
+
+\definefilesynonym [pre-original] [pre-01]
+\definefilesynonym [pre-green] [pre-02]
+\definefilesynonym [pre-funny] [pre-03]
+\definefilesynonym [pre-colorful] [pre-04]
+\definefilesynonym [pre-fuzzy] [pre-05]
+\definefilesynonym [pre-polish] [pre-06]
+\definefilesynonym [pre-spider] [pre-07]
+\definefilesynonym [pre-wonder] [pre-08]
+\definefilesynonym [pre-windows] [pre-09]
+\definefilesynonym [pre-grow] [pre-10]
+\definefilesynonym [pre-stack] [pre-11]
+\definefilesynonym [pre-arrows] [pre-12]
+\definefilesynonym [pre-writing] [pre-13]
+\definefilesynonym [pre-split] [pre-14]
+\definefilesynonym [pre-balls] [pre-15]
+\definefilesynonym [pre-knot] [pre-16]
+\definefilesynonym [pre-weird] [pre-17]
+\definefilesynonym [pre-shade] [pre-18]
+\definefilesynonym [pre-organic] [pre-19]
+\definefilesynonym [pre-speckle] [pre-20]
+\definefilesynonym [pre-zoom] [pre-21]
+\definefilesynonym [pre-cycle] [pre-22]
+\definefilesynonym [pre-super] [pre-23]
+
+%definefilesynonym [pre-more] [pre-24]
+%definefilesynonym [pre-more] [pre-25]
+
+\definefilesynonym [pre-more] [pre-26]
+
+%definefilesynonym [pre-more] [pre-27]
+%definefilesynonym [pre-more] [pre-28]
+%definefilesynonym [pre-more] [pre-29]
+%definefilesynonym [pre-more] [pre-30]
\definefilesynonym [abr-pseudocaps] [abr-01]
-\definefilesynonym [abr-smallcaps] [abr-02]
+\definefilesynonym [abr-smallcaps] [abr-02]
-\definefilesynonym [chinese] [chi-00]
-\definefilesynonym [chi-simplified] [chi-01]
-\definefilesynonym [chi-traditional] [chi-02]
+\definefilesynonym [chinese] [chi-00]
+\definefilesynonym [chi-simplified] [chi-01]
+\definefilesynonym [chi-traditional] [chi-02]
\endinput
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 62c7d926a..897d269d2 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -12,12 +12,155 @@
%C details.
%D This file is loaded at runtime, thereby providing an
-%D excellent place for hacks, patches, extensions and new
-%D features.
+%D excellent place for hacks, patches, extensions and new
+%D features.
\unprotect
-\def\tabulaterule % to be redone, not correct
+\def\OTRONEsometopsfloat[#1]%
+ {\ifdim\topinserted=\zeropoint
+ \topofinserttrue
+ \else
+ \topofinsertfalse
+ \fi
+ \global\advance\topinserted \ht\floatbox
+ \global\advance\topinserted \dp\floatbox
+ \global\advance\topinserted \floatbottomskip
+ \insert\topins
+ {\forgetall
+ \iftopofinsert
+ \topskipcorrection % [xx] new: see icare topbleed
+ \kern-\lineskip\par\prevdepth\maxdimen
+ \else
+ %\blanko[-\@@bknawit,\@@bkvoorwit]% inserts can't look back
+ \betweenfloatblanko
+ \fi
+ \flushfloatbox
+ \blanko[\@@bknawit]}%
+ \doinsertfloatinfo}
+
+\def\OTRONEdotopinsertions
+ {\ifvoid\topins\else
+ \ifgridsnapping
+ \box\topins
+ \vskip-\topskip \vskip\strutheight % [xx] new: see icare topbleed
+ \else
+ \unvbox\topins
+ \fi
+ \fi
+ \global\topinserted\zeropoint}
+
+
+\def\tightlayer[#1]%
+ {\hbox
+ {\def\currentlayer{#1}% todo: left/right
+ \hsize\layerparameter\c!breedte
+ \vsize\layerparameter\c!hoogte
+ \composedlayer{#1}}}
+
+\def\dodosetobject#1#2#3%
+ {\bgroup
+ \globalpushmacro\crossreferenceobject \objectreferenced
+ \inobjecttrue
+ \dowithnextbox
+ {\globalpopmacro\crossreferenceobject
+ \dododosetobject{#1}{#2}{#3}\egroup}}
+
+% Just a simple and fast hanger, for usage in macros.
+
+\def\setuphanging
+ {\dodoubleempty\getparameters[\??ha]}
+
+\setuphanging
+ [\c!afstand=.5em]
+
+\def\starthanging
+ {\noindent\bgroup
+ \dowithnextbox
+ {\setbox\nextbox\hbox{\flushnextbox\hskip\@@haafstand}%
+ \hangindent\nextboxwd
+ \hangafter\plusone
+ \flushnextbox\ignorespaces}
+ \hbox}
+
+\def\stophanging
+ {\endgraf
+ \egroup}
+
+\def\doifdimensionelse#1%
+ {\afterassignment\dodoifdimensionelse\scratchdimen#1pt\relax}
+
+\def\dodoifdimensionelse#1%
+ {\ifx#1\relax
+ \expandafter\secondoftwoarguments
+ \else % #1=p ... t\relax
+ \expandafter\thirdoffourarguments
+ \fi}
+
+\def\definepushbutton % name optional setup
+ {\dodoubleempty\dodefinepushbutton}
+
+\def\dodefinepushbutton[#1][#2]% name setup
+ {\dododefinepushbutton{#1}{n}{push}%
+ \dododefinepushbutton{#1}{r}{\symbol[psym:#1:n]}%
+ \dododefinepushbutton{#1}{d}{\symbol[psym:#1:r]}%
+ \setvalue{pushbutton:#1}{\dohandlepushbutton{#1}{#2}}}
+
+\def\dododefinepushbutton#1#2#3%
+ {\doifsymboldefinedelse{psym:#1:#2}%
+ \donothing{\definesymbol[psym:#1:#2][{#3}]}}
+
+\def\definepushsymbol
+ {\dotripleargument\dodefinepushsymbol}
+
+\def\dodefinepushsymbol[#1][#2]% [#3]
+ {\definesymbol[psym:#1:#2]}
+
+\def\dopushbutton[#1][#2]%
+ {\executeifdefined{pushbutton:#1}\gobbleoneargument{#2}}
+
+\def\pushbutton
+ {\dodoubleargument\dopushbutton}
+
+\def\dohandlepushbutton#1#2#3% identifier setup script
+ {\bgroup
+ \nextsystemfield
+ \setupfield
+ [pushbutton]
+ [\c!kader=\v!overlay,
+ \c!offset=\v!overlay,
+ \c!klikuit=#3,#2]%
+ \definefield
+ [\currentsystemfield]
+ [push]
+ [pushbutton]
+ [psym:#1:n,psym:#1:r,psym:#1:d]%
+ \fitfield
+ [\currentsystemfield]%
+ \egroup}
+
+% \def\do@@ampsh
+% {\dodoubleargument\dodo@@ampsh}
+%
+% \def\dodo@@ampsh[#1][#2]#3\\%
+% {\txt\pushbutton[#1][#2]\\}%
+%
+%\appendtoks \let\psh\do@@ampsh \to \everysetmenucommands
+
+\def\@@ampsh{\txt\pushbutton}
+
+\appendtoks \let\psh\@@ampsh \to \everysetmenucommands
+
+% \definepushbutton [reset]
+%
+% \definepushsymbol [reset] [n] [\uniqueMPgraphic{whatever}{color=green}]
+% \definepushsymbol [reset] [r] [\uniqueMPgraphic{whatever}{color=white}]
+%
+% \startinteractionmenu[bottom]
+% \psh [reset] [JS(reset_something)] \\
+% \stopinteractionmenu
+
+\def\tabulaterule % to be redone, not correct
{\dotabulaterule
{\hrule\!!height.5\scratchdimen\!!depth.5\scratchdimen\relax
\doifvalue{\??tt\currenttabulate\c!afstand}\v!grid
@@ -25,7 +168,7 @@
% todo: \setupinterlinespace[\c!regel=\v!vast] => ==\the\baselineskip
-%%%%%%%% todo: \chardef\snapstruts=1 => d=l-h
+%%%%%%%% todo: \chardef\snapstruts=1 => d=l-h
\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!}
@@ -37,16 +180,16 @@
\prepareMPvariables{#2}}
\def\countXMLchildren[#1]#2%
- {\startnointerference
+ {\startnointerference
\doglobal\newcounter\nofXMLchildren
\defineXMLargument[#1]{\doglobal\increment\nofXMLchildren}%
- \startXMLignore
+ \startXMLignore
#2%
\stopXMLignore
\stopnointerference}
\def\processlinetableXMLfile#1%
- {\bgroup
+ {\bgroup
\let\startlinetable\donothing
\let\stoplinetable \donothing
\startlinetableanalysis\processXMLfile{#1}\stoplinetableanalysis
@@ -61,23 +204,23 @@
\ignorespaces}
\def\stoplinetablepart
- {\ifnum\linetablepart>\zerocount
+ {\ifnum\linetablepart>\zerocount
\unskip \unskip % remove last intercolumn skip (distance+fill)
\fi
\stopcolor
\egroup
\iflinetablepreroll \else
\ifcase\linetablepart
- % we're collecting the repeater
+ % we're collecting the repeater
\else
\scratchdimen\hsize \advance\scratchdimen-\wd\scratchbox\relax
\ifdim\scratchdimen>\linetableparameter\c!rek\else
\setbox\scratchbox\hbox to \hsize{\unhbox\scratchbox}%
- \fi
+ \fi
\fi
\fi}
-% experimental: \synchronizegrid bla bla bla
+% experimental: \synchronizegrid bla bla bla
\newcounter\currentgridsync
@@ -88,29 +231,31 @@
\par\prevdepth\zeropoint
\nointerlineskip
\hpos\gridsynctag{\strut}\par
- \vskip-\lineheight
+ \vskip-\lineheight
\nointerlineskip
- % top of text
+ % top of text
\scratchdimen\MPy{\v!tekst:\MPp\gridsynctag}%
\advance\scratchdimen\MPh{\v!tekst:\MPp\gridsynctag}%
- % move to first baseline
+ % move to first baseline
\advance\scratchdimen-\topskip
% subtract wrong baseline
\advance\scratchdimen-\MPy\gridsynctag
- % get minimal number of lines
- \advance\scratchdimen\lineheight
+ % get minimal number of lines
+ \advance\scratchdimen\lineheight
\getnoflines\scratchdimen
% calculate difference
\advance\scratchdimen-\noflines\lineheight\relax
- \scratchdimen-\scratchdimen
+ \scratchdimen-\scratchdimen\relax
\ifdim\scratchdimen>\zeropoint
- \nointerlineskip
- \advance\scratchdimen-\lineheight
- \vskip\scratchdimen \strut
+ \nointerlineskip
+ \advance\scratchdimen-\lineheight
+ \vskip\scratchdimen \dontleavehmode \quad \strut
\par
+ %\else
+ % \message{no grid correction: \the\scratchdimen}\wait
\fi}
-% needed for extreme
+% needed for extreme
\definesystemvariable{ie}
@@ -125,13 +270,13 @@
\ifsecondargument
\processaction
[#2]
- [% first test true, rest depends
+ [% first test true, rest depends
\v!volgende=>\setgvalue{\??ie#1}{\setgvalue{\??ie#1}{#3}\firstoftwoarguments},
- % rest true if first true
+ % rest true if first true
% \v!eerste=>\setgvalue{\??ie#1}{#3{\letgvalue{\??ie#1}%
% \firstoftwoarguments\firstoftwoarguments}%
% \secondoftwoarguments},
- % always true
+ % always true
\v!ja=>\letgvalue{\??ie#1}\firstoftwoarguments,
% always false
\v!nee=>\letgvalue{\??ie#1}\secondoftwoarguments]%
@@ -148,39 +293,39 @@
\OTRSETinitializecolumns
\OTRSETassignwidths
\OTRSETsethsize
- \fi
+ \fi
\!!counta#2\!!countb#3\docalculatecolumnsetspan
\expandafter\egroup\expandafter\edef\expandafter
#4\expandafter{\the\!!widtha}}
-% so far
+% so far
-% test this prikkels/pascal margin text before heads (mode
-% 1) as well as uitwerkingen (mode 2)
+% test this prikkels/pascal margin text before heads (mode
+% 1) as well as uitwerkingen (mode 2)
-%chardef\graphicvadjustmode=0 % fake
-%chardef\graphicvadjustmode=1 % normal
-\chardef\graphicvadjustmode=2 % normal + compensate (== default)
+%chardef\graphicvadjustmode=0 % fake
+%chardef\graphicvadjustmode=1 % normal
+\chardef\graphicvadjustmode=2 % normal + compensate (== default)
\def\placemargintexts % to be documented and translated
- {\ifcase\margincontent\else
+ {\ifcase\margincontent\else
\bgroup
- \chardef\graphicvadjustmode\zerocount
- \doflushmargincontents
+ \chardef\graphicvadjustmode\zerocount
+ \doflushmargincontents
\egroup
- \fi}
+ \fi}
\def\graphicvadjust % bad, those low level color calls here
{\dowithnextboxcontent
{\forgetall}
- {\ifcase\graphicvadjustmode \@EA \fakedvadjust \else \@EA\normalvadjust \fi
+ {\ifcase\graphicvadjustmode \@EA \fakedvadjust \else \@EA\normalvadjust \fi
{\dostartgraphicgroup
\localstarttextcolor
\unvbox\nextbox
\localstoptextcolor
\dostopgraphicgroup
\ifcase\graphicvadjustmode \or \or
- % corrects for one line paragraphs
+ % corrects for one line paragraphs
\nointerlineskip
\kern-\struttotal
\nointerlineskip
@@ -193,12 +338,6 @@
\strut\crcr
\TABLEnoalign{\kern-\lineheight}%
\fi}
-
-% \def\fulltabulatecontent
-% {\tabulateheadcontent
-% \tabulatecontent
-% \tabulatetailcontent
-% \removefunnytabulateline}
\def\showexternalfigured
{\bgroup
@@ -213,13 +352,13 @@
\immediate\closeout\scratchwrite
\egroup}
-% between alignment lines certain rules apply, and even a
-% simple test can mess up a table, which is why we have a
-% special test facility
-%
+% between alignment lines certain rules apply, and even a
+% simple test can mess up a table, which is why we have a
+% special test facility
+%
% \ruledvbox
% {\starttabulate[|l|p|]
-% \NC 1test \NC test \NC \NR
+% \NC 1test \NC test \NC \NR
% \tableifelse{\doifelse{a}{a}}{\NC Xtest \NC test \NC \NR}{}%
% \stoptabulate}
@@ -228,7 +367,7 @@
{\aftergroup \firstoftwoarguments}%
{\aftergroup\secondoftwoarguments}}}
-% \long \def\tableif#1% whow, this is real ugly
+% \long \def\tableif#1% whow, this is real ugly
% {\TABLEnoalign{\let\gnext\gobbleoneargument#1%
% {\let\gnext\firstofoneargument}}\gnext}
@@ -468,7 +607,7 @@
\advance\scratchdimen\topskip
\setbox\scratchbox
\ifcase\showgridstate\vbox\else\ruledvbox\fi to \scratchdimen\bgroup
- \forgetall} % ! don't change
+ \forgetall} % ! don't change
\def\stopcolumnmakeup
{\egroup
@@ -575,7 +714,7 @@
\def\changedpage#1%
{\getvalue{\s!paragraph:p:#1}}
-% incomplete, will be a special case of float placement
+% incomplete, will be a special case of float placement
\def\startfixed{\dosingleempty\dostartfixed}
diff --git a/tex/context/base/cont-sys.ori b/tex/context/base/cont-sys.ori
index 55d304913..5e2adef31 100644
--- a/tex/context/base/cont-sys.ori
+++ b/tex/context/base/cont-sys.ori
@@ -13,18 +13,43 @@
\unprotect
+% Occasionally we will support both A4 and letter in
+% styles. If you want letter size paper to be the default,
+% uncomment:
+%
+% \enablemode[\systemmodeprefix letter]
+%
+% If you always want to default to letter, you may uncomment
+% the following line, but beware: it makes your documents less
+% portable:
+%
+% \setuppapersize[letter][letter]
+%
% If you want some extras, just uncomment the following
% line:
%
-% \usemodule[plus]
+% \usemodule[plus] % experimental code
%
% Here you can take care of overloading some (style)
% defaults. What goes here, depends on your local system.
%
% The following commands sets the default font encoding:
%
+% \setupencoding [\s!default=texnansi]
+%
+% or:
+%
% \setupencoding [\s!default=ec]
%
+% If you want the default berry names:
+%
+% \usetypescript [berry] [\defaultencoding]
+%
+% If you run into missing font metrics kind of problems,
+% you may want to uncomment:
+%
+% \usetypescript[adobekb] [\defaultencoding]
+%
% You can let \CONTEXT\ load the map files for \PDFTEX.
%
% \autoloadmapfilestrue
@@ -48,11 +73,9 @@
% \preloadmapfile [il2-ams-cmr]
% \preloadmapfile [pl0-ams-cmr]
%
-% If you want the default berry names (ec and 8r only):
-%
-% \usetypescript [berry] [\defaultencoding]
-%
-% Overload Lucida by Times cum suis:
+% Some styles default to Lucida Bright. You can overload
+% Lucida by Times cum suis. Watch out, the pos collection
+% is not scaled relatively.
%
% \definetypescriptsynonym [lbr] [pos]
%
@@ -115,6 +138,8 @@
% You can also load additional encodings here:
+% \useencoding[x5]
+%
% \useregime[cyr]
% \useencoding[cyr]
% \enableregime[cp1251]
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 40c9a36a1..cd6ab7dab 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -15,7 +15,7 @@
\catcode`\{=1 \catcode`\}=2
-\def\contextversion{2003.8.8}
+\def\contextversion{2003.8.21}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type{tex -i} or \type{whatevertex} using
diff --git a/tex/context/base/core-box.tex b/tex/context/base/core-box.tex
index 1bca2cd24..be7b7fb0e 100644
--- a/tex/context/base/core-box.tex
+++ b/tex/context/base/core-box.tex
@@ -439,16 +439,21 @@
\c!breedte=3cm,
\c!hoogte=3cm,
\c!offset=2mm,
+ \c!pagina=\v!nee,
\c!voffset=\@@bgoffset,
\c!hoffset=\@@bgoffset]
\def\bleed
{\dosingleempty\dobleed}
+
+\def\bleedwidth {\the\hsize}%
+\def\bleedheight{\the\vsize}%
+
\def\dobleed[#1]#2%
{\hbox\bgroup
- \def\bleedwidth {\hsize}%
- \def\bleedheight{\vsize}%
+ \xdef\bleedwidth {\the\hsize}%
+ \xdef\bleedheight{\the\vsize}%
\doglobal\increment\nofbleeds
\getparameters[\??bg][#1]%
\!!doneafalse % left
@@ -481,7 +486,7 @@
\fi\fi
\fi
\advance\scratchdimen\@@bghoffset
- \edef\bleedwidth{\the\scratchdimen}%
+ \xdef\bleedwidth{\the\scratchdimen}%
\scratchdimen\@@bghoogte
\ifdone
\if!!donec
@@ -492,10 +497,12 @@
\fi\fi
\fi
\advance\scratchdimen\@@bgvoffset
- \edef\bleedheight{\the\scratchdimen}%
+ \xdef\bleedheight{\the\scratchdimen}%
\hsize\bleedwidth
\vsize\bleedheight
\setbox\scratchbox\hbox{#2}%
+ \doif\@@bgpagina\v!ja
+ {\setbox\scratchbox\topskippedbox{\box\scratchbox}}%
\setbox\scratchbox\hbox to \@@bgbreedte
{\if!!donea\hss\fi\box\scratchbox\if!!doneb\hss\fi}%
\if!!doned
@@ -535,6 +542,18 @@
% {\bleed[width=5cm,height=3cm,location=rb]{\externalfigure[koe][bleed]}}
%
% \input tufte
+%
+% \placefigure
+% [top,none]
+% {} % no caption
+% {\bleed
+% [hoffset=-\backspace,
+% voffset=3mm,
+% width=0cm,
+% height=6\lineheight,
+% page=yes, % correct for topskip
+% location=lt]
+% {\externalfigure[koe][bleed][frame=on]}}
% \setlayerframed[layer id][layer settings][framed setting]{data}
% \setlayerframed[layer id][combined settings]{data}
diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex
index 2b27f7d25..94d3f187f 100644
--- a/tex/context/base/core-des.tex
+++ b/tex/context/base/core-des.tex
@@ -105,7 +105,7 @@
\leftskip\zeropoint
\rightskip\zeropoint
#2\setupalign[\getvalue{\??dd#1\c!uitlijnen}]%
- \unhcopy\@@definitiebox}%
+ \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
\ht\@@definitiebox\strutht
\dp\@@definitiebox\strutdp}
@@ -144,7 +144,7 @@
\mindermeldingen
\hsize\!!widtha
#2\setupalign[\getvalue{\??dd#1\c!uitlijnen}]#3%
- \unhcopy\@@definitiebox}%
+ \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
\ht\@@definitiebox\strutht
\dp\@@definitiebox\strutdp
\doifinsetelse{\getvalue{\??dd#1\c!hang}}{\v!passend,\v!ruim}
@@ -171,32 +171,32 @@
\setvalue{@@definitie\v!inmarge}#1[#2]#3%
{\@@dostartdefinitie{#1}[#2]{#3}%
\noindent\ignorespaces
- \inmarge{\unhcopy\@@definitiebox}%
+ \inmarge{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
\@@dodefinitie{#1}}
\setvalue{@@definitie\v!inlinker}#1[#2]#3%
{\@@dostartdefinitie{#1}[#2]{#3}%
\noindent\ignorespaces
- \inlinker{\unhcopy\@@definitiebox}%
+ \inlinker{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
\@@dodefinitie{#1}}
\setvalue{@@definitie\v!inrechter}#1[#2]#3%
{\@@dostartdefinitie{#1}[#2]{#3}%
\noindent\ignorespaces
- \inrechter{\unhcopy\@@definitiebox}%
+ \inrechter{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
\@@dodefinitie{#1}}
\def\@@definitieaanelkaarpassend#1[#2]#3%
{\@@dostartdefinitie{#1}[#2]{#3}%
\noindent\ignorespaces
- \unhcopy\@@definitiebox
+ \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox
\hskip\!!widthb % toegevoegd
\@@dodefinitie{#1}}
\def\@@definitieaanelkaarruim#1[#2]#3%
{\@@dostartdefinitie{#1}[#2]{#3}%
\noindent\ignorespaces
- \unhcopy\@@definitiebox
+ \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox
\hskip\!!widthb \!!plus .5\!!widthb \!!minus .25\!!widthb
\@@dodefinitie{#1}}
@@ -204,7 +204,7 @@
{\@@dostartdefinitie{#1}[#2]{#3}%
\noindent\ignorespaces
\hbox to \!!widtha
- {\unhcopy\@@definitiebox\hss}%
+ {\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox\hss}%
\hskip\!!widthb
\ignorespaces
\@@dodefinitie{#1}}
@@ -234,7 +234,7 @@
\advance\leftskip \leftskipadaption
\fi
\hskip-\leftskipadaption
- \unhcopy\@@definitiebox
+ \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox
\ifdim\!!widthb=\zeropoint
\kern.75em % another default
\else
@@ -270,7 +270,7 @@
% {\!!widtha}
% {\getvalue{\??dd#1\c!breedte}}
% {\doifelsevaluenothing{\??dd#1\c!monster}
-% {\unhcopy\@@definitiebox}
+% {\ifhbox\@@definitiebox\unhcopy\else\copy\fi \@@definitiebox}
% {\doattributes
% {\??dd#1}\c!kopletter\c!kopkleur
% {\getvalue{\??dd#1\c!tekst}\getvalue{\??dd#1\c!monster}}}}
@@ -299,11 +299,22 @@
\ifdim\!!widthb=\zeropoint\relax
\doifvalue{\??dd#1\c!breedte}\v!ruim{\!!widthb=1em}%
\fi
+ % temp hack, we need to avoid this kind of preprocessing
+ \setbox\@@definitiebox\hbox % preroll
+ {\forgetall
+ \trialtypesettingtrue
+ \mindermeldingen
+ \def\\{\crcr}%
+ \doattributes
+ {\??dd#1}\c!kopletter\c!kopkleur
+ {\getvalue{\??dd#1\c!commando}{\begstrut
+ \getvalue{\??dd#1\c!tekst}#3\endstrut}}}%
+ % so far
\assignwidth
{\!!widtha}
{\getvalue{\??dd#1\c!breedte}}
{\doifelsevaluenothing{\??dd#1\c!monster}
- {\unhcopy\@@definitiebox}
+ {\ifhbox\@@definitiebox\unhcopy\else\copy\fi \@@definitiebox}
{\doattributes
{\??dd#1}\c!kopletter\c!kopkleur
{\getvalue{\??dd#1\c!tekst}\getvalue{\??dd#1\c!monster}}}}
@@ -333,7 +344,7 @@
\fi} % now happens elsewhere : \noindent\ignorespaces
\def\@@stopdefinitie#1%
- {\par
+ {\par % maybe better after \dostopattributes
\dostopattributes
\endgroup
\getvalue{\??dd#1\c!na}%
diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex
index d27ad4e47..c67342c0f 100644
--- a/tex/context/base/core-fld.tex
+++ b/tex/context/base/core-fld.tex
@@ -47,10 +47,13 @@
{\processcommalist[##1]\dopresetfieldsymbol}%
\@EA\processcommalist\@EA[#1]\dopresetfieldsymbols}
-\def\definedefaultsymbols%
+\def\definedefaultsymbols
{\definesymbol[defaultyes][$\times$]%
\definesymbol[defaultno][$\cdot$]}
+\def\resetfieldsymbol[#1]% for experimental usage only
+ {\resetobject{SYM}{#1}}
+
%D The interface to the specials. DEFAULT NOG ANDERS
\def\presetlinefield
@@ -577,7 +580,7 @@
\getfield{#1}%
\iftrialtypesetting\else
\ifx\@@FieldType\empty
- \writestatus{\m!fields}{unknown field #1}%
+ \writestatus\m!fields{unknown field #1}%
\else
\let\@@FieldMode\fieldparentmode
%\def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
@@ -622,7 +625,7 @@
\let\@@FieldLabel\@@FieldName
\fi
\ifx\@@FieldType\empty
- \writestatus{\m!fields}{unknown field #2}%
+ \writestatus\m!fields{unknown field #2}%
\else\ifcase\@@FieldFree\relax
\doifdefinedelse{\strippedcsname\setupfield\@@FieldGroup}
{\let\dosetupfield=#1\getvalue{\strippedcsname\setupfield\@@FieldGroup}}
@@ -632,9 +635,9 @@
\changefield{#2}%
\fi
\else\ifcase\@@FieldAuto\relax
- % \writestatus{\m!fields}{field #2 already typeset}%
+ % \writestatus\m!fields{field #2 already typeset}%
\else
- % \writestatus{\m!fields}{field #2 automatically copied}%
+ % \writestatus\m!fields{field #2 automatically copied}%
\nextsystemfield
\copyfield[\@@FieldName][\currentsystemfield]%
\dotripleempty\dofield[#1][\currentsystemfield][#3]% get the if's right
@@ -715,10 +718,10 @@
\def\docommando##1{\dodosetupfield[##1][][][][]}%
\processcommalist[#1]\docommando
\else
- \writestatus{\m!fields}{provide either 1, 2, 3 or 5 arguments}%
+ \writestatus\m!fields{provide either 1, 2, 3 or 5 arguments}%
\fi\fi\fi\fi}
-\def\setupfield%
+\def\setupfield
{\doquintupleempty\dosetupfield}
\def\dosetupfields[#1][#2][#3][#4]%
@@ -730,14 +733,14 @@
\getvalue{\strippedcsname\setupfield##1}}
{\setvalue{\strippedcsname\setupfield##1}{\dosetupfield[##1][#1,##2][#2,##3][#3,##4][#4,##5]}}}%
\else\iffirstargument
- \doifelse{#1}{\v!reset}
+ \doifelse{#1}\v!reset
{\let\dodosetupfield\normaldodosetupfield}
{\setupfields[][][][#1]}% checken
\else
- \writestatus{\m!fields}{provide either 1 or 4 arguments}%
+ \writestatus\m!fields{provide either 1 or 4 arguments}%
\fi\fi}
-\def\setupfields%
+\def\setupfields
{\doquadrupleempty\dosetupfields}
% opties: veld, label, kader, vertikaal/horizontaal
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index 2e5675c9e..e66b9c1dd 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -268,8 +268,9 @@
{\tracegridsnappingtrue
\showgridboxestrue}
-\chardef\@@alignsnap =0
-\chardef\@@alignsnapbox=0
+\chardef\@@alignsnap =0
+\chardef\@@alignsnapbox =0
+\chardef\@@alignsnapmethod=0
\let\presnapskip \!!zeropoint \def\presnap {-}
\let\postsnapskip\!!zeropoint \let\postsnap\presnap
@@ -320,417 +321,7 @@
%\egroup
%\fi
\fi}
-
-\newif\ifboxedsnapping \boxedsnappingtrue
-
-% \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
-% \setbox\nextbox\hbox{\color[grid:two]{\ruledhbox{\black\flushnextbox}}}%
-% \fi
-% \getnoflines{\nextboxht}%
-% \setbox\nextbox\vbox to \noflines\lineheight
-% {\ifnum\@@alignsnap=1 \kern\lineheight\kern-\topskip\fi
-% \ifnum\@@alignsnap>2 \vfill\fi
-% \flushnextbox
-% \ifnum\@@alignsnap<4 \vfill\fi}%
-% \fi
-% \ifshowgridboxes
-% \setbox\nextbox\hbox{\color[grid:three]{\ruledhbox{\black\flushnextbox}}}%
-% \fi
-% \forgetall
-% \par
-% \ifvbox\nextbox
-% \setbox\nextbox\hbox{\flushnextbox}% don't ask
-% \fi
-% \scratchskip\lastskip
-% \edef\presnapskip{\the\lastskip}%
-% % mixing single/double columns sometimes goes wrong,
-% % check 'som' document
-% \ifbinnenkolommen
-% \forcepresnaptrue
-% \fi
-% \forcedpresnapcorrection
-% \ifdim\nextboxht>\strutht
-% \scratchdimen\nextboxht
-% \ifcase\@@presnap\relax
-% \ifdim\scratchskip>\zeropoint\relax
-% \scratchcounter\scratchskip
-% \advance\scratchcounter -\openlineheight
-% \ifnum\scratchcounter<0
-% \scratchcounter-\scratchcounter
-% \fi
-% \ifnum\scratchcounter<10 % \lastkip is about \openlineheight
-% \advance\scratchdimen -\openstrutdepth
-% \edef\presnapskip{*\presnapskip}%
-% \else\ifdim\scratchskip>\openlineheight
-% %<\openlineheight \else
-% \advance\scratchdimen -\openstrutdepth
-% \edef\presnapskip{*\presnapskip}%
-% \fi\fi
-% \fi
-% \fi
-% \getnoflines\scratchdimen % maybe raw ?
-% \advance\noflines -1
-% \ifnum\noflines>0
-% \scratchdimen\noflines\lineheight
-% \else
-% \scratchdimen\zeropoint
-% \fi
-% \else
-% \scratchdimen\zeropoint
-% \fi
-% \ifnum\@@extrasnap=1 \advance\scratchdimen \extrasnapsign\lineheight \fi
-% \ifnum\@@extrasnap=2 \advance\scratchdimen \extrasnapsign.5\lineheight \fi
-% \edef\presnap{\the\scratchdimen}%
-% \ifstrutsnapping
-% \ifboxedsnapping
-% \getrawnoflines\scratchdimen
-% \advance\scratchdimen-\noflines\lineheight
-% \vskip\scratchdimen % disappears at top of page
-% \dorecurse\noflines{\verticalstrut\nobreak}%
-% \else \ifdim\scratchdimen=\zeropoint
-% % nothing to skip
-% \else % disappears at top of page
-% \vskip\scratchdimen
-% \fi \fi
-% \fi
-% \ifdim\nextboxdp>\strutdp
-% \getnoflines{\nextboxdp}%
-% \advance\noflines -1
-% \ifnum\noflines>0
-% \scratchdimen\noflines\lineheight
-% \else
-% \scratchdimen\zeropoint
-% \fi
-% \else
-% \scratchdimen\zeropoint
-% \fi
-% \ifnum\@@extrasnap=2 \advance\scratchdimen \extrasnapsign.5\lineheight \fi
-% \ifnum\@@extrasnap=3 \advance\scratchdimen \extrasnapsign\lineheight \fi
-% \edef\postsnap{\the\scratchdimen}%
-% \ifstrutsnapping
-% \nextboxht\strutht
-% \nextboxdp\strutdp
-% \else
-% \scratchdimen\presnap
-% \advance\scratchdimen \strutht
-% \nextboxht\scratchdimen
-% \scratchdimen\postsnap
-% \advance\scratchdimen \strutdp
-% \nextboxdp\scratchdimen
-% \fi
-% \hbox{\tracedsnapping\flushnextbox}%
-% \ifstrutsnapping
-% \ifdim\scratchdimen=\zeropoint\else\vskip\scratchdimen\fi
-% \fi
-% \else
-% \scratchdimen\nextboxht\relax
-% \ifcase\@@alignsnapbox
-% % can't happen here
-% \or
-% \getrawnoflines\scratchdimen
-% \else
-% \getnoflines \scratchdimen
-% \fi
-% \scratchdimen\noflines\lineheight\relax
-% \advance\scratchdimen-\strutdepth
-% % spoils the whole game (fit/broad/line)
-% % \ifnum\pagetotal>\zeropoint
-% % \else % disable this as option
-% % \advance\scratchdimen-\strutheight
-% % \advance\scratchdimen+\topskip
-% % \fi
-% \dimen0=\scratchdimen
-% \dimen2=\strutdepth
-% \ifshowgridboxes
-% \setbox\nextbox\hbox{\color[grid:two]{\ruledhbox{\black\flushnextbox}}}%
-% \fi
-% \nextboxdp\strutdp
-% \dimen4=\nextboxht
-% \dimen6=\nextboxdp
-% \setbox\nextbox\vbox to \scratchdimen
-% {\forgetall
-% \ifnum\@@alignsnap>2 \vfill\fi % 3 4
-% \iftracegridsnapping
-% \scratchdimen\@@alignsnapamount\relax
-% \setbox\scratchbox\hbox
-% {\ifdim\scratchdimen<\zeropoint
-% \tracedgridamount\zeropoint{-\scratchdimen}%
-% \else
-% \tracedgridamount\scratchdimen\zeropoint
-% \fi}%
-% \smashbox\scratchbox
-% \setbox\nextbox\hbox{\box\scratchbox\flushnextbox}%
-% \fi
-% \setbox\nextbox\hbox
-% {\scratchdimen\@@alignsnapamount\relax
-% \ifcase\@@alignsnapdepth\or
-% % don't change this ever !
-% \ifdim\dimen0<\lineheight
-% % otherwise it is ok, but ending up inside
-% % the next paragraph is seldom what we want,
-% % so we move one line up
-% \advance\scratchdimen-\lineheight
-% \advance\scratchdimen\strutheight
-% \else
-% % otherwise we can move down to the
-% % baseline
-% \advance\scratchdimen\dimen6
-% \fi
-% \fi
-% \lower\scratchdimen\flushnextbox}%
-% \nextboxht\dimen4
-% \nextboxdp\dimen6
-% \flushnextbox
-% \nointerlineskip % \offinterlineskip
-% \ifnum\@@alignsnap<4 \vfill\fi % 2 3
-% \kern\zeropoint}%
-% \ifshowgridboxes
-% \setbox\nextbox\vbox{\color[grid:three]{\ruledhbox{\black\flushnextbox}}}%
-% \fi
-% \scratchdimen\@@alignsnapamount
-% \edef\presnapskip{\the\scratchdimen}%
-% \ifnum\@@alignsnap>2 \def\presnap {+}\fi
-% \ifnum\@@alignsnap<4 \def\postsnap{+}\fi
-% \setbox\nextbox\hbox{\tracedsnapping\flushnextbox}%
-% \par
-% \nextboxht\dimen0
-% \nextboxdp\dimen2
-% \forcedpresnapcorrection
-% \nointerlineskip
-% \flushnextbox
-% \fi
-% \else
-% \setbox\nextbox\vbox to \teksthoogte
-% {\ifdim\nextboxdp=\zeropoint
-% \hbox{\lower\strutdepth\flushnextbox}
-% \else % this branch is yet untested
-% \vss
-% \hbox{\lower\nextboxdp\flushnextbox}
-% \vskip-\strutdepth
-% \fi}%
-% \nextboxdp\strutdepth
-% \flushnextbox
-% \fi
-% \extrasnapreset
-% \enablepresnapcorrection
-% \global\chardef\@@alignsnap\zerocount
-% \global\chardef\@@alignsnapbox\zerocount
-% \egroup}}
-% before components (keep for a while: vbox/hbox)
-%
-% \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
-% \setbox\nextbox\hbox{\color[grid:two]{\ruledhbox{\black\flushnextbox}}}%
-% \fi
-% %\getnoflines{\nextboxht}%
-% \getnoflines\nextboxht
-% \setbox\nextbox\vbox to \noflines\lineheight
-% {\ifnum\@@alignsnap=1 \kern\lineheight\kern-\topskip\fi
-% \ifnum\@@alignsnap>2 \vfill\fi
-% \flushnextbox
-% \ifnum\@@alignsnap<4 \vfill\fi}%
-% \fi
-% \ifshowgridboxes
-% \setbox\nextbox\hbox{\color[grid:three]{\ruledhbox{\black\flushnextbox}}}%
-% \fi
-% \forgetall
-% \par
-% \ifvbox\nextbox
-% \setbox\nextbox\hbox{\flushnextbox}% don't ask
-% \fi
-% \scratchskip\lastskip
-% \edef\presnapskip{\the\lastskip}%
-% % mixing single/double columns sometimes goes wrong,
-% % check 'som' document
-% \ifbinnenkolommen
-% \forcepresnaptrue
-% \fi
-% \forcedpresnapcorrection
-% \ifdim\nextboxht>\strutht
-% \scratchdimen\nextboxht
-% \ifcase\@@presnap\relax
-% \ifdim\scratchskip>\zeropoint\relax
-% \scratchcounter\scratchskip
-% \advance\scratchcounter -\openlineheight
-% \ifnum\scratchcounter<0
-% \scratchcounter-\scratchcounter
-% \fi
-% \ifnum\scratchcounter<10 % \lastkip is about \openlineheight
-% \advance\scratchdimen -\openstrutdepth
-% \edef\presnapskip{*\presnapskip}%
-% \else\ifdim\scratchskip>\openlineheight
-% %<\openlineheight \else
-% \advance\scratchdimen -\openstrutdepth
-% \edef\presnapskip{*\presnapskip}%
-% \fi\fi
-% \fi
-% \fi
-% \getnoflines\scratchdimen % maybe raw ?
-% \advance\noflines -1
-% \ifnum\noflines>0
-% \scratchdimen\noflines\lineheight
-% \else
-% \scratchdimen\zeropoint
-% \fi
-% \else
-% \scratchdimen\zeropoint
-% \fi
-% \ifnum\@@extrasnap=1 \advance\scratchdimen \extrasnapsign\lineheight \fi
-% \ifnum\@@extrasnap=2 \advance\scratchdimen \extrasnapsign.5\lineheight \fi
-% \edef\presnap{\the\scratchdimen}%
-% \ifstrutsnapping
-% \ifboxedsnapping
-% \getrawnoflines\scratchdimen
-% \advance\scratchdimen-\noflines\lineheight
-% \vskip\scratchdimen % disappears at top of page
-% \dorecurse\noflines{\verticalstrut\nobreak}%
-% \else \ifdim\scratchdimen=\zeropoint
-% % nothing to skip
-% \else % disappears at top of page
-% \vskip\scratchdimen
-% \fi \fi
-% \fi
-% \ifdim\nextboxdp>\strutdp
-% \getnoflines{\nextboxdp}%
-% \advance\noflines -1
-% \ifnum\noflines>0
-% \scratchdimen\noflines\lineheight
-% \else
-% \scratchdimen\zeropoint
-% \fi
-% \else
-% \scratchdimen\zeropoint
-% \fi
-% \ifnum\@@extrasnap=2 \advance\scratchdimen \extrasnapsign.5\lineheight \fi
-% \ifnum\@@extrasnap=3 \advance\scratchdimen \extrasnapsign\lineheight \fi
-% \edef\postsnap{\the\scratchdimen}%
-% \ifstrutsnapping
-% \nextboxht\strutht
-% \nextboxdp\strutdp
-% \else
-% \scratchdimen\presnap
-% \advance\scratchdimen \strutht
-% \nextboxht\scratchdimen
-% \scratchdimen\postsnap
-% \advance\scratchdimen \strutdp
-% \nextboxdp\scratchdimen
-% \fi
-% \hbox{\tracedsnapping\flushnextbox}%
-% \ifstrutsnapping
-% \ifdim\scratchdimen=\zeropoint\else\vskip\scratchdimen\fi
-% \fi
-% \else
-% \scratchdimen\nextboxht\relax
-% \ifcase\@@alignsnapbox
-% % can't happen here
-% \or
-% \getrawnoflines\scratchdimen
-% \else
-% \getnoflines \scratchdimen
-% \fi
-% \scratchdimen\noflines\lineheight\relax
-% \advance\scratchdimen-\strutdepth
-% % spoils the whole game (fit/broad/line)
-% % \ifnum\pagetotal>\zeropoint \else % disable this as option
-% % \advance\scratchdimen-\strutheight
-% % \advance\scratchdimen+\topskip
-% % \fi
-% \dimen0=\scratchdimen
-% \dimen2=\strutdepth
-% \ifshowgridboxes
-% \setbox\nextbox\hbox{\color[grid:two]{\ruledhbox{\black\flushnextbox}}}%
-% \fi
-% \nextboxdp\strutdp
-% \dimen4=\nextboxht
-% \dimen6=\nextboxdp
-% \iftracegridsnapping
-% \setbox\scratchbox\hbox
-% {\scratchdimen\@@alignsnapamount\relax
-% \ifdim\scratchdimen<\zeropoint
-% \tracedgridamount\zeropoint{-\scratchdimen}%
-% \else
-% \tracedgridamount\scratchdimen\zeropoint
-% \fi}%
-% \smashbox\scratchbox
-% \setbox\nextbox\hbox{\box\scratchbox\flushnextbox}%
-% \fi
-% \setbox\nextbox\hbox
-% {\scratchdimen\@@alignsnapamount\relax
-% \ifcase\@@alignsnapdepth\or
-% % don't change this ever !
-% \ifdim\dimen0<\lineheight
-% % otherwise it is ok, but ending up inside
-% % the next paragraph is seldom what we want,
-% % so we move one line up
-% \advance\scratchdimen-\lineheight
-% \advance\scratchdimen\strutheight
-% \else
-% % otherwise we can move down to the
-% % baseline
-% \advance\scratchdimen\dimen6 % == \strutdepth
-% \fi
-% \fi
-% \lower\scratchdimen\flushnextbox}%
-% \nextboxht\dimen4
-% \nextboxdp\dimen6
-% \ifnum\@@alignsnap<4 % 4 = regel
-% \setbox\nextbox\vbox to \scratchdimen
-% {\forgetall
-% \ifnum\@@alignsnap>2 \vfill\fi % 3 4
-% \flushnextbox
-% \nointerlineskip % \offinterlineskip
-% \ifnum\@@alignsnap<4 \vfill\fi % 2 3
-% \kern\zeropoint}%
-% \fi
-% \ifshowgridboxes
-% \setbox\nextbox\vbox{\color[grid:three]{\ruledhbox{\black\flushnextbox}}}%
-% \fi
-% \scratchdimen\@@alignsnapamount
-% \edef\presnapskip{\the\scratchdimen}%
-% \ifnum\@@alignsnap>2 \def\presnap {+}\fi
-% \ifnum\@@alignsnap<4 \def\postsnap{+}\fi
-% \setbox\nextbox\hbox{\tracedsnapping\flushnextbox}%
-% \par
-% \nextboxht\dimen0
-% \nextboxdp\dimen2
-% \forcedpresnapcorrection
-% \nointerlineskip
-% \flushnextbox
-% \fi
-% \else
-% \setbox\nextbox\vbox to \teksthoogte
-% {\ifdim\nextboxdp=\zeropoint
-% \hbox{\lower\strutdepth\flushnextbox}
-% \else % this branch is yet untested
-% \vss
-% \hbox{\lower\nextboxdp\flushnextbox}
-% \vskip-\strutdepth
-% \fi}%
-% \nextboxdp\strutdepth
-% \flushnextbox
-% \fi
-% \extrasnapreset
-% \enablepresnapcorrection
-% \global\chardef\@@alignsnap\zerocount
-% \global\chardef\@@alignsnapbox\zerocount
-% \egroup}}
-
-% \def\setgridtracebox#1[#2]%
-% {\setbox\nextbox#1%
-% {\color[grid:#2]{\ruledhbox{\black\flushnextbox}}}}
-
\def\setgridtracebox#1[#2]% % maybe reverse the order
{\setbox\nextbox#1%
{\hbox
@@ -741,9 +332,19 @@
\hss}%
\flushnextbox}}}
+\newif\ifboxedsnapping \boxedsnappingtrue
+
+\chardef\depthsnapmethod \plusone % downward compatible, minus one line
+\chardef\heightsnapmethod\plusone % downward compatible, minus one line
+
\def\dodosnaptogrid
{\dowithnextbox
{\bgroup
+ \ifcase\@@alignsnapmethod \or
+ % we're dealing with text with a possible big depth/height
+ \chardef\depthsnapmethod \plustwo
+ \chardef\heightsnapmethod\plustwo
+ \fi
\ifdim\nextboxht<\teksthoogte % handle special case (like page fig)
\ifcase\@@alignsnapbox\relax
\ifcase\@@alignsnap\else % 1=top 2=high 3=middle 4=low
@@ -793,8 +394,19 @@
\fi\fi
\fi
\fi
- \getnoflines\scratchdimen % maybe raw ?
- \advance\noflines -1
+ % \getnoflines\scratchdimen % maybe raw ?
+ % \advance\noflines -1
+ \ifcase\heightsnapmethod
+ % raw
+ \or
+ \advance\scratchdimen-\lineheight % tight (default)
+ \or
+ \advance\scratchdimen-\strutheight % fit (text)
+ \or
+ \advance\scratchdimen-\strutheight % tolerant
+ \advance\scratchdimen-10sp
+ \fi
+ \getnoflines\scratchdimen
\ifnum\noflines>0
\scratchdimen\noflines\lineheight
\else
@@ -819,8 +431,20 @@
\fi \fi
\fi
\ifdim\nextboxdp>\strutdp
- \getnoflines{\nextboxdp}%
- \advance\noflines -1
+ % \getnoflines\nextboxdp
+ % \advance\noflines \minusone
+ \scratchdimen\nextboxdp\relax
+ \ifcase\depthsnapmethod
+ % raw
+ \or
+ \advance\scratchdimen-\lineheight % tight (default)
+ \or
+ \advance\scratchdimen-\strutdepth % fit (text)
+ \or
+ \advance\scratchdimen-\strutdepth % tolerant
+ \advance\scratchdimen-10sp
+ \fi
+ \getnoflines\scratchdimen
\ifnum\noflines>0
\scratchdimen\noflines\lineheight
\else
@@ -995,13 +619,13 @@
% \egroup}
% \vbox % was \hbox
% \fi}
-
+
% The next implementation is sub-optimal
%
% \def\centertogrid % usage: see ie pascal / stepcharts
% {\snaptogrid[\v!midden,.5\strutdp]\vbox}
-\def\centertogrid % meant for special situations
+\def\centertogrid % meant for special situations
{\ifgridsnapping
\dowithnextboxcontent
{\ignorespaces}
@@ -1023,54 +647,54 @@
\vbox % was \hbox
\fi}
-% testbed for \centertogrid
+% testbed for \centertogrid
%
-% \strut Bruggetje
+% \strut Bruggetje
% \startlinecorrection
% \startcombination
% {\framed{test}} {} {\framed{test}} {}
% \stopcombination
% \stoplinecorrection
-% \strut Bruggetje
+% \strut Bruggetje
% \startlinecorrection
% \startcombination[2*2]
% {\framed{test}} {} {\framed{test}} {}
% {\framed{test}} {} {\framed{test}} {}
% \stopcombination
% \stoplinecorrection
-% \strut Bruggetje
+% \strut Bruggetje
% \startlinecorrection[blank]
% \startcombination
% {\framed{test}} {} {\framed{test}} {}
% \stopcombination
% \stoplinecorrection
-% \strut Bruggetje
+% \strut Bruggetje
% \startlinecorrection[blank]
% \startcombination[2*2]
% {\framed{test}} {} {\framed{test}} {}
% {\framed{test}} {} {\framed{test}} {}
% \stopcombination
% \stoplinecorrection
-% \strut Bruggetje
+% \strut Bruggetje
% \startlinecorrection
% \startcombination
% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
% \stopcombination
% \stoplinecorrection
-% \strut Bruggetje
+% \strut Bruggetje
% \startlinecorrection
% \startcombination[2*2]
% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
% \stopcombination
% \stoplinecorrection
-% \strut Bruggetje
+% \strut Bruggetje
% \startlinecorrection[blank]
% \startcombination
% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
% \stopcombination
% \stoplinecorrection
-% \strut Bruggetje
+% \strut Bruggetje
% \startlinecorrection[blank]
% \startcombination[2*2]
% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
@@ -1130,42 +754,12 @@
\def\doverplaatsopgrid[#1]%
{\ifgridsnapping\doifsomething{#1}{\dodoverplaatsopgrid[#1]}\fi}
-% \def\dodoverplaatsopgrid[#1]% some day : speed up
-% {\global\chardef\@@alignsnap\zerocount
-% \global\chardef\@@alignsnapbox\zerocount
-% \global\chardef\@@alignsnapdepth\zerocount
-% \global\let\@@alignsnapamount\!!zeropoint
-% \donefalse
-% \expanded{\processallactionsinset[#1]}
-% [\v!standaard=>,
-% \v!normaal=>, % to be sure
-% \v!ja=>, % to be sure
-% \v!boven=>\gridwarning+\positiveextrasnap\extrasnapbefore,
-% \v!onder=>\gridwarning+\positiveextrasnap\extrasnapafter,
-% \v!beide=>\positiveextrasnap\extrasnaparound,
-% -\v!boven=>\gridwarning-\negativeextrasnap\extrasnapbefore,
-% -\v!onder=>\gridwarning-\negativeextrasnap\extrasnapafter,
-% -\v!beide=>\negativeextrasnap\extrasnaparound,
-% \v!pagina=>\global\chardef\@@alignsnap1, % topskip
-% \v!hoog=>\global\chardef\@@alignsnap2,
-% \v!midden=>\global\chardef\@@alignsnap3,
-% \v!laag=>\global\chardef\@@alignsnap4,
-% \v!passend=>\global\chardef\@@alignsnapbox1, % new
-% \v!ruim=>\global\chardef\@@alignsnapbox2, % new
-% \v!diepte=>\global\chardef\@@alignsnapdepth1, % new
-% \v!regel=>\global\chardef\@@alignsnapbox3
-% \global\chardef\@@alignsnap4
-% \global\chardef\@@alignsnapdepth1,
-% \v!reset=>\positiveextrasnap\extrasnapreset,
-% \v!geen=>\global\chardef\@@alignsnap0
-% \global\chardef\@@alignsnapbox0,
-% \s!default=>,
-% \s!unknown=>\@@unknowngriddisplacement]}
\def\dodoverplaatsopgrid[#1]% some day : speed up
{\global\chardef\@@alignsnap\zerocount
\global\chardef\@@alignsnapbox\zerocount
\global\chardef\@@alignsnapdepth\zerocount
+ \global\chardef\@@alignsnapmethod\zerocount
\global\let\@@alignsnapamount\!!zeropoint
\donefalse
\expanded{\processallactionsinset[#1]}
@@ -1178,6 +772,7 @@
-\v!boven=>\gridwarning-\negativeextrasnap\extrasnapbefore,
-\v!onder=>\gridwarning-\negativeextrasnap\extrasnapafter,
-\v!beide=>\negativeextrasnap\extrasnaparound,
+ \v!tekst=>\global\chardef\@@alignsnapmethod\plusone, % accurate calculations
\v!pagina=>\global\chardef\@@alignsnap1, % topskip
\v!hoog=>\global\chardef\@@alignsnap2,
\v!midden=>\global\chardef\@@alignsnap3,
diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex
index 771887a6d..f42ac52c5 100644
--- a/tex/context/base/core-int.tex
+++ b/tex/context/base/core-int.tex
@@ -11,16 +11,22 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% evt interactiebalken runtime laden (scheelt 8K)
+
%D Still to be done properly.
\writestatus{loading}{Context Core Macros / Interaction}
+% interactions 5 and 6 to be translated
+
\startmessages dutch library: interactions
title: interactie
1: aspect ratio -- x -- (b x h)
2: actief
3: niet actief
4: geen paginasynchronisatie (--) in hmode
+ 5: onbekend attachment --
+ 6: attachment file -- bestaat niet
\stopmessages
\startmessages english library: interactions
@@ -29,6 +35,8 @@
2: active
3: inactive
4: no pagesynchronisation (--) in hmode
+ 5: unknown attachment --
+ 6: attachment file -- does not exist
\stopmessages
\startmessages german library: interactions
@@ -37,6 +45,8 @@
2: aktiv
3: inaktiv
4: keine Seitensynchronisation (--) im hmode
+ 5: unknown attachment --
+ 6: attachment file -- does not exist
\stopmessages
\startmessages czech library: interactions
@@ -45,6 +55,8 @@
2: aktivni
3: neaktivni
4: zadna strankova synchronizace (--) v hmode
+ 5: unknown attachment --
+ 6: attachment file -- does not exist
\stopmessages
\startmessages italian library: interactions
@@ -53,6 +65,8 @@
2: attiva
3: inattiva
4: sincronizzazione di pagina (--) non disponibile in hmode
+ 5: unknown attachment --
+ 6: attachment file -- does not exist
\stopmessages
\startmessages norwegian library: interactions
@@ -61,6 +75,8 @@
2: aktiv
3: inaktiv
4: ingen sidesynkronisering (--) i hmode
+ 5: unknown attachment --
+ 6: attachment file -- does not exist
\stopmessages
\startmessages romanian library: interactions
@@ -69,6 +85,8 @@
2: activ
3: inactiv
4: nu exista sincronizare pt. pagini (--) in hmode
+ 5: unknown attachment --
+ 6: attachment file -- does not exist
\stopmessages
\startmessages dutch library: versions
@@ -1352,6 +1370,8 @@
{#2}%
\fi}
+\presetlocalframed[\??ib]
+
\def\interactiebalka
{\iflocation
\bgroup
@@ -1422,9 +1442,16 @@
\egroup
\fi}
-\presetlocalframed[\??ib]
+\def\interactiebalkb
+ {\ifnum\lastpage>\firstpage\relax
+ \interactiebuttons
+ [\v!eerstepagina,
+ \v!vorigepagina,
+ \v!volgendepagina,
+ \v!laatstepagina]%
+ \fi}
-\def\interactiebalkc%
+\def\interactiebalkc
{\iflocation
\ifnum\lastpage>\plusone
\hbox to \@@ibbreedte
@@ -1454,7 +1481,7 @@
\fi
\fi}
-\def\interactiebalkd%
+\def\interactiebalkd
{\iflocation\ifshowingsubpage
\ifnum\nofsubpages>\plusone
\hbox
@@ -1648,16 +1675,7 @@
\fi
\fi\fi}
-\def\interactiebalkb%
- {\ifnum\lastpage>\firstpage\relax
- \interactiebuttons
- [\v!eerstepagina,
- \v!vorigepagina,
- \v!volgendepagina,
- \v!laatstepagina]%
- \fi}
-
-\def\interactiebalkg%
+\def\interactiebalkg
{\ifnum\lastsubpage>\firstsubpage\relax
\interactiebuttons
[\v!eerstesubpagina,
@@ -2157,8 +2175,9 @@
\doifelse\@@ccstatus\v!start
{\dopreparecommentaar{#1}{#2}%
\long\def\docommando##1%
- {\global\setbox\commentbox\hbox
- {\dodocommentaar{##1}%
+ {\global\setbox\commentbox\frozenhbox
+ {\hbox to \zeropoint
+ {\struttedbox{\tbox{\dodocommentaar{##1}}}\hss}%
\hskip\ifvoid\commentbox\@@ccmarge\else\@@ccafstand\fi
\box\commentbox}%
\egroup}}%
@@ -2166,12 +2185,14 @@
{\egroup}}%
\grabuntil{\e!stop\v!comment}\docommando}
+\letvalue{\e!stop\v!comment}\relax % handy for \expanded{...}
+
\def\docommentaar[#1][#2]#3%
{\doif\@@ccstatus\v!start
{\hbox to \zeropoint
{\dopreparecommentaar{#1}{#2}%
\hskip-\@@ccmarge
- \raise\strutht\hbox{\dodocommentaar{#3}}}}%
+ \struttedbox{\tbox{\dodocommentaar{#3}}\hss}}}%
\ignorespaces}
% \startcommentaar
@@ -2179,19 +2200,19 @@
% \stopcommentaar
%
% \startcommentaar[hallo]
-% hello \<< \'e\'erste \>>
+% hello << \'e\'erste >>
% beautiful
% world
% \stopcommentaar
%
% \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm]
-% hello \<< \'e\'erste \>>
+% hello \leftguillemot\ \'e\'erste \rightguilemot\
% beautiful
% world
% \stopcommentaar
%
% \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm]
-% hello \<< \'e\'erste \>>
+% hello \leftguillemot\ \'e\'erste \rightguilemot\ test
%
% beautiful
%
@@ -2235,7 +2256,10 @@
% \setupinteraction[state=start]
%
-% \useattachment[whatever][[new name]][test.tex]
+% \useattachment[test.tex]
+% \useattachment[whatever][test.tex]
+% \useattachment[whatever][newname][test.tex]
+% \useattachment[whatever][title][newname][test.tex]
%
% % \setupattachments[\c!symbool={symbol-normal,symbol-down}]
%
@@ -2244,24 +2268,49 @@
\definesystemvariable{at}
\def\useattachment
- {\dotripleempty\douseattachment}
-
-\def\douseattachment[#1][#2][#3]%
- {\setgvalue{\??at :#1}{#2}%
- \setgvalue{\??at::#1}{#3}%
- \doifvaluenothing{\??at :#1}{\setxvalue{\??at :#1}{#1}}%
- \doifvaluenothing{\??at::#1}{\setxvalue{\??at::#1}{\getvalue{\??at:#1}}}}
-
-\def\attachment[#1]%
- {\ifundefined{\??at:#1}\else \iflocation
- \doif\@@atstatus\v!start
- {\doiffileelse{\getvalue{\??at:#1}}%
- {\doPDFattachfile
- {\getvalue{\??at::#1}}%
- {1em}{1ex}\@@atkleur\@@atsymbool
- {\getvalue{\??at:#1}}}%
- {}}%
- \fi \fi}
+ {\doquadrupleempty\douseattachment}
+
+\def\douseattachment[#1][#2][#3][#4]% tag title newname filename
+ {\iffourthargument
+ \setgvalue{\??at:#1}{{#2}{#3}{#4}}% tooltip kind of case
+ \else\ifthirdargument
+ \setgvalue{\??at:#1}{{#2}{#2}{#3}}% full path case
+ \else\ifsecondargument
+ \setgvalue{\??at:#1}{{#2}{#2}{#2}}% obvious case
+ \else
+ \setgvalue{\??at:#1}{{#1}{#1}{#1}}% worst case
+ \fi\fi\fi}
+
+\let\attachmenttitle\empty
+\let\attachmentname \empty
+\let\attachmentfile \empty
+
+\def\getattachmentdata[#1]%
+ {\edef\attachmenttitle{\filterfromvalue{\??at:#1}31}% description
+ \edef\attachmentname {\filterfromvalue{\??at:#1}32}% new name
+ \edef\attachmentfile {\filterfromvalue{\??at:#1}33}% original
+ \expandafter\splitstring\attachmentname\at.\to\!!stringa\and\!!stringb
+ \ifx\!!stringb\empty % no suffix, so we need to inherit it
+ \expandafter\splitstring\attachmentfile\at.\to\!!stringc\and\!!stringd
+ \edef\attachmentname{\attachmentname.\!!stringd}%
+ \fi}
+
+\def\attachment[#1]% currently title equals newname
+ {\iflocation
+ \doifundefinedelse{\??at:#1}
+ {\writestatus\m!interactions6{#1}}%
+ {\doif\@@atstatus\v!start
+ {\bgroup
+ \getattachmentdata[#1]%
+ \doiffileelse\attachmentfile
+ {\doattachfile
+ \attachmenttitle
+ {1em}{\strutheight}{\strutdepth}\@@atkleur\@@atsymbool
+ \attachmentname
+ \attachmentfile}%
+ {\writestatus\m!interactions5\attachmentfile}%
+ \egroup}}%
+ \fi}
\def\setupattachments
{\dodoubleempty\getparameters[\??at]}
diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex
index ad83c0da5..18a4e0dae 100644
--- a/tex/context/base/core-itm.tex
+++ b/tex/context/base/core-itm.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=core-itm, % updated
+%D [ file=core-itm, % updated
%D version=1997.03.31,
%D title=\CONTEXT\ Core Macros,
%D subtitle=itemgroups,
@@ -12,7 +12,7 @@
%C details.
% new: text + lefttext=(,righttext=)
-% start=
+% start=
\writestatus{loading}{Context Core Macros / itemgroup}
@@ -68,11 +68,11 @@
\definetwopasslist\s!list
-\let\currentitemgroup\empty
+\let\currentitemgroup\empty
\def\unknownitemreference{0} \let\itemreferences\unknownitemreference
-% #1=level #2=parameter
+% #1=level #2=parameter
\def\getitemparameter #1#2{\csname\??op\currentitemgroup#1#2\endcsname}
\def\setitemparameter #1#2{\@EA\def\csname\??op\currentitemgroup#1#2\endcsname}
@@ -90,7 +90,7 @@
\def\dolistreference
{\immediatewriteutilitycommand
- {\twopassentry
+ {\twopassentry
{\s!list}%
{\currentlist}%
{\currentlist:\noflistelements}}}
@@ -102,12 +102,12 @@
\setevalue{\@@globalitemsymbol{#1}}{#1}%
\fi}
-\def\initializeitemgrouplevel#1% safeguard
+\def\initializeitemgrouplevel#1% safeguard
{\ifundefined{\??op\currentitemgroup#1\c!breedte}%
\doinitializeitemgrouplevel{#1}%
\fi}
-\def\doinitializeitemgrouplevel#1%
+\def\doinitializeitemgrouplevel#1%
{\copyparameters
[\??op\currentitemgroup#1][\??oo]
[\c!breedte,\c!factor,\c!afstand,\c!uitlijnen,\c!optie,
@@ -123,7 +123,7 @@
\def\dosetupitemgroups[#1]% still undocumented
{\getparameters[\??oo][\c!niveaus=4,#1]%
- % will change (remove)
+ % will change (remove)
\ifnum\@@ooniveaus>\maxitemlevel
\edef\maxitemlevel{\@@ooniveaus}%
\dorecurse\maxitemlevel{\initializeitemgroupslevel\recurselevel}%
@@ -159,7 +159,7 @@
#2#3*\v!ruim*=>\setitemparameter{#1}\c!factor{#2#3},
#2*\v!ruim*=>\setitemparameter{#1}\c!factor{#2},
\v!tekst*=>\textitemstrue
- \settrue\inlinelistitem
+ \settrue\inlinelistitem
\dosetuppackeditemgroup{#1}%
\packitems,
\v!kolommen*=>\packitems,
@@ -261,7 +261,7 @@
% \doifelse{\getitemparameter\itemlevel\c!plaatsafsluiter}\v!ja
% {\def\tempsymbol{\getitemparameter\itemlevel\c!afsluiter}}
% {\let\tempsymbol\empty}%
-% \fi}
+% \fi}
\def\setitemlevel#1%
{\ifnum\itemlevel>\zerocount
@@ -277,7 +277,7 @@
\doifelse{\getitemparameter\itemlevel\c!plaatsafsluiter}\v!ja
{\def\tempsymbol{\getitemparameter\itemlevel\c!afsluiter}}
{\let\tempsymbol\empty}%
- \fi}
+ \fi}
% PAS OP: ook 'opelkaar' en zo worden getest, nog eens afvangen!
@@ -349,7 +349,7 @@
% \settrue\concatnextitem % new, concat
% \fi % new, concat
% \fi % new, concat
-% \iftextitems\else\doifnotinset\v!tekst{#1}\par\fi % suboptimal
+% \iftextitems\else\doifnotinset\v!tekst{#1}\par\fi % suboptimal
% \fi
% \ifnum\itemlevel=\maxitemlevel\relax
% \showmessage\m!layouts9\maxitemlevel
@@ -358,7 +358,7 @@
% \def\itemincrement{1}%
% \fi
% \doglobal\increment(\itemlevel,\itemincrement)%
-% \initializeitemgrouplevel\itemlevel % safeguard
+% \initializeitemgrouplevel\itemlevel % safeguard
% \begingroup
% \ifnum\itemlevel=\plusone % NIEUW
% \doadaptleftskip{\getitemparameter1\c!marge}%
@@ -427,7 +427,7 @@
% {\dosetupitemgroupconstant[\itemlevel][#1]%
% \dosetupitemgroupvariable[\itemlevel][#2]}}%
% \def\docommando##1% \setitemmark resets \docommando
-% {\doifnot{##1}{0}{\setitemmark{##1}}}%
+% {\doifnot{##1}{0}{\setitemmark{##1}}}%
% \processcommalist[#1,\@@opsymbool]\docommando}%
% \ifautoitemintro\ifnum\prevgraf<3
% \itemintrotrue
@@ -447,7 +447,7 @@
% \fi}
\def\dodostartitemgroup[#1]% [#2]%
- {\relax % prevents lookahead
+ {\relax % prevents lookahead
\ifnum\itemlevel=\maxitemlevel\relax
\showmessage\m!layouts9\maxitemlevel
\let\itemincrement\zerocount
@@ -455,15 +455,15 @@
\let\itemincrement\plusone
\fi
\doglobal\increment(\itemlevel,\itemincrement)%
- \initializeitemgrouplevel\itemlevel % safeguard
+ \initializeitemgrouplevel\itemlevel % safeguard
\edef\itemgroupoptions{\getitemparameter\itemlevel\c!optie}%
\ifx\itemgroupoptions\empty
- \edef\itemgroupoptions{#1}%
+ \edef\itemgroupoptions{#1}%
\else
- \doifsomething{#1}{\edef\itemgroupoptions{\itemgroupoptions,#1}}%
+ \doifsomething{#1}{\edef\itemgroupoptions{\itemgroupoptions,#1}}%
\fi
\expanded{\redostartitemgroup[\itemgroupoptions]}}% [#2]
-
+
\def\redostartitemgroup[#1][#2]%
{\setfalse\inlinelistitem % new, no indent (leftskip)
\setfalse\concatnextitem % new, concat
@@ -473,7 +473,7 @@
\settrue\concatnextitem % new, concat
\fi % new, concat
\fi % new, concat
- \iftextitems\else\doifnotinset\v!tekst{#1}\par\fi % suboptimal
+ \iftextitems\else\doifnotinset\v!tekst{#1}\par\fi % suboptimal
\fi
\begingroup
\ifnum\itemlevel=\plusone % NIEUW
@@ -481,7 +481,7 @@
\fi
\dosetraggedcommand{\getitemparameter\itemlevel\c!uitlijnen}\raggedcommand
\doifsomething{\getitemparameter\itemlevel\c!inspringen}
- {% is \expanded needed?
+ {% is \expanded needed?
\expanded{\setupindenting[\getitemparameter\itemlevel\c!inspringen]}}%
\doifinset\v!kolommen{#1}%
{\ifbinnenkolommen\else\ifnum\itemcolumndepth=\zerocount
@@ -544,7 +544,7 @@
{\dosetupitemgroupconstant[\itemlevel][#1]%
\dosetupitemgroupvariable[\itemlevel][#2]}}%
\def\docommando##1% \setitemmark resets \docommando
- {\doifnot{##1}{0}{\setitemmark{##1}}}%
+ {\doifnot{##1}{0}{\setitemmark{##1}}}%
\processcommalist[#1,\@@opsymbool]\docommando}%
\ifautoitemintro\ifnum\prevgraf<3
\itemintrotrue
@@ -580,6 +580,13 @@
\doitembreak\allowbreak % toegevoegd
\getitemparameter1\c!na
\dochecknextindentation\??oo
+ \else
+ % nieuw, not yet nobreak handling
+ \ifcase\autoitemgroupspacing
+ \getitemparameter\itemlevel\c!na
+ \or
+ \getitemparameter\itemlevel\c!na
+ \fi
\fi
\fi
\endgroup
@@ -598,7 +605,7 @@
\def\itemgroupdummy
{\itemgroupsymbol{\strut}\strut}
-\def\itemgroupsubitem
+\def\itemgroupsubitem
{\subitemtrue\itemgroupitem}
\def\itemgroupsymbol#1%
@@ -612,18 +619,18 @@
\hbox to \dimen0
{#1\hskip\getitemparameter\itemlevel\c!afstand}}}
-\def\itemgrouphead
+\def\itemgrouphead
{\headitemtrue\doitemgrouphead}
\def\itemgroupitems
{\dosingleempty\doitemgroupitems}
-\def\doitemgroupitems[#1]%
+\def\doitemgroupitems[#1]%
{\itemgroupedge
{\dorecurse{0\getitemparameter\itemlevel\c!items}{\listitem\hss}%
\unskip}}
-\def\itemgroupmargin#1%
+\def\itemgroupmargin#1%
{\def\marsymbol
{\llap
{\doitemattributes\itemlevel\c!marletter\c!markleur{#1}%
@@ -642,14 +649,14 @@
\appendtoks \letvalue\v!mar \itemgroupmargin \to \itemgroupcommands
\def\itembreak % -10
- {\flushnotes\penalty-5\relax}
+ {\flushnotes\penalty-5\relax}
\def\itemnobreak % +5
- {\flushnotes\penalty+5\ifbinnenkolommen\else00\fi\relax}
+ {\flushnotes\penalty+5\ifbinnenkolommen\else00\fi\relax}
\def\dolistitem % evt aantal items opslaan per niveau, scheelt zoeken
{\iftextitems
- % begin of item
+ % begin of item
\else
\par
\fi
@@ -661,7 +668,7 @@
\fi % verstoord, vandaar \find
\iftwopassdatafound
\ifcase0\twopassdata\relax \twopassdatafoundfalse \fi
- \fi
+ \fi
\iftwopassdatafound
\ifnum\twopassdata=3
\ifnum\noflistelements>1
@@ -689,7 +696,7 @@
{\ifheaditem
\doitemattributes\itemlevel\c!kopletter\c!kopkleur{\listitem}%
\else\ifsymbolitem
- \symsymbol
+ \symsymbol
\else
\doitemattributes\itemlevel\c!letter\c!kleur{\listitem}%
\fi\fi}%
@@ -715,12 +722,12 @@
\ifconditional\inlinelistitem
\hbox to \dimen0{\ifsubitem\llap{+}\fi\box8\hfill}%
\else
- % todo: align+marge binnen de hbox
+ % todo: align+marge binnen de hbox
\llap{\hbox to \dimen0{\ifsubitem\llap{+}\fi\box8\hfill}}%
\fi
\fi
\fi
-\forceunexpanded % needed for m conversion (\os) / i need to look into this
+\forceunexpanded % needed for m conversion (\os) / i need to look into this
\setevalue{\@@currentitemsymbol\itemlevel}%
{\getvalue{\@@localitemsymbol\itemlevel}}% still problems with \uchar ?
%{\noexpand\getvalue{\@@localitemsymbol\itemlevel}}% no, spoils subrefs
@@ -731,6 +738,8 @@
\EveryPar{\ignorespaces}%
\ignorespaces}
+\chardef\autoitemgroupspacing=2 % 0 = voor/na, 1=tussen als geen voor 2=(prev)tussen=old/normal
+
\def\complexdoitemgroupitem[#1]%
{\iftextitems
% begin of item
@@ -759,7 +768,15 @@
\ifparagraphitems \else
\let\previtemlevel\itemlevel
\decrement\previtemlevel
- \getitemparameter\previtemlevel\c!tussen % = itemlevel-1
+ \ifcase\autoitemgroupspacing\relax % nieuw
+ \getitemparameter\itemlevel\c!voor
+ \or
+ \doifelsenothing{\getitemparameter\itemlevel\c!voor}
+ {\getitemparameter\itemlevel\c!voor}
+ {\getitemparameter\previtemlevel\c!tussen}%
+ \else
+ \getitemparameter\previtemlevel\c!tussen % == itemlevel-1
+ \fi
\fi
\fi
\else
@@ -842,8 +859,8 @@
\c!factor=0,
\c!afstand=.5em,
%\c!uitlijnen=\v!normaal, % definitely not \v!normaal, see mails and
- \c!uitlijnen=, % debug reports of David A & Patrick G on context list
- \c!kleur=,
+ \c!uitlijnen=, % debug reports of David A & Patrick G on context list
+ \c!kleur=,
\c!inspringen=, % untouched if empty
\c!kleur=,
\c!letter=, % kan tzt weg
@@ -882,19 +899,19 @@
\getparameters[\??ig#1][\c!niveaus=3,#2]%
\ifnum\getvalue{\??ig#1\c!niveaus}<\maxitemlevel\relax
\letvalue{\??ig#1\c!niveaus}\maxitemlevel
- \fi
+ \fi
\dorecurse{\getvalue{\??ig#1\c!niveaus}}{\initializeitemgrouplevel\recurselevel}%
\popmacro\currentitemgroup}}
-% efficient default itemize as well as upward compatible
-% definition:
+% efficient default itemize as well as upward compatible
+% definition:
\defineitemgroup [\v!itemize] [\c!niveaus=6]
-% keep these, needed for styles:
+% keep these, needed for styles:
-% \def\startitemize {\startitemgroup[\v!itemize]}
+% \def\startitemize {\startitemgroup[\v!itemize]}
% \def\stopitemize {\stopitemgroup}
-% \def\setupitemize {\setupitemgroup[\v!itemize]}
+% \def\setupitemize {\setupitemgroup[\v!itemize]}
\protect \endinput
diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex
index b6ae082e0..f1f296922 100644
--- a/tex/context/base/core-job.tex
+++ b/tex/context/base/core-job.tex
@@ -133,24 +133,32 @@
%
% test \@@svgebied
-\def\loadallsystemfiles#1%
+\def\loadallsystemfiles#1#2%
{\ifx\@@svgebied\empty
- \readsysfile{#1}{\showmessage\m!systems2{#1}}\donothing
- \else
+ \readsysfile{#1}{\showmessage\m!systems2{#1}}{#2}%
+ \else% yet undocumented
\def\doloadsystemfile##1%
- {\readsetfile{##1}{#1}{\showmessage\m!systems2{#1}}\donothing}%
+ {\readsetfile{##1}{#1}{\showmessage\m!systems2{#1}}{#2}}%
\processcommacommand[\@@svgebied]\doloadsystemfile
\fi}
\def\loadsystemfiles
{\reportprotectionstate
\readsysfile\f!newfilename
- {\showmessage\m!systems2\f!newfilename}\donothing
+ {\showmessage\m!systems2\f!newfilename}%
+ \donothing
\readsysfile\f!oldfilename
- {\showmessage\m!systems2\f!oldfilename}\donothing
+ {\showmessage\m!systems2\f!oldfilename}%
+ \donothing
\loadallsystemfiles\f!filfilename
+ \donothing
\loadallsystemfiles\f!sysfilename
- }%\loadallsystemfiles\f!modfilename}
+ {\doglobal\appendtoks
+ \loadallsystemfiles\f!errfilename\donothing
+ \to\everygoodbye}}
+
+ %\loadallsystemfiles\f!modfilename
+ % \donothing}
%D Loading of \type {cont-usr.tex} (edited by the user)
%D and \type {cont-fmt.tex} (generated by texexec).
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
index fae009b7b..3b3a11f3c 100644
--- a/tex/context/base/core-mis.tex
+++ b/tex/context/base/core-mis.tex
@@ -555,6 +555,13 @@
\unexpanded\def\unknown
{\dontleavehmode\punten[3]}
+\def\midboundarycharacter#1#2%
+ {%\nobreak
+ \hskip\hspaceamount\currentlanguage{#2}%
+ \languageparameter#1%
+ %\nobreak
+ \hskip\hspaceamount\currentlanguage{#2}}
+
\def\leftboundarycharacter#1#2%
{\languageparameter#1%
\nobreak
@@ -577,6 +584,10 @@
\definehspace [intersentence] [.250em]
\definesymbol
+ [\c!midsentence]
+ [\midboundarycharacter\c!midsentence{sentence}]
+
+\definesymbol
[\c!leftsentence]
[\leftboundarycharacter\c!leftsentence{sentence}]
@@ -597,6 +608,9 @@
\newsignal \subsentencesignal
\newcounter\subsentencelevel
+\def\midsentence
+ {\symbol[\c!midsentence]}
+
\def\beginofsubsentence
{\ifdim\lastkern=\subsentencesignal
\unskip
diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex
index 60877f953..1cad40c20 100644
--- a/tex/context/base/core-nav.tex
+++ b/tex/context/base/core-nav.tex
@@ -282,21 +282,20 @@
\def\dolocationattributes#1#2#3#4%
{\bgroup
- \doifdefinedelse{#1#2}
- {\def\fontattribute{\getvalue{#1#2}}}
- {\let\fontattribute\empty}%
+ \let\fontattribute\empty
+ \let\colorattribute\empty
+ \doifdefined{#1#2}{\def\fontattribute{\getvalue{#1#2}}}%
\iflocation
- \doifdefinedelse{#1#3}
- {\def\colorattribute{\getvalue{#1#3}}}
- {\let\colorattribute\empty}%
- \else
- \let\colorattribute\empty
+ \doifdefined{#1#3}{\def\colorattribute{\getvalue{#1#3}}}%
\fi
\startcolor[\colorattribute]%
\@EA\doconvertfont\@EA{\fontattribute}{#4}% no \edef, but \@EA here
\stopcolor
\egroup}
+\def\navigating
+ {\dolocationattributes\??ia\c!letter\c!kleur}
+
%D Although not decently supported in current viewers, a
%D provisory hiding mechanims is implemented. Areas marked as
%D such, are visible on screen, but invisible on paper. Don't
diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex
index e7589d82c..daeb346aa 100644
--- a/tex/context/base/core-ntb.tex
+++ b/tex/context/base/core-ntb.tex
@@ -2,33 +2,33 @@
%D [ file=core-ntb,
%D version=2000.04.18,
%D title=\CONTEXT\ Core Macros,
-%D subtitle=Natural Tables,
+%D subtitle=Natural Tables,
%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.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-%D This is an unfinished, preliminary module. At least two
-%D runs are needed to get the table fixed.
+%D This is an unfinished, preliminary module. At least two
+%D runs are needed to get the table fixed.
% optie=rek beschrijven
\writestatus{loading}{Context Core Macros / Natural Tables}
-%D As always, this is the nth version. Much time went in
-%D trying to speed up the many cell calculations, some
-%D optimizations were rejected in order not to complicate this
+%D As always, this is the nth version. Much time went in
+%D trying to speed up the many cell calculations, some
+%D optimizations were rejected in order not to complicate this
%D module too much (and in order to prevail extensibility).
%D To Do:
%D
-%D \starttypen
+%D \starttypen
%D break over pagina
-%D kop herhalen
-%D reset settings
+%D kop herhalen
+%D reset settings
%D
%D \setupTABLE [c|column|x] [nx|odd|even|first|last][a=b]
%D \setupTABLE [r|row |y] [nx|odd|even|first|last][a=b]
@@ -36,24 +36,24 @@
%D \setupTABLE [nx|odd|even|first|last] [a=b]
%D \setupTABLE [a=b]
%D
-%D \bTH \eTH
-%D \stoptypen
+%D \bTH \eTH
+%D \stoptypen
-% the section setup does not work yet, data needs to be stored,
-% i.e.each row should know if it's a head/body/foot, and there
-% should be \setupTABLE[head]... and alike
+% the section setup does not work yet, data needs to be stored,
+% i.e.each row should know if it's a head/body/foot, and there
+% should be \setupTABLE[head]... and alike
\unprotect
-%D A simple way to force equal line spacing is to say:
-%D
-%D \starttypen
+%D A simple way to force equal line spacing is to say:
+%D
+%D \starttypen
%D \def\bTBLCELL{\begstrut}
%D \def\eTBLCELL{\endstrut}
-%D \stoptypen
+%D \stoptypen
%D However, the next alternative also takes care of preceding
-%D and following white space.
+%D and following white space.
\def\bTBLCELL
{\inhibitblank\doconvertfont\tbltblletter\empty\everypar{\begstrut}}
@@ -76,7 +76,7 @@
\def\@@tblprefix{tbl:} \let\@@rawtblprefix\@@tblprefix
-%D This should be done more efficient:
+%D This should be done more efficient:
\def\settbltag#1#2#3{\setevalue{\@@tblprefix#1:#2:s}{#3}} % \number#3
\def\settblcol#1#2#3{\setevalue{\@@tblprefix#1:#2:c}{#3}}
@@ -113,7 +113,7 @@
% \def\settblspn#1#2{\setvalue {\@@tblprefix#1:s}{#2}}
% \def\doiftblspn #1{\doifelsevalue{\@@tblprefix#1:s}{1}}
-\newif\ifsqueezeTBLspan % \squeezeTBLspantrue
+\newif\ifsqueezeTBLspan % \squeezeTBLspantrue
\def\settblspn #1{\setvalue {\@@tblprefix#1:s}{1}}
\def\doifelsetblspn#1{\doifelsevalue{\@@tblprefix#1:s}{1}}
@@ -129,7 +129,7 @@
%\let\doifnottbltag \doifnottbl
%\let\doifelsetbltag\doifelsetbl
-\newtoks\tbltoks
+\newtoks\tbltoks
\let\pushTBLparameters\relax
\let\popTBLparameters \relax
@@ -147,7 +147,7 @@
\def\noftblheadlines{0}
-\presetlocalframed[\@@tbl\@@tbl]
+\presetlocalframed[\@@tbl\@@tbl]
\long\def\handleTBLcell#1#2[#3]{}
@@ -171,6 +171,7 @@
y=>{\dosetupTABLExy[\c!y][#2][#3]},%
x=>{\dosetupTABLExy[\c!x][#2][#3]},%
\v!start=>{\dosetupTABLExy[#1][#2][#3]},%
+ \v!hoofd=>{\dosetupTABLExy[#1][#2][#3]},%
\s!unknown=>{\dosetupTABLEzz[#1][#2][#3]}]%
\else\ifsecondargument
\processaction
@@ -182,17 +183,18 @@
y=>{\dosetupTABLExy[\c!y][\v!elk][#2]},%
x=>{\dosetupTABLExy[\c!x][\v!elk][#2]},%
\v!start=>{\dosetupTABLExy[#1][\v!elk][#2]},%
+ \v!hoofd=>{\dosetupTABLExy[#1][\v!elk][#2]},%
\s!unknown=>{\dosetupTABLEzz[\c!x][#1][#2]}]%
\else
\getparameters[\@@tbl\@@tbl][#1]%
\fi\fi}
-\def\dosetupTABLExy[#1][#2][#3]%
+\def\dosetupTABLExy[#1][#2][#3]%
{\def\dodosetupTABLE##1%
{\setTABLEparameters[#1##1][#3]}%
\processcommalist[#2]\dodosetupTABLE}
-\def\dosetupTABLEzz[#1][#2][#3]%
+\def\dosetupTABLEzz[#1][#2][#3]%
{\def\dodosetupTABLE##1%
{\def\dododosetupTABLE####1%
{\setTABLEparameters[\c!x##1\c!y####1][#3]}%
@@ -218,27 +220,6 @@
\let\setupTBLsection\relax
-% \def\setupTBLcell#1#2% cell over col over row
-% {\setupTBLsection % already forgotten
-% \getvalue{\@@tblprefix\c!y\v!elk}%
-% \getvalue{\@@tblprefix\c!x\v!elk}%
-% \getvalue{\@@tblprefix\c!y\v!oddeven{#1}}%
-% \getvalue{\@@tblprefix\c!x\v!oddeven{#2}}%
-% \getvalue{\@@tblprefix\c!x\v!oddeven{#2}\c!y\v!oddeven{#1}}%
-% \ifnum#1=\plusone \getvalue{\@@tblprefix\c!y\v!eerste }\fi
-% \ifnum#2=\plusone \getvalue{\@@tblprefix\c!x\v!eerste }\fi
-% \ifnum#1=\maximumrow\relax\getvalue{\@@tblprefix\c!y\v!laatste}\fi
-% \ifnum#2=\maximumcol\relax\getvalue{\@@tblprefix\c!x\v!laatste}\fi
-% \ifnum#1=\maximumrow\relax\ifnum#2=\maximumcol\relax
-% \getvalue{\@@tblprefix\c!x\v!laatste\c!y\v!laatste}%
-% \fi\fi
-% \ifnum#1=\plusone \ifnum#2=\plusone
-% \getvalue{\@@tblprefix\c!x\v!eerste\c!y\v!eerste}%
-% \fi\fi
-% \getvalue{\@@tblprefix\c!y#1}%
-% \getvalue{\@@tblprefix\c!x#2}%
-% \getvalue{\@@tblprefix\c!x#2\c!y#1}\relax}
-
\def\setupTBLcell#1#2% cell over col over row
{\setupTBLsection % already forgotten
\getvalue{\@@tblprefix\c!y\v!elk}%
@@ -246,11 +227,11 @@
\getvalue{\@@tblprefix\c!y\v!oddeven{#1}}%
\getvalue{\@@tblprefix\c!x\v!oddeven{#2}}%
\getvalue{\@@tblprefix\c!x\v!oddeven{#2}\c!y\v!oddeven{#1}}%
- \ifnum#1=\plusone
+ \ifnum#1=\plusone
\getvalue{\@@tblprefix\c!y\v!eerste}%
\executeifdefined{\@@tblprefix\c!x#2\c!y\v!eerste}\donothing
\fi
- \ifnum#2=\plusone
+ \ifnum#2=\plusone
\getvalue{\@@tblprefix\c!x\v!eerste}%
\executeifdefined{\@@tblprefix\c!x\v!eerste\c!y#1}\donothing
\fi
@@ -268,16 +249,17 @@
\ifnum#1=\plusone \ifnum#2=\plusone
\getvalue{\@@tblprefix\c!x\v!eerste\c!y\v!eerste}%
\fi\fi
- %\getvalue{\@@tblprefix\c!y#1}%
- %\getvalue{\@@tblprefix\c!x#2}%
- %\getvalue{\@@tblprefix\c!x#2\c!y#1}\relax}
+ \ifnum#1>\noftblheadlines\else
+ \executeifdefined{\@@tblprefix\v!hoofd\v!elk}\donothing
+ \executeifdefined{\@@tblprefix\v!hoofd#2}\donothing
+ \fi
\executeifdefined{\@@tblprefix\c!y#1}\donothing
\executeifdefined{\@@tblprefix\c!x#2}\donothing
\executeifdefined{\@@tblprefix\c!x#2\c!y#1}\donothing
\relax}
-
-%\long\def\parseTR[#1][#2]#3\eTR% [#2] is dummy that kills spaces
-% {\def\currentcol{0}\increment\maximumrow#3}
+
+% \long\def\parseTR[#1][#2]#3\eTR% [#2] is dummy that kills spaces
+% {\def\currentcol{0}\increment\maximumrow#3}
\long\def\parseTR[#1][#2]#3\eTR% [#2] is dummy that kills spaces
{\def\currentcol{0}\increment\maximumrow
@@ -287,7 +269,7 @@
{\getparameters[\@@tbl][\c!ny=\tblnr,\c!nx=\tblnc,nc=1,nr=1,#1]%
% goto first cell
\doloop
- {\increment\currentcol
+ {\increment\currentcol
\doifnottbltag\maximumrow\currentcol\exitloop}%
% fill r*c cells and set span
\let\row\maximumrow
@@ -303,11 +285,11 @@
\increment\col}%
\increment\row}%
% check max column
- \decrement\col
+ \decrement\col
\ifnum\col>\maximumcol\relax
\let\maximumcol\col
\fi
- % set values
+ % set values
\settbltag\maximumrow\currentcol\tblcell
\settblcol\maximumrow\currentcol\tblnx
\settblrow\maximumrow\currentcol\tblny
@@ -330,7 +312,7 @@
\newtoks\TBLbody
\newtoks\TBLfoot
-% to be done: head <raw> foot, dus state var
+% to be done: head <raw> foot, dus state var
\long\def\bTABLEhead{\dosingleempty\doTABLEhead}
\long\def\bTABLEbody{\dosingleempty\doTABLEbody}
@@ -345,7 +327,7 @@
\long\def\doTABLEfoot[#1]#2\eTABLEfoot
{\appendtoks\doTABLEsection[#1]{#2}\to\TBLfoot}
-\long\def\doTABLEsection[#1]#2%
+\long\def\doTABLEsection[#1]#2%
{\def\setupTBLsection{\getparameters[\@@tbl\@@tbl][#1]}%
#2%
\let\setupTBLsection\relax}
@@ -365,20 +347,20 @@
\def\dobTABLE[#1]%
{\pushTBL
- % box not here
+ % box not here
\bgroup
-\resetcharacteralign % new
+\resetcharacteralign % new
\getparameters
[\@@tbl\@@tbl]
[\c!uitlijnen={\v!rechts,\v!ruim,\v!hoog},#1]%
- \processaction
+ \processaction
[\tbltblsplitsen]
[ \v!ja=>\enableTBLbreaktrue,
\v!herhaal=>\enableTBLbreaktrue\multipleTBLheadstrue]%
\ifnum\TBLlevel>\plusone
\vbox
\else\ifenableTBLbreak
- % no \vbox
+ % no \vbox
\else
\vbox
\fi\fi
@@ -402,18 +384,18 @@
% permits \expanded{\bTD ... \eTD}
-\unexpanded\def\eTR{}
+\unexpanded\def\eTR{}
\unexpanded\def\eTD{}
\unexpanded\def\eTH{}
-\unexpanded\def\eTN{}
+\unexpanded\def\eTN{}
\def\eTABLE
{% tricky and dirty order -)
\the\TBLhead
- \edef\noftblheadlines{\number\maximumrow}%
+ \edef\noftblheadlines{\number\maximumrow}%
\the\TBLbody
\the\TBLfoot
- \endgraf
+ \endgraf
% finish cells
\dorecurse\maximumrow
{\let\row\recurselevel
@@ -458,8 +440,8 @@
{\let\col\recurselevel
\doiftblrow\row\col
{\scratchcounter\maximumrow
- \advance\scratchcounter -\row
- \advance\scratchcounter \plusone
+ \advance\scratchcounter -\row
+ \advance\scratchcounter \plusone
\ifnum\gettblrow\row\col>\scratchcounter
\settblrow\row\col{\the\scratchcounter}%
\fi}%
@@ -497,8 +479,8 @@
\def\bTBL{\appendtoks\begintblrow\to\tbltoks}
\def\eTBL{\appendtoks\endtblrow \to\tbltoks}
-% We use aligments to handle the empty (skipped) columns, so
-% that we don't have to (re|)|calculate these.
+% We use aligments to handle the empty (skipped) columns, so
+% that we don't have to (re|)|calculate these.
\def\skiptblcol
{\doglobal\increment\colTBL}
@@ -542,7 +524,7 @@
\doglobal\decrement\rowTBL
\tabskip\zeropoint
\halign\bgroup
- \registerparoptions % new
+ \registerparoptions % new
\ignorespaces##\unskip&&\ignorespaces##\unskip\cr}
\def\endtbl
@@ -553,7 +535,7 @@
\setvalue{\tblcell TBL}#1#2%
{\appendtoks
- \makeTBL{#1}{#2}% % append nog isoleren
+ \makeTBL{#1}{#2}% % append nog isoleren
\to\tbltoks
\spanTBL{#1}{#2}}
@@ -580,20 +562,20 @@
{\strut}}%
\edef\minimalcellheight{\the\ht\scratchbox}%
\dorecurse\maximumcol
- {\settblaut\recurselevel\!!zeropoint % \zeropoint etc
- % new
+ {\settblaut\recurselevel\!!zeropoint % \zeropoint etc
+ % new
\let\xcol\recurselevel
\dorecurse\maximumrow
{\settblwd \recurselevel\xcol\!!zeropoint
\settblht \recurselevel\xcol\!!zeropoint}%
- % till here
+ % till here
\settblwid\recurselevel\!!zeropoint}%
\dorecurse\maximumrow
{\settblhei\recurselevel\maxdimen}%
\chardef\TBLpass\plusone
\let\handleTBLcell\dohandleTBLcellA
\def\makeTBL##1##2%
- {\gettbltxt{##1}{##2}}%
+ {\gettbltxt{##1}{##2}}%
\def\inTBLcell##1##2%
{\ExpandBothAfter\doifinsetelse\localwidth{\v!passend,\v!ruim} % user set
{}
@@ -601,32 +583,32 @@
\ifdim\localwidth>\scratchdimen
\settblaut\colTBL\localwidth
\fi}}%
- \setbox0\vbox{\trialtypesettingtrue \the\tbltoks}%
+ \setbox0\vbox{\trialtypesettingtrue \the\tbltoks}%
\ifautoTBLspread
- % experimental, stretch non fixed cells to \hsize
- \checktblwidthsone % trial run
- \checktblwidthstwo % real run
+ % experimental, stretch non fixed cells to \hsize
+ \checktblwidthsone % trial run
+ \checktblwidthstwo % real run
\stretchtblwidths
\let\handleTBLcell\dohandleTBLcellB
\setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
\else\ifdim\wd0>\hsize
\ifautoTBLhsize
- \checktblwidthsone % trial run
- \checktblwidthstwo % real run
+ \checktblwidthsone % trial run
+ \checktblwidthstwo % real run
\let\handleTBLcell\dohandleTBLcellB
\setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
\fi
- \else\ifautoTBLrowspan\ifnum\maximumrowspan>1 % max ?
- % added jan 2002 because nx=* did no longer work
- \checktblwidthsone % trial run
- \checktblwidthstwo % real run
+ \else\ifautoTBLrowspan\ifnum\maximumrowspan>1 % max ?
+ % added jan 2002 because nx=* did no longer work
+ \checktblwidthsone % trial run
+ \checktblwidthstwo % real run
%
\let\handleTBLcell\dohandleTBLcellC
\setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
\fi\fi\fi\fi
\let\handleTBLcell\dohandleTBLcellD
\chardef\TBLpass2
- \def\makeTBL##1##2% meer in cellD
+ \def\makeTBL##1##2% meer in cellD
{\dimen2\zeropoint
\pushmacro\colTBL
\dorecurse{\gettblcol{##1}{##2}}
@@ -651,12 +633,12 @@
\scratchdimen\zeropoint
\def\rowTBL{##1}%
\ifnum\gettblcol{##1}{##2}=\maximumcol\relax
- % case: nc=maxcolumns
+ % case: nc=maxcolumns
\else
\dorecurse{\gettblrow{##1}{##2}}
{\advance\scratchdimen \gettblhei\rowTBL
\increment\rowTBL}%
- \ifdim\scratchdimen<\gettblht{##1}{##2}\relax
+ \ifdim\scratchdimen<\gettblht{##1}{##2}\relax
\scratchdimen\gettblht{##1}{##2}\relax
\fi
\fi
@@ -666,26 +648,26 @@
\pushmacro\colTBL
\scratchdimen\zeropoint
\dorecurse{\gettblcol{##1}{##2}}
- {\advance\scratchdimen \gettblwid\colTBL
+ {\advance\scratchdimen \gettblwid\colTBL
\increment\colTBL}%
\edef\widthTBL{\the\scratchdimen}%
\popmacro\colTBL
- % cell
+ % cell
\setbox\scratchbox\hbox{\gettbltxt{##1}{##2}}%
\ifnum\gettblcol{##1}{##2}=\maximumcol\relax
- % case: nc=maxcolumns
+ % case: nc=maxcolumns
\else
\scratchdimen\gettblhei{##1}%
\setbox\scratchbox\hbox
{\lower\ht\scratchbox\hbox{\raise\scratchdimen\box\scratchbox}}%
- \ht\scratchbox\scratchdimen
+ \ht\scratchbox\scratchdimen
\fi
\dp\scratchbox\zeropoint
\box\scratchbox}%
\iftraceTABLE\showtbltoks\fi
\ifnum\TBLlevel>\plusone
\vbox{\the\tbltoks}%
- \else\ifenableTBLbreak
+ \else\ifenableTBLbreak
\ifmultipleTBLheads
\setbox\scratchbox\vbox{\the\tbltoks}%
\splittblbox\scratchbox
@@ -708,10 +690,10 @@
\dorecurse\maximumcol
{\scratchdimen\gettblwid\recurselevel
\advance\scratchdimen\!!dimend
- \settblwid\recurselevel{\the\scratchdimen}}%
- \fi}
+ \settblwid\recurselevel{\the\scratchdimen}}%
+ \fi}
-% \def\splittblbox#1% #1 <> 0/2
+% \def\splittblbox#1% #1 <> 0/2
% {\unvbox#1}
\def\splittblbox#1% #1 <> 0/2
@@ -751,9 +733,9 @@
\def\checktblwidthsone{\dochecktblwidths0} % 0 = trial run
\def\checktblwidthstwo{\dochecktblwidths1} % 1 = real run
-\def\dochecktblwidths#1%
+\def\dochecktblwidths#1%
{\iftraceTABLE\showtblwids{B#1}\fi
- \!!dimena\hsize
+ \!!dimena\hsize
\!!counta\zerocount
\dorecurse\maximumcol
{\scratchdimen\gettblaut\recurselevel\relax
@@ -768,7 +750,7 @@
\ifdim\scratchdimen>\zeropoint\relax
\advance\!!dimena -\scratchdimen
\else
- % eigenlijk moet dit alleen als de kolom wordt overspannen door een
+ % eigenlijk moet dit alleen als de kolom wordt overspannen door een
% vorige, maw extra dubbele loop en status var
\advance\!!counta \plusone
\fi
@@ -777,32 +759,32 @@
\ifcase\!!counta \else \divide\!!dimena \!!counta \fi
\dorecurse\maximumcol
{\scratchdimen\gettblwid\recurselevel\relax
- \ifcase#1\relax
+ \ifcase#1\relax
\ifdim\scratchdimen<\!!dimena % take natural width
\settblaut\recurselevel{\the\scratchdimen}%
\fi
\else
- \ifdim\scratchdimen=\zeropoint % auto set width
- \settblwid\recurselevel{\the\!!dimena}%
+ \ifdim\scratchdimen=\zeropoint % auto set width
+ \settblwid\recurselevel{\the\!!dimena}%
\fi
\fi}%
\iftraceTABLE\showtblwids{E#1}\fi}
-\def\checktblheightsone
+\def\checktblheightsone
{\dorecurse\maximumrow
{\let\xrowTBL\recurselevel
\dorecurse\maximumcol
{\let\xcolTBL\recurselevel
- \!!countb=0\gettblrow\xrowTBL\xcolTBL\relax
- % check row span
+ \!!countb=0\gettblrow\xrowTBL\xcolTBL\relax
+ % check row span
\ifnum\!!countb>1
- % current height in row
- \dimen0=\gettblht\xrowTBL\xcolTBL
- % find nearest height in row
- \dimen2=\zeropoint
+ % current height in row
+ \dimen0=\gettblht\xrowTBL\xcolTBL
+ % find nearest height in row
+ \dimen2=\zeropoint
\dorecurse\maximumcol
{\ifnum\recurselevel=\xcolTBL\else
- \!!countc=0\gettblrow\xrowTBL\recurselevel\relax
+ \!!countc=0\gettblrow\xrowTBL\recurselevel\relax
\ifnum\!!countc=\plusone
\dimen4=\gettblht\xrowTBL\recurselevel\relax
\ifdim\dimen2<\dimen4
@@ -811,17 +793,17 @@
\fi
\fi}%
\let\xxrowTBL\xrowTBL
- % calculate cummulative height
- \dimen4=\dimen2
+ % calculate cummulative height
+ \dimen4=\dimen2
\dorecurse{\!!countb}
{\ifnum\xxrowTBL=\xrowTBL\else
- \advance\dimen4 \gettblhei\xxrowTBL
+ \advance\dimen4 \gettblhei\xxrowTBL
\fi
\increment\xxrowTBL}%
% distribute overshoot equally
- \ifdim\dimen4<\dimen0
+ \ifdim\dimen4<\dimen0
\advance\dimen0 -\dimen4
- \divide\dimen0 \!!countb
+ \divide\dimen0 \!!countb
\let\xxrowTBL\xrowTBL
\settblhei\xrowTBL{\the\dimen2}%
\dorecurse{\!!countb}
@@ -835,7 +817,7 @@
\fi
\fi}%
\increment\xxrowTBL}%
- \else\ifdim\dimen4>\dimen0
+ \else\ifdim\dimen4>\dimen0
\settblhei\xrowTBL{\the\dimen2}%
\fi\fi
\fi}}}
@@ -853,7 +835,7 @@
{\vbox
{\forgetall\tttf
\let\begintbl \relax \let\endtbl \relax
- \let\begintblrow\par \let\endtblrow \par
+ \let\begintblrow\par \let\endtblrow \par
\def\nexttblcol {[next]}\def\spantblcol{[span]}
\def\makeTBL##1##2{[##1,##2]}
\the\tbltoks}}
@@ -867,8 +849,8 @@
\edef\alignmentcharacter{\tbltbluitlijnkarakter}%
\ifcase\TBLpass\or
\setfirstpasscharacteralign\checkalignment{#2}% {\strut#2\unskip}%
- \fi % force hsize, so always a second
- \setsecondpasscharacteralign \checkalignment{#2}% {\strut#2\unskip}%
+ \fi % force hsize, so always a second
+ \setsecondpasscharacteralign \checkalignment{#2}% {\strut#2\unskip}%
\ignorespaces}
% \long\def\dohandleTBLcellA#1#2[#3]#4%
@@ -891,26 +873,26 @@
% \settblwd{#1}{#2}{\the\wd\scratchbox}%
% \ifautoTBLcheckwidth
% \ifdim\wd\scratchbox<.75\hsize
-% \ifdim\ht\scratchbox>2\openlineheight % honor width since this can be a
+% \ifdim\ht\scratchbox>2\openlineheight % honor width since this can be a
% \scratchdimen\gettblaut\colTBL\relax % figure or so
% \ifdim\scratchdimen=\zeropoint
% % side effect: when width is set to 0pt,
-% % we can force a span that fits the sum of spans widths
+% % we can force a span that fits the sum of spans widths
% \settblaut\colTBL{\the\scratchdimen}%
% \else\ifdim\wd\scratchbox>\scratchdimen
-% % unless span
+% % unless span
% \settblaut\colTBL{\the\wd\scratchbox}%
-% % to be translated
+% % to be translated
% \writestatus\m!TABLE{no auto width in (\number#1,\number#2)\space\the\wd\scratchbox/\the\hsize}%
% \fi\fi
% \fi
% \fi
-% \fi
+% \fi
% \setbox2\null
% \wd2\wd\scratchbox \ht2\ht\scratchbox \dp2\dp\scratchbox
% \box2}
-% new, needed for icare first col of 'doeltabel', experimental
+% new, needed for icare first col of 'doeltabel', experimental
\long\def\dohandleTBLcellA#1#2[#3]#4%
{\setbox\scratchbox\hbox
@@ -922,7 +904,7 @@
\scratchdimen\gettblwid\colTBL\relax
\ifdim\wd\scratchbox>\scratchdimen
\ifsqueezeTBLspan
- \ifnum0\number\gettblcol{#1}{#2}>1\relax \settblspn\colTBL \fi
+ \ifnum0\number\gettblcol{#1}{#2}>1\relax \settblspn\colTBL \fi
\fi
\doifelsetblspn\colTBL
\donothing{\settblwid\colTBL{\the\wd\scratchbox}}% auto set
@@ -936,21 +918,21 @@
\settblwd{#1}{#2}{\the\wd\scratchbox}%
\ifautoTBLcheckwidth
\ifdim\wd\scratchbox<.75\hsize
- \ifdim\ht\scratchbox>2\openlineheight % honor width since this can be a
+ \ifdim\ht\scratchbox>2\openlineheight % honor width since this can be a
\scratchdimen\gettblaut\colTBL\relax % figure or so
\ifdim\scratchdimen=\zeropoint
% side effect: when width is set to 0pt,
- % we can force a span that fits the sum of spans widths
+ % we can force a span that fits the sum of spans widths
\settblaut\colTBL{\the\scratchdimen}%
\else\ifdim\wd\scratchbox>\scratchdimen
- % unless span
+ % unless span
\settblaut\colTBL{\the\wd\scratchbox}%
- % to be translated
+ % to be translated
\writestatus\m!TABLE{no auto width in (\number#1,\number#2)\space\the\wd\scratchbox/\the\hsize}%
\fi\fi
\fi
\fi
- \fi
+ \fi
\setbox2\null
\wd2\wd\scratchbox \ht2\ht\scratchbox \dp2\dp\scratchbox
\box2}
@@ -960,13 +942,13 @@
{\setupTBLcell{#2}{#3}%
\localframed
[\@@tbl\@@tbl]
- [#4,#1,\c!kader=\v!uit,\c!achtergrond=]
+ [#4,#1,\c!kader=\v!uit,\c!achtergrond=]
{\bTBLCELL#5\eTBLCELL}}%
- \setbox2\null
- \wd2\wd\scratchbox \ht2\ht\scratchbox \dp2\dp\scratchbox
+ \setbox2\null
+ \wd2\wd\scratchbox \ht2\ht\scratchbox \dp2\dp\scratchbox
\ifautoTBLrowspan
\let\rowTBLx\rowTBL\increment\rowTBLx
- \scratchdimen\gettblhei\rowTBLx\relax
+ \scratchdimen\gettblhei\rowTBLx\relax
\ifnum\gettblrow\rowTBLx\colTBL>1 \ifdim\ht\scratchbox>\scratchdimen
\scratchdimen-\scratchdimen \advance\scratchdimen -\ht\scratchbox
\ht2\scratchdimen
@@ -1006,16 +988,16 @@
\long\def\dohandleTBLcellE#1#2[#3]#4%
{\setupTBLcell{#1}{#2}%
- \getparameters[\@@tbl\@@tbl][#3]% to get the color right, the way we
- \color % handle color here prevents interference due to whatsit nodes
+ \getparameters[\@@tbl\@@tbl][#3]% to get the color right, the way we
+ \color % handle color here prevents interference due to whatsit nodes
[\tbltblkleur] % as well as permits local colors to take precedence
- {\ifdim\heightTBL=\zeropoint\relax % case: nc=maxcolumns
- \localframed
+ {\ifdim\heightTBL=\zeropoint\relax % case: nc=maxcolumns
+ \localframed
[\@@tbl\@@tbl]
[\c!kleur=,\c!breedte=\widthTBL]
{\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL}%
\else
- \localframed
+ \localframed
[\@@tbl\@@tbl]
[\c!kleur=,\c!breedte=\widthTBL,\c!hoogte=\heightTBL]
{\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL}%
@@ -1032,15 +1014,15 @@
\c!strut=\v!nee,
\c!karakteruitlijnen=\v!nee,
\c!uitlijnkarakter={,},
- \c!optie=, % \v!rek
+ \c!optie=, % \v!rek
\c!splitsen=\v!nee,
\c!tussenwit=,
\c!maxbreedte=8em]
-%D We have already prepared the previous macros for nesting,
-%D so we only have to pop in the right ones:
+%D We have already prepared the previous macros for nesting,
+%D so we only have to pop in the right ones:
-%D Redefined:
+%D Redefined:
\newcounter\TBLlevel
@@ -1056,11 +1038,11 @@
\def\gettbltxt#1#2%
{\getvalue{\@@tblprefix#1:#2:t}}
-%D New:
+%D New:
\def\pushTBLparameters
{\pushmacro\TBLlevel
- \ifcase\TBLpass
+ \ifcase\TBLpass
% we're just after \bTABLE
\else\ifnum\TBLlevel>\zerocount
\doglobal\increment\TBLlevel\relax
@@ -1075,7 +1057,7 @@
\fi
\doglobal\increment\TBLlevel\relax
\ifnum\TBLlevel>\plusone
- \resetallTABLEparameters
+ \resetallTABLEparameters
\pushmacro\colTBL
\pushmacro\rowTBL
\else
@@ -1094,11 +1076,11 @@
\newconditional\resetTABLEmode \settrue\resetTABLEmode
\def\resetallTABLEparameters% moet genest wel werken
- {\ifnum\TBLlevel>\plusone % in ieder geval
+ {\ifnum\TBLlevel>\plusone % in ieder geval
\ifconditional\resetTABLEmode
- \presetlocalframed % breedte hoogte diepte offset
+ \presetlocalframed % breedte hoogte diepte offset
[\@@tbl\@@tbl]% % achtergrond, achtergrondraster, achtergrondkleur
- % not ok yet
+ % not ok yet
\setupTABLE
[\c!kaderoffset=.5\linewidth,
\c!achtergrondoffset=\v!kader,
@@ -1118,4 +1100,4 @@
\fi
\fi}
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex
index 479146bc5..8b1edaaff 100644
--- a/tex/context/base/core-obj.tex
+++ b/tex/context/base/core-obj.tex
@@ -100,52 +100,28 @@
\blabelgroup
\ifundefined{\r!object#2::#3}%
\elabelgroup \expandafter\dodosetobject
- \else
+ \else % tzt, overload internal referenced objects to save entries
\elabelgroup \expandafter\gobblefivearguments
\fi
{#1}{#2}{#3}}
+\def\resetobject#1#2%
+ {\checkobjectreferences
+ \letbeundefined{\r!object#1::#2}}
+
%D Somehow there is a rounding error problem in either \PDFTEX\
%D or in viewers, or maybe it is conforming the specs. The next
%D variable compensate for it by removing the rather tight
%D clip.
\def\objectoffset{1cm}
+ {}
\def\dodosetobject#1#2#3%
{\bgroup
\inobjecttrue
\dowithnextbox{\dododosetobject{#1}{#2}{#3}\egroup}}
-% \def\dododosetobject#1#2#3%
-% {\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}%
-% %{\the\nextboxwd}{\the\nextboxht}{\the\nextboxdp}}%
-% {\number\nextboxwd}{\number\nextboxht}{\number\nextboxdp}}%
-% \expanded % freeze the dimensions since \dostartobject may use \nextbox
-% {\dostartobject
-% {#2}{#3}{\the\nextboxwd}{\the\nextboxht}{\the\nextboxdp}}%
-% \ifcase#1\relax\else \ifdim\objectoffset>\zeropoint
-% \scratchdimen\objectoffset
-% \edef\width {\the\nextboxwd}%
-% \edef\height{\the\nextboxht}%
-% \edef\depth {\the\nextboxdp}%
-% \setbox\nextbox\vbox spread 2\scratchdimen
-% {\forgetall
-% \vss\hbox spread 2\scratchdimen{\hss\flushnextbox\hss}\vss}%
-% \setbox\nextbox\hbox
-% {\hskip-\scratchdimen\lower\scratchdimen\flushnextbox}%
-% \nextboxwd\width
-% \nextboxht\height
-% \nextboxdp\depth
-% \fi \fi
-% \flushnextbox
-% \dostopobject
-% \elabelgroup}
-
\def\dododosetobject#1#2#3%
{\blabelgroup
\dontshowcomposition % rather fuzzy in \setxvalue ... \hbox
@@ -259,7 +235,11 @@
%D These commands are to be called by the \type{\startobject},
%D \type{\stopobject} and \type{\insertobject} specials.
-\newif\ifobjectreferencing \objectreferencingtrue
+
+\def\objectreferenced{\global\chardef\crossreferenceobject\plusone}
+\def\driverreferenced{\global\chardef\crossreferenceobject\zerocount}
+
+\objectreferenced
\def\checkobjectreferences
{\startnointerference
@@ -268,14 +248,6 @@
\global\let\checkobjectreferences\relax
\stopnointerference}
-% \def\setobjectreferences
-% {\def\objectreference##1##2##3%
-% {\ifundefined{\r!driver##1::##2}%
-% \setxvalue{\r!driver##1::##2}{##3}%
-% \else
-% \showmessage\m!references{31}{[##1 ##2=>##3]}%
-% \fi}}
-
\def\setobjectreferences
{\def\objectreference##1##2##3##4%
{\ifundefined{\r!driver##1::##2}%
@@ -284,63 +256,32 @@
\showmessage\m!references{31}{[##1 ##2=>##3/##4]}%
\fi}}
-% \def\resetobjectreferences
-% {\let\objectreference\gobblethreearguments}
-
\def\resetobjectreferences
{\let\objectreference\gobblefourarguments}
\resetobjectreferences
-% \def\dosetobjectreference#1#2#3%
-% {\checkobjectreferences
-% \blabelgroup
-% \ifobjectreferencing
-% \edef\dowritereference % why not immediate ?
-% {\writeutilitycommand{\objectreference{#1}{#2}{#3}}}%
-% \dowritereference
-% \else
-% \global\objectreferencingtrue
-% \fi
-% \setxvalue{\r!driver#1::#2}{#3}%
-% \elabelgroup}
-
\def\dosetobjectreference#1#2#3%
{\checkobjectreferences
\blabelgroup
- \ifobjectreferencing
+ \ifcase\crossreferenceobject
+ \objectreferenced
+ \else
\edef\dowritereference
{\writeutilitycommand{\objectreference{#1}{#2}{#3}{\noexpand\realfolio}}}%
\dowritereference
- \else
- \global\objectreferencingtrue
\fi
- \ifundefined{\r!driver#1::#2}%
+ %\ifundefined{\r!driver#1::#2}% could have been be replaced !
\setxvalue{\r!driver#1::#2}{{#3}{\noexpand\realfolio}}%
- \fi
+ %\fi % so no test ! ! ! ! (pdftex fails on undefined objects)
\elabelgroup}
\def\dosetdriverreference
{\driverreferenced\dosetobjectreference}
-\def\driverreferenced
- {\global\objectreferencingfalse}
-
\def\defaultobjectreference#1#2{0}
\def\defaultobjectpage #1#2{\realfolio}
-% \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
-% \elabelgroup}
-
\def\dodogetobjectreference#1#2#3#4#5%
{\checkobjectreferences
\blabelgroup
@@ -358,8 +299,8 @@
\def\dogetobjectreferencepage
{\dodogetobjectreference\secondoftwoarguments\defaultobjectpage}
-\def\setobject {\global\objectreferencingfalse\dosetobject1}
-\def\settightobject{\global\objectreferencingfalse\dosetobject0}
+\def\setobject {\driverreferenced\dosetobject1}
+\def\settightobject{\driverreferenced\dosetobject0}
%D \macros
%D {doifobjectfoundelse,doifobjectreferencefoundelse}
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index dee031305..650c38581 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -1597,7 +1597,7 @@
%D possible.
\def\vboxedhairline
- {\bgroup
+ {\bgroup
\dimen2=\ifboxhasoffset \localoffset \else \zeropoint \fi
\dimen4=\dimen2
\advance\dimen4 \ruledlinewidth
@@ -1609,10 +1609,12 @@
\!!depth\zeropoint
\!!width\hsize
\vskip\dimen2}%
- \endgraf\nointerlineskip\endgraf
+ %\endgraf\nointerlineskip\endgraf
+ %\moveleft\dimen4\box0
+ %\endgraf\nointerlineskip\localbegstrut
+ \endgraf\obeydepth\nointerlineskip
\moveleft\dimen4\box0
- \endgraf\nointerlineskip\endgraf
- \localbegstrut
+ \endgraf\nointerlineskip\localbegstrut
\egroup}
\def\hboxedhairline
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index d00732031..cea989e8f 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -11,13 +11,13 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% nummeren per sectieblok implementeren
+% nummeren per sectieblok implementeren
% this module needs a clean up, currently some manipulations
% take place multiple times
% in manual (zie prikkels) : tussen=\blanko is enige hook om
-% met kop-in-hoofd een spatiering af te dwingen
+% met kop-in-hoofd een spatiering af te dwingen
\writestatus{loading}{Context Core Macros / Sectioning}
@@ -65,11 +65,11 @@
\unprotect
-% from now on, internaly numbers are separated by a period
+% from now on, internaly numbers are separated by a period
% and postprocessed on demand
-\def\numberseparator {.} % reasonable default
-\def\sectionseparator{:} % was : but is now -
+\def\numberseparator {.} % reasonable default
+\def\sectionseparator{:} % was : but is now -
\def\@@filterfirstpart [#1::#2]{#1}
\def\@@filtersecondpart [#1::#2]{#2}
@@ -106,14 +106,14 @@
\def\doremoveallprefixes#1.#2%
{\ifx#2\empty
#1\@EA\gobbleuntilrelax
- \else
+ \else
\@EA\doremoveallprefixes
\fi#2}
\def\doremovefirstprefix#1.#2%
{\ifx#2\empty
#1\@EA\gobbleuntilrelax
- \else
+ \else
\@EA\noremovefirstprefix
\fi#2}
@@ -122,12 +122,12 @@
% we need to expand in order to get something separatable
-\def\dohandleheadnumber#1%
+\def\dohandleheadnumber#1%
{\expanded{\separatednumber{#1}}}
-\def\dodochecknummer#1#2#3% will become ugly after speed up
+\def\dodochecknummer#1#2#3% will become ugly after speed up
{\bgroup
- \doifinstringelse{.0}{.#2}
+ \doifinstringelse{.0}{.#2}
{\doifnot{#3}\v!per
{%\debuggerinfo\m!systems{number #1 #3 becomes \getnumbervariable{#1\c!wijze}}%
\setevalue{\@@thenumber{#1}\c!wijze}{#3}% geen \xdef, gaat mis met \subpage
@@ -158,7 +158,7 @@
\dochecknummer{#1}%
\egroup}
-\def\domaakvoorafgaandenummer[#1]% will become ugly after speed up
+\def\domaakvoorafgaandenummer[#1]% will become ugly after speed up
{\bgroup % added
\globallet\voorafgaandenummer\empty
\ifsectienummer
@@ -180,7 +180,7 @@
\def\maakvoorafgaandenummer[#1]%
{\bgroup
- %\ifnum\blocklevel>0
+ %\ifnum\blocklevel>0
%\ifcase\blocklevel\else
\ifdoingblocks
\doifnotvalue{\@@thenumber{#1}\c!blokwijze}\v!nee\setblockcounters
@@ -203,12 +203,12 @@
{\voorafgaandenummer\nummer[#1]}%
\egroup}
-\def\preparethenumber#1#2#3% {\??id#1} \number \result
+\def\preparethenumber#1#2#3% {\??id#1} \number \result
{\doifelsevaluenothing{#1\c!scheider}
{\let\numberseparator\empty
\let#3#2}
{\unexpanded\def\numberseparator{\getvalue{#1\c!scheider}}%
- \edef#3{\@EA\separatednumber\@EA{#2}}}} % hm, etex
+ \edef#3{\@EA\separatednumber\@EA{#2}}}} % hm, etex
\def\lossenummer[#1]%
{\maakhetnummer[#1]%
@@ -219,7 +219,7 @@
% \getvalue{\getvalue{\@@thenumber{#1}\c!plaats}}%
% {\dotextprefix{\getvalue{\@@thenumber{#1}\c!tekst}}\lossenummer[#1]}}
-\def\huidigenummer[#1]% kan tekst hier weg ?
+\def\huidigenummer[#1]% kan tekst hier weg ?
{\dotextprefix{\getvalue{\@@thenumber{#1}\c!tekst}}\lossenummer[#1]}
\def\volgendenummer[#1][#2][#3]%
@@ -384,7 +384,7 @@
% {\doifdefined{\??se#1\c!markering} % skip zero level
% {\fastresetmarkerlist[\getvalue{\??se#1\c!markering}]}%
% \donexttracklevel{#1}}
-%
+%
% \def\resetsectionmarks#1%
% {\doifdefinedelse{\??se#1}
% {\let\donexttrackcommando\doresetsectionmarks
@@ -397,7 +397,7 @@
% \fi
% \donexttracklevel{#1}}
%
-% not sure if the next one is better:
+% not sure if the next one is better:
\def\doresetsectionmarks#1%
{\ifundefined{\??se#1\c!markering}% skip zero level
@@ -408,7 +408,7 @@
\def\resetsectionmarks#1%
{\ifundefined{\??se#1}%
- \fastresetmarker[\hoofdmarkering{#1}]% % redundant \hoofdmarkering
+ \fastresetmarker[\hoofdmarkering{#1}]% % redundant \hoofdmarkering
\else
\let\donexttrackcommando\doresetsectionmarks
\donexttracklevel{#1}%
@@ -423,7 +423,7 @@
% \donexttracklevel{#1}}
%
% nicer
-%
+%
% \def\doresetsectioncounters#1%
% {\resetcounter{\??se#1}%
% \donexttracklevel{#1}}
@@ -512,9 +512,9 @@
\else\ifx\askedlevel\v!vorige
\dosetpreviouslevel\askedlevel
\else\ifx\askedlevel\v!alles
- \global\alllevelstrue
+ \global\alllevelstrue
\else\ifx\askedlevel\v!tekst
- \global\alllevelstrue
+ \global\alllevelstrue
\else
\edef\byaskedlevel{\csname\??by\askedlevel\endcsname}%
\ifx\byaskedlevel\v!tekst
@@ -523,8 +523,8 @@
\dosetotherlevel\askedlevel
\fi
\fi\fi\fi\fi
- % experiment
- \ifx\askedfilter\empty \else
+ % experiment
+ \ifx\askedfilter\empty \else
\xdef\currentlevel{\currentlevel\sectionseparator\askedfilter}%
\fi
\egroup}
@@ -672,13 +672,13 @@
% \let\doifreglevelelse\doifprevlevelelse
% \let\doifblklevelelse\doifprevlevelelse
%
-% we want to be able to overload them globally
+% we want to be able to overload them globally
% This will be reimplmented
%
% {nn}{xx}{yy}
%
-% -> \scan{..}{..}{0} met 0 als sentinel
+% -> \scan{..}{..}{0} met 0 als sentinel
\def\doifnextlevelelse[#1]% !! this one is \let / uti seperator --
{\edef\somesavedlevel{\sectionseparator\@@filterlevelpart[#1]}%
@@ -757,7 +757,7 @@
% \@@sectionconversion{#1}{\@@sectionvalue{#1}}%
% \fi}
%
-% obey eigennummer
+% obey eigennummer
%
% \def\@@shortsectionnumber#1%
% {\@EA\ifx\csname\??se#1\c!eigennummer\endcsname\relax
@@ -789,14 +789,14 @@
\csname\??se#1\c!eigennummer\endcsname
\fi}
-\def\dosetlocalsectieblok#1#2#3% new \edef's
+\def\dosetlocalsectieblok#1#2#3% new \edef's
{\edef\@@sectiontype {#1}%
\edef\@@sectieblok {#2}%
\edef\@@sectieblokken{#3}}
-% beware, the \resetsectionmarks generates some nodes that
-% will result in an additional last page, which needs to be
-% captured at the end
+% beware, the \resetsectionmarks generates some nodes that
+% will result in an additional last page, which needs to be
+% captured at the end
\def\doaroundsectieblok#1%
{\doifvaluesomething{\??sb#1\c!pagina}
@@ -821,7 +821,7 @@
\endgroup}
\def\dostelsectieblokin[#1]% [#2]
- {\getparameters[\??sb#1]}
+ {\getparameters[\??sb#1]}
\def\stelsectieblokin
{\dodoubleargument\dostelsectieblokin}
@@ -872,7 +872,7 @@
%\c!voor=,
%\c!na=,
#3]%
- \expandafter\newif\csname if#2\endcsname % better a mode
+ \expandafter\newif\csname if#2\endcsname % better a mode
\doglobal\increment\currentsectionblock
\setsectieblokomgeving{#1}{}%
\setevalue{\??sb#1}%
@@ -1000,9 +1000,9 @@
{\expanded{\setuptolerance[\getvalue{\??ko#1\c!tolerantie}]}}%
\def\\{\crlf\strut\ignorespaces}}
-\def\localkopsetup{\localheadsetup} % kan tzt weg
+\def\localkopsetup{\localheadsetup} % kan tzt weg
-% todo: make them conditionals:
+% todo: make them conditionals:
\newif\ifplaatskop
\newif\iflegekop
@@ -1010,7 +1010,7 @@
\newif\ifverhoognummer
\newif\ifkopnummer
-% new
+% new
\newconditional\@@resetsubheadnumbers
@@ -1065,7 +1065,7 @@
% \fi}%
%\do##5]}}}%
%
- \def\do####1\relax % :/- clean
+ \def\do####1\relax % :/- clean
{\advance\scratchcounter \minusone
\ifcase\scratchcounter
\xdef\foundsectionnumber{\@@filterheadpart[####1]}%
@@ -1111,7 +1111,7 @@
% {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\@@sectieblok\c!kopconversie}}{#2}}%
% \fi
% \fi}}
-%
+%
% deal with eigennummer
\def\setsomeheadconversion#1#2%
@@ -1145,7 +1145,7 @@
\def \writtenfullsectionnumber {\string\fullsectionnumber}
\def \ignoredfullsectionnumber#1#2#3{#3}
- \let \storedfullsectionnumber \relax
+ \let \storedfullsectionnumber \relax
% \def\expandablefullsectionnumber#1#2#3{#3}
%\unexpanded\def \naturalfullsectionnumber#1#2#3{\sectiebloklabel{#1}{\getvalue{\??cv#2}{#3}}}
%\unexpanded\def \limitedfullsectionnumber#1#2#3{\getvalue{\??cv#2}{#3}}
@@ -1159,7 +1159,7 @@
\unexpanded\def\naturalfullsectionnumber#1#2#3%
{\sectiebloklabel{#1}{\convertnumber{#2}{#3}}}
-
+
\unexpanded\def\limitedfullsectionnumber#1#2#3%
{\convertnumber{#2}{#3}}
@@ -1195,12 +1195,12 @@
% pas met \ExpandFirstAfter op bij twee||taligheid
\ifx\dohandleheadnumber\undefined
- \let\dohandleheadnumber\firstofoneargument
+ \let\dohandleheadnumber\firstofoneargument
\fi
\unexpanded\def\\{\space}
-\def\emptyheadcorrection % experimental, should work
+\def\emptyheadcorrection % experimental, should work
{\iflegekop % well with na=\blanko
\vskip-\lineheight
\dosomebreak\nobreak
@@ -1210,12 +1210,12 @@
\let\localkopprefix\empty
-\def\dodododosomekop#1[#2]#3#4% [ref] {number} {title}
- {\def\currenthead{#1}%
-\let\finalsectionnumber\dofinalsectionnumber % overloaded ungrouped -)
- \unexpanded\def\\{\space}%
+\def\dodododosomekop#1[#2]#3#4% [ref] {number} {title}
+ {\def\currenthead{#1}% dus #1 overal vervangen
+ \let\finalsectionnumber\dofinalsectionnumber % overloaded ungrouped -)
+ \unexpanded\def\\{\space}%
\def\numberseparator{\getvalue{\??ko\currenthead\c!scheider}}%
- \flushingcolumnfloatsfalse % {number} can be \finalsectionnumber
+ \flushingcolumnfloatsfalse % {number} can be \finalsectionnumber
\someheadconversionfalse
\let\fullsectionnumber\limitedfullsectionnumber
\setsectieenkoppeling{#1}%
@@ -1254,11 +1254,13 @@
\verhoognummertrue}]%
\edef\numberheaddistance {\getvalue{\??ko#1\c!afstand}}%
\edef\numberheadalternative{\getvalue{\??ko#1\c!variant}}%
- \dostelkopvariantin[\numberheadalternative]%
+ \doifelsevalue{\??ko:\numberheadalternative}\v!horizontaal
+ \displaysectionheadfalse
+ \displaysectionheadtrue
\ifsectienummer
\doifelsevalue{\??sb\@@sectieblok\c!nummer}\v!ja
{\doifelsevalue{\??ko#1\c!nummer}\v!ja
- \kopnummertrue
+ \kopnummertrue
\kopnummerfalse}
{\kopnummerfalse}%
\else
@@ -1295,7 +1297,7 @@
\setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}%
\let\fullsectionnumber\writtenfullsectionnumber
\doschrijfnaarlijst{\@@koppeling}{\someheadconversion}{#4}{\v!kop}}%
- {\dohandleheadnumber\someheadconversion}% handle is new
+ {\dohandleheadnumber\someheadconversion}% handle is new
{#4}
{\marking[#1]{#4}%
\let\fullsectionnumber\storedfullsectionnumber
@@ -1311,7 +1313,7 @@
\resetsectionmarks\@@sectie
\setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}%
\doschrijfnaarlijst{\@@koppeling}{#3}{#4}{\v!kop}}
- {\sectiebloklabel{#1}{\dohandleheadnumber{#3}}}% handle is new
+ {\sectiebloklabel{#1}{\dohandleheadnumber{#3}}}% handle is new
{#4}
{\marking[#1]{#4}%
\doifelsevalue{\??ko#1\c!eigennummer}\v!ja % rommelig omdat
@@ -1332,10 +1334,10 @@
\doschrijfnaarlijst{\@@koppeling}{}{#4}{\v!kop}}
{#4}
{\marking[#1]{#4}%
- \doifelsevalue{\??ko#1\c!eigennummer}\v!ja % brrr
+ \doifelsevalue{\??ko#1\c!eigennummer}\v!ja % brrr
{\edef\finalsectionnumber{#3}}
{\bepaalkopnummer[#1]}%
-% todo : geen markering (leeg maken)
+% todo : geen markering (leeg maken)
\expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}%
\writesection{#1}{-}{#4}%
\fi
@@ -1348,14 +1350,14 @@
\getvalue{\??ko#1\c!na}%
\fi
\else
- % Whatever future tex's will do with nodes,
+ % Whatever future tex's will do with nodes,
% we assume a node here, because other \c!na=\blanko
% will fail! See 'prikkels'
%
- % so, maybe we need an explicit \kern
- %
- % do nothing / should be vbox to 0pt
- %
+ % so, maybe we need an explicit \kern
+ %
+ % do nothing / should be vbox to 0pt
+ %
\checknexthead\dohandelpaginaafB{#1}% toegevoegd ivm subpaginanr / tug sheets
\setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...]
\ifkopprefix
@@ -1367,7 +1369,7 @@
\let\fullsectionnumber\expandablefullsectionnumber
\xdef\currentheadnumber{\someheadconversion}%
\fi
- \getvalue{\??ko#1\c!tussen}% documenteren, is enige hook
+ \getvalue{\??ko#1\c!tussen}% documenteren, is enige hook
\bgroup
\setsectionlistreference{\@@sectie}{#1}%
\resetsectionmarks\@@sectie
@@ -1394,7 +1396,7 @@
\fi
\fi
\else
- % todo : ref prefix
+ % todo : ref prefix
\ifplaatskop
\checknexthead\handelpaginaaf{#1}%
\setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...]
@@ -1414,12 +1416,12 @@
\getvalue{\??ko#1\c!na}%
\fi
\else
- % do nothing / should be vbox to 0pt
+ % do nothing / should be vbox to 0pt
\checknexthead\handelpaginaaf{#1}%
\setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...]
\getvalue{\??ko#1\c!tussen}%
\forcesectiontolist{#1}{#4}%
- \rawreference\s!sec{#2}{{#3}{\asciititle}}% #3 ?
+ \rawreference\s!sec{#2}{{#3}{\asciititle}}% #3 ?
\marking[#1]{#4}%
\marking[#1\v!nummer]{}%
\writesection{#1}{-}{#4}%
@@ -1432,9 +1434,9 @@
\def\forcesectiontolist#1#2%
{\ifnaarlijst
- % we need to make sure that there is a number set (non
- % zero) else the list mechanism cannot determine the
- % level
+ % we need to make sure that there is a number set (non
+ % zero) else the list mechanism cannot determine the
+ % level
\bgroup
\stelkopnummerin[#1][+1]% traag, wordt \getvalue{\c!volgende...}
\setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}%
@@ -1520,7 +1522,7 @@
\dostartattributes\@@sectie\c!letter\c!kleur\empty
\dontconvertfont
\dostartattributes\@@sectie{#1}{#2}\empty
- \setupinterlinespace
+ \setupinterlinespace
\begstrut\haalmarkering[\hoofdmarkering{#4#3}]\endstrut
\endgraf
\dostopattributes
@@ -1530,15 +1532,15 @@
\chardef\headtimingmode=0
% \chardef\headtimingmode=1
-%
-% Martin Kolarik's problem:
+%
+% Martin Kolarik's problem:
%
% \setuphead[section][command=\doTitle]
-%
+%
% \def\doTitle#1#2%
% {\ruledvbox{\forgetall \hsize=4cm
% \ruledhbox{\ruledvtop{#1}\ruledvtop{#2}}}}
-%
+%
% \section{test test test test test test test test test test
% test test test test test test test}
@@ -1557,15 +1559,15 @@
\setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox
{\headnumbercontentfalse
\resetsystemmode\v!sectienummer
- % less interfering
+ % less interfering
\ifcase\headtimingmode\or#2\fi
% outerside font determines distance
\dosetfontattribute{\??ko#1}\c!letter
- % but we don't want color to influence user commands
-% todo: get the if-else out of it
- \getvalue{\??ko#1\c!commando}
+ % but we don't want color to influence user commands
+% todo: get the if-else out of it
+ \getvalue{\??ko#1\c!commando}
{} % no number
- {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty
+ {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty
\dostartattributes{\??ko#1}\c!tekstletter\c!tekstkleur\empty
\dontconvertfont
\ifdisplaysectionhead
@@ -1575,7 +1577,7 @@
\fi
\ifcase\headtimingmode#2\fi
\getvalue{\??ko#1\c!voorcommando}%
- \placeheadmargintexts{#1}% binnen #3?
+ \placeheadmargintexts{#1}% binnen #3?
\ifdisplaysectionhead
\getvalue{\??ko#1\c!tekstcommando}%
{\setstrut\begstrut#3\endstrut}%
@@ -1587,13 +1589,13 @@
\getvalue{\??ko#1\c!nacommando}%
\ifdisplaysectionhead\endgraf\fi
\dostopattributes
- \dostopattributes}}%
- \fi
+ \dostopattributes}}%
+ \fi
\endheadplacement{#1}{#4}}
\def\doplaatskopnummertekst#1#2#3#4#5% maybe move modes outside box
{\beginheadplacement{#1}%
- \iflegekop % = needed
+ \iflegekop % = needed
\setbox0=\ifvertical\vbox\else\hbox\fi to \zeropoint
{\doiftextelse{#3}
{\setsystemmode \v!sectienummer\headnumbercontenttrue }
@@ -1605,16 +1607,16 @@
{\doiftextelse{#3}
{\setsystemmode \v!sectienummer\headnumbercontenttrue }
{\resetsystemmode\v!sectienummer\headnumbercontentfalse}%
- % less interfering
+ % less interfering
\ifcase\headtimingmode\or#2\fi
% outerside font determines distance
\dosetfontattribute{\??ko#1}\c!letter
- % but we don't want color to influence user commands
+ % 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}%
- \placeheadmargintexts{#1}% binnen #3?
+ \placeheadmargintexts{#1}% binnen #3?
\ifdisplaysectionhead
\getvalue{\??ko#1\c!nummercommando}%
{\setstrut\begstrut#3\endstrut}%
@@ -1632,7 +1634,7 @@
\setupspacing
\fi
\ifcase\headtimingmode#2\fi
- \placeheadmargintexts{#1}% binnen #3?
+ \placeheadmargintexts{#1}% binnen #3?
\ifdisplaysectionhead
\getvalue{\??ko#1\c!tekstcommando}%
{\setstrut\begstrut#4\endstrut}%
@@ -1654,19 +1656,19 @@
\def\beginheadplacement#1%
{\bgroup
- \setsystemmode{#1}% to be documented
+ \setsystemmode{#1}% to be documented
\ifgridsnapping\iftracegridsnapping\showstruts\fi\fi
\gdef\localheaddepth{\strutdp}%
% == \globallet\localheaddepth\strutdp
\everypar\emptytoks % needed indeed
\noindent % ipv \witruimte elders, na \forgetall !
\bgroup
- \doifelsevalue{\??ko#1\c!titeluitlijnen}\v!ja % new
+ \doifelsevalue{\??ko#1\c!titeluitlijnen}\v!ja % new
{\skip0 1\leftskip
\skip2 1\rightskip
\xdef\localheadskip{\the\skip0}%
\forgetall
- \leftskip\skip0
+ \leftskip\skip0
\rightskip\skip2
\setlocalhsize\hsize\localhsize
\forgetbothskips}
@@ -1693,6 +1695,7 @@
\let\headlastlinewidth\!!zeropoint
\snaptogrid[\getvalue{\??ko#1\c!grid}]\hbox
{\hskip\localheadskip
+ \hskip\getvalue{\??ko#1\c!marge}\relax
\iflocation
\ifautocrossdocument
\doifreferencefoundelse{\getvalue{\??ko#1\c!file}::#1}
@@ -1764,7 +1767,7 @@
#1{#2}%
\fi}
-\def\dostelkopnummerin[#1][#2#3]% todo: = (don't reset)
+\def\dostelkopnummerin[#1][#2#3]% todo: = (don't reset)
{\bgroup
\setsectieenkoppeling{#1}%
\doifinstringelse{#2}{+-}
@@ -1791,7 +1794,7 @@
{\bgroup
\edef\huidigekopnummer{#1}%
\doifinsetelse{-}{#1} % br undocumented
- {\removefromcommalist{-}\huidigekopnummer % br
+ {\removefromcommalist{-}\huidigekopnummer % br
\setsectieenkoppeling\huidigekopnummer
\stelsectiein[\@@sectie][\c!vorigenummer=\v!nee]}%
{\setsectieenkoppeling\huidigekopnummer}%
@@ -1804,13 +1807,13 @@
\definecomplexorsimple\kopnummer
-\def\alinea%
+\def\alinea
{\par}
-% nice testcase
+% nice testcase
%
% \setupheads[aligntitle=yes]
-%
+%
% \startnarrower
% \subject{\dorecurse{100}{x }}
% \section{\dorecurse{100}{x }}
@@ -1821,14 +1824,28 @@
% \input tufte \par
% \stopnarrower
-\def\plaatskopalinea#1#2%
+\let\numberheadalternative\v!normaal
+
+\def\defineheadplacement
+ {\dodoubleargument\dodefineheadplacement}
+
+\def\dodefineheadplacement[#1][#2]% #3#4
+ {\setvalue{\??ko:#1}{#2}%
+ \setvalue{\??ko::#1}}
+
+\def\@@placehead
+ {\executeifdefined
+ {\??ko::\numberheadalternative}
+ {\getvalue{\??ko::\v!normaal}}}
+
+\defineheadplacement[\v!alinea][\v!vertikaal]#1#2%
{\vbox
{\localheadsetup
\begstrut\ifheadnumbercontent#1\hskip\numberheaddistance\fi#2}}
-\def\plaatskopnormaal#1#2%
+\defineheadplacement[\v!normaal][\v!vertikaal]#1#2%
{\ifheadnumbercontent
- \setbox0=\hbox{{#1}\hskip\numberheaddistance}%
+ \setbox0\hbox{{#1}\hskip\numberheaddistance}%
\vbox
{\localheadsetup
\hangindent 1\wd0
@@ -1841,7 +1858,7 @@
{\localheadsetup\noindent#2}%
\fi}
-% \def\plaatskopinmarge#1#2%
+% \defineheadplacement[\v!inmarge][\v!vertikaal]#1#2%
% {\vbox
% {\localheadsetup
% \begstrut % but use one \strut here!
@@ -1850,19 +1867,19 @@
% \fi
% {#2}}}
-%\def\plaatskopinmarge#1#2%
-% {\vbox
-% {\scratchdimen\linkermargeafstand
-% \advance\scratchdimen\leftskip
-% \edef\plaatskopinmarge{\the\scratchdimen}% re-use saves hash entry
-% \localheadsetup
-% \begstrut % but use one \strut here!
-% \ifheadnumbercontent
-% \llap{\hbox to 5em{\hfill{#1}\hskip\plaatskopinmarge}}%
-% \fi
-% {#2}}}
+% \defineheadplacement[\v!inmarge][\v!vertikaal]#1#2%
+% {\vbox
+% {\scratchdimen\linkermargeafstand
+% \advance\scratchdimen\leftskip
+% \edef\plaatskopinmarge{\the\scratchdimen}% re-use saves hash entry
+% \localheadsetup
+% \begstrut % but use one \strut here!
+% \ifheadnumbercontent
+% \llap{\hbox to 5em{\hfill{#1}\hskip\plaatskopinmarge}}%
+% \fi
+% {#2}}}
-\def\plaatskopinmarge#1#2%
+\def\placeheadmargin#1#2%
{\vbox
{\localheadsetup
\begstrut % use one \strut here!
@@ -1872,7 +1889,10 @@
\fi
{#2}}}
-\def\plaatskopmidden#1#2%
+\defineheadplacement[\v!inmarge][\v!vertikaal]#1#2{\placeheadmargin{#1}{#2}}
+\defineheadplacement[\v!marge] [\v!vertikaal]#1#2{\placeheadmargin{#1}{#2}}
+
+\defineheadplacement[\v!midden][\v!vertikaal]#1#2%
{\vbox
{\localheadsetup
\veryraggedcenter
@@ -1880,12 +1900,27 @@
\let\crlf\endgraf
\ifheadnumbercontent\strut#1\par\fi\begstrut#2}}
-\def\plaatskopintekst#1#2%
+\defineheadplacement[\v!tekst][\v!horizontaal]#1#2%
{\bgroup
\localheadsetup % no stretch in distance
\ifheadnumbercontent{#1}\kern\numberheaddistance\fi{\begstrut#2}%
\egroup}
+\def\placeheadlohi#1#2#3%
+ {\ifheadnumbercontent
+ \setbox0\hbox{#2}
+ \setbox2#1{\localheadsetup\advance\hsize-\wd0\relax#3}%
+ \hbox{\box0\hskip\numberheaddistance\box2}%
+ \else
+ #1{\localheadsetup\noindent#3}%
+ \fi}
+
+% onder/boven lijnt het nummer op de onderste/bovenste regel
+% uit van een meerregelige kop
+
+\defineheadplacement[\v!onder][\v!vertikaal]#1#2{\placeheadlohi\vbox{#1}{#2}}
+\defineheadplacement[\v!boven][\v!vertikaal]#1#2{\placeheadlohi\vtop{#1}{#2}}
+
% default == instellingen
% koppeling == koppen, breaks, marks, enz.
% sectie == nummering
@@ -1925,7 +1960,7 @@
\c!resetnummer=\v!ja,
\c!verhoognummer=\v!ja,
\c!variant=\@@kovariant,
- \c!commando=\@@plaatskop,
+ \c!commando=\@@placehead,
\c!scheider=\@@koscheider,
\c!uitlijnen=\@@kouitlijnen,
\c!titeluitlijnen=\@@kotiteluitlijnen,
@@ -1935,6 +1970,7 @@
\c!expansie=,
\c!grid=,
\c!margetekst=,
+ \c!marge=\@@komarge,
#2]%
\ConvertToConstant\doifnot{#1}{\getvalue{\??ko#1\c!default}}
{\doifsomething{\getvalue{\??ko#1\c!default}}
@@ -1944,19 +1980,19 @@
\c!hoofd,\c!tekst,\c!voet,\c!scheider,\c!resetnummer,
\c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer,
\c!letter,\c!kleur,\c!afstand,\c!variant,\c!springvolgendein,
- % new per 20/03/3002 (o-pbu-l) / was too confusing
- % \c!nummerletter,\c!tekstletter,\c!expansie,
- % again too confusing
+ % new per 20/03/3002 (o-pbu-l) / was too confusing
+ % \c!nummerletter,\c!tekstletter,\c!expansie,
+ % again too confusing
\c!uitlijnen,\c!titeluitlijnen,\c!tolerantie,\c!grid,
- \c!nummercommando,\c!tekstcommando,\c!margetekst]}}%
+ \c!nummercommando,\c!tekstcommando,\c!margetekst,\c!marge]}}%
\getparameters[\??ko#1][#2]%
\doifsomething{\getvalue{\??ko#1\c!sectie}}
{\doifelsemarking{#1}% \doifundefined{\??mk#1}
- {}% marking #1 already defined
+ {}% marking #1 already defined
{\definieermarkering[#1]%
\koppelmarkering[#1][\getvalue{\??ko#1\c!sectie}]%
\definieermarkering[#1\v!nummer]%
-% klopt dit wel ?
+% klopt dit wel ?
\koppelmarkering[#1\v!nummer][\getvalue{\??ko#1\c!sectie}]}}%
% \koppelmarkering[#1\v!nummer][\getvalue{\??ko#1\c!sectie}\v!nummer]}}%
\doifundefined{\??li#1}{\definieerlijst[#1]}}
@@ -1970,11 +2006,11 @@
\c!hoofd,\c!tekst,\c!voet,\c!resetnummer,
\c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer,
\c!letter,\c!kleur,\c!afstand,\c!variant,\c!springvolgendein,
- % new per 20/03/3002 (o-pbu-l) / was too confusing
- % \c!nummerletter,\c!tekstletter,\c!expansie,
- % again too confusing
+ % new per 20/03/3002 (o-pbu-l) / was too confusing
+ % \c!nummerletter,\c!tekstletter,\c!expansie,
+ % again too confusing
\c!uitlijnen,\c!titeluitlijnen,\c!tolerantie,\c!grid,
- \c!nummercommando,\c!tekstcommando,\c!margetekst]%
+ \c!nummercommando,\c!tekstcommando,\c!margetekst,\c!marge]%
\getparameters[\??ko#1][\c!expansie=]% iig een value, rather fuzzy
\definieermarkering[#1][#2]%
\definieermarkering[#1\v!nummer][#2\v!nummer]%
@@ -2001,7 +2037,7 @@
% set \c!commando to nothing and (quite natural) got the
% wrong references etc. The whole bunch should be boxed!
\expandafter\convertcommand\csname\??ko#1\c!commando\endcsname\to\ascii
- \doifnothing\ascii{\setvalue{\??ko#1\c!commando}{\@@plaatskop}}}
+ \doifnothing\ascii{\setvalue{\??ko#1\c!commando}{\@@placehead}}}
\def\stelkopin
{\dodoubleargumentwithset\dostelkopin}
@@ -2009,24 +2045,9 @@
\newif\ifsectienummer \sectienummertrue
\newif\ifdisplaysectionhead \displaysectionheadtrue
-\def\@@plaatskop{\plaatskopnormaal}
-
-\def\dostelkopvariantin[#1]% will be installable ! ! ! ! ! !
- {\displaysectionheadtrue
- \processaction
- [#1]
- [ \v!normaal=>\def\@@plaatskop{\plaatskopnormaal},
- \v!midden=>\def\@@plaatskop{\plaatskopmidden},
- \v!marge=>\def\@@plaatskop{\plaatskopinmarge},
- \v!inmarge=>\def\@@plaatskop{\plaatskopinmarge},
- \v!tekst=>\def\@@plaatskop{\plaatskopintekst}\displaysectionheadfalse,
- \v!alinea=>\def\@@plaatskop{\plaatskopalinea},
- \s!unknown=>\def\@@plaatskop{\plaatskopnormaal}]}
-
\def\dostelkoppenin[#1]%
{\getparameters[\??ko][#1]%
- \doifelse{\@@kosectienummer}\v!ja\sectienummertrue\sectienummerfalse
- \dostelkopvariantin[\@@kovariant]} % not really needed here
+ \doifelse{\@@kosectienummer}\v!ja\sectienummertrue\sectienummerfalse}
\def\stelkoppenin
{\dosingleargument\dostelkoppenin}
@@ -2056,6 +2077,7 @@
\c!titeluitlijnen=,
\c!tolerantie=,
\c!springvolgendein=\v!nee,
+ \c!marge=\zeropoint,
\c!commando=]
\definieersectieblok [\v!hoofdtekst] [\v!hoofdteksten] [\c!nummer=\v!ja]
@@ -2176,7 +2198,7 @@
\stelkopin
[\v!deel,\v!hoofdstuk]
[%\c!uitlijnen=,
- %\c!springvolgendein=\v!nee,
+ %\c!springvolgendein=\v!nee,
\c!doorgaan=\v!nee,
\c!pagina=\v!rechts,
\c!hoofd=,
@@ -2237,7 +2259,7 @@
[\c!variant=\v!enkelzijdig,
\c!plaats={\v!hoofd,\v!midden},
\c!conversie=\v!cijfers,
- \c!breedte=, % in geval van \v!kantlijn
+ \c!breedte=, % in geval van \v!kantlijn
\c!links=,
\c!rechts=,
\c!wijze=\v!per\v!deel,
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index 3c231c6b6..34c40bf95 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -869,7 +869,7 @@
\def\nietinspringen{\inspringen[\v!nee,\v!volgende]}
\def\welinspringen {\inspringen[\v!ja,\v!eerste]}
-\def\dochecknextindentation#1% internal one
+\def\dochecknextindentation#1% internal one
{\checknextindentation[\getvalue{#1\c!springvolgendein}]}
\def\checknextindentation[#1]%
@@ -881,7 +881,7 @@
\def\doindentation% too simple
{\gdef\checkindentation{\global\indentationtrue}}
-\ifx\autoindentation\undefined
+\ifx\autoindentation\undefined
\let\autoindentation\relax
\fi
@@ -923,7 +923,7 @@
\def\removelastspace{\ifhmode\unskip\fi}
\def\nospace {\removelastspace\ignorespaces}
-% in tables we need:
+% in tables we need:
%
% \def\fixedspace {\hskip.5em\relax}
%
@@ -933,9 +933,9 @@
{\setbox\scratchbox\hbox\ifmmode{$0$}\else{0}\fi
\hskip\wd\scratchbox\relax}
-\def\fixedspaces
+\def\fixedspaces
{\catcode`\~=\@@active
- \def~{\fixedspace}}
+ \def~{\fixedspace}}
% \def\removeunwantedspaces{\ifhmode\unskip\unskip\unskip\unskip\unskip\fi}
@@ -1351,9 +1351,6 @@
\def\verticalstrut {\normalvbox{\hsize\zeropoint\strut}}
\def\horizontalstrut{\normalhbox {\strut}}
-\def\showstruts
- {\setteststrut}
-
% Hieronder volgen enkele instellingen en macro's ten behoeve
% van de interlinie en \strut. De waarden 2.8, 0.07, 0.72 en
% 0.28 zijn ooit eens ontleend aan INRS-TEX en moeten wellicht
@@ -1545,18 +1542,18 @@
% \dosetstrut}
\def\setstrut
- {\strutdimen\normallineheight
- \strutdimen\strutheightfactor\strutdimen
- \strutdimen\spacingfactor\strutdimen
- \edef\strutheight{\the\strutdimen}%
- \strutdimen\normallineheight
+ {\strutdimen\normallineheight
+ \strutdimen\strutheightfactor\strutdimen
+ \strutdimen\spacingfactor\strutdimen
+ \edef\strutheight{\the\strutdimen}%
+ \strutdimen\normallineheight
\ifgridsnapping
- \advance\strutdimen-\strutheight
+ \advance\strutdimen-\strutheight
\else
- \strutdimen\strutdepthfactor\strutdimen
- \strutdimen\spacingfactor\strutdimen
+ \strutdimen\strutdepthfactor\strutdimen
+ \strutdimen\spacingfactor\strutdimen
\fi
- \edef\strutdepth{\the\strutdimen}%
+ \edef\strutdepth{\the\strutdimen}%
\dosetstrut}
\def\setcharstrut#1%
@@ -1587,8 +1584,8 @@
\advance\struttotal\strutdp}
%D The dimen \type {\struttotal} holds the exact size of the
-%D strut; occasionally a one scaled point difference can show
-%D up with the lineheight.
+%D strut; occasionally a one scaled point difference can show
+%D up with the lineheight.
%D Sometimes a capstrut comes in handy
%D
@@ -1618,7 +1615,7 @@
{\def\strutwidth{.8pt}%
\setstrut}
-% simple version
+% simple version
%
% \def\begstrut
% {\relax\ifcase\strutht\else
@@ -1627,7 +1624,7 @@
% \normalhskip\zeropoint
% \ignorespaces
% \fi}
-%
+%
% \def\endstrut
% {\relax\ifhmode\ifcase\strutht\else
% \removeunwantedspaces
@@ -1636,10 +1633,10 @@
% \strut
% \fi\fi}
-% when enabled, sigstruts will remove themselves if nothing
+% when enabled, sigstruts will remove themselves if nothing
% goes inbetween
-\newsignal\strutsignal \setfalse\sigstruts
+\newsignal\strutsignal \setfalse\sigstruts
\def\begstrut
{\relax\ifcase\strutht\else
@@ -1659,7 +1656,7 @@
\def\endstrut
{\relax\ifhmode\ifcase\strutht\else
\ifconditional\sigstruts
- \ifdim\lastskip=\strutsignal
+ \ifdim\lastskip=\strutsignal
\unskip\unskip\unpenalty\setbox\scratchbox\lastbox
\else
\normalpenalty\@M % \!!tenthousand
@@ -1856,22 +1853,38 @@
\def\rbox{\lrcbox\raggedright}
\def\cbox{\lrcbox\raggedcenter}
+\def\iobox#1#2#3#% here #3# is not really needed
+ {\vbox\bgroup % we want to return a vbox like the others
+ \hbox\bgroup% we need to pack the signal with the box
+ \signalrightpage
+ \dowithnextboxcontent
+ {\let\\=\endgraf\forgetall\doifrightpageelse#1#2}
+ {\box\nextbox\egroup\egroup}
+ \vbox#3}
+
+\def\obox{\iobox\raggedleft \raggedright} % outerbox
+\def\ibox{\iobox\raggedright\raggedleft} % innerbox
+
\def\dosetraggedvbox#1%
{\processaction
[#1]
[ \v!links=>\let\raggedbox\lbox,
\v!rechts=>\let\raggedbox\rbox,
\v!midden=>\let\raggedbox\cbox,
+ \v!binnen=>\let\raggedbox\ibox,
+ \v!buiten=>\let\raggedbox\obox,
\v!nee=>\def\raggedbox{\vbox\bgroup\raggedright\let\next=},
\s!default=>\let\raggedbox\vbox,
\s!unknown=>\let\raggedbox\vbox]}
\def\dosetraggedhbox#1%
- {\processaction
+ {\processaction % slow
[#1]
- [ \v!links=>\let\raggedbox\regellinks,
- \v!rechts=>\let\raggedbox\regelrechts,
- \v!midden=>\let\raggedbox\regelmidden,
+ [ \v!links=>\def\raggedbox{\doregelplaats\v!links },
+ \v!rechts=>\def\raggedbox{\doregelplaats\v!rechts},
+ \v!midden=>\def\raggedbox{\doregelplaats\v!midden},
+ \v!binnen=>\def\raggedbox{\doregelplaats\v!binnen},
+ \v!buiten=>\def\raggedbox{\doregelplaats\v!buiten},
\v!normaal=>\let\raggedbox\hbox,
\s!default=>\let\raggedbox\hbox,
\s!unknown=>\let\raggedbox\hbox]}
@@ -1984,11 +1997,18 @@
\setvalue{\@@ragged@@command\v!normaal}%
{\let\raggedcommand\notragged}
+
+\setvalue{\@@ragged@@command\v!binnen}% not yet perfect
+ {\signalrightpage % may interfere
+ \getvalue{\@@ragged@@command\doifrightpageelse\v!rechts\v!links}}
+
+\setvalue{\@@ragged@@command\v!buiten}% not yet perfect
+ {\signalrightpage % may interfere
+ \getvalue{\@@ragged@@command\doifrightpageelse\v!links\v!rechts}}
% Nodig i.v.m. inspringen eerste alineas
-\def\explicithmode%
- {\unhbox\voidb@x}
+\def\explicithmode{\unhbox\voidb@x}
% Nodig voor gebruikers
@@ -2754,16 +2774,18 @@
\chardef\alignstrutmode=1
+% see later for the real definition, which in the simple case is:
+
\def\doalignline#1#2% \\ == newline
- {\bgroup
- \setlocalhsize % new
- \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
- \dowithnextbox
- {\noindent
- \hbox to \localhsize
- {\ifcase\alignstrutmode\or\strut\fi
- #1\unhbox\nextbox#2}\egroup}
- \hbox}
+ {\bgroup
+ \setlocalhsize % new
+ \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
+ \dowithnextbox
+ {\noindent
+ \hbox to \localhsize
+ {\ifcase\alignstrutmode\or\strut\fi
+ #1\unhbox\nextbox#2}\egroup}
+ \hbox}
% directe commando's
@@ -2783,20 +2805,60 @@
%D Experimental:
-\def\doxalignline#1#2%
+% simple version
+%
+% \def\doxalignline#1#2%
+% {\bgroup
+% \setlocalhsize
+% \def\\{\egroup\par\doxalignline{#1}{#2}\bgroup}% inefficient
+% \dowithnextbox
+% {\noindent\hbox to \localhsize
+% {\ifcase\alignstrutmode\or\strut\fi
+% \signalrightpage
+% \doifrightpageelse{#1\unhbox\nextbox#2}{#2\unhbox\nextbox#1}}%
+% \egroup}
+% \hbox}
+%
+% \setvalue{\s!do\v!regel\v!binnen}{\doxalignline\relax\hss}
+% \setvalue{\s!do\v!regel\v!buiten}{\doxalignline\hss\relax}
+%
+% more extensive:
+
+\def\doxalignline#1#2#3#4#5#6%
{\bgroup
\setlocalhsize
- \def\\{\egroup\par\doxalignline{#1}{#2}\bgroup}% inefficient
+ \def\\{\egroup\par\doxalignline#1#2#3#4#5#6\bgroup}% inefficient
\dowithnextbox
- {\noindent\hbox to \localhsize
- {\ifcase\alignstrutmode\or\strut\fi
- \signalrightpage
- \doifrightpageelse{#1\unhbox\nextbox#2}{#2\unhbox\nextbox#1}}%
- \egroup}
+ {\noindent
+ \hbox to \localhsize
+ {#1\hskip\ifdone#2\else#3\fi#4%
+ \hbox to \localhsize
+ {\ifcase\alignstrutmode\or\strut\fi
+ \ifdone#5\unhbox\nextbox#6\else#6\unhbox\nextbox#5\fi}%
+ \hss}%
+ \egroup}
\hbox}
-\setvalue{\s!do\v!regel\v!binnen}{\doxalignline\relax\hss}
-\setvalue{\s!do\v!regel\v!buiten}{\doxalignline\hss\relax}
+\def\doxcheckline
+ {\signalrightpage\doifrightpageelse\donetrue\donefalse}
+
+\setvalue{\s!do\v!regel\v!binnen }{\doxalignline\doxcheckline++\zeropoint \relax\hss }
+\setvalue{\s!do\v!regel\v!buiten }{\doxalignline\doxcheckline++\zeropoint \hss \relax}
+\setvalue{\s!do\v!regel\v!binnenmarge }{\doxalignline\doxcheckline-+\innermargintotal\relax\hss }
+\setvalue{\s!do\v!regel\v!buitenmarge }{\doxalignline\doxcheckline+-\outermargintotal\hss \relax}
+\setvalue{\s!do\v!regel\v!binnenrand }{\doxalignline\doxcheckline-+\inneredgetotal \relax\hss }
+\setvalue{\s!do\v!regel\v!buitenrand }{\doxalignline\doxcheckline+-\outeredgetotal \hss \relax}
+\setvalue{\s!do\v!regel\v!rugwit }{\doxalignline\doxcheckline-+\rugwit \relax\hss }
+\setvalue{\s!do\v!regel\v!snijwit }{\doxalignline\doxcheckline+-\snijwit \hss \relax}
+
+\setvalue{\s!do\v!regel\v!linkermarge }{\doxalignline\donefalse --\leftmargintotal \hss \relax}
+\setvalue{\s!do\v!regel\v!rechtermarge}{\doxalignline\donefalse ++\rightmargintotal\relax\hss }
+\setvalue{\s!do\v!regel\v!linkerrand }{\doxalignline\donefalse --\leftedgetotal \hss \relax}
+\setvalue{\s!do\v!regel\v!rechterrand }{\doxalignline\donefalse ++\rightedgetotal \relax\hss }
+
+% ! ! ! beware, redefining \doalignline gives the wrong results ! ! !
+%
+% \def\doalignline{\doxalignline\donefalse++\zeropoint}
%D Better:
@@ -2895,14 +2957,14 @@
%D can be redefined as:
%D
%D \starttypen
-%D \def\strut%
+%D \def\strut
%D {\relax\ifmmode\else\hskip0pt\fi\copy\strutbox}
%D \stoptypen
%D
%D Or more compatible:
%D
%D \starttypen
-%D \def\strut%
+%D \def\strut
%D {\relax\ifmmode
%D \copy\strutbox
%D \else
@@ -2913,6 +2975,64 @@
%D In \CONTEXT\ however we save some processing time by putting
%D an extra \type{\hbox} around the \type{\strutbox}.
+% moved from page-lin.tex to here (due to visualization added
+% in august 2003)
+%
+% \unexpanded \def\crlf
+% {\ifhmode\unskip\else\strut\fi\ifcase\raggedstatus\hfil\fi\break}
+
+\unexpanded \def\crlf
+ {\ifhmode
+ \unskip
+ \prewordbreak\crlfplaceholder
+ \ifcase\raggedstatus\hfil\or\or\or\hfil\fi
+ \break
+ \else
+ \crlfplaceholder
+ \endgraf
+ \fi}
+
+\def\crlfplaceholder
+ {\strut}
+
+\def\settestcrlf
+ {\def\crlfplaceholder
+ {\hbox to \zeropoint
+ {\strut{\infofont\kern.25em}\lohi{\infofont CR}{\infofont LF}\hss}}}
+
+%D \starttyping
+%D % \setuplayout[grid=yes] \showgrid
+%D
+%D \startbuffer
+%D test 1\crlf
+%D test 2\crlf
+%D
+%D \crlf test 3
+%D
+%D test 4\crlf
+%D test 5
+%D
+%D \crlf
+%D \crlf
+%D \crlf
+%D test 6
+%D \stopbuffer
+%D
+%D \hbox
+%D {\hsize5em
+%D \ruledvtop{\getbuffer}\enspace
+%D \ruledvtop{\showstruts\getbuffer}\enspace
+%D \hsize15em \setuptyping[before=,after=]%
+%D \ruledvtop{\typebuffer}}
+%D \stoptyping
+
+\def\opeenregel % to be used grouped
+ {\def\crlf{\removelastspace\space}\let\\\crlf}
+
+\def\showstruts
+ {\setteststrut
+ \settestcrlf}
+
\def\definehspace
{\dotripleempty\dodefinehspace}
@@ -3005,8 +3125,8 @@
\dostopgraphicgroup}}%
\vbox}
-%D This works only in a properly strutted line, and is meant
-%D for deeply burried operations, like in heads.
+%D This works only in a properly strutted line, and is meant
+%D for deeply burried operations, like in heads.
\def\fakedvadjust
{\dowithnextbox
diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex
index 7a1a00671..035f9dc15 100644
--- a/tex/context/base/core-tab.tex
+++ b/tex/context/base/core-tab.tex
@@ -1065,7 +1065,7 @@
%D calculations. Although not explicitly needed, one can
%D predefine a tablehead as well as a tail. Each table fragment
%D is preceded by such a head and ends with a tail. This means
-%D that, in order to determine the available heigth, we have to
+%D that, in order to determine the available height, we have to
%D take the head and tail into account. Because we want to
%D support captions too, we will also reserve some space for
%D those later on.
diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex
index b0a11202c..8fddf2ec5 100644
--- a/tex/context/base/core-tbl.tex
+++ b/tex/context/base/core-tbl.tex
@@ -100,6 +100,11 @@
% \HR : rule with lineheight
+% \autotabulaterule : with lineheight, not first/last
+% \autotabulateline : spaced, not first/last
+% \tabulaterule : with lineheight
+% \tabulateline : spaced
+
% tricky: align scans ahead, over # and expands ones before
% while doing
@@ -578,11 +583,11 @@
[\??tt#1::][\??tt\v!tabulate::]%
[\c!kader,\c!afstand,\c!eenheid,\c!voor,\c!korps,\c!na,
\c!binnen,\c!inspringen,\c!marge,\c!uitlijnen,
- \c!lijnkleur,\c!lijndikte,EQ]}%
+ \c!lijnkleur,\c!lijndikte,\c!splitsen,EQ]}%
\copyparameters
[\??tt#1::#2][\??tt#1::]%
[\c!eenheid,\c!afstand,\c!voor,\c!korps,\c!na,
- \c!binnen,\c!inspringen,\c!kader,
+ \c!binnen,\c!inspringen,\c!kader,\c!splitsen,
\c!marge,\c!uitlijnen,\c!lijnkleur,\c!lijndikte,EQ]%
\setvalue{\e!start#1::#2}{\dofinalstarttabulate[#1][#2][#3]}%
\setvalue{\e!start#1}{\bgroup\dosubstarttabulate[#1]}%
@@ -650,11 +655,17 @@
\TABLEnoalign{\global\setfalse\tabulatesomeamble}}%
\fi}
+% \def\fulltabulatecontent
+% {\tabulateheadcontent
+% \tabulatecontent
+% \tabulatetailcontent}
+
\def\fulltabulatecontent
{\tabulateheadcontent
\tabulatecontent
- \tabulatetailcontent}
-
+ \tabulatetailcontent
+ \removefunnytabulateline}
+
\setvalue{\e!start\v!tabulatehead}%
{\dosingleempty\dostartstarttabulatehead}
@@ -711,6 +722,8 @@
\resetcharacteralign
% todo: spacing around tabulate when bodyfont is set
% expansion en test needed ?
+ \doifelsevalue{\??tt\currenttabulate\c!splitsen}\v!ja
+ \splittabulatetrue\splittabulatefalse
\doifvaluesomething{\??tt\currenttabulate\c!korps}
{\expanded{\switchtobodyfont
[\getvalue{\??tt\currenttabulate\c!korps}]}}%
@@ -792,10 +805,10 @@
{\let#1\tabulateautocolumn
\let\\\tabulateautocolumn}
-%\def\tabulateruleseperator
+%\def\dotabulateruleseperator
% {\vskip\strutdp}
-\def\tabulateruleseperator
+\def\dotabulateruleseperator
{\bgroup
\let\factor\!!plusone
\scratchskip\strutdp
@@ -813,7 +826,7 @@
\ifconditional\tabulatesomeamble\kern\else\vskip\fi\scratchdimen % new
\egroup}
-% \def\tabulaterule
+% \def\dotabulaterule
% {\color
% [\getvalue{\??tt\currenttabulate\c!lijnkleur}]
% {\scratchdimen\getvalue{\??tt\currenttabulate\c!lijndikte}%
@@ -821,23 +834,24 @@
% \doifvalue{\??tt\currenttabulate\c!afstand}\v!grid
% {\kern-\scratchdimen}}} % experimental tm-prikkels
-\def\dotabulaterule#1%
+\def\dodotabulaterule#1%
{\color
[\getvalue{\??tt\currenttabulate\c!lijnkleur}]
{\scratchdimen\getvalue{\??tt\currenttabulate\c!lijndikte}#1}}
-\def\tabulaterule
- {\dotabulaterule
+\def\dotabulaterule
+ {\dodotabulaterule
{\hrule\!!height.5\scratchdimen\!!depth.5\scratchdimen\relax
\doifvalue{\??tt\currenttabulate\c!afstand}\v!grid
{\kern-\scratchdimen}}} % experimental tm-prikkels
-\def\tabulateline
+\def\dotabulatelinerule
{\multispan\totaltabulatecolumns % \multispan is a plain macro
% for the moment this one
\strut\hskip\getvalue{\??tt\currenttabulate\c!marge}%
% neg values are ok !
- \dotabulaterule
+ \hskip\tabulateindent % new august 2003
+ \dodotabulaterule
{\!!heighta.5\lineheight
\advance\!!heighta-\strutdepth
\!!deptha-\!!heighta
@@ -895,6 +909,263 @@
%D cum suis, since \TEX's hard coded noalign lookahead fails
%D on it! I mistakenly added this for a while.
+% \def\processtabulate[|#1|]% in the process of optimizing
+% {\tabulateunit\getvalue{\??tt\currenttabulate\c!eenheid}%
+% \checkfulltabulatecontent
+% \ExpandFirstAfter\processaction % use \setalignmentswitch instead
+% [\getvalue{\??tt\currenttabulate\c!uitlijnen}]
+% [\v!normaal=>\def\@@tabulatealign{0},% = default value
+% \v!rechts=>\def\@@tabulatealign{1},% chardefs gebruiken
+% \v!links=>\def\@@tabulatealign{2},%
+% \v!midden=>\def\@@tabulatealign{3},%
+% \s!default=>\def\@@tabulatealign{0},%
+% \s!unknown=>\def\@@tabulatealign{0}]%
+% \let\pretabskip\!!zeropoint
+% \def\postabskip{.5\tabulateunit}%
+% %\doglobal\newcounter\tabulatecolumns
+% %\doglobal\newcounter\nofautotabulate
+% \global\tabulatecolumns\zerocount
+% \global\nofautotabulate\zerocount
+% \doglobal\newcounter\noftabulatelines
+% \let\totalnoftabulatelines\noftabulatelines
+% \let\minusnoftabulatelines\noftabulatelines
+% \global\tabulatepwidth\zeropoint
+% \global\tabulateequalfalse
+% \resettabulatepheight
+% \unexpanded \def\NC{\tabulatenormalcolumn0}%
+% \unexpanded \def\RC{\tabulatenormalcolumn1}%
+% \unexpanded \def\HC{\tabulatenormalcolumn2}%
+% \unexpanded \def\EQ{\tabulateequalcolumn 0}%
+% \unexpanded \def\RQ{\tabulateequalcolumn 1}%
+% \unexpanded \def\HQ{\tabulateequalcolumn 2}%
+% \unexpanded \def\NG{\NC\handletabulatecharalign}%
+% \unexpanded \def\NN{\NC\handletabulatedigits}% new, undocumented, test first
+% \unexpanded \def\ND{\NC\handletabulatedigits}% same, for old times sake
+% \def\HR % horizontal rule line (break untested)
+% {\TABLEnoalign
+% {\ifnum\noftabulatelines=\totalnoftabulatelines
+% \@EA\dotabulatenobreak
+% \else
+% \@EA\allowbreak
+% \fi}%
+% \dotabulatelinerule
+% \TABLEnoalign
+% {\ifnum\noftabulatelines=\zerocount
+% \@EA\dotabulatenobreak
+% \else
+% \@EA\allowbreak
+% \fi}}%
+% \unexpanded \def\NR % next row
+% {\doglobal\increment\noftabulatelines
+% \global\tabulatefirstflushedfalse
+% \global\tabulateequalfalse
+% \globallet\tabulatecolumn\!!zerocount
+% \resettabulatepheight
+% \unskip\unskip\crcr\flushtabulated
+% \TABLEnoalign
+% {\iftolerantTABLEbreak\else
+% \ifnum\noftabulatelines=\plusone
+% \dotabulatenobreak
+% \else
+% \ifnum\noftabulatelines=\minusnoftabulatelines
+% \ifnum\tabulatemaxplines<\plustwo
+% \dotabulatenobreak
+% \else
+% \allowbreak % needed with pbreak prevention
+% \fi
+% \else
+% \allowbreak % needed with pbreak prevention
+% \fi
+% \fi
+% \fi
+% \global\tabulatefirstflushedfalse}}%
+% \let\HL\empty \let\SR\NR \let\AR\NR
+% \let\FL\empty \let\FR\NR
+% \let\ML\empty \let\MR\NR
+% \let\LL\empty \let\LR\NR
+% \global\let\flushtabulated\empty
+% \let\savedbar|\let|\nexttabulate
+% \tabskip\zeropoint
+% \ifdim\getvalue{\??tt\currenttabulate\c!marge}>\zeropoint
+% \!!toksa{&\flushtabulateindent\strut##%
+% \tabskip\getvalue{\??tt\currenttabulate\c!marge}\strut
+% &##\tabskip\zeropoint}%
+% \else
+% \!!toksa{&\flushtabulateindent\strut##%
+% &##\tabskip\zeropoint}%
+% \fi
+% \tabulatewidth\zeropoint
+% |#1X|\relax
+% \scratchcounter\tabulatecolumns
+% \multiply\scratchcounter3%
+% \advance\scratchcounter4%
+% \edef\totaltabulatecolumns{\the\scratchcounter}%
+% \tabulatewidth\zeropoint
+% % \dorecurse\tabulatecolumns % can be made faster
+% % {\doifundefinedelse{\@@tabbox@@\recurselevel}
+% % {\expandafter\newbox\csname\@@tabbox@@\recurselevel\endcsname}%
+% % {\global\setbox\csname\@@tabbox@@\recurselevel\endcsname\box\voidb@x}}%
+% \initializetableboxes\tabulatecolumns
+% \appendtoks&##\to\!!toksa
+% \appendtoks\doglobal\increment\tabulatecolumn\to\!!toksa
+% \appendtoks\NC\unskip\unskip\crcr\flushtabulated\to\tabulatedummy % no count
+% \globallet\tabulatecolumn\!!zerocount
+% \resettabulatepheight
+% \def\bskip
+% {\setbox\tabulatebox\vbox\bgroup
+% \global\let\tabulatehook\notabulatehook}%
+% \def\eskip
+% {\par\egroup
+% \global\let\tabulatehook\dotabulatehook}%
+% \def\xbskip
+% {\hbox\bgroup\vbox\bgroup
+% \global\let\tabulatehook\notabulatehook}%
+% \def\xeskip
+% {\par\egroup\egroup
+% \global\let\tabulatehook\dotabulatehook}%
+% \let|\savedbar
+% \global\let\tabulatehook\dotabulatehook
+% \doifvalue{\??tt\currenttabulate\c!inspringen}\v!nee\forgetparindent
+% \ifinsidefloat
+% \let\tabulateindent\!!zeropoint
+% \else
+% \setlocalhsize \hsize\localhsize
+% \fi
+% \dontcomplain
+% \forgetall
+% \setbox0\vbox % outside \if because of line counting
+% {\footnotesenabledfalse
+% \let\tabulateindent\!!zeropoint
+% \trialtypesettingtrue % very important
+% \@EA\halign\@EA{\the\!!toksa\crcr\fulltabulatecontent\crcr}}%
+% \ifnum\nofautotabulate>\zerocount
+% % so, even if the natural size is larger, in the final
+% % run, we force the calculated width
+% \tabulatewidth\hsize
+% \advance\tabulatewidth -\wd0
+% \advance\tabulatewidth -\tabulatepwidth
+% \ifnum\nofautotabulate>\zerocount
+% \divide\tabulatewidth \nofautotabulate\relax
+% \fi
+% \fi
+% \def\xbskip{\bskip}%
+% \def\xeskip{\eskip}%
+% \ifsplittabulate
+% \splittopskip\strutht
+% \global\let\flushtabulatedindeed\empty
+% \long\def\bbskip
+% {\ifvoid\tablebox\tabulatecolumn
+% \ifx\flushtabulatedindeed\empty\else
+% \setbox0\hbox
+% \fi
+% \fi}%
+% \def\bskip
+% {\ifvoid\tablebox\tabulatecolumn
+% \global\setbox\tablebox\tabulatecolumn\vbox
+% \bgroup
+% \global\let\tabulatehook\notabulatehook
+% \ifautotabulate\hsize\tabulatewidth\fi
+% % \begstrut % interferes with pre-\pars
+% % evt: \appendtoks\begstrut\to\everypar
+% \ignorespaces
+% \def\eskip
+% {\par\egroup
+% \settabulatepheight
+% \global\let\tabulatehook\dotabulatehook
+% \splitofftabulatebox}%
+% \else
+% \let\eskip\empty
+% \dontcomplain
+% \global\let\tabulatehook\dotabulatehook
+% \expandafter\splitofftabulatebox
+% \fi}%
+% \gdef\flushtabulated
+% {\TABLEnoalign % noalign % no interference !
+% {\global\let\flushtabulatedindeed\empty
+% \globallet\tabulatecolumn\!!zerocount
+% \handletabulatepbreak
+% \dorecurse\tabulatecolumns % was: \noftabcolumns
+% {\ifvoid\tablebox\recurselevel\else
+% \gdef\flushtabulatedindeed{\the\tabulatedummy}%
+% \fi}%
+% \global\tabulatefirstflushedtrue}%
+% \flushtabulatedindeed}%
+% \else
+% % tabhook op alles ?
+% \def\bskip
+% {\vtop\bgroup
+% \ifautotabulate\hsize\tabulatewidth\fi
+% % \begstrut % interferes with pre-\pars
+% % evt: \appendtoks\begstrut\to\everypar
+% \ignorespaces}%
+% \def\eskip % vertical strut added august 2003
+% {\par\verticalstrut\vskip-\struttotal\egroup}%
+% \fi
+% \let\totalnoftabulatelines\noftabulatelines
+% \let\minusnoftabulatelines\noftabulatelines
+% \decrement\minusnoftabulatelines
+% \doglobal\newcounter\noftabulatelines
+% \def\HL{\TABLEnoalign
+% {\ifnum\noftabulatelines=\zerocount \@EA \FL\else
+% \ifnum\noftabulatelines<\totalnoftabulatelines\relax\@EAEAEA\ML\else
+% \@EAEAEA\LL\fi\fi}}%
+% \doifvalue{\??tt\currenttabulate\c!lijn}\v!regel
+% {\let\HL\HR}%
+% \def\tablebaselinecorrection
+% {\def\dobaselinecorrection
+% {\vskip-\prevdepth
+% \vskip\strutdp
+% \vskip\strutdp}%
+% \baselinecorrection}%
+% \def\FL{\TABLEnoalign
+% {\ifinsidefloat\else
+% \doifemptyvalue{\??tt\currenttabulate\c!voor} % no expansion
+% {\tablebaselinecorrection}%
+% \fi
+% \dotabulaterule
+% \dotabulatenobreak
+% \dotabulateruleseperator
+% \prevdepth\strutdp
+% \dotabulatenobreak}}%
+% \def\ML{\TABLEnoalign
+% {\dotabulateruleseperator
+% \dotabulaterule
+% \ifnum\noftabulatelines>\plusone
+% \ifnum\noftabulatelines<\minusnoftabulatelines
+% \vskip\topskip\allowbreak\vskip-\topskip
+% \vskip-\getvalue{\??tt\currenttabulate\c!lijndikte}%
+% \dotabulaterule
+% \fi
+% \fi
+% \dotabulateruleseperator}}%
+% \def\LL{\TABLEnoalign
+% {\dotabulatenobreak
+% \dotabulateruleseperator
+% \dotabulatenobreak
+% \dotabulaterule
+% \ifinsidefloat\else
+% \doifemptyvalue{\??tt\currenttabulate\c!na} % no expansion
+% {\vskip\strutdp
+% \verticalstrut
+% \vskip-\struttotal}%
+% \fi}}%
+% \chardef\tabulatepass\plustwo
+% %
+% \startframedcontent[\getvalue{\??tt\currenttabulate\c!kader}]%
+% %
+% \@EA\halign\@EA{\the\!!toksa\crcr\fulltabulatecontent\crcr}%
+% \prevdepth\strutdp % nog eens beter, temporary hack
+% \doifvalue{\??tt\currenttabulate\c!afstand}\v!grid
+% {\vskip-\strutdp}% experimental tm-prikkels
+% %
+% \stopframedcontent
+% %
+% \egroup
+% \ifinsidefloat \else
+% \getvalue{\??tt\currenttabulate\c!na}%
+% \fi
+% \egroup}
+
\def\processtabulate[|#1|]% in the process of optimizing
{\tabulateunit\getvalue{\??tt\currenttabulate\c!eenheid}%
\checkfulltabulatecontent
@@ -927,20 +1198,12 @@
\unexpanded \def\NG{\NC\handletabulatecharalign}%
\unexpanded \def\NN{\NC\handletabulatedigits}% new, undocumented, test first
\unexpanded \def\ND{\NC\handletabulatedigits}% same, for old times sake
- \def\HR % horizontal rule line (break untested)
- {\TABLEnoalign
- {\ifnum\noftabulatelines=\totalnoftabulatelines
- \@EA\dotabulatenobreak
- \else
- \@EA\allowbreak
- \fi}%
- \tabulateline
- \TABLEnoalign
- {\ifnum\noftabulatelines=\zerocount
- \@EA\dotabulatenobreak
- \else
- \@EA\allowbreak
- \fi}}%
+ \def\tabulaterule{\HR}% a rule with lineheight
+ \def\tabulateline{\HL}% just a spaced rule
+ \def\tabulateautorule{\doHR\plusone}%
+ \def\tabulateautoline{\doHL\plusone}%
+ \def\HR{\doHR\zerocount}
+ \def\HL{\doHL\zerocount}
\unexpanded \def\NR % next row
{\doglobal\increment\noftabulatelines
\global\tabulatefirstflushedfalse
@@ -952,23 +1215,23 @@
{\iftolerantTABLEbreak\else
\ifnum\noftabulatelines=\plusone
\dotabulatenobreak
- \else
- \ifnum\noftabulatelines=\minusnoftabulatelines
- \ifnum\tabulatemaxplines<\plustwo
- \dotabulatenobreak
- \else
- \allowbreak % needed with pbreak prevention
- \fi
+ \else\ifnum\noftabulatelines=\minusnoftabulatelines
+ \ifnum\tabulatemaxplines<\plustwo
+ \dotabulatenobreak
\else
\allowbreak % needed with pbreak prevention
\fi
- \fi
+ \else
+ \allowbreak % needed with pbreak prevention
+ \fi\fi
\fi
\global\tabulatefirstflushedfalse}}%
\let\HL\empty \let\SR\NR \let\AR\NR
\let\FL\empty \let\FR\NR
\let\ML\empty \let\MR\NR
\let\LL\empty \let\LR\NR
+ \let\doHR\gobbleoneargument
+ \let\doHL\gobbleoneargument
\global\let\flushtabulated\empty
\let\savedbar|\let|\nexttabulate
\tabskip\zeropoint
@@ -1052,6 +1315,7 @@
\global\let\tabulatehook\notabulatehook
\ifautotabulate\hsize\tabulatewidth\fi
% \begstrut % interferes with pre-\pars
+ % evt: \appendtoks\begstrut\to\everypar
\ignorespaces
\def\eskip
{\par\egroup
@@ -1081,20 +1345,55 @@
{\vtop\bgroup
\ifautotabulate\hsize\tabulatewidth\fi
% \begstrut % interferes with pre-\pars
+ % evt: \appendtoks\begstrut\to\everypar
\ignorespaces}%
- \def\eskip
- {\par\egroup}%
+ \def\eskip % vertical strut added august 2003
+ {\par\verticalstrut\vskip-\struttotal\egroup}%
\fi
\let\totalnoftabulatelines\noftabulatelines
\let\minusnoftabulatelines\noftabulatelines
\decrement\minusnoftabulatelines
\doglobal\newcounter\noftabulatelines
- \def\HL{\TABLEnoalign
- {\ifnum\noftabulatelines=\zerocount \@EA \FL\else
- \ifnum\noftabulatelines<\totalnoftabulatelines\relax\@EAEAEA\ML\else
- \@EAEAEA\LL\fi\fi}}%
+ \def\doHL##1%
+ {\TABLEnoalign
+ {\ifnum\noftabulatelines=\zerocount
+ \ifcase##1\or
+ \@EAEAEA\FL
+ \fi
+ \else\ifnum\noftabulatelines=\totalnoftabulatelines
+ \ifcase##1\or
+ \@EA\@EAEAEA\@EA\LL
+ \fi
+ \else
+ \@EAEAEA\ML
+ \fi\fi}}%
+ \def\doHR##1% horizontal rule line (break untested)
+ {\TABLEnoalign
+ {\globallet\TABLEautoline\dotabulatelinerule
+ \ifcase##1\or
+ \ifnum\noftabulatelines=\zerocount
+ \gdef\TABLEautoline{\TABLEnoalign{}}%
+ \else\ifnum\noftabulatelines=\totalnoftabulatelines
+ \gdef\TABLEautoline{\TABLEnoalign{}}%
+ \fi\fi
+ \fi
+ \dotabulatenobreak}%
+ \TABLEautoline
+ \TABLEnoalign
+ {\nobreak
+ \ifx\TABLEautoline\dotabulatelinerule\kern-\lineheight\fi
+ \ifnum\noftabulatelines=\totalnoftabulatelines
+ \@EA\dotabulatenobreak
+ \else
+ \@EA\allowbreak
+ \fi}%
+ \TABLEautoline
+ \TABLEnoalign
+ {\dotabulatenobreak}}%
\doifvalue{\??tt\currenttabulate\c!lijn}\v!regel
- {\let\HL\HR}%
+ {\let\HL \HR
+ \let\tabulateautoline\tabulateautorule
+ \let\tabulateline \tabulaterule}%
\def\tablebaselinecorrection
{\def\dobaselinecorrection
{\vskip-\prevdepth
@@ -1106,27 +1405,27 @@
\doifemptyvalue{\??tt\currenttabulate\c!voor} % no expansion
{\tablebaselinecorrection}%
\fi
- \tabulaterule
+ \dotabulaterule
\dotabulatenobreak
- \tabulateruleseperator
+ \dotabulateruleseperator
\prevdepth\strutdp
\dotabulatenobreak}}%
\def\ML{\TABLEnoalign
- {\tabulateruleseperator
- \tabulaterule
+ {\dotabulateruleseperator
+ \dotabulaterule
\ifnum\noftabulatelines>\plusone
\ifnum\noftabulatelines<\minusnoftabulatelines
\vskip\topskip\allowbreak\vskip-\topskip
\vskip-\getvalue{\??tt\currenttabulate\c!lijndikte}%
- \tabulaterule
+ \dotabulaterule
\fi
\fi
- \tabulateruleseperator}}%
+ \dotabulateruleseperator}}%
\def\LL{\TABLEnoalign
{\dotabulatenobreak
- \tabulateruleseperator
+ \dotabulateruleseperator
\dotabulatenobreak
- \tabulaterule
+ \dotabulaterule
\ifinsidefloat\else
\doifemptyvalue{\??tt\currenttabulate\c!na} % no expansion
{\vskip\strutdp
@@ -1149,6 +1448,19 @@
\getvalue{\??tt\currenttabulate\c!na}%
\fi
\egroup}
+
+%D \startypen
+%D \setuptabulate[split=no,rule=line]
+%D
+%D \starttabulate
+%D \NC tufte \NC \input tufte \NC \NR \tabulateautorule
+%D \NC tufte \NC \input tufte \NC \NR \tabulateautorule
+%D \NC tufte \NC \input tufte \NC \NR \tabulateautorule
+%D \NC tufte \NC \input tufte \NC \NR \tabulateautorule
+%D \NC tufte \NC \input tufte \NC \NR \tabulateautorule
+%D \NC tufte \NC \input tufte \NC \NR \tabulateautorule
+%D \stoptabulate
+%D \stoptypen
% \starttabulatie[|mc|]
% \NC \digits{100.000,00} \NC\NR
@@ -1205,7 +1517,7 @@
\setuptabulate
[\c!eenheid=1em,
EQ={:},
-\c!kader=\v!uit,
+ \c!kader=\v!uit,
\c!korps=,
\c!lijn=\v!normaal,
\c!lijnkleur=,
@@ -1216,6 +1528,7 @@
\c!afstand={\v!diepte,\v!middel},
\c!uitlijnen=\v!normaal,
\c!marge=\!!zeropoint,
+ \c!splitsen=\v!ja,
\c!inspringen=\v!nee]
\protect \endinput
diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex
index 8d1fd1378..ef15b3622 100644
--- a/tex/context/base/core-var.tex
+++ b/tex/context/base/core-var.tex
@@ -149,10 +149,12 @@
\def\??vars{@@vars}
-\def\setvariables
- {\dotripleargument\dosetvariables[\getrawparameters]}
+\def\setvariables {\dotripleargument\dosetvariables[\getrawparameters ]}
+\def\setevariables{\dotripleargument\dosetvariables[\getraweparameters]}
+\def\setgvariables{\dotripleargument\dosetvariables[\getrawgparameters]}
+\def\setxvariables{\dotripleargument\dosetvariables[\getrawxparameters]}
-\def\globalsetvariables
+\def\globalsetvariables % obsolete
{\dotripleargument\dosetvariables[\globalgetrawparameters]}
\def\dosetvariables[#1][#2][#3]%
diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex
index 93fba6933..cf03888b3 100644
--- a/tex/context/base/enco-ini.tex
+++ b/tex/context/base/enco-ini.tex
@@ -570,14 +570,14 @@
% etex : \ifcsname
-\def\donthandleaccent#1#2% \empty makes #2={} save % no \unexpanded
+\def\justhandleaccent#1#2% \empty makes #2={} save % no \unexpanded
{\ifundefined{\accentprefix\characterencoding#1\string#2\empty}%
#2%
\else
\csname\accentprefix\characterencoding#1\string#2\empty\endcsname
\fi}
-\def\donthandlecommand#1% % no \unexpanded, otherwise pdfdoc will fail
+\def\justhandlecommand#1% % no \unexpanded, otherwise pdfdoc will fail
{\ifundefined{\commandprefix\characterencoding#1}% as well as hyph patterns
#1%
\else
@@ -612,13 +612,13 @@
{\let\stopencoding\relax}
{%\protectfontcharacters % problematic in language loading
\showmessage\m!encodings1{#1}%
- \pushmacro\dohandleaccent
- \pushmacro\dohandlecommand
+ \pushmacro\dohandleaccent % still needed?
+ \pushmacro\dohandlecommand % still needed?
\pushmacro\definesortkey
\pushmacro\characterregime
\pushmacro\doautosetregime
- \let\dohandleaccent\donthandleaccent
- \let\dohandlecommand\donthandlecommand
+ \let\dohandleaccent\donthandleaccent % still needed?
+ \let\dohandlecommand\donthandlecommand % still needed?
\let\definesortkey\savesortkey
\doifelsenothing{#2}%
{\let\doautosetregime\gobbletwoarguments}
@@ -628,17 +628,17 @@
{\popmacro\doautosetregime
\popmacro\characterregime
\popmacro\definesortkey
- \popmacro\dohandlecommand
- \popmacro\dohandleaccent
+ \popmacro\dohandlecommand % still needed?
+ \popmacro\dohandleaccent % still needed?
\enableencoding[\s!default]%
}}}% \unprotectfontcharacters}}} % ??
-% probably obsolete
+% probably obsolete (hm, not yet)
\def\reducetocoding[#1]% use grouped!
{\doifsomething{#1}
- {\let\dohandleaccent\donthandleaccent
- \let\dohandlecommand\donthandlecommand
+ {\let\dohandleaccent \justhandleaccent
+ \let\dohandlecommand\justhandlecommand
\enableencoding[#1]%
\enablelanguagespecifics[\currentlanguage]}}
@@ -1428,7 +1428,7 @@
% \useencodingvector ec
% \stopregime
-% new, to be documented
+% new, to be documented (oeps, conflicts with existing code)
\def\dontexpandencoding
{\let\dohandleaccent \donthandleaccent
@@ -1484,7 +1484,7 @@
\useencoding[def,acc,raw,com,cas,mis] % mis shoudl come first
-\useencoding[ans,il2,ec,tbo,pdf,uc,pol,x5]
+\useencoding[ans,il2,ec,tbo,pdf,uc,pol]
\setupencoding[\s!default=ec] % was: [\s!default=\s!default]
diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex
index 540589126..ad3d14a6d 100644
--- a/tex/context/base/lang-ini.tex
+++ b/tex/context/base/lang-ini.tex
@@ -231,6 +231,7 @@
[\s!lefthyphenmin=2,
\s!righthyphenmin=2,
\c!spatiering=\v!opelkaar,
+ \c!midsentence=---,
\c!leftsentence=---,
\c!rightsentence=---,
\c!leftsubsentence=---,
diff --git a/tex/context/base/meta-dum.tex b/tex/context/base/meta-dum.tex
index 644a809b0..b5b56657a 100644
--- a/tex/context/base/meta-dum.tex
+++ b/tex/context/base/meta-dum.tex
@@ -107,7 +107,7 @@
\c!achtergrond=\s!dummy,
\c!voorgrondkleur=white]}%
{\doif\@@eftekst\v!ja
- {\infofont \setupinterlinespace \nohyphens
+ {\infofont \setupinterlinespace \dohyphens % \nohyphens
\doifelse{#1}\s!dummy \!!doneafalse\!!doneatrue
\doifelse{#2}\s!dummy \!!donebfalse\!!donebtrue
\doifelse{#3}\s!unknown\!!donecfalse\!!donectrue
diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex
index 09f437e42..0bf586071 100644
--- a/tex/context/base/mult-com.tex
+++ b/tex/context/base/mult-com.tex
@@ -1416,6 +1416,9 @@ defineplacement: definieerplaats defineplacement
somewhere: ergens somewhere
irgendwo nekde
daqualcheparte undeva
+navigating: navigerend navigating
+ navigating navigating
+ navigating navigating
ref: ref ref
ref ref
rif ref
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index 9a44cbbd3..d1b3553ec 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -346,6 +346,9 @@
rightquote: rechterciteer rightquote
rechterzitieren citovatvpravo
menzionedestra minicitatdreapta
+midsentence: middenzin midsentence
+ midsentence midsentence
+ midsentence midsentence
leftsentence: linkerzin leftsentence
linkersatz vetavlevo
frasesinistra propozitiestanga
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index 3903664b0..7c281d085 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -399,6 +399,7 @@
\definesystemvariable {fr} % ForM
\definesystemvariable {fs} % FileSynonym
\definesystemvariable {ft} % FonTs
+\definesystemvariable {ha} % HAng
\definesystemvariable {hs} % HSpace
\definesystemvariable {ia} % Interactie
\definesystemvariable {ib} % InteractieBalk
@@ -602,6 +603,7 @@
%D garantee compatibility and new macro's noy yet present in
%D the format.
+\definefileconstant {errfilename} {cont-err}
\definefileconstant {sysfilename} {cont-sys}
\definefileconstant {oldfilename} {cont-old}
\definefileconstant {newfilename} {cont-new}
diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex
index 2dad35404..41d8c901a 100644
--- a/tex/context/base/page-flt.tex
+++ b/tex/context/base/page-flt.tex
@@ -423,34 +423,6 @@
\expanded{\dorepeatwithcommand[#1]}\movedownsidefloat}%
\egroup}
-% \def\xdocompletefloat#1#2#3#4#5#6%
-% {\ifextrafloatactions
-% \let\@@extrafloat\empty
-% % \sidefloatdownshift will be reset afterwards, and can
-% % already be set at this point
-% \processallactionsinset
-% [#4] % ininner/inouter : for old times sake
-% [ \v!binnen=>\xxdocompletefloat\v!links \v!rechts,
-% \v!buiten=>\xxdocompletefloat\v!rechts \v!links,
-% \v!binnenmarge=>\xxdocompletefloat\v!linkermarge \v!rechtermarge,
-% \v!buitenmarge=>\xxdocompletefloat\v!rechtermarge\v!linkermarge,
-% \v!binnenrand=>\xxdocompletefloat\v!linkerrand \v!rechterrand,
-% \v!buitenrand=>\xxdocompletefloat\v!rechterrand \v!linkerrand,
-% \v!rugwit=>\xxdocompletefloat\v!rugwit \v!snijwit,
-% \v!snijwit=>\xxdocompletefloat\v!snijwit \v!rugwit,
-% \v!links=>\xxdocompletefloat\v!links \v!links,
-% \v!rechts=>\xxdocompletefloat\v!rechts \v!rechts,
-% \v!regel=>, % only -n*line is handled (see ***)
-% \s!unknown=>{\movedownsidefloat[\commalistelement]}]%
-% \ifx\@@extrafloat\empty
-% \docompletefloat{#1}{#2}{#3}{#4}{#5}{#6}\nextbox
-% \else
-% \docompletefloat{#1}{#2}{#3}{\@@extrafloat,#4}{#5}{#6}\nextbox
-% \fi
-% \else % downward compatible
-% \docompletefloat{#1}{#2}{#3}{#4}{#5}{#6}\nextbox
-% \fi}
-
\def\xdocompletefloat#1#2#3#4#5#6%
{\ifextrafloatactions
\doifinsetelse\v!tekst{#4}
@@ -509,31 +481,6 @@
\doifvaluesomething{\??fl#1\c!maxbreedte}
{\scratchdimen\getvalue{\??fl#1\c!maxbreedte}\relax
\ifdim\wd#3>\scratchdimen
-% \doifcommonelse{\v!inrechter,\v!rechtermarge}{#2}
-% {\global\sidefloatshift-\scratchdimen
-% \global\advance\sidefloatshift-\rechtermargeafstand}
-% {\doifcommonelse{\v!inlinker,\v!linkermarge}{#2}
-% {\global\sidefloatshift-\scratchdimen
-% \global\advance\sidefloatshift-\linkermargeafstand}
-% {\doifinsetelse{\v!linkerrand}{#2}
-% {\global\sidefloatshift-\scratchdimen
-% \global\advance\sidefloatshift-\linkerrandafstand
-% \global\advance\sidefloatshift-\linkermargebreedte
-% \global\advance\sidefloatshift-\linkermargeafstand}
-% {\doifinsetelse{\v!rechterrand}{#2}
-% {\global\sidefloatshift-\scratchdimen
-% \global\advance\sidefloatshift-\rechterrandafstand
-% \global\advance\sidefloatshift-\rechtermargebreedte
-% \global\advance\sidefloatshift-\rechtermargeafstand}
-% {#4\setbox#3\hbox to \scratchdimen
-% {\doifcommonelse{\v!rechts,\v!links}{#2}
-% {\doifnotinset\v!rechts{#2}\hss
-% \box#3%
-% \doifnotinset\v!links{#2}\hss}%
-% {\doifnotvalue{\??fl#1\c!plaats}\v!links\hss
-% \box#3%
-% \doifnotvalue{\??fl#1\c!plaats}\v!rechts\hss}}}}}}%
-%
\doifcommonelse{\v!inrechter,\v!rechtermarge,\v!rechterrand
\v!inlinker,\v!linkermarge,\v!linkerrand}{#2}
{\global\sidefloatmaximum\scratchdimen}
@@ -545,7 +492,6 @@
{\doifnotvalue{\??fl#1\c!plaats}\v!links\hss
\box#3%
\doifnotvalue{\??fl#1\c!plaats}\v!rechts\hss}}}%
-%
\fi}%
\fi}
@@ -614,6 +560,7 @@
\c!tussen=\@@kjtussen,
%\c!na=\@@kjna,
\c!breedte=\@@kjbreedte,
+ \c!minbreedte=\@@kjminbreedte,
\c!kopletter=\@@kjkopletter,
\c!kopkleur=\@@kjkopkleur,
\c!tekstletter=\@@kjtekstletter,
@@ -627,6 +574,7 @@
\c!sectienummer=\@@kjsectienummer,
\c!afstand=\@@kjafstand,
\c!scheider=\@@kjscheider,
+ \c!commando=\@@kjcommando,
\c!conversie=\@@kjconversie]%
\definieernummer % \doorlabelen
[#1]
@@ -681,7 +629,7 @@
\copyparameters[\??kj#1][\??kj#3]
[\c!plaats,\c!voor,\c!tussen,\c!na,
\c!breedte,\c!kopletter,\c!kopkleur,\c!letter,\c!kleur,
- \c!tekstletter,\c!tekstkleur,
+ \c!tekstletter,\c!tekstkleur,\c!minbreedte,
\c!uitlijnen,\c!nummer,\c!wijze,\c!blokwijze,
\c!sectienummer,\c!scheider,\c!afstand,\c!conversie]%
\definieernummer[#1][#3]%
@@ -729,26 +677,6 @@
\let\twopassfloatdata\realpageno
-% \def\dogetfloatdata % precedes save !
-% {\doglobal\increment\noffloatpages
-% \gettwopassdata{\s!float\s!data}%
-% \iftwopassdatafound
-% \globallet\twopassfloatdata\twopassdata
-% \else
-% \globallet\twopassfloatdata\realpageno % \realfolio
-% \fi}
-%
-% \def\dosavefloatdata
-% {\bgroup
-% \edef\dosavefloatdata
-% {\writeutilitycommand
-% {\twopassentry
-% {\s!float\s!data}%
-% {\noffloatdata}%
-% {\noexpand\realfolio}}}% later {}{}{}{} and \getfirst...
-% \dosavefloatdata
-% \egroup}
-
\def\dosavefloatdata
{\bgroup
\edef\dosavefloatdata
@@ -1065,24 +993,28 @@
{\doifinsetelse\v!altijd{#1}
{\docheckiffloatfits
\ifroomforfloat
- \processallactionsinset
- [#1]
- [ \v!boven=>{\placesometopsfloat[#1]},
- \v!onder=>{\placesomebotsfloat[#1]},
- \s!unknown=>{\placesomeherefloat[#1]},
- \s!default=>{\placesomeherefloat[#1]}]%
+ \doifinsetelse\v!boven{#1}
+ {\placesometopsfloat[#1]}
+ {\doifinsetelse\v!onder{#1}
+ {\placesomebotsfloat[#1]}
+ {\placesomeherefloat[#1]}}%
+ % more compact and efficient, but quite ugly
+ % \doifinsetelse\v!boven{#1}
+ % \placesometopsfloat
+ % {\doifinsetelse\v!onder{#1}
+ % \placesomebotsfloat
+ % \placesomeherefloat}[#1]%
\else
\showmessage\m!floatblocks9\empty
\doreversesavefloat
\fi}
{\docheckiffloatfits
\ifroomforfloat
- \processallactionsinset
- [#1]
- [ \v!boven=>{\placesometopsfloat[#1]},
- \v!onder=>{\placesomebotsfloat[#1]},
- \s!unknown=>{\placesomeherefloat[#1]},
- \s!default=>{\placesomeherefloat[#1]}]%
+ \doifinsetelse\v!boven{#1}
+ {\placesometopsfloat[#1]}
+ {\doifinsetelse\v!onder{#1}
+ {\placesomebotsfloat[#1]}
+ {\placesomeherefloat[#1]}}%
\else
\dosavefloat
\fi}}}
@@ -1190,22 +1122,27 @@
\else
\verhoognummer[#1]%
\maakhetnummer[#1]%
- \globallet\flhetnummer\hetnummer
+ % \globallet\flhetnummer\hetnummer % beware, not unique should be done on a per class base
+ \letgvalue{@fl@n@#1}\hetnummer
+ % indirect macro can be more efficient
\setgvalue{@fl@r@#1}%
{\dofloatreference
\redofloatorder{#1}%
- \doschrijfnaarlijst{#1}{\flhetnummer}{#3}{#1}%
+ % \doschrijfnaarlijst{#1}{\flhetnummer}{#3}{#1}%
+ \doschrijfnaarlijst{#1}{\getvalue{@fl@n@#1}}{#3}{#1}%
\doglobal\convertargument#3\to\flasciititle % \asciititle is global
- \doifsomething{#2}{\rawreference\s!flt{#2}{{\flhetnummer}{\flasciititle}}}%
- \letgvalue{@fl@r@#1}\relax}% nills
+ % \doifsomething{#2}{\rawreference\s!flt{#2}{{\flhetnummer}{\flasciititle}}}%
+ \doifsomething{#2}{\rawreference\s!flt{#2}{{\getvalue{@fl@n@#1}}{\flasciititle}}}%
+ \letgvalue{@fl@r@#1}\relax}% nils
\setgvalue{@fl@t@#1}%
- {\preparethenumber{\??kj#1}\flhetnummer\preparednumber
+ % {\preparethenumber{\??kj#1}\flhetnummer\preparednumber
+ {\preparethenumber{\??kj#1}{\getvalue{@fl@n@#1}}\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
{\dotfskip{\getvalue{\??kj#1\c!afstand}}#3}}}%
- \fi}
+ \fi}
\def\placefloatcaptiontext [#1]{\getvalue{@fl@t@#1}}
\def\placefloatcaptionreference[#1]{\getvalue{@fl@r@#1}}
@@ -1227,6 +1164,8 @@
\newbox\captionbox
+% \floatparameter
+
\def\putcompletecaption#1#2#3#4%
{\noindent
\xdef\floatcaptionnumber{#1}%
@@ -1268,7 +1207,6 @@
\postponefootnotes
\mindermeldingen
\setbox\tempfloatbox\vbox{\borderedfloatbox{#4}}%
-% \def\locatefloat{\doregelplaats\@@flflplaats}%
\def\locatefloat
{\chardef\alignstrutmode\zerocount
\alignedline\@@flflplaats\v!midden}%
@@ -1278,36 +1216,44 @@
\doglobal\addlocalbackgroundtobox\floatbox
\else
\setbox\tempcaptionbox\hbox
- {\footnotesenabledfalse\putcompletecaption{#4}{#2}{#3}{0}}%
+ {\trialtypesettingtrue
+ \footnotesenabledfalse\putcompletecaption{#4}{#2}{#3}{0}}%
+ % todo: installable maken, variant/method=auto vs macro
\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}}%
+ {\doifelse\@@kjkjminbreedte\v!passend
+ {\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}}
+ {\dopreparestackcaptionfix{#1}{#2}{#3}{#4}}}% new, special effects (see icare)
\edef\width{\the\wd\tempfloatbox}%
\addlocalbackgroundtobox\tempfloatbox
+ \setbox\tempcaptionbox\hbox{\@@kjkjcommando{\box\tempcaptionbox}}%
\addlocalbackgroundtobox\tempcaptionbox
\buildfloatbox
\fi
-\ifnum\floatrotation>0
- \global\setbox\floatbox\vbox
- {\rotate[\c!rotatie=\floatrotation]{\box\floatbox}}%
- \edef\width{\the\wd\tempfloatbox}%
-\else
- \postcenterfloatbox\width
-\fi
+ \ifnum\floatrotation>0
+ \global\setbox\floatbox\vbox
+ {\rotate[\c!rotatie=\floatrotation]{\box\floatbox}}%
+ \edef\width{\the\wd\tempfloatbox}%
+ \else
+ \postcenterfloatbox\width
+ \fi
\egroup}
\ifx\addlocalbackgroundtobox\undefined
\def\addlocalbackgroundtobox{\resetglobal\gobbleoneargument}%
\fi
+\def\captionminwidth {15\korpsgrootte}
+\def\captionovershoot {2em}
+
\def\dopreparenocaption#1#2#3#4%
{\global\setbox\floatbox\vbox % pas op als wd groter dan hsize
{\ifbinnenkolommen\ifdim\wd\tempfloatbox>\hsize
@@ -1315,14 +1261,30 @@
\fi\fi
\locatefloat{\copy\tempfloatbox}}}
+\def\dopreparestackcaptionfix#1#2#3#4%
+ {\dosetraggedvbox\@@kjkjuitlijnen
+ \setbox\tempcaptionbox\raggedbox
+ {\hsize\@@kjkjminbreedte % special effects
+ \putcompletecaption{#4}{#2}{#3}{0}}}
+
\def\dopreparestackcaptionmax#1#2#3#4%
{\dosetraggedvbox\@@kjkjuitlijnen
\setbox\tempcaptionbox\raggedbox
{\hsize\wd\tempfloatbox
\putcompletecaption{#4}{#2}{#3}{0}}}
-\def\captionminwidth {15\korpsgrootte}
-\def\captionovershoot {2em}
+\def\dopreparestackcaptionwid#1#2#3#4%
+ {\dosetraggedvbox\@@kjkjuitlijnen
+ \setbox\tempcaptionbox\raggedbox
+ {\hsize\@@kjkjbreedte
+ \putcompletecaption{#4}{#2}{#3}{0}}}
+
+\def\dopreparestackcaptionmin#1#2#3#4%
+ {\raggedcenter % the default
+ \dosetraggedvbox\@@kjkjuitlijnen % when given
+ \setbox\tempcaptionbox\raggedbox % vbox, keeps footnotes
+ {\hsize\wd\tempfloatbox
+ \putcompletecaption{#4}{#2}{#3}{0}}}
\def\dopreparestackcaptionaut#1#2#3#4%
{\doifsomething\@@kjkjuitlijnen
@@ -1384,19 +1346,6 @@
\fi
\fi}
-\def\dopreparestackcaptionwid#1#2#3#4%
- {\dosetraggedvbox\@@kjkjuitlijnen
- \setbox\tempcaptionbox\raggedbox
- {\hsize\@@kjkjbreedte
- \putcompletecaption{#4}{#2}{#3}{0}}}
-
-\def\dopreparestackcaptionmin#1#2#3#4%
- {\raggedcenter % the default
- \dosetraggedvbox\@@kjkjuitlijnen % when given
- \setbox\tempcaptionbox\raggedbox % vbox, keeps footnotes
- {\hsize\wd\tempfloatbox
- \putcompletecaption{#4}{#2}{#3}{0}}}
-
\def\dopreparesidecaption#1#2#3#4%
{\dimen0\hsize
\advance\dimen0 -\wd\tempfloatbox
@@ -1537,44 +1486,6 @@
\box\floatbox
\ifdone\hskip\effectiverightskip\fi\hss}}
-% \def\dosetparfloat#1#2#3#4%
-% {\bgroup
-% \forgetall
-% \postponefootnotes
-% \mindermeldingen
-% %\showcomposition
-% \setbox4\vbox{\borderedfloatbox{#4}}%
-% \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
-% \doglobal\addlocalbackgroundtobox\floatbox
-% \egroup}
-
\def\dosetparfloat#1#2#3#4%
{\bgroup
\forgetall
@@ -1582,8 +1493,7 @@
\mindermeldingen
%\showcomposition
\setbox\tempfloatbox\vbox{\borderedfloatbox{#4}}%
-%\doglobal
-\addlocalbackgroundtobox\tempfloatbox
+ \addlocalbackgroundtobox\tempfloatbox % no \doglobal
\ifnofloatcaption
\global\setbox\floatbox\vbox{\box\tempfloatbox}%
\else
@@ -1604,8 +1514,8 @@
{\dosetraggedvbox\@@kjkjuitlijnen
\setbox\tempcaptionbox\raggedbox
{\hsize\wd\tempfloatbox\putcompletecaption{#4}{#2}{#3}{0}}}}%
-%\doglobal
-\addlocalbackgroundtobox\tempcaptionbox
+ \setbox\tempcaptionbox\hbox{\@@kjkjcommando{\box\tempcaptionbox}}%
+ \addlocalbackgroundtobox\tempcaptionbox % no \doglobal
\global\setbox\floatbox\vbox
{\processaction
[\@@kjkjplaats]
@@ -1628,12 +1538,14 @@
\long\def\dosetfloatbox#1#2#3#4% todo : \global\setbox
{\ifvisible
\par
- \edef\@@kjkjbreedte {\getvalue{\??kj#4\c!breedte }}%
- \def\@@kjkjtussen {\getvalue{\??kj#4\c!tussen }}% no \edef
- \edef\@@kjkjafstand {\getvalue{\??kj#4\c!afstand }}%
- \edef\@@kjkjplaats {\getvalue{\??kj#4\c!plaats }}%
- \edef\@@kjkjuitlijnen{\getvalue{\??kj#4\c!uitlijnen}}%
- \edef\@@flflplaats {\getvalue{\??fl#4\c!plaats }}%
+ \edef\@@kjkjplaats {\getvalue{\??kj#4\c!plaats }}%
+ \def\@@kjkjtussen {\getvalue{\??kj#4\c!tussen }}% no \edef
+ \def\@@kjkjcommando {\getvalue{\??kj#4\c!commando }}% no \edef
+ \edef\@@kjkjbreedte {\getvalue{\??kj#4\c!breedte }}%
+ \edef\@@kjkjminbreedte{\getvalue{\??kj#4\c!minbreedte}}% in geval van automatisch
+ \edef\@@kjkjafstand {\getvalue{\??kj#4\c!afstand }}%
+ \edef\@@kjkjuitlijnen {\getvalue{\??kj#4\c!uitlijnen }}%
+ \edef\@@flflplaats {\getvalue{\??fl#4\c!plaats }}%
\ifparfloat
\@EA\dosetparfloat % {#1}{#2}{#3}{#4}%
\else
@@ -1668,33 +1580,6 @@
\newcounter\noxfloatlocations
-% \def\dogetfloatbox#1#2%
-% {\ifvisible
-% \let\next\relax % ivm eetex
-% \processfirstactioninset
-% [#1]
-% [ \v!hier=>\def\next{\someelsefloat[#1]},
-% \v!forceer=>\def\next{\somefixdfloat[#1]},
-% \v!links=>\def\next{\somesidefloat[#1]\presetindentation},
-% \v!rechts=>\def\next{\somesidefloat[#1]},
-% \v!tekst=>\def\next{\sometextfloat[#1]},
-% \v!boven=>\def\next{\someelsefloat[#1]\nonoindentation}, % !
-% \v!onder=>\def\next{\someelsefloat[#1]},
-% \v!marge=>\def\next{\somenextfloat[#1]\nonoindentation}, % !
-% \v!pagina=>\def\next{\somepagefloat[#1]},
-% \v!naast=>\def\next{\somefacefloat[#1]},
-% \v!inmarge=>\def\next{\somesidefloat[#1]},
-% \v!inlinker=>\def\next{\somesidefloat[#1]},
-% \v!inrechter=>\def\next{\somesidefloat[#1]},
-% \v!linkermarge=>\def\next{\somesidefloat[#1]},
-% \v!rechtermarge=>\def\next{\somesidefloat[#1]},
-% \v!linkerrand=>\def\next{\somesidefloat[#1]},
-% \v!rechterrand=>\def\next{\somesidefloat[#1]},
-% \s!default=>\def\next{\someelsefloat[\v!hier,#1]},
-% \s!unknown=>\def\next{\someelsefloat[\v!hier,#1]}]%
-% \next
-% \fi}
-
\long\def\dofloat#1#2#3#4%
{\dosetfloatbox{#1}{#2}{#3}{#4}%
\doifelsevaluenothing{\??fl#4\c!criterium}
@@ -2145,6 +2030,7 @@
\c!tussen={\blanko[\v!middel]},
\c!na=\blanko,
\c!breedte=\v!passend,
+ \c!minbreedte=\v!passend, % id est: the width of the floatbox in some cases
\c!kopletter=\v!vet,
\c!kopkleur=,
\c!letter=\v!normaal,
@@ -2158,6 +2044,7 @@
\c!sectienummer=\@@nrsectienummer,
\c!scheider=\@@koscheider,
\c!afstand=1em,
+ \c!commando=,
\c!conversie=\v!cijfers]
\stelplaatsblokkenin
diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex
index c05dab034..434ab333c 100644
--- a/tex/context/base/page-lay.tex
+++ b/tex/context/base/page-lay.tex
@@ -634,7 +634,7 @@
{\getparameters[\??ly#1][\c!status=\v!start,#2]}
\def\dodosetuplayout[#1][#2]%
- {\ConvertToConstant\doifnot{#2}\v!reset
+ {\ConvertToConstant\doifnot{#2}\v!reset % #2 ?
{\getparameters[\??ly#1][#2]%
\checkforems[#2]}}
diff --git a/tex/context/base/page-lin.tex b/tex/context/base/page-lin.tex
index 31dcdfff1..28c759d3b 100644
--- a/tex/context/base/page-lin.tex
+++ b/tex/context/base/page-lin.tex
@@ -370,16 +370,6 @@
\the\aftereverylinenumbering
\egroup}
-% \unexpanded \def\crlf
-% {\ifhmode\unskip\else\strut\fi\ifcase\raggedstatus\hfil\fi\break}
-
-\unexpanded \def\crlf
- {\ifhmode\unskip\else\strut\fi
- \ifcase\raggedstatus\hfil\or\or\or\hfil\fi\break}
-
-\def\opeenregel
- {\def\crlf{\removelastspace\space}\let\\\crlf}
-
\def\emptylines
{\dosingleempty\doemptylines}
diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex
index 684d20d3f..b40e36337 100644
--- a/tex/context/base/page-lyr.tex
+++ b/tex/context/base/page-lyr.tex
@@ -183,11 +183,16 @@
\def\layerparameter#1{\csname\??ll\currentlayer#1\endcsname}
+\newdimen\layerwidth
+\newdimen\layerheight
+
\def\dododosetlayer[#1][#2][#3]% will be sped up
{% we use the global width, never change this
\def\currentlayer{#1}%
\@@layerxsiz\layerparameter\c!breedte
\@@layerysiz\layerparameter\c!hoogte
+\layerwidth \@@layerxsiz
+\layerheight\@@layerysiz
% preroll
\getparameters[\??ll#1][#3]%
% presets and real roll
diff --git a/tex/context/base/page-mar.tex b/tex/context/base/page-mar.tex
index 7ba6c9c72..6456e8af3 100644
--- a/tex/context/base/page-mar.tex
+++ b/tex/context/base/page-mar.tex
@@ -450,6 +450,8 @@
%D therefore embed them in some macro's that (force and)
%D remove the indentation and restore it afterwards.
+% beware: no \hsize is set (yet)!
+
\def\inleftmargin#1%
{\pushindentation
\llap{#1\hskip\leftskip\hskip\leftmargintextdistance}%
diff --git a/tex/context/base/page-one.tex b/tex/context/base/page-one.tex
index 453b0a72e..38f633437 100644
--- a/tex/context/base/page-one.tex
+++ b/tex/context/base/page-one.tex
@@ -11,29 +11,29 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\writestatus{loading}{Context OTR Macros / Default Routine}
+\writestatus{loading}{Context OTR Macros / Default Routine}
-%D This is just the good old \CONTEXT\ output routine, which
-%D has been there right from the start.
+%D This is just the good old \CONTEXT\ output routine, which
+%D has been there right from the start.
-\unprotect
+\unprotect
% OTRONE: basic single column
-\activateotr{ONE}{} % the default one
+\activateotr{ONE}{} % the default one
\newtoks\OTRONEoutput
\def\OTRONEgotonextpage
{\ejectpage}
-\def\OTRONEgotonextpageX % will become obsolete
+\def\OTRONEgotonextpageX % will become obsolete
{\superejectpage}
\def\OTRONEsethsize
{\global\hsize\tekstbreedte}
-% keep (original one)
+% keep (original one)
%
% \def\OTRONEsetvsize
% {\ifdim\vsize=\teksthoogte \else
@@ -48,7 +48,7 @@
% \egroup
% \fi}
%
-% no (keep)
+% no (keep)
%
% \def\OTRONEsetvsize
% {\ifdim\vsize=\teksthoogte \else
@@ -80,7 +80,7 @@
\else
\noflines\layoutlines
\fi
- \global\vsize\noflines\openlineheight
+ \global\vsize\noflines\openlineheight
\else
\global\vsize\teksthoogte
\fi
@@ -88,12 +88,12 @@
\global\pagegoal\vsize
\fi}
-% \def\OTRONEdopagecontents#1#2% \box<n> \unvbox<n>
-% {\bgroup % niet breedte zetten, kan fractie zijn!
+% \def\OTRONEdopagecontents#1#2% \box<n> \unvbox<n>
+% {\bgroup % niet breedte zetten, kan fractie zijn!
% \setbox0\vbox \ifbottomnotes to \teksthoogte \fi
% {\edef\currentpagedepth{\the\dp#2}% still to be derived from #1
% \dotopinsertions
-% #1#2%
+% #1#2%
% \pushcolor
% \ifgridsnapping
% \vskip-\currentpagedepth
@@ -128,7 +128,7 @@
% \setbox2\hbox
% {\checksinglecolumnfootnotes
% \lower\scratchdimen\vbox{\placebottomnotes}}%
-% \smashbox2% % needed here
+% \smashbox2% % needed here
% \ifbottomnotes
% \ht0\zeropoint
% \fi
@@ -138,10 +138,10 @@
%\def\OTRONEregisteredtextarea#1#2#3%
% {\ifregistertextareas
-% % sub optimal, unvbox is nilled here
-% \setbox#2\vbox{#1#2}%
+% % sub optimal, unvbox is nilled here
+% \setbox#2\vbox{#1#2}%
% \wd#2\zetbreedte % somehow a space creeps in (in unvbox'd #2)
-% \vbox{\registeredtextarea00#2}%
+% \vbox{\registeredtextarea00#2}%
% #3%
% \else
% #1#2#3%
@@ -225,11 +225,11 @@
{\finaloutput\unvbox\normalpagebox}
\OTRONEoutput
- {\sidefloatoutput}
+ {\sidefloatoutput}
-%D Insertions
+%D Insertions
-\newif\iftopofinsert
+\newif\iftopofinsert
\def\OTRONEdosettopinserts
{\bgroup
@@ -336,7 +336,7 @@
\def\OTRONEdosetbothinserts
{\ifflushingfloats
\global\topinserted\zeropoint
- \global\botinserted\zeropoint
+ \global\botinserted\zeropoint
\else
\global\topinserted\zeropoint \OTRONEdosettopinserts
\global\botinserted\zeropoint \OTRONEdosetbotinserts
@@ -345,9 +345,8 @@
\def\OTRONEdotopinsertions
{\ifvoid\topins\else
\ifgridsnapping
- %\topsnaptogrid{\box\topins}
- \box\topins % already snapped
- \else
+ \box\topins % not \topsnaptogrid{\box\topins}%
+ \else
\unvbox\topins
\fi
\fi
@@ -396,17 +395,17 @@
\ifpackflushedfloats
\centerfloatboxfalse
\dogetfloat
- \ifdim\wd\floatbox>\zetbreedte
+ \ifdim\wd\floatbox>\zetbreedte
\global\setbox\floatbox\hbox to \zetbreedte{\hss\box\floatbox\hss}%
\fi
\OTRONEsetvsize
\!!widtha\wd\floatbox
\dofloatflushedinfo
\doloop
- {\ifsomefloatwaiting
+ {\ifsomefloatwaiting
\dosavefloatstatus
\dogetfloat
- \advance\!!widtha 1em % variable
+ \advance\!!widtha 1em % variable
\advance\!!widtha \wd\floatbox\relax
\ifdim\!!widtha>\hsize
\dorestorefloatstatus
@@ -416,7 +415,7 @@
\global\setbox\floatbox\hbox
{\ifcase\columndirection % nog document wide
\ifvoid\savedfloatbox\else
- \ifhbox\savedfloatbox\unhbox\else\box\fi\savedfloatbox\hfil
+ \ifhbox\savedfloatbox\unhbox\else\box\fi\savedfloatbox\hfil
\fi
\ifhbox\floatbox\unhbox\else\box\fi\floatbox
\else
@@ -427,25 +426,25 @@
\fi}%
\dofloatflushedinfo
\fi
- \else
- \exitloop
+ \else
+ \exitloop
\fi}%
\global\setbox\floatbox\hbox to \hsize
{\hfil\ifhbox\floatbox\unhbox\else\box\fi\floatbox\hfil}%
\else
- %\bgroup % \box\floatbox can be in use!? messy
+ %\bgroup % \box\floatbox can be in use!? messy
\dogetfloat
%\doplacefloatbox
%\egroup
\dofloatflushedinfo
\fi
- % there is a chance that due to rounding errors, the float
- % fits on a page where it was first rejected, in which case
- % the prevdepth is -maxdimen and we cannot obey the grid
+ % there is a chance that due to rounding errors, the float
+ % fits on a page where it was first rejected, in which case
+ % the prevdepth is -maxdimen and we cannot obey the grid
\doplacefloatbox
\expandafter\OTRONEdodoflushfloats
\fi}
-
+
% \def\OTRONEdocheckiffloatfits % vervangen ivm downward comp
% {\ifnofloatpermitted
% \global\roomforfloatfalse
@@ -473,16 +472,16 @@
\advance\dimen0 \floattopskip
\advance\dimen0 -\pageshrink % toegevoegd
%\message{c:\the\mofcolumns,t:\the\pagetotal,g:\the\pagegoal}%\wait
- \dimen2\pagegoal
- \relax % needed
+ \dimen2\pagegoal
+ \relax % needed
\ifcase\textfloatmethod
- % method 0 : raw
- \or
- % method 1 : safe
- \dimen2 .99\pagegoal
+ % method 0 : raw
+ \or
+ % method 1 : safe
+ \dimen2 .99\pagegoal
\or
- % method 2 : tight
- \advance\dimen0 -\!!onepoint
+ % method 2 : tight
+ \advance\dimen0 -\!!onepoint
\fi
\relax % really needed ! ! ! !
\ifdim\dimen0>\dimen2
@@ -499,7 +498,7 @@
{\baselinecorrection
\doplacefloatbox
\doinsertfloatinfo
- \dochecknextindentation\??bk}
+ \dochecknextindentation\??bk}
\def\OTRONEsomefixdfloat % [#1]
{\docheckiffloatfits
@@ -535,7 +534,7 @@
\doifinset\v!lang{#1}\flushsidefloatsafterpar
\fi}
-\def\OTRONEsomepagefloat[#1]%
+\def\OTRONEsomepagefloat[#1]%
{%\checkwaitingfloats{#1}%
\global\setbox\collectedpagefloats\vbox
{\unvbox\collectedpagefloats
@@ -581,4 +580,4 @@
\def\OTRONEnextcolumn[#1]%
{}
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/page-sid.tex b/tex/context/base/page-sid.tex
index a85e49ee9..7d98007f8 100644
--- a/tex/context/base/page-sid.tex
+++ b/tex/context/base/page-sid.tex
@@ -83,78 +83,24 @@
\newdimen\sidefloatrightskip
\newdimen\sidefloatmaximum
-% \def\setsidefloatskips
-% {\global\sidefloatrightskip\zeropoint
-% \global\sidefloatleftskip \zeropoint
-% \rightorleftpageaction\donefalse\donetrue
-% \ifdone
-% \ifcase\sidefloattype
-% \or % backspace
-% \global \sidefloatleftskip \snijwit
-% \or % leftedge
-% \global \sidefloatleftskip \rechtermargeafstand
-% \global\advance\sidefloatleftskip \rechtermargebreedte
-% \global\advance\sidefloatleftskip \rechterrandafstand
-% \or % leftmargin
-% \global \sidefloatleftskip \rechtermargeafstand
-% \or % leftside
-% \or % rightside
-% \or % rightmargin
-% \global \sidefloatrightskip\linkermargeafstand
-% \or % rightedge
-% \global \sidefloatrightskip\linkermargeafstand
-% \global\advance\sidefloatrightskip\linkermargebreedte
-% \global\advance\sidefloatrightskip\linkerrandafstand
-% \or % cutspace
-% \global \sidefloatrightskip\rugwit
-% \fi
-% \else
-% \ifcase\sidefloattype
-% \or % backspace
-% \global \sidefloatleftskip \rugwit
-% \or % leftedge
-% \global \sidefloatleftskip \linkermargeafstand
-% \global\advance\sidefloatleftskip \linkermargebreedte
-% \global\advance\sidefloatleftskip \linkerrandafstand
-% \or % leftmargin
-% \global \sidefloatleftskip \linkermargeafstand
-% \or % leftside
-% \or % rightside
-% \or % rightmargin
-% \global \sidefloatrightskip\rechtermargeafstand
-% \or % rightedge
-% \global \sidefloatrightskip\rechtermargeafstand
-% \global\advance\sidefloatrightskip\rechtermargebreedte
-% \global\advance\sidefloatrightskip\rechterrandafstand
-% \or % cutspace
-% \global \sidefloatrightskip\snijwit
-% \fi
-% \fi
-% \ifdim\sidefloatrightskip>\zeropoint
-% \doglobal\advance\sidefloatrightskip\rightskip
-% \fi
-% \ifdim\sidefloatleftskip>\zeropoint
-% \doglobal\advance\sidefloatleftskip\leftskip
-% \fi}
-
\def\checksidefloatshift
{\ifdim\sidefloatmaximum>\zeropoint
- \ifcase\sidefloattype
- % invalid
- \or
+ \ifcase\sidefloattype
+ % invalid
+ \or
% backspace
- \or
+ \or
\global\sidefloatshift-\sidefloatmaximum
\global\advance\sidefloatshift-\rightorleftpageaction \linkerrandafstand \rechterrandafstand
\global\advance\sidefloatshift-\rightorleftpageaction \linkermargebreedte \rechtermargebreedte
\global\advance\sidefloatshift-\rightorleftpageaction \linkermargeafstand \rechtermargeafstand
- \or
+ \or
\global\sidefloatshift-\sidefloatmaximum
\global\advance\sidefloatshift-\rightorleftpageaction \linkermargeafstand \rechtermargeafstand
\or
- % left
+ % left
\or
- % right
+ % right
\or
\global\sidefloatshift-\sidefloatmaximum
\global\advance\sidefloatshift-\rightorleftpageaction \linkermargeafstand \rechtermargeafstand
@@ -164,7 +110,7 @@
\global\advance\sidefloatshift-\rightorleftpageaction \linkermargebreedte \rechtermargebreedte
\global\advance\sidefloatshift-\rightorleftpageaction \linkermargeafstand \rechtermargeafstand
\or
- % cutspace
+ % cutspace
\fi
\fi}
@@ -172,7 +118,7 @@
{\global\sidefloatrightskip\zeropoint
\global\sidefloatleftskip \zeropoint
\ifcase\sidefloattype
- \or % backspace
+ \or % backspace
\global \sidefloatleftskip \rightorleftpageaction \rugwit \snijwit
\or % leftedge
\global \sidefloatleftskip \rightorleftpageaction \linkermargeafstand\rechtermargeafstand
@@ -188,14 +134,14 @@
\global \sidefloatrightskip\rightorleftpageaction \rechtermargeafstand\linkermargeafstand
\global\advance\sidefloatrightskip\rightorleftpageaction \rechtermargebreedte\linkermargebreedte
\global\advance\sidefloatrightskip\rightorleftpageaction \rechterrandafstand\linkerrandafstand
- \or % cutspace
+ \or % cutspace
\global \sidefloatrightskip\rightorleftpageaction \snijwit\rugwit
\fi
\ifdim\sidefloatrightskip>\zeropoint
- \doglobal\advance\sidefloatrightskip\rightskip
+ \doglobal\advance\sidefloatrightskip\rightskip
\fi
\ifdim\sidefloatleftskip>\zeropoint
- \doglobal\advance\sidefloatleftskip\leftskip
+ \doglobal\advance\sidefloatleftskip\leftskip
\fi}
% eq is still crap
@@ -229,7 +175,7 @@
%
% no, too buggy, leads to top of page crap
%
-%\def\flushsidefloats%
+%\def\flushsidefloats
% {\par
% \dochecksidefloat
% \scratchcounter=-\hangafter
@@ -439,19 +385,19 @@
{\everypar\emptytoks\forgetall\verticalstrut\vskip-\struttotal}% moved
\checksidefloatshift
\ifdim\sidefloatshift=\zeropoint \relax
- \ifnum\sidefloattype=4
+ \ifnum\sidefloattype=4
\global\advance\sidefloatshift\sidefloatextrashift
\global\sidefloatextrashift\zeropoint
- \else\ifnum\sidefloattype=5
+ \else\ifnum\sidefloattype=5
\global\advance\sidefloatshift\sidefloatextrashift
\global\sidefloatextrashift\zeropoint
- \fi\fi
+ \fi\fi
\else
- \ifnum\sidefloattype<4
- \global\chardef\sidefloattype4
- \else\ifnum\sidefloattype>5
- \global\chardef\sidefloattype5
- \fi\fi
+ \ifnum\sidefloattype<4
+ \global\chardef\sidefloattype4
+ \else\ifnum\sidefloattype>5
+ \global\chardef\sidefloattype5
+ \fi\fi
\fi
\previoussidefloat
\stallsidefloat
@@ -462,9 +408,9 @@
% \kern\ifrightfloat\sidefloatshift\else-\sidefloatextrashift\fi
% \ifmarginfloat\else\ifrightfloat\kern\sidefloatrightshift\fi\fi}%
\global\setbox\floatbox\hbox % no \hskip, but \kern here
- {\ifnum\sidefloattype=4
+ {\ifnum\sidefloattype=4
\hskip\sidefloatleftshift
- \else\ifnum\sidefloattype=1
+ \else\ifnum\sidefloattype=1
\hskip\sidefloatleftshift
\fi\fi
\ifnum\sidefloattype>4
@@ -478,9 +424,9 @@
\else
\kern-\sidefloatextrashift
\fi
- \ifnum\sidefloattype=8
+ \ifnum\sidefloattype=8
\kern\sidefloatrightshift
- \else\ifnum\sidefloattype=5
+ \else\ifnum\sidefloattype=5
\kern\sidefloatrightshift
\fi\fi}%
\ifnum\sidefloatalign=4
@@ -552,13 +498,13 @@
\def\measuresidefloat
{\global\floatflagtrue
\global\sidefloatpagetotal \pagetotal % global
- \ifnum\sidefloattype<4
+ \ifnum\sidefloattype<4
\global \sidefloatwidth \zeropoint
\else\ifnum\sidefloattype>5
\global \sidefloatwidth \zeropoint
\else
\global \sidefloatwidth \wd\floatbox
- \global\advance\sidefloatwidth \floatsideskip
+ \global\advance\sidefloatwidth \floatsideskip
\fi\fi
\ifdim\sidefloatwidth<\zeropoint
\global\sidefloatwidth\zeropoint
@@ -616,7 +562,7 @@
\relax
\ifcase\sidefloattype
% invalid
- \or % backspace
+ \or % backspace
\noindent\llap{\rlap{\box\floatbox}\hskip\sidefloatleftskip}\hfill
\or % leftedge
\noindent\llap{\box\floatbox\hskip\sidefloatleftskip}\hfill
diff --git a/tex/context/base/setupb.tex b/tex/context/base/setupb.tex
index 6af370078..4d6c35081 100644
--- a/tex/context/base/setupb.tex
+++ b/tex/context/base/setupb.tex
@@ -1615,11 +1615,11 @@
[\c!binnen]
[\c!command!]
[]
- \variable
+ \variable
[\c!regelcorrectie]
[\v!aan,\v!uit]
[\v!aan]
- \variable
+ \variable
[\c!dieptecorrectie]
[\v!aan,\v!uit]
[\v!aan]
@@ -3308,15 +3308,15 @@
[\c!snijwit]
[\c!dimension!]
[]
- \variable
+ \variable
[\c!tekstafstand]
[\c!dimension!]
[]
- \variable
+ \variable
[\c!tekstbreedte]
[\c!number!]
[]
- \variable
+ \variable
[\c!tekstmarge]
[\c!dimension!]
[]
@@ -3367,7 +3367,7 @@
\type
[\c!opt!\c!vals!]
\value
- [\v!boven,\v!beide,\v!onder,-\v!boven,-\v!beide,-\v!onder,
+ [\v!boven,\v!beide,\v!onder,-\v!boven,-\v!beide,-\v!onder,\v!tekst,
\v!hoog,\v!midden,\v!laag,\v!pagina,\v!geen,\v!standaard,
\v!ruim,\v!passend,\v!diepte,\v!regel,\c!dimension!]
[\v!standaard]
@@ -3515,7 +3515,7 @@
[\v!start]
\variable
[\c!breedte]
- [\c!dimension!]
+ [\c!dimension!]
[]
\variable
[\c!commando]
@@ -3622,6 +3622,10 @@
[\c!commando]
[\c!twoarguments!]
[]
+ \variable
+ [\c!marge]
+ [\c!dimension!]
+ [0pt]
\stopsetup
\startsetup
@@ -3638,6 +3642,10 @@
[\v!passend,\v!ruim,\v!max,\c!dimension!]
[\v!passend]
\variable
+ [\c!minbreedte]
+ [\v!passend,\c!dimension!]
+ [\v!passend]
+ \variable
[\c!kopletter]
[\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
[\v!vet]
@@ -3678,6 +3686,10 @@
[\c!text!]
[.]
\variable
+ [\c!commando]
+ [\c!command!]
+ []
+ \variable
[\c!afstand]
[\c!dimension!]
[1em]
@@ -3769,9 +3781,9 @@
[\c!rechtermargeafstand]
[\c!dimension!]
[\!!zeropoint]
- \variable
+ \variable
[\c!zijuitlijnen]
- [\v!normaal,\v!regel]
+ [\v!normaal,\v!regel]
[\v!normaal]
\inheritvariables
[\y!setupframed]
@@ -3987,11 +3999,11 @@
[\c!scheider]
[\c!text!]
[~]
- \variable
+ \variable
[\c!autofile]
[\v!ja,\v!nee,\v!pagina]
[\v!nee]
- \variable
+ \variable
[\c!globaal]
[\v!ja,\v!nee]
[\v!nee]
@@ -4112,7 +4124,7 @@
\startsetup
\command
[\y!listsymbol]
- \type
+ \type
[\c!val!\c!arg!]
\value
[\c!identifier!]
@@ -4431,7 +4443,7 @@
[{)}]
\variable
[\c!uitlijnen]
- [\v!links,\v!midden,\v!rechts]
+ [\v!links,\v!midden,\v!rechts]
[]
\variable
[\c!strut]
@@ -5062,11 +5074,11 @@
[]
\variable
[\c!plaatskop]
- [\v!ja,\v!nee,\v!leeg] % leeg: wel markering
+ [\v!ja,\v!nee,\v!leeg] % leeg: wel markering
[\v!ja]
\variable
[\c!verhoognummer]
- [\v!ja,\v!nee,\v!lijst,\c!filename!] % lijst: wel lijstentry
+ [\v!ja,\v!nee,\v!lijst,\c!filename!] % lijst: wel lijstentry
[\v!ja]
\variable
[\c!resetnummer]
@@ -5837,7 +5849,7 @@
[\c!number!]
[]
\value
- [\v!dag,\v!dag+,\v!maand,\v!weekdag,\v!jaar, % \v!WEEKDAG,\v!MAAND,
+ [\v!dag,\v!dag+,\v!maand,\v!weekdag,\v!jaar, % \v!WEEKDAG,\v!MAAND,
dd,dd+,mm,jj,yy,d,d+,m,j,y,\v!kenmerk]
[\v!dag,\v!maand,\v!jaar]
\stopsetup
@@ -6432,11 +6444,11 @@
[]
\variable
[\c!linkermargeafstand]
- [\c!dimension!]
+ [\c!dimension!]
[0pt]
\variable
[\c!rechtermargeafstand]
- [\c!dimension!]
+ [\c!dimension!]
[0pt]
\variable
[\c!plaats]
@@ -7042,6 +7054,10 @@
[\c!lijn]
[\v!normaal,\v!regel]
[\v!regel]
+ \variable
+ [\c!splitsen]
+ [\v!ja,\v!nee]
+ [\v!ja]
\stopsetup
\startsetup
@@ -8418,6 +8434,14 @@
[\c!optie]
[\v!max,\v!buffer]
[]
+ \variable
+ [\c!marge]
+ [\c!dimension!]
+ [2.5em]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [1em]
\stopsetup
\startsetup
diff --git a/tex/context/base/spec-def.tex b/tex/context/base/spec-def.tex
index 7dc74e59a..e0b472603 100644
--- a/tex/context/base/spec-def.tex
+++ b/tex/context/base/spec-def.tex
@@ -895,10 +895,10 @@
%D {doattachfile}
%D
%D \starttypen
-%D \doattachfile{title}{width}{height}{color}{symbol}{file}
+%D \doattachfile{title}{width}{height}{depth}{color}{symbol}{filename}{source}
%D \stoptypen
-\installspecial [\doattachfile] [or] [6]
+\installspecial [\doattachfile] [or] [8]
%D Experimental (properties):
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
index 387f07b10..7b6a4b6fc 100644
--- a/tex/context/base/spec-fdf.tex
+++ b/tex/context/base/spec-fdf.tex
@@ -11,12 +11,14 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D For the moment we keep this downward compatible hack:
+%D For the moment we keep this downward compatible hack:
-%% see end of file
+% todo: \depth van symbol appearance controleren
-%D We need to check if we can use \type {\driverreferenced}
-%D object in more places.
+%% see end of file
+
+%D We need to check if we can use \type {\driverreferenced}
+%D object in more places.
%D Initialization of fields is tricky. If a field has no
%D value, it is kind of not there. If ResetForm is used, the
@@ -362,14 +364,14 @@
% \global\let\currentPDFtrimboxspec\currentPDFcropboxspec
%
% \xdef\currentPDFpagemode
-% {/PageMode \ifcase#6
+% {/PageMode \ifcase#6
% /UseNone\or/FullScreen\or/UseOutlines\else/UseNone\fi}%
%
\xdef\currentPDFpagemode
- {\ifnum#6=4
+ {\ifnum#6=4
/PageLayout /TwoColumnRight
\else
- /PageMode \ifcase#6
+ /PageMode \ifcase#6
/UseNone\or/FullScreen\or/UseOutlines\else/UseNone\fi
\fi}%
\xdef\currentPDFviewerprefs % space after #6 needed, else \relax
@@ -526,7 +528,7 @@
%D The goto macros use the switch \type{\ifsecondaryreference}
%D to determine if actions should be linked.
-\def\locationfilesuffix{pdf}
+\def\locationfilesuffix{pdf}
% \def\preparePDFlocationfile#1#2%
% {\setreferencefilename#1\to#2%
@@ -578,7 +580,7 @@
\def\doPDFstartgotorealpage#1#2#3#4#5% watch the R append trick
{\bgroup
- \doifelsenothing{#3}% #1 = url
+ \doifelsenothing{#3}% #1 = url
{\scratchcounter0#5\relax
\ifnum\scratchcounter>0
\advance\scratchcounter \minusone % pdf starts numbering at zero
@@ -680,7 +682,7 @@
% bit 6 = xml
% bit 4 = get
-\ifx\PDFsubmitfiller\undefined \let\PDFsubmitfiller\empty \fi
+\ifx\PDFsubmitfiller\undefined \let\PDFsubmitfiller\empty \fi
\chardef\PDFformmethod=1 % 0=GET 1=POST
@@ -697,7 +699,7 @@
\or \PDFformflag{40}{32} % 3=XML
\else \PDFformflag{12} {4} % ?=unknown
\fi
- /F (\argumentA)\PDFsubmitfiller}
+ /F (\argumentA)\PDFsubmitfiller}
% urifill permits url substitution
@@ -747,9 +749,9 @@
% \edef\next{\doPDFactionobject
% class {\PDFobjectclass} name {\PDFobjectname} }%
% \globalletempty\PDFobjectclass
-% \globalletempty\PDFobjectname
-% \fi
-% \next
+% \globalletempty\PDFobjectname
+% \fi
+% \next
\doPDFaction
width #1 height #2
action {\action \secondaryPDFreferences}%
@@ -906,48 +908,43 @@
\ifx\pdf@@actions\empty\else/A << \pdf@@actions >>\fi}}%
\egroup}
-%D \macros
-%D {doPDFattachfile}
+%D \macros
+%D {doPDFattachfile}
-\def\doPDFfilestreamobject class #1 name #2 file #3%
+\def\doPDFfilestreamobject class #1 name #2 file #3 source #4%
{}
-\def\doPDFattachfile#1#2#3#4#5#6%
+\def\doPDFattachfile#1#2#3#4#5#6#7#8%
{\bgroup % title width height color symbol file
- \edef\PDFfile{#6}\convertcommand\PDFfile\to\PDFfile
- % beware: the symbol may (indirectly) use the file
- % reference when typesetting the object number;
- \presetPDFsymbolappearance{#4}{#5}% sets width/height
- \setbox\scratchbox\vbox to #3
- {\vfill
- \doifnotflagged{a:\PDFfile}%
- {\doPDFfilestreamobject class PDFEF name {\PDFfile} file {#6}%
- \doglobal\setflag{a:\PDFfile}}%
- \doPDFgetobjectreference{PDFEF}\PDFfile\PDFobjectreference
- \doPDFannotation width {\width} height {\height} data
- {/Subtype /FileAttachment
- /FS \PDFobjectreference\space
- /Contents (#1)
- \PDFsymbol
- \PDFattributes}%
- \vskip#3%
- \vskip-\height}%
- \smashbox\scratchbox
- \wd\scratchbox\width
- \ht\scratchbox\height
- \box\scratchbox
+ \edef\PDFfile{#8}\convertcommand\PDFfile\to\PDFfile
+ % beware: the symbol may (indirectly) use the file
+ % reference when typesetting the object number;
+ \presetPDFsymbolappearance{#5}{#6}{#2}{#3}{#4}% sets width/height
+ \startPDFsymbolappearance
+ \doifnotflagged{a:\PDFfile}%
+ {\doPDFfilestreamobject
+ class PDFEF name {\PDFfile} file {#7} source {#8}%
+ \doglobal\setflag{a:\PDFfile}}%
+ \doPDFgetobjectreference{PDFEF}\PDFfile\PDFobjectreference
+ \doPDFannotation width {\width} height {\totalheight} data
+ {/Subtype /FileAttachment
+ /FS \PDFobjectreference\space
+ /Contents (#1)
+ \PDFsymbol
+ \PDFattributes}%
+ \stopPDFsymbolappearance
\egroup}
\definespecial \doattachfile {\doPDFattachfile}
% requested by Jens-Uwe Morawski: permits usage of pdftosrc
% in viewers that don't support attachments:
-%
+%
% \definesymbol
% [ObjectNumber]
% % [object number {\PDFattachmentnumber[xx]}] % named
% [object number \PDFattachmentnumber] % current
-%
+%
% \useattachment[test][xx][test.tex]
% \setupattachments[symbol=ObjectNumber]
% \attachment[test]
@@ -1522,7 +1519,7 @@
\registerFDFobject{#1}%
\or
\doPDFgetobjectreference{FDF}\currentFDFparent\PDFobjectreference
- \global\objectreferencingtrue
+ %\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
{/Subtype /Widget
/Parent \PDFobjectreference
@@ -1534,7 +1531,7 @@
\FDFactions}%
\or
\doPDFgetobjectreference{FDF}\currentFDFparent\PDFobjectreference
- \global\objectreferencingtrue
+ %\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
{/Subtype /Widget
/Parent \PDFobjectreference
@@ -1579,7 +1576,7 @@
\registerFDFobject{#1}%
\or
\doPDFgetobjectreference{FDF}\currentFDFparent\PDFobjectreference
- \global\objectreferencingtrue
+ %\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
{/Subtype /Widget
/Parent \PDFobjectreference
@@ -1590,7 +1587,7 @@
\FDFactions}%
\or
\doPDFgetobjectreference{FDF}\currentFDFparent\PDFobjectreference
- \global\objectreferencingtrue
+ %\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
{/Subtype /Widget
/Parent \PDFobjectreference
@@ -1646,7 +1643,7 @@
\or
\doFDFappearance{On}{#6}{#8}%
\doPDFgetobjectreference{FDF}\currentFDFparent\PDFobjectreference
- \global\objectreferencingtrue
+ %\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
{/Subtype /Widget
/Parent \PDFobjectreference\space
@@ -1662,7 +1659,7 @@
\or
\doFDFappearance{On}{#6}{#8}%
\doPDFgetobjectreference{FDF}\currentFDFparent\PDFobjectreference
- \global\objectreferencingtrue
+ %\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
{/Subtype /Widget
/Parent \PDFobjectreference\space
@@ -1717,7 +1714,7 @@
%\doFDFappearance{#1}{#7}{1}%
\doFDFappearance{\currentFDFparent}{#7}{1}%
\doPDFgetobjectreference{FDF}\currentFDFparent\PDFobjectreference
- \global\objectreferencingtrue % nb
+ %\global\objectreferencingtrue % nb
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
{/Subtype /Widget
/Parent \PDFobjectreference\space
@@ -1729,7 +1726,7 @@
%\doFDFappearance{#1}{#7}{1}%
\doFDFappearance{\currentFDFparent}{#7}{1}%
\doPDFgetobjectreference{FDF}\currentFDFparent\PDFobjectreference
- \global\objectreferencingtrue
+ %\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
{/Subtype /Widget
/Parent \PDFobjectreference\space
@@ -2082,8 +2079,13 @@
%D This will be reimplemented using the mapping mechanism.
+% \def\enablePDFdocencoding
+% {\reducetocoding[pdfdoc]\simplifycommands}
+
\def\enablePDFdocencoding
- {\reducetocoding[pdfdoc]\simplifycommands}
+ {\enablecoding[pdfdoc]
+ \enablelanguagespecifics[\currentlanguage]% redundant ?
+ \simplifycommands}
\long\def\sanitizePDFdocencoding#1\to#2%
{\enablePDFcrlf
@@ -2096,6 +2098,7 @@
\gdef\enablePDFcrlf%
{\def\\{\string\r}%
\def\par{\\\\}%
+ \def\endgraf{\\\\}%
\catcode`\^^M=\@@active%
\let^^M=\\}
\egroup
@@ -2118,7 +2121,7 @@
%D text annotations.
% starting point (keep this)
-%
+%
% \long\def\doPDFinsertcomment#1#2#3#4#5#6#7#8%
% {\bgroup % title width height color open symbol collect data
% \doifelsenothing{#1}
@@ -2155,72 +2158,68 @@
\long\def\doPDFinsertcomment#1#2#3#4#5#6#7#8%
{\bgroup % title width height color open symbol collect data
- \presetPDFsymbolappearance{#4}{#6}% sets width/height
+ \presetPDFsymbolappearance{#4}{#6}{#2}{#3}\!!zeropoint% sets width/height
\doifelsenothing{#1}
{\let\PDFidentifier\empty}
{\def\PDFidentifier{/T (#1)}}%
\sanitizePDFencoding#8\to\PDFdata
- \setbox\scratchbox\vbox to #3
- {\vfill
- \ifPDFpopupcomments
- \doglobal\increment\nofFDFcomments
- \doifobjectreferencefoundelse{FDF}{c:\nofFDFcomments}
- {\doPDFgetobjectreference{FDF}{c:\nofFDFcomments}\PDFobjectreference
- \donetrue}
- \donefalse
- \ifdone
- \setbox\scratchbox\hbox
+ \startPDFsymbolappearance
+ \ifPDFpopupcomments
+ \doglobal\increment\nofFDFcomments
+ \doifobjectreferencefoundelse{FDF}{c:\nofFDFcomments}
+ {\doPDFgetobjectreference{FDF}{c:\nofFDFcomments}\PDFobjectreference
+ \donetrue}
+ \donefalse
+ \ifdone
+ \setbox\scratchbox\hbox
+ % pdftex (efficient)
+ % {\doPDFannotation
+ % generic (less efficient)
+ {\doPDFannotationobject class FDF name {c::\nofFDFcomments}
+ % argument (common)
+ width #2 height #3 data % text window
+ {/Subtype /Popup
+ /Parent \PDFobjectreference}}%
+ \ifcase#7\relax
+ \vbox to \height{\forgetall\vskip#3\box\scratchbox\vss}%
+ \else % incredible trial and error hack
+ \global\setbox\PDFsymbolbox\vbox
+ {\hsize#2%
+ \forgetall
+ \vsmash{\box\PDFsymbolbox}
+ \box\scratchbox}%
+ \fi
+ \fi
+ % generic
+ \doifobjectreferencefoundelse{FDF}{c::\nofFDFcomments}
+ {\doPDFgetobjectreference{FDF}{c::\nofFDFcomments}\PDFobjectreference
+ \donetrue}
+ \donefalse
+ \doPDFannotationobject class FDF name {c:\nofFDFcomments}
+ width {\width} height {\height} data
+ {/Subtype /Text
+ \ifcase#5 \else/Open true\fi
% pdftex (efficient)
- % {\doPDFannotation
+ % \ifdone /Popup \the\pdflastannot\space 0 R\fi
% generic (less efficient)
- {\doPDFannotationobject class FDF name {c::\nofFDFcomments}
- % argument (common)
- width #2 height #3 data % text window
- {/Subtype /Popup
- /Parent \PDFobjectreference}}%
- \ifcase#7\relax
- \vbox to \height{\forgetall\vskip#3\box\scratchbox\vss}%
- \else % incredible trial and error hack
- \global\setbox\PDFsymbolbox\vbox
- {\hsize#2%
- \forgetall
- \vsmash{\box\PDFsymbolbox}
- \box\scratchbox}%
- \fi
- \fi
- % generic
- \doifobjectreferencefoundelse{FDF}{c::\nofFDFcomments}
- {\doPDFgetobjectreference{FDF}{c::\nofFDFcomments}\PDFobjectreference
- \donetrue}
- \donefalse
- \doPDFannotationobject class FDF name {c:\nofFDFcomments}
- width {\width} height {\height} data
- {/Subtype /Text
- \ifcase#5 \else/Open true\fi
- % pdftex (efficient)
- % \ifdone /Popup \the\pdflastannot\space 0 R\fi
- % generic (less efficient)
- \ifdone /Popup \PDFobjectreference\fi
- /Contents \ifPDFunicode <\PDFdata> \else(\PDFdata) \fi
- \PDFidentifier
- \PDFsymbol
- \PDFattributes}%
- \vskip#3%
- \vskip-\height
- \else
- \doPDFannotation width #2 height #3 data
- {/Subtype /Text
- \ifcase#5 \else/Open true\fi
- /Contents \ifPDFunicode <\PDFdata> \else(\PDFdata) \fi
- \PDFsymbol
- \PDFidentifier
- \PDFattributes}%
- \fi}%
- \smashbox\scratchbox
- \box\scratchbox
+ \ifdone /Popup \PDFobjectreference\fi
+ /Contents \ifPDFunicode <\PDFdata> \else(\PDFdata) \fi
+ \PDFidentifier
+ \PDFsymbol
+ \PDFattributes}%
+ \else
+ \doPDFannotation width #2 height #3 data
+ {/Subtype /Text
+ \ifcase#5 \else/Open true\fi
+ /Contents \ifPDFunicode <\PDFdata> \else(\PDFdata) \fi
+ \PDFsymbol
+ \PDFidentifier
+ \PDFattributes}%
+ \fi
+ \stopPDFsymbolappearance
\egroup}
-% symbols with a reasonable default of 18/24 pt
+% symbols with a reasonable default of 18/24 pt
\newbox\PDFsymbolbox
@@ -2236,12 +2235,25 @@
\def\PDFsymbolAttachment{/Attachment}
\def\PDFsymbolTag {/Tag}
-\def\presetPDFsymbolappearance#1#2%
+\def\startPDFsymbolappearance
+ {\setbox\scratchbox\vbox to \totalheight \bgroup \vfill}
+
+\def\stopPDFsymbolappearance
+ {\egroup
+ \setbox\scratchbox\hbox{\lower\depth\box\scratchbox}%
+ \wd\scratchbox\width
+ \ht\scratchbox\height
+ \dp\scratchbox\depth
+ \box\scratchbox}
+
+\def\presetPDFsymbolappearance#1#2#3#4#5% symbol color width height depth
{\doifelsenothing{#1}
{\let\PDFattributes\empty}
{\def\PDFattributes{/C \FDFcolor{#1}}}%
- \def\width {1.5\bodyfontsize}%
- \def\height{\bodyfontsize}%
+ \scratchdimen#3\edef\width {\the\scratchdimen}%
+ \scratchdimen#4\edef\height{\the\scratchdimen}%
+ \scratchdimen#5\edef\depth {\the\scratchdimen}%
+ \advance\scratchdimen\height\edef\totalheight{\the\scratchdimen}%
\doifelsenothing{#2}
{\let\PDFsymbol\empty}
{\ifundefined{PDFsymbol#2}%
@@ -2267,6 +2279,9 @@
\setbox\scratchbox\hbox{\symbol[#1]}%
\edef\width {\the\wd\scratchbox}%
\edef\height{\the\ht\scratchbox}%
+ \edef\depth {\the\dp\scratchbox}%
+ \scratchdimen\height \advance\scratchdimen\depth
+ \edef\totalheight{\the\scratchdimen}%
\doPDFgetobjectreference{SYM}{#1}\FDFsymbolNappearance
\doPDFgetobjectreference{SYM}{#2}\FDFsymbolDappearance
\edef\PDFsymbol
@@ -2394,7 +2409,7 @@
\def\doPDFregistersomespotcolor#1#2#3#4%
{\writestatus\m!systems{missing spot color definition}\wait}
-\def\doPDFregisternonecolor % internal command
+\def\doPDFregisternonecolor % internal command
{\doPDFregistergrayspotcolor{None}{1}%
\globallet\doPDFregisternonecolor\relax}
@@ -2502,12 +2517,12 @@
\fi}
% \let\doPDFstoptransparency\relax
-%
-% This is tricky: because a text stream is handled before
-% the page body is built, we can run into stops that will
-% match an outer start; however, the stop is needed in case
-% of a text color: [text color text] [other color text] on a
-% first page combined with color splitting will go wrong if
+%
+% This is tricky: because a text stream is handled before
+% the page body is built, we can run into stops that will
+% match an outer start; however, the stop is needed in case
+% of a text color: [text color text] [other color text] on a
+% first page combined with color splitting will go wrong if
% we stick to the relaxing method.
\def\doPDFstoptransparency
@@ -2532,68 +2547,68 @@
\definespecial\dostartgraphicgroup{\PDFcode{q}}
\definespecial\dostopgraphicgroup {\PDFcode{Q}}
-%D Even newer trickery:
+%D Even newer trickery:
\definespecial\dostartviewerlayer {\doPDFstartlayer}
\definespecial\dostopviewerlayer {\doPDFstoplayer}
\definespecial\dodefineviewerlayer{\doPDFdefinelayer}
-\let\PDFtextlayers\empty
-\let\PDFpagelayers\empty
-\let\PDFhidelayers\empty
-\let\PDFvidelayers\empty
+\let\PDFtextlayers\empty
+\let\PDFpagelayers\empty
+\let\PDFhidelayers\empty
+\let\PDFvidelayers\empty
\def\doPDFstartlayer#1{\PDFcode{/OC /#1 BDC}}
\def\doPDFstoplayer {\PDFcode {EMC}}
% resource -> prop -> mc's -> OCG|OCMD (nested)
-% ocg:
+% ocg:
% /Intent/Design
-% ocmd
+% ocmd
% /P /AllOn
-% kan zelf ocmd bevatten
+% kan zelf ocmd bevatten
-\def\doPDFdefinelayer#1#2#3#4#5% tag title visible type printable
-% {\driverreferenced \doPDFdictionaryobject class PDLN name #1 data
- {\doPDFdictionaryobject class PDLN name #1 data
- {/Type /OCG
+\def\doPDFdefinelayer#1#2#3#4#5% tag title visible type printable
+% {\driverreferenced \doPDFdictionaryobject class PDLN name #1 data
+ {\doPDFdictionaryobject class PDLN name #1 data
+ {/Type /OCG
\ifcase#4 \or
- /Intent /Design % disable layer hiding by user
- \fi
+ /Intent /Design % disable layer hiding by user
+ \fi
\ifcase#5 \or
- /Usage << /Print << /PrintState /OFF >> >> % printable or not
- \fi
+ /Usage << /Print << /PrintState /OFF >> >> % printable or not
+ \fi
/Name (#2)}%
- \doPDFgetobjectreference{PDLN}{#1}\PDFobjectreference
+ \doPDFgetobjectreference{PDLN}{#1}\PDFobjectreference
\xdef\PDFtextlayers{\PDFtextlayers\space\PDFobjectreference}%
\ifcase#3\relax
\xdef\PDFhidelayers{\PDFhidelayers\space\PDFobjectreference}%
- \or
+ \or
\xdef\PDFvidelayers{\PDFvidelayers\space\PDFobjectreference}%
\fi
- %\driverreferenced \doPDFdictionaryobject class PDLD name #1 data
- \doPDFdictionaryobject class PDLD name #1 data
- {/Type /OCMD
+ %\driverreferenced \doPDFdictionaryobject class PDLD name #1 data
+ \doPDFdictionaryobject class PDLD name #1 data
+ {/Type /OCMD
/OCGs [\PDFobjectreference]}%
- \doPDFgetobjectreference{PDLD}{#1}\PDFobjectreference
+ \doPDFgetobjectreference{PDLD}{#1}\PDFobjectreference
\xdef\PDFpagelayers{\PDFpagelayers\space /#1 \PDFobjectreference}}
-\def\flushPDFtextlayers
+\def\flushPDFtextlayers
{\ifx\PDFtextlayers\empty \else
\driverreferenced \doPDFarrayobject class PDF name textlayers data {\PDFtextlayers}%
\doPDFgetobjectreference{PDF}{textlayers}\!!stringa
- \ifx\PDFhidelayers\empty
+ \ifx\PDFhidelayers\empty
\def\!!stringb{[null]}%
\else
\driverreferenced \doPDFarrayobject class PDF name hidelayers data {\PDFhidelayers}%
\doPDFgetobjectreference{PDF}{hidelayers}\!!stringb
\fi
- \ifx\PDFvidelayers\empty
+ \ifx\PDFvidelayers\empty
\def\!!stringc{[null]}%
\else
\driverreferenced \doPDFarrayobject class PDF name videlayers data {\PDFvidelayers}%
@@ -2601,38 +2616,38 @@
\fi
\doPDFaddtocatalog
{/OCProperties
- << % display in menu
- /D << /Order \!!stringa
- /On \!!stringb
+ << % display in menu
+ /D << /Order \!!stringa
+ /On \!!stringb
/Off \!!stringc >>
- % used properties
+ % used properties
/OCGs \!!stringa >>}%
\globallet\flushPDFtextlayers\relax
- \fi}
+ \fi}
-\def\flushPDFpagelayers
- {\ifx\PDFpagelayers\empty \else
+\def\flushPDFpagelayers
+ {\ifx\PDFpagelayers\empty \else
\doPDFpageresource{/Properties <<\PDFpagelayers>>}%
- \fi}
+ \fi}
-\prependtoksonce \flushPDFpagelayers \to \everyshipout
-\prependtoksonce \flushPDFtextlayers \to \everylastshipout
+\prependtoksonce \flushPDFpagelayers \to \everyshipout
+\prependtoksonce \flushPDFtextlayers \to \everylastshipout
-\def\PDFlayeractionlist{null} % \PDFlayeractionlist{5 0 R}
+\def\PDFlayeractionlist{null} % \PDFlayeractionlist{5 0 R}
-\def\PDFexecutehidelayer {/SetOCGState /State [/OFF \PDFlayeractionlist]}
-\def\PDFexecutevidelayer {/SetOCGState /State [/ON \PDFlayeractionlist]}
-\def\PDFexecutetogglelayer {/SetOCGState /State [/Toggle \PDFlayeractionlist]}
+\def\PDFexecutehidelayer {/SetOCGState /State [/OFF \PDFlayeractionlist]}
+\def\PDFexecutevidelayer {/SetOCGState /State [/ON \PDFlayeractionlist]}
+\def\PDFexecutetogglelayer {/SetOCGState /State [/Toggle \PDFlayeractionlist]}
\def\domakeviewerlayerlist#1%
{\bgroup
\globallet\PDFlayeractionlist\empty
\def\docommando##1%
- {\doPDFgetobjectreference{PDLN}{##1}\PDFobjectreference
+ {\doPDFgetobjectreference{PDLN}{##1}\PDFobjectreference
\xdef\PDFlayeractionlist{\PDFlayeractionlist\space\PDFobjectreference}}%
\processcommalist[#1]\docommando
\egroup}
-
+
%D And that was all.
\stopspecials
@@ -2646,6 +2661,6 @@
\let\doPDFstarttransparency\gobbletwoarguments
\let\doPDFstoptransparency\relax
-\fi
+\fi
\protect \endinput
diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex
index 235ba81b1..bf062854b 100644
--- a/tex/context/base/spec-tpd.tex
+++ b/tex/context/base/spec-tpd.tex
@@ -1146,8 +1146,8 @@
\let\PDFlaststreamobject\s!unknown
-\def\doPDFfilestreamobject class #1 name #2 file #3%
- {\immediate\pdfobj stream file{#3}%
+\def\doPDFfilestreamobject class #1 name #2 file #3 source #4%
+ {\immediate\pdfobj stream file{#4}%
\edef\PDFlaststreamobject{\the\pdflastobj}%
\dosetobjectreference{PDFFS}{#2}{\PDFlaststreamobject}%
\doPDFdictionaryobject class {#1} name {#2} data
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index ad8889d78..a0e26d29e 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -1345,6 +1345,12 @@
\egroup}%
\normalvbox}
+%D \macros
+%D {struttedbox}
+%D
+%D This boxing macro limits the height and depth to those of
+%D a strut.
+
\def\struttedbox
{\normalhbox\bgroup % new ! ! !
\dowithnextbox
@@ -1353,6 +1359,23 @@
\flushnextbox
\egroup}%
\normalhbox}
+
+%D \macros
+%D {topskippedbox}
+%D
+%D This macro compensates the difference between the topskip
+%D and strutheight. Watch how we preserve the depth when it
+%D equals strutdepth.
+
+\def\topskippedbox
+ {\normalhbox\bgroup
+ \dowithnextbox
+ {\edef\next
+ {\ifdim\strutdepth=\nextboxdp\nextboxdp\the\nextboxdp\fi}%
+ \lower\topskip\normalhbox{\raise\strutheight\flushnextbox}%
+ \next
+ \egroup}%
+ \normalhbox}
%D \macros
%D {centeredbox, centerednextbox}
diff --git a/tex/context/base/supp-eps.tex b/tex/context/base/supp-eps.tex
index 7370c0fbc..8f4251041 100644
--- a/tex/context/base/supp-eps.tex
+++ b/tex/context/base/supp-eps.tex
@@ -104,7 +104,7 @@
\global\let\MPllx\EPSllx \global\let\MPlly\EPSlly
\global\let\MPurx\EPSurx \global\let\MPury\EPSury}
-\bgroup \catcode`\%=\@@other \gdef\letterpercent{\string%} \egroup
+\bgroup \catcode`\%=\@@other \xdef\letterpercent{\string%} \egroup
\def\EPSboundingboxtag {BoundingBox}
\def\EPShiresboundingboxtag{HiResBoundingBox}
diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex
index f05279c3a..6c51a94d8 100644
--- a/tex/context/base/supp-lan.tex
+++ b/tex/context/base/supp-lan.tex
@@ -14,12 +14,15 @@
%D This module needs a drastic update: can be made simplier
%D and faster; code can move to core module.
-%D \gdef\starttest%
+%D Also, commenting the previous versions code will clear up
+%D some memory.
+
+%D \gdef\starttest
%D {\blanko
%D \noindent
%D \halign\bgroup\tt##\hskip2em&##\hskip2em&##\cr}
%D
-%D \gdef\stoptest%
+%D \gdef\stoptest
%D {\egroup
%D \blanko}
%D
@@ -444,7 +447,7 @@
\futurelet\next\dodotextmodediscretionary}
\def\dododotextmodediscretionary
- {\let\nextnextnext=\egroup
+ {\let\nextnextnext\egroup
\ifx\discretionarycommand\next
\checkafterdiscretionary
\bgroup
@@ -487,14 +490,14 @@
\fi\fi\fi\fi\fi\fi\fi\fi\fi
\nextnextnext}
-\def\checkbeforediscretionary%
+\def\checkbeforediscretionary
{\setbox0\lastbox
\ifdim\wd0=\zeropoint
\let\postwordbreak\prewordbreak
\fi
\box0\relax}
-\def\checkafterdiscretionary%
+\def\checkafterdiscretionary
{\ifx,\nextnext
\def\nextnextnext{\afterassignment\egroup\let\next=}%
\else
@@ -533,7 +536,7 @@
%D \goto{Some||Long||Word}
%D \stoptypen
-\def\currentspaceskip%
+\def\currentspaceskip
{\fontdimen2\font\!!plus\fontdimen3\font\!!minus\fontdimen4\font\relax}
% \def\fakecompoundhyphen% wrong
@@ -581,7 +584,7 @@
%D
%D which is defined as:
-\def\enableactivediscretionaries%
+\def\enableactivediscretionaries
{\uccode`'=`'\relax \uccode`~=`~\relax \uccode`_=`_\relax
\uccode`(=`(\relax \uccode`)=`)\relax \uccode`==`=\relax
\uccode`<=`<\relax \uccode`>=`>\relax
@@ -611,7 +614,7 @@
%D This time we use \type{\ifnum}:
-\def\activedododotextmodediscretionary%
+\def\activedododotextmodediscretionary
{\let\nextnextnext\egroup
\ifx\discretionarycommand\next
\checkafterdiscretionary
@@ -826,6 +829,9 @@
\definetextmodediscretionary >
{\endofsubsentencespacing\prewordbreak\endofsubsentence}
+\definetextmodediscretionary . % not yet definitive
+ {\prewordbreak\midsentence\prewordbreak}
+
\definetextmodediscretionary ^
{\prewordbreak\discretionary{\hbox{$|$}}{}{\hbox{$|$}}%
\allowbreak\postwordbreak}
@@ -1064,8 +1070,7 @@
\beginTEX
\long\def\handlecompoundcharacterone#1#2%
-% {\ifx#1#2%
- {\if\string#1\string#2%
+ {\if\string#1\string#2% was: \ifx#1#2%
%\def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}}%
\def\next{\getvalue{\@nc@\string#1}}%
\else\expandafter\ifx\csname\@cc@\string#1\string#2\endcsname\relax
@@ -1076,8 +1081,7 @@
\next}
\long\def\handlecompoundcharactertwo#1#2#3%
-% {\ifx#1#2%
- {\if\string#1\string#2%
+ {\if\string#1\string#2% was: \ifx#1#2%
%\def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}#3}%
\def\next{\getvalue{\@nc@\string#1}#3}%
\else\@EA\ifx\csname\@cs@\string#1\string#2\string#3\endcsname\relax
@@ -1096,8 +1100,7 @@
\beginETEX \ifcsname
\long\def\handlecompoundcharacterone#1#2%
-% {\ifx#1#2%
- {\if\string#1\string#2%
+ {\if\string#1\string#2% was: \ifx#1#2%
%\def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}}%
\def\next{\getvalue{\@nc@\string#1}}%
\else\ifcsname\@cc@\string#1\string#2\endcsname
@@ -1108,8 +1111,7 @@
\next}
\long\def\handlecompoundcharactertwo#1#2#3%
-% {\ifx#1#2%
- {\if\string#1\string#2%
+ {\if\string#1\string#2% was: \ifx#1#2%
%\def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}#3}%
\def\next{\getvalue{\@nc@\string#1}#3}%
\else\ifcsname\@cs@\string#1\string#2\string#3\endcsname
@@ -1173,7 +1175,7 @@
%D earlier, this one also looks ahead for spaces and grouping
%D tokens.
-\def\domidworddiscretionary%
+\def\domidworddiscretionary
{\ifx\next\blankspace\else
\ifx\next\bgroup \else
\ifx\next\egroup \else
diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex
index ff4724072..a5865f9c4 100644
--- a/tex/context/base/supp-mis.tex
+++ b/tex/context/base/supp-mis.tex
@@ -93,9 +93,9 @@
\fi
-%D Lets see if it works.
+%D Let's see if it works.
-\writestatus{loading}{Context Support Macros / Missing}
+\writestatus{loading}{Context Support Macros / Miscellaneous }
%D \macros
%D {protect,unprotect}
diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex
index 5ce56b99f..7e37bf1b4 100644
--- a/tex/context/base/supp-mps.tex
+++ b/tex/context/base/supp-mps.tex
@@ -46,6 +46,10 @@
\def\@@MPG{@MPG@}
+%D First we define a handy constant:
+
+\bgroup \catcode`\%=\@@other \xdef\letterpercent{\string%} \egroup
+
%D \macros
%D {startMPgraphic}
%D
@@ -1136,7 +1140,7 @@
\catcode`B=\@@begingroup
\catcode`E=\@@endgroup
\gdef\ignoreMPspecials|
- B\def%BE|
+ B\let%\letterpercent|
\def[BE|
\def]BE|
\def{BE|
@@ -1155,6 +1159,7 @@
\catcode`\]=\@@active
\catcode`\{=\@@active
\catcode`\}=\@@active
+ \lccode`\%=`\% | otherwise it's seen as a number
\def\(B\char40\relax E|
\def\)B\char41\relax E|
\def\\B\char92\relax E|
@@ -1187,7 +1192,8 @@
%D \stoptypen
%D
%D which comes to rounding sizes. This is something
-%D experimental.
+%D experimental. (The macro in supp-pdf.tex is more
+%D advanced.)
\def\PSnfont{nfont}
diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex
index 5999e86da..8cec1c646 100644
--- a/tex/context/base/supp-pdf.tex
+++ b/tex/context/base/supp-pdf.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=supp-pdf,
-%D version=2003.01.20,
+%D version=2003.08.12,
%D title=\CONTEXT\ Support Macros,
%D subtitle=\METAPOST\ to \PDF\ conversion,
%D author=Hans Hagen,
@@ -53,6 +53,10 @@
\fi
\fi
+%D First we define a handy constant:
+
+\bgroup \catcode`\%=\@@other \xdef\letterpercent{\string%} \egroup
+
%D \macros
%D {pdfimage,pdfimages,pdfclippedimage}
%D
@@ -213,14 +217,14 @@
\global\let\PDFxoffset\PDFxoffset
\global\let\PDFyoffset\PDFyoffset}
-\def\setPDFmediabox#1[#2 #3 #4 #5]#6\done%
+\def\setPDFmediabox#1[#2 #3 #4 #5]#6\done
{\dimen2=#2bp\dimen2=-\dimen2
\dimen4=#3bp\dimen4=-\dimen4
\dimen6=#4bp\advance\dimen6 \dimen2
\dimen8=#5bp\advance\dimen8 \dimen4
\setPDFboundingbox{\dimen2}{\dimen4}{\dimen6}{\dimen8}\PDFxscale\PDFyscale}
-\def\checkPDFmediabox#1/MediaBox#2#3\done%
+\def\checkPDFmediabox#1/MediaBox#2#3\done
{\ifx#2\relax \else
\message{mediabox}%
\setPDFmediabox#2#3\done
@@ -230,7 +234,7 @@
%D with a line handling macro that changes it's behavior when
%D the stream operators are encountered.
-\def\handlePDFline%
+\def\handlePDFline
{\ifx\@@PDFstream@@\fileline
\let\doprocessPDFline\copyPDFobject
\startPDFtoPDF
@@ -238,7 +242,7 @@
\expandafter\checkPDFmediabox\fileline/MediaBox\relax\done
\fi\fi}
-\def\copyPDFobject%
+\def\copyPDFobject
{\ifx\@@PDFendstream@@\fileline
\ifPDFmediaboxprefered
\let\doprocessPDFline\findPDFmediabox
@@ -250,7 +254,7 @@
\PDFcode{\fileline}%
\fi}
-\def\findPDFmediabox%
+\def\findPDFmediabox
{\expandafter\checkPDFmediabox\fileline/MediaBox\relax\done}
%D The main conversion macro wraps the \PDF\ codes in a box
@@ -391,12 +395,21 @@
\def \PSnfont {nfont} % was needed for TUG98 proceedings
\def \PSspecial {special} % extensions to MetaPost
-\def \PSBoundingBox {BoundingBox:}
-\def \PSHiResBoundingBox {HiResBoundingBox:}
-\def \PSExactBoundingBox {ExactBoundingBox:}
-\def \PSMetaPostSpecial {MetaPostSpecial:}
-\def \PSMetaPostSpecials {MetaPostSpecials:}
-\def \PSPage {Page:}
+%D A previous version set \type {%} to ignore, which
+%D simplified the following definitions. At the start of
+%D conversion the percent character was made active again.
+%D Because the whole graphic is one paragraph (there are no
+%D empty lines) this does not give the desired effect. This
+%D went unnoticed untill Scott Pakin sent me a test file
+%D percent characters in a string. So, from now on we have
+%D to prefix the following strings with percentages.
+
+\edef \PSBoundingBox {\letterpercent\letterpercent BoundingBox:}
+\edef \PSHiResBoundingBox {\letterpercent\letterpercent HiResBoundingBox:}
+\edef \PSExactBoundingBox {\letterpercent\letterpercent ExactBoundingBox:}
+\edef \PSMetaPostSpecial {\letterpercent\letterpercent MetaPostSpecial:}
+\edef \PSMetaPostSpecials {\letterpercent\letterpercent MetaPostSpecials:}
+\edef \PSPage {\letterpercent\letterpercent Page:}
%D By the way, the \type {setcmykcolor} operator is not
%D output by \METAPOST\ but can result from converting the
@@ -501,12 +514,11 @@
%D comments are processed and use the simple alternative
%D when dealing with comments.
-\def\doresetMPstack%
+\def\doresetMPstack
{\nofMParguments0 }
-\def\resetMPstack%
- {\catcode`\%=\@@active
- \let\handleMPgraphic\handleMPendgraphic
+\def\resetMPstack
+ {\let\handleMPgraphic\handleMPendgraphic
\let\resetMPstack\doresetMPstack
\resetMPstack}
@@ -542,7 +554,7 @@
\catcode`B=\@@begingroup
\catcode`E=\@@endgroup
\gdef\ignoreMPspecials|
- B\def%BE|
+ B\let%\letterpercent|
\def[BE|
\def]BE|
\def{BE|
@@ -556,11 +568,12 @@
\gdef\setMPspecials|
B\setnaturalcatcodes
\catcode`\\=\@@escape
- \catcode`\%=\@@active
+ \catcode`\%=\@@active
\catcode`\[=\@@active
\catcode`\]=\@@active
\catcode`\{=\@@active
\catcode`\}=\@@active
+ \lccode`\%=`\% | otherwise it's seen as a number
\def\(B\char40\relax E|
\def\)B\char41\relax E|
\def\\B\char92\relax E|
@@ -576,7 +589,9 @@
\def\9B\octalMPcharacter9EE
\egroup
-%D We use the comment symbol as a sort of trigger:
+%D We use the comment symbol as a sort of trigger. Beware!
+%D The whole graphic is seen as on eparagraph, which means
+%D that we cannot change the catcodes in between.
\bgroup
\catcode`\%=\@@active
@@ -596,9 +611,8 @@
%D originates in the redefinition by \LATEX\ of the
%D \type{\input} primitive.)
-\def\startMPconversion%
- {\catcode`\%=\@@ignore
- \ignoreMPspecials
+\def\startMPconversion
+ {\ignoreMPspecials
\handleMPsequence}
%D Here comes the main loop. Most arguments are numbers. This
@@ -792,7 +806,7 @@
%D Unless defined otherwise, we simply ignore specialcomments.
-\def\handleMPspecialcomment%
+\def\handleMPspecialcomment
{\doresetMPstack
\let\handleMPsequence\dohandleMPsequence
\handleMPsequence}
@@ -935,7 +949,7 @@
%D at the same time keep the output readable by packing the
%D literals.
-\def\handleMPsetdash%
+\def\handleMPsetdash
{\bgroup
\def\somestring{[}%
\scratchcounter1
@@ -975,7 +989,7 @@
%D The common operator in these sequences is \type{dtransform},
%D so we can use this one to trigger setting the linewidth.
-\def\handleMPdtransform%
+\def\handleMPdtransform
{\ifdim\gMPa1pt>\!!zeropoint
\PDFcode{\gMPa1 w}%
\def\next##1 ##2 ##3 ##4 ##5 ##6 {\handleMPsequence}%
@@ -1015,7 +1029,7 @@
%D the path loop is done by means of the recursely called
%D macro \type{\handleMPsequence}.
-\def\handleMPpath%
+\def\handleMPpath
{\chardef\finiMPpath0
\let\closeMPpath\relax
\let\flushMPpath\flushnormalMPpath
@@ -1040,7 +1054,7 @@
\PDFcode{\!MP\lastMPmoveX\space \!MP\lastMPmoveY\space m}%
\fi}
-\def\flushnormalMPpath%
+\def\flushnormalMPpath
{\scratchcounter\nofMPsegments
\nofMPsegments1
\loop
@@ -1073,7 +1087,7 @@
\PDFcode{\!MP\a\space\!MP\b\space m}%
\fi}
-\def\flushconcatMPpath%
+\def\flushconcatMPpath
{\scratchcounter\nofMPsegments
\nofMPsegments1
\loop
@@ -1119,7 +1133,7 @@
\def\doMPexpanddimen#1
{\multiply\dimen#1 \MPconcatfactor\relax}
-\def\presetMPconcat%
+\def\presetMPconcat
{\dimen 0=\gMPs1 pt \doMPreducedimen 0 % r_x
\dimen 2=\gMPs2 pt \doMPreducedimen 2 % s_x
\dimen 4=\gMPs3 pt \doMPreducedimen 4 % s_y
@@ -1127,7 +1141,7 @@
\dimen 8=\gMPs5 pt \doMPreducedimen 8 % t_x
\dimen10=\gMPs6 pt \doMPreducedimen10 } % t_y
-\def\presetMPscale%
+\def\presetMPscale
{\dimen 0=\gMPs1 pt \doMPreducedimen 0
\dimen 2=\!!zeropoint
\dimen 4=\!!zeropoint
@@ -1135,7 +1149,7 @@
\dimen 8=\!!zeropoint
\dimen10=\!!zeropoint}
-\def\noMPtranslate% use this one grouped
+\def\noMPtranslate % use this one grouped
{\dimen 8=\!!zeropoint % t_x
\dimen10=\!!zeropoint} % t_y
@@ -1617,10 +1631,10 @@
%D The path is output using the values saved on the stack. If
%D needed, all coordinates are recalculated.
-\def\finishMPpath%
+\def\finishMPpath
{\PDFcode{\ifcase\finiMPpath W n\or S\or f\or B\fi}}
-\def\processMPpath%
+\def\processMPpath
{\checkMPpath
\ifcase\nofMPsegments\else
\flushMPpath
@@ -1656,12 +1670,12 @@
%D specification. We therefore can output the \type{cm} at
%D the moment we encounter it.
-\def\handleMPpathconcat%
+\def\handleMPpathconcat
{\presetMPconcat
\PDFcode{\gMPs1 \gMPs2 \gMPs3 \gMPs4 \gMPs5 \gMPs6 cm}%
\resetMPstack}
-\def\handleMPpathscale%
+\def\handleMPpathscale
{\presetMPscale
\PDFcode{\gMPs1 0 0 \gMPs2 0 0 cm}%
\resetMPstack}
@@ -1771,7 +1785,7 @@
\startMPresources
\doprocessMPtoPDFfile{#1}{#2}{#3}} % {#1}{0#2}{0#3} would be saver
-\def\processMPtoPDFfile% file xscale yscale
+\def\processMPtoPDFfile % file xscale yscale
{\bgroup
\let\finishMPgraphic\egroup
\doprocessMPtoPDFfile}
@@ -1917,7 +1931,7 @@
%D
%D This option only works in \CONTEXT\ combined with \ETEX.
-\def\twodigitMPoutput%
+\def\twodigitMPoutput
{\let\!MP \twodigitrounding
\def\!MPgMPs##1{\twodigitrounding{\gMPs##1}}%
\def\!MPgMPa##1{\twodigitrounding{\gMPa##1}}}
diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex
index d5c3d53b3..8970025e5 100644
--- a/tex/context/base/syst-ext.tex
+++ b/tex/context/base/syst-ext.tex
@@ -4332,34 +4332,51 @@
%D \filterfromvalue{xx}{3}{2}
%D \filterfromvalue{xx}{3}{1}
%D \stoptypen
+%D
+%D An alternative is to store 'max' in the list, say:
+%D
+%D \starttypen
+%D \setvalue{xx}{3{A}{B}{C}}
+%D
+%D \filterfromvalues{xx}{3}
+%D \filterfromvalues{xx}{2}
+%D \filterfromvalues{xx}{1}
+%D \stoptypen
+%D
+%D I'll implement this when I'm in \quotation {writing dirty
+%D macros mood}.
\def\filterfromvalue#1#2#3% value max n
- {\@EA\@EAEAEA\csname
- \ifcase#2\or
- \ifcase#3\or
- \strippedcsname\firstofoneargument
- \else
- \strippedcsname\gobbleoneargument
- \fi
- \or
- \ifcase#3\or
- \strippedcsname\firstoftwoarguments
- \or
- \strippedcsname\secondoftwoarguments
- \else
- \strippedcsname\gobbletwoarguments
- \fi
- \or
- \ifcase#3\or
- \strippedcsname\firstofthreearguments
+ {\@EA\@EAEAEA\csname % we use the fact that an
+ \@EA\ifx\csname#1\endcsname\relax % undefined cs has become \relax
+ \strippedcsname\gobbleoneargument % which we then gobble here
+ \else
+ \ifcase#2\or
+ \ifcase#3\or
+ \strippedcsname\firstofoneargument
+ \else
+ \strippedcsname\gobbleoneargument
+ \fi
\or
- \strippedcsname\secondofthreearguments
+ \ifcase#3\or
+ \strippedcsname\firstoftwoarguments
+ \or
+ \strippedcsname\secondoftwoarguments
+ \else
+ \strippedcsname\gobbletwoarguments
+ \fi
\or
- \strippedcsname\thirdofthreearguments
- \else
- \strippedcsname\gobblethreearguments
+ \ifcase#3\or
+ \strippedcsname\firstofthreearguments
+ \or
+ \strippedcsname\secondofthreearguments
+ \or
+ \strippedcsname\thirdofthreearguments
+ \else
+ \strippedcsname\gobblethreearguments
+ \fi
\fi
\fi
- \endcsname\csname#1\endcsname}
+ \endcsname\csname#1\endcsname}
\protect \endinput
diff --git a/tex/context/base/syst-new.tex b/tex/context/base/syst-new.tex
index f55fb34c3..13a3f64be 100644
--- a/tex/context/base/syst-new.tex
+++ b/tex/context/base/syst-new.tex
@@ -226,10 +226,16 @@
% here ?
\def\dosetrawvalue #1#2#3{\@EA \def\csname#1#2\endcsname{#3}}
+\def\dosetrawevalue#1#2#3{\@EA\edef\csname#1#2\endcsname{#3}}
\def\dosetrawgvalue#1#2#3{\@EA\gdef\csname#1#2\endcsname{#3}}
+\def\dosetrawxvalue#1#2#3{\@EA\xdef\csname#1#2\endcsname{#3}}
\def\getrawparameters {\dogetparameters\dosetrawvalue }
-\def\globalgetrawparameters{\dogetparameters\dosetrawgvalue}
+\def\getraweparameters {\dogetparameters\dosetrawevalue}
+\def\getrawgparameters {\dogetparameters\dosetrawgvalue}
+\def\getrawxparameters {\dogetparameters\dosetrawxvalue}
+
+\def\globalgetrawparameters{\dogetparameters\dosetrawgvalue} % obsolete
\def\splitskip#1%
{\scratchskip\zeropoint \!!plus 1pt \!!minus 1pt
@@ -553,16 +559,6 @@
\let\notexpanded\empty
\@@expanded}
-% \def\doifdimensionelse#1%
-% {\afterassignment\dodoifdimensionelse\scratchdimen=#1pt\relax\empty\empty\empty\empty}
-%
-% \def\dodoifdimensionelse#1#2#3#4%
-% {\ifx#3\relax
-% \expandafter\firstoftwoarguments
-% \else
-% \expandafter\secondoftwoarguments
-% \fi}
-
% for Simon ; watch how we make them fully expandable (i.e.
% no \type {\relax}es) popping up
diff --git a/tex/context/base/thrd-tab.tex b/tex/context/base/thrd-tab.tex
index 466895abb..2abd3fb3d 100644
--- a/tex/context/base/thrd-tab.tex
+++ b/tex/context/base/thrd-tab.tex
@@ -1571,7 +1571,7 @@
% ENLARGE BY MULTIPLES OF StrutUnit
% \enlarge<multiple for extra height><multiple for extra depth><original>
-% Enlarges by (multiple for extra heigth)*StrutUnit
+% Enlarges by (multiple for extra height)*StrutUnit
% and (multiple for extra depth) *StrutUnit
\def\enlarge#1#2{% 3rd argument is picked up later
\Enlarge{#1\StrutUnit}{#2\StrutUnit}}
diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex
index 7bc58de34..3a71a8843 100644
--- a/tex/context/base/type-enc.tex
+++ b/tex/context/base/type-enc.tex
@@ -18,90 +18,178 @@
% Free fonts.
-% Computer Modern Roman (AMS/BJ)
-\starttypescript [all] [computer-modern] [lm] % will be ec
+% Computer & Latin Modern Roman (DEK/AMS/BJ)
- % map
+% \usetypescript [all] [latin-modern] [texnansi]
+%
+% \setupbodyfont[reset] \setupbodyfont[cmr]
+%
+% \starttext \showfont[Serif] \stoptext
+
+\starttypescript [all] [latin-modern] [texnansi,qx]
+
+ \loadmapfile[\typescriptthree-lm.map]
+
+ % Regular
+
+ \definefontsynonym [cmr5] [\typescriptthree-lmr5] [encoding=\typescriptthree]
+ \definefontsynonym [cmr6] [\typescriptthree-lmr6] [encoding=\typescriptthree]
+ \definefontsynonym [cmr7] [\typescriptthree-lmr7] [encoding=\typescriptthree]
+ \definefontsynonym [cmr8] [\typescriptthree-lmr8] [encoding=\typescriptthree]
+ \definefontsynonym [cmr9] [\typescriptthree-lmr9] [encoding=\typescriptthree]
+ \definefontsynonym [cmr10] [\typescriptthree-lmr10] [encoding=\typescriptthree]
+ \definefontsynonym [cmr12] [\typescriptthree-lmr12] [encoding=\typescriptthree]
+ \definefontsynonym [cmr17] [\typescriptthree-lmr17] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmbx5] [\typescriptthree-lmbx5] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx6] [\typescriptthree-lmbx6] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx7] [\typescriptthree-lmbx7] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx8] [\typescriptthree-lmbx8] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx9] [\typescriptthree-lmbx9] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx10] [\typescriptthree-lmbx10] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx12] [\typescriptthree-lmbx12] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmsl10] [\typescriptthree-lmro10] [encoding=\typescriptthree]
+ \definefontsynonym [cmsl12] [\typescriptthree-lmro12] [encoding=\typescriptthree]
+ \definefontsynonym [cmsl8] [\typescriptthree-lmro8] [encoding=\typescriptthree]
+ \definefontsynonym [cmsl9] [\typescriptthree-lmro9] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmti7] [\typescriptthree-lmri7] [encoding=\typescriptthree]
+ \definefontsynonym [cmti8] [\typescriptthree-lmri8] [encoding=\typescriptthree]
+ \definefontsynonym [cmti9] [\typescriptthree-lmri9] [encoding=\typescriptthree]
+ \definefontsynonym [cmti10] [\typescriptthree-lmri10] [encoding=\typescriptthree]
+ \definefontsynonym [cmti12] [\typescriptthree-lmri12] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmb10] [\typescriptthree-lmb10] [encoding=\typescriptthree]
+ \definefontsynonym [cmbsl10] [\typescriptthree-lmbo10] [encoding=\typescriptthree]
+ \definefontsynonym [cmbxsl10] [\typescriptthree-lmbxo10] [encoding=\typescriptthree]
+ \definefontsynonym [cmbxti10] [\typescriptthree-lmbxi10] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmcsc10] [\typescriptthree-lmcsc10] [encoding=\typescriptthree]
+ \definefontsynonym [cmcscsl10][\typescriptthree-lmcsco10] [encoding=\typescriptthree]
+
+ % Mono
+
+ \definefontsynonym [cmtt8] [\typescriptthree-lmtt8] [encoding=\typescriptthree]
+ \definefontsynonym [cmtt9] [\typescriptthree-lmtt9] [encoding=\typescriptthree]
+ \definefontsynonym [cmtt10] [\typescriptthree-lmtt10] [encoding=\typescriptthree]
+ \definefontsynonym [cmtt12] [\typescriptthree-lmtt12] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmitt10] [\typescriptthree-lmtti10] [encoding=\typescriptthree]
+ \definefontsynonym [cmsltt10] [\typescriptthree-lmtto10] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmvtt10] [\typescriptthree-lmvtt10] [encoding=\typescriptthree]
+ \definefontsynonym [cmvtti10] [\typescriptthree-lmvtto] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmcsc10] [\typescriptthree-lmcsc10] [encoding=\typescriptthree]
+
+ % Sans
+
+ \definefontsynonym [cmss8] [\typescriptthree-lmss8] [encoding=\typescriptthree]
+ \definefontsynonym [cmss9] [\typescriptthree-lmss9] [encoding=\typescriptthree]
+ \definefontsynonym [cmss10] [\typescriptthree-lmss10] [encoding=\typescriptthree]
+ \definefontsynonym [cmss12] [\typescriptthree-lmss12] [encoding=\typescriptthree]
+ \definefontsynonym [cmss17] [\typescriptthree-lmss17] [encoding=\typescriptthree]
- \loadmapfile[lm_ec.map]
+ \definefontsynonym [cmssi10] [\typescriptthree-lmsso10] [encoding=\typescriptthree]
+ \definefontsynonym [cmssi12] [\typescriptthree-lmsso12] [encoding=\typescriptthree]
+ \definefontsynonym [cmssi17] [\typescriptthree-lmsso17] [encoding=\typescriptthree]
+ \definefontsynonym [cmssi8] [\typescriptthree-lmsso8] [encoding=\typescriptthree]
+ \definefontsynonym [cmssi9] [\typescriptthree-lmsso9] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmssq8] [\typescriptthree-lmssq8] [encoding=\typescriptthree]
+ \definefontsynonym [cmssqb8] [\typescriptthree-lmssqbx8] [encoding=\typescriptthree]
+ \definefontsynonym [cmssqbi8] [\typescriptthree-lmssqbo8] [encoding=\typescriptthree]
+ \definefontsynonym [cmssqi8] [\typescriptthree-lmssqo8] [encoding=\typescriptthree]
+
+ \definefontsynonym [cmssbx10] [\typescriptthree-lmssbx10] [encoding=\typescriptthree]
+ \definefontsynonym [cmssdc10] [\typescriptthree-lmssdc10] [encoding=\typescriptthree]
+ \definefontsynonym [cmssbi10] [\typescriptthree-lmssbo10] [encoding=\typescriptthree]
+ \definefontsynonym [cmssdi10] [\typescriptthree-lmssdo10] [encoding=\typescriptthree]
+
+\stoptypescript
+
+\starttypescript [all] [latin-modern] [ec]
+
+ \loadmapfile[cork-lm.map]
% Regular
- \definefontsynonym [cmr5] [lmr5_ec] [encoding=ec]
- \definefontsynonym [cmr6] [lmr6_ec] [encoding=ec]
- \definefontsynonym [cmr7] [lmr7_ec] [encoding=ec]
- \definefontsynonym [cmr8] [lmr8_ec] [encoding=ec]
- \definefontsynonym [cmr9] [lmr9_ec] [encoding=ec]
- \definefontsynonym [cmr10] [lmr10_ec] [encoding=ec]
- \definefontsynonym [cmr12] [lmr12_ec] [encoding=ec]
- \definefontsynonym [cmr17] [lmr17_ec] [encoding=ec]
+ \definefontsynonym [cmr5] [cork-lmr5] [encoding=cork]
+ \definefontsynonym [cmr6] [cork-lmr6] [encoding=cork]
+ \definefontsynonym [cmr7] [cork-lmr7] [encoding=cork]
+ \definefontsynonym [cmr8] [cork-lmr8] [encoding=cork]
+ \definefontsynonym [cmr9] [cork-lmr9] [encoding=cork]
+ \definefontsynonym [cmr10] [cork-lmr10] [encoding=cork]
+ \definefontsynonym [cmr12] [cork-lmr12] [encoding=cork]
+ \definefontsynonym [cmr17] [cork-lmr17] [encoding=cork]
- \definefontsynonym [cmbx5] [lmbx5_ec] [encoding=ec]
- \definefontsynonym [cmbx6] [lmbx6_ec] [encoding=ec]
- \definefontsynonym [cmbx7] [lmbx7_ec] [encoding=ec]
- \definefontsynonym [cmbx8] [lmbx8_ec] [encoding=ec]
- \definefontsynonym [cmbx9] [lmbx9_ec] [encoding=ec]
- \definefontsynonym [cmbx10] [lmbx10_ec] [encoding=ec]
- \definefontsynonym [cmbx12] [lmbx12_ec] [encoding=ec]
-
- \definefontsynonym [cmsl10] [lmro10_ec] [encoding=ec]
- \definefontsynonym [cmsl12] [lmro12_ec] [encoding=ec]
- \definefontsynonym [cmsl8] [lmro8_ec] [encoding=ec]
- \definefontsynonym [cmsl9] [lmro9_ec] [encoding=ec]
+ \definefontsynonym [cmbx5] [cork-lmbx5] [encoding=cork]
+ \definefontsynonym [cmbx6] [cork-lmbx6] [encoding=cork]
+ \definefontsynonym [cmbx7] [cork-lmbx7] [encoding=cork]
+ \definefontsynonym [cmbx8] [cork-lmbx8] [encoding=cork]
+ \definefontsynonym [cmbx9] [cork-lmbx9] [encoding=cork]
+ \definefontsynonym [cmbx10] [cork-lmbx10] [encoding=cork]
+ \definefontsynonym [cmbx12] [cork-lmbx12] [encoding=cork]
+
+ \definefontsynonym [cmsl10] [cork-lmro10] [encoding=cork]
+ \definefontsynonym [cmsl12] [cork-lmro12] [encoding=cork]
+ \definefontsynonym [cmsl8] [cork-lmro8] [encoding=cork]
+ \definefontsynonym [cmsl9] [cork-lmro9] [encoding=cork]
- \definefontsynonym [cmti7] [lmri7_ec] [encoding=ec]
- \definefontsynonym [cmti8] [lmri8_ec] [encoding=ec]
- \definefontsynonym [cmti9] [lmri9_ec] [encoding=ec]
- \definefontsynonym [cmti10] [lmri10_ec] [encoding=ec]
- \definefontsynonym [cmti12] [lmri12_ec] [encoding=ec]
+ \definefontsynonym [cmti7] [cork-lmri7] [encoding=cork]
+ \definefontsynonym [cmti8] [cork-lmri8] [encoding=cork]
+ \definefontsynonym [cmti9] [cork-lmri9] [encoding=cork]
+ \definefontsynonym [cmti10] [cork-lmri10] [encoding=cork]
+ \definefontsynonym [cmti12] [cork-lmri12] [encoding=cork]
- \definefontsynonym [cmb10] [lmb10_ec] [encoding=ec]
- \definefontsynonym [cmbsl10] [lmbo10_ec] [encoding=ec]
- \definefontsynonym [cmbxsl10] [lmbxo10_ec] [encoding=ec]
- \definefontsynonym [cmbxti10] [lmbxi10_ec] [encoding=ec]
+ \definefontsynonym [cmb10] [cork-lmb10] [encoding=cork]
+ \definefontsynonym [cmbsl10] [cork-lmbo10] [encoding=cork]
+ \definefontsynonym [cmbxsl10] [cork-lmbxo10] [encoding=cork]
+ \definefontsynonym [cmbxti10] [cork-lmbxi10] [encoding=cork]
- \definefontsynonym [cmcsc10] [lmcsc10_ec] [encoding=ec]
- \definefontsynonym [cmcscsl10][lmcsco10_ec] [encoding=ec]
+ \definefontsynonym [cmcsc10] [cork-lmcsc10] [encoding=cork]
+ \definefontsynonym [cmcscsl10][cork-lmcsco10] [encoding=cork]
% Mono
- \definefontsynonym [cmtt8] [lmtt8_ec] [encoding=ec]
- \definefontsynonym [cmtt9] [lmtt9_ec] [encoding=ec]
- \definefontsynonym [cmtt10] [lmtt10_ec] [encoding=ec]
- \definefontsynonym [cmtt12] [lmtt12_ec] [encoding=ec]
+ \definefontsynonym [cmtt8] [cork-lmtt8] [encoding=cork]
+ \definefontsynonym [cmtt9] [cork-lmtt9] [encoding=cork]
+ \definefontsynonym [cmtt10] [cork-lmtt10] [encoding=cork]
+ \definefontsynonym [cmtt12] [cork-lmtt12] [encoding=cork]
- \definefontsynonym [cmitt10] [lmtti10_ec] [encoding=ec]
- \definefontsynonym [cmsltt10] [lmtto10_ec] [encoding=ec]
+ \definefontsynonym [cmitt10] [cork-lmtti10] [encoding=cork]
+ \definefontsynonym [cmsltt10] [cork-lmtto10] [encoding=cork]
- \definefontsynonym [cmvtt10] [lmvtt10_ec] [encoding=ec]
- \definefontsynonym [cmvtti10] [lmvtto_ec] [encoding=ec]
+ \definefontsynonym [cmvtt10] [cork-lmvtt10] [encoding=cork]
+ \definefontsynonym [cmvtti10] [cork-lmvtto] [encoding=cork]
- \definefontsynonym [cmcsc10] [lmcsc10_ec] [encoding=ec]
+ \definefontsynonym [cmcsc10] [cork-lmcsc10] [encoding=cork]
% Sans
- \definefontsynonym [cmss8] [lmss8_ec] [encoding=ec]
- \definefontsynonym [cmss9] [lmss9_ec] [encoding=ec]
- \definefontsynonym [cmss10] [lmss10_ec] [encoding=ec]
- \definefontsynonym [cmss12] [lmss12_ec] [encoding=ec]
- \definefontsynonym [cmss17] [lmss17_ec] [encoding=ec]
+ \definefontsynonym [cmss8] [cork-lmss8] [encoding=cork]
+ \definefontsynonym [cmss9] [cork-lmss9] [encoding=cork]
+ \definefontsynonym [cmss10] [cork-lmss10] [encoding=cork]
+ \definefontsynonym [cmss12] [cork-lmss12] [encoding=cork]
+ \definefontsynonym [cmss17] [cork-lmss17] [encoding=cork]
- \definefontsynonym [cmssi10] [lmsso10_ec] [encoding=ec]
- \definefontsynonym [cmssi12] [lmsso12_ec] [encoding=ec]
- \definefontsynonym [cmssi17] [lmsso17_ec] [encoding=ec]
- \definefontsynonym [cmssi8] [lmsso8_ec] [encoding=ec]
- \definefontsynonym [cmssi9] [lmsso9_ec] [encoding=ec]
+ \definefontsynonym [cmssi10] [cork-lmsso10] [encoding=cork]
+ \definefontsynonym [cmssi12] [cork-lmsso12] [encoding=cork]
+ \definefontsynonym [cmssi17] [cork-lmsso17] [encoding=cork]
+ \definefontsynonym [cmssi8] [cork-lmsso8] [encoding=cork]
+ \definefontsynonym [cmssi9] [cork-lmsso9] [encoding=cork]
- \definefontsynonym [cmssq8] [lmssq8_ec] [encoding=ec]
- \definefontsynonym [cmssqb8] [lmssqbx8_ec] [encoding=ec]
- \definefontsynonym [cmssqbi8] [lmssqbo8_ec] [encoding=ec]
- \definefontsynonym [cmssqi8] [lmssqo8_ec] [encoding=ec]
+ \definefontsynonym [cmssq8] [cork-lmssq8] [encoding=cork]
+ \definefontsynonym [cmssqb8] [cork-lmssqbx8] [encoding=cork]
+ \definefontsynonym [cmssqbi8] [cork-lmssqbo8] [encoding=cork]
+ \definefontsynonym [cmssqi8] [cork-lmssqo8] [encoding=cork]
- \definefontsynonym [cmssbx10] [lmssbx10_ec] [encoding=ec]
- \definefontsynonym [cmssdc10] [lmssdc10_ec] [encoding=ec]
- \definefontsynonym [cmssbi10] [lmssbo10_ec] [encoding=ec]
- \definefontsynonym [cmssdi10] [lmssdo10_ec] [encoding=ec]
+ \definefontsynonym [cmssbx10] [cork-lmssbx10] [encoding=cork]
+ \definefontsynonym [cmssdc10] [cork-lmssdc10] [encoding=cork]
+ \definefontsynonym [cmssbi10] [cork-lmssbo10] [encoding=cork]
+ \definefontsynonym [cmssdi10] [cork-lmssdo10] [encoding=cork]
\stoptypescript
diff --git a/tex/context/base/x-fdf-00.tex b/tex/context/base/x-fdf-00.tex
index 2f9a3b2be..fd4bea7e7 100644
--- a/tex/context/base/x-fdf-00.tex
+++ b/tex/context/base/x-fdf-00.tex
@@ -23,10 +23,10 @@
\defineXMLenvironment [fdf:field] [name=,value=]
{\XMLerase{fdf:value}}
- {\doglobal\saveXMLdata{fdf:\XMLop{name}}{fdf:value}}
+ {\gsaveXMLdata{fdf:\XMLop{name}}{fdf:value}}
\defineXMLsingular [fdf:field] [name=,value=]
- {\doglobal\saveasXMLdata{fdf:\XMLop{name}}{\XMLop{value}}}
+ {\gsaveXMLasdata{fdf:\XMLop{name}}{\XMLop{value}}}
\def\doifelseFDFfield#1{\doifelseXMLelement{fdf:#1}}
\def\flushFDFfield #1{\flushXMLelement {fdf:#1}}
diff --git a/tex/context/base/xtag-ext.tex b/tex/context/base/xtag-ext.tex
index b5c38db0b..8f2c89b34 100644
--- a/tex/context/base/xtag-ext.tex
+++ b/tex/context/base/xtag-ext.tex
@@ -157,7 +157,7 @@
\bgroup \catcode`\<=\active
-\gdef\saveasXMLdata#1#2% name raw data
+\gdef\saveXMLasdata#1#2% name raw data
{\dodoglobal\setevalue{\@@XMLsave:#1}{#2}} % \edef!
\gdef\saveXMLdata#1#2% name data-name ; definitely no \edef
@@ -171,6 +171,11 @@
{\dodoglobal\setevalue{\@@XMLsave:#1}% todo: one level expansion
{<#2 #3 \currentXMLarguments>#4\XMLflush{#5}#6</#2>}}
+\gdef\gsaveXMLasdata {\doglobal\saveXMLasdata}
+\gdef\gsaveXMLdata {\doglobal\saveXMLdata}
+\gdef\gsaveXMLdatainelement{\doglobal\saveXMLdatainelement}
+\gdef\gsaveXMLdatastructure{\doglobal\saveXMLdatastructure}
+
\gdef\doifelseXMLelement#1%
{\doifdefinedelse{\@@XMLsave:#1}}
diff --git a/tex/context/sample/douglas.tex b/tex/context/sample/douglas.tex
index 643eb123f..cf5fd50f3 100644
--- a/tex/context/sample/douglas.tex
+++ b/tex/context/sample/douglas.tex
@@ -1,15 +1,15 @@
Donald Knuth has spent the past several years working on a
system allowing him to control many aspects of the design
-of his forthcoming books---from the typesetting and layout
+of his forthcoming books|.|from the typesetting and layout
down to the very shapes of the letters! Seldom has an
author had anything remotely like this power to control the
final appearance of his or her work. Knuth's \TEX\
-typesetting system has become well||known and available in
+typesetting system has become well|-|known and available in
many countries around the world. By contrast, his
\METAFONT\ system for designing families of typefaces has
not become as well known or available.
-In his article \quotation {The Concept of a Meta||Font},
+In his article \quotation {The Concept of a Meta|-|Font},
Knuth sets forth for the first time the underlying
philosophy of \METAFONT, as well as some of its products.
Not only is the concept exiting and clearly well executed,
@@ -20,4 +20,4 @@ taken wrongly by many readers, and since they are points
that touch close to my deepest interests in artificial
intelligence and esthetic theory, I felt compelled to make
some comments to clarify certain important issues raised by
-\quotation {The Concept of a Meta||Font}.
+\quotation {The Concept of a Meta|-|Font}.
diff --git a/tex/context/sample/ward.tex b/tex/context/sample/ward.tex
new file mode 100644
index 000000000..7d5c0196b
--- /dev/null
+++ b/tex/context/sample/ward.tex
@@ -0,0 +1,5 @@
+The Earth, as a habitat for animal life, is in old age and
+has a fatal illness. Several, in fact. It would be happening
+whether humans has ever evolved or not. But our presence is
+like the effect of an old|-|age patient who smokes many packs
+of cigarettes per day |.| and we humans are the cigarettes.
diff --git a/tex/context/user/cont-sys.rme b/tex/context/user/cont-sys.rme
index 55d304913..5e2adef31 100644
--- a/tex/context/user/cont-sys.rme
+++ b/tex/context/user/cont-sys.rme
@@ -13,18 +13,43 @@
\unprotect
+% Occasionally we will support both A4 and letter in
+% styles. If you want letter size paper to be the default,
+% uncomment:
+%
+% \enablemode[\systemmodeprefix letter]
+%
+% If you always want to default to letter, you may uncomment
+% the following line, but beware: it makes your documents less
+% portable:
+%
+% \setuppapersize[letter][letter]
+%
% If you want some extras, just uncomment the following
% line:
%
-% \usemodule[plus]
+% \usemodule[plus] % experimental code
%
% Here you can take care of overloading some (style)
% defaults. What goes here, depends on your local system.
%
% The following commands sets the default font encoding:
%
+% \setupencoding [\s!default=texnansi]
+%
+% or:
+%
% \setupencoding [\s!default=ec]
%
+% If you want the default berry names:
+%
+% \usetypescript [berry] [\defaultencoding]
+%
+% If you run into missing font metrics kind of problems,
+% you may want to uncomment:
+%
+% \usetypescript[adobekb] [\defaultencoding]
+%
% You can let \CONTEXT\ load the map files for \PDFTEX.
%
% \autoloadmapfilestrue
@@ -48,11 +73,9 @@
% \preloadmapfile [il2-ams-cmr]
% \preloadmapfile [pl0-ams-cmr]
%
-% If you want the default berry names (ec and 8r only):
-%
-% \usetypescript [berry] [\defaultencoding]
-%
-% Overload Lucida by Times cum suis:
+% Some styles default to Lucida Bright. You can overload
+% Lucida by Times cum suis. Watch out, the pos collection
+% is not scaled relatively.
%
% \definetypescriptsynonym [lbr] [pos]
%
@@ -115,6 +138,8 @@
% You can also load additional encodings here:
+% \useencoding[x5]
+%
% \useregime[cyr]
% \useencoding[cyr]
% \enableregime[cp1251]