summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context/data/cont-cz-scite.properties46
-rw-r--r--context/data/cont-de-scite.properties70
-rw-r--r--context/data/cont-en-scite.properties22
-rw-r--r--context/data/cont-it-scite.properties20
-rw-r--r--context/data/cont-nl-scite.properties66
-rw-r--r--context/data/cont-ro-scite.properties16
-rw-r--r--context/data/context-jedit-cz.xml2
-rw-r--r--context/data/context-jedit-de.xml2
-rw-r--r--context/data/context-jedit-en.xml2
-rw-r--r--context/data/context-jedit-it.xml2
-rw-r--r--context/data/context-jedit-nl.xml2
-rw-r--r--context/data/context-jedit-ro.xml2
-rw-r--r--metapost/context/base/mp-spec.mp68
-rw-r--r--metapost/context/base/mp-tool.mp109
-rw-r--r--scripts/context/perl/texutil.pl4
-rw-r--r--scripts/context/ruby/base/file.rb10
-rw-r--r--scripts/context/ruby/base/kpsefast.rb776
-rw-r--r--scripts/context/ruby/base/tex.rb4
-rw-r--r--scripts/context/ruby/base/texutil.rb113
-rw-r--r--scripts/context/ruby/textools.rb131
-rw-r--r--scripts/context/ruby/tmftools.rb131
-rw-r--r--tex/context/base/colo-ini.tex6
-rw-r--r--tex/context/base/cont-new.tex16
-rw-r--r--tex/context/base/context.tex8
-rw-r--r--tex/context/base/core-fnt.tex5
-rw-r--r--tex/context/base/core-grd.tex52
-rw-r--r--tex/context/base/core-lst.tex44
-rw-r--r--tex/context/base/core-ntb.tex1
-rw-r--r--tex/context/base/core-reg.tex2
-rw-r--r--tex/context/base/core-sec.tex150
-rw-r--r--tex/context/base/core-spa.tex21
-rw-r--r--tex/context/base/enco-ans.tex49
-rw-r--r--tex/context/base/enco-ec.tex31
-rw-r--r--tex/context/base/enco-il2.tex49
-rw-r--r--tex/context/base/enco-ini.tex382
-rw-r--r--tex/context/base/enco-mis.tex33
-rw-r--r--tex/context/base/enco-pfr.tex121
-rw-r--r--tex/context/base/enco-pol.tex55
-rw-r--r--tex/context/base/enco-qx.tex48
-rw-r--r--tex/context/base/enco-run.tex12
-rw-r--r--tex/context/base/enco-tbo.tex6
-rw-r--r--tex/context/base/font-ini.tex57
-rw-r--r--tex/context/base/font-unk.tex22
-rw-r--r--tex/context/base/math-ini.tex20
-rw-r--r--tex/context/base/mult-com.tex2
-rw-r--r--tex/context/base/mult-sys.tex2
-rw-r--r--tex/context/base/page-ini.tex12
-rw-r--r--tex/context/base/page-lin.tex26
-rw-r--r--tex/context/base/page-lyr.tex2
-rw-r--r--tex/context/base/regi-ini.tex21
-rw-r--r--tex/context/base/regi-lat.tex120
-rw-r--r--tex/context/base/s-abr-01.tex1
-rw-r--r--tex/context/base/sort-def.tex352
-rw-r--r--tex/context/base/sort-ini.tex101
-rw-r--r--tex/context/base/sort-lan.tex107
-rw-r--r--tex/context/base/sort-new.tex59
-rw-r--r--tex/context/base/supp-pat.tex31
-rw-r--r--tex/context/base/symb-mis.tex10
-rw-r--r--tex/context/base/syst-etx.tex20
-rw-r--r--tex/context/base/type-dis.tex10
-rw-r--r--tex/context/base/type-enc.tex114
-rw-r--r--tex/context/base/type-exa.tex30
-rw-r--r--tex/context/base/type-ini.tex2
-rw-r--r--tex/context/base/type-map.tex10
-rw-r--r--tex/context/base/type-siz.tex8
-rw-r--r--tex/context/base/type-spe.tex2
-rw-r--r--tex/context/base/type-syn.tex60
-rw-r--r--tex/context/base/unic-ini.tex2
-rw-r--r--tex/context/interface/cont-cz.xml13
-rw-r--r--tex/context/interface/cont-de.xml13
-rw-r--r--tex/context/interface/cont-en.xml11
-rw-r--r--tex/context/interface/cont-it.xml13
-rw-r--r--tex/context/interface/cont-nl.xml13
-rw-r--r--tex/context/interface/cont-ro.xml13
-rw-r--r--tex/context/interface/keys-cz.xml4
-rw-r--r--tex/context/interface/keys-de.xml4
-rw-r--r--tex/context/interface/keys-en.xml4
-rw-r--r--tex/context/interface/keys-it.xml4
-rw-r--r--tex/context/interface/keys-nl.xml4
-rw-r--r--tex/context/interface/keys-ro.xml4
-rw-r--r--tex/context/sample/reich.tex22
-rw-r--r--web2c/context.cnf10
82 files changed, 3305 insertions, 719 deletions
diff --git a/context/data/cont-cz-scite.properties b/context/data/cont-cz-scite.properties
index 7ddf4b82e..1c4912372 100644
--- a/context/data/cont-cz-scite.properties
+++ b/context/data/cont-cz-scite.properties
@@ -51,26 +51,26 @@ keywordclass.macros.context.cz=\
settextvariable setupforms setupitemgroup setuppaper setuprule setupstrut \
setuptextposition setuptextvariable sloupec slovovpravo spodek stanovcharakteristickuseznamu \
stanovcislonadpisu start startbarva startcitace startfakt startinteraktivnimenu \
- startkomentar startkomponenta startmarginalnilinka startpozadi startprojekt startprostredi \
- starttextovalinka startverze startzhustene stop stopbarva stopcitace \
- stopfakt stopinteraktivnimenu stopkomentar stopkomponenta stopmarginalnilinka stoppozadi \
- stopprojekt stopprostredi stoptextovalinka stopverze stopzhustene strana \
- switchtorawfont sym symbol synchronizacnilista synchronizovat tab \
- tecky tenkalinka tenkelinky tex texthlavicky textovalinka \
- textpopisku textvariable tlacitko tref tvrdemezery typebuffer \
- typstrany ukazbarvu ukazexterniobrazy ukazmrizku ukaznastaveni ukazpaletu \
- ukazpodpery ukazpole ukazpostredizakladnihofontu ukazramecek ukazsadusymbolu ukazskupinubarev \
- ukazupravu ukazvytisk ukazvzhled ukazzakladnifont umistikombinovanyseznam umistilegendu \
- umistiloga umistilokalnipoznamkypodcarou umistinadsebe umistinamrizku umistipodrovnici umistipoznamkypodcarou \
- umistirejstrik umistirovnici umistiseznam umistivedlesebe umistizalozky uzijURL \
- uzijbloky uzijexternidokument uzijexterniobraz uzijexternisoubor uzijexternisoubory uzijexternizvuk \
- uzijkodovani uzijmodul uzijodkazy uzijprikazy uzijspeciality uzijsymbol \
- verze vl vlasovalinka vlevo vpravo vradku \
- vsedniden vyberbloky vyberpapir vyberverzi vyplnenytext vyplnovelinky \
- vyplnovepole vyplnovyradek vysoky zablokujinterakcnimenu zachovejbloky zadnamezera \
- zadnebilemisto zadnedalsibloky zadnedalsisoubory zadnehorniadolniradky zadneodsazovani zadnezahlaviaupati \
- zadneznaceni zadnyseznam zadnytest zalozka zapisdorejstriku zapisdoseznamu \
- zapisdoseznamuodkazu zapismeziseznam zaramovani zarovnanonastred zarovnanovlevo zarovnanovpravo \
- zasobnikpoli zaznamovepole zhustene ziskejbuffer ziskejznaceni zlomek \
- znaceni znak znaky zpracujbloky zpracujstranu zrcadlit \
- zref
+ startkomentar startkomponenta startmarginalnilinka startpozadi startprodukt startprojekt \
+ startprostredi starttextovalinka startverze startzhustene stop stopbarva \
+ stopcitace stopfakt stopinteraktivnimenu stopkomentar stopkomponenta stopmarginalnilinka \
+ stoppozadi stopprodukt stopprojekt stopprostredi stoptextovalinka stopverze \
+ stopzhustene strana switchtorawfont sym symbol synchronizacnilista \
+ synchronizovat tab tecky tenkalinka tenkelinky tex \
+ texthlavicky textovalinka textpopisku textvariable tlacitko tref \
+ tvrdemezery typebuffer typstrany ukazbarvu ukazexterniobrazy ukazmrizku \
+ ukaznastaveni ukazpaletu ukazpodpery ukazpole ukazpostredizakladnihofontu ukazramecek \
+ ukazsadusymbolu ukazskupinubarev ukazupravu ukazvytisk ukazvzhled ukazzakladnifont \
+ umistikombinovanyseznam umistilegendu umistiloga umistilokalnipoznamkypodcarou umistinadsebe umistinamrizku \
+ umistipodrovnici umistipoznamkypodcarou umistirejstrik umistirovnici umistiseznam umistivedlesebe \
+ umistizalozky uzijURL uzijbloky uzijexternidokument uzijexterniobraz uzijexternisoubor \
+ uzijexternisoubory uzijexternizvuk uzijkodovani uzijmodul uzijodkazy uzijprikazy \
+ uzijspeciality uzijsymbol verze vl vlasovalinka vlevo \
+ vpravo vradku vsedniden vyberbloky vyberpapir vyberverzi \
+ vyplnenytext vyplnovelinky vyplnovepole vyplnovyradek vysoky zablokujinterakcnimenu \
+ zachovejbloky zadnamezera zadnebilemisto zadnedalsibloky zadnedalsisoubory zadnehorniadolniradky \
+ zadneodsazovani zadnezahlaviaupati zadneznaceni zadnyseznam zadnytest zalozka \
+ zapisdorejstriku zapisdoseznamu zapisdoseznamuodkazu zapismeziseznam zaramovani zarovnanonastred \
+ zarovnanovlevo zarovnanovpravo zasobnikpoli zaznamovepole zhustene ziskejbuffer \
+ ziskejznaceni zlomek znaceni znak znaky zpracujbloky \
+ zpracujstranu zrcadlit zref
diff --git a/context/data/cont-de-scite.properties b/context/data/cont-de-scite.properties
index cfba92829..33323494c 100644
--- a/context/data/cont-de-scite.properties
+++ b/context/data/cont-de-scite.properties
@@ -39,38 +39,38 @@ keywordclass.macros.context.de=\
setuppaper setuprule setupstrut setuptextposition setuptextvariable showsymbolset \
spalte spatium spiegeln sprache start startfarbe \
startgeg starthintergrund startinteraktionsmenue startkleinerdurchschuss startkommentar startkomponente \
- startmarginallinie startprojekt starttextlinie startumgebung startversion startzitat \
- stelleabsaetzeein stelleabsatznummerierungein stelleabschnittein stelleabschnittsblockein stelleanordnenein stelleausgabeein \
- stelleausrichtungein stelleausschnittein stellebeschreibungein stellebeschriftungein stellebilderunterschriftein stellebildunterschriftein \
- stellebindestrichein stelleblankoein stelleblockein stelledrehenein stelleduennerumrissein stelleeinziehenein \
- stelleeinzuegein stelleengerein stelleexterneabbildungenein stellefarbeein stellefarbenein stellefeldein \
- stellefelderin stellefliesstextein stellefliesstextumgebungein stellefussnotendefinitionein stellefussnotenein stellefusszeileein \
- stellefusszeilentextein stellegefuelltesrechteckein stellegefuelltezeileein stellegegenueberplatzierenein stellegleitobjekteein stellegleitobjektein \
- stellehintergruendeein stellehintergrundein stelleinmarginalieein stelleinteraktionein stelleinteraktionsbalkenein stelleinteraktionsbildschirmein \
- stelleknopfein stellekombinationein stellekommentarein stellekopfzahlein stellekopfzeileein stellekopfzeilentextein \
- stellelabeltextein stellelayoutein stellelegendeein stellelinienbreiteein stellelisteein stellemarginalblockein \
- stellemarginallinieein stellenobenein stellenummerierungein stellepaletteein stellepapierformatein stelleplatziegeteiltegleitobjekt \
- stellepositionierenein stellepostenein stelleprofilein stelleprogrammein stellepublikationein stellepufferein \
- stellerasterein stellerechteckein stellereferenzierenein stellereferenzlisteein stelleregisterein stelleseitennummerein \
- stelleseitennummeriernungein stelleseitenuebergangein stellesortierenein stellespaltenein stellespatiumein stellespracheein \
- stellesymbolsetein stellesynchronisationein stellesynchronisationsbalkenein stellesynonymein stellesystemein stelletabein \
- stelletabellenein stelletabulatorein stelletextein stelletextobenein stelletexttexteein stelletextumrissein \
- stelletextuntenein stelletipein stelletippenein stelletoleranzein stelleueberschriftein stelleueberschriftenein \
- stelleueberschrifttextein stelleumbruchein stelleumrahmtein stelleumrahmtetexteein stelleuntenein stelleunterseitennummerein \
- stelleunterstreichenein stelleurlein stelleversalienein stelleversionein stellezeilenabstandein stellezeilenein \
- stellezeilennumerierungein stellezitierenein stellezusammengestelltelisteein stellezwischenraumein stop stopfarbe \
- stopgeg stophintergrund stopinteraktionsmenue stopkleinerdurchschuss stopkommentar stopkomponente \
- stopmarginallinie stopprojekt stoptextlinie stopumgebung stopversion stopzitat \
- switchtorawfont sym symbol synchronisationsbalken synchronisieren tab \
- teilegleitobjekt tex textlinie textreferenz textvariable tief \
- tiho tip tippedatei tippen tippepuffer tooltip \
- ueber ueberschrifttext uebersetzten ueberstreichen ueberstrichen umrahmt \
- unterstreichen unterstrichen verbergebloecke vergleichefarbengruppe vergleichepalette verknuepfebeschriftung \
- verknuepfedokument verknuepfregister version verweis verweisdatum verwendeURL \
- verwendebefehl verwendebloecke verwendeexteresdokument verwendeexterneabbildung verwendeexternedatei verwendeexternedateien \
- verwendeexternestonstueck verwendemodul verwendereferenzen verwendesymbole vl von \
- waehlebloeckeaus waehlepapieraus waehleversionaus wechselezumfliesstext wochentag wortrechts \
- zeigedruck zeigeeinstellungen zeigeexterneabbildungen zeigefarbe zeigefarbengruppe zeigefelder \
- zeigefliesstext zeigefliesstextumgebung zeigegitter zeigelayout zeigepalette zeigerahmen \
- zeigestruts zeigeumbruch zentriert ziffern zitat zitieren \
- zu zurbox zusatz zwischenraum
+ startmarginallinie startprodukt startprojekt starttextlinie startumgebung startversion \
+ startzitat stelleabsaetzeein stelleabsatznummerierungein stelleabschnittein stelleabschnittsblockein stelleanordnenein \
+ stelleausgabeein stelleausrichtungein stelleausschnittein stellebeschreibungein stellebeschriftungein stellebilderunterschriftein \
+ stellebildunterschriftein stellebindestrichein stelleblankoein stelleblockein stelledrehenein stelleduennerumrissein \
+ stelleeinziehenein stelleeinzuegein stelleengerein stelleexterneabbildungenein stellefarbeein stellefarbenein \
+ stellefeldein stellefelderin stellefliesstextein stellefliesstextumgebungein stellefussnotendefinitionein stellefussnotenein \
+ stellefusszeileein stellefusszeilentextein stellegefuelltesrechteckein stellegefuelltezeileein stellegegenueberplatzierenein stellegleitobjekteein \
+ stellegleitobjektein stellehintergruendeein stellehintergrundein stelleinmarginalieein stelleinteraktionein stelleinteraktionsbalkenein \
+ stelleinteraktionsbildschirmein stelleknopfein stellekombinationein stellekommentarein stellekopfzahlein stellekopfzeileein \
+ stellekopfzeilentextein stellelabeltextein stellelayoutein stellelegendeein stellelinienbreiteein stellelisteein \
+ stellemarginalblockein stellemarginallinieein stellenobenein stellenummerierungein stellepaletteein stellepapierformatein \
+ stelleplatziegeteiltegleitobjekt stellepositionierenein stellepostenein stelleprofilein stelleprogrammein stellepublikationein \
+ stellepufferein stellerasterein stellerechteckein stellereferenzierenein stellereferenzlisteein stelleregisterein \
+ stelleseitennummerein stelleseitennummeriernungein stelleseitenuebergangein stellesortierenein stellespaltenein stellespatiumein \
+ stellespracheein stellesymbolsetein stellesynchronisationein stellesynchronisationsbalkenein stellesynonymein stellesystemein \
+ stelletabein stelletabellenein stelletabulatorein stelletextein stelletextobenein stelletexttexteein \
+ stelletextumrissein stelletextuntenein stelletipein stelletippenein stelletoleranzein stelleueberschriftein \
+ stelleueberschriftenein stelleueberschrifttextein stelleumbruchein stelleumrahmtein stelleumrahmtetexteein stelleuntenein \
+ stelleunterseitennummerein stelleunterstreichenein stelleurlein stelleversalienein stelleversionein stellezeilenabstandein \
+ stellezeilenein stellezeilennumerierungein stellezitierenein stellezusammengestelltelisteein stellezwischenraumein stop \
+ stopfarbe stopgeg stophintergrund stopinteraktionsmenue stopkleinerdurchschuss stopkommentar \
+ stopkomponente stopmarginallinie stopprodukt stopprojekt stoptextlinie stopumgebung \
+ stopversion stopzitat switchtorawfont sym symbol synchronisationsbalken \
+ synchronisieren tab teilegleitobjekt tex textlinie textreferenz \
+ textvariable tief tiho tip tippedatei tippen \
+ tippepuffer tooltip ueber ueberschrifttext uebersetzten ueberstreichen \
+ ueberstrichen umrahmt unterstreichen unterstrichen verbergebloecke vergleichefarbengruppe \
+ vergleichepalette verknuepfebeschriftung verknuepfedokument verknuepfregister version verweis \
+ verweisdatum verwendeURL verwendebefehl verwendebloecke verwendeexteresdokument verwendeexterneabbildung \
+ verwendeexternedatei verwendeexternedateien verwendeexternestonstueck verwendemodul verwendereferenzen verwendesymbole \
+ vl von waehlebloeckeaus waehlepapieraus waehleversionaus wechselezumfliesstext \
+ wochentag wortrechts zeigedruck zeigeeinstellungen zeigeexterneabbildungen zeigefarbe \
+ zeigefarbengruppe zeigefelder zeigefliesstext zeigefliesstextumgebung zeigegitter zeigelayout \
+ zeigepalette zeigerahmen zeigestruts zeigeumbruch zentriert ziffern \
+ zitat zitieren zu zurbox zusatz zwischenraum
diff --git a/context/data/cont-en-scite.properties b/context/data/cont-en-scite.properties
index 22a9f85be..f3dedd92c 100644
--- a/context/data/cont-en-scite.properties
+++ b/context/data/cont-en-scite.properties
@@ -63,14 +63,14 @@ keywordclass.macros.context.en=\
showmakeup showpalet showprint showsetups showstruts showsymbolset \
someline somewhere space splitfloat start startbackground \
startcolor startcomment startcomponent startenvironment startfact startinteractionmenu \
- startmarginrule startpacked startproject startquotation starttextrule startversion \
- stop stopbackground stopcolor stopcomment stopcomponent stopenvironment \
- stopfact stopinteractionmenu stopmarginrule stoppacked stopproject stopquotation \
- stoptextrule stopversion stretched switchtobodyfont switchtorawfont sym \
- symbol synchronizationbar synchronize tab tex textreference \
- textrule textvariable thinrule thinrules tooltip translate \
- typ type typebuffer typefile underbar underbars \
- useURL useblocks usecommands useencoding useexternaldocument useexternalfigure \
- useexternalfile useexternalfiles useexternalsoundtrack usemodule usereferences usespecials \
- usesymbols version vl weekday whitespace wordright \
- writebetweenlist writetolist writetoreferencelist writetoregister
+ startmarginrule startpacked startproduct startproject startquotation starttextrule \
+ startversion stop stopbackground stopcolor stopcomment stopcomponent \
+ stopenvironment stopfact stopinteractionmenu stopmarginrule stoppacked stopproduct \
+ stopproject stopquotation stoptextrule stopversion stretched switchtobodyfont \
+ switchtorawfont sym symbol synchronizationbar synchronize tab \
+ tex textreference textrule textvariable thinrule thinrules \
+ tooltip translate typ type typebuffer typefile \
+ underbar underbars useURL useblocks usecommands useencoding \
+ useexternaldocument useexternalfigure useexternalfile useexternalfiles useexternalsoundtrack usemodule \
+ usereferences usespecials usesymbols version vl weekday \
+ whitespace wordright writebetweenlist writetolist writetoreferencelist writetoregister
diff --git a/context/data/cont-it-scite.properties b/context/data/cont-it-scite.properties
index a80f5f5e8..683ba5a27 100644
--- a/context/data/cont-it-scite.properties
+++ b/context/data/cont-it-scite.properties
@@ -64,13 +64,13 @@ keywordclass.macros.context.it=\
simbolo sincronizza sopralinea sopralinee sottolinea sottolinee \
spazifissi spazio spaziobianco spezzaoggettomobile spostaagriglia stackcampi \
start startambiente startcitazione startcolore startcommento startcomponenet \
- startfatto startimpaccato startlineamargine startlineatesto startmenuinterattivo startprogetto \
- startsfondo startversione stirato stop stopambiente stopcitazione \
- stopcolore stopcommento stopcomponenet stopfatto stopimpaccato stoplineamargine \
- stoplineatesto stopmenuinterattivo stopprogetto stopsfondo stopversione tab \
- testa testoetichetta testoinmargine testoinstestazioni testonotapdp testoriempimento \
- tex tieniblocchi tipopagina tooltip traduci typ \
- type typebuffer typefile usaURL usablocco usacodifica \
- usacolonnasonoraesterna usacomandi usadocumentoesterno usafiguraesterna usafileesterni usafileesterno \
- usamodulo usariferimenti usasimboli usaspecialita vaia vaiabox \
- vaigiu variabiletesto versione vl
+ startfatto startimpaccato startlineamargine startlineatesto startmenuinterattivo startprodotto \
+ startprogetto startsfondo startversione stirato stop stopambiente \
+ stopcitazione stopcolore stopcommento stopcomponenet stopfatto stopimpaccato \
+ stoplineamargine stoplineatesto stopmenuinterattivo stopprodotto stopprogetto stopsfondo \
+ stopversione tab testa testoetichetta testoinmargine testoinstestazioni \
+ testonotapdp testoriempimento tex tieniblocchi tipopagina tooltip \
+ traduci typ type typebuffer typefile usaURL \
+ usablocco usacodifica usacolonnasonoraesterna usacomandi usadocumentoesterno usafiguraesterna \
+ usafileesterni usafileesterno usamodulo usariferimenti usasimboli usaspecialita \
+ vaia vaiabox vaigiu variabiletesto versione vl
diff --git a/context/data/cont-nl-scite.properties b/context/data/cont-nl-scite.properties
index 7935b3757..0d1637ba5 100644
--- a/context/data/cont-nl-scite.properties
+++ b/context/data/cont-nl-scite.properties
@@ -41,36 +41,36 @@ keywordclass.macros.context.nl=\
selecteerblokken selecteerpapier selecteerversie som soortpagina spatie \
spiegel splitsplaatsblok start startachtergrond startcitaat startcommentaar \
startgeg startinteractiemenu startkantlijn startkleur startomgeving startonderdeel \
- startopelkaar startproject starttekstlijn startversie stelachtergrondenin stelachtergrondin \
- stelalineasin stelarrangerenin stelblankoin stelblokin stelblokjesin stelblokkopjein \
- stelblokkopjesin stelbovenin stelboventekstenin stelbufferin stelbuttonsin stelciterenin \
- stelclipin stelcombinatiesin stelcommentaarin steldoordefinierenin steldoornummerenin steldoorspringenin \
- steldunnelijnenin stelexternefigurenin stelformulierenin stelhoofdin stelhoofdtekstenin stelinmargein \
- stelinspringenin stelinteractiebalkin stelinteractiein stelinteractieschermin stelinterliniein stelinvullijnenin \
- stelinvulregelsin stelitemgroepin stelitemsin stelkadertekstenin stelkantlijnin stelkapitalenin \
- stelkleurenin stelkleurin stelkolommenin stelkopin stelkopnummerin stelkoppeltekenin \
- stelkoppenin stelkoptekstin stelkorpsin stelkorpsomgevingin stellabeltekstin stellayoutin \
- stellegendain stellijndiktein stellijnin stellijstin stelmargeblokkenin stelmarkeringin \
- stelnaastplaatsenin stelnummerenin stelomlijndin stelonderin stelonderstrepenin stelondertekstenin \
- stelopmaakin stelpaginanummerin stelpaginanummeringin stelpaginaovergangenin stelpaletin stelpapierformaatin \
- stelpapierin stelparagraafnummerenin stelplaatsblokin stelplaatsblokkenin stelplaatsbloksplitsenin stelpositionerenin \
- stelprofielenin stelprogrammasin stelpublicatiesin stelrastersin stelreferentielijstin stelrefererenin \
- stelregelnummerenin stelregelsin stelregisterin stelroterenin stelsamengesteldelijstin stelsectieblokin \
- stelsectiein stelsmallerin stelsorterenin stelspatieringin stelstrutin stelsubpaginanummerin \
- stelsymboolsetin stelsynchronisatiebalkin stelsynchronisatiein stelsynoniemenin stelsysteemin steltaalin \
- steltabellenin steltabin steltabulatiein steltekstin steltekstlijnenin steltekstpositiein \
- stelteksttekstenin steltekstvariabelein steltolerantiein steltypein steltypenin steluitlijnenin \
- steluitvoerin stelurlin stelveldenin stelveldin stelversiesin stelvoetin \
- stelvoetnootdefinitiein stelvoetnotenin stelvoettekstenin stelwitruimtein stop stopachtergrond \
- stopcitaat stopcommentaar stopgeg stopinteractiemenu stopkantlijn stopkleur \
- stopomgeving stoponderdeel stopopelkaar stopproject stoptekstlijn stopversie \
- suggestie switchnaarkorps switchtorawfont sym symbool synchronisatiebalk \
- synchroniseer taal tab tekstlijn tekstreferentie tekstvariabele \
- tex toevoegen toonexternefiguren toongrid tooninstellingen toonkader \
- toonkleur toonkleurgroep toonkorps toonkorpsomgeving toonlayout toonopmaak \
- toonpalet toonprint toonstruts toonsymboolset toonvelden typ \
- type typebuffer typefile uit uitgerekt usecodering \
- vastespaties veld veldstapel verbergblokken vergelijkkleurgroep vergelijkpalet \
- verplaatsopgrid versie vertaal verwerkblokken verwerkpagina vl \
- voetnoot voetnoottekst volgprofiel volgprofielversie volgversie volledigregister \
- weekdag wiskunde witruimte woordrechts
+ startopelkaar startprodukt startproject starttekstlijn startversie stelachtergrondenin \
+ stelachtergrondin stelalineasin stelarrangerenin stelblankoin stelblokin stelblokjesin \
+ stelblokkopjein stelblokkopjesin stelbovenin stelboventekstenin stelbufferin stelbuttonsin \
+ stelciterenin stelclipin stelcombinatiesin stelcommentaarin steldoordefinierenin steldoornummerenin \
+ steldoorspringenin steldunnelijnenin stelexternefigurenin stelformulierenin stelhoofdin stelhoofdtekstenin \
+ stelinmargein stelinspringenin stelinteractiebalkin stelinteractiein stelinteractieschermin stelinterliniein \
+ stelinvullijnenin stelinvulregelsin stelitemgroepin stelitemsin stelkadertekstenin stelkantlijnin \
+ stelkapitalenin stelkleurenin stelkleurin stelkolommenin stelkopin stelkopnummerin \
+ stelkoppeltekenin stelkoppenin stelkoptekstin stelkorpsin stelkorpsomgevingin stellabeltekstin \
+ stellayoutin stellegendain stellijndiktein stellijnin stellijstin stelmargeblokkenin \
+ stelmarkeringin stelnaastplaatsenin stelnummerenin stelomlijndin stelonderin stelonderstrepenin \
+ stelondertekstenin stelopmaakin stelpaginanummerin stelpaginanummeringin stelpaginaovergangenin stelpaletin \
+ stelpapierformaatin stelpapierin stelparagraafnummerenin stelplaatsblokin stelplaatsblokkenin stelplaatsbloksplitsenin \
+ stelpositionerenin stelprofielenin stelprogrammasin stelpublicatiesin stelrastersin stelreferentielijstin \
+ stelrefererenin stelregelnummerenin stelregelsin stelregisterin stelroterenin stelsamengesteldelijstin \
+ stelsectieblokin stelsectiein stelsmallerin stelsorterenin stelspatieringin stelstrutin \
+ stelsubpaginanummerin stelsymboolsetin stelsynchronisatiebalkin stelsynchronisatiein stelsynoniemenin stelsysteemin \
+ steltaalin steltabellenin steltabin steltabulatiein steltekstin steltekstlijnenin \
+ steltekstpositiein stelteksttekstenin steltekstvariabelein steltolerantiein steltypein steltypenin \
+ steluitlijnenin steluitvoerin stelurlin stelveldenin stelveldin stelversiesin \
+ stelvoetin stelvoetnootdefinitiein stelvoetnotenin stelvoettekstenin stelwitruimtein stop \
+ stopachtergrond stopcitaat stopcommentaar stopgeg stopinteractiemenu stopkantlijn \
+ stopkleur stopomgeving stoponderdeel stopopelkaar stopprodukt stopproject \
+ stoptekstlijn stopversie suggestie switchnaarkorps switchtorawfont sym \
+ symbool synchronisatiebalk synchroniseer taal tab tekstlijn \
+ tekstreferentie tekstvariabele tex toevoegen toonexternefiguren toongrid \
+ tooninstellingen toonkader toonkleur toonkleurgroep toonkorps toonkorpsomgeving \
+ toonlayout toonopmaak toonpalet toonprint toonstruts toonsymboolset \
+ toonvelden typ type typebuffer typefile uit \
+ uitgerekt usecodering vastespaties veld veldstapel verbergblokken \
+ vergelijkkleurgroep vergelijkpalet verplaatsopgrid versie vertaal verwerkblokken \
+ verwerkpagina vl voetnoot voetnoottekst volgprofiel volgprofielversie \
+ volgversie volledigregister weekdag wiskunde witruimte woordrechts
diff --git a/context/data/cont-ro-scite.properties b/context/data/cont-ro-scite.properties
index c3b5644e0..6aec0faca 100644
--- a/context/data/cont-ro-scite.properties
+++ b/context/data/cont-ro-scite.properties
@@ -66,11 +66,11 @@ keywordclass.macros.context.ro=\
setvariabilatext sim simbol sincronizeaza spatiifixate spatiu \
spatiualb start startcitat startcomentariu startcomponenta startculoare \
startfact startfundal startimpachetat startliniemargine startmediu startmeniuinteractiune \
- startproiect startriglatext startversiune stivacampuri stop stopcitat \
- stopcomentariu stopcomponenta stopculoare stopfact stopfundal stopimpachetat \
- stopliniemargine stopmediu stopmeniuinteractiune stopproiect stopriglatext stopversiune \
- sublinie sublinii supralinie tab tex texteticheta \
- textmarginal texttitlu textumplere tippagina titlu tooltip \
- traduce trecilafontraw trecilafonttext typ type typefile \
- undeva urmeazaprofil urmeazaversiune urmeazaversiuneprofil variabilatext versiune \
- vl zidinsaptamana
+ startprodus startproiect startriglatext startversiune stivacampuri stop \
+ stopcitat stopcomentariu stopcomponenta stopculoare stopfact stopfundal \
+ stopimpachetat stopliniemargine stopmediu stopmeniuinteractiune stopprodus stopproiect \
+ stopriglatext stopversiune sublinie sublinii supralinie tab \
+ tex texteticheta textmarginal texttitlu textumplere tippagina \
+ titlu tooltip traduce trecilafontraw trecilafonttext typ \
+ type typefile undeva urmeazaprofil urmeazaversiune urmeazaversiuneprofil \
+ variabilatext versiune vl zidinsaptamana
diff --git a/context/data/context-jedit-cz.xml b/context/data/context-jedit-cz.xml
index 4d0c2bdac..ab6fdd8f9 100644
--- a/context/data/context-jedit-cz.xml
+++ b/context/data/context-jedit-cz.xml
@@ -321,6 +321,7 @@
<KEYWORD2>\startkomponenta</KEYWORD2>
<KEYWORD2>\startmarginalnilinka</KEYWORD2>
<KEYWORD2>\startpozadi</KEYWORD2>
+ <KEYWORD2>\startprodukt</KEYWORD2>
<KEYWORD2>\startprojekt</KEYWORD2>
<KEYWORD2>\startprostredi</KEYWORD2>
<KEYWORD2>\starttextovalinka</KEYWORD2>
@@ -335,6 +336,7 @@
<KEYWORD2>\stopkomponenta</KEYWORD2>
<KEYWORD2>\stopmarginalnilinka</KEYWORD2>
<KEYWORD2>\stoppozadi</KEYWORD2>
+ <KEYWORD2>\stopprodukt</KEYWORD2>
<KEYWORD2>\stopprojekt</KEYWORD2>
<KEYWORD2>\stopprostredi</KEYWORD2>
<KEYWORD2>\stoptextovalinka</KEYWORD2>
diff --git a/context/data/context-jedit-de.xml b/context/data/context-jedit-de.xml
index 716e29541..0be617e78 100644
--- a/context/data/context-jedit-de.xml
+++ b/context/data/context-jedit-de.xml
@@ -246,6 +246,7 @@
<KEYWORD2>\startkommentar</KEYWORD2>
<KEYWORD2>\startkomponente</KEYWORD2>
<KEYWORD2>\startmarginallinie</KEYWORD2>
+ <KEYWORD2>\startprodukt</KEYWORD2>
<KEYWORD2>\startprojekt</KEYWORD2>
<KEYWORD2>\starttextlinie</KEYWORD2>
<KEYWORD2>\startumgebung</KEYWORD2>
@@ -372,6 +373,7 @@
<KEYWORD2>\stopkommentar</KEYWORD2>
<KEYWORD2>\stopkomponente</KEYWORD2>
<KEYWORD2>\stopmarginallinie</KEYWORD2>
+ <KEYWORD2>\stopprodukt</KEYWORD2>
<KEYWORD2>\stopprojekt</KEYWORD2>
<KEYWORD2>\stoptextlinie</KEYWORD2>
<KEYWORD2>\stopumgebung</KEYWORD2>
diff --git a/context/data/context-jedit-en.xml b/context/data/context-jedit-en.xml
index 0593b7644..adc81221f 100644
--- a/context/data/context-jedit-en.xml
+++ b/context/data/context-jedit-en.xml
@@ -391,6 +391,7 @@
<KEYWORD2>\startinteractionmenu</KEYWORD2>
<KEYWORD2>\startmarginrule</KEYWORD2>
<KEYWORD2>\startpacked</KEYWORD2>
+ <KEYWORD2>\startproduct</KEYWORD2>
<KEYWORD2>\startproject</KEYWORD2>
<KEYWORD2>\startquotation</KEYWORD2>
<KEYWORD2>\starttextrule</KEYWORD2>
@@ -405,6 +406,7 @@
<KEYWORD2>\stopinteractionmenu</KEYWORD2>
<KEYWORD2>\stopmarginrule</KEYWORD2>
<KEYWORD2>\stoppacked</KEYWORD2>
+ <KEYWORD2>\stopproduct</KEYWORD2>
<KEYWORD2>\stopproject</KEYWORD2>
<KEYWORD2>\stopquotation</KEYWORD2>
<KEYWORD2>\stoptextrule</KEYWORD2>
diff --git a/context/data/context-jedit-it.xml b/context/data/context-jedit-it.xml
index 418e39a35..d0317cd0b 100644
--- a/context/data/context-jedit-it.xml
+++ b/context/data/context-jedit-it.xml
@@ -400,6 +400,7 @@
<KEYWORD2>\startlineamargine</KEYWORD2>
<KEYWORD2>\startlineatesto</KEYWORD2>
<KEYWORD2>\startmenuinterattivo</KEYWORD2>
+ <KEYWORD2>\startprodotto</KEYWORD2>
<KEYWORD2>\startprogetto</KEYWORD2>
<KEYWORD2>\startsfondo</KEYWORD2>
<KEYWORD2>\startversione</KEYWORD2>
@@ -415,6 +416,7 @@
<KEYWORD2>\stoplineamargine</KEYWORD2>
<KEYWORD2>\stoplineatesto</KEYWORD2>
<KEYWORD2>\stopmenuinterattivo</KEYWORD2>
+ <KEYWORD2>\stopprodotto</KEYWORD2>
<KEYWORD2>\stopprogetto</KEYWORD2>
<KEYWORD2>\stopsfondo</KEYWORD2>
<KEYWORD2>\stopversione</KEYWORD2>
diff --git a/context/data/context-jedit-nl.xml b/context/data/context-jedit-nl.xml
index 9f3548ef7..9779ec0fa 100644
--- a/context/data/context-jedit-nl.xml
+++ b/context/data/context-jedit-nl.xml
@@ -258,6 +258,7 @@
<KEYWORD2>\startomgeving</KEYWORD2>
<KEYWORD2>\startonderdeel</KEYWORD2>
<KEYWORD2>\startopelkaar</KEYWORD2>
+ <KEYWORD2>\startprodukt</KEYWORD2>
<KEYWORD2>\startproject</KEYWORD2>
<KEYWORD2>\starttekstlijn</KEYWORD2>
<KEYWORD2>\startversie</KEYWORD2>
@@ -392,6 +393,7 @@
<KEYWORD2>\stopomgeving</KEYWORD2>
<KEYWORD2>\stoponderdeel</KEYWORD2>
<KEYWORD2>\stopopelkaar</KEYWORD2>
+ <KEYWORD2>\stopprodukt</KEYWORD2>
<KEYWORD2>\stopproject</KEYWORD2>
<KEYWORD2>\stoptekstlijn</KEYWORD2>
<KEYWORD2>\stopversie</KEYWORD2>
diff --git a/context/data/context-jedit-ro.xml b/context/data/context-jedit-ro.xml
index de001a2ee..9841a0350 100644
--- a/context/data/context-jedit-ro.xml
+++ b/context/data/context-jedit-ro.xml
@@ -407,6 +407,7 @@
<KEYWORD2>\startliniemargine</KEYWORD2>
<KEYWORD2>\startmediu</KEYWORD2>
<KEYWORD2>\startmeniuinteractiune</KEYWORD2>
+ <KEYWORD2>\startprodus</KEYWORD2>
<KEYWORD2>\startproiect</KEYWORD2>
<KEYWORD2>\startriglatext</KEYWORD2>
<KEYWORD2>\startversiune</KEYWORD2>
@@ -422,6 +423,7 @@
<KEYWORD2>\stopliniemargine</KEYWORD2>
<KEYWORD2>\stopmediu</KEYWORD2>
<KEYWORD2>\stopmeniuinteractiune</KEYWORD2>
+ <KEYWORD2>\stopprodus</KEYWORD2>
<KEYWORD2>\stopproiect</KEYWORD2>
<KEYWORD2>\stopriglatext</KEYWORD2>
<KEYWORD2>\stopversiune</KEYWORD2>
diff --git a/metapost/context/base/mp-spec.mp b/metapost/context/base/mp-spec.mp
index bef6cd2fa..9fe3c724f 100644
--- a/metapost/context/base/mp-spec.mp
+++ b/metapost/context/base/mp-spec.mp
@@ -705,3 +705,71 @@ enddef ;
% spotcolor is already scaled
endinput ;
+
+% just an exercise (due to a question by Chof on the context mailing list); scaling of
+% 'special' colors is not possible and the next solution is incomplete (spot colors,
+% transparency, etc); watch the the tricky chained macro construction
+
+% vardef normalgray(expr s ) = (s,s,s) enddef ;
+% vardef normalrgb (expr r,g,b ) = (r,g,b) enddef ;
+% vardef normalcmyk(expr c,m,y,k) = if cmykcolors : save ok ; boolean ok ; if unknown cmykcolorhash[c][m][y][k] : ok := false ; elseif cmykcolorhash[c][m][y][k] = -1 : ok := false ; else : ok := true ; fi ; if not ok : save s ; string s ; s := dddecimal (c,m,y) & " " & decimal k ; _cmyk_counter_ := _cmyk_counter_ + 1 ; cmykcolorpattern[_cmyk_counter_/1000] := s ; cmykcolorhash[c][m][y][k] := _cmyk_counter_ ; flush_special(1, 7, decimal _cmyk_counter_ & " " & s) ; _local_specials_ := _local_specials_ & " cmykcolorhash[" & decimal c & "][" & decimal m & "][" & decimal y & "][" & decimal k & "] := -1 ; " ; fi ; (_special_signal_/1000,1/1000,cmykcolorhash[c][m][y][k]/1000) else : (1-c-k,1-m-k,1-y-k) fi enddef ;
+
+% vardef gray(expr s) = normalgray(s ) enddef ;
+% vardef rgb (expr r,g,b) = normalrgb (r,g,b ) enddef ;
+% vardef cmyk(expr c,m,y,k) = normalcmyk(c,m,y,k) enddef ;
+
+% numeric _scaled_color_t_ ;
+% color _scaled_color_c_ ;
+
+% def withscaledcolor =
+% hide (
+% _scaled_color_t_ := 0 ; % direct
+% def gray(expr s) =
+% hide (
+% _gray_s_ := s ;
+% _scaled_color_t_ := 1; % gray
+% )
+% 0
+% enddef ;
+% def rgb (expr r,g,b) =
+% hide (
+% _rgb_r_ := r ; _rgb_g_ := g ; _rgb_b_ := b ;
+% _scaled_color_t_ := 2 ; % rgb
+% )
+% 0
+% enddef ;
+% def cmyk (expr c,m,y,k) =
+% hide (
+% _cmyk_c_ := c ; _cmyk_m_ := m ; _cmyk_y_ := y ; _cmyk_k_ := k ;
+% _scaled_color_t_ := 3 ; % cmyk
+% )
+% 0
+% enddef ; )
+% dowithscaledcolor
+% enddef ;
+
+% def dowithscaledcolor expr t =
+% hide (
+% if color t : _scaled_color_c_ := t fi ;
+% vardef gray(expr s) = normalgray(s) enddef ;
+% vardef rgb (expr r,g,b) = normalrgb (r,g,b) enddef ;
+% vardef cmyk(expr c,m,y,k) = normalcmyk(c,m,y,k) enddef ;
+% )
+% enddef ;
+
+% def by expr s =
+% if _scaled_color_t_ = 0 :
+% withcolor s*_scaled_color_c_
+% elseif _scaled_color_t_ = 1 :
+% withcolor gray(s*_gray_s_)
+% elseif _scaled_color_t_ = 2 :
+% withcolor rgb (s*_rgb_r_, s*_rgb_g_, s*_rgb_b_)
+% elseif _scaled_color_t_ = 3 :
+% withcolor cmyk(s*_cmyk_c_, s*_cmyk_m_, s*_cmyk_y_, s*_cmyk_k_)
+% fi
+% enddef ;
+
+% fill fullcircle scaled 10cm withscaledcolor cmyk(0,0,1,0) by .5 ;
+% fill fullcircle scaled 8cm withscaledcolor rgb (0,0,1) by .5 ;
+% fill fullcircle scaled 6cm withscaledcolor gray(1) by .5 ;
+% fill fullcircle scaled 4cm withscaledcolor (0,1,0) by .5 ;
diff --git a/metapost/context/base/mp-tool.mp b/metapost/context/base/mp-tool.mp
index 5c7353e38..925b9ca44 100644
--- a/metapost/context/base/mp-tool.mp
+++ b/metapost/context/base/mp-tool.mp
@@ -1772,25 +1772,77 @@ enddef ;
% Thanks to Jens-Uwe Morawski for pointing out that we need
% to treat bounded and clipped components as local pictures.
-def recolor suffix p = p := repathed (0,p) enddef ;
-def refill suffix p = p := repathed (1,p) enddef ;
-def redraw suffix p = p := repathed (2,p) enddef ;
-def retext suffix p = p := repathed (3,p) enddef ;
-def untext suffix p = p := repathed (4,p) enddef ;
-
-primarydef p recolored t = repathed(0,p) t enddef ;
-primarydef p refilled t = repathed(1,p) t enddef ;
-primarydef p redrawn t = repathed(2,p) t enddef ;
-primarydef p retexted t = repathed(3,p) t enddef ;
-primarydef p untexted t = repathed(4,p) t enddef ;
+def recolor suffix p = p := repathed (0,p) enddef ;
+def refill suffix p = p := repathed (1,p) enddef ;
+def redraw suffix p = p := repathed (2,p) enddef ;
+def retext suffix p = p := repathed (3,p) enddef ;
+def untext suffix p = p := repathed (4,p) enddef ;
+
+% primarydef p recolored t = repathed(0,p) t enddef ;
+% primarydef p refilled t = repathed(1,p) t enddef ;
+% primarydef p redrawn t = repathed(2,p) t enddef ;
+% primarydef p retexted t = repathed(3,p) t enddef ;
+% primarydef p untexted t = repathed(4,p) t enddef ;
color refillbackground ; refillbackground := (1,1,1) ;
+% vardef repathed (expr mode, p) text t =
+% begingroup ;
+% if mode=0 : save withcolor ; remapcolors ; fi ;
+% save _p_, _pp_, _f_, _b_, _t_ ;
+% picture _p_, _pp_ ; color _f_ ; path _b_ ; transform _t_ ;
+% _b_ := boundingbox p ; _p_ := nullpicture ;
+% for i within p :
+% _f_ := (redpart i, greenpart i, bluepart i) ;
+% if bounded i :
+% _pp_ := repathed(mode,i) t ;
+% setbounds _pp_ to pathpart i ;
+% addto _p_ also _pp_ ;
+% elseif clipped i :
+% _pp_ := repathed(mode,i) t ;
+% clip _pp_ to pathpart i ;
+% addto _p_ also _pp_ ;
+% elseif stroked i :
+% addto _p_ doublepath pathpart i
+% dashed dashpart i withpen penpart i
+% withcolor _f_ % (redpart i, greenpart i, bluepart i)
+% if mode=2 : t fi ;
+% elseif filled i :
+% addto _p_ contour pathpart i
+% withcolor _f_
+% if (mode=1) and (_f_<>refillbackground) : t fi ;
+% elseif textual i : % textpart i <> "" :
+% if mode <> 4 :
+% % transform _t_ ;
+% % (xpart _t_, xxpart _t_, xypart _t_) = (xpart i, xxpart i, xypart i) ;
+% % (ypart _t_, yypart _t_, yxpart _t_) = (ypart i, yypart i, yxpart i) ;
+% % addto _p_ also
+% % textpart i infont fontpart i % todo : other font
+% % transformed _t_
+% % withpen penpart i
+% % withcolor _f_
+% % if mode=3 : t fi ;
+% addto _p_ also i if mode=3 : t fi ;
+% fi ;
+% else :
+% addto _p_ also i ;
+% fi ;
+% endfor ;
+% setbounds _p_ to _b_ ;
+% _p_
+% endgroup
+% enddef ;
+
+def restroke suffix p = p := repathed (21,p) enddef ; % keep attributes
+def reprocess suffix p = p := repathed (22,p) enddef ; % no attributes
+
+% also 11 and 12
+
vardef repathed (expr mode, p) text t =
begingroup ;
if mode=0 : save withcolor ; remapcolors ; fi ;
- save _p_, _pp_, _f_, _b_, _t_ ;
- picture _p_, _pp_ ; color _f_ ; path _b_ ; transform _t_ ;
+ save _p_, _pp_, _ppp_, _f_, _b_, _t_ ;
+ picture _p_, _pp_, _ppp_ ; color _f_ ; path _b_ ; transform _t_ ;
_b_ := boundingbox p ; _p_ := nullpicture ;
for i within p :
_f_ := (redpart i, greenpart i, bluepart i) ;
@@ -1803,14 +1855,33 @@ vardef repathed (expr mode, p) text t =
clip _pp_ to pathpart i ;
addto _p_ also _pp_ ;
elseif stroked i :
- addto _p_ doublepath pathpart i
- dashed dashpart i withpen penpart i
- withcolor _f_ % (redpart i, greenpart i, bluepart i)
- if mode=2 : t fi ;
+ if mode=21 :
+ _ppp_ := i ; % indirectness is needed
+ addto _p_ also image(scantokens(t & " pathpart _ppp_")
+ dashed dashpart i withpen penpart i
+ withcolor _f_ ; ) ;
+ elseif mode=22 :
+ _ppp_ := i ; % indirectness is needed
+ addto _p_ also image(scantokens(t & " pathpart _ppp_")) ;
+ else :
+ addto _p_ doublepath pathpart i
+ dashed dashpart i withpen penpart i
+ withcolor _f_ % (redpart i, greenpart i, bluepart i)
+ if mode=2 : t fi ;
+ fi ;
elseif filled i :
- addto _p_ contour pathpart i
- withcolor _f_
+ if mode=11 :
+ _ppp_ := i ; % indirectness is needed
+ addto _p_ also image(scantokens(t & " pathpart _ppp_")
+ withcolor _f_ ; ) ;
+ elseif mode=12 :
+ _ppp_ := i ; % indirectness is needed
+ addto _p_ also image(scantokens(t & " pathpart _ppp_")) ;
+ else :
+ addto _p_ contour pathpart i
+ withcolor _f_
if (mode=1) and (_f_<>refillbackground) : t fi ;
+ fi ;
elseif textual i : % textpart i <> "" :
if mode <> 4 :
% transform _t_ ;
diff --git a/scripts/context/perl/texutil.pl b/scripts/context/perl/texutil.pl
index d5e6ef9ea..0a0d29753 100644
--- a/scripts/context/perl/texutil.pl
+++ b/scripts/context/perl/texutil.pl
@@ -1486,7 +1486,7 @@ if (($SavedHow ne $PageHow) && ($PageHow ne "")) {
print TUO "\\registerfrom$SavedLine" }
elsif ($RegisterState eq $RegStat{"t"})
{ FlushSavedLine ;
- print TUO "\\registerto$SavedLine" }
+ print TUO "\\registerto$SavedLine" ; $SavedHow = '' ; }
else
{ if ($CollapseEntries)
{ if ($SavedEntry ne $NextEntry)
@@ -1495,7 +1495,7 @@ if (($SavedHow ne $PageHow) && ($PageHow ne "")) {
{ $SavedTo = $SavedLine }
$SavedEntry = $NextEntry }
else
- { print TUO "\\registerpage$SavedLine" }
+ { print TUO "\\registerpage$SavedLine" ; $SavedHow = '' ; }
}
++$NOfSanePages ;
$LastPage = $Page ;
diff --git a/scripts/context/ruby/base/file.rb b/scripts/context/ruby/base/file.rb
index f6189043c..16a1be09b 100644
--- a/scripts/context/ruby/base/file.rb
+++ b/scripts/context/ruby/base/file.rb
@@ -1,3 +1,13 @@
+# module : base/file
+# copyright : PRAGMA Advanced Document Engineering
+# version : 2002-2005
+# author : Hans Hagen
+#
+# project : ConTeXt / eXaMpLe
+# concept : Hans Hagen
+# info : j.hagen@xs4all.nl
+# www : www.pragma-ade.com
+
require 'ftools'
class File
diff --git a/scripts/context/ruby/base/kpsefast.rb b/scripts/context/ruby/base/kpsefast.rb
new file mode 100644
index 000000000..a519a6be6
--- /dev/null
+++ b/scripts/context/ruby/base/kpsefast.rb
@@ -0,0 +1,776 @@
+# module : base/kpsefast
+# copyright : PRAGMA Advanced Document Engineering
+# version : 2005
+# author : Hans Hagen
+#
+# project : ConTeXt / eXaMpLe
+# concept : Hans Hagen
+# info : j.hagen@xs4all.nl
+# www : www.pragma-ade.com
+
+# todo: multiple cnf files
+
+class File
+
+ def File.locate_file(path,name)
+ begin
+ files = Dir.entries(path)
+ if files.include?(name) then
+ fullname = File.join(path,name)
+ return fullname if FileTest.file?(fullname)
+ end
+ files.each do |p|
+ fullname = File.join(path,p)
+ if p != '.' and p != '..' and FileTest.directory?(fullname) and result = locate_file(fullname,name) then
+ return result
+ end
+ end
+ rescue
+ # bad path
+ end
+ return nil
+ end
+
+ def File.glob_file(pattern)
+ return Dir.glob(pattern).first
+ end
+
+end
+
+class KPSEFAST
+
+ # formats are an incredible inconsistent mess
+
+ @@suffixes = Hash.new
+ @@formats = Hash.new
+ @@suffixmap = Hash.new
+
+ @@suffixes['gf'] = ['.<resolution>gf'] # todo
+ @@suffixes['pk'] = ['.<resolution>pk'] # todo
+ @@suffixes['tfm'] = ['.tfm']
+ @@suffixes['afm'] = ['.afm']
+ @@suffixes['base'] = ['.base']
+ @@suffixes['bib'] = ['.bib']
+ @@suffixes['bst'] = ['.bst']
+ @@suffixes['cnf'] = ['.cnf']
+ @@suffixes['ls-R'] = ['ls-R', 'ls-r']
+ @@suffixes['fmt'] = ['.fmt', '.efmt', '.efm', '.ofmt', '.ofm', '.oft', '.eofmt', '.eoft', '.eof', '.pfmt', '.pfm', '.epfmt', '.epf', '.xpfmt', '.xpf', '.afmt', '.afm']
+ @@suffixes['map'] = ['.map']
+ @@suffixes['mem'] = ['.mem']
+ @@suffixes['mf'] = ['.mf']
+ @@suffixes['mfpool'] = ['.pool']
+ @@suffixes['mft'] = ['.mft']
+ @@suffixes['mp'] = ['.mp']
+ @@suffixes['mppool'] = ['.pool']
+ @@suffixes['ocp'] = ['.ocp']
+ @@suffixes['ofm'] = ['.ofm', '.tfm']
+ @@suffixes['opl'] = ['.opl']
+ @@suffixes['otp'] = ['.otp']
+ @@suffixes['ovf'] = ['.ovf']
+ @@suffixes['ovp'] = ['.ovp']
+ @@suffixes['graphic/figure'] = ['.eps', '.epsi']
+ @@suffixes['tex'] = ['.tex']
+ @@suffixes['texpool'] = ['.pool']
+ @@suffixes['PostScript header'] = ['.pro']
+ @@suffixes['type1 fonts'] = ['.pfa', '.pfb']
+ @@suffixes['vf'] = ['.vf']
+ @@suffixes['ist'] = ['.ist']
+ @@suffixes['truetype fonts'] = ['.ttf', '.ttc']
+ @@suffixes['web'] = ['.web', '.ch']
+ @@suffixes['cweb'] = ['.w', '.web', '.ch']
+ @@suffixes['enc files'] = ['.enc']
+ @@suffixes['cmap files'] = ['.cmap']
+ @@suffixes['subfont definition files'] = ['.sfd']
+ @@suffixes['lig files'] = ['.lig']
+ @@suffixes['bitmap font'] = []
+ @@suffixes['MetaPost support'] = []
+ @@suffixes['TeX system documentation'] = []
+ @@suffixes['TeX system sources'] = []
+ @@suffixes['Troff fonts'] = []
+ @@suffixes['dvips config'] = []
+ @@suffixes['type42 fonts'] = []
+ @@suffixes['web2c files'] = []
+ @@suffixes['other text files'] = []
+ @@suffixes['other binary files'] = []
+ @@suffixes['misc fonts'] = []
+ @@suffixes['opentype fonts'] = []
+ @@suffixes['pdftex config'] = []
+ @@suffixes['texmfscripts'] = []
+
+ # replacements
+
+ @@suffixes['fmt'] = ['.fmt']
+ @@suffixes['type1 fonts'] = ['.pfa', '.pfb', '.pfm']
+ @@suffixes['tex'] = ['.tex', '.xml']
+ @@suffixes['texmfscripts'] = ['rb','lua','py','pl']
+
+ @@suffixes.keys.each do |k| @@suffixes[k].each do |s| @@suffixmap[s] = k end end
+
+ # TTF2TFMINPUTS
+ # MISCFONTS
+ # TEXCONFIG
+ # DVIPDFMINPUTS
+ # OTFFONTS
+
+ @@formats['gf'] = ''
+ @@formats['pk'] = ''
+ @@formats['tfm'] = 'TFMFONTS'
+ @@formats['afm'] = 'AFMFONTS'
+ @@formats['base'] = 'MFBASES'
+ @@formats['bib'] = ''
+ @@formats['bst'] = ''
+ @@formats['cnf'] = ''
+ @@formats['ls-R'] = ''
+ @@formats['fmt'] = ''
+ @@formats['map'] = 'TEXFONTMAPS'
+ @@formats['mem'] = 'MPMEMS'
+ @@formats['mf'] = 'MFINPUTS'
+ @@formats['mfpool'] = 'MFPOOL'
+ @@formats['mft'] = ''
+ @@formats['mp'] = 'MPINPUTS'
+ @@formats['mppool'] = 'MPPOOL'
+ @@formats['ocp'] = 'OCPINPUTS'
+ @@formats['ofm'] = 'OFMFONTS'
+ @@formats['opl'] = 'OPLFONTS'
+ @@formats['otp'] = 'OTPINPUTS'
+ @@formats['ovf'] = 'OVFFONTS'
+ @@formats['ovp'] = 'OVPFONTS'
+ @@formats['graphic/figure'] = ''
+ @@formats['tex'] = 'TEXINPUTS'
+ @@formats['texpool'] = 'TEXPOOL'
+ @@formats['PostScript header'] = 'TEXPSHEADERS'
+ @@formats['type1 fonts'] = 'T1FONTS'
+ @@formats['vf'] = 'VFFONTS'
+ @@formats['ist'] = ''
+ @@formats['truetype fonts'] = 'TTFONTS'
+ @@formats['web'] = ''
+ @@formats['cweb'] = ''
+ @@formats['enc files'] = 'ENCFONTS'
+ @@formats['cmap files'] = 'CMAPFONTS'
+ @@formats['subfont definition files'] = 'SFDFONTS'
+ @@formats['lig files'] = 'LIGFONTS'
+ @@formats['bitmap font'] = ''
+ @@formats['MetaPost support'] = ''
+ @@formats['TeX system documentation'] = ''
+ @@formats['TeX system sources'] = ''
+ @@formats['Troff fonts'] = ''
+ @@formats['dvips config'] = ''
+ @@formats['type42 fonts'] = 'T42FONTS'
+ @@formats['web2c files'] = 'WEB2C'
+ @@formats['other text files'] = ''
+ @@formats['other binary files'] = ''
+ @@formats['misc fonts'] = ''
+ @@formats['opentype fonts'] = 'OPENTYPEFONTS'
+ @@formats['pdftex config'] = 'PDFTEXCONFIG'
+ @@formats['texmfscripts'] = 'TEXMFSCRIPTS'
+
+ attr_accessor :progname, :engine, :format, :rootpath, :treepath,
+ :verbose, :remember, :scandisk, :diskcache, :renewcache
+
+ @@cacheversion = '1'
+
+ def initialize
+ @rootpath = ''
+ @treepath = ''
+ @progname = 'kpsewhich'
+ @engine = 'pdfetex'
+ @variables = Hash.new
+ @expansions = Hash.new
+ @files = Hash.new
+ @found = Hash.new
+ @kpsevars = Hash.new
+ @lsrfiles = Array.new
+ @verbose = true
+ @remember = true
+ @scandisk = true
+ @diskcache = true
+ @renewcache = false
+ @isolate = false
+
+ @diskcache = false
+ @cachepath = nil
+ @cachefile = 'tmftools.log'
+ end
+
+ def load_cnf
+ unless @treepath.empty? then
+ unless @rootpath.empty? then
+ @treepath = @treepath.split(',').collect do |p| File.join(@rootpath,p) end.join(',')
+ end
+ ENV['TEXMF'] = @treepath
+ ENV['TEXMFCNF'] = File.join(@treepath.split(',').first,'texmf/web2c')
+ end
+ unless @rootpath.empty? then
+ ENV['TEXMFCNF'] = File.join(@rootpath,'texmf/web2c')
+ ENV['SELFAUTOPARENT'] = @rootpath
+ @isolate = true
+ end
+ filenames = [File.join(ENV['TEXMFCNF'] || '.','texmf.cnf')]
+ # <root>/texmf/web2c/texmf.cnf
+ @rootpath = filenames.first
+ 3.times do
+ @rootpath = File.dirname(@rootpath)
+ end
+ filenames.collect! do |f|
+ f.gsub("\\", '/')
+ end
+ filenames.each do |fname|
+ if FileTest.file?(fname) and f = File.open(fname) then
+ while line = f.gets do
+ loop do
+ # concatenate lines ending with \
+ break unless line.sub!(/\\\s*$/o) do
+ f.gets || ''
+ end
+ end
+ case line
+ when /^[\%\#]/o then
+ # comment
+ when /^\s*(.*?)\s*\=\s*(.*?)\s*$/o then
+ key, value = $1, $2
+ unless @variables.key?(key) then
+ value.sub!(/\%.*$/,'')
+ value.sub!(/\~/, "$HOME")
+ @variables[key] = value
+ end
+ @kpsevars[key] = true
+ end
+ end
+ f.close
+ end
+ end
+ end
+
+ def load_lsr
+ @lsrfiles = []
+ simplified_list(expansion('TEXMF')).each do |p|
+ ['ls-R','ls-r'].each do |f|
+ filename = File.join(p,f)
+ if FileTest.file?(filename) then
+ @lsrfiles << [filename,File.size(filename)]
+ break
+ end
+ end
+ end
+ @files = Hash.new
+ if @diskcache then
+ ['HOME','TEMP','TMP','TMPDIR'].each do |key|
+ if ENV[key] then
+ if FileTest.directory?(ENV[key]) then
+ @cachepath = ENV[key]
+ @cachefile = [@rootpath.gsub(/[^A-Z0-9]/io, '-').gsub(/\-+/,'-'),File.basename(@cachefile)].join('-')
+ break
+ end
+ end
+ end
+ if @cachepath and not @renewcache and FileTest.file?(File.join(@cachepath,@cachefile)) then
+ begin
+ if f = File.open(File.join(@cachepath,@cachefile)) then
+ cacheversion = Marshal.load(f)
+ if cacheversion == @@cacheversion then
+ lsrfiles = Marshal.load(f)
+ if lsrfiles == @lsrfiles then
+ @files = Marshal.load(f)
+ end
+ end
+ f.close
+ end
+ rescue
+ @files = Hash.new
+ end
+ end
+ end
+ return if @files.size > 0
+ @lsrfiles.each do |filedata|
+ filename, filesize = filedata
+ filepath = File.dirname(filename)
+ begin
+ path = '.'
+ data = IO.readlines(filename)
+ if data[0].chomp =~ /% ls\-R \-\- filename database for kpathsea\; do not change this line\./io then
+ data.each do |line|
+ case line
+ when /^[a-zA-Z0-9]/o then
+ line.chomp!
+ if @files[line] then
+ @files[line] << path
+ else
+ @files[line] = [path]
+ end
+ when /^\.\/(.*?)\:$/o then
+ path = File.join(filepath,$1)
+ end
+ end
+ end
+ rescue
+ # sorry
+ end
+ end
+ if @diskcache and @cachepath and f = File.open(File.join(@cachepath,@cachefile),'wb') then
+ f << Marshal.dump(@@cacheversion)
+ f << Marshal.dump(@lsrfiles)
+ f << Marshal.dump(@files)
+ f.close
+ end
+ end
+
+ def expand_variables
+ @expansions = Hash.new
+ if @isolate then
+ @variables['TEXMFCNF'] = ENV['TEXMFCNF'].dup
+ @variables['SELFAUTOPARENT'] = ENV['SELFAUTOPARENT'].dup
+ else
+ ENV.keys.each do |e|
+ if e =~ /^([a-zA-Z]+)\_(.*)\s*$/o then
+ @expansions["#{$1}.#{$2}"] = ENV[e].dup
+ else
+ @expansions[e] = ENV[e].dup
+ end
+ end
+ end
+ @variables.keys.each do |k|
+ @expansions[k] = @variables[k].dup unless @expansions[k]
+ end
+ loop do
+ busy = false
+ @expansions.keys.each do |k|
+ @expansions[k].gsub!(/\$([a-zA-Z0-9\_\-]*)/o) do
+ busy = true
+ @expansions[$1] || ''
+ end
+ @expansions[k].gsub!(/\$\{([a-zA-Z0-9\_\-]*)\}/o) do
+ busy = true
+ @expansions[$1] || ''
+ end
+ end
+ break unless busy
+ end
+ @expansions.keys.each do |k|
+ @expansions[k] = @expansions[k].gsub("\\", '/')
+ end
+ end
+
+ def variable(name='')
+ (name and not name.empty? and @variables[name.sub('$','')]) or ''
+ end
+
+ def expansion(name='')
+ (name and not name.empty? and @expansions[name.sub('$','')]) or ''
+ end
+
+ def variable?(name='')
+ name and not name.empty? and @variables.key?(name.sub('$',''))
+ end
+
+ def expansion?(name='')
+ name and not name.empty? and @expansions.key?(name.sub('$',''))
+ end
+
+ def simplified_list(str)
+ lst = str.gsub(/^\{/o,'').gsub(/\}$/o,'').split(",")
+ lst.collect do |l|
+ l.sub(/^[\!]*/,'').sub(/[\/\\]*$/o,'')
+ end
+ end
+
+ def original_variable(variable)
+ if variable?("#{@progname}.#{variable}") then
+ variable("#{@progname}.#{variable}")
+ elsif variable?(variable) then
+ variable(variable)
+ else
+ ''
+ end
+ end
+
+ def expanded_variable(variable)
+ if expansion?("#{variable}.#{@progname}") then
+ expansion("#{variable}.#{@progname}")
+ elsif expansion?(variable) then
+ expansion(variable)
+ else
+ ''
+ end
+ end
+
+ def original_path(filename='')
+ _expanded_path_(original_variable(var_of_format_or_suffix(filename)).split(";"))
+ end
+
+ def expanded_path(filename='')
+ _expanded_path_(expanded_variable(var_of_format_or_suffix(filename)).split(";"))
+ end
+
+ def _expanded_path_(pathlist)
+ i, n = 0, 0
+ pathlist.collect! do |mainpath|
+ mainpath.gsub(/([\{\}])/o) do
+ if $1 == "{" then
+ i += 1 ; n = i if i > n ; "<#{i}>"
+ else
+ i -= 1 ; "</#{i+1}>"
+ end
+ end
+ end
+ n.times do |i|
+ loop do
+ more = false
+ newlist = []
+ pathlist.each do |path|
+ unless path.sub!(/^(.*?)<(#{n-i})>(.*?)<\/\2>(.*?)$/) do
+ pre, mid, post = $1, $3, $4
+ mid.gsub!(/\,$/,',.')
+ mid.split(',').each do |m|
+ more = true
+ if m == '.' then
+ newlist << "#{pre}#{post}"
+ else
+ newlist << "#{pre}#{m}#{post}"
+ end
+ end
+ end then
+ newlist << path
+ end
+ end
+ if more then
+ pathlist = [newlist].flatten # copy -)
+ else
+ break
+ end
+ end
+ end
+ pathlist = pathlist.uniq.collect do |path|
+ p = path.gsub(/^\/+/o) do '' end
+ # p.gsub!(/(.)\/\/(.)/o) do "#{$1}/#{$2}" end
+ # p.gsub!(/\/\/+$/o) do '//' end
+ p.gsub!(/\/\/+/o) do '//' end
+ p
+ end
+ pathlist
+ end
+
+ # todo: ignore case
+
+ def var_of_format(str)
+ @@formats[str] || ''
+ end
+
+ def var_of_suffix(str) # includes .
+ if @@suffixmap.key?(str) then @@formats[@@suffixmap[str]] else '' end
+ end
+
+ def var_of_format_or_suffix(str)
+ if @@formats.key?(@format) then
+ @@formats[@format]
+ elsif @@suffixmap.key?(File.extname(str)) then # extname includes .
+ @@formats[@@suffixmap[File.extname(str)]] # extname includes .
+ else
+ ''
+ end
+ end
+
+end
+
+class KPSEFAST
+
+ # test things
+
+ def list_variables(kpseonly=true)
+ @variables.keys.sort.each do |k|
+ if kpseonly then
+ puts("#{k} = #{@variables[k]}") if @kpsevars[k]
+ else
+ puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@variables[k]}")
+ end
+ end
+ end
+
+ def list_expansions(kpseonly=true)
+ @expansions.keys.sort.each do |k|
+ if kpseonly then
+ puts("#{k} = #{@expansions[k]}") if @kpsevars[k]
+ else
+ puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@expansions[k]}")
+ end
+ end
+ end
+
+ def list_lsr
+ puts("files = #{@files.size}")
+ end
+
+ def set_test_patterns
+ @variables["KPSE_TEST_PATTERN_A"] = "foo/{1,2}/bar//"
+ @variables["KPSE_TEST_PATTERN_B"] = "!!x{A,B{1,2}}y"
+ @variables["KPSE_TEST_PATTERN_C"] = "x{A,B//{1,2}}y"
+ @variables["KPSE_TEST_PATTERN_D"] = "x{A,B//{1,2,}}//y"
+ end
+
+ def show_test_patterns
+ ['A','B','D'].each do |i|
+ puts ""
+ puts @variables ["KPSE_TEST_PATTERN_#{i}"]
+ puts ""
+ puts expand_path("KPSE_TEST_PATTERN_#{i}").split(File::PATH_SEPARATOR)
+ puts ""
+ end
+ end
+
+end
+
+class KPSEFAST
+
+ # kpse stuff
+
+ def expand_braces(str) # output variable and brace expansion of STRING.
+ _expanded_path_(original_variable(str).split(";")).join(File::PATH_SEPARATOR)
+ end
+
+ def expand_path(str) # output complete path expansion of STRING.
+ _expanded_path_(expanded_variable(str).split(";")).join(File::PATH_SEPARATOR)
+ end
+
+ def expand_var(str) # output variable expansion of STRING.
+ expanded_variable(str)
+ end
+
+ def show_path(str) # output search path for file type NAME
+ expanded_path(var_of_format(str)).join(File::PATH_SEPARATOR)
+ end
+
+ def var_value(str) # output the value of variable $STRING.
+ original_variable(str)
+ end
+
+end
+
+class KPSEFAST
+
+ def find_file(filename)
+ find_files(filename,true)
+ end
+
+ def find_files(filename,first=false)
+ if @remember then
+ stamp = "#{filename}--#{@format}--#{@engine}--#{@progname}"
+ return @found[stamp] if @found.key?(stamp)
+ end
+ pathlist = expanded_path(filename)
+ result = []
+ filelist = if @files.key?(filename) then @files[filename].uniq else nil end
+ done = false
+ pathlist.each do |path|
+ doscan = if path =~ /^\!\!/o then false else true end
+ recurse = if path =~ /\/\/$/o then true else false end
+ pathname = path.dup
+ pathname.gsub!(/^\!+/o, '')
+ done = false
+ if not done and filelist then
+ # checking for exact match
+ if filelist.include?(pathname) then
+ result << pathname
+ done = true
+ end
+ if not done and recurse then
+ # checking for fuzzy //
+ pathname.gsub!(/\/+$/o, '/.*')
+ # pathname.gsub!(/\/\//o,'/[\/]*/')
+ pathname.gsub!(/\/\//o,'/.*?/')
+ re = /^#{pathname}/
+ filelist.each do |f|
+ if re =~ f then
+ result << f # duplicates will be filtered later
+ done = true
+ end
+ break if done
+ end
+ end
+ end
+ if not done and doscan then
+ # checking for path itself
+ pname = pathname.sub(/\.\*$/,'')
+ if not pname =~ /\*/o and FileTest.file?(File.join(pname,filename)) then
+ result << pname
+ done = true
+ end
+ end
+ break if done and first
+ end
+ if not done and @scandisk then
+ pathlist.each do |path|
+ pathname = path.dup
+ unless pathname.gsub!(/^\!+/o, '') then # !! prevents scan
+ recurse = pathname.gsub!(/\/+$/o, '')
+ complex = pathname.gsub!(/\/\//o,'/*/')
+ if recurse then
+ if complex then
+ if ok = File.glob_file("#{pathname}/**/#{filename}") then
+ result << File.dirname(ok)
+ done = true
+ end
+ elsif ok = File.locate_file(pathname,filename) then
+ result << File.dirname(ok)
+ done = true
+ end
+ elsif complex then
+ if ok = File.glob_file("#{pathname}/#{filename}") then
+ result << File.dirname(ok)
+ done = true
+ end
+ elsif FileTest.file?(File.join(pathname,filename)) then
+ result << pathname
+ done = true
+ end
+ break if done and first
+ end
+ end
+ end
+ result = result.uniq.collect do |pathname|
+ File.join(pathname,filename)
+ end
+ @found[stamp] = result if @remember
+ return result # redundant
+ end
+
+end
+
+class KPSEFAST
+
+ class FileData
+ attr_accessor :tag, :name, :size, :date
+ def initialize(tag=0,name=nil,size=nil,date=nil)
+ @tag, @name, @size, @date = tag, name, size, date
+ end
+ def FileData.sizes(a)
+ a.collect do |aa|
+ aa.size
+ end
+ end
+ def report
+ case @tag
+ when 1
+ "deleted | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}"
+ when 2
+ "present | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}"
+ when 3
+ "obsolete | #{' '*8} | #{' '*16} | #{@name}"
+ end
+ end
+ end
+
+ def analyze_files(filter='',strict=false,sort='',delete=false)
+ puts("command = #{ARGV.join(' ')}")
+ puts("files = #{@files.size}")
+ puts("filter = #{filter}")
+ puts('')
+ if filter.gsub!(/^not:/,'') then
+ def the_same(filter,filename)
+ not filter or filter.empty? or /#{filter}/ !~ filename
+ end
+ else
+ def the_same(filter,filename)
+ not filter or filter.empty? or /#{filter}/ =~ filename
+ end
+ end
+ @files.keys.each do |name|
+ if @files[name].size > 1 then
+ data = Array.new
+ @files[name].each do |path|
+ filename = File.join(path,name)
+ # if not filter or filter.empty? or /#{filter}/ =~ filename then
+ if the_same(filter,filename) then
+ if FileTest.file?(filename) then
+ if delete then
+ data << FileData.new(1,filename,File.size(filename),File.mtime(filename))
+ begin
+ File.delete(filename) if delete
+ rescue
+ end
+ else
+ data << FileData.new(2,filename,File.size(filename),File.mtime(filename))
+ end
+ else
+ data << FileData.new(3,filename)
+ end
+ end
+ end
+ if data.length > 1 then
+ if strict then
+ # if data.collect do |d| d.size end.uniq! then
+ # data.sort! do |a,b| b.size <=> a.size end
+ # data.each do |d| puts d.report end
+ # puts ''
+ # end
+ data.sort! do |a,b| b.size <=> a.size end
+ bunch = Array.new
+ done = false
+ data.each do |d|
+ if bunch.size == 0 then
+ bunch << d
+ elsif bunch[0].size == d.size then
+ bunch << d
+ else
+ if bunch.size > 1 then
+ bunch.each do |b|
+ puts b.report
+ end
+ done = true
+ end
+ bunch = [d]
+ end
+ end
+ puts '' if done
+ else
+ case sort
+ when 'size' then data.sort! do |a,b| a.size <=> b.size end
+ when 'revsize' then data.sort! do |a,b| b.size <=> a.size end
+ when 'date' then data.sort! do |a,b| a.date <=> b.date end
+ when 'revdate' then data.sort! do |a,b| b.date <=> a.date end
+ end
+ data.each do |d| puts d.report end
+ puts ''
+ end
+ end
+ end
+ end
+ end
+
+end
+
+if false then
+
+ k = KPSEFAST.new # (root)
+ k.set_test_patterns
+ k.load_cnf
+ k.expand_variables
+ k.load_lsr
+
+ k.show_test_patterns
+ # puts k.list_variables
+ # puts k.list_expansions
+ # k.list_lsr
+ # puts k.expansion("$TEXMF")
+ # puts k.expanded_path("TEXINPUTS","context")
+
+ # k.progname, k.engine, k.format = 'context', 'pdfetex', 'tfm'
+ # k.scandisk = false # == must_exist
+ # k.expand_variables
+
+ # 10.times do |i| puts k.find_file('texnansi-lmr10.tfm') end
+
+ # puts "expand braces $TEXMF"
+ # puts k.expand_braces("$TEXMF")
+ # puts "expand path $TEXMF"
+ # puts k.expand_path("$TEXMF")
+ # puts "expand var $TEXMF"
+ # puts k.expand_var("$TEXMF")
+ # puts "expand path $TEXMF"
+ # puts k.show_path('tfm')
+ # puts "expand value $TEXINPUTS"
+ # puts k.var_value("$TEXINPUTS")
+ # puts "expand value $TEXINPUTS.context"
+ # puts k.var_value("$TEXINPUTS.context")
+
+ exit
+
+end
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb
index e2013b87e..75970bcd8 100644
--- a/scripts/context/ruby/base/tex.rb
+++ b/scripts/context/ruby/base/tex.rb
@@ -118,7 +118,7 @@ class TEX
@@booleanvars = [
'batchmode', 'nonstopmode', 'fast', 'fastdisabled', 'silentmode', 'final',
- 'paranoid', 'notparanoid', 'nobanner', 'once', 'allpatterrns',
+ 'paranoid', 'notparanoid', 'nobanner', 'once', 'allpatterns',
'nompmode', 'nomprun', 'automprun',
'nomapfiles', 'local',
'arrange', 'noarrange',
@@ -873,7 +873,7 @@ class TEX
if getvariable('fast') && ! getvariable('fastdisabled') then
opt << "\\fastmode\n"
end
- if getvariable('silent') then
+ if getvariable('silentmode') then
opt << "\\silentmode\n"
end
if (str = getvariable('separation')) && ! str.empty? then
diff --git a/scripts/context/ruby/base/texutil.rb b/scripts/context/ruby/base/texutil.rb
index 083e11bdb..47c613474 100644
--- a/scripts/context/ruby/base/texutil.rb
+++ b/scripts/context/ruby/base/texutil.rb
@@ -127,12 +127,13 @@ class TeXUtil
class Sorter
def initialize(max=12)
- @rep, @map, @exp = Hash.new, Hash.new, Hash.new
+ @rep, @map, @exp, @div = Hash.new, Hash.new, Hash.new, Hash.new
@max = max
@rexa, @rexb = nil, nil
end
def replacer(from,to='') # and expand
+ @max = [@max,to.length+1].max if to
@rep[from.escaped] = to || ''
end
@@ -140,6 +141,7 @@ class TeXUtil
# sorter.reducer('ij', 'y')
def reducer(from,to='')
+ @max = [@max,to.length+1].max if to
@map[from] = to || ''
end
@@ -147,9 +149,17 @@ class TeXUtil
# sorter.expander('ijligature', 'y')
def expander(from,to=nil)
+ from, to = converted(from), converted(to)
+ @max = [@max,to.length+1].max if to
@exp[from] = to || from || ''
end
+ def division(from,to=nil)
+ from, to = converted(from), converted(to)
+ @max = [@max,to.length+1].max if to
+ @div[from] = to || from || ''
+ end
+
# shortcut("\\ab\\cd\\e\\f", 'iacute')
# shortcut("\\\'\\i", 'iacute')
# shortcut("\\\'i", 'iacute')
@@ -172,9 +182,14 @@ class TeXUtil
end
def remap(str)
- str.gsub(@rexa) do
+ s = str.dup
+ s.gsub!(/(\d+)/o) do
+ $1.rjust(10,'a') # rest is b .. k
+ end
+ s.gsub!(@rexa) do
@rep[$1.escaped]
- end.gsub(@rexb) do
+ end
+ s.gsub!(@rexb) do
token = $1.sub(/\\/o, '')
if @exp.key?(token) then
@exp[token].ljust(@max,' ')
@@ -184,15 +199,20 @@ class TeXUtil
''
end
end
+ s
end
- def preset(shortcuts=[],expansions=[],reductions=[])
- 'a'.upto('z') do |c|
- expander(c)
- end
+ def preset(shortcuts=[],expansions=[],reductions=[],divisions=[])
+ # maybe we should move this to sort-def.tex
+ 'a'.upto('z') do |c| expander(c) ; division(c) end
+ expander('1','b') ; expander('2','c') ; expander('3','e') ; expander('4','f')
+ expander('5','g') ; expander('6','h') ; expander('7','i') ; expander('8','i')
+ expander('9','j') ; expander('0','a') ; expander('-','-') ;
+ # end potential move
shortcuts.each do |s| shortcut(s[0],s[1]) end
expansions.each do |e| expander(e[0],e[1]) end
reductions.each do |r| reducer(r[0],r[1]) end
+ divisions.each do |d| division(d[0],d[1]) end
end
def simplify(str)
@@ -216,6 +236,33 @@ class TeXUtil
return s
end
+ def getdivision(str)
+ @div[str] || str
+ end
+
+ def division?(str)
+ @div.key?(str)
+ end
+
+ private
+
+ def converted(str)
+ if str then
+ str.gsub(/([\+\-]*\d+)/o) do
+ n = $1.to_i
+ if n > 0 then
+ 'z'*n
+ elsif n < 0 then
+ '-'*(-n) # '-' precedes 'a'
+ else
+ ''
+ end
+ end
+ else
+ nil
+ end
+ end
+
end
class Plugin
@@ -328,6 +375,7 @@ class TeXUtil
class Synonym
+ @@debug = false
@@debug = true
def initialize(t, c, k, d)
@@ -386,7 +434,7 @@ class TeXUtil
def MySynonyms::processor(logger)
sorter = Sorter.new
- sorter.preset(eval("MyKeys").shortcuts,eval("MyKeys").expansions,eval("MyKeys").reductions)
+ sorter.preset(eval("MyKeys").shortcuts,eval("MyKeys").expansions,eval("MyKeys").reductions,eval("MyKeys").divisions)
sorter.prepare
@@synonyms.keys.each do |s|
@@synonyms[s].each_index do |i|
@@ -406,6 +454,7 @@ class TeXUtil
class Register
+ @@debug = false
@@debug = true
@@howto = /^(.*?)\:\:(.*)$/o
@@ -474,30 +523,43 @@ class TeXUtil
@@savedhowto, @@savedfrom, @@savedto, @@savedentry = '', '', '', ''
end
- def Register.flush(list,handle)
- #
+ def Register.flush(list,handle,sorter)
+ # a bit messy, quite old mechanism, maybe some day ...
# alphaclass can go, now flushed per class
- #
if list.size > 0 then
@nofentries, @nofpages = 0, 0
current, previous, howto = Array.new, Array.new, Array.new
lastpage, lastrealpage = '', ''
alphaclass, alpha = '', ''
@@savedhowto, @@savedfrom, @@savedto, @@savedentry = '', '', '', ''
-
if @@debug then
list.each do |entry|
- handle << "% [#{entry.sortkey[0,1]}] [#{entry.sortkey.gsub(/#{@@split}/o,'] [')}]\n"
+ handle << "% [#{entry.sortkey.gsub(/#{@@split}/o,'] [')}]\n"
end
end
list.each do |entry|
- testalpha = entry.sortkey[0,1].downcase
+ if entry.sortkey =~ /^(\S+)/o then
+ if sorter.division?($1) then
+ testalpha = sorter.getdivision($1)
+ else
+ testalpha = entry.sortkey[0,1].downcase
+ end
+ else
+ testalpha = entry.sortkey[0,1].downcase
+ end
if testalpha != alpha.downcase or alphaclass != entry.class then
alpha = testalpha
alphaclass = entry.class
if alpha != ' ' then
flushsavedline(handle)
- character = alpha.sub(/([^a-zA-Z])/o) do "\\" + $1 end
+ if alpha =~ /^[a-zA-Z]$/o then
+ character = alpha.dup
+ elsif alpha.length > 1 then
+ # character = "\\getvalue\{#{alpha}\}"
+ character = "\\#{alpha}"
+ else
+ character = "\\#{alpha}"
+ end
handle << "\\registerentry{#{entry.type}}{#{character}}\n"
end
end
@@ -556,6 +618,7 @@ class TeXUtil
elsif entry.state == 3 then # to
Register.flushsavedline(handle)
handle << "\\registerto#{savedline}\n"
+ @@savedhowto = '' # test
elsif @@collapse then
if savedentry != nextentry then
savedFrom = savedline
@@ -564,6 +627,7 @@ class TeXUtil
end
else
handle << "\\registerpage#{savedline}\n"
+ @@savedhowto = '' # test
end
@nofpages += 1
lastpage, lastrealpage = entry.page, entry.realpage
@@ -576,9 +640,11 @@ class TeXUtil
end
@@registers = Hash.new
+ @@sorter = Sorter.new
def MyRegisters::reset(logger)
@@registers = Hash.new
+ @@sorter = Sorter.new
end
def MyRegisters::reader(logger,data)
@@ -602,19 +668,18 @@ class TeXUtil
if @@registers.size > 0 then
@@registers.keys.sort.each do |s|
handle << logger.banner("registers: #{s} #{@@registers[s].size}")
- Register.flush(@@registers[s],handle)
+ Register.flush(@@registers[s],handle,@@sorter)
# report("register #{@@registers[s].class}: #{@@registers[s].@nofentries} entries and #{@@registers[s].@nofpages} pages")
end
end
end
def MyRegisters::processor(logger)
- sorter = Sorter.new
- sorter.preset(eval("MyKeys").shortcuts,eval("MyKeys").expansions,eval("MyKeys").reductions)
- sorter.prepare
+ @@sorter.preset(eval("MyKeys").shortcuts,eval("MyKeys").expansions,eval("MyKeys").reductions,eval("MyKeys").divisions)
+ @@sorter.prepare
@@registers.keys.each do |s|
@@registers[s].each_index do |i|
- @@registers[s][i].build(sorter)
+ @@registers[s][i].build(@@sorter)
end
@@registers[s] = @@registers[s].sort
end
@@ -668,6 +733,7 @@ class TeXUtil
@@shortcuts = Array.new
@@expansions = Array.new
@@reductions = Array.new
+ @@divisions = Array.new
def MyKeys::shortcuts
@@shortcuts
@@ -678,6 +744,9 @@ class TeXUtil
def MyKeys::reductions
@@reductions
end
+ def MyKeys::divisions
+ @@divisions
+ end
def MyKeys::reset(logger)
@@shortcuts = Array.new
@@ -692,6 +761,7 @@ class TeXUtil
when 's' then @@shortcuts.push(data)
when 'e' then @@expansions.push(data)
when 'r' then @@reductions.push(data)
+ when 'd' then @@divisions.push(data)
end
end
@@ -699,9 +769,10 @@ class TeXUtil
end
def MyKeys::processor(logger)
- logger.report("shortcuts: #{@@shortcuts.size}") # logger.report(@@shortcuts.inspect)
+ logger.report("shortcuts : #{@@shortcuts.size}") # logger.report(@@shortcuts.inspect)
logger.report("expansions: #{@@expansions.size}") # logger.report(@@expansions.inspect)
logger.report("reductions: #{@@reductions.size}") # logger.report(@@reductions.inspect)
+ logger.report("divisions : #{@@divisions.size}") # logger.report(@@divisions.inspect)
end
end
diff --git a/scripts/context/ruby/textools.rb b/scripts/context/ruby/textools.rb
index 50b72241a..bf0639328 100644
--- a/scripts/context/ruby/textools.rb
+++ b/scripts/context/ruby/textools.rb
@@ -727,10 +727,10 @@ class Commands
nocheck = @commandline.option('nocheck')
merge = @commandline.option('merge')
- prune = @commandline.option('prune')
+ delete = @commandline.option('delete')
force = @commandline.option('force')
- root = @commandline.argument('first')
- path = @commandline.argument('second')
+ root = @commandline.argument('first').gsub(/\\/,'/')
+ path = @commandline.argument('second').gsub(/\\/,'/')
if FileTest.directory?(root) then
report("scanning #{root}")
@@ -745,6 +745,12 @@ class Commands
report("no files")
return
end
+ rootfiles.collect! do |rf|
+ rf.gsub(/\\/o, '/').sub(/#{root}\//o, '')
+ end
+ rootfiles = rootfiles.delete_if do |rf|
+ FileTest.directory?(File.join(root,rf))
+ end
if FileTest.directory?(path) then
report("scanning #{path}")
@@ -759,83 +765,85 @@ class Commands
report("no files")
return
end
-
- roothash = Hash.new
- pathhash = Hash.new
-
- rootfiles.each do |f|
- if File.file?(f) then
- fd, fb = File.dirname(f), File.basename(f)
- roothash[fb] = if roothash.key?(fb) then nil else fd end
- end
+ pathfiles.collect! do |pf|
+ pf.gsub(/\\/o, '/').sub(/#{path}\//o, '')
end
-
- pathfiles.each do |f|
- if File.file?(f) then
- fd, fb = File.dirname(f), File.basename(f)
- pathhash[fb] = if pathhash.key?(fb) then nil else fd end
- end
+ pathfiles = pathfiles.delete_if do |pf|
+ FileTest.directory?(File.join(path,pf))
end
- donehash = Hash.new
- copied = Array.new
+ root = File.expand_path(root)
+ path = File.expand_path(path)
+
+ donepaths = Hash.new
+ copiedfiles = Hash.new
- pathhash.keys.each do |f|
- if pathhash[f] and roothash[f] then
- p = File.expand_path(File.join(pathhash[f],f)) # destination
- r = File.expand_path(File.join(roothash[f],f))
+ # update existing files, assume similar paths
+
+ report("")
+ pathfiles.each do |f| # destination
+ p = File.join(path,f)
+ if rootfiles.include?(f) then
+ r = File.join(root,f)
if p != r then
- if not FileTest.file?(p) then
- if merge then
- report("merging '#{r}' to '#{p}'")
- begin
- File.copy(r,p) if force
- copied << p
- rescue
- report("merging failed")
- else
- donehash[File.dirname(r)] = File.dirname(p)
- end
- else
- report("not merging '#{r}'")
- end
- elsif nocheck or File.mtime(p) < File.mtime(r) then
+ if nocheck or File.mtime(p) < File.mtime(r) then
+ copiedfiles[File.expand_path(p)] = true
report("updating '#{r}' to '#{p}'")
begin
+ begin File.makedirs(File.dirname(p)) if force ; rescue ; end
File.copy(r,p) if force
- copied << p
rescue
report("updating failed")
- else
- donehash[File.dirname(r)] = File.dirname(p)
end
else
report("not updating '#{r}'")
- report("old > #{File.mtime(p)}")
- report("new > #{File.mtime(r)}")
end
end
end
end
+ # merging non existing files
+
report("")
- donehash.keys.sort.each do |d|
- rootfiles = Dir.glob("#{d}/**/*")
- pathfiles = Dir.glob("#{donehash[d]}/**/*")
- pathfiles.collect! do |file| File.expand_path(file) end
- rootfiles.collect! do |file| File.expand_path(file) end
- difference = pathfiles - rootfiles - copied
- if difference.length > 0 then
- length = 0
- difference.each do |file|
- if l = File.basename(file).length and l > length then length = l end
+ rootfiles.each do |f|
+ donepaths[File.dirname(f)] = true
+ r = File.join(root,f)
+ if not pathfiles.include?(f) then
+ p = File.join(path,f)
+ if p != r then
+ if merge then
+ copiedfiles[File.expand_path(p)] = true
+ report("merging '#{r}' to '#{p}'")
+ begin
+ begin File.makedirs(File.dirname(p)) if force ; rescue ; end
+ File.copy(r,p) if force
+ rescue
+ report("merging failed")
+ end
+ else
+ report("not merging '#{r}'")
+ end
end
- report("")
- difference.sort.each do |file|
- if prune then
- report("deleting '#{file.ljust(length)}'")
+ end
+ end
+
+ # deleting obsolete files
+
+ report("")
+ donepaths.keys.sort.each do |d|
+ pathfiles = Dir.glob("#{path}/#{d}/**/*")
+ pathfiles.each do |p|
+ r = File.join(root,d,File.basename(p))
+ if FileTest.file?(p) and not FileTest.file?(r) and not copiedfiles.key?(File.expand_path(p)) then
+ if delete then
+ report("deleting '#{p}'")
+ begin
+ File.delete(p) if force
+ rescue
+ report("deleting failed")
+ end
else
- report("keeping '#{file.ljust(length)}'")
+ report("not deleting '#{p}'")
end
end
end
@@ -858,7 +866,7 @@ commandline.registeraction('fixafmfiles' , '[pattern] [--recurse]')
commandline.registeraction('mactodos' , '[pattern] [--recurse]')
commandline.registeraction('fixtexmftrees' , '[texmfroot] [--force]')
commandline.registeraction('replacefile' , 'filename [--force]')
-commandline.registeraction('updatetree' , 'fromroot toroot [--force --nocheck --merge --prune]')
+commandline.registeraction('updatetree' , 'fromroot toroot [--force --nocheck --merge --delete]')
commandline.registeraction('downcasefilenames', '[--recurse] [--force]') # not yet documented
commandline.registeraction('stripformfeeds' , '[--recurse] [--force]') # not yet documented
commandline.registeraction('showfont' , 'filename')
@@ -868,7 +876,8 @@ commandline.registeraction('version')
commandline.registerflag('recurse')
commandline.registerflag('force')
-commandline.registerflag('prune')
+commandline.registerflag('merge')
+commandline.registerflag('delete')
commandline.registerflag('nocheck')
commandline.expand
diff --git a/scripts/context/ruby/tmftools.rb b/scripts/context/ruby/tmftools.rb
new file mode 100644
index 000000000..305a52370
--- /dev/null
+++ b/scripts/context/ruby/tmftools.rb
@@ -0,0 +1,131 @@
+#!/usr/bin/env ruby
+
+# program : tmftools
+# copyright : PRAGMA Advanced Document Engineering
+# version : 2005
+# author : Hans Hagen
+#
+# project : ConTeXt
+# concept : Hans Hagen
+# info : j.hagen@xs4all.nl
+# www : www.pragma-ade.com
+
+# The script based alternative is not slower than the kpse one.
+# Loading is a bit faster when the log file is used.
+
+# tmftools [some of the kpsewhich switches]
+
+# tmftools --analyze
+# tmftools --analyze > kpsewhat.log
+# tmftools --analyze --strict > kpsewhat.log
+# tmftools --analyze --delete --force "texmf-local/fonts/.*/somename"
+
+# the real thing
+
+banner = ['TMFTools', 'version 1.0.0 (experimental, no help yet)', '2005', 'PRAGMA ADE/POD']
+
+unless defined? ownpath
+ ownpath = $0.sub(/[\\\/][a-z0-9\-]*?\.rb/i,'')
+ $: << ownpath
+end
+
+require 'base/switch'
+require 'base/logger'
+require 'base/kpsefast'
+
+class Commands
+
+ include CommandBase
+
+ def init_kpse
+ k = KPSEFAST.new
+ k.rootpath = @commandline.option('rootpath')
+ k.treepath = @commandline.option('treepath')
+ k.progname = @commandline.option('progname')
+ k.engine = @commandline.option('engine')
+ k.format = @commandline.option('format')
+ k.diskcache = @commandline.option('diskcache')
+ k.renewcache = @commandline.option('renewcache')
+ k.load_cnf
+ k.expand_variables
+ k.load_lsr
+ return k
+ end
+
+ def main
+ if option = @commandline.option('expand-braces') and not option.empty? then
+ puts init_kpse.expand_braces(option)
+ elsif option = @commandline.option('expand-path') and not option.empty? then
+ puts init_kpse.expand_path(option)
+ elsif option = @commandline.option('expand-var') and not option.empty? then
+ if option == '*' then
+ init_kpse.list_expansions()
+ else
+ puts init_kpse.expand_var(option)
+ end
+ elsif option = @commandline.option('show-path') and not option.empty? then
+ puts init_kpse.show_path(option)
+ elsif option = @commandline.option('var-value') and not option.empty? then
+ if option == '*' then
+ init_kpse.list_variables()
+ else
+ puts init_kpse.expand_var(option)
+ end
+ elsif @commandline.arguments.size > 0 then
+ kpse = init_kpse
+ @commandline.arguments.each do |option|
+ puts kpse.find_file(option)
+ end
+ else
+ help
+ end
+ end
+
+ def analyze
+ pattern = @commandline.argument('first')
+ strict = @commandline.option('strict')
+ sort = @commandline.option('sort')
+ delete = @commandline.option('delete') and @commandline.option('force')
+ init_kpse.analyze_files(pattern, strict, sort, delete)
+ end
+
+end
+
+logger = Logger.new(banner.shift)
+commandline = CommandLine.new
+
+# kpsewhich compatible options
+
+commandline.registervalue('expand-braces','')
+commandline.registervalue('expand-path','')
+commandline.registervalue('expand-var','')
+commandline.registervalue('show-path','')
+commandline.registervalue('var-value','')
+
+commandline.registervalue('engine','')
+commandline.registervalue('progname','')
+commandline.registervalue('format','')
+
+# additional goodies
+
+commandline.registervalue('rootpath','')
+commandline.registervalue('treepath','')
+commandline.registervalue('sort','')
+
+commandline.registerflag('diskcache')
+commandline.registerflag('renewcache')
+commandline.registerflag('strict')
+commandline.registerflag('delete')
+commandline.registerflag('force')
+
+commandline.registeraction('analyze')
+
+# general purpose options
+
+commandline.registerflag('verbose')
+commandline.registeraction('help')
+commandline.registeraction('version')
+
+commandline.expand
+
+Commands.new(commandline,logger,banner).send(commandline.action || 'main')
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index 9748afe02..285c01486 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -1637,9 +1637,9 @@
\fi\fi
\processaction
[\@@clstate]
- [\v!global=>\ifincolor\else\showmessage\m!colors1\colorstyle\fi
+ [ \v!global=>\ifincolor\else\showmessage\m!colors1\colorstyle\fi
\incolortrue\localcolorfalse,
- \v!local=>\ifincolor\else\showmessage\m!colors2\colorstyle\fi
+ \v!local=>\ifincolor\else\showmessage\m!colors2\colorstyle\fi
\incolortrue\localcolortrue,
\v!start=>\ifincolor\else\showmessage\m!colors1\colorstyle\fi
\incolortrue\localcolorfalse
@@ -1741,7 +1741,7 @@
\def\@@currentcolorname {\??cl\the\colorlevel C}
\def\@@currentcolorstop {\??cl\the\colorlevel S}
-\def\@@currenttransparent{\??cl\the\colorlevel T}
+%def\@@currenttransparent{\??cl\the\colorlevel T}
\def\currentcolor
{\csname
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 03099d451..c8c84b4c8 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -24,6 +24,9 @@
\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex}
+\def\headparameter#1% to do: everywhere in core-sec
+ {\csname\??ko\currenthead#1\endcsname}
+
% supp-fil.tex
% <?xml version='1.0' standalone='yes'?>
@@ -63,6 +66,8 @@
\chardef\preprocessmode\plusone
#1{#2}\donothing{\readfile{#2}\donothing\donothing}}
+\beginETEX
+
\let\oldfilename\empty
\let\newfilename\empty
@@ -107,6 +112,15 @@
\preprocessfile\inputfilename
\endinput
\normalinput\inputfilename\relax}}
+
+\endETEX
+
+\beginTEX
+
+\def\preprocessfile#1%
+ {\chardef\preprocessmode\zerocount}
+
+\endTEX
% The following may be a solution for the fact that one cannot
% change catcodes of characters like : and ; inside an environment.
@@ -2003,6 +2017,8 @@
\ifx\@@cl@@s\empty
\let\@@cl@@s\@@rsscreen
\fi
+ \let\@@cl@@t\@@cl@@z % else we get rogue
+ \let\@@cl@@a\@@cl@@z % transpancies
\setevalue{\??cr\??rs}{\colorSpattern}}
% beware, don't add extra grouping, else color in tables
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index c53968a45..43446058f 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -31,7 +31,7 @@
%D 2004.8.30 the low level interface is english. Watch out and adapt
%D your styles an modules.
-\def\contextversion{2005.08.03}
+\def\contextversion{2005.08.15}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type {tex -i} or \type {whatevertex} using
@@ -315,6 +315,8 @@
\input font-uni.tex
\input font-bfm.tex
+\input enco-pfr.tex % uses \everyfont
+
\input type-ini.tex
\input type-def.tex
@@ -341,6 +343,10 @@
\input lang-spa.tex
+%D Sorting:
+
+% not yet: \input sort-ini.tex
+
%D Only the basic XML parser and remapper are part of the core.
%D These macrosa re loaded last since they overload and|/|or
%D extend previously defined ones.
diff --git a/tex/context/base/core-fnt.tex b/tex/context/base/core-fnt.tex
index 99229b946..6a55849f4 100644
--- a/tex/context/base/core-fnt.tex
+++ b/tex/context/base/core-fnt.tex
@@ -246,12 +246,9 @@
\unexpanded\def\WORD#1%
{\bgroup
- \the\everyuppercase
\let\smallcapped\firstofoneargument
\let\WORD\firstofoneargument
- \uppercase{#1}% No expansion here, otherwise \getvalue problems!
- %\edef\next{#1}% keep this to prevent roll back
- %\uppercase\expandafter{\next}% keep this to prevent roll back
+ \douppercase{#1}%
\egroup}
\unexpanded\def\WORDS#1%
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index f36aa020e..ec196af1e 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -317,12 +317,22 @@
% \expandafter\dodosnaptogrid
% \fi}
+% \def\dosnaptogrid[#1]%
+% {\resetlastlinewidth % maybe in more places, otherwise spacing gets messed up
+% \ifgridsnapping
+% \iffirstargument\doifsomething{#1}{\moveongrid[#1]}\fi
+% \expandafter\dodosnaptogrid
+% \fi}
+
\def\dosnaptogrid[#1]%
{\resetlastlinewidth % maybe in more places, otherwise spacing gets messed up
- \ifgridsnapping
- \iffirstargument\doifsomething{#1}{\moveongrid[#1]}\fi
- \expandafter\dodosnaptogrid
- \fi}
+ \doifinsetelse\v!force{#1}%
+ {\moveongrid[#1]%
+ \dodosnaptogrid}
+ {\ifgridsnapping
+ \doifsomething{#1}{\moveongrid[#1]}%
+ \expandafter\dodosnaptogrid
+ \fi}}
% \def\forcedpresnapcorrection % test this on 'details'
% {\ifforcepresnap
@@ -793,13 +803,12 @@
\global\chardef\@@alignsnapdepth0
\def\@@unknowngriddisplacement
- {\global\chardef\@@alignsnapbox3
+ {\global\chardef\@@alignsnapbox\plusthree
\global\let\@@alignsnapamount\commalistelement}
\def\domoveongrid[#1]%
{\ifgridsnapping\doifsomething{#1}{\dodomoveongrid[#1]}\fi}
-
\def\dodomoveongrid[#1]% some day : speed up
{\global\chardef\@@alignsnap\zerocount
\global\chardef\@@alignsnapbox\zerocount
@@ -818,21 +827,22 @@
-\v!bottom=>\gridwarning-\negativeextrasnap\extrasnapafter,
-\v!both=>\negativeextrasnap\extrasnaparound,
\v!text=>\global\chardef\@@alignsnapmethod\plusone, % accurate calculations
- \v!page=>\global\chardef\@@alignsnap1, % topskip
- \v!high=>\global\chardef\@@alignsnap2,
- \v!middle=>\global\chardef\@@alignsnap3,
- \v!low=>\global\chardef\@@alignsnap4,
- \v!fit=>\global\chardef\@@alignsnapbox1, % new
- \v!broad=>\global\chardef\@@alignsnapbox2, % new
- \v!depth=>\global\chardef\@@alignsnapdepth1, % new
- \v!line=>\global\chardef\@@alignsnapbox3
-% \global\chardef\@@alignsnapdepth1
- \global\chardef\@@alignsnap4,
- \v!reset=>\positiveextrasnap\extrasnapreset,
- \v!none=>\global\chardef\@@alignsnap0
- \global\chardef\@@alignsnapbox0,
- \s!default=>,
- \s!unknown=>\@@unknowngriddisplacement]}
+ \v!page=>\global\chardef\@@alignsnap\plusone, % topskip
+ \v!high=>\global\chardef\@@alignsnap\plustwo,
+ \v!middle=>\global\chardef\@@alignsnap\plusthree,
+ \v!low=>\global\chardef\@@alignsnap\plusfour,
+ \v!fit=>\global\chardef\@@alignsnapbox\plusone, % new
+ \v!broad=>\global\chardef\@@alignsnapbox\plustwo, % new
+ \v!depth=>\global\chardef\@@alignsnapdepth\plusone, % new
+ \v!line=>\global\chardef\@@alignsnapbox\plusthree
+% \global\chardef\@@alignsnapdepth\plusone
+ \global\chardef\@@alignsnap\plusfour,
+ \v!reset=>\positiveextrasnap\extrasnapreset,
+ \v!none=>\global\chardef\@@alignsnap\zerocount
+ \global\chardef\@@alignsnapbox\zerocount,
+ \v!force=>, % turns on grid snapping even when not on
+ \s!default=>,
+ \s!unknown=>\@@unknowngriddisplacement]}
\def\moveongrid
{\dosingleempty\domoveongrid}
diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex
index 820789fd9..7aa6f18c2 100644
--- a/tex/context/base/core-lst.tex
+++ b/tex/context/base/core-lst.tex
@@ -212,6 +212,7 @@
\c!textcommand=\listtextcommand,
\c!pagecommand=\listpagecommand,
\c!pagenumber=\v!yes,
+\c!sectionnumber=\v!yes,
\c!pageboundaries=,
\c!margin=\!!zeropoint,
\c!aligntitle=,
@@ -236,6 +237,7 @@
\c!textstyle,\c!textcolor,\c!textcommand,
\c!pagestyle,\c!pagecommand,\c!pagecolor,
\c!numberstyle,\c!numbercolor,\c!numbercommand,
+\c!sectionnumber,
\c!pagenumber,\c!pageboundaries,\c!margin,\c!symbol,\c!limittext,
\c!aligntitle,\c!before,\c!after,\c!inbetween,\v!part\c!number,\c!label]%
\getparameters[\??li#1][#3]}}%
@@ -429,6 +431,27 @@
\setvalue{\@@dodolistelement\v!horizontal}{\def\dosomelistelement{\dodofreehlistelement}}
\setvalue{\@@dodolistelement\v!command }{\let\dosomelistelement\dodocommandlistelement}
+% \setuplist
+% [section]
+% [alternative=MyListItem,
+% after=\blank,
+% before=\blank]
+%
+% \definelistplacement[MyListItem][none]#1#2#3%
+% {(#1) (#2) (#3)}
+
+\def\definelistplacement
+ {\dodoubleempty\dodefinelistplacement}
+
+\def\dodefinelistplacement[#1][#2]%
+ {\setvalue{\@@dodolistelement#1}%
+ {\doifelsenothing{#2}
+ {\getvalue{\@@dodolistelement\v!command}}%
+ {\executeifdefined{\@@dodolistelement#2}
+ {\getvalue{\@@dodolistelement\v!command}}}%
+ \setvalue{\??li\currentlist\c!command}{\getvalue{\@@dodolistelement::#1}}}%
+ \setvalue{\@@dodolistelement::#1}}
+
% don't mess arround with endgraf/grouping else we loose leftskip
% \strippedcsname\dodolistelement
@@ -494,9 +517,12 @@
\vbox
{\forgetall
\makelistelement\v!all
- {\makelistelement\v!sectionnumber
- {\donestedlistattributes\c!numberstyle\c!numbercolor
- {\listparameter\c!numbercommand{\currentlistsymbol}}}%
+ {%
+\doif{\listparameter\c!sectionnumber}\v!yes
+ {\makelistelement\v!sectionnumber
+ {\donestedlistattributes\c!numberstyle\c!numbercolor
+ {\listparameter\c!numbercommand{\currentlistsymbol}}}%
+}%
\makelistelement\v!text
{\donestedlistattributes\c!textstyle\c!textcolor
{\let\\=\newlineinlist
@@ -559,15 +585,23 @@
% \dontleavehmode % new, else no margin, but wrong, better (else \indent as well):
\noindent
\makelistelement\v!all
- {\setlocalhsize \hsize\localhsize \hbox to \hsize
+ {\setlocalhsize
+ \hsize\localhsize
+ \hbox to \hsize
{\forgetall
\dostartlistattributes\c!style\c!color\empty
\!!widthb\hsize
+\doifelse{\listparameter\c!sectionnumber}\v!yes{%
\setbox2\hbox \ifdim\!!widtha>\zeropoint to \!!widtha \fi
{\makelistelement\v!sectionnumber
{\donestedlistattributes\c!numberstyle\c!numbercolor
{\listparameter\c!numbercommand{\currentlistsymbol}}%
\hfill}}%
+}{%
+ \!!widtha\zeropoint
+ \!!widthc\zeropoint
+ \setbox2\hbox{}%
+}
\setbox4\hbox
{\doif{\listparameter\c!pagenumber}\v!yes
{\doifsomething{#5} % \listwidth is new ; temp hack
@@ -676,6 +710,7 @@
{\listparameter\c!pagecommand
{\pageprefix\??li\currentlist[#5]%
\translatednumber[#5]}}}}}}%
+\doif{\listparameter\c!sectionnumber}\v!yes{%
\donetrue
\doifnothing{#3}{\doifnothing{\listparameter\c!symbol}\donefalse}%
% == \doifnothing{#3\listparameter\c!symbol}\donefalse
@@ -689,6 +724,7 @@
\hskip.5em}%
\nobreak
\fi
+}%
\tolerance3500 % niet zomaar veranderen
\donestedlistattributes\c!textstyle\c!textcolor
{\let\\=\newlineinlist
diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex
index 68a81d57d..080d5c31a 100644
--- a/tex/context/base/core-ntb.tex
+++ b/tex/context/base/core-ntb.tex
@@ -401,7 +401,6 @@
\def\bTABLE
{\dosingleempty\dobTABLE}
-
\def\dobTABLE[#1]%
{\pushTBL
% box not here
diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex
index 0fad94e5b..431cee6b9 100644
--- a/tex/context/base/core-reg.tex
+++ b/tex/context/base/core-reg.tex
@@ -410,7 +410,7 @@
\def\doregistercharacterA[#1]#2{\doregistercharactera[#1]{\WORD{#2}}}
\def\doregistercharacterB[#1]#2{\doregistercharacterb[#1]{\WORD{#2}}}
-%D Don't use \type{\string#2}; another hack isneeded, since
+%D Don't use \type{\string#2}; another hack is needed, since
%D \type {#2} can be \type {\string} itself.
\def\doregisterreference[#1]#2%
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index 74bb7814a..1d91e66e0 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -1079,6 +1079,10 @@
{\xdef\@@kolevel{\getvalue{\??se\@@sectie\c!level}}%
\nobreak}
+\def\localheadheight {\strutht}
+\def\localheaddepth {\strutdp}
+\def\localheadlineheight{\lineheight}
+
\def\dolocalheadsetup#1% koppeling met standaard kopcommando / engels
{\forgetall % traag dus ...
\doifvaluesomething{\??ko#1\c!align} % wordt al expanded in spa
@@ -1300,6 +1304,9 @@
\let\localkopprefix\empty
+% \def\headparameter#1% to do: everywhere in core-sec
+% {\csname\??ko\currenthead#1\endcsname}
+
\def\dodododosomekop#1[#2]#3#4% [ref] {number} {title}
{\def\currenthead{#1}% dus #1 overal vervangen
\let\finalsectionnumber\dofinalsectionnumber % overloaded ungrouped -)
@@ -1478,7 +1485,7 @@
\rawreference\s!sec{#2}{{#3}{\asciititle}}%
\dowritetolist\@@koppeling{#3}{#4}\v!head
\writesection{#1}{#3}{#4}%
- \else
+ \else % hm, also no own number
\rawreference\s!sec{#2}{{#3}{\asciititle}}%
\dowritetolist\@@koppeling{}{#4}\v!head
\writesection{#1}{-}{#4}%
@@ -1675,8 +1682,10 @@
\placeheadmargintexts{#1}% binnen #3?
\ifdisplaysectionhead
\getvalue{\??ko#1\c!textcommand}%
- {\setstrut\begstrut#3\endstrut}%
- \xdef\localheaddepth{\the\strutdp}%
+ {\setstrut\begstrut#3\endstrut}% can be nilled with \setnostrut
+ \xdef\localheadheight {\the\strutht}%
+ \xdef\localheaddepth {\the\strutdp}%
+ \xdef\localheadlineheight{\the\lineheight}%
% == \globallet\localheaddepth\strutdepth
\else
\getvalue{\??ko#1\c!textcommand}{#3}%
@@ -1714,7 +1723,7 @@
\placeheadmargintexts{#1}% binnen #3?
\ifdisplaysectionhead
\getvalue{\??ko#1\c!numbercommand}%
- {\setstrut\begstrut#3\endstrut}%
+ {\setstrut\begstrut#3\endstrut}% can be nilled with \setnostrut
\else
\getvalue{\??ko#1\c!numbercommand}{#3}%
\fi
@@ -1733,8 +1742,10 @@
\placeheadmargintexts{#1}% binnen #3?
\ifdisplaysectionhead
\getvalue{\??ko#1\c!textcommand}%
- {\setstrut\begstrut#4\endstrut}%
- \xdef\localheaddepth{\the\strutdp}%
+ {\setstrut\begstrut#4\endstrut}% can be nilled with \setnostrut
+ \xdef\localheadheight {\the\strutht}%
+ \xdef\localheaddepth {\the\strutdp}%
+ \xdef\localheadlineheight{\the\lineheight}%
% == \globallet\localheaddepth\strutdepth
\else
\getvalue{\??ko#1\c!textcommand}{#4}%
@@ -1753,7 +1764,9 @@
{\bgroup
\setsystemmode{#1}% to be documented
\ifgridsnapping\iftracegridsnapping\showstruts\fi\fi
- \gdef\localheaddepth{\strutdp}%
+ \xdef\localheadheight {\the\strutht}%
+ \xdef\localheaddepth {\the\strutdp}%
+ \xdef\localheadlineheight{\the\lineheight}%
% == \globallet\localheaddepth\strutdp
\everypar\emptytoks % needed indeed
\noindent % ipv \whitespace elders, na \forgetall !
@@ -1779,13 +1792,125 @@
\def\localheadsetup{\dolocalheadsetup{#1}}%
\startsynchronization}
+% \def\endheadplacement#1#2%
+% {\doifelsevalue{\??rf#1\c!state}\v!start
+% {\doifvaluenothing{\??ko#1\c!file}{\autocrossdocumentfalse}}
+% {\autocrossdocumentfalse}%
+% % no message needed here, should be a proper switch
+% % \let\unknownreference\gobbleoneargument
+% \ifdisplaysectionhead
+% \let\headlastlinewidth\!!zeropoint
+% \snaptogrid[\getvalue{\??ko#1\c!grid}]\hbox
+% {\hskip\localheadskip
+% \hskip\getvalue{\??ko#1\c!margin}\relax
+% \iflocation
+% \ifautocrossdocument
+% \doifreferencefoundelse{\getvalue{\??ko#1\c!file}::#1}
+% {\edef\currentinnerreference{\s!aut:\currenttextreference}% stored in
+% \gotoouterlocation{}{\box0}} % text slot
+% {\hbox{\box0}}%
+% \else
+% \hbox{\box0}%
+% \fi
+% \else
+% \hbox{\box0}%
+% \fi}%
+% \doflushnotes % new, not really needed
+% \endgraf
+% \nointerlineskip
+% \dosomebreak\nobreak
+% #2%
+% \else
+% \strut
+% \doflushnotes % new, here since we're in par mode
+% \iflocation
+% \ifautocrossdocument
+% \hhboxindent=\ifcontinuoushead\headlastlinewidth\else\zeropoint\fi
+% \unhhbox0\with{\gotobox{\box\hhbox}[\getvalue{\??ko#1\c!file}::#1]}%
+% \advance\lasthhboxwidth by \numberheaddistance
+% \xdef\headlastlinewidth{\the\lasthhboxwidth}%
+% \else
+% \unhbox0
+% \globallet\headlastlinewidth\!!zeropoint
+% \fi
+% \else
+% \unhbox0
+% \globallet\headlastlinewidth\!!zeropoint
+% \fi
+% #2%
+% \dimen0=\numberheaddistance
+% \hskip\dimen0 \!!plus \dimen0 \!!minus .25\dimen0
+% \hskip\headsignal\ignorespaces
+% \fi
+% \ifdisplaysectionhead \ifvmode
+% \ifgridsnapping % important, font related depth, see comment
+% \prevdepth\strutdp
+% \else
+% \prevdepth\localheaddepth
+% \fi
+% \fi \fi
+% \stopsynchronization
+% \egroup
+% \egroup
+% \ifdisplaysectionhead
+% \dochecknextindentation{\??ko#1}%
+% \else
+% \nonoindentation % recently added, was a bug
+% \fi}
+
+% \setuphead[chapter] [style=\bfd,after=,hang=line] % fit broad 2
+% \setuphead[section] [style=\bfc,after=,hang=line]
+% \setuphead[subsection] [style=\bfb,after=,hang=line]
+% \setuphead[subsubsection] [style=\bfa,after=,hang=line]
+% \setuphead[subsubsubsection][style=\bf ,after=,hang=line]
+%
+% \chapter {Test} \input tufte \page
+% \section {Test} \input tufte \page
+% \subsection {Test} \input tufte \page
+% \subsubsection {Test} \input tufte \page
+% \subsubsubsection{Test} \input tufte \page
+%
+% \chapter {Test\\Test} \input tufte \page
+% \section {Test\\Test} \input tufte \page
+% \subsection {Test\\Test} \input tufte \page
+% \subsubsection {Test\\Test} \input tufte \page
+% \subsubsubsection{Test\\Test} \input tufte \page
+
+\def\hangheadplacement
+ {\scratchdimen\localheadlineheight
+ \bgroup
+ \openlineheight\scratchdimen
+ \scratchdimen\ht0
+ \advance\scratchdimen\dp0
+ \getnoflines\scratchdimen
+ \advance\noflines\minusone
+ \expanded{\egroup\noflines\the\noflines}% brrr
+ \setbox0\hbox{\lower\noflines\scratchdimen\box0}%
+ \scratchdimen\ht0
+ \advance\scratchdimen\dp0
+ \advance\scratchdimen-\localheadheight
+ \advance\scratchdimen+\strutdp
+ \ht0 \strutht
+ \dp0 \strutdp
+ \edef\localheaddepth{\the\strutdp}}
+
\def\endheadplacement#1#2%
{\doifelsevalue{\??rf#1\c!state}\v!start
{\doifvaluenothing{\??ko#1\c!file}{\autocrossdocumentfalse}}
{\autocrossdocumentfalse}%
% no message needed here, should be a proper switch
- % \let\unknownreference\gobbleoneargument
+\noflines\zerocount
\ifdisplaysectionhead
+% new
+\processaction
+ [\getvalue{\??ko#1\c!hang}]
+ [ \v!line=>\hangheadplacement\noflines\zerocount,
+ \v!broad=>\hangheadplacement\getnoflines\scratchdimen,
+ \v!fit=>\hangheadplacement\getrawnoflines\scratchdimen,
+ \v!none=>\noflines\zerocount,
+ \v!default=>\noflines\zerocount,
+ \v!unknown=>\hangheadplacement\noflines0\commalistelement\advance\noflines\minusone]%
+% so far
\let\headlastlinewidth\!!zeropoint
\snaptogrid[\getvalue{\??ko#1\c!grid}]\hbox
{\hskip\localheadskip
@@ -1804,6 +1929,9 @@
\fi}%
\doflushnotes % new, not really needed
\endgraf
+\ifnum\noflines>\zerocount
+ \dorecurse\noflines{\nointerlineskip\dosomebreak\nobreak\strut\endgraf}%
+\fi
\nointerlineskip
\dosomebreak\nobreak
#2%
@@ -2039,6 +2167,7 @@
\c!aligntitle=\@@koaligntitle,
\c!tolerance=\@@kotolerance,
\c!indentnext=\@@koindentnext,
+ \c!hang=\@@kohang,
\c!file=,
\c!expansion=,
\c!grid=,
@@ -2056,7 +2185,7 @@
% new per 20/03/3002 (o-pbu-l) / was too confusing
% \c!numberstyle,\c!textstyle,\c!expansion,
% again too confusing
- \c!align,\c!aligntitle,\c!tolerance,\c!grid,
+ \c!align,\c!aligntitle,\c!tolerance,\c!grid,\c!hang,
\c!numbercommand,\c!textcommand,\c!margintext,\c!margin]}}%
\getparameters[\??ko#1][#2]%
\doifsomething{\getvalue{\??ko#1\c!section}}
@@ -2082,7 +2211,7 @@
% new per 20/03/3002 (o-pbu-l) / was too confusing
% \c!numberstyle,\c!textstyle,\c!expansion,
% again too confusing
- \c!align,\c!aligntitle,\c!tolerance,\c!grid,
+ \c!align,\c!aligntitle,\c!tolerance,\c!grid,\c!hang,
\c!numbercommand,\c!textcommand,\c!margintext,\c!margin]%
\getparameters[\??ko#1][\c!expansion=]% iig een value, rather fuzzy
\definemarking[#1][#2]%
@@ -2144,6 +2273,7 @@
\c!tolerance=,
\c!indentnext=\v!no,
\c!margin=\zeropoint,
+ \c!hang=\v!none,
\c!command=]
\definesectionblock [\v!frontpart] [\v!frontmatter] [\c!number=\v!no]
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index c96405246..db13c4992 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -2019,6 +2019,25 @@
\let\restoreinterlinespace\relax
+\beginTEX
+
+\def\saveinterlinespace
+ {\scratchdimen\normallineheight
+ \edef\restoreinterlinespace
+ {\lineheight \the\lineheight
+ \openstrutheight \the\openstrutheight
+ \openstrutdepth \the\openstrutdepth
+ \openlineheight \the\openlineheight
+ \normalbaselineskip \the\normalbaselineskip
+ \normallineskip \the\normallineskip
+ \normallineskiplimit\the\normallineskiplimit
+ \noexpand\def\noexpand\normallineheight{\the\scratchdimen}%
+ \noexpand\normalbaselines}}
+
+\endTEX
+
+\beginETEX
+
\def\saveinterlinespace
{\edef\restoreinterlinespace
{\lineheight \the\lineheight
@@ -2031,6 +2050,8 @@
\noexpand\def\noexpand\normallineheight{\the\dimexpr\normallineheight\relax}%
\noexpand\normalbaselines}}
+\endETEX
+
% plain definition:
%
% \def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex
index 6bd7df7bf..282f33b3e 100644
--- a/tex/context/base/enco-ans.tex
+++ b/tex/context/base/enco-ans.tex
@@ -17,40 +17,19 @@
\startmapping[texnansi]
-\definecasemap 231 231 199 \definecasemap 199 231 199
-
-\definecasemap 228 228 196 \definecasemap 196 228 196
-\definecasemap 235 235 203 \definecasemap 203 235 203
-\definecasemap 239 239 207 \definecasemap 207 239 207
-\definecasemap 246 246 214 \definecasemap 214 246 214
-\definecasemap 252 252 220 \definecasemap 220 252 220
-\definecasemap 255 255 159 \definecasemap 159 255 159
-
-\definecasemap 225 225 193 \definecasemap 193 225 193
-\definecasemap 233 233 201 \definecasemap 201 233 201
-\definecasemap 237 237 205 \definecasemap 205 237 205
-\definecasemap 243 243 211 \definecasemap 211 243 211
-\definecasemap 250 250 218 \definecasemap 218 250 218
-\definecasemap 253 253 221 \definecasemap 221 253 221
-
-\definecasemap 224 224 192 \definecasemap 192 224 192
-\definecasemap 232 232 200 \definecasemap 200 232 200
-\definecasemap 236 236 204 \definecasemap 204 236 204
-\definecasemap 242 242 210 \definecasemap 210 242 210
-\definecasemap 249 249 217 \definecasemap 217 249 217
-
-\definecasemap 226 226 194 \definecasemap 194 226 194
-\definecasemap 234 234 202 \definecasemap 202 234 202
-\definecasemap 238 238 206 \definecasemap 206 238 206
-\definecasemap 244 244 212 \definecasemap 212 244 212
-\definecasemap 251 251 219 \definecasemap 219 251 219
-
-\definecasemap 227 227 195 \definecasemap 195 227 195
-\definecasemap 241 241 209 \definecasemap 209 241 209
-\definecasemap 245 245 213 \definecasemap 213 245 213
-
-\definecasemap 240 240 208 \definecasemap 208 240 208
-\definecasemap 254 254 222 \definecasemap 222 254 222
+\resetcaserange 128 to 158
+\resetcaserange 160 to 191
+\resetcaserange 215 to 215
+\resetcaserange 247 to 247
+
+\definecasemaps 192 to 214 lc +32 uc 0
+\definecasemaps 224 to 246 lc 0 uc -32
+\definecasemaps 216 to 222 lc +32 uc 0
+\definecasemaps 248 to 254 lc 0 uc -32
+
+\definecaseself 223
+\definecaseswap 156 140
+\definecaseswap 255 159
% needed by some patterns:
@@ -63,8 +42,6 @@
% \definecaseself 145 % quoteleft
% \definecaseself 146 % quoteright
-\definecaseself 223
-
\stopmapping
\startencoding[texnansi]
diff --git a/tex/context/base/enco-ec.tex b/tex/context/base/enco-ec.tex
index 78b5212f6..58ccd0400 100644
--- a/tex/context/base/enco-ec.tex
+++ b/tex/context/base/enco-ec.tex
@@ -23,27 +23,24 @@
\startmapping[ec]
-%D The case mappings are fairly simple.
+\resetcaserange 141 to 141
+\resetcaserange 149 to 149
+\definecasemap 159 to 159
+\resetcaserange 173 to 173
+\resetcaserange 180 to 181
+\resetcaserange 184 to 184
+\resetcaserange 189 to 191
-%\definecasemaps 128 to 156 lc 0 uc 0
+\definecasemap 157 `i 157
+\definecasemap 158 158 `D
-%D 157 Idotaccent
-%D 158 dcroat (with bar)
-%D 159 sectionmark
+\definecasemaps 128 to 156 lc +32 uc 0
+\definecasemaps 160 to 188 lc 0 uc -32
-\definecasemaps 160 to 188 lc +32 uc 0
+\definecasemaps 192 to 222 lc +32 uc 0
+\definecasemaps 224 to 254 lc 0 uc -32
-%D 189 exclamdown
-%D 190 questiondown
-%D 191 sterling pound
-
-\definecasemaps 192 to 255 lc 0 uc -32
-
-%D Less systematic (probably incomplete)
-
-\definecasemap 187 187 155 % z dotaccent
-\definecasemap 155 187 155 % Z dotaccent
-\definecasemap 158 158 68 % dmacron
+\definecaseswap 255 223
%D Some languages need this:
diff --git a/tex/context/base/enco-il2.tex b/tex/context/base/enco-il2.tex
index f5a118845..6f1ce351f 100644
--- a/tex/context/base/enco-il2.tex
+++ b/tex/context/base/enco-il2.tex
@@ -17,30 +17,31 @@
\startmapping[il2]
-\definecasemap 127 to 255 % we map them all to themselves
-
-\definecasemap 165 181 165 \definecasemap 169 185 169
-\definecasemap 171 187 171 \definecasemap 174 190 174
-\definecasemap 181 181 165 \definecasemap 185 185 169
-\definecasemap 187 187 171 \definecasemap 190 190 174
-\definecasemap 192 224 192 \definecasemap 193 225 193
-\definecasemap 196 228 196 \definecasemap 197 229 197
-\definecasemap 200 232 200 \definecasemap 201 233 201
-\definecasemap 204 236 204 \definecasemap 205 237 205
-\definecasemap 207 239 207 \definecasemap 210 242 210
-\definecasemap 211 243 211 \definecasemap 212 244 212
-\definecasemap 214 246 214 \definecasemap 216 248 216
-\definecasemap 217 249 217 \definecasemap 218 250 218
-\definecasemap 220 252 220 \definecasemap 221 253 221
-\definecasemap 224 224 192 \definecasemap 225 225 193
-\definecasemap 228 228 196 \definecasemap 229 229 197
-\definecasemap 232 232 200 \definecasemap 233 233 201
-\definecasemap 236 236 204 \definecasemap 237 237 205
-\definecasemap 239 239 207 \definecasemap 242 242 210
-\definecasemap 243 243 211 \definecasemap 244 244 212
-\definecasemap 246 246 214 \definecasemap 248 248 216
-\definecasemap 249 249 217 \definecasemap 250 250 218
-\definecasemap 252 252 220 \definecasemap 253 253 221
+\resetcaserange 127 to 255 % we map them all to themselves
+
+\definecaseswap 184 152
+\definecaseswap 181 165
+\definecaseswap 185 169
+\definecaseswap 187 171
+\definecaseswap 190 174
+\definecaseswap 224 192
+\definecaseswap 225 193
+\definecaseswap 228 196
+\definecaseswap 229 197
+\definecaseswap 232 200
+\definecaseswap 233 201
+\definecaseswap 236 204
+\definecaseswap 237 205
+\definecaseswap 239 207
+\definecaseswap 242 210
+\definecaseswap 243 211
+\definecaseswap 244 212
+\definecaseswap 246 214
+\definecaseswap 248 216
+\definecaseswap 249 217
+\definecaseswap 250 218
+\definecaseswap 252 220
+\definecaseswap 253 221
\stopmapping
diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex
index 1fe8a8503..c1120a508 100644
--- a/tex/context/base/enco-ini.tex
+++ b/tex/context/base/enco-ini.tex
@@ -120,6 +120,7 @@
\def\@map@{@m@ap@} % mapping prefix
\def\@reg@{@r@eg@} % regime prefix
\def\@fha@{@f@ha@} % font prefix
+\def\@cas@{@c@as@} % casecom prefix
\ifx\currentlanguage\undefined \let\currentlanguage\s!en \fi
@@ -411,17 +412,72 @@
% quite slow, esp when done at runtime
-\def\startmapping[#1]%
- {\pushmacro\charactermapping
+% \def\startmapping[#1]%
+% {\pushmacro\charactermapping
+% \edef\charactermapping{@#1@}%
+% \ifundefined{\@map@\charactermapping}%
+% \expandafter\newtoks\csname\@map@\charactermapping\endcsname
+% \fi}
+
+% \def\stopmapping
+% {%\setmappingtoks\showthe\mappingtoks
+% \popmacro\charactermapping}
+
+\def\startsavingmappingtoks#1%
+ {\bgroup
\edef\charactermapping{@#1@}%
- \doifundefined{\@map@\charactermapping}
- {\expanded{\newtoks\csname\@map@\charactermapping\endcsname}}}
+ \checkmappingtoks
+ \setmappingtoks
+ \the\mappingtoks}
+
+\def\stopsavingmappingtoks
+ {\global\mappingtoks\emptytoks
+ \dostepwiserecurse{128}{255}\plusone
+ {\edef\@@expanded
+ {\the\mappingtoks
+ \noexpand\checkregimecode\recurselevel\space
+ \lccode\recurselevel\ifnum\lccode\recurselevel=\zerocount\zerocount\else\space\the\lccode\recurselevel\space\fi
+ \uccode\recurselevel\ifnum\uccode\recurselevel=\zerocount\zerocount\else\space\the\uccode\recurselevel\space\fi
+ \ifnum\sfcode\recurselevel=\plusthousand\else\sfcode\recurselevel=\the\sfcode\recurselevel\space\fi
+ }%
+ \global\mappingtoks\expandafter{\@@expanded}}%
+ \egroup
+ \let\enabledmapping\empty
+ \enablemapping[\currentmapping]}
+
+\def\startmapping[#1]%
+ {\startsavingmappingtoks{#1}}
\def\stopmapping
- {\popmacro\charactermapping}
+ {\stopsavingmappingtoks}
+
+\def\optimizemapping[#1]%
+ {\startsavingmappingtoks{#1}%
+ % nothing, just an automatic cleanup
+ \stopsavingmappingtoks
+ % we need to resync
+ %\let\enabledmapping\relax
+ }%\enablemapping[\currentmapping]}
\def\setmappingtoks
- {\@EA\let\@EA\mappingtoks\csname\@map@\charactermapping\endcsname}
+ {\@EA\let\@EA\mappingtoks\csname\@map@\charactermapping\endcsname
+ \@EA\let\@EA\casecomtoks\csname\@cas@\charactermapping\endcsname}
+
+\def\checkmappingtoks
+ {\ifundefined{\@map@\charactermapping}%
+ \expandafter\newtoks\csname\@map@\charactermapping\endcsname
+ \fi
+ \ifundefined{\@cas@\charactermapping}%
+ \expandafter\newtoks\csname\@cas@\charactermapping\endcsname
+ \fi}
+
+\def\checkregimecode#1 %
+ {\ifprotectregime\ifnum\catcode#1=\active\else
+ \catcode#1\@@letter
+ \fi\else
+ \catcode#1\@@letter
+ \fi
+ \relax}
% \def\definecasemap #1 #2 #3 % code lower upper
% {\setmappingtoks
@@ -432,65 +488,95 @@
%
% faster
+% \def\definecasemap #1 #2 #3 % code lower upper
+% {\setmappingtoks
+% \doifelse{#2}{to}
+% {\mappingtoks\@EA{\the\mappingtoks\presetcaserange{#1}{#3}}}
+% {\mappingtoks\@EA{\the\mappingtoks\setcasemap #1 #2 #3 }}%
+% \ignorespaces}
+
\def\definecasemap #1 #2 #3 % code lower upper
- {\setmappingtoks
- \doifelse{#2}{to}
- {\mappingtoks\@EA{\the\mappingtoks\presetcaserange{#1}{#3}}}
- {\mappingtoks\@EA{\the\mappingtoks\setcasemap #1 #2 #3 }}%
+ {\doifelse{#2}{to}
+ {\presetcaserange{#1}{#3}}
+ {\lccode#1=#2\relax
+ \uccode#1=#3\relax}%
\ignorespaces}
%D Saves a few tokens
-\def\definecaseself #1 % lower=upper=self
- {\setmappingtoks
- \mappingtoks\@EA{\the\mappingtoks\setcaseself #1 }%
+% \def\definecaseswap #1 #2 % lower upper
+% {\setmappingtoks
+% \mappingtoks\@EA{\the\mappingtoks\setcaseswap #1 #2 }%
+% \ignorespaces}
+
+\def\definecaseswap #1 #2 % lower upper
+ {\lccode#1=#1\relax
+ \uccode#2=#2\relax
+ \lccode#2=#1\relax
+ \uccode#1=#2\relax
\ignorespaces}
-%D Watch the \type {\definecasemap 127 to 255} option!
-%D Dedicated to Taco there is also:
+% \def\definecaseself #1 % lower=upper=self
+% {\setmappingtoks
+% \mappingtoks\@EA{\the\mappingtoks\setcaseself #1 }%
+% \ignorespaces}
-\def\definecasemaps #1 to #2 lc #3 uc #4 % from to lc+ uc+
- {\dostepwiserecurse{#1}{#2}\plusone
- {\!!counta\recurselevel\advance\!!counta #3\relax
- \!!countb\recurselevel\advance\!!countb #4\relax
- \expanded{\definecasemap
- \recurselevel\space\the\!!counta\space\the\!!countb\space}}%
+\def\definecaseself #1 % lower=upper=self
+ {\lccode #1=#1\relax
+ \uccode #1=#1\relax
\ignorespaces}
-\beginETEX
-
- % much faster, prelude to run time loading
+%D Watch the \type {\definecasemap 127 to 255} option!
+%D Dedicated to Taco there is also:
- % \def\doexpandcasemaps#1#2#3#4%
- % {\ifnum#1>#2 %
- % \expandafter\gobblefivearguments
- % \else
- % \noexpand\setcasemap#1\space\the\numexpr#1+#3\relax\space\the\numexpr#1+#4\relax\space
- % \expandafter\expandafter\expandafter\doexpandcasemaps\expandafter
- % \fi\expandafter{\the\numexpr#1+1\relax}{#2}{#3}{#4}}
- %
- % \def\definecasemaps #1 to #2 lc #3 uc #4 % from to lc+ uc+
- % {\setmappingtoks
- % \expanded{\mappingtoks{\the\mappingtoks\doexpandcasemaps{#1}{#2}{#3}{#4}}}%
- % \ignorespaces}
+% \def\definecasemaps #1 to #2 lc #3 uc #4 % from to lc+ uc+
+% {\dostepwiserecurse{#1}{#2}\plusone
+% {\!!counta\recurselevel\advance\!!counta #3\relax
+% \!!countb\recurselevel\advance\!!countb #4\relax
+% \expanded{\definecasemap
+% \recurselevel\space\the\!!counta\space\the\!!countb\space}}%
+% \ignorespaces}
- \def\doexpandcasemaps#1%
- {\ifnum#1>\scratchcounter
- \expandafter\gobbletwoarguments
- \else
- \noexpand\setcasemap#1\space\the\numexpr#1+\!!counta\relax\space\the\numexpr#1+\!!countb\relax\space
- \expandafter\expandafter\expandafter\doexpandcasemaps\expandafter
- \fi\expandafter{\the\numexpr#1+\plusone\relax}}
+% \beginETEX
+
+% % much faster, prelude to run time loading
+
+% % \def\doexpandcasemaps#1#2#3#4%
+% % {\ifnum#1>#2 %
+% % \expandafter\gobblefivearguments
+% % \else
+% % \noexpand\setcasemap#1\space\the\numexpr#1+#3\relax\space\the\numexpr#1+#4\relax\space
+% % \expandafter\expandafter\expandafter\doexpandcasemaps\expandafter
+% % \fi\expandafter{\the\numexpr#1+1\relax}{#2}{#3}{#4}}
+% %
+% % \def\definecasemaps #1 to #2 lc #3 uc #4 % from to lc+ uc+
+% % {\setmappingtoks
+% % \expanded{\mappingtoks{\the\mappingtoks\doexpandcasemaps{#1}{#2}{#3}{#4}}}%
+% % \ignorespaces}
+
+% \def\doexpandcasemaps#1%
+% {\ifnum#1>\scratchcounter
+% \expandafter\gobbletwoarguments
+% \else
+% \noexpand\setcasemap#1\space\the\numexpr#1+\!!counta\relax\space\the\numexpr#1+\!!countb\relax\space
+% \expandafter\expandafter\expandafter\doexpandcasemaps\expandafter
+% \fi\expandafter{\the\numexpr#1+\plusone\relax}}
+
+% \def\definecasemaps #1 to #2 lc #3 uc #4 % from to lc+ uc+
+% {\setmappingtoks
+% \scratchcounter#2\relax
+% \!!counta#3\relax
+% \!!countb#4\relax
+% \expanded{\mappingtoks{\the\mappingtoks\doexpandcasemaps{#1}}}%
+% \ignorespaces}
- \def\definecasemaps #1 to #2 lc #3 uc #4 % from to lc+ uc+
- {\setmappingtoks
- \scratchcounter#2\relax
- \!!counta#3\relax
- \!!countb#4\relax
- \expanded{\mappingtoks{\the\mappingtoks\doexpandcasemaps{#1}}}%
- \ignorespaces}
+% \endETEX
-\endETEX
+\def\definecasemaps #1 to #2 lc #3 uc #4 % from to lc+ uc+
+ {\dostepwiserecurse{#1}{#2}\plusone
+ {\scratchcounter\recurselevel\advance\scratchcounter#3\lccode\recurselevel=\scratchcounter
+ \scratchcounter\recurselevel\advance\scratchcounter#4\uccode\recurselevel=\scratchcounter}%
+ \ignorespaces}
%D This can be used like:
%D
@@ -516,57 +602,77 @@
%
% faster:
-\def\resetcaserange #1 to #2
- {\setmappingtoks
- \dostepwiserecurse{#1}{#2}\plusone
- {\edef\@@expanded{\recurselevel\space}%
- \mappingtoks\@EA\@EA\@EA{\@EA\the\@EA\mappingtoks\@EA\setcasemap\@@expanded 0 0 }}%
- \ignorespaces}
-
-\beginETEX
+% \def\resetcaserange #1 to #2
+% {\setmappingtoks
+% \dostepwiserecurse{#1}{#2}\plusone
+% {\edef\@@expanded{\recurselevel\space}%
+% \mappingtoks\@EA\@EA\@EA{\@EA\the\@EA\mappingtoks\@EA\setcasemap\@@expanded 0 0 }}%
+% \ignorespaces}
- % much faster, prelude to run time loading
+% \beginETEX
+
+% % much faster, prelude to run time loading
+
+% % \def\doexpandcaserange#1#2%
+% % {\ifnum#1>#2 %
+% % \expandafter\gobblethreearguments
+% % \else
+% % \noexpand\setcasemap #1 0 0 %
+% % \expandafter\expandafter\expandafter\doexpandcaserange\expandafter
+% % \fi\expandafter{\the\numexpr#1+1\relax}{#2}}
+% %
+% % \def\resetcaserange #1 to #2
+% % {\setmappingtoks
+% % \expanded{\mappingtoks{\the\mappingtoks\doexpandcaserange{#1}{#2}}}%
+% % \ignorespaces}
+
+% \def\doexpandcaserange#1%
+% {\ifnum#1>\scratchcounter
+% \expandafter\gobbletwoarguments
+% \else
+% \noexpand\setcasemap #1 0 0 %
+% \expandafter\expandafter\expandafter\doexpandcaserange\expandafter
+% \fi\expandafter{\the\numexpr#1+\plusone\relax}}
- % \def\doexpandcaserange#1#2%
- % {\ifnum#1>#2 %
- % \expandafter\gobblethreearguments
- % \else
- % \noexpand\setcasemap #1 0 0 %
- % \expandafter\expandafter\expandafter\doexpandcaserange\expandafter
- % \fi\expandafter{\the\numexpr#1+1\relax}{#2}}
- %
- % \def\resetcaserange #1 to #2
- % {\setmappingtoks
- % \expanded{\mappingtoks{\the\mappingtoks\doexpandcaserange{#1}{#2}}}%
- % \ignorespaces}
+% \def\resetcaserange #1 to #2
+% {\setmappingtoks
+% \scratchcounter#2\relax
+% \expanded{\mappingtoks{\the\mappingtoks\doexpandcaserange{#1}}}%
+% \ignorespaces}
- \def\doexpandcaserange#1%
- {\ifnum#1>\scratchcounter
- \expandafter\gobbletwoarguments
- \else
- \noexpand\setcasemap #1 0 0 %
- \expandafter\expandafter\expandafter\doexpandcaserange\expandafter
- \fi\expandafter{\the\numexpr#1+\plusone\relax}}
+% \endETEX
- \def\resetcaserange #1 to #2
- {\setmappingtoks
- \scratchcounter#2\relax
- \expanded{\mappingtoks{\the\mappingtoks\doexpandcaserange{#1}}}%
- \ignorespaces}
+\def\resetcaserange #1 to #2
+ {\dostepwiserecurse{#1}{#2}\plusone
+ {\lccode\recurselevel\zerocount
+ \uccode\recurselevel\zerocount}%
+ \ignorespaces}
-\endETEX
+% \def\presetcaserange#1#2% could be pre-expanded
+% {\dostepwiserecurse{#1}{#2}\plusone
+% {\setregimecode\recurselevel\@@letter
+% \lccode \recurselevel=\recurselevel
+% \uccode \recurselevel=\recurselevel}}
\def\presetcaserange#1#2% could be pre-expanded
{\dostepwiserecurse{#1}{#2}\plusone
- {\setregimecode\recurselevel\@@letter
- \lccode \recurselevel=\recurselevel
- \uccode \recurselevel=\recurselevel}}
+ {\lccode\recurselevel=\recurselevel
+ \uccode\recurselevel=\recurselevel}%
+ \ignorespaces}
\def\setcasemap #1 #2 #3 %
{\setregimecode{#1}\@@letter
\lccode #1=#2
\uccode #1=#3 }
+\def\setcaseswap #1 #2 %
+ {\setregimecode{#1}\@@letter
+ \setregimecode{#2}\@@letter
+ \lccode #1=#1
+ \uccode #2=#2
+ \lccode #2=#1
+ \uccode #1=#2 }
+
\def\setcaseself #1 %
{\setregimecode{#1}\@@letter
\lccode #1=#1
@@ -576,12 +682,16 @@
% {\setmappingtoks
% \appendtoks\setspacemap #1 #2 \to\mappingtoks
% \ignorespaces}
-%
+
% faster:
+% \def\definespacemap #1 #2 % code sfcode
+% {\setmappingtoks
+% \mappingtoks\expandafter{\the\mappingtoks\setspacemap #1 #2 }%
+% \ignorespaces}
+
\def\definespacemap #1 #2 % code sfcode
- {\setmappingtoks
- \mappingtoks\expandafter{\the\mappingtoks\setspacemap #1 #2 }%
+ {\sfcode#1=#2%
\ignorespaces}
\def\setspacemap #1 #2 %
@@ -602,14 +712,32 @@
%
% faster
+% \def\defineuppercasecom#1#2%
+% {\setmappingtoks
+% \mappingtoks\expandafter{\the\mappingtoks\setuppercasecom#1{#2}}%
+% \ignorespaces}
+
+% \def\definelowercasecom#1#2%
+% {\setmappingtoks
+% \mappingtoks\expandafter{\the\mappingtoks\setlowercasecom#1{#2}}%
+% \ignorespaces}
+
+% \def\defineuppercasecom#1#2%
+% {\setmappingtoks
+% \mappingtoks\expandafter{\the\mappingtoks\setuppercasecom#1{#2}}%
+% \ignorespaces}
+
+% \def\definelowercasecom#1#2%
+% {\setmappingtoks
+% \mappingtoks\expandafter{\the\mappingtoks\setlowercasecom#1{#2}}%
+% \ignorespaces}
+
\def\defineuppercasecom#1#2%
- {\setmappingtoks
- \expandafter\mappingtoks{\the\mappingtoks\setuppercasecom#1{#2}}%
+ {\global\casecomtoks\expandafter{\the\casecomtoks\setuppercasecom#1{#2}}%
\ignorespaces}
\def\definelowercasecom#1#2%
- {\setmappingtoks
- \expandafter\mappingtoks{\the\mappingtoks\setlowercasecom#1{#2}}%
+ {\global\casecomtoks\expandafter{\the\casecomtoks\setlowercasecom#1{#2}}%
\ignorespaces}
\let\setuppercasecom\gobbletwoarguments
@@ -1037,10 +1165,20 @@
{\egroup
\stopreadingfile}
+% \def\definecharacter#1 #2 %
+% {\ifundefined{#1}\setvalue{#1}{\dohandlecharacter{#1}}\fi
+% \doifnumberelse{\string#2}
+% {\setvalue{\characterprefix\characterencoding\string#1}{\char#2 }% watch the space
+% \doautosetregime{#1}{#2}}
+% {\setvalue{\characterprefix\characterencoding\string#1}{#2}}}
+
+\def\numcharacter#1{\char#1 }
+\let\dochar\numcharacter
+
\def\definecharacter#1 #2 %
{\ifundefined{#1}\setvalue{#1}{\dohandlecharacter{#1}}\fi
\doifnumberelse{\string#2}
- {\setvalue{\characterprefix\characterencoding\string#1}{\char#2 }% watch the space
+ {\setevalue{\characterprefix\characterencoding\string#1}{\dochar{#2}}%
\doautosetregime{#1}{#2}}
{\setvalue{\characterprefix\characterencoding\string#1}{#2}}}
@@ -1355,6 +1493,7 @@
\fetchruntimecommand \showcharacters {\f!encodingprefix\s!run}
\fetchruntimecommand \showcharacterbounds {\f!encodingprefix\s!run}
\fetchruntimecommand \showhyphenations {\f!encodingprefix\s!run}
+\fetchruntimecommand \showmapping {\f!encodingprefix\s!run}
%D \macros
%D {everyuppercase, EveryUppercase,
@@ -1374,9 +1513,14 @@
%D This magic trick maps takes care of mapping from lower to
%D upper case and reverse.
+\def\reloadmapping{\the\executeifdefined{\@cas@\charactermapping}\emptytoks}
+
\appendtoks\let\setuppercasecom\setcasecom\to\everyuppercase
\appendtoks\let\setlowercasecom\setcasecom\to\everylowercase
+\appendtoks\reloadmapping\to\everyuppercase % slow, will be sped up
+\appendtoks\reloadmapping\to\everylowercase % slow, will be sped up
+
\newtoks\everyULmap
\appendtoks\let\remapcase\remapuppercase\the\everyULmap\to\everyuppercase
@@ -1413,6 +1557,50 @@
% \setvalue{#1}{\getvalue{@\ifuppercase#2\else#1\fi}}%
% \setvalue{#2}{\getvalue{@\iflowercase#1\else#2\fi}}}
+% 2 = tricky, since expanding \definedfont[lowcasename] ... goes wrong
+
+\chardef\uppercasemode\plusthree % 0=ignore 1=normal 2=expand 3=auto
+\chardef\casecommode \plusone % 0=noexpand 1=expand
+
+\def\setcasecom #1#2{\def#1{\ifcase\casecommode\noexpand#1\else#2\fi}}
+
+% \def\OEPS{whatever}
+%
+% \startmapping[ec]
+% \defineuppercasecom \oeps {\getvalue{OEPS}}
+% \stopmapping
+%
+% \WORD{xx \oeps}
+
+\def\douppercase#1%
+ {\bgroup
+ \let\douppercase\firstofoneargument
+ \the\everyuppercase % currently also checks uppercasemode
+ \let\dochar\rawcharacter
+ \ifcase\uppercasemode
+ #1%
+ \or % No expansion here, otherwise \getvalue problems! Default!!!
+ %\edef\next{#1}% keep this to prevent roll back
+ %\uppercase\expandafter{\next}% keep this to prevent roll back
+ \uppercase{#1}%
+ \or
+ \chardef\casecommode\zerocount
+ \let\docasecom\firstoftwoarguments
+ \edef\ascii{#1}%
+ \edef\ascii{\expandafter\uppercase\expandafter{\ascii}}% needed when in regime
+ \chardef\casecommode\plusone
+ \ascii
+ \else
+ % mode three may trigger setting 2 elsewhere (e.g. regime test)
+ \uppercase{#1}%
+ \fi
+ \egroup}
+
+\prependtoksonce
+ \doifnot\currentregime\s!default
+ {\ifnum\uppercasemode=\plusthree \chardef\uppercasemode\plustwo \fi}%
+\to \everyuppercase
+
%D \macros
%D {everysanitize, EverySanitize}
%D
@@ -1780,8 +1968,6 @@
\useencoding[ans,il2,ec,tbo,pdf,uc,pol,qx,t5,cyr]
-% \useencoding[vna]
-
\setupencoding[\s!default=ec] % was: [\s!default=\s!default]
\protect \endinput
diff --git a/tex/context/base/enco-mis.tex b/tex/context/base/enco-mis.tex
index ceaf32584..b089fe569 100644
--- a/tex/context/base/enco-mis.tex
+++ b/tex/context/base/enco-mis.tex
@@ -61,7 +61,7 @@
% \egroup}
\def\pseudoencodeddj % like in babel, but safer
- {\leavevmode\hbox\bgroup
+ {\dontleavehmode\hbox\bgroup
\setbox\scratchbox\hbox{d}%
\scratchdimen\ht\scratchbox
\advance\scratchdimen 1ex
@@ -73,17 +73,32 @@
\raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}%
\egroup}
-\def\pseudoencodedDJ % like in babel, but safer
- {\leavevmode
+% \def\pseudoencodedDJ % like in babel, but safer
+% {\leavevmode
+% \hbox\bgroup
+% \setbox\scratchbox\hbox{D}%
+% \scratchdimen.55\ht\scratchbox
+% \dimen2=\withoutpt\the\fontdimen1\font\scratchdimen
+% \advance\dimen2 .15ex
+% \advance\dimen2 -.15\fontdimen7\font
+% \hbox to \wd\scratchbox
+% {\box\scratchbox\hss
+% \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}%
+% \egroup}
+
+\def\pseudoencodedDJ % design: taco; quality assurance: mojca; cleanup: hans
+ {\dontleavehmode
\hbox\bgroup
\setbox\scratchbox\hbox{D}%
- \scratchdimen.55\ht\scratchbox
- \dimen2=\withoutpt\the\fontdimen1\font\scratchdimen
- \advance\dimen2 .15ex
- \advance\dimen2 -.15\fontdimen7\font
+ \dimen2=1.1ex
+ \dimen2=\withoutpt\the\fontdimen1\font\dimen2
\hbox to \wd\scratchbox
- {\box\scratchbox\hss
- \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}%
+ {\rlap
+ {\raise.52\ht\scratchbox
+ \hbox
+ {\kern\dimen2
+ \vbox{\hrule\!!height.04ex\!!depth.04ex\!!width.4\wd\scratchbox}}}%
+ \box\scratchbox}%
\egroup}
% currency
diff --git a/tex/context/base/enco-pfr.tex b/tex/context/base/enco-pfr.tex
index 9e1e853b5..aba9bac88 100644
--- a/tex/context/base/enco-pfr.tex
+++ b/tex/context/base/enco-pfr.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-pfr,
-%D version=2000.12.10,
+%D version=2000.12.10, % adapted 2005.08.14 to more delayed loading
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=PDF Font Resource Inclusion,
%D author=Hans Hagen,
@@ -11,6 +11,10 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+\ifx\pdffontresource\undefined\else\endinput\fi
+
+\writestatus{loading}{Context Encoding Macros (pdf)}
+
%D This is an experimental module in which we implement
%D font resource inclusion in \PDF. One reason to include
%D font resources is that it enables a search engine to
@@ -50,6 +54,15 @@
\newif\ifincludepdffontresources \includepdffontresourcestrue
+% a problem is that there is always an ec vector added even when
+% we switch to texnansi early; this has to do with the fact that
+% we need to setup fonts at startup; this a pain when we have
+% textless documents, so we should have a way around, i.e. an
+% extension to pdftex where we can tag numbers inside user specs
+% and attributes.
+%
+% currently we need to use immediate so we end up with entries
+
%D The name of the resource is stored in a macro, as is its
%D object reference. A resource is only processed once. When
%D done, the resource name is erased, and we use this fact to
@@ -111,7 +124,7 @@
\def\usepdffontresource #1 %
{\doifundefinedelse{\pdffontfileresource} % okay, undefined, so either
- {\setxvalue{\pdffontfileresource}{#1}} % band new, or not yet loaded
+ {\setxvalue{\pdffontfileresource}{#1}} % brand new, or not yet loaded
{\doifvaluesomething{\pdffontfileresource} % only if not loaded in which
{\setxvalue{\pdffontfileresource}{#1}}}} % case it's made empty
@@ -120,14 +133,13 @@
%D we save its reference. Normally a document will have one
%D such a resource.
-\long\def\startpdffontresource[#1]#2\stoppdffontresource%
- {\donefalse % we use boolean due to \par
- \doifundefined{\pdffontresource}% should be \long
- {\doif{#1}{\currentencoding}{\donetrue}}%
- \ifdone % pdftex !
- \immediate\pdfobj stream {#2}%
- \setxvalue{\pdffontresource}{\the\pdflastobj}%
- \fi}
+% \long\def\startpdffontresource[#1]#2\stoppdffontresource
+% {\doif{#1}\currentencoding
+% {\immediate\pdfobj useobjnum \getvalue{\pdffontresource} stream {#2}}}
+
+\long\def\startpdffontresource[#1]#2\stoppdffontresource
+ {\doif{#1}\currentencoding{\doifdefined\pdffontresource
+ {\immediate\pdfobj useobjnum \getvalue{\pdffontresource} stream {#2}}}}
%D The reference to such a vector is to be handled at font
%D definition time, which is why we hook it into the font
@@ -135,6 +147,8 @@
%D the process when this feature is disabled and keeps the
%D macros readable.
+% \newevery \everyfont \relax
+
\appendtoksonce \includepdffontresource \to \everyfont
\def\includepdffontresource
@@ -148,6 +162,15 @@
\fi\fi
\fi}
+\def\dododoincludepdffontresource#1% encoding
+ {\bgroup
+ \def\currentencoding{#1}%
+ \startreadingfile
+ \readsysfile{pdfr-\getvalue\pdffontfileresource}\donothing\donothing
+ \stopreadingfile
+ \letgvalue\pdffontfileresource\empty
+ \egroup}
+
\beginETEX
\def\doincludepdffontresource
@@ -155,57 +178,53 @@
\dodoincludepdffontresource
\fi}
-\def\dodoincludepdffontresource%
- {% does this font has an encoding specified
- \ifx\currentencoding\empty \else \ifx\currentencoding\s!default \else
- % is there a pdf font encoding resource file defined
- \ifcsname\pdffontfileresource\endcsname
- % load the pdf font resource
- \edef\xpdffontfileresource{\csname\pdffontfileresource\endcsname}%
- \ifx\xpdffontfileresource\empty \else
- % but load it only once
- \startreadingfile
- \readsysfile{pdfr-\xpdffontfileresource}{}{}% messages
- \stopreadingfile
- % but do that only once, so forget the flag, empty==loaded
- \global\@EA\let\csname\pdffontfileresource\endcsname\empty
- \fi
- \fi
- % is there a resource indeed, i.e. an object reference
- \ifcsname\pdffontresource\endcsname
- % if so, create a reference to the object
- \expanded{\pdffontattr\font % current font
- {/ToUnicode \csname\pdffontresource\endcsname\space0 R}}%
- \fi
- \global\@EA\let\csname\s!ucmap\fontfile\endcsname\empty
- \fi \fi}
+\def\dodoincludepdffontresource
+ {% does this font has an encoding specified vector
+ \doifsomething\currentencoding % no \ifx
+ {% is there a pdf font encoding resource file defined
+ \ifcsname\pdffontresource\endcsname
+ % (fake) object defined
+ \else\ifcsname\pdffontfileresource\endcsname
+ % is there a resource already included
+ \doifsomething\pdffontfileresource
+ {\pdfobj reserveobjnum {}%
+ \setxvalue\pdffontresource{\the\pdflastobj}%
+ \doglobal\appendetoks
+ \noexpand\dododoincludepdffontresource{\currentencoding}%
+ \to \everybeforeshipout}% prevent multiple loading
+ \fi\fi
+ \ifcsname\pdffontresource\endcsname
+ \expanded{\pdffontattr\font{/ToUnicode \csname\pdffontresource\endcsname\space0 R}}%
+ % do it only once for each font
+ \letgvalue{\s!ucmap\fontfile}\empty
+ \fi}}
\endETEX
\beginTEX
\def\doincludepdffontresource
- {\@EA\ifx\csname\s!ucmap\fontfile\endcsname\relax
+ {\expandafter\ifcsname\s!ucmap\fontfile\endcsname\relax
\dodoincludepdffontresource
\fi}
\def\dodoincludepdffontresource
- {\ifx\currentencoding\empty \else \ifx\currentencoding\s!default \else
- \@EA\ifx\csname\pdffontfileresource\endcsname\relax\else
- \edef\xpdffontfileresource{\csname\pdffontfileresource\endcsname}%
- \ifx\xpdffontfileresource\empty \else
- \startreadingfile
- \readsysfile{pdfr-\xpdffontfileresource}{}{}%
- \stopreadingfile
- \global\@EA\let\csname\pdffontfileresource\endcsname\empty
- \fi
- \fi
- \@EA\ifx\csname\pdffontresource\endcsname\relax\else
- \expanded{\pdffontattr\font
- {/ToUnicode \csname\pdffontresource\endcsname\space0 R}}%
- \fi
- \global\@EA\let\csname\s!ucmap\fontfile\endcsname\empty
- \fi\fi}
+ {\doifsomething\currentencoding % no \ifx
+ {\expandafter\ifx\csname\pdffontresource\endcsname\relax
+ \expandafter\ifx\csname\pdffontfileresource\endcsname\relax\else
+ \doifsomething\pdffontfileresource
+ {\pdfobj reserveobjnum {}%
+ \setxvalue\pdffontresource{\the\pdflastobj}%
+ \doglobal\appendetoks
+ \noexpand\dododoincludepdffontresource{\currentencoding}%
+ \to \everybeforeshipout}% prevent multiple loading
+ \fi
+ \fi
+ \expandafter\ifx\csname\pdffontresource\endcsname\relax\else
+ \expanded{\pdffontattr\font{/ToUnicode \csname\pdffontresource\endcsname\space0 R}}%
+ % do it only once for each font
+ \letgvalue{\s!ucmap\fontfile}\empty
+ \fi}}
\endTEX
diff --git a/tex/context/base/enco-pol.tex b/tex/context/base/enco-pol.tex
index b470a027e..57355019e 100644
--- a/tex/context/base/enco-pol.tex
+++ b/tex/context/base/enco-pol.tex
@@ -16,25 +16,37 @@
\startmapping[pl0]
-\definecasemap 161 161 129 % a ogonek
-\definecasemap 162 162 130 % c acute
-\definecasemap 166 166 134 % e ogonek
-\definecasemap 170 170 138 % l crossed
-\definecasemap 171 171 139 % n acute
-\definecasemap 243 243 211 % o acute
-\definecasemap 177 177 145 % s acute
-\definecasemap 185 185 153 % z acute
-\definecasemap 187 187 155 % z dotaccent
-
-\definecasemap 129 161 129 % A ogonek
-\definecasemap 130 162 130 % C acute
-\definecasemap 134 166 134 % E ogonek
-\definecasemap 138 170 138 % L crossed
-\definecasemap 139 171 139 % N acute
-\definecasemap 211 243 211 % O acute
-\definecasemap 145 177 145 % S acute
-\definecasemap 153 185 153 % Z acute
-\definecasemap 155 187 155 % Z dotaccent
+\resetcaserange 128 to 255
+
+\definecaseswap 161 129 % a ogonek
+\definecaseswap 162 130 % c acute
+\definecaseswap 166 134 % e ogonek
+\definecaseswap 170 138 % l crossed
+\definecaseswap 171 139 % n acute
+\definecaseswap 177 145 % s acute
+\definecaseswap 185 153 % z acute
+\definecaseswap 187 155 % z dotaccent
+\definecaseswap 243 211 % o acute
+
+% \definecasemap 161 161 129 % a ogonek
+% \definecasemap 162 162 130 % c acute
+% \definecasemap 166 166 134 % e ogonek
+% \definecasemap 170 170 138 % l crossed
+% \definecasemap 171 171 139 % n acute
+% \definecasemap 177 177 145 % s acute
+% \definecasemap 185 185 153 % z acute
+% \definecasemap 187 187 155 % z dotaccent
+% \definecasemap 243 243 211 % o acute
+
+% \definecasemap 129 161 129 % A ogonek
+% \definecasemap 130 162 130 % C acute
+% \definecasemap 134 166 134 % E ogonek
+% \definecasemap 138 170 138 % L crossed
+% \definecasemap 139 171 139 % N acute
+% \definecasemap 145 177 145 % S acute
+% \definecasemap 153 185 153 % Z acute
+% \definecasemap 155 187 155 % Z dotaccent
+% \definecasemap 211 243 211 % O acute
\stopmapping
@@ -112,6 +124,9 @@
% \startmapping[pl1]
%
+%
+% \resetcaserange 128 to 255
+%
% \definecasemap 185 185 165 % a ogonek
% \definecasemap 230 230 198 % c acute
% \definecasemap 234 234 202 % e ogonek
@@ -184,6 +199,8 @@
% \startmapping[pl2]
%
+% \resetcaserange 128 to 255
+%
% \definecasemap 177 177 161 % a ogonek
% \definecasemap 230 230 198 % c acute
% \definecasemap 234 234 202 % e ogonek
diff --git a/tex/context/base/enco-qx.tex b/tex/context/base/enco-qx.tex
index 7baa6269a..38db703d9 100644
--- a/tex/context/base/enco-qx.tex
+++ b/tex/context/base/enco-qx.tex
@@ -28,8 +28,52 @@
\startmapping[qx] % to be done
-\definecasemaps 160 to 188 lc +32 uc 0
-\definecasemaps 192 to 255 lc 0 uc -32
+\resetcaserange 128 to 128
+\resetcaserange 131 to 133
+\resetcaserange 136 to 137
+\resetcaserange 140 to 144
+\resetcaserange 148 to 148
+\resetcaserange 150 to 150
+\resetcaserange 157 to 160
+\resetcaserange 163 to 165
+\resetcaserange 168 to 169
+\resetcaserange 172 to 176
+\resetcaserange 180 to 180
+\resetcaserange 182 to 182
+\resetcaserange 189 to 191
+\resetcaserange 198 to 198
+\resetcaserange 215 to 216
+\resetcaserange 223 to 223
+\resetcaserange 230 to 230
+\resetcaserange 247 to 248
+\resetcaserange 255 to 255
+
+\definecaseswap 161 129
+\definecaseswap 162 130
+
+\definecaseswap 166 134
+\definecaseswap 167 135
+
+\definecaseswap 170 138
+\definecaseswap 171 139
+
+\definecaseswap 177 145
+\definecaseswap 178 146
+\definecaseswap 179 147
+
+\definecaseswap 181 149
+
+\definecasemaps 151 to 156 lc +32 uc 0
+\definecasemaps 183 to 188 lc 0 uc -32
+
+\definecasemaps 192 to 197 lc +32 uc 0
+\definecasemaps 224 to 229 lc 0 uc -32
+
+\definecasemaps 199 to 214 lc +32 uc 0
+\definecasemaps 231 to 246 lc 0 uc -32
+
+\definecasemaps 217 to 222 lc +32 uc 0
+\definecasemaps 249 to 254 lc 0 uc -32
\stopmapping
diff --git a/tex/context/base/enco-run.tex b/tex/context/base/enco-run.tex
index 976980aaf..8622a2388 100644
--- a/tex/context/base/enco-run.tex
+++ b/tex/context/base/enco-run.tex
@@ -134,4 +134,16 @@
\NC sample \NC \hyphenatedword{#1} \NC \NR
\stoptabulate}
+\gdef\showmapping
+ {\dostepwiserecurse{128}{255}{1}
+ {\hbox\bgroup
+ \hbox to 2em{\hss\recurselevel}%
+ \hbox to 2em{\hss\char\recurselevel\hss}%
+ \hbox to 3em{\hss\ifcase\lccode\recurselevel\else\the \lccode\recurselevel\fi}%
+ \hbox to 2em{\hss\ifcase\lccode\recurselevel\else\char\lccode\recurselevel\fi\hss}%
+ \hbox to 3em{\hss\ifcase\lccode\recurselevel\else\the \uccode\recurselevel\fi}%
+ \hbox to 2em{\hss\ifcase\uccode\recurselevel\else\char\uccode\recurselevel\fi\hss}%
+ \egroup
+ \endgraf}}
+
\protect \endinput
diff --git a/tex/context/base/enco-tbo.tex b/tex/context/base/enco-tbo.tex
index 3e9719c2a..475be4602 100644
--- a/tex/context/base/enco-tbo.tex
+++ b/tex/context/base/enco-tbo.tex
@@ -13,6 +13,8 @@
\startmapping[8r]
+\resetcaserange 128 to 255
+
\definecasemap 228 228 196 \definecasemap 196 228 196
\definecasemap 235 235 203 \definecasemap 203 235 203
\definecasemap 239 239 207 \definecasemap 207 239 207
@@ -137,8 +139,8 @@
\definecharacter quotesingle 31
\definecharacter quotesinglebase 130
-\definecharacter quoteleft 96
-\definecharacter quoteright 39
+\definecharacter quoteleft 96
+\definecharacter quoteright 39
\definecharacter guilsingleleft 139
\definecharacter guilsingleright 155
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index 4d1fc7fe6..aa1bafcc9 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -874,13 +874,13 @@
\newif\ifsynchronizemathfonts \synchronizemathfontstrue
\def\synchronizetext % stylish text in mmode
- {\ifsynchronizemathfonts\the\textstrategies\fam\mrfam\fi}
+ {\ifsynchronizemathfonts\the\textstrategies\fam\minusone\fi}
\def\synchronizemath % math stuff in mmode
- {\ifsynchronizemathfonts\the\mathstrategies\fam\mrfam\fi}
+ {\ifsynchronizemathfonts\the\mathstrategies\fam\minusone\fi}
\def\synchronizesymb % stylish math stuff in mmode
- {\ifsynchronizemathfonts\the\symbstrategies\fam\mrfam\fi}
+ {\ifsynchronizemathfonts\the\symbstrategies\fam\minusone\fi}
%D \macros
%D {textonly}
@@ -4099,23 +4099,50 @@
%D definitions.
\def\fontstringA
- {\ifx\fontstyle\c!rm \s!Serif \else
- \ifx\fontstyle\c!ss \s!Sans \else
- \ifx\fontstyle\c!tt \s!Mono \else
- \s!Serif \fi\fi\fi}
+ {\ifx\fontstyle\c!rm \s!Serif \else
+ \ifx\fontstyle\c!ss \s!Sans \else
+ \ifx\fontstyle\c!tt \s!Mono \else
+ \s!Serif \fi\fi\fi}
\def\fontstringB
- {\ifx\fontstyle\c!rm \s!Regular \else
- \ifx\fontstyle\c!ss \s!Support \else
- \ifx\fontstyle\c!tt \s!Type \else
- \s!Serif \fi\fi\fi}
+ {\ifx\fontstyle\c!rm \s!Regular \else
+ \ifx\fontstyle\c!ss \s!Support \else
+ \ifx\fontstyle\c!tt \s!Type \else
+ \s!Serif \fi\fi\fi}
\def\fontstringC
- {\ifx\fontalternative\c!bf \s!Bold \else
- \ifx\fontalternative\c!sl \s!Slanted \else
- \ifx\fontalternative\c!it \s!Italic \else
+ {\ifx\fontalternative\c!bf \s!Bold \else
+ \ifx\fontalternative\c!sl \s!Slanted \else
+ \ifx\fontalternative\c!it \s!Italic \else
\ifx\fontalternative\c!bs \s!BoldSlanted \else
- \ifx\fontalternative\c!bi \s!BoldItalic \fi\fi\fi\fi\fi}
+ \ifx\fontalternative\c!bi \s!BoldItalic \fi\fi\fi\fi\fi}
+
+\def\fontstringD % default fontstyle
+ {\expandafter\ifx\csname\??tf\fontclass\s!default\endcsname\c!rm \s!Serif \else
+ \expandafter\ifx\csname\??tf\fontclass\s!default\endcsname\c!ss \s!Sans \else
+ \expandafter\ifx\csname\??tf\fontclass\s!default\endcsname\c!tt \s!Mono \else
+ \s!Serif \fi\fi\fi}
+
+% potential generalization:
+
+% \letvalue{\??ff:t:\c!rm}\s!Serif
+% \letvalue{\??ff:t:\c!ss}\s!Sans
+% \letvalue{\??ff:t:\c!tt}\s!Mono
+%
+% \letvalue{\??ff:s:\c!bf}\s!Bold
+% \letvalue{\??ff:s:\c!sl}\s!Slanted
+% \letvalue{\??ff:s:\c!it}\s!Italic
+% \letvalue{\??ff:s:\c!bs}\s!BoldSlanted
+% \letvalue{\??ff:s:\c!bi}\s!BoldItalic
+%
+% \letvalue{\??ff:a:\c!rm}\s!Regular
+% \letvalue{\??ff:a:\c!ss}\s!Support
+% \letvalue{\??ff:a:\c!tt}\s!Type
+%
+% \def\fontstringA{\executeifdefined{\??ff:t:\fontstyle}\s!Serif}
+% \def\fontstringB{\executeifdefined{\??ff:a:\fontstyle}\s!Serif}
+% \def\fontstringC{\executeifdefined{\??ff:s:\fontstyle}\empty}
+% \def\fontstringD{\executeifdefined{\??ff:t:\csname\??tf\fontclass\s!default\endcsname}\s!Serif}
\beginETEX \ifcsname
diff --git a/tex/context/base/font-unk.tex b/tex/context/base/font-unk.tex
index dc17772f4..4e450ae74 100644
--- a/tex/context/base/font-unk.tex
+++ b/tex/context/base/font-unk.tex
@@ -64,6 +64,28 @@
\definefontsynonym [Handwriting] [unknown]
\definefontsynonym [Calligraphic] [unknown]
+%D This permit us to define (use) fonts that refer to the default
+%D style (so, Bold may expand to SansBold or SerifBold, depending
+%D on the default style in the typeface).
+
+% \def\setfontsynonym[#1]#2[#3]{\setvalue{\??ff\fontclass#1}{#3}}
+%
+% \setfontsynonym[\s!Normal] [\fontstringD]
+% \setfontsynonym[\s!Bold] [\fontstringD\s!Bold]
+% \setfontsynonym[\s!Italic] [\fontstringD\s!Italic]
+% \setfontsynonym[\s!Slanted] [\fontstringD\s!Slanted]
+% \setfontsynonym[\s!BoldItalic] [\fontstringD\s!BoldItalic]
+% \setfontsynonym[\s!BoldSlanted][\fontstringD\s!BoldSlanted]
+% \setfontsynonym[\s!Caps] [\fontstringD\s!Caps]
+
+\definefontsynonym[\s!Normal] [\noexpand\fontstringD]
+\definefontsynonym[\s!Bold] [\noexpand\fontstringD\noexpand\s!Bold]
+\definefontsynonym[\s!Italic] [\noexpand\fontstringD\noexpand\s!Italic]
+\definefontsynonym[\s!Slanted] [\noexpand\fontstringD\noexpand\s!Slanted]
+\definefontsynonym[\s!BoldItalic] [\noexpand\fontstringD\noexpand\s!BoldItalic]
+\definefontsynonym[\s!BoldSlanted][\noexpand\fontstringD\noexpand\s!BoldSlanted]
+\definefontsynonym[\s!Caps] [\noexpand\fontstringD\noexpand\s!Caps]
+
%D Also handy:
\definefontsynonym [Regular] [Serif]
diff --git a/tex/context/base/math-ini.tex b/tex/context/base/math-ini.tex
index 0a3c1ea76..d78a9e4fc 100644
--- a/tex/context/base/math-ini.tex
+++ b/tex/context/base/math-ini.tex
@@ -496,6 +496,26 @@
%D needed for sin, cos etc
\def\mfunction#1{{\mr#1}}
+
+%D Taco posted this solution as response to a mail by Olivier, so
+%D let's integrate it here.
+
+\def\setmathfunctionstyle#1% \rm \ss \tt
+ {\def\mfunction##1% no families, just scaling a la text
+ {\mathchoice
+ {\hbox{\csname#1\endcsname\tf ##1}}
+ {\hbox{\csname#1\endcsname\tf ##1}}
+ {\hbox{\csname#1\endcsname\tfx ##1}}
+ {\hbox{\csname#1\endcsname\tfxx##1}}}}
+
+%D Usage:
+%D
+%D \starttyping
+%D \setmathfunctionstyle\fontstyle % or {rm} or {ss} or ..
+%D \rm test $\sin{(x^{\sin(x^{\sin(x)})})}$ test
+%D \ss test $\sin{(x^{\sin(x^{\sin(x)})})}$ test
+%D \tt test $\sin{(x^{\sin(x^{\sin(x)})})}$ test
+%D \stoptyping
\edef\hexmrfam {0} \edef\hexbsfam {8}
\edef\hexmifam {1} \edef\hexbifam {9}
diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex
index 83f3115df..3f8f61680 100644
--- a/tex/context/base/mult-com.tex
+++ b/tex/context/base/mult-com.tex
@@ -1525,7 +1525,7 @@ moveformula: verplaatsformule moveformula
component: onderdeel component
komponente komponenta
componenet componenta
- produxt: produkt product
+ product: produkt product
produkt produkt
prodotto produs
environment: omgeving environment
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index b8d057109..5a398b25d 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -78,6 +78,7 @@
\definesystemconstant {Sans} \definesystemconstant {Support}
\definesystemconstant {Mono} \definesystemconstant {Type}
+\definesystemconstant {Normal}
\definesystemconstant {Caps}
%D As the name of their define command states, the next set of
@@ -693,6 +694,7 @@
\definefileconstant {xtagprefix} {xtag-}
\definefileconstant {propprefix} {prop-}
\definefileconstant {unicprefix} {unic-}
+\definefileconstant {sortprefix} {sort-}
\definefileconstant {moduleprefix} {m-}
\definefileconstant {styleprefix} {s-}
diff --git a/tex/context/base/page-ini.tex b/tex/context/base/page-ini.tex
index 4035bb036..7c1ff78d3 100644
--- a/tex/context/base/page-ini.tex
+++ b/tex/context/base/page-ini.tex
@@ -1685,6 +1685,14 @@
\od
\filluparrangedpages}
+\installpagebreakhandler \v!lastpage % handy for backpage preceded by empty pages
+ {\executepagebreakhandler\v!yes
+ \ifdubbelzijdig
+ \executepagebreakhandler\v!left
+ \executepagebreakhandler\v!empty
+ \executepagebreakhandler\v!empty
+ \fi}
+
\installpagebreakhandler \v!start
{\globallet\shipout\normalshipout}
@@ -1708,6 +1716,10 @@
% [page=chapter,
% header=empty,
% footer=chapter]
+%
+% \definepagebreak % untested
+% [lastpage]
+% [left,{empty,right},{empty,left}]
% public page handler, beware: definepage already in use (core-ref)
%
diff --git a/tex/context/base/page-lin.tex b/tex/context/base/page-lin.tex
index 789099d26..dfb99ca95 100644
--- a/tex/context/base/page-lin.tex
+++ b/tex/context/base/page-lin.tex
@@ -185,7 +185,7 @@
{\dosingleargument\dosetuplinenumbering}
\def\dostartnummerenLINE
- {\EveryPar{placelinenumber}}
+ {\EveryPar{\placelinenumber}} % why not append to everypar ? better
\def\dostopnummerenLINE
{\the\aftereverylinenumbering
@@ -233,24 +233,24 @@
\chardef\linenumberlocation\zerocount
\processaction
[\@@rnlocation]
- [ \v!inmargin=>\chardef\linenumberlocation1,
- \v!inleft=>\chardef\linenumberlocation1,
- \v!inright=>\chardef\linenumberlocation2,
- \v!margin=>\chardef\linenumberlocation1]%
- % \v!text=>\chardef\linenumberlocation0,
- %\s!unknown=>\chardef\linenumberlocation0,
- %\s!default=>\chardef\linenumberlocation0]%
+ [ \v!inmargin=>\chardef\linenumberlocation\plusone,
+ \v!inleft=>\chardef\linenumberlocation\plusone,
+ \v!inright=>\chardef\linenumberlocation\plustwo,
+ \v!margin=>\chardef\linenumberlocation\plusone]%
+ % \v!text=>\chardef\linenumberlocation\zerocount,
+ %\s!unknown=>\chardef\linenumberlocation\zerocount,
+ %\s!default=>\chardef\linenumberlocation\zerocount]%
\ifcase\linenumberlocation % text
\advance\leftskip \@@rnwidth\relax
\fi
\chardef\@@rn@@rnmethod
- \ifprocessingverbatim0\else\iftypesettinglines1\else2\fi\fi
+ \ifprocessingverbatim\zerocount\else\iftypesettinglines\plusone\else\plustwo\fi\fi
\processaction
[\@@rnmethod]
- [ \v!type=>\chardef\@@rn@@rnmethod0,
- \v!line=>\chardef\@@rn@@rnmethod1,
- \v!text=>\chardef\@@rn@@rnmethod2,
- \v!file=>\chardef\@@rn@@rnmethod3]%
+ [ \v!type=>\chardef\@@rn@@rnmethod\zerocount,
+ \v!line=>\chardef\@@rn@@rnmethod\plusone,
+ \v!text=>\chardef\@@rn@@rnmethod\plustwo,
+ \v!file=>\chardef\@@rn@@rnmethod\plusthree]%
\ifcase\@@rn@@rnmethod % verbatim, line by line
\typesettinglinestrue
\let\dostartnummeren\dostartnummerenVERB
diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex
index 42f989cc5..c1a9499f0 100644
--- a/tex/context/base/page-lyr.tex
+++ b/tex/context/base/page-lyr.tex
@@ -318,7 +318,7 @@
\ht\layerpagebox\zeropoint
\dp\layerpagebox\zeropoint
\wd\layerpagebox\zeropoint
- \doifnotvalue{\layerparameter\c!direction}\v!reverse{\box\layerpagebox}%
+ \doifnot{\layerparameter\c!direction}\v!reverse{\box\layerpagebox}%
\fi
% don't move
\xdef\lastlayerwd{\the\nextboxwd}%
diff --git a/tex/context/base/regi-ini.tex b/tex/context/base/regi-ini.tex
index 0f663a423..1c3fceb55 100644
--- a/tex/context/base/regi-ini.tex
+++ b/tex/context/base/regi-ini.tex
@@ -8,18 +8,18 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-%D For the moment regimes are implemented in \type
-%D {enco-ini.tex} module, but some day we will move the
-%D code here.
+%D For the moment regimes are implemented in \type
+%D {enco-ini.tex} module, but some day we will move the
+%D code here.
% also needed: message
-\unprotect
+\unprotect
-\def\douseregime#1% nearly identical to encoding
+\def\douseregime#1% nearly identical to encoding
{\doifundefined{\c!file\f!regimeprefix#1}%
{\setvalue{\c!file\f!regimeprefix#1}{}%
\makeshortfilename[\f!regimeprefix#1]%
@@ -34,8 +34,9 @@
\fetchruntimecommand \showregime {regi-run}
-\protect
+\protect
-\useregime[def,uni,ibm,win,il1,mac]
+% \useregime[def,uni,ibm,win,il1,mac]
+\useregime[def,uni,lat,win,il1,mac]
-\endinput
+\endinput
diff --git a/tex/context/base/regi-lat.tex b/tex/context/base/regi-lat.tex
index e3f3aa15a..7c1666ac6 100644
--- a/tex/context/base/regi-lat.tex
+++ b/tex/context/base/regi-lat.tex
@@ -1,9 +1,9 @@
%D \module
%D [ file=regi-lat,
-%D version=1999.11.16,
+%D version=2005.07.20, % 1999.11.16
%D title=\CONTEXT\ Encoding Macros,
-%D subtitle=Pseudo Latin 2,
-%D author=Hans Hagen,
+%D subtitle=Iso Latin 2,
+%D author={Mojca Miklavec \& Hans Hagen},
%D date=\currentdate,
%D copyright=PRAGMA-ADE]
%C
@@ -11,24 +11,114 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D This file maps \ISO~latin~2 characters onto standard
-%D \ASCII\ characters. Some more definitions will be added.
+%D This file implements the ISO-8859-2 Central European character
+%D set.
\startregime[latin2]
-\defineactivetoken æ {\cacute}
-\defineactivetoken Æ {\Cacute}
+\defineactivetoken 160 {\nonbreakablespace} %   00A0 NO-BREAK SPACE
+\defineactivetoken 161 {\Aogonek} % ¡ 0104 LATIN CAPITAL LETTER A WITH OGONEK
+\defineactivetoken 162 {\textbreve} % ¢ 02D8 BREVE
+\defineactivetoken 163 {\Lstroke} % £ 0141 LATIN CAPITAL LETTER L WITH STROKE
+\defineactivetoken 164 {\textcurrency} % ¤ 00A4 CURRENCY SIGN
+\defineactivetoken 165 {\Lcaron} % ¥ 013D LATIN CAPITAL LETTER L WITH CARON
+\defineactivetoken 166 {\Sacute} % ¦ 015A LATIN CAPITAL LETTER S WITH ACUTE
+\defineactivetoken 167 {\sectionmark} % § 00A7 SECTION SIGN
+\defineactivetoken 168 {\textdiaeresis} % ¨ 00A8 DIAERESIS
+\defineactivetoken 169 {\Scaron} % © 0160 LATIN CAPITAL LETTER S WITH CARON
+\defineactivetoken 170 {\Scedilla} % ª 015E LATIN CAPITAL LETTER S WITH CEDILLA
+\defineactivetoken 171 {\Tcaron} % « 0164 LATIN CAPITAL LETTER T WITH CARON
+\defineactivetoken 172 {\Zacute} % ¬ 0179 LATIN CAPITAL LETTER Z WITH ACUTE
+\defineactivetoken 173 {\softhyphen} % ­ 00AD SOFT HYPHEN
+\defineactivetoken 174 {\Zcaron} % ® 017D LATIN CAPITAL LETTER Z WITH CARON
+\defineactivetoken 175 {\Zdotaccent} % ¯ 017B LATIN CAPITAL LETTER Z WITH DOT ABOVE
-\defineactivetoken è {\ccaron}
-\defineactivetoken È {\Ccaron}
-\defineactivetoken ¹ {\scaron}
-\defineactivetoken © {\Scaron}
-\defineactivetoken ¾ {\zcaron}
-\defineactivetoken ® {\Zcaron}
+\defineactivetoken 176 {\textdegree} % ° 00B0 DEGREE SIGN
+\defineactivetoken 177 {\aogonek} % ± 0105 LATIN SMALL LETTER A WITH OGONEK
+\defineactivetoken 178 {\textogonek} % ² 02DB OGONEK
+\defineactivetoken 179 {\lstroke} % ³ 0142 LATIN SMALL LETTER L WITH STROKE
+\defineactivetoken 180 {\textacute} % ´ 00B4 ACUTE ACCENT
+\defineactivetoken 181 {\lcaron} % µ 013E LATIN SMALL LETTER L WITH CARON
+\defineactivetoken 182 {\sacute} % ¶ 015B LATIN SMALL LETTER S WITH ACUTE
+\defineactivetoken 183 {\textcaron} % · 02C7 CARON
+\defineactivetoken 184 {\textcedilla} % ¸ 00B8 CEDILLA
+\defineactivetoken 185 {\scaron} % ¹ 0161 LATIN SMALL LETTER S WITH CARON
+\defineactivetoken 186 {\scedilla} % º 015F LATIN SMALL LETTER S WITH CEDILLA
+\defineactivetoken 187 {\tcaron} % » 0165 LATIN SMALL LETTER T WITH CARON
+\defineactivetoken 188 {\zacute} % ¼ 017A LATIN SMALL LETTER Z WITH ACUTE
+\defineactivetoken 189 {\texthungarumlaut} % ½ 02DD DOUBLE ACUTE ACCENT
+\defineactivetoken 190 {\zcaron} % ¾ 017E LATIN SMALL LETTER Z WITH CARON
+\defineactivetoken 191 {\zdotaccent} % ¿ 017C LATIN SMALL LETTER Z WITH DOT ABOVE
-\defineactivetoken ð {\dstroke}
-\defineactivetoken Ð {\Dstroke}
+\defineactivetoken 192 {\Racute} % À 0154 LATIN CAPITAL LETTER R WITH ACUTE
+\defineactivetoken 193 {\Aacute} % Á 00C1 LATIN CAPITAL LETTER A WITH ACUTE
+\defineactivetoken 194 {\Acircumflex} % Â 00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+\defineactivetoken 195 {\Abreve} % Ã 0102 LATIN CAPITAL LETTER A WITH BREVE
+\defineactivetoken 196 {\Adiaeresis} % Ä 00C4 LATIN CAPITAL LETTER A WITH DIAERESIS
+\defineactivetoken 197 {\Lacute} % Å 0139 LATIN CAPITAL LETTER L WITH ACUTE
+\defineactivetoken 198 {\Cacute} % Æ 0106 LATIN CAPITAL LETTER C WITH ACUTE
+\defineactivetoken 199 {\Ccedilla} % Ç 00C7 LATIN CAPITAL LETTER C WITH CEDILLA
+\defineactivetoken 200 {\Ccaron} % È 010C LATIN CAPITAL LETTER C WITH CARON
+\defineactivetoken 201 {\Eacute} % É 00C9 LATIN CAPITAL LETTER E WITH ACUTE
+\defineactivetoken 202 {\Eogonek} % Ê 0118 LATIN CAPITAL LETTER E WITH OGONEK
+\defineactivetoken 203 {\Ediaeresis} % Ë 00CB LATIN CAPITAL LETTER E WITH DIAERESIS
+\defineactivetoken 204 {\Ecaron} % Ì 011A LATIN CAPITAL LETTER E WITH CARON
+\defineactivetoken 205 {\Iacute} % Í 00CD LATIN CAPITAL LETTER I WITH ACUTE
+\defineactivetoken 206 {\Icircumflex} % Î 00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+\defineactivetoken 207 {\Dcaron} % Ï 010E LATIN CAPITAL LETTER D WITH CARON
+
+\defineactivetoken 208 {\Dstroke} % Ð 0110 LATIN CAPITAL LETTER D WITH STROKE
+\defineactivetoken 209 {\Nacute} % Ñ 0143 LATIN CAPITAL LETTER N WITH ACUTE
+\defineactivetoken 210 {\Ncaron} % Ò 0147 LATIN CAPITAL LETTER N WITH CARON
+\defineactivetoken 211 {\Oacute} % Ó 00D3 LATIN CAPITAL LETTER O WITH ACUTE
+\defineactivetoken 212 {\Ocircumflex} % Ô 00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+\defineactivetoken 213 {\Ohungarumlaut} % Õ 0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
+\defineactivetoken 214 {\Odiaeresis} % Ö 00D6 LATIN CAPITAL LETTER O WITH DIAERESIS
+\defineactivetoken 215 {\textmultiply} % × 00D7 MULTIPLICATION SIGN
+\defineactivetoken 216 {\Rcaron} % Ø 0158 LATIN CAPITAL LETTER R WITH CARON
+\defineactivetoken 217 {\Uring} % Ù 016E LATIN CAPITAL LETTER U WITH RING ABOVE
+\defineactivetoken 218 {\Uacute} % Ú 00DA LATIN CAPITAL LETTER U WITH ACUTE
+\defineactivetoken 219 {\Uhungarumlaut} % Û 0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
+\defineactivetoken 220 {\Udiaeresis} % Ü 00DC LATIN CAPITAL LETTER U WITH DIAERESIS
+\defineactivetoken 221 {\Yacute} % Ý 00DD LATIN CAPITAL LETTER Y WITH ACUTE
+\defineactivetoken 222 {\Tcedilla} % Þ 0162 LATIN CAPITAL LETTER T WITH CEDILLA
+\defineactivetoken 223 {\ssharp} % ß 00DF LATIN SMALL LETTER SHARP S
+
+\defineactivetoken 224 {\racute} % à 0155 LATIN SMALL LETTER R WITH ACUTE
+\defineactivetoken 225 {\aacute} % á 00E1 LATIN SMALL LETTER A WITH ACUTE
+\defineactivetoken 226 {\acircumflex} % â 00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX
+\defineactivetoken 227 {\abreve} % ã 0103 LATIN SMALL LETTER A WITH BREVE
+\defineactivetoken 228 {\adiaeresis} % ä 00E4 LATIN SMALL LETTER A WITH DIAERESIS
+\defineactivetoken 229 {\lacute} % å 013A LATIN SMALL LETTER L WITH ACUTE
+\defineactivetoken 230 {\cacute} % æ 0107 LATIN SMALL LETTER C WITH ACUTE
+\defineactivetoken 231 {\ccedilla} % ç 00E7 LATIN SMALL LETTER C WITH CEDILLA
+\defineactivetoken 232 {\ccaron} % è 010D LATIN SMALL LETTER C WITH CARON
+\defineactivetoken 233 {\eacute} % é 00E9 LATIN SMALL LETTER E WITH ACUTE
+\defineactivetoken 234 {\eogonek} % ê 0119 LATIN SMALL LETTER E WITH OGONEK
+\defineactivetoken 235 {\ediaeresis} % ë 00EB LATIN SMALL LETTER E WITH DIAERESIS
+\defineactivetoken 236 {\ecaron} % ì 011B LATIN SMALL LETTER E WITH CARON
+\defineactivetoken 237 {\iacute} % í 00ED LATIN SMALL LETTER I WITH ACUTE
+\defineactivetoken 238 {\icircumflex} % î 00EE LATIN SMALL LETTER I WITH CIRCUMFLEX
+\defineactivetoken 239 {\dcaron} % ï 010F LATIN SMALL LETTER D WITH CARON
+
+\defineactivetoken 240 {\dstroke} % ð 0111 LATIN SMALL LETTER D WITH STROKE
+\defineactivetoken 241 {\nacute} % ñ 0144 LATIN SMALL LETTER N WITH ACUTE
+\defineactivetoken 242 {\ncaron} % ò 0148 LATIN SMALL LETTER N WITH CARON
+\defineactivetoken 243 {\oacute} % ó 00F3 LATIN SMALL LETTER O WITH ACUTE
+\defineactivetoken 244 {\ocircumflex} % ô 00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX
+\defineactivetoken 245 {\ohungarumlaut} % õ 0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE
+\defineactivetoken 246 {\odiaeresis} % ö 00F6 LATIN SMALL LETTER O WITH DIAERESIS
+\defineactivetoken 247 {\textdiv} % ÷ 00F7 DIVISION SIGN
+\defineactivetoken 248 {\rcaron} % ø 0159 LATIN SMALL LETTER R WITH CARON
+\defineactivetoken 249 {\uring} % ù 016F LATIN SMALL LETTER U WITH RING ABOVE
+\defineactivetoken 250 {\uacute} % ú 00FA LATIN SMALL LETTER U WITH ACUTE
+\defineactivetoken 251 {\uhungarumlaut} % û 0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE
+\defineactivetoken 252 {\udiaeresis} % ü 00FC LATIN SMALL LETTER U WITH DIAERESIS
+\defineactivetoken 253 {\yacute} % ý 00FD LATIN SMALL LETTER Y WITH ACUTE
+\defineactivetoken 254 {\tcedilla} % þ 0163 LATIN SMALL LETTER T WITH CEDILLA
+\defineactivetoken 255 {\textdotaccent} % ÿ 02D9 DOT ABOVE
\stopregime
\endinput
+
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index d6dc59fa0..573b1cec2 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -109,6 +109,7 @@
\logo [LATEX] {\LaTeX}
\logo [LINUX] {linux}
\logo [LISP] {Lisp}
+\logo [LUA] {Lua}
\logo [MACOSX] {MacOSX}
\logo [MAKEMPY] {MakeMPY}
\logo [MAPS] {Maps}
diff --git a/tex/context/base/sort-def.tex b/tex/context/base/sort-def.tex
new file mode 100644
index 000000000..04ce50681
--- /dev/null
+++ b/tex/context/base/sort-def.tex
@@ -0,0 +1,352 @@
+%D \module
+%D [ file=sort-def,
+%D version=2005.08.08,
+%D title=\CONTEXT\ Sort Macros,
+%D subtitle=Defaults,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module replaces existing sort key handling and is meant to be
+%D used with the new texutil functionality. Here we define the default
+%D mappings
+
+\exportsortexpansion{aeligature} {ae}
+\exportsortexpansion{AEligature} {AE}
+\exportsortexpansion{ijligature} {ij}
+\exportsortexpansion{IJligature} {IJ}
+\exportsortexpansion{oeligature} {oe}
+\exportsortexpansion{OEligature} {OE}
+
+\exportsortexpansion{ssharp} {ss}
+\exportsortexpansion{Ssharp} {SS}
+
+\exportsortexpansion{thorn} {}
+\exportsortexpansion{Thorn} {}
+
+\exportsortexpansion{eth} {}
+\exportsortexpansion{Eth} {}
+
+\exportsortexpansion{Acircumflex} {}
+\exportsortexpansion{acircumflex} {}
+\exportsortexpansion{Ccircumflex} {}
+\exportsortexpansion{ccircumflex} {}
+\exportsortexpansion{Ecircumflex} {}
+\exportsortexpansion{ecircumflex} {}
+\exportsortexpansion{Gcircumflex} {}
+\exportsortexpansion{gcircumflex} {}
+\exportsortexpansion{Hcircumflex} {}
+\exportsortexpansion{hcircumflex} {}
+\exportsortexpansion{Icircumflex} {}
+\exportsortexpansion{icircumflex} {}
+\exportsortexpansion{Jcircumflex} {}
+\exportsortexpansion{jcircumflex} {}
+\exportsortexpansion{Ocircumflex} {}
+\exportsortexpansion{ocircumflex} {}
+\exportsortexpansion{Scircumflex} {}
+\exportsortexpansion{scircumflex} {}
+\exportsortexpansion{Ucircumflex} {}
+\exportsortexpansion{ucircumflex} {}
+\exportsortexpansion{Wcircumflex} {}
+\exportsortexpansion{wcircumflex} {}
+\exportsortexpansion{Ycircumflex} {}
+\exportsortexpansion{ycircumflex} {}
+
+\exportsortexpansion{Agrave} {}
+\exportsortexpansion{agrave} {}
+\exportsortexpansion{Egrave} {}
+\exportsortexpansion{egrave} {}
+\exportsortexpansion{Igrave} {}
+\exportsortexpansion{igrave} {}
+\exportsortexpansion{Ograve} {}
+\exportsortexpansion{ograve} {}
+\exportsortexpansion{Ugrave} {}
+\exportsortexpansion{ugrave} {}
+\exportsortexpansion{Ygrave} {}
+\exportsortexpansion{ygrave} {}
+
+\exportsortexpansion{Atilde} {}
+\exportsortexpansion{atilde} {}
+\exportsortexpansion{Itilde} {}
+\exportsortexpansion{itilde} {}
+\exportsortexpansion{Ntilde} {}
+\exportsortexpansion{ntilde} {}
+\exportsortexpansion{Otilde} {}
+\exportsortexpansion{otilde} {}
+\exportsortexpansion{Utilde} {}
+\exportsortexpansion{utilde} {}
+\exportsortexpansion{Ytilde} {}
+\exportsortexpansion{ytilde} {}
+
+\exportsortexpansion{Adiaeresis} {}
+\exportsortexpansion{adiaeresis} {}
+\exportsortexpansion{Ediaeresis} {}
+\exportsortexpansion{ediaeresis} {}
+\exportsortexpansion{Idiaeresis} {}
+\exportsortexpansion{idiaeresis} {}
+\exportsortexpansion{Odiaeresis} {}
+\exportsortexpansion{odiaeresis} {}
+\exportsortexpansion{Udiaeresis} {}
+\exportsortexpansion{udiaeresis} {}
+\exportsortexpansion{Ydiaeresis} {}
+\exportsortexpansion{ydiaeresis} {}
+
+\exportsortexpansion{Aacute} {}
+\exportsortexpansion{aacute} {}
+\exportsortexpansion{Cacute} {}
+\exportsortexpansion{cacute} {}
+\exportsortexpansion{Eacute} {}
+\exportsortexpansion{eacute} {}
+\exportsortexpansion{Iacute} {}
+\exportsortexpansion{iacute} {}
+\exportsortexpansion{Lacute} {}
+\exportsortexpansion{lacute} {}
+\exportsortexpansion{Nacute} {}
+\exportsortexpansion{nacute} {}
+\exportsortexpansion{Oacute} {}
+\exportsortexpansion{oacute} {}
+\exportsortexpansion{Racute} {}
+\exportsortexpansion{racute} {}
+\exportsortexpansion{Sacute} {}
+\exportsortexpansion{sacute} {}
+\exportsortexpansion{Uacute} {}
+\exportsortexpansion{uacute} {}
+\exportsortexpansion{Yacute} {}
+\exportsortexpansion{yacute} {}
+\exportsortexpansion{Zacute} {}
+\exportsortexpansion{zacute} {}
+
+\exportsortexpansion{dstroke} {}
+\exportsortexpansion{Dstroke} {}
+\exportsortexpansion{Hstroke} {}
+\exportsortexpansion{hstroke} {}
+\exportsortexpansion{Tstroke} {}
+\exportsortexpansion{tstroke} {}
+
+\exportsortexpansion{Cdotaccent} {}
+\exportsortexpansion{cdotaccent} {}
+\exportsortexpansion{Edotaccent} {}
+\exportsortexpansion{edotaccent} {}
+\exportsortexpansion{Gdotaccent} {}
+\exportsortexpansion{gdotaccent} {}
+\exportsortexpansion{Idotaccent} {}
+\exportsortexpansion{idotaccent} {}
+\exportsortexpansion{Zdotaccent} {}
+\exportsortexpansion{zdotaccent} {}
+
+\exportsortexpansion{Amacron} {}
+\exportsortexpansion{amacron} {}
+\exportsortexpansion{Emacron} {}
+\exportsortexpansion{emacron} {}
+\exportsortexpansion{Imacron} {}
+\exportsortexpansion{imacron} {}
+\exportsortexpansion{Omacron} {}
+\exportsortexpansion{omacron} {}
+\exportsortexpansion{Umacron} {}
+\exportsortexpansion{umacron} {}
+
+\exportsortexpansion{Ccedilla} {}
+\exportsortexpansion{ccedilla} {}
+\exportsortexpansion{Kcedilla} {}
+\exportsortexpansion{kcedilla} {}
+\exportsortexpansion{Lcedilla} {}
+\exportsortexpansion{lcedilla} {}
+\exportsortexpansion{Ncedilla} {}
+\exportsortexpansion{ncedilla} {}
+\exportsortexpansion{Rcedilla} {}
+\exportsortexpansion{rcedilla} {}
+\exportsortexpansion{Scedilla} {}
+\exportsortexpansion{scedilla} {}
+\exportsortexpansion{Tcedilla} {}
+\exportsortexpansion{tcedilla} {}
+
+\exportsortexpansion{Ohungarumlaut} {}
+\exportsortexpansion{ohungarumlaut} {}
+\exportsortexpansion{Uhungarumlaut} {}
+\exportsortexpansion{uhungarumlaut} {}
+
+\exportsortexpansion{Aogonek} {}
+\exportsortexpansion{aogonek} {}
+\exportsortexpansion{Eogonek} {}
+\exportsortexpansion{eogonek} {}
+\exportsortexpansion{Iogonek} {}
+\exportsortexpansion{iogonek} {}
+\exportsortexpansion{Uogonek} {}
+\exportsortexpansion{uogonek} {}
+
+\exportsortexpansion{Aring} {}
+\exportsortexpansion{aring} {}
+\exportsortexpansion{Uring} {}
+\exportsortexpansion{uring} {}
+
+\exportsortexpansion{Abreve} {}
+\exportsortexpansion{abreve} {}
+\exportsortexpansion{Ebreve} {}
+\exportsortexpansion{ebreve} {}
+\exportsortexpansion{Gbreve} {}
+\exportsortexpansion{gbreve} {}
+\exportsortexpansion{Ibreve} {}
+\exportsortexpansion{ibreve} {}
+\exportsortexpansion{Obreve} {}
+\exportsortexpansion{obreve} {}
+\exportsortexpansion{Ubreve} {}
+\exportsortexpansion{ubreve} {}
+
+\exportsortexpansion{Ccaron} {}
+\exportsortexpansion{ccaron} {}
+\exportsortexpansion{Dcaron} {}
+\exportsortexpansion{dcaron} {}
+\exportsortexpansion{Ecaron} {}
+\exportsortexpansion{ecaron} {}
+\exportsortexpansion{Lcaron} {}
+\exportsortexpansion{lcaron} {}
+\exportsortexpansion{Ncaron} {}
+\exportsortexpansion{ncaron} {}
+\exportsortexpansion{Rcaron} {}
+\exportsortexpansion{rcaron} {}
+\exportsortexpansion{Scaron} {}
+\exportsortexpansion{scaron} {}
+\exportsortexpansion{Tcaron} {}
+\exportsortexpansion{tcaron} {}
+\exportsortexpansion{Ycaron} {}
+\exportsortexpansion{ycaron} {}
+\exportsortexpansion{Zcaron} {}
+\exportsortexpansion{zcaron} {}
+
+\exportsortexpansion{Lstroke} {}
+\exportsortexpansion{lstroke} {}
+\exportsortexpansion{Ostroke} {}
+\exportsortexpansion{ostroke} {}
+
+\exportsortexpansion{aumlaut} {}
+\exportsortexpansion{eumlaut} {}
+\exportsortexpansion{iumlaut} {}
+\exportsortexpansion{oumlaut} {}
+\exportsortexpansion{uumlaut} {}
+
+\exportsortexpansion{Aumlaut} {}
+\exportsortexpansion{Eumlaut} {}
+\exportsortexpansion{Iumlaut} {}
+\exportsortexpansion{Oumlaut} {}
+\exportsortexpansion{Uumlaut} {}
+
+\exportsortexpansion{scommaaccent} {}
+\exportsortexpansion{Scommaaccent} {}
+\exportsortexpansion{tcommaaccent} {}
+\exportsortexpansion{Tcommaaccent} {}
+
+\exportsortexpansion{Etilde} {}
+\exportsortexpansion{etilde} {}
+
+\exportsortexpansion{Ahook} {}
+\exportsortexpansion{ahook} {}
+\exportsortexpansion{Ehook} {}
+\exportsortexpansion{ehook} {}
+\exportsortexpansion{Ihook} {}
+\exportsortexpansion{ihook} {}
+\exportsortexpansion{Ohook} {}
+\exportsortexpansion{ohook} {}
+\exportsortexpansion{Uhook} {}
+\exportsortexpansion{uhook} {}
+\exportsortexpansion{Yhook} {}
+\exportsortexpansion{yhook} {}
+
+\exportsortexpansion{Acircumflexgrave} {}
+\exportsortexpansion{Acircumflexacute} {}
+\exportsortexpansion{Acircumflextilde} {}
+\exportsortexpansion{Acircumflexhook} {}
+\exportsortexpansion{acircumflexgrave} {}
+\exportsortexpansion{acircumflexacute} {}
+\exportsortexpansion{acircumflextilde} {}
+\exportsortexpansion{acircumflexhook} {}
+\exportsortexpansion{Ecircumflexgrave} {}
+\exportsortexpansion{Ecircumflexacute} {}
+\exportsortexpansion{Ecircumflextilde} {}
+\exportsortexpansion{Ecircumflexhook} {}
+\exportsortexpansion{ecircumflexgrave} {}
+\exportsortexpansion{ecircumflexacute} {}
+\exportsortexpansion{ecircumflextilde} {}
+\exportsortexpansion{ecircumflexhook} {}
+\exportsortexpansion{Ocircumflexgrave} {}
+\exportsortexpansion{Ocircumflexacute} {}
+\exportsortexpansion{Ocircumflextilde} {}
+\exportsortexpansion{Ocircumflexhook} {}
+\exportsortexpansion{ocircumflexgrave} {}
+\exportsortexpansion{ocircumflexacute} {}
+\exportsortexpansion{ocircumflextilde} {}
+\exportsortexpansion{ocircumflexhook} {}
+
+\exportsortexpansion{Abrevegrave} {}
+\exportsortexpansion{Abreveacute} {}
+\exportsortexpansion{Abrevetilde} {}
+\exportsortexpansion{Abrevehook} {}
+\exportsortexpansion{abrevegrave} {}
+\exportsortexpansion{abreveacute} {}
+\exportsortexpansion{abrevetilde} {}
+\exportsortexpansion{abrevehook} {}
+
+\exportsortexpansion{Adotbelow} {}
+\exportsortexpansion{adotbelow} {}
+\exportsortexpansion{Edotbelow} {}
+\exportsortexpansion{edotbelow} {}
+\exportsortexpansion{Idotbelow} {}
+\exportsortexpansion{idotbelow} {}
+\exportsortexpansion{Odotbelow} {}
+\exportsortexpansion{odotbelow} {}
+\exportsortexpansion{Udotbelow} {}
+\exportsortexpansion{udotbelow} {}
+\exportsortexpansion{Ydotbelow} {}
+\exportsortexpansion{ydotbelow} {}
+\exportsortexpansion{Ohorndotbelow} {}
+\exportsortexpansion{ohorndotbelow} {}
+\exportsortexpansion{Uhorndotbelow} {}
+\exportsortexpansion{uhorndotbelow} {}
+
+\exportsortexpansion{Acircumflexdotbelow} {}
+\exportsortexpansion{acircumflexdotbelow} {}
+\exportsortexpansion{Ecircumflexdotbelow} {}
+\exportsortexpansion{ecircumflexdotbelow} {}
+\exportsortexpansion{Ocircumflexdotbelow} {}
+\exportsortexpansion{ocircumflexdotbelow} {}
+\exportsortexpansion{Abrevedotbelow} {}
+\exportsortexpansion{abrevedotbelow} {}
+
+\exportsortexpansion{Ohorn} {}
+\exportsortexpansion{Ohorngrave} {}
+\exportsortexpansion{Ohornacute} {}
+\exportsortexpansion{Ohorntilde} {}
+\exportsortexpansion{Ohornhook } {}
+\exportsortexpansion{ohorn} {}
+\exportsortexpansion{ohorngrave} {}
+\exportsortexpansion{ohornacute} {}
+\exportsortexpansion{ohorntilde} {}
+\exportsortexpansion{ohornhook } {}
+\exportsortexpansion{Uhorn} {}
+\exportsortexpansion{Uhorngrave} {}
+\exportsortexpansion{Uhornacute} {}
+\exportsortexpansion{Uhorntilde} {}
+\exportsortexpansion{Uhornhook } {}
+\exportsortexpansion{uhorn} {}
+\exportsortexpansion{uhorngrave} {}
+\exportsortexpansion{uhornacute} {}
+\exportsortexpansion{uhorntilde} {}
+\exportsortexpansion{uhornhook} {}
+
+\exportsortexpansion{eszett} {ssharp}
+\exportsortexpansion{Eszett} {Ssharp}
+
+\exportsortexpansion{lslash} {lstroke}
+\exportsortexpansion{Lslash} {Lstroke}
+\exportsortexpansion{dslash} {dstroke}
+\exportsortexpansion{Dslash} {Dstroke}
+\exportsortexpansion{oslash} {ostroke}
+\exportsortexpansion{Oslash} {Ostroke}
+
+\exportsortexpansion{dcroat} {dstroke}
+\exportsortexpansion{Dcroat} {Dstroke}
+
+\endinput
diff --git a/tex/context/base/sort-ini.tex b/tex/context/base/sort-ini.tex
new file mode 100644
index 000000000..84d32e2ff
--- /dev/null
+++ b/tex/context/base/sort-ini.tex
@@ -0,0 +1,101 @@
+%D \module
+%D [ file=sort-ini,
+%D version=2005.08.08,
+%D title=\CONTEXT\ Sort Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module replaces existing sort key handling and is meant to be
+%D used with the new texutil functionality. This module defines a few
+%D auxiliary macros.
+
+%D The sorting method is largely bases on the one used in the old version
+%D of texutil but i've changed the interface a bit. It all boils down to
+%D a bunch of substitutions. The reimplementation makes it easier to extend
+%D the rules. Currently we have multipass substitution and onepass sorting,
+%D but we may change this some day. Since there is a plugin mechanism, using
+%D an external sorter is also possible.
+
+% test file:
+%
+% \mainlanguage[sl] \readfile{sort-ini}{}{}
+%
+% \starttext
+% test \index {aa1} test \index {ab1} test \index {aa2}
+% test \index {ab2} test \index {aa10} test \index {aa8}
+% test \index {aa9} test \index {aa11} test \index {aa10}
+% test \index {cccc} test \index {\ccaron ccc} test \index {\cacute ccc}
+% test \index {caaa} test \index {\ccaron aaa} test \index {\cacute aaa}
+% \placeindex
+% \stoptext
+
+% definitions:
+%
+% \exportsortshortcut{\\\'\\i}{iacute}
+% \exportsortshortcut{\\\'i} {iacute}
+% \exportsortshortcut{\\\"e} {ediaeresis}
+% \exportsortshortcut{\\\'o} {oacute}
+%
+% \exportsortexpansion{aeligature}{ae}
+% \exportsortexpansion{ijligature}{y}
+% \exportsortexpansion{oacute} {oz}
+% \exportsortexpansion{eacute} {ezzz} % or e3
+% \exportsortexpansion{egrave} {ezz} % or e2
+% \exportsortexpansion{ediaeresis}{ez} % or e1
+% \exportsortexpansion{adiaeresis}{az}
+% \exportsortreduction{ch} {c}
+% \exportsortreduction{ij} {y}
+%
+% \exportsortexpansion{ccaron} {cz}
+% \exportsortexpansion{cacute} {czz}
+% \exportsortexpansion{dstroke} {dz}
+% \exportsortexpansion{scaron} {sz}
+% \exportsortexpansion{zcaron} {zz}
+%
+% \exportsortreduction{ch}{c}
+% \exportsortreduction{ij}{y}
+%
+% \exportsortexpansion {ccaron} {c+1}
+% \exportsortdivision {c+1} {ccaron}
+% ==
+% \exportsortrule {ccaron} {c+1}
+
+\unprotect
+
+\let\currentexportclass\empty
+
+\def\exportsortaction#1#2#3%
+ {\convertargument#2\to\asciia
+ \convertargument#3\to\asciib
+ \immediatewriteutility{x #1 {\currentexportclass} {\asciia} {\asciib}}}
+
+\def\exportsortshortcut {\exportsortaction s}
+\def\exportsortexpansion{\exportsortaction e}
+\def\exportsortreduction{\exportsortaction r}
+\def\exportsortdivision {\exportsortaction d}
+
+\def\exportsortrule#1#2%
+ {\exportsortexpansion{#1}{#2}%
+ \exportsortdivision {#2}{#1}}
+
+% Next we overload some macros defined in enco-ini and core-uti. This
+% will change.
+
+\let\definesortkey\gobblefourarguments
+
+\def\savesortkeys
+ {\globallet\savesortkeys\relax
+ \enablemode[sortorder-\currentmainlanguage]%
+ \readfile{\f!sortprefix new}\donothing\donothing % temporary hacks
+ \readfile{\f!sortprefix def}\donothing\donothing % defaults
+ \readfile{\f!sortprefix lan}\donothing\donothing}% language specifics
+
+% already done \prependtoks \savesortkeys \to \everystarttext
+
+\protect \endinput
diff --git a/tex/context/base/sort-lan.tex b/tex/context/base/sort-lan.tex
new file mode 100644
index 000000000..c4489b1ff
--- /dev/null
+++ b/tex/context/base/sort-lan.tex
@@ -0,0 +1,107 @@
+%D \module
+%D [ file=sort-lan,
+%D version=2005.08.08,
+%D title=\CONTEXT\ Sort Macros,
+%D subtitle=Language Definitions,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module replaces existing sort key handling and is meant to be
+%D used with the new texutil functionality. Here we define the language
+%D specific sort rules.
+
+% slovenian
+%
+% a-c, ccaron, cacute, d, dstroke, e-s, scaron, t-z, zcaron
+
+% \startmode[sortorder-sl]
+% \exportsortexpansion {ccaron} {cz}
+% \exportsortexpansion {cacute} {czz}
+% \exportsortexpansion {dstroke} {dz}
+% \exportsortexpansion {scaron} {sz}
+% \exportsortexpansion {zacron} {zz}
+
+% \exportsortdivision {cz} {ccaron}
+% \exportsortdivision {czz} {cacute}
+% \exportsortdivision {dz} {dstroke}
+% \exportsortdivision {sz} {scaron}
+% \exportsortdivision {zz} {zacron}
+% \stopmode
+%
+% \startmode[sortorder-sl]
+% \exportsortexpansion {ccaron} {c+1}
+% \exportsortexpansion {cacute} {c+2}
+% \exportsortexpansion {dstroke} {d+1}
+% \exportsortexpansion {scaron} {s+1}
+% \exportsortexpansion {zacron} {z+1}
+%
+% \exportsortdivision {c+1} {ccaron}
+% \exportsortdivision {c+2} {cacute}
+% \exportsortdivision {d+1} {dstroke}
+% \exportsortdivision {s+1} {scaron}
+% \exportsortdivision {z+1} {zacron}
+% \stopmode
+
+\startmode[sortorder-sl]
+ \exportsortrule {ccaron} {c+1}
+ \exportsortrule {cacute} {c+2}
+ \exportsortrule {dstroke} {d+1}
+ \exportsortrule {scaron} {s+1}
+ \exportsortrule {zacron} {z+1}
+\stopmode
+
+% finnish
+%
+% a-u, v+w sorted together, x-z, aring, adiaeresis, odiaeresis
+
+\startmode[sortorder-fi]
+ \exportsortrule {v} {w}
+ \exportsortrule {aring} {z+1}
+ \exportsortrule {adiaeresis} {z+2}
+ \exportsortrule {odiaeresis} {z+3}
+\stopmode
+
+% swedish
+%
+% a-z, aring, adiaeresis, odiaeresis
+
+\startmode[sortorder-sv]
+ \exportsortrule {aring} {z+1}
+ \exportsortrule {adiaeresis} {z+2}
+ \exportsortrule {odiaeresis} {z+3}
+\stopmode
+
+% norwegian, danish
+%
+% a-z, aeligature, oslash, aring
+
+\startmode[sortorder-no,sortorder-da]
+ \exportsortrule {aeligature} {z+1}
+ \exportsortrule {oslash} {z+2}
+ \exportsortrule {aring} {z+3}
+\stopmode
+
+% islandic
+%
+% a, aacute, b, c, d, eth, e, eacute, f-i, iacute, j-o, oacute, p-u, uacute, v, w (?), x, y, yacute, z, aeligature, oslash, thorn
+
+% estonian
+%
+% a-s, scaron, z, zcaron, t-w, otilde, adiaeresis, odiaeresis, udiaeresis, x, y
+
+% czech
+%
+%
+
+\startmode[sortorder-no,sortorder-da]
+ \exportsortreduction{ch}{c}
+\stopmode
+
+
+
+\endinput
diff --git a/tex/context/base/sort-new.tex b/tex/context/base/sort-new.tex
new file mode 100644
index 000000000..cc6d6983d
--- /dev/null
+++ b/tex/context/base/sort-new.tex
@@ -0,0 +1,59 @@
+% temporary overloading
+
+\unprotect
+
+\def\strippedcsname
+ {\expandafter\dostrippedcsname\string}
+
+\def\dostrippedcsname#1%
+ {\if\noexpand#1\letterbackslash\else#1\fi}
+
+\def\doregisterreference[#1]#2%
+ {\doifvalue{\??id#1\c!referencing}\v!on
+ {\pagereference[#1:\strippedcsname#2]}}
+
+\def\doprocesspageregister[#1]#2#3% key altnum entry
+ {\begingroup
+ \thisisnextinternal\s!ind
+ \ifduplicate\getlastregisterentry{#3}\fi
+ \convertexpanded{\registerparameter\c!keyexpansion}{#1}\asciiregisterentryA
+ \convertexpanded{\registerparameter\c!expansion }{#3}\asciiregisterentryB
+ \doifsomething{\registerparameter\c!keyexpansion}
+ {\ifx\asciiregisterentryA\empty
+ \convertexpanded{\registerparameter\c!keyexpansion}{#3}\asciiregisterentryA
+ \fi}%
+ \makesectionformat
+ \doifelse{\registerparameter\c!ownnumber}\v!yes
+ \donetrue\donefalse
+ % the spaces between } { are essential for texutil's split
+ \expanded
+ {\writeutility%
+ {r \ifcase\registerpagestatus\space\or e \or f \or t \fi
+ {\currentregister} %
+ {\nextinternalreference} %
+ {\asciiregisterentryA} %
+ {\asciiregisterentryB} %
+ {\sectionformat\sectionseparator\sectionseparator
+ \ifdone#2\else\noexpand\pagenumber\fi} %
+ {\noexpand\realfolio}}}%
+ \getfirstcharacter\currentregister
+ \registerinfo{> \firstcharacter}{#3}%
+ \endgroup}
+
+\def\convertmeaning#1\to % watch the double expansion !
+ {\bgroup
+ \honorunexpanded
+ %dontexpandencoding % new
+ \literateencodedtokens % newer
+ \xdef\@@globalexpanded{#1}%
+ \xdef\@@globalexpanded{\@@globalexpanded}%
+ \egroup
+ \convertcommand\@@globalexpanded\to}
+
+\def\reduceargument#1\to#2%
+ {\begingroup
+ \reducetocoding[raw]%
+ \edef\ascii{#1}%
+ \expandafter\endgroup\expandafter\edef\expandafter#2\expandafter{\ascii}}
+
+\protect
diff --git a/tex/context/base/supp-pat.tex b/tex/context/base/supp-pat.tex
index 3cbe1b0b1..15c69e2c2 100644
--- a/tex/context/base/supp-pat.tex
+++ b/tex/context/base/supp-pat.tex
@@ -44,7 +44,21 @@
\fi \fi
-%D Any\TEX:
+%D First we define the \ETEX\ variant. We cannot do that inside
+%D the if statement because normal \TEX\ gets confused over the
+%D csname test (which it does not see as if but it does see the
+%D else's and fi's).
+
+\def\etexfetchpatterntoken#1%
+ {\csname
+ \ifcsname @pattok@#1\endcsname
+ @pattok@#1%
+ \else\ifcsname#1\endcsname
+ #1%
+ \else
+ @pattok@default%
+ \fi\fi
+ \endcsname}
\ifx \fetchpatterntoken \undefined
@@ -54,9 +68,9 @@
{\csname
\expandafter\ifx\csname @pattok@#1\endcsname\relax
\expandafter\ifx\csname#1\endcsname\relax
- #1%
- \else
@pattok@default%
+ \else
+ #1%
\fi
\else
@pattok@#1%
@@ -65,16 +79,7 @@
\else
- \def\fetchpatterntoken#1%
- {\csname
- \ifcsname @pattok@#1\endcsname
- @pattok@#1%
- \else\ifcsname#1\endcsname
- #1%
- \else
- @pattok@default%
- \fi\fi
- \endcsname}
+ \let\fetchpatterntoken\etexfetchpatterntoken
\fi
diff --git a/tex/context/base/symb-mis.tex b/tex/context/base/symb-mis.tex
index 329d11f5e..5a24ab832 100644
--- a/tex/context/base/symb-mis.tex
+++ b/tex/context/base/symb-mis.tex
@@ -16,17 +16,23 @@
%D We predefine some common symbols and conversions that will
%D be understood by many commands.
+% \mathematics no longer needed
+
\definesymbol [\v!none] []
\definesymbol [bullet] [\mathematics{\bullet}]
\definesymbol [dash] [\mathematics{-}]
\definesymbol [star] [\mathematics{\star}]
\definesymbol [triangle] [\mathematics{\triangleright}]
\definesymbol [circle] [\mathematics{\circ}]
-\definesymbol [medcircle] [\hbox{\setsmallbodyfont\raise\onepoint\hbox{$\bigcirc$}}]
-\definesymbol [bigcircle] [\mathematics{\bigcirc}]
+%definesymbol [medcircle] [\hbox{\setsmallbodyfont\raise\onepoint\hbox{\mathematics{\bigcirc}}}]
\definesymbol [square] [\mathematics{\square}]
\definesymbol [diamond] [\mathematics{\diamond}]
+\definesymbol [smallcircle] [\hbox{\raise.1ex\hbox{\mathematics{\scriptscriptstyle\bigcirc}}}]
+\definesymbol [medcircle] [\hbox{\raise.1ex\hbox{\mathematics{\scriptstyle \bigcirc}}}]
+\definesymbol [bigcircle] [\mathematics{\bigcirc}]
+
+
\definesymbol [1] [{\symbol[bullet]}]
\definesymbol [2] [{\symbol[dash]}]
\definesymbol [3] [{\symbol[star]}]
diff --git a/tex/context/base/syst-etx.tex b/tex/context/base/syst-etx.tex
index bef56cb69..55837b02f 100644
--- a/tex/context/base/syst-etx.tex
+++ b/tex/context/base/syst-etx.tex
@@ -22,7 +22,17 @@
%D range, and spurious box behaviour of boxes adressed in the extended
%D box space made us a bit careful. It's hard to to track down such
%D bugs, especially if one has a mind set of \TEX\ being bug free. If
-%D you encounter unexpected behaviour let me know.
+%D you encounter unexpected behaviour let me know. Currently the
+%D scantokens mechanism can handle only one||liners, but Taco will
+%D provide an alternative some day.
+%D
+%D \starttyping
+%D \bgroup
+%D \lccode`a=12\lowercase{\xdef\whatever{a}}\egroup
+%D \def\whatever{test \whatever test}
+%D \scantokens\expandafter{\whatever}
+%D \egroup
+%D \stoptyping
\unprotect
@@ -31,7 +41,13 @@
\long\def\gobbleoneargument#1{}
-\mathchardef\etexversion=\numexpr(\eTeXversion*100+\expandafter\gobbleoneargument\eTeXrevision)
+\beginETEX
+ \mathchardef\etexversion=\numexpr\eTeXversion*100+\expandafter\gobbleoneargument\eTeXrevision\relax
+\endETEX
+
+\beginTEX
+ \mathchardef\etexversion=0
+\endTEX
%D Constants to be used with \type {\grouptype}.
diff --git a/tex/context/base/type-dis.tex b/tex/context/base/type-dis.tex
index 9dd0218dd..2511d9682 100644
--- a/tex/context/base/type-dis.tex
+++ b/tex/context/base/type-dis.tex
@@ -19,13 +19,13 @@
% obsolete: cork- is now ec- in latin modern
%
-% \starttypescript[all][latin-modern,computer-modern][ec]
+% \starttypescript[all][modern,latin-modern,computer-modern][ec]
%
% \definefontsynonym[ec-lmb10] [cork-lmb10] [encoding=ec]
%
% \stoptypescript
-\starttypescript[all][latin-modern,computer-modern][pl0]
+\starttypescript[all][modern,latin-modern,computer-modern][pl0]
\definefontsynonym[pl0-lmb10] [plb10] [encoding=pl0]
\definefontsynonym[pl0-lmbo10] [plbsl10] [encoding=pl0]
@@ -87,7 +87,7 @@
\stoptypescript
-\starttypescript[all][latin-modern,computer-modern][il2]
+\starttypescript[all][modern,latin-modern,computer-modern][il2]
\definefontsynonym[il2-lmb10] [csb10] [encoding=il2]
\definefontsynonym[il2-lmbo10] [csbsl10] [encoding=il2]
@@ -151,7 +151,7 @@
% we have two sets of tfm files
-\starttypescript[all][latin-modern,computer-modern][t5]
+\starttypescript[all][modern,latin-modern,computer-modern][t5]
\definefontsynonym[t5-lmb10] [vnb10] [encoding=t5]
\definefontsynonym[t5-lmbo10] [vnbsl10] [encoding=t5]
@@ -213,7 +213,7 @@
\stoptypescript
-\starttypescript[all][latin-modern][all]
+\starttypescript[all][modern,latin-modern][all]
% fallbacks, no math in latin modern
diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex
index 91b57dbe7..8ba9156e4 100644
--- a/tex/context/base/type-enc.tex
+++ b/tex/context/base/type-enc.tex
@@ -16,7 +16,7 @@
% texfont --ven=urw --col=palatino --enc=ec --sou=auto
% texfont --ven-lucas --col=sun --enc=ec --sou=.
-% \usetypescript [all] [latin-modern] [texnansi]
+% \usetypescript [all] [modern] [texnansi]
% \setupbodyfont[reset] \setupbodyfont[cmr]
% \starttext \showfont[Serif] \stoptext
@@ -26,7 +26,7 @@
\starttypescriptcollection[encodings]
-\starttypescript [serif] [latin-modern,computer-modern] [texnansi,ec,qx,pl0,il2,t5]
+\starttypescript [serif] [modern,latin-modern,computer-modern] [texnansi,ec,qx,pl0,il2,t5]
\definefontsynonym [cmr5] [\typescriptthree-lmr5] [encoding=\typescriptthree]
\definefontsynonym [cmr6] [\typescriptthree-lmr6] [encoding=\typescriptthree]
@@ -66,7 +66,7 @@
\stoptypescript
-\starttypescript [sans] [latin-modern,computer-modern] [texnansi,ec,qx,pl0,il2,t5]
+\starttypescript [sans] [modern,latin-modern,computer-modern] [texnansi,ec,qx,pl0,il2,t5]
\definefontsynonym [cmss8] [\typescriptthree-lmss8] [encoding=\typescriptthree]
\definefontsynonym [cmss9] [\typescriptthree-lmss9] [encoding=\typescriptthree]
@@ -92,7 +92,7 @@
\stoptypescript
-\starttypescript [mono] [latin-modern,computer-modern] [texnansi,ec,qx,pl0,il2,t5]
+\starttypescript [mono] [modern,latin-modern,computer-modern] [texnansi,ec,qx,pl0,il2,t5]
\definefontsynonym [cmtt8] [\typescriptthree-lmtt8] [encoding=\typescriptthree]
\definefontsynonym [cmtt9] [\typescriptthree-lmtt9] [encoding=\typescriptthree]
@@ -636,7 +636,7 @@
\definefontsynonym [cmvtt10] [lhvtt10] [encoding=lcy]
\stoptypescript
-\starttypescript [serif] [computer-modern,latin-modern] [default]
+\starttypescript [serif] [modern,computer-modern,latin-modern] [default]
\definefontsynonym [ComputerModern] [cmr10]
\definefontsynonym [ComputerModern-Italic] [cmti10]
\definefontsynonym [ComputerModern-Slanted] [cmsl10]
@@ -646,7 +646,7 @@
\definefontsynonym [ComputerModern-Caps] [cmcsc10]
\stoptypescript
-\starttypescript [sans] [computer-modern,latin-modern] [default]
+\starttypescript [sans] [modern,computer-modern,latin-modern] [default]
\definefontsynonym [ComputerModernSans] [cmss10]
\definefontsynonym [ComputerModernSans-Italic] [cmssi10]
\definefontsynonym [ComputerModernSans-Slanted] [cmssi10]
@@ -656,7 +656,7 @@
\definefontsynonym [ComputerModernSans-Caps] [cmss10]
\stoptypescript
-\starttypescript [mono] [computer-modern,latin-modern] [default]
+\starttypescript [mono] [modern,computer-modern,latin-modern] [default]
\definefontsynonym [ComputerModernMono] [cmtt10]
\definefontsynonym [ComputerModernMono-Italic] [cmitt10]
\definefontsynonym [ComputerModernMono-Slanted] [cmsltt10]
@@ -667,7 +667,7 @@
\definefontsynonym [ComputerModernMono-Variable] [cmvtt10]
\stoptypescript
-\starttypescript [math] [computer-modern,latin-modern] [default]
+\starttypescript [math] [modern,computer-modern,latin-modern] [default]
% watch the space, it prevents remapping
\definefontsynonym [ComputerModernMath-Roman] [cmr10 ]
\definefontsynonym [ComputerModernMath-Extension] [cmex10]
@@ -675,7 +675,7 @@
\definefontsynonym [ComputerModernMath-Symbol] [cmsy10]
\stoptypescript
-\starttypescript [boldmath,bfmath] [computer-modern,latin-modern] [default]
+\starttypescript [boldmath,bfmath] [modern,computer-modern,latin-modern] [default]
% watch the space, it prevents remapping
\definefontsynonym [ComputerModernMath-Roman-Bold] [cmb10 ]
\definefontsynonym [ComputerModernMath-Extension] [cmex10]
@@ -713,7 +713,7 @@
% AMS (AMS)
-\starttypescript [math] [computer-modern,latin-modern,ams] [default]
+\starttypescript [math] [modern,computer-modern,latin-modern,ams] [default]
\definefontsynonym [AMS-SymbolA] [msam10]
\definefontsynonym [AMS-SymbolB] [msbm10]
\stoptypescript
@@ -985,17 +985,9 @@
% Iwona (JMN)
-\starttypescript [sans] [iwona,iwona-light] [texnansi,ec,qx,t5]
- \definefontsynonym[Iwona-Light] [\typescriptthree-iwonal] [encoding=\typescriptthree]
- \definefontsynonym[Iwona-Regular] [\typescriptthree-iwonar] [encoding=\typescriptthree]
- \definefontsynonym[Iwona-Medium] [\typescriptthree-iwonam] [encoding=\typescriptthree]
- \definefontsynonym[Iwona-Bold] [\typescriptthree-iwonab] [encoding=\typescriptthree]
- \definefontsynonym[Iwona-Heavy] [\typescriptthree-iwonah] [encoding=\typescriptthree]
- \definefontsynonym[Iwona-LightItalic] [\typescriptthree-iwonali] [encoding=\typescriptthree]
- \definefontsynonym[Iwona-RegularItalic] [\typescriptthree-iwonari] [encoding=\typescriptthree]
- \definefontsynonym[Iwona-MediumItalic] [\typescriptthree-iwonami] [encoding=\typescriptthree]
- \definefontsynonym[Iwona-BoldItalic] [\typescriptthree-iwonabi] [encoding=\typescriptthree]
- \definefontsynonym[Iwona-HeavyItalic] [\typescriptthree-iwonahi] [encoding=\typescriptthree]
+% maybe this will change in Iwona-Math-Letters and Iwona-Math-Letters-Italic
+
+\starttypescript [sans] [iwona,iwona-light,iwona-medium] [texnansi,ec,qx,t5]
\definefontsynonym[Iwona-Light] [\typescriptthree-iwonal] [encoding=\typescriptthree]
\definefontsynonym[Iwona-Regular] [\typescriptthree-iwonar] [encoding=\typescriptthree]
\definefontsynonym[Iwona-Medium] [\typescriptthree-iwonam] [encoding=\typescriptthree]
@@ -1008,43 +1000,61 @@
\definefontsynonym[Iwona-HeavyItalic] [\typescriptthree-iwonahi] [encoding=\typescriptthree]
\stoptypescript
+\starttypescript [math] [iwona] [default]
+ \definefontsynonym [Iwona-Math-Letters-Regular] [rm-iwonar]
+ \definefontsynonym [Iwona-Math-Letters-RegularItalic] [mi-iwonari]
+ \definefontsynonym [Iwona-Math-Symbols-Regular] [sy-iwonari]
+ \definefontsynonym [Iwona-Math-Extension-Regular] [ex-iwonar]
+\stoptypescript
+
+\starttypescript [math] [iwona-light] [default]
+ \definefontsynonym [Iwona-Math-Letters-Light] [rm-iwonal]
+ \definefontsynonym [Iwona-Math-Letters-LightItalic] [mi-iwonali]
+ \definefontsynonym [Iwona-Math-Symbols-Light] [sy-iwonali]
+ \definefontsynonym [Iwona-Math-Extension-Light] [ex-iwonal]
+\stoptypescript
+
+\starttypescript [math] [iwona-medium] [default]
+ \definefontsynonym [Iwona-Math-Letters-Medium] [rm-iwonam]
+ \definefontsynonym [Iwona-Math-Letters-MediumItalic] [mi-iwonami]
+ \definefontsynonym [Iwona-Math-Symbols-Medium] [sy-iwonami]
+ \definefontsynonym [Iwona-Math-Extension-Medium] [ex-iwonam]
+\stoptypescript
+
% Kurier (JMN)
-\starttypescript [sans] [kurier,kurier-light] [texnansi,ec,qx,t5]
- \definefontsynonym[Kurier-Light] [\typescriptthree-kurl] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-Regular] [\typescriptthree-kurr] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-Medium] [\typescriptthree-kurm] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-Bold] [\typescriptthree-kurb] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-Heavy] [\typescriptthree-kurh] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-LightItalic] [\typescriptthree-kurli] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-RegularItalic] [\typescriptthree-kurri] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-MediumItalic] [\typescriptthree-kurmi] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-BoldItalic] [\typescriptthree-kurbi] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-HeavyItalic] [\typescriptthree-kurhi] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-Light] [\typescriptthree-kurl] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-Regular] [\typescriptthree-kurr] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-Medium] [\typescriptthree-kurm] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-Bold] [\typescriptthree-kurb] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-Heavy] [\typescriptthree-kurh] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-LightItalic] [\typescriptthree-kurli] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-RegularItalic] [\typescriptthree-kurri] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-MediumItalic] [\typescriptthree-kurmi] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-BoldItalic] [\typescriptthree-kurbi] [encoding=\typescriptthree]
- \definefontsynonym[Kurier-HeavyItalic] [\typescriptthree-kurhi] [encoding=\typescriptthree]
+\starttypescript [sans] [kurier-light,kurier,kurier-medium] [texnansi,ec,qx,t5]
+ \definefontsynonym[Kurier-Light] [\typescriptthree-kurierl] [encoding=\typescriptthree]
+ \definefontsynonym[Kurier-Regular] [\typescriptthree-kurierr] [encoding=\typescriptthree]
+ \definefontsynonym[Kurier-Medium] [\typescriptthree-kurierm] [encoding=\typescriptthree]
+ \definefontsynonym[Kurier-Bold] [\typescriptthree-kurierb] [encoding=\typescriptthree]
+ \definefontsynonym[Kurier-Heavy] [\typescriptthree-kurierh] [encoding=\typescriptthree]
+ \definefontsynonym[Kurier-LightItalic] [\typescriptthree-kurierli] [encoding=\typescriptthree]
+ \definefontsynonym[Kurier-RegularItalic] [\typescriptthree-kurierri] [encoding=\typescriptthree]
+ \definefontsynonym[Kurier-MediumItalic] [\typescriptthree-kuriermi] [encoding=\typescriptthree]
+ \definefontsynonym[Kurier-BoldItalic] [\typescriptthree-kurierbi] [encoding=\typescriptthree]
+ \definefontsynonym[Kurier-HeavyItalic] [\typescriptthree-kurierhi] [encoding=\typescriptthree]
\stoptypescript
\starttypescript [math] [kurier] [default]
- \definefontsynonym [Kurier-Math-Letters-Regular] [rm-kurr]
- \definefontsynonym [Kurier-Math-Letters-RegularItalic] [mi-kurr]
- \definefontsynonym [Kurier-Math-Symbols-Regular] [sy-kurr]
- \definefontsynonym [Kurier-Math-Extension-Regular] [ex-kurr]
+ \definefontsynonym [Kurier-Math-Letters-Regular] [rm-kurierr]
+ \definefontsynonym [Kurier-Math-Letters-RegularItalic] [mi-kurierri]
+ \definefontsynonym [Kurier-Math-Symbols-Regular] [sy-kurierri]
+ \definefontsynonym [Kurier-Math-Extension-Regular] [ex-kurierr]
\stoptypescript
\starttypescript [math] [kurier-light] [default]
- \definefontsynonym [Kurier-Math-Letters-Light] [rm-kurr]
- \definefontsynonym [Kurier-Math-Letters-LightItalic] [mi-kurr]
- \definefontsynonym [Kurier-Math-Symbols-Light] [sy-kurr]
- \definefontsynonym [Kurier-Math-Extension-Light] [ex-kurr]
+ \definefontsynonym [Kurier-Math-Letters-Light] [rm-kurierl]
+ \definefontsynonym [Kurier-Math-Letters-LightItalic] [mi-kurierli]
+ \definefontsynonym [Kurier-Math-Symbols-Light] [sy-kurierli]
+ \definefontsynonym [Kurier-Math-Extension-Light] [ex-kurierl]
+\stoptypescript
+
+\starttypescript [math] [kurier-medium] [default]
+ \definefontsynonym [Kurier-Math-Letters-Medium] [rm-kurierm]
+ \definefontsynonym [Kurier-Math-Letters-MediumItalic] [mi-kuriermi]
+ \definefontsynonym [Kurier-Math-Symbols-Medium] [sy-kuriermi]
+ \definefontsynonym [Kurier-Math-Extension-medium] [ex-kurierm]
\stoptypescript
% Palatino (URW)
@@ -1183,4 +1193,6 @@
\definefontsynonym [MartinVogel] [fmvr8x]
\stoptypescript
-\stoptypescriptcollection \endinput
+\stoptypescriptcollection
+
+\endinput
diff --git a/tex/context/base/type-exa.tex b/tex/context/base/type-exa.tex
index 2d7821d76..ee9e01954 100644
--- a/tex/context/base/type-exa.tex
+++ b/tex/context/base/type-exa.tex
@@ -19,10 +19,10 @@
% no fontclass, so this is the fall back
- \definetypeface [] [rm] [serif] [latin-modern] [computer-modern] [encoding=\typescripttwo]
- \definetypeface [] [ss] [sans] [latin-modern] [computer-modern] [encoding=\typescripttwo]
- \definetypeface [] [tt] [mono] [latin-modern] [computer-modern] [encoding=\typescripttwo]
- \definetypeface [] [mm] [math] [latin-modern] [computer-modern] [encoding=\typescripttwo]
+ \definetypeface [] [rm] [serif] [modern] [computer-modern] [encoding=\typescripttwo]
+ \definetypeface [] [ss] [sans] [modern] [computer-modern] [encoding=\typescripttwo]
+ \definetypeface [] [tt] [mono] [modern] [computer-modern] [encoding=\typescripttwo]
+ \definetypeface [] [mm] [math] [modern] [computer-modern] [encoding=\typescripttwo]
\quittypescriptscanning
@@ -30,10 +30,10 @@
\starttypescript [modern] [texnansi,ec,qx,il2,pl0,t5,default]
- \definetypeface [modern] [rm] [serif] [latin-modern] [computer-modern] [encoding=\typescripttwo]
- \definetypeface [modern] [ss] [sans] [latin-modern] [computer-modern] [encoding=\typescripttwo]
- \definetypeface [modern] [tt] [mono] [latin-modern] [computer-modern] [encoding=\typescripttwo]
- \definetypeface [modern] [mm] [math] [latin-modern] [computer-modern] [encoding=\typescripttwo]
+ \definetypeface [modern] [rm] [serif] [modern] [computer-modern] [encoding=\typescripttwo]
+ \definetypeface [modern] [ss] [sans] [modern] [computer-modern] [encoding=\typescripttwo]
+ \definetypeface [modern] [tt] [mono] [modern] [computer-modern] [encoding=\typescripttwo]
+ \definetypeface [modern] [mm] [math] [modern] [computer-modern] [encoding=\typescripttwo]
\quittypescriptscanning
@@ -41,10 +41,10 @@
\starttypescript [modern-base] [texnansi,ec,qx,pl0,il2,t5,default]
- \definetypeface [modern] [rm] [serif] [latin-modern] [default] [encoding=\typescripttwo]
- \definetypeface [modern] [ss] [sans] [latin-modern] [default] [encoding=\typescripttwo]
- \definetypeface [modern] [tt] [mono] [latin-modern] [default] [encoding=\typescripttwo]
- \definetypeface [modern] [mm] [math] [latin-modern] [default] [encoding=\typescripttwo]
+ \definetypeface [modern] [rm] [serif] [modern] [default] [encoding=\typescripttwo]
+ \definetypeface [modern] [ss] [sans] [modern] [default] [encoding=\typescripttwo]
+ \definetypeface [modern] [tt] [mono] [modern] [default] [encoding=\typescripttwo]
+ \definetypeface [modern] [mm] [math] [modern] [default] [encoding=\typescripttwo]
\quittypescriptscanning
@@ -111,9 +111,9 @@
% \starttypescript [utopia] [ec]
-% \definetypeface [fourier] [rm] [serif] [fourier] [default] [encoding=ec]
-% \definetypeface [fourier] [mm] [math] [fourier] [default] [encoding=default]
-% \definetypeface [fourier] [tt] [mono] [latin-modern] [default] [rscale=1.070,encoding=ec]
+% \definetypeface [fourier] [rm] [serif] [fourier] [default] [encoding=ec]
+% \definetypeface [fourier] [mm] [math] [fourier] [default] [encoding=default]
+% \definetypeface [fourier] [tt] [mono] [modern] [default] [rscale=1.070,encoding=ec]
% \usemathcollection[fou]
diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex
index 59bdd9093..a70042448 100644
--- a/tex/context/base/type-ini.tex
+++ b/tex/context/base/type-ini.tex
@@ -298,7 +298,7 @@
\long\def\dostarttypescriptyes
{\ifdone
\typescriptfoundtrue
- \iftracetypescripts\writestatus\m!fonts{match: \ifx\currenttypefile\relax-\fi \typescriptmatch}\fi
+ \iftracetypescripts\writestatus\m!fonts{match:\ifx\currenttypefile\relax\space *\fi \typescriptmatch}\fi
\expandafter\doprocesstypescript
\else
\expandafter\noprocesstypescript
diff --git a/tex/context/base/type-map.tex b/tex/context/base/type-map.tex
index 775ed00a3..d2485baa1 100644
--- a/tex/context/base/type-map.tex
+++ b/tex/context/base/type-map.tex
@@ -104,7 +104,7 @@
% latin modern
-\starttypescript [map] [computer-modern,latin-modern] [ec,texnansi,qx,t5,pl0,il2]
+\starttypescript [map] [modern,computer-modern,latin-modern] [ec,texnansi,qx,t5,pl0,il2]
\loadmapfile[\typescriptthree-public-lm.map]
\stoptypescript
@@ -157,11 +157,15 @@
\loadmapfile[\typescriptthree-public-antp.map]
\stoptypescript
-\starttypescript [map] [iwona,iwona-light] [ec,texnansi,qx,t5]
+\starttypescript [map] [iwona,iwona-light,iwona-medium,iwona-heavy] [ec,texnansi,qx,t5]
\loadmapfile[\typescriptthree-iwona.map]
+ \loadmapfile[rm-iwona.map]
+ \loadmapfile[mi-iwona.map]
+ \loadmapfile[sy-iwona.map]
+ \loadmapfile[ex-iwona.map]
\stoptypescript
-\starttypescript [map] [kurier,kurier-light] [ec,texnansi,qx,t5,default]
+\starttypescript [map] [kurier,kurier-light,kurier-medium,kurier-heavy] [ec,texnansi,qx,t5,default]
\loadmapfile[\typescriptthree-kurier.map]
\loadmapfile[rm-kurier.map]
\loadmapfile[mi-kurier.map]
diff --git a/tex/context/base/type-siz.tex b/tex/context/base/type-siz.tex
index f37141b71..6a2e35b30 100644
--- a/tex/context/base/type-siz.tex
+++ b/tex/context/base/type-siz.tex
@@ -392,7 +392,7 @@
\stoptypescript
-\starttypescript [math] [computer-modern,latin-modern] [size]
+\starttypescript [math] [modern,computer-modern,latin-modern] [size]
% hack to prevent mapping of filenames, watch the space!
@@ -466,7 +466,7 @@
\stoptypescript
-\starttypescript [boldmath] [computer-modern,latin-modern] [size]
+\starttypescript [boldmath] [modern,computer-modern,latin-modern] [size]
% hack to prevent mapping of filenames, watch the space!
@@ -540,7 +540,7 @@
\stoptypescript
-\starttypescript [bfmath] [computer-modern,latin-modern] [size]
+\starttypescript [bfmath] [modern,computer-modern,latin-modern] [size]
% hack to prevent mapping of filenames, watch the space!
@@ -816,7 +816,7 @@
\stoptypescript
-\starttypescript [math] [computer-modern,latin-modern,ams] [size]
+\starttypescript [math] [modern,computer-modern,latin-modern,ams] [size]
\definebodyfont [17.3pt,14.4pt,12pt,11pt,10pt,9pt] [mm]
[ma=msam10 sa 1,
mb=msbm10 sa 1]
diff --git a/tex/context/base/type-spe.tex b/tex/context/base/type-spe.tex
index 7ee8d8ab3..0fd2abadd 100644
--- a/tex/context/base/type-spe.tex
+++ b/tex/context/base/type-spe.tex
@@ -20,7 +20,7 @@
\def\controlspace{\getglyph{ComputerModernMono}{\char32}}
\stoptypescript
-\starttypescript [math] [computer-modern,latin-modern,ams] [special]
+\starttypescript [math] [modern,computer-modern,latin-modern,ams] [special]
\usemathcollection[default]
\stoptypescript
diff --git a/tex/context/base/type-syn.tex b/tex/context/base/type-syn.tex
index c29684be1..894812d9c 100644
--- a/tex/context/base/type-syn.tex
+++ b/tex/context/base/type-syn.tex
@@ -47,7 +47,7 @@
% Computer Modern Roman : Donald Knuth
-\starttypescript [serif] [computer-modern,latin-modern] [name]
+\starttypescript [serif] [modern,computer-modern,latin-modern] [name]
\definefontsynonym [Serif] [ComputerModern]
\definefontsynonym [SerifBold] [ComputerModern-Bold]
\definefontsynonym [SerifItalic] [ComputerModern-Italic]
@@ -57,7 +57,7 @@
\definefontsynonym [SerifCaps] [ComputerModern-Caps]
\stoptypescript
-\starttypescript [sans] [computer-modern,latin-modern] [name]
+\starttypescript [sans] [modern,computer-modern,latin-modern] [name]
\definefontsynonym [Sans] [ComputerModernSans]
\definefontsynonym [SansBold] [ComputerModernSans-Bold]
\definefontsynonym [SansItalic] [ComputerModernSans-Italic]
@@ -67,7 +67,7 @@
\definefontsynonym [SansCaps] [ComputerModernSans-Caps]
\stoptypescript
-\starttypescript [mono] [computer-modern,latin-modern] [name]
+\starttypescript [mono] [modern,computer-modern,latin-modern] [name]
\definefontsynonym [Mono] [ComputerModernMono]
\definefontsynonym [MonoBold] [ComputerModernMono-Bold]
\definefontsynonym [MonoItalic] [ComputerModernMono-Italic]
@@ -77,28 +77,28 @@
\definefontsynonym [MonoCaps] [ComputerModernMono-Caps]
\stoptypescript
-\starttypescript [math] [computer-modern,latin-modern] [name]
+\starttypescript [math] [modern,computer-modern,latin-modern] [name]
\definefontsynonym [MathRoman] [ComputerModernMath-Roman]
\definefontsynonym [MathExtension] [ComputerModernMath-Extension]
\definefontsynonym [MathItalic] [ComputerModernMath-Italic]
\definefontsynonym [MathSymbol] [ComputerModernMath-Symbol]
\stoptypescript
-\starttypescript [boldmath] [computer-modern,latin-modern] [name]
+\starttypescript [boldmath] [modern,computer-modern,latin-modern] [name]
\definefontsynonym [MathRoman] [ComputerModernMath-Roman-Bold]
\definefontsynonym [MathExtension] [ComputerModernMath-Extension]
\definefontsynonym [MathItalic] [ComputerModernMath-Italic-Bold]
\definefontsynonym [MathSymbol] [ComputerModernMath-Symbol-Bold]
\stoptypescript
-\starttypescript [bfmath] [computer-modern,latin-modern] [name]
+\starttypescript [bfmath] [modern,computer-modern,latin-modern] [name]
\definefontsynonym [MathRomanBold] [ComputerModernMath-Roman-Bold]
\definefontsynonym [MathExtension] [ComputerModernMath-Extension]
\definefontsynonym [MathItalicBold] [ComputerModernMath-Italic-Bold]
\definefontsynonym [MathSymbolBold] [ComputerModernMath-Symbol-Bold]
\stoptypescript
-\starttypescript [serif] [computer-modern-vari,latin-modern-vari] [name]
+\starttypescript [serif] [modern,computer-modern-vari,latin-modern-vari] [name]
\definefontsynonym [Serif] [ComputerModernMono-Variable]
\definefontsynonym [SerifBold] [Serif]
\definefontsynonym [SerifItalic] [Serif]
@@ -110,7 +110,7 @@
% This will change some day.
-\starttypescript [math] [computer-modern,latin-modern] [name]
+\starttypescript [math] [modern,computer-modern,latin-modern] [name]
\definefontsynonym [OldStyle] [MathItalic]
\definefontsynonym [Fraktur] [eufm10]
\definefontsynonym [Blackboard] [msbm10]
@@ -169,7 +169,7 @@
% American Math Society : Michael Spivak
-\starttypescript [math] [computer-modern,latin-modern,ams] [name]
+\starttypescript [math] [modern,computer-modern,latin-modern,ams] [name]
\definefontsynonym [MathAlpha] [AMS-SymbolA]
\definefontsynonym [MathBeta] [AMS-SymbolB]
\stoptypescript
@@ -448,6 +448,34 @@
\definefontsynonym [SansBoldItalic] [Iwona-BoldItalic] [encoding=\typescriptthree]
\stoptypescript
+\starttypescript [sans] [iwona-medium] [name]
+ \definefontsynonym [Sans] [Iwona-Medium] [encoding=\typescriptthree]
+ \definefontsynonym [SansItalic] [Iwona-MediumItalic] [encoding=\typescriptthree]
+ \definefontsynonym [SansBold] [Iwona-Heavy] [encoding=\typescriptthree]
+ \definefontsynonym [SansBoldItalic] [Iwona-HeavyItalic] [encoding=\typescriptthree]
+\stoptypescript
+
+\starttypescript [math] [iwona-light] [name]
+ \definefontsynonym [MathRoman] [Iwona-Math-Letters-Light]
+ \definefontsynonym [MathItalic] [Iwona-Math-Letters-LightItalic]
+ \definefontsynonym [MathSymbol] [Iwona-Math-Symbols-Light]
+ \definefontsynonym [MathExtension] [Iwona-Math-Extension-Light]
+\stoptypescript
+
+\starttypescript [math] [iwona] [name]
+ \definefontsynonym [MathRoman] [Iwona-Math-Letters-Regular]
+ \definefontsynonym [MathItalic] [Iwona-Math-Letters-RegularItalic]
+ \definefontsynonym [MathSymbol] [Iwona-Math-Symbols-Regular]
+ \definefontsynonym [MathExtension] [Iwona-Math-Extension-Regular]
+\stoptypescript
+
+\starttypescript [math] [iwona-medium] [name]
+ \definefontsynonym [MathRoman] [Iwona-Math-Letters-Medium]
+ \definefontsynonym [MathItalic] [Iwona-Math-Letters-MediumItalic]
+ \definefontsynonym [MathSymbol] [Iwona-Math-Symbols-Medium]
+ \definefontsynonym [MathExtension] [Iwona-Math-Extension-Medium]
+\stoptypescript
+
% Kurier
\starttypescript [sans] [kurier-light] [name]
@@ -464,6 +492,13 @@
\definefontsynonym [SansBoldItalic] [Kurier-BoldItalic] [encoding=\typescriptthree]
\stoptypescript
+\starttypescript [sans] [kurier-medium] [name]
+ \definefontsynonym [Sans] [Kurier-Medium] [encoding=\typescriptthree]
+ \definefontsynonym [SansItalic] [Kurier-MediumItalic] [encoding=\typescriptthree]
+ \definefontsynonym [SansBold] [Kurier-Heavy] [encoding=\typescriptthree]
+ \definefontsynonym [SansBoldItalic] [Kurier-HeavyItalic] [encoding=\typescriptthree]
+\stoptypescript
+
\starttypescript [math] [kurier-light] [name]
\definefontsynonym [MathRoman] [Kurier-Math-Letters-Light]
\definefontsynonym [MathItalic] [Kurier-Math-Letters-LightItalic]
@@ -478,6 +513,13 @@
\definefontsynonym [MathExtension] [Kurier-Math-Extension-Regular]
\stoptypescript
+\starttypescript [math] [kurier-medium] [name]
+ \definefontsynonym [MathRoman] [Kurier-Math-Letters-Medium]
+ \definefontsynonym [MathItalic] [Kurier-Math-Letters-MediumItalic]
+ \definefontsynonym [MathSymbol] [Kurier-Math-Symbols-Medium]
+ \definefontsynonym [MathExtension] [Kurier-Math-Extension-Medium]
+\stoptypescript
+
% Bookman :
\starttypescript [serif] [bookman] [name]
diff --git a/tex/context/base/unic-ini.tex b/tex/context/base/unic-ini.tex
index b3ba4ec53..1881eceb2 100644
--- a/tex/context/base/unic-ini.tex
+++ b/tex/context/base/unic-ini.tex
@@ -50,7 +50,7 @@
%D \NC262144(b_1-240)\NC+\NC4096(b_2-128)\NC+\NC64(b_3-128)\NC+\NC(b_4-128)\NC if 240<=b1<=247\NC \NR
%D \stoptabulate
%D
-%D A lot of information abou tunicode can be found on the
+%D A lot of information about unicode can be found on the
%D web (search for Markus Kuhn and unicode and you'll
%D probably end up at the right place).
diff --git a/tex/context/interface/cont-cz.xml b/tex/context/interface/cont-cz.xml
index 04ab11452..7929f1075 100644
--- a/tex/context/interface/cont-cz.xml
+++ b/tex/context/interface/cont-cz.xml
@@ -3972,7 +3972,7 @@
<cd:command name="product" type="environment">
<cd:sequence>
- <cd:string value="product"/>
+ <cd:string value="produkt"/>
</cd:sequence>
<cd:arguments>
<cd:file/>
@@ -5019,6 +5019,10 @@
<cd:constant type="ano"/>
<cd:constant type="ne"/>
</cd:parameter>
+ <cd:parameter name="cislooddilu">
+ <cd:constant type="ano"/>
+ <cd:constant type="ne"/>
+ </cd:parameter>
<cd:parameter name="cd:sectionnumber">
<cd:constant type="ano"/>
<cd:constant type="ne"/>
@@ -5943,6 +5947,13 @@
<cd:constant type="nastred"/>
<cd:variable type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="zaveseni">
+ <cd:constant type="zadny"/>
+ <cd:constant type="siroky"/>
+ <cd:constant type="prizpusobive"/>
+ <cd:constant type="radek"/>
+ <cd:variable type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="prikaz">
<cd:constant type="cd:twoarguments"/>
</cd:parameter>
diff --git a/tex/context/interface/cont-de.xml b/tex/context/interface/cont-de.xml
index 97cb29779..0247fdefb 100644
--- a/tex/context/interface/cont-de.xml
+++ b/tex/context/interface/cont-de.xml
@@ -3972,7 +3972,7 @@
<cd:command name="product" type="environment">
<cd:sequence>
- <cd:string value="product"/>
+ <cd:string value="produkt"/>
</cd:sequence>
<cd:arguments>
<cd:file/>
@@ -5019,6 +5019,10 @@
<cd:constant type="ja"/>
<cd:constant type="nein"/>
</cd:parameter>
+ <cd:parameter name="abschnittsnummer">
+ <cd:constant type="ja"/>
+ <cd:constant type="nein"/>
+ </cd:parameter>
<cd:parameter name="cd:sectionnumber">
<cd:constant type="ja"/>
<cd:constant type="nein"/>
@@ -5943,6 +5947,13 @@
<cd:constant type="mittig"/>
<cd:variable type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="haengend">
+ <cd:constant type="kein"/>
+ <cd:constant type="breit"/>
+ <cd:constant type="passend"/>
+ <cd:constant type="zeile"/>
+ <cd:variable type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="befehl">
<cd:constant type="cd:twoarguments"/>
</cd:parameter>
diff --git a/tex/context/interface/cont-en.xml b/tex/context/interface/cont-en.xml
index 2c16257e4..33a6f8917 100644
--- a/tex/context/interface/cont-en.xml
+++ b/tex/context/interface/cont-en.xml
@@ -5019,6 +5019,10 @@
<cd:constant type="yes"/>
<cd:constant type="no"/>
</cd:parameter>
+ <cd:parameter name="sectionnumber">
+ <cd:constant type="yes"/>
+ <cd:constant type="no"/>
+ </cd:parameter>
<cd:parameter name="cd:sectionnumber">
<cd:constant type="yes"/>
<cd:constant type="no"/>
@@ -5943,6 +5947,13 @@
<cd:constant type="middle"/>
<cd:variable type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="hang">
+ <cd:constant type="none"/>
+ <cd:constant type="broad"/>
+ <cd:constant type="fit"/>
+ <cd:constant type="line"/>
+ <cd:variable type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="command">
<cd:constant type="cd:twoarguments"/>
</cd:parameter>
diff --git a/tex/context/interface/cont-it.xml b/tex/context/interface/cont-it.xml
index 2f9183b5a..c1e9f3ec1 100644
--- a/tex/context/interface/cont-it.xml
+++ b/tex/context/interface/cont-it.xml
@@ -3972,7 +3972,7 @@
<cd:command name="product" type="environment">
<cd:sequence>
- <cd:string value="product"/>
+ <cd:string value="prodotto"/>
</cd:sequence>
<cd:arguments>
<cd:file/>
@@ -5019,6 +5019,10 @@
<cd:constant type="si"/>
<cd:constant type="no"/>
</cd:parameter>
+ <cd:parameter name="numerosezione">
+ <cd:constant type="si"/>
+ <cd:constant type="no"/>
+ </cd:parameter>
<cd:parameter name="cd:sectionnumber">
<cd:constant type="si"/>
<cd:constant type="no"/>
@@ -5943,6 +5947,13 @@
<cd:constant type="centro"/>
<cd:variable type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="sospendi">
+ <cd:constant type="nessuno"/>
+ <cd:constant type="ampio"/>
+ <cd:constant type="adatta"/>
+ <cd:constant type="riga"/>
+ <cd:variable type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="comando">
<cd:constant type="cd:twoarguments"/>
</cd:parameter>
diff --git a/tex/context/interface/cont-nl.xml b/tex/context/interface/cont-nl.xml
index 9b54e77cf..cbb842a78 100644
--- a/tex/context/interface/cont-nl.xml
+++ b/tex/context/interface/cont-nl.xml
@@ -3972,7 +3972,7 @@
<cd:command name="product" type="environment">
<cd:sequence>
- <cd:string value="product"/>
+ <cd:string value="produkt"/>
</cd:sequence>
<cd:arguments>
<cd:file/>
@@ -5019,6 +5019,10 @@
<cd:constant type="ja"/>
<cd:constant type="nee"/>
</cd:parameter>
+ <cd:parameter name="sectienummer">
+ <cd:constant type="ja"/>
+ <cd:constant type="nee"/>
+ </cd:parameter>
<cd:parameter name="cd:sectionnumber">
<cd:constant type="ja"/>
<cd:constant type="nee"/>
@@ -5943,6 +5947,13 @@
<cd:constant type="midden"/>
<cd:variable type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="hang">
+ <cd:constant type="geen"/>
+ <cd:constant type="ruim"/>
+ <cd:constant type="passend"/>
+ <cd:constant type="regel"/>
+ <cd:variable type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="commando">
<cd:constant type="cd:twoarguments"/>
</cd:parameter>
diff --git a/tex/context/interface/cont-ro.xml b/tex/context/interface/cont-ro.xml
index 007f88b50..ff05e0543 100644
--- a/tex/context/interface/cont-ro.xml
+++ b/tex/context/interface/cont-ro.xml
@@ -3972,7 +3972,7 @@
<cd:command name="product" type="environment">
<cd:sequence>
- <cd:string value="product"/>
+ <cd:string value="produs"/>
</cd:sequence>
<cd:arguments>
<cd:file/>
@@ -5019,6 +5019,10 @@
<cd:constant type="da"/>
<cd:constant type="nu"/>
</cd:parameter>
+ <cd:parameter name="numarsectiune">
+ <cd:constant type="da"/>
+ <cd:constant type="nu"/>
+ </cd:parameter>
<cd:parameter name="cd:sectionnumber">
<cd:constant type="da"/>
<cd:constant type="nu"/>
@@ -5943,6 +5947,13 @@
<cd:constant type="centru"/>
<cd:variable type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="suspenda">
+ <cd:constant type="niciunul"/>
+ <cd:constant type="broad"/>
+ <cd:constant type="ajustat"/>
+ <cd:constant type="linie"/>
+ <cd:variable type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="comanda">
<cd:constant type="cd:twoarguments"/>
</cd:parameter>
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index 02c1aef49..f8748f148 100644
--- a/tex/context/interface/keys-cz.xml
+++ b/tex/context/interface/keys-cz.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2005.08.03">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2005.08.15">
<cd:variables>
<cd:variable name="one" value="jedna"/>
@@ -1407,7 +1407,7 @@
<cd:command name="setups" value="nastaveni"/>
<cd:command name="project" value="projekt"/>
<cd:command name="component" value="komponenta"/>
- <cd:command name="produxt" value="produkt"/>
+ <cd:command name="product" value="produkt"/>
<cd:command name="environment" value="prostredi"/>
<cd:command name="nomorefiles" value="zadnedalsisoubory"/>
<cd:command name="getbuffer" value="ziskejbuffer"/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index d2bd86d2a..43c6f0838 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2005.08.03">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2005.08.15">
<cd:variables>
<cd:variable name="one" value="eins"/>
@@ -1407,7 +1407,7 @@
<cd:command name="setups" value="einstellungen"/>
<cd:command name="project" value="projekt"/>
<cd:command name="component" value="komponente"/>
- <cd:command name="produxt" value="produkt"/>
+ <cd:command name="product" value="produkt"/>
<cd:command name="environment" value="umgebung"/>
<cd:command name="nomorefiles" value="keinedateienmehr"/>
<cd:command name="getbuffer" value="holepuffer"/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index 93122c2c3..8bbc01db4 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2005.08.03">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2005.08.15">
<cd:variables>
<cd:variable name="one" value="one"/>
@@ -1407,7 +1407,7 @@
<cd:command name="setups" value="setups"/>
<cd:command name="project" value="project"/>
<cd:command name="component" value="component"/>
- <cd:command name="produxt" value="product"/>
+ <cd:command name="product" value="product"/>
<cd:command name="environment" value="environment"/>
<cd:command name="nomorefiles" value="nomorefiles"/>
<cd:command name="getbuffer" value="getbuffer"/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 03bbe48d0..c0ed7a5fd 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2005.08.03">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2005.08.15">
<cd:variables>
<cd:variable name="one" value="uno"/>
@@ -1407,7 +1407,7 @@
<cd:command name="setups" value="impostazioni"/>
<cd:command name="project" value="progetto"/>
<cd:command name="component" value="componenet"/>
- <cd:command name="produxt" value="prodotto"/>
+ <cd:command name="product" value="prodotto"/>
<cd:command name="environment" value="ambiente"/>
<cd:command name="nomorefiles" value="bastafile"/>
<cd:command name="getbuffer" value="prendibuffer"/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index 219fb9eec..04c956b1a 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2005.08.03">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2005.08.15">
<cd:variables>
<cd:variable name="one" value="een"/>
@@ -1407,7 +1407,7 @@
<cd:command name="setups" value="instellingen"/>
<cd:command name="project" value="project"/>
<cd:command name="component" value="onderdeel"/>
- <cd:command name="produxt" value="produkt"/>
+ <cd:command name="product" value="produkt"/>
<cd:command name="environment" value="omgeving"/>
<cd:command name="nomorefiles" value="geenfilesmeer"/>
<cd:command name="getbuffer" value="haalbuffer"/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index 93cd9da49..7fdf9898f 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2005.08.03">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2005.08.15">
<cd:variables>
<cd:variable name="one" value="unu"/>
@@ -1407,7 +1407,7 @@
<cd:command name="setups" value="setari"/>
<cd:command name="project" value="proiect"/>
<cd:command name="component" value="componenta"/>
- <cd:command name="produxt" value="produs"/>
+ <cd:command name="product" value="produs"/>
<cd:command name="environment" value="mediu"/>
<cd:command name="nomorefiles" value="farafisiere"/>
<cd:command name="getbuffer" value="adubuffer"/>
diff --git a/tex/context/sample/reich.tex b/tex/context/sample/reich.tex
index 3be5ae42e..db9d4404f 100644
--- a/tex/context/sample/reich.tex
+++ b/tex/context/sample/reich.tex
@@ -1,11 +1,11 @@
-\citaat {Heavy smoke}
-\citaat {Stand by, stand by}
-\citaat {It's full a' smoke}
-\citaat {Full a' smoke}
-\citaat {Urgent}
-\citaat {Guns, knives or weapons on ya?}
-\citaat {Wha' were ya doin'?}
-\citaat {Be careful}
-\citaat {Where you go}
-\citaat {Careful}
-\citaat {Stand by}
+\quotation {Heavy smoke}
+\quotation {Stand by, stand by}
+\quotation {It's full a' smoke}
+\quotation {Full a' smoke}
+\quotation {Urgent}
+\quotation {Guns, knives or weapons on ya?}
+\quotation {Wha' were ya doin'?}
+\quotation {Be careful}
+\quotation {Where you go}
+\quotation {Careful}
+\quotation {Stand by}
diff --git a/web2c/context.cnf b/web2c/context.cnf
index 20cf2d4af..a2038e56d 100644
--- a/web2c/context.cnf
+++ b/web2c/context.cnf
@@ -115,7 +115,15 @@ RUBYINPUTS = .;$CTXDEVRBPATH//;$TEXMF/scripts/context/ruby//;$TEXMF/{context/r
LUAINPUTS = .;$CTXDEVJVPATH//;$TEXMF/scripts/context/lua//;$TEXMF/{context/lua,lua}//
JAVAINPUTS = .;$CTXDEVJVPATH//;$TEXMF/scripts/context/java//;$TEXMF/{context/java,java}//
-TEXMFSCRIPTS = .;$CTXDEVRBPATH//;$CTXDEVPLPATH//;$TEXMF/scripts/context//;$TEXMF/scripts//
+TEXMFSCRIPTS = .;$CTXDEVRBPATH//;$CTXDEVLUPATH//;$CTXDEVPLPATH//;$TEXMF/scripts/context//;$TEXMF/scripts//
+
+% RUBYINPUTS = .;$CTXDEVPLPATH//;$TEXMF/scripts/{$progname,$engine,}/ruby//;$TEXMF/{context/ruby,ruby}//
+% LUAINPUTS = .;$CTXDEVPYPATH//;$TEXMF/scripts/{$progname,$engine,}/lua//;$TEXMF/{context/lua,lua}//
+% PYTHONINPUTS = .;$CTXDEVRBPATH//;$TEXMF/scripts/{$progname,$engine,}/python//;$TEXMF/{context/python,python}//
+% PERLINPUTS = .;$CTXDEVJVPATH//;$TEXMF/scripts/{$progname,$engine,}/perl//;$TEXMF/{context/perl,context/perltk,perl,perltk}//
+% JAVAINPUTS = .;$CTXDEVJVPATH//;$TEXMF/scripts/{$progname,$engine,}/java//;$TEXMF/{context/java,java}//
+
+% TEXMFSCRIPTS = .;$CTXDEVRBPATH//;$CTXDEVLUPATH//;$CTXDEVPLPATH//;$TEXMF/scripts/{$engine,$progname,}//
% features