From e65a436deb332118831156075846acc80fb9d386 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 28 Jan 2003 00:00:00 +0100 Subject: stable 2003.01.28 --- context/data/cont-cz.tws | 16 +- context/data/cont-de.tws | 14 +- context/data/cont-en.tws | 16 +- context/data/cont-it.tws | 16 +- context/data/cont-nl.tws | 14 +- context/data/cont-ro.tws | 16 +- context/perltk/texexec.pl | 23 +- context/perltk/texfont.pl | 2 +- context/perltk/texutil.pl | 67 +-- metapost/context/mp-core.mp | 24 +- metapost/context/mp-grph.mp | 190 +++--- metapost/context/mp-spec.mp | 7 +- metapost/context/mp-tool.mp | 9 +- tex/context/base/colo-ini.tex | 71 ++- tex/context/base/cont-new.tex | 837 +------------------------- tex/context/base/cont-sys.ori | 7 + tex/context/base/context.tex | 2 +- tex/context/base/core-fig.tex | 125 +++- tex/context/base/core-fld.tex | 18 +- tex/context/base/core-grd.tex | 90 +-- tex/context/base/core-int.tex | 13 +- tex/context/base/core-job.tex | 7 +- tex/context/base/core-lst.tex | 38 +- tex/context/base/core-ltb.tex | 4 +- tex/context/base/core-mar.tex | 50 +- tex/context/base/core-mis.tex | 83 ++- tex/context/base/core-ntb.tex | 38 +- tex/context/base/core-pos.tex | 321 ++++++---- tex/context/base/core-rul.tex | 8 +- tex/context/base/core-sec.tex | 101 +++- tex/context/base/core-spa.tex | 325 ++++++++-- tex/context/base/core-tab.tex | 6 +- tex/context/base/core-tbl.tex | 119 +++- tex/context/base/core-uti.tex | 52 +- tex/context/base/core-ver.tex | 139 ++++- tex/context/base/enco-cyr.tex | 1259 +++++++++++++++++++++++++++++++++++++++ tex/context/base/enco-ini.tex | 26 +- tex/context/base/font-ini.tex | 9 + tex/context/base/font-run.tex | 7 + tex/context/base/java-ini.tex | 33 +- tex/context/base/lang-cyr.tex | 362 +++++++++++ tex/context/base/lang-ger.tex | 2 +- tex/context/base/lang-ini.tex | 10 + tex/context/base/lang-ita.tex | 4 +- tex/context/base/math-pln.tex | 25 +- tex/context/base/meta-ini.tex | 10 + tex/context/base/meta-pag.tex | 10 +- tex/context/base/mult-con.tex | 10 + tex/context/base/mult-sys.tex | 1 + tex/context/base/page-bck.tex | 5 +- tex/context/base/page-flt.tex | 371 ++++++++---- tex/context/base/page-imp.tex | 22 +- tex/context/base/page-ini.tex | 14 +- tex/context/base/page-lay.tex | 54 +- tex/context/base/page-run.tex | 10 + tex/context/base/page-set.tex | 441 ++++++++++---- tex/context/base/page-sid.tex | 269 ++++++--- tex/context/base/page-spr.tex | 7 +- tex/context/base/page-txt.tex | 25 +- tex/context/base/regi-cyp.tex | 1131 +++++++++++++++++++++++++++++++++++ tex/context/base/regi-cyr.tex | 840 ++++++++++++++++++++++++++ tex/context/base/s-mod-00.tex | 2 +- tex/context/base/s-pre-19.tex | 2 +- tex/context/base/s-pre-50.tex | 134 +++++ tex/context/base/setupa.tex | 2 +- tex/context/base/setupb.tex | 64 +- tex/context/base/setupe.tex | 10 +- tex/context/base/spec-fdf.tex | 16 +- tex/context/base/supp-box.tex | 8 +- tex/context/base/supp-fil.tex | 17 +- tex/context/base/supp-fun.tex | 2 - tex/context/base/supp-ini.tex | 2 +- tex/context/base/supp-mrk.tex | 29 +- tex/context/base/supp-pdf.tex | 6 +- tex/context/base/symb-mvs.tex | 2 +- tex/context/base/syst-ext.tex | 42 ++ tex/context/base/type-buy.tex | 16 +- tex/context/base/type-enc.tex | 299 ++++++++++ tex/context/base/type-pre.tex | 40 ++ tex/context/base/verb-ini.tex | 114 +++- tex/context/base/xtag-ini.tex | 121 ++-- tex/context/base/xtag-pre.tex | 30 +- tex/context/sample/aesop-de.tex | 25 + tex/context/user/cont-sys.rme | 7 + 84 files changed, 6954 insertions(+), 1861 deletions(-) create mode 100644 tex/context/base/enco-cyr.tex create mode 100644 tex/context/base/lang-cyr.tex create mode 100644 tex/context/base/regi-cyp.tex create mode 100644 tex/context/base/regi-cyr.tex create mode 100644 tex/context/base/s-pre-50.tex create mode 100644 tex/context/sample/aesop-de.tex diff --git a/context/data/cont-cz.tws b/context/data/cont-cz.tws index e8ba1b74f..fe91a1b4e 100644 --- a/context/data/cont-cz.tws +++ b/context/data/cont-cz.tws @@ -1840,6 +1840,7 @@ var:nradky:*cislo:: var:implicitni:*jmeno:: var:vzdalenostlevehookraje:*dimenze:: var:vzdalenostpravehookraje:*dimenze:: +var:sidealign:normalni,radek:: ivr:nastavoramovani:: stopsetup @@ -1870,7 +1871,7 @@ stopsetup startsetup com:nastavdelitko: typ:var/: -var:znak:--,---,-,\penalty 10000\ ,),(,=,/:: +var:znak:--,---,-,~,),(,=,/:: stopsetup startsetup @@ -2968,7 +2969,7 @@ stopsetup startsetup com:umisti<>: typ:val/refs/arg/arg/: -val:vlevo,vpravo,zde,vrsek,spodek, vlevo,vpravo,naokraji,marginalie, stranka,naproti,vzdy,sila,vysoko:zde: +val:vlevo,vpravo,zde,vrsek,spodek, vlevo,vpravo,naokraji,marginalie, levyokraj,pravyokraj,levahrana,pravahrana, innermargin,outermargin,inneredge,outeredge, uvnitr,vnejsi,regel,vysoko,nizko,prizpusobive, stranka,naproti,vzdy,sila,vysoko:zde: val:*text:: val:*text:: stopsetup @@ -2998,8 +2999,11 @@ var:vyska:*dimenze:: var:sirka:*dimenze:: var:maxvyska:*dimenze:: var:maxsirka:*dimenze:: +var:minsirka:*dimenze:: var:implicitni:*jmeno:: var:hranicestranky:*seznam:: +var:vzdalenostlevehookraje:*dimenze:: +var:vzdalenostpravehookraje:*dimenze:: var:misto:vlevo,nastred,vpravo:: ivr:nastavoramovani:: stopsetup @@ -3396,7 +3400,7 @@ stopsetup startsetup com:startfakt: -typ:tex/{geg}nop/sep/nop/sep/nop/sep/tex/{geg}stp/: +typ:tex/{fakt}nop/sep/nop/sep/nop/sep/tex/{fakt}stp/: val:*text:: val:*text:: val:*text:: @@ -3438,6 +3442,8 @@ var:vyska:*dimenze,prizpusobive:: var:sirka:*dimenze,prizpusobive:: var:misto:boven,midden,onder,links,rechts:: var:zarovnani:ne,vlevo,vpravo,nastred,normalni:: +var:pismeno:normalni,tucne,sklonene,tucnesklonene,opis,kap,male...*prikaz:: +var:barva:*jmeno:: stopsetup startsetup @@ -3482,7 +3488,7 @@ var:zpetnamezera:*dimenze:: var:svrchnimezera:*dimenze:: var:horoffset:*dimenze:: var:offsethlavicky:*dimenze:: -var:volba:max,zalozka:: +var:volba:max,prizpusobive,dvoustranny,zalozka:: var:prodleva:*cislo,zadny:: stopsetup @@ -3527,7 +3533,7 @@ stopsetup startsetup com:nastavinterakcnimenu: -typ:vals/vars/dests/: +typ:vals/vars/: val:vlevo,vpravo,vrsek,spodek,*jmeno:: var:pred:*prikaz:: var:po:*prikaz:: diff --git a/context/data/cont-de.tws b/context/data/cont-de.tws index 199604950..73219cd14 100644 --- a/context/data/cont-de.tws +++ b/context/data/cont-de.tws @@ -1840,6 +1840,7 @@ var:zzeile:*Nummer:: var:default:*Name:: var:linkerrandabstand:*Dimension:: var:rechterrandabstand:*Dimension:: +var:sidealign:normal,zeile:: ivr:stelleumrahmtein:: stopsetup @@ -1870,7 +1871,7 @@ stopsetup startsetup com:stellebindestrichein: typ:var/: -var:zeichen:--,---,-,\penalty 10000\ ,),(,=,/:: +var:zeichen:--,---,-,~,),(,=,/:: stopsetup startsetup @@ -2968,7 +2969,7 @@ stopsetup startsetup com:platziere<>: typ:val/refs/arg/arg/: -val:links,rechts,hier,oben,unten, imlinken,imrechten,imrand,marginalie, seite,gegenueber,immer,zwinge,lang:hier: +val:links,rechts,hier,oben,unten, imlinken,imrechten,imrand,marginalie, linkerrand,rechterrand,linkekante,rechterkante, innermargin,outermargin,inneredge,outeredge, innen,aussen,regel,hoch,tief,passend, seite,gegenueber,immer,zwinge,lang:hier: val:*Text:: val:*Text:: stopsetup @@ -2998,8 +2999,11 @@ var:hoehe:*Dimension:: var:breite:*Dimension:: var:maxhoehe:*Dimension:: var:maxbreite:*Dimension:: +var:minbreite:*Dimension:: var:default:*Name:: var:seitenbegrenzung:*Liste:: +var:linkerrandabstand:*Dimension:: +var:rechterrandabstand:*Dimension:: var:platz:links,mittig,rechts:: ivr:stelleumrahmtein:: stopsetup @@ -3438,6 +3442,8 @@ var:hoehe:*Dimension,passend:: var:breite:*Dimension,passend:: var:platz:boven,midden,onder,links,rechts:: var:ausrichtung:nein,links,rechts,mittig,normal:: +var:stil:normal,fett,geneigt,fettgeneigt,tippen,kap,klein...*Befehl:: +var:farbe:*Name:: stopsetup startsetup @@ -3482,7 +3488,7 @@ var:rumpfspatium:*Dimension:: var:kopfspatium:*Dimension:: var:rumpfabstand:*Dimension:: var:kopfoffset:*Dimension:: -var:option:max,bookmark:: +var:option:max,passend,doppelseitig,bookmark:: var:wartezeit:*Nummer,kein:: stopsetup @@ -3527,7 +3533,7 @@ stopsetup startsetup com:stelleinteraktionsmenueein: -typ:vals/vars/dests/: +typ:vals/vars/: val:links,rechts,oben,unten,*Name:: var:vor:*Befehl:: var:nach:*Befehl:: diff --git a/context/data/cont-en.tws b/context/data/cont-en.tws index 1a7275d65..a694dfdc9 100644 --- a/context/data/cont-en.tws +++ b/context/data/cont-en.tws @@ -1840,6 +1840,7 @@ var:nlines:*number:: var:default:*name:: var:leftmargindistance:*dimension:: var:rightmargindistance:*dimension:: +var:sidealign:normal,line:: ivr:setupframed:: stopsetup @@ -1870,7 +1871,7 @@ stopsetup startsetup com:setuphyphenmark: typ:var/: -var:sign:--,---,-,\penalty 10000\ ,),(,=,/:: +var:sign:--,---,-,~,),(,=,/:: stopsetup startsetup @@ -2968,7 +2969,7 @@ stopsetup startsetup com:place<>: typ:val/refs/arg/arg/: -val:left,right,here,top,bottom, inleft,inright,inmargin,margin, page,opposite,always,force,tall:here: +val:left,right,here,top,bottom, inleft,inright,inmargin,margin, leftmargin,rightmargin,leftedge,rightedge, innermargin,outermargin,inneredge,outeredge, inner,outer,regel,high,low,fit, page,opposite,always,force,tall:here: val:*text:: val:*text:: stopsetup @@ -2998,8 +2999,11 @@ var:height:*dimension:: var:width:*dimension:: var:maxheight:*dimension:: var:maxwidth:*dimension:: +var:minwidth:*dimension:: var:default:*name:: var:pageboundaries:*list:: +var:leftmargindistance:*dimension:: +var:rightmargindistance:*dimension:: var:location:left,middle,right:: ivr:setupframed:: stopsetup @@ -3396,7 +3400,7 @@ stopsetup startsetup com:startfact: -typ:tex/{geg}nop/sep/nop/sep/nop/sep/tex/{geg}stp/: +typ:tex/{fact}nop/sep/nop/sep/nop/sep/tex/{fact}stp/: val:*text:: val:*text:: val:*text:: @@ -3438,6 +3442,8 @@ var:height:*dimension,fit:: var:width:*dimension,fit:: var:location:boven,midden,onder,links,rechts:: var:align:no,left,right,middle,normal:: +var:style:normal,bold,slanted,boldslanted,type,cap,small...*command:: +var:color:*name:: stopsetup startsetup @@ -3482,7 +3488,7 @@ var:backspace:*dimension:: var:topspace:*dimension:: var:horoffset:*dimension:: var:veroffset:*dimension:: -var:option:max,bookmark:: +var:option:max,fit,doublesided,bookmark:: var:delay:*number,none:: stopsetup @@ -3527,7 +3533,7 @@ stopsetup startsetup com:setupinteractionmenu: -typ:vals/vars/dests/: +typ:vals/vars/: val:left,right,top,bottom,*name:: var:before:*command:: var:after:*command:: diff --git a/context/data/cont-it.tws b/context/data/cont-it.tws index bf0f4d730..e9e121751 100644 --- a/context/data/cont-it.tws +++ b/context/data/cont-it.tws @@ -1840,6 +1840,7 @@ var:nrighe:*numero:: var:implicito:*nome:: var:distanzamarginesinistro:*dimensione:: var:distanzamarginedestro:*dimensione:: +var:sidealign:normale,riga:: ivr:impostaincorniciato:: stopsetup @@ -1870,7 +1871,7 @@ stopsetup startsetup com:impostasegnosillabazione: typ:var/: -var:segno:--,---,-,\penalty 10000\ ,),(,=,/:: +var:segno:--,---,-,~,),(,=,/:: stopsetup startsetup @@ -2968,7 +2969,7 @@ stopsetup startsetup com:metti<>: typ:val/refs/arg/arg/: -val:sinistra,destra,qui,cima,fondo, insinistra,indestra,inmargine,margine, pagina,opposto,sempre,forza,alto:qui: +val:sinistra,destra,qui,cima,fondo, insinistra,indestra,inmargine,margine, marginesinistro,marginedestro,bordosinistro,bordodestro, margineinterno,margineesterno,bordointerno,bordoesterno, interno,esterno,regel,alto,basso,adatta, pagina,opposto,sempre,forza,alto:qui: val:*testo:: val:*testo:: stopsetup @@ -2998,8 +2999,11 @@ var:altezza:*dimensione:: var:ampiezza:*dimensione:: var:altezzamax:*dimensione:: var:ampiezzamax:*dimensione:: +var:ampiezzamin:*dimensione:: var:implicito:*nome:: var:limitipagina:*elenco:: +var:distanzamarginesinistro:*dimensione:: +var:distanzamarginedestro:*dimensione:: var:luogo:sinistra,centro,destra:: ivr:impostaincorniciato:: stopsetup @@ -3396,7 +3400,7 @@ stopsetup startsetup com:iniziafatto: -typ:tex/{geg}nop/sep/nop/sep/nop/sep/tex/{geg}stp/: +typ:tex/{fatto}nop/sep/nop/sep/nop/sep/tex/{fatto}stp/: val:*testo:: val:*testo:: val:*testo:: @@ -3438,6 +3442,8 @@ var:altezza:*dimensione,adatta:: var:ampiezza:*dimensione,adatta:: var:luogo:boven,midden,onder,links,rechts:: var:allinea:no,sinistra,destra,centro,normale:: +var:stile:normale,grassetto,inclinato,grassettoinclinato,type,cap,piccolo...*comando:: +var:colore:*nome:: stopsetup startsetup @@ -3482,7 +3488,7 @@ var:backspace:*dimensione:: var:spaziocima:*dimensione:: var:horoffset:*dimensione:: var:veroffset:*dimensione:: -var:opzione:max,segnalibro:: +var:opzione:max,adatta,doppiafaccia,segnalibro:: var:attesa:*numero,nessuno:: stopsetup @@ -3527,7 +3533,7 @@ stopsetup startsetup com:impostamenuinterazione: -typ:vals/vars/dests/: +typ:vals/vars/: val:sinistra,destra,cima,fondo,*nome:: var:prima:*comando:: var:dopo:*comando:: diff --git a/context/data/cont-nl.tws b/context/data/cont-nl.tws index 40af9c64c..5a479a410 100644 --- a/context/data/cont-nl.tws +++ b/context/data/cont-nl.tws @@ -1840,6 +1840,7 @@ var:nregels:*getal:: var:default:*naam:: var:linkermargeafstand:*maat:: var:rechtermargeafstand:*maat:: +var:zijuitlijnen:normaal,regel:: ivr:stelomlijndin:: stopsetup @@ -1870,7 +1871,7 @@ stopsetup startsetup com:stelkoppeltekenin: typ:var/: -var:teken:--,---,-,\penalty 10000\ ,),(,=,/:: +var:teken:--,---,-,~,),(,=,/:: stopsetup startsetup @@ -2968,7 +2969,7 @@ stopsetup startsetup com:plaats<>: typ:val/refs/arg/arg/: -val:links,rechts,hier,boven,onder, inlinker,inrechter,inmarge,marge, pagina,naast,altijd,forceer,lang:hier: +val:links,rechts,hier,boven,onder, inlinker,inrechter,inmarge,marge, linkermarge,rechtermarge,linkerrand,rechterrand, binnenmarge,buitenmarge,binnenrand,buitenrand, binnen,buiten,regel,hoog,laag,passend, pagina,naast,altijd,forceer,lang:hier: val:*tekst:: val:*tekst:: stopsetup @@ -2998,8 +2999,11 @@ var:hoogte:*maat:: var:breedte:*maat:: var:maxhoogte:*maat:: var:maxbreedte:*maat:: +var:minbreedte:*maat:: var:default:*naam:: var:paginaovergangen:*lijst:: +var:linkermargeafstand:*maat:: +var:rechtermargeafstand:*maat:: var:plaats:links,midden,rechts:: ivr:stelomlijndin:: stopsetup @@ -3438,6 +3442,8 @@ var:hoogte:*maat,passend:: var:breedte:*maat,passend:: var:plaats:boven,midden,onder,links,rechts:: var:uitlijnen:nee,links,rechts,midden,normaal:: +var:letter:normaal,vet,schuin,vetschuin,type,kap,klein...*commando:: +var:kleur:*naam:: stopsetup startsetup @@ -3482,7 +3488,7 @@ var:rugwit:*maat:: var:kopwit:*maat:: var:rugoffset:*maat:: var:kopoffset:*maat:: -var:optie:max,bookmark:: +var:optie:max,passend,dubbelzijdig,bookmark:: var:wachttijd:*getal,geen:: stopsetup @@ -3527,7 +3533,7 @@ stopsetup startsetup com:stelinteractiemenuin: -typ:vals/vars/dests/: +typ:vals/vars/: val:links,rechts,boven,onder,*naam:: var:voor:*commando:: var:na:*commando:: diff --git a/context/data/cont-ro.tws b/context/data/cont-ro.tws index 47cd1f752..27dc95bad 100644 --- a/context/data/cont-ro.tws +++ b/context/data/cont-ro.tws @@ -1840,6 +1840,7 @@ var:nlinii:*numar:: var:implicit:*nume:: var:distantamarginestanga:*dimensiune:: var:distantamarginedreapta:*dimensiune:: +var:sidealign:normal,linie:: ivr:seteazainconjurat:: stopsetup @@ -1870,7 +1871,7 @@ stopsetup startsetup com:seteazaliniesilabe: typ:var/: -var:semn:--,---,-,\penalty 10000\ ,),(,=,/:: +var:semn:--,---,-,~,),(,=,/:: stopsetup startsetup @@ -2968,7 +2969,7 @@ stopsetup startsetup com:pune<>: typ:val/refs/arg/arg/: -val:stanga,dreapta,aici,sus,subsol, instanga,indreapta,inmargine,margine, pagina,opus,totdeauna,fortat,inalt:aici: +val:stanga,dreapta,aici,sus,subsol, instanga,indreapta,inmargine,margine, marginestanga,marginedreapta,bordurastanga,borduradreapta, innermargin,outermargin,inneredge,outeredge, intern,extern,regel,inalt,jos,ajustat, pagina,opus,totdeauna,fortat,inalt:aici: val:*text:: val:*text:: stopsetup @@ -2998,8 +2999,11 @@ var:inaltime:*dimensiune:: var:latime:*dimensiune:: var:inaltimemaxima:*dimensiune:: var:latimemaxima:*dimensiune:: +var:latimeminima:*dimensiune:: var:implicit:*nume:: var:marginipagina:*lista:: +var:distantamarginestanga:*dimensiune:: +var:distantamarginedreapta:*dimensiune:: var:locatie:stanga,centru,dreapta:: ivr:seteazainconjurat:: stopsetup @@ -3396,7 +3400,7 @@ stopsetup startsetup com:startfapt: -typ:tex/{geg}nop/sep/nop/sep/nop/sep/tex/{geg}stp/: +typ:tex/{fact}nop/sep/nop/sep/nop/sep/tex/{fact}stp/: val:*text:: val:*text:: val:*text:: @@ -3438,6 +3442,8 @@ var:inaltime:*dimensiune,ajustat:: var:latime:*dimensiune,ajustat:: var:locatie:boven,midden,onder,links,rechts:: var:aliniere:nu,stanga,dreapta,centru,normal:: +var:stil:normal,aldin,inclinat,aldininclinat,type,cap,mic...*comanda:: +var:culoare:*nume:: stopsetup startsetup @@ -3482,7 +3488,7 @@ var:spatiuspate:*dimensiune:: var:spatiusus:*dimensiune:: var:offsetoriz:*dimensiune:: var:veroffset:*dimensiune:: -var:optiune:max,semncarte:: +var:optiune:max,ajustat,douafete,semncarte:: var:intarziere:*numar,niciunul:: stopsetup @@ -3527,7 +3533,7 @@ stopsetup startsetup com:seteazameniuinteractiune: -typ:vals/vars/dests/: +typ:vals/vars/: val:stanga,dreapta,sus,subsol,*nume:: var:inainte:*comanda:: var:dupa:*comanda:: diff --git a/context/perltk/texexec.pl b/context/perltk/texexec.pl index 0dd797d4b..dd6975041 100644 --- a/context/perltk/texexec.pl +++ b/context/perltk/texexec.pl @@ -1085,7 +1085,9 @@ sub MakeOptionFile {$DupStr = "" } else {$DupStr = ",\\v!dubbelzijdig" } - if ($PrintFormat =~ /.*up/goi) + if ($PrintFormat == '') + { print OPT "\\setuparranging[\\v!normaal]\n" } + elsif ($PrintFormat =~ /.*up/goi) { print OPT "\\setuparranging[2UP,\\v!geroteerd$DupStr]\n" } elsif ($PrintFormat =~ /.*down/goi) { print OPT "\\setuparranging[2DOWN,\\v!geroteerd$DupStr]\n" } @@ -1861,8 +1863,7 @@ sub RunCopy RunConTeXtFile($CopyFile, "tex") } sub RunCombine - { my $FileName = shift ; - print " pdffile : $FileName\n" ; + { my @Files = @_ ; $Combination =~ s/x/\*/io ; my ($nx,$ny) = split (/\*/,$Combination,2) ; return unless ($nx&&$ny) ; print " combination : $Combination\n" ; @@ -1881,7 +1882,6 @@ sub RunCombine # if ($PaperOffset eq '0pt') { $PaperOffset = '1cm' } - my $CleanFileName = CleanTeXFileName($FileName) ; print " paper offset : $PaperOffset\n" ; print COM "\\setuplayout\n" ; print COM " [topspace=$PaperOffset,\n" ; @@ -1893,12 +1893,18 @@ sub RunCombine if ($NoBanner) { print COM "\\setuplayout\n" ; print COM " [footer=0cm]\n" } - print COM "\\setupfootertexts\n" ; - print COM " [$CleanFileName\\space---\\space\\currentdate\\space---\\space\\pagenumber]\n" ; print COM "\\setupexternalfigures\n" ; print COM " [directory=]\n" ; print COM "\\starttext\n" ; - print COM "\\combinepages[$FileName][nx=$nx,ny=$ny]\n" ; + for $FileName (@Files) + { next if ($FileName =~ /^texexec/io) ; + next if ($FileName =~ /^$Result/i) ; + print " pdffile : $FileName\n" ; + my $CleanFileName = CleanTeXFileName($FileName) ; + print COM "\\setupfootertexts\n" ; + print COM " [$CleanFileName\\space---\\space\\currentdate\\space---\\space\\pagenumber]\n" ; + print COM "\\combinepages[$FileName][nx=$nx,ny=$ny]\n" ; + print COM "\\page" } print COM "\\stoptext\n" ; close (COM) ; $ConTeXtInterface = "en" ; @@ -2018,7 +2024,8 @@ sub RunFiles elsif ($PdfCopy) { RunCopy ($JobName) } else - { RunCombine ($JobName) } } } +# { RunCombine ($JobName) } } } + { RunCombine (@ARGV) } } } elsif ($TypesetModule) { RunModule (@ARGV) } else diff --git a/context/perltk/texfont.pl b/context/perltk/texfont.pl index cae71ee47..51db205b0 100644 --- a/context/perltk/texfont.pl +++ b/context/perltk/texfont.pl @@ -245,7 +245,7 @@ if (($batch)||($ARGV[0] =~ /.+\.dat$/io)) { if ($batchfile !~ /\.dat$/io) { $batchfile .= ".dat" } } unless (-f $batchfile) { report ("trying to locate : $batchfile") ; - $batchfile = `kpsewhich -progname=context --format="other text files" $batchfile` ; + $batchfile = `kpsewhich -progname=context --format="other text file" $batchfile` ; chomp $batchfile } error ("unknown batch file $batchfile") unless -e $batchfile ; report ("processing batch file : $batchfile") ; diff --git a/context/perltk/texutil.pl b/context/perltk/texutil.pl index bdd1912d6..4d99a197b 100644 --- a/context/perltk/texutil.pl +++ b/context/perltk/texutil.pl @@ -828,7 +828,9 @@ sub HandleKey $STR[$SortN] = $str ; $CHR[$SortN] = $chr ; $MAP[$SortN] = $map ; - $ALF{"$chr$map"} = $alf } +#print "$chr$map = $alf\n" ; +# $ALF{"$chr$map"} = $alf } + $ALF{"$map"} = $alf } sub FlushKeys { Report ("RemappedKeys", $SortN) } @@ -841,7 +843,7 @@ sub SanitizedString { my $s = $STR[$i] ; my $c = $CHR[$i] ; my $m = $MAP[$i] ; -#print "[$i $s $c $m]\n" ; + # print "[$i $s $c $m]\n" ; $string =~ s/($s)/$c/ge ; $copied =~ s/($s)/$m/ge } $string .= "\x00"; @@ -849,12 +851,10 @@ sub SanitizedString elsif ($ProcessQuotes) { $string =~ s/\\([\^\"\`\'\~\,])/$1/gio ; $copied = $string ; - $copied =~ s/([\^\"\`\'\~\,])([a-zA-Z])/$ASCII{$1}/gio ; + $copied =~ s/([\^\"\`\'\~\,])([a-zA-Z])/$ASCII{$1}/gi ; $string =~ s/([\^\"\`\'\~\,])([a-zA-Z])/$2/gio ; $string .= "\x00"; $string .= $copied } -# -#print "$original $string $copied\n" ; # new and very experimental, will change $string =~ s/\<\*(.*?)\>/\\$1 /go ; # reduce entities / will be table too $string =~ s/\\getXMLentity\s*\{(.*?)\}/$1/gio ; # {tex} => tex @@ -862,6 +862,7 @@ $string =~ s/\<[a-zA-Z\/].*?\>//go ; # remove elements # so far $string =~ s/\\-|\|\|/\-/gio ; $string =~ s/\\[a-zA-Z]*| |\{|\}//gio ; # ? +#print "$original $string $copied\n" ; return $string } #D This subroutine looks a bit complicated, which is due to the @@ -1251,10 +1252,9 @@ sub HandleRegister # the } { makes sure that local {} is ok { $Entry =~ s/([^\\])\&/$1$SPLIT/go ; $Entry =~ s/([^\\])\+/$1$SPLIT/go } $Key =~ s/^([^a-zA-Z])/ $1/go ; -$Key =~ s/^\s*\{(.*)\}$SPLIT/$1$SPLIT/go ; ####### new -$Entry =~ s/^\{(.*)\}$SPLIT/$1$SPLIT/go ; ###### new - if ($ProcessIJ) - { $Key =~ s/ij/yy/go } + $Key =~ s/^\s*\{(.*)\}$SPLIT/$1$SPLIT/go ; ####### new + $Entry =~ s/^\{(.*)\}$SPLIT/$1$SPLIT/go ; ###### new + if ($ProcessIJ) { $Key =~ s/ij/yy/go } $LCKey = lc $Key ; $RegStatus = $RegStat{$SecondTag} ; $RealPageNumber= sprintf("%6i",$RealPage) ; @@ -1348,9 +1348,9 @@ sub FlushRegisters $ActualB = "" ; $ActualC = "" ; -$SavedFrom = "" ; -$SavedTo = "" ; -$SavedEntry = "" ; + $SavedFrom = "" ; + $SavedTo = "" ; + $SavedEntry = "" ; for ($n=1 ; $n<=$NOfEntries ; ++$n) { ($Class, $LCKey, $Key, $Entry, $TextHow, $RegisterState, @@ -1361,7 +1361,8 @@ $SavedEntry = "" ; # if ($SortN) { $AlfKey = $Key ; - $AlfKey =~ s/(.).*\x00(.).*/$1$2/o ; +# $AlfKey =~ s/(.).*\x00(.).*/$1$2/o ; + $AlfKey =~ s/(.).*\x00(.).*/$2/o ; if (defined($ALF{$AlfKey})) { $TestAlfa = $ALF{$AlfKey} } } # @@ -1370,8 +1371,7 @@ $SavedEntry = "" ; $Alfa = $TestAlfa ; $AlfaClass = $Class ; if ($Alfa ne " ") - { -FlushSavedLine ; + { FlushSavedLine ; print TUO "\\registerentry{$Class}{$Alfa}\n" } } ($ActualA, $ActualB, $ActualC ) = split(/$SPLIT/, $Entry, 3) ; @@ -1395,55 +1395,42 @@ FlushSavedLine ; { $PreviousC = How($ActualC) } $Copied = 0 ; if ($ActualA ne "") - { -FlushSavedLine ; + { FlushSavedLine ; print TUO "\\registerentrya{$Class}{$ActualA}\n" ; $Copied = 1 } if ($ActualB ne "") - { -FlushSavedLine ; + { FlushSavedLine ; print TUO "\\registerentryb{$Class}{$ActualB}\n" ; $Copied = 1 } if ($ActualC ne "") - { -FlushSavedLine ; + { FlushSavedLine ; print TUO "\\registerentryc{$Class}{$ActualC}\n" ; $Copied = 1 } if ($Copied) { $NOfSaneEntries++ } if ($RealPage eq 0) - { -FlushSavedLine ; + { FlushSavedLine ; print TUO "\\registersee{$Class}{$PageHow,$TextHow}{$SeeToo}{$Page}\n" ; $LastPage = $Page ; $LastRealPage = $RealPage } elsif (($Copied) || ! (($LastPage eq $Page) and ($LastRealPage eq $RealPage))) { # print "$LastPage / $Page // $LastRealPage / $RealPage\n" ; - -$NextEntry = "{$Class}{$PreviousA}{$PreviousB}{$PreviousC}{$PageHow,$TextHow}" ; - + $NextEntry = "{$Class}{$PreviousA}{$PreviousB}{$PreviousC}{$PageHow,$TextHow}" ; $SavedLine = "{$Class}{$PageHow,$TextHow}{$Location}{$Page}{$RealPage}\n" ; if ($RegisterState eq $RegStat{"f"}) - { -FlushSavedLine ; + { FlushSavedLine ; print TUO "\\registerfrom$SavedLine" } elsif ($RegisterState eq $RegStat{"t"}) - { -FlushSavedLine ; + { FlushSavedLine ; print TUO "\\registerto$SavedLine" } else -# { print TUO "\\registerpage$SavedLine" } { if ($CollapseEntries) - { - -if ($SavedEntry ne $NextEntry) - { $SavedFrom = $SavedLine } -else - { $SavedTo = $SavedLine } -$SavedEntry = $NextEntry ; - - } + { if ($SavedEntry ne $NextEntry) + { $SavedFrom = $SavedLine } + else + { $SavedTo = $SavedLine } + $SavedEntry = $NextEntry } else { print TUO "\\registerpage$SavedLine" } } diff --git a/metapost/context/mp-core.mp b/metapost/context/mp-core.mp index 80e3a8eb5..5f1341a69 100644 --- a/metapost/context/mp-core.mp +++ b/metapost/context/mp-core.mp @@ -16,8 +16,8 @@ if known context_core : endinput ; fi ; boolean context_core ; context_core := true ; -pair lxy[], rxy[], cxy[], llxy[], lrxy[], ulxy[], urxy[] ; -path pxy[] ; +pair lxy[], rxy[], cxy[], llxy[], lrxy[], ulxy[], urxy[] ; +path pxy[] ; numeric hxy[], wxy[], dxy[], nxy[] ; def box_found (expr n,x,y,w,h,d) = @@ -397,6 +397,10 @@ if local_multi_par_area : TextAreas[1] := TextAreas[0] ; TextColumns[1] := TextColumns[0] ; nxy[fpos] := nxy[tpos] := nxy[wpos] := nxy[ppos] := RealPageNumber ; + +%draw TextColumns[1] withcolor green ; +%draw TextAreas[1] withcolor green ; + elseif ignore_multi_par_page : RealPageNumber := fn ; nxy[fpos] := nxy[tpos] := nxy[wpos] := nxy[ppos] := RealPageNumber ; @@ -600,7 +604,6 @@ fi ; % _pa_ := (xpart _pa_,ypart llcorner multipar); %fi ; - (xpart _ur_ + par_hang_indent, ypart _ur_) -- (xpart _ur_ + par_hang_indent, ypart _pa_) -- (xpart _ur_, ypart _pa_) @@ -836,6 +839,19 @@ fi ; fi ; + elseif (nxy[tpos]=RealPageNumber) : + + % outside text area, fall back / test on: pascal werkboek + + multipar := + + llxy[fpos] -- + lrxy[tpos] -- + urxy[tpos] -- + ulxy[fpos] -- cycle ; + + save_multipar (i,1,multipar) ; + else : multipar := if obey_multi_par_hang : @@ -899,7 +915,7 @@ snapped_multi_pos(ulxy[tpos]) -- save_multipar (i,3,multipar) ; else : - + % handled later fi ; diff --git a/metapost/context/mp-grph.mp b/metapost/context/mp-grph.mp index 8c94d68d0..957a60ec8 100644 --- a/metapost/context/mp-grph.mp +++ b/metapost/context/mp-grph.mp @@ -2,116 +2,124 @@ %D [ file=mp-grph.mp, %D version=2000.12.14, %D title=\CONTEXT\ \METAPOST\ graphics, -%D subtitle=graphic text support, +%D subtitle=graphic text support, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See licen-en.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See licen-en.pdf for +%C details. %D Under construction. -if unknown context_tool : input mp-tool ; fi ; -if known context_grph : endinput ; fi ; +if unknown context_tool : input mp-tool ; fi ; +if known context_grph : endinput ; fi ; -boolean context_grph ; context_grph := true ; +boolean context_grph ; context_grph := true ; -string CRLF ; CRLF := char 10 & char 13 ; +string CRLF ; CRLF := char 10 & char 13 ; -picture _currentpicture_ ; +picture _currentpicture_ ; def beginfig (expr c) = begingroup - charcode := c ; - resetfig ; - scantokens extra_beginfig ; -enddef ; + charcode := c ; + resetfig ; + scantokens extra_beginfig ; +enddef ; def resetfig = - clearxy ; - clearit ; + clearxy ; + clearit ; clearpen ; pickup defaultpen ; - interim linecap := linecap ; - interim linejoin := linejoin ; - interim miterlimit := miterlimit ; - save _background_ ; color _background_ ; _background_ := background ; + interim linecap := linecap ; + interim linejoin := linejoin ; + interim miterlimit := miterlimit ; + save _background_ ; color _background_ ; _background_ := background ; save background ; color background ; background := _background_ ; drawoptions () ; enddef ; -def protectgraphicmacros = - save showtext ; +def protectgraphicmacros = + save showtext ; save beginfig ; let beginfig = begingraphictextfig ; save endfig ; let endfig = endgraphictextfig ; - save end ; let end = relax ; - interim prologues := prologues ; + save end ; let end = relax ; + interim prologues := prologues ; resetfig ; -enddef ; +enddef ; -numeric currentgraphictext ; currentgraphictext := 0 ; +numeric currentgraphictext ; currentgraphictext := 0 ; string graphictextformat ; graphictextformat := "plain" ; -string graphictextstring ; graphictextstring := "" ; +string graphictextstring ; graphictextstring := "" ; string graphictextfile ; graphictextfile := "dummy.mpo" ; -def savegraphictext (expr str) = +def savegraphictext (expr str) = graphictextfile := jobname & ".mpo" ; if (graphictextstring<>"") : write graphictextstring to graphictextfile ; - graphictextstring := "" ; - fi ; + graphictextstring := "" ; + fi ; write str to graphictextfile ; - let erasegraphictextfile = relax ; -enddef ; + let erasegraphictextfile = relax ; +enddef ; -def erasegraphictextfile = +def erasegraphictextfile = graphictextfile := jobname & ".mpo" ; write EOF to graphictextfile ; - let erasegraphictextfile = relax ; -enddef ; + let erasegraphictextfile = relax ; +enddef ; -extra_beginfig := extra_beginfig & " erasegraphictextfile ;" ; +extra_beginfig := extra_beginfig & " erasegraphictextfile ;" ; def begingraphictextfig (expr n) = foundpicture := n ; scratchpicture := nullpicture ; enddef ; def endgraphictextfig = - if foundpicture = currentgraphictext : - expandafter endinput - else : - scratchpicture := nullpicture ; + if foundpicture = currentgraphictext : + expandafter endinput + else : + scratchpicture := nullpicture ; fi ; enddef ; -def loadfigure primary filename = - doloadfigure (filename) -enddef ; +def loadfigure primary filename = + doloadfigure (filename) +enddef ; def doloadfigure (expr filename) text figureattributes = begingroup ; - save figurenumber, figurepicture, number ; - numeric figurenumber ; figurenumber := 1 ; - picture figurepicture ; figurepicture := currentpicture ; - def number primary n = hide(figurenumber := n) enddef ; - protectgraphicmacros ; - % defaults + save figurenumber, figurepicture, number, fixedplace ; + numeric figurenumber ; figurenumber := 0 ; + boolean figureshift ; figureshift := true ; + picture figurepicture ; figurepicture := currentpicture ; + def number primary n = hide(figurenumber := n) enddef ; + def fixedplace = hide(figureshift := false) enddef ; + protectgraphicmacros ; + % defaults interim linecap := rounded ; interim linejoin := rounded ; interim miterlimit := 10 ; - % - currentpicture := nullpicture ; - def beginfig (expr n) = - currentpicture := nullpicture ; - if figurenumber=n : let endfig = endinput ; fi ; - enddef ; - let endfig = relax ; - readfile(filename) ; - currentpicture := currentpicture shifted -llcorner currentpicture ; - addto figurepicture also currentpicture figureattributes ; - currentpicture := figurepicture ; + % + currentpicture := nullpicture ; + draw fullcircle figureattributes ; % expand number + currentpicture := nullpicture ; + def beginfig (expr n) = + currentpicture := nullpicture ; + if (figurenumber=n) or (figurenumber=0) : + let endfig = endinput ; + fi ; + enddef ; + let endfig = relax ; + readfile(filename) ; + if figureshift : + currentpicture := currentpicture shifted -llcorner currentpicture ; + fi ; + addto figurepicture also currentpicture figureattributes ; + currentpicture := figurepicture ; endgroup ; enddef ; @@ -128,7 +136,7 @@ def dographictext (expr t) = fi ; currentgraphictext := currentgraphictext + 1 ; savegraphictext ("\startTEXpage[scale=10000]" & t & "\stopTEXpage") ; - dofinishgraphictext + dofinishgraphictext enddef ; def redographictext primary t = @@ -139,37 +147,37 @@ def regraphictext (expr t) = begingroup ; save currentgraphictext ; numeric currentgraphictext ; currentgraphictext := t ; - dofinishgraphictext + dofinishgraphictext enddef ; -%D Believe it or not, but it took me half a day to uncover +%D Believe it or not, but it took me half a day to uncover %D the following neccessity: -%D -%D \starttypen -%D save withfillcolor, withdrawcolor ; -%D \stoptypen -%D -%D When we have more than one graphictext, these will be -%D defined after the first graphic. For some obscure reason, +%D +%D \starttypen +%D save withfillcolor, withdrawcolor ; +%D \stoptypen +%D +%D When we have more than one graphictext, these will be +%D defined after the first graphic. For some obscure reason, %D this means that in the next graphic they will be called, but -%D afterwards the data and boolean are not set. Don't ask me -%D why. +%D afterwards the data and boolean are not set. Don't ask me +%D why. def dofinishgraphictext text x_op_x = protectgraphicmacros ; - interim linecap := butt ; % normally rounded - interim linejoin := mitered ; % normally rounded - interim miterlimit := 10 ; % todo + interim linecap := butt ; % normally rounded + interim linejoin := mitered ; % normally rounded + interim miterlimit := 10 ; % todo let normalwithshade = withshade ; save foundpicture, scratchpicture, str ; save fill, draw, withshade, reversefill, outlinefill ; save withfillcolor, withdrawcolor ; % quite important numeric foundpicture ; picture scratchpicture ; string str ; def draw expr p = - % the first, naive implementation was: + % the first, naive implementation was: % addto scratchpicture doublepath p withpen currentpen ; - % but it is better to turn lines into fills - addto scratchpicture contour boundingbox + % but it is better to turn lines into fills + addto scratchpicture contour boundingbox image (addto currentpicture doublepath p withpen currentpen) ; enddef ; def fill expr p = @@ -247,22 +255,22 @@ def dofinishgraphictext text x_op_x = endgroup ; enddef ; -def resetgraphictextdirective = - graphictextstring := "" ; -enddef ; +def resetgraphictextdirective = + graphictextstring := "" ; +enddef ; -def graphictextdirective text t = - graphictextstring := graphictextstring & t & CRLF ; -enddef ; +def graphictextdirective text t = + graphictextstring := graphictextstring & t & CRLF ; +enddef ; -endinput +endinput % example -input mp-grph ; +input mp-grph ; - graphictextformat := "context" ; -% graphictextformat := "plain" ; + graphictextformat := "context" ; +% graphictextformat := "plain" ; % graphictextformat := "latex" ; graphictextdirective "\documentclass[]{article}" ; beginfig (1) ; @@ -272,11 +280,11 @@ beginfig (1) ; withdrawcolor blue withfillcolor red withpen pencircle scaled 2pt ; -endfig ; +endfig ; -beginfig(1) ; - loadfigure "gracht.mp" rotated 20 ; - loadfigure "koe.mp" number 1 scaled 2 ; -endfig ; +beginfig(1) ; + loadfigure "gracht.mp" rotated 20 ; + loadfigure "koe.mp" number 1 scaled 2 ; +endfig ; end diff --git a/metapost/context/mp-spec.mp b/metapost/context/mp-spec.mp index dca7ffdbc..10118f2c0 100644 --- a/metapost/context/mp-spec.mp +++ b/metapost/context/mp-spec.mp @@ -261,11 +261,16 @@ enddef ; %D Since a \type {fill p withshade s} syntax looks better %D than some macro, we implement a new primary. -primarydef p withshade sc = +primarydef p withshade sc = % == p withcolor shadecolor(sh) hide (_color_counter_ := _color_counter_ + 1) p withcolor (_special_signal_/1000,_color_counter_/1000,sc/1000) enddef ; +vardef shadecolor(expr sc) = + hide (_color_counter_ := _color_counter_ + 1) + (_special_signal_/1000,_color_counter_/1000,sc/1000) +enddef ; + %D Figure inclusion. %numeric cef ; cef := 0 ; diff --git a/metapost/context/mp-tool.mp b/metapost/context/mp-tool.mp index 210c34632..b1fd6bf22 100644 --- a/metapost/context/mp-tool.mp +++ b/metapost/context/mp-tool.mp @@ -1999,7 +1999,7 @@ enddef ; def addbackground text t = begingroup ; save p ; picture p ; p := currentpicture ; currentpicture := nullpicture ; - fill boundingbox p t ; draw p ; + fill boundingbox p t ; addto currentpicture also p ; endgroup ; enddef ; @@ -2048,6 +2048,13 @@ vardef unstringed (expr s) = expandafter known scantokens(cleanstring(s)) enddef ; +% new + +vardef colorpart(expr i) = + (redpart i, greenpart i,bluepart i) +enddef ; + + % done endinput ; diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex index c23efdf38..b06eedda8 100644 --- a/tex/context/base/colo-ini.tex +++ b/tex/context/base/colo-ini.tex @@ -714,17 +714,29 @@ \fi \exectransparency} +% \def\doexeccolorPP#1:#2:% +% {\edef\@@cl@@n{#1}% +% \edef\@@cl@@p{#2}% +% \registerusedspotcolor\@@cl@@n +% \ifx\@@cl@@n\currentspotcolor +% \normalizeSPOT +% \dostartgraycolormode\@@cl@@p % was spotcolormode +% \else +% \dostartgraycolormode\@@cl@@o +% \fi +% \exectransparency} + \def\doexeccolorPP#1:#2:% {\edef\@@cl@@n{#1}% \edef\@@cl@@p{#2}% \registerusedspotcolor\@@cl@@n \ifx\@@cl@@n\currentspotcolor - \normalizeSPOT + \normalizeSPOT \dostartgraycolormode\@@cl@@p % was spotcolormode \else - \dostartgraycolormode\@@cl@@o + \dovidecolor\@@cl@@p\@@cl@@o \fi - \exectransparency} + \exectransparency} \def\doexeccolorrgb {\ifcase\currentcolorchannel @@ -756,13 +768,58 @@ %D When filtering colors, we need to either erase %D the background, or ignore the foreground. +% \newif\ifhidesplitcolor \hidesplitcolortrue +% +% \def\noexeccolor#1\od +% {\dostartgraycolormode\@@cl@@o} +% +% \let\noexeccolorS\noexeccolor +% \let\noexeccolorP\noexeccolor + +%D Well, here comes some real trickery. When we have the 100\% +%D spot color or black color, we don't want to erase the +%D background. So, instead we hide the content by giving it +%D zero transparency. + +% todo : #1#2#3 met #2 > of < and #3 een threshold + \newif\ifhidesplitcolor \hidesplitcolortrue -\def\noexeccolor#1\od - {\dostartgraycolormode\@@cl@@o} +\def\dohidecolor#1#2% + {\ifhidesplitcolor + \ifx#1#2% + \dostartgraycolormode\@@cl@@o + \else + \fullytransparentcolor + \fi + \else + \dostartgraycolormode\@@cl@@o + \fi} + +\def\dovidecolor#1#2% + {\ifhidesplitcolor + \ifx#1#2% + \fullytransparentcolor + \else + \dostartgraycolormode\@@cl@@o + \fi + \else + \dostartgraycolormode\@@cl@@o + \fi} + +\def\fullytransparentcolor + {\dostartgraycolormode\@@cl@@o % better than z + %\global\@EA\chardef\csname\@@currenttransparent\endcsname\plusone + %\global\intransparenttrue + \dostarttransparency10} + +\def\noexeccolorS#1:#2\od + {\edef\@@cl@@s{#1}% + \dohidecolor\@@cl@@s\@@cl@@o} -\let\noexeccolorS\noexeccolor -\let\noexeccolorP\noexeccolor +\def\noexeccolorP#1:#2:#3\od + {\edef\@@cl@@p{#2}% + \dohidecolor\@@cl@@p\@@cl@@z} %D For the sake of postprocessing (i.e.\ color separation) %D we can normalize colors, which comes down to giving equal diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 2180bd1b7..a2ff8d06e 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -18,120 +18,38 @@ %D excellent place for hacks and new features. \unprotect - -\setupclipping - [\c!linkeroffset=\zeropoint, - \c!rechteroffset=\zeropoint, - \c!bovenoffset=\zeropoint, - \c!onderoffset=\zeropoint] -\def\doclip[#1]% nb top->bottom left->right - {\bgroup - \getparameters[\??cp][#1]% - \dowithnextbox - {\ifdim\@@cpbreedte>\zeropoint - \dimen0=\@@cpbreedte - \dimen4=\@@cphoffset - \else - \dimen0=\wd\nextbox - \divide\dimen0 \@@cpnx - \dimen4=\@@cpx\dimen0 - \advance\dimen4 -\dimen0 - \dimen0=\@@cpsx\dimen0 - \fi - \relax % sure - \ifdim\@@cphoogte>\zeropoint - \dimen2=\@@cphoogte - \dimen6=\ht\nextbox - \advance\dimen6 -\@@cpvoffset - \advance\dimen6 -\dimen2 +\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!} + +\def\toplinebox + {\dowithnextbox + {\ifdim\dp\nextbox>\strutdepth + \scratchdimen\dp\nextbox + \advance\scratchdimen-\strutdepth + \getnoflines\scratchdimen + \struttedbox{\box\nextbox}% + \dorecurse\noflines{\vbox{\hsize\zeropoint\strut}}% \else - \dimen2=\ht\nextbox - \divide\dimen2 \@@cpny - \dimen6=-\@@cpy\dimen2 - \advance\dimen6 -\@@cpsy\dimen2 - \advance\dimen6 \dimen2 - \dimen2=\@@cpsy\dimen2 - \advance\dimen6 \ht\nextbox - \fi - \setbox\nextbox\hbox % old - {\advance\dimen4 -\@@cplinkeroffset % new ! - \advance\dimen6 \@@cpbovenoffset % new ! - \hskip-\dimen4\lower\dimen6\box\nextbox}% old - \wd\nextbox\zeropoint - \ht\nextbox\zeropoint - \dp\nextbox\zeropoint - \setbox\nextbox\hbox - {\advance\dimen0 \@@cplinkeroffset % new ! - \advance\dimen0 \@@cprechteroffset % new ! - \advance\dimen2 \@@cpbovenoffset % new ! - \advance\dimen2 \@@cponderoffset % new ! - \dostartclipping\@@cpmp{\dimen0}{\dimen2}% old - \box\nextbox - \dostopclipping}% - \setbox\nextbox\hbox % new ! - {\dimen0-\@@cplinkeroffset % new ! - \dimen2-\@@cpbovenoffset % new ! - \hskip\dimen0\lower\dimen2\box\nextbox}% new ! - \wd\nextbox\dimen0 - \ht\nextbox\dimen2 - \dp\nextbox\zeropoint - \box\nextbox - \egroup}% - \hbox} + \box\nextbox + \fi}% + \tbox} -% beware, we have clipping offsets of 2\lineheight by default - -\def\columntextareaparameter#1% - {\csname\??mt\currentcolumntestarea#1\endcsname} - -\def\dodoplacecolumntextareas#1#2% - {\def\currentcolumntestarea{#1#2}% - \!!counta\columntextareaparameter\c!x - \!!countb\columntextareaparameter\c!nx - \docalculatecolumnsetspan - \!!heighta\columntextareaparameter\c!ny\lineheight - % to do: met/zonder ht/dp - \ifnum\columntextareaparameter\c!y=\zerocount - \advance\!!heighta -\lineheight - \advance\!!heighta \topskip +\def\expandifnonempty#1% + {\@EA\ifx\csname#1\endcsname\empty + \expandafter\secondoftwoarguments + \else + \expandafter\firstoftwoarguments \fi - \advance\!!heighta -\lineheight % option - \setbox\scratchbox\vbox - {\donetrue\localframed - [\??mt\currentcolumntestarea] - [\c!breedte=\!!widtha,\c!hoogte=\!!heighta,\c!regels=] - {\columntextareaparameter\empty}}% - \!!counta\columntextareaparameter\c!x - \!!countb\columntextareaparameter\c!y - \advance\!!countb \columntextareaparameter\c!ny - \advance\!!countb \minusone - \OTRSETsetgridcell - \!!counta\!!countb - \hbox{\clip - [\c!bovenoffset=\columntextareaparameter\c!clipoffset,% - \c!onderoffset=\columntextareaparameter\c!clipoffset,% - \c!linkeroffset=\columntextareaparameter\c!clipoffset,% - \c!breedte=\!!widthb,% - \c!hoogte=\!!heighta]% - {\copy\scratchbox}}% - \ifcase\!!countc\else - \advance\!!counta \columntextareaparameter\c!nx - \advance\!!counta -\!!countc - \advance\!!widtha -\!!widthb - \OTRSETsetgridcell - \!!counta\!!countb - \hbox - {\hskip-\namedlayoutparameter\v!oneven\c!rugwit - \clip - [\c!bovenoffset=\columntextareaparameter\c!clipoffset,% - \c!onderoffset=\columntextareaparameter\c!clipoffset,% - \c!rechteroffset=\columntextareaparameter\c!clipoffset,% - \c!breedte=\!!widtha,% - \c!hoogte=\!!heighta,% - \c!hoffset=\!!widthb]% - {\copy\scratchbox}}% - \fi} + {\csname#1\endcsname}} + +\def\@@sectiekoppeling#1% + {\expandifnonempty{\??ko#1\c!koppeling}{#1}} + +\def\@@sectiesectie#1% + {\expandifnonempty{\??ko#1\c!sectie}{\@@sectiekoppeling{#1}}} + +\def\sectioncountervalue#1% + {\@@sectionvalue{\@@sectiesectie{#1}}} \def\NormalizeFontSize#1#2#3#4#5% the normal struggle with accuracy {\bgroup @@ -152,8 +70,6 @@ \expandafter \egroup \expandafter\font\expandafter#2\fontname\font\relax} - - % todo namespace \@@meta:#1:... ! ! ! ! ! ! @@ -163,55 +79,6 @@ \def\dopresetMPvariable[#1][#2=#3]% {\doifundefined{#1:#2}{\setvalue{#1:#2}{#3}}} -\def\complexcolumnbreak[#1]% if empty, do nothing and avoid processing - {\doifsomething{#1}{\executecolumnbreakhandlers{#1}}} - -\def\OTRSETsethsize - {%\OTRSETassignwidth\OTRSETidentifier\to\localcolumnwidth - \localcolumnwidth\OTRSETlocalwidth\mofcolumns - \tekstbreedte\localcolumnwidth - \hsize\localcolumnwidth} - -\def\OTRSETsynchronizehsize - {\ifcase0\getvalue{\??mc\??mc\c!breedte}\else % some width set - \bgroup - \scratchdimen\OTRSETlocalwidth\mofcolumns - \ifdim\scratchdimen=\tekstbreedte - \egroup - \else - \egroup \OTRSETsethsize % only if change in width and \column/\break - \fi - \fi } - -\def\filluparrangedpages % beware: \realpageno is 1 ahead - {\ifarrangingpages - \scratchcounter\realpageno - \advance\scratchcounter \minusone - \dosetmodulo\scratchcounter\arrangedpageT\scratchcounter - \ifcase\scratchcounter\else - \advance\scratchcounter \plusone - \dostepwiserecurse\scratchcounter\arrangedpageT\plusone - {\noheaderandfooterlines\ejectdummypage}% - \fi - \fi} - -\def\substituteincommalist#1#2#3% old, new, list (slooow) - {\edef\!!stringb{#1}% - \edef\!!stringd{#2}% - \let\!!stringa#3% - \let#3\empty - \def\dosubstituteincommalist##1% - {\edef\!!stringc{##1}% - \ifx\!!stringb\!!stringc - \ifx\!!stringd\empty\else - \edef#3{#3\ifx#3\empty\else,\fi\!!stringd}% - \fi - \def\docommando####1{\edef#3{#3,####1}}% - \else - \edef#3{#3\ifx#3\empty\else,\fi##1}% - \fi}% - \@EA\rawprocesscommacommand\@EA[\!!stringa]\dosubstituteincommalist} - % experiment, not yet to be used \def\displaybreak @@ -226,24 +93,10 @@ \def\tightvbox {\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox} + \def\tightvtop {\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop} -% cleaner - -\def\@@nmpre#1{\doiftext{#1}{{#1}\tfskip}} -\def\@@nmpos#1{\doiftext{#1}{\tfskip{#1}}} - -% newer - -\def\@@nmprepos#1#2#3#4#5% - {\doifelsenothing\@@nmbreedte - {\doiftext{#5}{#1{#5}#2}} - {\doiftext{#5}{\hbox to \@@nmbreedte{#3{#5}#4}}}} - -\def\@@nmpre{\@@nmprepos\empty\tfskip\relax\hss} -\def\@@nmpos{\@@nmprepos\tfskip\empty\hss\relax} - \def\startpagefigure {\dodoubleempty\dostartpagefigure} @@ -263,157 +116,14 @@ \def\dopagefigure[#1][#2]% {\dostartpagefigure[#1][#2]\stoppagefigure} -\def\doprocesstabskipline#1% - {\bgroup - \scratchcounter\plusone - \dodoprocesstabskipline#1\relax - \egroup} - -\def\dodoprocesstabskipline#1% - {\ifnum\scratchcounter>\spacespertab\relax - \donetrue \else \donefalse \advance - \fi \scratchcounter \plusone - \ifx#1\relax \else - \ifcase\tabskipmode - % can't happen - \or - % go on - \else\ifnum`#1<128 - % ok, no special character - \else\ifnum\catcode`#1=\active - % quits parsing, else utf lookahead problems - \chardef\tabskipmode\zerocount - \fi\fi\fi - \ifcase\tabskipmode - \@EAEAEA#1% - \else - \@EAEAEA#1\@EAEAEA\dodoprocesstabskipline - \fi - \fi} - -\setuptyping[\c!tab=\s!ascii] % better default than \v!yes - -% obey eigennummer - -\def\doresetsectioncounters#1% - {\resetcounter{\??se#1}% - \letgvalue{\??se#1\c!eigennummer}\relax - \donexttracklevel{#1}} - -\def\@@shortsectionnumber#1% - {\@EA\ifx\csname\??se#1\c!eigennummer\endcsname\relax - \@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax - \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax - \@@sectionvalue{#1}% - \else - \@@sectionconversion{#1}{\@@sectionvalue{#1}}% - \fi - \else - \@@sectionconversion{#1}{\@@sectionvalue{#1}}% - \fi - \else - \csname\??se#1\c!eigennummer\endcsname - \fi} - -\def\setsomeheadconversion#1#2% - {\someheadconversionfalse - \doifelsevalue{\??ko#1\c!eigennummer}\v!ja - {\setgvalue{\??se\@@sectie\c!eigennummer}{#2}% - \def\someheadconversion{#2}} - {\letgvalue{\??se\@@sectie\c!eigennummer}\relax - \bepaalkopnummer[#1]% - \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\relax - \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\relax - \def\someheadconversion{#2}% - \else - \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\empty - \def\someheadconversion{#2}% - \else - \someheadconversiontrue - \def\someheadconversion% - {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\c!kopconversie}}{#2}}% - \fi - \fi - \else - \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\empty - \def\someheadconversion{#2}% - \else - \someheadconversiontrue - \def\someheadconversion% - {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\@@sectieblok\c!kopconversie}}{#2}}% - \fi - \fi}} - % pretty important (esp since we now ignore shipouts) % % actually we should nil all writes, marks, specials \appendtoks \globallet\popcolor\relax \to \everylastshipout -\def\doscalelikeafigure % quite dirty and potential interference possible - {\doifsomething{\@@xyfactor\@@xyhfactor\@@xybfactor\@@xyschaal - \@@xybreedte\@@xyhoogte\@@xyregels} - {\let \@@efschaal \@@xyschaal - \let \@@effactor \@@xyfactor - \let \@@efbfactor\@@xybfactor - \let \@@efhfactor\@@xyhfactor - \let \@@efbreedte\@@xybreedte - \let \@@efhoogte \@@xyhoogte - \let \@@efregels \@@xyregels - \let \@@epx \!!zeropoint - \let \@@epy \!!zeropoint - \edef\@@epw {\the\wd\nextbox}% - \edef\@@eph {\the\ht\nextbox}% - \figwid\zeropoint \figxsca\plusone % see note * (core-fig) - \fighei\zeropoint \figysca\plusone % see note * (core-fig) - \checkfiguresettings - \setfactorfiguresize - \setscalefiguresize - \setdimensionfiguresize - \convertfigureinsertscale\@@epx\figx\figxsca\scax - \convertfigureinsertscale\@@epy\figy\figysca\scay - \scratchdimen\scax\s!pt \divide\scratchdimen 100 - \edef\@@xysx{\withoutpt\the\scratchdimen}% - \scratchdimen\scay\s!pt \divide\scratchdimen 100 - \edef\@@xysy{\withoutpt\the\scratchdimen}}} - -\def\doschaal[#1]% - {\bgroup - \forgetall - \getparameters - [\??xy] - [\c!schaal=,\c!breedte=,\c!hoogte=,\c!regels=, - \c!factor=,\c!hfactor=,\c!bfactor=, - \c!sx=1,\c!sy=1,#1]% - \dowithnextbox - {\dontshowcomposition - \ifdim\ht\nextbox>\zeropoint \ifdim\wd\nextbox>\zeropoint - \doscalelikeafigure - \dimen0=\@@xysy\ht\nextbox - \dimen2=\@@xysy\dp\nextbox - \dimen4=\@@xysx\wd\nextbox - \dimen6=\dimen0\advance\dimen6 \dimen2 -% \setbox\nextbox\vbox to \dimen6 -% {\ht\nextbox\zeropoint -% \dp\nextbox\zeropoint -% \vfill % erbij -% \dostartscaling\@@xysx\@@xysy\box\nextbox\dostopscaling}% - \setbox\nextbox\hbox - {\smashbox\nextbox - \dostartscaling\@@xysx\@@xysy\box\nextbox\dostopscaling}% - \ht\nextbox\dimen0 - \dp\nextbox\dimen2 - \wd\nextbox\dimen4 - \fi \fi - \box\nextbox - \egroup} - \hbox} - -\def\incrementvalue#1% - {\expandafter\increment\csname#1\endcsname} - -\def\decrementvalue#1% - {\expandafter\decrement\csname#1\endcsname} +\def\incrementvalue#1{\expandafter\increment\csname#1\endcsname} +\def\decrementvalue#1{\expandafter\decrement\csname#1\endcsname} % \translateMPinput{il2-pl} % @@ -427,118 +137,6 @@ % draw btex MetaPost: ± ¶ etex scaled 5 ; % \stopMPcode -\def\doMPpositiongraphic#1#2% tag setups - {\bgroup - \def\@@meta{#1:}% - \setupMPvariables[#2]% - \prepareMPpositionvariables - \MPshiftdrawingtrue - \def\doMPpositiongraphic##1##2% - {{% new, see (techniek) - \def\@@meta{##1:}% - \setupMPvariables[#2,##2]% - \prepareMPpositionvariables - % and needed - \getvalue{MPG:##1}}}% temp hack - \setbox\positiongraphicbox\hbox - {\ignorespaces - \executeifdefined{MPM:#1}{\executeifdefined{MPG:#1}\donothing}% - \removelastspace}% - \smashbox\positiongraphicbox - \box\positiongraphicbox - \egroup} - -\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!} - -\def\columnhbreak - {\ifhmode - \bgroup - \removeunwantedspaces - \parfillskip\zeropoint - \OTRSETcolumnseparator - \par - \egroup - \fi} - -\installcolumnbreakhandler {SET} \v!lokaal - {\columnhbreak - \ejectinsert - \ejectpage % brrr - \OTRSETsynchronizehsize} % no \OTRSETsethsize, can be mid smaller (like tabulate) - -% We need to make sure that we really leave the column; mid -% column we may end up in an empty gap, and we don;t want to -% stay there (basically such a gap is a small empty page -% then). - -\installcolumnbreakhandler {SET} \v!ja - {\columnhbreak - \edef\savedmofcolumns{\the\mofcolumns}% - \edef\savedrealpageno{\the\realpageno}% - \ejectinsert - \ejectpage % brrr - \doloop - {\ifnum\savedmofcolumns=\mofcolumns - \ifnum\savedrealpageno=\realpageno - \OTRSETdummycolumn - \else - \exitloop - \fi - \else - \exitloop - \fi}% - \OTRSETsynchronizehsize} - -% testcase : pascal demo-bbi, paragraaf/aanduiding koppen - -\ifx\lastskipinotr\undefined \newskip\lastskipinotr \fi - -\installoutput\OTRSETflushpreposttext - {\global\setbox\precolumnbox\vbox - {\unvbox\normalpagebox - \global\lastskipinotr\lastskip}% - \ifdim\lastskipinotr>\zeropoint - \global\setbox\precolumnbox\hbox - {\lower\strutdepth\box\precolumnbox}% - \fi - \global\dp\precolumnbox\strutdepth - \ifcarryoverfootnotes \else - \global\setbox\postcolumnbox\vbox{\placebottomnotes}% - \fi} - -\def\dopositionaction#1% test saves hash entry in etex - {\ifundefined{\POSactionprefix#1::}\else - \ifnum\MPp{#1}>\zerocount % new -\setbox\scratchbox\hbox - \bgroup - \traceposstring\clap\red{<#1>}% - \the\everyinsertpositionaction - \the\everypositionaction - \ifcollectMPpositiongraphics - % can save a lot of run time - \pushMPdrawing - \MPshiftdrawingtrue - \resetMPdrawing - \getvalue{\POSactionprefix#1::}% - \ifMPdrawingdone - \getMPdrawing - \fi - \resetMPdrawing - \popMPdrawing - \else - \getvalue{\POSactionprefix#1::}% - \fi - \cleanuppositionaction{#1}% - \egroup -\smashedbox\scratchbox - \else - % shouldn't happen too often - \traceposstring\clap\cyan{<#1>}% - \fi - \fi} - -\def\MPspacechar{\char32\relax} % old solution does not work with math - \def\begintbl {\doglobal\newcounter\colTBL \doglobal\newcounter\rowTBL @@ -552,63 +150,6 @@ % \startcolumnsetspan[two] \input tufte \stopcolumnsetspan % \input tufte \stopcolumnset -%D Well, here comes some real trickery. When we have the 100\% -%D spot color or black color, we don't want to erase the -%D background. So, instead we hide the content by giving it -%D zero transparency. - -% todo : #1#2#3 met #2 > of < and #3 een threshold - -% \newif\ifhidesplitcolor \hidesplitcolortrue - -\def\dohidecolor#1#2% - {\ifhidesplitcolor - \ifx#1#2% - \dostartgraycolormode\@@cl@@o - \else - \fullytransparentcolor - \fi - \else - \dostartgraycolormode\@@cl@@o - \fi} - -\def\dovidecolor#1#2% - {\ifhidesplitcolor - \ifx#1#2% - \fullytransparentcolor - \else - \dostartgraycolormode\@@cl@@o - \fi - \else - \dostartgraycolormode\@@cl@@o - \fi} - -\def\fullytransparentcolor - {\dostartgraycolormode\@@cl@@o % better than z - %\global\@EA\chardef\csname\@@currenttransparent\endcsname\plusone - %\global\intransparenttrue - \dostarttransparency10} - -\def\noexeccolorS#1:#2\od - {\edef\@@cl@@s{#1}% - \dohidecolor\@@cl@@s\@@cl@@o} - -\def\noexeccolorP#1:#2:#3\od - {\edef\@@cl@@p{#2}% - \dohidecolor\@@cl@@p\@@cl@@z} - -\def\doexeccolorPP#1:#2:% - {\edef\@@cl@@n{#1}% - \edef\@@cl@@p{#2}% - \registerusedspotcolor\@@cl@@n - \ifx\@@cl@@n\currentspotcolor - \normalizeSPOT - \dostartgraycolormode\@@cl@@p % was spotcolormode - \else - \dovidecolor\@@cl@@p\@@cl@@o - \fi - \exectransparency} - % now in cont-loc.tex, for the sake of testing. % % %D When \type {\somecolor} is issued, we can savely assume @@ -688,6 +229,8 @@ \@EA\rawreference\@EA\s!ref\@EA\asciia\@EA{\asciib}% \egroup} +% what is this stupid macro meant for: + \def\hyphenationpoint {\hskip\zeropoint} @@ -733,274 +276,6 @@ % \let\registerparoptions\relax % \to \everyforgetall -\newsignal\noblanksignal - -\def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if - {\global\blankoresetfalse - \global\blankoblokkeerfalse - \global\blankogeenwitfalse - \global\lokaalblankoflexibelfalse - \global\lokaalblankovastfalse - \global\blankoskip\zeropoint - \global\blankoforceerfalse - \blankobuitenfalse - \expanded{\rawprocesscommalist[#1]}\doblanko - \ifdim\blankoskip=\zeropoint\relax - \iflokaalblankoflexibel - \doglobal\advance\blankoskip \currentblanko - \else\iflokaalblankovast - \doglobal\advance\blankoskip \currentblanko - \fi\fi - \fi - \ifblankobuiten - \else - \par - \ifvmode %in pos fonts gaat dit mis - \ifblankoforceer%\ifdim\prevdepth>\zeropoint\else - % -1000pt signals top of page or column (\ejectcolumn) - \vbox{\strut}\kern-\lineheight - \fi - \ifblankoblokkeer - \global\doeblankofalse - \ifgridsnapping - \ifdim\prevdepth<\zeropoint - % brrr - \else - % dirty trick: smaller blanks are ignored after - % a larger one, so 10 lines is probably safe; first make - % sure that we honor penalties - \scratchcounter\lastpenalty - % now comes the trick (cross our fingers that this works - % well in multi columns; maybe an ifinner test is needed - % \vskip-10\lineheight - % \ifnum\scratchcounter=\zerocount \else \penalty\lastpenalty \fi - % \vskip 10\lineheight - % allas, this leads to overfull pages, so we try this: - \kern-\noblanksignal - \ifnum\scratchcounter=\zerocount - \else - \penalty\lastpenalty - \fi - \kern\noblanksignal - % end-of-dirty-trick - \fi - \else - \ifdim\prevdepth<\zeropoint - % brrr - \else - % ensure at least a proper prevdepth, this should be - % an option - \vskip-\prevdepth - \vskip\strutdepth - \prevdepth\strutdepth - \fi - % the old crappy piece of code - \edef\oldprevdepth{\the\prevdepth}% - \prevdepth\newprevdepth - \fi - \else - \global\doeblankotrue - \fi - \ifblankoreset - \global\doeblankotrue - \ifgridsnapping - % let's play safe and not fool around with the depth, if - % only because it took a lot of effort to sort out the grid - % stuff in the first place - \else - \ifdim\prevdepth=\newprevdepth - \prevdepth\oldprevdepth - \fi - \fi - \fi - \ifdoeblanko - \ifdim1\lastskip<1\blankoskip\relax - % else when \blanko[2*groot] + \blanko[3*groot] with parskip - % equaling 1*groot, gives a groot=\parskip so adding a small - % value makes it distinguishable; can also be done at parskip - % setting time (better) - \global\advance\blankoskip \mindimen\relax % = skip - % test this on 2* + 3* and parskip groot - \ifblankogeenwit - \global\advance\blankoskip -\parskip - \else - \ifdim\lastskip=\parskip - \else % force this due to previous comment - \ifdim\parskip>\zeropoint\relax - \ifdim\blankoskip<\parskip\relax - \global\blankoskip\zeropoint - \else - \global\advance\blankoskip -\parskip - \fi - \fi - \fi - \fi - \ifblankoflexibel \else - \blankoskip1\blankoskip - \fi - \iflokaalblankovast - \blankoskip1\blankoskip - \fi - \iflokaalblankoflexibel - \blankoskip1\blankoskip - \!!plus\skipgluefactor\blankoskip - \!!minus\skipgluefactor\blankoskip - \fi - \ifgridsnapping - \ifdim\lastkern=\noblanksignal - \global\doeblankofalse - \fi - \else - \ifdim\prevdepth=\newprevdepth - \global\doeblankofalse - \fi - \fi - \ifdoeblanko - \iffuzzyvskip - \removelastfuzzyvskip - \fuzzyvskip\blankoskip\relax - \else - \removelastskip - \vskip\blankoskip\relax - \fi - \fi - \else - \iffuzzyvskip - \removelastfuzzyvskip - \fuzzyvskip\blankoskip\relax - \else - % new, test this on pascal - \ifdim\blankoskip<\zeropoint - \advance\blankoskip-\lastskip - \removelastskip - \ifdim\blankoskip>\zeropoint - \vskip\blankoskip - \else - \vskip\zeropoint - \fi - \else - % also new - \ifdim\blankoskip=\zeropoint - \ifblankogeenwit - \geenwitruimte - \fi - \fi - \fi - \fi - \fi - \fi - \fi - \fi - \global\fuzzyvskipfalse - \presetindentation} - -\def\processfilelinesverbatim#1#2#3% - {\bgroup - \let\saveddoflushverbatimline\doflushverbatimline - \let\saveddoemptyverbatimline\doemptyverbatimline - \def\checkverbatimfileline##1% - {\ifnum\verbatimlinenumber<#2\else - \ifnum\verbatimlinenumber>#3\else - ##1% - \fi\fi}% - \def\doflushverbatimline - {\checkverbatimfileline\saveddoflushverbatimline}% - \def\doemptyverbatimline - {\checkverbatimfileline\saveddoemptyverbatimline}% - \processfileverbatim{#1}% - \egroup} - -\def\typefile - {\dodoubleempty\dotypefile} - -\def\dotypefile[#1][#2]#3% - {\ifsecondargument - \dodotypefile[#1][#2]{#3}% - \else\iffirstargument - \doifassignmentelse{#1} - {\dodotypefile[\v!file][#1]{#3}} - {\dodotypefile[#1][]{#3}}% - \else - \dodotypefile[\v!file][]{#3}% - \fi\fi} - -\def\dosetuptypelinenumbering#1#2% - {\setuptyping[#1][\c!start=,\c!stop=,\c!stap=,\c!nregels=,#2]% - \doifelsevalue{\??tp#1\c!nummeren}\v!file - {\stelregelnummerenin[\c!methode=\v!file]% - \donetrue} - {\doifelsevalue{\??tp#1\c!nummeren}\v!regel - {% \stelregelnummerenin defaults start/step to 1/1, so we need - \doifvaluenothing{\??tp#1\c!start}{\setvalue{\??tp#1\c!start}{1}}% - \doifvaluenothing{\??tp#1\c!stap }{\setvalue{\??tp#1\c!stap }{1}}% - \stelregelnummerenin - [\c!methode=\v!type, - \c!start=\getvalue{\??tp#1\c!start}, - \c!stap=\getvalue{\??tp#1\c!stap}]% - \donetrue} - {\donefalse}}% - \ifdone - \def\beginofverbatimlines{\startregelnummeren}% - \def\endofverbatimlines {\stopregelnummeren }% - \fi} - -\def\dodotypefile[#1][#2]#3% - {\getvalue{\??tp#1\c!voor}% - \doiflocfileelse{#3} - {\startopelkaar % includes \bgroup - \dosetuptypelinenumbering{#1}{#2}% - \doifinset{\getvalue{\??tp#1\c!optie}}{\v!commandos,\v!schuin,\v!normaal} - {\setuptyping[#1][\c!optie=\v!geen]}% - \doifvalue{\??tp#1\c!optie}\v!kleur - {\expandafter\aftersplitstring#3\at.\to\prettyidentifier - \letvalue{\??tp#1\c!optie}\prettyidentifier}% - \initializetyping{#1}% - \startverbatimcolor - \makelocreadfilename{#3}% - \doifundefinedelse{\??tp#3\v!globaal\c!start} - {\scratchcounter\zerocount} - {\scratchcounter\getvalue{\??tp#3\v!globaal\c!start}}% - \advance\scratchcounter\plusone - \setxvalue{\??tp#3\v!globaal\c!start}{\the\scratchcounter}% - \doifelsevaluenothing{\??tp#1\c!start} - {\processfileverbatim\readfilename} - {\doifvalue{\??tp#1\c!start}\v!verder - {\setevalue{\??tp#1\c!start}% - {\getvalue{\??tp#3\v!globaal\c!start}}}% - \doifelsevaluenothing{\??tp#1\c!stop} - {\doifelsevaluenothing{\??tp#1\c!nregels} - {\processfileverbatim\readfilename} - {\scratchcounter\getvalue{\??tp#1\c!start}% - \advance\scratchcounter\getvalue{\??tp#1\c!nregels}% - \advance\scratchcounter\minusone - \setxvalue{\??tp#3\v!globaal\c!start}% - {\the\scratchcounter}% - \processfilelinesverbatim\readfilename - {\getvalue{\??tp#1\c!start}} - {\getvalue{\??tp#3\v!globaal\c!start}}}}% - {\processfilelinesverbatim\readfilename - {\getvalue{\??tp#1\c!start}} - {\getvalue{\??tp#1\c!stop }}}}% - \stopverbatimcolor - \stopopelkaar} % includes \egroup - {\bgroup - \expanded{\convertargument#3}\to\ascii - \tttf[\makemessage\m!verbatims1\ascii]% - \showmessage\m!verbatims1\ascii - \egroup}% - \getvalue{\??tp#1\c!na}} - -% \setuptyping[file][numbering=file] -% -% \typefile[start=2,nlines=3]{zapf} -% \typefile[start=continue,nlines=13]{zapf} -% \typefile{zapf} -% -% \setuptyping[file][numbering=line] -% -% \typefile[start=4,step=3]{zapf} -% \typefile{zapf} - \def\startgridcorrection {\dosingleempty\dostartgridcorrection} @@ -1022,40 +297,6 @@ \def\checkgridsnapping {\lineskip\ifgridsnapping\zeropoint\else\normallineskip\fi} -\def\splittblbox#1% #1 <> 0/2 - {\ifinsidefloat - \unvbox#1% - \else - % spacing between rows gets lost in split - \setbox4\vbox - {\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}% - \setbox2\vbox - {}% - \dorecurse\noftblheadlines - {\setbox0\vsplit#1 to \lineheight - \setbox2\vbox{\unvcopy2\unvcopy0}}% - \ifcase\noftblheadlines\else\unvcopy2\fi - \donefalse - \doloop - {\setbox0\vsplit#1 to \lineheight - \ifdim\pagegoal<\maxdimen - \setbox0\vbox{\unvbox0}% - \dimen0\ht0 - \advance\dimen0\ht4 - \advance\dimen0\pagetotal - \ifdim\dimen0>\pagegoal - \bgroup \pagina \egroup % make sure that local vars are kept - \ifcase\noftblheadlines\else\unvcopy2\fi - \fi - \fi - \ifdone - \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}% - \fi - \unvbox0 - \allowbreak - \ifvoid#1 \exitloop \else \donetrue \fi}% - \fi} - \def\startplaatsen {\dosingleempty\dostartplaatsen} @@ -1128,18 +369,6 @@ % %\defineclassfontsynonym [KopFont] [officina] [SerifBold] -\def\woordrechts % zie naw - {\groupedcommand - {\removeunwantedspaces - \hfill - \hskip\zeropoint % permit break, \allowbreak fails here - \strut - \hfill - \quad % decent spacing - \hbox} - {\parfillskip\zeropoint - \par}} - \def\startkolomopmaak % don't change {\bgroup \getrawnoflines\teksthoogte % teksthoogte kan topskip hebben, dus raw diff --git a/tex/context/base/cont-sys.ori b/tex/context/base/cont-sys.ori index 8923364cd..755101e4e 100644 --- a/tex/context/base/cont-sys.ori +++ b/tex/context/base/cont-sys.ori @@ -108,6 +108,13 @@ % % \runutilityfiletrue +% You can also load additional encodings here: + +% \useregime[cyr] +% \useencoding[cyr] +% \enableregime[cp1251] +% \setupbodyfont[cyr] + % So far. \protect \endinput diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 52781f9c5..e961c0dfd 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -15,7 +15,7 @@ \catcode`\{=1 \catcode`\}=2 -\def\contextversion{2003.1.10} +\def\contextversion{2003.1.28} %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-fig.tex b/tex/context/base/core-fig.tex index 48394eec3..71678e91a 100644 --- a/tex/context/base/core-fig.tex +++ b/tex/context/base/core-fig.tex @@ -385,6 +385,8 @@ \def\getfiguredimensionsB {\ifcase\figurestatus\ifcase\figurefilemode\else +\doifsomething\@@efcurrentpath +{% %\def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}% \assignfullfilename\@@efcurrentpath\@@exfile\to\@@efloadname \edef\@@effilenametype{\@@effilename.\@@efcurrenttype}% @@ -398,6 +400,7 @@ \stopreadingfile \popendofline \@@eftrace{\ifcase\figurestatus not \fi found}% +}% \fi\fi} \def\presetfigureA[#1][#2]% @@ -415,7 +418,9 @@ \def\getfiguredimensionsC {\ifconsultutilityfile \ifrunutilityfile \ifcase\figurestatus\ifcase\figurefilemode\else - \doifnotinset\@@efextension{\c!tex,\c!tmp} +\doifsomething\@@efcurrentpath +{% + \doifnotinset\@@efextension{\c!tex,\c!tmp} {\doiffileelse\@@efcurrentfile {\edef\@@effilenametype{\@@effilename.\@@efcurrenttype}% \@@eftrace{running texutil on \@@effilenametype}% @@ -431,6 +436,7 @@ \popendofline \@@eftrace{\ifcase\figurestatus not \fi found}} {}}% +}% \fi\fi \fi\fi} @@ -445,6 +451,8 @@ \def\doanalyzefigurefilesB {\ifconsultutilityfile\ifcase\figurestatus\ifcase\figurefilemode\else +\doifsomething\@@efcurrentpath +{% %\def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}% \assignfullfilename\@@efcurrentpath\@@exfile\to\@@efloadname \edef\@@effilenametype{\@@effilename.\figureextension{\@@efcurrenttype}}% @@ -458,6 +466,7 @@ \stopreadingfile \popendofline \@@eftrace{\ifcase\figurestatus not \fi found}% +}% \fi\fi\fi} \def\presetfigureC[#1][#2]% @@ -477,6 +486,8 @@ \def\doanalyzefigurefilesC {\ifconsultutilityfile\ifcase\figurestatus\ifcase\figurefilemode\else +\doifsomething\@@efcurrentpath +{% %\def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}% \assignfullfilename\@@efcurrentpath\@@exfile\to\@@efloadname \@@eftrace{analyzing \@@efloadname\space @@ -489,6 +500,7 @@ \stopreadingfile \popendofline \@@eftrace{\ifcase\figurestatus not \fi found}% +}% \fi\fi\fi} \def\presetfigureD[#1][#2]% @@ -655,14 +667,14 @@ \getparameters[\??ef][#1]% dangerous for figs with backgrounds \checkfiguresettings \doifelsenothing\@@explaats % fig file paths - {\scratchcounter3 } + {\scratchcounter\plusthree} {\doifelsenothing\@@exfile % tuf file paths - {\scratchcounter3 } - {\scratchcounter0 + {\scratchcounter\plusthree} + {\scratchcounter\zerocount \ExpandBothAfter\doifinset\v!lokaal\@@explaats - {\advance\scratchcounter 1 }% + {\advance\scratchcounter\plusone}% \ExpandBothAfter\doifinset\v!globaal\@@explaats - {\advance\scratchcounter 2 }}}% + {\advance\scratchcounter\plustwo}}}% \chardef\figurefilemode\scratchcounter\relax \ifcase\figurefilemode \let\figurepathlist\f!currentpath @@ -1125,7 +1137,11 @@ \global\figwid\zeropoint \figxsca\plusone % see note * \global\fighei\zeropoint \figysca\plusone % see note * \global\setbox\foundexternalfigure\box\voidb@x - \edef\expandedfigurename{#3}% needed e.g. in [\get...] cases + % get rid of active / and : as well as expand for [\get...] cases + \sanitizefilename#3\to\expandedfigurename + % nil path search in case of path spec + \expanded{\checkfilename{\expandedfigurename}}% + \ifcase\kindoffile\else \let\figurepathlist\empty \fi \expandafter\beforesplitstring\expandedfigurename\at.\to\@@effilename \expandafter\aftersplitstring \expandedfigurename\at.\to\@@efextension \doifelse\@@effilename{mprun} @@ -1226,11 +1242,11 @@ [\c!x=\!!zeropoint,\c!y=\!!zeropoint, \c!w=\objectwidth,\c!h=\objectheight]% \chardef\figurestatus=5 - \edef\@@effullname{\@@effilepref#3}% + \edef\@@effullname{\@@effilepref\expandedfigurename}% \else \doifelse{#2}\s!figurepreset {\def\figureextension##1{\@@efextension}% - \edef\@@effullname{\@@effilepref#3}}% + \edef\@@effullname{\@@effilepref\expandedfigurename}}% {\ifx\@@efextension\empty \dogetcommacommandelement1\from\@@eftype\to\commalistelement \edef\@@effullname{\@@effilename.\commalistelement}% @@ -1387,7 +1403,7 @@ \global\let\appliedfigurexscale\scax \global\let\appliedfigureyscale\scay}% \global\wd\foundexternalfigure\figwid - \finalizeexternalfigure{#2}{#3}} + \finalizeexternalfigure{#2}{\expandedfigurename}} \let\figurelabel \empty \let\figurefilename\empty @@ -1691,13 +1707,21 @@ {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure[\doprecopfigure][#1][#2][#3][#4]}}}% \doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}} % upward compatible -\def\douseexternalfigure[#1][#2][#3][#4]% +%\def\douseexternalfigure[#1][#2][#3][#4]% +% {\doifelsenothing{#1} +% {\doifsomething{#2} +% {\dosetuseexternalfigure[#2][#2][#3][#4]}} +% {\doifelsenothing{#2} +% {\dosetuseexternalfigure[#1][#1][#3][#4]} +% {\dosetuseexternalfigure[#1][#2][#3][#4]}}} + +\def\douseexternalfigure[#1][#2]%[#3][#4]% {\doifelsenothing{#1} {\doifsomething{#2} - {\dosetuseexternalfigure[#2][#2][#3][#4]}} + {\dosetuseexternalfigure[#2][#2]}} %[#3][#4]}} {\doifelsenothing{#2} - {\dosetuseexternalfigure[#1][#1][#3][#4]} - {\dosetuseexternalfigure[#1][#2][#3][#4]}}} + {\dosetuseexternalfigure[#1][#1]} %[#3][#4]} + {\dosetuseexternalfigure[#1][#2]}}} %[#3][#4]}}} \def\useexternalfigure {\doquadrupleempty\douseexternalfigure} @@ -2080,6 +2104,51 @@ %D %D \showsetup{setupclipping} +% \def\doclip[#1]% nb top->bottom left->right +% {\bgroup +% \getparameters[\??cp][#1]% +% \dowithnextbox +% {\ifdim\@@cpbreedte>\zeropoint +% \dimen0=\@@cpbreedte +% \dimen4=\@@cphoffset +% \else +% \dimen0=\wd\nextbox +% \divide\dimen0 \@@cpnx +% \dimen4=\@@cpx\dimen0 +% \advance\dimen4 -\dimen0 +% \dimen0=\@@cpsx\dimen0 +% \fi +% \relax % sure +% \ifdim\@@cphoogte>\zeropoint +% \dimen2=\@@cphoogte +% \dimen6=\ht\nextbox +% \advance\dimen6 -\@@cpvoffset +% \advance\dimen6 -\dimen2 +% \else +% \dimen2=\ht\nextbox +% \divide\dimen2 \@@cpny +% \dimen6=-\@@cpy\dimen2 +% \advance\dimen6 -\@@cpsy\dimen2 +% \advance\dimen6 \dimen2 +% \dimen2=\@@cpsy\dimen2 +% \advance\dimen6 \ht\nextbox +% \fi +% \setbox\nextbox\hbox +% {\hskip-\dimen4\lower\dimen6\box\nextbox}% +% \wd\nextbox\zeropoint +% \ht\nextbox\zeropoint +% \dp\nextbox\zeropoint +% \setbox\nextbox\hbox +% {\dostartclipping\@@cpmp{\dimen0}{\dimen2}% +% \box\nextbox +% \dostopclipping}% +% \wd\nextbox\dimen0 +% \ht\nextbox\dimen2 +% \dp\nextbox\zeropoint +% \box\nextbox +% \egroup}% +% \hbox} + \def\doclip[#1]% nb top->bottom left->right {\bgroup \getparameters[\??cp][#1]% @@ -2109,15 +2178,25 @@ \dimen2=\@@cpsy\dimen2 \advance\dimen6 \ht\nextbox \fi - \setbox\nextbox\hbox - {\hskip-\dimen4\lower\dimen6\box\nextbox}% + \setbox\nextbox\hbox % old + {\advance\dimen4 -\@@cplinkeroffset % new ! + \advance\dimen6 \@@cpbovenoffset % new ! + \hskip-\dimen4\lower\dimen6\box\nextbox}% old \wd\nextbox\zeropoint \ht\nextbox\zeropoint \dp\nextbox\zeropoint \setbox\nextbox\hbox - {\dostartclipping\@@cpmp{\dimen0}{\dimen2}% - \box\nextbox + {\advance\dimen0 \@@cplinkeroffset % new ! + \advance\dimen0 \@@cprechteroffset % new ! + \advance\dimen2 \@@cpbovenoffset % new ! + \advance\dimen2 \@@cponderoffset % new ! + \dostartclipping\@@cpmp{\dimen0}{\dimen2}% old + \box\nextbox \dostopclipping}% + \setbox\nextbox\hbox % new ! + {\dimen0-\@@cplinkeroffset % new ! + \dimen2-\@@cpbovenoffset % new ! + \hskip\dimen0\lower\dimen2\box\nextbox}% new ! \wd\nextbox\dimen0 \ht\nextbox\dimen2 \dp\nextbox\zeropoint @@ -2196,8 +2275,14 @@ [\c!n=1, % was 2 \c!nx=\@@cpn,\c!x=1,\c!sx=1, \c!ny=\@@cpn,\c!y=1,\c!sy=1, - \c!breedte=\!!zeropoint,\c!hoogte=\!!zeropoint, - \c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint, + \c!breedte=\!!zeropoint, + \c!hoogte=\!!zeropoint, + \c!hoffset=\!!zeropoint, + \c!voffset=\!!zeropoint, + \c!linkeroffset=\zeropoint, + \c!rechteroffset=\zeropoint, + \c!bovenoffset=\zeropoint, + \c!onderoffset=\zeropoint, \c!mp=] \protect \endinput diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex index a397e97d2..a0138a552 100644 --- a/tex/context/base/core-fld.tex +++ b/tex/context/base/core-fld.tex @@ -53,7 +53,7 @@ %D The interface to the specials. DEFAULT NOG ANDERS -\def\presetlinefield% +\def\presetlinefield {\dopresetlinefield {\@@FieldName} {\@@FieldWidth} @@ -66,7 +66,7 @@ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,% \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}} -\def\presettextfield% +\def\presettextfield {\dopresettextfield {\@@FieldName} {\@@FieldWidth} @@ -79,7 +79,7 @@ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,% \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}} -\def\presetchoicefield% +\def\presetchoicefield {\dopresetchoicefield {\@@FieldName} {\@@FieldWidth} @@ -91,7 +91,7 @@ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,% \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}} -\def\presetpopupfield% +\def\presetpopupfield {\dopresetpopupfield {\@@FieldName} {\@@FieldWidth} @@ -103,7 +103,7 @@ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,% \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}} -\def\presetcombofield% +\def\presetcombofield {\dopresetcombofield {\@@FieldName} {\@@FieldWidth} @@ -115,7 +115,7 @@ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,% \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}} -\def\presetcheckfield% +\def\presetcheckfield {\presetfieldsymbols[\@@FieldValues]% \dopresetcheckfield {\@@FieldName} @@ -127,7 +127,7 @@ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,% \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}} -\def\presetpushfield% +\def\presetpushfield {%\edef\@@FieldValues{{\@@FieldValues}}% makes sure {a,b,c} is passed \presetfieldsymbols[\@@FieldValues]% \dopresetpushfield @@ -140,7 +140,7 @@ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,% \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}} -\def\presetradiofield% +\def\presetradiofield {\presetfieldsymbols[\@@FieldValues]% \dopresetradiofield {\@@FieldName} @@ -153,7 +153,7 @@ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,% \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}} -\def\presetradiorecord% +\def\presetradiorecord {\dopresetradiorecord {\@@FieldName} {\@@FieldDefault} diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex index d659289b9..7942e8202 100644 --- a/tex/context/base/core-grd.tex +++ b/tex/context/base/core-grd.tex @@ -163,49 +163,59 @@ %D %D The actual top and bottom corrections are implemented as: +% \def\topbaselinecorrection +% {\ifvmode +% \bgroup +% \setbaselinecorrections +% \ifdim\pagegoal<\maxdimen +% \ifdim\pagetotal<\pagegoal +% \dimen2=\ht\scratchbox +% \advance\dimen2 \dp\scratchbox +% \advance\dimen2 \parskip +% \advance\dimen2 \thetopbaselinecorrection +% \advance\dimen2 \thebotbaselinecorrection +% \dimen0=\pagetotal +% \advance\dimen0 \dimen2 +% % \ifdim\dimen0<\pagegoal % does more harm than good +% \witruimte +% \nointerlineskip +% \dotopbaselinecorrection +% % \else +% % \ifbinnenkolommen +% % % \vskip\dimen2 % this could definitely +% % % \penalty\outputpenalty % be improved +% % \else +% % % % +% % % \vfill\eject % pretty old and wrong +% % % +% % % \nobreak % needed for headings +% % % \vskip\parskip % but often splits +% % % \vskip\dimen2 % normal paragraphs +% % % \penalty\outputpenalty % and therefore +% % % \vskip-\dimen2 % obsolete +% % % +% % % do nothing, sub optimal spacing after headings +% % % still to be sorted out; use manuals as test case +% % \fi +% % \fi +% \else % probably a preceding +% \witruimte % one-liner +% \nointerlineskip +% \dotopbaselinecorrection +% \fi +% \fi +% \egroup +% \fi} + \def\topbaselinecorrection - {\ifvmode + {\ifvmode \ifdim\pagegoal<\maxdimen \bgroup \setbaselinecorrections - \ifdim\pagegoal<\maxdimen - \ifdim\pagetotal<\pagegoal - \dimen2=\ht\scratchbox - \advance\dimen2 \dp\scratchbox - \advance\dimen2 \parskip - \advance\dimen2 \thetopbaselinecorrection - \advance\dimen2 \thebotbaselinecorrection - \dimen0=\pagetotal - \advance\dimen0 \dimen2 -% \ifdim\dimen0<\pagegoal % does more harm than good - \witruimte - \nointerlineskip - \dotopbaselinecorrection -% \else -% \ifbinnenkolommen -% % \vskip\dimen2 % this could definitely -% % \penalty\outputpenalty % be improved -% \else -% % % -% % \vfill\eject % pretty old and wrong -% % -% % \nobreak % needed for headings -% % \vskip\parskip % but often splits -% % \vskip\dimen2 % normal paragraphs -% % \penalty\outputpenalty % and therefore -% % \vskip-\dimen2 % obsolete -% % -% % do nothing, sub optimal spacing after headings -% % still to be sorted out; use manuals as test case -% \fi -% \fi - \else % probably a preceding - \witruimte % one-liner - \nointerlineskip - \dotopbaselinecorrection - \fi - \fi + \witruimte + \nointerlineskip + \dotopbaselinecorrection \egroup - \fi} + \fi \fi} \def\botbaselinecorrection {\ifvmode @@ -810,7 +820,7 @@ \def\getfuzzysnapcorrection#1% {\global\let\presnapcorrection \relax \global\let\postsnapcorrection\relax - \ifgridsnapping\iffuzzysnapping + \ifgridsnapping\iffuzzysnapping \docheckfuzzysnap{#1}% \iffuzzysnapped \iftracegridsnapping diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex index 4f87cf5d0..3fd0a0bae 100644 --- a/tex/context/base/core-int.tex +++ b/tex/context/base/core-int.tex @@ -369,9 +369,10 @@ \def\dosetupinteractionscreens % met a, b en \number {\doifnot\@@pcstatus\v!start\dodosetupinteractionscreens} -\setvalue{\??sc\c!optie\v!max }{1} % tzt share with driver -\setvalue{\??sc\c!optie\v!bookmark}{2} % tzt share with driver -\setvalue{\??sc\c!optie\v!passend }{3} % tzt share with driver +\setvalue{\??sc\c!optie\v!max }{1} % tzt share with driver +\setvalue{\??sc\c!optie\v!bookmark }{2} % tzt share with driver +\setvalue{\??sc\c!optie\v!passend }{3} % tzt share with driver +\setvalue{\??sc\c!optie\v!dubbelzijdig}{4} % tzt share with driver \def\dodosetupinteractionscreens % met a, b en \number {\bgroup @@ -384,7 +385,7 @@ 1{\@EA\withoutpt\the\!!widtha,\@EA\withoutpt\the\!!heighta}}% % needs to be split: dimensions for each page % and mode per document and only once ! - \dosetupscreen\rugoffset\kopoffset\!!widtha\!!heighta{\the\!!counte}% + \dosetupscreen \rugoffset\kopoffset\!!widtha\!!heighta{\the\!!counte}% \dosetupcropbox\rugoffset\kopoffset\!!widtha\!!heighta \egroup} @@ -1350,7 +1351,7 @@ {#2}% \fi} -\def\interactiebalka% +\def\interactiebalka {\iflocation \bgroup %\setupinteraction[\c!breedte=\!!zeropoint]% @@ -2375,7 +2376,7 @@ \c!kopoffset=\!!zeropoint, \c!rugwit=\rugwit, \c!kopwit=\kopwit, - \c!optie=\c!min, + \c!optie=\v!min, \c!wachttijd=\v!geen] \stelbuttonsin diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex index 84219cb75..4d5fc9c61 100644 --- a/tex/context/base/core-job.tex +++ b/tex/context/base/core-job.tex @@ -381,10 +381,11 @@ \def\dosetups[#1]% {\iffirstargument - \dodosetups{#1}% + \def\next{\dodosetups{#1}}% \else - \expandafter\dodosetups - \fi} + \let\next\dodosetups + \fi + \next} \def\dodosetups#1% {\getvalue{\??su#1}} diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex index 24c712337..7fa85b83a 100644 --- a/tex/context/base/core-lst.tex +++ b/tex/context/base/core-lst.tex @@ -151,13 +151,13 @@ \preparepaginaprefix{\??li##1}}% \processcommalist[#1]\docommando} -\def\stellijstin% +\def\stellijstin {\dodoubleargument\dostellijstin} \def\dodosetlijst#1% - {\def\geenlijst##1{\unknown}% + {\def\geenlijst{\splitsequence{\getvalue{\??li#1\c!limittext}}}% \setvalue{#1\c!tussen}{\dotussenlijst{#1}}% - \setvalue{#1\c!lijst}{\dolijstelement{#1}}} + \setvalue{#1\c!lijst }{\dolijstelement{#1}}} \def\dodoresetlijst#1% {\let\geenlijst\empty @@ -203,6 +203,7 @@ \c!label=\v!nee, \c!afstand=\!!zeropoint, \c!scheider=\@@koscheider, + \c!limittext=\@@kolimittext, \c!afsluiter=, \c!expansie=]% \doifassignmentelse{#2} @@ -215,6 +216,7 @@ \c!paginaletter,\c!paginacommando,\c!paginakleur, \c!nummerletter,\c!nummerkleur,\c!nummercommando, \c!paginanummer,\c!paginaovergangen,\c!marge,\c!symbool, + \c!limittext, \c!titeluitlijnen,\c!voor,\c!na,\c!tussen,\v!deel\c!nummer,\c!label]% \getparameters[\??li#1][#3]}}% \addutilityreset{#1}% @@ -450,6 +452,17 @@ % to be documented: uitlijnen, hang +% now also in abc + +\def\limitatedlistentry#1#2% + {\doifelsenothing{\??li#1\c!maxbreedte} + {\getvalue{\??li#1\c!tekstcommando}{#2}} + {\getvalue{\??li#1\c!tekstcommando}% + {\limitatetext + {#2}% + {\getvalue{\??li#1\c!maxbreedte}}% + {\splitsymbol{\getvalue{\??li#1\c!limittext}}}}}} + \def\dodofixdlijstelementABC#1#2#3#4#5#6% weeden {\endgraf \leftskip\getvalue{\??li#1\c!marge}% na de \endgraf ! @@ -519,7 +532,8 @@ \dolistattributes{#1}\c!tekstletter\c!tekstkleur {\let\\=\newlineinlist \dontconvertfont - \getvalue{\??li#1\c!tekstcommando}{#4}}% + %\getvalue{\??li#1\c!tekstcommando}{#4}}% + \limitatedlistentry{#1}{#4}}% %\carryoverpar % new otherwise wrong linespacing \egroup \ifdim\wd4=\zeropoint\relax % \ifvoid4 @@ -541,9 +555,9 @@ \def\dodofixdlijstelementD#1#2#3#4#5#6% {%\leftskip=\getvalue{\??li#1\c!marge}% -\ifvmode - \advance\leftskip\getvalue{\??li#1\c!marge}% AANGEPAST -\fi + \ifvmode + \advance\leftskip\getvalue{\??li#1\c!marge}% AANGEPAST + \fi \bgroup \ifvmode \noindent\leavevmode % leavevmode ? ? ? @@ -581,7 +595,8 @@ \dolistattributes{#1}\c!tekstletter\c!tekstkleur {\let\\=\newlineinlist \dontconvertfont - \getvalue{\??li#1\c!tekstcommando}{#4}}% + %\getvalue{\??li#1\c!tekstcommando}{#4}}% + \limitatedlistentry{#1}{#4}}% \ifvoid4\else \nobreak \hskip.75em\relax @@ -624,9 +639,10 @@ {\dostartattributes{\??li#3}\c!letter\c!kleur\empty \ignorespaces\dontconvertfont\setstrut \begstrut - \doifelsenothing{\??li#3\c!maxbreedte} - {\getvalue{\??li#3\c!tekstcommando}{#6}} - {\getvalue{\??li#3\c!tekstcommando}{\limitatetext{#6}{\getvalue{\??li#3\c!maxbreedte}}{\unknown}}}% + %\doifelsenothing{\??li#3\c!maxbreedte} + % {\getvalue{\??li#3\c!tekstcommando}{#6}} + % {\getvalue{\??li#3\c!tekstcommando}{\limitatetext{#6}{\getvalue{\??li#3\c!maxbreedte}}{\unknown}}}% + \limitatedlistentry{#3}{#6}% \endstrut % struts new \dostopattributes}}}% \linklisttoelement{#3}{#4}{#7}{#8}{\box0}}%{\copy0}}% diff --git a/tex/context/base/core-ltb.tex b/tex/context/base/core-ltb.tex index 03d314a7e..31aa1c130 100644 --- a/tex/context/base/core-ltb.tex +++ b/tex/context/base/core-ltb.tex @@ -534,7 +534,7 @@ \csname\??lew\number\linetablecolumn\endcsname \fi\fi}} -\def\linetableER +\def\linetableBR {\dosingleempty\dolinetableBR} \def\dolinetableBR[#1]% #1 not yet implemented @@ -544,7 +544,7 @@ \fi \global\linetablecolumn\plusone \global\linetablesubcol\plusone - \xdef\linetableheight{\linetablerparameter\c!hoogte}% +% \linetableheight\linetablerparameter\c!hoogte % % \ifx\linetableheight\empty % % nothing diff --git a/tex/context/base/core-mar.tex b/tex/context/base/core-mar.tex index 84841cfae..0882c2bc4 100644 --- a/tex/context/base/core-mar.tex +++ b/tex/context/base/core-mar.tex @@ -8,14 +8,14 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Context Core Macros / Markings} -\unprotect +\unprotect -\prependtoks \getallmarks \to \everybeforepagebody +\prependtoks \getallmarks \to \everybeforepagebody \prependtoks \setallmarks \to \everyafterpagebody % currently \relax % voor 'interne' doeleinden zijn beschikbaar: @@ -40,7 +40,7 @@ \csname\??mk#1\c!koppeling\endcsname \fi} -\def\fastresetmarker#1% +\def\fastresetmarker#1% {\@EA\ifx\csname\??mk#1\c!koppeling\endcsname\else \@EA\resetmark\csname\??mk\csname\??mk#1\c!koppeling\endcsname\endcsname \fi} @@ -54,7 +54,7 @@ \csname\??mk#1\c!koppeling\endcsname \fi} -\def\fastresetmarker#1% +\def\fastresetmarker#1% {\ifcsname\??mk#1\c!koppeling\endcsname \@EA\resetmark\csname\??mk\csname\??mk#1\c!koppeling\endcsname\endcsname \fi} @@ -77,7 +77,7 @@ \def\stelmarkeringin {\dodoubleargument\dostelmarkeringin} -% betere protectie +% betere protectie \letvalue{\??mk\??mk \v!vorige}\gettopmark \letvalue{\??mk\??mk \v!eerste}\getfirstmark @@ -88,6 +88,7 @@ {\stelmarkeringin[#1] [\c!expansie=\v!nee, % saves a macro \c!scheider={ --- }, % watch the spaces + \c!limittext=\@@kolimittext, \c!status=\v!start]% \ontkoppelmarkering[#1]% % no coupling with sections \setevalue{\??mk#1\c!koppeling}{#2}% @@ -102,7 +103,7 @@ \def\definieermarkering {\dodoubleempty\dodefinieermarkering} -\let\geenmarkering=\relax +\let\geenmarkering\empty \def\fetchmark[#1][#2]% never \unexpanded {\@EA\@EA\csname\??mk\??mk#2\endcsname @@ -145,9 +146,10 @@ \def\dohaalmarkering[#1][#2]% {\doifvalue{\??mk#1\c!status}\v!start {\bgroup - \def\geenmarkering##1{\unknown\ }% + %\def\geenmarkering##1{\unknown\ }% + \def\geenmarkering{\splitsequence{\getvalue{\??mk#1\c!limittext}}}% \setfullsectionnumber{\??mk#1}% - \processaction % slow + \processaction % slow [#2] [ \v!beide=>{\fetchtwomarks[#1]}, \v!alles=>{\fetchallmarks[#1]}, @@ -192,7 +194,7 @@ \def\marking {\dosingleargument\domarking} -%D Used in placing text lines. +%D Used in placing text lines. \def\doifelsemarking#1% {\ifundefined{\??mk#1\c!koppeling}% @@ -201,12 +203,12 @@ \expandafter\firstoftwoarguments \fi} -%D And then \unknown\ we had a chaptertitle packaged in a +%D And then \unknown\ we had a chaptertitle packaged in a %D makeup environment. And we don't want to loose marks there! \newbox\collectedmarks -\def\flushmarks % use with care to avoid empty pages +\def\flushmarks % use with care to avoid empty pages {\ifvoid\collectedmarks\else\unhbox\collectedmarks\fi} \def\postponemarks @@ -215,12 +217,12 @@ \def\postponemark#1#2% {%\writestatus{marks}{postponing \string#1 => #2}% \global\setbox\collectedmarks\hbox - {\unhbox\collectedmarks\setmark{#1}{#2}}} + {\unhbox\collectedmarks\setmark{#1}{#2}}} \protect \endinput % Pseudo marks: (for Hraban) -% +% % \def\RegisterPageMark#1#2% % {\iftrialtypesetting \else % \doglobal\increment\NameCounter @@ -233,19 +235,19 @@ % {\noexpand\in[#1:t:\NameCounter]}}% % {}% % \fi} -% +% % \def\GetFirstOnPage#1{\getvalue{#1:f:\realfolio}} % \def\GetLastOnPage #1{\getvalue{#1:l:\realfolio}} -% +% % \setupheadertexts[\GetFirstOnPage{Name}][\GetLastOnPage{Name}] -% -% \starttext -% +% +% \starttext +% % \def\Name#1{\RegisterPageMark{Name}{#1}#1} -% \def\TestLine#1{\NC test \NC \Name {test: #1} \NC \NR} -% +% \def\TestLine#1{\NC test \NC \Name {test: #1} \NC \NR} +% % \starttabulate % \dorecurse{100}{\expanded{\TestLine{\recurselevel}}} % \stoptabulate -% -% \stoptext +% +% \stoptext diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex index 35aa0523d..c9befd5b7 100644 --- a/tex/context/base/core-mis.tex +++ b/tex/context/base/core-mis.tex @@ -1727,7 +1727,8 @@ {\copyparameters [\??co#1][\??co] [\c!breedte,\c!hoogte,\c!afstand,\c!plaats,% - \c!voor,\c!tussen,\c!na,\c!uitlijnen]% + \c!voor,\c!tussen,\c!na,\c!uitlijnen,% + \c!letter,\c!kleur]% \getparameters [\??co#1][#2]} @@ -1737,12 +1738,15 @@ \def\startcombination {\dodoubleempty\dostartcombination} +\def\combinationparameter#1% + {\csname\??co\currentcombination#1\endcsname}% + \def\dostartcombination[#1][#2]% {\bgroup \ifsecondargument - \def\combinationparameter##1{\csname\??co#1##1\endcsname}% + \def\currentcombination{#1}% \else - \def\combinationparameter##1{\csname\??co ##1\endcsname}% + \let\currentcombination\empty \fi \forgetall \doifelse{\combinationparameter\c!hoogte}\v!passend @@ -1788,8 +1792,10 @@ {\ifx\nexttoken\egroup \else % the next box is empty \hsize\wd0 \steluitlijnenin[\combinationparameter\c!uitlijnen]% +\dostartattributes{\??co\currentcombination}\c!letter\c!kleur\empty \bgroup \aftergroup\endstrut +\aftergroup\dostopattributes \aftergroup\egroup \begstrut \fi}% @@ -1925,6 +1931,8 @@ \c!plaats=\v!onder, % can be something {top,left} \c!voor=\blanko, \c!tussen={\blanko[\v!middel]}, + \c!letter=, + \c!kleur=, \c!na=, \c!uitlijnen=\v!midden] @@ -2132,7 +2140,61 @@ % schaal -\def\doscalelikeafigure +% \def\doscalelikeafigure +% {\doifsomething{\@@xyfactor\@@xyhfactor\@@xybfactor\@@xyschaal +% \@@xybreedte\@@xyhoogte\@@xyregels} +% {\let \@@efschaal \@@xyschaal +% \let \@@effactor \@@xyfactor +% \let \@@efbfactor\@@xybfactor +% \let \@@efhfactor\@@xyhfactor +% \let \@@efbreedte\@@xybreedte +% \let \@@efhoogte \@@xyhoogte +% \let \@@efregels \@@xyregels +% \let \@@epx \!!zeropoint +% \let \@@epy \!!zeropoint +% \edef\@@epw {\the\wd\nextbox}% +% \edef\@@eph {\the\ht\nextbox}% +% \checkfiguresettings +% \setfactorfiguresize +% \setscalefiguresize +% \setdimensionfiguresize +% \convertfigureinsertscale\@@epx\figx\figxsca\scax +% \convertfigureinsertscale\@@epy\figy\figysca\scay +% \scratchdimen\scax\s!pt \divide\scratchdimen 100 +% \edef\@@xysx{\withoutpt\the\scratchdimen}% +% \scratchdimen\scay\s!pt \divide\scratchdimen 100 +% \edef\@@xysy{\withoutpt\the\scratchdimen}}} + +% \def\doschaal[#1]% +% {\bgroup +% \forgetall +% \getparameters +% [\??xy] +% [\c!schaal=,\c!breedte=,\c!hoogte=,\c!regels=, +% \c!factor=,\c!hfactor=,\c!bfactor=, +% \c!sx=1,\c!sy=1,#1]% +% \dowithnextbox +% {\dontshowcomposition +% \ifdim\ht\nextbox>\zeropoint \ifdim\wd\nextbox>\zeropoint +% \doscalelikeafigure +% \dimen0=\@@xysy\ht\nextbox +% \dimen2=\@@xysy\dp\nextbox +% \dimen4=\@@xysx\wd\nextbox +% \dimen6=\dimen0\advance\dimen6 \dimen2 +% \setbox\nextbox\vbox to \dimen6 +% {\ht\nextbox\zeropoint +% \dp\nextbox\zeropoint +% \vfill % erbij +% \dostartscaling\@@xysx\@@xysy\box\nextbox\dostopscaling}% +% \ht\nextbox\dimen0 +% \dp\nextbox\dimen2 +% \wd\nextbox\dimen4 +% \fi \fi +% \box\nextbox +% \egroup} +% \hbox} + +\def\doscalelikeafigure % quite dirty and potential interference possible {\doifsomething{\@@xyfactor\@@xyhfactor\@@xybfactor\@@xyschaal \@@xybreedte\@@xyhoogte\@@xyregels} {\let \@@efschaal \@@xyschaal @@ -2146,6 +2208,8 @@ \let \@@epy \!!zeropoint \edef\@@epw {\the\wd\nextbox}% \edef\@@eph {\the\ht\nextbox}% + \figwid\zeropoint \figxsca\plusone % see note * (core-fig) + \fighei\zeropoint \figysca\plusone % see note * (core-fig) \checkfiguresettings \setfactorfiguresize \setscalefiguresize @@ -2173,10 +2237,13 @@ \dimen2=\@@xysy\dp\nextbox \dimen4=\@@xysx\wd\nextbox \dimen6=\dimen0\advance\dimen6 \dimen2 - \setbox\nextbox\vbox to \dimen6 - {\ht\nextbox\zeropoint - \dp\nextbox\zeropoint - \vfill % erbij +% \setbox\nextbox\vbox to \dimen6 +% {\ht\nextbox\zeropoint +% \dp\nextbox\zeropoint +% \vfill % erbij +% \dostartscaling\@@xysx\@@xysy\box\nextbox\dostopscaling}% + \setbox\nextbox\hbox + {\smashbox\nextbox \dostartscaling\@@xysx\@@xysy\box\nextbox\dostopscaling}% \ht\nextbox\dimen0 \dp\nextbox\dimen2 diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex index 83085644d..f6f5fa37e 100644 --- a/tex/context/base/core-ntb.tex +++ b/tex/context/base/core-ntb.tex @@ -667,8 +667,42 @@ \vbox{\the\tbltoks}% \fi\fi} -\def\splittblbox#1% #1 <> 0/2 - {\unvbox#1} +% \def\splittblbox#1% #1 <> 0/2 +% {\unvbox#1} + +\def\splittblbox#1% #1 <> 0/2 + {\ifinsidefloat + \unvbox#1% + \else + % spacing between rows gets lost in split + \setbox4\vbox + {\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}% + \setbox2\vbox + {}% + \dorecurse\noftblheadlines + {\setbox0\vsplit#1 to \lineheight + \setbox2\vbox{\unvcopy2\unvcopy0}}% + \ifcase\noftblheadlines\else\unvcopy2\fi + \donefalse + \doloop + {\setbox0\vsplit#1 to \lineheight + \ifdim\pagegoal<\maxdimen + \setbox0\vbox{\unvbox0}% + \dimen0\ht0 + \advance\dimen0\ht4 + \advance\dimen0\pagetotal + \ifdim\dimen0>\pagegoal + \bgroup \pagina \egroup % make sure that local vars are kept + \ifcase\noftblheadlines\else\unvcopy2\fi + \fi + \fi + \ifdone + \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}% + \fi + \unvbox0 + \allowbreak + \ifvoid#1 \exitloop \else \donetrue \fi}% + \fi} \def\checktblwidthsone{\dochecktblwidths0} % 0 = trial run \def\checktblwidthstwo{\dochecktblwidths1} % 1 = real run diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex index 4cc15f433..85510c226 100644 --- a/tex/context/base/core-pos.tex +++ b/tex/context/base/core-pos.tex @@ -11,21 +11,25 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% shorter tags, ..:achtergrond:.. etc in pos actions +% needs a cleanup, things may change + +% shorter tags, ..:achtergrond:.. etc in pos actions + +% dubbele text- * pos's eruit % class pos -> als gelijk aan vorige, dan niet niet definieren -% en erven, maw: +% en erven, maw: % -% 1 -> opslaan -% 2 -> undef, dus == prev +% 1 -> opslaan +% 2 -> undef, dus == prev % 3 -> undef, dus == prev -% 4 -> opslaan +% 4 -> opslaan \writestatus{loading}{Context Positioning Support} -% todo: topskip als optie voor eerste regel achtergrond -% todo: build pos layers on top of layers -% todo: positionlayer pos van text-1 etc delen +% todo: topskip als optie voor eerste regel achtergrond +% todo: build pos layers on top of layers +% todo: positionlayer pos van text-1 etc delen %D Although \TEX\ has a rather powerful channel to the outside %D world, called \type {\special}, real communication with @@ -152,22 +156,27 @@ \savecurrentvalue\totalnofpositions\currentpositions \to \everybye -%D The next switch can be used to communicate a special -%D situation. Positioning and associated actions can be -%D executed any time. However, in for instance backgrounds -%D they can be collected in a layer, for instance the text -%D layer (especially the hidden text layer). In the case of -%D floats, we run into problems, since the page information is -%D not applicable when the content floats indeed. In such -%D situations one can treat positions and graphics local. +%D The next switch can be used to communicate a special +%D situation. Positioning and associated actions can be +%D executed any time. However, in for instance backgrounds +%D they can be collected in a layer, for instance the text +%D layer (especially the hidden text layer). In the case of +%D floats, we run into problems, since the page information is +%D not applicable when the content floats indeed. In such +%D situations one can treat positions and graphics local. \newif\iflocalpositioning -%D Watch out: sometimes a pagebreak occurs inside a float +%D Watch out: sometimes a pagebreak occurs inside a float %D placement, so there we need to disable local mode. -\appendtoks \localpositioningtrue \to \everyinsidefloat -\appendtoks \localpositioningfalse \to \everypagebody +\appendtoks + \localpositioningtrue +\to \everyinsidefloat + +\appendtoks + \localpositioningfalse +\to \everypagebody %D We save positionional information without dimensions, which %D saves some bytes. The conversion too saves some bytes, but @@ -183,7 +192,7 @@ \def\checkpositions {\startnointerference - \protectlabels + \protectlabels \doutilities{positions}\jobname\empty\relax\relax \global\let\checkpositions\relax \stopnointerference} @@ -371,7 +380,7 @@ % {\initializenextposition % \dosetposition{#1}% % \dopositionaction{#1}} -% +% % \def\setpositionbox#1% % {\dowithnextbox % {\hbox to \wd\nextbox @@ -386,7 +395,7 @@ % \dopositionaction\currentposition % \box\positionbox % \hss}}} -% +% % \def\setpositionplus#1#2% % {\dowithnextbox % {\hbox to \wd\nextbox @@ -399,13 +408,13 @@ % {#2}% % \traceposstring\rlap\magenta{<\currentposition}% % \setbox\positionbox\box\nextbox -% \dopositionaction\currentposition +% \dopositionaction\currentposition % \box\positionbox % \hss}}} \def\setpositiononly#1% - {\iftrialtypesetting - % nothing + {\iftrialtypesetting + % nothing \else \initializenextposition \def\currentposition{#1}% @@ -413,8 +422,8 @@ \fi} \def\setposition#1% - {\iftrialtypesetting - % nothing + {\iftrialtypesetting + % nothing \else \initializenextposition \def\currentposition{#1}% @@ -424,7 +433,7 @@ \def\setpositionbox#1% {\dowithnextbox - {\iftrialtypesetting + {\iftrialtypesetting \box\nextbox \else \initializenextposition @@ -443,12 +452,12 @@ \def\setpositionplus#1#2% {\dowithnextbox - {\iftrialtypesetting + {\iftrialtypesetting \box\nextbox \else \initializenextposition \hbox to \wd\nextbox - {\def\currentposition{#1}% + {\def\currentposition{#1}% \dosetpositionplus\currentposition {\number\wd\nextbox}% {\number\ht\nextbox}% @@ -456,7 +465,7 @@ {#2}% \traceposstring\rlap\magenta{<\currentposition}% \setbox\positionbox\box\nextbox - \dopositionaction\currentposition + \dopositionaction\currentposition \box\positionbox \hss}% \fi}} @@ -482,20 +491,50 @@ \let\cleanuppositionaction\gobbleoneargument -%D The next one will be overloaded later. +%D The next one will be overloaded later. + +% \def\dopositionaction#1% test saves hash entry in etex +% {\ifundefined{\POSactionprefix#1::}\else +% \ifnum\MPp{#1}>\zerocount % new +% \bgroup +% \traceposstring\clap\red{<#1>}% +% \the\everyinsertpositionaction +% \the\everypositionaction +% \getvalue{\POSactionprefix#1::}% +% \cleanuppositionaction{#1}% +% \egroup +% \else +% % shouldn't happen too often +% \traceposstring\clap\cyan{<#1>}% +% \fi +% \fi} \def\dopositionaction#1% test saves hash entry in etex {\ifundefined{\POSactionprefix#1::}\else - \ifnum\MPp{#1}>\zerocount % new - \bgroup - \traceposstring\clap\red{<#1>}% - \the\everyinsertpositionaction - \the\everypositionaction - \getvalue{\POSactionprefix#1::}% - \cleanuppositionaction{#1}% + \ifnum\MPp{#1}>\zerocount % new + \setbox\scratchbox\hbox \bgroup + \traceposstring\clap\red{<#1>}% + \the\everyinsertpositionaction + \the\everypositionaction + \ifcollectMPpositiongraphics + % can save a lot of run time + \pushMPdrawing + \MPshiftdrawingtrue + \resetMPdrawing + \getvalue{\POSactionprefix#1::}% + \ifMPdrawingdone + \getMPdrawing + \fi + \resetMPdrawing + \popMPdrawing + \else + \getvalue{\POSactionprefix#1::}% + \fi + \cleanuppositionaction{#1}% \egroup + \smashedbox\scratchbox \else - % shouldn't happen too often + % shouldn't happen too often \traceposstring\clap\cyan{<#1>}% \fi \fi} @@ -507,6 +546,13 @@ \@EA\firstofoneargument \fi} +\def\doifpositionactionelse#1% + {\ifundefined{\POSactionprefix#1::}% + \@EA\secondoftwoarguments + \else + \@EA\firstoftwoarguments + \fi} + %D We can copy a position with: %D %D \starttypen @@ -610,16 +656,16 @@ \hskip-\rightskip}} % the next macro disables par positions (in inner boxes) and -% only registers the width +% only registers the width \def\setinnerparpositions {\let\fpos\ffpos - \let\tpos\ttpos + \let\tpos\ttpos \let\wpos\wwpos} % example of usage: (see for application "techniek") % -% \appendtoks +% \appendtoks % \setinnerparpositions % \to \everytabulate @@ -640,8 +686,8 @@ \def\registerparoptions {\ifpositioningpar \ifpositioning \iftrialtypesetting \else - \ifinpagebody \else \ifmmode \else \ifinformula \else - \ifprocessingverbatim + \ifinpagebody \else \ifmmode \else \ifinformula \else + \ifprocessingverbatim \iflinepar \doregisterparoptions \fi \else \doregisterparoptions @@ -662,10 +708,10 @@ \efficientdimen\hangindent,% 4 \the\hangafter ,% 5 \efficientdimen\parindent }% 6 - % no strut here ! (see stepcharts and pascal) - \normalhbox{\registerparsymbol}% - \egroup} - + % no strut here ! (see stepcharts and pascal) + \normalhbox{\registerparsymbol}% + \egroup} + \newif\iftracepositions \def\traceposstring#1#2#3% @@ -873,7 +919,7 @@ %D %D \typebuffer[graphic] -\def\MPanchoridentifier{mp-anchor} % {MPA} % {mp-anchor} +\def\MPanchoridentifier{mpa} % {mp-anchor} \def\MPoverlayposprefix{MO::} \long\def\defineMPpositiongraphic#1% @@ -899,24 +945,38 @@ % \vfill}% % \fi} -\def\positionoverlay#1% - {\ifpositioning +\let\MPanchornumber\realfolio + +% \def\positionoverlay#1% +% {\ifpositioning +% \vbox to \overlayheight +% {\edef\MPanchorid{#1::\MPanchoridentifier:\MPanchornumber}% +% \edef\MPanchor##1{\MPpos{\MPanchorid}}% +% \the\everyinsertpositionaction +% \copyposition{#1::\MPanchoridentifier}{#1::\MPanchoridentifier:\MPanchornumber}% +% \hpos +% {#1::\MPanchoridentifier:\MPanchornumber} +% {\hbox to \overlaywidth{\dopositionaction{#1::\MPanchoridentifier}\hss}}% +% \vfill}% +% \fi} + +\def\positionoverlay#1% the test prevents too many redundant positions + {\ifpositioning % in (not used) text* position layers \vbox to \overlayheight - {\edef\MPanchorid{#1::\MPanchoridentifier:\realfolio}% - \edef\MPanchor##1{\MPpos{\MPanchorid}}% - \the\everyinsertpositionaction - \copyposition{#1::\MPanchoridentifier}{#1::\MPanchoridentifier:\realfolio}% - \hpos - {#1::\MPanchoridentifier:\realfolio} - {\hbox to \overlaywidth{\dopositionaction{#1::\MPanchoridentifier}\hss}}% + {\doifpositionactionelse{#1::\MPanchoridentifier}% + {\edef\MPanchorid{#1::\MPanchoridentifier:\MPanchornumber}% + \edef\MPanchor##1{\MPpos{\MPanchorid}}% + \the\everyinsertpositionaction + \copyposition{#1::\MPanchoridentifier}{#1::\MPanchoridentifier:\MPanchornumber}% + \hpos + {#1::\MPanchoridentifier:\MPanchornumber} + {\hbox to \overlaywidth{\dopositionaction{#1::\MPanchoridentifier}\hss}}}% + {\hbox to \overlaywidth{\hss}}% \vfill}% \fi} -% \def\startpositionoverlay#1% -% {\def\currentpositionoverlay{#1}} - \def\startpositionoverlay#1% - {\iftrialtypesetting % we don't want redundant entries in the list + {\iftrialtypesetting % we don't want redundant entries in the list \@EA\gobbleuntil\@EA\stoppositionoverlay \else \def\currentpositionoverlay{#1}% @@ -949,10 +1009,10 @@ % \setxvalue{\POSactionprefix#1++}{\getvalue{\POSactionprefix#1++}}% % \fi} -\def\cleanuppositionaction#1% not in trialtypesetting +\def\cleanuppositionaction#1% not in trialtypesetting {\ifundefined{\POSactionprefix#1++}\else \the\everycleanpositionaction - \iflocalpositioning + \iflocalpositioning \letgvalue{\POSactionprefix#1++}\empty \else \setxvalue{\POSactionprefix#1++}{\getvalue{\POSactionprefix#1++}}% @@ -969,14 +1029,6 @@ \edef\!!stringc{\POSactionprefix\!!stringa++}% \expanded{\dosetpositionaction{\!!stringa}{\noexpand\getvalue{\!!stringc}}}% \global\let#1\relax -% \doifundefinedelse\!!stringc -% {\let\!!stringb\empty} -% {\edef\!!stringb{\getvalue\!!stringc}}% -% \ifundefined\!!stringc -% \let\!!stringb\empty -% \else -% \edef\!!stringb{\getvalue\!!stringc}% -% \fi \edef\!!stringb{\executeifdefined\!!stringc\empty}% \setxvalue\!!stringc{\!!stringb#1#2}% \egroup} @@ -1040,7 +1092,7 @@ % \placeMPgraphic % \egroup} -\newif\ifcollectMPpositiongraphics +\newif\ifcollectMPpositiongraphics \long\def\useMPpositiongraphic#1#2#3% {\bgroup @@ -1058,17 +1110,17 @@ \fi \egroup} -% Now we need a adapted action handler: +% Now we need a adapted action handler: \def\dopositionaction#1% test saves hash entry in etex {\ifundefined{\POSactionprefix#1::}\else - \ifnum\MPp{#1}>\zerocount % new + \ifnum\MPp{#1}>\zerocount % new \bgroup \traceposstring\clap\red{<#1>}% \the\everyinsertpositionaction \the\everypositionaction - \ifcollectMPpositiongraphics - % can save a lot of run time + \ifcollectMPpositiongraphics + % can save a lot of run time \pushMPdrawing \MPshiftdrawingtrue \resetMPdrawing @@ -1084,23 +1136,44 @@ \cleanuppositionaction{#1}% \egroup \else - % shouldn't happen too often + % shouldn't happen too often \traceposstring\clap\cyan{<#1>}% \fi \fi} \def\MPpositiongraphic {\dodoublegroupempty\doMPpositiongraphic} - + +% \def\doMPpositiongraphic#1#2% tag setups +% {\bgroup +% \def\@@meta{#1:}% +% \setupMPvariables[#2]% +% \prepareMPpositionvariables +% \MPshiftdrawingtrue +% \def\doMPpositiongraphic##1##2{\getvalue{MPG:##1}}% temp hack +% \setbox\positiongraphicbox\hbox +% {\ignorespaces +% \executeifdefined{MPM:#1}{\executeifdefined{MPG:#1}\donothing}% +% \removelastspace}% +% \smashbox\positiongraphicbox +% \box\positiongraphicbox +% \egroup} + \def\doMPpositiongraphic#1#2% tag setups {\bgroup \def\@@meta{#1:}% \setupMPvariables[#2]% \prepareMPpositionvariables \MPshiftdrawingtrue - \def\doMPpositiongraphic##1##2{\getvalue{MPG:##1}}% temp hack + \def\doMPpositiongraphic##1##2% + {{% new, see (techniek) + \def\@@meta{##1:}% + \setupMPvariables[#2,##2]% + \prepareMPpositionvariables + % and needed + \getvalue{MPG:##1}}}% temp hack \setbox\positiongraphicbox\hbox - {\ignorespaces + {\ignorespaces \executeifdefined{MPM:#1}{\executeifdefined{MPG:#1}\donothing}% \removelastspace}% \smashbox\positiongraphicbox @@ -1169,7 +1242,7 @@ \def\doinsertMPpositiongraphicrange#1#2#3#4% pos tag setups {\ifnum\MPp{#1}\MPp{#2}>\zerocount - \iflocalpositioning + \iflocalpositioning \donetrue \else \donefalse @@ -1199,7 +1272,7 @@ \let\dohandleMPpositiongraphicrange\docleanMPpositiongraphicrange \to \everycleanpositionaction -% will be overloaded, and/or code below moved to core-box +% will be overloaded, and/or code below moved to core-box \defineoverlay[\v!tekst-2][\positionoverlay{\v!tekst-2}] \defineoverlay[\v!tekst-1][\positionoverlay{\v!tekst-1}] @@ -1214,7 +1287,7 @@ \to \MPinitializations %D Some of these macros are pretty clever but too complicated -%D to be nice. When things are kind of stable I'll clean up +%D to be nice. When things are kind of stable I'll clean up %D this mess. %D THIS NEEDS A CLEANUP @@ -1264,7 +1337,7 @@ gridtype=0, linetype=1, filltype=1, - %snaptops=true, % not that nice: true/false + %snaptops=true, % not that nice: true/false gridcolor=red, linecolor=blue, fillcolor=lightgray, @@ -1367,40 +1440,46 @@ %D The next alternative works in columnsets : \startuseMPgraphic{mpos:par:columnset} - \iftracepositions show_multi_pars \else draw_multi_pars \fi ; + \iftracepositions show_multi_pars \else draw_multi_pars \fi ; \stopuseMPgraphic \startMPpositionmethod{mpos:par:columnset} \edef\MPparcounter{\MPv\MPbself{1}{0}}% \startMPpositiongraphic{mpos:par}% - {fillcolor,filloffset,linecolor,gridcolor,linewidth,gridwidth,lineradius} + {fillcolor,filloffset,linecolor,gridcolor,% + linewidth,gridwidth,lineradius} \includeMPgraphic{mpos:par:setup} ; \includeMPgraphic{mpos:par:extra} ; - prepare_multi_pars(\MPpos\MPbself,\MPpos\MPeself,\MPpos\MPwself, - \MPpos\MPparanchor,\MPvv\MPparanchor{0,0,0,0,0,0}) ; - relocate_multipars(-\MPxy\MPanchorid) ; % inside layerpos + prepare_multi_pars(\MPpos\MPbself,\MPpos\MPeself,\MPpos\MPwself, + \MPpos\MPparanchor,\MPvv\MPparanchor{0,0,0,0,0,0}) ; + relocate_multipars(-\MPxy\MPanchorid) ; % inside layerpos \includeMPgraphic{\MPvar{mp}} ; \stopMPpositiongraphic \MPpositiongraphic{mpos:par}{}% \stopMPpositionmethod -%D \starttypen +%D \starttypen %D \setupbackground %D [test] %D [mp=mpos:par:columnset, %D methode=mpos:par:columnset] -%D \stoptypen +%D \stoptypen -%D We need to treat floats in a special way. +%D We need to treat floats in a special way. -\appendtoks +\appendtoks local_multi_par_area:=\iflocalpositioning true\else false\fi; -\to \MPinitializations +\to \MPinitializations \def\textbackgroundoverlay#1% {\iflocalpositioning\v!lokaal\else\v!tekst\fi#1} -%D So far for the trickery. +\newcounter\localpositionnumber + +\def\MPanchornumber + {\iflocalpositioning\localpositionnumber\else\realfolio\fi} + +%D So far for the trickery. \newcounter\textbackgrounddepth @@ -1429,8 +1508,11 @@ \let\dodostarttextbackground\relax \let\dodostoptextbackground \relax -\def\currentparbackground{background:0} -\def\nextparbackground {background:1} +% \def\currentparbackground{background:0} +% \def\nextparbackground {background:1} + +\def\currentparbackground{pbg:0} +\def\nextparbackground {pbg:1} \def\btbanchor{b:\currentparbackground} \def\etbanchor{e:\currentparbackground} @@ -1438,16 +1520,19 @@ \def\nextbtbanchor{b:\nextparbackground} \def\nextetbanchor{e:\nextparbackground} -\def\backgroundvariable#1{\getvalue{\??td\currenttextbackground#1}} +\def\backgroundvariable#1% + {\csname\??td\currenttextbackground#1\endcsname} \def\dostarttextbackground[#1][#2]% {\checktextbackgrounds \def\currenttextbackground{#1}% \doglobal\increment\nofparbackgrounds - \edef\currentparbackground{background:\nofparbackgrounds}% + %\edef\currentparbackground{background:\nofparbackgrounds}% + \edef\currentparbackground{pbg:\nofparbackgrounds}% \bgroup \increment\nofparbackgrounds - \xdef\nextparbackground{background:\nofparbackgrounds}% + %\xdef\nextparbackground{background:\nofparbackgrounds}% + \xdef\nextparbackground{pbg:\nofparbackgrounds}% \egroup \setuptextbackground[#1][#2]% \let\dodostarttextbackground\relax @@ -1456,14 +1541,14 @@ {\dopresettextbackground{#1}}% \dodostarttextbackground} -\def\dopresettextbackground#1% +\def\dopresettextbackground#1% todo: \backgroundparameter {\ExpandFirstAfter\processaction % \EFA niet echt nodig [\getvalue{\??td#1\c!plaats}] [ \v!tekst=>\let\dodostarttextbackground\dostarttextbackgroundtxt \let\dodostoptextbackground \dostoptextbackgroundtxt, \v!alinea=>\let\dodostarttextbackground\dostarttextbackgroundpar \let\dodostoptextbackground \dostoptextbackgroundpar]% - \ifnum\textbackgrounddepth>\plusone % new + \ifnum\textbackgrounddepth>\plusone % new \let\dodostarttextbackground\dostarttextbackgroundtxt \let\dodostoptextbackground \dostoptextbackgroundtxt \fi @@ -1509,10 +1594,10 @@ {\tpos\currentparbackground \dostopattributes} -% keep this simple one, it's used in prikkels and alike +% keep this simple one, it's used in prikkels and alike % % \def\dostarttextbackgroundpar -% {\endgraf % new +% {\endgraf % new % \getvalue{\??td\currenttextbackground\c!voor}% % \noindent\fpos\currentparbackground\ignorespaces % \bgroup @@ -1527,7 +1612,7 @@ % \geenwitruimte % \seteffectivehsize % \par} -% +% % \def\dostoptextbackgroundpar % {\par % \dostopattributes @@ -1537,7 +1622,7 @@ % \geenwitruimte % \egroup % \nobreak \noindent \strut \hfill \kern\zeropoint \tpos\currentparbackground -% \endgraf % new +% \endgraf % new % \getvalue{\??td\currenttextbackground\c!na}} \def\dostarttextbackgroundpar @@ -1660,7 +1745,7 @@ {\ifdim\pagetotal>\teksthoogte \else \ifdim\pagegoal=\maxdimen \else \calculatenexttextpardimensions - % too tricky + % too tricky % \scratchdimen=\textparheight % \advance\scratchdimen\pagetotal\relax % \ifdim\scratchdimen>\pagegoal @@ -1668,7 +1753,7 @@ % \fi \ifdim\textparheight>\zeropoint \ifdim\textparheight>\mintextparheight\else - \pagina % option + \pagina % option \fi \fi \fi @@ -1687,8 +1772,8 @@ \c!linkeroffset,\c!rechteroffset,\c!bovenoffset,\c!onderoffset]% \getparameters[\??td#1][#2]% \doifvalue{\??td#1\c!status}\v!start\checktextbackgrounds - \unexpanded\setvalue{#1}% - {\groupedcommand{\starttextbackground[#1]}{\stoptextbackground}}% + \unexpanded\setvalue{#1}% + {\groupedcommand{\starttextbackground[#1]}{\stoptextbackground}}% \setvalue{\e!start#1}{\starttextbackground[#1]}% \setvalue{\e!stop #1}{\stoptextbackground}% \fi} @@ -1722,14 +1807,14 @@ \let\currenttextbackground\empty \def\checktextbackgrounds - {\ifproductionrun + {\ifproductionrun \enabletextarearegistration - \enablehiddenbackground + \enablehiddenbackground \fi} \setuptextbackground - [\c!mp=mpos:par:shape, - \c!methode=mpos:par, + [\c!mp=mpos:par:columnset, % buggy: mpos:par:shape + \c!methode=mpos:par:columnset, % \c!status=\v!start, \c!plaats=\v!tekst, \c!linkeroffset=\!!zeropoint, % 1em, @@ -1747,7 +1832,7 @@ \c!kaderkleur=blue, \c!lijndikte=\linewidth] -%D As an example we define a grid background: +%D As an example we define a grid background: \definetextbackground [\v!grid] @@ -1758,7 +1843,7 @@ \c!achtergrond=, \c!variant=1] -\ifx\basegrid\undefined \else \letvalue\v!grid=\basegrid \fi +\ifx\basegrid\undefined \else \letvalue\v!grid=\basegrid \fi % lelijk, aanpassen, opties diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex index 07a7b1f51..7bf646001 100644 --- a/tex/context/base/core-rul.tex +++ b/tex/context/base/core-rul.tex @@ -768,9 +768,11 @@ % obey user set height, also downward compatible \else \doifvaluesomething{\@@framed\c!regels} - {\!!heighta\framedparameter\c!regels\lineheight - \edef\localheight{\the\!!heighta}% - \boxhasheighttrue}% + {\ifcase\framedparameter\c!regels\else + \!!heighta\framedparameter\c!regels\lineheight + \edef\localheight{\the\!!heighta}% + \boxhasheighttrue + \fi}% \fi % this should be an option ! ! ! ! \ifdim\!!widtha=\hsize diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex index 152ebe338..937fd4506 100644 --- a/tex/context/base/core-sec.tex +++ b/tex/context/base/core-sec.tex @@ -166,7 +166,7 @@ \doifvalue{\@@thenumber{#1}\c!sectienummer}\v!nummer {\donetrue\let\@@sectionconversion\gobbleoneargument}% \ifdone - \edef\currentsection% + \edef\currentsection {\getvalue{\??by\getvalue{\@@thenumber{#1}\c!wijze\c!lokaal}}}% \doifnot{\currentsection}\zerosection {\doifnot{\@@sectionvalue{\currentsection}}{0} @@ -421,9 +421,16 @@ % \donexttracklevel{#1}} % % nicer - +% +% \def\doresetsectioncounters#1% +% {\resetcounter{\??se#1}% +% \donexttracklevel{#1}} +% +% obey eigennummer + \def\doresetsectioncounters#1% {\resetcounter{\??se#1}% + \letgvalue{\??se#1\c!eigennummer}\relax \donexttracklevel{#1}} \def\resetsectioncounters % #1 @@ -718,17 +725,50 @@ \sectionseparator \@@shortsectionnumber{#1}} +% \def\@@longsectionnumber#1% +% {\ifnum\countervalue{\??se\previoussection{#1}}>\zerocount +% \csname\previoussection{#1}\c!nummer\endcsname.% +% \fi +% \@@shortsectionnumber{#1}} + +\newif\ifreversesectionnumbers % todo: key/val + \def\@@longsectionnumber#1% - {\ifnum\countervalue{\??se\previoussection{#1}}>\zerocount - \csname\previoussection{#1}\c!nummer\endcsname.% - \fi - \@@shortsectionnumber{#1}} + {\ifreversesectionnumbers + \@@shortsectionnumber{#1}% + \ifnum\countervalue{\??se\previoussection{#1}}>\zerocount + .\csname\previoussection{#1}\c!nummer\endcsname + \fi + \else + \ifnum\countervalue{\??se\previoussection{#1}}>\zerocount + \csname\previoussection{#1}\c!nummer\endcsname.% + \fi + \@@shortsectionnumber{#1}% + \fi} + + +% \def\@@shortsectionnumber#1% +% {\@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax +% \@@sectionvalue{#1}% +% \else +% \@@sectionconversion{#1}{\@@sectionvalue{#1}}% +% \fi} +% +% obey eigennummer \def\@@shortsectionnumber#1% - {\@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax - \@@sectionvalue{#1}% + {\@EA\ifx\csname\??se#1\c!eigennummer\endcsname\relax + \@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax + \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax + \@@sectionvalue{#1}% + \else + \@@sectionconversion{#1}{\@@sectionvalue{#1}}% + \fi + \else + \@@sectionconversion{#1}{\@@sectionvalue{#1}}% + \fi \else - \@@sectionconversion{#1}{\@@sectionvalue{#1}}% + \csname\??se#1\c!eigennummer\endcsname \fi} % suited for chinese too: @@ -1022,11 +1062,42 @@ \newif\ifsomeheadconversion +% \def\setsomeheadconversion#1#2% +% {\someheadconversionfalse +% \doifelsevalue{\??ko#1\c!eigennummer}\v!ja +% {\def\someheadconversion{#2}} +% {\bepaalkopnummer[#1]% +% \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\relax +% \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\relax +% \def\someheadconversion{#2}% +% \else +% \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\empty +% \def\someheadconversion{#2}% +% \else +% \someheadconversiontrue +% \def\someheadconversion% +% {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\c!kopconversie}}{#2}}% +% \fi +% \fi +% \else +% \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\empty +% \def\someheadconversion{#2}% +% \else +% \someheadconversiontrue +% \def\someheadconversion% +% {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\@@sectieblok\c!kopconversie}}{#2}}% +% \fi +% \fi}} +% +% deal with eigennummer + \def\setsomeheadconversion#1#2% {\someheadconversionfalse \doifelsevalue{\??ko#1\c!eigennummer}\v!ja - {\def\someheadconversion{#2}} - {\bepaalkopnummer[#1]% + {\setgvalue{\??se\@@sectie\c!eigennummer}{#2}% + \def\someheadconversion{#2}} + {\letgvalue{\??se\@@sectie\c!eigennummer}\relax + \bepaalkopnummer[#1]% \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\relax \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\relax \def\someheadconversion{#2}% @@ -1808,7 +1879,7 @@ \doifnot{\huidigekopnummer}{0}{\finalsectionnumber}% \egroup} -\def\simplekopnummer% +\def\simplekopnummer {\huidigekopnummer} \definecomplexorsimple\kopnummer @@ -2007,10 +2078,9 @@ % 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}{\@@plaatskop}}} -\def\stelkopin% +\def\stelkopin {\dodoubleargumentwithset\dostelkopin} \newif\ifsectienummer \sectienummertrue @@ -2058,6 +2128,7 @@ [\c!variant=\v!normaal, \c!sectienummer=\v!ja, \c!scheider=., + \c!limittext=\v!ja, \c!uitlijnen=, \c!titeluitlijnen=, \c!tolerantie=, diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex index 042093968..d9d93417b 100644 --- a/tex/context/base/core-spa.tex +++ b/tex/context/base/core-spa.tex @@ -251,15 +251,15 @@ % \v!flexibel=>\global\lokaalblankoflexibeltrue, % \v!vast=>\global\lokaalblankovasttrue, % \v!back=>\geenblanko, -% \v!wit=>\global\advance\blankoskip by \parskip, -% \v!formule=>\global\advance\blankoskip by \medskipamount, +% \v!wit=>\global\advance\blankoskip \parskip, +% \v!formule=>\global\advance\blankoskip \medskipamount, % \v!geenwit=>\global\blankogeenwittrue, -% -\v!wit=>\global\advance\blankoskip by -\parskip, +% -\v!wit=>\global\advance\blankoskip -\parskip, % \v!blokkeer=>\global\blankoblokkeertrue, % \v!forceer=>\global\blankoforceertrue, -% \v!regel=>\global\advance\blankoskip by \lineheight, +% \v!regel=>\global\advance\blankoskip \lineheight, % \v!halveregel=>\ifgridsnapping\global\fuzzyvskiptrue\fi -% \global\advance\blankoskip by .5\lineheight, +% \global\advance\blankoskip .5\lineheight, % \s!unknown=>\doindirectblanko{#1}]} % % \def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if @@ -532,6 +532,103 @@ % Overloaded in cont-new! +% \def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if +% {\global\blankoresetfalse +% \global\blankoblokkeerfalse +% \global\blankogeenwitfalse +% \global\lokaalblankoflexibelfalse +% \global\lokaalblankovastfalse +% \global\blankoskip\zeropoint +% \global\blankoforceerfalse +% \blankobuitenfalse +% \expanded{\rawprocesscommalist[#1]}\doblanko +% \ifdim\blankoskip=\zeropoint\relax +% \iflokaalblankoflexibel +% \doglobal\advance\blankoskip \currentblanko +% \else\iflokaalblankovast +% \doglobal\advance\blankoskip \currentblanko +% \fi\fi +% \fi +% \ifblankobuiten +% \else +% \par +% \ifvmode %in pos fonts gaat dit mis +% \ifblankoforceer%\ifdim\prevdepth>\zeropoint\else +% % -1000pt signals top of page or column (\ejectcolumn) +% \verticalstrut +% \kern-\lineheight +% \fi +% \ifblankoblokkeer +% \global\doeblankofalse +% \edef\oldprevdepth{\the\prevdepth}% +% \prevdepth\newprevdepth +% \else +% \global\doeblankotrue +% \fi +% \ifblankoreset +% \global\doeblankotrue +% \ifdim\prevdepth=\newprevdepth +% \prevdepth\oldprevdepth +% \fi +% \fi +% \ifdoeblanko +% \ifdim\lastskip<\blankoskip\relax +% % else when \blanko[2*groot] + \blanko[3*groot] with parskip +% % equaling 1*groot, gives a groot=\parskip so adding a small +% % value makes it distinguishable; can also be done at parskip +% % setting time (better) +% \global\advance\blankoskip \mindimen\relax % = skip +% % test this on 2* + 3* and parskip groot +% \ifblankogeenwit +% \global\advance\blankoskip -\parskip +% \else +% \ifdim\lastskip=\parskip +% \else % force this due to previous comment +% \ifdim\parskip>\zeropoint\relax +% \ifdim\blankoskip<\parskip\relax +% \global\blankoskip\zeropoint +% \else +% \global\advance\blankoskip -\parskip +% \fi +% \fi +% \fi +% \fi +% \ifblankoflexibel \else +% \blankoskip1\blankoskip +% \fi +% \iflokaalblankovast +% \blankoskip1\blankoskip +% \fi +% \iflokaalblankoflexibel +% \blankoskip1\blankoskip +% \!!plus\skipgluefactor\blankoskip +% \!!minus\skipgluefactor\blankoskip +% \fi +% \ifdim\prevdepth=\newprevdepth +% % blokkeer +% \else +% \iffuzzyvskip +% \removelastfuzzyvskip +% \fuzzyvskip\blankoskip\relax +% \else +% \removelastskip +% \vskip\blankoskip\relax +% \fi +% \fi +% \else +% \iffuzzyvskip +% \removelastfuzzyvskip +% \fuzzyvskip\blankoskip\relax +% \fi +% \fi +% \fi +% \fi +% \fi +% \global\fuzzyvskipfalse +% \presetindentation} + +\newsignal\noblanksignal + \def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if {\global\blankoresetfalse \global\blankoblokkeerfalse @@ -555,24 +652,63 @@ \ifvmode %in pos fonts gaat dit mis \ifblankoforceer%\ifdim\prevdepth>\zeropoint\else % -1000pt signals top of page or column (\ejectcolumn) - \verticalstrut - \kern-\lineheight + \vbox{\strut}\kern-\lineheight \fi \ifblankoblokkeer \global\doeblankofalse - \edef\oldprevdepth{\the\prevdepth}% - \prevdepth\newprevdepth + \ifgridsnapping + \ifdim\prevdepth<\zeropoint + % brrr + \else + % dirty trick: smaller blanks are ignored after + % a larger one, so 10 lines is probably safe; first make + % sure that we honor penalties + \scratchcounter\lastpenalty + % now comes the trick (cross our fingers that this works + % well in multi columns; maybe an ifinner test is needed + % \vskip-10\lineheight + % \ifnum\scratchcounter=\zerocount \else \penalty\lastpenalty \fi + % \vskip 10\lineheight + % allas, this leads to overfull pages, so we try this: + \kern-\noblanksignal + \ifnum\scratchcounter=\zerocount + \else + \penalty\lastpenalty + \fi + \kern\noblanksignal + % end-of-dirty-trick + \fi + \else + \ifdim\prevdepth<\zeropoint + % brrr + \else + % ensure at least a proper prevdepth, this should be + % an option + \vskip-\prevdepth + \vskip\strutdepth + \prevdepth\strutdepth + \fi + % the old crappy piece of code + \edef\oldprevdepth{\the\prevdepth}% + \prevdepth\newprevdepth + \fi \else \global\doeblankotrue \fi \ifblankoreset \global\doeblankotrue - \ifdim\prevdepth=\newprevdepth - \prevdepth\oldprevdepth + \ifgridsnapping + % let's play safe and not fool around with the depth, if + % only because it took a lot of effort to sort out the grid + % stuff in the first place + \else + \ifdim\prevdepth=\newprevdepth + \prevdepth\oldprevdepth + \fi \fi \fi \ifdoeblanko - \ifdim\lastskip<\blankoskip\relax + \ifdim1\lastskip<1\blankoskip\relax % else when \blanko[2*groot] + \blanko[3*groot] with parskip % equaling 1*groot, gives a groot=\parskip so adding a small % value makes it distinguishable; can also be done at parskip @@ -604,9 +740,16 @@ \!!plus\skipgluefactor\blankoskip \!!minus\skipgluefactor\blankoskip \fi - \ifdim\prevdepth=\newprevdepth - % blokkeer + \ifgridsnapping + \ifdim\lastkern=\noblanksignal + \global\doeblankofalse + \fi \else + \ifdim\prevdepth=\newprevdepth + \global\doeblankofalse + \fi + \fi + \ifdoeblanko \iffuzzyvskip \removelastfuzzyvskip \fuzzyvskip\blankoskip\relax @@ -619,6 +762,24 @@ \iffuzzyvskip \removelastfuzzyvskip \fuzzyvskip\blankoskip\relax + \else + % new, test this on pascal + \ifdim\blankoskip<\zeropoint + \advance\blankoskip-\lastskip + \removelastskip + \ifdim\blankoskip>\zeropoint + \vskip\blankoskip + \else + \vskip\zeropoint + \fi + \else + % also new + \ifdim\blankoskip=\zeropoint + \ifblankogeenwit + \geenwitruimte + \fi + \fi + \fi \fi \fi \fi @@ -707,7 +868,7 @@ \definecomplexorsimple\stelblankoin -\def\simplestelblankoin% == snelle \stelblankoin[\s!default] +\def\simplestelblankoin % == snelle \stelblankoin[\s!default] {\ifgridsnapping \blankoflexibelfalse \fi @@ -979,42 +1140,75 @@ \newskip\tussenwit \tussenwit\zeropoint +\newif\ifwitruimteflexibel \witruimteflexibeltrue + \def\blankokleinmaat {\smallskipamount} \def\blankomiddelmaat {\medskipamount} \def\blankogrootmaat {\bigskipamount} \def\currentwitruimte {\zeropoint} -\def\stelwitruimteopnieuwin% - {\expanded{\stelwitruimtein[\currentwitruimte]}} - -\newif\ifwitruimteflexibel \witruimteflexibeltrue +% \def\stelwitruimteopnieuwin +% {\expanded{\stelwitruimtein[\currentwitruimte]}} +% +% \newif\ifwitruimteflexibel \witruimteflexibeltrue +% +% \definecomplexorsimple\stelwitruimtein +% +% \def\complexstelwitruimtein[#1]% +% {\expanded{\dostelwitruimtein[#1]}% +% \dodostelwitruimtein} +% +% \def\dostelwitruimtein[#1]% +% {\processallactionsinset +% [#1] +% [\v!herstel=>, +% \v!vast=>\witruimteflexibelfalse, +% \v!flexibel=>\witruimteflexibeltrue, +% \v!regel=>\tussenwit\baselineskip, +% \v!halveregel=>\tussenwit.5\baselineskip, +% \s!default=>\doifnot\currentwitruimte\v!geen\stelwitruimteopnieuwin, +% \s!unknown=>\@EA\assigndimension\@EA{\commalistelement} % \@EA is nodig +% \tussenwit\blankokleinmaat\blankomiddelmaat\blankogrootmaat]} % te vangen +% +% \def\dodostelwitruimtein +% {\edef\currentwitruimte +% {\ifdim\tussenwit=\zeropoint +% \v!geen +% \else +% \ifgridsnapping\the\baselineskip\else\the\tussenwit\fi +% \fi}% +% \ifgridsnapping +% \witruimteflexibelfalse +% \tussenwit1\tussenwit +% \ifdim\tussenwit>\zeropoint +% \tussenwit\baselineskip +% \fi +% \else +% \ifwitruimteflexibel \else \tussenwit1\tussenwit \fi +% \fi +% \parskip\tussenwit} +% +% \def\simplestelwitruimtein% == snelle \stelwitruimtein[\s!default] +% {\doifnot\currentwitruimte\v!geen\stelwitruimteopnieuwin +% \dodostelwitruimtein} \definecomplexorsimple\stelwitruimtein +\def\simplestelwitruimtein + {\doifnot\currentwitruimte\v!geen\dostelwitruimtein} + \def\complexstelwitruimtein[#1]% - {\expanded{\dostelwitruimtein[#1]}% + {\doifelsenothing{#1} + {\simplestelwitruimtein} + {\edef\currentwitruimte{#1}% + \dostelwitruimtein}} + +\def\dostelwitruimtein + {\processcommacommand[\currentwitruimte]\dowhitespacemethod \dodostelwitruimtein} -\def\dostelwitruimtein[#1]% - {\processallactionsinset - [#1] - [\v!herstel=>, - \v!vast=>\witruimteflexibelfalse, - \v!flexibel=>\witruimteflexibeltrue, - \v!regel=>\tussenwit\baselineskip, - \v!halveregel=>\tussenwit.5\baselineskip, - \s!default=>\doifnot\currentwitruimte\v!geen\stelwitruimteopnieuwin, - \s!unknown=>\@EA\assigndimension\@EA{\commalistelement} % \@EA is nodig - \tussenwit\blankokleinmaat\blankomiddelmaat\blankogrootmaat]} % te vangen - -\def\dodostelwitruimtein% - {\edef\currentwitruimte% - {\ifdim\tussenwit=\zeropoint - \v!geen - \else - \ifgridsnapping\the\baselineskip\else\the\tussenwit\fi - \fi}% - \ifgridsnapping +\def\dodostelwitruimtein + {\ifgridsnapping \witruimteflexibelfalse \tussenwit1\tussenwit \ifdim\tussenwit>\zeropoint @@ -1024,12 +1218,27 @@ \ifwitruimteflexibel \else \tussenwit1\tussenwit \fi \fi \parskip\tussenwit} + +\definesystemvariable {ws} % whitespace -\def\simplestelwitruimtein% == snelle \stelwitruimtein[\s!default] - {\doifnot\currentwitruimte\v!geen\stelwitruimteopnieuwin - \dodostelwitruimtein} +\def\definewhitespacemethod[#1]#2{\setvalue{\??ws\??ws#1}{#2}} + +\definewhitespacemethod [\v!herstel] {} +\definewhitespacemethod [\v!vast] {\witruimteflexibelfalse} +\definewhitespacemethod [\v!flexibel] {\witruimteflexibeltrue} +\definewhitespacemethod [\v!regel] {\tussenwit \baselineskip} +\definewhitespacemethod [\v!halveregel] {\tussenwit.5\baselineskip} +\definewhitespacemethod [\v!geen] {\tussenwit \zeropoint} +\definewhitespacemethod [\v!groot] {\tussenwit \blankogrootmaat} +\definewhitespacemethod [\v!middel] {\tussenwit \blankomiddelmaat} +\definewhitespacemethod [\v!klein] {\tussenwit \blankokleinmaat} -\def\geenwitruimte% +\definewhitespacemethod [\s!default] {\stelwitruimteopnieuwin} + +\def\dowhitespacemethod#1% + {\executeifdefined{\??ws\??ws#1}{\tussenwit#1}\relax} + +\def\geenwitruimte {\ifdim\parskip>\zeropoint\relax \ifdim\lastskip=-\parskip \else @@ -1037,8 +1246,8 @@ \fi \fi} -\def\savecurrentwitruimte% - {\edef\restorecurrentwitruimte% +\def\savecurrentwitruimte + {\edef\restorecurrentwitruimte {\tussenwit\the\tussenwit \parskip\the\parskip \noexpand\def\noexpand\currentwitruimte{\currentwitruimte}% @@ -1406,11 +1615,11 @@ \s!default=>\setstrut, \s!unknown=>\setcharstrut\commalistelement]} -\def\setteststrut% +\def\setteststrut {\def\strutwidth{.8pt}% \setstrut} -\def\begstrut% +\def\begstrut {%relax\ifdim\ht\strutbox=\zeropoint\else \relax\ifcase\ht\strutbox\else \strut @@ -2153,7 +2362,7 @@ \let\mindermeldingen\dontcomplain -\definetwopasslist{\s!paragraph} +\definetwopasslist\s!paragraph \newcounter\nofraggedparagraphs @@ -2193,7 +2402,7 @@ \fi \else\ifinner \ifdubbelzijdig - \gettwopassdata{\s!paragraph}% + \gettwopassdata\s!paragraph \iftwopassdatafound \ifodd\twopassdata\relax#1\else#2\fi \else @@ -2584,8 +2793,20 @@ \def\steltolerantiein {\dosingleargument\dosteltolerantiein} -\def\woordrechts - {\groupedcommand{\hfill\hbox}{\parfillskip\zeropoint}} +% \def\woordrechts +% {\groupedcommand{\hfill\hbox}{\parfillskip\zeropoint}} + +\def\woordrechts % zie naw + {\groupedcommand + {\removeunwantedspaces + \hfill + \hskip\zeropoint % permit break, \allowbreak fails here + \strut + \hfill + \quad % decent spacing + \hbox} + {\parfillskip\zeropoint + \par}} %D \macros %D {pushindentation,popindentation} diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex index ab7a0df58..299dd86b5 100644 --- a/tex/context/base/core-tab.tex +++ b/tex/context/base/core-tab.tex @@ -581,7 +581,7 @@ %D \em Test for bracket: invoked by the keys \type{q} and %D \type{Q}. -\def\!tqTestForBracket% +\def\!tqTestForBracket {\ifx[\!tnext \!thx\!tqGetArgument \else @@ -2323,8 +2323,8 @@ \v!middel=>\OpenUp{1}{1}\def\LOW{\Lower7 }, \v!groot=>\OpenUp{2}{2}\def\LOW{\Lower8 }]% \doifelse\@@tiafstand\v!geen - {\chardef\TABLErowfactor0 } - {\chardef\TABLErowfactor2 }} + {\chardef\TABLErowfactor\zerocount} + {\chardef\TABLErowfactor\plustwo }} \def\dohandlebar {\ifmmode diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex index b84ce5e37..4923a290f 100644 --- a/tex/context/base/core-tbl.tex +++ b/tex/context/base/core-tbl.tex @@ -149,7 +149,10 @@ \newif \ifautotabulate \newif \ifsplittabulate \splittabulatetrue + \newif \ifhandletabulatepbreak \handletabulatepbreaktrue +\newif \iftabulatenopbreak \tabulatenopbreakfalse + \newif \iftabulateequal \newif \iftracetabulate \newif \ifframedtabulate @@ -248,7 +251,7 @@ % 1 = RC column raw RQ equal column raw % 2 = HC column hook HQ equal column hook \@EA\appendtoks \@EA&\@EA\hskip\pretabskip##&\to\!!toksa -\appendtoks\ignorespaces\to\!!toksa + \appendtoks \ignorespaces\to\!!toksa %\@EA\appendtoks\@EA\xdef\@EA\tabulatecolumn\@EA{\tabulatecolumns}\to\!!toksa \@EA\appendtoks\@EA\xdef\@EA\tabulatecolumn\@EA{\the\tabulatecolumns}\to\!!toksa \appendtoks \checktabulatehook\to\!!toksa @@ -386,8 +389,39 @@ \chardef\tabulatedimen\zerocount \settabulatepreamble}} +% \def\dogettabulatewidth(#1)% +% {\tabulatewidth#1\relax +% \ifnum\tabulatedimen=\plusone +% \global\advance\tabulatepwidth\tabulatewidth +% \fi +% \settabulatepreamble} + +% \def\dogettabulatewidth(#1)% +% {\doifelse{#1}\v!passend +% {\chardef\tabulatemodus\plusthree} +% {\tabulatewidth#1\relax}% +% \ifnum\tabulatedimen=\plusone +% \global\advance\tabulatepwidth\tabulatewidth +% \fi +% \settabulatepreamble} + +% \startbuffer +% \toplinebox{\framed[width=3cm,height=2cm]{tufte}} +% \stopbuffer +% \starttabulate[|p(fixed)|p|] +% \dorecurse{100}{\NC \getbuffer \NC test \par test \par \NC \NR} +% \stoptabulate +% \starttabulate[|p(fit)|p|] +% \dorecurse{100}{\NC \getbuffer \NC test \par test \par \NC \NR} +% \stoptabulate + \def\dogettabulatewidth(#1)% - {\tabulatewidth#1\relax + {\processallactionsinset + [#1]% + [\v!passend=>\chardef\tabulatemodus\plusthree, + \v!vast=>\chardef\tabulatemodus\plusthree + \tabulatenopbreaktrue, + \s!unknown=>\tabulatewidth#1\relax]% \ifnum\tabulatedimen=\plusone \global\advance\tabulatepwidth\tabulatewidth \fi @@ -435,6 +469,8 @@ \dodosettabulatepreamble{\bskip\tabulateraggedright }\eskip \or \dodosettabulatepreamble{\bskip\tabulateraggedleft }\eskip \or \dodosettabulatepreamble{\bskip\tabulateraggedcenter}\eskip \fi + \or % simple + \dodosettabulatepreamble \xbskip \xeskip \fi \futurelet\next\donexttabulate} @@ -455,11 +491,8 @@ \dp\tabulatebox\dp\strutbox \box\tabulatebox} -\def\dotabulatehook - {\getvalue{\@@tabhook@@\tabulatecolumn}} - -\def\dotabulatealign - {\getvalue{\@@tabalign@@\tabulatecolumn}} +\def\dotabulatehook {\getvalue{\@@tabhook@@ \tabulatecolumn}} +\def\dotabulatealign{\getvalue{\@@tabalign@@\tabulatecolumn}} \def\resettabulatepheight {\globallet\tabulateminplines\!!plusone @@ -473,17 +506,33 @@ \global\tabulatemaxpheight\scratchdimen \fi} +% \def\handletabulatepbreak +% {\TABLEnoalign +% {\ifhandletabulatepbreak \ifnum\tabulatemaxplines>\plusone +% \ifnum\tabulateminplines=\plusone +% \dotabulatenobreak +% \fi +% \doglobal\increment\tabulateminplines +% \ifnum\tabulateminplines=\tabulatemaxplines\relax +% \dotabulatenobreak +% \fi +% \fi \fi}} + \def\handletabulatepbreak {\TABLEnoalign - {\ifhandletabulatepbreak \ifnum\tabulatemaxplines>\plusone - \ifnum\tabulateminplines=\plusone - \dotabulatenobreak - \fi - \doglobal\increment\tabulateminplines - \ifnum\tabulateminplines=\tabulatemaxplines\relax + {\ifhandletabulatepbreak + \iftabulatenopbreak \dotabulatenobreak - \fi - \fi \fi}} + \else\ifnum\tabulatemaxplines>\plusone + \ifnum\tabulateminplines=\plusone + \dotabulatenobreak + \fi + \doglobal\increment\tabulateminplines + \ifnum\tabulateminplines=\tabulatemaxplines\relax + \dotabulatenobreak + \fi + \fi \fi + \fi}} %D \startbuffer %D \starttabulatie[|c|p|p|] @@ -494,7 +543,7 @@ %D \NC 4 \NC very true \NC as false as can be \NC\NR %D \NC 5 \NC \thinrules[n=5] \NC \thinrules[n=5] \NC\NR %D \NC 6 \NC \thinrules[n=3] \NC \thinrules[n=4] \NC\NR -%D \stoptabulate +%D \stoptabulatie %D \stopbuffer %D %D \typebuffer {\tracetabulatetrue\haalbuffer} @@ -787,6 +836,10 @@ \def\handletabulatedigits{\digits} +%D Beware, we cannot use \type {\unexpanded} on \type {\HL} +%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 @@ -818,7 +871,7 @@ \unexpanded \def\HQ{\tabulateequalcolumn 2}% \unexpanded \def\NG{\NC\handletabulatecharalign}% \unexpanded \def\ND{\NC\handletabulatedigits}% new, undocumented, test first - \unexpanded \def\HR % horizontal rule line (break untested) + \def\HR % horizontal rule line (break untested) {\TABLEnoalign {\ifnum\noftabulatelines=\totalnoftabulatelines \@EA\dotabulatenobreak @@ -843,11 +896,17 @@ {\iftolerantTABLEbreak\else \ifnum\noftabulatelines=\plusone \dotabulatenobreak - \else\ifnum\noftabulatelines=\minusnoftabulatelines - \ifnum\tabulatemaxplines<2 - \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 + \fi \fi \global\tabulatefirstflushedfalse}}% \let\HL\empty \let\SR\NR \let\AR\NR @@ -888,6 +947,12 @@ \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 @@ -898,7 +963,7 @@ \fi \dontcomplain \forgetall - \setbox0\vbox % outside if because of line counting + \setbox0\vbox % outside \if because of line counting {\footnotesenabledfalse \let\tabulateindent\!!zeropoint \trialtypesettingtrue % very important @@ -913,6 +978,8 @@ \divide\tabulatewidth \nofautotabulate\relax \fi \fi +\def\xbskip{\bskip}% +\def\xeskip{\eskip}% \ifsplittabulate \splittopskip\ht\strutbox \global\let\flushtabulatedindeed\empty @@ -966,7 +1033,7 @@ \let\minusnoftabulatelines\noftabulatelines \decrement\minusnoftabulatelines \doglobal\newcounter\noftabulatelines - \unexpanded \def\HL{\TABLEnoalign + \def\HL{\TABLEnoalign {\ifnum\noftabulatelines=\zerocount \@EA \FL\else \ifnum\noftabulatelines<\totalnoftabulatelines\relax\@EAEAEA\ML\else \@EAEAEA\LL\fi\fi}}% @@ -978,7 +1045,7 @@ \vskip\dp\strutbox \vskip\dp\strutbox}% \baselinecorrection}% - \unexpanded \def\FL{\TABLEnoalign + \def\FL{\TABLEnoalign {\ifinsidefloat\else \doifemptyvalue{\??tt\currenttabulate\c!voor} % no expansion {\tablebaselinecorrection}% @@ -988,7 +1055,7 @@ \tabulateruleseperator \prevdepth\dp\strutbox \dotabulatenobreak}}% - \unexpanded \def\ML{\TABLEnoalign + \def\ML{\TABLEnoalign {\tabulateruleseperator \tabulaterule \ifnum\noftabulatelines>\plusone @@ -999,7 +1066,7 @@ \fi \fi \tabulateruleseperator}}% - \unexpanded \def\LL{\TABLEnoalign + \def\LL{\TABLEnoalign {\dotabulatenobreak \tabulateruleseperator \dotabulatenobreak diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex index 54830c523..5cb9ad168 100644 --- a/tex/context/base/core-uti.tex +++ b/tex/context/base/core-uti.tex @@ -74,12 +74,48 @@ \def\writeutility {\write\uti} \def\writeutilitycommand#1{\write\uti{c \string#1}} -\def\immediatewriteutility {\immediate\writeutility} -\def\immediatewriteutilitycommand{\immediate\writeutilitycommand} +% less tokens +% +% \def\immediatewriteutility {\immediate\writeutility} +% \def\immediatewriteutilitycommand{\immediate\writeutilitycommand} +% +% more flexible (for overloading) + +\def\immediatewriteutility {\immediate\write\uti} +\def\immediatewriteutilitycommand#1{\immediate\write\uti{c \string#1}} + +% as in: + +\def\cwriteutility#1% + {\write\uti{\noexpand\checkedutility{\number\nofshipouts}{#1}}} + +\def\cwriteutilitycommand#1% + {\write\uti{\noexpand\checkedutility{\number\nofshipouts}{c \string#1}}} + +% \def\cimmediatewriteutility +% {\immediate\write\uti} +% +% \def\cimmediatewriteutilitycommand#1% +% {\immediate\write\uti{c \string#1}} + +\let\checkedutility\secondoftwoarguments + +\def\docheckedutility#1#2{\ifnum#1=\nofshipouts#2\fi} + +\prependtoks + \let\checkedutility\docheckedutility +\to \everybeforeshipout + +% Better use marks. + +\def\checkutilities + {\let\writeutility \cwriteutility + \let\writeutilitycommand \cwriteutilitycommand + %\let\immediatewriteutility \cimmediatewriteutility + %\let\immediatewriteutilitycommand\cimmediatewriteutilitycommand + \let\checkutilities \relax} -%\def\openutilities% -% {\immediate\openout\uti=\jobname.\f!inputextension -% \immediatewriteutilitycommand{\thisisutilityversion{\utilityversion}}} +% this trickery is used in s-pre-50 \def\openutilities {\immediate\openout\uti=\jobname.\f!inputextension @@ -87,9 +123,7 @@ \immediatewriteutilitycommand{\thisisutilityversion {\utilityversion}}} \def\closeutilities - {%\savenofsubpages - %\savenofpages - \immediate\closeout\uti % niet echt nodig + {\immediate\closeout\uti % niet echt nodig \reportutilityproblems % should be a message : \let\writeutilitycommand \gobbleoneargument @@ -257,7 +291,7 @@ % Saving the sort vector: -\def\savesortkeys% +\def\savesortkeys {\startnointerference \def\flushsortkey##1##2##3##4% {\convertargument{##1}{##2}{##3}{##4}\to\ascii diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex index ee3c057fd..1be4a50bf 100644 --- a/tex/context/base/core-ver.tex +++ b/tex/context/base/core-ver.tex @@ -774,7 +774,7 @@ \c!kleur=, \c!spatie=\v!uit, \c!pagina=\v!nee, - \c!tab=\v!aan, + \c!tab=\s!ascii, \c!optie=\v!geen, \c!palet=colorpretty, \c!tekst=\v!nee, @@ -1057,54 +1057,149 @@ %D setup values are inherited from display verbatim. %D The implementation of \type{\typefile} is straightforward: -\presettyping[\v!file][] - -\definecomplexorsimple\typefile - -\def\simpletypefile% - {\complextypefile[\v!file]} - +% \presettyping[\v!file][] +% +% \definecomplexorsimple\typefile +% +% \def\simpletypefile +% {\complextypefile[\v!file]} +% +% % \def\complextypefile[#1]#2% +% % {\getvalue{\??tp#1\c!voor}% +% % \doiflocfileelse{#2} +% % {\startopelkaar % includes \bgroup +% % \doifinset{\getvalue{\??tp#1\c!optie}}{\v!commandos,\v!schuin,\v!normaal} +% % {\setuptyping[#1][\c!optie=\v!geen]}% +% % \doifvalue{\??tp#1\c!optie}{\v!kleur} +% % {\expandafter\aftersplitstring#2\at.\to\prettyidentifier +% % \letvalue{\??tp#1\c!optie}=\prettyidentifier}% +% % \initializetyping{#1}% +% % \startverbatimcolor +% % \processfileverbatim{\pathplusfile\f!currentpath{#2}}% +% % \stopverbatimcolor +% % \stopopelkaar} % includes \egroup +% % {{\tttf[\makemessage{\m!verbatims}{1}{#2}]}% +% % \showmessage{\m!verbatims}{1}{#2}}% +% % \getvalue{\??tp#1\c!na}} +% % \def\complextypefile[#1]#2% % {\getvalue{\??tp#1\c!voor}% % \doiflocfileelse{#2} % {\startopelkaar % includes \bgroup % \doifinset{\getvalue{\??tp#1\c!optie}}{\v!commandos,\v!schuin,\v!normaal} % {\setuptyping[#1][\c!optie=\v!geen]}% -% \doifvalue{\??tp#1\c!optie}{\v!kleur} +% \doifvalue{\??tp#1\c!optie}\v!kleur % {\expandafter\aftersplitstring#2\at.\to\prettyidentifier -% \letvalue{\??tp#1\c!optie}=\prettyidentifier}% +% \letvalue{\??tp#1\c!optie}\prettyidentifier}% % \initializetyping{#1}% % \startverbatimcolor -% \processfileverbatim{\pathplusfile\f!currentpath{#2}}% +% \makelocreadfilename{#2}% +% \processfileverbatim\readfilename +% %\processfileverbatim{\pathplusfile\f!currentpath{#2}}% % \stopverbatimcolor % \stopopelkaar} % includes \egroup -% {{\tttf[\makemessage{\m!verbatims}{1}{#2}]}% -% \showmessage{\m!verbatims}{1}{#2}}% +% {\bgroup +% \expanded{\convertargument#2}\to\ascii +% \tttf[\makemessage\m!verbatims1\ascii]% +% \showmessage\m!verbatims1\ascii +% \egroup}% % \getvalue{\??tp#1\c!na}} -\def\complextypefile[#1]#2% +% new feature (not yet 100\% ok) +% +% \setuptyping[file][numbering=file] +% +% \typefile[start=2,nlines=3]{zapf} +% \typefile[start=continue,nlines=13]{zapf} +% \typefile{zapf} +% +% \setuptyping[file][numbering=line] +% +% \typefile[start=4,step=3]{zapf} +% \typefile{zapf} + +\presettyping[\v!file][] + +\def\typefile + {\dodoubleempty\dotypefile} + +\def\dotypefile[#1][#2]#3% + {\ifsecondargument + \dodotypefile[#1][#2]{#3}% + \else\iffirstargument + \doifassignmentelse{#1} + {\dodotypefile[\v!file][#1]{#3}} + {\dodotypefile[#1][]{#3}}% + \else + \dodotypefile[\v!file][]{#3}% + \fi\fi} + +\def\dosetuptypelinenumbering#1#2% + {\setuptyping[#1][\c!start=,\c!stop=,\c!stap=,\c!nregels=,#2]% + \doifelsevalue{\??tp#1\c!nummeren}\v!file + {\stelregelnummerenin[\c!methode=\v!file]% + \donetrue} + {\doifelsevalue{\??tp#1\c!nummeren}\v!regel + {% \stelregelnummerenin defaults start/step to 1/1, so we need + \doifvaluenothing{\??tp#1\c!start}{\setvalue{\??tp#1\c!start}{1}}% + \doifvaluenothing{\??tp#1\c!stap }{\setvalue{\??tp#1\c!stap }{1}}% + \stelregelnummerenin + [\c!methode=\v!type, + \c!start=\getvalue{\??tp#1\c!start}, + \c!stap=\getvalue{\??tp#1\c!stap}]% + \donetrue} + {\donefalse}}% + \ifdone + \def\beginofverbatimlines{\startregelnummeren}% + \def\endofverbatimlines {\stopregelnummeren }% + \fi} + +\def\dodotypefile[#1][#2]#3% {\getvalue{\??tp#1\c!voor}% - \doiflocfileelse{#2} + \doiflocfileelse{#3} {\startopelkaar % includes \bgroup + \dosetuptypelinenumbering{#1}{#2}% \doifinset{\getvalue{\??tp#1\c!optie}}{\v!commandos,\v!schuin,\v!normaal} {\setuptyping[#1][\c!optie=\v!geen]}% \doifvalue{\??tp#1\c!optie}\v!kleur - {\expandafter\aftersplitstring#2\at.\to\prettyidentifier + {\expandafter\aftersplitstring#3\at.\to\prettyidentifier \letvalue{\??tp#1\c!optie}\prettyidentifier}% \initializetyping{#1}% \startverbatimcolor - \makelocreadfilename{#2}% - \processfileverbatim\readfilename - %\processfileverbatim{\pathplusfile\f!currentpath{#2}}% + \makelocreadfilename{#3}% + \doifundefinedelse{\??tp#3\v!globaal\c!start} + {\scratchcounter\zerocount} + {\scratchcounter\getvalue{\??tp#3\v!globaal\c!start}}% + \advance\scratchcounter\plusone + \setxvalue{\??tp#3\v!globaal\c!start}{\the\scratchcounter}% + \doifelsevaluenothing{\??tp#1\c!start} + {\processfileverbatim\readfilename} + {\doifvalue{\??tp#1\c!start}\v!verder + {\setevalue{\??tp#1\c!start}% + {\getvalue{\??tp#3\v!globaal\c!start}}}% + \doifelsevaluenothing{\??tp#1\c!stop} + {\doifelsevaluenothing{\??tp#1\c!nregels} + {\processfileverbatim\readfilename} + {\scratchcounter\getvalue{\??tp#1\c!start}% + \advance\scratchcounter\getvalue{\??tp#1\c!nregels}% + \advance\scratchcounter\minusone + \setxvalue{\??tp#3\v!globaal\c!start}% + {\the\scratchcounter}% + \processfilelinesverbatim\readfilename + {\getvalue{\??tp#1\c!start}} + {\getvalue{\??tp#3\v!globaal\c!start}}}}% + {\processfilelinesverbatim\readfilename + {\getvalue{\??tp#1\c!start}} + {\getvalue{\??tp#1\c!stop }}}}% \stopverbatimcolor \stopopelkaar} % includes \egroup {\bgroup - \expanded{\convertargument#2}\to\ascii - \tttf[\makemessage\m!verbatims1\ascii]% + \expanded{\convertargument#3}\to\ascii + \tttf[\makemessage\m!verbatims1\ascii]% \showmessage\m!verbatims1\ascii \egroup}% \getvalue{\??tp#1\c!na}} - + %D \macros %D {filename} %D diff --git a/tex/context/base/enco-cyr.tex b/tex/context/base/enco-cyr.tex new file mode 100644 index 000000000..98ba9f518 --- /dev/null +++ b/tex/context/base/enco-cyr.tex @@ -0,0 +1,1259 @@ +%D \module +%D [ file=enco-cyr, +%D version=2003.01.24, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Cyrillic, +%D author=..., +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D The following kerning test is inspired by a test file +%D provided by Victor Figurnov. I hope he still recognizes +%D some bit and pieces. +%D +%D \starttyping +%D \setupoutput[pdftex] +%D +%D \setuplayout[middle] \noheaderandfooterlines +%D +%D \startMPenvironment[global] +%D \useregime[cyr] +%D \useencoding[cyr] +%D \mainlanguage[ru] +%D \enableregime[cp1251] +%D \setupbodyfont[cyr] +%D \stopMPenvironment +%D +%D \startbuffer +%D \starttabulate[|l|l|l|] +%D \NC \ruledhbox{Ãäå} \NC \ruledhbox{AV} \NC with kerning \NC \NR +%D \NC \ruledhbox{Ã{}ä{}å} \NC \ruledhbox{A{}V} \NC without kerning \NC \NR +%D \NC \ruledhbox{\tfd Ãäå} \NC \ruledhbox{\tfd AV} \NC with kerning \NC \NR +%D \NC \ruledhbox{\tfd Ã{}ä{}å} \NC \ruledhbox{\tfd A{}V} \NC without kerning \NC \NR +%D \stoptabulate +%D +%D \showkerning{Êàê ñäåëàòü äîêóìåíò} +%D \stopbuffer +%D +%D \starttext +%D +%D \title{Kerning test} +%D +%D \typebuffer +%D +%D \rm \subject{Serif font} \getbuffer +%D \ss \subject{SansSerif font} \getbuffer +%D \tt \subject{MonoSpacec font} \getbuffer +%D +%D \stoptext +%D \stoptyping + +%D We start with a fallback, define by HH, who assumes that +%D this is phonetic. + +\startencoding[default] + +\definecharacter cyrillicA {A} +\definecharacter cyrillica {a} +\definecharacter cyrillicB {B} +\definecharacter cyrillicb {b} +\definecharacter cyrillicV {V} +\definecharacter cyrillicv {v} +\definecharacter cyrillicG {G} +\definecharacter cyrillicg {g} +\definecharacter cyrillicD {D} +\definecharacter cyrillicd {d} +\definecharacter cyrillicE {E} +\definecharacter cyrillice {e} +\definecharacter cyrillicZH {ZH} +\definecharacter cyrilliczh {zh} +\definecharacter cyrillicZ {Z} +\definecharacter cyrillicz {z} +\definecharacter cyrillicI {I} +\definecharacter cyrillici {i} +\definecharacter cyrillicISHRT {ISHRT} +\definecharacter cyrillicishrt {ishrt} +\definecharacter cyrillicK {K} +\definecharacter cyrillick {k} +\definecharacter cyrillicL {L} +\definecharacter cyrillicl {l} +\definecharacter cyrillicM {M} +\definecharacter cyrillicm {m} +\definecharacter cyrillicN {N} +\definecharacter cyrillicn {n} +\definecharacter cyrillicO {O} +\definecharacter cyrillico {o} +\definecharacter cyrillicP {P} +\definecharacter cyrillicp {p} +\definecharacter cyrillicR {R} +\definecharacter cyrillicr {r} +\definecharacter cyrillicS {S} +\definecharacter cyrillics {s} +\definecharacter cyrillicT {T} +\definecharacter cyrillict {t} +\definecharacter cyrillicU {U} +\definecharacter cyrillicu {u} +\definecharacter cyrillicF {F} +\definecharacter cyrillicf {f} +\definecharacter cyrillicH {H} +\definecharacter cyrillich {h} +\definecharacter cyrillicC {C} +\definecharacter cyrillicc {c} +\definecharacter cyrillicCH {CH} +\definecharacter cyrillicch {ch} +\definecharacter cyrillicSH {SH} +\definecharacter cyrillicsh {sh} +\definecharacter cyrillicSHCH {SHCH} +\definecharacter cyrillicshch {shch} +\definecharacter cyrillicHRDSN {HRDSN} +\definecharacter cyrillichrdsn {hrdsn} +\definecharacter cyrillicERY {ERY} +\definecharacter cyrillicery {ery} +\definecharacter cyrillicSFTSN {SFTSN} +\definecharacter cyrillicsftsn {sftsn} +\definecharacter cyrillicEREV {EREV} +\definecharacter cyrillicerev {erev} +\definecharacter cyrillicYU {YU} +\definecharacter cyrillicyu {yu} +\definecharacter cyrillicYA {YA} +\definecharacter cyrillicya {ya} +\definecharacter cyrillicGUP {GUP} +\definecharacter cyrillicgup {gup} +\definecharacter cyrillicGHCRS {GHCRS} +\definecharacter cyrillicghcrs {ghcrs} +\definecharacter cyrillicDJE {DJE} +\definecharacter cyrillicdje {dje} +\definecharacter cyrillicTSHE {TSHE} +\definecharacter cyrillictshe {tshe} +\definecharacter cyrillicSHHA {SHHA} +\definecharacter cyrillicshha {shha} +\definecharacter cyrillicZHDSC {ZHDSC} +\definecharacter cyrilliczhdsc {zhdsc} +\definecharacter cyrillicZDSC {ZDSC} +\definecharacter cyrilliczdsc {zdsc} +\definecharacter cyrillicLJE {LJE} +\definecharacter cyrilliclje {lje} +\definecharacter cyrillicYI {YI} +\definecharacter cyrillicyi {yi} +\definecharacter cyrillicKDSC {KDSC} +\definecharacter cyrillickdsc {kdsc} +\definecharacter cyrillicKBEAK {KBEAK} +\definecharacter cyrillickbeak {kbeak} +\definecharacter cyrillicKVCRS {KVCRS} +\definecharacter cyrillickvcrs {kvcrs} +\definecharacter cyrillicAE {AE} +\definecharacter cyrillicae {ae} +\definecharacter cyrillicNDSC {NDSC} +\definecharacter cyrillicndsc {ndsc} +\definecharacter cyrillicNG {NG} +\definecharacter cyrillicng {ng} +\definecharacter cyrillicDZE {DZE} +\definecharacter cyrillicdze {dze} +\definecharacter cyrillicOTLD {OTLD} +\definecharacter cyrillicotld {otld} +\definecharacter cyrillicSDSC {SDSC} +\definecharacter cyrillicsdsc {sdsc} +\definecharacter cyrillicUSHRT {USHRT} +\definecharacter cyrillicushrt {ushrt} +\definecharacter cyrillicY {Y} +\definecharacter cyrillicy {y} +\definecharacter cyrillicYHCRS {YHCRS} +\definecharacter cyrillicyhcrs {yhcrs} +\definecharacter cyrillicHDSC {HDSC} +\definecharacter cyrillichdsc {hdsc} +\definecharacter cyrillicDZHE {DZHE} +\definecharacter cyrillicdzhe {dzhe} +\definecharacter cyrillicCHVCRS {CHVCRS} +\definecharacter cyrillicchvcrs {chvcrs} +\definecharacter cyrillicCHRDSC {CHRDSC} +\definecharacter cyrillicchrdsc {chrdsc} +\definecharacter cyrillicIE {IE} +\definecharacter cyrillicie {ie} +\definecharacter cyrillicSCHWA {SCHWA} +\definecharacter cyrillicschwa {schwa} +\definecharacter cyrillicNJE {NJE} +\definecharacter cyrillicnje {nje} +\definecharacter cyrillicYO {YO} +\definecharacter cyrillicyo {yo} +\definecharacter cyrillicII {II} +\definecharacter cyrillicii {ii} +\definecharacter cyrillicJE {JE} +\definecharacter cyrillicje {je} +\definecharacter cyrillicQ {Q} +\definecharacter cyrillicq {q} +\definecharacter cyrillicW {W} +\definecharacter cyrillicw {w} + +\stopencoding + +\startmapping[t2a] + +\resetcaserange 128 to 255 + +\definecasemaps 192 to 223 lc +32 uc 0 % base letters (russian) +\definecasemaps 224 to 255 lc 0 uc -32 + +\definecasemaps 128 to 156 lc +32 uc 0 % extra letters (cyrillic and old-slav) +\definecasemaps 160 to 188 lc 0 uc -32 + +\definecasemap 73 105 73 \definecasemap 105 105 73 % cyrillicII +\definecasemap 74 106 74 \definecasemap 106 106 74 % cyrillicJE +\definecasemap 81 113 81 \definecasemap 113 113 81 % cyrillicQ +\definecasemap 87 119 87 \definecasemap 119 119 87 % cyrillicW + +\stopmapping + +\startcoding[t2a] + +\definecharacter textgrave 0 +\definecharacter textacute 1 +\definecharacter textcircumflex 2 +\definecharacter texttilde 3 +\definecharacter textdiaeresis 4 +\definecharacter texthungarumlaut 5 +\definecharacter textring 6 +\definecharacter textcaron 7 +\definecharacter textbreve 8 +\definecharacter textmacron 9 +\definecharacter textdotaccent 10 +\definecharacter textcedilla 11 +\definecharacter textogonek 12 + +\definecharacter textcyrillicflex 18 +\definecharacter textcyrillicumlaut 19 +\definecharacter textcyrillicbreve 20 + +\definecharacter endash 21 +\definecharacter emdash 22 +\definecharacter emdash 22 + +\definecharacter textcompwordmark 23 +\definecharacter textvisiblespace 32 +\definecharacter textdollar 36 +\definecharacter textless 60 +\definecharacter textgreater 62 +\definecharacter textbackslash 92 +\definecharacter textasciicircum 94 +\definecharacter textunderscore 95 +\definecharacter textbraceleft 123 +\definecharacter textbar 124 +\definecharacter textbraceright 125 +\definecharacter textasciitilde 126 +\definecharacter textnumero 157 +\definecharacter textcurrency 158 +\definecharacter textsection 159 +\definecharacter textquotedbl 34 + +\definecharacter upperleftsinglesixquote 96 +\definecharacter upperleftsingleninequote 39 +\definecharacter upperleftsinglesixquote 16 +\definecharacter upperleftdoubleninequote 17 +\definecharacter lowerleftdoubleninequote 189 + +\definecharacter upperrightsinglesixquote 96 +\definecharacter upperrightsingleninequote 39 +\definecharacter upperrightsinglesixquote 16 +\definecharacter upperrightdoubleninequote 17 +\definecharacter lowerrightdoubleninequote 189 + +\definecharacter cyrillicpalochka 13 +\definecharacter cyrilliclangle 14 +\definecharacter cyrillicrangle 15 + +\definecharacter leftguillemot 190 +\definecharacter rightguillemot 191 +\definecharacter leftsubguillemot 190 +\definecharacter rightsubguillemot 191 + +\definecharacter dotlessi 25 +\definecharacter dotlessj 26 + +\definecharacter cyrillicA 192 +\definecharacter cyrillica 224 +\definecharacter cyrillicB 193 +\definecharacter cyrillicb 225 +\definecharacter cyrillicV 194 +\definecharacter cyrillicv 226 +\definecharacter cyrillicG 195 +\definecharacter cyrillicg 227 +\definecharacter cyrillicD 196 +\definecharacter cyrillicd 228 +\definecharacter cyrillicE 197 +\definecharacter cyrillice 229 +\definecharacter cyrillicZH 198 +\definecharacter cyrilliczh 230 +\definecharacter cyrillicZ 199 +\definecharacter cyrillicz 231 +\definecharacter cyrillicI 200 +\definecharacter cyrillici 232 +\definecharacter cyrillicISHRT 201 +\definecharacter cyrillicishrt 233 +\definecharacter cyrillicK 202 +\definecharacter cyrillick 234 +\definecharacter cyrillicL 203 +\definecharacter cyrillicl 235 +\definecharacter cyrillicM 204 +\definecharacter cyrillicm 236 +\definecharacter cyrillicN 205 +\definecharacter cyrillicn 237 +\definecharacter cyrillicO 206 +\definecharacter cyrillico 238 +\definecharacter cyrillicP 207 +\definecharacter cyrillicp 239 +\definecharacter cyrillicR 208 +\definecharacter cyrillicr 240 +\definecharacter cyrillicS 209 +\definecharacter cyrillics 241 +\definecharacter cyrillicT 210 +\definecharacter cyrillict 242 +\definecharacter cyrillicU 211 +\definecharacter cyrillicu 243 +\definecharacter cyrillicF 212 +\definecharacter cyrillicf 244 +\definecharacter cyrillicH 213 +\definecharacter cyrillich 245 +\definecharacter cyrillicC 214 +\definecharacter cyrillicc 246 +\definecharacter cyrillicCH 215 +\definecharacter cyrillicch 247 +\definecharacter cyrillicSH 216 +\definecharacter cyrillicsh 248 +\definecharacter cyrillicSHCH 217 +\definecharacter cyrillicshch 249 +\definecharacter cyrillicHRDSN 218 +\definecharacter cyrillichrdsn 250 +\definecharacter cyrillicERY 219 +\definecharacter cyrillicery 251 +\definecharacter cyrillicSFTSN 220 +\definecharacter cyrillicsftsn 252 +\definecharacter cyrillicEREV 221 +\definecharacter cyrillicerev 253 +\definecharacter cyrillicYU 222 +\definecharacter cyrillicyu 254 +\definecharacter cyrillicYA 223 +\definecharacter cyrillicya 255 +\definecharacter cyrillicGUP 128 +\definecharacter cyrillicgup 160 +\definecharacter cyrillicGHCRS 129 +\definecharacter cyrillicghcrs 161 +\definecharacter cyrillicDJE 130 +\definecharacter cyrillicdje 162 +\definecharacter cyrillicTSHE 131 +\definecharacter cyrillictshe 163 +\definecharacter cyrillicSHHA 132 +\definecharacter cyrillicshha 164 +\definecharacter cyrillicZHDSC 133 +\definecharacter cyrilliczhdsc 165 +\definecharacter cyrillicZDSC 134 +\definecharacter cyrilliczdsc 166 +\definecharacter cyrillicLJE 135 +\definecharacter cyrilliclje 167 +\definecharacter cyrillicYI 136 +\definecharacter cyrillicyi 168 +\definecharacter cyrillicKDSC 137 +\definecharacter cyrillickdsc 169 +\definecharacter cyrillicKBEAK 138 +\definecharacter cyrillickbeak 170 +\definecharacter cyrillicKVCRS 139 +\definecharacter cyrillickvcrs 171 +\definecharacter cyrillicAE 140 +\definecharacter cyrillicae 172 +\definecharacter cyrillicNDSC 141 +\definecharacter cyrillicndsc 173 +\definecharacter cyrillicNG 142 +\definecharacter cyrillicng 174 +\definecharacter cyrillicDZE 143 +\definecharacter cyrillicdze 175 +\definecharacter cyrillicOTLD 144 +\definecharacter cyrillicotld 176 +\definecharacter cyrillicSDSC 145 +\definecharacter cyrillicsdsc 177 +\definecharacter cyrillicUSHRT 146 +\definecharacter cyrillicushrt 178 +\definecharacter cyrillicY 147 +\definecharacter cyrillicy 179 +\definecharacter cyrillicYHCRS 148 +\definecharacter cyrillicyhcrs 180 +\definecharacter cyrillicHDSC 149 +\definecharacter cyrillichdsc 181 +\definecharacter cyrillicDZHE 150 +\definecharacter cyrillicdzhe 182 +\definecharacter cyrillicCHVCRS 151 +\definecharacter cyrillicchvcrs 183 +\definecharacter cyrillicCHRDSC 152 +\definecharacter cyrillicchrdsc 184 +\definecharacter cyrillicIE 153 +\definecharacter cyrillicie 185 +\definecharacter cyrillicSCHWA 154 +\definecharacter cyrillicschwa 186 +\definecharacter cyrillicNJE 155 +\definecharacter cyrillicnje 187 +\definecharacter cyrillicYO 156 +\definecharacter cyrillicyo 188 +\definecharacter cyrillicII 73 +\definecharacter cyrillicii 105 +\definecharacter cyrillicJE 74 +\definecharacter cyrillicje 106 +\definecharacter cyrillicQ 81 +\definecharacter cyrillicq 113 +\definecharacter cyrillicW 87 +\definecharacter cyrillicw 119 + +% \defineaccentforchar " ^^c5 {\cyrillicYO} +% \defineaccentforchar " ^^e5 {\cyrillicyo} +% \defineaccentforchar U ^^c8 {\cyrillicISHRT} +% \defineaccentforchar U ^^e8 {\cyrillicishrt} +% \defineaccentforchar " ^^49 {\cyrillicYI} +% \defineaccentforchar " ^^69 {\cyrillicyi} +% \defineaccentforchar c ^^c7 {\cyrillicZDSC} +% \defineaccentforchar c ^^e7 {\cyrilliczdsc} +% \defineaccentforchar k ^^d1 {\cyrillicSDSC} +% \defineaccentforchar k ^^f1 {\cyrillicsdsc} +% \defineaccentforchar U ^^d3 {\cyrillicUSHRT} +% \defineaccentforchar U ^^f3 {\cyrillicushrt} + +\definecharacter textperthousand {\%\char 24 } +\definecharacter textpertenthousand {\%\char 24\char 24 } + +\stopcoding + +\startmapping[t2b] + +\resetcaserange 128 to 255 + +\definecasemaps 192 to 223 lc +32 uc 0 % base letters (russian) +\definecasemaps 224 to 255 lc 0 uc -32 + +\definecasemaps 128 to 156 lc +32 uc 0 % extra letters (cyrillic and old-slav) +\definecasemaps 160 to 188 lc 0 uc -32 + +\definecasemap 73 105 73 \definecasemap 105 105 73 % cyrillicII +\definecasemap 74 106 74 \definecasemap 106 106 74 % cyrillicJE +\definecasemap 81 113 81 \definecasemap 113 113 81 % cyrillicQ +\definecasemap 83 115 83 \definecasemap 115 115 83 % cyrillicDZE +\definecasemap 87 119 87 \definecasemap 119 119 87 % cyrillicW + +\stopmapping + +\startcoding[t2b] + +\definecharacter textgrave 0 +\definecharacter textacute 1 +\definecharacter textcircumflex 2 +\definecharacter texttilde 3 +\definecharacter textdiaeresis 4 +\definecharacter texthungarumlaut 5 +\definecharacter textring 6 +\definecharacter textcaron 7 +\definecharacter textbreve 8 +\definecharacter textmacron 9 +\definecharacter textdotaccent 10 +\definecharacter textcedilla 11 +\definecharacter textogonek 12 + +\definecharacter textcyrillicflex 18 +\definecharacter textcyrillicumlaut 19 +\definecharacter textcyrillicbreve 20 + +\definecharacter endash 21 +\definecharacter emdash 22 + +\definecharacter textcompwordmark 23 +\definecharacter textvisiblespace 32 +\definecharacter textdollar 36 +\definecharacter textless 60 +\definecharacter textgreater 62 +\definecharacter textbackslash 92 +\definecharacter textasciicircum 94 +\definecharacter textunderscore 95 +\definecharacter textbraceleft 123 +\definecharacter textbar 124 +\definecharacter textbraceright 125 +\definecharacter textasciitilde 126 +\definecharacter textnumero 157 +\definecharacter textcurrency 158 +\definecharacter textsection 159 +\definecharacter textquotedbl 34 + +\definecharacter upperleftsinglesixquote 96 +\definecharacter upperleftsingleninequote 39 +\definecharacter upperleftsinglesixquote 16 +\definecharacter upperleftdoubleninequote 17 +\definecharacter lowerleftdoubleninequote 189 + +\definecharacter upperrightsinglesixquote 96 +\definecharacter upperrightsingleninequote 39 +\definecharacter upperrightsinglesixquote 16 +\definecharacter upperrightdoubleninequote 17 +\definecharacter lowerrightdoubleninequote 189 + +\definecharacter cyrillicpalochka 13 +\definecharacter cyrilliclangle 14 +\definecharacter cyrillicrangle 15 + +\definecharacter leftguillemot 190 +\definecharacter rightguillemot 191 +\definecharacter leftsubguillemot 190 +\definecharacter rightsubguillemot 191 + +\definecharacter dotlessi 25 +\definecharacter dotlessj 26 + +\definecharacter cyrillicA 192 +\definecharacter cyrillica 224 +\definecharacter cyrillicB 193 +\definecharacter cyrillicb 225 +\definecharacter cyrillicV 194 +\definecharacter cyrillicv 226 +\definecharacter cyrillicG 195 +\definecharacter cyrillicg 227 +\definecharacter cyrillicD 196 +\definecharacter cyrillicd 228 +\definecharacter cyrillicE 197 +\definecharacter cyrillice 229 +\definecharacter cyrillicZH 198 +\definecharacter cyrilliczh 230 +\definecharacter cyrillicZ 199 +\definecharacter cyrillicz 231 +\definecharacter cyrillicI 200 +\definecharacter cyrillici 232 +\definecharacter cyrillicISHRT 201 +\definecharacter cyrillicishrt 233 +\definecharacter cyrillicK 202 +\definecharacter cyrillick 234 +\definecharacter cyrillicL 203 +\definecharacter cyrillicl 235 +\definecharacter cyrillicM 204 +\definecharacter cyrillicm 236 +\definecharacter cyrillicN 205 +\definecharacter cyrillicn 237 +\definecharacter cyrillicO 206 +\definecharacter cyrillico 238 +\definecharacter cyrillicP 207 +\definecharacter cyrillicp 239 +\definecharacter cyrillicR 208 +\definecharacter cyrillicr 240 +\definecharacter cyrillicS 209 +\definecharacter cyrillics 241 +\definecharacter cyrillicT 210 +\definecharacter cyrillict 242 +\definecharacter cyrillicU 211 +\definecharacter cyrillicu 243 +\definecharacter cyrillicF 212 +\definecharacter cyrillicf 244 +\definecharacter cyrillicH 213 +\definecharacter cyrillich 245 +\definecharacter cyrillicC 214 +\definecharacter cyrillicc 246 +\definecharacter cyrillicCH 215 +\definecharacter cyrillicch 247 +\definecharacter cyrillicSH 216 +\definecharacter cyrillicsh 248 +\definecharacter cyrillicSHCH 217 +\definecharacter cyrillicshch 249 +\definecharacter cyrillicHRDSN 218 +\definecharacter cyrillichrdsn 250 +\definecharacter cyrillicERY 219 +\definecharacter cyrillicery 251 +\definecharacter cyrillicSFTSN 220 +\definecharacter cyrillicsftsn 252 +\definecharacter cyrillicEREV 221 +\definecharacter cyrillicerev 253 +\definecharacter cyrillicYU 222 +\definecharacter cyrillicyu 254 +\definecharacter cyrillicYA 223 +\definecharacter cyrillicya 255 +\definecharacter cyrillicGDSCHCRS 128 +\definecharacter cyrillicgdschcrs 160 +\definecharacter cyrillicGHCRS 129 +\definecharacter cyrillicghcrs 161 +\definecharacter cyrillicGDSC 130 +\definecharacter cyrillicgdsc 162 +\definecharacter cyrillicGHK 131 +\definecharacter cyrillicghk 163 +\definecharacter cyrillicSHHA 132 +\definecharacter cyrillicshha 164 +\definecharacter cyrillicZHDSC 133 +\definecharacter cyrilliczhdsc 165 +\definecharacter cyrillicDELTA 134 +\definecharacter cyrillicdelta 166 +\definecharacter cyrillicABHDZE 135 +\definecharacter cyrillicabhdze 167 +\definecharacter cyrillicLJE 136 +\definecharacter cyrilliclje 168 +\definecharacter cyrillicKDSC 137 +\definecharacter cyrillickdsc 169 +\definecharacter cyrillicLDSC 138 +\definecharacter cyrillicldsc 170 +\definecharacter cyrillicKHK 139 +\definecharacter cyrillickhk 171 +\definecharacter cyrillicLHK 140 +\definecharacter cyrilliclhk 172 +\definecharacter cyrillicNDSC 141 +\definecharacter cyrillicndsc 173 +\definecharacter cyrillicNG 142 +\definecharacter cyrillicng 174 +\definecharacter cyrillicNHK 143 +\definecharacter cyrillicnhk 175 +\definecharacter cyrillicOTLD 144 +\definecharacter cyrillicotld 176 +\definecharacter cyrillicSACRS 145 +\definecharacter cyrillicsacrs 177 +\definecharacter cyrillicUSHRT 146 +\definecharacter cyrillicushrt 178 +\definecharacter cyrillicY 147 +\definecharacter cyrillicy 179 +\definecharacter cyrillicHHCRS 148 +\definecharacter cyrillichhcrs 180 +\definecharacter cyrillicHDSC 149 +\definecharacter cyrillichdsc 181 +\definecharacter cyrillicHHK 150 +\definecharacter cyrillichhk 182 +\definecharacter cyrillicCHLDSC 151 +\definecharacter cyrillicchldsc 183 +\definecharacter cyrillicCHRDSC 152 +\definecharacter cyrillicchrdsc 184 +\definecharacter cyrillicNJE 153 +\definecharacter cyrillicnje 185 +\definecharacter cyrillicSCHWA 154 +\definecharacter cyrillicschwa 186 +\definecharacter cyrillicEPS 155 +\definecharacter cyrilliceps 187 +\definecharacter cyrillicYO 156 +\definecharacter cyrillicyo 188 +\definecharacter cyrillicII 73 +\definecharacter cyrillicii 105 +\definecharacter cyrillicJE 74 +\definecharacter cyrillicje 106 +\definecharacter cyrillicQ 81 +\definecharacter cyrillicq 113 +\definecharacter cyrillicDZE 83 +\definecharacter cyrillicdze 115 +\definecharacter cyrillicW 87 +\definecharacter cyrillicw 119 + +% \defineaccentforchar " ^^c5 {\cyrillicYO} +% \defineaccentforchar " ^^e5 {\cyrillicyo} +% \defineaccentforchar U ^^c8 {\cyrillicISHRT} +% \defineaccentforchar U ^^e8 {\cyrillicishrt} +% \defineaccentforchar U ^^d3 {\cyrillicUSHRT} +% \defineaccentforchar U ^^f3 {\cyrillicushrt} + +% \definecharacter textperthousand {\%\char 24 } +% \definecharacter textpertenthousand {\%\char 24\char 24 } + +\stopcoding + +\startmapping[t2c] + +\resetcaserange 128 to 255 + +\definecasemaps 192 to 223 lc +32 uc 0 % base letters (russian) +\definecasemaps 224 to 255 lc 0 uc -32 + +\definecasemaps 128 to 156 lc +32 uc 0 % extra letters (cyrillic and old-slav) +\definecasemaps 160 to 188 lc 0 uc -32 + +\definecasemap 73 105 73 \definecasemap 105 105 73 % cyrillicII +\definecasemap 74 106 74 \definecasemap 106 106 74 % cyrillicJE +\definecasemap 81 113 81 \definecasemap 113 113 81 % cyrillicQ +\definecasemap 83 115 83 \definecasemap 115 115 83 % cyrillicDZE +\definecasemap 87 119 87 \definecasemap 119 119 87 % cyrillicW + +\stopmapping + +\startcoding[t2c] + +\definecharacter textgrave 0 +\definecharacter textacute 1 +\definecharacter textcircumflex 2 +\definecharacter texttilde 3 +\definecharacter textdiaeresis 4 +\definecharacter texthungarumlaut 5 +\definecharacter textring 6 +\definecharacter textcaron 7 +\definecharacter textbreve 8 +\definecharacter textmacron 9 +\definecharacter textdotaccent 10 +\definecharacter textcedilla 11 +\definecharacter textogonek 12 + +\definecharacter textcyrillicflex 18 +\definecharacter textcyrillicumlaut 19 +\definecharacter textcyrillicbreve 20 + +\definecharacter endash 21 +\definecharacter emdash 22 +\definecharacter emdash 22 + +\definecharacter textcompwordmark 23 +\definecharacter textvisiblespace 32 +\definecharacter textdollar 36 +\definecharacter textless 60 +\definecharacter textgreater 62 +\definecharacter textbackslash 92 +\definecharacter textasciicircum 94 +\definecharacter textunderscore 95 +\definecharacter textbraceleft 123 +\definecharacter textbar 124 +\definecharacter textbraceright 125 +\definecharacter textasciitilde 126 +\definecharacter textnumero 157 +\definecharacter textcurrency 158 +\definecharacter textsection 159 +\definecharacter textquotedbl 34 + +\definecharacter cyrillicpalochka 13 +\definecharacter cyrilliclangle 14 +\definecharacter cyrillicrangle 15 + +\definecharacter leftguillemot 190 +\definecharacter rightguillemot 191 +\definecharacter leftsubguillemot 190 +\definecharacter rightsubguillemot 191 + +\definecharacter upperleftsinglesixquote 96 +\definecharacter upperleftsingleninequote 39 +\definecharacter upperleftsinglesixquote 16 +\definecharacter upperleftdoubleninequote 17 +\definecharacter lowerleftdoubleninequote 189 + +\definecharacter upperrightsinglesixquote 96 +\definecharacter upperrightsingleninequote 39 +\definecharacter upperrightsinglesixquote 16 +\definecharacter upperrightdoubleninequote 17 +\definecharacter lowerrightdoubleninequote 189 + +\definecharacter dotlessi 25 +\definecharacter dotlessj 26 + +\definecharacter cyrillicA 192 +\definecharacter cyrillica 224 +\definecharacter cyrillicB 193 +\definecharacter cyrillicb 225 +\definecharacter cyrillicV 194 +\definecharacter cyrillicv 226 +\definecharacter cyrillicG 195 +\definecharacter cyrillicg 227 +\definecharacter cyrillicD 196 +\definecharacter cyrillicd 228 +\definecharacter cyrillicE 197 +\definecharacter cyrillice 229 +\definecharacter cyrillicZH 198 +\definecharacter cyrilliczh 230 +\definecharacter cyrillicZ 199 +\definecharacter cyrillicz 231 +\definecharacter cyrillicI 200 +\definecharacter cyrillici 232 +\definecharacter cyrillicISHRT 201 +\definecharacter cyrillicishrt 233 +\definecharacter cyrillicK 202 +\definecharacter cyrillick 234 +\definecharacter cyrillicL 203 +\definecharacter cyrillicl 235 +\definecharacter cyrillicM 204 +\definecharacter cyrillicm 236 +\definecharacter cyrillicN 205 +\definecharacter cyrillicn 237 +\definecharacter cyrillicO 206 +\definecharacter cyrillico 238 +\definecharacter cyrillicP 207 +\definecharacter cyrillicp 239 +\definecharacter cyrillicR 208 +\definecharacter cyrillicr 240 +\definecharacter cyrillicS 209 +\definecharacter cyrillics 241 +\definecharacter cyrillicT 210 +\definecharacter cyrillict 242 +\definecharacter cyrillicU 211 +\definecharacter cyrillicu 243 +\definecharacter cyrillicF 212 +\definecharacter cyrillicf 244 +\definecharacter cyrillicH 213 +\definecharacter cyrillich 245 +\definecharacter cyrillicC 214 +\definecharacter cyrillicc 246 +\definecharacter cyrillicCH 215 +\definecharacter cyrillicch 247 +\definecharacter cyrillicSH 216 +\definecharacter cyrillicsh 248 +\definecharacter cyrillicSHCH 217 +\definecharacter cyrillicshch 249 +\definecharacter cyrillicHRDSN 218 +\definecharacter cyrillichrdsn 250 +\definecharacter cyrillicERY 219 +\definecharacter cyrillicery 251 +\definecharacter cyrillicSFTSN 220 +\definecharacter cyrillicsftsn 252 +\definecharacter cyrillicEREV 221 +\definecharacter cyrillicerev 253 +\definecharacter cyrillicYU 222 +\definecharacter cyrillicyu 254 +\definecharacter cyrillicYA 223 +\definecharacter cyrillicya 255 +\definecharacter cyrillicPHK 128 +\definecharacter cyrillicphk 160 +\definecharacter cyrillicTETSE 129 +\definecharacter cyrillictetse 161 +\definecharacter cyrillicTDSC 130 +\definecharacter cyrillictdsc 162 +\definecharacter cyrillicGHK 131 +\definecharacter cyrillicghk 163 +\definecharacter cyrillicSHHA 132 +\definecharacter cyrillicshha 164 +\definecharacter cyrillicRDSC 133 +\definecharacter cyrillicrdsc 165 +\definecharacter cyrillicRTICK 134 +\definecharacter cyrillicrtick 166 +\definecharacter cyrillicABHDZE 135 +\definecharacter cyrillicabhdze 167 +\definecharacter cyrillicMDSC 136 +\definecharacter cyrillicmdsc 168 +\definecharacter cyrillicKDSC 137 +\definecharacter cyrillickdsc 169 +\definecharacter cyrillicLDSC 138 +\definecharacter cyrillicldsc 170 +\definecharacter cyrillicKHCRS 139 +\definecharacter cyrillickhcrs 171 +\definecharacter cyrillicLHK 140 +\definecharacter cyrilliclhk 172 +\definecharacter cyrillicNDSC 141 +\definecharacter cyrillicndsc 173 +\definecharacter cyrillicMHK 142 +\definecharacter cyrillicmhk 174 +\definecharacter cyrillicNHK 143 +\definecharacter cyrillicnhk 175 +\definecharacter cyrillicOTLD 144 +\definecharacter cyrillicotld 176 +\definecharacter cyrillicABHCH 145 +\definecharacter cyrillicabhch 177 +\definecharacter cyrillicABHCHDSC 146 +\definecharacter cyrillicabhchdsc 178 +\definecharacter cyrillicSEMISFTSN 147 +\definecharacter cyrillicsemisftsn 179 +\definecharacter cyrillicISHRTDSC 148 +\definecharacter cyrillicishrtdsc 180 +\definecharacter cyrillicHDSC 149 +\definecharacter cyrillichdsc 181 +\definecharacter cyrillicDZHE 150 +\definecharacter cyrillicdzhe 182 +\definecharacter cyrillicABHHA 151 +\definecharacter cyrillicabhha 183 +\definecharacter cyrillicCHRDSC 152 +\definecharacter cyrillicchrdsc 184 +\definecharacter cyrillicNLHK 153 +\definecharacter cyrillicnlhk 185 +\definecharacter cyrillicSCHWA 154 +\definecharacter cyrillicschwa 186 +\definecharacter cyrillicRHK 155 +\definecharacter cyrillicrhk 187 +\definecharacter cyrillicYO 156 +\definecharacter cyrillicyo 188 +\definecharacter cyrillicII 73 +\definecharacter cyrillicii 105 +\definecharacter cyrillicJE 74 +\definecharacter cyrillicje 106 +\definecharacter cyrillicQ 81 +\definecharacter cyrillicq 113 +\definecharacter cyrillicDZE 83 +\definecharacter cyrillicdze 115 +\definecharacter cyrillicW 87 +\definecharacter cyrillicw 119 + +% \defineaccentforchar " ^^c5 {\cyrillicYO} +% \defineaccentforchar " ^^e5 {\cyrillicyo} +% \defineaccentforchar U ^^c8 {\cyrillicISHRT } +% \defineaccentforchar U ^^e8 {\cyrillicishrt } +% \defineaccentforchar k ^^91 {\cyrillicABHCHDSC} +% \defineaccentforchar k ^^b1 {\cyrillicabhchdsc} +% +% \definecharacter textperthousand {\%\char 24 } +% \definecharacter textpertenthousand {\%\char 24\char 24 } + +\stopcoding + +\startmapping[x2] + +\resetcaserange 0 to 255 + +\definecasemaps 192 to 223 lc +32 uc 0 % base letters (russian) +\definecasemaps 224 to 255 lc 0 uc -32 + +\definecasemaps 128 to 156 lc +32 uc 0 % extra letters (cyrillic and old-slav) +\definecasemaps 160 to 188 lc 0 uc -32 + +\definecasemaps 65 to 90 lc +32 uc 0 % more extra letters (cyrillic and old-slav) +\definecasemaps 97 to 122 lc 0 uc -32 + +\definecasemap 28 29 28 \definecasemap 29 29 28 % cyrillicNLHK +\definecasemap 30 31 30 \definecasemap 31 31 30 % cyrillicDELTA + +\stopmapping + +\startcoding[x2] + +\definecharacter endash 21 +\definecharacter emdash 22 +\definecharacter emdash 22 + +\definecharacter textcompwordmark 23 +\definecharacter textvisiblespace 32 +\definecharacter textdollar 36 +\definecharacter textless 60 +\definecharacter textgreater 62 +\definecharacter textbackslash 92 +\definecharacter textasciicircum 94 +\definecharacter textunderscore 95 +\definecharacter textbraceleft 123 +\definecharacter textbar 124 +\definecharacter textbraceright 125 +\definecharacter textasciitilde 126 +\definecharacter textnumero 157 +\definecharacter textcurrency 158 +\definecharacter textsection 159 +\definecharacter textquotedbl 34 + +\definecharacter cyrillicpalochka 13 +\definecharacter cyrilliclangle 14 +\definecharacter cyrillicrangle 15 + +\definecharacter leftguillemot 190 +\definecharacter rightguillemot 191 +\definecharacter leftsubguillemot 190 +\definecharacter rightsubguillemot 191 + +\definecharacter upperleftsinglesixquote 96 +\definecharacter upperleftsingleninequote 39 +\definecharacter upperleftsinglesixquote 16 +\definecharacter upperleftdoubleninequote 17 +\definecharacter lowerleftdoubleninequote 189 + +\definecharacter upperrightsinglesixquote 96 +\definecharacter upperrightsingleninequote 39 +\definecharacter upperrightsinglesixquote 16 +\definecharacter upperrightdoubleninequote 17 +\definecharacter lowerrightdoubleninequote 189 + +\definecharacter cyrillicA 192 +\definecharacter cyrillica 224 +\definecharacter cyrillicB 193 +\definecharacter cyrillicb 225 +\definecharacter cyrillicV 194 +\definecharacter cyrillicv 226 +\definecharacter cyrillicG 195 +\definecharacter cyrillicg 227 +\definecharacter cyrillicD 196 +\definecharacter cyrillicd 228 +\definecharacter cyrillicE 197 +\definecharacter cyrillice 229 +\definecharacter cyrillicZH 198 +\definecharacter cyrilliczh 230 +\definecharacter cyrillicZ 199 +\definecharacter cyrillicz 231 +\definecharacter cyrillicI 200 +\definecharacter cyrillici 232 +\definecharacter cyrillicISHRT 201 +\definecharacter cyrillicishrt 233 +\definecharacter cyrillicK 202 +\definecharacter cyrillick 234 +\definecharacter cyrillicL 203 +\definecharacter cyrillicl 235 +\definecharacter cyrillicM 204 +\definecharacter cyrillicm 236 +\definecharacter cyrillicN 205 +\definecharacter cyrillicn 237 +\definecharacter cyrillicO 206 +\definecharacter cyrillico 238 +\definecharacter cyrillicP 207 +\definecharacter cyrillicp 239 +\definecharacter cyrillicR 208 +\definecharacter cyrillicr 240 +\definecharacter cyrillicS 209 +\definecharacter cyrillics 241 +\definecharacter cyrillicT 210 +\definecharacter cyrillict 242 +\definecharacter cyrillicU 211 +\definecharacter cyrillicu 243 +\definecharacter cyrillicF 212 +\definecharacter cyrillicf 244 +\definecharacter cyrillicH 213 +\definecharacter cyrillich 245 +\definecharacter cyrillicC 214 +\definecharacter cyrillicc 246 +\definecharacter cyrillicCH 215 +\definecharacter cyrillicch 247 +\definecharacter cyrillicSH 216 +\definecharacter cyrillicsh 248 +\definecharacter cyrillicSHCH 217 +\definecharacter cyrillicshch 249 +\definecharacter cyrillicHRDSN 218 +\definecharacter cyrillichrdsn 250 +\definecharacter cyrillicERY 219 +\definecharacter cyrillicery 251 +\definecharacter cyrillicSFTSN 220 +\definecharacter cyrillicsftsn 252 +\definecharacter cyrillicEREV 221 +\definecharacter cyrillicerev 253 +\definecharacter cyrillicYU 222 +\definecharacter cyrillicyu 254 +\definecharacter cyrillicYA 223 +\definecharacter cyrillicya 255 +\definecharacter cyrillicGUP 128 +\definecharacter cyrillicgup 160 +\definecharacter cyrillicGHCRS 129 +\definecharacter cyrillicghcrs 161 +\definecharacter cyrillicGDSC 130 +\definecharacter cyrillicgdsc 162 +\definecharacter cyrillicGHK 131 +\definecharacter cyrillicghk 163 +\definecharacter cyrillicSHHA 132 +\definecharacter cyrillicshha 164 +\definecharacter cyrillicZHDSC 133 +\definecharacter cyrilliczhdsc 165 +\definecharacter cyrillicZDSC 134 +\definecharacter cyrilliczdsc 166 +\definecharacter cyrillicABHDZE 135 +\definecharacter cyrillicabhdze 167 +\definecharacter cyrillicYI 136 +\definecharacter cyrillicyi 168 +\definecharacter cyrillicKDSC 137 +\definecharacter cyrillickdsc 169 +\definecharacter cyrillicKBEAK 138 +\definecharacter cyrillickbeak 170 +\definecharacter cyrillicKHK 139 +\definecharacter cyrillickhk 171 +\definecharacter cyrillicLHK 140 +\definecharacter cyrilliclhk 172 +\definecharacter cyrillicNDSC 141 +\definecharacter cyrillicndsc 173 +\definecharacter cyrillicNG 142 +\definecharacter cyrillicng 174 +\definecharacter cyrillicNHK 143 +\definecharacter cyrillicnhk 175 +\definecharacter cyrillicOTLD 144 +\definecharacter cyrillicotld 176 +\definecharacter cyrillicSDSC 145 +\definecharacter cyrillicsdsc 177 +\definecharacter cyrillicUSHRT 146 +\definecharacter cyrillicushrt 178 +\definecharacter cyrillicY 147 +\definecharacter cyrillicy 179 +\definecharacter cyrillicYHCRS 148 +\definecharacter cyrillicyhcrs 180 +\definecharacter cyrillicHDSC 149 +\definecharacter cyrillichdsc 181 +\definecharacter cyrillicHHK 150 +\definecharacter cyrillichhk 182 +\definecharacter cyrillicCHLDSC 151 +\definecharacter cyrillicchldsc 183 +\definecharacter cyrillicCHRDSC 152 +\definecharacter cyrillicchrdsc 184 +\definecharacter cyrillicIE 153 +\definecharacter cyrillicie 185 +\definecharacter cyrillicSCHWA 154 +\definecharacter cyrillicschwa 186 +\definecharacter cyrillicEPS 155 +\definecharacter cyrilliceps 187 +\definecharacter cyrillicYO 156 +\definecharacter cyrillicyo 188 +\definecharacter cyrillicAE 65 +\definecharacter cyrillicae 97 +\definecharacter cyrillicDJE 66 +\definecharacter cyrillicdje 98 +\definecharacter cyrillicTSHE 67 +\definecharacter cyrillictshe 99 +\definecharacter cyrillicABHCH 68 +\definecharacter cyrillicabhch 100 +\definecharacter cyrillicABHCHDSC 69 +\definecharacter cyrillicabhchdsc 101 +\definecharacter cyrillicKVCRS 70 +\definecharacter cyrillickvcrs 102 +\definecharacter cyrillicKHCRS 71 +\definecharacter cyrillickhcrs 103 +\definecharacter cyrillicLDSC 72 +\definecharacter cyrillicldsc 104 +\definecharacter cyrillicII 73 +\definecharacter cyrillicii 105 +\definecharacter cyrillicJE 74 +\definecharacter cyrillicje 106 +\definecharacter cyrillicLJE 75 +\definecharacter cyrilliclje 107 +\definecharacter cyrillicMDSC 76 +\definecharacter cyrillicmdsc 108 +\definecharacter cyrillicNJE 77 +\definecharacter cyrillicnje 109 +\definecharacter cyrillicABHHA 78 +\definecharacter cyrillicabhha 110 +\definecharacter cyrillicPHK 79 +\definecharacter cyrillicphk 111 +\definecharacter cyrillicRDSC 80 +\definecharacter cyrillicrdsc 112 +\definecharacter cyrillicQ 81 +\definecharacter cyrillicq 113 +\definecharacter cyrillicTDSC 82 +\definecharacter cyrillictdsc 114 +\definecharacter cyrillicDZE 83 +\definecharacter cyrillicdze 115 +\definecharacter cyrillicTETSE 84 +\definecharacter cyrillictetse 116 +\definecharacter cyrillicDZHE 85 +\definecharacter cyrillicdzhe 117 +\definecharacter cyrillicCHVCRS 86 +\definecharacter cyrillicchvcrs 118 +\definecharacter cyrillicW 87 +\definecharacter cyrillicw 119 +\definecharacter cyrillicYAT 88 +\definecharacter cyrillicyat 120 +\definecharacter cyrillicBYUS 89 +\definecharacter cyrillicbyus 121 +\definecharacter cyrillicIZH 90 +\definecharacter cyrillicizh 122 +\definecharacter cyrillicNLHK 28 +\definecharacter cyrillicnlhk 29 +\definecharacter cyrillicDELTA 30 +\definecharacter cyrillicdelta 31 + +% \defineaccentforchar " ^^c5 {\cyrillicYO} +% \defineaccentforchar " ^^e5 {\cyrillicyo} +% \defineaccentforchar U ^^c8 {\cyrillicISHRT} +% \defineaccentforchar U ^^e8 {\cyrillicishrt} +% \defineaccentforchar " ^^49 {\cyrillicYI} +% \defineaccentforchar " ^^69 {\cyrillicyi} +% \defineaccentforchar c ^^c7 {\cyrillicZDSC} +% \defineaccentforchar c ^^e7 {\cyrilliczdsc} +% \defineaccentforchar k ^^d1 {\cyrillicSDSC} +% \defineaccentforchar k ^^f1 {\cyrillicsdsc} +% \defineaccentforchar U ^^d3 {\cyrillicUSHRT} +% \defineaccentforchar U ^^f3 {\cyrillicushrt} +% \defineaccentforchar k ^^44 {\cyrillicABHCHDSC} +% \defineaccentforchar k ^^64 {\cyrillicabhchdsc} + +% \definecharacter textperthousand {\%\char 24 } +% \definecharacter textperthousand {\%\char 24 } +% \definecharacter textpertenthousand {\%\char 24\char 24 } + +\stopcoding + +\startmapping[lcy] + +\resetcaserange 128 to 255 + +\definecasemaps 128 to 143 lc +32 uc 0 +\definecasemaps 160 to 175 lc 0 uc -32 + +\definecasemaps 144 to 159 lc +80 uc 0 +\definecasemaps 224 to 239 lc 0 uc -80 + +\definecasemap 240 241 240 \definecasemap 241 241 240 % cyrillicYO +\definecasemap 242 243 242 \definecasemap 243 243 242 % cyrillicGUP +\definecasemap 244 245 244 \definecasemap 245 245 244 % cyrillicIE +\definecasemap 244 247 244 \definecasemap 247 247 244 % cyrillicII +\definecasemap 248 249 248 \definecasemap 249 249 248 % cyrillicYI +\definecasemap 250 251 240 \definecasemap 241 241 240 % cyrillicUSHRT + +\stopmapping + +\startcoding[lcy] + +%D Characters 0 to 127 are as in normal cmr slots + +\definecharacter cyrillicA 128 +\definecharacter cyrillicB 129 +\definecharacter cyrillicV 130 +\definecharacter cyrillicG 131 +\definecharacter cyrillicD 132 +\definecharacter cyrillicE 133 +\definecharacter cyrillicZH 134 +\definecharacter cyrillicZ 135 +\definecharacter cyrillicI 136 +\definecharacter cyrillicISHRT 137 +\definecharacter cyrillicK 138 +\definecharacter cyrillicL 139 +\definecharacter cyrillicM 140 +\definecharacter cyrillicN 141 +\definecharacter cyrillicO 142 +\definecharacter cyrillicP 143 +\definecharacter cyrillicR 144 +\definecharacter cyrillicS 145 +\definecharacter cyrillicT 146 +\definecharacter cyrillicU 147 +\definecharacter cyrillicF 148 +\definecharacter cyrillicH 149 +\definecharacter cyrillicC 150 +\definecharacter cyrillicCH 151 +\definecharacter cyrillicSH 152 +\definecharacter cyrillicSHCH 153 +\definecharacter cyrillicHRDSN 154 +\definecharacter cyrillicERY 155 +\definecharacter cyrillicSFTSN 156 +\definecharacter cyrillicEREV 157 +\definecharacter cyrillicYU 158 +\definecharacter cyrillicYA 159 +\definecharacter cyrillica 160 +\definecharacter cyrillicb 161 +\definecharacter cyrillicv 162 +\definecharacter cyrillicg 163 +\definecharacter cyrillicd 164 +\definecharacter cyrillice 165 +\definecharacter cyrilliczh 166 +\definecharacter cyrillicz 167 +\definecharacter cyrillici 168 +\definecharacter cyrillicishrt 169 +\definecharacter cyrillick 170 +\definecharacter cyrillicl 171 +\definecharacter cyrillicm 172 +\definecharacter cyrillicn 173 +\definecharacter cyrillico 174 +\definecharacter cyrillicp 175 +\definecharacter cyrillicr 224 +\definecharacter cyrillics 225 +\definecharacter cyrillict 226 +\definecharacter cyrillicu 227 +\definecharacter cyrillicf 228 +\definecharacter cyrillich 229 +\definecharacter cyrillicc 230 +\definecharacter cyrillicch 231 +\definecharacter cyrillicsh 232 +\definecharacter cyrillicshch 233 +\definecharacter cyrillichrdsn 234 +\definecharacter cyrillicery 235 +\definecharacter cyrillicsftsn 236 +\definecharacter cyrillicerev 237 +\definecharacter cyrillicyu 238 +\definecharacter cyrillicya 239 +\definecharacter cyrillicYO 240 +\definecharacter cyrillicyo 241 +\definecharacter cyrillicGUP 242 +\definecharacter cyrillicgup 243 +\definecharacter cyrillicIE 244 +\definecharacter cyrillicie 245 +\definecharacter cyrillicII 246 +\definecharacter cyrillicii 247 +\definecharacter cyrillicYI 248 +\definecharacter cyrillicyi 249 +\definecharacter cyrillicUSHRT 250 +\definecharacter cyrillicushrt 251 + +\definecharacter emdash 196 +\definecharacter textcurrency 197 +\definecharacter textnumero 252 +\definecharacter leftguillemot 253 +\definecharacter rightguillemot 254 +\definecharacter lowerleftdoubleninequote 255 + +% \defineaccentforchar " ^^85 {\cyrillicYO} +% \defineaccentforchar " ^^a5 {\cyrillicyo} +% \defineaccentforchar U ^^88 {\cyrillicISHRT} +% \defineaccentforchar U ^^a8 {\cyrillicishrt} +% \defineaccentforchar " ^^f6 {\cyrillicYI} +% \defineaccentforchar " ^^f7 {\cyrillicyi} +% \defineaccentforchar U ^^93 {\cyrillicUSHRT} +% \defineaccentforchar U ^^e3 {\cyrillicushrt} + +\stopcoding + +\endinput diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex index d0e027419..2fb13c9e8 100644 --- a/tex/context/base/enco-ini.tex +++ b/tex/context/base/enco-ini.tex @@ -229,9 +229,13 @@ \dostepwiserecurse{#1}{#2}\plusone {\@EA\appendtoks\@EA\dodefineactivedecimal\@EA{\recurselevel}{#3}\to\regimetoks}} -\long\def\defineactivetoken #1 #2% watch the {} +% \long\def\defineactivetoken #1 #2% watch the {} +% {\setregimetoks +% \appendtoks\defineactivecharacter#1 {#2{}}\to\regimetoks} + +\long\def\defineactivetoken #1 #2% no {} after #2, else no kern {\setregimetoks - \appendtoks\defineactivecharacter#1 {#2{}}\to\regimetoks} + \appendtoks\defineactivecharacter#1 {#2}\to\regimetoks} \long\def\defineactiveinspector #1 #2% watch the missing {} {\setregimetoks @@ -299,7 +303,7 @@ \def\douseencoding#1% {\doifundefined{\c!file\f!encodingprefix#1}% - {\setvalue{\c!file\f!encodingprefix#1}{}% + {\letvalue{\c!file\f!encodingprefix#1}\empty \makeshortfilename[\f!encodingprefix#1]% \startreadingfile \readsysfile\shortfilename @@ -373,6 +377,17 @@ %D %D and saves a lot of typing (copying). +% \def\resetcaserange #1 to #2 +% {\dostepwiserecurse{#1}{#2}{1} +% {\expanded{\definecasemap\recurselevel\space0\space0\space}}} + +\def\resetcaserange #1 to #2 + {\setmappingtoks + \dostepwiserecurse{#1}{#2}\plusone + {\edef\@@expanded{\recurselevel\space}% + \@EA\appendtoks\@EA\setcasemap\@@expanded 0 0 \to\mappingtoks}% + \ignorespaces} + \def\presetcaserange#1#2% {\dostepwiserecurse{#1}{#2}\plusone {\setregimecode\recurselevel\@@letter @@ -661,7 +676,8 @@ \fi \convertargument#1\to\asciiA \convertargument#2\to\asciiB \convertargument#3\to\asciiC \convertargument#4\to\asciiD - \setevalue{\!!stringa}{\!!stringb\flushsortkey{\asciiA}{\asciiB}{\asciiC}{\asciiD}}} + \setevalue{\!!stringa}% + {\!!stringb\flushsortkey{\asciiA}{\asciiB}{\asciiC}{\asciiD}}} \def\definesortkey#1#2#3#4% {} @@ -1402,7 +1418,7 @@ % {}}% % \def\startencoding[##1]{} % \def\stopencoding{\endinput} -% \readfile{xxxx-#1}{}{}% +% \readfile{xxxx-#1}\donothing\donothing % \popmacro\stopencoding % \popmacro\startencoding % \popmacro\definecharacter} diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex index 03751b224..fa38f2c5b 100644 --- a/tex/context/base/font-ini.tex +++ b/tex/context/base/font-ini.tex @@ -3617,6 +3617,15 @@ \fetchruntimecommand \testminimalbaseline {\f!fontprefix\s!run} \fetchruntimecommand \showminimalbaseline {\f!fontprefix\s!run} +%D \macros +%D {showkerning} +%D +%D A goody is: +%D +%D \showkerning{Can you guess what kerning is?} + +\fetchruntimecommand \showkerning {\f!fontprefix\s!run} + %D \macros %D {showbodyfontenvironment} %D diff --git a/tex/context/base/font-run.tex b/tex/context/base/font-run.tex index 0377be96b..20b720c8c 100644 --- a/tex/context/base/font-run.tex +++ b/tex/context/base/font-run.tex @@ -297,4 +297,11 @@ \testminimalbaseline{$\frac{1}{2}x^2_3$} \stoptabulate} +\gdef\showkerning#1% + {\bgroup + \let\MPfshowcommand\ruledhbox + \setMPtext\s!dummy{#1}% + \startMPcode draw textext(\MPstring\s!dummy);\stopMPcode + \egroup} + \protect \endinput diff --git a/tex/context/base/java-ini.tex b/tex/context/base/java-ini.tex index 85f4a8876..7fdef5345 100644 --- a/tex/context/base/java-ini.tex +++ b/tex/context/base/java-ini.tex @@ -243,7 +243,8 @@ \setverbosecscharacter\4\setverbosecscharacter\5% \setverbosecscharacter\6\setverbosecscharacter\7% \setverbosecscharacter\8\setverbosecscharacter\9% - \setverbosecscharacter\/\setverbosecscharacter\s} + \setverbosecscharacter\n\setverbosecscharacter\s% + \setverbosecscharacter\/} \newif\ifdirectJScode @@ -362,13 +363,13 @@ {\dostartJSpreamble#1 } {\dostartJSpreamble#1 now #2 }} -\long\def\dostartJSpreamble#1 #2 #3\stopJSpreamble% +\long\def\dostartJSpreamble#1 #2 #3\stopJSpreamble {\processaction [#2] - [ later=>\chardef\JSstatus0,% - now=>\chardef\JSstatus1,% - \s!default=>\chardef\JSstatus2,% - \s!unknown=>\chardef\JSstatus2]% + [ later=>\chardef\JSstatus\zerocount,% + now=>\chardef\JSstatus\plusone ,% + \s!default=>\chardef\JSstatus\plustwo ,% + \s!unknown=>\chardef\JSstatus\plustwo ]% \presetJSfunctions #3function ()\end \long\setgvalue{\r!java\r!java#1}{#3}% \ifcase\JSstatus \else @@ -516,7 +517,7 @@ %D \type{TEX}. When followed by a space, this keyword is %D ignored, that is, filtered from the stream. Now we have: -\chardef\JSisTEX=0 +\chardef\JSisTEX =0 \chardef\JScomment=0 \newif\ifaddJSlinebreaks @@ -527,7 +528,7 @@ \or \aftergroup T\aftergroup E% \or \aftergroup T\aftergroup E\aftergroup X% \fi - \chardef\JSisTEX0 } + \chardef\JSisTEX\zerocount} \def\doJSlinebreak {\ifaddJSlinebreaks @@ -537,18 +538,18 @@ \def\dodoPSsanitizeJScode#1% % input stack>500 & TEX check {\if#1/% \ifnum\JScomment=0 - \chardef\JScomment1 + \chardef\JScomment\plusone \else\ifnum\JScomment=1 - \chardef\JScomment2 + \chardef\JScomment\plustwo \fi\fi \else \ifnum\JScomment=1 \aftergroup/% - \chardef\JScomment0 + \chardef\JScomment\zerocount \fi \ifnum\JScomment=2 \if#1\delcharacter - \chardef\JScomment0 + \chardef\JScomment\zerocount \fi \else \if#1\delcharacter @@ -560,13 +561,13 @@ \else\if#1;% \flushJSisTEX\aftergroup;\doJSlinebreak \else\if#1T% - \ifnum\JSisTEX=0 \chardef\JSisTEX1 \else\flushJSisTEX\aftergroup T\fi + \ifnum\JSisTEX=0 \chardef\JSisTEX\plusone \else\flushJSisTEX\aftergroup T\fi \else\if#1E% - \ifnum\JSisTEX=1 \chardef\JSisTEX2 \else\flushJSisTEX\aftergroup E\fi + \ifnum\JSisTEX=1 \chardef\JSisTEX\plustwo \else\flushJSisTEX\aftergroup E\fi \else\if#1X% - \ifnum\JSisTEX=2 \chardef\JSisTEX3 \else\flushJSisTEX\aftergroup X\fi + \ifnum\JSisTEX=2 \chardef\JSisTEX\plusthree \else\flushJSisTEX\aftergroup X\fi \else\if#1\normalspace - \ifnum\JSisTEX=3 \chardef\JSisTEX0 \else\flushJSisTEX\aftergroup#1\fi + \ifnum\JSisTEX=3 \chardef\JSisTEX\zerocount \else\flushJSisTEX\aftergroup#1\fi \else \flushJSisTEX\aftergroup\string\expandafter\aftergroup#1% \fi\fi\fi\fi\fi\fi\fi\fi diff --git a/tex/context/base/lang-cyr.tex b/tex/context/base/lang-cyr.tex new file mode 100644 index 000000000..adc0defd6 --- /dev/null +++ b/tex/context/base/lang-cyr.tex @@ -0,0 +1,362 @@ +%D \module +%D [ file=lang-cyr, +%D version=2003.01.24, +%D title=\CONTEXT\ Language Macros, +%D subtitle=Cyrillic Languages, +%D author=see below, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{Cyrillic Languages} + +%D The cyrillic languages always use a dedicated input regime. +%D Therefore we define the labels using symbolic names. +%D Support for cyrillic is initiated by Olga Briginets who +%D also layed the base for the language, encoding and font +%D definition. Later Alexander Bokovoy and Victor Figurnov +%D improved things. I (Hans Hagen) mainly cleaned things up +%D a bit. + +\unprotect + +\installlanguage + [\s!ru] + [\s!lefthyphenmin=2, + \s!righthyphenmin=2, + \c!spatiering=\v!opelkaar, + \c!leftsentence=\leftguillemot, + \c!rightsentence=\rightguillemot, + \c!leftsubsentence=\lowerleftdoubleninequote, + \c!rightsubsentence=\upperrightdoubleninequote, + \c!leftquote=\lowerleftdoubleninequote, + \c!rightquote=\upperrightdoubleninequote, + \c!leftquotation=\leftguillemot, + \c!rightquotation=\rightguillemot, + \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, + \c!status=\v!stop] + +\installlanguage + [\s!ua] + [\s!lefthyphenmin=2, + \s!righthyphenmin=2, + \c!spatiering=\v!opelkaar, + \c!leftsentence=\leftguillemot, + \c!rightsentence=\rightguillemot, + \c!leftsubsentence=\lowerleftdoubleninequote, + \c!rightsubsentence=\upperrightdoubleninequote, + \c!leftquote=\lowerleftdoubleninequote, + \c!rightquote=\upperrightdoubleninequote, + \c!leftquotation=\leftguillemot, + \c!rightquotation=\rightguillemot, + \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, + \c!status=\v!stop] + +\installlanguage [russian] [\s!ru] +\installlanguage [ukrainian] [\s!ua] + + +%D Labels and header texts. + +\setupheadtext [\s!ru] [ \v!inhoud=\cyrillicS \cyrillico \cyrillicd + \cyrillice \cyrillicr \cyrilliczh + \cyrillica \cyrillicn \cyrillici + \cyrillice] +\setupheadtext [\s!ua] [\v!inhoud=\cyrillicZ \cyrillicm \cyrillicii + \cyrillics \cyrillict] + +\setupheadtext [\s!ru] [\v!tabellen=\cyrillicS \cyrillicp \cyrillici + \cyrillics \cyrillico \cyrillick + \space \cyrillict \cyrillica + \cyrillicb \cyrillicl \cyrillici + \cyrillicc] +\setupheadtext [\s!ua] [\v!tabellen=\cyrillicP \cyrillice \cyrillicr + \cyrillice \cyrillicl \cyrillicii + \cyrillick \space \cyrillict + \cyrillica \cyrillicb \cyrillicl + \cyrillici \cyrillicc \cyrillicsftsn] + +\setupheadtext [\s!ru] [\v!figuren=\cyrillicS \cyrillicp \cyrillici + \cyrillics \cyrillico \cyrillick + \space \cyrillici \cyrillicl + \cyrillicl \cyrillicyu\cyrillics + \cyrillict \cyrillicr \cyrillica + \cyrillicc \cyrillici \cyrillicishrt] +\setupheadtext [\s!ua] [\v!figuren=\cyrillicP \cyrillice \cyrillicr + \cyrillice \cyrillicl \cyrillicii + \cyrillick \space \cyrillicii + \cyrillicl \cyrillicyu\cyrillics + \cyrillict \cyrillicr \cyrillica + \cyrillicc \cyrillicii\cyrillicishrt] + +\setupheadtext [\s!ru] [\v!grafieken=\cyrillicS \cyrillicp \cyrillici + \cyrillics \cyrillico \cyrillick + \space \cyrillicg \cyrillicr + \cyrillica \cyrillicf \cyrillici + \cyrillick \cyrillico \cyrillicv] +\setupheadtext [\s!ua] [\v!grafieken=\cyrillicP \cyrillice \cyrillicr + \cyrillice \cyrillicl \cyrillicii + \cyrillick \space \cyrillicg + \cyrillicr \cyrillica \cyrillicf + \cyrillicii\cyrillick \cyrillico + \cyrillicv] + +\setupheadtext [\s!ru] [\v!intermezzos=\cyrillicS \cyrillicp \cyrillici + \cyrillics \cyrillico \cyrillick + \space \cyrillicv \cyrillics + \cyrillict \cyrillica \cyrillicv + \cyrillico \cyrillick] +\setupheadtext [\s!ua] [\v!intermezzos=\cyrillicP \cyrillice \cyrillicr + \cyrillice \cyrillicl \cyrillicii + \cyrillick \space \cyrillicv + \cyrillics \cyrillict \cyrillica + \cyrillicv \cyrillico \cyrillick] + +\setupheadtext [\s!ru] [\v!index=\cyrillicA \cyrillicl \cyrillicf + \cyrillica \cyrillicv \cyrillici + \cyrillict \cyrillicn \cyrillicery + \cyrillicishrt \space \cyrillicu + \cyrillick \cyrillica \cyrillicz + \cyrillica \cyrillict \cyrillice + \cyrillicl \cyrillicsftsn] +\setupheadtext [\s!ua] [\v!index=\cyrillicP \cyrillico \cyrillick + \cyrillica \cyrilliczh\cyrillicch + \cyrillici \cyrillick] + +\setupheadtext [\s!ru] [\v!afkortingen=\cyrillicS \cyrillicp \cyrillici + \cyrillics \cyrillico \cyrillick + \space \cyrillics \cyrillico + \cyrillick \cyrillicr \cyrillica + \cyrillicshch \cyrillice + \cyrillicn + \cyrillici \cyrillicishrt] +\setupheadtext [\s!ua] [\v!afkortingen=\cyrillicP \cyrillice \cyrillicr + \cyrillice \cyrillicl \cyrillicii + \cyrillick \space \cyrillics + \cyrillick \cyrillico \cyrillicr + \cyrillico \cyrillicch\cyrillice + \cyrillicn \cyrillicsftsn] + +\setupheadtext [\s!ru] [\v!logos=\cyrillicL \cyrillico \cyrillicg + \cyrillico \cyrillict \cyrillici + \cyrillicp \cyrillicery] +\setupheadtext [\s!ua] [\v!logos=\cyrillicL \cyrillico \cyrillicg + \cyrillico \cyrillict \cyrillici + \cyrillicp \cyrillici] + +\setupheadtext [\s!ru] [\v!eenheden=\cyrillicE \cyrillicd \cyrillici + \cyrillicn \cyrillici \cyrillicc + \cyrillicery \space \cyrillici + \cyrillicz \cyrillicm \cyrillice + \cyrillicr \cyrillice \cyrillicn + \cyrillici \cyrillicya] +\setupheadtext [\s!ua] [\v!eenheden=\cyrillicO \cyrillicd \cyrillici + \cyrillicn \cyrillici \cyrillicc + \cyrillicii\space \cyrillicv + \cyrillici \cyrillicm \cyrillicii + \cyrillicr \cyrillicu] + +\setuplabeltext [\s!ru] [\v!tabel=\cyrillicT \cyrillica \cyrillicb + \cyrillicl \cyrillici \cyrillicc + \cyrillica \space] +\setuplabeltext [\s!ua] [\v!tabel=\cyrillicT \cyrillica \cyrillicb + \cyrillicl \cyrillici \cyrillicc + \cyrillicya\space] + +\setuplabeltext [\s!ru] [\v!figuur=\cyrillicR \cyrillici \cyrillics + \cyrillicu \cyrillicn \cyrillico + \cyrillick \space] +\setuplabeltext [\s!ua] [\v!figuur=\cyrillicM \cyrillica \cyrillicl + \cyrillicyu\cyrillicn \cyrillico + \cyrillick \space] + +\setuplabeltext [\s!ru] [\v!intermezzo=\cyrillicV \cyrillics \cyrillict + \cyrillica \cyrillicv \cyrillick + \cyrillica \space] +\setuplabeltext [\s!ua] [\v!intermezzo=\cyrillicV \cyrillics \cyrillict + \cyrillica \cyrillicv \cyrillick + \cyrillica \space] + +\setuplabeltext [\s!ru] [\v!grafiek=\cyrillicG \cyrillicr \cyrillica + \cyrillicf \cyrillici \cyrillick + \space] +\setuplabeltext [\s!ua] [\v!grafiek=\cyrillicG \cyrillicr \cyrillica + \cyrillicf \cyrillici \cyrillick + \space] + +\setuplabeltext [\s!ru] [\v!hoofdstuk=] +\setuplabeltext [\s!ua] [\v!hoofdstuk=] + +\setuplabeltext [\s!ru] [\v!paragraaf=] +\setuplabeltext [\s!ua] [\v!paragraaf=] + +\setuplabeltext [\s!ru] [\v!sub\v!paragraaf=] +\setuplabeltext [\s!ua] [\v!sub\v!paragraaf=] + +\setuplabeltext [\s!ru] [\v!sub\v!sub\v!paragraaf=] +\setuplabeltext [\s!ua] [\v!sub\v!sub\v!paragraaf=] + +\setuplabeltext [\s!ru] [\v!sub\v!sub\v!sub\v!paragraaf=] +\setuplabeltext [\s!ua] [\v!sub\v!sub\v!sub\v!paragraaf=] + +\setuplabeltext [\s!ru] [\v!bijlage=] +\setuplabeltext [\s!ua] [\v!bijlage=] + +\setuplabeltext [\s!ru] [\v!deel=\cyrillicCH\cyrillica \cyrillics + \cyrillict \cyrillicsftsn + \space] +\setuplabeltext [\s!ua] [\v!deel=\cyrillicCH\cyrillica \cyrillics + \cyrillict \cyrillici \cyrillicn + \cyrillica \space] + +\setuplabeltext [\s!ru] [\v!regel=\cyrillics \cyrillict \cyrillicr + \cyrillico \cyrillick \cyrillica + \space] +\setuplabeltext [\s!ua] [\v!regel=\cyrillicr \cyrillicya\cyrillicd + \cyrillico \cyrillick \space] + +\setuplabeltext [\s!ru] [\v!regels=\cyrillics \cyrillict \cyrillicr + \cyrillico \cyrillick \cyrillici + \space] +\setuplabeltext [\s!ua] [\v!regels=\cyrillicr \cyrillicya\cyrillicd + \cyrillick \cyrillici \space] + +\setuplabeltext [\s!ru] [\v!pagina=\cyrillics \cyrillict \cyrillicr + \cyrillica \cyrillicn \cyrillici + \cyrillicc \cyrillica \space] +\setuplabeltext [\s!ru] [\v!oppagina=\cyrillicn \cyrillica \space + \cyrillics \cyrillict \cyrillicr + \cyrillica \cyrillicn \cyrillici + \cyrillicc \cyrillice \space] +\setuplabeltext [\s!ru] [\v!hierboven=\cyrillics \cyrillicm.\space + \cyrillicv \cyrillicery \cyrillicsh + \cyrillice] +\setuplabeltext [\s!ru] [\v!hieronder=\cyrillics \cyrillicm.\space + \cyrillicn \cyrillici \cyrilliczh + \cyrillice] +\setuplabeltext [\s!ru] [\v!zie=\cyrillics \cyrillicm.\space] + +\setuplabeltext [\s!en] [\v!pagina=\cyrillics \cyrillict \cyrillico + \cyrillicr \cyrillicii\cyrillicn + \cyrillick \cyrillica \space] +\setuplabeltext [\s!en] [\v!oppagina=\cyrillicn \cyrillica \space + \cyrillics \cyrillict \cyrillico + \cyrillicr \cyrillicii\cyrillicn + \cyrillicc \cyrillicii\space] +\setuplabeltext [\s!en] [\v!hierboven=\cyrillicya\cyrillick \space + \cyrillicp \cyrillico \cyrillick + \cyrillica \cyrillicz \cyrillica + \cyrillicn \cyrillico \space + \cyrillicv \cyrillici \cyrillicshch + \cyrilice] +\setuplabeltext [\s!en] [\v!hieronder=\cyrillicya\cyrillick \space + \cyrillicp \cyrillico \cyrillick + \cyrillica \cyrillicz \cyrillica + \cyrillicn \cyrillico \space + \cyrillicn \cyrillici \cyrilliczh + \cyrillicch\cyrillice] +\setuplabeltext [\s!en] [\v!zie=\cyrillicd \cyrillici \cyrillicv.\ ] + + +\setuplabeltext [\s!ru] [\v!january=\cyrillicya\cyrillicn \cyrillicv + \cyrillica \cyrillicr \cyrillicya] +\setuplabeltext [\s!ru] [\v!february=\cyrillicf \cyrillice \cyrillicv + \cyrillicr \cyrillica \cyrillicl + \cyrillicya] +\setuplabeltext [\s!ru] [\v!march=\cyrillicm \cyrillica \cyrillicr + \cyrillict \cyrillica] +\setuplabeltext [\s!ru] [\v!april=\cyrillica \cyrillicp \cyrillicr + \cyrillice \cyrillicl \cyrillicya] +\setuplabeltext [\s!ru] [\v!may=\cyrillicm \cyrillica \cyrillicya] +\setuplabeltext [\s!ru] [\v!june=\cyrillici \cyrillicyu\cyrillicn + \cyrillicya] +\setuplabeltext [\s!ru] [\v!july=\cyrillici \cyrillicyu\cyrillicl + \cyrillicya] +\setuplabeltext [\s!ru] [\v!august=\cyrillica \cyrillicv \cyrillicg + \cyrillicu \cyrillics \cyrillict + \cyrillica] +\setuplabeltext [\s!ru] [\v!september=\cyrillics \cyrillice \cyrillicn + \cyrillict \cyrillicya\cyrillicb + \cyrillicr \cyrillicya] +\setuplabeltext [\s!ru] [\v!october=\cyrillico \cyrillick \cyrillict + \cyrillicya\cyrillicb \cyrillicr + \cyrillicya] +\setuplabeltext [\s!ru] [\v!november=\cyrillicn \cyrillico \cyrillicya + \cyrillicb \cyrillicr \cyrillicya] +\setuplabeltext [\s!ru] [\v!december=\cyrillicd \cyrillice \cyrillick + \cyrillica \cyrillicb \cyrillicr + \cyrillicya] + +\setuplabeltext [\s!ua] [\v!january=\cyrillics \cyrillicii\cyrillicch + \cyrillicn \cyrillicya] +\setuplabeltext [\s!ua] [\v!february=\cyrillicl \cyrillicyu\cyrillict + \cyrillico \cyrillicg \cyrillico] +\setuplabeltext [\s!ua] [\v!march=\cyrillicb \cyrillice \cyrillicr + \cyrillice \cyrillicz \cyrillicn + \cyrillicya] +\setuplabeltext [\s!ua] [\v!april=\cyrillick \cyrillicv \cyrillicii + \cyrillict \cyrillicn \cyrillicya] +\setuplabeltext [\s!ua] [\v!may=\cyrillict \cyrillicr \cyrillica + \cyrillicv \cyrillicn \cyrillicya] +\setuplabeltext [\s!ua] [\v!june=\cyrillicch\cyrillice \cyrillicr + \cyrillicv \cyrillicn \cyrillicya] +\setuplabeltext [\s!ua] [\v!july=\cyrillicl \cyrillici \cyrillicp + \cyrillicn \cyrillicya] +\setuplabeltext [\s!ua] [\v!august=\cyrillics \cyrillice \cyrillicr + \cyrillicp \cyrillicn \cyrillicya] +\setuplabeltext [\s!ua] [\v!september=\cyrillicv \cyrillice \cyrillicr + \cyrillice \cyrillics \cyrillicn + \cyrillicya] +\setuplabeltext [\s!ua] [\v!october=\cyrilliczh\cyrillico \cyrillicv + \cyrillict \cyrillicn \cyrillicya] +\setuplabeltext [\s!ua] [\v!november=\cyrillicl \cyrillici \cyrillics + \cyrillict \cyrillico \cyrillicp + \cyrillica \cyrillicd \cyrillica] +\setuplabeltext [\s!ua] [\v!december=\cyrillicg \cyrillicr \cyrillicu + \cyrillicd \cyrillicn \cyrillicya] + +\setuplabeltext [\s!ru] [\v!sunday=\cyrillicv \cyrillico \cyrillics + \cyrillick \cyrillicr \cyrillice + \cyrillics \cyrillice \cyrillicn + \cyrillicsftsn \cyrillice] +\setuplabeltext [\s!ru] [\v!monday=\cyrillicp \cyrillico \cyrillicn + \cyrillice \cyrillicd \cyrillice + \cyrillicl \cyrillicsftsn + \cyrillicn \cyrillici \cyrillick] +\setuplabeltext [\s!ru] [\v!tuesday=\cyrillicv \cyrillict \cyrillico + \cyrillicr \cyrillicn \cyrillici + \cyrillick] +\setuplabeltext [\s!ru] [\v!wednesday=\cyrillics \cyrillicr \cyrillice + \cyrillicd \cyrillica] +\setuplabeltext [\s!ru] [\v!thursday=\cyrillicch\cyrillice \cyrillict + \cyrillicv \cyrillice \cyrillicr + \cyrillicg] +\setuplabeltext [\s!ru] [\v!friday=\cyrillicp \cyrillicya\cyrillict + \cyrillicn \cyrillici \cyrillicc + \cyrillica] +\setuplabeltext [\s!ru] [\v!saturday=\cyrillics \cyrillicu \cyrillicb + \cyrillicb \cyrillico \cyrillict + \cyrillica] + +\setuplabeltext [\s!ua] [\v!sunday=\cyrillicn \cyrillice \cyrillicd + \cyrillicii\cyrillicl \cyrillicya] +\setuplabeltext [\s!ua] [\v!monday=\cyrillicp \cyrillico \cyrillicn + \cyrillice \cyrillicd \cyrillicii + \cyrillicl \cyrillico \cyrillick] +\setuplabeltext [\s!ua] [\v!tuesday=\cyrillicv \cyrillicii\cyrillicv + \cyrillict \cyrillico \cyrillicr + \cyrillico \cyrillick] +\setuplabeltext [\s!ua] [\v!wednesday=\cyrillics \cyrillice \cyrillicr + \cyrillice \cyrillicd \cyrillica] +\setuplabeltext [\s!ua] [\v!thursday=\cyrillicch\cyrillice \cyrillict + \cyrillicv \cyrillice \cyrillicr] +\setuplabeltext [\s!ua] [\v!friday=\cyrillicp'\cyrillicya\cyrillict + \cyrillicn \cyrillici \cyrillicc + \cyrillicya] +\setuplabeltext [\s!ua] [\v!saturday=\cyrillics \cyrillicu \cyrillicb + \cyrillico \cyrillict \cyrillica] + +\protect \endinput diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex index d73f4f902..2c4226605 100644 --- a/tex/context/base/lang-ger.tex +++ b/tex/context/base/lang-ger.tex @@ -310,7 +310,7 @@ \setupheadtext [\s!nl] [\v!inhoud=Inhoud] \setupheadtext [\s!de] [\v!inhoud=Inhalt] \setupheadtext [\s!da] [\v!inhoud=Indhold] -\setupheadtext [\s!sv] [\v!inhoud=Inneh\aring l] +\setupheadtext [\s!sv] [\v!inhoud=Inneh\aring ll] \setupheadtext [\s!af] [\v!inhoud=Inhoud] \setupheadtext [\s!no] [\v!inhoud=Innhold] diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex index 1cda3ce7c..6d2beeaf8 100644 --- a/tex/context/base/lang-ini.tex +++ b/tex/context/base/lang-ini.tex @@ -242,6 +242,7 @@ \c!leftspeech=\getvalue{\??la#1\c!leftquotation}, \c!middlespeech=, \c!rightspeech=\getvalue{\??la#1\c!rightquotation}, + \c!limittext=\unknown, \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, \c!status=\v!stop, \c!default=, @@ -689,6 +690,15 @@ % \def\rightsubfakeguillemot % {\hbox{\raise.25ex\hbox{$\scriptscriptstyle>$}}} +%D New (see nomarking and nolist): + +\def\splitsequence#1#2% + {\doifelse{#1}\v!nee + {#2}{\doifelse{#1}\v!ja{\languageparameter\c!limittext}{#1}}} + +\def\splitsymbol#1% + {\splitsequence{#1}{\languageparameter\c!limittext}} + %D Just like with subsentence boundary symbols, quotes %D placement depends on the current language, therefore we show %D the defaults here. diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex index 5094d27b5..5f59024f3 100644 --- a/tex/context/base/lang-ita.tex +++ b/tex/context/base/lang-ita.tex @@ -457,6 +457,4 @@ %D \ShowAllLanguageValues [\s!pt] [portuguese] portugese ... %D \ShowAllLanguageValues [\s!ro] [romanian] romanian ... -\protect - -\endinput +\protect \endinput diff --git a/tex/context/base/math-pln.tex b/tex/context/base/math-pln.tex index 7c8d902f2..73c12c973 100644 --- a/tex/context/base/math-pln.tex +++ b/tex/context/base/math-pln.tex @@ -108,17 +108,26 @@ \def\prim@s {\prime\futurelet\next\pr@m@s} +% \def\pr@m@s +% {\ifx'\next +% \let\nxt\pr@@@s +% \else +% \ifx^\next +% \let\nxt\pr@@@t +% \else +% \let\nxt\egroup +% \fi +% \fi +% \nxt} + \def\pr@m@s {\ifx'\next - \let\nxt\pr@@@s + \@EA\pr@@@s + \else\ifx^\next + \@EAEAEA\pr@@@t \else - \ifx^\next - \let\nxt\pr@@@t - \else - \let\nxt\egroup - \fi - \fi - \nxt} + \@EAEAEA\egroup + \fi\fi} \def\pr@@@s#1% {\prim@s} diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex index 34892efae..9fcf66cf3 100644 --- a/tex/context/base/meta-ini.tex +++ b/tex/context/base/meta-ini.tex @@ -86,6 +86,12 @@ graphictextdirective "\the\everyMPTEXgraphic" ; \to \MPinitializations +%D A signal that we're in combines \CONTEXT||\METAFUN mode: + +\appendtoks + string contextversion ; contextversion := "\contextversion" ; +\to \MPinitializations + %D Some safeguards: \appendtoks \cleanupfeatures \to \everyMPgraphic @@ -158,6 +164,8 @@ \let\setMPvariables\setupMPvariables +\def\MPrawvar#1#2{\csname#1:#2\endcsname} + %D \macros %D {startuniqueMPgraphic, uniqueMPgraphic} %D @@ -318,6 +326,8 @@ \def\enableincludeMPgraphics {\let\handleuseMPgraphic \thirdofthreearguments \let\handlereusableMPgraphic\thirdofthreearguments} + +% todo: each code/page/buffer a var class %D One way of defining a stamp is: %D diff --git a/tex/context/base/meta-pag.tex b/tex/context/base/meta-pag.tex index 711111812..acafd66ad 100644 --- a/tex/context/base/meta-pag.tex +++ b/tex/context/base/meta-pag.tex @@ -1,5 +1,5 @@ %D \module -%D [ file=meta-ini, +%D [ file=meta-pag, %D version=1999.07.10, %D title=\METAPOST\ Graphics, %D subtitle=Initialization, @@ -159,7 +159,9 @@ {\ifpositioning \bgroup \doglobal\increment\currentMPtextareadata - \hpos{gbd:\currentMPtextareadata}{#1}% + %\hpos{gbd:\currentMPtextareadata}{#1}% + \hpos{gbd:\currentMPtextareadata}% + {\iftracetextareas\boxrulewidth1.5pt\ruledhbox\fi{#1}}% \edef\!!stringa{gbd:\currentMPtextareadata}% \edef\!!stringa{RegisterTextArea(% \MPx\!!stringa,\MPy\!!stringa,% @@ -174,7 +176,9 @@ {\ifpositioning \bgroup \doglobal\increment\currentMPtextareadata - \hpos{gbd:\currentMPtextareadata}{#1}% + %\hpos{gbd:\currentMPtextareadata}{#1}% + \hpos{gbd:\currentMPtextareadata}% + {\iftracetextareas\boxrulewidth3pt\ruledhbox\fi{#1}}% \edef\!!stringa{gbd:\currentMPtextareadata}% \edef\!!stringa{RegisterLocalTextArea(% \MPx\!!stringa,\MPy\!!stringa,% diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex index 08bb3daed..7d02aff65 100644 --- a/tex/context/base/mult-con.tex +++ b/tex/context/base/mult-con.tex @@ -366,6 +366,10 @@ rightspeech rightspeech rightspeech rightspeech %%% + limittext: limiettekst limittext + limittext limittext + limittext limittext + datum: datum date datum datum data data @@ -1248,6 +1252,9 @@ proces: proces process zelfdepagina: zelfdepagina samepage selbeseite stejnastranka stessapagina aceeasipagina +zijuitlijnen: zijuitlijnen sidealign + sidealign sidealign + sidealign sidealign zij: zij side objektabstand pocitat lato parte @@ -1705,6 +1712,9 @@ trefwoord: trefwoord keyword max: max max max max max max + min: min min + min min + min min mediaeval: mediaeval mediaeval mittelalterlich stredoveky medievale medieval diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex index 9cb6ffcf6..48f95abd8 100644 --- a/tex/context/base/mult-sys.tex +++ b/tex/context/base/mult-sys.tex @@ -237,6 +237,7 @@ \definesystemconstant {pass} +\definesystemconstant {data} \definesystemconstant {float} \definesystemconstant {list} \definesystemconstant {page} diff --git a/tex/context/base/page-bck.tex b/tex/context/base/page-bck.tex index e0cba9eb6..22bf96db0 100644 --- a/tex/context/base/page-bck.tex +++ b/tex/context/base/page-bck.tex @@ -569,7 +569,7 @@ {\ifconditional\hiddenbackgroundenabled \expandafter\doaddlocalbackground \else - \expandafter\gobbleoneargument + \resetglobal \expandafter\gobbleoneargument \fi} \def\doaddlocalbackground#1% @@ -579,7 +579,7 @@ \noexpand\redoglobal\ht#1\the\ht#1% \noexpand\dodoglobal\dp#1\the\dp#1}% \dp#1\zeropoint - \setbox#1\hbox + \redoglobal\setbox#1\hbox {\localframed [\??ma\v!lokaal] [\c!kader=\v!uit, @@ -589,6 +589,7 @@ \ifdim\naturalfloatdepth>\zeropoint % maybe take difference \redoglobal\setbox#1\hbox{\lower\scratchdimen\box#1}% \fi +\doglobal\increment\localpositionnumber % afterwards ! \next} % Test how previous macro behaves with depth: diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex index 44e5e096e..d8d6a548a 100644 --- a/tex/context/base/page-flt.tex +++ b/tex/context/base/page-flt.tex @@ -183,26 +183,39 @@ {\getmessage\m!floatblocks{12}}} \def\docomplexplaatsblok[#1][#2]% [#3]#4% - {\doifelsenothing{#1} + {\edef\floattype{#1}% + \doifelsenothing\floattype {\let\floattype\v!figuur} - {\edef\floattype{#1}}% + {\doifundefined{\??fl#1\c!default}{\let\floattype\v!figuur}}% \doifelsenothing{#2} - {\edef\floatlocation{\getvalue{\??fl#1\c!default}}} + {\edef\floatlocation{\getvalue{\??fl\floattype\c!default}}} {\edef\floatlocation{#2}}% \expanded{\dodocomplexplaatsblok[\floattype][\floatlocation]}} -\def\presetfloatvariables#1#2#3#4% +\def\presetfloatvariables#1#2#3#4% better a processaction {\doifcommonelse - {#2} - {\v!links,\v!rechts,\v!inlinker,\v!inrechter,\v!inmarge,% - \v!linkermarge,\v!linkerrand,\v!rechtermarge,\v!rechterrand} - {\global\parfloattrue} - {\global\parfloatfalse}% + {#2} + {\v!links,\v!rechts,\v!inlinker,\v!inrechter,\v!inmarge,% + \v!linkermarge,\v!linkerrand,\v!rechtermarge,\v!rechterrand} + {\global\parfloattrue} + {\global\parfloatfalse}% + \global\sidefloatshift\zeropoint \ifbinnenkolommen \global\parfloatfalse \fi \calculatefloatskips{#1}% + \global\chardef\sidefloatalign\zerocount \ifparfloat + \processaction + [\getvalue{\??fl#1\c!zijuitlijnen}] + [\v!hoogte=>\global\chardef\sidefloatalign\plusone,% + \v!regel=>\global\chardef\sidefloatalign\plustwo,% + \v!diepte=>\global\chardef\sidefloatalign\plusthree]% + \ifcase\sidefloatalign\relax + \doifinset\v!hoogte{#2}{\global\chardef\sidefloatalign\plusone}% + \doifinset\v!regel {#2}{\global\chardef\sidefloatalign\plustwo}% + \doifinset\v!diepte{#2}{\global\chardef\sidefloatalign\plusthree}% + \fi \doifinset\v!hoog{#2}{\global\sidefloattopskip \zeropoint}% \doifinset\v!laag{#2}{\global\sidefloatbottomskip\zeropoint}% \doifinset\v!passend{#2} @@ -228,10 +241,10 @@ \fi \fi} \def\presetmorefloatvariables#1% - {\doifelse\@@bklokaal\v!ja % fout keyword + {\doifelse\@@bklokaal\v!ja % fout keyword \globalcenterfloatboxtrue \globalcenterfloatboxfalse - \ifglobalcenterfloatbox + \ifglobalcenterfloatbox \localcenterfloatboxtrue \else \doifinsetelse\v!lokaal{#1} @@ -250,6 +263,15 @@ \newevery \everyinsidefloat \relax +\appendtoks + \everyinsidefloat\emptytoks % in case it's called earlier + \dogetfloatdata +\to \everyinsidefloat + +%\appendtoks +% \fuzzysnappingfalse % what is otr is +%\to \everyinsidefloat + \def\dodocomplexplaatsblok[#1][#2][#3]#4% {\flushnotes \ifsomefloatwaiting @@ -265,32 +287,52 @@ {}}% % but which should be done before using box \floatbox \fi - \ifmargeblokken + \ifmargeblokken % waarschijnlijk gebroken ! ! ! ! \doifinset\v!marge{#2} {\bgroup\everypar{\egroup\the\everypar}% \hsize\@@mbbreedte}% \fi \global\insidefloattrue - \begingroup % ** + \begingroup % ** \the\everyinsidefloat \let\@@extrafloat\empty \presetmorefloatvariables{#2}% \dowithnextboxcontent % better a \the\everyfloattoks {\setlocalfloathsize + \fuzzysnappingfalse \postponefootnotes} % new {\xdocompletefloat{#1}{#3}{#1}{#2}{#1}{#4}% - \doifnotinset\v!tekst{#2}\endgroup} % ** not yet done + % we need to carry over the par because of side floats + \doifnotinset\v!tekst{#2}{\carryoverpar\endgroup}} % ** not yet done \vbox} +%\def\xxdocompletefloat#1#2% +% {\setbox\nextbox\hbox{\signalrightpage\box\nextbox}% +% \doifrightpageelse{\let\@@extrafloat#1}{\let\@@extrafloat#2}} + \def\xxdocompletefloat#1#2% - {\setbox\nextbox\hbox{\signalrightpage\box\nextbox}% - \doifrightpageelse{\let\@@extrafloat#1}{\let\@@extrafloat#2}} + {\rightorleftpageaction{\let\@@extrafloat#1}{\let\@@extrafloat#2}} + +\def\doifrightpagefloatelse % watch out: other default ! ! ! + {\ifdubbelzijdig + \ifodd\purenumber\twopassfloatdata\space + \@EAEAEA\firstoftwoarguments + \else + \@EAEAEA\secondoftwoarguments + \fi + \else + \@EA\firstoftwoarguments + \fi} + +\appendtoks + \let\rightorleftpageaction\doifrightpagefloatelse +\to \everyinsidefloat \newif\ifextrafloatactions \extrafloatactionstrue % \let\movesidefloat\gobbleoneargument -% new : \placefloat[leftmargin,-2*line] +% new : \place...[leftmargin,-2*line] \def\movesidefloat[#1]% {\bgroup @@ -304,7 +346,7 @@ \expanded{\dorepeatwithcommand[#1]}\domovesidefloat \egroup} -% or cleaner be longer: +% or cleaner but longer: % % \def\movesidefloat[#1]% % {\bgroup @@ -323,49 +365,97 @@ -\v!regel=>\movesidefloat-]} \def\xdocompletefloat#1#2#3#4#5#6% - {\ifextrafloatactions + {\ifextrafloatactions \let\@@extrafloat\empty % \sidefloatdownshift will be reset afterwards, and can % already be set at this point \processallactionsinset - [#4] - [\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, - % for old times sake - ininner=>\xxdocompletefloat\v!inlinker \v!inrechter, - inouter=>\xxdocompletefloat\v!inrechter \v!inlinker, - \s!unknown=>{\movesidefloat[\commalistelement]}]% + [#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, + ininner=>\xxdocompletefloat\v!inlinker \v!inrechter, + inouter=>\xxdocompletefloat\v!inrechter \v!inlinker, + \s!unknown=>{\movesidefloat[\commalistelement]}]% \ifx\@@extrafloat\empty - \setlocalfloatdimensions{#1}{#4}% - \docompletefloat{#1}{#2}{#3}{#4}{#5}{#6}{\box\nextbox}% + \docompletefloat{#1}{#2}{#3}{#4}{#5}{#6}\nextbox \else - \setlocalfloatdimensions{#1}{\@@extrafloat,#4}% - \docompletefloat{#1}{#2}{#3}{\@@extrafloat,#4}{#5}{#6}{\box\nextbox}% + \docompletefloat{#1}{#2}{#3}{\@@extrafloat,#4}{#5}{#6}\nextbox \fi \else % downward compatible - \docompletefloat{#1}{#2}{#3}{#4}{#5}{#6}{\box\nextbox}% + \docompletefloat{#1}{#2}{#3}{#4}{#5}{#6}\nextbox \fi} % pas op, maxbreedte niet instellen als plaats=links/rechts -\def\setlocalfloatdimensions#1#2% experimental ! ! ! ! - {\doifvaluesomething{\??fl#1\c!maxbreedte} - {\scratchdimen\getvalue{\??fl#1\c!maxbreedte}\relax - \ifdim\wd\nextbox>\scratchdimen - \setbox\nextbox\hbox to \scratchdimen - {\doifcommonelse{\v!rechts,\v!inrechter,\v!links,\v!inlinker}{#2} - {\doifnotcommon{\v!rechts,\v!inrechter}{#2}\hss - \box\nextbox - \doifnotcommon{\v!links ,\v!inlinker }{#2}\hss}% - {\doifvalue{\??fl#1\c!plaats}\v!rechts\hss - \box\nextbox - \doifvalue{\??fl#1\c!plaats}\v!links \hss}}% - \fi}} - +% \def\setlocalfloatdimensions#1#2#3#4% experimental / #3 box number #4 prefix +% {\ifextrafloatactions +% \doifvaluesomething{\??fl#1\c!minbreedte} +% {\scratchdimen\getvalue{\??fl#1\c!minbreedte}\relax +% \ifdim\wd#3<\scratchdimen +% #4\setbox#3\hbox to \scratchdimen +% {\doifnotvalue{\??fl#1\c!plaats}\v!links \hss +% \box#3% +% \doifnotvalue{\??fl#1\c!plaats}\v!rechts\hss}% +% \fi}% +% \doifvaluesomething{\??fl#1\c!maxbreedte} +% {\scratchdimen\getvalue{\??fl#1\c!maxbreedte}\relax +% \ifdim\wd#3>\scratchdimen +% #4\setbox#3\hbox to \scratchdimen +% {\doifcommonelse{\v!rechts,\v!inrechter,\v!links,\v!inlinker}{#2} +% {\doifnotcommon{\v!rechts,\v!inrechter}{#2}\hss +% \box#3% +% \doifnotcommon{\v!links ,\v!inlinker }{#2}\hss}% +% {\doifnotvalue{\??fl#1\c!plaats}\v!links\hss +% \box#3% +% \doifnotvalue{\??fl#1\c!plaats}\v!rechts\hss}}% +% \fi}% +% \fi} + +\def\setlocalfloatdimensions#1#2#3#4% experimental / #3 box number #4 prefix + {\global\sidefloatshift\zeropoint\relax % duplicate + \ifextrafloatactions +\ifdim\sidefloatdownshift=\zeropoint\else + \global\setbox\floatbox\vbox + {\vskip\sidefloatdownshift\nointerlineskip\box\floatbox}% +\fi +\global\sidefloatdownshift\zeropoint + \doifvaluesomething{\??fl#1\c!minbreedte} + {\scratchdimen\getvalue{\??fl#1\c!minbreedte}\relax + \ifdim\wd#3<\scratchdimen + #4\setbox#3\hbox to \scratchdimen + {\doifnotvalue{\??fl#1\c!plaats}\v!links \hss + \box#3% + \doifnotvalue{\??fl#1\c!plaats}\v!rechts\hss}% + \fi}% + \doifinset\v!hangend{#2} + {\doifcommonelse{\v!inlinker,\v!linkermarge}{#2} + {\letvalue{\??fl#1\c!maxbreedte}\leftmarginwidth}% + {\doifcommon{\v!inrechter,\v!rechtermarge}{#2} + {\letvalue{\??fl#1\c!maxbreedte}\rightmarginwidth}}}% + \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-\rightmargindistance} + {\doifcommonelse{\v!inlinker,\v!linkermarge}{#2} + {\global\sidefloatshift-\scratchdimen + \global\advance\sidefloatshift-\leftmargindistance} + {#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}}}}% + \fi}% + \fi} + \def\docomplexstarttekstblok[#1][#2][#3]% {\flushnotes \flushsidefloats % hoort eigenlijk niet hier @@ -396,10 +486,13 @@ [#1] [\c!breedte=15\korpsgrootte, \c!hoogte=10\korpsgrootte, + \c!minbreedte=, \c!maxbreedte=, \c!maxhoogte=, + \c!criterium=, \c!zijvoorwit=\@@bkzijvoorwit, \c!zijnawit=\@@bkzijnawit, + \c!zijuitlijnen=\@@bkzijuitlijnen, % \v!regel \c!marge=\@@bkmarge, \c!linkermargeafstand=\@@bklinkermargeafstand, \c!rechtermargeafstand=\@@bkrechtermargeafstand, @@ -481,8 +574,9 @@ \copylocalframed[\??fl#1][\??fl#3]% \copyparameters[\??fl#1][\??fl#3] [\c!breedte,\c!hoogte,%\c!lokaal, - \c!maxbreedte,\c!maxhoogte,\c!marge,\c!zijvoorwit,\c!zijnawit, - \c!linkermargeafstand,\c!rechtermargeafstand, + \c!maxbreedte,\c!maxhoogte,\c!minbreedte, + \c!marge,\c!zijvoorwit,\c!zijnawit,\c!zijuitlijnen, + \c!linkermargeafstand,\c!rechtermargeafstand,\c!criterium, \c!kader,\c!straal,\c!hoek,\c!plaats,\c!achtergrond,\c!kaderkleur, \c!achtergrondraster,\c!achtergrondkleur,\c!achtergrondoffset, \c!bovenkader,\c!onderkader,\c!linkerkader,\c!rechterkader, @@ -500,10 +594,10 @@ \def\placefloat % \plaatsplaatsblok {\dotripleempty\docomplexplaatsblok} -\installinsertion\topins \newdimen\topinserted -\installinsertion\botins \newdimen\botinserted +\installinsertion\topins \newdimen\topinserted +\installinsertion\botins \newdimen\botinserted -%D Extra float registers. +%D Extra float registers. \newif\ifsomefloatwaiting \somefloatwaitingfalse \newif\ifroomforfloat \roomforfloattrue @@ -529,6 +623,35 @@ \newdimen\floatwidth \newdimen\floatheight +% the tricky part of getting float related two pass data is +% that we should fetch is early but can only save it with +% the composed float box; this determines the order: get it +% before saving it + +\definetwopasslist{\s!float\s!data} \newcounter\noffloatdata + +\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} + % Er wordt bij \v!altijd als dat nodig is hernummerd. % Daarbij wordt gebruik gemaakt van de opgeslagen nummers en % volgorde. @@ -790,7 +913,7 @@ {\dp\floatbox\openstrutdepth}% dp\strutbox}% % toegevoegd \box\floatbox \blanko[\@@bknawit]% - \endgroup % ** + \endgroup % ** \doinsertfloatinfo} \def\somefacefloat[#1]% links, rechts, midden, hoog, midden, laag @@ -863,22 +986,22 @@ % andere commando's witruimte te onderdrukken \newdimen\floatsideskip \floatsideskip =12pt -\newdimen\floattopskip \floattopskip =\floattopskip -\newdimen\floatbottomskip \floatbottomskip=\floattopskip +\newdimen\floattopskip \floattopskip =\floattopskip +\newdimen\floatbottomskip \floatbottomskip=\floattopskip \newdimen\sidefloattopskip \sidefloattopskip =\floattopskip \newdimen\sidefloatbottomskip \sidefloatbottomskip=\floatbottomskip -\newskip\sidefloatdownshift -\newskip\sidefloatleftshift -\newskip\sidefloatrightshift +\newskip\sidefloatdownshift +\newskip\sidefloatleftshift +\newskip\sidefloatrightshift \def\sidefloattopoffset {\openstrutdepth} % {\dp\strutbox} \newcount\noftopfloats \noftopfloats=2 \newcount\nofbotfloats \nofbotfloats=0 -\newif\ifnofloatcaption +\newif\ifnofloatcaption \newif\ifnofloatnumber \newif\ifemptyfloatcaption @@ -896,7 +1019,7 @@ \docalculatefloatskip\sidefloattopskip {\getvalue{\??fl#1\c!zijvoorwit}}% \@@bkzijvoorwit \docalculatefloatskip\sidefloatbottomskip{\getvalue{\??fl#1\c!zijnawit}}% \@@bkzijnawit \gdef\sidefloattopoffset{\openstrutdepth}% was \def - \global\floatsideskip\getvalue{\??fl#1\c!marge}% + \global\floatsideskip\getvalue{\??fl#1\c!marge}% \global\sidefloatleftshift \getvalue{\??fl#1\c!linkermargeafstand}% \global\sidefloatrightshift\getvalue{\??fl#1\c!rechtermargeafstand}% \global\noftopfloats \@@bknboven\relax @@ -989,21 +1112,21 @@ {\noindent \xdef\floatcaptionnumber{#1}% \dostartattributes{\??kj#1}\c!letter\c!kleur\empty - \ifnofloatnumber + \ifnofloatnumber \else \hbox{\doattributes{\??kj#1}\c!kopletter\c!kopkleur{\strut#2\floatcaptionsuffix}}% - \ifnofloatcaption \else \ifemptyfloatcaption \else + \ifnofloatcaption \else \ifemptyfloatcaption \else \ifcase#4\relax \tfskip\emergencystretch.5em \else \ifx\@@kjkjtussen\empty\else\unskip\@@kjkjtussen\fi \fi - \fi \fi + \fi \fi \fi \ifnofloatcaption \else \doattributes{\??kj#1}\c!tekstletter\c!tekstkleur {\begstrut#3\endstrut\endgraf}% - \fi + \fi \dostopattributes} % new @@ -1048,7 +1171,7 @@ \egroup} \ifx\addlocalbackgroundtobox\undefined - \let\addlocalbackgroundtobox\gobbleoneargument + \def\addlocalbackgroundtobox{\resetglobal\gobbleoneargument}% \fi \def\dopreparenocaption#1#2#3#4% @@ -1275,7 +1398,7 @@ \fi\fi \ifdim\scratchdimen>\effectivehsize \donefalse - \fi + \fi \hss\ifdone\hskip\effectiveleftskip\fi \box\floatbox \ifdone\hskip\effectiverightskip\fi\hss}} @@ -1315,6 +1438,7 @@ \v!geen=>\box4, \s!unknown=>\box4\endgraf\@@kjkjtussen\box2]}% \fi + \doglobal\addlocalbackgroundtobox\floatbox \egroup} \newif\ifparfloat @@ -1332,7 +1456,9 @@ \else \@EA\dosetpagfloat % {#1}{#2}{#3}{#4}% \fi{#1}{#2}{#3}{#4}% - \setbox\floatbox\hbox{\restoretextcolor{\box\floatbox}}% + \setlocalfloatdimensions{#4}{#1}\floatbox\global % tzt arg 3/4 weg + \setbox\floatbox\hbox + {\dosavefloatdata\restoretextcolor{\box\floatbox}}% \global\floatheight\ht\floatbox \global\advance\floatheight \dp\floatbox \global\floatwidth\wd\floatbox @@ -1343,7 +1469,7 @@ \ifvoorlopig \inleftmargin{\framed{\infofont\the\totalnoffloats}}% \fi - \box\floatbox}}% + \box\floatbox}}% \wd\floatbox\floatwidth \dimen0=\floatheight \advance\dimen0 \lineheight @@ -1359,49 +1485,56 @@ \newcounter\noxfloatlocations -\def\dogetfloatbox#1% - {\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} +% \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}% - \dogetfloatbox{#1}}% + \doifelsevaluenothing{\??fl#4\c!criterium} + {\dogetfloatbox{#1}\empty} + {\ifdim\wd\floatbox>\getvalue{\??fl#4\c!criterium}\relax + \dogetfloatbox{#1}\v!hier + \else + \dogetfloatbox{#1}\empty + \fi}} \let\naturalfloatheight\!!zeropoint \let\naturalfloatwidth \!!zeropoint \let\naturalfloatdepth \!!zeropoint -\long\def\docompletefloat#1#2#3#4#5#6#7% +\long\def\docompletefloat#1#2#3#4#5#6#7% #7 = box number {\flushsidefloats \presetfloatvariables{#1}{#4}{#2}{#6}% \bgroup - \global\setbox\floatbox\vbox{#7}% -\xdef\naturalfloatheight{\the\ht\floatbox}% -\xdef\naturalfloatwidth {\the\wd\floatbox}% -\xdef\naturalfloatdepth {\the\dp\floatbox}% + %\setlocalfloatdimensions{#1}{#4}{#7}\relax + \global\setbox\floatbox\vbox{\box#7}% + \xdef\naturalfloatheight{\the\ht\floatbox}% + \xdef\naturalfloatwidth {\the\wd\floatbox}% + \xdef\naturalfloatdepth {\the\dp\floatbox}% \dimen0 \ht\floatbox \advance\dimen0 \dp\floatbox \ifdim\dimen0=\zeropoint @@ -1411,7 +1544,7 @@ \ifnofloatcaption \global\setbox\floatbox\vbox {\unvbox\floatbox - \vss % gets rid of the depth (unless tabulate) + \vss % gets rid of the depth (unless tabulate) \rawpagereference\s!flt{#2}}% \egroup \dofloat{#4}{}{#6}{#1}% @@ -1629,7 +1762,7 @@ \resetnummer[\??si]% \def\floatcaptionsuffix{\nummer[\??si]}% \TABLEcaptionheight=\@@siregels\lineheight % brrr - \simplifypagebreak % \page becomes \goodbreak + \simplifypagebreak % \page becomes \goodbreak \dowithnextbox {\forgetall \mindermeldingen @@ -1739,6 +1872,7 @@ \c!nawit=\v!groot, \c!zijvoorwit=\@@bkvoorwit, \c!zijnawit=\@@bknawit, + \c!zijuitlijnen=\v!normaal, \c!springvolgendein=\v!nee, \c!marge=1em, \c!linkermargeafstand=\zeropoint, @@ -1759,20 +1893,23 @@ \let\floatcolumn\empty \let\floatrow \empty -\def\dogetfloatbox#1% +\def\dogetfloatbox#1#2% {\ifvisible - \getfromcommalist[#1][1]% - \@EA\beforesplitstring\commalistelement\at:\to\floatmethod - \@EA\aftersplitstring \commalistelement\at:\to\floatcolumn - \@EA\aftersplitstring \floatcolumn\at*\to\floatrow - \@EA\beforesplitstring\floatcolumn\at*\to\floatcolumn - % todo: nog algemeen otr - \ifx\OTRSETsetpreferedcolumnslot\undefined\else - \OTRSETsetpreferedcolumnslot\floatcolumn\floatrow - \fi - % commando van maken + \doifelsenothing{#2} + {\getfromcommalist[#1][1]% + \@EA\beforesplitstring\commalistelement\at:\to\floatmethod + \@EA\aftersplitstring \commalistelement\at:\to\floatcolumn + \@EA\aftersplitstring \floatcolumn\at*\to\floatrow + \@EA\beforesplitstring\floatcolumn\at*\to\floatcolumn + % todo: nog algemeen otr + \ifx\OTRSETsetpreferedcolumnslot\undefined\else + \OTRSETsetpreferedcolumnslot\floatcolumn\floatrow + \fi} + {\let\floatcolumn\empty + \let\floatrow\empty + \edef\floatmethod{#2}}% \doifundefined{\string\floatmethod\floatmethod} - {\let\floatmethod\v!hier}% + {\let\floatmethod\v!hier}% \getvalue{\string\floatmethod\floatmethod}[#1]% \fi} @@ -1787,8 +1924,8 @@ \installfloathandler \v!boven \sometopfloat \installfloathandler \v!onder \somebottomfloat \installfloathandler \v!marge \somemarginfloat -\installfloathandler \v!pagina \somepagefloat \installfloathandler \v!naast \somefacefloat +\installfloathandler \v!pagina \somepagefloat \installfloathandler \v!inmarge \someinmarginfloat \installfloathandler \v!inlinker \someinleftmarginfloat \installfloathandler \v!inrechter \someinrightmarginfloat diff --git a/tex/context/base/page-imp.tex b/tex/context/base/page-imp.tex index cff58acf5..1ea17741a 100644 --- a/tex/context/base/page-imp.tex +++ b/tex/context/base/page-imp.tex @@ -315,14 +315,26 @@ {\dosetuparrangement{2}{1}{8}{3}{2}% \pusharrangedpageSIXTEENFOUR\poparrangedpagesAtoH\relax} +% \def\filluparrangedpages % beware: \realpageno is 1 ahead +% {\ifarrangingpages +% \scratchcounter-\realpageno +% \divide\scratchcounter \arrangedpageT +% \multiply\scratchcounter \arrangedpageT +% \advance\scratchcounter \realpageno +% \advance\scratchcounter \minusone +% \dorecurse\scratchcounter{\noheaderandfooterlines\ejectdummypage}% +% \fi} + \def\filluparrangedpages % beware: \realpageno is 1 ahead {\ifarrangingpages - \scratchcounter-\realpageno - \divide\scratchcounter \arrangedpageT - \multiply\scratchcounter \arrangedpageT - \advance\scratchcounter \realpageno + \scratchcounter\realpageno \advance\scratchcounter \minusone - \dorecurse\scratchcounter{\noheaderandfooterlines\ejectdummypage}% + \dosetmodulo\scratchcounter\arrangedpageT\scratchcounter + \ifcase\scratchcounter\else + \advance\scratchcounter \plusone + \dostepwiserecurse\scratchcounter\arrangedpageT\plusone + {\noheaderandfooterlines\ejectdummypage}% + \fi \fi} \def\handlearrangedpageXandY#1#2#3#4#5% diff --git a/tex/context/base/page-ini.tex b/tex/context/base/page-ini.tex index 55d55ebef..bd1235a21 100644 --- a/tex/context/base/page-ini.tex +++ b/tex/context/base/page-ini.tex @@ -382,6 +382,12 @@ \def\realfolio{\the\realpageno} \fi + +\newcount\nofshipouts + +\appendtoks + \global\advance\nofshipouts\plusone +\to \everyaftershipout % principle: % @@ -1517,7 +1523,7 @@ {\executecolumnbreakhandler\v!ja} \def\complexcolumnbreak[#1]% if empty, do nothing and avoid processing - {\doifsomething{#1}{\bgroup\executecolumnbreakhandlers{#1}\egroup}} + {\doifsomething{#1}{\executecolumnbreakhandlers{#1}}} \def\executecolumnbreakhandlers#1% {\processcommacommand[#1]\executecolumnbreakhandler} @@ -1653,9 +1659,11 @@ \dp\registertextbox\dp\strutbox \fi \dp\registertextbox\dp\strutbox % needed + %\setbox\registertextbox\hbox + % {\iftracetextareas\gray\boxrulewidth2pt\ruledhbox\fi + % {\registerMPtextarea{\box\registertextbox}}}% \setbox\registertextbox\hbox - {\iftracetextareas\gray\boxrulewidth2pt\ruledhbox\fi - {\registerMPtextarea{\box\registertextbox}}}% + {\registerMPtextarea{\box\registertextbox}}% \smashbox\registertextbox \box\registertextbox \fi \fi diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex index 2669585b0..f6c0d33be 100644 --- a/tex/context/base/page-lay.tex +++ b/tex/context/base/page-lay.tex @@ -13,6 +13,8 @@ \writestatus{loading}{Context Page Macros / Layout Specification} +% swapmargins will disappear, and be replaced by inner/outer + % to be translated into english % hoofdhoogte wordt bij status=hoog niet aangepast op outer @@ -180,12 +182,12 @@ \iffixedlayoutdimensions \def\layoutdistance#1#2% - {\ifdim\zeropoint<#1\layoutparameter#2\else\zeropoint\fi} + {\ifdim\zeropoint<#1\layoutparameter#2\else\zeropoint \fi} \else \def\layoutdistance#1#2% - {\ifdim\!!zeropoint<#1\layoutparameter#2\else\!!zeropoint\fi} + {\ifdim\zeropoint<#1\layoutparameter#2\else\!!zeropoint\fi} \fi @@ -493,11 +495,11 @@ \global\snijwit\papierbreedte \global\advance\snijwit-\zetbreedte \global\advance\snijwit-\rugwit - \else - % inconsistent specification -\global\rugwit\papierbreedte -\global\advance\rugwit-\zetbreedte -\global\advance\rugwit-\snijwit + % \else + % A kind of inconsistent specification, but used + % in for instance s-pre-19.tex; the cutspace is + % used only for determining some kind of right + % margin; don't use this in doublesided mode \fi}}% \scratchdimen\layoutparameter\c!bodemwit\relax %\ifdim\scratchdimen=\zeropoint @@ -560,6 +562,8 @@ \recalculatelogos \recalculatebackgrounds} +\newtoks \everylayoutcalculation \relax + \def\calculatepseudocolumns {\global\layoutcolumns\layoutparameter\c!kolommen \global\layoutcolumndistance\layoutparameter\c!kolomafstand @@ -1072,6 +1076,32 @@ {\rightorleftpageaction\rechterrandafstand\linkerrandafstand} \def\inneredgedistance {\rightorleftpageaction\linkerrandafstand\rechterrandafstand} + +\beginETEX \dimexpr + + \def\leftmargintotal {\dimexpr(\linkermargebreedte +\linkermargeafstand )} + \def\rightmargintotal{\dimexpr(\rechtermargebreedte+\rechtermargeafstand)} + \def\leftedgetotal {\dimexpr(\linkerrandbreedte +\linkerrandafstand )} + \def\rightedgetotal {\dimexpr(\rechterrandbreedte +\rechterrandafstand )} + + \def\leftsidetotal {\dimexpr(\leftmarginwidth +\leftedgetotal )} + \def\rightsidetotal {\dimexpr(\rightmarginwidth +\rightedgetotal)} + + \def\leftcombitotal {\dimexpr(\leftmargintotal +\leftedgetotal )} + \def\rightcombitotal {\dimexpr(\rightmargintotal +\rightedgetotal)} + + \def\innermargintotal{\dimexpr(\innermarginwidth +\innermargindistance)} + \def\outermargintotal{\dimexpr(\outermarginwidth +\outermargindistance)} + \def\inneredgetotal {\dimexpr(\inneredgewidth +\inneredgedistance )} + \def\outeredgetotal {\dimexpr(\outeredgewidth +\outeredgedistance )} + + \def\innercombitotal {\dimexpr(\innermargintotal +\inneredgetotal)} + \def\outercombitotal {\dimexpr(\outermargintotal +\outeredgetotal)} + + \def\innersidetotal {\dimexpr(\innermarginwidth + \inneredgetotal)} + \def\outersidetotal {\dimexpr(\outermarginwidth + \outeredgetotal)} + +\endETEX %D \macros %D {startlocallayout} @@ -1102,11 +1132,13 @@ %D \showsetup{\y!showframe} %D \showsetup{\y!showlayout} %D \showsetup{\y!showsetups} +%D \showsetup{\y!showmargins} -\fetchruntimecommand \showprint {page-run} -\fetchruntimecommand \showframe {page-run} -\fetchruntimecommand \showlayout {page-run} -\fetchruntimecommand \showsetups {page-run} +\fetchruntimecommand \showprint {page-run} +\fetchruntimecommand \showframe {page-run} +\fetchruntimecommand \showlayout {page-run} +\fetchruntimecommand \showsetups {page-run} +\fetchruntimecommand \showmargins {page-run} %D The default dimensions are quite old and will not change. %D The funny fractions were introduced when we went from fixed diff --git a/tex/context/base/page-run.tex b/tex/context/base/page-run.tex index 963426621..3709bc869 100644 --- a/tex/context/base/page-run.tex +++ b/tex/context/base/page-run.tex @@ -380,5 +380,15 @@ \setuplayout[\c!markering=\v!aan] \dorecurse{4}{\showsetups\pagina} \egroup} + +\gdef\showmargins + {\starttabulate + \NC asynchrone \NC \doifoddpageelse {odd} {even} \NC \NR + \NC synchrone \NC \doifrightpageelse {right} {left} \NC \NR + \NC right margin \NC \the\rightmarginwidth \NC \NR + \NC left margin \NC \the\leftmarginwidth \NC \NR + \NC outer margin \NC \the\outermarginwidth \NC \NR + \NC inner margin \NC \the\innermarginwidth \NC \NR + \stoptabulate} \protect \endinput diff --git a/tex/context/base/page-set.tex b/tex/context/base/page-set.tex index 2ec3de97b..f67abb84f 100644 --- a/tex/context/base/page-set.tex +++ b/tex/context/base/page-set.tex @@ -13,6 +13,8 @@ % getnoflines vs getrawnoflines +% some day: cleanup + \writestatus{loading}{Context OTR Macros / Column Sets} % todo : last longer than previous @@ -251,6 +253,7 @@ {\hbox\bgroup \dontcomplain \forgetall % can go once in \flush + \OTRSETregisterbalancing \ifbalancecolumns \ifnum\realpageno=\balancingpageno\relax \!!heighta \localcolumnmaxcells\lineheight @@ -269,7 +272,8 @@ \localcolumnwidth\OTRSETlocalwidth\mofcolumns \setbox\scratchbox\hbox\localframed [\??mc\OTRSETidentifier\number\mofcolumns]% - [\c!breedte=\localcolumnwidth,\c!hoogte=\!!heighta,\c!regels=]% + [\c!breedte=\localcolumnwidth,\c!hoogte=\!!heighta, + \c!regels=]% {}% \wd\scratchbox\localcolumnwidth \ht\scratchbox\!!heighta @@ -328,17 +332,6 @@ \global\lastcolumnlastcell\zerocount \fi} -%\def\OTRSETdoflush -% {\ifcollectingcontent -% \global\mofcolumns=1 -% \else -% \OTRSETdofinalflush -% \OTRSETinitializecolumns -% \OTRSETmanualbalance % or after \startnextpage -% %\OTRSETdoflushfloats -% \OTRSETstartnextpage -% \fi} - \def\OTRSETdoflush {\ifcollectingcontent \global\mofcolumns\plusone @@ -346,10 +339,9 @@ \OTRSETdofinalflush \OTRSETdofinaloutput \OTRSETinitializecolumns - \OTRSETmanualbalance % or after \startnextpage %\OTRSETdoflushfloats \OTRSETstartnextpage -\initializecolumntextareas + \initializecolumntextareas \fi} %\def\OTRSETdofinalflush % see \OTRSETdoflush @@ -375,20 +367,24 @@ \def\OTRSETdofinaloutput {\ifdim\ht\OTRfinalpagebox=\teksthoogte - \finaloutput\box\OTRfinalpagebox + % \bgroup \let\OTRSETsetvsize\relax % prevents useless search for gap + \finaloutput\box\OTRfinalpagebox + % \egroup + \fi} + +\newcounter\OTRSETnofbalanced + +\def\OTRSETregisterbalancing + {\ifcase\OTRSETfinish \or + \global\chardef\OTRSETfinish\plustwo + \doglobal\increment\OTRSETnofbalanced + \expanded{\writeutilitycommand + {\noexpand\twopassentry{\s!colset}{\OTRSETnofbalanced}{\noexpand\realfolio}}}% \fi} -\let\OTRSETbalancinglist\empty - -\appendtoks \OTRSETflushbalancinglist \to \everystoptext - -\def\OTRSETflushbalancinglist - {\scratchcounter\zerocount - \def\docommando##1% - {\advance\scratchcounter \plusone - \immediatewriteutilitycommand - {\twopassentry{\s!colset}{\the\scratchcounter}{##1}}}% - \processcommacommand[\OTRSETbalancinglist]\docommando} +\def\OTRSETresetbalancing + {\doglobal\newcounter\balancingpageno + \global\chardef\OTRSETfinish\zerocount} \definesystemvariable {mc} \definesystemvariable {mt} @@ -424,9 +420,20 @@ \tekstbreedte\localcolumnwidth \hsize\localcolumnwidth} -\def\OTRSETsynchronizehsize - {\doifnotvalue{\??mc\OTRSETidentifier\the\mofcolumns\c!breedte}\v!passend - \OTRSETsethsize} +%\def\OTRSETsynchronizehsize +% {\doifnotvalue{\??mc\OTRSETidentifier\the\mofcolumns\c!breedte}\v!passend +% \OTRSETsethsize} + +\def\OTRSETsynchronizehsize + {\ifcase0\getvalue{\??mc\??mc\c!breedte}\else % some width set + \bgroup + \scratchdimen\OTRSETlocalwidth\mofcolumns + \ifdim\scratchdimen=\tekstbreedte + \egroup + \else + \egroup \OTRSETsethsize % only if change in width and \column/\break + \fi + \fi } \def\OTRSETcheckfreelines {\OTRSETsetvsize} @@ -439,37 +446,76 @@ \def\showbreaks {\let\OTRSETcolumnseparator\doOTRSETcolumnseparator} -\installcolumnbreakhandler {SET} \v!ja - {% hmmm: - \ifhmode +% \installcolumnbreakhandler {SET} \v!ja +% {% hmmm: +% \ifhmode +% \bgroup +% \removeunwantedspaces +% \parfillskip\zeropoint +% \OTRSETcolumnseparator +% \par +% \egroup +% \fi +% % brrr: +% \ejectinsert +% \ejectpage +% \OTRSETsynchronizehsize} % no \OTRSETsethsize, can be mid smaller (like tabulate) +% +% \installcolumnbreakhandler {SET} \v!forceer +% {\OTRSETgotocolumn[\v!forceer]} +% \installcolumnbreakhandler {SET} \v!eerste +% {\OTRSETgotocolumn[\v!eerste]} +% \installcolumnbreakhandler {SET} \v!laatste +% {\OTRSETgotocolumn[\v!laatste]} +% +% \installcolumnbreakhandler {SET} \v!pagina +% {\simplepagebreak % \flushnotes \executepagebreakhandler\v!ja +% \ifnum\mofcolumns>\plusone +% \OTRSETgotocolumn[\v!laatste,\v!forceer]% +% \fi} + +\def\OTRSETcolumnhbreak + {\ifhmode \bgroup \removeunwantedspaces \parfillskip\zeropoint \OTRSETcolumnseparator \par \egroup - \fi - % brrr: + \fi} + +\installcolumnbreakhandler {SET} \v!lokaal + {\OTRSETcolumnhbreak \ejectinsert - \ejectpage + \ejectpage % brrr \OTRSETsynchronizehsize} % no \OTRSETsethsize, can be mid smaller (like tabulate) -% \installcolumnbreakhandler {SET} \v!forceer -% {\OTRSETgotocolumn[\v!forceer]} -% \installcolumnbreakhandler {SET} \v!eerste -% {\OTRSETgotocolumn[\v!eerste]} -% \installcolumnbreakhandler {SET} \v!laatste -% {\OTRSETgotocolumn[\v!laatste]} +% We need to make sure that we really leave the column; mid +% column we may end up in an empty gap, and we don;t want to +% stay there (basically such a gap is a small empty page +% then). + +\installcolumnbreakhandler {SET} \v!ja + {\OTRSETcolumnhbreak + \edef\savedmofcolumns{\the\mofcolumns}% + \edef\savedrealpageno{\the\realpageno}% + \ejectinsert + \ejectpage % brrr + \doloop + {\ifnum\savedmofcolumns=\mofcolumns + \ifnum\savedrealpageno=\realpageno + \OTRSETdummycolumn + \else + \exitloop + \fi + \else + \exitloop + \fi}% + \OTRSETsynchronizehsize} \installcolumnbreakhandler {SET} \s!unknown {\expanded{\OTRSETgotocolumn[\@@columnspecification]}} -% \installcolumnbreakhandler {SET} \v!pagina -% {\simplepagebreak % \flushnotes \executepagebreakhandler\v!ja -% \ifnum\mofcolumns>\plusone -% \OTRSETgotocolumn[\v!laatste,\v!forceer]% -% \fi} - \installcolumnbreakhandler {SET} \v!pagina {\vfill\eject % \doejectpage\eject \OTRSETgotonextpage} @@ -573,6 +619,23 @@ \appendtoks \OTRSETflushsavednotes \to \OTRSETeverystartofcolumn +% \def\OTRSETnaturalflush +% {\bgroup +% \forgetall % new, needed ! +% \setbox0\vbox to \columnfreecells\lineheight +% {\vskip-\topskip +% \vskip\lineheight +% \prevdepth\dp\strutbox +% \unvbox\normalpagebox +% \vfill}% +% \setbox2\hbox +% {\OTRSETplacebottomnotes}% +% \setbox\scratchbox\hbox +% {\wd0\zeropoint\box0\box2}% +% \dp\scratchbox\dp\strutbox +% \OTRSEThandleflushedtext1 +% \egroup} + \def\OTRSETnaturalflush {\bgroup \forgetall % new, needed ! @@ -587,7 +650,20 @@ \setbox\scratchbox\hbox {\wd0\zeropoint\box0\box2}% \dp\scratchbox\dp\strutbox - \OTRSEThandleflushedtext1 + \donetrue + \ifbalancecolumns \ifcase\OTRSETfinish \or \or + % we're in the second balance loop in this column set, + % so we have to preserve the previous and discard the rest + \donefalse + \fi \fi + \ifdone + \OTRSEThandleflushedtext1 + \else + \writestatus + {columnset} + {check balancing values of '\OTRSETidentifier', text discarded!}% + \wait % better wait than get lost, esp with two balances per page + \fi \egroup} \newcount\lastcolumnlastcell @@ -609,7 +685,8 @@ \OTRSETfillgapsbetweencells\mofcolumns\columnlastcell \fi \OTRSETfindnextgap - % \message{\the\mofcolumns,\the\columnfirstcell,\the\columnfreecells}\wait + % \message{\the\mofcolumns,\the\columnfirstcell,\the\columnfreecells}% + % \wait % we cannot adapt the hsize since it may have changed (like % inside a tabulate) so we only change it when there is a % reason to do so @@ -1216,6 +1293,7 @@ \c!afstand=1.5\bodyfontsize, % controleren \c!nlinks=\getvalue{\??mc#1\c!n}, \c!nrechts=\getvalue{\??mc#1\c!n}, + \c!regels=0, #2]% \redodefinecolumnset[#1]} @@ -1234,6 +1312,7 @@ [\c!offset=\v!overlay, \c!kader=\v!uit, \c!uitlijnen=, + \c!regels=0,% really needed since c!regels is now part of framed \c!afstand=\getvalue{\??mc#1\c!afstand}]} \def\setupcolumnset @@ -1345,30 +1424,26 @@ \newcounter\columnsetlevel \let\currentcolumnset\empty +\chardef\OTRSETfinish\zerocount \def\startcolumnset {\dodoubleempty\dostartcolumnset} \def\dostartcolumnset[#1][#2]% {\increment\columnsetlevel\relax - \doglobal\newcounter\balancingpageno + \OTRSETresetbalancing \globallet\localcolumnmaxcells\!!zerocount \ifnum\columnsetlevel=\plusone - %\OTRSETgetmanualbalance \bgroup \def\currentcolumnset{#2}% - %\doifelsenothing{#2} - % {\def\currentcolumnset{#1}}% - % {\def\currentcolumnset{#2}}% - %\global\let\OTRSETidentifier\currentcolumnset \binnenkolommentrue % will be different flag - %\let\redofloatorder\gobbleoneargument % will also be a flag \activateotr{SET}{ONE}% andere naam, activate or so \doifelsenothing{#1} {\globallet\OTRSETlist\s!default} {\xdef\OTRSETlist{#1}}% \OTRSETstartnextpage - \OTRSETgetmanualbalance % here + \OTRSETloadbalancing % here + \OTRSETinitbalancing \OTRSETassignwidths \OTRSETsethsize \else @@ -1379,7 +1454,6 @@ % {\relax % \ifnum\columnsetlevel=\plusone % \par -% \OTRSETsetmanualbalance % \dostopcolumnset % \egroup % \global\footnotelimittrue @@ -1402,8 +1476,8 @@ \def\stopcolumnset {\relax \ifnum\columnsetlevel=\plusone + \global\chardef\OTRSETfinish\plusone \pagebreak - \OTRSETsetmanualbalance \dostopcolumnset \egroup \global\footnotelimittrue @@ -1412,11 +1486,12 @@ \ifvoid\OTRfinalpagebox\else % probably balanced \ifdim\ht\OTRfinalpagebox<\teksthoogte - \snaptogrid[\v!pagina]\hbox{\box\OTRfinalpagebox} + \snaptogrid[\v!pagina]\hbox{\box\OTRfinalpagebox}% \else \box\OTRfinalpagebox \fi \fi + \global\chardef\OTRSETfinish\zerocount \ifsomefloatwaiting \setvsize \pagina \setvsize \fi \else \egroup @@ -1436,38 +1511,86 @@ \def\localcolumnmaxcells{0} -\def\OTRSETmanualbalance +% currently line represents real line, i.e. on the grid, and +% not something noflines (also, watch out for switching from +% 2-3 columns on one page with both sets balanced: the +% second set does not see the first set + +\chardef\OTRSETbottombalance\zerocount + +% \def\OTRSETinitbalancing +% {\ifbalancecolumns +% \let\savedcolumnmaxcells\columnmaxcells +% \ifnum\realpageno=\balancingpageno\relax +% \ifnum\mofcolumns=\plusone +% \dorecurse\nofcolumns +% {\!!counta\recurselevel\relax +% \!!countb\getvalue{\??mc\OTRSETidentifier\number\!!counta\c!regels}\relax +% \ifcase\!!countb +% \!!countb\getvalue{\??mc\OTRSETidentifier\c!regels}\relax +% \fi +% \ifcase\!!countb +% \!!countb \savedcolumnmaxcells\relax +% \fi +% % can be an option: absolute versus relative +% \advance\!!countb\precolumnlines +% \ifnum\!!countb>\localcolumnmaxcells\relax +% \xdef\localcolumnmaxcells{\the\!!countb}% +% \fi +% \advance\!!countb \plusone +% \dostepwiserecurse\!!countb\columnmaxcells\plusone +% {\ifvoid\OTRSETgridcell\!!counta\recurselevel +% \OTRSETsetgridcell\!!counta\recurselevel\copy\placeholderboxe +% \fi}}% +% \OTRSETsetvsize % ! ! ! +% \fi +% \fi +% \fi} + +\def\OTRSETinitbalancing {\ifbalancecolumns \let\savedcolumnmaxcells\columnmaxcells \ifnum\realpageno=\balancingpageno\relax \ifnum\mofcolumns=\plusone \dorecurse\nofcolumns - {\!!counta\recurselevel - \!!countb\balancingcolumnmaxcells\!!counta\relax - \ifnum\!!countb>\localcolumnmaxcells - \xdef\localcolumnmaxcells{\the\!!countb}% + {\!!counta\recurselevel\relax + \!!countb\getvalue{\??mc\OTRSETidentifier\number\!!counta\c!regels}\relax + \ifcase\!!countb + \!!countb\getvalue{\??mc\OTRSETidentifier\c!regels}\relax + \fi + \ifcase\!!countb + \!!countb \savedcolumnmaxcells\relax \fi - \advance\!!countb \plusone - \dostepwiserecurse\!!countb\columnmaxcells\plusone - {\OTRSETsetgridcell\!!counta\recurselevel\copy\placeholderboxe}}% + % can be an option: absolute versus relative + \ifcase\OTRSETbottombalance + \advance\!!countb\precolumnlines + \ifnum\!!countb>\localcolumnmaxcells\relax + \xdef\localcolumnmaxcells{\the\!!countb}% + \fi + \advance\!!countb \plusone + \dostepwiserecurse\!!countb\columnmaxcells\plusone + {\ifvoid\OTRSETgridcell\!!counta\recurselevel + \OTRSETsetgridcell\!!counta\recurselevel\copy\placeholderboxe + \fi}% + \else + \globallet\localcolumnmaxcells\columnmaxcells + \advance\!!countb-\columnmaxcells + \!!countb-\!!countb + \advance\!!countb \minusone + \ifnum\!!countb>\zerocount + \dostepwiserecurse\plusone\!!countb\plusone + {\ifvoid\OTRSETgridcell\!!counta\recurselevel + \OTRSETsetgridcell\!!counta\recurselevel\copy\placeholderboxe + \fi}% + \fi + \fi}% + \OTRSETsetvsize % ! ! ! \fi \fi \fi} -\def\balancingcolumnmaxcells#1% pas op: etex - {\ifcsname\??mc\OTRSETidentifier\number#1\c!regels\endcsname - \csname\??mc\OTRSETidentifier\number#1\c!regels\endcsname - \else\ifcsname\??mc\OTRSETidentifier\c!regels\endcsname - \csname\??mc\OTRSETidentifier\c!regels\endcsname - \else - \savedcolumnmaxcells - \fi\fi} - -\def\OTRSETsetmanualbalance - {\doglobal\addtocommalist\realfolio\OTRSETbalancinglist} - -\def\OTRSETpresetmanualbalance - {\doifdefined{\??mc\OTRSETidentifier\c!regels} +\def\OTRSETpresetbalancing + {\doifvaluesomething{\??mc\OTRSETidentifier\c!regels}% {\getcommacommandsize[\csname\??mc\OTRSETidentifier\c!regels\endcsname]% \ifnum\commalistsize>\plusone \scratchcounter\zerocount @@ -1476,17 +1599,18 @@ \setvalue{\??mc\OTRSETidentifier\the\scratchcounter\c!regels}{##1}}% \processcommacommand [\csname\??mc\OTRSETidentifier\c!regels\endcsname]\docommando + \setvalue{\??mc\OTRSETidentifier\c!regels}{0}% \fi}} -\def\OTRSETgetmanualbalance +\def\OTRSETloadbalancing {\gettwopassdata\s!colset \iftwopassdatafound - \OTRSETpresetmanualbalance + \OTRSETpresetbalancing \global\let\balancingpageno\twopassdata \else \doglobal\newcounter\balancingpageno \fi - \global\balancingcolumnsfalse} + \global\balancingcolumnsfalse} % not really used yet %\def\OTRSETnobalance % {\iflastcolumnfootnotes % testen ! optie @@ -1527,7 +1651,7 @@ \doglobal\replaceincommalist\OTRSETlist1% \OTRSETrestart}} -\def\OTRSETrestart% weed +\def\OTRSETrestart % weed {\OTRSETinitializefeatures \OTRSETflushpreposttext \OTRSETinitializecolumns @@ -1556,9 +1680,15 @@ {\chardef\columndirection\zerocount} {\chardef\columndirection\plusone}% % balancing - \doifelsevalue{\??mc\OTRSETidentifier\c!balanceren}\v!ja - {\balancecolumnstrue} - {\balancecolumnsfalse}} + \balancecolumnsfalse + \chardef\OTRSETbottombalance\zerocount + \processaction + [\getvalue{\??mc\OTRSETidentifier\c!balanceren}] + [ \v!ja=>\balancecolumnstrue, + \v!onder=>\chardef\OTRSETbottombalance\plusone + \balancecolumnstrue, + \v!boven=>%chardef\OTRSETbottombalance\zerocount + \balancecolumnstrue]} % keep 'm for a while % @@ -1586,30 +1716,82 @@ % \input tufte % \startcolumnset[two] \input tufte \stopcolumnset % \stoptext +% +% \installoutput\OTRSETflushpreposttext +% {\global\setbox\precolumnbox\vbox{\unvbox\normalpagebox}% +% \global\dp\precolumnbox\strutdepth +% \ifcarryoverfootnotes \else +% \global\setbox\postcolumnbox\vbox{\placebottomnotes}% +% \fi} + +% test: +% +% \definecolumnset[two] [n=2,balance=yes] +% \definecolumnset[three][n=3,balance=yes] +% \setupcolumnset [two] [1] [lines=10] +% \setupcolumnset [two] [2] [lines=10] +% +% \startcolumnset[two] \dorecurse{14}{\input tufte \par} \stopcolumnset +% \startcolumnset[three] \dorecurse{12}{\input tufte \par} \stopcolumnset +% +% with: +% +% \installoutput\OTRSETflushpreposttext +% {%\ifvoid\normalpagebox +% % \global\setbox\precolumnbox\vbox{}% +% %\else +% \global\setbox\precolumnbox\vbox +% {\unvcopy\normalpagebox}% +% \global\setbox\precolumnbox\vbox to \ht\precolumnbox +% {\box\normalpagebox}% +% %\fi +% \global\dp\precolumnbox\strutdepth +% \ifcarryoverfootnotes \else +% \global\setbox\postcolumnbox\vbox{\placebottomnotes}% +% \fi} + +% testcase : pascal demo-bbi, paragraaf/aanduiding koppen + +\ifx\lastskipinotr\undefined \newskip\lastskipinotr \fi \installoutput\OTRSETflushpreposttext - {\global\setbox\precolumnbox\vbox{\unvbox\normalpagebox}% + {\global\setbox\precolumnbox\vbox + {\unvbox\normalpagebox + \global\lastskipinotr\lastskip}% + \ifdim\lastskipinotr>\zeropoint + \global\setbox\precolumnbox\hbox + {\lower\strutdepth\box\precolumnbox}% + \fi \global\dp\precolumnbox\strutdepth \ifcarryoverfootnotes \else \global\setbox\postcolumnbox\vbox{\placebottomnotes}% \fi} +\let\precolumnlines \!!zerocount +\let\postcolumnlines\!!zerocount + \def\OTRSEThandlepreposttext {\ifdim\ht\precolumnbox>\zeropoint % new \getnoflines{\ht\precolumnbox}% + \edef\precolumnlines{\the\noflines}% \doOTRSETsetgridcells {\copy\placeholderboxe} \plusone\plusone\nofcolumns\noflines {\box\precolumnbox}% + \else + \let\precolumnlines\!!zerocount \fi \ifdim\ht\postcolumnbox>\zeropoint % new, otherwise empty bottom line \getnoflines{\ht\postcolumnbox}% + \edef\postcolumnlines{\the\noflines}% \advance\columnfreecells -\noflines \advance\columnfreecells \plusone \doOTRSETsetgridcells {\copy\placeholderboxe} \plusone\columnfreecells\nofcolumns\noflines {\box\postcolumnbox}% + \else + \let\postcolumnlines\!!zerocount \fi} \def\OTRSETchecksidefloat @@ -1993,33 +2175,82 @@ \def\columntextlastbackspace{\rugwit} +% \def\dodoplacecolumntextareas#1#2% +% {\!!counta\getvalue{\??mt#1#2\c!x}% +% \!!countb\getvalue{\??mt#1#2\c!nx}% +% \docalculatecolumnsetspan +% \!!heighta\getvalue{\??mt#1#2\c!ny}\lineheight +% % to do: met/zonder ht/dp +% \ifnum\getvalue{\??mt#1#2\c!y}=\zerocount +% \advance\!!heighta -\lineheight +% \advance\!!heighta \topskip +% \fi +% \advance\!!heighta -\lineheight % option +% \setbox\scratchbox\vbox +% {\donetrue\localframed +% [\??mt#1#2] +% [\c!breedte=\!!widtha,\c!hoogte=\!!heighta,\c!regels=] +% {\getvalue{\??mt#1#2}}}% +% \!!counta\getvalue{\??mt#1#2\c!x}% +% \!!countb\getvalue{\??mt#1#2\c!y}% +% \advance\!!countb \getvalue{\??mt#1#2\c!ny}% +% \advance\!!countb \minusone +% \OTRSETsetgridcell +% \!!counta\!!countb +% \hbox{\clip +% [\c!breedte=\!!widthb,\c!hoogte=\!!heighta]% +% {\copy\scratchbox}}% +% \ifcase\!!countc\else +% \advance\!!counta \getvalue{\??mt#1#2\c!nx}% +% \advance\!!counta -\!!countc +% \advance\!!widtha -\!!widthb +% \OTRSETsetgridcell +% \!!counta\!!countb +% \hbox +% {\hskip-\namedlayoutparameter\v!oneven\c!rugwit +% \clip +% [\c!breedte=\!!widtha,\c!hoogte=\!!heighta, +% \c!hoffset=\!!widthb] +% {\copy\scratchbox}}% +% \fi} + +% beware, we have clipping offsets of 2\lineheight by default + +\def\columntextareaparameter#1% + {\csname\??mt\currentcolumntestarea#1\endcsname} + \def\dodoplacecolumntextareas#1#2% - {\!!counta\getvalue{\??mt#1#2\c!x}% - \!!countb\getvalue{\??mt#1#2\c!nx}% + {\def\currentcolumntestarea{#1#2}% + \!!counta\columntextareaparameter\c!x + \!!countb\columntextareaparameter\c!nx \docalculatecolumnsetspan - \!!heighta\getvalue{\??mt#1#2\c!ny}\lineheight + \!!heighta\columntextareaparameter\c!ny\lineheight % to do: met/zonder ht/dp - \ifnum\getvalue{\??mt#1#2\c!y}=\zerocount + \ifnum\columntextareaparameter\c!y=\zerocount \advance\!!heighta -\lineheight \advance\!!heighta \topskip \fi \advance\!!heighta -\lineheight % option \setbox\scratchbox\vbox {\donetrue\localframed - [\??mt#1#2] + [\??mt\currentcolumntestarea] [\c!breedte=\!!widtha,\c!hoogte=\!!heighta,\c!regels=] - {\getvalue{\??mt#1#2}}}% - \!!counta\getvalue{\??mt#1#2\c!x}% - \!!countb\getvalue{\??mt#1#2\c!y}% - \advance\!!countb \getvalue{\??mt#1#2\c!ny}% + {\columntextareaparameter\empty}}% + \!!counta\columntextareaparameter\c!x + \!!countb\columntextareaparameter\c!y + \advance\!!countb \columntextareaparameter\c!ny \advance\!!countb \minusone \OTRSETsetgridcell \!!counta\!!countb \hbox{\clip - [\c!breedte=\!!widthb,\c!hoogte=\!!heighta]% + [\c!bovenoffset=\columntextareaparameter\c!clipoffset,% + \c!onderoffset=\columntextareaparameter\c!clipoffset,% + \c!linkeroffset=\columntextareaparameter\c!clipoffset,% + \c!breedte=\!!widthb,% + \c!hoogte=\!!heighta]% {\copy\scratchbox}}% \ifcase\!!countc\else - \advance\!!counta \getvalue{\??mt#1#2\c!nx}% + \advance\!!counta \columntextareaparameter\c!nx \advance\!!counta -\!!countc \advance\!!widtha -\!!widthb \OTRSETsetgridcell @@ -2027,8 +2258,12 @@ \hbox {\hskip-\namedlayoutparameter\v!oneven\c!rugwit \clip - [\c!breedte=\!!widtha,\c!hoogte=\!!heighta, - \c!hoffset=\!!widthb] + [\c!bovenoffset=\columntextareaparameter\c!clipoffset,% + \c!onderoffset=\columntextareaparameter\c!clipoffset,% + \c!rechteroffset=\columntextareaparameter\c!clipoffset,% + \c!breedte=\!!widtha,% + \c!hoogte=\!!heighta,% + \c!hoffset=\!!widthb]% {\copy\scratchbox}}% \fi} diff --git a/tex/context/base/page-sid.tex b/tex/context/base/page-sid.tex index e798d352b..534fa457b 100644 --- a/tex/context/base/page-sid.tex +++ b/tex/context/base/page-sid.tex @@ -15,14 +15,12 @@ \unprotect -% De onderstaande macro's ondersteunen het zetten van tekst -% rond figuren. De macro's zijn ontworpen door Daniel Comenetz -% en gepubliceerd in TUGBoat Volume 14 (1993), No. 1: Anchored -% Figures at Either Margin. De macro's zijn slechts op enkele -% punten door mij aangepast. - -% This module badly needs an update because it's now a -% mixture of old and new macros. +% These macro deal with side floats. We started with Daniel +% Comenetz macros as published in TUGBoat Volume 14 (1993), +% No.\ 1: Anchored Figures at Either Margin. I extended and +% patched the macros to suite our needs which results in a +% messy module. Therefore, this module badly needs an update +% because it's now a mixture of old and new macros. % afhankelijke variabelen % @@ -48,6 +46,7 @@ \newdimen\sidefloatheight % includes the topskip \newdimen\sidefloatwidth \newdimen\sidefloathsize +\newdimen\sidefloatshift \newdimen\sidefloatvsize \def\nofloatvsize{-1pt } \newdimen\sidefloatprogress @@ -117,28 +116,74 @@ % \global\floatshortfalse % \global\floatflagfalse} +% \def\flushsidefloats +% {\par +% \!!heighta\sidefloatvsize +% \advance\!!heighta -\pagetotal +% \ifdim\!!heighta>\zeropoint +% % to be checked for interference +% \witruimte +% % will be option +% \getnoflines\!!heighta +% \!!heighta\noflines\lineheight +% % so far for option +% \ifdim\sidefloatbottomskip>\zeropoint\relax +% \ifdim\!!heighta>\sidefloatbottomskip +% \advance\!!heighta-\sidefloatbottomskip +% \kern\!!heighta +% \vskip\sidefloatbottomskip +% \else +% \kern\!!heighta +% \fi +% \else +% \kern\!!heighta +% \fi +% \fi +% % == \forgetsidefloats +% \global\sidefloatvsize\nofloatvsize +% \global\floatshortfalse +% \global\floatflagfalse} + +\newif\iftracesidefloats + \def\flushsidefloats {\par \!!heighta\sidefloatvsize \advance\!!heighta -\pagetotal - \ifdim\!!heighta>\zeropoint - % to be checked for interference - \witruimte - % will be option - \getnoflines\!!heighta - \!!heighta\noflines\lineheight - % so far for option - \ifdim\sidefloatbottomskip>\zeropoint\relax - \ifdim\!!heighta>\sidefloatbottomskip - \advance\!!heighta-\sidefloatbottomskip - \kern\!!heighta - \vskip\sidefloatbottomskip - \else - \kern\!!heighta + \ifnum\!!heighta>\zeropoint + \global\advance\sidefloatvsize -\sidefloatbottomskip + \ifdim\!!heighta>\zeropoint + \bgroup + \let\flushsidefloats\relax + \forgetall + \doloop + {\strut + \iftracesidefloats + \color[darkgray]% + {\baselinerulefalse + \boxrulewidth.5\s!pt + \ruledhbox{\strut\kern\sidefloatwidth}}% + \fi + \par + \!!heighta\sidefloatvsize + \advance\!!heighta -\pagetotal + \ifdim\!!heighta>\zeropoint + \ifnum\recurselevel>100 + \exitloop + \fi + \else + \exitloop + \fi}% + \egroup + \ifdim\parskip>\zeropoint + \ifdim\sidefloatbottomskip>\parskip + \geenwitruimte + \vskip\sidefloatbottomskip + \fi \fi - \else - \kern\!!heighta - \fi + \else\ifdim\sidefloatbottomskip>\parskip + \vskip\sidefloatbottomskip + \fi\fi \fi % == \forgetsidefloats \global\sidefloatvsize\nofloatvsize @@ -163,7 +208,7 @@ \def\pushpenalties {\widowpenalty\plusone - \clubpenalty2 + \clubpenalty\plustwo \brokenpenalty\plusone \let\pushpenalties\relax \edef\poppenalties @@ -200,7 +245,7 @@ \iffloatrighteqo \global\floatrighteqofalse \else - \global\divide\sidefloathsize 2 + \global\divide\sidefloathsize \plustwo \fi \hskip\sidefloathsize \fi @@ -303,35 +348,64 @@ \witruimte % moved here dec 2001 {\everypar\emptytoks\forgetall\vbox{\strut}\vskip-\lineheight}% moved - % + \ifdim\sidefloatshift=\zeropoint\else + \global \marginfloatfalse + \global \edgefloatfalse + \fi + \ifcase\sidefloatalign \else + \global\sidefloattopskip\zeropoint + \fi \previoussidefloat \stallsidefloat +\global \setbox\floatbox\hbox {\ifmarginfloat\else\ifrightfloat\else\kern\sidefloatleftshift\fi\fi - \vbox % pretty ugly, will be rewritten - {\vskip - \sidefloatdownshift - \vskip - \ifmarginfloat - -\sidefloattopskip - \else\ifedgefloat - -\sidefloattopskip - \else - +\sidefloattopoffset - \fi\fi - #1}% no \hskip, but \kern here + \hskip\sidefloatshift + \scratchdimen + \ifmarginfloat + \sidefloattopskip + \else\ifedgefloat + \sidefloattopskip + \else + \zeropoint + \fi\fi + % the top of the box is at the previous baseline + \ifcase\sidefloatalign + % normal + \advance\scratchdimen\strutdepth % == \sidefloattopoffset + \or % height + \advance\scratchdimen\strutdepth % == \sidefloattopoffset + \or % line +% \advance\scratchdimen\lineheight + \or % depth + \advance\scratchdimen\lineheight + \advance\scratchdimen\strutdepth + \fi + % equivalent but more compact: +% \advance\scratchdimen\strutdepth\relax +% \ifcase\sidefloatalign +% \or +% \or \advance\scratchdimen\strutheight +% \or \advance\scratchdimen\lineheight +% \fi + \vbox{\vskip\scratchdimen\nointerlineskip#1}% + % no \hskip, but \kern here \ifmarginfloat\else\ifrightfloat\kern\sidefloatrightshift\fi\fi}% + \ifmarginfloat + \global\sidefloattopskip\zeropoint + \else\ifedgefloat + \global\sidefloattopskip\zeropoint + \fi\fi \global\sidefloatdownshift\zeropoint \measuresidefloat - \ifroomforfloat - \else + \ifroomforfloat \else \tosssidefloat \measuresidefloat \stallsidefloat \fi \setsidefloat} -\def\progresssidefloat% +\def\progresssidefloat {\sidefloatprogress\sidefloatvsize \iffloatflag \advance\sidefloatprogress -\sidefloatpagetotal @@ -381,11 +455,57 @@ \roomforfloattrue \fi} +% \def\setsidefloat% nilling everypar saves time and redudant pos's +% {% removed here dec 2001 +% %{\everypar\emptytoks\forgetall\vbox{\strut}\vskip-\lineheight}% +% % +% \kern\sidefloattopskip +% \edef\presidefloatdepth{\the\prevdepth}% +% \nointerlineskip +% \bgroup +% \everypar\emptytoks +% \parskip\zeropoint +% \logsidefloat +% \ifrightfloat +% \hfill +% \ifmarginfloat +% % \rlap{\hskip\rechtermargeafstand\hskip\rightskip\unhbox\floatbox}% +% \rlap{\tbox{\hskip\rechtermargeafstand\hskip\rightskip\unhbox\floatbox}}% +% \else\ifedgefloat +% \rlap{\tbox{\hskip\rechtermargeafstand\hskip\rechtermargebreedte +% \hskip\rechterrandafstand\hskip\rightskip\unhbox\floatbox}}% +% \else +% \unhbox\floatbox +% \fi\fi +% \else +% \noindent +% \ifmarginfloat +% % \llap{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand}% +% \llap{\tbox{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand}}% +% \else\ifedgefloat +% \llap{\tbox{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand +% \hskip\linkermargebreedte\hskip\linkerrandafstand}}% +% \else +% \unhbox\floatbox +% \fi\fi +% \hfill +% \fi +% \egroup +% \par +% \kern-\sidefloatheight +% \penalty10001 % oeps, this will change +% \normalbaselines +% \prevdepth\presidefloatdepth +% %\noindent +% \resetsidefloatparagraph +% \ignorespaces} + \def\setsidefloat% nilling everypar saves time and redudant pos's {% removed here dec 2001 - %{\everypar\emptytoks\forgetall\vbox{\strut}\vskip-\lineheight}% - % - \kern\sidefloattopskip + % {\everypar\emptytoks\forgetall\vbox{\strut}\vskip-\lineheight}% + \ifmarginfloat \else \ifedgefloat \else + \kern\sidefloattopskip + \fi \fi \edef\presidefloatdepth{\the\prevdepth}% \nointerlineskip \bgroup @@ -395,24 +515,22 @@ \ifrightfloat \hfill \ifmarginfloat -% \rlap{\hskip\rechtermargeafstand\hskip\rightskip\unhbox\floatbox}% -\rlap{\tbox{\hskip\rechtermargeafstand\hskip\rightskip\unhbox\floatbox}}% + \rlap{\hskip\rechtermargeafstand\hskip\rightskip\unhbox\floatbox}% \else\ifedgefloat -\rlap{\tbox{\hskip\rechtermargeafstand\hskip\rechtermargebreedte - \hskip\rechterrandafstand\hskip\rightskip\unhbox\floatbox}}% + \rlap{\hskip\rechtermargeafstand\hskip\rechtermargebreedte + \hskip\rechterrandafstand\hskip\rightskip\unhbox\floatbox}% \else - \unhbox\floatbox + \unhbox\floatbox \fi\fi \else \noindent \ifmarginfloat -% \llap{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand}% -\llap{\tbox{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand}}% + \llap{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand}% \else\ifedgefloat -\llap{\tbox{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand - \hskip\linkermargebreedte\hskip\linkerrandafstand}}% + \llap{\unhbox\floatbox\hskip\leftskip\hskip\linkermargeafstand + \hskip\linkermargebreedte\hskip\linkerrandafstand}% \else - \unhbox\floatbox + \unhbox\floatbox \fi\fi \hfill \fi @@ -422,16 +540,16 @@ \penalty10001 % oeps, this will change \normalbaselines \prevdepth\presidefloatdepth - %\noindent + % \noindent \resetsidefloatparagraph - \ignorespaces} + \ignorespaces} % not really needed \newcount\sidefloatparagraph -\def\iffirstsidefloatparagraph% +\def\iffirstsidefloatparagraph {\ifnum\sidefloatparagraph=1 } -\def\setsidefloatparagraph% +\def\setsidefloatparagraph {%\advance\sidefloatprogress \sidefloatbottomskip %\!!counta\sidefloatprogress \scratchdimen\sidefloatprogress @@ -439,19 +557,22 @@ \!!counta\scratchdimen \divide\!!counta \baselineskip \ifnum\!!counta>0 - \ifrightfloat - \hangindent=-\sidefloatwidth - \else - \hangindent=\sidefloatwidth - \fi - \hangafter=-\!!counta + \hangindent \ifrightfloat-\fi\sidefloatwidth + \hangafter-\!!counta \fi - \global\advance\sidefloatparagraph \plusone} + \global\advance\sidefloatparagraph \plusone + \iftracesidefloats + \hskip-\sidefloatwidth + \color[darkgray]% + {\vrule\!!height.5\s!pt\!!depth.5\s!pt\!!width\sidefloatwidth + %\hskip-.25\bodyfontsize\showstruts\strut\hskip.25\bodyfontsize}% + \llap{\showstruts\strut\hskip.25\bodyfontsize}}% + \fi} -\def\resetsidefloatparagraph% +\def\resetsidefloatparagraph {\global\sidefloatparagraph\zerocount } -\def\dochecksidefloat% +\def\dochecksidefloat {\progresssidefloat \ifdim\sidefloatprogress>\zeropoint \setsidefloatparagraph @@ -460,19 +581,19 @@ \fi \parskip\tussenwit} -\def\checksidefloat% +\def\checksidefloat {\dochecksidefloat} -\def\doadjustsidefloatdisplaylines% +\def\doadjustsidefloatdisplaylines {\par \vskip-\parskip \noindent \ignorespaces} -\def\adjustsidefloatdisplaylines% +\def\adjustsidefloatdisplaylines {\aftergroup\doadjustsidefloatdisplaylines} -\def\previoussidefloat% +\def\previoussidefloat {\progresssidefloat \ifdim\sidefloatprogress>\zeropoint \relax \iffloatshort @@ -483,7 +604,7 @@ \fi \fi} -\def\stallsidefloat% +\def\stallsidefloat {\!!counta\pageshrink \divide\!!counta \baselineskip \advance\!!counta \plusone diff --git a/tex/context/base/page-spr.tex b/tex/context/base/page-spr.tex index ed636607e..7ee01cd09 100644 --- a/tex/context/base/page-spr.tex +++ b/tex/context/base/page-spr.tex @@ -18,7 +18,7 @@ \unprotect \newbox\spreadbox -\newif\ifinspread +\newif \ifinspread \chardef\showspreadmode=1 @@ -52,14 +52,15 @@ \def\doflushspread {\ifinspread \ifvoid\spreadbox\else - \null % \s!dummy % dummy text. will be discarded - \pagina + % this page will be discarded later + \null \pagina \fi \fi } \def\startspread {\bgroup \ifdubbelzijdig \pagina[\v!links]% + %\setsystemmode{spread}% \inspreadtrue \scratchdimen2\tekstbreedte \advance\scratchdimen2\rugwit diff --git a/tex/context/base/page-txt.tex b/tex/context/base/page-txt.tex index 91cb89b61..b6f095392 100644 --- a/tex/context/base/page-txt.tex +++ b/tex/context/base/page-txt.tex @@ -199,8 +199,10 @@ {\ConvertConstantAfter\doifelse{\v!paginanummer}{#6} {\@@plaatspaginanummer} {\ConvertConstantAfter\doifelse{\v!datum}{#6} - {\currentdate} % #6{}{}{} -> {} needed for lookahead macros, like \uniqueMPgraphic - {\opeenregel\dolimitatetexts{#1#2#5}{#6{}{}{}}}}}}}% + {\currentdate} + {% #6{}{}{} -> {} needed for macros that look + % ahead, like \uniqueMPgraphic + \opeenregel\dolimitatetexts{#1#2#5}{#6{}{}{}}}}}}}% \egroup} %D When specified, the texts are automatically limited in @@ -582,8 +584,23 @@ %D The next twosome will be done differently (using an %D existing auxiliary macro). -\def\@@nmpre#1{\setbox0\hbox{#1}\ifdim\wd0=\zeropoint\else\unhbox0\tfskip\fi} -\def\@@nmpos#1{\setbox0\hbox{#1}\ifdim\wd0=\zeropoint\else\tfskip\unhbox0\fi} +% \def\@@nmpre#1{\setbox0\hbox{#1}\ifdim\wd0=\zeropoint\else\unhbox0\tfskip\fi} +% \def\@@nmpos#1{\setbox0\hbox{#1}\ifdim\wd0=\zeropoint\else\tfskip\unhbox0\fi} + +% cleaner + +\def\@@nmpre#1{\doiftext{#1}{{#1}\tfskip}} +\def\@@nmpos#1{\doiftext{#1}{\tfskip{#1}}} + +% newer + +\def\@@nmprepos#1#2#3#4#5% + {\doifelsenothing\@@nmbreedte + {\doiftext{#5}{#1{#5}#2}} + {\doiftext{#5}{\hbox to \@@nmbreedte{#3{#5}#4}}}} + +\def\@@nmpre{\@@nmprepos\empty\tfskip\relax\hss} +\def\@@nmpos{\@@nmprepos\tfskip\empty\hss\relax} %D This code will move to \type {page-flt.tex}. diff --git a/tex/context/base/regi-cyp.tex b/tex/context/base/regi-cyp.tex new file mode 100644 index 000000000..277f4b099 --- /dev/null +++ b/tex/context/base/regi-cyp.tex @@ -0,0 +1,1131 @@ +%D \module +%D [ file=regi-cyp, +%D version=2003.01.24, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Cyrillic Plus, +%D author=..., +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D In this file several rarely user cyrillic input regimes +%D are defined. + +\startregime[cp855] + +\defineactivetoken 128 {\cyrillicdje} +\defineactivetoken 129 {\cyrillicDJE} +\defineactivetoken 130 {\'\cyrillicg} +\defineactivetoken 131 {\'\cyrillicG} +\defineactivetoken 132 {\cyrillicyo} +\defineactivetoken 133 {\cyrillicYO} +\defineactivetoken 134 {\cyrillicie} +\defineactivetoken 135 {\cyrillicIE} +\defineactivetoken 136 {\cyrillicdze} +\defineactivetoken 137 {\cyrillicDZE} +\defineactivetoken 138 {\cyrillicii} +\defineactivetoken 139 {\cyrillicII} +\defineactivetoken 140 {\cyrillicyi} +\defineactivetoken 141 {\cyrillicYI} +\defineactivetoken 142 {\cyrillicje} +\defineactivetoken 143 {\cyrillicJE} +\defineactivetoken 144 {\cyrilliclje} +\defineactivetoken 145 {\cyrillicLJE} +\defineactivetoken 146 {\cyrillicnje} +\defineactivetoken 147 {\cyrillicNJE} +\defineactivetoken 148 {\cyrillictshe} +\defineactivetoken 149 {\cyrillicTSHE} +\defineactivetoken 150 {\'\cyrillick} +\defineactivetoken 151 {\'\cyrillicK} +\defineactivetoken 152 {\cyrillicushrt} +\defineactivetoken 153 {\cyrillicUSHRT} +\defineactivetoken 154 {\cyrillicdzhe} +\defineactivetoken 155 {\cyrillicDZHE} +\defineactivetoken 156 {\cyrillicyu} +\defineactivetoken 157 {\cyrillicYU} +\defineactivetoken 158 {\cyrillichrdsn} +\defineactivetoken 159 {\cyrillicHRDSN} +\defineactivetoken 160 {\cyrillica} +\defineactivetoken 161 {\cyrillicA} +\defineactivetoken 162 {\cyrillicb} +\defineactivetoken 163 {\cyrillicB} +\defineactivetoken 164 {\cyrillicc} +\defineactivetoken 165 {\cyrillicC} +\defineactivetoken 166 {\cyrillicd} +\defineactivetoken 167 {\cyrillicD} +\defineactivetoken 168 {\cyrillice} +\defineactivetoken 169 {\cyrillicE} +\defineactivetoken 170 {\cyrillicf} +\defineactivetoken 171 {\cyrillicF} +\defineactivetoken 172 {\cyrillicg} +\defineactivetoken 173 {\cyrillicG} +\defineactivetoken 174 {\leftguillemot} +\defineactivetoken 175 {\rightguillemot} +\defineactivetoken 181 {\cyrillich} +\defineactivetoken 182 {\cyrillicH} +\defineactivetoken 183 {\cyrillici} +\defineactivetoken 184 {\cyrillicI} +\defineactivetoken 189 {\cyrillicishrt} +\defineactivetoken 190 {\cyrillicISHRT} +\defineactivetoken 198 {\cyrillick} +\defineactivetoken 199 {\cyrillicK} +\defineactivetoken 207 {\textcurrency} +\defineactivetoken 208 {\cyrillicl} +\defineactivetoken 209 {\cyrillicL} +\defineactivetoken 210 {\cyrillicm} +\defineactivetoken 211 {\cyrillicM} +\defineactivetoken 212 {\cyrillicn} +\defineactivetoken 213 {\cyrillicN} +\defineactivetoken 214 {\cyrillico} +\defineactivetoken 215 {\cyrillicO} +\defineactivetoken 216 {\cyrillicp} +\defineactivetoken 221 {\cyrillicP} +\defineactivetoken 222 {\cyrillicya} +\defineactivetoken 224 {\cyrillicYA} +\defineactivetoken 225 {\cyrillicr} +\defineactivetoken 226 {\cyrillicR} +\defineactivetoken 227 {\cyrillics} +\defineactivetoken 228 {\cyrillicS} +\defineactivetoken 229 {\cyrillict} +\defineactivetoken 230 {\cyrillicT} +\defineactivetoken 231 {\cyrillicu} +\defineactivetoken 232 {\cyrillicU} +\defineactivetoken 233 {\cyrilliczh} +\defineactivetoken 234 {\cyrillicZH} +\defineactivetoken 235 {\cyrillicv} +\defineactivetoken 236 {\cyrillicV} +\defineactivetoken 237 {\cyrillicsftsn} +\defineactivetoken 238 {\cyrillicSFTSN} +\defineactivetoken 239 {\textnumero} +\defineactivetoken 240 {\-} +\defineactivetoken 241 {\cyrillicery} +\defineactivetoken 242 {\cyrillicERY} +\defineactivetoken 243 {\cyrillicz} +\defineactivetoken 244 {\cyrillicZ} +\defineactivetoken 245 {\cyrillicsh} +\defineactivetoken 246 {\cyrillicSH} +\defineactivetoken 247 {\cyrillicerev} +\defineactivetoken 248 {\cyrillicEREV} +\defineactivetoken 249 {\cyrillicshch} +\defineactivetoken 250 {\cyrillicSHCH} +\defineactivetoken 251 {\cyrillicch} +\defineactivetoken 252 {\cyrillicCH} +\defineactivetoken 253 {\S} +\defineactivetoken 254 {\textblacksquare} +\defineactivetoken 255 {\nonbreakablespace} + +\stopregime + +\startregime[cp866av] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicZH} +\defineactivetoken 135 {\cyrillicZ} +\defineactivetoken 136 {\cyrillicI} +\defineactivetoken 137 {\cyrillicISHRT} +\defineactivetoken 138 {\cyrillicK} +\defineactivetoken 139 {\cyrillicL} +\defineactivetoken 140 {\cyrillicM} +\defineactivetoken 141 {\cyrillicN} +\defineactivetoken 142 {\cyrillicO} +\defineactivetoken 143 {\cyrillicP} +\defineactivetoken 144 {\cyrillicR} +\defineactivetoken 145 {\cyrillicS} +\defineactivetoken 146 {\cyrillicT} +\defineactivetoken 147 {\cyrillicU} +\defineactivetoken 148 {\cyrillicF} +\defineactivetoken 149 {\cyrillicH} +\defineactivetoken 150 {\cyrillicC} +\defineactivetoken 151 {\cyrillicCH} +\defineactivetoken 152 {\cyrillicSH} +\defineactivetoken 153 {\cyrillicSHCH} +\defineactivetoken 154 {\cyrillicHRDSN} +\defineactivetoken 155 {\cyrillicERY} +\defineactivetoken 156 {\cyrillicSFTSN} +\defineactivetoken 157 {\cyrillicEREV} +\defineactivetoken 158 {\cyrillicYU} +\defineactivetoken 159 {\cyrillicYA} +\defineactivetoken 160 {\cyrillica} +\defineactivetoken 161 {\cyrillicb} +\defineactivetoken 162 {\cyrillicv} +\defineactivetoken 163 {\cyrillicg} +\defineactivetoken 164 {\cyrillicd} +\defineactivetoken 165 {\cyrillice} +\defineactivetoken 166 {\cyrilliczh} +\defineactivetoken 167 {\cyrillicz} +\defineactivetoken 168 {\cyrillici} +\defineactivetoken 169 {\cyrillicishrt} +\defineactivetoken 170 {\cyrillick} +\defineactivetoken 171 {\cyrillicl} +\defineactivetoken 172 {\cyrillicm} +\defineactivetoken 173 {\cyrillicn} +\defineactivetoken 174 {\cyrillico} +\defineactivetoken 175 {\cyrillicp} +\defineactivetoken 224 {\cyrillicr} +\defineactivetoken 225 {\cyrillics} +\defineactivetoken 226 {\cyrillict} +\defineactivetoken 227 {\cyrillicu} +\defineactivetoken 228 {\cyrillicf} +\defineactivetoken 229 {\cyrillich} +\defineactivetoken 230 {\cyrillicc} +\defineactivetoken 231 {\cyrillicch} +\defineactivetoken 232 {\cyrillicsh} +\defineactivetoken 233 {\cyrillicshch} +\defineactivetoken 234 {\cyrillichrdsn} +\defineactivetoken 235 {\cyrillicery} +\defineactivetoken 236 {\cyrillicsftsn} +\defineactivetoken 237 {\cyrillicerev} +\defineactivetoken 238 {\cyrillicyu} +\defineactivetoken 239 {\cyrillicya} +\defineactivetoken 240 {\cyrillicYO} +\defineactivetoken 241 {\cyrillicyo} +\defineactivetoken 252 {\textnumero} +\defineactivetoken 253 {\textcurrency} +\defineactivetoken 254 {\textblacksquare} +\defineactivetoken 255 {\nonbreakablespace} + +\stopregime + +\startregime[cp866mav] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicZH} +\defineactivetoken 135 {\cyrillicZ} +\defineactivetoken 136 {\cyrillicI} +\defineactivetoken 137 {\cyrillicISHRT} +\defineactivetoken 138 {\cyrillicK} +\defineactivetoken 139 {\cyrillicL} +\defineactivetoken 140 {\cyrillicM} +\defineactivetoken 141 {\cyrillicN} +\defineactivetoken 142 {\cyrillicO} +\defineactivetoken 143 {\cyrillicP} +\defineactivetoken 144 {\cyrillicR} +\defineactivetoken 145 {\cyrillicS} +\defineactivetoken 146 {\cyrillicT} +\defineactivetoken 147 {\cyrillicU} +\defineactivetoken 148 {\cyrillicF} +\defineactivetoken 149 {\cyrillicH} +\defineactivetoken 150 {\cyrillicC} +\defineactivetoken 151 {\cyrillicCH} +\defineactivetoken 152 {\cyrillicSH} +\defineactivetoken 153 {\cyrillicSHCH} +\defineactivetoken 154 {\cyrillicHRDSN} +\defineactivetoken 155 {\cyrillicERY} +\defineactivetoken 156 {\cyrillicSFTSN} +\defineactivetoken 157 {\cyrillicEREV} +\defineactivetoken 158 {\cyrillicYU} +\defineactivetoken 159 {\cyrillicYA} +\defineactivetoken 160 {\cyrillica} +\defineactivetoken 161 {\cyrillicb} +\defineactivetoken 162 {\cyrillicv} +\defineactivetoken 163 {\cyrillicg} +\defineactivetoken 164 {\cyrillicd} +\defineactivetoken 165 {\cyrillice} +\defineactivetoken 166 {\cyrilliczh} +\defineactivetoken 167 {\cyrillicz} +\defineactivetoken 168 {\cyrillici} +\defineactivetoken 169 {\cyrillicishrt} +\defineactivetoken 170 {\cyrillick} +\defineactivetoken 171 {\cyrillicl} +\defineactivetoken 172 {\cyrillicm} +\defineactivetoken 173 {\cyrillicn} +\defineactivetoken 174 {\cyrillico} +\defineactivetoken 175 {\cyrillicp} +\defineactivetoken 224 {\cyrillicr} +\defineactivetoken 225 {\cyrillics} +\defineactivetoken 226 {\cyrillict} +\defineactivetoken 227 {\cyrillicu} +\defineactivetoken 228 {\cyrillicf} +\defineactivetoken 229 {\cyrillich} +\defineactivetoken 230 {\cyrillicc} +\defineactivetoken 231 {\cyrillicch} +\defineactivetoken 232 {\cyrillicsh} +\defineactivetoken 233 {\cyrillicshch} +\defineactivetoken 234 {\cyrillichrdsn} +\defineactivetoken 235 {\cyrillicery} +\defineactivetoken 236 {\cyrillicsftsn} +\defineactivetoken 237 {\cyrillicerev} +\defineactivetoken 238 {\cyrillicyu} +\defineactivetoken 239 {\cyrillicya} +\defineactivetoken 240 {\cyrillicYO} +\defineactivetoken 241 {\cyrillicyo} +\defineactivetoken 248 {\textdegree} +\defineactivetoken 249 {\bullet} +\defineactivetoken 250 {\textperiodcentered} +\defineactivetoken 254 {\textblacksquare} +\defineactivetoken 255 {\nonbreakablespace} + +\stopregime + +\startregime[cp866tat] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicZH} +\defineactivetoken 135 {\cyrillicZ} +\defineactivetoken 136 {\cyrillicI} +\defineactivetoken 137 {\cyrillicISHRT} +\defineactivetoken 138 {\cyrillicK} +\defineactivetoken 139 {\cyrillicL} +\defineactivetoken 140 {\cyrillicM} +\defineactivetoken 141 {\cyrillicN} +\defineactivetoken 142 {\cyrillicO} +\defineactivetoken 143 {\cyrillicP} +\defineactivetoken 144 {\cyrillicR} +\defineactivetoken 145 {\cyrillicS} +\defineactivetoken 146 {\cyrillicT} +\defineactivetoken 147 {\cyrillicU} +\defineactivetoken 148 {\cyrillicF} +\defineactivetoken 149 {\cyrillicH} +\defineactivetoken 150 {\cyrillicC} +\defineactivetoken 151 {\cyrillicCH} +\defineactivetoken 152 {\cyrillicSH} +\defineactivetoken 153 {\cyrillicSHCH} +\defineactivetoken 154 {\cyrillicHRDSN} +\defineactivetoken 155 {\cyrillicERY} +\defineactivetoken 156 {\cyrillicSFTSN} +\defineactivetoken 157 {\cyrillicEREV} +\defineactivetoken 158 {\cyrillicYU} +\defineactivetoken 159 {\cyrillicYA} +\defineactivetoken 160 {\cyrillica} +\defineactivetoken 161 {\cyrillicb} +\defineactivetoken 162 {\cyrillicv} +\defineactivetoken 163 {\cyrillicg} +\defineactivetoken 164 {\cyrillicd} +\defineactivetoken 165 {\cyrillice} +\defineactivetoken 166 {\cyrilliczh} +\defineactivetoken 167 {\cyrillicz} +\defineactivetoken 168 {\cyrillici} +\defineactivetoken 169 {\cyrillicishrt} +\defineactivetoken 170 {\cyrillick} +\defineactivetoken 171 {\cyrillicl} +\defineactivetoken 172 {\cyrillicm} +\defineactivetoken 173 {\cyrillicn} +\defineactivetoken 174 {\cyrillico} +\defineactivetoken 175 {\cyrillicp} +\defineactivetoken 224 {\cyrillicr} +\defineactivetoken 225 {\cyrillics} +\defineactivetoken 226 {\cyrillict} +\defineactivetoken 227 {\cyrillicu} +\defineactivetoken 228 {\cyrillicf} +\defineactivetoken 229 {\cyrillich} +\defineactivetoken 230 {\cyrillicc} +\defineactivetoken 231 {\cyrillicch} +\defineactivetoken 232 {\cyrillicsh} +\defineactivetoken 233 {\cyrillicshch} +\defineactivetoken 234 {\cyrillichrdsn} +\defineactivetoken 235 {\cyrillicery} +\defineactivetoken 236 {\cyrillicsftsn} +\defineactivetoken 237 {\cyrillicerev} +\defineactivetoken 238 {\cyrillicyu} +\defineactivetoken 239 {\cyrillicya} +\defineactivetoken 240 {\cyrillicYO} +\defineactivetoken 241 {\cyrillicyo} +\defineactivetoken 242 {\cyrillicSCHWA} +\defineactivetoken 243 {\cyrillicschwa} +\defineactivetoken 244 {\cyrillicOTLD} +\defineactivetoken 245 {\cyrillicotld} +\defineactivetoken 246 {\cyrillicY} +\defineactivetoken 247 {\cyrillicy} +\defineactivetoken 248 {\cyrillicZHDSC} +\defineactivetoken 249 {\cyrilliczhdsc} +\defineactivetoken 250 {\cyrillicNDSC} +\defineactivetoken 251 {\cyrillicndsc} +\defineactivetoken 252 {\cyrillicSHHA} +\defineactivetoken 253 {\cyrillicshha} +\defineactivetoken 254 {\textblacksquare} +\defineactivetoken 255 {\nonbreakablespace} + +\stopregime + +\startregime[ctt] + +\defineactivetoken 171 {\leftguillemot} +\defineactivetoken 187 {\rightguillemot} +\defineactivetoken 192 {\cyrillicA} +\defineactivetoken 193 {\cyrillicB} +\defineactivetoken 194 {\cyrillicV} +\defineactivetoken 195 {\cyrillicG} +\defineactivetoken 196 {\cyrillicD} +\defineactivetoken 197 {\cyrillicE} +\defineactivetoken 168 {\cyrillicYO} +\defineactivetoken 198 {\cyrillicZH} +\defineactivetoken 199 {\cyrillicZ} +\defineactivetoken 200 {\cyrillicI} +\defineactivetoken 201 {\cyrillicISHRT} +\defineactivetoken 202 {\cyrillicK} +\defineactivetoken 203 {\cyrillicL} +\defineactivetoken 204 {\cyrillicM} +\defineactivetoken 205 {\cyrillicN} +\defineactivetoken 206 {\cyrillicO} +\defineactivetoken 170 {\cyrillicOTLD} +\defineactivetoken 207 {\cyrillicP} +\defineactivetoken 208 {\cyrillicR} +\defineactivetoken 209 {\cyrillicS} +\defineactivetoken 210 {\cyrillicT} +\defineactivetoken 211 {\cyrillicU} +\defineactivetoken 175 {\cyrillicY} +\defineactivetoken 212 {\cyrillicF} +\defineactivetoken 213 {\cyrillicH} +\defineactivetoken 214 {\cyrillicC} +\defineactivetoken 215 {\cyrillicCH} +\defineactivetoken 216 {\cyrillicSH} +\defineactivetoken 217 {\cyrillicSHCH} +\defineactivetoken 218 {\cyrillicHRDSN} +\defineactivetoken 219 {\cyrillicERY} +\defineactivetoken 220 {\cyrillicSFTSN} +\defineactivetoken 221 {\cyrillicEREV} +\defineactivetoken 222 {\cyrillicYU} +\defineactivetoken 223 {\cyrillicYA} +\defineactivetoken 224 {\cyrillica} +\defineactivetoken 225 {\cyrillicb} +\defineactivetoken 226 {\cyrillicv} +\defineactivetoken 227 {\cyrillicg} +\defineactivetoken 228 {\cyrillicd} +\defineactivetoken 229 {\cyrillice} +\defineactivetoken 184 {\cyrillicyo} +\defineactivetoken 230 {\cyrilliczh} +\defineactivetoken 231 {\cyrillicz} +\defineactivetoken 232 {\cyrillici} +\defineactivetoken 233 {\cyrillicishrt} +\defineactivetoken 234 {\cyrillick} +\defineactivetoken 235 {\cyrillicl} +\defineactivetoken 236 {\cyrillicm} +\defineactivetoken 237 {\cyrillicn} +\defineactivetoken 238 {\cyrillico} +\defineactivetoken 186 {\cyrillicotld} +\defineactivetoken 239 {\cyrillicp} +\defineactivetoken 240 {\cyrillicr} +\defineactivetoken 241 {\cyrillics} +\defineactivetoken 242 {\cyrillict} +\defineactivetoken 243 {\cyrillicu} +\defineactivetoken 191 {\cyrillicy} +\defineactivetoken 244 {\cyrillicf} +\defineactivetoken 245 {\cyrillich} +\defineactivetoken 246 {\cyrillicc} +\defineactivetoken 247 {\cyrillicch} +\defineactivetoken 248 {\cyrillicsh} +\defineactivetoken 249 {\cyrillicshch} +\defineactivetoken 250 {\cyrillichrdsn} +\defineactivetoken 251 {\cyrillicery} +\defineactivetoken 252 {\cyrillicsftsn} +\defineactivetoken 253 {\cyrillicerev} +\defineactivetoken 254 {\cyrillicyu} +\defineactivetoken 255 {\cyrillicya} + +\stopregime + +\startregime[dbk] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicYO} +\defineactivetoken 135 {\cyrillicZH} +\defineactivetoken 136 {\cyrillicZ} +\defineactivetoken 137 {\cyrillicI} +\defineactivetoken 139 {\cyrillicISHRT} +\defineactivetoken 140 {\cyrillicK} +\defineactivetoken 142 {\cyrillicL} +\defineactivetoken 143 {\cyrillicM} +\defineactivetoken 144 {\cyrillicN} +\defineactivetoken 145 {\cyrillicO} +\defineactivetoken 146 {\cyrillicOTLD} +\defineactivetoken 147 {\cyrillicP} +\defineactivetoken 148 {\cyrillicR} +\defineactivetoken 149 {\cyrillicS} +\defineactivetoken 150 {\cyrillicT} +\defineactivetoken 151 {\cyrillicU} +\defineactivetoken 152 {\cyrillicY} +\defineactivetoken 153 {\cyrillicF} +\defineactivetoken 154 {\cyrillicH} +\defineactivetoken 155 {\cyrillicC} +\defineactivetoken 156 {\cyrillicCH} +\defineactivetoken 157 {\cyrillicSH} +\defineactivetoken 158 {\cyrillicSHCH} +\defineactivetoken 159 {\cyrillicHRDSN} +\defineactivetoken 160 {\cyrillicERY} +\defineactivetoken 161 {\cyrillicSFTSN} +\defineactivetoken 162 {\cyrillicEREV} +\defineactivetoken 163 {\cyrillicYU} +\defineactivetoken 164 {\cyrillicYA} +\defineactivetoken 165 {\cyrillica} +\defineactivetoken 166 {\cyrillicb} +\defineactivetoken 167 {\cyrillicv} +\defineactivetoken 168 {\cyrillicg} +\defineactivetoken 169 {\cyrillicd} +\defineactivetoken 170 {\cyrillice} +\defineactivetoken 171 {\cyrillicyo} +\defineactivetoken 172 {\cyrilliczh} +\defineactivetoken 173 {\cyrillicz} +\defineactivetoken 174 {\cyrillici} +\defineactivetoken 175 {\cyrillicishrt} +\defineactivetoken 225 {\cyrillick} +\defineactivetoken 226 {\cyrillicl} +\defineactivetoken 227 {\cyrillicm} +\defineactivetoken 228 {\cyrillicn} +\defineactivetoken 229 {\cyrillico} +\defineactivetoken 230 {\cyrillicotld} +\defineactivetoken 231 {\cyrillicp} +\defineactivetoken 232 {\cyrillicr} +\defineactivetoken 233 {\cyrillics} +\defineactivetoken 234 {\cyrillict} +\defineactivetoken 235 {\cyrillicu} +\defineactivetoken 236 {\cyrillicy} +\defineactivetoken 237 {\cyrillicf} +\defineactivetoken 238 {\cyrillich} +\defineactivetoken 239 {\cyrillicc} +\defineactivetoken 241 {\cyrillicch} +\defineactivetoken 242 {\cyrillicsh} +\defineactivetoken 243 {\cyrillicshch} +\defineactivetoken 244 {\cyrillichrdsn} +\defineactivetoken 245 {\cyrillicery} +\defineactivetoken 246 {\cyrillicsftsn} +\defineactivetoken 247 {\cyrillicerev} +\defineactivetoken 248 {\cyrillicyu} +\defineactivetoken 249 {\cyrillicya} + +\stopregime + +\startregime[iso88595] + +\defineactivetoken 160 {\nonbreakablespace} +\defineactivetoken 161 {\cyrillicYO} +\defineactivetoken 162 {\cyrillicDJE} +\defineactivetoken 163 {\'\cyrillicG} +\defineactivetoken 164 {\cyrillicIE} +\defineactivetoken 165 {\cyrillicDZE} +\defineactivetoken 166 {\cyrillicII} +\defineactivetoken 167 {\cyrillicYI} +\defineactivetoken 168 {\cyrillicJE} +\defineactivetoken 169 {\cyrillicLJE} +\defineactivetoken 170 {\cyrillicNJE} +\defineactivetoken 171 {\cyrillicTSHE} +\defineactivetoken 172 {\'\cyrillicK} +\defineactivetoken 173 {\-} +\defineactivetoken 174 {\cyrillicUSHRT} +\defineactivetoken 175 {\cyrillicDZHE} +\defineactivetoken 176 {\cyrillicA} +\defineactivetoken 177 {\cyrillicB} +\defineactivetoken 178 {\cyrillicV} +\defineactivetoken 179 {\cyrillicG} +\defineactivetoken 180 {\cyrillicD} +\defineactivetoken 181 {\cyrillicE} +\defineactivetoken 182 {\cyrillicZH} +\defineactivetoken 183 {\cyrillicZ} +\defineactivetoken 184 {\cyrillicI} +\defineactivetoken 185 {\cyrillicISHRT} +\defineactivetoken 186 {\cyrillicK} +\defineactivetoken 187 {\cyrillicL} +\defineactivetoken 188 {\cyrillicM} +\defineactivetoken 189 {\cyrillicN} +\defineactivetoken 190 {\cyrillicO} +\defineactivetoken 191 {\cyrillicP} +\defineactivetoken 192 {\cyrillicR} +\defineactivetoken 193 {\cyrillicS} +\defineactivetoken 194 {\cyrillicT} +\defineactivetoken 195 {\cyrillicU} +\defineactivetoken 196 {\cyrillicF} +\defineactivetoken 197 {\cyrillicH} +\defineactivetoken 198 {\cyrillicC} +\defineactivetoken 199 {\cyrillicCH} +\defineactivetoken 200 {\cyrillicSH} +\defineactivetoken 201 {\cyrillicSHCH} +\defineactivetoken 202 {\cyrillicHRDSN} +\defineactivetoken 203 {\cyrillicERY} +\defineactivetoken 204 {\cyrillicSFTSN} +\defineactivetoken 205 {\cyrillicEREV} +\defineactivetoken 206 {\cyrillicYU} +\defineactivetoken 207 {\cyrillicYA} +\defineactivetoken 208 {\cyrillica} +\defineactivetoken 209 {\cyrillicb} +\defineactivetoken 210 {\cyrillicv} +\defineactivetoken 211 {\cyrillicg} +\defineactivetoken 212 {\cyrillicd} +\defineactivetoken 213 {\cyrillice} +\defineactivetoken 214 {\cyrilliczh} +\defineactivetoken 215 {\cyrillicz} +\defineactivetoken 216 {\cyrillici} +\defineactivetoken 217 {\cyrillicishrt} +\defineactivetoken 218 {\cyrillick} +\defineactivetoken 219 {\cyrillicl} +\defineactivetoken 220 {\cyrillicm} +\defineactivetoken 221 {\cyrillicn} +\defineactivetoken 222 {\cyrillico} +\defineactivetoken 223 {\cyrillicp} +\defineactivetoken 224 {\cyrillicr} +\defineactivetoken 225 {\cyrillics} +\defineactivetoken 226 {\cyrillict} +\defineactivetoken 227 {\cyrillicu} +\defineactivetoken 228 {\cyrillicf} +\defineactivetoken 229 {\cyrillich} +\defineactivetoken 230 {\cyrillicc} +\defineactivetoken 231 {\cyrillicch} +\defineactivetoken 232 {\cyrillicsh} +\defineactivetoken 233 {\cyrillicshch} +\defineactivetoken 234 {\cyrillichrdsn} +\defineactivetoken 235 {\cyrillicery} +\defineactivetoken 236 {\cyrillicsftsn} +\defineactivetoken 237 {\cyrillicerev} +\defineactivetoken 238 {\cyrillicyu} +\defineactivetoken 239 {\cyrillicya} +\defineactivetoken 240 {\textnumero} +\defineactivetoken 241 {\cyrillicyo} +\defineactivetoken 242 {\cyrillicdje} +\defineactivetoken 243 {\'\cyrillicg} +\defineactivetoken 244 {\cyrillicie} +\defineactivetoken 245 {\cyrillicdze} +\defineactivetoken 246 {\cyrillicii} +\defineactivetoken 247 {\cyrillicyi} +\defineactivetoken 248 {\cyrillicje} +\defineactivetoken 249 {\cyrilliclje} +\defineactivetoken 250 {\cyrillicnje} +\defineactivetoken 251 {\cyrillictshe} +\defineactivetoken 252 {\'\cyrillick} +\defineactivetoken 253 {\S} +\defineactivetoken 254 {\cyrillicushrt} +\defineactivetoken 255 {\cyrillicdzhe} + +\stopregime + +\startregime[isoir111] + +\defineactivetoken 225 {\cyrillicA} +\defineactivetoken 226 {\cyrillicB} +\defineactivetoken 247 {\cyrillicV} +\defineactivetoken 231 {\cyrillicG} +\defineactivetoken 228 {\cyrillicD} +\defineactivetoken 229 {\cyrillicE} +\defineactivetoken 179 {\cyrillicYO} +\defineactivetoken 246 {\cyrillicZH} +\defineactivetoken 250 {\cyrillicZ} +\defineactivetoken 233 {\cyrillicI} +\defineactivetoken 234 {\cyrillicISHRT} +\defineactivetoken 235 {\cyrillicK} +\defineactivetoken 236 {\cyrillicL} +\defineactivetoken 237 {\cyrillicM} +\defineactivetoken 238 {\cyrillicN} +\defineactivetoken 239 {\cyrillicO} +\defineactivetoken 240 {\cyrillicP} +\defineactivetoken 242 {\cyrillicR} +\defineactivetoken 243 {\cyrillicS} +\defineactivetoken 244 {\cyrillicT} +\defineactivetoken 245 {\cyrillicU} +\defineactivetoken 230 {\cyrillicF} +\defineactivetoken 232 {\cyrillicH} +\defineactivetoken 227 {\cyrillicC} +\defineactivetoken 254 {\cyrillicCH} +\defineactivetoken 251 {\cyrillicSH} +\defineactivetoken 253 {\cyrillicSHCH} +\defineactivetoken 255 {\cyrillicHRDSN} +\defineactivetoken 249 {\cyrillicERY} +\defineactivetoken 248 {\cyrillicSFTSN} +\defineactivetoken 252 {\cyrillicEREV} +\defineactivetoken 224 {\cyrillicYU} +\defineactivetoken 241 {\cyrillicYA} +\defineactivetoken 193 {\cyrillica} +\defineactivetoken 194 {\cyrillicb} +\defineactivetoken 215 {\cyrillicv} +\defineactivetoken 199 {\cyrillicg} +\defineactivetoken 196 {\cyrillicd} +\defineactivetoken 197 {\cyrillice} +\defineactivetoken 163 {\cyrillicyo} +\defineactivetoken 214 {\cyrilliczh} +\defineactivetoken 218 {\cyrillicz} +\defineactivetoken 201 {\cyrillici} +\defineactivetoken 202 {\cyrillicishrt} +\defineactivetoken 203 {\cyrillick} +\defineactivetoken 204 {\cyrillicl} +\defineactivetoken 205 {\cyrillicm} +\defineactivetoken 206 {\cyrillicn} +\defineactivetoken 207 {\cyrillico} +\defineactivetoken 208 {\cyrillicp} +\defineactivetoken 210 {\cyrillicr} +\defineactivetoken 211 {\cyrillics} +\defineactivetoken 212 {\cyrillict} +\defineactivetoken 213 {\cyrillicu} +\defineactivetoken 198 {\cyrillicf} +\defineactivetoken 200 {\cyrillich} +\defineactivetoken 195 {\cyrillicc} +\defineactivetoken 222 {\cyrillicch} +\defineactivetoken 219 {\cyrillicsh} +\defineactivetoken 221 {\cyrillicshch} +\defineactivetoken 223 {\cyrillichrdsn} +\defineactivetoken 217 {\cyrillicery} +\defineactivetoken 216 {\cyrillicsftsn} +\defineactivetoken 220 {\cyrillicerev} +\defineactivetoken 192 {\cyrillicyu} +\defineactivetoken 209 {\cyrillicya} +\defineactivetoken 160 {\nonbreakablespace} +\defineactivetoken 161 {\cyrillicdje} +\defineactivetoken 162 {\'\cyrillicg} +\defineactivetoken 164 {\cyrillicie} +\defineactivetoken 165 {\cyrillicdze} +\defineactivetoken 166 {\cyrillicii} +\defineactivetoken 167 {\cyrillicyi} +\defineactivetoken 168 {\cyrillicje} +\defineactivetoken 169 {\cyrilliclje} +\defineactivetoken 170 {\cyrillicnje} +\defineactivetoken 171 {\cyrillictshe} +\defineactivetoken 172 {\'\cyrillick} +\defineactivetoken 173 {\-} +\defineactivetoken 174 {\cyrillicushrt} +\defineactivetoken 175 {\cyrillicdzhe} +\defineactivetoken 176 {\textnumero} +\defineactivetoken 177 {\cyrillicDJE} +\defineactivetoken 178 {\'\cyrillicG} +\defineactivetoken 180 {\cyrillicIE} +\defineactivetoken 181 {\cyrillicDZE} +\defineactivetoken 182 {\cyrillicII} +\defineactivetoken 183 {\cyrillicYI} +\defineactivetoken 184 {\cyrillicJE} +\defineactivetoken 185 {\cyrillicLJE} +\defineactivetoken 186 {\cyrillicNJE} +\defineactivetoken 187 {\cyrillicTSHE} +\defineactivetoken 188 {\'\cyrillicK} +\defineactivetoken 189 {\textcurrency} +\defineactivetoken 190 {\cyrillicUSHRT} +\defineactivetoken 191 {\cyrillicDZHE} + +\stopregime + +\startregime[mik] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicZH} +\defineactivetoken 135 {\cyrillicZ} +\defineactivetoken 136 {\cyrillicI} +\defineactivetoken 137 {\cyrillicISHRT} +\defineactivetoken 138 {\cyrillicK} +\defineactivetoken 139 {\cyrillicL} +\defineactivetoken 140 {\cyrillicM} +\defineactivetoken 141 {\cyrillicN} +\defineactivetoken 142 {\cyrillicO} +\defineactivetoken 143 {\cyrillicP} +\defineactivetoken 144 {\cyrillicR} +\defineactivetoken 145 {\cyrillicS} +\defineactivetoken 146 {\cyrillicT} +\defineactivetoken 147 {\cyrillicU} +\defineactivetoken 148 {\cyrillicF} +\defineactivetoken 149 {\cyrillicH} +\defineactivetoken 150 {\cyrillicC} +\defineactivetoken 151 {\cyrillicCH} +\defineactivetoken 152 {\cyrillicSH} +\defineactivetoken 153 {\cyrillicSHCH} +\defineactivetoken 154 {\cyrillicHRDSN} +\defineactivetoken 155 {\cyrillicERY} +\defineactivetoken 156 {\cyrillicSFTSN} +\defineactivetoken 157 {\cyrillicEREV} +\defineactivetoken 158 {\cyrillicYU} +\defineactivetoken 159 {\cyrillicYA} +\defineactivetoken 160 {\cyrillica} +\defineactivetoken 161 {\cyrillicb} +\defineactivetoken 162 {\cyrillicv} +\defineactivetoken 163 {\cyrillicg} +\defineactivetoken 164 {\cyrillicd} +\defineactivetoken 165 {\cyrillice} +\defineactivetoken 166 {\cyrilliczh} +\defineactivetoken 167 {\cyrillicz} +\defineactivetoken 168 {\cyrillici} +\defineactivetoken 169 {\cyrillicishrt} +\defineactivetoken 170 {\cyrillick} +\defineactivetoken 171 {\cyrillicl} +\defineactivetoken 172 {\cyrillicm} +\defineactivetoken 173 {\cyrillicn} +\defineactivetoken 174 {\cyrillico} +\defineactivetoken 175 {\cyrillicp} +\defineactivetoken 176 {\cyrillicr} +\defineactivetoken 177 {\cyrillics} +\defineactivetoken 178 {\cyrillict} +\defineactivetoken 179 {\cyrillicu} +\defineactivetoken 180 {\cyrillicf} +\defineactivetoken 181 {\cyrillich} +\defineactivetoken 182 {\cyrillicc} +\defineactivetoken 183 {\cyrillicch} +\defineactivetoken 184 {\cyrillicsh} +\defineactivetoken 185 {\cyrillicshch} +\defineactivetoken 186 {\cyrillichrdsn} +\defineactivetoken 187 {\cyrillicery} +\defineactivetoken 188 {\cyrillicsftsn} +\defineactivetoken 189 {\cyrillicerev} +\defineactivetoken 190 {\cyrillicyu} +\defineactivetoken 191 {\cyrillicya} +\defineactivetoken 213 {\textnumero} +\defineactivetoken 214 {\S} +\defineactivetoken 248 {\textdegree} +\defineactivetoken 249 {\bullet} +\defineactivetoken 250 {\textperiodcentered} +\defineactivetoken 254 {\textblacksquare} +\defineactivetoken 255 {\nonbreakablespace} + +\stopregime + +\startregime[mls] + +% The symbols 194 to 253 are defined in Mongolian fonts in +% the Mon\TeX\ package (?) + +\defineactivetoken 128 {\cyrillicB} +\defineactivetoken 129 {\cyrillicy} +\defineactivetoken 130 {\cyrillicD} +\defineactivetoken 131 {\cyrillicYO} +\defineactivetoken 132 {\cyrillicerev} +\defineactivetoken 133 {\cyrillicZH} +\defineactivetoken 134 {\cyrillicZ} +\defineactivetoken 135 {\cyrillicI} +\defineactivetoken 136 {\cyrillicISHRT} +\defineactivetoken 137 {\cyrillicyo} +\defineactivetoken 138 {\cyrillicL} +\defineactivetoken 139 {\cyrillicishrt} +\defineactivetoken 140 {\cyrillicOTLD} +\defineactivetoken 141 {\cyrillicP} +\defineactivetoken 142 {\cyrillicEREV} +\defineactivetoken 143 {\cyrillicU} +\defineactivetoken 144 {\cyrillicF} +\defineactivetoken 145 {\cyrillicC} +\defineactivetoken 146 {\cyrillicCH} +\defineactivetoken 147 {\cyrillicSH} +\defineactivetoken 148 {\cyrillicotld} +\defineactivetoken 149 {\cyrillicSHCH} +\defineactivetoken 150 {\cyrillicHRDSN} +\defineactivetoken 151 {\cyrillicERY} +\defineactivetoken 152 {\cyrillicSFTSN} +\defineactivetoken 153 {\cyrillicOTLD} +\defineactivetoken 154 {\cyrillicY} +\defineactivetoken 155 {\cyrillicEREV} +\defineactivetoken 156 {\cyrillicYU} +\defineactivetoken 157 {\cyrillicYA} +\defineactivetoken 158 {\cyrillicb} +\defineactivetoken 159 {\cyrillicv} +\defineactivetoken 160 {\cyrillicg} +\defineactivetoken 161 {\cyrillicd} +\defineactivetoken 162 {\cyrilliczh} +\defineactivetoken 163 {\cyrillicz} +\defineactivetoken 164 {\cyrillici} +\defineactivetoken 165 {\cyrillicishrt} +\defineactivetoken 166 {\cyrillick} +\defineactivetoken 167 {\cyrillicl} +\defineactivetoken 168 {\cyrillicm} +\defineactivetoken 169 {\cyrillicn} +\defineactivetoken 170 {\cyrillicotld} +\defineactivetoken 171 {\cyrillicp} +\defineactivetoken 172 {\cyrillict} +\defineactivetoken 173 {\cyrillicy} +\defineactivetoken 174 {\leftguillemot} +\defineactivetoken 175 {\rightguillemot} +\defineactivetoken 176 {\cyrillicf} +\defineactivetoken 177 {\cyrillicc} +\defineactivetoken 178 {\cyrillicch} +\defineactivetoken 180 {\cyrillicsh} +\defineactivetoken 181 {\cyrillicshch} +\defineactivetoken 182 {\cyrillichrdsn} +\defineactivetoken 183 {\cyrillicery} +\defineactivetoken 184 {\cyrillicsftsn} +\defineactivetoken 189 {\cyrillicerev} +\defineactivetoken 190 {\cyrillicyu} +\defineactivetoken 193 {\cyrillicya} +\defineactivetoken 226 {\cyrillicG} +\defineactivetoken 225 {\ss} +\defineactivetoken 231 {\mathematics{\gamma}} +\defineactivetoken 255 {\nonbreakablespace} +\defineactivetoken 194 {\titem} +\defineactivetoken 195 {\shud} +\defineactivetoken 197 {\secondaryshud} +\defineactivetoken 198 {\shilbe} +\defineactivetoken 199 {\gedes} +\defineactivetoken 207 {\secondarygedes} +\defineactivetoken 208 {\cegteishud} +\defineactivetoken 209 {\lewer} +\defineactivetoken 210 {\suuliinlewer} +\defineactivetoken 211 {\tertiarylewer} +\defineactivetoken 212 {\mewer} +\defineactivetoken 213 {\suuliinmewer} +\defineactivetoken 214 {\xewteeqix} +\defineactivetoken 215 {\dawxarcegtxewteeqix} +\defineactivetoken 216 {\halfnum} +\defineactivetoken 219 {\num} +\defineactivetoken 220 {\halfnumtgedes} +\defineactivetoken 221 {\numtaigedes} +\defineactivetoken 222 {\buruuxarsangedes} +\defineactivetoken 223 {\gedesteishilbe} +\defineactivetoken 224 {\erweeljinshilbe} +\defineactivetoken 227 {\secerweeljin} +\defineactivetoken 228 {\bosooshilbe} +\defineactivetoken 229 {\etgershilbe} +\defineactivetoken 230 {\zawj} +\defineactivetoken 232 {\suuliinzawj} +\defineactivetoken 233 {\dawxarcegtzawj} +\defineactivetoken 234 {\sereeewer} +\defineactivetoken 235 {\matgarshilbe} +\defineactivetoken 236 {\bituushilbe} +\defineactivetoken 237 {\secondaryqagt} +\defineactivetoken 238 {\qagt} +\defineactivetoken 239 {\secnumtdelbenqix} +\defineactivetoken 240 {\numtdelbenqix} +\defineactivetoken 241 {\secsertenqixtnum} +\defineactivetoken 242 {\sertenqixtnum} +\defineactivetoken 243 {\zadgaizardigt} +\defineactivetoken 244 {\bituuzardigt} +\defineactivetoken 245 {\malgaitaititem} +\defineactivetoken 246 {\suul} +\defineactivetoken 247 {\orxic} +\defineactivetoken 248 {\biodoisuul} +\defineactivetoken 249 {\bagodoisuul} +\defineactivetoken 250 {\nceg} +\defineactivetoken 251 {\gceg} +\defineactivetoken 252 {\ceg} +\defineactivetoken 253 {\dorwoljin} + +\stopregime + +\startregime[mnk] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicYO} +\defineactivetoken 135 {\cyrillicZH} +\defineactivetoken 136 {\cyrillicZ} +\defineactivetoken 137 {\cyrillicI} +\defineactivetoken 138 {\cyrillicISHRT} +\defineactivetoken 139 {\cyrillicK} +\defineactivetoken 140 {\cyrillicL} +\defineactivetoken 141 {\cyrillicM} +\defineactivetoken 142 {\cyrillicN} +\defineactivetoken 143 {\cyrillicO} +\defineactivetoken 144 {\cyrillicOTLD} +\defineactivetoken 145 {\cyrillicP} +\defineactivetoken 146 {\cyrillicR} +\defineactivetoken 147 {\cyrillicS} +\defineactivetoken 148 {\cyrillicT} +\defineactivetoken 149 {\cyrillicU} +\defineactivetoken 150 {\cyrillicY} +\defineactivetoken 151 {\cyrillicF} +\defineactivetoken 152 {\cyrillicH} +\defineactivetoken 153 {\cyrillicC} +\defineactivetoken 154 {\cyrillicCH} +\defineactivetoken 155 {\cyrillicSH} +\defineactivetoken 156 {\cyrillicSHCH} +\defineactivetoken 157 {\cyrillicHRDSN} +\defineactivetoken 158 {\cyrillicERY} +\defineactivetoken 159 {\cyrillicSFTSN} +\defineactivetoken 160 {\cyrillicEREV} +\defineactivetoken 161 {\cyrillicYU} +\defineactivetoken 162 {\cyrillicYA} +\defineactivetoken 163 {\cyrillica} +\defineactivetoken 164 {\cyrillicb} +\defineactivetoken 165 {\cyrillicv} +\defineactivetoken 166 {\cyrillicg} +\defineactivetoken 167 {\cyrillicd} +\defineactivetoken 168 {\cyrillice} +\defineactivetoken 169 {\cyrillicyo} +\defineactivetoken 170 {\cyrilliczh} +\defineactivetoken 173 {\cyrillicz} +\defineactivetoken 224 {\cyrillici} +\defineactivetoken 225 {\cyrillicishrt} +\defineactivetoken 226 {\cyrillick} +\defineactivetoken 227 {\cyrillicl} +\defineactivetoken 228 {\cyrillicm} +\defineactivetoken 229 {\cyrillicn} +\defineactivetoken 230 {\cyrillico} +\defineactivetoken 231 {\cyrillicotld} +\defineactivetoken 232 {\cyrillicp} +\defineactivetoken 233 {\cyrillicr} +\defineactivetoken 234 {\cyrillics} +\defineactivetoken 235 {\cyrillict} +\defineactivetoken 236 {\cyrillicu} +\defineactivetoken 237 {\cyrillicy} +\defineactivetoken 238 {\cyrillicf} +\defineactivetoken 239 {\cyrillich} +\defineactivetoken 240 {\cyrillicc} +\defineactivetoken 241 {\cyrillicch} +\defineactivetoken 242 {\cyrillicsh} +\defineactivetoken 243 {\cyrillicshch} +\defineactivetoken 244 {\cyrillichrdsn} +\defineactivetoken 245 {\cyrillicery} +\defineactivetoken 248 {\cyrillicsftsn} +\defineactivetoken 252 {\cyrillicerev} +\defineactivetoken 253 {\cyrillicyu} +\defineactivetoken 254 {\cyrillicya} + +\stopregime + +\startregime[mos] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 160 {\cyrillicYO} +\defineactivetoken 134 {\cyrillicZH} +\defineactivetoken 135 {\cyrillicZ} +\defineactivetoken 136 {\cyrillicI} +\defineactivetoken 137 {\cyrillicISHRT} +\defineactivetoken 138 {\cyrillicK} +\defineactivetoken 139 {\cyrillicL} +\defineactivetoken 140 {\cyrillicM} +\defineactivetoken 141 {\cyrillicN} +\defineactivetoken 142 {\cyrillicO} +\defineactivetoken 153 {\cyrillicOTLD} +\defineactivetoken 143 {\cyrillicP} +\defineactivetoken 144 {\cyrillicR} +\defineactivetoken 145 {\cyrillicS} +\defineactivetoken 146 {\cyrillicT} +\defineactivetoken 147 {\cyrillicU} +\defineactivetoken 154 {\cyrillicY} +\defineactivetoken 148 {\cyrillicF} +\defineactivetoken 149 {\cyrillicH} +\defineactivetoken 150 {\cyrillicC} +\defineactivetoken 151 {\cyrillicCH} +\defineactivetoken 152 {\cyrillicSH} +\defineactivetoken 164 {\cyrillicSHCH} +\defineactivetoken 162 {\cyrillicHRDSN} +\defineactivetoken 155 {\cyrillicERY} +\defineactivetoken 156 {\cyrillicSFTSN} +\defineactivetoken 157 {\cyrillicEREV} +\defineactivetoken 158 {\cyrillicYU} +\defineactivetoken 159 {\cyrillicYA} +\defineactivetoken 224 {\cyrillica} +\defineactivetoken 225 {\cyrillicb} +\defineactivetoken 226 {\cyrillicv} +\defineactivetoken 227 {\cyrillicg} +\defineactivetoken 228 {\cyrillicd} +\defineactivetoken 229 {\cyrillice} +\defineactivetoken 161 {\cyrillicyo} +\defineactivetoken 230 {\cyrilliczh} +\defineactivetoken 231 {\cyrillicz} +\defineactivetoken 232 {\cyrillici} +\defineactivetoken 233 {\cyrillicishrt} +\defineactivetoken 234 {\cyrillick} +\defineactivetoken 235 {\cyrillicl} +\defineactivetoken 236 {\cyrillicm} +\defineactivetoken 237 {\cyrillicn} +\defineactivetoken 238 {\cyrillico} +\defineactivetoken 249 {\cyrillicotld} +\defineactivetoken 239 {\cyrillicp} +\defineactivetoken 240 {\cyrillicr} +\defineactivetoken 241 {\cyrillics} +\defineactivetoken 242 {\cyrillict} +\defineactivetoken 243 {\cyrillicu} +\defineactivetoken 250 {\cyrillicy} +\defineactivetoken 244 {\cyrillicf} +\defineactivetoken 245 {\cyrillich} +\defineactivetoken 246 {\cyrillicc} +\defineactivetoken 247 {\cyrillicch} +\defineactivetoken 248 {\cyrillicsh} +\defineactivetoken 165 {\cyrillicshch} +\defineactivetoken 163 {\cyrillichrdsn} +\defineactivetoken 251 {\cyrillicery} +\defineactivetoken 252 {\cyrillicsftsn} +\defineactivetoken 253 {\cyrillicerev} +\defineactivetoken 254 {\cyrillicyu} +\defineactivetoken 168 {\cyrillicya} + +\stopregime + +\startregime[ncc] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicYO} +\defineactivetoken 135 {\cyrillicZH} +\defineactivetoken 136 {\cyrillicZ} +\defineactivetoken 137 {\cyrillicI} +\defineactivetoken 139 {\cyrillicISHRT} +\defineactivetoken 140 {\cyrillicK} +\defineactivetoken 142 {\cyrillicL} +\defineactivetoken 143 {\cyrillicM} +\defineactivetoken 144 {\cyrillicN} +\defineactivetoken 145 {\cyrillicO} +\defineactivetoken 146 {\cyrillicOTLD} +\defineactivetoken 147 {\cyrillicP} +\defineactivetoken 148 {\cyrillicR} +\defineactivetoken 149 {\cyrillicS} +\defineactivetoken 150 {\cyrillicT} +\defineactivetoken 151 {\cyrillicU} +\defineactivetoken 152 {\cyrillicY} +\defineactivetoken 153 {\cyrillicF} +\defineactivetoken 154 {\cyrillicH} +\defineactivetoken 155 {\cyrillicC} +\defineactivetoken 156 {\cyrillicCH} +\defineactivetoken 157 {\cyrillicSH} +\defineactivetoken 158 {\cyrillicSHCH} +\defineactivetoken 159 {\cyrillicHRDSN} +\defineactivetoken 160 {\cyrillicERY} +\defineactivetoken 161 {\cyrillicSFTSN} +\defineactivetoken 162 {\cyrillicEREV} +\defineactivetoken 163 {\cyrillicYU} +\defineactivetoken 164 {\cyrillicYA} +\defineactivetoken 165 {\cyrillica} +\defineactivetoken 166 {\cyrillicb} +\defineactivetoken 167 {\cyrillicv} +\defineactivetoken 168 {\cyrillicg} +\defineactivetoken 169 {\cyrillicd} +\defineactivetoken 170 {\cyrillice} +\defineactivetoken 171 {\cyrillicyo} +\defineactivetoken 172 {\cyrilliczh} +\defineactivetoken 173 {\cyrillicz} +\defineactivetoken 225 {\cyrillici} +\defineactivetoken 226 {\cyrillicishrt} +\defineactivetoken 227 {\cyrillick} +\defineactivetoken 228 {\cyrillicl} +\defineactivetoken 229 {\cyrillicm} +\defineactivetoken 230 {\cyrillicn} +\defineactivetoken 231 {\cyrillico} +\defineactivetoken 232 {\cyrillicotld} +\defineactivetoken 233 {\cyrillicp} +\defineactivetoken 234 {\cyrillicr} +\defineactivetoken 235 {\cyrillics} +\defineactivetoken 236 {\cyrillict} +\defineactivetoken 237 {\cyrillicu} +\defineactivetoken 238 {\cyrillicy} +\defineactivetoken 239 {\cyrillicf} +\defineactivetoken 240 {\cyrillich} +\defineactivetoken 241 {\cyrillicc} +\defineactivetoken 242 {\cyrillicch} +\defineactivetoken 243 {\cyrillicsh} +\defineactivetoken 244 {\cyrillicshch} +\defineactivetoken 245 {\cyrillichrdsn} +\defineactivetoken 246 {\cyrillicery} +\defineactivetoken 247 {\cyrillicsftsn} +\defineactivetoken 248 {\cyrillicerev} +\defineactivetoken 249 {\cyrillicyu} +\defineactivetoken 251 {\cyrillicya} + +\stopregime + +\endinput diff --git a/tex/context/base/regi-cyr.tex b/tex/context/base/regi-cyr.tex new file mode 100644 index 000000000..ecb13973e --- /dev/null +++ b/tex/context/base/regi-cyr.tex @@ -0,0 +1,840 @@ +%D \module +%D [ file=regi-cyr, +%D version=2003.01.24, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Cyrillic, +%D author=..., +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D Here are input regimes for cyrillic encodings: +%D +%D \startopsomming +%D \som windows +%D \som two variants of dos +%D \som three variants of koi-8 for *nix: russian, +%D ukrainian and mixed +%D \som two variants for the mac +%D \stopopsomming +%D +%D Other, not so popular regimes, can be found in \type +%D {regi-cy2}. + +% to do : +% +% Some regimes contain symbols which are not yet defined in ConTeXt. +% Here are given some (probably not perfect) definitions, have to +% be substituted by real symbols if available. +% LaTeX names are used + +% \definecharacter textcent +% {c\rlap{\hskip-.2em\vrule width.2ptheight1.2exdepth0.2ex\relax}} +% \definecharacter texteuro +% {C\rlap{\hskip-.75em\vrule width.4emheight.85exdepth-0.8ex\relax}} +% \definecharacter textblacksquare +% {\vrule width.3emheight.4emdepth-.1em\relax} +% \definecharacter textdegree +% {\mathematics{{^\circ}}} +% \definecharacter texttrademark +% {\high{\ss\tx TM}} +% \definecharacter textbrokenbar +% {\kern0.05em\vrule width0.4ptheight1.8exdepth-0.85ex\llap{\vrule +% width0.4ptheight0.35exdepth0.6ex}\kern0.05em} + +\startregime[cp1251] + +\defineactivetoken 192 {\cyrillicA} +\defineactivetoken 193 {\cyrillicB} +\defineactivetoken 194 {\cyrillicV} +\defineactivetoken 195 {\cyrillicG} +\defineactivetoken 196 {\cyrillicD} +\defineactivetoken 197 {\cyrillicE} +\defineactivetoken 198 {\cyrillicZH} +\defineactivetoken 199 {\cyrillicZ} +\defineactivetoken 200 {\cyrillicI} +\defineactivetoken 201 {\cyrillicISHRT} +\defineactivetoken 202 {\cyrillicK} +\defineactivetoken 203 {\cyrillicL} +\defineactivetoken 204 {\cyrillicM} +\defineactivetoken 205 {\cyrillicN} +\defineactivetoken 206 {\cyrillicO} +\defineactivetoken 207 {\cyrillicP} +\defineactivetoken 208 {\cyrillicR} +\defineactivetoken 209 {\cyrillicS} +\defineactivetoken 210 {\cyrillicT} +\defineactivetoken 211 {\cyrillicU} +\defineactivetoken 212 {\cyrillicF} +\defineactivetoken 213 {\cyrillicH} +\defineactivetoken 214 {\cyrillicC} +\defineactivetoken 215 {\cyrillicCH} +\defineactivetoken 216 {\cyrillicSH} +\defineactivetoken 217 {\cyrillicSHCH} +\defineactivetoken 218 {\cyrillicHRDSN} +\defineactivetoken 219 {\cyrillicERY} +\defineactivetoken 220 {\cyrillicSFTSN} +\defineactivetoken 221 {\cyrillicEREV} +\defineactivetoken 222 {\cyrillicYU} +\defineactivetoken 223 {\cyrillicYA} +\defineactivetoken 224 {\cyrillica} +\defineactivetoken 225 {\cyrillicb} +\defineactivetoken 226 {\cyrillicv} +\defineactivetoken 227 {\cyrillicg} +\defineactivetoken 228 {\cyrillicd} +\defineactivetoken 229 {\cyrillice} +\defineactivetoken 230 {\cyrilliczh} +\defineactivetoken 231 {\cyrillicz} +\defineactivetoken 232 {\cyrillici} +\defineactivetoken 233 {\cyrillicishrt} +\defineactivetoken 234 {\cyrillick} +\defineactivetoken 235 {\cyrillicl} +\defineactivetoken 236 {\cyrillicm} +\defineactivetoken 237 {\cyrillicn} +\defineactivetoken 238 {\cyrillico} +\defineactivetoken 239 {\cyrillicp} +\defineactivetoken 240 {\cyrillicr} +\defineactivetoken 241 {\cyrillics} +\defineactivetoken 242 {\cyrillict} +\defineactivetoken 243 {\cyrillicu} +\defineactivetoken 244 {\cyrillicf} +\defineactivetoken 245 {\cyrillich} +\defineactivetoken 246 {\cyrillicc} +\defineactivetoken 247 {\cyrillicch} +\defineactivetoken 248 {\cyrillicsh} +\defineactivetoken 249 {\cyrillicshch} +\defineactivetoken 250 {\cyrillichrdsn} +\defineactivetoken 251 {\cyrillicery} +\defineactivetoken 252 {\cyrillicsftsn} +\defineactivetoken 253 {\cyrillicerev} +\defineactivetoken 254 {\cyrillicyu} +\defineactivetoken 255 {\cyrillicya} +\defineactivetoken 128 {\cyrillicDJE} +\defineactivetoken 129 {\'\cyrillicG} +\defineactivetoken 130 {\lowerleftsingleninequote} +\defineactivetoken 131 {\'\cyrillicg} +\defineactivetoken 132 {\lowerleftdoubleninequote} +\defineactivetoken 133 {\dots} +\defineactivetoken 134 {\dag} +\defineactivetoken 135 {\ddag} +\defineactivetoken 136 {\texteuro} +\defineactivetoken 137 {\textperthousand} +\defineactivetoken 138 {\cyrillicLJE} +\defineactivetoken 139 {\leftsubguillemot} +\defineactivetoken 140 {\cyrillicNJE} +\defineactivetoken 141 {\'\cyrillicK} +\defineactivetoken 142 {\cyrillicTSHE} +\defineactivetoken 143 {\cyrillicDZHE} +\defineactivetoken 144 {\cyrillicdje} +\defineactivetoken 145 {\upperleftsinglesixquote} +\defineactivetoken 146 {\upperrightsingleninequote} +\defineactivetoken 147 {\upperleftsinglesixquote} +\defineactivetoken 148 {\upperrightdoubleninequote} +\defineactivetoken 149 {\bullet} +\defineactivetoken 150 {\endash} +\defineactivetoken 151 {\emdash} +\defineactivetoken 153 {\texttrademark} +\defineactivetoken 154 {\cyrilliclje} +\defineactivetoken 155 {\rightsubguillemot} +\defineactivetoken 156 {\cyrillicnje} +\defineactivetoken 157 {\'\cyrillick} +\defineactivetoken 158 {\cyrillictshe} +\defineactivetoken 159 {\cyrillicdzhe} +\defineactivetoken 160 {\nonbreakablespace} +\defineactivetoken 161 {\cyrillicUSHRT} +\defineactivetoken 162 {\cyrillicushrt} +\defineactivetoken 163 {\cyrillicJE} +\defineactivetoken 164 {\textcurrency} +\defineactivetoken 165 {\cyrillicGUP} +\defineactivetoken 166 {\textbrokenbar} +\defineactivetoken 167 {\S} +\defineactivetoken 168 {\cyrillicYO} +\defineactivetoken 169 {\copyright} +\defineactivetoken 170 {\cyrillicIE} +\defineactivetoken 171 {\leftguillemot} +\defineactivetoken 173 {\-} +\defineactivetoken 174 {\registered} +\defineactivetoken 175 {\cyrillicYI} +\defineactivetoken 176 {\textdegree} +\defineactivetoken 178 {\cyrillicII} +\defineactivetoken 179 {\cyrillicii} +\defineactivetoken 180 {\cyrillicgup} +\defineactivetoken 182 {\P} +\defineactivetoken 183 {\textperiodcentered} +\defineactivetoken 184 {\cyrillicyo} +\defineactivetoken 185 {\textnumero} +\defineactivetoken 186 {\cyrillicie} +\defineactivetoken 187 {\rightguillemot} +\defineactivetoken 188 {\cyrillicje} +\defineactivetoken 189 {\cyrillicDZE} +\defineactivetoken 190 {\cyrillicdze} +\defineactivetoken 191 {\cyrillicyi} + +\stopregime + +\startregime[cp866] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicZH} +\defineactivetoken 135 {\cyrillicZ} +\defineactivetoken 136 {\cyrillicI} +\defineactivetoken 137 {\cyrillicISHRT} +\defineactivetoken 138 {\cyrillicK} +\defineactivetoken 139 {\cyrillicL} +\defineactivetoken 140 {\cyrillicM} +\defineactivetoken 141 {\cyrillicN} +\defineactivetoken 142 {\cyrillicO} +\defineactivetoken 143 {\cyrillicP} +\defineactivetoken 144 {\cyrillicR} +\defineactivetoken 145 {\cyrillicS} +\defineactivetoken 146 {\cyrillicT} +\defineactivetoken 147 {\cyrillicU} +\defineactivetoken 148 {\cyrillicF} +\defineactivetoken 149 {\cyrillicH} +\defineactivetoken 150 {\cyrillicC} +\defineactivetoken 151 {\cyrillicCH} +\defineactivetoken 152 {\cyrillicSH} +\defineactivetoken 153 {\cyrillicSHCH} +\defineactivetoken 154 {\cyrillicHRDSN} +\defineactivetoken 155 {\cyrillicERY} +\defineactivetoken 156 {\cyrillicSFTSN} +\defineactivetoken 157 {\cyrillicEREV} +\defineactivetoken 158 {\cyrillicYU} +\defineactivetoken 159 {\cyrillicYA} +\defineactivetoken 160 {\cyrillica} +\defineactivetoken 161 {\cyrillicb} +\defineactivetoken 162 {\cyrillicv} +\defineactivetoken 163 {\cyrillicg} +\defineactivetoken 164 {\cyrillicd} +\defineactivetoken 165 {\cyrillice} +\defineactivetoken 166 {\cyrilliczh} +\defineactivetoken 167 {\cyrillicz} +\defineactivetoken 168 {\cyrillici} +\defineactivetoken 169 {\cyrillicishrt} +\defineactivetoken 170 {\cyrillick} +\defineactivetoken 171 {\cyrillicl} +\defineactivetoken 172 {\cyrillicm} +\defineactivetoken 173 {\cyrillicn} +\defineactivetoken 174 {\cyrillico} +\defineactivetoken 175 {\cyrillicp} +\defineactivetoken 224 {\cyrillicr} +\defineactivetoken 225 {\cyrillics} +\defineactivetoken 226 {\cyrillict} +\defineactivetoken 227 {\cyrillicu} +\defineactivetoken 228 {\cyrillicf} +\defineactivetoken 229 {\cyrillich} +\defineactivetoken 230 {\cyrillicc} +\defineactivetoken 231 {\cyrillicch} +\defineactivetoken 232 {\cyrillicsh} +\defineactivetoken 233 {\cyrillicshch} +\defineactivetoken 234 {\cyrillichrdsn} +\defineactivetoken 235 {\cyrillicery} +\defineactivetoken 236 {\cyrillicsftsn} +\defineactivetoken 237 {\cyrillicerev} +\defineactivetoken 238 {\cyrillicyu} +\defineactivetoken 239 {\cyrillicya} +\defineactivetoken 240 {\cyrillicYO} +\defineactivetoken 241 {\cyrillicyo} +\defineactivetoken 242 {\cyrillicIE} +\defineactivetoken 243 {\cyrillicie} +\defineactivetoken 244 {\cyrillicYI} +\defineactivetoken 245 {\cyrillicyi} +\defineactivetoken 246 {\cyrillicUSHRT} +\defineactivetoken 247 {\cyrillicushrt} +\defineactivetoken 248 {\textdegree} +\defineactivetoken 249 {\bullet} +\defineactivetoken 250 {\textperiodcentered} +\defineactivetoken 252 {\textnumero} +\defineactivetoken 253 {\textcurrency} +\defineactivetoken 254 {\textblacksquare} +\defineactivetoken 255 {\nonbreakablespace} + +\stopregime + +\startregime[cp866nav] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicZH} +\defineactivetoken 135 {\cyrillicZ} +\defineactivetoken 136 {\cyrillicI} +\defineactivetoken 137 {\cyrillicISHRT} +\defineactivetoken 138 {\cyrillicK} +\defineactivetoken 139 {\cyrillicL} +\defineactivetoken 140 {\cyrillicM} +\defineactivetoken 141 {\cyrillicN} +\defineactivetoken 142 {\cyrillicO} +\defineactivetoken 143 {\cyrillicP} +\defineactivetoken 144 {\cyrillicR} +\defineactivetoken 145 {\cyrillicS} +\defineactivetoken 146 {\cyrillicT} +\defineactivetoken 147 {\cyrillicU} +\defineactivetoken 148 {\cyrillicF} +\defineactivetoken 149 {\cyrillicH} +\defineactivetoken 150 {\cyrillicC} +\defineactivetoken 151 {\cyrillicCH} +\defineactivetoken 152 {\cyrillicSH} +\defineactivetoken 153 {\cyrillicSHCH} +\defineactivetoken 154 {\cyrillicHRDSN} +\defineactivetoken 155 {\cyrillicERY} +\defineactivetoken 156 {\cyrillicSFTSN} +\defineactivetoken 157 {\cyrillicEREV} +\defineactivetoken 158 {\cyrillicYU} +\defineactivetoken 159 {\cyrillicYA} +\defineactivetoken 160 {\cyrillica} +\defineactivetoken 161 {\cyrillicb} +\defineactivetoken 162 {\cyrillicv} +\defineactivetoken 163 {\cyrillicg} +\defineactivetoken 164 {\cyrillicd} +\defineactivetoken 165 {\cyrillice} +\defineactivetoken 166 {\cyrilliczh} +\defineactivetoken 167 {\cyrillicz} +\defineactivetoken 168 {\cyrillici} +\defineactivetoken 169 {\cyrillicishrt} +\defineactivetoken 170 {\cyrillick} +\defineactivetoken 171 {\cyrillicl} +\defineactivetoken 172 {\cyrillicm} +\defineactivetoken 173 {\cyrillicn} +\defineactivetoken 174 {\cyrillico} +\defineactivetoken 175 {\cyrillicp} +\defineactivetoken 224 {\cyrillicr} +\defineactivetoken 225 {\cyrillics} +\defineactivetoken 226 {\cyrillict} +\defineactivetoken 227 {\cyrillicu} +\defineactivetoken 228 {\cyrillicf} +\defineactivetoken 229 {\cyrillich} +\defineactivetoken 230 {\cyrillicc} +\defineactivetoken 231 {\cyrillicch} +\defineactivetoken 232 {\cyrillicsh} +\defineactivetoken 233 {\cyrillicshch} +\defineactivetoken 234 {\cyrillichrdsn} +\defineactivetoken 235 {\cyrillicery} +\defineactivetoken 236 {\cyrillicsftsn} +\defineactivetoken 237 {\cyrillicerev} +\defineactivetoken 238 {\cyrillicyu} +\defineactivetoken 239 {\cyrillicya} +\defineactivetoken 240 {\cyrillicYO} +\defineactivetoken 241 {\cyrillicyo} +\defineactivetoken 242 {\cyrillicGUP} +\defineactivetoken 243 {\cyrillicgup} +\defineactivetoken 244 {\cyrillicIE} +\defineactivetoken 245 {\cyrillicie} +\defineactivetoken 246 {\cyrillicII} +\defineactivetoken 247 {\cyrillicii} +\defineactivetoken 248 {\cyrillicYI} +\defineactivetoken 249 {\cyrillicyi} +\defineactivetoken 250 {\cyrillicUSHRT} +\defineactivetoken 251 {\cyrillicushrt} +\defineactivetoken 252 {\textnumero} +\defineactivetoken 253 {\leftguillemot} +\defineactivetoken 254 {\rightguillemot} +\defineactivetoken 255 {\nonbreakablespace} + +\stopregime + +\startregime[koi8-r] + +\defineactivetoken 225 {\cyrillicA} +\defineactivetoken 226 {\cyrillicB} +\defineactivetoken 247 {\cyrillicV} +\defineactivetoken 231 {\cyrillicG} +\defineactivetoken 228 {\cyrillicD} +\defineactivetoken 229 {\cyrillicE} +\defineactivetoken 179 {\cyrillicYO} +\defineactivetoken 246 {\cyrillicZH} +\defineactivetoken 250 {\cyrillicZ} +\defineactivetoken 233 {\cyrillicI} +\defineactivetoken 234 {\cyrillicISHRT} +\defineactivetoken 235 {\cyrillicK} +\defineactivetoken 236 {\cyrillicL} +\defineactivetoken 237 {\cyrillicM} +\defineactivetoken 238 {\cyrillicN} +\defineactivetoken 239 {\cyrillicO} +\defineactivetoken 240 {\cyrillicP} +\defineactivetoken 242 {\cyrillicR} +\defineactivetoken 243 {\cyrillicS} +\defineactivetoken 244 {\cyrillicT} +\defineactivetoken 245 {\cyrillicU} +\defineactivetoken 230 {\cyrillicF} +\defineactivetoken 232 {\cyrillicH} +\defineactivetoken 227 {\cyrillicC} +\defineactivetoken 254 {\cyrillicCH} +\defineactivetoken 251 {\cyrillicSH} +\defineactivetoken 253 {\cyrillicSHCH} +\defineactivetoken 255 {\cyrillicHRDSN} +\defineactivetoken 249 {\cyrillicERY} +\defineactivetoken 248 {\cyrillicSFTSN} +\defineactivetoken 252 {\cyrillicEREV} +\defineactivetoken 224 {\cyrillicYU} +\defineactivetoken 241 {\cyrillicYA} +\defineactivetoken 193 {\cyrillica} +\defineactivetoken 194 {\cyrillicb} +\defineactivetoken 215 {\cyrillicv} +\defineactivetoken 199 {\cyrillicg} +\defineactivetoken 196 {\cyrillicd} +\defineactivetoken 197 {\cyrillice} +\defineactivetoken 163 {\cyrillicyo} +\defineactivetoken 214 {\cyrilliczh} +\defineactivetoken 218 {\cyrillicz} +\defineactivetoken 201 {\cyrillici} +\defineactivetoken 202 {\cyrillicishrt} +\defineactivetoken 203 {\cyrillick} +\defineactivetoken 204 {\cyrillicl} +\defineactivetoken 205 {\cyrillicm} +\defineactivetoken 206 {\cyrillicn} +\defineactivetoken 207 {\cyrillico} +\defineactivetoken 208 {\cyrillicp} +\defineactivetoken 210 {\cyrillicr} +\defineactivetoken 211 {\cyrillics} +\defineactivetoken 212 {\cyrillict} +\defineactivetoken 213 {\cyrillicu} +\defineactivetoken 198 {\cyrillicf} +\defineactivetoken 200 {\cyrillich} +\defineactivetoken 195 {\cyrillicc} +\defineactivetoken 222 {\cyrillicch} +\defineactivetoken 219 {\cyrillicsh} +\defineactivetoken 221 {\cyrillicshch} +\defineactivetoken 223 {\cyrillichrdsn} +\defineactivetoken 217 {\cyrillicery} +\defineactivetoken 216 {\cyrillicsftsn} +\defineactivetoken 220 {\cyrillicerev} +\defineactivetoken 192 {\cyrillicyu} +\defineactivetoken 209 {\cyrillicya} +\defineactivetoken 148 {\textblacksquare} +\defineactivetoken 149 {\bullet} +\defineactivetoken 154 {\nonbreakablespace} +\defineactivetoken 156 {\textdegree} +\defineactivetoken 158 {\textperiodcentered} +\defineactivetoken 191 {\copyright} + +\stopregime + +\startregime[koi8-ru] + +\defineactivetoken 225 {\cyrillicA} +\defineactivetoken 226 {\cyrillicB} +\defineactivetoken 247 {\cyrillicV} +\defineactivetoken 231 {\cyrillicG} +\defineactivetoken 228 {\cyrillicD} +\defineactivetoken 229 {\cyrillicE} +\defineactivetoken 179 {\cyrillicYO} +\defineactivetoken 246 {\cyrillicZH} +\defineactivetoken 250 {\cyrillicZ} +\defineactivetoken 233 {\cyrillicI} +\defineactivetoken 234 {\cyrillicISHRT} +\defineactivetoken 235 {\cyrillicK} +\defineactivetoken 236 {\cyrillicL} +\defineactivetoken 237 {\cyrillicM} +\defineactivetoken 238 {\cyrillicN} +\defineactivetoken 239 {\cyrillicO} +\defineactivetoken 240 {\cyrillicP} +\defineactivetoken 242 {\cyrillicR} +\defineactivetoken 243 {\cyrillicS} +\defineactivetoken 244 {\cyrillicT} +\defineactivetoken 245 {\cyrillicU} +\defineactivetoken 230 {\cyrillicF} +\defineactivetoken 232 {\cyrillicH} +\defineactivetoken 227 {\cyrillicC} +\defineactivetoken 254 {\cyrillicCH} +\defineactivetoken 251 {\cyrillicSH} +\defineactivetoken 253 {\cyrillicSHCH} +\defineactivetoken 255 {\cyrillicHRDSN} +\defineactivetoken 249 {\cyrillicERY} +\defineactivetoken 248 {\cyrillicSFTSN} +\defineactivetoken 252 {\cyrillicEREV} +\defineactivetoken 224 {\cyrillicYU} +\defineactivetoken 241 {\cyrillicYA} +\defineactivetoken 193 {\cyrillica} +\defineactivetoken 194 {\cyrillicb} +\defineactivetoken 215 {\cyrillicv} +\defineactivetoken 199 {\cyrillicg} +\defineactivetoken 196 {\cyrillicd} +\defineactivetoken 197 {\cyrillice} +\defineactivetoken 163 {\cyrillicyo} +\defineactivetoken 214 {\cyrilliczh} +\defineactivetoken 218 {\cyrillicz} +\defineactivetoken 201 {\cyrillici} +\defineactivetoken 202 {\cyrillicishrt} +\defineactivetoken 203 {\cyrillick} +\defineactivetoken 204 {\cyrillicl} +\defineactivetoken 205 {\cyrillicm} +\defineactivetoken 206 {\cyrillicn} +\defineactivetoken 207 {\cyrillico} +\defineactivetoken 208 {\cyrillicp} +\defineactivetoken 210 {\cyrillicr} +\defineactivetoken 211 {\cyrillics} +\defineactivetoken 212 {\cyrillict} +\defineactivetoken 213 {\cyrillicu} +\defineactivetoken 198 {\cyrillicf} +\defineactivetoken 200 {\cyrillich} +\defineactivetoken 195 {\cyrillicc} +\defineactivetoken 222 {\cyrillicch} +\defineactivetoken 219 {\cyrillicsh} +\defineactivetoken 221 {\cyrillicshch} +\defineactivetoken 223 {\cyrillichrdsn} +\defineactivetoken 217 {\cyrillicery} +\defineactivetoken 216 {\cyrillicsftsn} +\defineactivetoken 220 {\cyrillicerev} +\defineactivetoken 192 {\cyrillicyu} +\defineactivetoken 209 {\cyrillicya} +\defineactivetoken 147 {\upperleftsinglesixquote} +\defineactivetoken 148 {\textblacksquare} +\defineactivetoken 149 {\bullet} +\defineactivetoken 150 {\upperrightdoubleninequote} +\defineactivetoken 151 {\emdash} +\defineactivetoken 152 {\textnumero} +\defineactivetoken 153 {\texttrademark} +\defineactivetoken 154 {\nonbreakablespace} +\defineactivetoken 155 {\rightguillemot} +\defineactivetoken 156 {\registered} +\defineactivetoken 157 {\leftguillemot} +\defineactivetoken 158 {\textperiodcentered} +\defineactivetoken 159 {\textcurrency} +\defineactivetoken 164 {\cyrillicie} +\defineactivetoken 166 {\cyrillicii} +\defineactivetoken 167 {\cyrillicyi} +\defineactivetoken 173 {\cyrillicgup} +\defineactivetoken 174 {\cyrillicushrt} +\defineactivetoken 180 {\cyrillicIE} +\defineactivetoken 182 {\cyrillicII} +\defineactivetoken 183 {\cyrillicYI} +\defineactivetoken 189 {\cyrillicGUP} +\defineactivetoken 190 {\cyrillicUSHRT} +\defineactivetoken 191 {\copyright} + +\stopregime + +\startregime[koi8-u] + +\defineactivetoken 225 {\cyrillicA} +\defineactivetoken 226 {\cyrillicB} +\defineactivetoken 247 {\cyrillicV} +\defineactivetoken 231 {\cyrillicG} +\defineactivetoken 228 {\cyrillicD} +\defineactivetoken 229 {\cyrillicE} +\defineactivetoken 179 {\cyrillicYO} +\defineactivetoken 246 {\cyrillicZH} +\defineactivetoken 250 {\cyrillicZ} +\defineactivetoken 233 {\cyrillicI} +\defineactivetoken 234 {\cyrillicISHRT} +\defineactivetoken 235 {\cyrillicK} +\defineactivetoken 236 {\cyrillicL} +\defineactivetoken 237 {\cyrillicM} +\defineactivetoken 238 {\cyrillicN} +\defineactivetoken 239 {\cyrillicO} +\defineactivetoken 240 {\cyrillicP} +\defineactivetoken 242 {\cyrillicR} +\defineactivetoken 243 {\cyrillicS} +\defineactivetoken 244 {\cyrillicT} +\defineactivetoken 245 {\cyrillicU} +\defineactivetoken 230 {\cyrillicF} +\defineactivetoken 232 {\cyrillicH} +\defineactivetoken 227 {\cyrillicC} +\defineactivetoken 254 {\cyrillicCH} +\defineactivetoken 251 {\cyrillicSH} +\defineactivetoken 253 {\cyrillicSHCH} +\defineactivetoken 255 {\cyrillicHRDSN} +\defineactivetoken 249 {\cyrillicERY} +\defineactivetoken 248 {\cyrillicSFTSN} +\defineactivetoken 252 {\cyrillicEREV} +\defineactivetoken 224 {\cyrillicYU} +\defineactivetoken 241 {\cyrillicYA} +\defineactivetoken 193 {\cyrillica} +\defineactivetoken 194 {\cyrillicb} +\defineactivetoken 215 {\cyrillicv} +\defineactivetoken 199 {\cyrillicg} +\defineactivetoken 196 {\cyrillicd} +\defineactivetoken 197 {\cyrillice} +\defineactivetoken 163 {\cyrillicyo} +\defineactivetoken 214 {\cyrilliczh} +\defineactivetoken 218 {\cyrillicz} +\defineactivetoken 201 {\cyrillici} +\defineactivetoken 202 {\cyrillicishrt} +\defineactivetoken 203 {\cyrillick} +\defineactivetoken 204 {\cyrillicl} +\defineactivetoken 205 {\cyrillicm} +\defineactivetoken 206 {\cyrillicn} +\defineactivetoken 207 {\cyrillico} +\defineactivetoken 208 {\cyrillicp} +\defineactivetoken 210 {\cyrillicr} +\defineactivetoken 211 {\cyrillics} +\defineactivetoken 212 {\cyrillict} +\defineactivetoken 213 {\cyrillicu} +\defineactivetoken 198 {\cyrillicf} +\defineactivetoken 200 {\cyrillich} +\defineactivetoken 195 {\cyrillicc} +\defineactivetoken 222 {\cyrillicch} +\defineactivetoken 219 {\cyrillicsh} +\defineactivetoken 221 {\cyrillicshch} +\defineactivetoken 223 {\cyrillichrdsn} +\defineactivetoken 217 {\cyrillicery} +\defineactivetoken 216 {\cyrillicsftsn} +\defineactivetoken 220 {\cyrillicerev} +\defineactivetoken 192 {\cyrillicyu} +\defineactivetoken 209 {\cyrillicya} +\defineactivetoken 164 {\cyrillicie} +\defineactivetoken 166 {\cyrillicii} +\defineactivetoken 167 {\cyrillicyi} +\defineactivetoken 173 {\cyrillicgup} +\defineactivetoken 180 {\cyrillicIE} +\defineactivetoken 182 {\cyrillicII} +\defineactivetoken 183 {\cyrillicYI} +\defineactivetoken 189 {\cyrillicGUP} + +\stopregime + +\startregime[maccyr] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicZH} +\defineactivetoken 135 {\cyrillicZ} +\defineactivetoken 136 {\cyrillicI} +\defineactivetoken 137 {\cyrillicISHRT} +\defineactivetoken 138 {\cyrillicK} +\defineactivetoken 139 {\cyrillicL} +\defineactivetoken 140 {\cyrillicM} +\defineactivetoken 141 {\cyrillicN} +\defineactivetoken 142 {\cyrillicO} +\defineactivetoken 143 {\cyrillicP} +\defineactivetoken 144 {\cyrillicR} +\defineactivetoken 145 {\cyrillicS} +\defineactivetoken 146 {\cyrillicT} +\defineactivetoken 147 {\cyrillicU} +\defineactivetoken 148 {\cyrillicF} +\defineactivetoken 149 {\cyrillicH} +\defineactivetoken 150 {\cyrillicC} +\defineactivetoken 151 {\cyrillicCH} +\defineactivetoken 152 {\cyrillicSH} +\defineactivetoken 153 {\cyrillicSHCH} +\defineactivetoken 154 {\cyrillicHRDSN} +\defineactivetoken 155 {\cyrillicERY} +\defineactivetoken 156 {\cyrillicSFTSN} +\defineactivetoken 157 {\cyrillicEREV} +\defineactivetoken 158 {\cyrillicYU} +\defineactivetoken 159 {\cyrillicYA} +\defineactivetoken 160 {\dag} +\defineactivetoken 161 {\textdegree} +\defineactivetoken 162 {\textcent} +\defineactivetoken 163 {\sterling} +\defineactivetoken 164 {\S} +\defineactivetoken 165 {\bullet} +\defineactivetoken 166 {\P} +\defineactivetoken 167 {\cyrillicII} +\defineactivetoken 168 {\registered} +\defineactivetoken 169 {\copyright} +\defineactivetoken 170 {\texttrademark} +\defineactivetoken 171 {\cyrillicDJE} +\defineactivetoken 172 {\cyrillicdje} +\defineactivetoken 174 {\'\cyrillicG} +\defineactivetoken 175 {\'\cyrillicg} +\defineactivetoken 180 {\cyrillicii} +\defineactivetoken 183 {\cyrillicJE} +\defineactivetoken 184 {\cyrillicIE} +\defineactivetoken 185 {\cyrillicie} +\defineactivetoken 186 {\cyrillicYI} +\defineactivetoken 187 {\cyrillicyi} +\defineactivetoken 188 {\cyrillicLJE} +\defineactivetoken 189 {\cyrilliclje} +\defineactivetoken 190 {\cyrillicNJE} +\defineactivetoken 191 {\cyrillicnje} +\defineactivetoken 192 {\cyrillicje} +\defineactivetoken 193 {\cyrillicDZE} +\defineactivetoken 196 {\florijn} +\defineactivetoken 199 {\leftguillemot} +\defineactivetoken 200 {\rightguillemot} +\defineactivetoken 201 {\dots} +\defineactivetoken 202 {\nonbreakablespace} +\defineactivetoken 203 {\cyrillicTSHE} +\defineactivetoken 204 {\cyrillictshe} +\defineactivetoken 205 {\'\cyrillicK} +\defineactivetoken 206 {\'\cyrillick} +\defineactivetoken 207 {\cyrillicdze} +\defineactivetoken 208 {\endash} +\defineactivetoken 209 {\emdash} +\defineactivetoken 210 {\upperleftsinglesixquote} +\defineactivetoken 211 {\upperrightdoubleninequote} +\defineactivetoken 212 {\upperleftsinglesixquote} +\defineactivetoken 213 {\upperrightsingleninequote} +\defineactivetoken 215 {\lowerleftdoubleninequote} +\defineactivetoken 216 {\cyrillicUSHRT} +\defineactivetoken 217 {\cyrillicushrt} +\defineactivetoken 218 {\cyrillicDZHE} +\defineactivetoken 219 {\cyrillicdzhe} +\defineactivetoken 220 {\textnumero} +\defineactivetoken 221 {\cyrillicYO} +\defineactivetoken 222 {\cyrillicyo} +\defineactivetoken 223 {\cyrillicya} +\defineactivetoken 224 {\cyrillica} +\defineactivetoken 225 {\cyrillicb} +\defineactivetoken 226 {\cyrillicv} +\defineactivetoken 227 {\cyrillicg} +\defineactivetoken 228 {\cyrillicd} +\defineactivetoken 229 {\cyrillice} +\defineactivetoken 230 {\cyrilliczh} +\defineactivetoken 231 {\cyrillicz} +\defineactivetoken 232 {\cyrillici} +\defineactivetoken 233 {\cyrillicishrt} +\defineactivetoken 234 {\cyrillick} +\defineactivetoken 235 {\cyrillicl} +\defineactivetoken 236 {\cyrillicm} +\defineactivetoken 237 {\cyrillicn} +\defineactivetoken 238 {\cyrillico} +\defineactivetoken 239 {\cyrillicp} +\defineactivetoken 240 {\cyrillicr} +\defineactivetoken 241 {\cyrillics} +\defineactivetoken 242 {\cyrillict} +\defineactivetoken 243 {\cyrillicu} +\defineactivetoken 244 {\cyrillicf} +\defineactivetoken 245 {\cyrillich} +\defineactivetoken 246 {\cyrillicc} +\defineactivetoken 247 {\cyrillicch} +\defineactivetoken 248 {\cyrillicsh} +\defineactivetoken 249 {\cyrillicshch} +\defineactivetoken 250 {\cyrillichrdsn} +\defineactivetoken 251 {\cyrillicery} +\defineactivetoken 252 {\cyrillicsftsn} +\defineactivetoken 253 {\cyrillicerev} +\defineactivetoken 254 {\cyrillicyu} +\defineactivetoken 255 {\textcurrency} + +\stopregime + +\startregime[macukr] + +\defineactivetoken 128 {\cyrillicA} +\defineactivetoken 129 {\cyrillicB} +\defineactivetoken 130 {\cyrillicV} +\defineactivetoken 131 {\cyrillicG} +\defineactivetoken 132 {\cyrillicD} +\defineactivetoken 133 {\cyrillicE} +\defineactivetoken 134 {\cyrillicZH} +\defineactivetoken 135 {\cyrillicZ} +\defineactivetoken 136 {\cyrillicI} +\defineactivetoken 137 {\cyrillicISHRT} +\defineactivetoken 138 {\cyrillicK} +\defineactivetoken 139 {\cyrillicL} +\defineactivetoken 140 {\cyrillicM} +\defineactivetoken 141 {\cyrillicN} +\defineactivetoken 142 {\cyrillicO} +\defineactivetoken 143 {\cyrillicP} +\defineactivetoken 144 {\cyrillicR} +\defineactivetoken 145 {\cyrillicS} +\defineactivetoken 146 {\cyrillicT} +\defineactivetoken 147 {\cyrillicU} +\defineactivetoken 148 {\cyrillicF} +\defineactivetoken 149 {\cyrillicH} +\defineactivetoken 150 {\cyrillicC} +\defineactivetoken 151 {\cyrillicCH} +\defineactivetoken 152 {\cyrillicSH} +\defineactivetoken 153 {\cyrillicSHCH} +\defineactivetoken 154 {\cyrillicHRDSN} +\defineactivetoken 155 {\cyrillicERY} +\defineactivetoken 156 {\cyrillicSFTSN} +\defineactivetoken 157 {\cyrillicEREV} +\defineactivetoken 158 {\cyrillicYU} +\defineactivetoken 159 {\cyrillicYA} +\defineactivetoken 160 {\dag} +\defineactivetoken 161 {\textdegree} +\defineactivetoken 162 {\cyrillicGUP} +\defineactivetoken 163 {\sterling} +\defineactivetoken 164 {\S} +\defineactivetoken 165 {\bullet} +\defineactivetoken 166 {\P} +\defineactivetoken 167 {\cyrillicII} +\defineactivetoken 168 {\registered} +\defineactivetoken 169 {\copyright} +\defineactivetoken 170 {\texttrademark} +\defineactivetoken 171 {\cyrillicDJE} +\defineactivetoken 172 {\cyrillicdje} +\defineactivetoken 174 {\'\cyrillicG} +\defineactivetoken 175 {\'\cyrillicg} +\defineactivetoken 180 {\cyrillicii} +\defineactivetoken 182 {\cyrillicgup} +\defineactivetoken 183 {\cyrillicJE} +\defineactivetoken 184 {\cyrillicIE} +\defineactivetoken 185 {\cyrillicie} +\defineactivetoken 186 {\cyrillicYI} +\defineactivetoken 187 {\cyrillicyi} +\defineactivetoken 188 {\cyrillicLJE} +\defineactivetoken 189 {\cyrilliclje} +\defineactivetoken 190 {\cyrillicNJE} +\defineactivetoken 191 {\cyrillicnje} +\defineactivetoken 192 {\cyrillicje} +\defineactivetoken 193 {\cyrillicDZE} +\defineactivetoken 196 {\florijn} +\defineactivetoken 199 {\leftguillemot} +\defineactivetoken 200 {\rightguillemot} +\defineactivetoken 201 {\dots} +\defineactivetoken 202 {\nonbreakablespace} +\defineactivetoken 203 {\cyrillicTSHE} +\defineactivetoken 204 {\cyrillictshe} +\defineactivetoken 205 {\'\cyrillicK} +\defineactivetoken 206 {\'\cyrillick} +\defineactivetoken 207 {\cyrillicdze} +\defineactivetoken 208 {\endash} +\defineactivetoken 209 {\emdash} +\defineactivetoken 210 {\upperleftsinglesixquote} +\defineactivetoken 211 {\upperrightdoubleninequote} +\defineactivetoken 212 {\upperleftsinglesixquote} +\defineactivetoken 213 {\upperrightsingleninequote} +\defineactivetoken 215 {\lowerleftdoubleninequote} +\defineactivetoken 216 {\cyrillicUSHRT} +\defineactivetoken 217 {\cyrillicushrt} +\defineactivetoken 218 {\cyrillicDZHE} +\defineactivetoken 219 {\cyrillicdzhe} +\defineactivetoken 220 {\textnumero} +\defineactivetoken 221 {\cyrillicYO} +\defineactivetoken 222 {\cyrillicyo} +\defineactivetoken 223 {\cyrillicya} +\defineactivetoken 224 {\cyrillica} +\defineactivetoken 225 {\cyrillicb} +\defineactivetoken 226 {\cyrillicv} +\defineactivetoken 227 {\cyrillicg} +\defineactivetoken 228 {\cyrillicd} +\defineactivetoken 229 {\cyrillice} +\defineactivetoken 230 {\cyrilliczh} +\defineactivetoken 231 {\cyrillicz} +\defineactivetoken 232 {\cyrillici} +\defineactivetoken 233 {\cyrillicishrt} +\defineactivetoken 234 {\cyrillick} +\defineactivetoken 235 {\cyrillicl} +\defineactivetoken 236 {\cyrillicm} +\defineactivetoken 237 {\cyrillicn} +\defineactivetoken 238 {\cyrillico} +\defineactivetoken 239 {\cyrillicp} +\defineactivetoken 240 {\cyrillicr} +\defineactivetoken 241 {\cyrillics} +\defineactivetoken 242 {\cyrillict} +\defineactivetoken 243 {\cyrillicu} +\defineactivetoken 244 {\cyrillicf} +\defineactivetoken 245 {\cyrillich} +\defineactivetoken 246 {\cyrillicc} +\defineactivetoken 247 {\cyrillicch} +\defineactivetoken 248 {\cyrillicsh} +\defineactivetoken 249 {\cyrillicshch} +\defineactivetoken 250 {\cyrillichrdsn} +\defineactivetoken 251 {\cyrillicery} +\defineactivetoken 252 {\cyrillicsftsn} +\defineactivetoken 253 {\cyrillicerev} +\defineactivetoken 254 {\cyrillicyu} +\defineactivetoken 255 {\textcurrency} + +\stopregime + +\endinput diff --git a/tex/context/base/s-mod-00.tex b/tex/context/base/s-mod-00.tex index c4586bf10..4444dfd67 100644 --- a/tex/context/base/s-mod-00.tex +++ b/tex/context/base/s-mod-00.tex @@ -190,7 +190,7 @@ \hfill {\bf\setstrut \TitleFrame - {\insidefloattrue\steltabulatiein[\c!voor=,\c!na=]% + {\insidefloattrue\setuptabulate[\c!voor=,\c!na=]% \starttemp \doifsomething{\Moduletitle} {\NC title \EQ \Moduletitle \NC\NR}% diff --git a/tex/context/base/s-pre-19.tex b/tex/context/base/s-pre-19.tex index d924d97bc..45ac152cc 100644 --- a/tex/context/base/s-pre-19.tex +++ b/tex/context/base/s-pre-19.tex @@ -304,7 +304,7 @@ enddef ; %D want to keep the interface simple: a list of small %D sentences, separated by \type {\\}. -\def\StartTitlePage% +\def\StartTitlePage {\startstandardmakeup \switchtobodyfont[big] \def\\{\vfill\bfb\let\\=\par} diff --git a/tex/context/base/s-pre-50.tex b/tex/context/base/s-pre-50.tex new file mode 100644 index 000000000..80c351a0d --- /dev/null +++ b/tex/context/base/s-pre-50.tex @@ -0,0 +1,134 @@ +%D \module +%D [ file=s-pre-50, +%D version=2003.01.26, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment 50, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D When my mailbox started to overflow with messages about +%D problems with the presentation step mechanism, I looked up +%D old presentaton, hacked a bit and cooked up an alternative +%D that is less dependent on \PDF\ trickery. +%D +%D Consider it a cheap trick and prelude to a couple of new +%D presentation styles. (At the time of writing this, I +%D still have some 10 of those styles to clean up and +%D document.) You can give it a try: +%D +%D \starttypen +%D texexec --pdf --mode=demo s-pre-50 +%D \stoptypen + +%D Hack. This will move to the kernel. + +\ifx\nofshipouts\undefined + + \newcount\nofshipouts + + \appendtoks + \global\advance\nofshipouts\plusone + \to \everyaftershipout + + \def\cwriteutility#1% + {\write\uti{\noexpand\checkedutility{\number\nofshipouts}{#1}}} + + \def\cwriteutilitycommand#1% + {\write\uti{\noexpand\checkedutility{\number\nofshipouts}{c \string#1}}} + + \let\checkedutility\secondoftwoarguments + + \def\docheckedutility#1#2{\ifnum#1=\nofshipouts#2\fi} + + \prependtoks + \let\checkedutility\docheckedutility + \to \everybeforeshipout + + \def\checkutilities + {\let\writeutility \cwriteutility + \let\writeutilitycommand\cwriteutilitycommand + \let\checkutilities \relax} + +\fi + +% Basic definitions. + +\defineframedtext + [horizontal] + [width=\textwidth, + frame=off, + strut=no, + height=fit, + align={right,lohi}, + before=, + after=] + +\definecollector + [contribution] + [state=repeat, + corner={left,bottom}, + location={right,bottom}] + +%D An example of tuning: + +\startmode[demo] + + \setupcollector + [contribution] + [voffset=-.25\bodyfontsize] + + \setupframedtexts + [horizontal] + [background=color, + backgroundcolor=darkgray, + foregroundcolor=white] + +\stopmode + +%D Structure. + +\def\StartSteps + {\checkutilities} + +\def\StopSteps + {\resetcollector[contribution]} + +\long\def\StartStep#1\StopStep + {\setcollector + [contribution] + {\starthorizontal[none]#1\stophorizontal} + \flushcollector[contribution] + \page} + +%D Trick. + +\installoutput\FlushStep + {\StartStep\unvbox\normalpagebox\StopStep} + +%D Demo. + +\doifnotmode{demo}{\endinput} + +\setupcolors[state=start] +\setuppapersize[S6][S6] +\setuplayout[middle] + +\starttext + +\StartSteps + + \title[whow]{How Much?} \FlushStep + \item More \FlushStep + \item And More \FlushStep + \item And Even More \FlushStep + + \StartStep And So On \StopStep + +\StopSteps + +\stoptext diff --git a/tex/context/base/setupa.tex b/tex/context/base/setupa.tex index 14815cb04..770a6404c 100644 --- a/tex/context/base/setupa.tex +++ b/tex/context/base/setupa.tex @@ -299,7 +299,7 @@ sectionnumber: numero sezione \def\c!threearguments!{\c!setup!command!{\#1\#2\#3}} \def\c!tex! #1{\texescape#1} -\def\c!or! {\hbox spread .25em{\vl}} +\def\c!or! #1#2{#1\hbox spread .25em{\vl}#2} \let\redefinesetupconstants=\relax diff --git a/tex/context/base/setupb.tex b/tex/context/base/setupb.tex index 707ea7ec5..bb5f2a0d9 100644 --- a/tex/context/base/setupb.tex +++ b/tex/context/base/setupb.tex @@ -3417,7 +3417,7 @@ \command [\y!stelinterliniein] \type - [\c!opt!\c!val!\c!or!\c!vars!] + [\c!opt!\c!or!\c!val!\c!vars!] \value [\v!reset,\v!klein,\v!middel,\v!groot,\v!aan,\v!uit] [\v!klein] @@ -3754,6 +3754,10 @@ [\c!rechtermargeafstand] [\c!dimension!] [\!!zeropoint] + \variable + [\c!zijuitlijnen] + [\v!normaal,\v!regel] + [\v!normaal] \inheritvariables [\y!setupframed] [] @@ -6291,6 +6295,9 @@ \value [\v!links,\v!rechts,\v!hier,\v!boven,\v!onder, \v!inlinker,\v!inrechter,\v!inmarge,\v!marge, + \v!linkermarge,\v!rechtermarge,\v!linkerrand,\v!rechterrand, + \v!binnenmarge,\v!buitenmarge,\v!binnenrand,\v!buitenrand, + \v!binnen,\v!buiten,\c!regel,\v!hoog,\v!laag,\v!passend, \v!pagina,\v!naast,\v!altijd,\v!forceer,\v!lang] [\v!hier] \value @@ -6365,6 +6372,10 @@ [\c!maxbreedte] [\c!dimension!] [] + \variable + [\c!minbreedte] + [\c!dimension!] + [] \variable [\c!default] [\c!identifier!] @@ -6373,6 +6384,14 @@ [\c!paginaovergangen] [\c!list!] [] + \variable + [\c!linkermargeafstand] + [\c!dimension!] + [0pt] + \variable + [\c!rechtermargeafstand] + [\c!dimension!] + [0pt] \variable [\c!plaats] [\v!links,\v!midden,\v!rechts] @@ -7318,33 +7337,34 @@ \type [\c!opt!\c!val!\c!tex!{leg}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\c!tex!{leg}\c!stp!] \value - [\v!twee] - [] + [\v!twee] + [] \value - [\c!text!] - [] + [\c!text!] + [] \value - [\c!text!] - [] + [\c!text!] + [] \value - [\c!text!] - [] + [\c!text!] + [] \stopsetup \startsetup \command [\e!start\e!gegeven] \type - [\c!tex!{geg}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\c!tex!{geg}\c!stp!] +% [\c!tex!{geg}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\c!tex!{geg}\c!stp!] + [\c!tex!{\y!geg}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\c!tex!{\y!geg}\c!stp!] \value - [\c!text!] - [] + [\c!text!] + [] \value - [\c!text!] - [] + [\c!text!] + [] \value - [\c!text!] - [] + [\c!text!] + [] \stopsetup \startsetup @@ -7430,6 +7450,14 @@ [\c!uitlijnen] [\v!nee,\v!links,\v!rechts,\v!midden,\v!normaal] [\v!midden] + \variable + [\c!letter] + [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...\c!command!] + [\v!vet] + \variable + [\c!kleur] + [\c!identifier!] + [] \stopsetup \startsetup @@ -7529,7 +7557,7 @@ [0pt] \variable [\c!optie] - [\v!max,\v!bookmark] + [\v!max,\v!passend,\v!dubbelzijdig,\v!bookmark] [] \variable [\c!wachttijd] @@ -7662,7 +7690,7 @@ \command [\y!stelinteractiemenuin] \type - [\c!alwint!\c!vals!\c!opt!\c!vars!\c!opt!\c!dests!] + [\c!alwint!\c!vals!\c!opt!\c!vars!] % \c!opt!\c!dests! \value [\v!links,\v!rechts,\v!boven,\v!onder,\c!identifier!] [] diff --git a/tex/context/base/setupe.tex b/tex/context/base/setupe.tex index d44416a54..43f291253 100644 --- a/tex/context/base/setupe.tex +++ b/tex/context/base/setupe.tex @@ -116,7 +116,7 @@ \def\c!vars! {\addtypespec{list}{yes}\dovalvar{assignments}} \def\c!arg! {\doanother{content}} -\def\c!cmd! {\doanother{command}} +\def\c!cmd! {\doanother{csname}} \def\c!dest! {\doanother{reference}} \def\c!dis! {\doanother{displaymath}} \def\c!fil! {\doanother{file}} @@ -142,7 +142,9 @@ \def\c!repeat! {} \def\c!tex! #1{\addtypespec{command}{#1}\doanother{tex}} -\def\c!or! {} +\def\c!or! #1#2{\doline{\space\space\space\space}% + #1#2% + \doline{\space\space\space\space}} % wrapper @@ -270,6 +272,9 @@ {} % \edef\envattr{\envattr\space generated="no"}} \splitcurrentname \cleanupcurrentname +\doifinsetelse{\currentname}{remark,menubutton,marking*figure,referring*figure}{% + \doline{}% +}{% \dostring{}{}{command name="\currentname"\envattr} \def\next##1% {\ifx##1\empty @@ -296,6 +301,7 @@ \dostring{\space\space}{/}{arguments} \fi \dostring{}{/}{command} +}% \egroup} \let\stopsetup\relax diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex index 87c9b0557..2126d6cc6 100644 --- a/tex/context/base/spec-fdf.tex +++ b/tex/context/base/spec-fdf.tex @@ -54,6 +54,7 @@ \else \xdef\PDFdestination{#1}% \fi + % nicer \xdef\PDFdestination{\ifovercomePDFbugs'\fi#1\ifovercomePDFbugs'\fi}% \lowercase\@EA{\@EA\xdef\@EA\PDFdestination\@EA{\PDFdestination}}% \egroup} @@ -130,7 +131,6 @@ % we diminish the processing time considerably \scratchcounter\maxPDFstringsize \def\docommando##1% - %{\ifnum\scratchcounter>0 {\ifcase\scratchcounter\else \advance\scratchcounter \minusone \ifcase\lccode`##1\relax @@ -332,10 +332,20 @@ % \xdef\currentPDFcropboxspec % {[\left\space\bottom\space\width\space\height]}% % \global\let\currentPDFtrimboxspec\currentPDFcropboxspec +% +% \xdef\currentPDFpagemode +% {/PageMode \ifcase#6 +% /UseNone\or/FullScreen\or/UseOutlines\else/UseNone\fi}% +% \xdef\currentPDFpagemode - {/PageMode \ifcase#6 /UseNone\or/FullScreen\or/UseOutlines\else/UseNone\fi}% + {\ifnum#6=4 + /PageLayout /TwoColumnRight + \else + /PageMode \ifcase#6 + /UseNone\or/FullScreen\or/UseOutlines\else/UseNone\fi + \fi}% \xdef\currentPDFviewerprefs % space after #6 needed, else \relax - {\ifcase#6 \or\or\or /ViewerPreferences << /FitWindow true >>\fi}% + {\ifcase#6 \or\or\else /ViewerPreferences << /FitWindow true >>\fi}% \egroup} \appendtoksonce % hack to prevent duplicates diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex index adc160dcc..2a96bcef6 100644 --- a/tex/context/base/supp-box.tex +++ b/tex/context/base/supp-box.tex @@ -444,7 +444,7 @@ \afterassignment\dododowithnextbox \setbox\nextbox} -\def\dododowithnextbox% +\def\dododowithnextbox {\aftergroup\dodowithnextbox} %D So in fact we get: @@ -1122,9 +1122,9 @@ \ifdim\wd2<\wd0 #1\else\unhbox0\fi \egroup} -\def\limitatetext#1#2#3% - {\beforesplitstring#2\at,\to\leftlimit - \aftersplitstring #2\at,\to\rightlimit +\def\limitatetext#1#2#3% \expanded added 2003/01/16 + {\expanded{\beforesplitstring#2}\at,\to\leftlimit + \expanded{\aftersplitstring #2}\at,\to\rightlimit \ifx\rightlimit\empty \normallimitatetext {#1}\leftlimit {#3}% \else diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex index 4842761cb..378e0d12b 100644 --- a/tex/context/base/supp-fil.tex +++ b/tex/context/base/supp-fil.tex @@ -169,10 +169,12 @@ \bgroup % todo: _ cleanup \catcode`\/=\@@active +\catcode`\:=\@@active \gdef\sanitizefilename#1\to#2% {\bgroup - \let/=\f!pathseparator + \edef/{\string/}% + \edef:{\string:}% \expanded{\xdef\noexpand\sanitizedfilename{#1}}% \egroup \let#2\sanitizedfilename} @@ -181,7 +183,7 @@ %D NEW: -\chardef\kindoffile=0 % 0=normal 1=http +\chardef\kindoffile=0 % 0=normal 1=full path spec (or http) \def\checkfilename#1% {\doifinstringelse{@@/}{@@#1}% unix: /full/path @@ -261,7 +263,9 @@ \checkfilename\readfilename \ifcase\kindoffile % not a full path or url, check for existence - \def\next{\redoreadfile{\pathplusfile{#1}{\readfilename}}{#3}{#4}}% + \doifelsenothing{#1} + {\def\next{\redoreadfile\readfilename{#3}{#4}}}% + {\def\next{\redoreadfile{\pathplusfile{#1}{\readfilename}}{#3}{#4}}}% \else % a full path or url, no further checking done \def\next{#3\dodoreadfile}% @@ -269,17 +273,20 @@ \next} \def\redoreadfile#1#2#3% - {\immediate\openin\scratchread=\readfilename\relax + {\immediate\openin\scratchread=#1\relax \ifeof\scratchread + % \writestatus\m!systems{cannot locate #1}\wait \immediate\closein\scratchread \decrement\readlevel\relax \ifnum\readlevel>\zerocount - \def\next{\redoreadfile{\pathplusfile{\f!parentpath}{#1}}{#2}{#3}}% + \edef\readfilename{\pathplusfile{\f!parentpath}{\readfilename}}% + \def\next{\redoreadfile\readfilename{#2}{#3}}% \else \def\next{#3}% \fi \else \immediate\closein\scratchread + % \writestatus\m!systems{#1 located}\wait \def\next{#2\dodoreadfile}% \fi \next} diff --git a/tex/context/base/supp-fun.tex b/tex/context/base/supp-fun.tex index bccbdf3ce..71c0405db 100644 --- a/tex/context/base/supp-fun.tex +++ b/tex/context/base/supp-fun.tex @@ -681,8 +681,6 @@ %D %D It's up to the reader to test this one. -%D For Hraban. - \unexpanded\def\FirstNCharacters#1#2% \FirstNCharacters{3}{fr{\"o}beln} {\bgroup \scratchcounter\zerocount diff --git a/tex/context/base/supp-ini.tex b/tex/context/base/supp-ini.tex index 15d80d5ab..cc114de83 100644 --- a/tex/context/base/supp-ini.tex +++ b/tex/context/base/supp-ini.tex @@ -32,7 +32,7 @@ .catcode `.{ 12 .xdef .letteropenbrace B.string{E -.catcode `.} 12 .xdef .letterclosebrace B.string{E +.catcode `.} 12 .xdef .letterclosebrace B.string}E .catcode `.& 12 .xdef .letterampersand B.string&E .catcode `.< 12 .xdef .letterless B.string 12 .xdef .lettermore B.string>E diff --git a/tex/context/base/supp-mrk.tex b/tex/context/base/supp-mrk.tex index f869e408a..34d484946 100644 --- a/tex/context/base/supp-mrk.tex +++ b/tex/context/base/supp-mrk.tex @@ -419,8 +419,19 @@ {%\writestatus{marks}{checking \string#1}\wait \ifcase\csname\@@mrk\string#1\endcsname\else\dochecktopmark#1\fi} -\def\dochecktopmark#1% - {\ifcase0\@EA\normalfirstmarks\csname\@@prk\string#1\endcsname\else +%\def\dochecktopmark#1% +% {\ifcase0\@EA\normalfirstmarks\csname\@@prk\string#1\endcsname\else +% \@EA\ifx\csname\@@frk\string#1\endcsname\empty +% \@EA\gdef\csname\@@frk\string#1\endcsname{\normalfirstmarks#1}% +% \@EA\gdef\csname\@@brk\string#1\endcsname{\normalbotmarks #1}% +% \else +% \@EA\gdef\csname\@@trk\string#1\endcsname{\normaltopmarks #1}% +% \global\@EA\chardef\csname\@@mrk\string#1\endcsname\zerocount +% \fi +% \fi} + +\def\dochecktopmark#1% + {\ifx*\@EA\normalfirstmarks\csname\@@prk\string#1\endcsname*\else \@EA\ifx\csname\@@frk\string#1\endcsname\empty \@EA\gdef\csname\@@frk\string#1\endcsname{\normalfirstmarks#1}% \@EA\gdef\csname\@@brk\string#1\endcsname{\normalbotmarks #1}% @@ -430,9 +441,17 @@ \fi \fi} -\def\resetmark#1% we cannot use \normalmarks#1{} +%\def\resetmark#1% we cannot use \normalmarks#1{} +% {\global\@EA\chardef\csname\@@mrk\string#1\endcsname\zerocount +% \@EA\normalmarks\csname\@@prk\string#1\endcsname{0}% +% \global\@EA\let\csname\@@trk\string#1\endcsname\empty +% \global\@EA\let\csname\@@frk\string#1\endcsname\empty +% \global\@EA\let\csname\@@brk\string#1\endcsname\empty +% \global\@EA\let\csname\@@crk\string#1\endcsname\empty} + +\def\resetmark#1% we cannot use \normalmarks#1{} {\global\@EA\chardef\csname\@@mrk\string#1\endcsname\zerocount - \@EA\normalmarks\csname\@@prk\string#1\endcsname{0}% + \@EA\normalmarks\csname\@@prk\string#1\endcsname{}% {0}% \global\@EA\let\csname\@@trk\string#1\endcsname\empty \global\@EA\let\csname\@@frk\string#1\endcsname\empty \global\@EA\let\csname\@@brk\string#1\endcsname\empty @@ -574,6 +593,7 @@ \let\rawgetbotmark \getbotmark \let\rawgetsplitbotmark \normalsplitbotmark \let\rawgetsplitfirstmark\normalsplitfirstmark +\let\rawgetsplittopmark \normalsplitfirstmark \endTEX @@ -587,6 +607,7 @@ \let\rawgetbotmark \normalbotmarks \let\rawgetsplitbotmark \normalsplitbotmarks \let\rawgetsplitfirstmark\normalsplitfirstmarks +\let\rawgetsplittopmark \normalsplitfirstmarks \endETEX diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex index 95a27af66..59fc9c75b 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=2001.07.27, +%D version=2003.01.20, %D title=\CONTEXT\ Support Macros, %D subtitle=\METAPOST\ to \PDF\ conversion, %D author=Hans Hagen, @@ -906,7 +906,9 @@ %D You could consider the following definition to be the most %D natural one. -\def\MPspacechar{\space} % normal case +% \def\MPspacechar{\space} % normal case + +\def\MPspacechar{\char32\relax} % old solution does not work with math %D However, the following implementation is more robust, since %D some fonts have funny visible spaces in the space slot. This diff --git a/tex/context/base/symb-mvs.tex b/tex/context/base/symb-mvs.tex index f853d1d64..f25eeadaf 100644 --- a/tex/context/base/symb-mvs.tex +++ b/tex/context/base/symb-mvs.tex @@ -170,7 +170,7 @@ \definesymbol [Yingyang] [\MartinVogelSymbol {77}] \definesymbol [Pickup] [\MartinVogelSymbol {0}] % ? - \definesymbol [Letter] [\MartinVogelSymbol {0}] % ? + \definesymbol [Letter] [\MartinVogelSymbol {66}] % ? \definesymbol [Mobilephone] [\MartinVogelSymbol {72}] \definesymbol [Telephone] [\MartinVogelSymbol {84}] \definesymbol [fax] [\MartinVogelSymbol{116}] diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex index f2f210a62..a170ca08f 100644 --- a/tex/context/base/syst-ext.tex +++ b/tex/context/base/syst-ext.tex @@ -2529,6 +2529,33 @@ \fi}} \resetglobal} +%D \macros +%D {substituteincommalist} +%D +%D Slow but seldom used, so for the moment we stick to this +%D implementation. +%D +%D \starttypen +%D \substituteincommalist{old}{new}{list} +%D \stoptypen + +\def\substituteincommalist#1#2#3% old, new, list (slooow) + {\edef\!!stringb{#1}% + \edef\!!stringd{#2}% + \let\!!stringa#3% + \let#3\empty + \def\dosubstituteincommalist##1% + {\edef\!!stringc{##1}% + \ifx\!!stringb\!!stringc + \ifx\!!stringd\empty\else + \edef#3{#3\ifx#3\empty\else,\fi\!!stringd}% + \fi + \def\docommando####1{\edef#3{#3,####1}}% + \else + \edef#3{#3\ifx#3\empty\else,\fi##1}% + \fi}% + \@EA\rawprocesscommacommand\@EA[\!!stringa]\dosubstituteincommalist} + %D A not so useful macro: \def\dodofrontstrip[#1#2]#3% @@ -4221,4 +4248,19 @@ \def\docommando##1{\edef\serializedcommalist{\serializedcommalist##1}}% \processcommacommand[#1]\docommando} +%D Sometimes we need control over when \TEX\ stops reading a +%D number, especially in full expandable macros where using +%D \type {\relax} would lead to disasters. +%D +%D \starttypen +%D \ifodd\purenumber{...}\space ... \else ... \fi +%D \stoptypen +%D +%D Here we use a space as number delimiter in combination +%D with a space- and relax-less \type {\purenumber}. This +%D macro works ok with \type {\the}, \type {\number} as well +%D as \ETEX's \type {\numexpr}. + +\def\purenumber#1{\@EA\firstofoneargument\@EA{\number#1}} + \protect \endinput diff --git a/tex/context/base/type-buy.tex b/tex/context/base/type-buy.tex index 6fdbd47b0..3610bd861 100644 --- a/tex/context/base/type-buy.tex +++ b/tex/context/base/type-buy.tex @@ -248,16 +248,16 @@ \starttypescript [sans] [univers,univers-black,univers-light] [texnansi,ec,8r] - \definefontsynonym [Univers-Light] [\typefaceencoding-LT50136] [encoding=\typefaceencoding] - \definefontsynonym [Univers-LightOblique] [\typefaceencoding-LT50137] [encoding=\typefaceencoding] + \definefontsynonym [Univers-Light] [\typefaceencoding-lt50136] [encoding=\typefaceencoding] + \definefontsynonym [Univers-LightOblique] [\typefaceencoding-lt50137] [encoding=\typefaceencoding] - \definefontsynonym [Univers] [\typefaceencoding-LT50138] [encoding=\typefaceencoding] - \definefontsynonym [Univers-Oblique] [\typefaceencoding-LT50139] [encoding=\typefaceencoding] - \definefontsynonym [Univers-Bold] [\typefaceencoding-LT50140] [encoding=\typefaceencoding] - \definefontsynonym [Univers-BoldOblique] [\typefaceencoding-LT50141] [encoding=\typefaceencoding] + \definefontsynonym [Univers] [\typefaceencoding-lt50138] [encoding=\typefaceencoding] + \definefontsynonym [Univers-Oblique] [\typefaceencoding-lt50139] [encoding=\typefaceencoding] + \definefontsynonym [Univers-Bold] [\typefaceencoding-lt50140] [encoding=\typefaceencoding] + \definefontsynonym [Univers-BoldOblique] [\typefaceencoding-lt50141] [encoding=\typefaceencoding] - \definefontsynonym [Univers-Black] [\typefaceencoding-LT50142] [encoding=\typefaceencoding] - \definefontsynonym [Univers-BlackOblique] [\typefaceencoding-LT50143] [encoding=\typefaceencoding] + \definefontsynonym [Univers-Black] [\typefaceencoding-lt50142] [encoding=\typefaceencoding] + \definefontsynonym [Univers-BlackOblique] [\typefaceencoding-lt50143] [encoding=\typefaceencoding] \stoptypescript diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex index 4dea6ecee..12cd9ac37 100644 --- a/tex/context/base/type-enc.tex +++ b/tex/context/base/type-enc.tex @@ -266,6 +266,305 @@ %definefontsynonym [cmvtt10] [wcmvtt10] [encoding=t2a] \stoptypescript +\starttypescript [all] [computer-modern] [t2a] + \definefontsynonym [cmb10] [larb1000] [encoding=t2a] + \definefontsynonym [cmbx10] [labx1000] [encoding=t2a] + \definefontsynonym [cmbx12] [labx1200] [encoding=t2a] + \definefontsynonym [cmbx5] [labx500] [encoding=t2a] + \definefontsynonym [cmbx6] [labx600] [encoding=t2a] + \definefontsynonym [cmbx7] [labx700] [encoding=t2a] + \definefontsynonym [cmbx8] [labx800] [encoding=t2a] + \definefontsynonym [cmbx9] [labx900] [encoding=t2a] + \definefontsynonym [cmbxsl10] [labl1000] [encoding=t2a] + \definefontsynonym [cmbxti10] [labi1000] [encoding=t2a] + \definefontsynonym [cmcsc10] [lacc1000] [encoding=t2a] + \definefontsynonym [cmdunh10] [ladh1000] [encoding=t2a] + \definefontsynonym [cmff10] [laff1000] [encoding=t2a] + \definefontsynonym [cmfi10] [lafi1000] [encoding=t2a] + \definefontsynonym [cmfib8] [lafb800] [encoding=t2a] + %\definefontsynonym [cminch] [lainch00] [encoding=t2a] + \definefontsynonym [cmitt10] [lait1000] [encoding=t2a] + \definefontsynonym [cmr10] [larm1000] [encoding=t2a] + \definefontsynonym [cmr12] [larm1200] [encoding=t2a] + \definefontsynonym [cmr17] [larm1700] [encoding=t2a] + \definefontsynonym [cmr5] [larm500] [encoding=t2a] + \definefontsynonym [cmr6] [larm600] [encoding=t2a] + \definefontsynonym [cmr7] [larm700] [encoding=t2a] + \definefontsynonym [cmr8] [larm800] [encoding=t2a] + \definefontsynonym [cmr9] [larm900] [encoding=t2a] + \definefontsynonym [cmsl10] [lasl1000] [encoding=t2a] + \definefontsynonym [cmsl12] [lasl1200] [encoding=t2a] + \definefontsynonym [cmsl8] [lasl800] [encoding=t2a] + \definefontsynonym [cmsl9] [lasl900] [encoding=t2a] + \definefontsynonym [cmsltt10] [last1000] [encoding=t2a] + \definefontsynonym [cmss10] [lass1000] [encoding=t2a] + \definefontsynonym [cmss12] [lass1200] [encoding=t2a] + \definefontsynonym [cmss17] [lass1700] [encoding=t2a] + \definefontsynonym [cmss8] [lass800] [encoding=t2a] + \definefontsynonym [cmss9] [lass900] [encoding=t2a] + \definefontsynonym [cmssbx10] [lasx1000] [encoding=t2a] + %\definefontsynonym [cmssdc10] [lassdc1000] [encoding=t2a] + \definefontsynonym [cmssi10] [lasi1000] [encoding=t2a] + \definefontsynonym [cmssi12] [lasi1200] [encoding=t2a] + \definefontsynonym [cmssi17] [lasi1700] [encoding=t2a] + \definefontsynonym [cmssi8] [lasi800] [encoding=t2a] + \definefontsynonym [cmssi9] [lasi900] [encoding=t2a] + \definefontsynonym [cmssq8] [lass800] [encoding=t2a] % ssq->ss + \definefontsynonym [cmssqi8] [lasi800] [encoding=t2a] % ssq->ss + \definefontsynonym [cmtcsc10] [latc1000] [encoding=t2a] + \definefontsynonym [cmti10] [lati1000] [encoding=t2a] + \definefontsynonym [cmti12] [lati1200] [encoding=t2a] + \definefontsynonym [cmti7] [lati700] [encoding=t2a] + \definefontsynonym [cmti8] [lati800] [encoding=t2a] + \definefontsynonym [cmti9] [lati900] [encoding=t2a] + \definefontsynonym [cmtt10] [latt1000] [encoding=t2a] + \definefontsynonym [cmtt12] [latt1200] [encoding=t2a] + \definefontsynonym [cmtt8] [latt800] [encoding=t2a] + \definefontsynonym [cmtt9] [latt900] [encoding=t2a] + \definefontsynonym [cmu10] [laui1000] [encoding=t2a] + \definefontsynonym [cmvtt10] [lavt1000] [encoding=t2a] +\stoptypescript + +\starttypescript [all] [computer-modern] [t2b] + \definefontsynonym [cmb10] [lbrb1000] [encoding=t2b] + \definefontsynonym [cmbx10] [lbbx1000] [encoding=t2b] + \definefontsynonym [cmbx12] [lbbx1200] [encoding=t2b] + \definefontsynonym [cmbx5] [lbbx500] [encoding=t2b] + \definefontsynonym [cmbx6] [lbbx600] [encoding=t2b] + \definefontsynonym [cmbx7] [lbbx700] [encoding=t2b] + \definefontsynonym [cmbx8] [lbbx800] [encoding=t2b] + \definefontsynonym [cmbx9] [lbbx900] [encoding=t2b] + \definefontsynonym [cmbxsl10] [lbbl1000] [encoding=t2b] + \definefontsynonym [cmbxti10] [lbbi1000] [encoding=t2b] + \definefontsynonym [cmcsc10] [lbcc1000] [encoding=t2b] + \definefontsynonym [cmdunh10] [lbdh1000] [encoding=t2b] + \definefontsynonym [cmff10] [lbff1000] [encoding=t2b] + \definefontsynonym [cmfi10] [lbfi1000] [encoding=t2b] + \definefontsynonym [cmfib8] [lbfb800] [encoding=t2b] + %\definefontsynonym [cminch] [lbinch00] [encoding=t2b] + \definefontsynonym [cmitt10] [lbit1000] [encoding=t2b] + \definefontsynonym [cmr10] [lbrm1000] [encoding=t2b] + \definefontsynonym [cmr12] [lbrm1200] [encoding=t2b] + \definefontsynonym [cmr17] [lbrm1700] [encoding=t2b] + \definefontsynonym [cmr5] [lbrm500] [encoding=t2b] + \definefontsynonym [cmr6] [lbrm600] [encoding=t2b] + \definefontsynonym [cmr7] [lbrm700] [encoding=t2b] + \definefontsynonym [cmr8] [lbrm800] [encoding=t2b] + \definefontsynonym [cmr9] [lbrm900] [encoding=t2b] + \definefontsynonym [cmsl10] [lbsl1000] [encoding=t2b] + \definefontsynonym [cmsl12] [lbsl1200] [encoding=t2b] + \definefontsynonym [cmsl8] [lbsl800] [encoding=t2b] + \definefontsynonym [cmsl9] [lbsl900] [encoding=t2b] + \definefontsynonym [cmsltt10] [lbst1000] [encoding=t2b] + \definefontsynonym [cmss10] [lbss1000] [encoding=t2b] + \definefontsynonym [cmss12] [lbss1200] [encoding=t2b] + \definefontsynonym [cmss17] [lbss1700] [encoding=t2b] + \definefontsynonym [cmss8] [lbss800] [encoding=t2b] + \definefontsynonym [cmss9] [lbss900] [encoding=t2b] + \definefontsynonym [cmssbx10] [lbsx1000] [encoding=t2b] + %\definefontsynonym [cmssdc10] [lbssdc1000] [encoding=t2b] + \definefontsynonym [cmssi10] [lbsi1000] [encoding=t2b] + \definefontsynonym [cmssi12] [lbsi1200] [encoding=t2b] + \definefontsynonym [cmssi17] [lbsi1700] [encoding=t2b] + \definefontsynonym [cmssi8] [lbsi800] [encoding=t2b] + \definefontsynonym [cmssi9] [lbsi900] [encoding=t2b] + \definefontsynonym [cmssq8] [lbss800] [encoding=t2b] % ssq->ss + \definefontsynonym [cmssqi8] [lbsi800] [encoding=t2b] % ssq->ss + \definefontsynonym [cmtcsc10] [lbtc1000] [encoding=t2b] + \definefontsynonym [cmti10] [lbti1000] [encoding=t2b] + \definefontsynonym [cmti12] [lbti1200] [encoding=t2b] + \definefontsynonym [cmti7] [lbti700] [encoding=t2b] + \definefontsynonym [cmti8] [lbti800] [encoding=t2b] + \definefontsynonym [cmti9] [lbti900] [encoding=t2b] + \definefontsynonym [cmtt10] [lbtt1000] [encoding=t2b] + \definefontsynonym [cmtt12] [lbtt1200] [encoding=t2b] + \definefontsynonym [cmtt8] [lbtt800] [encoding=t2b] + \definefontsynonym [cmtt9] [lbtt900] [encoding=t2b] + \definefontsynonym [cmu10] [lbui1000] [encoding=t2b] + \definefontsynonym [cmvtt10] [lbvt1000] [encoding=t2b] +\stoptypescript + +\starttypescript [all] [computer-modern] [t2c] + \definefontsynonym [cmb10] [lcrb1000] [encoding=t2c] + \definefontsynonym [cmbx10] [lcbx1000] [encoding=t2c] + \definefontsynonym [cmbx12] [lcbx1200] [encoding=t2c] + \definefontsynonym [cmbx5] [lcbx500] [encoding=t2c] + \definefontsynonym [cmbx6] [lcbx600] [encoding=t2c] + \definefontsynonym [cmbx7] [lcbx700] [encoding=t2c] + \definefontsynonym [cmbx8] [lcbx800] [encoding=t2c] + \definefontsynonym [cmbx9] [lcbx900] [encoding=t2c] + \definefontsynonym [cmbxsl10] [lcbl1000] [encoding=t2c] + \definefontsynonym [cmbxti10] [lcbi1000] [encoding=t2c] + \definefontsynonym [cmcsc10] [lccc1000] [encoding=t2c] + \definefontsynonym [cmdunh10] [lcdh1000] [encoding=t2c] + \definefontsynonym [cmff10] [lcff1000] [encoding=t2c] + \definefontsynonym [cmfi10] [lcfi1000] [encoding=t2c] + \definefontsynonym [cmfib8] [lcfb800] [encoding=t2c] + %\definefontsynonym [cminch] [lcinch00] [encoding=t2c] % maybe need subst + \definefontsynonym [cmitt10] [lcit1000] [encoding=t2c] + \definefontsynonym [cmr10] [lcrm1000] [encoding=t2c] + \definefontsynonym [cmr12] [lcrm1200] [encoding=t2c] + \definefontsynonym [cmr17] [lcrm1700] [encoding=t2c] + \definefontsynonym [cmr5] [lcrm500] [encoding=t2c] + \definefontsynonym [cmr6] [lcrm600] [encoding=t2c] + \definefontsynonym [cmr7] [lcrm700] [encoding=t2c] + \definefontsynonym [cmr8] [lcrm800] [encoding=t2c] + \definefontsynonym [cmr9] [lcrm900] [encoding=t2c] + \definefontsynonym [cmsl10] [lcsl1000] [encoding=t2c] + \definefontsynonym [cmsl12] [lcsl1200] [encoding=t2c] + \definefontsynonym [cmsl8] [lcsl800] [encoding=t2c] + \definefontsynonym [cmsl9] [lcsl900] [encoding=t2c] + \definefontsynonym [cmsltt10] [lcst1000] [encoding=t2c] + \definefontsynonym [cmss10] [lcss1000] [encoding=t2c] + \definefontsynonym [cmss12] [lcss1200] [encoding=t2c] + \definefontsynonym [cmss17] [lcss1700] [encoding=t2c] + \definefontsynonym [cmss8] [lcss800] [encoding=t2c] + \definefontsynonym [cmss9] [lcss900] [encoding=t2c] + \definefontsynonym [cmssbx10] [lcsx1000] [encoding=t2c] + %\definefontsynonym [cmssdc10] [lcssdc1000] [encoding=t2c] + \definefontsynonym [cmssi10] [lcsi1000] [encoding=t2c] + \definefontsynonym [cmssi12] [lcsi1200] [encoding=t2c] + \definefontsynonym [cmssi17] [lcsi1700] [encoding=t2c] + \definefontsynonym [cmssi8] [lcsi800] [encoding=t2c] + \definefontsynonym [cmssi9] [lcsi900] [encoding=t2c] + \definefontsynonym [cmssq8] [lcss800] [encoding=t2c] % ssq->ss + \definefontsynonym [cmssqi8] [lcsi800] [encoding=t2c] % ssq->ss + \definefontsynonym [cmtcsc10] [lctc1000] [encoding=t2c] + \definefontsynonym [cmti10] [lcti1000] [encoding=t2c] + \definefontsynonym [cmti12] [lcti1200] [encoding=t2c] + \definefontsynonym [cmti7] [lcti700] [encoding=t2c] + \definefontsynonym [cmti8] [lcti800] [encoding=t2c] + \definefontsynonym [cmti9] [lcti900] [encoding=t2c] + \definefontsynonym [cmtt10] [lctt1000] [encoding=t2c] + \definefontsynonym [cmtt12] [lctt1200] [encoding=t2c] + \definefontsynonym [cmtt8] [lctt800] [encoding=t2c] + \definefontsynonym [cmtt9] [lctt900] [encoding=t2c] + \definefontsynonym [cmu10] [lcui1000] [encoding=t2c] + \definefontsynonym [cmvtt10] [lcvt1000] [encoding=t2c] +\stoptypescript + +\starttypescript [all] [computer-modern] [x2] + \definefontsynonym [cmb10] [rxrb1000] [encoding=x2] + \definefontsynonym [cmbx10] [rxbx1000] [encoding=x2] + \definefontsynonym [cmbx12] [rxbx1200] [encoding=x2] + \definefontsynonym [cmbx5] [rxbx500] [encoding=x2] + \definefontsynonym [cmbx6] [rxbx600] [encoding=x2] + \definefontsynonym [cmbx7] [rxbx700] [encoding=x2] + \definefontsynonym [cmbx8] [rxbx800] [encoding=x2] + \definefontsynonym [cmbx9] [rxbx900] [encoding=x2] + \definefontsynonym [cmbxsl10] [rxbl1000] [encoding=x2] + \definefontsynonym [cmbxti10] [rxbi1000] [encoding=x2] + \definefontsynonym [cmcsc10] [rxcc1000] [encoding=x2] + \definefontsynonym [cmdunh10] [rxdh1000] [encoding=x2] + \definefontsynonym [cmff10] [rxff1000] [encoding=x2] + \definefontsynonym [cmfi10] [rxfi1000] [encoding=x2] + \definefontsynonym [cmfib8] [rxfb800] [encoding=x2] + %\definefontsynonym [cminch] [rxinch00] [encoding=x2] % maybe need subst + \definefontsynonym [cmitt10] [rxit1000] [encoding=x2] + \definefontsynonym [cmr10] [rxrm1000] [encoding=x2] + \definefontsynonym [cmr12] [rxrm1200] [encoding=x2] + \definefontsynonym [cmr17] [rxrm1700] [encoding=x2] + \definefontsynonym [cmr5] [rxrm500] [encoding=x2] + \definefontsynonym [cmr6] [rxrm600] [encoding=x2] + \definefontsynonym [cmr7] [rxrm700] [encoding=x2] + \definefontsynonym [cmr8] [rxrm800] [encoding=x2] + \definefontsynonym [cmr9] [rxrm900] [encoding=x2] + \definefontsynonym [cmsl10] [rxsl1000] [encoding=x2] + \definefontsynonym [cmsl12] [rxsl1200] [encoding=x2] + \definefontsynonym [cmsl8] [rxsl800] [encoding=x2] + \definefontsynonym [cmsl9] [rxsl900] [encoding=x2] + \definefontsynonym [cmsltt10] [rxst1000] [encoding=x2] + \definefontsynonym [cmss10] [rxss1000] [encoding=x2] + \definefontsynonym [cmss12] [rxss1200] [encoding=x2] + \definefontsynonym [cmss17] [rxss1700] [encoding=x2] + \definefontsynonym [cmss8] [rxss800] [encoding=x2] + \definefontsynonym [cmss9] [rxss900] [encoding=x2] + \definefontsynonym [cmssbx10] [rxsx1000] [encoding=x2] + %\definefontsynonym [cmssdc10] [rxssdc1000] [encoding=x2] + \definefontsynonym [cmssi10] [rxsi1000] [encoding=x2] + \definefontsynonym [cmssi12] [rxsi1200] [encoding=x2] + \definefontsynonym [cmssi17] [rxsi1700] [encoding=x2] + \definefontsynonym [cmssi8] [rxsi800] [encoding=x2] + \definefontsynonym [cmssi9] [rxsi900] [encoding=x2] + \definefontsynonym [cmssq8] [rxss800] [encoding=x2] % ssq->ss + \definefontsynonym [cmssqi8] [rxsi800] [encoding=x2] % ssq->ss + \definefontsynonym [cmtcsc10] [rxtc1000] [encoding=x2] + \definefontsynonym [cmti10] [rxti1000] [encoding=x2] + \definefontsynonym [cmti12] [rxti1200] [encoding=x2] + \definefontsynonym [cmti7] [rxti700] [encoding=x2] + \definefontsynonym [cmti8] [rxti800] [encoding=x2] + \definefontsynonym [cmti9] [rxti900] [encoding=x2] + \definefontsynonym [cmtt10] [rxtt1000] [encoding=x2] + \definefontsynonym [cmtt12] [rxtt1200] [encoding=x2] + \definefontsynonym [cmtt8] [rxtt800] [encoding=x2] + \definefontsynonym [cmtt9] [rxtt900] [encoding=x2] + \definefontsynonym [cmu10] [rxui1000] [encoding=x2] + \definefontsynonym [cmvtt10] [rxvt1000] [encoding=x2] +\stoptypescript + +\starttypescript [all] [computer-modern] [lcy] + \definefontsynonym [cmb10] [lhb10] [encoding=lcy] + \definefontsynonym [cmbx10] [lhbx10] [encoding=lcy] + \definefontsynonym [cmbx12] [lhbx12] [encoding=lcy] + \definefontsynonym [cmbx5] [lhbx5] [encoding=lcy] + \definefontsynonym [cmbx6] [lhbx6] [encoding=lcy] + \definefontsynonym [cmbx7] [lhbx7] [encoding=lcy] + \definefontsynonym [cmbx8] [lhbx8] [encoding=lcy] + \definefontsynonym [cmbx9] [lhbx9] [encoding=lcy] + \definefontsynonym [cmbxsl10] [lhbxsl10] [encoding=lcy] + \definefontsynonym [cmbxti10] [lhbxti10] [encoding=lcy] + \definefontsynonym [cmcsc10] [lhcsc10] [encoding=lcy] + \definefontsynonym [cmdunh10] [lhdunh10] [encoding=lcy] + \definefontsynonym [cmff10] [lhff10] [encoding=lcy] + \definefontsynonym [cmfi10] [lhfi10] [encoding=lcy] + \definefontsynonym [cmfib8] [lhfib8] [encoding=lcy] + \definefontsynonym [cminch] [lhinch] [encoding=lcy] + \definefontsynonym [cmitt10] [lhitt10] [encoding=lcy] + \definefontsynonym [cmr10] [lhr10] [encoding=lcy] + \definefontsynonym [cmr12] [lhr12] [encoding=lcy] + \definefontsynonym [cmr17] [lhr17] [encoding=lcy] + \definefontsynonym [cmr5] [lhr5] [encoding=lcy] + \definefontsynonym [cmr6] [lhr6] [encoding=lcy] + \definefontsynonym [cmr7] [lhr7] [encoding=lcy] + \definefontsynonym [cmr8] [lhr8] [encoding=lcy] + \definefontsynonym [cmr9] [lhr9] [encoding=lcy] + \definefontsynonym [cmsl10] [lhsl10] [encoding=lcy] + \definefontsynonym [cmsl12] [lhsl12] [encoding=lcy] + \definefontsynonym [cmsl8] [lhsl8] [encoding=lcy] + \definefontsynonym [cmsl9] [lhsl9] [encoding=lcy] + \definefontsynonym [cmsltt10] [lhsltt10] [encoding=lcy] + \definefontsynonym [cmss10] [lhss10] [encoding=lcy] + \definefontsynonym [cmss12] [lhss12] [encoding=lcy] + \definefontsynonym [cmss17] [lhss17] [encoding=lcy] + \definefontsynonym [cmss8] [lhss8] [encoding=lcy] + \definefontsynonym [cmss9] [lhss9] [encoding=lcy] + \definefontsynonym [cmssbi10] [lhssbi10] [encoding=lcy] + \definefontsynonym [cmssbx10] [lhssbx10] [encoding=lcy] + \definefontsynonym [cmssdc10] [lhssdc10] [encoding=lcy] + \definefontsynonym [cmssi10] [lhssi10] [encoding=lcy] + \definefontsynonym [cmssi12] [lhssi12] [encoding=lcy] + \definefontsynonym [cmssi17] [lhssi17] [encoding=lcy] + \definefontsynonym [cmssi8] [lhssi8] [encoding=lcy] + \definefontsynonym [cmssi9] [lhssi9] [encoding=lcy] + \definefontsynonym [cmssq8] [lhssq8] [encoding=lcy] + \definefontsynonym [cmssqi8] [lhssqi8] [encoding=lcy] + \definefontsynonym [cmtcsc10] [lhtcsc10] [encoding=lcy] + \definefontsynonym [cmtex10] [lhtex10] [encoding=lcy] + \definefontsynonym [cmtex8] [lhtex8] [encoding=lcy] + \definefontsynonym [cmtex9] [lhtex9] [encoding=lcy] + \definefontsynonym [cmti10] [lhti10] [encoding=lcy] + \definefontsynonym [cmti12] [lhti12] [encoding=lcy] + \definefontsynonym [cmti7] [lhti7] [encoding=lcy] + \definefontsynonym [cmti8] [lhti8] [encoding=lcy] + \definefontsynonym [cmti9] [lhti9] [encoding=lcy] + \definefontsynonym [cmtt10] [lhtt10] [encoding=lcy] + \definefontsynonym [cmtt12] [lhtt12] [encoding=lcy] + \definefontsynonym [cmtt8] [lhtt8] [encoding=lcy] + \definefontsynonym [cmtt9] [lhtt9] [encoding=lcy] + \definefontsynonym [cmu10] [lhu10] [encoding=lcy] + \definefontsynonym [cmvtt10] [lhvtt10] [encoding=lcy] +\stoptypescript + \starttypescript [serif] [computer-modern] [default] \definefontsynonym [ComputerModern] [cmr10] \definefontsynonym [ComputerModern-Italic] [cmti10] diff --git a/tex/context/base/type-pre.tex b/tex/context/base/type-pre.tex index 2b36b8913..21fc3e0d4 100644 --- a/tex/context/base/type-pre.tex +++ b/tex/context/base/type-pre.tex @@ -67,6 +67,46 @@ \stoptypescript +\starttypescript [lh-t2a] + +\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,t2a] + +\usemathcollection[default] + +\stoptypescript + +\starttypescript [lh-t2b] + +\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,t2b] + +\usemathcollection[default] + +\stoptypescript + +\starttypescript [lh-t2c] + + \usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,t2c] + + \usemathcollection [default] + +\stoptypescript + +\starttypescript [lh-x2] + +\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,x2] + +\usemathcollection [default] + +\stoptypescript + +\starttypescript [lh-lcy] + +\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,lcy] + +\usemathcollection [default] + +\stoptypescript + %D Here we implement the symbol fonts as provided by the %D American Mathematical Society. The names of these symbols %D can be found in The Joy of \TeX\ by M.~Spivak. diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex index 5cd56883c..254667cc6 100644 --- a/tex/context/base/verb-ini.tex +++ b/tex/context/base/verb-ini.tex @@ -878,29 +878,57 @@ \@EAEAEA\doprocesstabskip \fi\fi} -\def\dodoprocesstabskipline#1#2\endoftabskipping - {\ifnum\scratchcounter>\spacespertab - \scratchcounter\plusone - \donetrue - \else - \advance\scratchcounter \plusone - \donefalse - \fi - \ifx#1\relax - \let\next\relax - \else - \def\next{#1\dodoprocesstabskipline#2\endoftabskipping}% - \fi - \next} - \let\endoftabskipping=\relax % will become obsolete +% \def\doprocesstabskipline#1% +% {\bgroup +% \scratchcounter1 +% \dodoprocesstabskipline#1\relax\endoftabskipping +% \egroup} +% +% \def\dodoprocesstabskipline#1#2\endoftabskipping +% {\ifnum\scratchcounter>\spacespertab +% \scratchcounter\plusone +% \donetrue +% \else +% \advance\scratchcounter \plusone +% \donefalse +% \fi +% \ifx#1\relax +% \let\next\relax +% \else +% \def\next{#1\dodoprocesstabskipline#2\endoftabskipping}% +% \fi +% \next} + \def\doprocesstabskipline#1% {\bgroup - \scratchcounter1 - \dodoprocesstabskipline#1\relax\endoftabskipping + \scratchcounter\plusone + \dodoprocesstabskipline#1\relax \egroup} +\def\dodoprocesstabskipline#1% + {\ifnum\scratchcounter>\spacespertab\relax + \donetrue \else \donefalse \advance + \fi \scratchcounter \plusone + \ifx#1\relax \else + \ifcase\tabskipmode + % can't happen + \or + % go on + \else\ifnum`#1<128 + % ok, no special character + \else\ifnum\catcode`#1=\active + % quits parsing, else utf lookahead problems + \chardef\tabskipmode\zerocount + \fi\fi\fi + \ifcase\tabskipmode + \@EAEAEA#1% + \else + \@EAEAEA#1\@EAEAEA\dodoprocesstabskipline + \fi + \fi} + % ^ will be replaced \chardef\tabskipmode=1 % 0=quit 1=no test 2=test on active>128 @@ -961,7 +989,7 @@ \def\readline% {\ifeof\verbatiminput \else \ifx\firstverbatimfileline\empty -\global\advance\verbatimlinenumber\plusone + \global\advance\verbatimlinenumber\plusone \read\verbatiminput to \verbatimline \else \let\verbatimline\firstverbatimfileline @@ -998,6 +1026,24 @@ \egroup \ignorespaces} +%D Something new: + +\def\processfilelinesverbatim#1#2#3% + {\bgroup + \let\saveddoflushverbatimline\doflushverbatimline + \let\saveddoemptyverbatimline\doemptyverbatimline + \def\checkverbatimfileline##1% + {\ifnum\verbatimlinenumber<#2\else + \ifnum\verbatimlinenumber>#3\else + ##1% + \fi\fi}% + \def\doflushverbatimline + {\checkverbatimfileline\saveddoflushverbatimline}% + \def\doemptyverbatimline + {\checkverbatimfileline\saveddoemptyverbatimline}% + \processfileverbatim{#1}% + \egroup} + %D \macros %D {firstverbatimfileline, lastverbatimfileline} %D @@ -1239,7 +1285,7 @@ \newif\ifnewpretty -\def\installnewpretty% +\def\installnewpretty {\def\doinstallnewpretty##1% {\setvalue{NP::\the\scratchcounter}{##1}}% \afterassignment\doinstallnewpretty\scratchcounter=`} @@ -1389,20 +1435,32 @@ %D that ends the line and/or does not belong to the verbatim %D data. +% \def\handlenextnextpretty#1#2#3% +% {\def\dohandlenextnextpretty% +% {\ifx\next\bgroup % something {} +% \let\next=#2% +% \else\ifx\next\relax % end of line / signal +% \let\next=#2% +% %\else\ifx\next\egroup % end of line / no signal +% % \let\next=#2% +% %\else\ifx\next\par % end of line / \par +% % \let\next=#2% +% \else +% \let\next=#1% +% \fi\fi%\fi\fi +% \next{#3}}% +% \futurelet\next\dohandlenextnextpretty} + \def\handlenextnextpretty#1#2#3% {\def\dohandlenextnextpretty% {\ifx\next\bgroup % something {} - \let\next=#2% + \@EA#2% \else\ifx\next\relax % end of line / signal - \let\next=#2% - %\else\ifx\next\egroup % end of line / no signal - % \let\next=#2% - %\else\ifx\next\par % end of line / \par - % \let\next=#2% + \@EAEAEA#2% \else - \let\next=#1% - \fi\fi%\fi\fi - \next{#3}}% + \@EAEAEA#1% + \fi\fi + {#3}}% \futurelet\next\dohandlenextnextpretty} %D The pretty interpreters can (and will) change the meaning of diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex index 9639b2960..88fd1a2b6 100644 --- a/tex/context/base/xtag-ini.tex +++ b/tex/context/base/xtag-ini.tex @@ -192,9 +192,10 @@ %D a way around this, but for convenience \TEXEXEC\ will take %D care of processing raw \XML\ files in a transparant way. -\newif\ifalwaysreduceXMLtokens +\chardef\XMLtokensreduction\zerocount -\let\alwaysreduceXMLtokens\alwaysreduceXMLtokenstrue +% \def\alwaysreduceXMLtokens {\XMLtokensreduction\plusone} +% \def\permanentreduceXMLtokens{\XMLtokensreduction\plustwo} \bgroup \catcode`\*=\@@comment @@ -232,32 +233,6 @@ * there; this is needed because reading from file goes wrong * (eating up argument) -* .unexpanded.gdef.enableXML* -* B.catcode`.!=.@@other* -* .catcode`.?=.@@other* -* .catcode`.:=.@@other* active in french -* .catcode`.;=.@@other* active in french -* .catcode`.&=.@@active .let&=.doXMLentity* -* .catcode`.<=.@@active .unexpanded.def=.@@other -* .catcode`."=.@@other* -* .catcode`./=.@@other -* .catcode`.'=.@@other* -* *catcode`.#=.@@active .def#PP1B&tex-hash;E* gobbles its own dup -* .catcode`.#=.@@active .def#B&tex-hash;E* -* .catcode`.$=.@@active .def$B&tex-dollar;E* -* .catcode`.%=.@@active .def%B&tex-percent;E* -* .catcode`.\=.@@active .def\B&tex-backslash;E* -* .catcode`.^=.@@active .def^B&tex-hat;E* -* .catcode`._=.@@active .def_B&tex-underscore;E* -* .catcode`.{=.@@active .def{B&tex-leftbrace;E* -* .catcode`.}=.@@active .def}B&tex-rightbrace;E* -* .catcode`.|=.@@active .def|B&tex-bar;E* -* .catcode`.~=.@@other *def~B&tex-tilde;E* -* .processingXMLtrue -* .the.everyenableXML -* E - .unexpanded.gdef.enableXML* B.catcode`.!=.@@other* .catcode`.?=.@@other* @@ -269,8 +244,21 @@ .catcode`."=.@@other .catcode`./=.@@other .catcode`.'=.@@other + .catcode`.~=.@@other .catcode`.#=.@@active - .catcode`.$=.@@active + .ifcase.XMLtokensreduction + .entitleXMLescapetokens + .or + .reduceXMLescapetokens + .else + .ignoreXMLescapetokens + .fi + .processingXMLtrue + .the.everyenableXML + E + +.gdef.activateXMLescapetokens* + B.catcode`.$=.@@active .catcode`.%=.@@active .catcode`.\=.@@active .catcode`.^=.@@active @@ -278,18 +266,11 @@ .catcode`.{=.@@active .catcode`.}=.@@active .catcode`.|=.@@active - .catcode`.~=.@@other - .ifalwaysreduceXMLtokens - .reduceXMLescapetokens - .else - .entitleXMLescapetokens - .fi - .processingXMLtrue - .the.everyenableXML E .gdef.entitleXMLescapetokens* - B.def#B&tex-hash;E* + B.activateXMLescapetokens* + .def#B&tex-hash;E* .def$B&tex-dollar;E* .def%B&tex-percent;E* .def\B&tex-backslash;E* @@ -298,11 +279,11 @@ .def{B&tex-leftbrace;E* .def}B&tex-rightbrace;E* .def|B&tex-bar;E* - *def~B&tex-tilde;E* E .gdef.reduceXMLescapetokens* - B.def#B.string#E* + B.activateXMLescapetokens* + .def#B.string#E* .def$B.string$E* .def%B.string%E* .def\B.string\E* @@ -311,7 +292,17 @@ .def{B.string{E* .def}B.string}E* .def|B.string|E* - *def~B.string~E* + E + +.gdef.ignoreXMLescapetokens* + B.catcode`.$=.@@other * or letter ? + .catcode`.%=.@@other + .catcode`.\=.@@other + .catcode`.^=.@@other + .catcode`._=.@@other + .catcode`.{=.@@other + .catcode`.}=.@@other + .catcode`.|=.@@other E * The following macro can be invokes when reading from @@ -498,11 +489,11 @@ \def\parseXMLprocess#1#2% {\cleanupXMLprocess{#2}% - %\convertcommand\currentXMLprocess\to\ascii + \convertcommand#1\to\ascii %\writestatus{xml-process}{\ascii} \expanded {\executeifdefined - {\@@XMLinstruction:#1} + {\@@XMLinstruction:\ascii} \noexpand\gobbleoneargument {\expandafter\noexpand\currentXMLprocess}}} @@ -691,7 +682,7 @@ \ifcsname\@@XMLelement:\currentXMLfullidentifier\endcsname \currentXMLfullidentifier \else - \defaultXMLelement + \s!default % \defaultXMLelement \fi \endcsname} @@ -702,7 +693,7 @@ \else\ifcsname\@@XMLelement:\currentXMLidentifier\endcsname \currentXMLidentifier \else - \defaultXMLelement + \s!default % \defaultXMLelement \fi\fi \endcsname} @@ -723,7 +714,7 @@ \else\ifcsname\normal@@XMLelement:\currentXMLidentifier\endcsname \normal@@XMLelement:\currentXMLidentifier \else - \@@XMLelement:\defaultXMLelement + \@@XMLelement:\s!default % \defaultXMLelement \fi\fi} \def\setXMLfallbackmode#1% @@ -741,7 +732,7 @@ \let\automateXMLnamespace\automateXMLnamespaceD \fi} -\setXMLfallbackmode2 % will be 3 +\setXMLfallbackmode3 % was 2 %D An example of fall back modes is given below. @@ -1708,21 +1699,37 @@ \long\def\longempty{} \long\def\longspace{ } +% \def\doifelseXMLdata#1% always empty at start [gets a long assignment] +% {\@EA\ifx\csname\@@XMLdata:#1\endcsname\longempty +% \expandafter\secondoftwoarguments +% \else +% \expandafter\firstoftwoarguments +% \fi} +% +% \def\doifXMLdata#1% always empty at start [gets a long assignment] +% {\@EA\ifx\csname\@@XMLdata:#1\endcsname\longempty +% \expandafter\gobbleoneargument +% \else +% \expandafter\firstofoneargument +% \fi} +% +% \let\doifXMLdataelse\doifelseXMLdata + \def\doifelseXMLdata#1% always empty at start [gets a long assignment] {\@EA\ifx\csname\@@XMLdata:#1\endcsname\longempty \expandafter\secondoftwoarguments \else \expandafter\firstoftwoarguments - \fi} + \fi} \def\doifXMLdata#1% always empty at start [gets a long assignment] {\@EA\ifx\csname\@@XMLdata:#1\endcsname\longempty \expandafter\gobbleoneargument \else \expandafter\firstofoneargument - \fi} + \fi} -\let\doifXMLdataelse\doifelseXMLdata +\let\doifXMLdataelse\doifelseXMLdata \def\doifelseXMLempty#1% {\@EA\ifx\csname\@@XMLdata:#1\endcsname\longempty @@ -1752,8 +1759,15 @@ % x % \stopXMLdata +% \def\XMLflush#1% one level +% {\csname\@@XMLdata:#1\endcsname} + +% evt meer van dit gedoe en alle \longempty's vervangen + \def\XMLflush#1% one level - {\csname\@@XMLdata:#1\endcsname} + {\csname\ifcsname\@@XMLdata:#1\endcsname\@@XMLdata:#1\else\s!empty\fi\endcsname} + +\let\XMLflushdata\XMLflush \def\XMLflushdata#1% see m-steps for usage {\@EA\ifx\csname\@@XMLdata:#1\endcsname\longempty\else @@ -1761,6 +1775,9 @@ \@EA\XMLdata\csname\@@XMLdata:#1\endcsname \fi} +\def\XMLflushasis#1% + {\detokenize\@EAEAEA{\csname\@@XMLdata:#1\endcsname}} + \let\XMLpop \XMLflush \let\XMLpopdata\XMLflushdata @@ -2110,7 +2127,7 @@ %D here. The macro \type {\processXMLbuffer} behaves like %D any buffer processor. -\def\processXMLbuffer% +\def\processXMLbuffer {\dosingleempty\doprocessXMLbuffer} \def\doprocessXMLbuffer[#1]% diff --git a/tex/context/base/xtag-pre.tex b/tex/context/base/xtag-pre.tex index 84bbeecda..f17928e9c 100644 --- a/tex/context/base/xtag-pre.tex +++ b/tex/context/base/xtag-pre.tex @@ -30,6 +30,12 @@ \def\defaultXMLelement{\iftraceXMLelements[\currentXMLelement]\fi} +%D We can use the default handler to implement automatic +%D element hiding. Beware: this overloads the tracer. + +\def\startXMLignore{\dododefineXMLignore \s!default} +\def\stopXMLignore {\dododefineXMLprocess\s!default} + %D The following entities need to be defined anyway. They %D may be overloaded later. @@ -190,7 +196,7 @@ \def\dohandleXMLdoctok {\ifx\nexttoken>% % [doctype: \XMLdoctype] - \@EA\gobbleuntil\@EA>\@EA + \@EA\gobbleuntil\@EA>% \else\ifx\nexttoken\blankspace % [doctype: \XMLdoctype] \@EAEAEA\dodohandleXMLdoctype @@ -205,19 +211,21 @@ {\executeifdefined{XMLdoctype#1}{\gobbleuntil>}} \setvalue{XMLdoctype>}{} -\setvalue{XMLdoctype[}{\processuntil{]>}} +\setvalue{XMLdoctype[}{\processuntil{]>}} % or \gobbleuntil{]>}} -%\def\XMLdoctypeS YSTEM % -% {\dowithgrabbedstring\dodohandleXMLdoctype} +\def\XMLdoctypeS YSTEM % + {\dowithgrabbedstring\dodohandleXMLdoctype} -%\def\XMLdoctypeP UBLIC % -% {\dowithgrabbedstring{\dowithgrabbedstring\dodohandleXMLdoctype}} +\def\XMLdoctypeP UBLIC % + {\dowithgrabbedstring{\dowithgrabbedstring\dodohandleXMLdoctype}} -\def\XMLdoctypeS YSTEM {\XMLgrabstring} -\def\XMLdoctypeP UBLIC {\XMLgrabstring} - -\def\XMLgrabstring - {\doifnextcharelse>{\gobbleuntil>}{\dowithgrabbedstring\XMLgrabstring}} +% wrong +% +% \def\XMLdoctypeS YSTEM {\XMLgrabstring} +% \def\XMLdoctypeP UBLIC {\XMLgrabstring} +% +% \def\XMLgrabstring +% {\doifnextcharelse>{\gobbleuntil>}{\dowithgrabbedstring\XMLgrabstring}} %D Some day we may need to support entities within a %D document type namespace. diff --git a/tex/context/sample/aesop-de.tex b/tex/context/sample/aesop-de.tex new file mode 100644 index 000000000..80a41f295 --- /dev/null +++ b/tex/context/sample/aesop-de.tex @@ -0,0 +1,25 @@ +% German example file from Aesop + +Der L\"owe und die M\"ucke + +Eine M\"ucke forderte mit den \"uberm\"utigsten Worten +einen L\"owen zum Zweikampf heraus: \quotation {Ich +f\"urchte dich nicht, du gro\SS es Ungeheuer}, rief sie ihm +zu, \quotation {weil du gar keine Vorz\"uge vor mir hast; +oder nenne sie mir, wenn du solche zu haben glaubst; etwa +die, da\SS\ du deinen Raub mit Krallen zerrei\SS est und +mit Z\"ahnen zermalmest? Jedes andere feige Tier, wenn es +mit einem Tapfern k\"ampft, tut dasselbe, es bei\SS t und +kratzt. Du sollst aber empfinden, da\SS\ ich st\"arker bin +als du!} Mit diesen Worten flog sie in eines seiner +Nasenl\"ocher und stach ihn so sehr, da\SS\ er sich vor +Schmerz selbst zerfleischte und sich f\"ur \"uberwunden +erkl\"arte. + +Stolz auf diesen Sieg flog die M\"ucke davon, um ihn aller +Welt auszuposaunen, \"ubersah aber das Gewebe einer Spinne +und verfing sich in demselben. Gierig umarmte die Spinne +sie und sog ihr das Heldenblut aus. Sterbend empfand die +M\"ucke ihre Nichtigkeit, indem sie, die Besiegerin des +L\"owen, einem so ver\"achtlichen Tiere, einer Spinne, +erliegen mu\SS te. diff --git a/tex/context/user/cont-sys.rme b/tex/context/user/cont-sys.rme index 8923364cd..755101e4e 100644 --- a/tex/context/user/cont-sys.rme +++ b/tex/context/user/cont-sys.rme @@ -108,6 +108,13 @@ % % \runutilityfiletrue +% You can also load additional encodings here: + +% \useregime[cyr] +% \useencoding[cyr] +% \enableregime[cp1251] +% \setupbodyfont[cyr] + % So far. \protect \endinput -- cgit v1.2.3