summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2004-03-09 00:00:00 +0100
committerHans Hagen <pragma@wxs.nl>2004-03-09 00:00:00 +0100
commitb3e51f52d2070a709e3089ada6054cd2080590ca (patch)
treeb14c8903849be35210f217cfa559862a750a87fd
parentaff54a32fba80a11d2349133324c2c90064b938b (diff)
downloadcontext-b3e51f52d2070a709e3089ada6054cd2080590ca.tar.gz
stable 2004.03.09
-rw-r--r--context/data/cont-cz.tws3
-rw-r--r--context/data/cont-de.tws3
-rw-r--r--context/data/cont-en.tws3
-rw-r--r--context/data/cont-it.tws3
-rw-r--r--context/data/cont-nl.tws3
-rw-r--r--context/data/cont-ro.tws3
-rw-r--r--context/data/type-buy.dat24
-rw-r--r--context/data/type-fsf.dat8
-rw-r--r--context/data/type-ghz.dat5
-rw-r--r--context/data/type-tmf.dat73
-rw-r--r--context/perltk/makempy.pl364
-rw-r--r--context/perltk/texexec.pl4
-rw-r--r--context/perltk/texfont.pl657
-rw-r--r--dvips/config/context.map1
-rw-r--r--fonts/map/context/il2-ams-cmr.map56
-rw-r--r--fonts/map/context/original-adobe-euro.map25
-rw-r--r--fonts/map/context/original-ams-cmr.map122
-rw-r--r--fonts/map/context/original-ams-euler.map19
-rw-r--r--fonts/map/context/original-ams-lmr.map54
-rw-r--r--fonts/map/context/original-context-symbol.map1
-rw-r--r--fonts/map/context/original-micropress-informal.map7
-rw-r--r--fonts/map/context/original-vogel-symbol.map2
-rw-r--r--fonts/map/context/original-youngryu-px.map47
-rw-r--r--fonts/map/context/original-youngryu-tx.map86
-rw-r--r--fonts/map/context/pl0-ams-cmr.map77
-rw-r--r--fonts/map/context/psclean.map1197
-rw-r--r--fonts/map/context/texnansi-bh-lucida.map55
-rw-r--r--fonts/map/context/texnansi-public-antp.map18
-rw-r--r--fonts/map/context/texnansi-public-antt.map17
-rw-r--r--metapost/context/base/mp-tool.mp41
-rw-r--r--tex/context/base/colo-ini.tex19
-rw-r--r--tex/context/base/cont-fil.tex2
-rw-r--r--tex/context/base/cont-new.tex581
-rw-r--r--tex/context/base/context.tex14
-rw-r--r--tex/context/base/core-buf.tex82
-rw-r--r--tex/context/base/core-des.tex47
-rw-r--r--tex/context/base/core-fig.tex47
-rw-r--r--tex/context/base/core-fil.tex28
-rw-r--r--tex/context/base/core-fld.tex487
-rw-r--r--tex/context/base/core-grd.tex2
-rw-r--r--tex/context/base/core-int.tex43
-rw-r--r--tex/context/base/core-job.tex21
-rw-r--r--tex/context/base/core-ltb.tex45
-rw-r--r--tex/context/base/core-mis.tex42
-rw-r--r--tex/context/base/core-nav.tex6
-rw-r--r--tex/context/base/core-new.tex60
-rw-r--r--tex/context/base/core-not.tex45
-rw-r--r--tex/context/base/core-ntb.tex197
-rw-r--r--tex/context/base/core-obj.tex30
-rw-r--r--tex/context/base/core-pos.tex227
-rw-r--r--tex/context/base/core-ref.tex178
-rw-r--r--tex/context/base/core-rul.tex22
-rw-r--r--tex/context/base/core-sec.tex224
-rw-r--r--tex/context/base/core-snc.tex132
-rw-r--r--tex/context/base/core-spa.tex2
-rw-r--r--tex/context/base/core-tab.tex8
-rw-r--r--tex/context/base/core-tbl.tex163
-rw-r--r--tex/context/base/core-var.tex49
-rw-r--r--tex/context/base/docs-ini.tex40
-rw-r--r--tex/context/base/enco-mis.tex72
-rw-r--r--tex/context/base/font-ini.tex16
-rw-r--r--tex/context/base/font-run.tex4
-rw-r--r--tex/context/base/java-fld.tex16
-rw-r--r--tex/context/base/java-ini.tex279
-rw-r--r--tex/context/base/lang-frq.tex17
-rw-r--r--tex/context/base/list-ini.tex39
-rw-r--r--tex/context/base/m-chart.tex134
-rw-r--r--tex/context/base/m-layout.tex10
-rw-r--r--tex/context/base/m-quest.tex94
-rw-r--r--tex/context/base/meta-clp.tex56
-rw-r--r--tex/context/base/meta-ini.tex116
-rw-r--r--tex/context/base/mult-com.tex7
-rw-r--r--tex/context/base/mult-con.tex8
-rw-r--r--tex/context/base/mult-sys.tex5
-rw-r--r--tex/context/base/page-bck.tex16
-rw-r--r--tex/context/base/page-flt.tex155
-rw-r--r--tex/context/base/page-imp.tex6
-rw-r--r--tex/context/base/page-ini.tex27
-rw-r--r--tex/context/base/page-lay.tex126
-rw-r--r--tex/context/base/page-lyr.tex333
-rw-r--r--tex/context/base/page-mar.tex42
-rw-r--r--tex/context/base/page-new.tex124
-rw-r--r--tex/context/base/page-run.tex20
-rw-r--r--tex/context/base/page-set.tex503
-rw-r--r--tex/context/base/page-txt.tex18
-rw-r--r--tex/context/base/prop-ini.tex119
-rw-r--r--tex/context/base/prop-lay.tex78
-rw-r--r--tex/context/base/s-mag-01.tex82
-rw-r--r--tex/context/base/setupb.tex6
-rw-r--r--tex/context/base/spec-def.tex331
-rw-r--r--tex/context/base/spec-fdf.tex464
-rw-r--r--tex/context/base/spec-ini.tex163
-rw-r--r--tex/context/base/spec-tpd.tex16
-rw-r--r--tex/context/base/supp-box.tex73
-rw-r--r--tex/context/base/supp-emp.tex180
-rw-r--r--tex/context/base/supp-lan.tex117
-rw-r--r--tex/context/base/supp-mis.tex50
-rw-r--r--tex/context/base/supp-mpe.tex3
-rw-r--r--tex/context/base/supp-mps.tex14
-rw-r--r--tex/context/base/supp-pdf.tex78
-rw-r--r--tex/context/base/symb-nav.tex134
-rw-r--r--tex/context/base/syst-con.tex104
-rw-r--r--tex/context/base/syst-ext.tex42
-rw-r--r--tex/context/base/syst-gen.tex25
-rw-r--r--tex/context/base/syst-new.tex4
-rw-r--r--tex/context/base/thrd-ran.tex56
-rw-r--r--tex/context/base/thrd-trg.tex10
-rw-r--r--tex/context/base/type-enc.tex2
-rw-r--r--tex/context/base/type-ghz.tex14
-rw-r--r--tex/context/base/type-ini.tex2
-rw-r--r--tex/context/base/type-map.tex6
-rw-r--r--tex/context/base/x-res-01.tex6
-rw-r--r--tex/context/base/x-res-02.tex22
-rw-r--r--tex/context/base/x-res-50.tex415
-rw-r--r--tex/context/base/xtag-xsl.tex94
-rw-r--r--tex/context/sample/tufte.tex26
-rw-r--r--tex/context/sample/ward.tex2
117 files changed, 7599 insertions, 3203 deletions
diff --git a/context/data/cont-cz.tws b/context/data/cont-cz.tws
index 2edbcd0ae..e5fabf138 100644
--- a/context/data/cont-cz.tws
+++ b/context/data/cont-cz.tws
@@ -361,6 +361,7 @@ var:textovyprikaz:*\prikaz#1::
var:split:tolerantni,striktni,velmistriktni,*cislo::
var:styltextu:normalni,tucne,sklonene,tucnesklonene,opis,kap,male...,*prikaz::
var:barvatextu:*jmeno::
+var:interakce:ano,ne::
ivr:oramovani::
stopsetup
@@ -1922,7 +1923,7 @@ stopsetup
startsetup
com:strana:
typ:vals/:
-val:ano,zlom,ne,nastaveni,vysokapriorita, vlevo,vpravo,zablokovat,posledni,ctyrnasobny, sude,liche,prazdny,prazdne,reset:ano:
+val:ano,zlom,ne,nastaveni,vysokapriorita, vlevo,vpravo,zablokovat,posledni,ctyrnasobny, sude,liche,prazdny,prazdne,reset,start,stop:ano:
stopsetup
startsetup
diff --git a/context/data/cont-de.tws b/context/data/cont-de.tws
index 54db10f48..b59ee1b5f 100644
--- a/context/data/cont-de.tws
+++ b/context/data/cont-de.tws
@@ -361,6 +361,7 @@ var:textbefehl:*\Befehl#1::
var:split:tolerant,streng,sehrstreng,*Nummer::
var:textstil:normal,fett,geneigt,fettgeneigt,tippen,kap,klein...,*Befehl::
var:textfarbe:*Name::
+var:interaktion:ja,nein::
ivr:umrahmt::
stopsetup
@@ -1922,7 +1923,7 @@ stopsetup
startsetup
com:seite:
typ:vals/:
-val:ja,umbruch,nein,einstellung,grosszuegig, links,rechts,sperren,letzte,viertel, gerade,ungerade,blanko,leer,zuruecksetzten:ja:
+val:ja,umbruch,nein,einstellung,grosszuegig, links,rechts,sperren,letzte,viertel, gerade,ungerade,blanko,leer,zuruecksetzten,start,stop:ja:
stopsetup
startsetup
diff --git a/context/data/cont-en.tws b/context/data/cont-en.tws
index 833e6e70f..d48f8472e 100644
--- a/context/data/cont-en.tws
+++ b/context/data/cont-en.tws
@@ -361,6 +361,7 @@ var:textcommand:*\command#1::
var:split:tolerant,strict,verystrict,*number::
var:textstyle:normal,bold,slanted,boldslanted,type,cap,small...,*command::
var:textcolor:*name::
+var:interaction:yes,no::
ivr:framed::
stopsetup
@@ -1922,7 +1923,7 @@ stopsetup
startsetup
com:page:
typ:vals/:
-val:yes,makeup,no,preference,bigpreference, left,right,disable,last,quadruple, even,odd,blank,empty,reset:yes:
+val:yes,makeup,no,preference,bigpreference, left,right,disable,last,quadruple, even,odd,blank,empty,reset,start,stop:yes:
stopsetup
startsetup
diff --git a/context/data/cont-it.tws b/context/data/cont-it.tws
index 69fbd0cef..8b97c9d8d 100644
--- a/context/data/cont-it.tws
+++ b/context/data/cont-it.tws
@@ -361,6 +361,7 @@ var:comandotesto:*\comando#1::
var:separa:tollerante,rigido,moltorigido,*numero::
var:stiletesto:normale,grassetto,inclinato,grassettoinclinato,type,cap,piccolo...,*comando::
var:coloretesto:*nome::
+var:interazione:si,no::
ivr:incorniciato::
stopsetup
@@ -1922,7 +1923,7 @@ stopsetup
startsetup
com:pagina:
typ:vals/:
-val:si,makeup,no,preferenza,grandepreferenza, sinistra,destra,disattiva,ultimo,quadruplo, pari,dispari,rigovuoto,vuoto,reimposta:si:
+val:si,makeup,no,preferenza,grandepreferenza, sinistra,destra,disattiva,ultimo,quadruplo, pari,dispari,rigovuoto,vuoto,reimposta,inizia,termina:si:
stopsetup
startsetup
diff --git a/context/data/cont-nl.tws b/context/data/cont-nl.tws
index d659e6a51..bbb89e537 100644
--- a/context/data/cont-nl.tws
+++ b/context/data/cont-nl.tws
@@ -361,6 +361,7 @@ var:tekstcommando:*\commando#1::
var:splitsen:soepel,streng,zeerstreng,*getal::
var:tekstletter:normaal,vet,schuin,vetschuin,type,kap,klein...,*commando::
var:tekstkleur:*naam::
+var:interactie:ja,nee::
ivr:omlijnd::
stopsetup
@@ -1922,7 +1923,7 @@ stopsetup
startsetup
com:pagina:
typ:vals/:
-val:ja,opmaak,nee,voorkeur,grotevoorkeur, links,rechts,blokkeer,laatste,viertal, even,oneven,blanko,leeg,reset:ja:
+val:ja,opmaak,nee,voorkeur,grotevoorkeur, links,rechts,blokkeer,laatste,viertal, even,oneven,blanko,leeg,reset,start,stop:ja:
stopsetup
startsetup
diff --git a/context/data/cont-ro.tws b/context/data/cont-ro.tws
index 309fb42e4..e28483ec4 100644
--- a/context/data/cont-ro.tws
+++ b/context/data/cont-ro.tws
@@ -361,6 +361,7 @@ var:comandatext:*\comanda#1::
var:split:tolerant,strict,foartestrict,*numar::
var:stiltext:normal,aldin,inclinat,aldininclinat,type,cap,mic...,*comanda::
var:culoaretext:*nume::
+var:interactiune:da,nu::
ivr:framed::
stopsetup
@@ -1922,7 +1923,7 @@ stopsetup
startsetup
com:pagina:
typ:vals/:
-val:da,marcaj,nu,preferinta,preferintamare, stanga,dreapta,dezactivat,ultim,cvadrupul, par,impar,blank,gol,reset:da:
+val:da,marcaj,nu,preferinta,preferintamare, stanga,dreapta,dezactivat,ultim,cvadrupul, par,impar,blank,gol,reset,start,stop:da:
stopsetup
startsetup
diff --git a/context/data/type-buy.dat b/context/data/type-buy.dat
index 0655f7fab..b3d52d29d 100644
--- a/context/data/type-buy.dat
+++ b/context/data/type-buy.dat
@@ -1,6 +1,6 @@
# itc officina
---en=? --ve=itc --co=officina --re
+--en=? --ve=itc --co=officina --re
--en=? --ve=itc --co=officina --so=itc/officina --ma --in
--en=? --ve=itc --co=officina --so=itc/officina --ca=* ovbk_*
@@ -14,7 +14,7 @@
# bh lucida
--en=? --ve=bh --co=lucida --re
---en=? --ve=bh --co=lucida --so=bh/lucida --ma --in
+--en=? --ve=bh --co=lucida --so=bh/lucida --ma --in --expert
# fontfont meta
@@ -45,7 +45,7 @@
--en=? --ve=creative --co=industria --re
--en=? --ve=creative --co=industria --so=creative/industria --ma --in
-# creative insignia
+# creative insignia
--en=? --ve=creative --co=insignia --re
--en=? --ve=creative --co=insignia --so=creative/insignia --ma --in
@@ -55,12 +55,12 @@
--en=? --ve=fontfont --co=din --re
--en=? --ve=fontfont --co=din --so=fontfont/din --ma --in
-# adobe myriad
+# adobe myriad
--en=? --so=adobe/myriad --weight=400 --width=600 MyriadMM
--en=? --so=adobe/myriad --weight=700 --width=600 MyriadMM
---en=? --so=adobe/myriad --weight=400 --width=600 MyriadMM-It
---en=? --so=adobe/myriad --weight=700 --width=600 MyriadMM-It
+--en=? --so=adobe/myriad --weight=400 --width=600 MyriadMM-It
+--en=? --so=adobe/myriad --weight=700 --width=600 MyriadMM-It
--en=? --ve=adobe --co=myriad --so=adobe/myriad --ma --in MyriadMM-we*
--en=? --ve=adobe --co=myriad --so=adobe/myriad --ma --in MyriadMM-It-we*
@@ -73,22 +73,22 @@
--en=? --ve=adobe --co=frutiger --re
--en=? --ve=adobe --co=frutiger --so=adobe/frutiger --ma --in
-# itc mendoza
+# itc mendoza
--en=? --ve=itc --co=mendoza --re
--en=? --ve=itc --co=mendoza --so=itc/mendoza --ma --in
-# linotype univers
+# linotype univers
--en=? --ve=linotype --co=univers --re
--en=? --ve=linotype --co=univers --so=linotype/univers --ma --in
-# adobe utopia
-#
+# adobe utopia
+#
# --en=? --ve=adobe --co=utopia --re
# --en=? --ve=adobe --co=utopia --so=adobe/utopia --ma --in
-# itc kabel
+# itc kabel
--en=? --ve=itc --co=kabel --re
---en=? --ve=itc --co=kabel --so=itc/kabel --ma --in
+--en=? --ve=itc --co=kabel --so=itc/kabel --ma --in \ No newline at end of file
diff --git a/context/data/type-fsf.dat b/context/data/type-fsf.dat
index df57ed362..7ccec15a4 100644
--- a/context/data/type-fsf.dat
+++ b/context/data/type-fsf.dat
@@ -1,4 +1,4 @@
-# fontsite opus
+# fontsite opus
--en=? --ve=fontsite --co=opus --re
--en=? --ve=fontsite --co=opus --so=fontsite/500 --ma --in opus*
@@ -14,10 +14,10 @@
--en=? --ve=fontsite --co=typewriter --so=fontsite/500 --sl=* typerg_*
--en=? --ve=fontsite --co=typewriter --so=fontsite/500 --sl=* typeb_*
-# fontsite garamond
+# fontsite garamond
--en=? --ve=fontsite --co=garamond --re
--en=? --ve=fontsite --co=garamond --so=fontsite/500 --ma --in gara*
---en=? --ve=fontsite --co=garamond --so=fontsite/500 --sl=* garai_*
---en=? --ve=fontsite --co=garamond --so=fontsite/500 --sl=* garab_*
+--en=? --ve=fontsite --co=garamond --so=fontsite/500 --sl=* garamond*
+--en=? --ve=fontsite --co=garamond --so=fontsite/500 --sl=* garab_* \ No newline at end of file
diff --git a/context/data/type-ghz.dat b/context/data/type-ghz.dat
index a59ada772..5e2b59360 100644
--- a/context/data/type-ghz.dat
+++ b/context/data/type-ghz.dat
@@ -28,7 +28,10 @@
# linotype kompakt
-# linotype linotype-zapfino
+# linotype zapfino
+
+--en=? --ve=linotype --co=zapfino --re
+--en=? --ve=linotype --co=zapfino --so=ghz/linotype-zapfino --ma --in
# linotype marconi
diff --git a/context/data/type-tmf.dat b/context/data/type-tmf.dat
index 433e491ee..af727b2e9 100644
--- a/context/data/type-tmf.dat
+++ b/context/data/type-tmf.dat
@@ -6,62 +6,67 @@
# public antp
---en=? --ve=public --co=antp --so=auto
+--en=? --ve=public --co=antp --so=auto --ro=TEXMFMAIN
# public antt
---en=? --ve=public --co=antt --so=auto
+--en=? --ve=public --co=antt --so=auto --ro=TEXMFMAIN
# urw helvetica
---en=? --ve=urw --co=helvetica --so=auto
+--en=? --ve=urw --co=helvetica --so=auto --ro=TEXMFMAIN
# urw courier
---en=? --ve=urw --co=courier --so=auto
+--en=? --ve=urw --co=courier --so=auto --ro=TEXMFMAIN
+
+# urw zapfchan
+
+--en=? --ve=urw --co=zapfchan --so=auto --ro=TEXMFMAIN
# urw times
---en=? --ve=urw --co=times --so=auto
---en=? --ve=urw --co=times --so=auto --ca=* utmr8a
---en=? --ve=urw --co=times --so=auto --sl=* utmr8a
---en=? --ve=urw --co=times --so=auto --sl=* utmb8a
+--en=? --ve=urw --co=times --so=auto --ro=TEXMFMAIN
+--en=? --ve=urw --co=times --so=auto --ca=* utmr8a --ro=TEXMFMAIN
+--en=? --ve=urw --co=times --so=auto --sl=* utmr8a --ro=TEXMFMAIN
+--en=? --ve=urw --co=times --so=auto --sl=* utmb8a --ro=TEXMFMAIN
# urw palatino
---en=? --ve=urw --co=palatino --so=auto
---en=? --ve=urw --co=palatino --so=auto --ca=* uplr8a
---en=? --ve=urw --co=palatino --so=auto --sl=* uplr8a
---en=? --ve=urw --co=palatino --so=auto --sl=* uplb8a
+--en=? --ve=urw --co=palatino --so=auto --ro=TEXMFMAIN
+--en=? --ve=urw --co=palatino --so=auto --ca=* uplr8a --ro=TEXMFMAIN
+--en=? --ve=urw --co=palatino --so=auto --sl=* uplr8a --ro=TEXMFMAIN
+--en=? --ve=urw --co=palatino --so=auto --sl=* uplb8a --ro=TEXMFMAIN
-# adbobe utopia
+# adobe utopia
---en=? --ve=adobe --co=utopia --so=auto
---en=? --ve=adobe --co=utopia --so=auto --ca=* putr8a
---en=? --ve=adobe --co=utopia --so=auto --sl=* putr8a
---en=? --ve=adobe --co=utopia --so=auto --sl=* putb8a
+--en=? --ve=adobe --co=utopia --so=auto --ro=TEXMFMAIN
+--en=? --ve=adobe --co=utopia --so=auto --ca=* putr8a --ro=TEXMFMAIN
+--en=? --ve=adobe --co=utopia --so=auto --sl=* putr8a --ro=TEXMFMAIN
+--en=? --ve=adobe --co=utopia --so=auto --sl=* putb8a --ro=TEXMFMAIN
-# bit charter
+--en=? --ve=adobe --co=utopia --so=auto --ro=TEXMFEXTRA # texlive 2003+
+--en=? --ve=adobe --co=utopia --so=auto --ca=* putr8a --ro=TEXMFEXTRA # texlive 2003+
+--en=? --ve=adobe --co=utopia --so=auto --sl=* putr8a --ro=TEXMFEXTRA # texlive 2003+
+--en=? --ve=adobe --co=utopia --so=auto --sl=* putb8a --ro=TEXMFEXTRA # texlive 2003+
---en=? --ve=bitstrea --co=charter --so=auto
---en=? --ve=bitstrea --co=charter --so=auto --ca=* bchr8a
---en=? --ve=bitstrea --co=charter --so=auto --sl=* bchr8a
---en=? --ve=bitstrea --co=charter --so=auto --sl=* bchb8a
+# bitstream charter
-# uwr bookman
+--en=? --ve=bitstrea --co=charter --so=auto --ro=TEXMFMAIN
+--en=? --ve=bitstrea --co=charter --so=auto --ca=* bchr8a --ro=TEXMFMAIN
+--en=? --ve=bitstrea --co=charter --so=auto --sl=* bchr8a --ro=TEXMFMAIN
+--en=? --ve=bitstrea --co=charter --so=auto --sl=* bchb8a --ro=TEXMFMAIN
---en=? --ve=urw --co=bookman --so=auto
---en=? --ve=urw --co=bookman --so=auto --ca=* ubkl8a
---en=? --ve=urw --co=bookman --so=auto --sl=* ubkl8a
---en=? --ve=urw --co=bookman --so=auto --sl=* ubkd8a
-
-# urw zapfchan
+# uwr bookman
---en=? --ve=urw --co=zapfchan --so=auto
+--en=? --ve=urw --co=bookman --so=auto --ro=TEXMFMAIN
+--en=? --ve=urw --co=bookman --so=auto --ca=* ubkl8a --ro=TEXMFMAIN
+--en=? --ve=urw --co=bookman --so=auto --sl=* ubkl8a --ro=TEXMFMAIN
+--en=? --ve=urw --co=bookman --so=auto --sl=* ubkd8a --ro=TEXMFMAIN
# uwr schoolbook
---en=? --ve=urw --co=ncntrsbk --so=auto
---en=? --ve=urw --co=ncntrsbk --so=auto --ca=* uncr8a
---en=? --ve=urw --co=ncntrsbk --so=auto --sl=* uncr8a
---en=? --ve=urw --co=ncntrsbk --so=auto --sl=* uncb8a \ No newline at end of file
+--en=? --ve=urw --co=ncntrsbk --so=auto --ro=TEXMFMAIN
+--en=? --ve=urw --co=ncntrsbk --so=auto --ca=* uncr8a --ro=TEXMFMAIN
+--en=? --ve=urw --co=ncntrsbk --so=auto --sl=* uncr8a --ro=TEXMFMAIN
+--en=? --ve=urw --co=ncntrsbk --so=auto --sl=* uncb8a --ro=TEXMFMAIN \ No newline at end of file
diff --git a/context/perltk/makempy.pl b/context/perltk/makempy.pl
index ef8fa3cfc..3efbce4e0 100644
--- a/context/perltk/makempy.pl
+++ b/context/perltk/makempy.pl
@@ -4,8 +4,8 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
#D \module
#D [ file=makempy.pl,
#D version=2000.12.14,
-#D title=\METAFUN,
-#D subtitle=\METAPOST\ Text Graphics,
+#D title=\METAFUN,
+#D subtitle=\METAPOST\ Text Graphics,
#D author=Hans Hagen,
#D date=\currentdate,
#D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
@@ -14,129 +14,129 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
#C therefore copyrighted by \PRAGMA. See licen-en.pdf for
#C details.
-# Tobias Burnus provided the code needed to proper testing
-# of binaries on UNIX as well as did some usefull suggestions
-# to improve the functionality.
-
-# This script uses GhostScript and PStoEdit as well as
-# pdfTeX, and if requested TeXEdit and ConTeXt.
+# Tobias Burnus provided the code needed to proper testing
+# of binaries on UNIX as well as did some usefull suggestions
+# to improve the functionality.
+
+# This script uses GhostScript and PStoEdit as well as
+# pdfTeX, and if requested TeXEdit and ConTeXt.
use Getopt::Long ;
-use Config ;
-use strict ;
+use Config ;
+use strict ;
$Getopt::Long::passthrough = 1 ; # no error message
$Getopt::Long::autoabbrev = 1 ; # partial switch accepted
-my $help = 0 ;
-my $silent = 0 ;
+my $help = 0 ;
+my $silent = 0 ;
my $force = 0 ;
-my $noclean = 0 ;
+my $noclean = 0 ;
-my $amethod = my $pmethod = my $gmethod = 0 ;
+my $amethod = my $pmethod = my $gmethod = 0 ;
-my $format = "plain" ; # can be "context" for plain users too
+my $format = "plain" ; # can be "context" for plain users too
&GetOptions
( "help" => \$help ,
"silent" => \$silent ,
- "force" => \$force ,
- "pdftops" => \$pmethod ,
- "xpdf" => \$pmethod ,
- "acrobat" => \$amethod ,
- "reader" => \$amethod ,
- "gs" => \$gmethod ,
- "ghostscript" => \$gmethod ,
+ "force" => \$force ,
+ "pdftops" => \$pmethod ,
+ "xpdf" => \$pmethod ,
+ "acrobat" => \$amethod ,
+ "reader" => \$amethod ,
+ "gs" => \$gmethod ,
+ "ghostscript" => \$gmethod ,
"noclean" => \$noclean ) ;
-
-my $mpochecksum = 0 ;
-my %tex ; my %start ; my %stop ;
+my $mpochecksum = 0 ;
+
+my %tex ; my %start ; my %stop ;
$tex{plain} = "pdftex" ;
$tex{latex} = "pdflatex" ;
-$tex{context} = "texexec --batch --once --interface=en --pdf" ;
+$tex{context} = "texexec --batch --once --interface=en --pdf" ;
-$start{plain} = '' ;
+$start{plain} = '' ;
$stop{plain} = '\end' ;
-$start{latex} = '\begin{document}' ;
+$start{latex} = '\begin{document}' ;
$stop{latex} = '\end{document}' ;
-$start{context} = '\starttext' ;
-$stop{context} = '\stoptext' ;
+$start{context} = '\starttext' ;
+$stop{context} = '\stoptext' ;
-my $ghostscript = "" ;
-my $pstoedit = "" ;
-my $pdftops = "" ;
-my $acroread = "" ;
+my $ghostscript = "" ;
+my $pstoedit = "" ;
+my $pdftops = "" ;
+my $acroread = "" ;
my $wereondos = ($Config{'osname'} =~ /dos|mswin/io) ;
# Unix only: assume that "gs" in the path. We could also
-# use $ghostscipt = system "which gs" but this would require
+# use $ghostscipt = system "which gs" but this would require
# that which is installedd on the system.
sub checkenv
- { my ($var, $env) = @_ ;
- if ($var)
- { return $var }
- elsif ($ENV{$env})
- { return $ENV{$env} }
- else
+ { my ($var, $env) = @_ ;
+ if ($var)
+ { return $var }
+ elsif ($ENV{$env})
+ { return $ENV{$env} }
+ else
{ return $var } }
-
-$ghostscript = checkenv ($ghostscript, "GS_PROG" ) ;
+
+$ghostscript = checkenv ($ghostscript, "GS_PROG" ) ;
$ghostscript = checkenv ($ghostscript, "GS" ) ;
$pstoedit = checkenv ($pstoedit , "PSTOEDIT") ;
$pdftops = checkenv ($pdftops , "PDFTOPS" ) ;
$acroread = checkenv ($acroread , "ACROREAD") ;
sub setenv
- { my ($var, $unix, $win) = @_ ;
- if ($var)
- { return $var }
- elsif ($wereondos)
- { return $win }
- else
+ { my ($var, $unix, $win) = @_ ;
+ if ($var)
+ { return $var }
+ elsif ($wereondos)
+ { return $win }
+ else
{ return $unix } }
-$ghostscript = setenv($ghostscript, "gs" , "gswin32c") ;
-$pstoedit = setenv($pstoedit , "pstoedit", "pstoedit") ;
-$pdftops = setenv($pdftops , "pdftops" , "pdftops" ) ;
-$acroread = setenv($acroread , "acroread", "" ) ;
+$ghostscript = setenv($ghostscript, "gs" , "gswin32c") ;
+$pstoedit = setenv($pstoedit , "pstoedit", "pstoedit") ;
+$pdftops = setenv($pdftops , "pdftops" , "pdftops" ) ;
+$acroread = setenv($acroread , "acroread", "" ) ;
+
+# Force a method if unknown.
-# Force a method if unknown.
+unless ($pmethod||$amethod||$gmethod)
+ { if ($wereondos) { $pmethod = 1 } else { $amethod = 1 } }
-unless ($pmethod||$amethod||$gmethod)
- { if ($wereondos) { $pmethod = 1 } else { $amethod = 1 } }
-
# Set the error redirection used under Unix:
# stderr -> stdout
my $logredirection = '>>' ;
-# This unfortunally doen't work with the ksh and simple sh
+# This unfortunally doesn't work with the ksh and simple sh
#
-# if (!$wereondos)
+# if (!$wereondos)
# { $logredirection = '2>&1 >>' ; # Bash
# $logredirection = '>>&' ; # tcsh, Bash
# default $logredirection. }
-# Some TeX Code Snippets.
+# Some TeX Code Snippets.
my $macros = '
-% auxiliary macros
+% auxiliary macros
\input supp-mis.tex
-\def\startTEXpage[scale=#1]%
- {\output{}
- \batchmode
- \pdfoutput=1
+\def\startTEXpage[scale=#1]%
+ {\output{}
+ \batchmode
+ \pdfoutput=1
\pdfcompresslevel=9
- \hoffset=-1in
+ \hoffset=-1in
\voffset=\hoffset
\scratchcounter=#1
\divide\scratchcounter1000
@@ -148,9 +148,9 @@ my $macros = '
{\egroup
\dimen0=\ht0 \advance\dimen0 \dp0
\setbox2=\vbox to 10\dimen0
- {\pdfliteral{\TEXscale 0 0 \TEXscale 0 0 cm}
+ {\pdfliteral{\TEXscale 0 0 \TEXscale 0 0 cm}
\copy0
- \pdfliteral{1 0 0 1 0 0 cm}
+ \pdfliteral{1 0 0 1 0 0 cm}
\vfill}
\wd2=10\wd0
\pdfpageheight=\ht2
@@ -158,53 +158,53 @@ my $macros = '
\ScaledPointsToBigPoints{\number\pdfpageheight}\pdfcropheight
\ScaledPointsToBigPoints{\number\pdfpagewidth }\pdfcropwidth
\expanded{\pdfpageattr{/CropBox [0 0 \pdfcropwidth \space \pdfcropheight]}}
- \shipout\hbox{\box2}}
+ \shipout\hbox{\box2}}
-% end of auxiliary macros' ;
+% end of auxiliary macros' ;
-sub report
- { return if $silent ;
- my $str = shift ;
- if ($str =~ /(.*?)\s+([\:\/])\s+(.*)/o)
- { if ($1 eq "") { $str = " " } else { $str = $2 }
- print sprintf("%22s $str %s\n",$1,$3) } }
+sub report
+ { return if $silent ;
+ my $str = shift ;
+ if ($str =~ /(.*?)\s+([\:\/])\s+(.*)/o)
+ { if ($1 eq "") { $str = " " } else { $str = $2 }
+ print sprintf("%22s $str %s\n",$1,$3) } }
-sub error
- { report("processing aborted : " . shift) ;
- exit }
+sub error
+ { report("processing aborted : " . shift) ;
+ exit }
-sub process
- { report("generating : " . shift) }
+sub process
+ { report("generating : " . shift) }
-sub banner
- { return if $silent ;
+sub banner
+ { return if $silent ;
print "\n" ;
- report ("MakeMPY 1.1 - MetaFun / PRAGMA ADE 2000-2001") ;
+ report ("MakeMPY 1.1 - MetaFun / PRAGMA ADE 2000-2004") ;
print "\n" }
-my $metfile = "" ; # main metapost file
+my $metfile = "" ; # main metapost file
my $mpofile = "" ; # metapost text specifiation file (provided)
my $mpyfile = "" ; # metapost text picture file (generated)
-my $texfile = "" ; # temporary tex file
-my $pdffile = "" ; # temporary pdf file
-my $tmpfile = "" ; # temporary metapost file
-my $posfile = "" ; # temporary postscript file
-my $logfile = "" ; # temporary log file
+my $texfile = "" ; # temporary tex file
+my $pdffile = "" ; # temporary pdf file
+my $tmpfile = "" ; # temporary metapost file
+my $posfile = "" ; # temporary postscript file
+my $logfile = "" ; # temporary log file
my $errfile = "" ; # final log file (with suffix log)
-sub show_help_info
- { banner ;
- report ("--help : this message" ) ;
- report ("--noclean : don't remove temporary files" ) ;
- report ("--force : force processing (ignore checksum)" ) ;
- report ("--silent : don't show messages" ) ;
- print "\n" ;
- report ("--acrobat : use acrobat (reader) for ps->pdf (on unix)") ;
- report ("--pdftops : use pdftops (xpdf) ps->pdf") ;
- report ("--ghostscript : use ghostscript (gs) for ps->pdf") ;
- print "\n" ;
- report ("input file : metapost file with graphics") ;
- report ("programs needed : texexec and english context") ;
+sub show_help_info
+ { banner ;
+ report ("--help : this message" ) ;
+ report ("--noclean : don't remove temporary files" ) ;
+ report ("--force : force processing (ignore checksum)" ) ;
+ report ("--silent : don't show messages" ) ;
+ print "\n" ;
+ report ("--acrobat : use acrobat (reader) for ps->pdf (on unix)") ;
+ report ("--pdftops : use pdftops (xpdf) ps->pdf") ;
+ report ("--ghostscript : use ghostscript (gs) for ps->pdf") ;
+ print "\n" ;
+ report ("input file : metapost file with graphics") ;
+ report ("programs needed : texexec and english context") ;
report (" : pdftops from the xpdf suite, or") ; # page size buggy
report (" : pdf2ps and ghostscript, or") ;
report (" : acrobat reader for unix, and") ;
@@ -212,103 +212,103 @@ sub show_help_info
report ("output file : metapost file with pictures") ;
exit }
-sub check_input_file
- { my $file = $ARGV[0] ;
- if ((!defined($file))||($file eq ""))
- { banner ; error("no filename given") }
+sub check_input_file
+ { my $file = $ARGV[0] ;
+ if ((!defined($file))||($file eq ""))
+ { banner ; error("no filename given") }
else
- { $file =~ s/\.mp.*$//o ;
- $metfile = "$file.mp" ;
- $mpofile = "$file.mpo" ;
+ { $file =~ s/\.mp.*$//o ;
+ $metfile = "$file.mp" ;
+ $mpofile = "$file.mpo" ;
$mpyfile = "$file.mpy" ;
$logfile = "$file.log" ;
- $texfile = "mpy-$file.tex" ;
+ $texfile = "mpy-$file.tex" ;
$pdffile = "mpy-$file.pdf" ;
$posfile = "mpy-$file.pos" ;
$tmpfile = "mpy-$file.tmp" ;
$errfile = "mpy-$file.log" ;
- if (! -f $metfile)
+ if (! -f $metfile)
{ banner ; error("$metfile is empty") }
- elsif (-s $mpofile < 32)
- { unlink $mpofile ; # may exist with zero length
+ elsif (-s $mpofile < 32)
+ { unlink $mpofile ; # may exist with zero length
unlink $mpyfile ; # get rid of left overs
- exit }
+ exit }
else
{ banner ; report("processing file : $mpofile") } } }
sub verify_check_sum # checksum calculation from perl documentation
{ return unless (open (MPO,"$mpofile")) ;
- $mpochecksum = do { local $/ ; unpack("%32C*",<MPO>) % 65535 } ;
+ $mpochecksum = do { local $/ ; unpack("%32C*",<MPO>) % 65535 } ;
close (MPO) ;
return unless open (MPY,"$mpyfile") ;
- my $str = <MPY> ; chomp $str ;
+ my $str = <MPY> ; chomp $str ;
close (MPY) ;
- if ($str =~ /^\%\s*mpochecksum\s*\:\s*(\d+)/o)
- { if ($mpochecksum eq $1)
+ if ($str =~ /^\%\s*mpochecksum\s*\:\s*(\d+)/o)
+ { if ($mpochecksum eq $1)
{ report("mpo checksum : $mpochecksum / unchanged") ;
exit unless $force }
- else
+ else
{ report("mpo checksum : $mpochecksum / changed") } } }
-sub cleanup_files
- { my @files = <mpy-*.*> ;
- foreach (@files) { unless (/\.log/o) { unlink $_ } } }
+sub cleanup_files
+ { my @files = <mpy-*.*> ;
+ foreach (@files) { unless (/\.log/o) { unlink $_ } } }
-sub construct_tex_file
- { my $n = 0 ;
+sub construct_tex_file
+ { my $n = 0 ;
unless (open (MPO, "<$mpofile"))
- { error("unable to open $mpofile") }
- unless (open (TEX, ">$texfile"))
- { error("unable to open $texfile") }
- my $textext = "" ;
- while (<MPO>)
- { s/\s*$//mois ;
- if (/\%\s*format=(\w+)/)
- { $format = $1 }
+ { error("unable to open $mpofile") }
+ unless (open (TEX, ">$texfile"))
+ { error("unable to open $texfile") }
+ my $textext = "" ;
+ while (<MPO>)
+ { s/\s*$//mois ;
+ if (/\%\s*format=(\w+)/)
+ { $format = $1 }
else # if (!/^\%/)
- { if (/startTEXpage/o)
- { ++$n ;
+ { if (/startTEXpage/o)
+ { ++$n ;
$textext .= "$start{$format}\n" ;
- $start{$format} = "" }
+ $start{$format} = "" }
$textext .= "$_\n" } }
- unless (defined($tex{$format})) { $format = "plain" }
- if ($format eq "context") { $macros = "" }
- # print TEX "$start{$format}\n$macros\n$textext\n$stop{$format}\n" ;
- print TEX "$start{$format}\n" if $start{$format} ;
- print TEX "$macros\n" if $macros ;
- print TEX "$textext\n" if $textext ;
- print TEX "$stop{$format}\n" if $stop{$format} ;
- close (MPO) ;
+ unless (defined($tex{$format})) { $format = "plain" }
+ if ($format eq "context") { $macros = "" }
+ # print TEX "$start{$format}\n$macros\n$textext\n$stop{$format}\n" ;
+ print TEX "$start{$format}\n\n" if $start{$format} ;
+ print TEX "$macros\n" if $macros ;
+ print TEX "$textext\n" if $textext ;
+ print TEX "$stop{$format}\n" if $stop{$format} ;
+ close (MPO) ;
close (TEX) ;
report("tex format : $format") ;
report("requested texts : $n") }
-sub construct_mpy_file
+sub construct_mpy_file
{ unless (open (TMP, "<$tmpfile"))
- { error("unable to open $tmpfile file") }
- unless (open (MPY, ">$mpyfile"))
- { error("unable to open $mpyfile file") }
- print MPY "% mpochecksum : $mpochecksum\n" ;
- my $copying = my $n = 0 ;
- while (<TMP>)
- { if (s/beginfig/begingraphictextfig/o)
- { print MPY $_ ; $copying = 1 ; ++$n }
- elsif (s/endfig/endgraphictextfig/o)
+ { error("unable to open $tmpfile file") }
+ unless (open (MPY, ">$mpyfile"))
+ { error("unable to open $mpyfile file") }
+ print MPY "% mpochecksum : $mpochecksum\n" ;
+ my $copying = my $n = 0 ;
+ while (<TMP>)
+ { if (s/beginfig/begingraphictextfig/o)
+ { print MPY $_ ; $copying = 1 ; ++$n }
+ elsif (s/endfig/endgraphictextfig/o)
{ print MPY $_ ; $copying = 0 }
elsif ($copying)
{ print MPY $_ } }
close (TMP) ;
close (MPY) ;
- report("processed texts : $n") ;
+ report("processed texts : $n") ;
report("produced file : $mpyfile") }
-sub run
- { my ($resultfile, $program,$arguments) = @_ ;
+sub run
+ { my ($resultfile, $program,$arguments) = @_ ;
my $result = system("$program $arguments $logredirection $logfile") ;
unless (-f $resultfile) { error("invalid `$program' run") } }
-sub make_pdf_pages
- { process ("pdf file") ;
+sub make_pdf_pages
+ { process ("pdf file") ;
run ($pdffile, "$tex{$format}", "$texfile") }
sub make_mp_figures
@@ -316,40 +316,40 @@ sub make_mp_figures
if ($pmethod) { run($posfile, "$pdftops",
"-paperw 10000 -paperh 10000 $pdffile $posfile") }
if ($gmethod) { run($posfile, "$ghostscript",
- "-q -sOutputFile=$posfile -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite $pdffile") }
+ "-q -sOutputFile=$posfile -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite $pdffile") }
if ($amethod) { run($posfile, "$acroread",
"-toPostScript -pairs $pdffile $posfile") } }
-sub make_mp_pictures
- { process ("metapost file") ;
- run ($tmpfile, "$pstoedit", "-ssp -dt -f mpost $posfile $tmpfile") }
+sub make_mp_pictures
+ { process ("metapost file") ;
+ run ($tmpfile, "$pstoedit", "-ssp -dt -f mpost $posfile $tmpfile") }
if ($help) { show_help_info }
-check_input_file ;
+check_input_file ;
verify_check_sum ;
-cleanup_files ;
-construct_tex_file ;
-make_pdf_pages ;
-make_mp_figures ;
-make_mp_pictures ;
-construct_mpy_file ; # less save : rename $tmpfile, $mpyfile ;
-unless ($noclean) { cleanup_files }
-
-# a simple test file (needs context)
+cleanup_files ;
+construct_tex_file ;
+make_pdf_pages ;
+make_mp_figures ;
+make_mp_pictures ;
+construct_mpy_file ; # less save : rename $tmpfile, $mpyfile ;
+unless ($noclean) { cleanup_files }
+
+# a simple test file (needs context)
#
# % output=pdftex
-#
-# \starttext
-#
+#
+# \starttext
+#
# \startMPpage
-# graphictext
+# graphictext
# "\bf MAKE"
# scaled 8
-# zscaled (1,2)
-# withdrawcolor \MPcolor{blue}
-# withfillcolor \MPcolor{gray}
-# withpen pencircle scaled 5pt ;
+# zscaled (1,2)
+# withdrawcolor \MPcolor{blue}
+# withfillcolor \MPcolor{gray}
+# withpen pencircle scaled 5pt ;
# \stopMPpage
-#
+#
# \stoptext
diff --git a/context/perltk/texexec.pl b/context/perltk/texexec.pl
index f5e27818d..cd75821a9 100644
--- a/context/perltk/texexec.pl
+++ b/context/perltk/texexec.pl
@@ -325,7 +325,7 @@ if ( ( $LogFile ne '' ) && ( $LogFile =~ /\w+\.log$/io ) ) {
*STDERR = *LOGFILE;
}
-my $Program = " TeXExec 4.0 - ConTeXt / PRAGMA ADE 1997-2003";
+my $Program = " TeXExec 4.0 - ConTeXt / PRAGMA ADE 1997-2004";
print "\n$Program\n\n";
@@ -602,7 +602,7 @@ if ( open( INI, $IniPath ) ) {
if ($Verbose) { print "\n" }
} elsif ($Verbose) {
print
-" warning : $IniPath not found, did you read 'texexec.rme'?\n";
+ " warning : $IniPath not found, did you read 'texexec.rme'?\n";
exit 1;
} else {
print
diff --git a/context/perltk/texfont.pl b/context/perltk/texfont.pl
index d9de200b6..6e0b95978 100644
--- a/context/perltk/texfont.pl
+++ b/context/perltk/texfont.pl
@@ -4,11 +4,13 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
# This is an example of a crappy unstructured file but once
# I know what should happen exactly, I will clean it up.
+# once it works all right, afmpl will be default
+
# todo : ttf (partially doen already)
#D \module
#D [ file=texfont.pl,
-#D version=2004.01.10, % 2000.12.14
+#D version=2004.02.06, % 2000.12.14
#D title=Font Handling,
#D subtitle=installing and generating,
#D author=Hans Hagen ++,
@@ -47,47 +49,72 @@ $Getopt::Long::autoabbrev = 1 ; # partial switch accepted
my $dosish = ($Config{'osname'} =~ /^(ms)?dos|^os\/2|^(ms|cyg)win/i) ;
my $IsWin32 = ($^O =~ /MSWin32/i);
+my $SpacyPath = 0 ;
-BEGIN {
- $IsWin32 = ($^O =~ /MSWin32/i);
+# great, the win32api is not present in all perls
- if ($IsWin32) {
- require Win32::API; import Win32::API;
- }
+BEGIN {
+ $IsWin32 = ($^O =~ /MSWin32/i) ;
+ $SpacyPath = 0 ;
+ if ($IsWin32) {
+ my $str = `kpsewhich --expand-path=\$TEXMF` ;
+ $SpacyPath = ($str =~ / /) ;
+ if ($SpacyPath) {
+ require Win32::API; import Win32::API;
+ }
+ }
}
# great, glob changed to bsd glob in an incompatible way ... sigh, we now
# have to catch a failed glob returning the pattern
+#
+# to stupid either:
+#
+# sub validglob {
+# my @globbed = glob(shift) ;
+# if ((@globbed) && (! -e $globbed[0])) {
+# return () ;
+# } else {
+# return @globbed ;
+# }
+# }
+#
+# so now we have:
sub validglob {
my @globbed = glob(shift) ;
- if ((@globbed) && (! -e $globbed[0])) {
- return () ;
- } else {
- return @globbed ;
+ my @globout = () ;
+ foreach my $file (@globbed) {
+ push (@globout,$file) if (-e $file) ;
}
+ return @globout ;
}
sub GetShortPathName {
- my ($filename) = @_;
- return $filename unless ($IsWin32) ;
- my $GetShortPathName = new Win32::API('kernel32', 'GetShortPathName', 'PPN', 'N');
+ my ($filename) = @_ ;
+ return $filename unless (($IsWin32)&&($SpacyPath)) ;
+ my $GetShortPathName = new Win32::API('kernel32', 'GetShortPathName', 'PPN', 'N') ;
if(not defined $GetShortPathName) {
- die "Can't import API GetShortPathName: $!\n";
+ die "Can't import API GetShortPathName: $!\n" ;
}
my $buffer = " " x 260;
- my $len = $GetShortPathName->Call($filename, $buffer, 260);
- return substr($buffer, 0, $len); }
+ my $len = $GetShortPathName->Call($filename, $buffer, 260) ;
+ return substr($buffer, 0, $len) ;
+}
-my $installpath = "" ; my @searchpaths = () ;
+my $installpath = "" ;
-if (defined($ENV{TEXMFLOCAL})) { $installpath = "TEXMFLOCAL" }
-if (defined($ENV{TEXMFFONTS})) { $installpath = "TEXMFFONTS" }
+if (defined($ENV{TEXMFLOCAL})) {
+ $installpath = "TEXMFLOCAL" ;
+}
-# ($installpath eq "") { $installpath = "TEXMFFONTS" } # redundant
-if ($installpath eq "") { $installpath = "TEXMFLOCAL" } # redundant
+if (defined($ENV{TEXMFFONTS})) {
+ $installpath = "TEXMFFONTS" ;
+}
-@searchpaths = ('TEXMFFONTS','TEXMFLOCAL','TEXMFMAIN') ;
+if ($installpath eq "") {
+ $installpath = "TEXMFLOCAL" ; # redundant
+}
my $encoding = "texnansi" ;
my $vendor = "" ;
@@ -102,6 +129,7 @@ my $passon = "" ;
my $extend = "" ;
my $narrow = "" ;
my $slant = "" ;
+my $spaced = "" ;
my $caps = "" ;
my $noligs = 0 ;
my $test = 0 ;
@@ -110,6 +138,9 @@ my $novirtual = 0 ;
my $listing = 0 ;
my $remove = 0 ;
my $expert = 0 ;
+my $trace = 0 ;
+my $afmpl = 0 ;
+my $trees = 'TEXMFFONTS,TEXMFLOCAL,TEXMFEXTRA,TEXMFMAIN' ;
my $fontsuffix = "" ;
my $namesuffix = "" ;
@@ -124,13 +155,15 @@ my $variant = "" ; # atl: encoding variant
my $extension = "pfb" ; # atl: default font extension
my $lcdf = "" ; # atl: trigger for lcdf otftotfm
-my $pdfpath = 0 ;
-my $mappath = 'dvips' ;
+my $mappath = 'fonts/map' ; # will be set later
+my $encpath = 'fonts/enc' ; # will be set later
+
+my @cleanup = () ; # atl: build list of generated files to delete
# todo: parse name for style, take face from command line
#
# @Faces = ("Serif","Sans","Mono") ;
-# @Styles = ("Slanted","Italic","Bold","BoldSlanted","BoldItalic") ;
+# @Styles = ("Slanted","Spaced", "Italic","Bold","BoldSlanted","BoldItalic") ;
#
# for $fac (@Faces) { for $sty (@Styles) { $FacSty{"$fac$sty"} = "" } }
@@ -148,6 +181,7 @@ my $mappath = 'dvips' ;
"sourcepath=s" => \$sourcepath,
"passon=s" => \$passon,
"slant=s" => \$slant,
+ "spaced=s" => \$spaced,
"extend=s" => \$extend,
"narrow=s" => \$narrow,
"listing" => \$listing,
@@ -159,51 +193,68 @@ my $mappath = 'dvips' ;
"batch" => \$batch,
"weight=s" => \$weight,
"width=s" => \$width,
- "pdfpath" => \$pdfpath, # for old texmf trees < 2004
"expert" => \$expert,
+ "afmpl" => \$afmpl,
+ "afm2pl" => \$afmpl,
+ "rootlist=s" => \$trees,
+ "trace" => \$trace, # --verbose conflicts with --ve
"preproc" => \$preproc, # atl: trigger conversion to pfb
"lcdf" => \$lcdf ) ; # atl: trigger use of lcdf fonttoools
# for/from Fabrice:
my $own_path = "$FindBin::Bin/" ;
+
$FindBin::RealScript =~ m/([^\.]*)(\.pl|\.bat|\.exe|)/io ;
+
my $own_name = $1 ;
my $own_type = $2 ;
-my $own_stub = "" ;
-if ($own_type =~ /pl/oi) { $own_stub = "perl " }
+my $own_stub = "" ;
+
+if ($own_type =~ /pl/oi) {
+ $own_stub = "perl "
+}
+
+if ($caps) { $afmpl = 0 } # for the moment
# so we can use both combined
-if ($lcdf) { $novirtual = 1 }
-if (!$novirtual) { $virtual = 1 }
+if ($lcdf) {
+ $novirtual = 1 ;
+}
+
+if (!$novirtual) {
+ $virtual = 1 ;
+}
# starting with 2004 tetex/fptex/texlive will combine pdftex and dvips paths
-if ($pdfpath)
- { $mappath = 'pdftex' }
-else
- { $mappath = 'dvips' }
-
# A couple of routines.
-sub report
- { my $str = shift ;
+sub report {
+ my $str = shift ;
$str =~ s/ / /goi ;
- if ($str =~ /(.*?)\s+([\:\/])\s+(.*)/o)
- { if ($1 eq "") { $str = " " } else { $str = $2 }
- print sprintf("%22s $str %s\n",$1,$3) } }
+ if ($str =~ /(.*?)\s+([\:\/])\s+(.*)/o) {
+ if ($1 eq "") {
+ $str = " " ;
+ } else {
+ $str = $2 ;
+ }
+ print sprintf("%22s $str %s\n",$1,$3) ;
+ }
+}
-sub error
- { report("processing aborted : " . shift) ;
+sub error {
+ report("processing aborted : " . shift) ;
print "\n" ;
report "--help : show some more info" ;
- exit }
+ exit ;
+}
# The banner.
print "\n" ;
-report ("TeXFont 2.0 - ConTeXt / PRAGMA ADE 2000-2004") ;
+report ("TeXFont 2.2 - ConTeXt / PRAGMA ADE 2000-2004") ;
print "\n" ;
# Handy for scripts: one can provide a preferred path, if it
@@ -232,10 +283,14 @@ sub create_mm_font
error ("no amfm file found") unless (-f "$sourcepath/$name.amfm") ;
error ("no pfb file found") unless (-f "$sourcepath/$name.pfb") ;
$args = "$flag --precision=5 --kern-precision=0 --output=$sourcepath/$name$tags.afm" ;
- $ok = `mmafm $args $sourcepath/$name.amfm` ; chomp $ok ;
+ my $command = "mmafm $args $sourcepath/$name.amfm" ;
+ print "$command\n" if $trace ;
+ $ok = `$command` ; chomp $ok ;
if ($ok ne "") { report ("warning $ok") }
$args = "$flag --precision=5 --output=$sourcepath/$name$tags.pfb" ;
- $ok = `mmpfb $args $sourcepath/$name.pfb` ; chomp $ok ;
+ $command = "mmpfb $args $sourcepath/$name.pfb" ;
+ print "$command\n" if $trace ;
+ $ok = `$command` ; chomp $ok ;
if ($ok ne "") { report ("warning $ok") }
report ("mm result file : $name$tags") }
@@ -263,6 +318,7 @@ if ($test)
{ $vendor = $collection = "test" ;
$install = 1 }
+if (($spaced ne "") && ($spaced !~ /\d/)) { $spaced = "50" }
if (($slant ne "") && ($slant !~ /\d/)) { $slant = "0.167" }
if (($extend ne "") && ($extend !~ /\d/)) { $extend = "1.200" }
if (($narrow ne "") && ($narrow !~ /\d/)) { $narrow = "0.800" }
@@ -276,10 +332,15 @@ if ($encoding =~ /default/oi) { $encoding = "texnansi" }
my $lcfontroot = lc $fontroot ;
+# Auto search paths
+
+my @trees = split(/\,/,$trees) ;
+
# Test for help asked.
if ($help)
- { report "--fontroot=path : texmf font root (default: $lcfontroot)" ;
+ { report "--fontroot=path : texmf destination font root (default: $lcfontroot)" ;
+ report "--rootlist=paths : texmf source roots (default: $trees)" ;
report "--sourcepath=path : when installing, copy from this path (default: $sourcepath)" ;
report "--sourcepath=auto : locate and use vendor/collection" ;
print "\n" ;
@@ -288,6 +349,7 @@ if ($help)
report "--encoding=name : encoding vector (default: $encoding)" ;
report "--variant=name : encoding variant (.enc file or otftotfm features)" ;
print "\n" ;
+ report "--spaced=s : space glyphs in font by promille of em (0 - 1000)" ;
report "--slant=s : slant glyphs in font by factor (0.0 - 1.5)" ;
report "--extend=s : extend glyphs in font by factor (0.0 - 1.5)" ;
report "--caps=s : capitalize lowercase chars by factor (0.5 - 1.0)" ;
@@ -308,10 +370,9 @@ if ($help)
print "\n" ;
report "--expert : also handle expert fonts" ;
print "\n" ;
+ report "--afmpl : use afm2pl instead of afm2tfm" ;
report "--preproc : pre-process ttf/otf, converting them to pfb" ;
report "--lcdf : use lcdf fonttools to create virtual encoding" ;
- print "\n" ;
- report "--pdfpath : use /pdftex/config (since 2004: /dvips/config)" ;
exit }
if (($batch)||(($ARGV[0]) && ($ARGV[0] =~ /.+\.dat$/io)))
@@ -329,6 +390,7 @@ if (($batch)||(($ARGV[0]) && ($ARGV[0] =~ /.+\.dat$/io)))
if (open(BAT, $batchfile))
{ while (<BAT>)
{ chomp ;
+ s/(.+)\#.*/$1/o ;
next if (/^\s*$/io) ;
if ($select)
{ if ($selecting)
@@ -345,7 +407,9 @@ if (($batch)||(($ARGV[0]) && ($ARGV[0] =~ /.+\.dat$/io)))
report ("batch line : $_") ;
# system ("perl $0 --fontroot=$fontroot $_") }
my $own_quote = ( $own_path =~ m/^[^\"].* / ? "\"" : "" );
- system ("$own_stub$own_quote$own_path$own_name$own_type$own_quote --fontroot=$fontroot $_") }
+ my $switches = '' ;
+ $switches .= "--afmpl " if $afmpl ;
+ system ("$own_stub$own_quote$own_path$own_name$own_type$own_quote $switches --fontroot=$fontroot $_") }
close (BAT) }
exit }
@@ -354,27 +418,90 @@ error ("unknown collection $collection") unless $collection ;
error ("unknown tex root $lcfontroot") unless -d $fontroot ;
my $varlabel = $variant ;
+
if ($lcdf)
-{ $varlabel =~ s/,/-/goi ;
- $varlabel =~ tr/a-z/A-Z/ }
+ { $varlabel =~ s/,/-/goi ;
+ $varlabel =~ tr/a-z/A-Z/ }
if ($varlabel ne "")
-{ $varlabel = "-$varlabel" }
+ { $varlabel = "-$varlabel" }
my $identifier = "$encoding$varlabel-$vendor-$collection" ;
my $outlinepath = $sourcepath ; my $path = "" ;
-if ($sourcepath eq "auto")
- { foreach my $root (@searchpaths)
+my $shape = "" ;
+
+if ($noligs)
+ { report ("ligatures : removed") ;
+ $fontsuffix .= "-unligatured" ;
+ $namesuffix .= "-NoLigs" }
+
+if ($caps ne "")
+ { if ($caps <0.5) { $caps = 0.5 }
+ elsif ($caps >1.0) { $caps = 1.0 }
+ $shape .= " -c $caps " ;
+ report ("caps factor : $caps") ;
+ $fontsuffix .= "-capitalized-" . int(1000*$caps) ;
+ $namesuffix .= "-Caps" }
+
+if ($extend ne "")
+ { if ($extend<0.0) { $extend = 0.0 }
+ elsif ($extend>1.5) { $extend = 1.5 }
+ report ("extend factor : $extend") ;
+ if ($lcdf)
+ { $shape .= " -E $extend " }
+ else
+ { $shape .= " -e $extend " }
+ $fontsuffix .= "-extended-" . int(1000*$extend) ;
+ $namesuffix .= "-Extended" }
+
+if ($narrow ne "") # goodie
+ { $extend = $narrow ;
+ if ($extend<0.0) { $extend = 0.0 }
+ elsif ($extend>1.5) { $extend = 1.5 }
+ report ("narrow factor : $extend") ;
+ if ($lcdf)
+ { $shape .= " -E $extend " }
+ else
+ { $shape .= " -e $extend " }
+ $fontsuffix .= "-narrowed-" . int(1000*$extend) ;
+ $namesuffix .= "-Narrowed" }
+
+if ($slant ne "")
+ { if ($slant <0.0) { $slant = 0.0 }
+ elsif ($slant >1.5) { $slant = 1.5 }
+ report ("slant factor : $slant") ;
+ if ($lcdf)
+ { $shape .= " -S $slant " }
+ else
+ { $shape .= " -s $slant " }
+ $fontsuffix .= "-slanted-" . int(1000*$slant) ;
+ $namesuffix .= "-Slanted" }
+
+if ($spaced ne "")
+ { if ($spaced < 0) { $spaced = 0 }
+ elsif ($spaced >1000) { $spaced = 1000 }
+ report ("space factor : $spaced") ;
+ if ($lcdf)
+ { $shape .= " -L $spaced " }
+ else
+ { $shape .= " -m $spaced " }
+ $fontsuffix .= "-spaced-" . $spaced ;
+ $namesuffix .= "-Spaced" }
+
+if ($sourcepath eq "auto") # todo uppercase root
+ { foreach my $root (@trees)
{ if ($dosish)
{ $path = `kpsewhich -expand-path=\$$root` }
else
{ $path = `kpsewhich -expand-path=\\\$$root` }
chomp $path ;
- if ($preproc)
+ $path = $ENV{$root} if (($path == '') && defined($ENV{$root})) ;
+ report ("checking root : $root") ;
+ if ($preproc)
{ $sourcepath = "$path/fonts/truetype/$vendor/$collection" }
- else
+ else
{ $sourcepath = "$path/fonts/afm/$vendor/$collection" }
unless (-d $sourcepath)
{ my $ven = $vendor ; $ven =~ s/(........).*/$1/ ;
@@ -391,52 +518,53 @@ if ($sourcepath eq "auto")
{ @files = validglob("$sourcepath/*.otf") ;
report("locating : otf files") }
unless (@files)
- { @files = validglob("$sourcepath/*.ttf") ;
+ { @files = validglob("$sourcepath/*.ttf") ;
report("locating : ttf files") }
- if (@files)
- { if ($listing)
- { report ("fontpath : $sourcepath" ) ;
- print "\n" ;
- foreach my $file (@files)
- { if (open(AFM,$file))
- { my $name = "unknown name" ;
- while (<AFM>)
- { chomp ;
- if (/^fontname\s+(.*?)$/oi)
- { $name = $1 ; last } }
- close (AFM) ;
- if ($preproc)
- { $file =~ s/.*\/(.*)\..tf/$1/io }
- else
- { $file =~ s/.*\/(.*)\.afm/$1/io }
- report ("$file : $name") } }
- exit }
- elsif ($remove)
- { error ("no removal from : $root") if ($root eq 'TEXMFMAIN') ;
- foreach my $file (@files)
- { if ($preproc)
+ if (@files)
+ { if ($listing)
+ { report ("fontpath : $sourcepath" ) ;
+ print "\n" ;
+ foreach my $file (@files)
+ { if (open(AFM,$file))
+ { my $name = "unknown name" ;
+ while (<AFM>)
+ { chomp ;
+ if (/^fontname\s+(.*?)$/oi)
+ { $name = $1 ; last } }
+ close (AFM) ;
+ if ($preproc)
{ $file =~ s/.*\/(.*)\..tf/$1/io }
- else
+ else
{ $file =~ s/.*\/(.*)\.afm/$1/io }
- foreach my $sub ("tfm","vf")
- { foreach my $typ ("","-raw")
- { my $nam = "$path/fonts/$sub/$vendor/$collection/$encoding$varlabel$typ-$file.$sub" ;
- if (-s $nam)
- { report ("removing : $encoding$varlabel$typ-$file.$sub") ;
- unlink $nam } } } }
- my $nam = "$encoding$varlabel-$vendor-$collection.tex" ;
- if (-e $nam)
- { report ("removing : $nam") ;
- unlink "$nam" }
- my $mapfile = "$encoding$varlabel-$vendor-$collection" ;
- my $maproot = "$fontroot/$mappath/config/";
- if (-e "$maproot$mapfile.map")
- { report ("renaming : $mapfile.map -> $mapfile.bak") ;
- unlink "$maproot$mapfile.bak" ;
- rename "$maproot$mapfile.map", "$maproot$mapfile.bak" }
- exit }
- else
- { last } } } }
+ report ("$file : $name") } }
+ exit }
+ elsif ($remove)
+ { error ("no removal from : $root") if ($root eq 'TEXMFMAIN') ;
+ foreach my $file (@files)
+ { if ($preproc)
+ { $file =~ s/.*\/(.*)\..tf/$1/io }
+ else
+ { $file =~ s/.*\/(.*)\.afm/$1/io }
+ foreach my $sub ("tfm","vf")
+ { foreach my $typ ("","-raw")
+ { my $nam = "$path/fonts/$sub/$vendor/$collection/$encoding$varlabel$typ-$file.$sub" ;
+ # { my $nam = "$path/fonts/$sub/$vendor/$collection/$encoding$varlabel$typ-$file$fontsuffix.$sub" ;
+ if (-s $nam)
+ { report ("removing : $encoding$varlabel$typ-$file.$sub") ;
+ unlink $nam } } } }
+ my $nam = "$encoding$varlabel-$vendor-$collection.tex" ;
+ if (-e $nam)
+ { report ("removing : $nam") ;
+ unlink "$nam" }
+ my $mapfile = "$encoding$varlabel-$vendor-$collection" ;
+ my $maproot = "$fontroot/fonts/map/";
+ if (-e "$maproot$mapfile.map")
+ { report ("renaming : $mapfile.map -> $mapfile.bak") ;
+ unlink "$maproot$mapfile.bak" ;
+ rename "$maproot$mapfile.map", "$maproot$mapfile.bak" }
+ exit }
+ else
+ { last } } } }
error ("unknown subpath ../fonts/afm/$vendor/$collection") unless -d $sourcepath }
error ("unknown source path $sourcepath") unless -d $sourcepath ;
@@ -447,8 +575,8 @@ my $tfmpath = "$fontroot/fonts/tfm/$vendor/$collection" ;
my $vfpath = "$fontroot/fonts/vf/$vendor/$collection" ;
my $pfbpath = "$fontroot/fonts/type1/$vendor/$collection" ;
my $ttfpath = "$fontroot/fonts/truetype/$vendor/$collection" ;
-my $pdfpath = "$fontroot/$mappath/config" ;
-my $encpath = "$fontroot/dvips/local" ;
+my $mappath = "$fontroot/fonts/map" ;
+my $encpath = "$fontroot/fonts/enc" ;
# are not on local path ! ! ! !
@@ -472,12 +600,14 @@ sub make_path
if ($makepath&&$install)
{ make_path ("afm") ; make_path ("type1") }
-do_make_path("$fontroot/$mappath") ;
-do_make_path("$fontroot/$mappath/config") ;
+do_make_path($mappath) ;
+do_make_path($encpath) ;
-if ($lcdf)
- { do_make_path("$fontroot/dvips") ;
- do_make_path("$fontroot/dvips/local") }
+# now fonts/map and fonts/enc
+#
+# if ($lcdf)
+# { do_make_path("$fontroot/dvips") ;
+# do_make_path("$fontroot/dvips/local") }
make_path ("vf") ;
make_path ("tfm") ;
@@ -488,7 +618,7 @@ if ($install)
error ("unknown tfm path $tfmpath") unless -d $tfmpath ;
error ("unknown vf path $vfpath" ) unless -d $vfpath ;
-error ("unknown pdf path $pdfpath") unless -d $pdfpath ;
+error ("unknown map path $mappath") unless -d $mappath ;
my $mapfile = "$identifier.map" ;
my $bakfile = "$identifier.bak" ;
@@ -510,6 +640,11 @@ my $runpath = $sourcepath ;
my @files ;
+sub UnLink
+ { foreach my $f (@_)
+ { if (unlink $f)
+ { report "deleted : $f" if $trace } } }
+
sub globafmfiles
{ my ($runpath, $pattern) = @_ ;
my @files = validglob("$runpath/$pattern.afm") ;
@@ -529,8 +664,11 @@ sub globafmfiles
$extension = "ttf" ;
foreach my $file (@files)
{ $file =~ s/\.ttf$//io ;
- report ("generating afm file : $file.afm") ;
- system("ttf2afm '$file.ttf' -o '$file.afm'") }
+ report ("generating afm file : $file.afm") ;
+ my $command = "ttf2afm \"$file.ttf\" -o \"$file.afm\"" ;
+ system($command) ;
+ print "$command\n" if $trace ;
+ push(@cleanup, "$file.afm") }
@files = validglob("$runpath/$pattern.afm") }
else # try doing the pre-processing earlier
{ report("locating afm files : using otf files") ;
@@ -540,10 +678,14 @@ sub globafmfiles
{ $file =~ s/\.otf$//io ;
if (!$lcdf)
{ report ("generating afm file : $file.afm") ;
- preprocess_font("$file.otf", "$file.bdf") }
+ preprocess_font("$file.otf", "$file.bdf") ;
+ push(@cleanup,"$file.afm") }
if ($preproc)
- { system("cfftot1 --output=$file.pfb $file.otf") ;
+ { my $command = "cfftot1 --output=$file.pfb $file.otf" ;
+ print "$command\n" if $trace ;
report("converting : $file.otf to $file.pfb") ;
+ system($command) ;
+ push(@cleanup, "$file.pfb") ;
}
}
if ($lcdf)
@@ -554,12 +696,11 @@ sub globafmfiles
}
return @files }
-
if ($ARGV[0] ne "")
{ $pattern = $ARGV[0] ;
report ("processing files : all in pattern $ARGV[0]") ;
@files = globafmfiles($runpath,$pattern) }
-elsif ("$extend$narrow$slant$caps" ne "")
+elsif ("$extend$narrow$slant$spaced$caps" ne "")
{ error ("transformation needs file spec") }
else
{ $pattern = "*" ;
@@ -574,7 +715,7 @@ sub copy_files
foreach my $file (@files)
{ my $ok = $file =~ /(.*)\/(.+?)\.(.*)/ ;
my ($path,$name,$suffix) = ($1,$2,$3) ;
- unlink "$topath/$name.$suffix" ;
+ UnLink "$topath/$name.$suffix" ;
report ("copying : $name.$suffix") ;
copy ($file,"$topath/$name.$suffix") } }
@@ -593,14 +734,14 @@ error ("no afm files found") unless @files ;
my $map = my $tex = 0 ; my $mapdata = my $texdata = "" ;
-copy ("$pdfpath/$mapfile","$pdfpath/$bakfile") ;
+copy ("$mappath/$mapfile","$mappath/$bakfile") ;
-if (open (MAP,"<$pdfpath/$mapfile"))
- { report ("extending map file : $pdfpath/$mapfile") ;
+if (open (MAP,"<$mappath/$mapfile"))
+ { report ("extending map file : $mappath/$mapfile") ;
while (<MAP>) { unless (/^\%/o) { $mapdata .= $_ } }
close (MAP) }
else
- { report ("no map file at : $pdfpath/$mapfile") }
+ { report ("no map file at : $mappath/$mapfile") }
if (open (TEX,"<$texfile"))
{ while (<TEX>) { unless (/stoptext/o) { $texdata .= $_ } }
@@ -640,46 +781,6 @@ if ($tex)
{ print TEX "$texdata" ;
print TEX "\n\%appended section\n\n\\page\n\n" } }
-my $shape = "" ;
-
-if ($noligs)
- { report ("ligatures : removed") ;
- $fontsuffix .= "-unligatured" ;
- $namesuffix .= "-NoLigs" }
-
-if ($caps ne "")
- { if ($caps <0.5) { $caps = 0.5 }
- elsif ($caps >1.0) { $caps = 1.0 }
- $shape .= " -c $caps " ;
- report ("caps factor : $caps") ;
- $fontsuffix .= "-capitalized-" . int(1000*$caps) ;
- $namesuffix .= "-Caps" }
-
-if ($extend ne "")
- { if ($extend<0.0) { $extend = 0.0 }
- elsif ($extend>1.5) { $extend = 1.5 }
- report ("extend factor : $extend") ;
- $shape .= " -e $extend " ;
- $fontsuffix .= "-extended-" . int(1000*$extend) ;
- $namesuffix .= "-Extended" }
-
-if ($narrow ne "") # goodie
- { $extend = $narrow ;
- if ($extend<0.0) { $extend = 0.0 }
- elsif ($extend>1.5) { $extend = 1.5 }
- report ("narrow factor : $extend") ;
- $shape .= " -e $extend " ;
- $fontsuffix .= "-narrowed-" . int(1000*$extend) ;
- $namesuffix .= "-Narrowed" }
-
-if ($slant ne "")
- { if ($slant <0.0) { $slant = 0.0 }
- elsif ($slant >1.5) { $slant = 1.5 }
- report ("slant factor : $slant") ;
- $shape .= " -s $slant " ;
- $fontsuffix .= "-slanted-" . int(1000*$slant) ;
- $namesuffix .= "-Slanted" }
-
sub removeligatures
{ my $filename = shift ; my $skip = 0 ;
copy ("$filename.vpl","$filename.tmp") ;
@@ -694,7 +795,7 @@ sub removeligatures
else
{ print VPL "$_\n" } }
close(TMP) ; close(VPL) }
- unlink ("$filename.tmp") }
+ UnLink ("$filename.tmp") }
my $raw = my $use = my $maplist = my $texlist = my $report = "" ;
@@ -719,7 +820,7 @@ sub preprocess_font
close (CONVERT) }
foreach my $file (@files)
- { my $option = my $slant = my $extend = my $vfstr = my $encstr = "" ;
+ { my $option = my $slant = my $spaced = my $extend = my $vfstr = my $encstr = "" ;
my $strange = "" ; my ($rawfont,$cleanfont,$restfont) ;
$file = $file ;
my $ok = $file =~ /(.*)\/(.+?)\.(.*)/ ;
@@ -738,9 +839,9 @@ foreach my $file (@files)
$file = "$afmpath/$cleanname.afm" }
# cleanup
foreach my $suf ("tfm", "vf", "vpl")
- { unlink "$raw$cleanname$fontsuffix.$suf" ;
- unlink "$use$cleanname$fontsuffix.$suf" }
- unlink "texfont.log" ;
+ { UnLink "$raw$cleanname$fontsuffix.$suf" ;
+ UnLink "$use$cleanname$fontsuffix.$suf" }
+ UnLink "texfont.log" ;
# set switches
if ($encoding ne "")
{ $encstr = " -T $encfil" }
@@ -751,12 +852,16 @@ foreach my $file (@files)
my $font = "";
# let's see what we have here (we force texnansi.enc to avoid error messages)
if ($lcdf)
- { $font = `otfinfo -p $file` ;
+ { my $command = "otfinfo -p $file" ;
+ print "$command\n" if $trace ;
+ $font = `$command` ;
chomp $font ;
$cleanfont = $font }
else
- { $font = `afm2tfm '$file' -p texnansi.enc texfont.tfm`;
- unlink "texfont.tfm" ;
+ { my $command = "afm2tfm \"$file\" -p texnansi.enc texfont.tfm" ;
+ print "$command\n" if $trace ;
+ $font = `$command` ;
+ UnLink "texfont.tfm" ;
($rawfont,$cleanfont,$restfont) = split(/\s/,$font) }
if ($font =~ /(math|expert)/io) { $strange = lc $1 }
$cleanfont =~ s/\_/\-/goi ;
@@ -766,13 +871,15 @@ foreach my $file (@files)
{ report ("font identifier : $cleanfont$namesuffix -> $strange -> tfm") }
elsif ($strange ne "")
{ report ("font identifier : $cleanfont$namesuffix -> $strange -> skipping") }
+ elsif ($afmpl)
+ { report ("font identifier : $cleanfont$namesuffix -> text -> tfm") }
elsif ($virtual)
{ report ("font identifier : $cleanfont$namesuffix -> text -> tfm + vf") }
else
{ report ("font identifier : $cleanfont$namesuffix -> text -> tfm") }
# don't handle strange fonts
if ($strange eq "")
- { # atl: experimental support for lcdf otftotfm
+ { # atl: support for lcdf otftotfm
if ($lcdf && $extension eq "otf")
{ # no vf, bypass afm, use otftotfm to get encoding and tfm
my $varstr = my $encout = my $tfmout = "" ;
@@ -787,37 +894,61 @@ foreach my $file (@files)
$encout = "$encpath/$use$cleanfont.enc" ;
if (-e $encout)
{ report ("renaming : $encout -> $use$cleanfont.bak") ;
- unlink "$encpath/$use$cleanfont.bak" ;
+ UnLink "$encpath/$use$cleanfont.bak" ;
rename $encout, "$encpath/$use$cleanfont.bak" }
- unlink "texfont.map" ;
- $tfmout = "$use$cleanfont" ;
- my $otfcommand = "otftotfm -a $varstr $encstr $shape --name=\'$tfmout\' --encoding-dir=\'$encpath/\' --tfm-dir=\'$tfmpath/\' --vf-dir=\'$vfpath/\' --no-type1 --map-file=./texfont.map \'$file\'" ;
- print "$otfcommand\n" ;
+ UnLink "texfont.map" ;
+ $tfmout = "$use$cleanfont$fontsuffix" ;
+ my $otfcommand = "otftotfm -a $varstr $encstr $passon $shape --name=\'$tfmout\' --encoding-dir=\'$encpath/\' --tfm-dir=\'$tfmpath/\' --vf-dir=\'$vfpath/\' --no-type1 --map-file=./texfont.map \'$file\'" ;
+ print "$otfcommand\n" if $trace ;
system("$otfcommand") ;
-# $namesuffix = "--base" ; #atl: lcdf currently appends --base to the filename...sometimes
$encfil = $encout }
else
{ # generate tfm and vpl, $file is on afm path
- report "generating raw tfm/vpl : $raw$cleanname$fontsuffix (from $cleanname)" ;
- my $font = `afm2tfm $file $shape $passon $encstr $vfstr $raw$cleanname$fontsuffix` ;
- # generate vf file if needed
- chomp $font ;
- if ($font =~ /.*?([\d\.]+)\s*ExtendFont/io) { $extend = $1 }
- if ($font =~ /.*?([\d\.]+)\s*SlantFont/io) { $slant = $1 }
- if ($extend ne "") { $option .= " $1 ExtendFont " }
- if ($slant ne "") { $option .= " $1 SlantFont " }
- if ($noligs) { removeligatures("$raw$cleanname$fontsuffix") }
- if ($virtual)
- { report "generating new vf : $use$cleanname$fontsuffix (from $raw$cleanname)" ;
- my $ok = `vptovf $raw$cleanname$fontsuffix.vpl $use$cleanname$fontsuffix.vf $use$cleanname$fontsuffix.tfm ` }
- else
- { report "generating new tfm : $use$cleanname$fontsuffix (from $raw$cleanname)" ;
- my $ok = `pltotf $raw$cleanname$fontsuffix.vpl $use$cleanname$fontsuffix.tfm ` } } }
+ my $font = '' ;
+ if ($afmpl)
+ { report " generating pl : $cleanname$fontsuffix (from $cleanname)" ;
+ $encstr = " -p $encfil" ;
+ my $command = "afm2pl $shape $passon $encstr $file $cleanname$fontsuffix.vpl" ;
+ print "$command\n" if $trace ;
+ my $ok = `$command` ;
+ if (open (TMP,"$cleanname$fontsuffix.map"))
+ { $font = <TMP> ;
+ close(TMP) ;
+ UnLink "$cleanname$fontsuffix.map" } }
+ else
+ { report "generating raw tfm/vpl : $raw$cleanname$fontsuffix (from $cleanname)" ;
+ my $command = "afm2tfm $file $shape $passon $encstr $vfstr $raw$cleanname$fontsuffix" ;
+ print "$command\n" if $trace ;
+ $font = `$command` }
+ # generate vf file if needed
+ chomp $font ;
+ if ($font =~ /.*?([\d\.]+)\s*ExtendFont/io) { $extend = $1 }
+ if ($font =~ /.*?([\d\.]+)\s*SlantFont/io) { $slant = $1 }
+ if ($extend ne "") { $option .= " $1 ExtendFont " }
+ if ($slant ne "") { $option .= " $1 SlantFont " }
+ if ($noligs) { removeligatures("$raw$cleanname$fontsuffix") }
+ if ($afmpl)
+ { report "generating new tfm : $use$cleanname$fontsuffix" ;
+ my $command = "pltotf $cleanname$fontsuffix.vpl $use$cleanname$fontsuffix.tfm" ;
+ print "$command\n" if $trace ;
+ my $ok = `$command` }
+ elsif ($virtual)
+ { report "generating new vf : $use$cleanname$fontsuffix (from $raw$cleanname)" ;
+ my $command = "vptovf $raw$cleanname$fontsuffix.vpl $use$cleanname$fontsuffix.vf $use$cleanname$fontsuffix.tfm" ;
+ print "$command\n" if $trace ;
+ my $ok = `$command` }
+ else
+ { report "generating new tfm : $use$cleanname$fontsuffix (from $raw$cleanname)" ;
+ my $command = "pltotf $raw$cleanname$fontsuffix.vpl $use$cleanname$fontsuffix.tfm" ;
+ print "$command\n" if $trace ;
+ my $ok = `$command` } } }
elsif (-e "$sourcepath/$cleanname.tfm" )
{ report "using existing tfm : $cleanname.tfm" }
elsif (($strange eq "expert")&&($expert))
{ report "creating tfm file : $cleanname.tfm" ;
- my $font = `afm2tfm $file $cleanname.tfm` }
+ my $command = "afm2tfm $file $cleanname.tfm" ;
+ print "$command\n" if $trace ;
+ my $font = `$command` }
else
{ report "use supplied tfm : $cleanname" }
# report results
@@ -828,30 +959,36 @@ foreach my $file (@files)
# copy files
my $usename = "$use$cleanname$fontsuffix" ;
my $rawname = "$raw$cleanname$fontsuffix" ;
+
if ($lcdf eq "")
{ if ($strange ne "")
- { unlink "$vfpath/$cleanname.vf", "$tfmpath/$cleanname.tfm" ;
+ { UnLink ("$vfpath/$cleanname.vf", "$tfmpath/$cleanname.tfm") ;
copy ("$cleanname.tfm","$tfmpath/$cleanname.tfm") ;
+ copy ("$usename.tfm","$tfmpath/$usename.tfm") ;
# or when available, use vendor one :
copy ("$sourcepath/$cleanname.tfm","$tfmpath/$cleanname.tfm") }
elsif ($virtual)
- { unlink "$vfpath/$rawname.vf", "$vfpath/$usename.vf" ;
- unlink "$tfmpath/$rawname.tfm", "$tfmpath/$usename.tfm" ;
+ { UnLink ("$vfpath/$rawname.vf", "$vfpath/$usename.vf") ;
+ UnLink ("$tfmpath/$rawname.tfm", "$tfmpath/$usename.tfm") ;
copy ("$usename.vf" ,"$vfpath/$usename.vf") ;
copy ("$rawname.tfm","$tfmpath/$rawname.tfm") ;
copy ("$usename.tfm","$tfmpath/$usename.tfm") }
+ elsif ($afmpl)
+ { UnLink ("$vfpath/$rawname.vf", "$vfpath/$usename.vf", "$vfpath/$cleanname.vf") ;
+ UnLink ("$tfmpath/$rawname.tfm", "$tfmpath/$usename.tfm", "$tfmpath/$cleanname.tfm") ;
+ copy ("$usename.tfm","$tfmpath/$usename.tfm") }
else
- { unlink "$vfpath/$usename.vf", "$tfmpath/$usename.tfm" ;
+ { UnLink ("$vfpath/$usename.vf", "$tfmpath/$usename.tfm") ;
# slow but prevents conflicting vf's
my $rubish = `kpsewhich $usename.vf` ; chomp $rubish ;
- if ($rubish ne "") { unlink $rubish }
+ if ($rubish ne "") { UnLink $rubish }
#
copy ("$usename.tfm","$tfmpath/$usename.tfm") } }
# cleanup
foreach my $suf ("tfm", "vf", "vpl")
- { unlink "$rawname.$suf", unlink "$usename.$suf" ;
- unlink "$cleanname.$suf", unlink "$fontname.$suf" ;
- unlink "$fontname$fontsuffix.$suf" }
+ { UnLink ("$rawname.$suf", "$usename.$suf") ;
+ UnLink ("$cleanname.$suf", "$fontname.$suf") ;
+ UnLink ("$cleanname$fontsuffix.$suf", "$fontname$fontsuffix.$suf") }
# add line to maps file
$option =~ s/^\s+(.*)/$1/o ;
$option =~ s/(.*)\s+$/$1/o ;
@@ -866,6 +1003,8 @@ foreach my $file (@files)
{ $thename = $cleanname ; $theencoding = "" ; }
elsif ($lcdf)
{ $thename = $usename ; $theencoding = " $encoding$varlabel-$cleanname.enc" }
+ elsif ($afmpl)
+ { $thename = $usename ; $theencoding = " $encoding$varlabel.enc" }
elsif ($virtual)
{ $thename = $rawname ; $theencoding = " $encoding$varlabel.enc" }
else
@@ -874,60 +1013,78 @@ foreach my $file (@files)
my $pfb_sourcepath = $sourcepath ;
$pfb_sourcepath =~ s@/afm/@/type1/@ ;
unless ((-e "$pfbpath/$fontname.$extension")||
- (-e "$pfb_sourcepath/$fontname.$extension")||
- (-e "$sourcepath/$fontname.$extension")||
+ (-e "$pfb_sourcepath/$fontname.$extension")||
+ (-e "$sourcepath/$fontname.$extension")||
(-e "$ttfpath/$fontname.$extension"))
{ if ($tex) { $report .= "missing file: \\type \{$fontname.pfb\}\n" }
report ("missing pfb file : $fontname.pfb") }
# now add entry to map
- if ($strange eq "")
- { if ($extension eq "otf")
- { if ($lcdf)
- { my $mapline = "";
- if (open(ALTMAP,"texfont.map"))
- { while (<ALTMAP>)
- { chomp ;
- # atl: we assume this b/c we always force otftotfm --no-type1
- if (/<<(.*)\.otf$/oi)
- { $mapline = $_ ; last } }
- close(ALTMAP) }
- else
- { report("no mapfile from otftotfm : texfont.map") }
- if ($preproc)
- { $mapline =~ s/^(\S+)/$1 </;
- $mapline =~ s/<<(\S+)\.otf$// }
- else
- { $mapline =~ s/<<(\S+)\.otf$/<< $ttfpath\/$fontname.$extension/ }
- $str = "$mapline\n" }
- else
- { if ($preproc)
- { $str = "$thename $cleanfont $option < $fontname.pfb$theencoding\n"}
- else
- # PdfTeX can't subset OTF files, so we have to include the whole thing
- # It looks like we also need to be explicit on where to find the file
- { $str = "$thename $cleanfont $option << $ttfpath/$fontname.$extension <[$theencoding\n" } } }
- else
- { $str = "$thename $cleanfont $option < $fontname.$extension$theencoding\n" } }
- else
- { $str = "$thename $cleanfont < $fontname.$extension\n" }
- if ($map) # check for redundant entries
- { $mapdata =~ s/^$thename\s.*?$//gmis ;
+ if ($strange eq "") {
+ if ($extension eq "otf") {
+ if ($lcdf) {
+ my $mapline = "" ;
+ if (open(ALTMAP,"texfont.map")) {
+ while (<ALTMAP>) {
+ chomp ;
+ # atl: we assume this b/c we always force otftotfm --no-type1
+ if (/<<(.*)\.otf$/oi) {
+ $mapline = $_ ; last ;
+ }
+ }
+ close(ALTMAP) ;
+ } else {
+ report("no mapfile from otftotfm : texfont.map") ;
+ }
+ if ($preproc) {
+ $mapline =~ s/^(\S+)/$1 </;
+ $mapline =~ s/<<(\S+)\.otf$// ;
+ } else {
+ $mapline =~ s/<<(\S+)\.otf$/<< $ttfpath\/$fontname.$extension/ ;
+ }
+ $str = "$mapline\n" ;
+ } else {
+ if ($preproc) {
+ $str = "$thename $cleanfont $option < $fontname.pfb$theencoding\n" ;
+ } else {
+ # PdfTeX can't subset OTF files, so we have to include the whole thing
+ # It looks like we also need to be explicit on where to find the file
+ $str = "$thename $cleanfont $option << $ttfpath/$fontname.$extension <[$theencoding\n" ;
+ }
+ }
+ } else {
+ $str = "$thename $cleanfont $option < $fontname.$extension$theencoding\n" ;
+ }
+ } else {
+ $str = "$thename $cleanfont < $fontname.$extension\n" ;
+ }
+ # check for redundant entries
+ if ($map) {
+ $mapdata =~ s/^$thename\s.*?$//gmis ;
+ if ($afmpl) {
+ if ($mapdata =~ s/^$rawname\s.*?$//gmis) {
+ report ("removing conflicting file : $rawname") ;
+ }
+ }
$maplist .= $str ;
- $mapdata .= $str }
+ $mapdata .= $str ;
+ }
# write lines to tex file
- if (($strange eq "expert")&&($expert))
- { $fntlist .= "\\definefontsynonym[$cleanfont$namesuffix][$cleanname] \% expert\n" }
- elsif ($strange ne "")
- { $fntlist .= "\%definefontsynonym[$cleanfont$namesuffix][$cleanname]\n" }
- else
- { $fntlist .= "\\definefontsynonym[$cleanfont$namesuffix][$usename][encoding=$encoding]\n" }
+ if (($strange eq "expert")&&($expert)) {
+ $fntlist .= "\\definefontsynonym[$cleanfont$namesuffix][$cleanname] \% expert\n" ;
+ } elsif ($strange ne "") {
+ $fntlist .= "\%definefontsynonym[$cleanfont$namesuffix][$cleanname]\n" ;
+ } else {
+ $fntlist .= "\\definefontsynonym[$cleanfont$namesuffix][$usename][encoding=$encoding]\n" ;
+ }
next unless $tex ;
- if (($strange eq "expert")&&($expert))
- { $texlist .= "\\ShowFont[$cleanfont$namesuffix][$cleanname]\n" }
- elsif ($strange ne "")
- { $texlist .= "\%ShowFont[$cleanfont$namesuffix][$cleanname]\n" }
- else
- { $texlist .= "\\ShowFont[$cleanfont$namesuffix][$usename][$encoding]\n" } }
+ if (($strange eq "expert")&&($expert)) {
+ $texlist .= "\\ShowFont[$cleanfont$namesuffix][$cleanname]\n" ;
+ } elsif ($strange ne "") {
+ $texlist .= "\%ShowFont[$cleanfont$namesuffix][$cleanname]\n" ;
+ } else {
+ $texlist .= "\\ShowFont[$cleanfont$namesuffix][$usename][$encoding]\n"
+ }
+}
if ($map)
{ report ("updating map file : $mapfile") ;
@@ -936,7 +1093,7 @@ if ($map)
print MAP $mapdata }
if ($tex)
- { $pdfpath =~ s/\\/\//go ;
+ { $mappath =~ s/\\/\//go ;
$savedoptions =~ s/^\s+//gmois ; $savedoptions =~ s/\s+$//gmois ;
$fntlist =~ s/^\s+//gmois ; $fntlist =~ s/\s+$//gmois ;
$maplist =~ s/^\s+//gmois ; $maplist =~ s/\s+$//gmois ;
@@ -949,7 +1106,7 @@ if ($tex)
print TEX "\\stoptyping\n" ;
print TEX "\n" ;
print TEX "\\starttyping\n" ;
- print TEX "$pdfpath/$mapfile\n" ;
+ print TEX "$mappath/$mapfile\n" ;
print TEX "\\stoptyping\n" ;
print TEX "\n" ;
print TEX "\\starttyping\n" ;
@@ -969,9 +1126,11 @@ if ($tex)
if ($map) { close (MAP) }
if ($tex) { close (TEX) }
-# unlink "$pdfpath/$mapfile" ; # can be same
+copy ($mapfile,"$mappath/$mapfile") ;
+
+# atl: global cleanup with generated files (afm & ttf don't mix)
-copy ($mapfile,"$pdfpath/$mapfile") ;
+UnLink(@cleanup) ;
print "\n" ; report ("generating : ls-r databases") ;
diff --git a/dvips/config/context.map b/dvips/config/context.map
deleted file mode 100644
index 942798c57..000000000
--- a/dvips/config/context.map
+++ /dev/null
@@ -1 +0,0 @@
-contnav ContextNavigation <contnav.pfb
diff --git a/fonts/map/context/il2-ams-cmr.map b/fonts/map/context/il2-ams-cmr.map
new file mode 100644
index 000000000..64bf96bf8
--- /dev/null
+++ b/fonts/map/context/il2-ams-cmr.map
@@ -0,0 +1,56 @@
+csr10 <csr10.pfb <csr.enc
+csr12 <csr12.pfb <csr.enc
+csr17 <csr17.pfb <csr.enc
+csr9 <csr9.pfb <csr.enc
+csr8 <csr8.pfb <csr.enc
+csr7 <csr7.pfb <csr.enc
+csr6 <csr6.pfb <csr.enc
+csr5 <csr5.pfb <csr1.enc
+csbx10 <csbx10.pfb <csr.enc
+csbx12 <csbx12.pfb <csr.enc
+csbx9 <csbx9.pfb <csr.enc
+csbx8 <csbx8.pfb <csr.enc
+csbx7 <csbx7.pfb <csr.enc
+csbx6 <csbx6.pfb <csr.enc
+csbx5 <csbx5.pfb <csr.enc
+csb10 <csb10.pfb <csr.enc
+csti10 <csti10.pfb <csr.enc
+csti12 <csti12.pfb <csr.enc
+csti9 <csti9.pfb <csr.enc
+csti8 <csti8.pfb <csr.enc
+csti7 <csti7.pfb <csr.enc
+cstt10 <cstt10.pfb <cstt.enc
+cstt12 <cstt12.pfb <cstt.enc
+cstt9 <cstt9.pfb <cstt.enc
+cstt8 <cstt8.pfb <cstt.enc
+cssltt10 <cssltt10.pfb <cstt.enc
+csvtt10 <csvtt10.pfb <cstt.enc
+csss10 <csss10.pfb <csr.enc
+csss12 <csss12.pfb <csr.enc
+csss17 <csss17.pfb <csr.enc
+csss9 <csss9.pfb <csr.enc
+csss8 <csss8.pfb <csr.enc
+csssi10 <csssi10.pfb <csr.enc
+csssi12 <csssi12.pfb <csr.enc
+csssi17 <csssi17.pfb <csr.enc
+csssi9 <csssi9.pfb <csr.enc
+csssi8 <csssi8.pfb <csr.enc
+cssl10 <cssl10.pfb <csr.enc
+cssl12 <cssl12.pfb <csr.enc
+cssl9 <cssl9.pfb <csr.enc
+cssl8 <cssl8.pfb <csr.enc
+csssq8 <csssq8.pfb <csr.enc
+csssqi8 <csssqi8.pfb <csr.enc
+csssdc10 <csssdc10.pfb <csr.enc
+csssbx10 <csssbx10.pfb <csr.enc
+csinch <csinch.pfb <csin.enc
+csdunh10 <csdunh10.pfb <csr.enc
+csbxsl10 <csbxsl10.pfb <csr.enc
+csff10 <csff10.pfb <csr.enc
+csfib8 <csfib8.pfb <csr.enc
+csbxti10 <csbxti10.pfb <csr.enc
+csitt10 <csitt10.pfb <cstt.enc
+csu10 <csu10.pfb <csr.enc
+csfi10 <csfi10.pfb <csr.enc
+cscsc10 <cscsc10.pfb <csr1.enc
+cstcsc10 <cstcsc10.pfb <cstt.enc
diff --git a/fonts/map/context/original-adobe-euro.map b/fonts/map/context/original-adobe-euro.map
new file mode 100644
index 000000000..7a1137ebb
--- /dev/null
+++ b/fonts/map/context/original-adobe-euro.map
@@ -0,0 +1,25 @@
+euromo <euromo.pfb
+euromob <euromob.pfb
+euromoi <euromoi.pfb
+euromobi <euromobi.pfb
+eurosa <eurosa.pfb
+eurosab <eurosab.pfb
+eurosai <eurosai.pfb
+eurosabi <eurosebi.pfb
+eurose <eurose.pfb
+euroseb <euroseb.pfb
+eurosei <eurosei.pfb
+eurosebi <eurosebi.pfb
+
+% euromo <_2______.pfb
+% euromob <_2b_____.pfb
+% euromoi <_2i_____.pfb
+% euromobi <_2bi____.pfb
+% eurosa <_1______.pfb
+% eurosab <_1b_____.pfb
+% eurosai <_1i_____.pfb
+% eurosabi <_1bi____.pfb
+% eurose <_3______.pfb
+% euroseb <_3b_____.pfb
+% eurosei <_3i_____.pfb
+% eurosebi <_3bi____.pfb
diff --git a/fonts/map/context/original-ams-cmr.map b/fonts/map/context/original-ams-cmr.map
new file mode 100644
index 000000000..9c739da11
--- /dev/null
+++ b/fonts/map/context/original-ams-cmr.map
@@ -0,0 +1,122 @@
+cmb10 <cmb10.pfb
+cmbsy10 <cmbsy10.pfb
+cmbsy6 <cmbsy6.pfb
+cmbsy7 <cmbsy7.pfb
+cmbsy8 <cmbsy8.pfb
+cmbsy9 <cmbsy9.pfb
+cmbx10 <cmbx10.pfb
+cmbx12 <cmbx12.pfb
+cmbx5 <cmbx5.pfb
+cmbx6 <cmbx6.pfb
+cmbx7 <cmbx7.pfb
+cmbx8 <cmbx8.pfb
+cmbx9 <cmbx9.pfb
+cmbxsl10 <cmbxsl10.pfb
+cmbxti10 <cmbxti10.pfb
+cmcsc10 <cmcsc10.pfb
+cmdunh10 <cmdunh10.pfb
+cmex10 <cmex10.pfb
+cmff10 <cmff10.pfb
+cmfi10 <cmfi10.pfb
+cmfib8 <cmfib8.pfb
+cminch <cminch.pfb
+cmitt10 <cmitt10.pfb
+cmmi10 <cmmi10.pfb
+cmmi12 <cmmi12.pfb
+cmmi5 <cmmi5.pfb
+cmmi6 <cmmi6.pfb
+cmmi7 <cmmi7.pfb
+cmmi8 <cmmi8.pfb
+cmmi9 <cmmi9.pfb
+cmmib10 <cmmib10.pfb
+cmr10 <cmr10.pfb
+cmr12 <cmr12.pfb
+cmr17 <cmr17.pfb
+cmr5 <cmr5.pfb
+cmr6 <cmr6.pfb
+cmr7 <cmr7.pfb
+cmr8 <cmr8.pfb
+cmr9 <cmr9.pfb
+cmsl10 <cmsl10.pfb
+cmsl12 <cmsl12.pfb
+cmsl8 <cmsl8.pfb
+cmsl9 <cmsl9.pfb
+cmsltt10 <cmsltt10.pfb
+cmss10 <cmss10.pfb
+cmss12 <cmss12.pfb
+cmss17 <cmss17.pfb
+cmss8 <cmss8.pfb
+cmss9 <cmss9.pfb
+cmssbx10 <cmssbx10.pfb
+cmssdc10 <cmssdc10.pfb
+cmssi10 <cmssi10.pfb
+cmssi12 <cmssi12.pfb
+cmssi17 <cmssi17.pfb
+cmssi8 <cmssi8.pfb
+cmssi9 <cmssi9.pfb
+cmssq8 <cmssq8.pfb
+cmssqi8 <cmssqi8.pfb
+cmsy10 <cmsy10.pfb
+cmsy5 <cmsy5.pfb
+cmsy6 <cmsy6.pfb
+cmsy7 <cmsy7.pfb
+cmsy8 <cmsy8.pfb
+cmsy9 <cmsy9.pfb
+cmtcsc10 <cmtcsc10.pfb
+cmtex10 <cmtex10.pfb
+cmtex8 <cmtex8.pfb
+cmtex9 <cmtex9.pfb
+cmti10 <cmti10.pfb
+cmti12 <cmti12.pfb
+cmti7 <cmti7.pfb
+cmti8 <cmti8.pfb
+cmti9 <cmti9.pfb
+cmtt10 <cmtt10.pfb
+cmtt12 <cmtt12.pfb
+cmtt8 <cmtt8.pfb
+cmtt9 <cmtt9.pfb
+cmu10 <cmu10.pfb
+cmvtt10 <cmvtt10.pfb
+
+icmex10 <icmex10.pfb
+icmmi8 <icmmi8.pfb
+icmsy8 <icmsy8.pfb
+icmtt8 <icmtt8.pfb
+ilasy8 <ilasy8.pfb
+ilcmss8 <ilcmss8.pfb
+ilcmssb8 <ilcmssb8.pfb
+ilcmssi8 <ilcmssi8.pfb
+lasy10 <lasy10.pfb
+lasy5 <lasy5.pfb
+lasy6 <lasy6.pfb
+lasy7 <lasy7.pfb
+lasy8 <lasy8.pfb
+lasy9 <lasy9.pfb
+lasyb10 <lasyb10.pfb
+lcircle10 <lcircle1.pfb
+lcirclew10 <lcirclew.pfb
+lcmss8 <lcmss8.pfb
+lcmssb8 <lcmssb8.pfb
+lcmssi8 <lcmssi8.pfb
+line10 <line10.pfb
+linew10 <linew10.pfb
+logo10 <logo10.pfb
+logo8 <logo8.pfb
+logo9 <logo9.pfb
+logobf10 <logobf10.pfb
+logosl10 <logosl10.pfb
+
+msam10 <msam10.pfb
+msam5 <msam5.pfb
+msam7 <msam7.pfb
+msbm10 <msbm10.pfb
+msbm5 <msbm5.pfb
+msbm7 <msbm7.pfb
+
+wncyb10 <wncyb10.pfb
+wncyi10 <wncyi10.pfb
+wncyr10 <wncyr10.pfb
+wncysc10 <wncysc10.pfb
+wncyss10 <wncyss10.pfb
+
+manfnt <manfnt.pfb
diff --git a/fonts/map/context/original-ams-euler.map b/fonts/map/context/original-ams-euler.map
new file mode 100644
index 000000000..91328a197
--- /dev/null
+++ b/fonts/map/context/original-ams-euler.map
@@ -0,0 +1,19 @@
+euex10 EUEX10 4 <euex10.pfb
+eufb10 EUFB10 4 <eufb10.pfb
+eufb5 EUFB5 4 <eufb5.pfb
+eufb7 EUFB7 4 <eufb7.pfb
+eufm10 EUFM10 4 <eufm10.pfb
+eufm5 EUFM5 4 <eufm5.pfb
+eufm7 EUFM7 4 <eufm7.pfb
+eurb10 EURB10 4 <eurb10.pfb
+eurb5 EURB5 4 <eurb5.pfb
+eurb7 EURB7 4 <eurb7.pfb
+eurm10 EURM10 4 <eurm10.pfb
+eurm5 EURM5 4 <eurm5.pfb
+eurm7 EURM7 4 <eurm7.pfb
+eusb10 EUSB10 4 <eusb10.pfb
+eusb5 EUSB5 4 <eusb5.pfb
+eusb7 EUSB7 4 <eusb7.pfb
+eusm10 EUSM10 4 <eusm10.pfb
+eusm5 EUSM5 4 <eusm5.pfb
+eusm7 EUSM7 4 <eusm7.pfb
diff --git a/fonts/map/context/original-ams-lmr.map b/fonts/map/context/original-ams-lmr.map
new file mode 100644
index 000000000..7287d249f
--- /dev/null
+++ b/fonts/map/context/original-ams-lmr.map
@@ -0,0 +1,54 @@
+lmb10 LMRomanDemi10-Regular "enclmb10 ReEncodeFont" <lmb10.enc <lmb10.pfb
+lmbsl10 LMRomanDemi10-BoldItalic "enclmbsl10 ReEncodeFont" <lmbsl10.enc <lmbsl10.pfb
+lmbx10 LMRoman10-Bold "enclmbx10 ReEncodeFont" <lmbx10.enc <lmbx10.pfb
+lmbx12 LMRoman12-Bold "enclmbx12 ReEncodeFont" <lmbx12.enc <lmbx12.pfb
+lmbx5 LMRoman5-Bold "enclmbx5 ReEncodeFont" <lmbx5.enc <lmbx5.pfb
+lmbx6 LMRoman6-Bold "enclmbx6 ReEncodeFont" <lmbx6.enc <lmbx6.pfb
+lmbx7 LMRoman7-Bold "enclmbx7 ReEncodeFont" <lmbx7.enc <lmbx7.pfb
+lmbx8 LMRoman8-Bold "enclmbx8 ReEncodeFont" <lmbx8.enc <lmbx8.pfb
+lmbx9 LMRoman9-Bold "enclmbx9 ReEncodeFont" <lmbx9.enc <lmbx9.pfb
+lmbxsl10 LMSlanted10-BoldItalic "enclmbxsl10 ReEncodeFont" <lmbxsl10.enc <lmbxsl10.pfb
+lmbxti10 LMRoman10-BoldItalic "enclmbxti10 ReEncodeFont" <lmbxti10.enc <lmbxti10.pfb
+lmcsc10 LMCaps10-Regular "enclmcsc10 ReEncodeFont" <lmcsc10.enc <lmcsc10.pfb
+lmitt10 LMTypewriter10-Italic "enclmitt10 ReEncodeFont" <lmitt10.enc <lmitt10.pfb
+lmr10 LMRoman10-Regular "enclmr10 ReEncodeFont" <lmr10.enc <lmr10.pfb
+lmr12 LMRoman12-Regular "enclmr12 ReEncodeFont" <lmr12.enc <lmr12.pfb
+lmr17 LMRoman17-Regular "enclmr17 ReEncodeFont" <lmr17.enc <lmr17.pfb
+lmr5 LMRoman5-Regular "enclmr5 ReEncodeFont" <lmr5.enc <lmr5.pfb
+lmr6 LMRoman6-Regular "enclmr6 ReEncodeFont" <lmr6.enc <lmr6.pfb
+lmr7 LMRoman7-Regular "enclmr7 ReEncodeFont" <lmr7.enc <lmr7.pfb
+lmr8 LMRoman8-Regular "enclmr8 ReEncodeFont" <lmr8.enc <lmr8.pfb
+lmr9 LMRoman9-Regular "enclmr9 ReEncodeFont" <lmr9.enc <lmr9.pfb
+lmsl10 LMSlanted10-Italic "enclmsl10 ReEncodeFont" <lmsl10.enc <lmsl10.pfb
+lmsl12 LMSlanted12-Italic "enclmsl12 ReEncodeFont" <lmsl12.enc <lmsl12.pfb
+lmsl8 LMSlanted8-Italic "enclmsL8 ReEncodeFont" <lmsl8.enc <lmsl8.pfb
+lmsl9 LMSlanted9-Italic "enclmsL9 ReEncodeFont" <lmsl9.enc <lmsl9.pfb
+lmsltt10 LMTypewriterSlanted10-Italic "enclmsltt10 ReEncodeFont" <lmsltt10.enc <lmsltt10.pfb
+lmss10 LMSans10-Regular "enclmss10 ReEncodeFont" <lmss10.enc <lmss10.pfb
+lmss12 LMSans12-Regular "enclmss12 ReEncodeFont" <lmss12.enc <lmss12.pfb
+lmss17 LMSans17-Regular "enclmss17 ReEncodeFont" <lmss17.enc <lmss17.pfb
+lmss8 LMSans8-Regular "enclmss8 ReEncodeFont" <lmss8.enc <lmss8.pfb
+lmss9 LMSans9-Regular "enclmss9 ReEncodeFont" <lmss9.enc <lmss9.pfb
+lmssbi10 LMSans10-BoldItalic "enclmssbi10 ReEncodeFont" <lmssbi10.enc <lmssbi10.pfb
+lmssbx10 LMSans10-Bold "enclmssbx10 ReEncodeFont" <lmssbx10.enc <lmssbx10.pfb
+lmssdc10 LMSansDemiCond10-Regular "enclmssdc10 ReEncodeFont" <lmssdc10.enc <lmssdc10.pfb
+lmssdi10 LMSansDemiCond10-BoldItalic "enclmssdi10 ReEncodeFont" <lmssdi10.enc <lmssdi10.pfb
+lmssi10 LMSans10-Italic "enclmssi10 ReEncodeFont" <lmssi10.enc <lmssi10.pfb
+lmssi12 LMSans12-Italic "enclmssi12 ReEncodeFont" <lmssi12.enc <lmssi12.pfb
+lmssi17 LMSans17-Italic "enclmssi17 ReEncodeFont" <lmssi17.enc <lmssi17.pfb
+lmssi8 LMSans8-Italic "enclmssi8 ReEncodeFont" <lmssi8.enc <lmssi8.pfb
+lmssi9 LMSans9-Italic "enclmssi9 ReEncodeFont" <lmssi9.enc <lmssi9.pfb
+lmssq8 LMSansQuotation8-Regular "enclmssq8 ReEncodeFont" <lmssq8.enc <lmssq8.pfb
+lmssqb8 LMSansQuotation8-Bold "enclmssqb8 ReEncodeFont" <lmssqb8.enc <lmssqb8.pfb
+lmssqbi8 LMSansQuotation8-BoldItalic "enclmssqbi8 ReEncodeFont" <lmssqbi8.enc <lmssqbi8.pfb
+lmssqi8 LMSansQuotation8-Italic "enclmssqi8 ReEncodeFont" <lmssqi8.enc <lmssqi8.pfb
+lmtcsc10 LMTypewriterCaps10-Regular "enclmtcsc10 ReEncodeFont" <lmtcsc10.enc <lmtcsc10.pfb
+lmti10 LMRoman10-Italic "enclmti10 ReEncodeFont" <lmti10.enc <lmti10.pfb
+lmti12 LMRoman12-Italic "enclmti12 ReEncodeFont" <lmti12.enc <lmti12.pfb
+lmti7 LMRoman7-Italic "enclmti7 ReEncodeFont" <lmti7.enc <lmti7.pfb
+lmti8 LMRoman8-Italic "enclmti8 ReEncodeFont" <lmti8.enc <lmti8.pfb
+lmti9 LMRoman9-Italic "enclmti9 ReEncodeFont" <lmti9.enc <lmti9.pfb
+lmtt10 LMTypewriter10-Regular "enclmtt10 ReEncodeFont" <lmtt10.enc <lmtt10.pfb
+lmtt12 LMTypewriter12-Regular "enclmtt12 ReEncodeFont" <lmtt12.enc <lmtt12.pfb
+lmtt8 LMTypewriter8-Regular "enclmtt8 ReEncodeFont" <lmtt8.enc <lmtt8.pfb
+lmtt9 LMTypewriter9-Regular "enclmtt9 ReEncodeFont" <lmtt9.enc <lmtt9.pfb
diff --git a/fonts/map/context/original-context-symbol.map b/fonts/map/context/original-context-symbol.map
new file mode 100644
index 000000000..607efd6d8
--- /dev/null
+++ b/fonts/map/context/original-context-symbol.map
@@ -0,0 +1 @@
+contnav ContextNavigation <contnav.pfb \ No newline at end of file
diff --git a/fonts/map/context/original-micropress-informal.map b/fonts/map/context/original-micropress-informal.map
new file mode 100644
index 000000000..2661f1cb1
--- /dev/null
+++ b/fonts/map/context/original-micropress-informal.map
@@ -0,0 +1,7 @@
+ifrm10cm 4 < ifrg.pfb cm.enc
+ifrb10cm 4 < ifb.pfb cm.enc
+ifro10cm 4 < ifo.pfb cm.enc
+ifbo10cm 4 < ifbo.pfb cm.enc
+ifex10 4 < ifex10.pfb
+ifmi10 4 < ifmi10.pfb
+ifsy10 4 < ifsy10.pfb
diff --git a/fonts/map/context/original-vogel-symbol.map b/fonts/map/context/original-vogel-symbol.map
new file mode 100644
index 000000000..601d0317d
--- /dev/null
+++ b/fonts/map/context/original-vogel-symbol.map
@@ -0,0 +1,2 @@
+fmvr8x Marvosym < marvosym.pfb
+
diff --git a/fonts/map/context/original-youngryu-px.map b/fonts/map/context/original-youngryu-px.map
new file mode 100644
index 000000000..f9f19415e
--- /dev/null
+++ b/fonts/map/context/original-youngryu-px.map
@@ -0,0 +1,47 @@
+% This file a (slightly adapted) copy of teh map file
+% that comes with the PX fonts by Young Ryu.
+
+% URW Palatino
+
+rpxpplb "TeXBase1Encoding ReEncodeFont" <tx8r.enc <uplb8a.pfb
+rpxpplbo ".167 SlantFont TeXBase1Encoding ReEncodeFont" <tx8r.enc <uplb8a.pfb
+rpxpplbi "TeXBase1Encoding ReEncodeFont" <tx8r.enc <uplbi8a.pfb
+rpxpplr "TeXBase1Encoding ReEncodeFont" <tx8r.enc <uplr8a.pfb
+rpxpplro ".167 SlantFont TeXBase1Encoding ReEncodeFont" <tx8r.enc <uplr8a.pfb
+rpxpplri "TeXBase1Encoding ReEncodeFont" <tx8r.enc <uplri8a.pfb
+
+% PX Text
+
+rpxr <rpxr.pfb
+rpxsl ".167 SlantFont" <rpxr.pfb
+rpxi <rpxi.pfb
+rpxsc <rpxsc.pfb
+rpxb <rpxb.pfb
+rpxbsl ".167 SlantFont" <rpxb.pfb
+rpxbi <rpxbi.pfb
+rpxbsc <rpxbsc.pfb
+rpcxb <rpcxb.pfb
+rpcxbsl ".167 SlantFont" <rpcxb.pfb
+rpcxbi <rpcxbi.pfb
+rpcxi <rpcxi.pfb
+rpcxr <rpcxr.pfb
+rpcxsl ".167 SlantFont" <rpcxr.pfb
+
+% PX Math
+
+rpxbmi <rpxbmi.pfb
+rpxmi <rpxmi.pfb
+pxbex <pxbex.pfb
+pxbexa <pxbexa.pfb
+pxbmia <pxbmia.pfb
+pxbsy <pxbsy.pfb
+pxbsya <pxbsya.pfb
+pxbsyb <pxbsyb.pfb
+pxbsyc <pxbsyc.pfb
+pxex <pxex.pfb
+pxexa <pxexa.pfb
+pxmia <pxmia.pfb
+pxsy <pxsy.pfb
+pxsya <pxsya.pfb
+pxsyb <pxsyb.pfb
+pxsyc <pxsyc.pfb
diff --git a/fonts/map/context/original-youngryu-tx.map b/fonts/map/context/original-youngryu-tx.map
new file mode 100644
index 000000000..5f2c6010d
--- /dev/null
+++ b/fonts/map/context/original-youngryu-tx.map
@@ -0,0 +1,86 @@
+% This file is a (slightly adapted) copy of the map file
+% that comes with the TX fonts by Young Ryu.
+
+% URW times
+
+rtxptmb "TeXBase1Encoding ReEncodeFont" <tx8r.enc <utmb8a.pfb
+rtxptmbo ".167 SlantFont TeXBase1Encoding ReEncodeFont" <tx8r.enc <utmb8a.pfb
+rtxptmbi "TeXBase1Encoding ReEncodeFont" <tx8r.enc <utmbi8a.pfb
+rtxptmr "TeXBase1Encoding ReEncodeFont" <tx8r.enc <utmr8a.pfb
+rtxptmro ".167 SlantFont TeXBase1Encoding ReEncodeFont" <tx8r.enc <utmr8a.pfb
+rtxptmri "TeXBase1Encoding ReEncodeFont" <tx8r.enc <utmri8a.pfb
+
+% TX Text
+
+rtxr <rtxr.pfb
+rtxsl ".167 SlantFont" <rtxr.pfb
+rtxi <rtxi.pfb
+rtxsc <rtxsc.pfb
+rtxb <rtxb.pfb
+rtxbsl ".167 SlantFont" <rtxb.pfb
+rtxbi <rtxbi.pfb
+rtxbsc <rtxbsc.pfb
+rtcxb <rtcxb.pfb
+rtcxbsl ".167 SlantFont" <rtcxb.pfb
+rtcxbi <rtcxbi.pfb
+rtcxi <rtcxi.pfb
+rtcxr <rtcxr.pfb
+rtcxsl ".167 SlantFont" <rtcxr.pfb
+
+% TX Math
+
+rtxbmi <rtxbmi.pfb
+rtxmi <rtxmi.pfb
+txbex <txbex.pfb
+txbexa <txbexa.pfb
+txbmia <txbmia.pfb
+txbsy <txbsy.pfb
+txbsya <txbsya.pfb
+txbsyb <txbsyb.pfb
+txbsyc <txbsyc.pfb
+txex <txex.pfb
+txexa <txexa.pfb
+txmia <txmia.pfb
+txsy <txsy.pfb
+txsya <txsya.pfb
+txsyb <txsyb.pfb
+txsyc <txsyc.pfb
+
+% TX TT Text
+
+txtt <txtt.pfb
+txttsl ".167 SlantFont" <txtt.pfb
+txttsc <txttsc.pfb
+txbtt <txbtt.pfb
+txbttsl ".167 SlantFont" <txbtt.pfb
+txbttsc <txbttsc.pfb
+t1xtt <t1xtt.pfb
+t1xttsl ".167 SlantFont" <t1xtt.pfb
+t1xttsc <t1xttsc.pfb
+t1xbtt <t1xbtt.pfb
+t1xbttsl ".167 SlantFont" <t1xbtt.pfb
+t1xbttsc <t1xbttsc.pfb
+tcxtt <tcxtt.pfb
+tcxttsl ".167 SlantFont" <tcxtt.pfb
+tcxbtt <tcxbtt.pfb
+tcxbttsl ".167 SlantFont" <tcxbtt.pfb
+
+% URW Helvetica
+
+rtxphvr "TeXBase1Encoding ReEncodeFont" <tx8r.enc <uhv8a.pfb
+rtxphvro ".167 SlantFont TeXBase1Encoding ReEncodeFont" <tx8r.enc <uhvo8a.pfb
+rtxphvb "TeXBase1Encoding ReEncodeFont" <tx8r.enc <uhvb8a.pfb
+rtxphvbo ".167 SlantFont TeXBase1Encoding ReEncodeFont" <tx8r.enc <uhvbo8a.pfb
+
+% TX SS Text
+
+rtxss <rtxss.pfb
+rtxsssl ".167 SlantFont" <rtxss.pfb
+rtxsssc <rtxsssc.pfb
+rtxbss <rtxbss.pfb
+rtxbsssl ".167 SlantFont" <rtxbss.pfb
+rtxbsssc <rtxbsssc.pfb
+rtcxss <rtcxss.pfb
+rtcxbss <rtcxbss.pfb
+rtcxsssl ".167 SlantFont" <rtcxss.pfb
+rtcxbsso ".167 SlantFont" <rtcxbss.pfb
diff --git a/fonts/map/context/pl0-ams-cmr.map b/fonts/map/context/pl0-ams-cmr.map
new file mode 100644
index 000000000..781bcb106
--- /dev/null
+++ b/fonts/map/context/pl0-ams-cmr.map
@@ -0,0 +1,77 @@
+plb10 <plrm.enc <plb10.pfb
+plbsy10 <plms.enc <plbsy10.pfb
+plbx10 <plrm.enc <plbx10.pfb
+plbx12 <plrm.enc <plbx12.pfb
+plbx5 <plrm.enc <plbx5.pfb
+plbx6 <plrm.enc <plbx6.pfb
+plbx7 <plrm.enc <plbx7.pfb
+plbx8 <plrm.enc <plbx8.pfb
+plbx9 <plrm.enc <plbx9.pfb
+plbxsl10 <plrm.enc <plbxsl10.pfb
+plbxti10 <plit.enc <plbxti10.pfb
+plcsc10 <plsc.enc <plcsc10.pfb
+pldunh10 <plrm.enc <pldunh10.pfb
+plex10 <plme.enc <plex10.pfb
+plex9 <plme.enc <plex9.pfb
+plff10 <plrm.enc <plff10.pfb
+plfi10 <plit.enc <plfi10.pfb
+plfib8 <plrm.enc <plfib8.pfb
+plinch <plin.enc <plinch.pfb
+plitt10 <plitt.enc <plitt10.pfb
+plmi10 <plmi.enc <plmi10.pfb
+plmi12 <plmi.enc <plmi12.pfb
+plmi5 <plmi.enc <plmi5.pfb
+plmi6 <plmi.enc <plmi6.pfb
+plmi7 <plmi.enc <plmi7.pfb
+plmi8 <plmi.enc <plmi8.pfb
+plmi9 <plmi.enc <plmi9.pfb
+plmib10 <plmi.enc <plmib10.pfb
+plr10 <plrm.enc <plr10.pfb
+plr12 <plrm.enc <plr12.pfb
+plr17 <plrm.enc <plr17.pfb
+plr5 <plsc.enc <plr5.pfb
+plr6 <plrm.enc <plr6.pfb
+plr7 <plrm.enc <plr7.pfb
+plr8 <plrm.enc <plr8.pfb
+plr9 <plrm.enc <plr9.pfb
+plsl10 <plrm.enc <plsl10.pfb
+plsl12 <plrm.enc <plsl12.pfb
+plsl8 <plrm.enc <plsl8.pfb
+plsl9 <plrm.enc <plsl9.pfb
+plsltt10 <pltt.enc <plsltt10.pfb
+plss10 <plrm.enc <plss10.pfb
+plss12 <plrm.enc <plss12.pfb
+plss17 <plrm.enc <plss17.pfb
+plss8 <plrm.enc <plss8.pfb
+plss9 <plrm.enc <plss9.pfb
+plssbi10 <plrm.enc <plssbi10.pfb
+plssbx10 <plrm.enc <plssbx10.pfb
+plssdc10 <plrm.enc <plssdc10.pfb
+plssi10 <plrm.enc <plssi10.pfb
+plssi12 <plrm.enc <plssi12.pfb
+plssi17 <plrm.enc <plssi17.pfb
+plssi8 <plrm.enc <plssi8.pfb
+plssi9 <plrm.enc <plssi9.pfb
+plssq8 <plrm.enc <plssq8.pfb
+plssqi8 <plrm.enc <plssqi8.pfb
+plsy10 <plms.enc <plsy10.pfb
+plsy5 <plms.enc <plsy5.pfb
+plsy6 <plms.enc <plsy6.pfb
+plsy7 <plms.enc <plsy7.pfb
+plsy8 <plms.enc <plsy8.pfb
+plsy9 <plms.enc <plsy9.pfb
+pltcsc10 <pltt.enc <pltcsc10.pfb
+pltex10 <plte.enc <pltex10.pfb
+pltex8 <plte.enc <pltex8.pfb
+pltex9 <plte.enc <pltex9.pfb
+plti10 <plit.enc <plti10.pfb
+plti12 <plit.enc <plti12.pfb
+plti7 <plit.enc <plti7.pfb
+plti8 <plit.enc <plti8.pfb
+plti9 <plit.enc <plti9.pfb
+pltt10 <pltt.enc <pltt10.pfb
+pltt12 <pltt.enc <pltt12.pfb
+pltt8 <pltt.enc <pltt8.pfb
+pltt9 <pltt.enc <pltt9.pfb
+plu10 <plit.enc <plu10.pfb
+plvtt10 <plrm.enc <plvtt10.pfb
diff --git a/fonts/map/context/psclean.map b/fonts/map/context/psclean.map
new file mode 100644
index 000000000..266c58cbd
--- /dev/null
+++ b/fonts/map/context/psclean.map
@@ -0,0 +1,1197 @@
+lmb10 LMRomanDemi10-Regular "enclmb10 ReEncodeFont" <lmb10.enc <lmb10.pfb
+lmbsl10 LMRomanDemi10-BoldItalic "enclmbsl10 ReEncodeFont" <lmbsl10.enc <lmbsl10.pfb
+lmbx10 LMRoman10-Bold "enclmbx10 ReEncodeFont" <lmbx10.enc <lmbx10.pfb
+lmbx12 LMRoman12-Bold "enclmbx12 ReEncodeFont" <lmbx12.enc <lmbx12.pfb
+lmbx5 LMRoman5-Bold "enclmbx5 ReEncodeFont" <lmbx5.enc <lmbx5.pfb
+lmbx6 LMRoman6-Bold "enclmbx6 ReEncodeFont" <lmbx6.enc <lmbx6.pfb
+lmbx7 LMRoman7-Bold "enclmbx7 ReEncodeFont" <lmbx7.enc <lmbx7.pfb
+lmbx8 LMRoman8-Bold "enclmbx8 ReEncodeFont" <lmbx8.enc <lmbx8.pfb
+lmbx9 LMRoman9-Bold "enclmbx9 ReEncodeFont" <lmbx9.enc <lmbx9.pfb
+lmbxsl10 LMSlanted10-BoldItalic "enclmbxsl10 ReEncodeFont" <lmbxsl10.enc <lmbxsl10.pfb
+lmbxti10 LMRoman10-BoldItalic "enclmbxti10 ReEncodeFont" <lmbxti10.enc <lmbxti10.pfb
+lmcsc10 LMCaps10-Regular "enclmcsc10 ReEncodeFont" <lmcsc10.enc <lmcsc10.pfb
+lmitt10 LMTypewriter10-Italic "enclmitt10 ReEncodeFont" <lmitt10.enc <lmitt10.pfb
+lmr10 LMRoman10-Regular "enclmr10 ReEncodeFont" <lmr10.enc <lmr10.pfb
+lmr12 LMRoman12-Regular "enclmr12 ReEncodeFont" <lmr12.enc <lmr12.pfb
+lmr17 LMRoman17-Regular "enclmr17 ReEncodeFont" <lmr17.enc <lmr17.pfb
+lmr5 LMRoman5-Regular "enclmr5 ReEncodeFont" <lmr5.enc <lmr5.pfb
+lmr6 LMRoman6-Regular "enclmr6 ReEncodeFont" <lmr6.enc <lmr6.pfb
+lmr7 LMRoman7-Regular "enclmr7 ReEncodeFont" <lmr7.enc <lmr7.pfb
+lmr8 LMRoman8-Regular "enclmr8 ReEncodeFont" <lmr8.enc <lmr8.pfb
+lmr9 LMRoman9-Regular "enclmr9 ReEncodeFont" <lmr9.enc <lmr9.pfb
+lmsl10 LMSlanted10-Italic "enclmsl10 ReEncodeFont" <lmsl10.enc <lmsl10.pfb
+lmsl12 LMSlanted12-Italic "enclmsl12 ReEncodeFont" <lmsl12.enc <lmsl12.pfb
+lmsl8 LMSlanted8-Italic "enclmsL8 ReEncodeFont" <lmsl8.enc <lmsl8.pfb
+lmsl9 LMSlanted9-Italic "enclmsL9 ReEncodeFont" <lmsl9.enc <lmsl9.pfb
+lmsltt10 LMTypewriterSlanted10-Italic "enclmsltt10 ReEncodeFont" <lmsltt10.enc <lmsltt10.pfb
+lmss10 LMSans10-Regular "enclmss10 ReEncodeFont" <lmss10.enc <lmss10.pfb
+lmss12 LMSans12-Regular "enclmss12 ReEncodeFont" <lmss12.enc <lmss12.pfb
+lmss17 LMSans17-Regular "enclmss17 ReEncodeFont" <lmss17.enc <lmss17.pfb
+lmss8 LMSans8-Regular "enclmss8 ReEncodeFont" <lmss8.enc <lmss8.pfb
+lmss9 LMSans9-Regular "enclmss9 ReEncodeFont" <lmss9.enc <lmss9.pfb
+lmssbi10 LMSans10-BoldItalic "enclmssbi10 ReEncodeFont" <lmssbi10.enc <lmssbi10.pfb
+lmssbx10 LMSans10-Bold "enclmssbx10 ReEncodeFont" <lmssbx10.enc <lmssbx10.pfb
+lmssdc10 LMSansDemiCond10-Regular "enclmssdc10 ReEncodeFont" <lmssdc10.enc <lmssdc10.pfb
+lmssdi10 LMSansDemiCond10-BoldItalic "enclmssdi10 ReEncodeFont" <lmssdi10.enc <lmssdi10.pfb
+lmssi10 LMSans10-Italic "enclmssi10 ReEncodeFont" <lmssi10.enc <lmssi10.pfb
+lmssi12 LMSans12-Italic "enclmssi12 ReEncodeFont" <lmssi12.enc <lmssi12.pfb
+lmssi17 LMSans17-Italic "enclmssi17 ReEncodeFont" <lmssi17.enc <lmssi17.pfb
+lmssi8 LMSans8-Italic "enclmssi8 ReEncodeFont" <lmssi8.enc <lmssi8.pfb
+lmssi9 LMSans9-Italic "enclmssi9 ReEncodeFont" <lmssi9.enc <lmssi9.pfb
+lmssq8 LMSansQuotation8-Regular "enclmssq8 ReEncodeFont" <lmssq8.enc <lmssq8.pfb
+lmssqb8 LMSansQuotation8-Bold "enclmssqb8 ReEncodeFont" <lmssqb8.enc <lmssqb8.pfb
+lmssqbi8 LMSansQuotation8-BoldItalic "enclmssqbi8 ReEncodeFont" <lmssqbi8.enc <lmssqbi8.pfb
+lmssqi8 LMSansQuotation8-Italic "enclmssqi8 ReEncodeFont" <lmssqi8.enc <lmssqi8.pfb
+lmtcsc10 LMTypewriterCaps10-Regular "enclmtcsc10 ReEncodeFont" <lmtcsc10.enc <lmtcsc10.pfb
+lmti10 LMRoman10-Italic "enclmti10 ReEncodeFont" <lmti10.enc <lmti10.pfb
+lmti12 LMRoman12-Italic "enclmti12 ReEncodeFont" <lmti12.enc <lmti12.pfb
+lmti7 LMRoman7-Italic "enclmti7 ReEncodeFont" <lmti7.enc <lmti7.pfb
+lmti8 LMRoman8-Italic "enclmti8 ReEncodeFont" <lmti8.enc <lmti8.pfb
+lmti9 LMRoman9-Italic "enclmti9 ReEncodeFont" <lmti9.enc <lmti9.pfb
+lmtt10 LMTypewriter10-Regular "enclmtt10 ReEncodeFont" <lmtt10.enc <lmtt10.pfb
+lmtt12 LMTypewriter12-Regular "enclmtt12 ReEncodeFont" <lmtt12.enc <lmtt12.pfb
+lmtt8 LMTypewriter8-Regular "enclmtt8 ReEncodeFont" <lmtt8.enc <lmtt8.pfb
+lmtt9 LMTypewriter9-Regular "enclmtt9 ReEncodeFont" <lmtt9.enc <lmtt9.pfb
+
+
+Math1 <math1.pfb
+Math1-bold <math1-bold.pfb
+Math1mono <math1mono.pfb
+Math1mono-bold <math1mono-bold.pfb
+Math2 <math2.pfb
+Math2-bold <math2-bold.pfb
+Math2mono <math2mono.pfb
+Math2mono-bold <math2mono-bold.pfb
+Math3 <math3.pfb
+Math3-bold <math3-bold.pfb
+Math3mono <math3mono.pfb
+Math3mono-bold <math3mono-bold.pfb
+Math4 <math4.pfb
+Math4-bold <math4-bold.pfb
+Math4mono <math4mono.pfb
+Math4mono-bold <math4mono-bold.pfb
+Math5 <math5.pfb
+Math5-bold <math5-bold.pfb
+Math5mono <math5mono.pfb
+Math5mono-bold <math5mono-bold.pfb
+anttb "enc-antt ReEncodeFont" <antt.enc <anttb.pfb
+anttr "enc-antt ReEncodeFont" <antt.enc <anttr.pfb
+anttri "enc-antt ReEncodeFont" <antt.enc <anttri.pfb
+ascii-10 "asciiEncoding ReEncodeFont" <cour.pfa <ascii.enc
+bchb8r "TeXBase1Encoding ReEncodeFont" <8r.enc <bchb8a.pfb
+bchbi8r "TeXBase1Encoding ReEncodeFont" <8r.enc <bchbi8a.pfb
+bchbo8r ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc <bchb8a.pfb
+bchr8r "TeXBase1Encoding ReEncodeFont" <8r.enc <bchr8a.pfb
+bchri8r "TeXBase1Encoding ReEncodeFont" <8r.enc <bchri8a.pfb
+bchro8r ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc <bchr8a.pfb
+blex <blex.pfb
+blsy <blsy.pfb
+cheq <cheq.ps
+cmb10 <cmb10.pfb
+cmbsy10 <cmbsy10.pfb
+cmbsy5 <cmbsy5.pfb
+cmbsy6 <cmbsy6.pfb
+cmbsy7 <cmbsy7.pfb
+cmbsy8 <cmbsy8.pfb
+cmbsy9 <cmbsy9.pfb
+cmbx10 <cmbx10.pfb
+cmbx12 <cmbx12.pfb
+cmbx5 <cmbx5.pfb
+cmbx6 <cmbx6.pfb
+cmbx7 <cmbx7.pfb
+cmbx8 <cmbx8.pfb
+cmbx9 <cmbx9.pfb
+cmbxsl10 <cmbxsl10.pfb
+cmbxti10 <cmbxti10.pfb
+cmcb10 <cmcb10.pfb
+cmcbx10 <cmcbx10.pfb
+cmcbx12 <cmcbx12.pfb
+cmcbx5 <cmcbx5.pfb
+cmcbx6 <cmcbx6.pfb
+cmcbx7 <cmcbx7.pfb
+cmcbx8 <cmcbx8.pfb
+cmcbx9 <cmcbx9.pfb
+cmcbxsl10 <cmcbxsl1.pfb
+cmcbxti10 <cmcbxti1.pfb
+cmccsc10 <cmccsc10.pfb
+cmccsc8 <cmccsc8.pfb
+cmccsc9 <cmccsc9.pfb
+cmcinch <cmcinch7.pfb
+cmcitt10 <cmcitt10.pfb
+cmcsc10 <cmcsc10.pfb
+cmcsc8 <cmcsc8.pfb
+cmcsc9 <cmcsc9.pfb
+cmcsl10 <cmcsl10.pfb
+cmcsl12 <cmcsl12.pfb
+cmcsl8 <cmcsl8.pfb
+cmcsl9 <cmcsl9.pfb
+cmcsltt10 <cmcsltt1.pfb
+cmcss10 <cmcss10.pfb
+cmcss12 <cmcss12.pfb
+cmcss17 <cmcss17.pfb
+cmcss8 <cmcss8.pfb
+cmcss9 <cmcss9.pfb
+cmcssbx10 <cmcssbx1.pfb
+cmcssdc10 <cmcssdc1.pfb
+cmcssi10 <cmcssi10.pfb
+cmcssi12 <cmcssi12.pfb
+cmcssi17 <cmcssi17.pfb
+cmcssi8 <cmcssi8.pfb
+cmcssi9 <cmcssi9.pfb
+cmcssq8 <cmcssq8.pfb
+cmcssqi8 <cmcssqi8.pfb
+cmcti10 <cmcti10.pfb
+cmcti12 <cmcti12.pfb
+cmcti7 <cmcti7.pfb
+cmcti8 <cmcti8.pfb
+cmcti9 <cmcti9.pfb
+cmctt10 <cmctt10.pfb
+cmctt12 <cmctt12.pfb
+cmctt8 <cmctt8.pfb
+cmctt9 <cmctt9.pfb
+cmcu10 <cmcu10.pfb
+cmcyr10 <cmcyr10.pfb
+cmcyr12 <cmcyr12.pfb
+cmcyr17 <cmcyr17.pfb
+cmcyr5 <cmcyr5.pfb
+cmcyr6 <cmcyr6.pfb
+cmcyr7 <cmcyr7.pfb
+cmcyr8 <cmcyr8.pfb
+cmcyr9 <cmcyr9.pfb
+cmdunh10 <cmdunh10.pfb
+cmex10 <cmex10.pfb
+cmex7 <cmex7.pfb
+cmex8 <cmex8.pfb
+cmex9 <cmex9.pfb
+cmff10 <cmff10.pfb
+cmfi10 <cmfi10.pfb
+cmfib8 <cmfib8.pfb
+cminch <cminch.pfb
+cmitt10 <cmitt10.pfb
+cmmi10 <cmmi10.pfb
+cmmi12 <cmmi12.pfb
+cmmi5 <cmmi5.pfb
+cmmi6 <cmmi6.pfb
+cmmi7 <cmmi7.pfb
+cmmi8 <cmmi8.pfb
+cmmi9 <cmmi9.pfb
+cmmib10 <cmmib10.pfb
+cmmib5 <cmmib5.pfb
+cmmib6 <cmmib6.pfb
+cmmib7 <cmmib7.pfb
+cmmib8 <cmmib8.pfb
+cmmib9 <cmmib9.pfb
+cmr10 <cmr10.pfb
+cmr12 <cmr12.pfb
+cmr17 <cmr17.pfb
+cmr5 <cmr5.pfb
+cmr6 <cmr6.pfb
+cmr7 <cmr7.pfb
+cmr8 <cmr8.pfb
+cmr9 <cmr9.pfb
+cmsl10 <cmsl10.pfb
+cmsl12 <cmsl12.pfb
+cmsl8 <cmsl8.pfb
+cmsl9 <cmsl9.pfb
+cmsltt10 <cmsltt10.pfb
+cmss10 <cmss10.pfb
+cmss12 <cmss12.pfb
+cmss17 <cmss17.pfb
+cmss8 <cmss8.pfb
+cmss9 <cmss9.pfb
+cmssbx10 <cmssbx10.pfb
+cmssdc10 <cmssdc10.pfb
+cmssi10 <cmssi10.pfb
+cmssi12 <cmssi12.pfb
+cmssi17 <cmssi17.pfb
+cmssi8 <cmssi8.pfb
+cmssi9 <cmssi9.pfb
+cmssq8 <cmssq8.pfb
+cmssqi8 <cmssqi8.pfb
+cmsy10 <cmsy10.pfb
+cmsy5 <cmsy5.pfb
+cmsy6 <cmsy6.pfb
+cmsy7 <cmsy7.pfb
+cmsy8 <cmsy8.pfb
+cmsy9 <cmsy9.pfb
+cmtcsc10 <cmtcsc10.pfb
+cmtex10 <cmtex10.pfb
+cmtex8 <cmtex8.pfb
+cmtex9 <cmtex9.pfb
+cmti10 <cmti10.pfb
+cmti12 <cmti12.pfb
+cmti7 <cmti7.pfb
+cmti8 <cmti8.pfb
+cmti9 <cmti9.pfb
+cmtt10 <cmtt10.pfb
+cmtt12 <cmtt12.pfb
+cmtt8 <cmtt8.pfb
+cmtt9 <cmtt9.pfb
+cmu10 <cmu10.pfb
+cmvtt10 <cmvtt10.pfb
+contnav <contnav.pfb
+euex10 <euex10.pfb
+euex7 <euex7.pfb
+euex8 <euex8.pfb
+euex9 <euex9.pfb
+eufb10 <eufb10.pfb
+eufb5 <eufb5.pfb
+eufb6 <eufb6.pfb
+eufb7 <eufb7.pfb
+eufb8 <eufb8.pfb
+eufb9 <eufb9.pfb
+eufm10 <eufm10.pfb
+eufm5 <eufm5.pfb
+eufm6 <eufm6.pfb
+eufm7 <eufm7.pfb
+eufm8 <eufm8.pfb
+eufm9 <eufm9.pfb
+eurb10 <eurb10.pfb
+eurb5 <eurb5.pfb
+eurb6 <eurb6.pfb
+eurb7 <eurb7.pfb
+eurb8 <eurb8.pfb
+eurb9 <eurb9.pfb
+eurbo10 " .167 SlantFont " <eurb10.pfb
+eurm10 <eurm10.pfb
+eurm5 <eurm5.pfb
+eurm6 <eurm6.pfb
+eurm7 <eurm7.pfb
+eurm8 <eurm8.pfb
+eurm9 <eurm9.pfb
+eurmo10 " .167 SlantFont " <eurm10.pfb
+eusb10 <eusb10.pfb
+eusb5 <eusb5.pfb
+eusb6 <eusb6.pfb
+eusb7 <eusb7.pfb
+eusb8 <eusb8.pfb
+eusb9 <eusb9.pfb
+eusm10 <eusm10.pfb
+eusm5 <eusm5.pfb
+eusm6 <eusm6.pfb
+eusm7 <eusm7.pfb
+eusm8 <eusm8.pfb
+eusm9 <eusm9.pfb
+fmvr8x <marvosym.pfb
+hlcbot8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlcbot8a.pfb
+hlcbt8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlcbt8a.pfb
+hlcda <hlcda.pfb
+hlcdim <hlcdim.pfb
+hlcdima <hlcdima.pfb
+hlcdm <hlcdm.pfb
+hlcdy <hlcdy.pfb
+hlcra <hlcra.pfb
+hlcrf8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlcrf8a.pfb
+hlcrie8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlcrie8a.pfb
+hlcrim <hlcrim.pfb
+hlcrima <hlcrima.pfb
+hlcrin8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlcrin8a.pfb
+hlcriw8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlcriw8a.pfb
+hlcrm <hlcrm.pfb
+hlcrn8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlcrn8a.pfb
+hlcrof8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <hlcrf8a.pfb
+hlcron8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <hlcrn8a.pfb
+hlcrot8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlcrot8a.pfb
+hlcrt8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlcrt8a.pfb
+hlcrv <hlcrv.pfb
+hlcry <hlcry.pfb
+hlhb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlhb8a.pfb
+hlhbc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlhbc8a.pfb
+hlhbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlhbi8a.pfb
+hlhbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <hlhb8a.pfb
+hlhr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlhr8a.pfb
+hlhrc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlhrc8a.pfb
+hlhri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlhri8a.pfb
+hlhro8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlhro8a.pfb
+hlsb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsb8a.pfb
+hlsbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsbi8a.pfb
+hlsbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <hlsb8a.pfb
+hlsbot8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsbot8a.pfb
+hlsbt8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsbt8a.pfb
+hlsr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsr8a.pfb
+hlsri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsri8a.pfb
+hlsro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <hlsr8a.pfb
+hlsrot8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsrot8a.pfb
+hlsrt8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsrt8a.pfb
+hlsu8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsu8a.pfb
+hlsui8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlsui8a.pfb
+hlsuo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <hlsu8a.pfb
+hlxb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlxb8a.pfb
+hlxbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlxbi8a.pfb
+hlxbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <hlxb8a.pfb
+hlxr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlxr8a.pfb
+hlxri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <hlxri8a.pfb
+hlxro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <hlxr8a.pfb
+lasy10 <lasy10.pfb
+lasy5 <lasy5.pfb
+lasy6 <lasy6.pfb
+lasy7 <lasy7.pfb
+lasy8 <lasy8.pfb
+lasy9 <lasy9.pfb
+lasyb10 <lasyb10.pfb
+lcircle10 <lcircle1.pfb
+lcirclew10 <lcirclew.pfb
+lcmss8 <lcmss8.pfb
+lcmssb8 <lcmssb8.pfb
+lcmssi8 <lcmssi8.pfb
+line10 <line10.pfb
+linew10 <linew10.pfb
+logo10 <logo10.pfb
+logo8 <logo8.pfb
+logo9 <logo9.pfb
+logobf10 <logobf10.pfb
+logod10 <logod10.pfb
+logosl10 <logosl10.pfb
+logosl8 <logosl8.pfb
+logosl9 <logosl9.pfb
+lscyb <lscyb.pfb
+lscybo <lscybo.pfb
+lscyo <lscyo.pfb
+lscyr <lscyr.pfb
+lstcyb <lstcyb.pfb
+lstcybo <lstcybo.pfb
+lstcyo <lstcyo.pfb
+lstcyr <lstcyr.pfb
+ma1b8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1b8a.pfb
+ma1bi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1bi8a.pfb
+ma1bi8rn "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1bi8an.pfb
+ma1bo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma1b8a.pfb
+ma1c8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1c8a.pfb
+ma1ci8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1ci8a.pfb
+ma1co8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma1c8a.pfb
+ma1l8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1l8a.pfb
+ma1li8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1li8a.pfb
+ma1lo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma1l8a.pfb
+ma1m8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1m8a.pfb
+ma1mi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1mi8a.pfb
+ma1mo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma1m8a.pfb
+ma1r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1r8a.pfb
+ma1ri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1ri8a.pfb
+ma1ri8rn "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1ri8an.pfb
+ma1ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma1r8a.pfb
+ma1x8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1x8a.pfb
+ma1xi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma1xi8a.pfb
+ma1xo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma1x8a.pfb
+ma2b8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2b8a.pfb
+ma2bi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2bi8a.pfb
+ma2bo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma2b8a.pfb
+ma2c8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2c8a.pfb
+ma2ci8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2ci8a.pfb
+ma2co8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma2c8a.pfb
+ma2l8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2l8a.pfb
+ma2li8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2li8a.pfb
+ma2lo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma2l8a.pfb
+ma2m8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2m8a.pfb
+ma2mi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2mi8a.pfb
+ma2mo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma2m8a.pfb
+ma2r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2r8a.pfb
+ma2ri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ma2ri8a.pfb
+ma2ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ma2r8a.pfb
+magd8r "TeXBase1Encoding ReEncodeFont " <8r.enc <magd8a.pfb
+magdo8r "TeXBase1Encoding ReEncodeFont " <8r.enc <magdo8a.pfb
+magk8r "TeXBase1Encoding ReEncodeFont " <8r.enc <magk8a.pfb
+magko8r "TeXBase1Encoding ReEncodeFont " <8r.enc <magko8a.pfb
+mahr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mahr8a.pfb
+mahro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mahr8a.pfb
+maib8r "TeXBase1Encoding ReEncodeFont " <8r.enc <maib8a.pfb
+maibi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <maibi8a.pfb
+maibo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <maib8a.pfb
+mail8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mail8a.pfb
+maili8r "TeXBase1Encoding ReEncodeFont " <8r.enc <maili8a.pfb
+mailo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mail8a.pfb
+mair8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mair8a.pfb
+mairi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mairi8a.pfb
+mairo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mair8a.pfb
+maix8r "TeXBase1Encoding ReEncodeFont " <8r.enc <maix8a.pfb
+maixi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <maixi8a.pfb
+maixo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <maix8a.pfb
+mall8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mall8a.pfb
+mallo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mall8a.pfb
+malr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <malr8a.pfb
+malri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <malri8a.pfb
+malro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <malr8a.pfb
+manfnt <manfnt.pfb
+mapr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mapr8a.pfb
+mapri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mapri8a.pfb
+mapro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mapr8a.pfb
+maps8r "TeXBase1Encoding ReEncodeFont " <8r.enc <maps8a.pfb
+mapso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <maps8a.pfb
+mb1ri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mb1ri8a.pfb
+mb2r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mb2r8a.pfb
+mb2ri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mb2ri8a.pfb
+mb2ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mb2r8a.pfb
+mb3r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mb3r8a.pfb
+mb3ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mb3r8a.pfb
+mbbb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbbb8a.pfb
+mbbbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbbbi8a.pfb
+mbbbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbbb8a.pfb
+mbbr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbbr8a.pfb
+mbbri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbbri8a.pfb
+mbbro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbbr8a.pfb
+mbbs8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbbs8a.pfb
+mbbsi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbbsi8a.pfb
+mbbso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbbs8a.pfb
+mbbx8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbbx8a.pfb
+mbbxi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbbxi8a.pfb
+mbbxo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbbx8a.pfb
+mbdb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdb8a.pfb
+mbdbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdbi8a.pfb
+mbdbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbdb8a.pfb
+mbdc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdc8a.pfb
+mbdci8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdci8a.pfb
+mbdco8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbdc8a.pfb
+mbdk8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdk8a.pfb
+mbdki8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdki8a.pfb
+mbdko8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbdk8a.pfb
+mbdr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdr8a.pfb
+mbdri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdri8a.pfb
+mbdro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbdr8a.pfb
+mbdu8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdu8a.pfb
+mbdui8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbdui8a.pfb
+mbduo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbdu8a.pfb
+mbeb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbeb8a.pfb
+mbebo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbeb8a.pfb
+mber8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mber8a.pfb
+mberi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mberi8a.pfb
+mbero8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mber8a.pfb
+mbes8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbes8a.pfb
+mbeso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbes8a.pfb
+mbfr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbfr8a.pfb
+mbfro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbfr8a.pfb
+mbkd8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbkd8a.pfb
+mbkdi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbkdi8a.pfb
+mbkdo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbkd8a.pfb
+mbkl8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbkl8a.pfb
+mbkli8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbkli8a.pfb
+mbklo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbkl8a.pfb
+mbvb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbvb8a.pfb
+mbvbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbvbi8a.pfb
+mbvbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbvb8a.pfb
+mbvr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbvr8a.pfb
+mbvr8x <mbvr8x.pfb
+mbvri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbvri8a.pfb
+mbvri8x <mbvri8x.pfb
+mbvro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbvr8a.pfb
+mbvro8x " .167 SlantFont " <mbvr8x.pfb
+mbvs8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbvs8a.pfb
+mbvsi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mbvsi8a.pfb
+mbvso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mbvs8a.pfb
+mc1b8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc1b8a.pfb
+mc1bi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc1bi8a.pfb
+mc1bo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mc1b8a.pfb
+mc1r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc1r8a.pfb
+mc1ri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc1ri8a.pfb
+mc1ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mc1r8a.pfb
+mc6b8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc6b8a.pfb
+mc6bo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mc6b8a.pfb
+mc6r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc6r8a.pfb
+mc6ri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc6ri8a.pfb
+mc6ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mc6r8a.pfb
+mc7b8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc7b8a.pfb
+mc7bo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mc7b8a.pfb
+mc8b8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc8b8a.pfb
+mc8bo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mc8b8a.pfb
+mc8l8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc8l8a.pfb
+mc8lo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mc8l8a.pfb
+mc8m8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mc8m8a.pfb
+mc8mo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mc8m8a.pfb
+mcdr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcdr8a.pfb
+mcdro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mcdr8a.pfb
+mcfb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcfb8a.pfb
+mcfbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mcfb8a.pfb
+mcrb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcrb8a.pfb
+mcrbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcrbi8a.pfb
+mcrbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mcrb8a.pfb
+mcrr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcrr8a.pfb
+mcrri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcrri8a.pfb
+mcrro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mcrr8a.pfb
+mcsb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcsb8a.pfb
+mcsbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcsbi8a.pfb
+mcsbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mcsb8a.pfb
+mcsr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcsr8a.pfb
+mcsri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcsri8a.pfb
+mcsro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mcsr8a.pfb
+mcub8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcub8a.pfb
+mcubi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcubi8a.pfb
+mcubo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mcub8a.pfb
+mcur8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcur8a.pfb
+mcuri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mcuri8a.pfb
+mcuro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mcur8a.pfb
+mdsr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mdsr8a.pfb
+mdsro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mdsr8a.pfb
+meer8r "TeXBase1Encoding ReEncodeFont " <8r.enc <meer8a.pfb
+meero8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <meer8a.pfb
+melb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <melb8a.pfb
+melbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <melbi8a.pfb
+melbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <melb8a.pfb
+mell8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mell8a.pfb
+melli8r "TeXBase1Encoding ReEncodeFont " <8r.enc <melli8a.pfb
+mello8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mell8a.pfb
+melr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <melr8a.pfb
+melri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <melri8a.pfb
+melro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <melr8a.pfb
+melx8r "TeXBase1Encoding ReEncodeFont " <8r.enc <melx8a.pfb
+melxi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <melxi8a.pfb
+melxo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <melx8a.pfb
+metr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <metr8a.pfb
+metri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <metri8a.pfb
+metro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <metr8a.pfb
+mets8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mets8a.pfb
+metsi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <metsi8a.pfb
+metso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mets8a.pfb
+mfer8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mfer8a.pfb
+mfero8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mfer8a.pfb
+mfir8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mfir8a.pfb
+mfiro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mfir8a.pfb
+mfsr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mfsr8a.pfb
+mfsro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mfsr8a.pfb
+mg4r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mg4r8a.pfb
+mg4ri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mg4ri8a.pfb
+mg4ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mg4r8a.pfb
+mg5r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mg5r8a.pfb
+mg5ri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mg5ri8a.pfb
+mg5ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mg5r8a.pfb
+mgmb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgmb8a.pfb
+mgmbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgmbi8a.pfb
+mgmbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgmb8a.pfb
+mgmr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgmr8a.pfb
+mgmri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgmri8a.pfb
+mgmro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgmr8a.pfb
+mgor8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgor8a.pfb
+mgori8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgori8a.pfb
+mgoro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgor8a.pfb
+mgqb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgqb8a.pfb
+mgqbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgqb8a.pfb
+mgqc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgqc8a.pfb
+mgqco8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgqc8a.pfb
+mgql8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgql8a.pfb
+mgqli8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgqli8a.pfb
+mgqlo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgql8a.pfb
+mgqr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgqr8a.pfb
+mgqri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgqri8a.pfb
+mgqro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgqr8a.pfb
+mgrb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgrb8a.pfb
+mgrbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgrb8a.pfb
+mgrr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgrr8a.pfb
+mgrro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgrr8a.pfb
+mgsb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgsb8a.pfb
+mgsbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgsbi8a.pfb
+mgsbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgsb8a.pfb
+mgsl8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgsl8a.pfb
+mgsli8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgsli8a.pfb
+mgslo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgsl8a.pfb
+mgsr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgsr8a.pfb
+mgsri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgsri8a.pfb
+mgsro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgsr8a.pfb
+mgsu8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgsu8a.pfb
+mgsuo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgsu8a.pfb
+mgsx8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgsx8a.pfb
+mgsxo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgsx8a.pfb
+mgtr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgtr8a.pfb
+mgtro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgtr8a.pfb
+mgyb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgyb8a.pfb
+mgybo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgyb8a.pfb
+mgyx8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mgyx8a.pfb
+mgyxo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mgyx8a.pfb
+mhdr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mhdr8a.pfb
+mhdro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mhdr8a.pfb
+mhob8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mhob8a.pfb
+mhobi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mhobi8a.pfb
+mhobo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mhob8a.pfb
+mhol8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mhol8a.pfb
+mholi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mholi8a.pfb
+mholo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mhol8a.pfb
+mhor8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mhor8a.pfb
+mhori8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mhori8a.pfb
+mhoro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mhor8a.pfb
+mhos8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mhos8a.pfb
+mhosi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mhosi8a.pfb
+mhoso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mhos8a.pfb
+mifb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mifb8a.pfb
+mifbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mifb8a.pfb
+miib8r "TeXBase1Encoding ReEncodeFont " <8r.enc <miib8a.pfb
+miibi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <miibi8a.pfb
+miibo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <miib8a.pfb
+miir8r "TeXBase1Encoding ReEncodeFont " <8r.enc <miir8a.pfb
+miiri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <miiri8a.pfb
+miiro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <miir8a.pfb
+miob8r "TeXBase1Encoding ReEncodeFont " <8r.enc <miob8a.pfb
+miobo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <miob8a.pfb
+mior8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mior8a.pfb
+miori8r "TeXBase1Encoding ReEncodeFont " <8r.enc <miori8a.pfb
+mioro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mior8a.pfb
+misb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <misb8a.pfb
+misbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <misbi8a.pfb
+misbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <misb8a.pfb
+misr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <misr8a.pfb
+misri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <misri8a.pfb
+misro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <misr8a.pfb
+mjnb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjnb8a.pfb
+mjnbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjnbi8a.pfb
+mjnbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mjnb8a.pfb
+mjnr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjnr8a.pfb
+mjnri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjnri8a.pfb
+mjnro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mjnr8a.pfb
+mjob8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjob8a.pfb
+mjobi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjobi8a.pfb
+mjobo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mjob8a.pfb
+mjor8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjor8a.pfb
+mjori8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjori8a.pfb
+mjoro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mjor8a.pfb
+mjos8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjos8a.pfb
+mjosi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjosi8a.pfb
+mjoso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mjos8a.pfb
+mjox8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mjox8a.pfb
+mjoxo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mjox8a.pfb
+mklr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mklr8a.pfb
+mklro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mklr8a.pfb
+mm1r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mm1r8a.pfb
+mm1ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mm1r8a.pfb
+mmeb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mmeb8a.pfb
+mmebo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mmeb8a.pfb
+mmob8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mmob8a.pfb
+mmobi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mmobi8a.pfb
+mmobo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mmob8a.pfb
+mmor8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mmor8a.pfb
+mmori8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mmori8a.pfb
+mmoro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mmor8a.pfb
+mncb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mncb8a.pfb
+mncbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mncbi8a.pfb
+mncbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mncb8a.pfb
+mncr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mncr8a.pfb
+mncri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mncri8a.pfb
+mncro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mncr8a.pfb
+mngb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mngb8a.pfb
+mngbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mngb8a.pfb
+mngr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mngr8a.pfb
+mngri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mngri8a.pfb
+mngro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mngr8a.pfb
+mnib8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnib8a.pfb
+mnibi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnibi8a.pfb
+mnibo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnib8a.pfb
+mnir8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnir8a.pfb
+mniri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mniri8a.pfb
+mniro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnir8a.pfb
+mnnb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnnb8a.pfb
+mnnbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnnb8a.pfb
+mnnr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnnr8a.pfb
+mnnro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnnr8a.pfb
+mnpb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnpb8a.pfb
+mnpbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnpbi8a.pfb
+mnpbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnpb8a.pfb
+mnpr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnpr8a.pfb
+mnpri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnpri8a.pfb
+mnpro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnpr8a.pfb
+mnrr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnrr8a.pfb
+mnrro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnrr8a.pfb
+mnsb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnsb8a.pfb
+mnsbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnsbi8a.pfb
+mnsbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnsb8a.pfb
+mnsr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnsr8a.pfb
+mnsri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnsri8a.pfb
+mnsro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnsr8a.pfb
+mntb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mntb8a.pfb
+mntbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mntbi8a.pfb
+mntbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mntb8a.pfb
+mntboz <mntboz.pfb
+mntbz <mntbz.pfb
+mntm8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mntm8a.pfb
+mntmi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mntmi8a.pfb
+mntmo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mntm8a.pfb
+mntr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mntr8a.pfb
+mntri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mntri8a.pfb
+mntro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mntr8a.pfb
+mntroz <mntroz.pfb
+mntrz <mntrz.pfb
+mnts8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mnts8a.pfb
+mntsi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mntsi8a.pfb
+mntso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mnts8a.pfb
+mntx8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mntx8a.pfb
+mntxo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mntx8a.pfb
+moer8r "TeXBase1Encoding ReEncodeFont " <8r.enc <moer8a.pfb
+moero8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <moer8a.pfb
+mosb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mosb8a.pfb
+mosbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mosbi8a.pfb
+mosbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mosb8a.pfb
+mosr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mosr8a.pfb
+mosri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mosri8a.pfb
+mosro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mosr8a.pfb
+motb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <motb8a.pfb
+motbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <motb8a.pfb
+movr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <movr8a.pfb
+movri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <movri8a.pfb
+movro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <movr8a.pfb
+moxr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <moxr8a.pfb
+moxro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <moxr8a.pfb
+mp1r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mp1r8a.pfb
+mp1ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mp1r8a.pfb
+mp2r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mp2r8a.pfb
+mp2ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mp2r8a.pfb
+mphb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mphb8a.pfb
+mphbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mphbi8a.pfb
+mphbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mphb8a.pfb
+mphr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mphr8a.pfb
+mphri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mphri8a.pfb
+mphro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mphr8a.pfb
+mphs8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mphs8a.pfb
+mphsi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mphsi8a.pfb
+mphso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mphs8a.pfb
+mphu8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mphu8a.pfb
+mphui8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mphui8a.pfb
+mphuo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mphu8a.pfb
+mppb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mppb8a.pfb
+mppbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mppbi8a.pfb
+mppbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mppb8a.pfb
+mppr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mppr8a.pfb
+mppri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mppri8a.pfb
+mppro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mppr8a.pfb
+mpzr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mpzr8a.pfb
+mpzro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mpzr8a.pfb
+ms1r8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ms1r8a.pfb
+ms1ri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ms1ri8a.pfb
+ms1ro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ms1r8a.pfb
+ms2b8r "TeXBase1Encoding ReEncodeFont " <8r.enc <ms2b8a.pfb
+ms2bo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ms2b8a.pfb
+msam10 <msam10.pfb
+msam5 <msam5.pfb
+msam6 <msam6.pfb
+msam7 <msam7.pfb
+msam8 <msam8.pfb
+msam9 <msam9.pfb
+msbm10 <msbm10.pfb
+msbm5 <msbm5.pfb
+msbm6 <msbm6.pfb
+msbm7 <msbm7.pfb
+msbm8 <msbm8.pfb
+msbm9 <msbm9.pfb
+msbr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <msbr8a.pfb
+msbri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <msbri8a.pfb
+msbro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <msbr8a.pfb
+msbs8r "TeXBase1Encoding ReEncodeFont " <8r.enc <msbs8a.pfb
+msbso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <msbs8a.pfb
+msmr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <msmr8a.pfb
+msmrc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <msmrc8a.pfb
+msmri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <msmri8a.pfb
+msmro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <msmr8a.pfb
+msms8r "TeXBase1Encoding ReEncodeFont " <8r.enc <msms8a.pfb
+msmso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <msms8a.pfb
+mswb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mswb8a.pfb
+mswbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mswb8a.pfb
+msyr <msyr.pfb
+mtwb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwb8a.pfb
+mtwbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwbi8a.pfb
+mtwbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mtwb8a.pfb
+mtwl8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwl8a.pfb
+mtwli8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwli8a.pfb
+mtwlo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mtwl8a.pfb
+mtwm8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwm8a.pfb
+mtwmi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwmi8a.pfb
+mtwmo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mtwm8a.pfb
+mtws8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtws8a.pfb
+mtwso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mtws8a.pfb
+mtwu8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwu8a.pfb
+mtwui8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwui8a.pfb
+mtwuo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mtwu8a.pfb
+mtwx8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwx8a.pfb
+mtwxi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtwxi8a.pfb
+mtwxo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mtwx8a.pfb
+mtyr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mtyr8a.pfb
+mtyro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mtyr8a.pfb
+murb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <murb8a.pfb
+murbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <murbi8a.pfb
+murbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <murb8a.pfb
+murr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <murr8a.pfb
+murri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <murri8a.pfb
+murro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <murr8a.pfb
+mvdr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mvdr8a.pfb
+mvdro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mvdr8a.pfb
+mwbm8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mwbm8a.pfb
+mwbmi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mwbmi8a.pfb
+mwbmo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mwbm8a.pfb
+mwbr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mwbr8a.pfb
+mwbri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mwbri8a.pfb
+mwbro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mwbr8a.pfb
+mzab8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mzab8a.pfb
+mzabi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mzabi8a.pfb
+mzabo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mzab8a.pfb
+mzar8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mzar8a.pfb
+mzari8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mzari8a.pfb
+mzaro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mzar8a.pfb
+mzcb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mzcb8a.pfb
+mzcbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mzcb8a.pfb
+mzcd8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mzcd8a.pfb
+mzcdo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mzcd8a.pfb
+mzcmi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mzcmi8a.pfb
+mzdr <mzdr.pfb
+mztb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mztb8a.pfb
+mztbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mztb8a.pfb
+mztr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mztr8a.pfb
+mztri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <mztri8a.pfb
+mztro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <mztr8a.pfb
+nntb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <nntb8a.pfb
+nntbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <nntbi8a.pfb
+nntbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <nntb8a.pfb
+nntr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <nntr8a.pfb
+nntri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <nntri8a.pfb
+nntro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <nntr8a.pfb
+omsea1 <omsea1.pfb
+omsea1b <omsea1b.pfb
+omsea2 <omsea2.pfb
+omsea2b <omsea2b.pfb
+omsea3 <omsea3.pfb
+omsea3b <omsea3b.pfb
+omseco <omseco.pfb
+omsecob <omsecob.pfb
+omsecobi <omsecobi.pfb
+omsecoi <omsecoi.pfb
+omsecx <omsecx.pfb
+omsecy <omsecy.pfb
+omsegr <omsegr.pfb
+omsegrb <omsegrb.pfb
+omsegrbi <omsegrbi.pfb
+omsegri <omsegri.pfb
+omseha <omseha.pfb
+omsehe <omsehe.pfb
+omseip <omseip.pfb
+omsela <omsela.pfb
+omselab <omselab.pfb
+omselabi <omselabi.pfb
+omselai <omselai.pfb
+omseti <omseti.pfb
+omssti <omssti.pfb
+padb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <padb8a.pfb
+padb8x <padb8x.pfb
+padbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <padbi8a.pfb
+padbi8x <padbi8x.pfb
+padbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <padb8a.pfb
+padbo8x " .167 SlantFont" <padb8x.pfb
+padr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <padr8a.pfb
+padr8x <padr8x.pfb
+padri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <padri8a.pfb
+padri8x <padri8x.pfb
+padro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <padr8a.pfb
+padro8x " .167 SlantFont" <padr8x.pfb
+pads8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pads8a.pfb
+pads8x <pads8x.pfb
+padsi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <padsi8a.pfb
+padsi8x <padsi8x.pfb
+padso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pads8a.pfb
+padso8x " .167 SlantFont" <pads8x.pfb
+pbbb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pbbb8a.pfb
+pbbb8x <pbbb8x.pfb
+pbbbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pbbbi8a.pfb
+pbbbi8x <pbbbi8x.pfb
+pbbbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pbbb8a.pfb
+pbbbo8x " .167 SlantFont" <pbbb8x.pfb
+pbbr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pbbr8a.pfb
+pbbr8x <pbbr8x.pfb
+pbbri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pbbri8a.pfb
+pbbri8x <pbbri8x.pfb
+pbbro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pbbr8a.pfb
+pbbro8x " .167 SlantFont" <pbbr8x.pfb
+pbvb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pbvb8a.pfb
+pbvbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pbvbi8a.pfb
+pbvbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pbvb8a.pfb
+pbvr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pbvr8a.pfb
+pbvri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pbvri8a.pfb
+pbvro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pbvr8a.pfb
+pcrb8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+pcrbo8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+pcrr8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+%pcrr8rn ".85 ExtendFont TeXBase1Encoding ReEncodeFont" <8r.enc
+pcrro8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+pebb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pebb8a.pfb
+pebbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pebb8a.pfb
+pebm8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pebm8a.pfb
+pebmi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pebmi8a.pfb
+pebmo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pebm8a.pfb
+pebr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pebr8a.pfb
+pebri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pebri8a.pfb
+pebro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pebr8a.pfb
+pgmb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgmb8a.pfb
+pgmbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgmbi8a.pfb
+pgmbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pgmb8a.pfb
+pgml8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgml8a.pfb
+pgmli8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgmli8a.pfb
+pgmlo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pgml8a.pfb
+pgsb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgsb8a.pfb
+pgsbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgsbi8a.pfb
+pgsbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pgsb8a.pfb
+pgsl8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgsl8a.pfb
+pgsli8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgsli8a.pfb
+pgslo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pgsl8a.pfb
+pgsr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgsr8a.pfb
+pgsri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgsri8a.pfb
+pgsro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pgsr8a.pfb
+pgsu8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgsu8a.pfb
+pgsuo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pgsu8a.pfb
+pgsx8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pgsx8a.pfb
+pgsxo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pgsx8a.pfb
+phvb8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+phvbo8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+phvr8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+phvro8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+pjnb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pjnb8a.pfb
+pjnbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pjnbi8a.pfb
+pjnbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pjnb8a.pfb
+pjnr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pjnr8a.pfb
+pjnri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pjnri8a.pfb
+pjnro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pjnr8a.pfb
+
+plb10 <plrm.enc <plb10.pfb
+plbx10 <plrm.enc <plbx10.pfb
+plbx12 <plrm.enc <plbx12.pfb
+plbx5 <plrm.enc <plbx5.pfb
+plbx6 <plrm.enc <plbx6.pfb
+plbx7 <plrm.enc <plbx7.pfb
+plbx8 <plrm.enc <plbx8.pfb
+plbx9 <plrm.enc <plbx9.pfb
+plbxsl10 <plrm.enc <plbxsl10.pfb
+pldunh10 <plrm.enc <pldunh10.pfb
+plff10 <plrm.enc <plff10.pfb
+plfib8 <plrm.enc <plfib8.pfb
+plr10 <plrm.enc <plr10.pfb
+plr12 <plrm.enc <plr12.pfb
+plr17 <plrm.enc <plr17.pfb
+plr6 <plrm.enc <plr6.pfb
+plr7 <plrm.enc <plr7.pfb
+plr8 <plrm.enc <plr8.pfb
+plr9 <plrm.enc <plr9.pfb
+plsl10 <plrm.enc <plsl10.pfb
+plsl12 <plrm.enc <plsl12.pfb
+plsl8 <plrm.enc <plsl8.pfb
+plsl9 <plrm.enc <plsl9.pfb
+plss10 <plrm.enc <plss10.pfb
+plss12 <plrm.enc <plss12.pfb
+plss17 <plrm.enc <plss17.pfb
+plss8 <plrm.enc <plss8.pfb
+plss9 <plrm.enc <plss9.pfb
+plssbi10 <plrm.enc <plssbi10.pfb
+plssbx10 <plrm.enc <plssbx10.pfb
+plssdc10 <plrm.enc <plssdc10.pfb
+plssi10 <plrm.enc <plssi10.pfb
+plssi12 <plrm.enc <plssi12.pfb
+plssi17 <plrm.enc <plssi17.pfb
+plssi8 <plrm.enc <plssi8.pfb
+plssi9 <plrm.enc <plssi9.pfb
+plssq8 <plrm.enc <plssq8.pfb
+plssqi8 <plrm.enc <plssqi8.pfb
+plvtt10 <plrm.enc <plvtt10.pfb
+plbsy10 <plms.enc <plbsy10.pfb
+plsy10 <plms.enc <plsy10.pfb
+plsy5 <plms.enc <plsy5.pfb
+plsy6 <plms.enc <plsy6.pfb
+plsy7 <plms.enc <plsy7.pfb
+plsy8 <plms.enc <plsy8.pfb
+plsy9 <plms.enc <plsy9.pfb
+plbxti10 <plit.enc <plbxti10.pfb
+plfi10 <plit.enc <plfi10.pfb
+plti10 <plit.enc <plti10.pfb
+plti12 <plit.enc <plti12.pfb
+plti7 <plit.enc <plti7.pfb
+plti8 <plit.enc <plti8.pfb
+plti9 <plit.enc <plti9.pfb
+plu10 <plit.enc <plu10.pfb
+plcsc10 <plsc.enc <plcsc10.pfb
+plr5 <plsc.enc <plr5.pfb
+plex10 <plme.enc <plex10.pfb
+plex9 <plme.enc <plex9.pfb
+plinch <plin.enc <plinch.pfb
+plitt10 <plitt.enc<plitt10.pfb
+plmi10 <plmi.enc <plmi10.pfb
+plmi12 <plmi.enc <plmi12.pfb
+plmi5 <plmi.enc <plmi5.pfb
+plmi6 <plmi.enc <plmi6.pfb
+plmi7 <plmi.enc <plmi7.pfb
+plmi8 <plmi.enc <plmi8.pfb
+plmi9 <plmi.enc <plmi9.pfb
+plmib10 <plmi.enc <plmib10.pfb
+plsltt10 <pltt.enc <plsltt10.pfb
+pltcsc10 <pltt.enc <pltcsc10.pfb
+pltt10 <pltt.enc <pltt10.pfb
+pltt12 <pltt.enc <pltt12.pfb
+pltt8 <pltt.enc <pltt8.pfb
+pltt9 <pltt.enc <pltt9.pfb
+pltex10 <plte.enc <pltex10.pfb
+pltex8 <plte.enc <pltex8.pfb
+pltex9 <plte.enc <pltex9.pfb
+
+pmnb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pmnb8a.pfb
+pmnbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pmnbi8a.pfb
+pmnbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pmnb8a.pfb
+pmnc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pmnc8a.pfb
+pmnco8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pmnc8a.pfb
+pmnr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pmnr8a.pfb
+pmnrc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pmnrc8a.pfb
+pmnri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pmnri8a.pfb
+pmnro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pmnr8a.pfb
+pmns8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pmns8a.pfb
+pmnsc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pmnsc8a.pfb
+pmnsi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pmnsi8a.pfb
+pmnso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pmns8a.pfb
+pnbb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pnbb8a.pfb
+pnbbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pnbbi8a.pfb
+pnbbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pnbb8a.pfb
+pnbr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pnbr8a.pfb
+pnbri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pnbri8a.pfb
+pnbro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pnbr8a.pfb
+popb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <popb8a.pfb
+popbo8r "TeXBase1Encoding ReEncodeFont " <8r.enc <popbo8a.pfb
+popr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <popr8a.pfb
+popro8r "TeXBase1Encoding ReEncodeFont " <8r.enc <popro8a.pfb
+psbb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <psbb8a.pfb
+psbbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <psbbi8a.pfb
+psbbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <psbb8a.pfb
+psbr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <psbr8a.pfb
+psbri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <psbri8a.pfb
+psbro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <psbr8a.pfb
+pstb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pstb8a.pfb
+pstbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pstbi8a.pfb
+pstbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pstb8a.pfb
+pstr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pstr8a.pfb
+pstri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pstri8a.pfb
+pstro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pstr8a.pfb
+psts8r "TeXBase1Encoding ReEncodeFont " <8r.enc <psts8a.pfb
+pstsi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <pstsi8a.pfb
+pstso8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <psts8a.pfb
+psyr Symbol
+%psyro ".167 SlantFont"
+ptmb8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+ptmbi8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+%ptmbo8r ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc
+ptmr8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+ptmri8r "TeXBase1Encoding ReEncodeFont" <8r.enc
+%ptmro8r ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc
+punb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <punb8a.pfb
+punbo8r "TeXBase1Encoding ReEncodeFont " <8r.enc <punbo8a.pfb
+punc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <punc8a.pfb
+punco8r "TeXBase1Encoding ReEncodeFont " <8r.enc <punco8a.pfb
+punl8r "TeXBase1Encoding ReEncodeFont " <8r.enc <punl8a.pfb
+punlo8r "TeXBase1Encoding ReEncodeFont " <8r.enc <punlo8a.pfb
+punr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <punr8a.pfb
+punro8r "TeXBase1Encoding ReEncodeFont " <8r.enc <punro8a.pfb
+purb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <purb8a.pfb
+purb8x <purb8x.pfb
+purbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <purbi8a.pfb
+purbi8x <purbi8x.pfb
+purbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <purb8a.pfb
+purbo8x " .167 SlantFont" <purb8x.pfb
+purr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <purr8a.pfb
+purr8x <purr8x.pfb
+purrc8r "TeXBase1Encoding ReEncodeFont " <8r.enc <purrc8a.pfb
+purri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <purri8a.pfb
+purri8x <purri8x.pfb
+purro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <purr8a.pfb
+purro8x " .167 SlantFont" <purr8x.pfb
+putb8r "TeXBase1Encoding ReEncodeFont " <8r.enc <putb8a.pfb
+putbi8r "TeXBase1Encoding ReEncodeFont " <8r.enc <putbi8a.pfb
+putbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <putb8a.pfb
+putr8r "TeXBase1Encoding ReEncodeFont " <8r.enc <putr8a.pfb
+putri8r "TeXBase1Encoding ReEncodeFont " <8r.enc <putri8a.pfb
+putro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <putr8a.pfb
+pzdr ZapfDingbats
+qplb "enc-qpl ReEncodeFont" <qpl.enc <qplb.pfb
+qplbi "enc-qpl ReEncodeFont" <qpl.enc <qplbi.pfb
+qplr "enc-qpl ReEncodeFont" <qpl.enc <qplr.pfb
+qplri "enc-qpl ReEncodeFont" <qpl.enc <qplri.pfb
+qtmb "enc-qtm ReEncodeFont" <qtm.enc <qtmb.pfb
+qtmbi "enc-qtm ReEncodeFont" <qtm.enc <qtmbi.pfb
+qtmr "enc-qtm ReEncodeFont" <qtm.enc <qtmr.pfb
+qtmri "enc-qtm ReEncodeFont" <qtm.enc <qtmri.pfb
+rblmi <rblmi.pfb
+rsfs10 <rsfs10.pfb
+rsfs5 <rsfs5.pfb
+rsfs7 <rsfs7.pfb
+stmary10 <stmary10.pfb
+stmary5 <stmary5.pfb
+stmary6 <stmary6.pfb
+stmary7 <stmary7.pfb
+stmary8 <stmary8.pfb
+stmary9 <stmary9.pfb
+uagd8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uagd8a.pfb
+uagdo8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uagdo8a.pfb
+uagk8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uagk8a.pfb
+uagko8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uagko8a.pfb
+ubkd8r "TeXBase1Encoding ReEncodeFont" <8r.enc <ubkd8a.pfb
+ubkdi8r "TeXBase1Encoding ReEncodeFont" <8r.enc <ubkdi8a.pfb
+ubkdo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ubkd8a.pfb
+ubkl8r "TeXBase1Encoding ReEncodeFont" <8r.enc <ubkl8a.pfb
+ubkli8r "TeXBase1Encoding ReEncodeFont" <8r.enc <ubkli8a.pfb
+ubklo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <ubkl8a.pfb
+ucrb8r "TeXBase1Encoding ReEncodeFont" <8r.enc <ucrb8a.pfb
+ucrbo8r "TeXBase1Encoding ReEncodeFont" <8r.enc <ucrbo8a.pfb
+ucrr8r "TeXBase1Encoding ReEncodeFont" <8r.enc <ucrr8a.pfb
+ucrro8r "TeXBase1Encoding ReEncodeFont" <8r.enc <ucrro8a.pfb
+uhvb8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uhvb8a.pfb
+uhvbo8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uhvbo8a.pfb
+uhvr8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uhvr8a.pfb
+uhvro8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uhvro8a.pfb
+uncb8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uncb8a.pfb
+uncbi8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uncbi8a.pfb
+uncbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <uncb8a.pfb
+uncr8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uncr8a.pfb
+uncri8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uncri8a.pfb
+uncro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <uncr8a.pfb
+uplb8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uplb8a.pfb
+uplbi8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uplbi8a.pfb
+uplbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <uplb8a.pfb
+uplr8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uplr8a.pfb
+uplri8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uplri8a.pfb
+uplro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <uplr8a.pfb
+usyr <usyr.pfb
+utmb8r "TeXBase1Encoding ReEncodeFont" <8r.enc <utmb8a.pfb
+utmbi8r "TeXBase1Encoding ReEncodeFont" <8r.enc <utmbi8a.pfb
+utmbo8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <utmb8a.pfb
+utmr8r "TeXBase1Encoding ReEncodeFont" <8r.enc <utmr8a.pfb
+utmri8r "TeXBase1Encoding ReEncodeFont" <8r.enc <utmri8a.pfb
+utmro8r " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <utmr8a.pfb
+uzcmi8r "TeXBase1Encoding ReEncodeFont" <8r.enc <uzcmi8a.pfb
+uzdr <uzdr.pfb
+wasy10 <wasy10.pfb
+wasy5 <wasy5.pfb
+wasy6 <wasy6.pfb
+wasy7 <wasy7.pfb
+wasy8 <wasy8.pfb
+wasy9 <wasy9.pfb
+wasyb10 <wasyb10.pfb
+wncyb10 <wncyb10.pfb
+wncyi10 <wncyi10.pfb
+wncyr10 <wncyr10.pfb
+wncysc10 <wncysc10.pfb
+wncyss10 <wncyss10.pfb
+xipa10 <xipa10.pfb
+xipab10 <xipab10.pfb
+xipabx10 <xipabx10.pfb
+xipasl10 <xipasl10.pfb
+xipass10 <xipass10.pfb
+xnsh14 <xnsh14.pfb
+xnsh14bf <xnsh14bf.pfb
+xyatip10 <<xyatip10.pfb
+xybsql10 <<xybsql10.pfb
+xybtip10 <<xybtip10.pfb
+xycirc10 <<xycirc10.pfb
+xycmat10 <<xycmat10.pfb
+xycmat11 <<xycmat10.pfb "1.1 ExtendFont"
+xycmat12 <<xycmat10.pfb "1.2 ExtendFont"
+xycmbt10 <<xycmbt10.pfb
+xycmbt11 <<xycmbt10.pfb "1.1 ExtendFont"
+xycmbt12 <<xycmbt10.pfb "1.2 ExtendFont"
+xydash10 <<xydash10.pfb
+xyeuat10 <<xyeuat10.pfb
+xyeuat11 <<xyeuat10.pfb "1.1 ExtendFont"
+xyeuat12 <<xyeuat10.pfb "1.2 ExtendFont"
+xyeubt10 <<xyeubt10.pfb
+xyeubt11 <<xyeubt10.pfb "1.1 ExtendFont"
+xyeubt12 <<xyeubt10.pfb "1.2 ExtendFont"
+zpeub <zpeub.pfb
+zpeubi <zpeubi.pfb
+zpeubis <zpeubis.pfb
+zpeubit <zpeubit.pfb
+zpeubs <zpeubs.pfb
+zpeubt <zpeubt.pfb
+zpeur <zpeur.pfb
+zpeuri <zpeuri.pfb
+zpeuris <zpeuris.pfb
+zpeurit <zpeurit.pfb
+zpeurs <zpeurs.pfb
+zpeurt <zpeurt.pfb
diff --git a/fonts/map/context/texnansi-bh-lucida.map b/fonts/map/context/texnansi-bh-lucida.map
new file mode 100644
index 000000000..d435c9300
--- /dev/null
+++ b/fonts/map/context/texnansi-bh-lucida.map
@@ -0,0 +1,55 @@
+% This file is generated by the TeXFont Perl script.
+%
+% You need to add the following line to pdftex.cfg:
+%
+% map +texnansi-bh-lucida.map
+%
+% Alternatively in your TeX source you can say:
+%
+% \pdfmapfile{+texnansi-bh-lucida.map}
+%
+% In ConTeXt you can best use:
+%
+% \loadmapfile[texnansi-bh-lucida.map]
+
+texnansi-raw-lbc LucidaCalligraphy-Italic 4 < lbc.pfb texnansi.enc
+texnansi-raw-lbd LucidaBright-Demi 4 < lbd.pfb texnansi.enc
+texnansi-raw-lbdi LucidaBright-DemiItalic 4 < lbdi.pfb texnansi.enc
+texnansi-raw-lbdsc LucidaBrightSmallcaps-Demi 4 < lbdsc.pfb texnansi.enc
+texnansi-raw-lbh LucidaHandwriting-Italic 4 < lbh.pfb texnansi.enc
+texnansi-raw-lbi LucidaBright-Italic 4 < lbi.pfb texnansi.enc
+texnansi-raw-lbki LucidaCasual-Italic 4 < lbki.pfb texnansi.enc
+texnansi-raw-lbkr LucidaCasual 4 < lbkr.pfb texnansi.enc
+texnansi-raw-lbl LucidaBlackletter 4 < lbl.pfb texnansi.enc
+lbma LucidaNewMath-Arrows < lbma.pfb
+lbmad LucidaNewMath-Arrows-Demi < lbmad.pfb
+lbmd LucidaNewMath-Demibold < lbmd.pfb
+lbmdi LucidaNewMath-DemiItalic < lbmdi.pfb
+lbmdo LucidaNewMath-AltDemiItalic < lbmdo.pfb
+lbme LucidaNewMath-Extension < lbme.pfb
+lbmi LucidaNewMath-Italic < lbmi.pfb
+lbmo LucidaNewMath-AltItalic < lbmo.pfb
+lbmr LucidaNewMath-Roman < lbmr.pfb
+lbms LucidaNewMath-Symbol < lbms.pfb
+lbmsd LucidaNewMath-Symbol-Demi < lbmsd.pfb
+texnansi-raw-lbr LucidaBright 4 < lbr.pfb texnansi.enc
+texnansi-raw-lbrsc LucidaBrightSmallcaps 4 < lbrsc.pfb texnansi.enc
+texnansi-raw-lbsl LucidaBright-Oblique 4 < lbsl.pfb texnansi.enc
+texnansi-raw-lbtb LucidaTypewriterBold 4 < lbtb.pfb texnansi.enc
+texnansi-raw-lbtbo LucidaTypewriterBoldOblique 4 < lbtbo.pfb texnansi.enc
+texnansi-raw-lbto LucidaTypewriterOblique 4 < lbto.pfb texnansi.enc
+texnansi-raw-lbtr LucidaTypewriter 4 < lbtr.pfb texnansi.enc
+texnansi-raw-lfd LucidaFax-Demi 4 < lfd.pfb texnansi.enc
+texnansi-raw-lfdi LucidaFax-DemiItalic 4 < lfdi.pfb texnansi.enc
+texnansi-raw-lfi LucidaFax-Italic 4 < lfi.pfb texnansi.enc
+texnansi-raw-lfr LucidaFax 4 < lfr.pfb texnansi.enc
+texnansi-raw-lsb LucidaSans-Bold 4 < lsb.pfb texnansi.enc
+texnansi-raw-lsbi LucidaSans-BoldItalic 4 < lsbi.pfb texnansi.enc
+texnansi-raw-lsd LucidaSans-Demi 4 < lsd.pfb texnansi.enc
+texnansi-raw-lsdi LucidaSans-DemiItalic 4 < lsdi.pfb texnansi.enc
+texnansi-raw-lsi LucidaSans-Italic 4 < lsi.pfb texnansi.enc
+texnansi-raw-lsr LucidaSans 4 < lsr.pfb texnansi.enc
+texnansi-raw-lstb LucidaSans-TypewriterBold 4 < lstb.pfb texnansi.enc
+texnansi-raw-lstbo LucidaSans-TypewriterBoldOblique 4 < lstbo.pfb texnansi.enc
+texnansi-raw-lsto LucidaSans-TypewriterOblique 4 < lsto.pfb texnansi.enc
+texnansi-raw-lstr LucidaSans-Typewriter 4 < lstr.pfb texnansi.enc
diff --git a/fonts/map/context/texnansi-public-antp.map b/fonts/map/context/texnansi-public-antp.map
new file mode 100644
index 000000000..c375b487b
--- /dev/null
+++ b/fonts/map/context/texnansi-public-antp.map
@@ -0,0 +1,18 @@
+% This file is generated by the TeXFont Perl script.
+%
+% You need to add the following line to pdftex.cfg:
+%
+% map +texnansi-public-antp.map
+%
+% Alternatively in your TeX source you can say:
+%
+% \pdfmapfile{+texnansi-public-antp.map}
+%
+% In ConTeXt you can best use:
+%
+% \loadmapfile[texnansi-public-antp.map]
+
+texnansi-raw-antpb AntykwaPoltawskiego-Bold 4 < antpb.pfb texnansi.enc
+texnansi-raw-antpbi AntykwaPoltawskiego-BoldItalic 4 < antpbi.pfb texnansi.enc
+texnansi-raw-antpr AntykwaPoltawskiego-Regular 4 < antpr.pfb texnansi.enc
+texnansi-raw-antpri AntykwaPoltawskiego-Italic 4 < antpri.pfb texnansi.enc
diff --git a/fonts/map/context/texnansi-public-antt.map b/fonts/map/context/texnansi-public-antt.map
new file mode 100644
index 000000000..0b1122d0a
--- /dev/null
+++ b/fonts/map/context/texnansi-public-antt.map
@@ -0,0 +1,17 @@
+% This file is generated by the TeXFont Perl script.
+%
+% You need to add the following line to pdftex.cfg:
+%
+% map +texnansi-public-antt.map
+%
+% Alternatively in your TeX source you can say:
+%
+% \pdfmapfile{+texnansi-public-antt.map}
+%
+% In ConTeXt you can best use:
+%
+% \loadmapfile[texnansi-public-antt.map]
+
+texnansi-raw-anttb AntykwaTorunska-Bold 4 < anttb.pfb texnansi.enc
+texnansi-raw-anttr AntykwaTorunska-Regular 4 < anttr.pfb texnansi.enc
+texnansi-raw-anttri AntykwaTorunska-Italic 4 < anttri.pfb texnansi.enc
diff --git a/metapost/context/base/mp-tool.mp b/metapost/context/base/mp-tool.mp
index a23d86f35..d78ee43ea 100644
--- a/metapost/context/base/mp-tool.mp
+++ b/metapost/context/base/mp-tool.mp
@@ -2152,6 +2152,47 @@ def showgrid (expr MinX, MaxX, DeltaX, MinY, MaxY, DeltaY)=
endgroup
enddef;
+% new, handy for:
+%
+% \startuseMPgraphic{map}{n}
+% \includeMPgraphic{map:germany} ;
+% c_phantom (\MPvar{n}<1) (
+% fill map_germany withcolor \MPcolor{lightgray} ;
+% draw map_germany withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% \includeMPgraphic{map:austria} ;
+% c_phantom (\MPvar{n}<2) (
+% fill map_austria withcolor \MPcolor{lightgray} ;
+% draw map_austria withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% c_phantom (\MPvar{n}<3) (
+% \includeMPgraphic{map:swiss} ;
+% fill map_swiss withcolor \MPcolor{lightgray} ;
+% draw map_swiss withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% c_phantom (\MPvar{n}<4) (
+% \includeMPgraphic{map:luxembourg} ;
+% fill map_luxembourg withcolor \MPcolor{lightgray} ;
+% draw map_luxembourg withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% \stopuseMPgraphic
+%
+% \useMPgraphic{map}{n=3}
+
+vardef phantom (text t) =
+ picture _p_ ; _p_ := image(t) ; addto _p_ also currentpicture ;
+ setbounds currentpicture to boundingbox _p_ ;
+enddef ;
+
+vardef c_phantom (expr b) (text t) =
+ if b :
+ picture _p_ ; _p_ := image(t) ; addto _p_ also currentpicture ;
+ setbounds currentpicture to boundingbox _p_ ;
+ else :
+ t ;
+ fi ;
+enddef ;
+
% done
endinput ; \ No newline at end of file
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index 3dc2bb141..dab205860 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -649,12 +649,12 @@
\else\ifCMYKsupported
\registercolorchannel\c!c
\convertRGBtoCMYK\@@cl@@r\@@cl@@g\@@cl@@b
-\normalizeCMYK
+ \normalizeCMYK
\doexeccolorcmyk
\else
\registercolorchannel\c!s
\convertRGBtoGRAY\@@cl@@r\@@cl@@g\@@cl@@b
-\normalizeGRAY
+ \normalizeGRAY
\doexeccolorgray
\fi\fi\fi
\exectransparency}
@@ -674,21 +674,18 @@
\registercolorchannel\c!c
\ifreduceCMYK
\convertCMYKtoCMY\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k
-% \else
-% \normalizeCMYK
-% \fi
-\fi
-\normalizeCMYK
+ \fi
+ \normalizeCMYK
\doexeccolorcmyk
\else\ifRGBsupported
\registercolorchannel\c!r
\convertCMYKtoRGB\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k
-\normalizeRGB
+ \normalizeRGB
\doexeccolorrgb
\else
\registercolorchannel\c!s
\convertCMYKtoGRAY\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k
-\normalizeGRAY
+ \normalizeGRAY
\doexeccolorgray
\fi\fi\fi
\exectransparency}
@@ -713,7 +710,7 @@
\factorizecolortrue % using counter and array
\dowithcolor\execcolorRCSP\@@cl@@n
\factorizecolorfalse
-\let\spotcolorfactor\@@cl@@o
+ \let\spotcolorfactor\@@cl@@o
\doingspotcolorfalse
\fi
\exectransparency}
@@ -2260,7 +2257,7 @@
\def\negatecolorcomponent#1% #1 = \macro
{\scratchdimen\onepoint\advance\scratchdimen-#1\onepoint
\ifdim\scratchdimen<\zeropoint\scratchdimen\zeropoint\fi
- \edef#1{\@EA\withoutpt\the\scratchdimen}}
+ \edef#1{\withoutpt\the\scratchdimen}}
\def\negatecolorbox#1%
{\setbox#1\hbox
diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex
index 71d6352d3..d47256be0 100644
--- a/tex/context/base/cont-fil.tex
+++ b/tex/context/base/cont-fil.tex
@@ -40,6 +40,8 @@
\definefilesynonym [res-trace] [res-08]
\definefilesynonym [res-log] [res-09]
+\definefilesynonym [med-show] [res-50]
+
\definefilesynonym [pre-general] [pre-00]
\definefilesynonym [pre-original] [pre-01]
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 9cefe1cda..a78d0e4dc 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -22,50 +22,295 @@
% todo : test low level translation (nl->en) and optimize script
-% \readfile{cont-exp}\donothing\donothing % speed up (5-20%)
-
-\def\doiffontcharelse#1#2%
+% todo : share symbols
+
+% \definecolor[rollover:n][red]
+% \definecolor[rollover:r][green]
+% \definecolor[rollover:d][blue]
+
+\definepalet
+ [rollover]
+ [n=red,
+ r=green,
+ d=blue]
+
+% \newcounter\nofrollovers
+%
+% \def\dorollbutton[#1][#2]#3[#4]%
+% {\dontleavehmode
+% \bgroup
+% \doglobal\increment\nofrollovers
+% \unexpanded\def\dosetlocationbox[##1]##2[##3]%
+% {\getparameters[##1][##3]%
+% \definecolor[rollover][rollover:##2]%
+% \let\next\hbox
+% \doif{##2}{n}
+% {\doifvalue{##1\c!variant}\v!verborgen{\let\next\phantom}}%
+% \next
+% {\localframed[##1]
+% [\c!kaderkleur=rollover,\c!achtergrondkleur=rollover,\c!kleur=rollover]%
+% {\dolocationattributes{##1}\c!letter\c!kleur{#3}}}}%
+% \iffirstargument
+% \ifsecondargument
+% \def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[#2]}%
+% \else
+% \doifassignmentelse{#1}
+% {\def\setlocationbox##1{\dosetlocationbox[\??bt]{##1}[#1]}}
+% {\def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[]}}%
+% \fi
+% \else
+% \def\setlocationbox##1{\dosetlocationbox[\??bt]{##1}[]}%
+% \fi
+% % todo: share symbols
+% \definesymbol[rsym:\nofrollovers:n][\setlocationbox n]%
+% \definesymbol[rsym:\nofrollovers:r][\setlocationbox r]%
+% \definesymbol[rsym:\nofrollovers:d][\setlocationbox d]%
+% \nextsystemfield
+% \setupfield
+% [rollbutton]
+% [\c!kader=\v!uit,\c!offset=\v!overlay,\c!klikuit={#4}]%
+% \definefield
+% [\currentsystemfield][push][rollbutton]
+% [rsym:\nofrollovers:n,%
+% rsym:\nofrollovers:r,%
+% rsym:\nofrollovers:d]%
+% \fitfield[\currentsystemfield]%
+% \egroup}
+
+\newcounter\nofrollovers
+\newcounter\nofrollbuttons
+
+\def\dorollbutton[#1][#2]#3[#4]%
+ {\dontleavehmode
+ \bgroup
+ \doglobal\increment\nofrollovers
+ \doglobal\increment\nofrollbuttons
+ \unexpanded\def\dosetlocationbox[##1]##2[##3]%
+ {\getparameters[##1][##3]%
+ \definecolor[rollover][rollover:##2]%
+ \doifelse{##2}{n}{\doifelsevalue{##1\c!variant}\v!verborgen\phantom\hbox}\hbox
+ {\localframed[##1]
+ [\c!kaderkleur=rollover,\c!achtergrondkleur=rollover,\c!kleur=rollover]%
+ {\dolocationattributes{##1}\c!letter\c!kleur{#3}}}}%
+ \iffirstargument
+ \ifsecondargument
+ \def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[#2]}%
+ \else
+ \doifassignmentelse{#1}
+ {\def\setlocationbox##1{\dosetlocationbox[\??bt]{##1}[#1]}}
+ {\def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[]}}%
+ \fi
+ \else
+ \def\setlocationbox##1{\dosetlocationbox[\??bt]{##1}[]}%
+ \fi
+ % todo: share symbols, tricky since different dimensions
+ \definesymbol[rsym:\nofrollovers:n][\setlocationbox n]%
+ \definesymbol[rsym:\nofrollovers:r][\setlocationbox r]%
+ \definesymbol[rsym:\nofrollovers:d][\setlocationbox d]%
+ \setupfield
+ [rollbutton]
+ [\c!kader=\v!uit,
+ \c!offset=\v!overlay,
+ \c!klikuit={#4}]%
+ \definefield
+ [roll:\nofrollbuttons][push][rollbutton]
+ [rsym:\nofrollovers:n,%
+ rsym:\nofrollovers:r,%
+ rsym:\nofrollovers:d]%
+ \fitfield[roll:\nofrollbuttons]%
+ \egroup}
+
+\unexpanded\def\rollbutton
+ {\dodoubleempty\dorollbutton}
+
+% \def\do@@amrob[#1]#2\\%
+% {\txt\rollbutton[\currentmenu]{\ignorespaces#2\unskip}[#1]\\}%
+
+% \appendtoks \let\rob\do@@amrob \to \everysetmenucommands
+
+\def\menu@rob[#1]#2\\%
+ {\@@amboxcommand\rollbutton[\currentmenu]{\ignorespaces#2\unskip}[#1]\\}%
+
+\appendtoks \let\rob\menu@rob \to \everysetmenucommands
+
+% calls:
+% {..} [JS..]
+% [left] {..} [JS..]
+% [a=b] {..} [JS..]
+% [left] [a=b] {..} [JS..]
+%
+% \setupbuttons[offset=0pt,frame=off] % alternative=hidden
+%
+% \rollbutton {Manuals} [JS(Goto_File{show-man.pdf})]
+% \rollbutton {Articles} [JS(Goto_File{show-art.pdf})]
+% \rollbutton {Papers} [JS(Goto_File{show-pap.pdf})]
+% \rollbutton {Presentations} [JS(Goto_File{show-pre.pdf})]
+% \rollbutton {Resources} [JS(Goto_File{show-res.pdf})]
+%
+% \rob [JS(...)] bla bla \\
+
+\unexpanded\def\overlayrollbutton
+ {\dodoubleargument\dooverlayrollbutton}
+
+\def\dooverlayrollbutton[#1][#2]%
{\bgroup
- \definedfont[#1]%
- \iffontchar\font#2\relax
- \egroup\expandafter\firstoftwoarguments
+ \nextsystemfield
+ \setupfield
+ [overlayrollbutton]
+ [\c!kader=\v!uit,\c!offset=\v!overlay,\c!gebiedin={#1},\c!gebieduit={#2}]%
+ \definesymbol
+ [\currentsystemfield]
+ [{\framed[\c!kader=\v!uit,\c!breedte=\overlaywidth,\c!hoogte=\overlayheight]{}}]%
+ \definefield
+ [\currentsystemfield][push][overlayrollbutton][\currentsystemfield][\currentsystemfield]%
+ \fitfield[\currentsystemfield]%
+ \egroup}
+
+% \defineoverlay
+% [ShowMenu]
+% [{\overlayrollbutton[VideLayer{navigation}][HideLayer{navigation}]}]
+
+\def\dodoflushlayer#1#2#3%
+ {\ifundefined{\@@layerbox#3}%
+ \ifcase#1\else\writestatus{layer}{unknown layer #3}\fi
\else
- \egroup\expandafter\secondoftwoarguments
+ \bgroup
+ \forgetall
+ \offinterlineskip
+ % needed because we need to handle method
+\executeifdefined{\??ll\??ll\getvalue{\??ll#2\c!preset}}\gobbletwoarguments{#2}{}%
+ %
+ \doifvalue{\??ll#2\c!optie}\v!test\tracelayerstrue
+ \iftracelayers\traceboxplacementtrue\fi
+ \!!doneafalse
+ \!!donebfalse
+ \doifvalue{\??ll#2\c!methode}\v!overlay\!!doneatrue
+ \doifvalue{\??ll#2\c!methode}\v!passend\!!donebtrue
+ \!!donectrue
+ \ifcase#1\else
+ \doifnotvalue{\??ll#2\c!positie}\v!ja
+ {\doifvalue{\??ll#2\c!herhaal}\v!ja\!!donecfalse
+ \doifvalue{\??ll#2\c!status}\v!herhaal\!!donecfalse}%
+ \fi
+ \chardef\layerbox\csname\@@layerbox#3\endcsname
+ % we need to copy in order to retain the negative offsets for a next
+ % stage of additions, i.e. llx/lly accumulate in repeat mode and the
+ % compensation may differ each flush depending on added content
+ \setbox\nextbox \if!!doneb
+ \vbox
+ {\scratchdimen\getboxlly\layerbox
+ \vskip-\scratchdimen
+ \scratchdimen\getboxllx\layerbox
+ \hskip-\scratchdimen
+ \advance\scratchdimen-\wd\layerbox
+ \hsize-\scratchdimen
+ \if!!donec\box\else\copy\fi\layerbox}%
+ \else
+ \if!!donec\box\else\copy\fi\layerbox % sorry for the delay due to copying
+ \fi
+ \iftracelayers \ruledvbox \else \vbox \fi \if!!donea to \overlayheight \fi
+ {\hbox \if!!donea to \overlaywidth \fi
+ {% klopt dit? #3 en niet #2 ?
+ \doifvalue{\??ll#3\realfolio\c!positie}\v!ja {\xypos{lyr:#3:\realfolio}}%
+ \doifoverlayelse{#3}
+ {\box\nextbox}
+ {\startlayoutcomponent{l:#3}{layer #3}\box\nextbox\stoplayoutcomponent}%
+ \hss}%
+ \vss}%
+ \if!!donec
+ \gsetboxllx\layerbox\zeropoint
+ \gsetboxlly\layerbox\zeropoint
+ \fi
+ \egroup
\fi}
-\unexpanded\def\asciistr#1{\convertargument#1\to\ascii{\verbatimfont\ascii}}
+\def\tightlayer[#1]%
+ {\hbox
+ {\def\currentlayer{#1}% todo: left/right
+ \setbox\nextbox\emptybox % hoogte/breedte are \wd\nextbox/\ht\nextbox
+ \hsize\layerparameter\c!breedte % \overlaywidth = \hsize
+ \vsize\layerparameter\c!hoogte % \overlaywheight = \vsize
+ \composedlayer{#1}}}
-\def\shapedhbox % lines with non strutted dimensions have
- {\expanded{\dowithnextbox % interlineskip so if we want the original
- {\nextboxht\the\ht\shapebox % spacing, we need to preserve the original
- \nextboxdp\the\dp\shapebox % height and depth which is definitely
- \noexpand\flushnextbox}} % needed if we apply struts to the 'new'
- \normalhbox} % box or do something that changed ist size
-
-\def\inrightmargin#1% new: hsize correction
- {\pushindentation
- \rlap
- {\hskip\tekstbreedte
- %\hskip-\hsize
- %\hskip\hsize
- \hskip-\rightskip
- \hskip\rechtermargeafstand
- \hsize\rechtermargebreedte
- #1}%
- \popindentation
- \ignorespaces}
+\def\inlinedbox
+ {\bgroup
+ \dowithnextbox
+ {\scratchdimen\nextboxht
+ \advance\scratchdimen\nextboxdp
+ \advance\scratchdimen-\lineheight
+ \divide\scratchdimen\plustwo
+ \advance\scratchdimen\strutdepth
+ \setbox\nextbox\hbox{\lower\scratchdimen\flushnextbox}%
+ \nextboxht\strutht
+ \nextboxdp\strutdp
+ \flushnextbox
+ \egroup}%
+ \hbox}
+
+\def\dosetups#1% the grid option will be extended to other main modes
+ {\executeifdefined{\??su\ifgridsnapping\v!grid\fi:#1}{\csname\??su:#1\endcsname}\empty}
-\def\rechtermargetekstblok#1% new: hsize correction
- {\maakmargetekstblok \rightmargintextwidth \v!rechts \v!links
- {\hskip\margetekstafstand\hskip\tekstbreedte\hskip-\hsize }{\rlap{\plaatsmargetekstscheider}}
- {#1}}
+\let\directsetup\dosetups
+
+% \readfile{cont-exp}\donothing\donothing % speed up (5-20%)
-\def\douniqueMPpagegraphic#1#2%
- {\blabelgroup
- \let\overlaystamp\overlaypagestamp
- \setupMPvariables[\MPpageprefix#1][#2]% prefix is new here
- \getvalue{\@@MPG\MPpageprefix#1}{}%
- \elabelgroup}
+\def\dimenratio#1#2% etex only
+ {\withoutpt\the\dimexpr(2\dimexpr(#1)/(\dimexpr(#2)/32768))}
+
+% in page-lyr
+
+\definelayer[OTRTEXT] \setuplayer[OTRTEXT][\c!breedte=\zetbreedte,\c!hoogte=\teksthoogte]
+
+\let\normalsettextpagecontent\settextpagecontent
+
+\def\settextpagecontent#1#2#3% #2 and #3 will disappear
+ {\doifelselayerdata{OTRTEXT}
+ {\setbox#1\hbox to \zetbreedte
+ {\startoverlay
+ {\normalsettextpagecontent{#1}{#2}{#3}\box#1}
+ {\tightlayer[OTRTEXT]}
+ \stopoverlay}%
+ \dp#1\zeropoint}%
+ {\normalsettextpagecontent{#1}{#2}{#3}}}
+
+% in page-set
+
+\def\OTRSETdofinaloutput
+ {\ifdim\ht\OTRfinalpagebox=\teksthoogte
+ \bgroup % \let\OTRSETsetvsize\relax % prevents useless search for gap
+ \ifcase\OTRSETbalancemethod
+ \finaloutput\box\OTRfinalpagebox
+ \else\ifdim\OTRSETbalht>\zeropoint
+ % catch a bordercase
+ \scratchdimen\OTRSETbalht
+ \advance\scratchdimen\lineheight\relax
+ \ifdim\scratchdimen>\teksthoogte
+ % full page
+ \finaloutput\box\OTRfinalpagebox
+ \else
+ % same page
+ \global\setbox\OTRfinalpagebox \iftracecolumnset\ruledvbox\else\vbox\fi to \OTRSETbalht
+ {\box\OTRfinalpagebox\vss}%
+ \setlayer[OTRTEXT]{\box\OTRfinalpagebox}%
+ \snaptogrid\vbox{\vskip\OTRSETbalht}% hack
+ \fi
+ \else
+ \finaloutput\box\OTRfinalpagebox
+ \fi \fi
+ \globallet\OTRSETbalht\zeropoint
+ \egroup
+ \fi}
+
+\def\doxprecurse#1#2%
+ {\ifnum#1=\zerocount % no \ifcase
+ \expandafter\gobblethreearguments
+ \else
+ #2\expandafter\expandafter\expandafter\doxprecurse\expandafter
+ \fi\expandafter{\the\numexpr(#1-1)}{#2}}
+
+\def\buttonframed{\dodoubleempty\localframed[\??bt]} % goodie
+
+\unexpanded\def\asciistr#1{\convertargument#1\to\ascii{\verbatimfont\ascii}}
\prependtoks \setnormalcatcodes \to \everyTEXinputmode
\appendtoks \processingXMLfalse \to \everyTEXinputmode
@@ -78,16 +323,6 @@
\def\enableXML {\setinputmode[XML]}
\def\disableXML{\setinputmode[TEX]}
-\def\checkvariables
- {\dodoubleargument\docheckvariables}
-
-\def\docheckvariables
- {\dogetparameters\docheckrawvalue}
-
-\def\docheckrawvalue#1#2#3%
- {\doifundefined {\??vars:#1:#2}{\setvalue{\??vars:#1:#2}{#3}}
- {\doifvaluenothing{\??vars:#1:#2}{\setvalue{\??vars:#1:#2}{#3}}}}
-
\beginTEX
% else the skip aborts the reshape process
@@ -102,43 +337,46 @@
\endETEX
-\beginETEX \lastnodetype
-
-\def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
- {\ifnum\lastnodetype=\@@gluenode % \ifcase\lastskip % \ifdim\lastskip=\zeropoint\relax
- \shapeskip\lastskip
- \global\setbox\tmpshapebox\normalvbox{#4\unvbox\tmpshapebox}%
- \unskip
- \else\ifnum\lastnodetype=\@@kernnode % \ifcase\lastkern % \ifdim\lastkern=\zeropoint\relax
- \shapekern\lastkern
- \global\setbox\tmpshapebox\normalvbox{#3\unvbox\tmpshapebox}%
- \unkern
- \else\ifnum\lastnodetype=\@@penaltynode % \ifcase\lastpenalty % \ifnum\lastpenalty=\zerocount
- \shapepenalty\lastpenalty
- \global\setbox\tmpshapebox\normalvbox{#2\unvbox\tmpshapebox}%
- \unpenalty
- \else
- \setbox\shapebox\lastbox
- \ifvoid\shapebox
- \unskip\unpenalty\unkern
- \else
- \ifdim\wd\shapebox=\shapesignal\relax
- \exitloop
- \else
- \shapecounter\zerocount
- \global\setbox\tmpshapebox\normalvbox{#1\unvbox\tmpshapebox}%
- \fi
- \fi
- \fi\fi\fi
- \ifnum\shapecounter>100 % can be less
- \message{<<forced exit from shapebox>>}%
- \global\setbox\tmpshapebox\copy\oldshapebox
- \exitloop
- \else
- \advance\shapecounter \plusone
- \fi}
+% Currently there is a bug in \lastnodetype, so we will enable this
+% feature when the bugfix is widespread.
-\endETEX
+% \beginETEX \lastnodetype
+%
+% \def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
+% {\ifnum\lastnodetype=\@@gluenode % \ifcase\lastskip % \ifdim\lastskip=\zeropoint\relax
+% \shapeskip\lastskip
+% \global\setbox\tmpshapebox\normalvbox{#4\unvbox\tmpshapebox}%
+% \unskip
+% \else\ifnum\lastnodetype=\@@kernnode % \ifcase\lastkern % \ifdim\lastkern=\zeropoint\relax
+% \shapekern\lastkern
+% \global\setbox\tmpshapebox\normalvbox{#3\unvbox\tmpshapebox}%
+% \unkern
+% \else\ifnum\lastnodetype=\@@penaltynode % \ifcase\lastpenalty % \ifnum\lastpenalty=\zerocount
+% \shapepenalty\lastpenalty
+% \global\setbox\tmpshapebox\normalvbox{#2\unvbox\tmpshapebox}%
+% \unpenalty
+% \else
+% \setbox\shapebox\lastbox
+% \ifvoid\shapebox
+% \unskip\unpenalty\unkern
+% \else
+% \ifdim\wd\shapebox=\shapesignal\relax
+% \exitloop
+% \else
+% \shapecounter\zerocount
+% \global\setbox\tmpshapebox\normalvbox{#1\unvbox\tmpshapebox}%
+% \fi
+% \fi
+% \fi\fi\fi
+% \ifnum\shapecounter>100 % can be less
+% \message{<<forced exit from shapebox>>}%
+% \global\setbox\tmpshapebox\copy\oldshapebox
+% \exitloop
+% \else
+% \advance\shapecounter \plusone
+% \fi}
+%
+% \endETEX
\let\normaltype\type
@@ -234,14 +472,16 @@
% \headsym{xx} test \par test
% \stopitemize
-\beginETEX \lastnodetype
-
-\def\removeunwantedspaces
- {\ifhmode
- \doloop{\ifnum\lastnodetype=\@@gluenode\unskip\else\exitloop\fi}%
- \fi}
-
-\endETEX
+% wait till bugfix in etex is widespead
+%
+% \beginETEX \lastnodetype
+%
+% \def\removeunwantedspaces
+% {\ifhmode
+% \doloop{\ifnum\lastnodetype=\@@gluenode\unskip\else\exitloop\fi}%
+% \fi}
+%
+% \endETEX
% \def\dodimchoice#1#2#3%
% {\ifx#3\relax
@@ -325,6 +565,144 @@
\vrule\!!width4\scratchdimen\!!height\scratchdimen\!!depth\scratchdimen}%
\fi}
+% It took quite a while to figure this out (using the preliminary 1.5
+% spec). There are still a lot of things to be implemented. This is
+% the third alternative.
+
+% todo: multiple instances, dus indirect
+
+\let\currentrendering\empty
+
+\definereference[StartCurrentRendering] [\v!StartRendering{\currentrendering}]
+\definereference[StopCurrentRendering] [\v!StopRendering {\currentrendering}]
+\definereference[PauseCurrentRendering] [\v!PauseRendering{\currentrendering}]
+\definereference[ResumeCurrentRendering][\v!ResumeRendering{\currentrendering}]
+
+\newcounter\nofexternalrenderings
+
+\def\useexternalrendering{\doquadrupleempty\douseexternalrendering}
+\def\setinternalrendering{\dodoubleempty \dosetinternalrendering}
+
+\def\douseexternalrendering[#1][#2][#3][#4]% tag mime file options
+ {\setgvalue{\??rd:#1}{\plusone{#1}{#2}{#3}{#4}}}
+
+\def\dosetinternalrendering[#1][#2]% tag options {content}
+ {\bgroup
+ \dowithnextbox
+ {\setgvalue{\??rd:#1}{\plustwo{#1}{IRO}{#1}{#2}}%
+ \let\objectoffset\zeropoint
+ \setobject{IRO}{#1}\hbox{\box\nextbox}%
+ \egroup}%
+ \hbox}
+
+\def\checkrendering#1% let's hope that \next is not used
+ {\iflocation
+ \doifsomething{#1}%
+ {\doifdefined{\??rd:#1}%
+ {\expanded{\getvalue{\??rd::\number\renderingtype{#1}}%
+ {\filterfromvalue{\??rd:#1}52}{\filterfromvalue{\??rd:#1}53}%
+ {\filterfromvalue{\??rd:#1}54}{\filterfromvalue{\??rd:#1}55}}}}%
+ \fi}
+
+\setvalue{\??rd::1}{\doinsertrendering}
+\setvalue{\??rd::2}{\doinsertrenderingobject}
+
+\def\renderingtype #1{\filterfromvalue{\??rd:#1}51}
+\def\renderingoptions#1{\filterfromvalue{\??rd:#1}55}
+
+\setexecutecommandcheck {startrendering} \checkrendering
+\setexecutecommandcheck {stoprendering} \checkrendering
+\setexecutecommandcheck {pauserendering} \checkrendering
+\setexecutecommandcheck {resumerendering} \checkrendering
+
+% by using a nice trick (used in other places of context as well) we
+% can easily overload the default size to match the opbject size
+
+\def\renderingwidth {8cm}
+\def\renderingheight{6cm}
+
+\def\definerenderingwindow
+ {\dodoubleempty\dodefinerenderingwindow}
+
+\def\dodefinerenderingwindow[#1][#2]%
+ {\presetlocalframed[\??rw#1]%
+ \getparameters%
+ [\??rw#1]%
+ [\c!openpaginaactie=,\c!sluitpaginaactie=,%
+ \c!breedte=\renderingwidth,\c!hoogte=\renderingheight,%
+ #2]}
+
+\def\setuprenderingwindow
+ {\dodoubleargument\dosetuprenderingwindow}
+
+\def\dosetuprenderingwindow[#1]%
+ {\getparameters[\??rw#1]}
+
+\def\placerenderingwindow
+ {\dodoubleempty\doplacerenderingwindow}
+
+\def\doplacerenderingwindow[#1][#2]%
+ {\bgroup
+ \edef\currentrendering{\ifsecondargument#2\else#1\fi}%
+ \ifcase\renderingtype\currentrendering\or
+ % a file
+ \or
+ % an object
+ \getobjectdimensions{IRO}\currentrendering
+ \scratchdimen\objectheight
+ \advance\scratchdimen\objectdepth
+ \edef\renderingheight{\the\scratchdimen}%
+ \edef\renderingwidth{\objectwidth}%
+ \fi
+ % create fall back if needed
+ \doifdefinedelse{\??rw#1\c!breedte}
+ {\def\currentrenderingwindow{#1}}
+ {\let\currentrenderingwindow\s!default
+ \definerenderingwindow[\currentrenderingwindow]}%
+ \checkrendering\currentrendering
+ \handlereferenceactions{\getvalue{\??rw\currentrenderingwindow\c!openpaginaactie }}\dosetuprenderingopenpageaction
+ \handlereferenceactions{\getvalue{\??rw\currentrenderingwindow\c!sluitpaginaactie}}\dosetuprenderingclosepageaction
+ \localframed
+ [\??rw\currentrenderingwindow][\c!offset=\v!overlay]%
+ {\expanded{\doinsertrenderingwindow
+ \noexpand\currentrendering\hsize\vsize{\renderingoptions\currentrendering}}}%
+ \egroup}
+
+% todo:
+%
+% \setinternalrendering[example-1][options]{}
+
+% test file:
+%
+% \definerenderingwindow
+% [example]
+% [width=320pt,height=150pt,frame=off,
+% background=color,backgroundcolor=gray,
+% openpageaction=StartCurrentRendering,
+% closepageaction=NextPage]% StopCurrentRendering]
+%
+% \useexternalrendering[example-1][audio/mpeg] [eldorado.mp3]
+% \useexternalrendering[example-2][audio/mpeg] [myst-12.mp3]
+% \useexternalrendering[example-3][application/x-shockwave-flash][http://localhost/mb.swf] [auto]
+% \useexternalrendering[example-4][application/x-shockwave-flash][celebration.swf]
+% \useexternalrendering[example-5][video/quicktime] [p1000726.mov]
+% \useexternalrendering[example-6][application/smil] [quadratic_map.smi]
+%
+% \def\renderingmenu[#1]%
+% {\hbox
+% {\setupbuttons[width=2.5em]%
+% \button{\symbol[StartRendering]} [StartRendering{#1}]\enspace
+% \button{\symbol[StopRendering]} [StopRendering{#1}]\enspace
+% \button{\symbol[PauseRendering]} [PauseRendering{#1}]\enspace
+% \button{\symbol[ResumeRendering]}[ResumeRendering{#1}]}}
+%
+% \renderingmenu[example-1]\blank
+% \renderingmenu[example-2]\blank
+% \renderingmenu[example-3]\blank
+% \renderingmenu[example-4] \placefigure{A ShockWave}{\placerenderingwindow[example][example-4]} \page
+% \renderingmenu[example-5] \placefigure{A Movie}{\placerenderingwindow[example][example-5]} \page
+% \renderingmenu[example-6] \placefigure{A Smile}{\placerenderingwindow[example][example-6]}
+
% will be a MyWay
%
% \setuplayout[grid=yes] \setupcaption[figure][inbetween=] \useMPlibrary[dum] \setupcolors[state=start]
@@ -363,6 +741,13 @@
%
% \stoptext
+% funny, as field action with e.g. dissolve ... only the field dissolves, bug?
+
+\setglobalsystemreference\rt!exec{Transition}{transition}
+
+%def\PDFexecutetransition {/Trans /Trans <</Type /Trans \executeifdefined{PDFpage\argumentA}\PDFpagereplace>>}
+\def\PDFexecutetransition {/Trans /Trans <<\executeifdefined{PDFpage\argumentA}\PDFpagereplace>>}
+
% new, continuous blocks, \som \par \startdoorlopendblok ...
% \startitemize
@@ -886,10 +1271,12 @@
\let\figuredescription\empty
+% beware, changing this will break some code (like pos/backgrounds)
+
\newtoks\everyfirstparagraphintro
\newtoks\everynextparagraphintro
-\chardef\everyparagraphintro=0
+\chardef\everyparagraphintro\zerocount
\def\setupparagraphintro
{\dodoubleempty\dosetupparagraphintro}
@@ -897,14 +1284,14 @@
\def\dosetupparagraphintro[#1][#2]%
{\processallactionsinset
[#1]
- [ \v!reset=>\global\chardef\everyparagraphintro0
+ [ \v!reset=>\global\chardef\everyparagraphintro\zerocount
\global\everyfirstparagraphintro\emptytoks
\global\everynextparagraphintro \emptytoks,
- \v!eerste=>\global\chardef\everyparagraphintro1
+ \v!eerste=>\global\chardef\everyparagraphintro\plusone
\doglobal\appendtoks#2\to\everyfirstparagraphintro,
- \v!volgende=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro=2\fi
+ \v!volgende=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plusone\fi
\doglobal\appendtoks#2\to\everynextparagraphintro,
- \v!elk=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro=2\fi
+ \v!elk=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plustwo\fi
\doglobal\appendtoks#2\to\everyfirstparagraphintro
\doglobal\appendtoks#2\to\everynextparagraphintro]}
@@ -913,7 +1300,7 @@
% no data
\or
% first data
- \global\chardef\everyparagraphintro2
+ \global\chardef\everyparagraphintro\plustwo
\scratchtoks\everyfirstparagraphintro
\global\everyfirstparagraphintro\emptytoks
\or
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 71c4ed43e..bd29572bc 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -15,7 +15,7 @@
\catcode`\{=1 \catcode`\}=2
-\def\contextversion{2004.1.16}
+\def\contextversion{2004.3.9}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type{tex -i} or \type{whatevertex} using
@@ -306,12 +306,12 @@
\input meta-xml.tex
-%D The next two modules implement some additional
-%D functionality concenring classes of documents and output.
-%D These modules probably will be replaced some day.
-
-\input docs-ini.tex
-\input list-ini.tex
+% %D The next two modules implement some additional
+% %D functionality concerning classes of documents and output.
+% %D These modules probably will be replaced some day.
+%
+% \input docs-ini.tex
+% \input list-ini.tex
%D \TEX\ related logo's are always typeset in a special way.
%D Here they come:
diff --git a/tex/context/base/core-buf.tex b/tex/context/base/core-buf.tex
index a37249198..37e284ab5 100644
--- a/tex/context/base/core-buf.tex
+++ b/tex/context/base/core-buf.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=core-buf,
-%D version=2000.01.05,
+%D version=2000.01.05,
%D title=\CONTEXT\ Core Macros,
%D subtitle=Buffers and Blockmoves,
%D author=Hans Hagen,
@@ -8,10 +8,10 @@
%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.
-% investigate etex's \readline and \scantokens
+% investigate etex's \readline and \scantokens
\writestatus{loading}{Context Core Macros / Buffers and Blockmoves}
@@ -127,9 +127,9 @@
12: -- sarit peste
\stopmessages
-\unprotect
+\unprotect
-% more accurate
+% more accurate
%
% \@EA\convertcommand\csname\e!start\v!buffer\endcsname\to\beginofblock % else a space
% \@EA\convertcommand\csname\e!stop\v!buffer \endcsname\to\endofblock
@@ -148,8 +148,8 @@
% \hskip-3em%
% \hbox to 3em{\hss\NOfLines\hskip1em}}
-%D For Willy's nested commented buffers, we need the \type
-%D {\delcharacter} trick.
+%D For Willy's nested commented buffers, we need the \type
+%D {\delcharacter} trick.
%\def\processnextbufferline#1% needs testing ! ! ! !
% {\relax % checken waarom eerdere macro dit nodig heeft / supp-mps run
@@ -157,7 +157,7 @@
% \doifinstringelse{\delcharacter\texcommentsymbol}{\delcharacter\next}
% {\let\next\secondoftwoarguments}
% {\doifincsnameelse\endofblock\next
-% {\ifnum\nestedbufferlevel=\zerocount
+% {\ifnum\nestedbufferlevel=\zerocount
% \let\next\firstoftwoarguments
% \else
% \decrement\nestedbufferlevel\relax
@@ -169,13 +169,13 @@
% {\let\next\secondoftwoarguments}}}%
% \next}
-\long\def\processnextbufferline#1%
+\long\def\processnextbufferline#1%
{\relax % checken waarom eerdere macro dit nodig heeft / supp-mps run
\convertargument#1 \to\next
\doifinstringelse{\delcharacter\texcommentsymbol}{\delcharacter\next}
{\secondoftwoarguments}
{\doifincsnameelse\endofblock\next
- {\ifnum\nestedbufferlevel=\zerocount
+ {\ifnum\nestedbufferlevel=\zerocount
\expandafter\firstoftwoarguments
\else
\decrement\nestedbufferlevel\relax
@@ -191,7 +191,7 @@
\obeylines % nodig, anders gaat 't fout als direct \starttabel (bv)
\doquadrupleempty\dodostartbuffer}
-\def\dodostartbuffer[#1][#2][#3][#4]% upward compatible
+\def\dodostartbuffer[#1][#2][#3][#4]% upward compatible
{\iffourthargument
\def\next{\dododostartbuffer[#1][#2][#3][#4]}%
\else
@@ -203,18 +203,18 @@
{%\showmessage\m!systems{15}{#2}%
\doifelsevalue{\??bu#1\c!alinea}\v!ja
{\segmentatebuffertrue}
- {\doifnumberelse{\getvalue{\??bu#1\c!alinea}}
+ {\doifnumberelse{\getvalue{\??bu#1\c!alinea}}
\segmentatebuffertrue\segmentatebufferfalse}%
\doifelse{#4}{}
{\letbeundefined{\e!stop\v!buffer}% % \let\stopbuffer=\relax % \undefined
\@EA\@EA\@EA\convertargument\@EA\e!start\v!buffer\to\beginofblock % else a space
- \@EA\@EA\@EA\convertargument\@EA\e!stop\v!buffer\to\endofblock
+ \@EA\@EA\@EA\convertargument\@EA\e!stop \v!buffer\to\endofblock
\let\processnextblockline\processnextbufferline}
{\letbeundefined{#4}% \letvalue{#4}=\relax % \undefined
\@EA\convertargument\csname#3\endcsname\to\beginofblock
\@EA\convertargument\csname#4\endcsname\to\endofblock}%
\def\closeblock
- {\ifsegmentatebuffer
+ {\ifsegmentatebuffer
\immediate\write\tmpblocks{\string\stopbufferparagraph}%
\fi
\immediate\closeout\tmpblocks
@@ -225,7 +225,7 @@
\immediate\openout\tmpblocks\TEXbufferfile\jobname}
{\message{<\TEXbufferfile{#2}>}%
\immediate\openout\tmpblocks\TEXbufferfile{#2}}%
- \ifsegmentatebuffer
+ \ifsegmentatebuffer
\immediate\write\tmpblocks{\string\startbufferparagraph}%
\fi
\newcounter\nestedbufferlevel
@@ -270,7 +270,7 @@
\dobuffer{16}[#2]\readjobfile
\getvalue{\??bu#1\c!na}}
-\let\getbuffer \processTEXbuffer % handy
+\let\getbuffer \processTEXbuffer % handy
\let\haalbuffer\processTEXbuffer % will move to mult-com.tex
\def\typebuffer
@@ -323,7 +323,7 @@
{\setbuffer[\iffirstargument#1\else\jobname\fi]#2\endbuffer}
% \long\def\startcrap#1\stopcrap
-% {\usememorybuffers#1\usefilebuffers} % or {{...}}
+% {\usememorybuffers#1\usefilebuffers} % or {{...}}
%
% \startcrap
% \startbuffer
@@ -332,11 +332,11 @@
% \placefigure{crap}{\getbuffer}
% \stopcrap
-% TODO: no grouping due to sidefloats
+% TODO: no grouping due to sidefloats
\expandafter \convertargument \gobbleoneargument @ \to \emptybufferline
-\newif\ifsegmentatebuffer
+\newif\ifsegmentatebuffer
\newif\ifemptybufferline
\def\skippedbufferparagraphs{0}
@@ -349,7 +349,7 @@
\def\getbufferparagraphs
{\dodoubleempty\dogetbufferparagraphs}
-\def\dosetbufferoffset#1%
+\def\dosetbufferoffset#1%
{\doifnumberelse{\getvalue{\??bu#1\c!alinea}}
{\currentbufferparagraph-\getvalue{\??bu#1\c!alinea}}
{\currentbufferparagraph \zerocount}%
@@ -358,14 +358,14 @@
\def\dogetbufferparagraphs[#1][#2]%
{\iffirstargument
\ifsecondargument
- \dosetbufferoffset{#1}%
+ \dosetbufferoffset{#1}%
\doifelse{#2}\v!alles
{\def\startbufferparagraph{\normalbufferparagraph{#1}}}
{\def\startbufferparagraph{\filterbufferparagraph{#1}{#2}}}%
\def\stopbufferparagraph{\dostopbufferparagraph{#1}}%
\def\next{\getparagraphedbuffer[#1]}%
\else
- \dosetbufferoffset\empty
+ \dosetbufferoffset\empty
\def\startbufferparagraph{\filterbufferparagraph{}{#1}}%
\def\stopbufferparagraph{\dostopbufferparagraph{}}%
\def\next{\getparagraphedbuffer[]}%
@@ -400,7 +400,7 @@
\ifnum\currentbufferparagraph>\zerocount
\doifinsetelse{\the\currentbufferparagraph}{#2}
{\let\next\dostartbufferparagraph}
- {\let\next\fakebufferparagraph}%
+ {\let\next\fakebufferparagraph}%
\else
\let\next\gobblebufferparagraph
\fi
@@ -434,7 +434,7 @@
{\expanded{\setvalue{\??se\s!old#2}{\@@filterheadpart[#1]}}%
\doifnot{#2}\lastsection
{\expanded{\dodosetblockcounters[\@@filtertailpart[#1]]}%
- {\getvalue{\??se#2\c!na}}}} % ????
+ {\getvalue{\??se#2\c!na}}}} % ????
\def\dosetblockcounters[#1]%
{\ifblockpermitted
@@ -451,7 +451,7 @@
\@EA\dosetblockcounters\@EA[\blockstatus]%
\fi}
-\def\getblockstatus#1% is this still ok
+\def\getblockstatus#1% is this still ok
{\dosetfilterlevel{\getvalue{\??by\@@bscriterium}}\empty
\expanded{\doifblklevelelse[#1\sectionseparator\sectionseparator0]}
{\global\blockpermittedtrue}
@@ -496,9 +496,9 @@
% {\global\advance\blocklevel by #11
% \ifnum\blocklevel>2\relax\doingblockstrue\else\doingblocksfalse\fi}
%
-% oeps, got bugged
+% oeps, got bugged
-\def\setblocklevel#1% sign
+\def\setblocklevel#1% sign
{\global\advance\blocklevel #11
\ifcase\blocklevel\doingblocksfalse\else\doingblockstrue\fi}
@@ -511,7 +511,7 @@
\def\writetmpblock#1%
{\iftmpblockstarted
- \ifsegmentatebuffer
+ \ifsegmentatebuffer
\ifemptybufferline
\immediate\write\tmpblocks{\string\stopbufferparagraph }%
\immediate\write\tmpblocks{\string\startbufferparagraph}%
@@ -578,14 +578,14 @@
\endrestorecatcodes}
\def\setupcopyblock
- {\makeallother
+ {\makeallother
\obeylines}
\def\writeoutblocks
{\immediate\write\outblocks}
% readable
-%
+%
% \def\processnextblocklineAB#1#2#3%
% {\convertargument#1 \to\next
% \doifinstringelse\endofblockA\next
@@ -595,14 +595,14 @@
% {\def\next{#3}}}%
% \next}
%
-% faster
-%
+% faster
+%
% \def\processnextblocklineAB#1#2#3%
-% {\convertargument#1 \to\next % space is essential
+% {\convertargument#1 \to\next % space is essential
% \doifinstringelse\endofblockA\next
% {#2}{\doifinstringelse\endofblockB\next{#2}{#3}}}
%
-% even more
+% even more
\long\def\processnextblocklineAB#1% #2#3%
{\convertargument#1 \to\next
@@ -637,8 +637,8 @@
% {\def\next{#3}}%
% \fi
% \next}
-%
-% faster
+%
+% faster
\long\def\processnextblockline#1% #2#3%
{\convertargument#1 \to\next
@@ -748,7 +748,7 @@
\def\doverbergblok[#1][#2][#3]%
{\doifassignmentelse{#3}
{\dodoverbergblok[#1][#2][][#3]}
- {\dodoverbergblok[#1][#2][#3][]}}
+ {\dodoverbergblok[#1][#2][#3][]}}
\def\dodoverbergblok[#1][#2][#3][#4]%
{\doifelsenothing{#2}
@@ -808,7 +808,7 @@
\def\doexecuteloadedblock#1#2%
{\blockpermittedtrue % ?
\bgroup % before \c!voor (think of: \c!voor=\startitemize)
- \dosetupblockparameters[#1][#2]% voor 'voor'?
+ \dosetupblockparameters[#1][#2]% voor 'voor'?
\getvalue{\??tb#1\c!voor}%
\dostartattributes{\??tb#1}\c!letter\c!kleur\empty
\visibletrue
@@ -996,7 +996,7 @@
{\def\docommando##1%
{\setvalue{\e!beginvan##1}%
{\setblocklevel+\bgroup
- \obeylines % here, since we look ahead
+ \obeylines % here, since we look ahead
\dodoubleempty\dopasseerblok[##1]}%}%
\setvalue{\e!eindvan##1}%
{}}%
@@ -1023,4 +1023,4 @@
\c!voor=,
\c!na=]
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex
index 9a6c8dd3a..f33b11de1 100644
--- a/tex/context/base/core-des.tex
+++ b/tex/context/base/core-des.tex
@@ -167,23 +167,38 @@
\nobreak
\@@dodefinitie{#1}}
-\setvalue{@@definitie\v!inmarge}#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \noindent\ignorespaces
- \inmarge{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
- \@@dodefinitie{#1}}
-
-\setvalue{@@definitie\v!inlinker}#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \noindent\ignorespaces
- \inlinker{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
- \@@dodefinitie{#1}}
-
-\setvalue{@@definitie\v!inrechter}#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
+% \setvalue{@@definitie\v!inmarge}#1[#2]#3%
+% {\@@dostartdefinitie{#1}[#2]{#3}%
+% \noindent\ignorespaces
+% \inmarge{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
+% \@@dodefinitie{#1}}
+%
+% \setvalue{@@definitie\v!inlinker}#1[#2]#3%
+% {\@@dostartdefinitie{#1}[#2]{#3}%
+% \noindent\ignorespaces
+% \inlinker{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
+% \@@dodefinitie{#1}}
+%
+% \setvalue{@@definitie\v!inrechter}#1[#2]#3%
+% {\@@dostartdefinitie{#1}[#2]{#3}%
+% \noindent\ignorespaces
+% \inrechter{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
+% \@@dodefinitie{#1}}
+
+\def\do@@definitie#1#2[#3]#4%
+ {\@@dostartdefinitie{#2}[#3]{#4}%
\noindent\ignorespaces
- \inrechter{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
- \@@dodefinitie{#1}}
+ #1{\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}%
+ \@@dodefinitie{#2}}
+
+\setvalue{@@definitie\v!inmarge }{\do@@definitie\inmarge }
+\setvalue{@@definitie\v!inlinker }{\do@@definitie\inlinker }
+\setvalue{@@definitie\v!inrechter }{\do@@definitie\inrechter}
+\setvalue{@@definitie\v!marge }{\do@@definitie\inmarge }
+\setvalue{@@definitie\v!linkermarge }{\do@@definitie\inlinker }
+\setvalue{@@definitie\v!rechtermarge}{\do@@definitie\inrechter}
+\setvalue{@@definitie\v!binnenmarge }{\do@@definitie\inbinnen }
+\setvalue{@@definitie\v!buitenmarge }{\do@@definitie\inbuiten }
\def\@@definitieaanelkaarpassend#1[#2]#3%
{\@@dostartdefinitie{#1}[#2]{#3}%
diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex
index b52bdb334..cb018cbf9 100644
--- a/tex/context/base/core-fig.tex
+++ b/tex/context/base/core-fig.tex
@@ -847,7 +847,7 @@
% \edef#2{\the\scratchdimen}% oeps, \the vergeten
% \scratchdimen#3\points
% \divide\scratchdimen \!!ten
-% \edef#4{\@EA\withoutpt\@EA{\the\scratchdimen}}}
+% \edef#4{\withoutpt\the\scratchdimen}}
%
% more obscure but better:
@@ -870,7 +870,7 @@
\scratchdimen\the\scratchcounter\points
\divide\scratchdimen \!!ten
\fi
- \edef#4{\@EA\withoutpt\@EA{\the\scratchdimen}}}
+ \edef#4{\withoutpt\the\scratchdimen}}
\newbox\foundexternalfigure
@@ -942,6 +942,9 @@
\restorecatcodes % recently added; we presume local use
\def\@@eflabel{#2}%
\global\let\externalfigurelog\empty
+ \iftraceexternalfigures
+ \writestatus\m!figures{including \expandedfigurename}%
+ \fi
\getparameters
[\??ep]
[\c!e=\s!unknown,
@@ -1018,12 +1021,22 @@
{\doifobjectfoundelse{FIG}\@@efobjectname\donetrue\donefalse}
\donefalse}
\donefalse}%
- % redo message, only filename
+ % too strict:
+ % \doifparentfileelse\@@effilename
+ % {\@EA\removefromcommalist\@EA{\jobsuffix}\figuretypes
+ % \let\@@efextension\empty
+ % \showmessage\m!figures9\@@effilename
+ % \donefalse}
+ % \donothing
+ % ok, but catcode problems with jobfilesuffix
+ \doifparentfileelse\@@effilename
+ {\@EA\removefromcommalist\@EA{\jobsuffix }\figuretypes
+ \@EA\removefromcommalist\@EA{\jobfilesuffix}\figuretypes}%
+ \donothing
+ % so we get:
\doifparentfileelse\@@effilename
- {\@EA\removefromcommalist\@EA{\jobsuffix}\figuretypes
- \let\@@efextension\empty
- \showmessage\m!figures9\@@effilename
- \donefalse}
+ {\removefromcommalist{pdf}\figuretypes
+ \removefromcommalist{tex}\figuretypes}%
\donothing
\ifdone
\getobjectdimensions{FIG}\@@efobjectname
@@ -1204,9 +1217,9 @@
\hsize\figwid
\ifdone
\scratchdimen\scax\points\divide\scratchdimen \plushundred
- \edef\scax{\@EA\withoutpt\the\scratchdimen}%
+ \edef\scax{\withoutpt\the\scratchdimen}%
\scratchdimen\scay\points\divide\scratchdimen \plushundred
- \edef\scay{\@EA\withoutpt\the\scratchdimen}%
+ \edef\scay{\withoutpt\the\scratchdimen}%
%\schaal[\c!sx=\scax,\c!sy=\scay]{\dowithfigure{\getobject{FIG}{\@@efobjectname}}}%
\doscalenextbox\scax\scay\figwid\fighei{\dowithfigure{\getobject{FIG}{\@@efobjectname}}}%
\xdef\noffigurepages{\number\getvalue{\@@efobjectname\c!n}}%
@@ -1218,9 +1231,9 @@
\xdef\noffigurepages{\number\nofinsertpages}%
\else
\scratchdimen\scax\points\divide\scratchdimen \plushundred
- \edef\scax{\@EA\withoutpt\the\scratchdimen}%
+ \edef\scax{\withoutpt\the\scratchdimen}%
\scratchdimen\scay\points\divide\scratchdimen \plushundred
- \edef\scay{\@EA\withoutpt\the\scratchdimen}%
+ \edef\scay{\withoutpt\the\scratchdimen}%
%\schaal[\c!sx=\scax,\c!sy=\scay]{\dowithfigure{\box\foundexternalfigure}}%
\doscalenextbox\scax\scay\figwid\fighei{\dowithfigure{\box\foundexternalfigure}}%
\xdef\noffigurepages{\number\nofinsertpages}%
@@ -1762,8 +1775,8 @@
\linewidth\onepoint
\setuppositioning
[\c!eenheid=pt,
- \c!xschaal=\withoutpt{\the\efxsteps},
- \c!yschaal=\withoutpt{\the\efysteps},
+ \c!xschaal=\withoutpt\the\efxsteps,
+ \c!yschaal=\withoutpt\the\efysteps,
\c!factor=1]%
\ignorespaces#4%
\def\referring(##1,##2)##3(##4,##5)##6[##7]%
@@ -1812,9 +1825,9 @@
\position(0,0)
{\basegrid
[\c!nx=\@@exxmax,
- \c!dx=\withoutpt{\the\efxsteps},
+ \c!dx=\withoutpt\the\efxsteps,
\c!ny=\@@exymax,
- \c!dy=\withoutpt{\the\efysteps},
+ \c!dy=\withoutpt\the\efysteps,
\c!xstap=1,
\c!ystap=1,
\c!schaal=1,
@@ -1822,8 +1835,8 @@
\c!eenheid=pt]}%
\setuppositioning
[\c!eenheid=pt,
- \c!xschaal=\withoutpt{\the\efxsteps},
- \c!yschaal=\withoutpt{\the\efysteps},
+ \c!xschaal=\withoutpt\the\efxsteps,
+ \c!yschaal=\withoutpt\the\efysteps,
\c!factor=1]%
\linewidth\onepoint
\ignorespaces#4\relax
diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex
index 8acbd878e..cb8f0ed1d 100644
--- a/tex/context/base/core-fil.tex
+++ b/tex/context/base/core-fil.tex
@@ -217,32 +217,6 @@
\def\MPgraphicfile {\bufferprefix mp\ifMPrun run\else graph\fi}
\def\convertMPcolorfile{\bufferprefix metacmyk.tmp}
-%D The next few macros ar eused for some internal (rather
-%D old already) extensions.
-
-\def\definieerfilegroep
- {\dodoubleargument\dodefinieerfilegroep}
-
-\def\dodefinieerfilegroep[#1][#2]%
- {\getparameters[\??fp#1][\c!file=#1,\c!voor=,\c!na=,#2]%
- \setvalue{\e!start#1}{\dostartfilegroep[#1]}}
-
-\def\dostartfilegroep%
- {\dodoubleargument\dodostartfilegroep}
-
-\def\dodostartfilegroep[#1][#2]%
- {\getvalue{\??fp#1\c!voor}%
- \setvalue{\e!stop#1}{\dostopfilegroep[#1][#2]}%
- \expanded{\dolaadfilegroep[\getvalue{\??fp#1\c!file}-#2]}%
- \getvalue{\e!start#1#2}}
-
-\def\dolaadfilegroep[#1-#2#3#4#5]%
- {\readsysfile{#1-#2#3#4}\donothing\donothing}
-
-\def\dostopfilegroep[#1][#2]%
- {\getvalue{\e!stop#1#2}%
- \getvalue{\??fp#1\c!na}}
-
%D To save memory, we implement some seldomly used commands
%D in a lazy way. Nota bene: such runtime definitions are
%D global.
@@ -281,4 +255,4 @@
%D This module will be perfected / changed / weeded.
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex
index a9b1649fc..cf11c889a 100644
--- a/tex/context/base/core-fld.tex
+++ b/tex/context/base/core-fld.tex
@@ -56,119 +56,160 @@
%D The interface to the specials. DEFAULT NOG ANDERS
+\def\preparefieldvariables % evt \def's at the outer level (test) or \edef's here for fast testing
+ {\let\@@DriverFieldNumber \@@fdn
+ \let\@@DriverFieldStyle \@@fdletter
+ \let\@@DriverFieldColor \@@fdkleur
+ \let\@@DriverFieldBackgroundColor\@@fdveldachtergrondkleur
+ \let\@@DriverFieldFrameColor \@@fdveldkaderkleur
+ \let\@@DriverFieldLayer \@@fdveldlaag
+ \let\@@DriverFieldOption \@@fdoptie
+ \let\@@DriverFieldAlign \@@fduitlijnen
+ \let\@@DriverFieldClickIn \@@fdklikin
+ \let\@@DriverFieldClickOut \@@fdklikuit
+ \let\@@DriverFieldRegionIn \@@fdgebiedin
+ \let\@@DriverFieldRegionOut \@@fdgebieduit
+ \let\@@DriverFieldAfterKey \@@fdnatoets
+ \let\@@DriverFieldFormat \@@fdformatteer
+ \let\@@DriverFieldValidate \@@fdvalideer
+ \let\@@DriverFieldCalculate \@@fdbereken
+ \let\@@DriverFieldFocusIn \@@fdfocusin
+ \let\@@DriverFieldFocusOut \@@fdfocusuit}
+
+% todo : remove arguments, consider DriverField a namespace
+
\def\presetlinefield
- {\dopresetlinefield
- {\@@FieldName}
- {\@@FieldWidth}
- {\@@FieldHeight}
- {\@@FieldDefault}
- {\@@fdn}
- {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
- {\@@fdoptie}
- {\@@fduitlijnen}
- {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
+ {\preparefieldvariables
+ \dopresetlinefield
+ {\@@DriverFieldName}
+ {\@@DriverFieldWidth}
+ {\@@DriverFieldHeight}
+ {\@@DriverFieldDefault}
+ {\@@DriverFieldNumber}
+ {\@@DriverFieldStyle,\@@DriverFieldColor,\@@DriverFieldBackgroundColor,\@@DriverFieldFrameColor}
+ {\@@DriverFieldOption}
+ {\@@DriverFieldAlign}
+ {\@@DriverFieldClickIn,\@@DriverFieldClickOut,\@@DriverFieldRegionIn,\@@DriverFieldRegionOut,%
+ \@@DriverFieldAfterKey,\@@DriverFieldFormat,\@@DriverFieldValidate,\@@DriverFieldCalculate,%
+ \@@DriverFieldFocusIn,\@@DriverFieldFocusOut}}
+
\def\presettextfield
- {\dopresettextfield
- {\@@FieldName}
- {\@@FieldWidth}
- {\@@FieldHeight}
- {\@@FieldDefault}
- {\@@fdn}
- {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
- {\@@fdoptie}
- {\@@fduitlijnen}
- {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
+ {\preparefieldvariables
+ \dopresettextfield
+ {\@@DriverFieldName}
+ {\@@DriverFieldWidth}
+ {\@@DriverFieldHeight}
+ {\@@DriverFieldDefault}
+ {\@@DriverFieldNumber}
+ {\@@DriverFieldStyle,\@@DriverFieldColor,\@@DriverFieldBackgroundColor,\@@DriverFieldFrameColor}
+ {\@@DriverFieldOption}
+ {\@@DriverFieldAlign}
+ {\@@DriverFieldClickIn,\@@DriverFieldClickOut,\@@DriverFieldRegionIn,\@@DriverFieldRegionOut,%
+ \@@DriverFieldAfterKey,\@@DriverFieldFormat,\@@DriverFieldValidate,\@@DriverFieldCalculate,%
+ \@@DriverFieldFocusIn,\@@DriverFieldFocusOut}}
\def\presetchoicefield
- {\dopresetchoicefield
- {\@@FieldName}
- {\@@FieldWidth}
- {\@@FieldHeight}
- {\@@FieldDefault}
- {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
- {\@@fdoptie}
- {\@@FieldValues}
- {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
+ {\preparefieldvariables
+ \dopresetchoicefield
+ {\@@DriverFieldName}
+ {\@@DriverFieldWidth}
+ {\@@DriverFieldHeight}
+ {\@@DriverFieldDefault}
+ {\@@DriverFieldStyle,\@@DriverFieldColor,\@@DriverFieldBackgroundColor,\@@DriverFieldFrameColor}
+ {\@@DriverFieldOption}
+ {\@@DriverFieldValues}
+ {\@@DriverFieldClickIn,\@@DriverFieldClickOut,\@@DriverFieldRegionIn,\@@DriverFieldRegionOut,%
+ \@@DriverFieldAfterKey,\@@DriverFieldFormat,\@@DriverFieldValidate,\@@DriverFieldCalculate,%
+ \@@DriverFieldFocusIn,\@@DriverFieldFocusOut}}
\def\presetpopupfield
- {\dopresetpopupfield
- {\@@FieldName}
- {\@@FieldWidth}
- {\@@FieldHeight}
- {\@@FieldDefault}
- {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
- {\@@fdoptie}
- {\@@FieldValues}
- {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
+ {\preparefieldvariables
+ \dopresetpopupfield
+ {\@@DriverFieldName}
+ {\@@DriverFieldWidth}
+ {\@@DriverFieldHeight}
+ {\@@DriverFieldDefault}
+ {\@@DriverFieldStyle,\@@DriverFieldColor,\@@DriverFieldBackgroundColor,\@@DriverFieldFrameColor}
+ {\@@DriverFieldOption}
+ {\@@DriverFieldValues}
+ {\@@DriverFieldClickIn,\@@DriverFieldClickOut,\@@DriverFieldRegionIn,\@@DriverFieldRegionOut,%
+ \@@DriverFieldAfterKey,\@@DriverFieldFormat,\@@DriverFieldValidate,\@@DriverFieldCalculate,%
+ \@@DriverFieldFocusIn,\@@DriverFieldFocusOut}}
\def\presetcombofield
- {\dopresetcombofield
- {\@@FieldName}
- {\@@FieldWidth}
- {\@@FieldHeight}
- {\@@FieldDefault}
- {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
- {\@@fdoptie}
- {\@@FieldValues}
- {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
+ {\preparefieldvariables
+ \dopresetcombofield
+ {\@@DriverFieldName}
+ {\@@DriverFieldWidth}
+ {\@@DriverFieldHeight}
+ {\@@DriverFieldDefault}
+ {\@@DriverFieldStyle,\@@DriverFieldColor,\@@DriverFieldBackgroundColor,\@@DriverFieldFrameColor}
+ {\@@DriverFieldOption}
+ {\@@DriverFieldValues}
+ {\@@DriverFieldClickIn,\@@DriverFieldClickOut,\@@DriverFieldRegionIn,\@@DriverFieldRegionOut,%
+ \@@DriverFieldAfterKey,\@@DriverFieldFormat,\@@DriverFieldValidate,\@@DriverFieldCalculate,%
+ \@@DriverFieldFocusIn,\@@DriverFieldFocusOut}}
\def\presetcheckfield
- {\presetfieldsymbols[\@@FieldValues]%
+ {\preparefieldvariables
+ \presetfieldsymbols[\@@DriverFieldValues]%
\dopresetcheckfield
- {\@@FieldName}
- {\@@FieldWidth}
- {\@@FieldHeight}
- {\@@FieldDefault}
- {\@@fdoptie}
- {\@@FieldValues}
- {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
+ {\@@DriverFieldName}
+ {\@@DriverFieldWidth}
+ {\@@DriverFieldHeight}
+ {\@@DriverFieldDefault}
+ {\@@DriverFieldOption}
+ {\@@DriverFieldValues}
+ {\@@DriverFieldClickIn,\@@DriverFieldClickOut,\@@DriverFieldRegionIn,\@@DriverFieldRegionOut,%
+ \@@DriverFieldAfterKey,\@@DriverFieldFormat,\@@DriverFieldValidate,\@@DriverFieldCalculate,%
+ \@@DriverFieldFocusIn,\@@DriverFieldFocusOut}}
\def\presetpushfield
- {%\edef\@@FieldValues{{\@@FieldValues}}% makes sure {a,b,c} is passed
- \presetfieldsymbols[\@@FieldValues]%
+ {\preparefieldvariables
+ %\edef\@@DriverFieldValues{{\@@DriverFieldValues}}% makes sure {a,b,c} is passed
+ \presetfieldsymbols[\@@DriverFieldValues]%
\dopresetpushfield
- {\@@FieldName}
- {\@@FieldWidth}
- {\@@FieldHeight}
- {\@@FieldDefault}
- {\@@fdoptie}
- {\@@FieldValues}
- {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
+ {\@@DriverFieldName}
+ {\@@DriverFieldWidth}
+ {\@@DriverFieldHeight}
+ {\@@DriverFieldDefault}
+ {\@@DriverFieldOption}
+ {\@@DriverFieldValues}
+ {\@@DriverFieldClickIn,\@@DriverFieldClickOut,\@@DriverFieldRegionIn,\@@DriverFieldRegionOut,%
+ \@@DriverFieldAfterKey,\@@DriverFieldFormat,\@@DriverFieldValidate,\@@DriverFieldCalculate,%
+ \@@DriverFieldFocusIn,\@@DriverFieldFocusOut}}
\def\presetradiofield
- {\presetfieldsymbols[\@@FieldValues]%
+ {\preparefieldvariables
+ \presetfieldsymbols[\@@DriverFieldValues]%
\dopresetradiofield
- {\@@FieldName}
- {\@@FieldWidth}
- {\@@FieldHeight}
- {\@@FieldDefault}
- {\@@fdoptie}
- {\@@FieldRoot}
- {\@@FieldValues}
- {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
+ {\@@DriverFieldName}
+ {\@@DriverFieldWidth}
+ {\@@DriverFieldHeight}
+ {\@@DriverFieldDefault}
+ {\@@DriverFieldOption}
+ {\@@DriverFieldRoot}
+ {\@@DriverFieldValues}
+ {\@@DriverFieldClickIn,\@@DriverFieldClickOut,\@@DriverFieldRegionIn,\@@DriverFieldRegionOut,%
+ \@@DriverFieldAfterKey,\@@DriverFieldFormat,\@@DriverFieldValidate,\@@DriverFieldCalculate,%
+ \@@DriverFieldFocusIn,\@@DriverFieldFocusOut}}
\def\presetradiorecord
- {\dopresetradiorecord
- {\@@FieldName}
- {\@@FieldDefault}
- {\@@fdoptie}
- {\@@FieldKids}
- {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
+ {\preparefieldvariables
+ \dopresetradiorecord
+ {\@@DriverFieldName}
+ {\@@DriverFieldDefault}
+ {\@@DriverFieldOption}
+ {\@@DriverFieldKids}
+ {\@@DriverFieldClickIn,\@@DriverFieldClickOut,\@@DriverFieldRegionIn,\@@DriverFieldRegionOut,%
+ \@@DriverFieldAfterKey,\@@DriverFieldFormat,\@@DriverFieldValidate,\@@DriverFieldCalculate,%
+ \@@DriverFieldFocusIn,\@@DriverFieldFocusOut}}
\def\setfieldmodes#1#2#3%
- {\xdef\@@FieldMode{#1}% % 0 1 2 3
- \xdef\@@FieldFree{#2}% % 0 1
- \xdef\@@FieldAuto{#3}} % 0 1
+ {\xdef\@@DriverFieldMode{#1}% % 0 1 2 3
+ \xdef\@@DriverFieldFree{#2}% % 0 1
+ \xdef\@@DriverFieldAuto{#3}} % 0 1
\newevery\everysetfield\relax
@@ -186,22 +227,22 @@
\egroup}
\def\dosetfield#1#2#3#4#5#6#7#8#9%
- {\xdef\@@FieldName {#1}%
- \xdef\@@FieldType {#2}%
- \xdef\@@FieldRoot {#3}%
- \xdef\@@FieldParent {#4}%
- \xdef\@@FieldKids {#5}%
- \xdef\@@FieldGroup {#6}%
+ {\xdef\@@DriverFieldName {#1}%
+ \xdef\@@DriverFieldType {#2}%
+ \xdef\@@DriverFieldRoot {#3}%
+ \xdef\@@DriverFieldParent {#4}%
+ \xdef\@@DriverFieldKids {#5}%
+ \xdef\@@DriverFieldGroup {#6}%
\setfieldmodes #7%
\bgroup
\def\par{\string\n\string\n}%
- \xdef\@@FieldValues {#8}%
- \xdef\@@FieldDefault{#9}%
+ \xdef\@@DriverFieldValues {#8}%
+ \xdef\@@DriverFieldDefault{#9}%
\egroup}
\def\changefield#1%
- {\setfield{#1}\@@FieldType\@@FieldRoot\@@FieldParent\@@FieldKids\@@FieldGroup
- {\@@FieldMode\@@FieldFree\@@FieldAuto}\@@FieldValues\@@FieldDefault}
+ {\setfield{#1}\@@DriverFieldType\@@DriverFieldRoot\@@DriverFieldParent\@@DriverFieldKids\@@DriverFieldGroup
+ {\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}\@@DriverFieldValues\@@DriverFieldDefault}
\def\getfield#1% name
{\doifundefinedelse{fielddata#1}
@@ -247,14 +288,14 @@
\immediate\write\scratchwrite{use \tracefieldstrue}%
\else
\def\normalizedfieldmode##1##2##3%
- {\edef\@@FieldMode
+ {\edef\@@DriverFieldMode
{\ifcase##1 loner \or parent \or clone \or copy \fi
\ifcase##2 \else(done)\fi}}
\def\dosetfield##1##2##3##4##5##6##7##8##9%
{\normalizedfieldmode##7%
\immediate\write\scratchwrite
{N=##1 / T=##2 / R=##3 / P=##4 / K=##5 / G=##6 /
- M=\@@FieldMode\space/ V=##8 / D=##9}}%
+ M=\@@DriverFieldMode\space/ V=##8 / D=##9}}%
\processcommacommand[\collectedfields]\getfield
\fi
\immediate\closeout\scratchwrite
@@ -298,14 +339,14 @@
%D
%D \starttypen
%D \def\getmainfieldkids#1%
-%D {\let\@@FieldKids\empty
+%D {\let\@@DriverFieldKids\empty
%D \ifdefinemainfield
%D \definetwopasslist{fld:#1}% defined by system
%D \doloop
%D {\gettwopassdata{fld:#1}%
%D \iftwopassdatafound
-%D %\addtocommalist\twopassdata\@@FieldKids
-%D \appendtocommalist\twopassdata\@@FieldKids
+%D %\addtocommalist\twopassdata\@@DriverFieldKids
+%D \appendtocommalist\twopassdata\@@DriverFieldKids
%D \else
%D \exitloop
%D \fi}%
@@ -318,10 +359,10 @@
%D
%D \starttypen
%D \def\getmainfieldkids#1%
-%D {\let\@@FieldKids\empty
+%D {\let\@@DriverFieldKids\empty
%D \ifdefinemainfield
%D \definerawpasslist{fld:#1}% runtime defined by system
-%D \moverawpasslist{fld:#1}\@@FieldKids
+%D \moverawpasslist{fld:#1}\@@DriverFieldKids
%D \fi}
%D \stoptypen
%D
@@ -372,10 +413,10 @@
{\checkfieldreferences
\ifdefinemainfield
\doifundefinedelse{\r!widget#1}%
- {\let\@@FieldKids\empty}
- {\@EA\let\@EA\@@FieldKids\csname\r!widget#1\endcsname}%
+ {\let\@@DriverFieldKids\empty}
+ {\@EA\let\@EA\@@DriverFieldKids\csname\r!widget#1\endcsname}%
\else
- \let\@@FieldKids\empty
+ \let\@@DriverFieldKids\empty
\fi}
\resetfieldreferences
@@ -419,36 +460,36 @@
{\doifundefined{fielddata\currentfieldname}
{\getmainfieldkids\currentfieldname
\ifdefinemainfield
- \ifx\@@FieldKids\empty
- \let\@@FieldMode\fieldlonermode
+ \ifx\@@DriverFieldKids\empty
+ \let\@@DriverFieldMode\fieldlonermode
\else
- \let\@@FieldMode\fieldparentmode
+ \let\@@DriverFieldMode\fieldparentmode
\fi
- \def\@@FieldAuto{1}%
+ \def\@@DriverFieldAuto{1}%
\else
- \let\@@FieldMode\fieldlonermode
- \def\@@FieldAuto{0}%
+ \let\@@DriverFieldMode\fieldlonermode
+ \def\@@DriverFieldAuto{0}%
\fi
- \def\@@FieldFree{0}%
+ \def\@@DriverFieldFree{0}%
\getvalue{define#2field}{\currentfieldname}{#2}{#3}{#4}{#5}}}%
\else
\writestatus\m!fields{pass fieldname and fieldtype}%
\fi}
\def\definelinefield#1#2#3#4#5%
- {\setfield{#1}{#2}{}{}{\@@FieldKids}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{#4}}
+ {\setfield{#1}{#2}{}{}{\@@DriverFieldKids}{#3}{\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}{}{#4}}
\let\definetextfield=\definelinefield
\def\definechoicefield#1#2#3#4#5%
{\doifelsenothing{#4}
- {\def\@@FieldValues{yes,no}}
- {\def\@@FieldValues{#4}}%
+ {\def\@@DriverFieldValues{yes,no}}
+ {\def\@@DriverFieldValues{#4}}%
\doifelsenothing{#5}
- {\dogetcommacommandelement2\from\@@FieldValues\to\@@FieldDefault
- \dogetcommacommandelement1\from\@@FieldDefault\to\@@FieldDefault}
- {\def\@@FieldDefault{#5}}%
- \setfield{#1}{#2}{}{}{\@@FieldKids}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{\@@FieldValues}{\@@FieldDefault}}
+ {\dogetcommacommandelement2\from\@@DriverFieldValues\to\@@DriverFieldDefault
+ \dogetcommacommandelement1\from\@@DriverFieldDefault\to\@@DriverFieldDefault}
+ {\def\@@DriverFieldDefault{#5}}%
+ \setfield{#1}{#2}{}{}{\@@DriverFieldKids}{#3}{\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}{\@@DriverFieldValues}{\@@DriverFieldDefault}}
\let\definepopupfield=\definechoicefield
\let\definecombofield=\definechoicefield
@@ -456,13 +497,13 @@
%\def\definecheckfield#1#2#3#4#5%
% {\doifelsenothing{#4}
% {\definedefaultsymbols
-% \def\@@FieldValues{defaultyes}}
-% {\def\@@FieldValues{#4}}%
+% \def\@@DriverFieldValues{defaultyes}}
+% {\def\@@DriverFieldValues{#4}}%
% \doifelsenothing{#5}
-% {\dogetcommacommandelement2\from\@@FieldValues\to\@@FieldDefault
-% \dogetcommacommandelement1\from\@@FieldDefault\to\@@FieldDefault}
-% {\def\@@FieldDefault{#5}}%
-% \setfield{#1}{#2}{}{}{\@@FieldKids}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{\@@FieldValues}{\@@FieldDefault}}
+% {\dogetcommacommandelement2\from\@@DriverFieldValues\to\@@DriverFieldDefault
+% \dogetcommacommandelement1\from\@@DriverFieldDefault\to\@@DriverFieldDefault}
+% {\def\@@DriverFieldDefault{#5}}%
+% \setfield{#1}{#2}{}{}{\@@DriverFieldKids}{#3}{\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}{\@@DriverFieldValues}{\@@DriverFieldDefault}}
%D Since these fields have an on/off state only, we pass 1/0
%D to the driver as default values.
@@ -470,18 +511,18 @@
\def\definecheckfield#1#2#3#4#5%
{\doifelsenothing{#4}
{\definedefaultsymbols
- \def\@@FieldValues{defaultyes}}
- {\def\@@FieldValues{#4}}%
+ \def\@@DriverFieldValues{defaultyes}}
+ {\def\@@DriverFieldValues{#4}}%
\doifelsenothing{#5}
- {\def\@@FieldDefault{2}}
- {\dogetcommacommandelement1\from\@@FieldValues\to\@@FieldDefault
- \doifinstringelse{#5}{\@@FieldDefault}
- {\def\@@FieldDefault{1}}
- {\def\@@FieldDefault{0}}}%
+ {\def\@@DriverFieldDefault{2}}
+ {\dogetcommacommandelement1\from\@@DriverFieldValues\to\@@DriverFieldDefault
+ \doifinstringelse{#5}{\@@DriverFieldDefault}
+ {\def\@@DriverFieldDefault{1}}
+ {\def\@@DriverFieldDefault{0}}}%
\setfield
- {#1}{#2}{}{}{\@@FieldKids}{#3}%
- {\@@FieldMode\@@FieldFree\@@FieldAuto}%
- {\@@FieldValues}{\@@FieldDefault}}
+ {#1}{#2}{}{}{\@@DriverFieldKids}{#3}%
+ {\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}%
+ {\@@DriverFieldValues}{\@@DriverFieldDefault}}
\let\definepushfield=\definecheckfield
@@ -493,24 +534,24 @@
{\def\SavedFieldDefault{#5}}%
% when opt works
% \@EA\beforesplitstring\SavedFieldDefault\at=>\to\SavedFieldDefault
- \ifx\@@FieldKids\empty
- \setfield{#1}{#2}{}{}{#4}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{\SavedFieldDefault}%
+ \ifx\@@DriverFieldKids\empty
+ \setfield{#1}{#2}{}{}{#4}{#3}{\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}{}{\SavedFieldDefault}%
\else
- \setfield{#1}{#2}{}{}{#4,\@@FieldKids}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{\SavedFieldDefault}%
+ \setfield{#1}{#2}{}{}{#4,\@@DriverFieldKids}{#3}{\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}{}{\SavedFieldDefault}%
\fi
%
\def\docommando##1%
{\doifelse{##1}\SavedFieldDefault
- {\def\@@FieldDefault{##1}}%
- {\let\@@FieldDefault\empty}%
- \setfield{##1}{#2}{#1}{}{}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{\@@FieldDefault}}%
+ {\def\@@DriverFieldDefault{##1}}%
+ {\let\@@DriverFieldDefault\empty}%
+ \setfield{##1}{#2}{#1}{}{}{#3}{\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}{}{\@@DriverFieldDefault}}%
% when opt works
% \def\docommando##1%
% {\@EA\beforesplitstring##1\at=>\to\FieldValue
% \doifelse\FieldValue\SavedFieldDefault
-% {\let\@@FieldDefault\FieldValue}%
-% {\let\@@FieldDefault\empty}%
-% \setfield\FieldValue{#2}{#1}{}{}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{\@@FieldDefault}}%
+% {\let\@@DriverFieldDefault\FieldValue}%
+% {\let\@@DriverFieldDefault\empty}%
+% \setfield\FieldValue{#2}{#1}{}{}{#3}{\@@DriverFieldMode\@@DriverFieldFree\@@DriverFieldAuto}{}{\@@DriverFieldDefault}}%
\processcommalist[#4]\docommando
\else
\writestatus\m!fields{pass values too}%
@@ -523,15 +564,15 @@
{\ifsecondargument
\def\docommando##1%
{\getfield{##1}%
- \ifx\@@FieldType\empty
+ \ifx\@@DriverFieldType\empty
\writestatus\m!fields{unknown field ##1}% to do
\else
\doifsomething{#2}
- {\edef\@@FieldGroup{#2}}%
+ {\edef\@@DriverFieldGroup{#2}}%
\doifelsenothing{#3}
{\definedefaultsymbols
- \def\@@FieldValues{defaultyes}}
- {\def\@@FieldValues{#3}}%
+ \def\@@DriverFieldValues{defaultyes}}
+ {\def\@@DriverFieldValues{#3}}%
\changefield{##1}%
\fi}%
\processcommalist[#1]\docommando
@@ -543,26 +584,26 @@
{\ifsecondargument
\getfield{#1}%
\iftrialtypesetting\else
- \ifx\@@FieldType\empty
+ \ifx\@@DriverFieldType\empty
\writestatus\m!fields{unknown field #1}%
\else
- \let\@@FieldMode=\fieldparentmode
- %\def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
- \def\docommando##1{\appendtocommalist{##1}\@@FieldKids}%
+ \let\@@DriverFieldMode=\fieldparentmode
+ %\def\docommando##1{\addtocommalist{##1}\@@DriverFieldKids}%
+ \def\docommando##1{\appendtocommalist{##1}\@@DriverFieldKids}%
\processcommalist[#2]\docommando
\changefield{#1}%
- \let\@@FieldAutoParent\@@FieldAuto
- \def\@@FieldParent{#1}%
- \let\@@FieldKids\empty
- \let\@@FieldRoot\empty
- \let\@@FieldMode\fieldchildmode
- \def\@@FieldFree{0}%
- \def\@@FieldAuto{0}%
- \doifsomething{#3}{\edef\@@FieldGroup{#3}}%
- \doifsomething{#4}{\edef\@@FieldValues{#4}}%
+ \let\@@DriverFieldAutoParent\@@DriverFieldAuto
+ \def\@@DriverFieldParent{#1}%
+ \let\@@DriverFieldKids\empty
+ \let\@@DriverFieldRoot\empty
+ \let\@@DriverFieldMode\fieldchildmode
+ \def\@@DriverFieldFree{0}%
+ \def\@@DriverFieldAuto{0}%
+ \doifsomething{#3}{\edef\@@DriverFieldGroup{#3}}%
+ \doifsomething{#4}{\edef\@@DriverFieldValues{#4}}%
\def\docommando##1%
- {\ifcase\@@FieldAutoParent\else
- \setmainfieldkid{\@@FieldParent}{##1}%
+ {\ifcase\@@DriverFieldAutoParent\else
+ \setmainfieldkid{\@@DriverFieldParent}{##1}%
\fi
\changefield{##1}}%
\processcommalist[#2]\docommando
@@ -579,24 +620,24 @@
{\ifsecondargument
\getfield{#1}%
\iftrialtypesetting\else
- \ifx\@@FieldType\empty
+ \ifx\@@DriverFieldType\empty
\writestatus\m!fields{unknown field #1}%
\else
- \let\@@FieldMode\fieldparentmode
- %\def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
- \def\docommando##1{\appendtocommalist{##1}\@@FieldKids}%
+ \let\@@DriverFieldMode\fieldparentmode
+ %\def\docommando##1{\addtocommalist{##1}\@@DriverFieldKids}%
+ \def\docommando##1{\appendtocommalist{##1}\@@DriverFieldKids}%
\processcommalist[#2]\docommando
\changefield{#1}%
- \let\@@FieldAutoParent=\@@FieldAuto
- \def\@@FieldParent{#1}%
- \let\@@FieldKids\empty
- \let\@@FieldRoot\empty
- \let\@@FieldMode\fieldcopymode
- \def\@@FieldFree{0}%
- \def\@@FieldAuto{0}%
+ \let\@@DriverFieldAutoParent=\@@DriverFieldAuto
+ \def\@@DriverFieldParent{#1}%
+ \let\@@DriverFieldKids\empty
+ \let\@@DriverFieldRoot\empty
+ \let\@@DriverFieldMode\fieldcopymode
+ \def\@@DriverFieldFree{0}%
+ \def\@@DriverFieldAuto{0}%
\def\docommando##1%
- {\ifcase\@@FieldAutoParent\else
- \setmainfieldkid{\@@FieldParent}{##1}%
+ {\ifcase\@@DriverFieldAutoParent\else
+ \setmainfieldkid{\@@DriverFieldParent}{##1}%
\fi
\changefield{##1}}%
\processcommalist[#2]\docommando
@@ -620,26 +661,26 @@
\bgroup
\getfield{#2}%
\ifsecondargument
- \def\@@FieldLabel{#3}%
+ \def\@@DriverFieldLabel{#3}%
\else
- \let\@@FieldLabel\@@FieldName
+ \let\@@DriverFieldLabel\@@DriverFieldName
\fi
- \ifx\@@FieldType\empty
+ \ifx\@@DriverFieldType\empty
\writestatus\m!fields{unknown field #2}%
- \else\ifcase\@@FieldFree\relax
- \doifdefinedelse{\strippedcsname\setupfield\@@FieldGroup}
- {\let\dosetupfield=#1\getvalue{\strippedcsname\setupfield\@@FieldGroup}}
- {#1[\@@FieldName][\v!label,\v!kader,\v!horizontaal][][][]}%
+ \else\ifcase\@@DriverFieldFree\relax
+ \doifdefinedelse{\strippedcsname\setupfield\@@DriverFieldGroup}
+ {\let\dosetupfield=#1\getvalue{\strippedcsname\setupfield\@@DriverFieldGroup}}
+ {#1[\@@DriverFieldName][\v!label,\v!kader,\v!horizontaal][][][]}%
\iftrialtypesetting\else
- \def\@@FieldFree{1}%
+ \def\@@DriverFieldFree{1}%
\changefield{#2}%
\fi
- \else\ifcase\@@FieldAuto\relax
+ \else\ifcase\@@DriverFieldAuto\relax
% \writestatus\m!fields{field #2 already typeset}%
\else
% \writestatus\m!fields{field #2 automatically copied}%
\nextsystemfield
- \copyfield[\@@FieldName][\currentsystemfield]%
+ \copyfield[\@@DriverFieldName][\currentsystemfield]%
\dotripleempty\dofield[#1][\currentsystemfield][#3]% get the if's right
\fi\fi\fi
\egroup
@@ -647,40 +688,40 @@
\def\typesetfield
{\useJSscripts[fld]%
- \ifx\@@FieldRoot\empty \else
- \let\@@SavedFieldName\@@FieldName
- \getfield\@@FieldRoot
- \ifcase\@@FieldFree\relax
- \dosetfieldstatus\@@FieldMode\@@FieldParent\@@FieldKids\@@FieldRoot
+ \ifx\@@DriverFieldRoot\empty \else
+ \let\@@SavedFieldName\@@DriverFieldName
+ \getfield\@@DriverFieldRoot
+ \ifcase\@@DriverFieldFree\relax
+ \dosetfieldstatus\@@DriverFieldMode\@@DriverFieldParent\@@DriverFieldKids\@@DriverFieldRoot
\dopresetrecord
\iftrialtypesetting\else
- \def\@@FieldFree{1}%
- \changefield\@@FieldName
+ \def\@@DriverFieldFree{1}%
+ \changefield\@@DriverFieldName
\fi
\fi
\getfield\@@SavedFieldName
\fi
- \ifx\@@FieldKids\empty
+ \ifx\@@DriverFieldKids\empty
\donefalse
\else
\donetrue
\fi
\ifdone
- \let\@@FieldParent\@@FieldName
- %\addtocommalist\@@FieldParent\@@FieldKids
- \appendtocommalist\@@FieldParent\@@FieldKids
- \dosetfieldstatus\@@FieldMode\@@FieldParent\@@FieldKids\@@FieldRoot
+ \let\@@DriverFieldParent\@@DriverFieldName
+ %\addtocommalist\@@DriverFieldParent\@@DriverFieldKids
+ \appendtocommalist\@@DriverFieldParent\@@DriverFieldKids
+ \dosetfieldstatus\@@DriverFieldMode\@@DriverFieldParent\@@DriverFieldKids\@@DriverFieldRoot
\dopresetfield
- \let\@@FieldMode\fieldchildmode
+ \let\@@DriverFieldMode\fieldchildmode
\fi
- \dosetfieldstatus\@@FieldMode\@@FieldParent\@@FieldKids\@@FieldRoot
+ \dosetfieldstatus\@@DriverFieldMode\@@DriverFieldParent\@@DriverFieldKids\@@DriverFieldRoot
\dopresetfield}
\def\dopresetfield
- {\iftrialtypesetting\else\iflocation\getvalue{preset\@@FieldType field}\fi\fi}
+ {\iftrialtypesetting\else\iflocation\getvalue{preset\@@DriverFieldType field}\fi\fi}
\def\dopresetrecord
- {\iftrialtypesetting\else\iflocation\getvalue{preset\@@FieldType record}\fi\fi}
+ {\iftrialtypesetting\else\iflocation\getvalue{preset\@@DriverFieldType record}\fi\fi}
\def\dodefinethefieldset[#1][#2]%
{\dodefinefieldset{#1}{#2}}
@@ -789,7 +830,7 @@
{\reshapeframeboxtrue % else wrong dimensions
\framed
[\c!letter=,\c!kleur=,\c!uitlijnen=\c!rechts,#4]
- {\@@FieldLabel}}%
+ {\@@DriverFieldLabel}}%
\fi
\setbox2=\hbox
{\reshapeframeboxtrue % else wrong dimensions
@@ -809,9 +850,9 @@
\c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=,
\c!focusin=,\c!focusuit=,
\c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=,
- \c!veldkaderkleur=,#5]%
- \dimen0=\framedwidth \edef\@@FieldWidth {\the\dimen0}%
- \dimen0=\framedheight\edef\@@FieldHeight{\the\dimen0}%
+ \c!veldkaderkleur=,\c!veldlaag=,#5]%
+ \scratchdimen\framedwidth \edef\@@DriverFieldWidth {\the\scratchdimen}%
+ \scratchdimen\framedheight\edef\@@DriverFieldHeight{\the\scratchdimen}%
\vfill
\hbox{\lower\@@fdveldoffset\hbox{\typesetfield}}
\vss}}%
@@ -848,17 +889,17 @@
\c!focusin=,\c!focusuit=,
\c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=,
\c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=,
- \c!veldkaderkleur=,#5,\c!uitlijnen=]
- {\dogetcommacommandelement1\from\@@FieldValues\to\@@FieldValue
- \ifx\@@FieldValue\empty
- \let\@@FieldValue\@@FieldDefault
+ \c!veldkaderkleur=,\c!veldlaag=,#5,\c!uitlijnen=]
+ {\dogetcommacommandelement1\from\@@DriverFieldValues\to\@@DriverFieldValue
+ \ifx\@@DriverFieldValue\empty
+ \let\@@DriverFieldValue\@@DriverFieldDefault
\fi
- \dopresetfieldsymbol\@@FieldValue
- \setbox0=\hbox{\dogetfieldsymbol{\@@FieldValue}}%
- \dimen0=\wd0 \edef\@@FieldWidth {\the\dimen0}%
- \dimen0=\ht0 \edef\@@FieldHeight{\the\dimen0}%
- \vbox to \ht0
- {\vfill\hbox to \wd0{\typesetfield\hfill}\vss}}}
+ \dopresetfieldsymbol\@@DriverFieldValue
+ \setbox\scratchbox\hbox{\dogetfieldsymbol\@@DriverFieldValue}%
+ \scratchdimen\wd\scratchbox \edef\@@DriverFieldWidth {\the\scratchdimen}%
+ \scratchdimen\ht\scratchbox \edef\@@DriverFieldHeight{\the\scratchdimen}%
+ \vbox to \ht\scratchbox
+ {\vfill\hbox to \wd\scratchbox{\typesetfield\hfill}\vss}}}
%D Common stuff
@@ -874,7 +915,7 @@
{\dosingleempty\dofillinfield}
\def\dofillinfield[#1]#2%
- {\leavevmode
+ {\dontleavehmode
\hbox
{\forgetall
\setupfields[\v!reset]%
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index 0dcfb4445..539518b49 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -468,7 +468,7 @@
\scratchdimen\zeropoint
\fi
\ifnum\@@extrasnap=2 \advance\scratchdimen \extrasnapsign.5\lineheight \fi
- \ifnum\@@extrasnap=3 \advance\scratchdimen \extrasnapsign\lineheight \fi
+ \ifnum\@@extrasnap=3 \advance\scratchdimen \extrasnapsign\lineheight \fi
\edef\postsnap{\the\scratchdimen}%
\ifstrutsnapping
\nextboxht\strutht
diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex
index b394b15ab..8bdc2f38c 100644
--- a/tex/context/base/core-int.tex
+++ b/tex/context/base/core-int.tex
@@ -399,8 +399,7 @@
% niet waterdicht
\doifnot{\the\!!widtha\the\!!heighta}\@@pcscreendata
{\xdef\@@pcscreendata{\the\!!widtha\the\!!heighta}%
- \showmessage\m!interactions
- 1{\@EA\withoutpt\the\!!widtha,\@EA\withoutpt\the\!!heighta}}%
+ \showmessage\m!interactions1{\withoutpt\the\!!widtha,\withoutpt\the\!!heighta}}%
% needs to be split: dimensions for each page
% and mode per document and only once !
\dosetupscreen \rugoffset\kopoffset\!!widtha\!!heighta{\the\!!counte}%
@@ -684,8 +683,7 @@
{\global\skippedmenuitemfalse
\setbox\locationbox\hbox
{\resetgoto % anders cyclische aanroep !
- \localframed[#1][#2]
- {\dolocationattributes{#1}\c!letter\c!kleur{#3}}}%
+ \localframed[#1][#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}}%
\iflocationclick
\hbox{\gotolocation{#4}{\box\locationbox}}%
\else
@@ -774,12 +772,12 @@
\getvalue{\??am#1#3}\relax
\ifextendedmenu
\setamboxcommands{#1}{#4}%
- \def\next%
+ \def\next
{\ignorespaces#2}%
\else
\def\dolocationcommand##1%
{\dosetlocationcommanditem{#1}{#4}{##1}}%
- \def\next%
+ \def\next
{\processcommalist[#2]\dolocationcommand}%
\fi
\next
@@ -855,8 +853,7 @@
\iflocationmenupermitted
\bgroup
\showcomposition
- \def\dolocationcommand##1%
- {\dosetlocationcommanditem{#3}{##1}}%
+ \def\dolocationcommand##1{\dosetlocationcommanditem{#3}{##1}}%
\dimen0=\zetbreedte
\advance\dimen0 \pagebackgroundhoffset
\advance\dimen0 \pagebackgroundhoffset
@@ -913,17 +910,10 @@
\let\do@@ammenuposition\gobbleoneargument % hook for positional thingies
\fi
-\setvalue{\??am\s!do\v!rechts}%
- {\@@amvbox{\dodummypageskip\v!rechts}\rechterrandbreedte}
-
-\setvalue{\??am\s!do\v!links}%
- {\@@amvbox{\dodummypageskip\v!links}\linkerrandbreedte}
-
-\setvalue{\??am\s!do\v!boven}%
- {\@@amhbox{\dodummypageskip\v!boven}\bovenhoogte}
-
-\setvalue{\??am\s!do\v!onder}%
- {\@@amhbox{\dodummypageskip\v!onder}\onderhoogte}
+\setvalue{\??am\s!do\v!rechts}{\@@amvbox{\dodummypageskip\v!rechts}\rechterrandbreedte}
+\setvalue{\??am\s!do\v!links }{\@@amvbox{\dodummypageskip\v!links}\linkerrandbreedte}
+\setvalue{\??am\s!do\v!boven }{\@@amhbox{\dodummypageskip\v!boven}\bovenhoogte}
+\setvalue{\??am\s!do\v!onder }{\@@amhbox{\dodummypageskip\v!onder}\onderhoogte}
\def\dointeractiemenu#1#2%
{\getvalue{\??am\s!do\getvalue{\??am#1\c!plaats}}{#1}{#2}}
@@ -1403,6 +1393,7 @@
\setbox0\hbox{\blackrule[\c!breedte=\!!widtha]}%
\global\setbox\meterbox\hbox to \!!widthb
{\hss
+ % brrr
\for \teller=1 \to \lastpage \step \!!counta \do
{\gotorealpage{}{}{\teller}{\copy0}}%
\hss}%
@@ -1423,19 +1414,21 @@
\!!widtha=1em\relax
\fi
\setupblackrules[\c!breedte=\!!widtha]%
- \ifnum\realpageno>1\relax
- \!!counta=\realpageno
+ \ifnum\realpageno>\plusone
+ \!!counta\realpageno
\advance\!!counta -2\relax
\hskip\zeropoint\!!plus\!!counta \s!sp\relax % cm gives overflow
+ % or just: \hskip\zeropoint\!!plus\!!counta \relax % cm gives overflow
\doganaareenpagina\??ib\blackrule\prevpage
\fi
\color[\@@ibcontrastkleur]{\blackrule[\c!breedte=.5em]}%
\ifnum\realpageno<\lastpage\relax
\doganaareenpagina\??ib\blackrule\nextpage
- \!!counta=\lastpage\relax
+ \!!counta\lastpage
\advance\!!counta -\realpageno
\advance\!!counta \minusone
\hskip\zeropoint\!!plus\!!counta \s!sp\relax % cm gives overflow
+ % or just \hskip\zeropoint\!!plus\!!counta\relax % cm gives overflow
\fi}%
\hss
\doganaareenpagina\??ib\blackrule\lastpage}%
@@ -2141,7 +2134,7 @@
% \next{\hbox{\raise\strutht\box\commentbox}}}
\def\doflushcommentanchors
- {\let\next\relax, % new
+ {\let\next\relax % new
\processaction
[\@@ccplaats]
[% \v!tekst=>\let\next\relax, % new
@@ -2219,13 +2212,13 @@
% \stopcommentaar
%
% \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm]
-% hello \leftguillemot\ \'e\'erste \rightguilemot\
+% hello \leftguillemot\ \'e\'erste \rightguillemot\
% beautiful
% world
% \stopcommentaar
%
% \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm]
-% hello \leftguillemot\ \'e\'erste \rightguilemot\ test
+% hello \leftguillemot\ \'e\'erste \rightguillemot\ test
%
% beautiful
%
diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex
index aaf273a5a..13573f50d 100644
--- a/tex/context/base/core-job.tex
+++ b/tex/context/base/core-job.tex
@@ -79,9 +79,7 @@
\else
\let\filepath\empty
\def\docommando##1%
- {\doiffileelse{\pathplusfile{##1}{#1}}
- {\donetrue\def\filepath{##1}}
- {\donefalse}%
+ {\doiffileelse{\pathplusfile{##1}{#1}}{\donetrue\def\filepath{##1}}\donefalse
\ifdone\expandafter\quitcommalist\fi}%
\doifparentfileelse{#1} % new
{\processcommacommand [\allinputpaths]\docommando}
@@ -113,12 +111,13 @@
\processcommacommand[\allinputpaths]\docommando
\fi}
-\def\registreerfileinfo[#1#2]#3% geen \showmessage ?
+\def\registerfileinfo[#1#2]#3% geen \showmessage ?
{\writestatus\m!systems{#1#2 file #3 at line \the\inputlineno}%
+ % \pdfliteral{\letterpercent #1#2 file #3 at line \the\inputlineno}%
\immediatewriteutility{f #1 {#3}}}
-\doifundefined{preloadfonts} {\let\preloadfonts=\relax}
-\doifundefined{preloadspecials} {\let\preloadspecials=\relax}
+\ifx\preloadfonts \undefined \let\preloadfonts \relax \fi
+\ifx\preloadspecials\undefined \let\preloadspecials\relax \fi
% \def\loadsystemfiles
% {\reportprotectionstate
@@ -202,7 +201,7 @@
\appendtoks \pagina[\v!laatste] \pagina \to \everybye
\appendtoks \ifarrangingpages\poparrangedpages\fi \to \everybye
-\appendtoks \registreerfileinfo[end]{\jobname} \to \everybye
+\appendtoks \registerfileinfo[end]\jobname \to \everybye
\appendtoks \savenofpages \to \everybye
\appendtoks \savenofsubpages \to \everybye
@@ -233,7 +232,7 @@
\def\starttekst
{\doateverystarttext
\ifnum\textlevel=\zerocount
- \registreerfileinfo[begin]{\jobname}%
+ \registerfileinfo[begin]\jobname
\expandafter\startcopyingblocks
\fi
\doglobal\increment\textlevel\relax}
@@ -269,11 +268,11 @@
\doexecutefile{#1}}}
\def\doexecutefile#1%
- {\registreerfileinfo[begin]{#1}%
+ {\registerfileinfo[begin]{#1}%
\dostarttextfile{#1}%
\processfile{#1}%
\dostoptextfile
- \registreerfileinfo[end]{#1}}
+ \registerfileinfo[end]{#1}}
\def\donotexecutefile#1%
{}
@@ -404,4 +403,4 @@
\resetutilities
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/core-ltb.tex b/tex/context/base/core-ltb.tex
index bec04c804..b5521cfad 100644
--- a/tex/context/base/core-ltb.tex
+++ b/tex/context/base/core-ltb.tex
@@ -11,6 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% todo: als nx>1, dan in geval van rek tussenruimte berekenen en optellen
+% bij breedte, dus: nx nog niet gebruiken in combinatie met rek ! ! ! ! !
+
\beginTEX
\expandafter \endinput
\endTEX
@@ -191,12 +194,17 @@
\xdef\linetablestep{\linetablecparameter\c!nx}%
\ifcase\linetablestep\or
\scratchdimen\linetablecparameter\c!breedte
+ \scratchskip \linetablecparameter\c!afstand
\else
- \scratchdimen\zeropoint
+ \scratchdimen \zeropoint
+ \scratchskip \zeropoint
\scratchcounter\linetablecolumn
\dorecurse\linetablestep
{\advance\scratchdimen\linetablecparameter\c!breedte
- \global\advance\linetablecolumn\plusone}%
+ %\advance\scratchskip \linetablecparameter\c!afstand
+ \global\advance \linetablecolumn\plusone
+ \advance\scratchskip \linetablecparameter\c!afstand
+ }%
\global\linetablecolumn\scratchcounter
\fi
\chardef\linetablemode
@@ -374,18 +382,19 @@
\iflinetablepreroll \else
\box\linetablecell
% the columncounter is one ahead !
- \hskip\linetablecparameter\c!afstand
+% \hskip\linetablecparameter\c!afstand
+ \hskip\scratchskip
\fi
-%%%
+ %%%
\donefalse
\ifcase\linetablerepeat\else
% van te voren berekenen
- \scratchcounter\linetablecolumn\advance\scratchcounter-2
+ \scratchcounter\linetablecolumn\advance\scratchcounter-\plustwo
\ifnum\linetablerepeat=\scratchcounter
\donetrue % collecting repeater
\fi
\fi
-%%%%
+ %%%%
\ifdone
% collecting repeater
\else
@@ -409,21 +418,22 @@
\fi
\else
\donefalse
-\!!doneafalse
+ \!!doneafalse
\ifcase\linetablerepeat\else
% van te voren berekenen
- \scratchcounter\linetablecolumn \advance\scratchcounter-2
+ \scratchcounter\linetablecolumn \advance\scratchcounter-\plustwo
\ifnum\linetablerepeat=\scratchcounter
\donetrue % collecting repeater
\fi
\fi
\ifdone
-\!!doneatrue
+ \!!doneatrue
% collecting repeater
\else\ifdim\linetablewidth>\hsize
\donetrue
\else
- \global\advance\linetablewidth\linetablecparameter\c!afstand\relax
+% \global\advance\linetablewidth\linetablecparameter\c!afstand\relax
+ \global\advance\linetablewidth\scratchskip
\ifdim\linetablewidth>\hsize % ?
\donetrue
\fi
@@ -455,8 +465,10 @@
\iflinetablepreroll \else
\box\linetablecell
% the columncounter is one ahead !
- \hskip\linetablecparameter\c!afstand
- \hfill
+% \hskip\linetablecparameter\c!afstand
+% \hskip\scratchskip
+\dorecurse\linetablestep{\strut\hfil}%
+ \hskip\scratchskip
\fi
\fi}
@@ -612,7 +624,7 @@
\checklinetablepart}
\def\linetableER
- {\stoplinetablecell
+ {% \stoplinetablecell
% no \box\linetablecell, i.e. dummy columnn, last \NC \NR
\stoplinetablepart
\savelinetablepart
@@ -659,10 +671,11 @@
\else
\linetableEC
\fi
- \linetableBC}
+ \linetableBC} % beware, this will result in BR BC EC BC NR
\def\linetableNR
- {\linetableER}
+ {\stoplinetablecell % dummy
+ \linetableER}
\def\startlinetable
{\startlinetablerun}
@@ -772,4 +785,4 @@
{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
\stoplinetable
-\stoptext
+\stoptext \ No newline at end of file
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
index b4b84c414..3fef87c44 100644
--- a/tex/context/base/core-mis.tex
+++ b/tex/context/base/core-mis.tex
@@ -1439,6 +1439,9 @@
%D the second one is a vertical box that gets passed the
%D bodyfont and alignment settings.
+%D Today we would implement this using layers .... but for the
+%D moment we keep it this way.
+
% \startbuffer[test]
% \test left \test left,top \test left,bottom \test left,middle
% \test right \test right,top \test right,bottom \test right,middle
@@ -2017,19 +2020,34 @@
\c!na=,
\c!uitlijnen=\v!midden]
+% does not work
+%
+% \def\plaatsondernaastelkaar#1#2%
+% {\bgroup
+% \def\doplaatsondernaastelkaar%
+% {#2\cr\omit\bgroup#2%
+% \aftergroup#2%
+% \aftergroup\cr
+% \aftergroup\egroup
+% \aftergroup\egroup
+% \let\next=}%
+% #1\bgroup##\cr
+% \omit\bgroup#2%
+% \aftergroup\doplaatsondernaastelkaar
+% \let\next=}
+
\def\plaatsondernaastelkaar#1#2%
{\bgroup
- \def\doplaatsondernaastelkaar%
- {#2\cr\omit\bgroup#2%
- \aftergroup#2%
- \aftergroup\cr
- \aftergroup\egroup
- \aftergroup\egroup
- \let\next=}%
- #1\bgroup##\cr
- \omit\bgroup#2%
- \aftergroup\doplaatsondernaastelkaar
- \let\next=}
+ \dowithnextbox
+ {\bgroup
+ \setbox0\box\nextbox
+ \dowithnextbox
+ {\setbox2\box\nextbox
+ #1{#2#########2\cr\box0\cr\box2\cr}
+ \egroup
+ \egroup}
+ \hbox}
+ \hbox}
\def\placeontopofeachother
{\plaatsondernaastelkaar\halign\hss}
@@ -2190,7 +2208,7 @@
\dodostoprotate\nextboxht\relax\vfill\nextboxwd\relax\hfill
\fi}
-%D A couple of examples, demonstrating how the depth ios
+%D A couple of examples, demonstrating how the depth is
%D taken care of:
%D
%D \startbuffer
diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex
index 76e7e20d3..c1c065208 100644
--- a/tex/context/base/core-nav.tex
+++ b/tex/context/base/core-nav.tex
@@ -103,10 +103,10 @@
\appendtoks \dolocationstartup \to \everyshipout
-\def\dolocationpagecheck
+\def\dolocationpagecheck % brr pdf dependent
{\iflocation
- \handlereferenceactions\@@iaopenpaginaactie \doPDFsetupopenpageaction
- \handlereferenceactions\@@iasluitpaginaactie\doPDFsetupclosepageaction
+ \handlereferenceactions\@@iaopenpaginaactie \dosetupopenpageaction
+ \handlereferenceactions\@@iasluitpaginaactie\dosetupclosepageaction
\fi}
\appendtoks \dolocationpagecheck \to \everyshipout
diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex
index 7f4d07959..908414e72 100644
--- a/tex/context/base/core-new.tex
+++ b/tex/context/base/core-new.tex
@@ -290,7 +290,9 @@
\def\dosetupsC[#1]{\dosetups{#1}} % [..]
\def\dosetups#1% the grid option will be extended to other main modes
- {\executeifdefined{\??su\ifgridsnapping\v!grid\fi:#1}{\csname\??su:#1\endcsname}\relax}
+ {\executeifdefined{\??su\ifgridsnapping\v!grid\fi:#1}{\csname\??su:#1\endcsname}\empty}
+
+\let\directsetup\dosetups
\def\doifsetupselse#1% to be done: grid
{\doifdefinedelse{\??su:#1}}
@@ -475,31 +477,43 @@
%D it seems -a:to work- well
%D \stopregels
-\def\setupenv{\dodoubleargument\rawgetparameters[\??en]}
-
-\def\doifenvelse#1{\doifdefinedelse{\??en#1}} % speed up
-\def\doifenv #1{\doifdefined {\??en#1}} % speed up
-\def\doifnotenv #1{\doifundefined {\??en#1}} % speed up
-
-\def\env#1{\csname\??en#1\endcsname}
-
-\beginTEX
-
-\def\envvar#1#2%
- {\@EA\ifx\csname\??en#1\endcsname\relax
- #2\else\csname\??en#1\endcsname
- \fi}
-
-\endTEX
+% \def\setupenv{\dodoubleargument\rawgetparameters[\??en]}
+%
+% \def\doifenvelse#1{\doifdefinedelse{\??en#1}} % speed up
+% \def\doifenv #1{\doifdefined {\??en#1}} % speed up
+% \def\doifnotenv #1{\doifundefined {\??en#1}} % speed up
+%
+% \def\env#1{\csname\??en#1\endcsname}
+%
+% \beginTEX
+%
+% \def\envvar#1#2%
+% {\@EA\ifx\csname\??en#1\endcsname\relax
+% #2\else\csname\??en#1\endcsname
+% \fi}
+%
+% \endTEX
+%
+% \beginETEX \ifcsname
+%
+% \def\envvar#1#2%
+% {\ifcsname\??en#1\endcsname
+% \csname\??en#1\endcsname\else#2%
+% \fi}
+%
+% \endETEX
-\beginETEX \ifcsname
+% low level change, now also accessible as \getvariable{environment}{...}; the
+% next macros will become obsolete some day in favor of normal variables
-\def\envvar#1#2%
- {\ifcsname\??en#1\endcsname
- \csname\??en#1\endcsname\else#2%
- \fi}
+\def\s!environment{environment}
-\endETEX
+\def\setupenv {\dotripleargument\dosetvariables[\getrawparameters][\s!environment]}
+\def\doifenvelse{\doifelsevariable \s!environment}
+\def\doifenv {\doifvariable \s!environment}
+\def\doifnotenv {\doifnotvariable \s!environment}
+\def\env {\getvariable \s!environment}
+\def\envvar {\getvariabledefault\s!environment}
\bgroup
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 243564b92..6e25a89a6 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -200,6 +200,7 @@
\c!tekstcommando=\high,
\c!tekstletter=\tx,
\c!tekstkleur=,
+ \c!interactie=\v!ja,
\c!n=1]%
\definieernummer
[\currentnote]
@@ -585,20 +586,18 @@
\startpushnote
{\ifx\lastnotenumber\empty \else
\preparethenumber{\??vn\currentnote}\lastnotenumber\preparednumber
- \iflocation
- \naarbox{\noteparameter\c!commando % was \c!nummercommando, but compatible
- {\preparednumber\domovednote\v!volgendepagina\v!vorigepagina}}%
- [\s!fnt:f:\internalfootreference]%
- \else
- \noteparameter\c!nummercommando
- {\preparednumber\domovednote\v!volgendepagina\v!vorigepagina}%
- \fi
+ \doifelse{\noteparameter\c!interactie}\v!nee
+ {\noteparameter\c!nummercommando
+ {\preparednumber\domovednote\v!volgendepagina\v!vorigepagina}}%
+ {\naarbox{\noteparameter\c!commando % was \c!nummercommando, but compatible
+ {\preparednumber\domovednote\v!volgendepagina\v!vorigepagina}}%
+ [\s!fnt:f:\internalfootreference]}%
\fi
- \iflocation
- \rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}%
- \else\ifconditional\pagewisenotes
- \rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}%
- \fi\fi}%
+ \doifelse{\noteparameter\c!interactie}\v!nee
+ {\ifconditional\pagewisenotes
+ \rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}%
+ \fi}%
+ {\rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}}}%
\bgroup
\postponenotes
\aftergroup\dostopnote
@@ -637,17 +636,15 @@
\dodonotesymbol{\kern\noteparameter\c!afstand}% gets the font right, hack !
\fi
\nobreak
- \iflocation
- \naarbox
- {\dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}}%
- [\s!fnt:t:\internalfootreference]%
- \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}%
- \else
- \dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}%
- \ifconditional\pagewisenotes
- \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}%
- \fi
- \fi
+ \doifelse{\noteparameter\c!interactie}\v!nee
+ {\dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}%
+ \ifconditional\pagewisenotes
+ \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}%
+ \fi}
+ {\naarbox
+ {\dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}}%
+ [\s!fnt:t:\internalfootreference]%
+ \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}}%
\globallet\lastnotesymbol\relax}
\let\lastnotesymbol\relax
diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex
index a8d030137..5b74aa710 100644
--- a/tex/context/base/core-ntb.tex
+++ b/tex/context/base/core-ntb.tex
@@ -551,7 +551,30 @@
\doifnottblcol\row\col{\settblcol\row\col\!!zerocount}%
\doifnottbltag\row\col{\settbltag\row\col\tblnone}}}%
% check and do
- \begTBL
+ \startTBLprocessing
+ \begTBL
+ \dorecurse\maximumrow
+ {\bTBL
+ \let\row\recurselevel
+ \dorecurse\maximumcol
+ {\let\col\recurselevel
+ \expanded{\doTBL{\row}{\col}}}%
+ \eTBL}%
+ \removeunwantedspaces % only if hmode
+ \endTBL
+ \stopTBLprocessing
+ % wrong ! ! ! better to have an auto-offset-overlay
+ % \ifnum\TBLlevel>1
+ % \vskip-\strutdp
+ % \fi
+ \egroup
+ \popTBL}
+
+\let\startTBLprocessing\relax
+\let\stopTBLprocessing \relax
+
+\def\processTBL
+ {\begTBL
\dorecurse\maximumrow
{\bTBL
\let\row\recurselevel
@@ -560,13 +583,7 @@
\expanded{\doTBL{\row}{\col}}}%
\eTBL}%
\removeunwantedspaces % only if hmode
- \endTBL
- % wrong ! ! ! better to have an auto-offset-overlay
- % \ifnum\TBLlevel>1
- % \vskip-\strutdp
- % \fi
- \egroup
- \popTBL}
+ \endTBL}
\def\spanTBL#1#2%
{\scratchcounter\gettblcol{#1}{#2}\relax
@@ -1032,10 +1049,82 @@
\executeifdefined{splittblbox\tbltblsplitsmethode}\splittblboxa{#1}%
\fi}
+% \def\splittblboxa#1% spacing between rows gets lost in split
+% {\ifmultipleTBLheads
+% \setbox\scratchbox\vbox{#1}%
+% \setbox8\vbox{\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}%
+% \setbox2\vbox{}%
+% \setbox4\vbox{}%
+% \dorecurse\noftblheadlines
+% {\setbox0\vsplit\scratchbox to \lineheight
+% \setbox2\vbox{\unvcopy2\unvcopy0}}%
+% \dorecurse\noftblnextlines
+% {\setbox0\vsplit\scratchbox to \lineheight
+% \setbox4\vbox{\unvcopy4\unvcopy0}}%
+% \ifcase\noftblheadlines\else
+% \ifdim\pagegoal<\maxdimen
+% \dimen0\ht2
+% \advance\dimen0\ht8
+% \advance\dimen0\pagetotal\relax
+% \ifdim\dimen0>\pagegoal
+% \bgroup\pagina\egroup % make sure that local vars are kept
+% \fi
+% \fi
+% \unvcopy2
+% \ifcase\noftblnextlines\else
+% \setbox2\box4
+% \fi
+% \fi
+% \donefalse
+% \!!doneafalse
+% \doloop
+% {\setbox0\vsplit\scratchbox to \lineheight
+% \if!!donea
+% \ifdim\pagegoal<\maxdimen
+% \setbox0\vbox{\unvbox0}%
+% \ifdim\ht0>\zeropoint
+% \dimen0\ht0
+% \advance\dimen0\ht8
+% \advance\dimen0\pagetotal\relax
+% \ifdim\dimen0>\pagegoal
+% \bgroup\pagina\egroup % make sure that local vars are kept
+% \ifcase\noftblheadlines\else\unvcopy2\fi
+% \fi
+% \fi
+% \fi
+% \fi
+% \!!doneatrue
+% \ifdone
+% \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}%
+% \fi
+% \unvbox0
+% %\allowbreak
+% \bgroup
+% % todo: what if tblnextlines ?
+% \scratchcounter\recurselevel
+% \advance\scratchcounter\noftblheadlines
+% \setupTBLcell{\number\scratchcounter}1
+% \ifx\@@tblsplitafter\relax
+% \allowbreak
+% \else
+% \doifelsenothing\@@tblsplitafter
+% \allowbreak
+% {\scratchcounter\realpageno
+% \@@tblsplitafter
+% \ifnum\scratchcounter<\realpageno
+% \ifcase\noftblheadlines\else\unvcopy2\fi
+% \fi}%
+% \fi
+% \egroup
+% \ifvoid\scratchbox \exitloop \else \donetrue \fi}%
+% \else
+% \notsplittblbox{#1}%
+% \fi}
+
\def\splittblboxa#1% spacing between rows gets lost in split
- {\ifmultipleTBLheads
- \setbox\scratchbox\vbox{#1}%
- \setbox8\vbox{\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}%
+ {\setbox\scratchbox\vbox{#1}%
+ \setbox8\vbox{\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}%
+ \ifmultipleTBLheads
\setbox2\vbox{}%
\setbox4\vbox{}%
\dorecurse\noftblheadlines
@@ -1058,51 +1147,55 @@
\setbox2\box4
\fi
\fi
- \donefalse
- \!!doneafalse
- \doloop
- {\setbox0\vsplit\scratchbox to \lineheight
- \if!!donea
- \ifdim\pagegoal<\maxdimen
- \setbox0\vbox{\unvbox0}%
- \ifdim\ht0>\zeropoint
- \dimen0\ht0
- \advance\dimen0\ht8
- \advance\dimen0\pagetotal\relax
- \ifdim\dimen0>\pagegoal
- \bgroup\pagina\egroup % make sure that local vars are kept
+ \fi
+ \donefalse
+ \!!doneafalse
+ \doloop
+ {\setbox0\vsplit\scratchbox to \lineheight
+ \if!!donea
+ \ifdim\pagegoal<\maxdimen
+ \setbox0\vbox{\unvbox0}%
+ \ifdim\ht0>\zeropoint
+ \dimen0\ht0
+ \advance\dimen0\ht8
+ \advance\dimen0\pagetotal\relax
+ \ifdim\dimen0>\pagegoal
+ \bgroup\pagina\egroup % make sure that local vars are kept
+ \ifmultipleTBLheads
\ifcase\noftblheadlines\else\unvcopy2\fi
\fi
\fi
\fi
\fi
- \!!doneatrue
- \ifdone
- \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}%
- \fi
- \unvbox0
- %\allowbreak
- \bgroup
- % todo: what if tblnextlines ?
- \scratchcounter\recurselevel
+ \fi
+ \!!doneatrue
+ \ifdone
+ \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}%
+ \fi
+ \unvbox0
+ %\allowbreak
+ \bgroup
+ % todo: what if tblnextlines ?
+ \scratchcounter\recurselevel
+ \ifmultipleTBLheads
\advance\scratchcounter\noftblheadlines
- \setupTBLcell{\number\scratchcounter}1
- \ifx\@@tblsplitafter\relax
- \allowbreak
- \else
- \doifelsenothing\@@tblsplitafter
- \allowbreak
- {\scratchcounter\realpageno
- \@@tblsplitafter
+ \fi
+ \setupTBLcell{\number\scratchcounter}1
+ \ifx\@@tblsplitafter\relax
+ \allowbreak
+ \else
+ \doifelsenothing\@@tblsplitafter
+ \allowbreak
+ {\scratchcounter\realpageno
+ \@@tblsplitafter
+ \ifmultipleTBLheads
\ifnum\scratchcounter<\realpageno
\ifcase\noftblheadlines\else\unvcopy2\fi
- \fi}%
- \fi
- \egroup
- \ifvoid\scratchbox \exitloop \else \donetrue \fi}%
- \else
- \notsplittblbox{#1}%
- \fi}
+ \fi
+ \fi}%
+ \fi
+ \egroup
+ \ifvoid\scratchbox \exitloop \else \donetrue \fi}}
% \def\splittblboxb#1%
% {\setbox\scratchbox\vbox{#1}%
@@ -1212,10 +1305,12 @@
\@@tblsplitafter
\exitloop
\else
- % hack
+ % hack
\scratchdimen\pagegoal
- \advance\scratchdimen \lineheight
- \global\pagegoal\scratchdimen
+ \ifdim\scratchdimen<\maxdimen
+ \advance\scratchdimen \lineheight
+ \global\pagegoal\scratchdimen
+ \fi
% brrr
\beforeTABLEsplitbox
\box\finaltblbox
diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex
index 82428db4f..48e7b11ba 100644
--- a/tex/context/base/core-obj.tex
+++ b/tex/context/base/core-obj.tex
@@ -164,16 +164,16 @@
% \setbox\scratchbox\vbox
% {\doinsertobject{#1}{#2}}%
% \setbox\scratchbox#3%
-% {\vbox to #5\s!sp
-% {\ifdim\ht\scratchbox>#5\s!sp
-% % or \ifdim\wd\scratchbox>#4\s!sp
-% \vss\hbox to #4\s!sp{\hss\box\scratchbox\hss}\vss
+% {\vbox to #5\scaledpoint
+% {\ifdim\ht\scratchbox>#5\scaledpoint
+% % or \ifdim\wd\scratchbox>#4\scaledpoint
+% \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss
% \else
% \vss\box\scratchbox
% \fi}}%
-% \wd\scratchbox#4\s!sp
-% \ht\scratchbox#5\s!sp
-% \dp\scratchbox#6\s!sp
+% \wd\scratchbox#4\scaledpoint
+% \ht\scratchbox#5\scaledpoint
+% \dp\scratchbox#6\scaledpoint
% \box\scratchbox
% \elabelgroup}
@@ -184,19 +184,19 @@
\setbox\scratchbox\vbox
{\doinsertobject{#1}{#2}}%
\setbox\scratchbox#3%
- {\vbox to #5\s!sp
- {\ifdim\ht\scratchbox>#5\s!sp
- % or \ifdim\wd\scratchbox>#4\s!sp
- \vss\hbox to #4\s!sp{\hss\box\scratchbox\hss}\vss
+ {\vbox to #5\scaledpoint
+ {\ifdim\ht\scratchbox>#5\scaledpoint
+ % or \ifdim\wd\scratchbox>#4\scaledpoint
+ \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss
\else
\vss\box\scratchbox
\fi}}%
- \scratchdimen#7\s!sp
+ \scratchdimen#7\scaledpoint
\setbox\nextbox\hbox
{\hskip-\scratchdimen\lower\scratchdimen\flushnextbox}%
- \wd\scratchbox#4\s!sp
- \ht\scratchbox#5\s!sp
- \dp\scratchbox#6\s!sp
+ \wd\scratchbox#4\scaledpoint
+ \ht\scratchbox#5\scaledpoint
+ \dp\scratchbox#6\scaledpoint
\box\scratchbox
\elabelgroup}
diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex
index a19863251..5724c72ad 100644
--- a/tex/context/base/core-pos.tex
+++ b/tex/context/base/core-pos.tex
@@ -115,33 +115,6 @@
\let\pospxywhd \setpospxywhd
\let\pospxyplus\setpospxyplus}
-% \def\setpospxy#1#2#3#4%
-% {\dosetpositionnm\@@posp{#2}%
-% \dosetpositionpt\@@posx{#3}%
-% \dosetpositionpt\@@posy{#4}%
-% %\setxvalue{\POSprefix#1}{\@@posp,\@@posx,\@@posy}}%
-% \@EA\xdef\csname\POSprefix#1\endcsname{\@@posp,\@@posx,\@@posy}}%
-%
-% \def\setpospxywhd#1#2#3#4#5#6#7%
-% {\dosetpositionnm\@@posp{#2}%
-% \dosetpositionpt\@@posx{#3}%
-% \dosetpositionpt\@@posy{#4}%
-% \dosetpositionpt\@@posw{#5}%
-% \dosetpositionpt\@@posh{#6}%
-% \dosetpositionpt\@@posd{#7}%
-% %\setxvalue{\POSprefix#1}{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd}}%
-% \@EA\xdef\csname\POSprefix#1\endcsname{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd}}%
-%
-% \def\setpospxyplus#1#2#3#4#5#6#7#8%
-% {\dosetpositionnm\@@posp{#2}%
-% \dosetpositionpt\@@posx{#3}%
-% \dosetpositionpt\@@posy{#4}%
-% \dosetpositionpt\@@posw{#5}%
-% \dosetpositionpt\@@posh{#6}%
-% \dosetpositionpt\@@posd{#7}%
-% %\setxvalue{\POSprefix#1}{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd,#8}}
-% \@EA\xdef\csname\POSprefix#1\endcsname{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd,#8}}
-
%D This is real tricky! The page anchor is applied to the
%D page box and therefore flushed first. So, when present, it
%D is applied to all positions except itself.
@@ -162,19 +135,11 @@
\fi
\fi\fi}
-\def\dosetpositionxy#1#2#3% todo: scaled points
- {\scratchdimen#2\s!sp
- \ifcase\positionanchormode\or
- \advance\scratchdimen-#3\pageanchor
- \fi
- \xdef#1{\@EA\withoutpt\the\scratchdimen}}
-
\def\setpospxy#1#2#3#4%
{\dosetpositionnm\@@posp{#2}%
\dosetpositionxy\@@posx{#3}\MPx
\dosetpositionxy\@@posy{#4}\MPy
- %\setxvalue{\POSprefix#1}{\@@posp,\@@posx,\@@posy}}%
- \@EA\xdef\csname\POSprefix#1\endcsname{\@@posp,\@@posx,\@@posy}}%
+ \@EA\xdef\csname\POSprefix#1\endcsname{\@@posp,\@@posx,\@@posy}}
\def\setpospxywhd#1#2#3#4#5#6#7%
{\dosetpositionnm\@@posp{#2}%
@@ -183,8 +148,7 @@
\dosetpositionpt\@@posw{#5}%
\dosetpositionpt\@@posh{#6}%
\dosetpositionpt\@@posd{#7}%
- %\setxvalue{\POSprefix#1}{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd}}%
- \@EA\xdef\csname\POSprefix#1\endcsname{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd}}%
+ \@EA\xdef\csname\POSprefix#1\endcsname{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd}}
\def\setpospxyplus#1#2#3#4#5#6#7#8%
{\dosetpositionnm\@@posp{#2}%
@@ -193,9 +157,31 @@
\dosetpositionpt\@@posw{#5}%
\dosetpositionpt\@@posh{#6}%
\dosetpositionpt\@@posd{#7}%
- %\setxvalue{\POSprefix#1}{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd,#8}}
\@EA\xdef\csname\POSprefix#1\endcsname{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd,#8}}
+%D Sometimes we want to trick the position handler a bit:
+
+\def\replacepospxywhd#1#2#3#4#5#6#7%
+ {\begingroup
+ \nosetpositionnm\@@posp{#2}%
+ \nosetpositionpt\@@posx{#3}%
+ \nosetpositionpt\@@posy{#4}%
+ \nosetpositionpt\@@posw{#5}%
+ \nosetpositionpt\@@posh{#6}%
+ \nosetpositionpt\@@posd{#7}%
+ \@EA\xdef\csname\POSprefix#1\endcsname{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd}%
+ \endgroup}
+
+% slower, as many tokens, etc:
+%
+% \def\replacepospxywhd#1#2#3#4#5#6#7%
+% {\begingroup
+% \let\dosetpositionnm\nosetpositionnm
+% \let\dosetpositionpt\nosetpositionpt
+% \let\dosetpositionxy\nosetpositionpt
+% \setpospxywhd{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
+% \endgroup}
+
%D We need to initialize.
\resetpositions
@@ -238,12 +224,29 @@
%D \METAPOST\ too.
\def\dosetpositionpt#1#2%
- {\scratchdimen#2\s!sp
- \xdef#1{\@EA\withoutpt\the\scratchdimen}}
+ {\scratchdimen\number#2\scaledpoint
+ \xdef#1{\withoutpt\the\scratchdimen}}
\def\dosetpositionnm#1#2%
{\xdef#1{\number#2}}
+\def\dosetpositionxy#1#2#3% todo: scaled points
+ {\scratchdimen\number#2\scaledpoint
+ \ifcase\positionanchormode\or
+ \advance\scratchdimen-#3\pageanchor
+ \fi
+ \xdef#1{\withoutpt\the\scratchdimen}}
+
+\def\nosetpositionnm#1#2{\xdef#1{\number#2}}
+\def\nosetpositionpt#1#2{\scratchdimen#2\xdef#1{\withoutpt\the\scratchdimen}}
+
+\beginETEX \dimexpr
+
+ \def\dosetpositionpt#1#2{\xdef#1{\withoutpt\the\dimexpr(\number#2\scaledpoint)}}
+ \def\nosetpositionpt#1#2{\xdef#1{\withoutpt\the\dimexpr(#2)}}
+
+\endETEX
+
\def\checkpositions
{\startnointerference
\protectlabels
@@ -850,7 +853,7 @@
%
% \overlappingmargin-2sp % better
-\def\overlappingmargin{-2\s!sp}
+\def\overlappingmargin{-2\scaledpoint}
\def\doifoverlappingelse#1#2%
{\begingroup
@@ -982,11 +985,11 @@
% \dimen6=\MPx\textanchor
% \dimen8=\MPw\textanchor
% \setxvalue{\POSprefix\headanchor}%
-% {\realfolio,\withoutpt{\the\dimen6},\withoutpt{\the\dimen2},%
-% \withoutpt{\the\dimen8},\withoutpt{\the\dimen0},\withoutpt{\the\strutdp}}%
+% {\realfolio,\withoutpt\the\dimen6,\withoutpt\the\dimen2,%
+% \withoutpt\the\dimen8,\withoutpt\the\dimen0,\withoutpt\the\strutdp}%
% \setxvalue{\POSprefix\tailanchor}%
-% {\realfolio,\withoutpt{\the\dimen6},\withoutpt{\the\dimen4},%
-% \withoutpt{\the\dimen8},\withoutpt{\the\strutht},\withoutpt{\the\strutdp}}%
+% {\realfolio,\withoutpt\the\dimen6,\withoutpt\the\dimen4,%
+% \withoutpt\the\dimen8,\withoutpt\the\strutht,\withoutpt\the\strutdp}%
% %\showanchor\textanchor\showanchor\headanchor\showanchor\tailanchor\wait
% \egroup}
@@ -1001,11 +1004,11 @@
\!!dimend\MPx\textanchor
\!!dimene\MPw\textanchor
\setxvalue{\POSprefix\headanchor}%
- {\realfolio,\withoutpt{\the\!!dimend},\withoutpt{\the\!!dimenb},%
- \withoutpt{\the\!!dimene},\withoutpt{\the\!!dimena},\withoutpt{\the\strutdp}}%
+ {\realfolio,\withoutpt\the\!!dimend,\withoutpt\the\!!dimenb,%
+ \withoutpt\the\!!dimene,\withoutpt\the\!!dimena,\withoutpt\the\strutdp}%
\setxvalue{\POSprefix\tailanchor}%
- {\realfolio,\withoutpt{\the\!!dimend},\withoutpt{\the\!!dimenc},%
- \withoutpt{\the\!!dimene},\withoutpt{\the\strutht},\withoutpt{\the\strutdp}}%
+ {\realfolio,\withoutpt\the\!!dimend,\withoutpt\the\!!dimenc,%
+ \withoutpt\the\!!dimene,\withoutpt\the\strutht,\withoutpt\the\strutdp}%
%\showanchor\textanchor\showanchor\headanchor\showanchor\tailanchor\wait
\egroup}
@@ -2170,8 +2173,81 @@
%D margin settings. When set to \type {yes}, this macro comes
%D into action.
+% \def\stackeddown
+% {\dowithnextbox
+% {\doglobal\increment\currentautopos
+% \hpos{\POSstackprefix\currentautopos}
+% {\edef\next
+% {\nextboxht\the\nextboxht
+% \nextboxdp\the\nextboxdp
+% \nextboxwd\the\nextboxwd}%
+% \let\previousautopos\currentautopos
+% \scratchdimen\zeropoint
+% \doloop
+% {\decrement\previousautopos
+% \doifoverlappingelse{\POSstackprefix\currentautopos}{\POSstackprefix\previousautopos}
+% {\advance\scratchdimen\MPh{\POSstackprefix\previousautopos}%
+% \advance\scratchdimen\MPd{\POSstackprefix\previousautopos}}%
+% \exitloop
+% \ifnum\previousautopos<\zerocount\exitloop\fi}%
+% % \ifdim\scratchdimen>\zeropoint
+% \setbox\nextbox\iftracepositions\@EA\ruledhbox\else\@EA\hbox\fi
+% {\lower\scratchdimen\flushnextbox}%
+% \next
+% % \fi
+% \flushnextbox}}}
+
+% Because there can be many stacked items in a line and successive lines, we
+% play dirty and adapt the position and height of the current node so that
+% this becomes visible to a next pass.
+%
+% \startbuffer
+% \inleft {test 1} test 1 \inleft {test 2} test 2 \endgraf
+% \inleft {test 3} test 3
+% \stopbuffer
+% \getbuffer \typebuffer \flushstatus \page
+%
+% \startbuffer
+% \inleft {test 1} test 1 \inleft {test 2} test 2 \inleft {test 3} test 3 \endgraf
+% \inleft {test 4} test 4
+% \stopbuffer
+% \getbuffer \typebuffer \flushstatus \page
+%
+% \startbuffer
+% \inleft {test 1} test 1 \endgraf
+% \inleft {test 2} test 2 \endgraf
+% \inleft {test 3} test 3
+% \stopbuffer
+% \getbuffer \typebuffer \flushstatus \page
+%
+% \startbuffer
+% \inleft {test 1\\test 1} test 1 \inleft {test 2} test 2 \endgraf
+% \inleft {test 3} test 3
+% \stopbuffer
+% \getbuffer \typebuffer \flushstatus \page
+%
+% \startbuffer
+% \inleft {test 1\\test 1\\test 1\\test 1\\test 1} test 1 \endgraf
+% test 2 \endgraf
+% \inleft {test 3} test 3
+% \stopbuffer
+% \getbuffer \typebuffer \flushstatus \page
+%
+% \startbuffer
+% \inleft{test 1} test \inleft{test 2} test \inleft{test 3\\test 3} test
+% \stopbuffer
+% \getbuffer \typebuffer \flushstatus \page
+%
+% \startbuffer
+% \inleft{test 1\\test 1\\test 1} test \inleft{test 2\\test 2} test \inleft{test 3\\test 3\\test 3} test \endgraf
+% \inleft{test 1\\test 1\\test 1} test \inleft{test 2\\test 2} test \inleft{test 3\\test 3\\test 3} test
+% \stopbuffer
+% \getbuffer \typebuffer \flushstatus \page
+
\def\stackeddown
- {\dowithnextbox
+ {\bgroup
+ % this macro assumes a few things and is meant to work for margin notes
+ \dowithnextbox
{\doglobal\increment\currentautopos
\hpos{\POSstackprefix\currentautopos}
{\edef\next
@@ -2180,19 +2256,52 @@
\nextboxwd\the\nextboxwd}%
\let\previousautopos\currentautopos
\scratchdimen\zeropoint
+ \scratchcounter\zerocount
\doloop
- {\decrement\previousautopos
- \doifoverlappingelse{\POSstackprefix\currentautopos}{\POSstackprefix\previousautopos}
- {\advance\scratchdimen\MPh{\POSstackprefix\previousautopos}%
- \advance\scratchdimen\MPd{\POSstackprefix\previousautopos}}%
+ {\decrement\previousautopos\relax
+ \edef\currentposition {\POSstackprefix\currentautopos}%
+ \edef\previousposition{\POSstackprefix\previousautopos}%
+ \ifnum\MPp\currentposition=\MPp\previousposition\relax
+ %\registerstatus{doing \currentautopos/\previousautopos}%
+ \doifoverlappingelse\currentposition\previousposition
+ {\scratchskip \MPy\currentposition
+ \advance\scratchskip-\MPy\previousposition
+ \advance\scratchskip-\MPd\currentposition % untested
+ \advance\scratchskip \MPd\previousposition % untested
+ \advance\scratchskip \MPh\currentposition
+ % todo: also take depth into account
+ \relax
+ \ifdim\scratchskip<\scratchdimen
+ %\registerstatus{no \the\scratchskip}%
+ \else
+ %\registerstatus{yes \the\scratchskip}%
+ \scratchdimen\scratchskip
+ \fi}%
+ \donothing % {\registerstatus{next}}%
+ \ifnum\previousautopos<\zerocount\exitloop\fi
+ \else
\exitloop
- \ifnum\previousautopos<\zerocount\exitloop\fi}%
- % \ifdim\scratchdimen>\zeropoint
+ \fi}%
+ \ifdim\scratchdimen=\zeropoint \else
+ \bgroup
+ \edef\currentposition{\POSstackprefix\currentautopos}%
+ \scratchskip\scratchdimen
+ \advance\scratchskip\MPh\currentposition
+ \scratchdimen-\scratchdimen
+ \advance\scratchdimen\MPy\currentposition
+ %\registerstatus{old \currentautopos: \MPy\currentposition/\MPh\currentposition}%
+ \expanded{\replacepospxywhd
+ {\currentposition}{\MPp\currentposition}{\MPx\currentposition}{\the\scratchdimen}%
+ {\MPw\currentposition}{\the\scratchskip}{\MPd\currentposition}}%
+ %\registerstatus{new \currentautopos: \MPy\currentposition/\MPh\currentposition}%
+ \egroup
\setbox\nextbox\iftracepositions\@EA\ruledhbox\else\@EA\hbox\fi
{\lower\scratchdimen\flushnextbox}%
\next
- % \fi
- \flushnextbox}}}
+ %\registerstatus{\strut}%
+ \fi
+ \flushnextbox}%
+ \egroup}}
%D The next hack make sure that margin texts near faulty
%D strutted lines are handled ok.
diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex
index 67eda416c..f00d5e12b 100644
--- a/tex/context/base/core-ref.tex
+++ b/tex/context/base/core-ref.tex
@@ -36,6 +36,10 @@
% the current implementation permits us to determine
% the page state and is also more efficient
+% the code is rather fuzzy (and will be redone some day); this is
+% due to the chaining (collect secondary and then hook that into
+% the primary etc
+
\unprotect
\startmessages dutch library: references
@@ -416,7 +420,7 @@
%D on the reference mechsnism. An example can be found in the
%D field module.
-\def\checkreferences%
+\def\checkreferences
{\bgroup
\let\fileprefix\empty
\global\let\checkreferences\relax
@@ -645,10 +649,10 @@
%D
%D and split accordingly.
-\def\settextreferences%
+\def\settextreferences
{\futurelet\next\dosettextreferences}
-\def\dosettextreferences%
+\def\dosettextreferences
{\ifx\next\bgroup
\expandafter\dotriplegroupempty\expandafter\dodosettextreferences
\else
@@ -1328,6 +1332,7 @@
\def\doifreferencefoundelse#1#2#3% REF \cs
{\checkreferences
+ % first we collect the secondary ones
\bgroup
\the\everyreference
\let\referenceprefix\empty
@@ -1344,8 +1349,9 @@
\ifenablereferencechains \iflocation
\global\secondaryreferencetrue
\xdef\secondaryreference{\csname REF::2\endcsname}%
+ % test: \global\letcscsname\secondaryreference\csname REF::2\endcsname
\bgroup
-%%\let\doifreferencefoundelse\localdoifreferencefoundelse
+ %%\let\doifreferencefoundelse\localdoifreferencefoundelse
\let\unharmedreferenceprefix\referenceprefix
\dodoifreferencefoundelse\secondaryreference
\ifreferencefound
@@ -1363,8 +1369,9 @@
\scratchcounter\plustwo
\loop
\xdef\secondaryreference{\csname REF::\number\scratchcounter\endcsname}%
+ % test: \global\letcscsname\secondaryreference\csname REF::\number\scratchcounter\endcsname
\bgroup
-%%\let\doifreferencefoundelse\localdoifreferencefoundelse
+ %%\let\doifreferencefoundelse\localdoifreferencefoundelse
\let\unharmedreferenceprefix\referenceprefix
\dodoifreferencefoundelse\secondaryreference
\ifreferencefound
@@ -1381,8 +1388,10 @@
\fi
\global\secondaryreferencefalse
\xdef\primaryreference{\csname REF::1\endcsname}%
+ % test: \global\letcscsname\secondaryreference\csname REF::1\endcsname
\bgroup
-%%\let\doifreferencefoundelse\localdoifreferencefoundelse
+ % now we handle the primary one
+ %%\let\doifreferencefoundelse\localdoifreferencefoundelse
\let\unharmedreferenceprefix\referenceprefix
\dodoifreferencefoundelse\primaryreference
\ifreferencefound#2\else#3\fi
@@ -1396,9 +1405,13 @@
%D to let speed prevail over beauty in resolving chained
%D references with symbolic (defined) references.
-\def\localdoifreferencefoundelse#1#2#3%
+% \def\localdoifreferencefoundelse#1#2#3% beware, this feeds back the (...) ref
+% {\dodoifreferencefoundelse{#1}%
+% \ifreferencefound#2\else#3\fi}
+
+\def\localdoifreferencefoundelse#1%
{\dodoifreferencefoundelse{#1}%
- \ifreferencefound#2\else#3\fi}
+ \ifreferencefound\@EA\firstoftwoarguments\else\@EA\secondoftwoarguments\fi}
%D Somewhere else we will properly define \type {\dostartgoto};
%D the noto alternative takes care of undefined references in
@@ -1563,7 +1576,7 @@
\docheckouterreference
\fi}
-\def\docheckouterreference%
+\def\docheckouterreference
{\let\referenceprefix\empty
\let\unharmedreferenceprefix\empty
\xdef\predefinedreference
@@ -1591,7 +1604,7 @@
\beginETEX \ifcsname
-\def\dodocheckouterreference%
+\def\dodocheckouterreference
{\ifcsname\specialREFidentifier\currentfullreference\endcsname
\@EA\@EA\@EA\splitofffullreference\@EA\@EA\@EA % 1 level
{\csname\specialREFidentifier\currentfullreference\endcsname}%
@@ -1602,7 +1615,7 @@
% already \global\referencefoundtrue % no checking done
\fi\fi}
-\def\docheckouterreference%
+\def\docheckouterreference
{\let\referenceprefix\empty
\let\unharmedreferenceprefix\empty
\xdef\predefinedreference
@@ -1631,10 +1644,10 @@
%D Special references are only tested when some test routine is
%D defined.
-\def\docheckspecialreference%
+\def\docheckspecialreference
{\let\referenceprefix\empty
\let\unharmedreferenceprefix\empty
- \xdef\predefinedreference%
+ \xdef\predefinedreference
{\currentreferencespecial::\currentreferenceoperation}%
\executeifdefined{\s!do:\v!test:\currentreferencespecial}%
{\global\referencefoundtrue\gobbletwoarguments}%
@@ -1656,7 +1669,7 @@
\doboundtext{#2}\scratchdimen{..}->}}%
\fi\fi
\doifpredefinedreferenceelse
- {}
+ \donothing
{\predefinereference
\showmessage\m!references{#1}{[\unharmedreferenceprefix][#2]}}%
\egroup}
@@ -1718,6 +1731,8 @@
%D
%D The second argument can be a comma seperated list.
+% this will be replaced by a more general mechanis
+
% \def\doifreferencepermittedelse#1#2#3#4% ref set found notfound
% {\doifreferencefoundelse{#1}
% {\ifx\currentinnerreference\empty
@@ -1900,7 +1915,7 @@
{\doifsomething{#2}{\thisisdestination{#1:#2}}}
\def\gotosomeinternal#1#2% #3#4
- {\gotodestination{}{}{#1:#2}}
+ {\gotodestination\empty\empty{#1:#2}}
%D An automatic mechanism is provided too:
%D
@@ -1940,9 +1955,9 @@
\def\gotonextinternal#1#2#3#4%
{\ifinternalnamedreferences
- \gotodestination{}{}{\s!aut\iftraceinternalreferences:#1\fi:#2}{#3}{#4}%
+ \gotodestination\empty\empty{\s!aut\iftraceinternalreferences:#1\fi:#2}{#3}{#4}%
\else
- \gotorealpage{}{}{#3}{#4}%
+ \gotorealpage\empty\empty{#3}{#4}%
\fi}
%D We already went through a lot of problems to sort out what
@@ -1950,7 +1965,7 @@
%D supplied cross references (show/goto this or that) as well
%D as user supplied system references (invoke this or that) is
%D already taken care of in the test routine, but we still have
-%D to direct the request to the right routine.
+%D to direct the request to the right (first) routine.
\def\gotolocation% #1#2%
{\ifx\currentreferencespecial\empty
@@ -2112,7 +2127,7 @@
%D shorter reference (\type{close}) and passed to the
%D special driver (using \type{\executecommand}).
-% better: [command(name)] and \definereference[name][command(name)]
+% better: [action(name)] and \definereference[name][action(name)]
\setglobalsystemreference \rt!exec \v!CloseDocument {close}
\setglobalsystemreference \rt!exec \v!ExitViewer {exit}
@@ -2460,7 +2475,7 @@
\removelastskip
\ifx\currentreferencespecial\empty
\ifx\currentouterreference\empty
- \ifnum0\currentrealreference=0
+ \ifnum0\currentrealreference=\zerocount
\ifhmode\strut\high{\symbol[\v!nergens]}\fi
\else\ifnum0\currentrealreference>\realpageno
\dodosymbolreference{#2}{\high{\symbol[\v!volgende]}}%
@@ -2478,7 +2493,7 @@
\egroup}
\def\dodosymbolreference#1#2%
- {#1\hbox{\gotorealpage{}{}{\currentrealreference}
+ {#1\hbox{\gotorealpage\empty\empty\currentrealreference
{\dolocationattributes\??ia\c!letter\c!kleur{#2}}}}
%D The other alternatives just conform their names: only the
@@ -2492,14 +2507,22 @@
% {\doifsomething{#2}{\donaarspace{#2}[#3]~}\donaarfixed{#1}[#3]}
% {\donaarfixed{\dotextprefix{#2}#1}[#3]}}
%
-
% better:
+% \def\docompletereference#1#2[#3]%
+% {\iflocationsplit
+% \doifsomespaceelse{#2}
+% {\donaarspace{\dotextprefix{#2}#1}[#3]}
+% {\donaarfixed{\dotextprefix{#2}#1}[#3]}%
+% \else
+% \donaarfixed{\dotextprefix{#2}#1}[#3]%
+% \fi}
+%
+% more efficient
+
\def\docompletereference#1#2[#3]%
{\iflocationsplit
- \doifsomespaceelse{#2}
- {\donaarspace{\dotextprefix{#2}#1}[#3]}
- {\donaarfixed{\dotextprefix{#2}#1}[#3]}%
+ \doifsomespaceelse{#2}\donaarspace\donaarfixed{\dotextprefix{#2}#1}[#3]%
\else
\donaarfixed{\dotextprefix{#2}#1}[#3]%
\fi}
@@ -2688,7 +2711,7 @@
#1\relax % \relax prevents #1's next macros from gobbling \fi
\fi
\fi
- \global\similarreference=0 }
+ \global\similarreference\zerocount}
\def\donaarfixed#1[#2]%
{{\iflocation
@@ -2761,9 +2784,9 @@
{\dogebruikexterndocument[#1][#2][#2]}
{\doifsomething{#2}
{\setgvalue{\v!file:::#1}{\doexternaldocument[][#2][#3]}% just \do
- \doif{\@@rfstatus}{\v!start}
+ \doif\@@rfstatus\v!start
{\doifparentfileelse{#2}
- {\showmessage{\m!references}{21}{#2}}
+ {\showmessage\m!references{21}{#2}}
{\dodogebruikexterndocument{#1}{#2}}}}}}%
\else
\dodogebruikexterndocument{#1}{#1}%
@@ -2773,10 +2796,10 @@
\def\dodogebruikexterndocument#1#2%
{\bgroup % prevents wrong loading of \jobname
\def\fileprefix{#1::}%
- \let\setglobalcrossreference=\setoutercrossreference
+ \let\setglobalcrossreference\setoutercrossreference
\usereferences[#2]%
\egroup % when called nested
- \showmessage{\m!references}{21}{#2}}
+ \showmessage\m!references{21}{#2}}
%D The \URL\ alternative takes four arguments:
%D
@@ -2849,11 +2872,11 @@
{\bgroup
\processaction
[\@@urvariant]
- [ \v!geen=>\chardef\urlsplitmode=0,
- \v!beide=>\chardef\urlsplitmode=1,
- \v!na=>\chardef\urlsplitmode=2,
- \v!voor=>\chardef\urlsplitmode=3]%
- \doifelse{\@@urspatie}{\v!ja}
+ [ \v!geen=>\chardef\urlsplitmode\zerocount,
+ \v!beide=>\chardef\urlsplitmode\plusone,
+ \v!na=>\chardef\urlsplitmode\plustwo,
+ \v!voor=>\chardef\urlsplitmode\plusthree]%
+ \doifelse\@@urspatie\v!ja
{\setbetweenisolatedwords%
{\scratchskip\currentspaceskip
\hskip\zeropoint\!!plus.2\scratchskip}}
@@ -2989,9 +3012,9 @@
%D
%D The fastest implementation would be:
-\definespecialtest\v!file{\setfalse\forceURLlocation\handlespecialFILEandURL}
-\definespecialtest\v!URL {\settrue \forceURLlocation\handlespecialFILEandURL}
-\definespecialtest\v!url {\settrue \forceURLlocation\handlespecialFILEandURL}
+\definespecialtest\v!file {\setfalse\forceURLlocation\handlespecialFILEandURL}
+\definespecialtest\v!URL {\settrue \forceURLlocation\handlespecialFILEandURL}
+\definespecialtest\v!url {\settrue \forceURLlocation\handlespecialFILEandURL}
\definespeciallocation\v!file{\setfalse\forceURLlocation\handlespecialallocationFILEandURL}
\definespeciallocation\v!URL {\settrue \forceURLlocation\handlespecialallocationFILEandURL}
@@ -3020,8 +3043,12 @@
%D
%D An better alternative, slower but error aware, is
-\definespecialtest\v!actie
- {\localdoifreferencefoundelse\currentreferenceoperation}
+% \definespecialtest\v!actie
+% {\localdoifreferencefoundelse\currentreferenceoperation}
+
+\definespecialtest\v!actie % rather ugly action(whatever{argument})
+ {\expanded{\localdoifreferencefoundelse{\currentreferenceoperation
+ \ifx\currentreferencearguments\empty\else{\currentreferencearguments}\fi}}}
\definespeciallocation\v!actie
{\handleexecreference}
@@ -3163,7 +3190,7 @@
% \doifnonzeropositiveelse{\currentinnerreference}
% {}
% {\edef\currentinnerreference{1}}%
-% \gotorealpage{}{}{\currentinnerreference}{#2}%
+% \gotorealpage\empty\empty\currentinnerreference{#2}%
% \else
% \setouterlocation\currentouterreference
% \doifnonzeropositiveelse{\currentinnerreference}
@@ -3171,7 +3198,7 @@
% {\doifdefinedelse{\v!pagina:::\currentinnerreference}
% {\edef\currentinnerreference{\getvalue{\v!pagina:::\currentinnerreference}}}
% {\edef\currentinnerreference{1}}}%
-% \gotorealpage{\otherURL}{\otherfile}{\currentinnerreference}{#2}%
+% \gotorealpage\otherURL\otherfile\currentinnerreference{#2}%
% \fi
% \else
% {#2}%
@@ -3250,15 +3277,15 @@
\doifreferencefoundelse{#1}
{\ifrealreferencepage
\ifforwardreference
- \donaarfixed{\labeltext{\v!hierboven}}[#1]%
+ \donaarfixed{\labeltext\v!hierboven}[#1]%
\else
- \donaarfixed{\labeltext{\v!hieronder}}[#1]%
+ \donaarfixed{\labeltext\v!hieronder}[#1]%
\fi
\else
- \donaarfixed{\labeltexts{\v!oppagina}{\currentpagereference}}[#1]%
+ \donaarfixed{\labeltexts\v!oppagina\currentpagereference}[#1]%
\fi}
{\unknownreference{#1}%
- \labeltexts{\v!pagina}{\dummyreference}}%
+ \labeltexts\v!pagina\dummyreference}%
\referentieinfo{<}{#1}}
%D We can cross link documents by using:
@@ -3301,7 +3328,7 @@
\dogebruikexterndocument[#1][#2][#4]%
\doglobal\addtocommalist{#1}\crossdocumentreferences
\def\docommando##1%
- {\setxvalue{\??rf##1\c!status}{\v!start}% for fast checking
+ {\globalletvalue{\??rf##1\c!status}\v!start % for fast checking
\doglobal\addtocommalist{##1}\crossdocumentelements}%
\processcommalist[#3]\docommando
\ifutilitydone
@@ -3368,6 +3395,8 @@
\long\def\docomplexbutton#1[#2]#3#4% get rid of possible space before [#4]
{\dodocomplexbutton#1[#2]{#3}#4} % #4 == [
+\def\buttonframed{\dodoubleempty\localframed[\??bt]} % goodie
+
% \def\dodocomplexbutton#1[#2]#3[#4]%
% {\bgroup
% \doifvalue{#1\c!status}{\v!stop}{\locationfalse}%
@@ -3397,10 +3426,10 @@
\long\def\dodocomplexbutton#1[#2]#3[#4]% #3 can contain [] -> {#3} later
{\bgroup
- \doifvalue{#1\c!status}{\v!stop}{\locationfalse}%
+ \doifvalue{#1\c!status}\v!stop\locationfalse
\iflocation
\resetgoto
- \ConvertConstantAfter\doifelse{#3}{\v!geen}{\hphantom}{\hbox}
+ \ConvertConstantAfter\doifelse{#3}\v!geen\hphantom\hbox
{\doifelsenothing{#4}
{\setlocationboxnop#1[#2]{#3}[#4]}
{\doifreferencefoundelse{#4}
@@ -3430,6 +3459,8 @@
%D The symbols are derived from the symbols linked to the
%D entries.
+% does not work well with for instance SomeRef{whatever}
+
\def\interactiebuttons
{\dodoubleempty\dointeractiebuttons}
@@ -3447,7 +3478,7 @@
\stelinteractiebalkin[#1,\c!strut=\v!nee]%
%\setupinteraction[\c!breedte=\!!zeropoint]%
\setinteractionparameter\c!breedte\!!zeropoint
- \!!counta=0 % new, was 1
+ \!!counta\zerocount % new, was 1
\processallactionsinset
[#2]
[ \v!pagina=>\advance\!!counta 4,
@@ -3473,7 +3504,6 @@
\edef\localreference{##1}%
\dodocomplexbutton\??ib
[\c!hoogte=\!!heighta,\c!breedte=\!!widtha]%
-% funny buggy left over: [\c!breedte=\!!widtha]%
{\dontleavehmode\symbol[\localreference]}%
[\localreference]%
\hss}%
@@ -3559,7 +3589,7 @@
\def\dotextprefix#1%
{\bgroup
\global\labeltextdonefalse % this is an ugly dependancy,
- \setbox\scratchbox=\hbox{#1}% to be solved some day
+ \setbox\scratchbox\hbox{#1}% to be solved some day
\ifdim\wd\scratchbox>\zeropoint
\unhbox\scratchbox
\iflabeltextdone\else\@@rfscheider\fi
@@ -3616,4 +3646,46 @@
% \c!zelfdepagina=\v!ja,
% \c!onbekendeverwijzing=\v!ja]
-\protect \endinput
+% under consideration:
+%
+% \setupinteraction[state=start]
+%
+% \unprotect
+%
+% \chardef\rt!extern=5
+%
+% \definesystemreferencehandler \rt!extern \handleexecreference
+%
+% \definespecialtest\v!extern
+% {\expanded{\localdoifreferencefoundelse{\currentreferenceoperation
+% \ifx\currentreferencearguments\empty\else{\currentreferencearguments}\fi}}}
+%
+% \definespeciallocation\v!extern
+% {\handleexecreference}
+%
+% \def\defineexternalreference[#1]%
+% {\setglobalsystemreference\rt!extern{#1}{#1}}
+%
+% \protect
+%
+% \defineexternalreference[NewOne]
+%
+% \def\PDFexecuteNewOne{/SomeNewAction /SomeParameter (\argumentA)}
+%
+% \starttext
+%
+% \goto{test}[AVDP{../../nach-dateipfad.pdf}]
+% \blank
+% \goto{test}[external(AVDP{../../nach-dateipfad.pdf})]
+% \blank
+% \goto{test}[AVDP{../../nach-dateipfad.pdf}]
+% \blank
+% \goto{test}[external(AVDP{../../nach-dateipfad.pdf})]
+% \blank
+% \goto{test}[CloseDocument]
+% \blank
+% \goto{test}[action(CloseDocument)]
+%
+% \stoptext
+
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index c50cf9955..7b44270ee 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -246,7 +246,7 @@
{\setcolorbox}
%D \macros
-%D {defineoverlay,doifoverlayelse,overlayoffset,
+%D {defineoverlay, doifoverlayelse, overlayoffset,
%D overlaywidth, overlayheight, overlaydepth,
%D overlaycolor, overlaylinecolor, overlaylinewidth}
%D
@@ -638,11 +638,11 @@
{\copyparameters[#1][#3]%
[\c!breedte,\c!hoogte,\c!offset,\c!leeg,\c!lijndikte,%
\c!straal,\c!hoek,\c!diepte,\c!kader,\c!kaderkleur,%
- \c!voorgrondletter,\c!voorgrondkleur,\c!regels,\c!component,%
+ \c!voorgrondletter,\c!voorgrondkleur,\c!regels,%
\c!bovenkader,\c!onderkader,\c!linkerkader,\c!rechterkader,%
\c!lijndikte,\c!kaderoffset,\c!achtergrond,\c!component,%
\c!achtergrondoffset,\c!achtergrondraster,\c!achtergrondkleur,%
- \c!uitlijnen,\c!onder,\c!boven,\c!strut,\c!plaats]%
+ \c!uitlijnen,\c!onder,\c!boven,\c!strut,\c!plaats,\c!setups]%
\copyparameters[#1\c!achtergrond][#1]%
[\c!straal,\c!hoek,\c!diepte]%
\copyparameters[#1\c!kader][#1]%
@@ -716,6 +716,10 @@
{\@EA\doconvertfont\csname\@@framed\c!voorgrondletter\endcsname\empty}%
% beware, both the frame and background offset can be overruled
%
+ \edef\doframedsetups{\framedparameter\c!setups}%
+ \ifx\doframedsetups\empty\else
+ \edef\doframedsetups{\noexpand\setups[\doframedsetups]}%
+ \fi
% the next macros are visible
\edef\localoffset{\framedparameter\c!offset}%
\edef\localwidth {\framedparameter\c!breedte}%
@@ -1385,6 +1389,7 @@
\oninterlineskip
\hsize\!!widtha
\vsize\!!heighta
+ \doframedsetups
\raggedcommand
\dobeforeframedbox
\bgroup
@@ -1402,6 +1407,7 @@
\oninterlineskip
\hsize\!!widtha
\vsize\!!heighta
+ \doframedsetups
\raggedcenter
\vss
\bgroup
@@ -1417,6 +1423,7 @@
\bgroup
\forgetall
\oninterlineskip
+ \doframedsetups
\raggedcommand
\vss
\bgroup
@@ -1433,6 +1440,7 @@
\forgetall
\oninterlineskip
\hsize\!!widtha
+ \doframedsetups
\raggedcommand
\dobeforeframedbox
\bgroup
@@ -1448,6 +1456,7 @@
\bgroup
\forgetall
\vsize\!!heighta
+ \doframedsetups
\vss
\bgroup
\aftergroup\vss
@@ -1463,6 +1472,7 @@
{\hbox to \!!widtha
\bgroup
\forgetall
+ \doframedsetups
\hss
\localstrut
\@@handleoneliner
@@ -1474,10 +1484,13 @@
\def\doformatboxNoSize
{\hbox
\bgroup
+ \doframedsetups
\localstrut
\@@handleoneliner
\let\next=}
+\let\doframedsetups\relax
+
%D On the next page we show some examples of how these macros
%D come into action. The examples show us how
%D \type {\v!passend}, \type {\v!ruim} dimensions influence the
@@ -3272,7 +3285,8 @@
\c!onder=\vss,
\c!boven=,
\c!strut=\v!ja,
- \c!plaats=\v!normaal]
+ \c!plaats=\v!normaal,
+ \c!setups=]
\setupscreens
[\c!factor=1.0,
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index 14af7f030..d628188a0 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -11,6 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% start-stop per section en dan combineren met sectieblok; in dat geval
+% eenvoudiger per-* acties
+
% nummeren per sectieblok implementeren
% this module needs a clean up, currently some manipulations
@@ -458,20 +461,20 @@
{\doifnot{#1}\lastsection
{\donexttrackcommando{\nextsection{#1}}}}
-\newif\ifalllevels
+\chardef\alltoclevels\zerocount % \newif\ifalllevels
\let\currentlevel\empty
\def\dosetcurrentlevel#1%
- {\global\alllevelsfalse
+ {\global\chardef\alltoclevels\zerocount
\xdef\currentlevel{\getvalue{\lastsection\s!format}}}
\def\dosetpreviouslevel#1%
- {\global\alllevelstrue
+ {\global\chardef\alltoclevels\plusone
\globallet\currentlevel\empty
\def\dobacktrackcommando##1%
{\ifnum\countervalue{\??se##1}>\zerocount
- \global\alllevelsfalse
+ \global\chardef\alltoclevels\zerocount
\xdef\currentlevel{\getvalue{\previoussection{##1}\s!format}}%
\else
\dobacktracklevel{##1}%
@@ -479,7 +482,7 @@
\dobacktrackcommando\lastsection}
\def\dosettextlevel#1%
- {\global\alllevelstrue
+ {\global\chardef\alltoclevels\plusone
\globallet\currentlevel\empty}
\def\dosetotherlevel#1%
@@ -487,16 +490,16 @@
{\edef\@@sectie{\getvalue{\??ko#1\c!sectie}}} % hoofdstuk\c!format
{\edef\@@sectie{#1}}%
\doifdefinedelse{\??se\@@sectie}
- {\global\alllevelsfalse
+ {\global\chardef\alltoclevels\zerocount
\xdef\currentlevel{\getvalue{\@@sectie\s!format}}}
- {\global\alllevelstrue
+ {\global\chardef\alltoclevels\plusone
\globallet\currentlevel\empty
\def\dobacktrackcommando##1%
{\@EA\ifx\csname\??se##1\c!start\endcsname\relax
\dobacktracklevel{##1}%
\else
\ifnum\countervalue{\??se##1}>\zerocount
- \global\alllevelsfalse
+ \global\chardef\alltoclevels\zerocount
\xdef\currentlevel{\getvalue{##1\s!format}}%
\else
\dobacktracklevel{##1}%
@@ -513,9 +516,9 @@
\else\ifx\askedlevel\v!vorige
\dosetpreviouslevel\askedlevel
\else\ifx\askedlevel\v!alles
- \global\alllevelstrue
+ \global\chardef\alltoclevels\plusone
\else\ifx\askedlevel\v!tekst
- \global\alllevelstrue
+ \global\chardef\alltoclevels\plusone
\else
\edef\byaskedlevel{\csname\??by\askedlevel\endcsname}%
\ifx\byaskedlevel\v!tekst
@@ -530,9 +533,14 @@
\fi
\egroup}
-\def\dontsetfilterlevel#1%
+% \def\dontsetfilterlevel#1#2%
+% {\let\currentlevel\somesavedlevel
+% \chardef\alltoclevels\zerocount}
+
+\def\dontsetfilterlevel#1#2%
{\let\currentlevel\somesavedlevel
- \alllevelsfalse}
+ \let\@@sectiontype\@@tocsectiontype
+ \chardef\alltoclevels\zerocount}
\def\honorlocalfilterlevel % local lists will be real local
{\let\dosetfilterlevel\dontsetfilterlevel}
@@ -540,36 +548,36 @@
% cleaner
%
% \def\doifnextlevelelse[#1::#2]#3#4%
-% {\ifalllevels
-% #3%
-% \else
+% {\ifcase\alltoclevels
% \doifelse{\@@sectiontype}{#1}
% {\doifinstringelse{=\currentlevel:}{=:#2:}
% {\doifinstringelse{=\currentlevel:0}{=:#2:}{#4}{#3}}
% {#4}}
% {#4}%
+% \else
+% #3%
% \fi}
%
% \def\doifprevlevelelse[#1::#2]#3#4%
-% {\ifalllevels
-% #3%
-% \else
+% {\ifcase\alltoclevels
% \doifelse{\@@sectiontype}{#1}
% {\doifinstringelse{=\currentlevel:}{=:#2:}{#3}{#4}}
% {#4}%
+% \else
+% #3%
% \fi}
%
% faster
%
% \def\doifnextlevelelse[#1::#2]%
-% {\ifalllevels
-% \donetrue
-% \else
+% {\ifcase\alltoclevels
% \doifelse{\@@sectiontype}{#1}
% {\doifinstringelse{=\currentlevel:}{=:#2:}
% {\doifinstringelse{=\currentlevel:0}{=:#2:}\donefalse\donetrue}
% \donefalse}
% \donefalse
+% \else
+% \donetrue
% \fi
% \ifdone
% \expandafter\firstoftwoarguments
@@ -578,12 +586,12 @@
% \fi}
%
% \def\doifprevlevelelse[#1::#2]%
-% {\ifalllevels
-% \donetrue
-% \else
+% {\ifcase\alltoclevels
% \doifelse{\@@sectiontype}{#1}
% {\doifinstringelse{=\currentlevel:}{=:#2:}\donetrue\donefalse}
% \donefalse
+% \else
+% \donetrue
% \fi
% \ifdone
% \expandafter\firstoftwoarguments
@@ -604,14 +612,14 @@
% \def\doifnextlevelelse[#1::#2]%
% {\dosavesomelevel[#2:0:0:0:0]%
-% \ifalllevels
-% \donetrue
-% \else
+% \ifcase\alltoclevels
% \doifelse{\@@sectiontype}{#1}
% {\doifinstringelse{=\currentlevel:}{=:#2:}
% {\doifinstringelse{=\currentlevel:0}{=:#2:}\donefalse\donetrue}
% \donefalse}
% \donefalse
+% \else
+% \donetrue
% \fi
% \ifdone
% \expandafter\firstoftwoarguments
@@ -621,12 +629,12 @@
%
% \def\doifprevlevelelse[#1::#2]%
% {\dosavesomelevel[#2:0:0:0:0]%
-% \ifalllevels
-% \donetrue
-% \else
+% \ifcase\alltoclevels
% \doifelse{\@@sectiontype}{#1}
% {\doifinstringelse{=\currentlevel:}{=:#2:}\donetrue\donefalse}
% \donefalse
+% \else
+% \donetrue
% \fi
% \ifdone
% \expandafter\firstoftwoarguments
@@ -638,16 +646,18 @@
% \def\doifnextlevelelse[#1::#2]% beware: this one is \let
% {\dosavesomelevel[#2:0:0:0:0]%
-% \ifalllevels
-% \donetrue
-% \else\ifnum\@@sectiontype=#1
-% \def\levelstring{=:#2:}%
-% \doifincsnameelse{=\currentlevel:}\levelstring
-% {\doifincsnameelse{=\currentlevel:0}\levelstring\donefalse\donetrue}
+% \ifcase\alltoclevels
+% \ifnum\@@sectiontype=#1
+% \def\levelstring{=:#2:}%
+% \doifincsnameelse{=\currentlevel:}\levelstring
+% {\doifincsnameelse{=\currentlevel:0}\levelstring\donefalse\donetrue}
+% \donefalse
+% \else
% \donefalse
+% \fi
% \else
-% \donefalse
-% \fi\fi
+% \donetrue
+% \fi
% \ifdone
% \expandafter\firstoftwoarguments
% \else
@@ -656,13 +666,15 @@
%
%\def\doifprevlevelelse[#1::#2]% beware: this one is \let
% {\dosavesomelevel[#2:0:0:0:0]%
-% \ifalllevels
-% \donetrue
-% \else\ifnum\@@sectiontype=#1
-% \doifinstringelse{=\currentlevel:}{=:#2:}\donetrue\donefalse
+% \ifcase\alltoclevels
+% \ifnum\@@sectiontype=#1
+% \doifinstringelse{=\currentlevel:}{=:#2:}\donetrue\donefalse
+% \else
+% \donefalse
+% \fi
% \else
-% \donefalse
-% \fi\fi
+% \donetrue
+% \fi
% \ifdone
% \expandafter\firstoftwoarguments
% \else
@@ -675,26 +687,73 @@
%
% we want to be able to overload them globally
-% This will be reimplemented
+% This will be reimplemented some day soon
%
% {nn}{xx}{yy}
%
% -> \scan{..}{..}{0} met 0 als sentinel
+% still not perfect
+%
+% \def\doifnextlevelelse[#1]% !! this one is \let / uti seperator --
+% {\edef\somesavedlevel{\sectionseparator\@@filterlevelpart[#1]}%
+% \ifcase\alltoclevels
+% \ifnum\@@sectiontype=\@@filterblockpart[#1]\relax
+% \edef\levelstring{=\sectionseparator\@@filternumberpart[#1]\sectionseparator}%
+% \doifincsnameelse{=\currentlevel\sectionseparator}\levelstring
+% {\doifincsnameelse{=\currentlevel\sectionseparator0}\levelstring
+% \donefalse
+% \donetrue}
+% \donefalse
+% \else
+% \donefalse
+% \fi
+% \else
+% \donetrue
+% \fi
+% \ifdone
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+%
+% \def\doifprevlevelelse[#1]% !! this one is \let / uti seperator --
+% {\edef\somesavedlevel{\sectionseparator\@@filterlevelpart[#1]}%
+% \ifcase\alltoclevels
+% \ifnum\@@sectiontype=\@@filterblockpart[#1]\relax
+% \doifinstringelse
+% {=\currentlevel\sectionseparator}
+% {=\sectionseparator\@@filternumberpart[#1]\sectionseparator}
+% \donetrue\donefalse
+% \else
+% \donefalse
+% \fi
+% \else
+% \donetrue
+% \fi
+% \ifdone
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+
\def\doifnextlevelelse[#1]% !! this one is \let / uti seperator --
{\edef\somesavedlevel{\sectionseparator\@@filterlevelpart[#1]}%
- \ifalllevels
- \donetrue
- \else\ifnum\@@sectiontype=\@@filterblockpart[#1]\relax
- \edef\levelstring{=\sectionseparator\@@filternumberpart[#1]\sectionseparator}%
- \doifincsnameelse{=\currentlevel\sectionseparator}\levelstring
- {\doifincsnameelse{=\currentlevel\sectionseparator0}\levelstring
- \donefalse
- \donetrue}
+ \edef\@@tocsectiontype{\@@filterblockpart[#1]}% needed for nested tocs
+ \ifcase\alltoclevels
+ \ifnum\@@sectiontype=\@@tocsectiontype\relax
+ \edef\levelstring{=\sectionseparator\@@filternumberpart[#1]\sectionseparator}%
+ \doifincsnameelse{=\currentlevel\sectionseparator}\levelstring
+ {\doifincsnameelse{=\currentlevel\sectionseparator0}\levelstring
+ \donefalse
+ \donetrue}
+ \donefalse
+ \else
\donefalse
+ \fi
\else
- \donefalse
- \fi\fi
+ \donetrue
+ \fi
\ifdone
\expandafter\firstoftwoarguments
\else
@@ -703,22 +762,43 @@
\def\doifprevlevelelse[#1]% !! this one is \let / uti seperator --
{\edef\somesavedlevel{\sectionseparator\@@filterlevelpart[#1]}%
- \ifalllevels
- \donetrue
- \else\ifnum\@@sectiontype=\@@filterblockpart[#1]\relax
- \doifinstringelse
- {=\currentlevel\sectionseparator}
- {=\sectionseparator\@@filternumberpart[#1]\sectionseparator}
- \donetrue\donefalse
+ \edef\@@tocsectiontype{\@@filterblockpart[#1]}% needed for nested tocs
+ \ifcase\alltoclevels
+ \ifnum\@@sectiontype=\@@tocsectiontype\relax
+ \doifinstringelse
+ {=\currentlevel\sectionseparator}
+ {=\sectionseparator\@@filternumberpart[#1]\sectionseparator}
+ \donetrue\donefalse
+ \else
+ \donefalse
+ \fi
\else
- \donefalse
- \fi\fi
+ \donetrue
+ \fi
\ifdone
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
+% we need to cover the special case of nested lists in section blocks
+%
+% \starttext
+%
+% \def\ChapterEntry#1#2#3%
+% {chapter : \hbox to \hsize{\strut\bf#2\hss#3}\endgraf\placelist[section]}
+%
+% \startfrontmatter % optional
+% \placelist[chapter][alternative=command,command=\ChapterEntry,criterium=text] \page
+% \stopfrontmatter % optional
+%
+% \startbodymatter % optional
+% \chapter{first} \section{one} test \section{two} test \page
+% \chapter{second} \section{alpha} test \section{beta} test \page
+% \stopbodymatter % optional
+%
+% \stoptext
+
\def\doiftoclevelelse{\doifnextlevelelse}
\def\doifreglevelelse{\doifprevlevelelse}
\def\doifblklevelelse{\doifprevlevelelse}
@@ -1254,6 +1334,8 @@
[ \v!ja=>\verhoognummertrue,
\v!nee=>\verhoognummerfalse,
\v!lijst=>\verhoognummerfalse
+ % beware, since no numbers are used, no nested lists are
+ % possible here
\naarlijsttrue,
\s!unknown=>{\ifx\currentproduct\empty
\findsectionnumber{#1}\commalistelement{#4}%
@@ -1303,7 +1385,7 @@
\resetsectionmarks\@@sectie
\setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}%
\let\fullsectionnumber\writtenfullsectionnumber
- \doschrijfnaarlijst{\@@koppeling}{\someheadconversion}{#4}{\v!kop}}%
+ \doschrijfnaarlijst\@@koppeling\someheadconversion{#4}\v!kop}%
{\dohandleheadnumber\someheadconversion}% handle is new
{#4}
{\marking[#1]{#4}%
@@ -1319,7 +1401,7 @@
\rawreference\s!sec{#2}{{#3}{\asciititle}}%
\resetsectionmarks\@@sectie
\setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}%
- \doschrijfnaarlijst{\@@koppeling}{#3}{#4}{\v!kop}}
+ \doschrijfnaarlijst\@@koppeling{#3}{#4}\v!kop}
{\sectiebloklabel{#1}{\dohandleheadnumber{#3}}}% handle is new
{#4}
{\marking[#1]{#4}%
@@ -1338,7 +1420,7 @@
\rawreference\s!sec{#2}{{#3}{\asciititle}}%
\resetsectionmarks\@@sectie
\setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}%
- \doschrijfnaarlijst{\@@koppeling}{}{#4}{\v!kop}}
+ \doschrijfnaarlijst\@@koppeling{}{#4}\v!kop}
{#4}
{\marking[#1]{#4}%
\doifelsevalue{\??ko#1\c!eigennummer}\v!ja % brrr
@@ -1390,11 +1472,11 @@
\setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}%
\ifkopnummer
\rawreference\s!sec{#2}{{#3}{\asciititle}}%
- \doschrijfnaarlijst{\@@koppeling}{#3}{#4}{\v!kop}%
+ \doschrijfnaarlijst\@@koppeling{#3}{#4}\v!kop
\writesection{#1}{#3}{#4}%
\else
\rawreference\s!sec{#2}{{#3}{\asciititle}}%
- \doschrijfnaarlijst{\@@koppeling}{}{#4}{\v!kop}%
+ \doschrijfnaarlijst\@@koppeling{}{#4}\v!kop
\writesection{#1}{-}{#4}%
\fi
\egroup
@@ -1447,7 +1529,7 @@
\bgroup
\stelkopnummerin[#1][+1]% traag, wordt \getvalue{\c!volgende...}
\setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}%
- \doschrijfnaarlijst{\@@koppeling}{}{#2}{\v!kop}%
+ \doschrijfnaarlijst\@@koppeling{}{#2}\v!kop
\stelkopnummerin[#1][-1]% traag, wordt \getvalue{\c!vorige...}
\egroup
\fi}
@@ -2035,7 +2117,7 @@
\setvalue{#1}%
{\dodoubleempty\dosomekop[#1]}}
-\def\definieerkop%
+\def\definieerkop
{\dodoubleemptywithset\dodefinieerkop}
\def\dosomekop[#1][#2]%
diff --git a/tex/context/base/core-snc.tex b/tex/context/base/core-snc.tex
index 81d310c95..e80fd1613 100644
--- a/tex/context/base/core-snc.tex
+++ b/tex/context/base/core-snc.tex
@@ -15,19 +15,24 @@
\unprotect
+\ifx\s!set \undefined \def\s!set {set} \fi
+\ifx\s!reset \undefined \def\s!reset {reset} \fi
+\ifx\s!preset \undefined \def\s!preset {preset} \fi
+\ifx\s!syncpos\undefined \def\s!syncpos{syncpos} \fi
+
\def\definesyncpositions[#1]%
- {\setcounter{num:syncpos:#1}{0}%
- \doglobal\appendtoksonce\getvalue {reset:sync:#1}\to\resetsyncpositions
- \doglobal\appendtoksonce\getvalue{preset:sync:#1}\to\presetsyncpositions
- \setgvalue{syncpos:#1}{sync_n[#1] := 0 ;}%
- \setgvalue{set:syncpos:#1}{\dosetsyncpositions{#1}}}
+ {\setcounter{\s!num:\s!syncpos:#1}{0}%
+ \doglobal\appendtoksonce\getvalue {\s!reset:\s!syncpos:#1}\to\resetsyncpositions
+ \doglobal\appendtoksonce\getvalue{\s!preset:\s!syncpos:#1}\to\presetsyncpositions
+ \setgvalue{\s!syncpos:#1}{sync_n[#1] := 0 ;}%
+ \setgvalue{\s!set:\s!syncpos:#1}{\dosetsyncpositions{#1}}}
\def\syncposition
{\dodoubleempty\dosyncposition}
\def\dosyncposition[#1][#2]%
- {\letgvalue{reset:sync:#1}\relax
- \letgvalue{preset:sync:#1}\relax
+ {\letgvalue{\s!reset:\s!syncpos:#1}\relax
+ \letgvalue{\s!preset:\s!syncpos:#1}\relax
\dontleavehmode
\dodosyncposition{#1}{#2}\s!set
\ignorespaces}
@@ -36,24 +41,24 @@
{\doifelse{\lastsyncclass\lastsyncposition}{#1#2}}
\def\dodosyncposition#1#2#3%
- {\letgvalue{reset:sync:#1}\relax
- \letgvalue{preset:sync:#1}\relax
- \ifundefined{syncpos:#1}%
+ {\letgvalue{\s!reset:\s!syncpos:#1}\relax
+ \letgvalue{\s!preset:\s!syncpos:#1}\relax
+ \ifundefined{\s!syncpos:#1}%
\strut
\else
- \pluscounter{num:syncpos:#1}%
+ \pluscounter{\s!num:\s!syncpos:#1}%
\setsyncpositions{#1}%
% option: geen w/h, alleen p 0 0 0 data
\setpositionplus
- {sync:#1:\countervalue{num:syncpos:#1}}%
+ {\s!syncpos:#1:\countervalue{\s!num:\s!syncpos:#1}}%
{#2}%
- \hbox{\strut\traceposstring\llap\green{#3/\countervalue{num:syncpos:#1}/#1/#2>>}}%
+ \hbox{\strut\traceposstring\llap\green{#3/\countervalue{\s!num:\s!syncpos:#1}/#1/#2>>}}%
\fi}
\def\setsyncpositions#1%
{\enabletextarearegistration
- \getvalue{set:syncpos:#1}%
- \letgvalue{set:syncpos:#1}\relax}
+ \getvalue {\s!set:\s!syncpos:#1}%
+ \letgvalue{\s!set:\s!syncpos:#1}\relax}
\def\dosetsyncpositions#1%
{\startnointerference % removing out of sync can best be done in mp
@@ -61,9 +66,9 @@
\!!counta\zerocount
\!!countc\zerocount
\doloop
- {\doifpositionelse{sync:#1:\recurselevel}
- {\!!dimenb\MPy{sync:#1:\recurselevel}\relax
- \!!countb\MPp{sync:#1:\recurselevel}\relax
+ {\doifpositionelse{\s!syncpos:#1:\recurselevel}
+ {\!!dimenb\MPy{\s!syncpos:#1:\recurselevel}\relax
+ \!!countb\MPp{\s!syncpos:#1:\recurselevel}\relax
\ifnum\!!countb=\!!counta % same page
\ifdim\!!dimenb>\!!dimena
\donefalse % out of order nodes
@@ -77,40 +82,26 @@
\!!counta\!!countb
\!!dimena\!!dimenb
\advance\!!countc\plusone
- \edef\!!stringc{sync:#1:\the\!!countc}%
- \edef\!!stringa{[#1][\the\!!countc]}%
- %
- % the formal way:
- %
- % \setxvalue{syncpos:#1}%
- % {\getsyncpositions{#1}%
- % sync_p [#1][\the\!!countc] := \MPp \!!stringc ;
- % sync_xy[#1][\the\!!countc] := \MPxy\!!stringc ;
- % sync_w [#1][\the\!!countc] := \MPw \!!stringc ;
- % sync_h [#1][\the\!!countc] := \MPh \!!stringc ;
- % sync_d [#1][\the\!!countc] := \MPd \!!stringc ;
- % sync_t [#1][\the\!!countc] := \MPplus{sync:#1:\recurselevel}{2}{0} ; }%
- %
- % less tokens:
- %
\edef\!!stringa{[#1][\the\!!countc]:=}%
- \setxvalue{syncpos:#1}%
+ \edef\!!stringc{\s!syncpos:#1:\the\!!countc}%
+ \edef\!!stringd{\MPplus\!!stringc{1}{0}}%
+ \setxvalue{\s!syncpos:#1}%
{\getsyncpositions{#1}%
sync_p \!!stringa \MPp \!!stringc ;
sync_xy\!!stringa \MPxy\!!stringc ;
sync_w \!!stringa \MPw \!!stringc ;
sync_h \!!stringa \MPh \!!stringc ;
sync_d \!!stringa \MPd \!!stringc ;
- sync_t \!!stringa \MPplus\!!stringc{1}{0} ; }%
+ \ifx\!!stringd\empty \else sync_t \!!stringa \MPplus\!!stringc{1}{0} ; \fi}%
\fi}
- {\setxvalue{syncpos:#1}%
+ {\setxvalue{\s!syncpos:#1}%
{\getsyncpositions{#1}%
sync_n[#1] := \the\!!countc ;}
\exitloop}}%
\stopnointerference}
\def\getsyncpositions#1%
- {\getvalue{syncpos:#1}}
+ {\getvalue{\s!syncpos:#1}}
\newtoks\resetsyncpositions
\newtoks\presetsyncpositions
@@ -121,10 +112,8 @@
\def\dodoresyncposition #1#2{\dodosyncposition{#1}{#2}\s!reset}
\def\dodopresyncposition#1#2{\dodosyncposition{#1}{#2}\s!preset}
-\def\doresyncposition [#1][#2]{\setxvalue{reset:sync:#1}{\noexpand\dodoresyncposition{#1}{#2}}}
-\def\dopresyncposition[#1][#2]{\setxvalue{preset:sync:#1}{\noexpand\dodopresyncposition{#1}{#2}}}
-
-\ifx\s!preset\undefined \def\s!preset{preset} \fi
+\def\doresyncposition [#1][#2]{\setxvalue{\s!reset:\s!syncpos:#1}{\noexpand\dodoresyncposition{#1}{#2}}}
+\def\dopresyncposition[#1][#2]{\setxvalue{\s!preset:\s!syncpos:#1}{\noexpand\dodopresyncposition{#1}{#2}}}
% \appendtoks \the \resetsyncpositions \to \everypar
% \appendtoks \the\presetsyncpositions \to \everypar
@@ -154,26 +143,39 @@
\protect \endinput
-% \definesyncpositions[1]
-
-% \startuseMPgraphic{sync}
-% StartPage ;
-% \getsyncpositions{1} ;
-% SyncThreshold := 2LineHeight ; % maybe 3
-% SyncLeftOffset := -.5LeftMarginDistance ;
-% SetSyncThreshold(1,3,3LineHeight) ;
-% SyncWidth := - (BackSpace + SyncLeftOffset + 3mm) ;
-% SetSyncColor(1,1,\MPcolor{theorie:middel}) ;
-% SetSyncColor(1,2,\MPcolor{praktijk:middel}) ;
-% SetSyncColor(1,3,\MPcolor{samenvatting:middel}) ;
-% SetSyncColor(1,4,\MPcolor{voorbeeld:middel}) ;
-% PrepareSyncTasks(1,true,true,false) ;
-% for i = 1 upto NOfSyncPaths :
-% fill SyncPaths[i] topenlarged (LineHeight+StrutDepth) bottomenlarged LineHeight withcolor white ;
-% fill SyncPaths[i] topenlarged StrutDepth withcolor TheSyncColor(CurrentSyncClass,sync_t[CurrentSyncClass][SyncTasks[i]]) ;
-% endfor ;
-% setbounds currentpicture to Page ;
-% StopPage ;
-% \stopuseMPgraphic
-
-% \defineoverlay[tempoverlay][\useMPgraphic{sync}] \ No newline at end of file
+\starttext
+
+\setupcolors[state=start]
+
+\definesyncpositions[1]
+
+\startuseMPgraphic{sync}
+ StartPage ;
+ \getsyncpositions{1} ;
+ SyncThreshold := 2LineHeight ;
+ SyncLeftOffset := -.5LeftMarginDistance ;
+ % SetSyncThreshold(1,3,3LineHeight) ;
+ SyncWidth := - (BackSpace + SyncLeftOffset) ;
+ SetSyncColor(1,1,\MPcolor{red}) ;
+ SetSyncColor(1,2,\MPcolor{green}) ;
+ SetSyncColor(1,3,\MPcolor{blue}) ;
+ SetSyncColor(1,4,\MPcolor{yellow}) ;
+ PrepareSyncTasks(1,true,true,false) ;
+ for i = 1 upto NOfSyncPaths :
+ fill SyncPaths[i]
+ withcolor TheSyncColor(CurrentSyncClass,sync_t[CurrentSyncClass][SyncTasks[i]]) ;
+ endfor ;
+ setbounds currentpicture to Page ;
+ StopPage ;
+\stopuseMPgraphic
+
+\defineoverlay[tempoverlay][\useMPgraphic{sync}]
+
+\setupbackgrounds[page][background=tempoverlay]
+
+\syncposition[1][1] \input ward \endgraf
+\syncposition[1][2] \input ward \endgraf
+\syncposition[1][3] \input ward \endgraf
+\syncposition[1][4] \input ward \endgraf
+
+\stoptext \ No newline at end of file
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index 36e8326f2..49887d92b 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -1721,7 +1721,7 @@
\def\setspacingfactor#1\to#2\by#3\\%
{\strutdimen#2\points
\strutdimen#3\strutdimen
- \edef#1{\withoutpt{\the\strutdimen}}}
+ \edef#1{\withoutpt\the\strutdimen}}
\def\spacing#1%
{\ifgridsnapping
diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex
index 81c357dbb..2558e7d6b 100644
--- a/tex/context/base/core-tab.tex
+++ b/tex/context/base/core-tab.tex
@@ -2455,18 +2455,18 @@
{\let\StrutDepthFactor\@@itdiepte}
{\let\StrutDepthFactor\@@tidiepte}%
\scratchdimen\StrutHeightFactor\points \multiply\scratchdimen 10%
- \edef\StrutHeightFactor{\@EA\withoutpt\the\scratchdimen}%
+ \edef\StrutHeightFactor{\withoutpt\the\scratchdimen}%
\scratchdimen\StrutDepthFactor \points \multiply\scratchdimen 10%
- \edef\StrutDepthFactor{\@EA\withoutpt\the\scratchdimen}%
+ \edef\StrutDepthFactor{\withoutpt\the\scratchdimen}%
% units
\NormalTSU{\normalbaselineskip\divide\StrutUnit 12 }%
\NormalTableUnits}
\def\OpenUp#1#2%
{\scratchdimen\StrutHeightFactor \points \advance\scratchdimen #1\points
- \edef\StrutHeightFactor{\@EA\withoutpt\the\scratchdimen}%
+ \edef\StrutHeightFactor{\withoutpt\the\scratchdimen}%
\scratchdimen\StrutDepthFactor \points \advance\scratchdimen #2\points
- \edef\StrutDepthFactor{\@EA\withoutpt\the\scratchdimen}}
+ \edef\StrutDepthFactor{\withoutpt\the\scratchdimen}}
%D As one can see, we didn't only add color, but also more
%D control over spacing.
diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex
index d9fc83ed8..036af687d 100644
--- a/tex/context/base/core-tbl.tex
+++ b/tex/context/base/core-tbl.tex
@@ -66,6 +66,8 @@
% j i<n> skip right of column
% k i<n> skip around column
+% s setups
+
% g g{char} align at char
% . align at .
% , align at ,
@@ -184,9 +186,10 @@
\def\noftabcolumns{16}
-\def\@@tabbox@@ {@@tabbox@}
-\def\@@tabhook@@ {@@tabhook@}
-\def\@@tabalign@@{@@tabalign@}
+\def\@@tabbox@@ {@@tabbox@}
+\def\@@tabhook@@ {@@tabhook@}
+\def\@@tabalign@@ {@@tabalign@}
+\def\@@tabsetups@@{@@tabsetups@}
% \dorecurse\noftabcolumns % quick and dirty stack
% {\@EA\newbox\csname\@@tabbox@@\recurselevel\endcsname}
@@ -230,6 +233,79 @@
\global\let\tabulatehook\dotabulatehook
\fi}
+\def\checktabulatesetups
+ {\getvalue{\@@tabsetups@@\tabulatecolumn}}
+
+% \def\dodosettabulatepreamble#1#2%
+% {\ifzeropt\tabulatewidth
+% \ifcase\tabulatemodus\relax
+% \let\preamblebox\empty
+% \else
+% \def\preamblebox{\autotabulatetrue}%
+% \fi
+% \else
+% \ifcase\tabulatemodus\relax
+% \edef\preamblebox{\hbox to \the\tabulatewidth}%
+% \else
+% \edef\preamblebox{\hsize\the\tabulatewidth}%
+% \fi
+% \fi
+% %
+% % less bytes
+% %
+% %\edef\preamblebox%
+% % {\ifcase\tabulatewidth
+% % \ifcase\tabulatemodus\relax\else\noexpand\autotabulatetrue\fi
+% % \els
+% % \ifcase\tabulatemodus\relax\hbox to\else\hsize\fi\the\tabulatewidth
+% % \fi}%
+% %
+% % 0 = NC column next EQ equal column
+% % 1 = RC column raw RQ equal column raw
+% % 2 = HC column hook HQ equal column hook
+% % some entries can be left out if we test for them being set
+% \@EA\appendtoks \@EA&\@EA\hskip\pretabskip##&\to\!!toksa
+% \appendtoks \ignorespaces\to\!!toksa
+% %\@EA\appendtoks\@EA\xdef\@EA\tabulatecolumn\@EA{\tabulatecolumns}\to\!!toksa
+% \@EA\appendtoks\@EA\xdef\@EA\tabulatecolumn\@EA{\the\tabulatecolumns}\to\!!toksa
+% \appendtoks \checktabulatesetups\to\!!toksa
+% \appendtoks \checktabulatehook\to\!!toksa
+% \@EA\appendtoks \preamblebox\to\!!toksa
+% \appendtoks \bgroup\bbskip\bgroup#1\to\!!toksa
+% \appendtoks\ifnum\tabulatetype=\plusone \else \to\!!toksa
+% \@EA\appendtoks \the\tabulatebmath\to\!!toksa
+% \@EA\appendtoks \the\tabulatefont\to\!!toksa
+% \@EA\appendtoks \the\tabulatesettings\to\!!toksa
+% \@EA\appendtoks \the\tabulatebefore\to\!!toksa
+% \appendtoks\fi \to\!!toksa
+% \appendtoks \bgroup\ignorespaces\to\!!toksa
+% %
+% \appendtoks \tabulatehook##\to\!!toksa
+% %
+% %%\doifdefinedelse{\@@tabalign@@\tabulatecolumns}
+% %\doifdefinedelse{\@@tabalign@@\the\tabulatecolumns}
+% % {\appendtoks\handletabulatecharalign## \to\!!toksa}
+% % {\appendtoks\tabulatehook ##\to \!!toksa}%
+% % waarom kan ik hier geen \xx{##} geven, om een of
+% % andere reden passeert dan tex de hele regel (incl \NC's)
+% % als argument; elke delimiter <> space gaat trouwens fout
+% \appendtoks \unskip\unskip\ifmmode\else\endgraf\fi\egroup\to\!!toksa
+% \appendtoks\ifnum\tabulatetype=1 \else \to\!!toksa
+% \@EA\appendtoks \the\tabulateafter\to\!!toksa
+% \@EA\appendtoks \the\tabulateemath\to\!!toksa
+% \appendtoks\fi \to\!!toksa
+% \appendtoks #2\egroup\egroup\to\!!toksa
+% \@EA\appendtoks \@EA&\@EA\hskip\postabskip##\to\!!toksa
+% \appendtoks\NC\to\tabulatedummy
+% \let\bbskip\empty
+% \def\pretabskip{.5\tabulateunit}%
+% \let\postabskip\pretabskip
+% \let\gettabulateexit\dogettabulateexit
+% \tabulatewidth\zeropoint}
+
+\let\pretabrule \donothing
+\let\posttabrule\donothing
+
\def\dodosettabulatepreamble#1#2%
{\ifzeropt\tabulatewidth
\ifcase\tabulatemodus\relax
@@ -257,10 +333,12 @@
% 0 = NC column next EQ equal column
% 1 = RC column raw RQ equal column raw
% 2 = HC column hook HQ equal column hook
- \@EA\appendtoks \@EA&\@EA\hskip\pretabskip##&\to\!!toksa
+ % some entries can be left out if we test for them being set
+ \@EA\appendtoks \@EA&\@EA\hskip\pretabskip\pretabrule##&\to\!!toksa
\appendtoks \ignorespaces\to\!!toksa
%\@EA\appendtoks\@EA\xdef\@EA\tabulatecolumn\@EA{\tabulatecolumns}\to\!!toksa
\@EA\appendtoks\@EA\xdef\@EA\tabulatecolumn\@EA{\the\tabulatecolumns}\to\!!toksa
+ \appendtoks \checktabulatesetups\to\!!toksa
\appendtoks \checktabulatehook\to\!!toksa
\@EA\appendtoks \preamblebox\to\!!toksa
\appendtoks \bgroup\bbskip\bgroup#1\to\!!toksa
@@ -287,7 +365,7 @@
\@EA\appendtoks \the\tabulateemath\to\!!toksa
\appendtoks\fi \to\!!toksa
\appendtoks #2\egroup\egroup\to\!!toksa
- \@EA\appendtoks \@EA&\@EA\hskip\postabskip##\to\!!toksa
+ \@EA\appendtoks \@EA&\@EA\posttabrule\@EA\hskip\postabskip##\to\!!toksa
\appendtoks\NC\to\tabulatedummy
\let\bbskip\empty
\def\pretabskip{.5\tabulateunit}%
@@ -297,14 +375,15 @@
\def\dosettabulatepreamble
{\ifx\next\relax
- \let\nextnext\relax
+ \let\nextnext\relax % == \expandafter\gobbleoneargument
\else
\let\nextnext\settabulatepreamble
- \ifx x\next \chardef\tabulatealign\zerocount
+ \ifx x\next \chardef\tabulatealign\zerocount % internal
\else\ifx l\next \chardef\tabulatealign\plusone
\else\ifx r\next \chardef\tabulatealign\plustwo
\else\ifx c\next \chardef\tabulatealign\plusthree
\else\ifx p\next \let\nextnext\gettabulateparagraph
+ \else\ifx s\next \let\nextnext\gettabulatesetups
\else\ifx w\next \let\nextnext\gettabulatewidth
\else\ifx f\next \let\nextnext\gettabulatefont
\else\ifx B\next \tabulatefont{\bf}%
@@ -320,7 +399,7 @@
\else\ifx i\next \let\nextnext\gettabulatepreskip
\else\ifx j\next \let\nextnext\gettabulateposskip
\else\ifx k\next \let\nextnext\gettabulatepreposskip
- \else\ifx X\next \let\nextnext\gettabulateexit
+ \else\ifx X\next \let\nextnext\gettabulateexit % internal
\else\ifx e\next \appendtoks\global\tabulateequaltrue\to\tabulatesettings
\else\ifx ~\next \appendtoks\fixedspaces\to\tabulatesettings
\else\ifx g\next \let\nextnext\gettabulatealign
@@ -328,7 +407,7 @@
\else\ifx ,\next \def\nextnext{\gettabulatealign,}%
\else \message{unknown preamble key [\meaning\next]}%
\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
- \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi
+ \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi
\fi
\nextnext}
@@ -362,6 +441,10 @@
\let\gettabulateexit\settabulatepreamble
\@EA\settabulatepreamble\next}
+\def\gettabulatesetups#1%
+ {\setvalue{\@@tabsetups@@\the\tabulatecolumns}{\setups[#1]}%
+ \settabulatepreamble}
+
\def\gettabulatehook#1%
{\setvalue{\@@tabhook@@\the\tabulatecolumns}{#1}%
\settabulatepreamble}
@@ -454,6 +537,7 @@
\tabulatefont \emptytoks
\tabulatesettings\emptytoks
\global\advance\tabulatecolumns\plusone
+ \letvalue{\@@tabsetups@@\the\tabulatecolumns}\donothing
\settabulatepreamble#1\relax\relax % permits i without n
\ifcase\tabulatemodus\relax
\ifcase\tabulatealign\relax
@@ -496,8 +580,8 @@
\dp\tabulatebox\strutdp
\box\tabulatebox}
-\def\dotabulatehook {\getvalue{\@@tabhook@@ \tabulatecolumn}}
-\def\dotabulatealign{\getvalue{\@@tabalign@@\tabulatecolumn}}
+\def\dotabulatehook {\getvalue{\@@tabhook@@ \tabulatecolumn}}
+\def\dotabulatealign {\getvalue{\@@tabalign@@ \tabulatecolumn}}
\def\resettabulatepheight
{\globallet\tabulateminplines\!!plusone
@@ -1348,19 +1432,52 @@
\let\minusnoftabulatelines\noftabulatelines
\decrement\minusnoftabulatelines
\doglobal\newcounter\noftabulatelines
- \def\doHL##1%
+% not satisfying
+% \def\doHL##1%
+% {\TABLEnoalign
+% {\ifnum\noftabulatelines=\zerocount
+% \ifcase##1%
+% \@EAEAEA\ML
+% \or
+% \@EAEAEA\FL
+% \fi
+% \else\ifnum\noftabulatelines=\totalnoftabulatelines
+% \ifcase##1%
+% \@EA\@EAEAEA\@EA\ML
+% \or
+% \@EA\@EAEAEA\@EA\LL
+% \fi
+% \else
+% \@EAEAEA\ML
+% \fi\fi}}%
+% not good either
+% \def\doHL##1%
+% {\TABLEnoalign
+% {\csname\ifnum\noftabulatelines=\zerocount
+% \ifcase##1M\or F\fi
+% \else\ifnum\noftabulatelines=\totalnoftabulatelines
+% \ifcase##1M\or L\fi
+% \else
+% M%
+% \fi\fi L\endcsname}}%
+% ok
+% \def\doHL##1% ##1 ignored
+% {\TABLEnoalign
+% {\ifnum\noftabulatelines=\zerocount
+% \@EA\FL
+% \else\ifnum\noftabulatelines=\totalnoftabulatelines
+% \@EAEAEA\LL
+% \else
+% \@EAEAEA\ML
+% \fi\fi}}%
+% more fun
+ \def\doHL##1% ##1 ignored
{\TABLEnoalign
- {\ifnum\noftabulatelines=\zerocount
- \ifcase##1\or
- \@EAEAEA\FL
- \fi
- \else\ifnum\noftabulatelines=\totalnoftabulatelines
- \ifcase##1\or
- \@EA\@EAEAEA\@EA\LL
- \fi
- \else
- \@EAEAEA\ML
- \fi\fi}}%
+ {\csname
+ \ifnum\noftabulatelines=\zerocount F\else
+ \ifnum\noftabulatelines=\totalnoftabulatelines L\else
+ M\fi\fi
+ L\endcsname}}%
\def\doHR##1% horizontal rule line (break untested)
{\TABLEnoalign
{\globallet\TABLEautoline\dotabulatelinerule
diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex
index 1cc72ee50..7f8c44030 100644
--- a/tex/context/base/core-var.tex
+++ b/tex/context/base/core-var.tex
@@ -23,6 +23,7 @@
\newevery \everyshipout \relax
\newevery \everybeforeshipout \relax
\newevery \everyaftershipout \relax
+\newevery \everyfirstshipout \relax
\newevery \everylastshipout \relax
\newevery \everybye \relax
\newevery \everygoodbye \relax
@@ -154,7 +155,7 @@
\fi
%D \macros
-%D {setvariables,getvariable}
+%D {setvariables,getvariable,getvariabledefault}
%D
%D \starttyping
%D \setvariables[xx][titel=]
@@ -178,7 +179,9 @@
\def\dosetvariables[#1][#2][#3]%
{\errorisfataltrue
\def\currentvariableclass{#2}%
+ \getvariable{#2}\s!reset
#1[\??vars:#2:][#3]%
+ \getvariable{#2}\s!set
\errorisfatalfalse}
\beginTEX
@@ -204,6 +207,50 @@
\let\currentvariableclass\empty
+%D \macros
+%D {doifelsevariable,doifvariable,doifnotvariable}
+%D
+%D A few trivial macros:
+
+\def\doifelsevariable#1#2%
+ {\ifundefined{\??vars:#1:#2}%
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+\def\doifvariable#1#2%
+ {\ifundefined{\??vars:#1:#2}%
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\def\doifnotvariable#1#2%
+ {\ifundefined{\??vars:#1:#2}%
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\getvariabledefault#1#2% #3%
+ {\executeifdefined{\??vars:#1:#2}}% {#3}
+
+%D \macros
+%D {checkvariables}
+%D
+%D I'll probably forget that this on exists.
+
+\def\checkvariables
+ {\dodoubleargument\docheckvariables}
+
+\def\docheckvariables
+ {\dogetparameters\docheckrawvalue}
+
+\def\docheckrawvalue#1#2#3%
+ {\doifundefined {\??vars:#1:#2}{\setvalue{\??vars:#1:#2}{#3}}
+ {\doifvaluenothing{\??vars:#1:#2}{\setvalue{\??vars:#1:#2}{#3}}}}
+
%D We store some original meanings, maybe in \type
%D {math-ini}.
diff --git a/tex/context/base/docs-ini.tex b/tex/context/base/docs-ini.tex
deleted file mode 100644
index 7209db8f9..000000000
--- a/tex/context/base/docs-ini.tex
+++ /dev/null
@@ -1,40 +0,0 @@
-%D \module
-%D [ file=docs-ini,
-%D versie=1995.10.10,
-%D naam=\CONTEXT\ Document Macros (ini),
-%D auteur=J. Hagen,
-%D datum=\currentdate,
-%D copyright=J. Hagen]
-
-\writestatus{loading}{Context Document Macros (ini)}
-
-\unprotect
-
-%I n=Documenten
-%I c=\startdocument
-%I
-%I Ten behoeve van veel voorkomende soorten documenten
-%I zijn speciale commando's beschikbaar. Bij dergelijke
-%I documenten worden in plaats van de gebruikelijke
-%I commando's \starttekst..\stoptekst de onderstaande
-%I commando's gebruikt:
-%I
-%I \startdocument[soort document]
-%I \stopdocument
-%I
-%I Documenten worden gedefinieerd in files met de naam
-%I docs-xxx, waarbij xxx de eerste drie letters van het
-%I soort overzicht zijn.
-%I
-%I Vooralsnog zijn alleen 'brief', 'sheet', 'sticker' en
-%I 'lijst' beschikbaar.
-
-\definieerfilegroep
- [document]
- [file=docs,
- voor=\starttekst,
- na=\stoptekst]
-
-\protect
-
-\endinput
diff --git a/tex/context/base/enco-mis.tex b/tex/context/base/enco-mis.tex
index 152e78542..6c312a804 100644
--- a/tex/context/base/enco-mis.tex
+++ b/tex/context/base/enco-mis.tex
@@ -8,16 +8,16 @@
%D copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-%D In this file we collect some definitions that construct
-%D pseudo characters. Some day we will move some definitions
-%D from \type {plain.tex} to this file. Some definitions are
-%D derived from definitions in the \LATEX\ distribution,
-%D especially Johannes Braams' Babel system.
+%D In this file we collect some definitions that construct
+%D pseudo characters. Some day we will move some definitions
+%D from \type {plain.tex} to this file. Some definitions are
+%D derived from definitions in the \LATEX\ distribution,
+%D especially Johannes Braams' Babel system.
-\startmapping[\s!default]
+\startmapping[\s!default]
\defineuppercasecom \dj \DJ
\defineuppercasecom \Dj \dj
@@ -26,7 +26,7 @@
\definecharacter dstroke {\pseudoencodeddj}
\definecharacter Dstroke {\pseudoencodedDJ}
-\stopmapping
+\stopmapping
%D We need proper names like in enco-com.tex!
@@ -34,53 +34,53 @@
\definecharacter Dj {\Dstroke} % {\pseudoencodedDJ}
\definecharacter DJ {\Dstroke} % {\pseudoencodedDJ}
-\unprotect
+\unprotect
-% \def\pseudoencodeddj % like in babel
+% \def\pseudoencodeddj % like in babel
% {\leavevmode\hbox\bgroup
% \setbox0\hbox{d}%
% \dimen0=\ht0
% \advance\dimen0 1ex
% \dimen0=.45\dimen0
-% \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0
+% \dimen2=\withoutpt\the\fontdimen1\font\dimen0
% \advance\dimen2 .5ex
% \rlap{\raise\dimen0\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}%
% \box0
% \egroup}
-%
-% \def\pseudoencodedDJ % like in babel
+%
+% \def\pseudoencodedDJ % like in babel
% {\leavevmode
% \hbox\bgroup
% \setbox0\hbox{D}%
% \dimen0=.55\ht0
-% \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0
-% \advance\dimen2 .15ex
-% \advance\dimen2 -.15\fontdimen7\font
+% \dimen2=\withoutpt\the\fontdimen1\font\dimen0
+% \advance\dimen2 .15ex
+% \advance\dimen2 -.15\fontdimen7\font
% \rlap{\raise\dimen0\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.33em}}}%
% \box0
% \egroup}
-\def\pseudoencodeddj % like in babel, but safer
+\def\pseudoencodeddj % like in babel, but safer
{\leavevmode\hbox\bgroup
\setbox\scratchbox\hbox{d}%
\scratchdimen\ht\scratchbox
\advance\scratchdimen 1ex
\scratchdimen.45\scratchdimen
- \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0
+ \dimen2=\withoutpt\the\fontdimen1\font\dimen0
\advance\dimen2 .5ex
\hbox to \wd\scratchbox
{\box\scratchbox\hss
\raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}%
\egroup}
-\def\pseudoencodedDJ % like in babel, but safer
+\def\pseudoencodedDJ % like in babel, but safer
{\leavevmode
\hbox\bgroup
\setbox\scratchbox\hbox{D}%
\scratchdimen.55\ht\scratchbox
- \dimen2\expandafter\withoutpt\the\fontdimen1\font\scratchdimen
- \advance\dimen2 .15ex
- \advance\dimen2 -.15\fontdimen7\font
+ \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}}}%
@@ -88,7 +88,7 @@
% currency
-\def\fakedollar % pretty cmr dependent
+\def\fakedollar % pretty cmr dependent
{\bgroup
\ifnum\fam=\itfam
\sl
@@ -98,7 +98,7 @@
\$%
\egroup}
-\def\fakesterling % pretty cmr dependent
+\def\fakesterling % pretty cmr dependent
{\bgroup
\ifnum\fam=\bffam
\bi
@@ -145,7 +145,7 @@
\hss}%
\egroup}
-% guillemots
+% guillemots
%D Yes I know, they are ugly:
@@ -161,7 +161,7 @@
\def\fakerightsubguillemot
{\hbox{\raise.25ex\hbox{$\scriptscriptstyle>$}}}
-%D Needed:
+%D Needed:
\def\fakevisiblespace
{\leavevmode\hbox
@@ -169,29 +169,29 @@
\scratchdimen.1\dp\scratchbox
\setbox\scratchbox\hbox{\space}%
\hbox to \wd\scratchbox
- {\vrule
+ {\vrule
\!!depth 5\scratchdimen
- \!!width \scratchdimen
+ \!!width \scratchdimen
\!!height \zeropoint
\hss
- \vrule
+ \vrule
\!!depth 5\scratchdimen
\!!width \wd\scratchbox
\!!height-4\scratchdimen
\hss
- \vrule
+ \vrule
\!!depth 5\scratchdimen
- \!!width \scratchdimen
+ \!!width \scratchdimen
\!!height \zeropoint}}}
-%\def\fakeunderscore{\leavevmode\kern.06em\vbox{\hrule\!!width.3em}}
+%\def\fakeunderscore{\leavevmode\kern.06em\vbox{\hrule\!!width.3em}}
\def\fakeunderscore
{\leavevmode\hbox
{\setbox\scratchbox\hbox{(}%
\scratchdimen.2\dp\scratchbox
\setbox\scratchbox\hbox{\space}%
- \vrule
+ \vrule
\!!depth \scratchdimen
\!!width \wd\scratchbox
\!!height\zeropoint}}
@@ -201,8 +201,8 @@
\def\_{\ifmmode\mathunderscore\else\textunderscore\fi}
-%D Handy:
+%D Handy:
\def\missingglyph{\ruledhbox{?}}
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index a6acf4c09..1c12964dc 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -89,7 +89,10 @@
% {\one \bf test \two test}
% {\one \bf test \pushcurrentfont \two \popcurrentfont test}
-% new
+%D \macros
+%D {definedfont,startfont,doiffontcharelse}
+%D
+%D A couple of relatively new macros:
\newevery \everydefinedfont \relax
@@ -106,6 +109,15 @@
\def\stopfont
{\egroup}
+
+\def\doiffontcharelse#1#2%
+ {\bgroup
+ \definedfont[#1]%
+ \iffontchar\font#2\relax
+ \egroup\expandafter\firstoftwoarguments
+ \else
+ \egroup\expandafter\secondoftwoarguments
+ \fi}
%%% message 14 added
@@ -2519,7 +2531,7 @@
\readsysfile{\truefilename{\f!fontprefix#2}}
{\showmessage\m!fonts2{#2}}
{\makeshortfilename[\truefilename{\f!fontprefix#2}]%
- \readsysfile{\shortfilename}
+ \readsysfile\shortfilename
{\showmessage\m!fonts2{#2}}
{\showmessage\m!fonts3{#2}}}%
\stopreadingfile}}
diff --git a/tex/context/base/font-run.tex b/tex/context/base/font-run.tex
index 3a1c3be3c..1b2471a59 100644
--- a/tex/context/base/font-run.tex
+++ b/tex/context/base/font-run.tex
@@ -319,8 +319,8 @@
\gdef\showcharratio
{\dowithnextboxcontent
{\switchtobodyfont[10pt]}%
- {(\expanded{\withoutpt{\the\nextboxht}},%
- \expanded{\withoutpt{\the\nextboxdp}})}%
+ {(\expanded{\withoutpt\the\nextboxht},%
+ \expanded{\withoutpt\the\nextboxdp})}%
\hbox}
\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/java-fld.tex b/tex/context/base/java-fld.tex
index 5ef34bd58..aad157dd7 100644
--- a/tex/context/base/java-fld.tex
+++ b/tex/context/base/java-fld.tex
@@ -127,17 +127,18 @@
event.value = Sanitized_TeX_String(event.value) ;
\stopJScode
-%\startJSpreamble {Do_With_Field} used now
-
\startJSpreamble {Field} used now
-function PresetFields ()
- { this.syncAnnotScan() }
-
var visible_field = new Array() ; % no garbage collection !
var visible_fields = 0 ;
-function Hide_When_Down ()
+function PresetFields ( )
+ { this.syncAnnotScan() }
+
+function Preset_Fields ( )
+ { this.syncAnnotScan() }
+
+function Hide_When_Down ( )
{ event.target.hidden = true }
% { event.target.display = display.hidden }
@@ -226,6 +227,9 @@ function Flip_Fields ( Name )
function Forget_Changes ()
{ this.dirty = false }
+function ForgetChanges ()
+ { this.dirty = false }
+
\stopJSpreamble
%\startJScode{Hide_When_Down} Hide_When_Down() \stopJScode
diff --git a/tex/context/base/java-ini.tex b/tex/context/base/java-ini.tex
index 7fdef5345..f9cd778af 100644
--- a/tex/context/base/java-ini.tex
+++ b/tex/context/base/java-ini.tex
@@ -8,22 +8,22 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context JavaScript Macros / Initialization}
-% BUG: preamble zonder used/used en split
+% BUG: preamble zonder used/used en split
% JavaScript support is under development. In the near future
-% a slightly different model will be used. The JScode stuff
-% will probably become just auto function inclusion and the
-% JS_* things will disappear. First I have to find a way to
+% a slightly different model will be used. The JScode stuff
+% will probably become just auto function inclusion and the
+% JS_* things will disappear. First I have to find a way to
% deal with global variables so the 'uses' thing will remain.
% ook p{ref}
% documentation should be corrected to JS(
-
+
% Also, obeylines will be supported.
\unprotect
@@ -31,7 +31,7 @@
%D \JAVA\ support is not implemented as a generic support
%D module. The main reason for this is that passing system
%D variables to a \JAVASCRIPT\ is closely related to other core
-%D macros. First some messages:
+%D macros. First some messages:
\startmessages dutch library: javascript
title: javascript
@@ -76,7 +76,7 @@
\stopmessages
%D \TEX\ is not the right tool to check the \JAVA\ code; the
-%D most we can do is reporting some passed variables:
+%D most we can do is reporting some passed variables:
\newif\iftraceJScode \traceJScodefalse
@@ -86,11 +86,11 @@
\bgroup
\catcode127=\@@letter
-\gdef\delcharacter{^^7f}
+\gdef\delcharacter{^^7f}
\egroup
%D The number of passed variables is minimalized by setting the
-%D next switch.
+%D next switch.
\newif\ifminimalizeJScode \minimalizeJScodetrue
@@ -100,108 +100,108 @@
%D Because \JAVASCRIPT's are activated by the user, for
%D instance by activating on a button, their support is closely
%D related to the referencing mechanism. Integration takes
-%D place by
-%D
+%D place by
+%D
%D \starttypen
%D \naar{calculate total}[Sum()]
%D \stoptypen
-%D
+%D
%D The \type{()} classify this as a script. If they are absent,
-%D the keyword is treated as a normal reference.
-%D
+%D the keyword is treated as a normal reference.
+%D
%D One can pass arguments to such a script by saying:
-%D
+%D
%D \starttypen
%D \naar{calculate total}[Sum(1.5,2.3)]
%D \stoptypen
-%D
-%D References are passed by using the \type{R{}} classifier.
-%D
+%D
+%D References are passed by using the \type{R{}} classifier.
+%D
%D \starttypen
%D \naar{calculate total}[Sum(1.5,2.3,R{overflow})]
%D \stoptypen
-%D
+%D
%D The last call calls the script \type{Sum} and passes the
-%D next set of variables:
-%D
+%D next set of variables:
+%D
%D \starttypen
%D JS_S_1="1.5";
%D JS_S_2="2.3";
%D JS_R_3="overflow";
%D JS_P_3=3;
%D \stoptypen
-%D
+%D
%D The first two parameters are just strings, the third one
%D however is treated as a reference and results in passing the
%D reference (if needed this references is prefixed) and the
-%D (real) page number. The alternative:
-%D
+%D (real) page number. The alternative:
+%D
%D \starttypen
%D \naar{calculate total}[JS(Sum{V{1.5},V{2.3},R{overflow}})]
%D \stoptypen
-%D
+%D
%D does a verbose passing:
-%D
+%D
%D \starttypen
%D JS_V_1=1.5;
%D JS_V_2=2.3;
%D JS_R_3="overflow";
%D JS_P_3=3;
%D \stoptypen
-% %D
-% %D Finally we have a counter that tells\JAVA\ how many
+% %D
+% %D Finally we have a counter that tells\JAVA\ how many
% %D arguments were passed,
% %D
% %D \starttypen
% %D JS_N
% %D \stoptypen
-%D We will also support direct function calls. In that case
-%D no intermediate variables are used.
+%D We will also support direct function calls. In that case
+%D no intermediate variables are used.
%D \macros
%D {startJScode}
%D
%D A piece of \JAVASCRIPT\ code is defined by saying:
-%D
+%D
%D \starttypen
%D \startJScode{SomeScript}
-%D var Item=this.getField("item");
+%D var Item=this.getField("item");
%D N=Item.getArray();
-%D Total=this.getField("total");
+%D Total=this.getField("total");
%D Total.value=0;
%D for (j=0; j<N.length; j++)
%D { if (N[j].value!="")
%D { Total.value += N[j].value } } ;
-%D if ((JS_N>0) && (JS_R_1!=""))
+%D if ((JS_N>0) && (JS_R_1!=""))
%D { gotoNamedDest(JS_R_1) };
%D \stopJScode
%D \stoptypen
-%D
+%D
%D Such a piece of code is closely related to the interpreter
%D used. Watch the last two lines, here the script adapts
-%D itself to the presence of a reference.
+%D itself to the presence of a reference.
%D
-%D While
+%D While
%D
%D \starttypen
-%D \startJScode{name}
+%D \startJScode{name}
%D name = 4 ;
-%D \stopJScode
+%D \stopJScode
%D \stoptypen
%D
-%D assumes uses no preamble or presumes that the preamble is
-%D always loaded, the next definition also tells \CONTEXT\ to
-%D actually include the preamble needed.
+%D assumes uses no preamble or presumes that the preamble is
+%D always loaded, the next definition also tells \CONTEXT\ to
+%D actually include the preamble needed.
%D
%D \starttypen
-%D \startJScode{uses} uses {later}
+%D \startJScode{uses} uses {later}
%D uses = 6 ;
-%D \stopJScode
+%D \stopJScode
%D \stoptypen
-\long\def\startJScode#1 #2
- {\doifelse{#2}{uses}
+\long\def\startJScode#1 #2
+ {\doifelse{#2}{uses}
{\dostartJScodeA{#1}}
{\dostartJScodeB{#1} #2 }}
@@ -216,22 +216,22 @@
%D \macros
%D {presetJScode}
%D
-%D The code can be retrieved by saying
-%D
+%D The code can be retrieved by saying
+%D
%D \starttypen
%D \presetJScode{SomeScript}{template}
%D \stoptypen
-%D
-%D Such a template is a comma separated list, where
-%D individual entries can optionally be transformed by
-%D \type{R{}} and \type{V{}}.
%D
-%D After this call, the code is available in \type{\JScode}.
+%D Such a template is a comma separated list, where
+%D individual entries can optionally be transformed by
+%D \type{R{}} and \type{V{}}.
+%D
+%D After this call, the code is available in \type{\JScode}.
\def\setverbosecscharacter#1%
{\edef#1{\string#1}}
-\def\setverbosecscharacters % temporary hack
+\def\setverbosecscharacters % temporary hack
{\setverbosecscharacter |\setverbosecscharacter ~%
\setverbosecscharacter\:\setverbosecscharacter\;%
\setverbosecscharacter\+\setverbosecscharacter\-%
@@ -243,14 +243,14 @@
\setverbosecscharacter\4\setverbosecscharacter\5%
\setverbosecscharacter\6\setverbosecscharacter\7%
\setverbosecscharacter\8\setverbosecscharacter\9%
- \setverbosecscharacter\n\setverbosecscharacter\s%
+ \setverbosecscharacter\n\setverbosecscharacter\s%
\setverbosecscharacter\/}
\newif\ifdirectJScode
\def\presetJScode#1#2% #1=operation #2=arguments
{\setverbosecscharacters
- \def\par{\delcharacter}% was: { }
+ \def\par{\delcharacter}% was: { }
\scratchcounter\zerocount
\globallet\JScode\empty
\def\do##1##2%
@@ -278,16 +278,16 @@
\dodopresetJSvariables#1\end}%
\def\dodopresetJSvariables
- {\doifnextcharelse{R}\dodopresetJSrefvariables
- {\doifnextcharelse{V}\dodopresetJSvervariables
- {\doifnextcharelse{S}\dodopresetJSstrvariables
- \dodopresetJSrawvariables}}}
+ {\doifnextcharelse R\dodopresetJSrefvariables
+ {\doifnextcharelse V\dodopresetJSvervariables
+ {\doifnextcharelse S\dodopresetJSstrvariables
+ \dodopresetJSrawvariables}}}
\def\dodopresetJSrefvariables R#1\end
{\doifreferencefoundelse{#1}
{\donetrue \dododopresetJSvariables R{\referenceprefix#1}%
\donefalse\dododopresetJSvariables P{\currentrealreference}}
- {\unknownreference{#1}}%
+ {\unknownreference{#1}}%
\ifminimalizeJScode \else
\donetrue\dododopresetJSvariables S{#1}%
\fi}
@@ -297,13 +297,13 @@
\ifminimalizeJScode \else
\donetrue\dododopresetJSvariables S{#1}%
\fi}
-
+
\def\dodopresetJSstrvariables S#1\end
{\donetrue\dododopresetJSvariables S{#1}}
\def\dodopresetJSrawvariables #1\end
{\donetrue\dododopresetJSvariables S{#1}}
-
+
\def\JSprefix#1%
{JS\string_#1\string_\the\scratchcounter}
@@ -320,35 +320,35 @@
%D \macros
%D {startJSpreamble, flushJSpreamble}
-%D
+%D
%D One can define insert \JAVASCRIPT\ code at the document level
%D by using:
-%D
+%D
%D \starttypen
-%D \startJSpreamble{oeps}
+%D \startJSpreamble{oeps}
%D oeps = 1 ;
-%D \stopJSpreamble
+%D \stopJSpreamble
%D \stoptypen
-%D
-%D which is the same as:
+%D
+%D which is the same as:
%D
%D \starttypen
-%D \startJSpreamble{now} used now
-%D now = 2 ;
-%D \stopJSpreamble
+%D \startJSpreamble{now} used now
+%D now = 2 ;
+%D \stopJSpreamble
%D \stoptypen
-%D
-%D while the next definition is only included when actually
+%D
+%D while the next definition is only included when actually
%D used.
%D
%D \starttypen
-%D \startJSpreamble{later} used later
-%D later = 3 ;
-%D \stopJSpreamble
+%D \startJSpreamble{later} used later
+%D later = 3 ;
+%D \stopJSpreamble
%D \stoptypen
-%D
-%D This command may be used more that once, but always before
-%D the first page is shipped out.
+%D
+%D This command may be used more that once, but always before
+%D the first page is shipped out.
\newif\ifoneJSpreamble \oneJSpreambletrue
@@ -357,7 +357,7 @@
\newcounter\currentJSpreamble
\long\def\startJSpreamble#1 #2 %
- {\bgroup % we need to restore the catcodes
+ {\bgroup % we need to restore the catcodes
\popendofline % just in case it happens while reading lists
\doifelse{#2}{used}
{\dostartJSpreamble#1 }
@@ -365,7 +365,7 @@
\long\def\dostartJSpreamble#1 #2 #3\stopJSpreamble
{\processaction
- [#2]
+ [#2]
[ later=>\chardef\JSstatus\zerocount,%
now=>\chardef\JSstatus\plusone ,%
\s!default=>\chardef\JSstatus\plustwo ,%
@@ -374,15 +374,15 @@
\long\setgvalue{\r!java\r!java#1}{#3}%
\ifcase\JSstatus \else
\useJSpreamblenow{#1}%
- \fi
+ \fi
\egroup}
-%D \macros
+%D \macros
%D {setJSpreamble, addtoJSpreamble}
-%D
-%D In addition to the previous preamble definitions, we can
-%D set a preamble \citeer {in||line} and add tokens to a
-%D preamble.
+%D
+%D In addition to the previous preamble definitions, we can
+%D set a preamble \citeer {in||line} and add tokens to a
+%D preamble.
\def\setJSpreamble#1#2%
{\doifundefined{\r!java\r!java#1}
@@ -393,22 +393,22 @@
\def\addtoJSpreamble#1#2%
{\doifdefinedelse{\r!java\r!java#1}
{\edef\!!stringa{\r!java\r!java#1}%
- \edef\!!stringb{\csname\!!stringa\endcsname}%
+ \edef\!!stringb{\csname\!!stringa\endcsname}%
\@EA\setgvalue\@EA\!!stringa\@EA{\!!stringb #2;}}
{\setJSpreamble{#1}{#2}}}
-%D \macros
+%D \macros
%D {useJSpreamblenow}
%D
%D The next macro can be used to force inclusion of postponed
-%D \JAVASCRIPT\ preambles.
+%D \JAVASCRIPT\ preambles.
\def\useJSpreamblenow#1%
{\doglobal\increment\currentJSpreamble
\doglobal\addtocommalist{#1}\allJSpreambles}
-%D Because we want to check for valid calls, we preload the
-%D functions. This means that we can call them directly as
+%D Because we want to check for valid calls, we preload the
+%D functions. This means that we can call them directly as
%D well as indirectly when defined by \type {\startJScode} etc.
\long\def\presetJSfunctions#1function #2(#3)%
@@ -425,18 +425,17 @@
{\ifx\allJSpreambles\empty\else
\bgroup
\setverbosecscharacters
- \def\par{\delcharacter}% was: { }
+ \def\par{\delcharacter}% was: { }
\globallet\JSpreamble\empty
\def\@@collectedJSpreamble{\r!java\r!java collected}%
\letvalue{\@@collectedJSpreamble}=\empty
\def\docommando##1%
{\xdef\JScode{\getvalue{\r!java\r!java##1}}%
- \ifoneJSpreamble
+ \ifoneJSpreamble % \global\letcdcsname
\@EA\setxvalue\@EA\@@collectedJSpreamble\@EA
{\csname\@@collectedJSpreamble\endcsname\JScode}%
\else
- \setxvalue{\r!java\r!java##1}%
- {\JScode}%
+ \setxvalue{\r!java\r!java##1}{\JScode}%
\fi}%
\processcommacommand[\allJSpreambles]\docommando
\ifoneJSpreamble
@@ -468,19 +467,19 @@
\fi}
\prependtoks \flushJSpreamble \to \everyshipout
-\prependtoks \finalflushJSpreamble \to \everylastshipout
+\prependtoks \finalflushJSpreamble \to \everylastshipout
%D \macros
%D {doPSsanitizeJScode}
-%D
+%D
%D Before the code can be passed to the (\POSTSCRIPT\ or \PDF)
%D output file, some precautions must be made concerning the
-%D use of \type{(} and~\type{)}. Here we use a beautiful
-%D \type{\aftergroup} trick I discovered in the \TABLE\ format.
+%D use of \type{(} and~\type{)}. Here we use a beautiful
+%D \type{\aftergroup} trick I discovered in the \TABLE\ format.
-\def\doPSsanitizeJScode#1\to#2%
+\def\doPSsanitizeJScode#1\to#2%
{\begingroup
- \scratchcounter\zerocount % \aftergroup counter
+ \scratchcounter\zerocount % \aftergroup counter
\aftergroup\xdef
\aftergroup#2%
\aftergroup{%
@@ -493,25 +492,25 @@
\fi}
%D I started with:
-%D
+%D
%D \starttypen
-%D \def\dodoPSsanitizeJScode#1%
+%D \def\dodoPSsanitizeJScode#1%
%D {\aftergroup\string
%D \if#1(%
%D \expandafter\aftergroup\csname#1\endcsname
%D \else\if#1)%
%D \expandafter\aftergroup\csname#1\endcsname
%D \else\if#1;%
-%D \aftergroup;\aftergroup\string\expandafter\aftergroup\
+%D \aftergroup;\aftergroup\string\expandafter\aftergroup\
%D \else
%D \expandafter\aftergroup#1%
%D \fi\fi\fi
%D \advance\scratchcounter by 1
-%D \ifnum\scratchcounter=500
+%D \ifnum\scratchcounter=500
%D \expandafter\dododoPSsanitizeJScode
%D \fi}
%D \stoptypen
-%D
+%D
%D For pretty printing purposes, we need some way to signal
%D \TEX\ macros. Therefore we introduce a special keyword
%D \type{TEX}. When followed by a space, this keyword is
@@ -520,7 +519,7 @@
\chardef\JSisTEX =0
\chardef\JScomment=0
-\newif\ifaddJSlinebreaks
+\newif\ifaddJSlinebreaks
\def\flushJSisTEX
{\ifcase\JSisTEX
@@ -540,25 +539,25 @@
\ifnum\JScomment=0
\chardef\JScomment\plusone
\else\ifnum\JScomment=1
- \chardef\JScomment\plustwo
+ \chardef\JScomment\plustwo
\fi\fi
\else
\ifnum\JScomment=1
\aftergroup/%
- \chardef\JScomment\zerocount
+ \chardef\JScomment\zerocount
\fi
\ifnum\JScomment=2
\if#1\delcharacter
- \chardef\JScomment\zerocount
- \fi
+ \chardef\JScomment\zerocount
+ \fi
\else
- \if#1\delcharacter
+ \if#1\delcharacter
\flushJSisTEX\doJSlinebreak
\else\if#1(%
\flushJSisTEX\aftergroup\string\expandafter\aftergroup\csname#1\endcsname
\else\if#1)%
\flushJSisTEX\aftergroup\string\expandafter\aftergroup\csname#1\endcsname
- \else\if#1;%
+ \else\if#1;%
\flushJSisTEX\aftergroup;\doJSlinebreak
\else\if#1T%
\ifnum\JSisTEX=0 \chardef\JSisTEX\plusone \else\flushJSisTEX\aftergroup T\fi
@@ -567,7 +566,7 @@
\else\if#1X%
\ifnum\JSisTEX=2 \chardef\JSisTEX\plusthree \else\flushJSisTEX\aftergroup X\fi
\else\if#1\normalspace
- \ifnum\JSisTEX=3 \chardef\JSisTEX\zerocount \else\flushJSisTEX\aftergroup#1\fi
+ \ifnum\JSisTEX=3 \chardef\JSisTEX\zerocount \else\flushJSisTEX\aftergroup#1\fi
\else
\flushJSisTEX\aftergroup\string\expandafter\aftergroup#1%
\fi\fi\fi\fi\fi\fi\fi\fi
@@ -575,13 +574,13 @@
\fi
\dododoPSsanitizeJScode}
-%D Close reading learns that one line comments (\type{// ...})
-%D are removed from the stream. This permits switching in
-%D pretty printing \JAVASCRIPT\ sources as well as saves
-%D some bytes.
+%D Close reading learns that one line comments (\type{// ...})
+%D are removed from the stream. This permits switching in
+%D pretty printing \JAVASCRIPT\ sources as well as saves
+%D some bytes.
-%D The magic 500 in the next hack prevents the input stack from
-%D overflowing when large scripts are sanitized.
+%D The magic 500 in the next hack prevents the input stack from
+%D overflowing when large scripts are sanitized.
%\beginTEX
@@ -589,8 +588,8 @@
{\ifcase\JSisTEX\ifcase\JScomment
\advance\scratchcounter \plusone
\fi\fi
- \ifnum\scratchcounter=500
- \expandafter\dodododoPSsanitizeJScode
+ \ifnum\scratchcounter=500
+ \expandafter\dodododoPSsanitizeJScode
\fi}
\def\dodododoPSsanitizeJScode
@@ -600,13 +599,13 @@
\begingroup
\aftergroup\xdef
\aftergroup\sanitizedJScode
- \aftergroup{%
+ \aftergroup{%
\aftergroup\sanitizedJScode
\let\next=}}
%\endTEX
%
-% Why is \aftergroup not doing what I expect?
+% Why is \aftergroup not doing what I expect?
%
% \beginETEX \aftergroup
%
@@ -614,17 +613,17 @@
%
% \endETEX
-%D The macro \type{\doPSsanitizeJScode} converts its argument
-%D into the macro \type{\sanitizedJScode}, thereby prefixing
-%D each \type{(} and \type{)} by a slash.
+%D The macro \type{\doPSsanitizeJScode} converts its argument
+%D into the macro \type{\sanitizedJScode}, thereby prefixing
+%D each \type{(} and \type{)} by a slash.
%D Hooking this mechanism into the general \CONTEXT\ reference
-%D mechanism does not take much effort:
+%D mechanism does not take much effort:
\definespecialtest{JS}%
{\doifdefinedelse{\r!java\currentreferenceoperation}}
-\definespeciallocation{JS}#1#2%
+\definespeciallocation{JS}#1#2%
{\iflocation
\bgroup
\bgroup
@@ -645,21 +644,21 @@
{#2}%
\fi}
-%D \macros
+%D \macros
%D {useJSscripts}
-%D
+%D
%D In due time, users will build their collections of scripts,
%D which can be used (loaded) when applicable. Although not all
%D public, we will provide some general purpose scripts,
%D collected in files with names like \type{java-...}. One can
-%D load these scripts with \type{\useJSscripts}, like:
-%D
+%D load these scripts with \type{\useJSscripts}, like:
+%D
%D \starttypen
%D \useJSscripts[fld]
%D \stoptypen
-%D
+%D
%D The not so complicated implementation of this macro is:
-
+
\def\dodouseJSscripts#1%
{\doifelse{#1}\v!reset
{\let\allJSpreambles\empty}
@@ -680,4 +679,4 @@
\def\useJSscripts
{\dodoubleempty\douseJSscripts}
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/lang-frq.tex b/tex/context/base/lang-frq.tex
index 4877e87dc..5240f9370 100644
--- a/tex/context/base/lang-frq.tex
+++ b/tex/context/base/lang-frq.tex
@@ -193,9 +193,9 @@
%D A few samples of usage of this mechanism are shown below:
%D
%D \startbuffer
-%D {\mainlanguage[en]\hsize65\averagecharwidth\mainlanguage[en]\input ward \endgraf}
-%D {\mainlanguage[nl]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blanko }
-%D {\mainlanguage[de]\hsize65\averagecharwidth\mainlanguage[de]\input ward \blanko }
+%D {\mainlanguage[en]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blanko}
+%D {\mainlanguage[nl]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blanko}
+%D {\mainlanguage[de]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blanko}
%D \stopbuffer
%D
%D \typebuffer \getbuffer
@@ -203,4 +203,15 @@
%D Although the widthts differ, the consequenes for breaking the paragraph
%D into lines are minimal.
+%D \macros
+%D {freezeaveragecharacterwidth}
+%D
+%D This macro can be used to make sure that the width does not change during a
+%D page break when another font is used.
+
+\let\normalaveragecharacterwidth\averagecharacterwidth
+
+\def\freezeaveragecharacterwidth % global
+ {\xdef\averagecharacterwidth{\dimexpr(\the\normalaveragecharacterwidth)}}
+
\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/list-ini.tex b/tex/context/base/list-ini.tex
deleted file mode 100644
index 20031b53f..000000000
--- a/tex/context/base/list-ini.tex
+++ /dev/null
@@ -1,39 +0,0 @@
-%D \module
-%D [ file=list-ini,
-%D versie=1995.10.10,
-%D naam=\CONTEXT\ List Macros,
-%D auteur=J. Hagen,
-%D datum=\currentdate,
-%D copyright=J. Hagen]
-
-\writestatus{loading}{Context List Macros}
-
-\unprotect
-
-%I n=Overzichten
-%I c=\startoverzicht
-%I
-%I Ten behoeve van veel voorkomende soorten overzichten
-%I zijn speciale commando's beschikbaar. Bij dergelijke
-%I overzichten worden in plaats van de gebruikelijke
-%I commando's \starttekst..\stoptekst de onderstaande
-%I commando's gebruikt:
-%I
-%I \startoverzicht[soort overzicht]
-%I \stopoverzicht
-%I
-%I Overzichten staan in files met de naam list-xxx, waarbij
-%I xxx de eerste drie letters van het soort overzicht zijn.
-%I
-%I Vooralsnog zijn alleen overzichten van 'figuren' en
-%I 'kontakten' beschikbaar.
-
-\definieerfilegroep
- [overzicht]
- [file=list,
- voor=,
- na=]
-
-\protect
-
-\endinput
diff --git a/tex/context/base/m-chart.tex b/tex/context/base/m-chart.tex
index f40a88a5f..23aea538b 100644
--- a/tex/context/base/m-chart.tex
+++ b/tex/context/base/m-chart.tex
@@ -11,17 +11,17 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% to do: \localpushmacro/\localpopmacro (dohandleflowchart etc)
+% to do: \localpushmacro/\localpopmacro (dohandleflowchart etc)
-% will be redone with layers
+% will be redone with layers
%D This is an experimental module. Pieces of code will be moved
%D to other modules. More features are possible but will be
-%D interfaces later.
+%D interfaces later.
%D
%D When finished this module will be documented. The main macro
%D is still a rather big one and there is some redundant and
-%D slow code that needs a clean up.
+%D slow code that needs a clean up.
% arrow, dash
% crossing
@@ -49,7 +49,7 @@
% nx : minimaal aantal cellen horizontaal
% ny : minimaal aantal cellen vertikaal
%
-% shape none en geen equivalent maken
+% shape none en geen equivalent maken
%
% kaderkleur achtergrondkleur
% lijnkleur lijndikte
@@ -61,7 +61,7 @@
\unprotect
\definieersorteren [flowchart] [flowcharts] [\v!geen] % no access
-\stelsorterenin [flowchart] [\c!status=\v!stop] % off by default
+\stelsorterenin [flowchart] [\c!status=\v!stop] % off by default
\def\@FLOW@{@FLOW@}
\def\@FLOC@{@FLOC@}
@@ -99,7 +99,7 @@
\global\let\FLOWalign \empty
\global\let\FLOWshape \empty
\global\let\FLOWlocation \empty
- \global\let\FLOWtext \empty
+ \global\let\FLOWtext \empty
\global\let\FLOWhelp \empty
\global\let\FLOWdestination\empty
\global\let\FLOWoverlay \empty
@@ -191,7 +191,7 @@
\def\doFLOWexit[#1]#2%
{\setgvalue{#1FLOWexit}{#2}\ignorespaces}
-\def\startFLOWchart%
+\def\startFLOWchart
{\bgroup
\let\stopFLOWchart\egroup
\obeylines % lelijk, buffers nog eens fatsoeneren
@@ -213,7 +213,7 @@
\flowchart{#1}%
\setxvalue{\@FLOW@-#1}%
{\noexpand\dohandleflowchart[\nofFLOWcharts][#2]}}
-
+
\def\setupFLOWcharts{\dodoubleargument\getparameters[\@@FLOW]}
\def\setupFLOWlines {\dodoubleargument\getparameters[\@@FLOL]}
\def\setupFLOWshapes{\dodoubleargument\getparameters[\@@FLOS]}
@@ -394,7 +394,7 @@
\global\let\FLOWwidth \@@FLOWnx
\global\let\FLOWheight\@@FLOWny
\let\startFLOWcell\startFLOWcellA
- \resetFLOWlocation
+ \resetFLOWlocation
\processFLOWbuffer\currentFLOWnumber
\ifcase\@@FLOWnx\relax \let\@@FLOWnx\FLOWwidth \fi
\ifcase\@@FLOWny\relax \let\@@FLOWny\FLOWheight \fi
@@ -434,7 +434,7 @@
\forgetall
\offinterlineskip
\else\ifx\@@FLOWkorps\empty\else
- \expanded{\switchtobodyfont[\@@FLOWkorps]}% \expanded ?
+ \expanded{\switchtobodyfont[\@@FLOWkorps]}% \expanded ?
\fi\fi
\global\let\FLOWcells\empty
\dimen0=\@@FLOWbreedte
@@ -481,7 +481,7 @@
\resetMPdrawing
\doglobal\newcounter\FLOWcomment
\startMPdrawing
- if unknown context_char : input mp-char.mp ; fi ;
+ if unknown context_char : input mp-char.mp ; fi ;
grid_width := \FLOWgridwidth ;
grid_height := \FLOWgridheight ;
shape_width := \FLOWshapewidth ;
@@ -500,7 +500,7 @@
% \expandafter\getFLOWlocationX\FLOWlocation\end
% \ignorespaces}%
% \let\startFLOWcell\startFLOWcellX
-% \resetFLOWlocation
+% \resetFLOWlocation
% \processFLOWbuffer\currentFLOWnumber
% \ifnum\@@FLOWnx\@@FLOWny=11 % listig
% \let\@@FLOWnx\FLOWwidth
@@ -535,10 +535,10 @@
show_\@@FLOWpunt_points := true ;
\stopMPdrawing]%
\let\startFLOWcell\startFLOWcellB
- \resetFLOWlocation
+ \resetFLOWlocation
\processFLOWbuffer\currentFLOWnumber
\let\startFLOWcell\startFLOWcellC
- \resetFLOWlocation
+ \resetFLOWlocation
\processFLOWbuffer\currentFLOWnumber
\startMPdrawing
clip_chart(\@@FLOWx,\@@FLOWy,\@@FLOWnx,\@@FLOWny) ;
@@ -559,7 +559,7 @@
\def\MPareapath##1##2##3##4%
{\def\areaMPllx{##1bp}\def\areaMPlly{##2bp}%
\def\areaMPurx{##3bp}\def\areaMPury{##4bp}}%
- \getMPdata
+ \getMPdata
\doglobal\newcounter\FLOWcomment
\let\startFLOWcell\startFLOWcellD
\setbox2\vbox to \ht0
@@ -635,9 +635,9 @@
% Pass B
%
-% beware: the - after \@FLOC@ is needed since name can be
-% empty and we don't want to redefine \@FLOC@ itself by
-% mistake
+% beware: the - after \@FLOC@ is needed since name can be
+% empty and we don't want to redefine \@FLOC@ itself by
+% mistake
\long\def\startFLOWcellB#1\stopFLOWcell
{\resetFLOWcell\ignorespaces#1\unskip
@@ -689,10 +689,10 @@
\long\def\startFLOWcellC#1\stopFLOWcell%
{\resetFLOWcell
-\pushmacro\lastFLOWx
+\pushmacro\lastFLOWx
\pushmacro\lastFLOWy
- \ignorespaces#1\unskip % makes sure that vars are set
-\popmacro\lastFLOWy
+ \ignorespaces#1\unskip % makes sure that vars are set
+\popmacro\lastFLOWy
\popmacro\lastFLOWx
\let\connection\doFLOWconnectionC
\ignorespaces#1\unskip}
@@ -704,7 +704,7 @@
\def\doFLOWconnectionC
{\dodoubleempty\dodoFLOWconnectionC}
-
+
\def\dodoFLOWconnectionC[#1][#2]#3%
{\doglobal\increment\FLOWcomment
\setFLOWname\otherFLOWname{name_#3}%
@@ -715,7 +715,7 @@
\doifdefinedelse{\@FLOC@-\otherFLOWname}
{\edef\FLOWto {\getvalue{\@FLOC@-\otherFLOWname}}}
{\let \FLOWto \FLOWorigin}%
- \ifx\FLOWto\FLOWorigin \else
+ \ifx\FLOWto\FLOWorigin \else
\FLOWsetconnect{#1}%
\ifx\cFLOWfrom\empty \else
\doifelse\@@FLOLhoek\v!rond
@@ -732,17 +732,17 @@
{\startMPdrawing touchshape := false ; \stopMPdrawing}%
%\doifsomething{#2}
% {\startMPdrawing
-% \doFLOWdisplace[0#2,0,0]%
+% \doFLOWdisplace[0#2,0,0]%
% \stopMPdrawing}%
\startMPdrawing
-\doFLOWdisplace[0#2,0,0]%
+\doFLOWdisplace[0#2,0,0]%
connection_line_color := \MPcolor{\@@FLOLkleur} ;
connection_line_width := \@@FLOLlijndikte ;
connect_\cFLOWfrom_\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ;
-\doFLOWdisplace[0,0,0]%
+\doFLOWdisplace[0,0,0]%
\stopMPdrawing
\fi
- \fi
+ \fi
\fi
\ignorespaces}
@@ -865,9 +865,9 @@
\fi
\edef\FLOWdx{\the\dimen0}%
\edef\FLOWdy{\the\dimen2}%
- \def\positionFLOWzero% assumes \FLOWdx and \FLOWdy are set
+ \def\positionFLOWzero% assumes \FLOWdx and \FLOWdy are set
{\setbox0=\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}%
- \smashbox0\box0}%
+ \smashbox0\box0}%
\def\doFLOWtlabel##1##2##3%
{\scratchdimen=\ifcase##2 \!!zeropoint\else\@@FLOWdy\fi
\setbox0=\hbox{\hskip\dimen2\raise\scratchdimen
@@ -896,17 +896,17 @@
\doFLOWblabel\rightbottombox0\bFLOWlabel
\doFLOWllabel \lefttopbox0\lFLOWlabel
\doFLOWrlabel \righttopbox0\rFLOWlabel
- \doFLOWtlabel \topbox0\tcFLOWlabel % for me only
- \doFLOWblabel \bottombox0\bcFLOWlabel % for me only
- \doFLOWllabel \leftbox0\lcFLOWlabel % for me only
- \doFLOWrlabel \rightbox0\rcFLOWlabel % for me only
+ \doFLOWtlabel \topbox0\tcFLOWlabel % for me only
+ \doFLOWblabel \bottombox0\bcFLOWlabel % for me only
+ \doFLOWllabel \leftbox0\lcFLOWlabel % for me only
+ \doFLOWrlabel \rightbox0\rcFLOWlabel % for me only
\ifnum#1=\@@FLOWx\relax \doFLOWllabel \leftbox1\lFLOWexit \fi
\ifnum#1=\!!countc \doFLOWrlabel \rightbox1\rFLOWexit \fi
\ifnum#2=\@@FLOWy\relax \doFLOWtlabel \topbox1\tFLOWexit \fi
\ifnum#2=\!!countd \doFLOWblabel \bottombox1\bFLOWexit \fi
\fi\fi\fi\fi}
-% Pass E
+% Pass E
\long\def\startFLOWcellE#1\stopFLOWcell
{\resetFLOWcell
@@ -1033,7 +1033,7 @@
\fi}
\def\setgetFLOWchart[#1][#2][#3]%
- {\def\docommando##1{}% cell line focus ?
+ {\def\docommando##1{}% cell line focus ?
\processcommalist[#2]\docommando
\getFLOWchart[#1][#3]}
@@ -1180,13 +1180,13 @@
%D {\FLOWcharts[mybigflow]}
%D \stoptypen
-%D \macros
+%D \macros
%D {typeFLOWchart}
%D
-%D For documentation purposes the following macro is
-%D provided. Watch the use of the first and last line hooks,
-%D which is needed because the start and stop commands are
-%D not part of the buffer.
+%D For documentation purposes the following macro is
+%D provided. Watch the use of the first and last line hooks,
+%D which is needed because the start and stop commands are
+%D not part of the buffer.
\def\typeFLOWchart[#1]%
{\bgroup
@@ -1194,69 +1194,69 @@
\convertargument\startFLOWchart[#1]\to\firstverbatimfileline
\convertargument \stopFLOWchart\to\lastverbatimfileline
\getvalue{\@FLOW@-#1}
- \egroup}
+ \egroup}
-%D New:
+%D New:
%D
-%D \starttypen
+%D \starttypen
%D \setupFLOWcharts[command=\Whow]
-%D
-%D \startFLOWset[convert-en] % [tag][convert-en]
+%D
+%D \startFLOWset[convert-en] % [tag][convert-en]
%D \subFLOWchart[a][x=1,y=1,nx=3,ny=3]
%D \subFLOWchart[b][x=1,y=2,nx=3,ny=3]
%D \subFLOWchart[c][x=2,y=1,nx=3,ny=3]
%D \stopFLOWset
-%D
+%D
%D \def\Whow#1%
%D {\ifnum\currentFLOWset=1 \framed{Some Chart}\fi}
-%D
-%D \FLOWset[convert-en] % [tag]
-%D
+%D
+%D \FLOWset[convert-en] % [tag]
+%D
%D \def\Whow#1%
%D {\setuphead[status=hoog]
%D \startstandardmakeup
%D \centerbox{#1}
%D \stopstandardmakeup}
-%D
-%D \FLOWset[convert-en] % [tag]
-%D \stoptypen
+%D
+%D \FLOWset[convert-en] % [tag]
+%D \stoptypen
\def\startFLOWset
{\dodoubleempty\dostartFLOWset}
-\def\dostartFLOWset[#1][#2]#3\stopFLOWset % tag name data
+\def\dostartFLOWset[#1][#2]#3\stopFLOWset % tag name data
{\ifsecondargument
\long\setvalue{\@FLOX@#1}{\dohandleFLOWset{#1}{#2}{#3}}%
\else
\long\setvalue{\@FLOX@#1}{\dohandleFLOWset{#1}{#1}{#3}}%
\fi}
-\long\def\dohandleFLOWset#1#2#3% tag name data
+\long\def\dohandleFLOWset#1#2#3% tag name data
{\bgroup
\def\subFLOWchart
{\dodoubleempty\dosubFLOWchart}%
- \def\dosubFLOWchart[##1][##2]% subtag settings
+ \def\dosubFLOWchart[##1][##2]% subtag settings
{\ifsecondargument
- \dodohandleFLOWset{#1}{##1}{#2}{##2}%
+ \dodohandleFLOWset{#1}{##1}{#2}{##2}%
\else
\subFLOWchart[][##1]%
\fi}%
#3%
\egroup}
-\def\dodohandleFLOWset#1#2#3#4% tag subtag name settings
+\def\dodohandleFLOWset#1#2#3#4% tag subtag name settings
{\increment\currentFLOWset
\bgroup
\@@FLOXcommando
{\ifnum\currentFLOWset=1 \pagereference[#1]\fi
\doifsomething{#2}
- {\setupreferencing[\c!prefix=]%
- \pagereference[#1:#2]% -:#1:#2
- \setupreferencing[\c!prefix=#1:#2]}%
+ {\setupreferencing[\c!prefix=]%
+ \pagereference[#1:#2]% -:#1:#2
+ \setupreferencing[\c!prefix=#1:#2]}%
\FLOWchart[#3][#4]}%
\egroup}
-\def\FLOWset[#1]%
+\def\FLOWset[#1]%
{\newcounter\currentFLOWset
\doifdefinedelse{\@FLOX@#1}
{\getvalue{\@FLOX@#1}}
@@ -1267,11 +1267,11 @@
\setupFLOWsets
[\c!commando=]
-%D This will be an option:
-
+%D This will be an option:
+
% \def\startFLOWchart%
% {\dodoubleempty\dostartFLOWchart}
-%
+%
% \long\def\dostartFLOWchart[#1][#2]#3\stopFLOWchart
% {\preparenextFLOWchart{#1}{#2}%
% \long\setgvalue{\FLOWbufferprefix\nofFLOWcharts}{#3}}
@@ -1310,8 +1310,8 @@
\defineXMLsingular [flowchart]
{\expanded{\FLOWchart[\XMLpar{flowchart}{identifier}{unknown}]}}
-\defineXMLdirective [flowchart] [shapes] \setupFLOWshapes
-\defineXMLdirective [flowchart] [lines] \setupFLOWlines
+\defineXMLdirective [flowchart] [shapes] \setupFLOWshapes
+\defineXMLdirective [flowchart] [lines] \setupFLOWlines
\stopXMLdefinitions
diff --git a/tex/context/base/m-layout.tex b/tex/context/base/m-layout.tex
index 5cfc233e6..6bc5c8c55 100644
--- a/tex/context/base/m-layout.tex
+++ b/tex/context/base/m-layout.tex
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% layout-preset - thf th tf
+
%D This is a preliminary module, don't depend on these dimensions yet.
\readsysfile{lang-frq}\donothing\donothing
@@ -18,12 +20,12 @@
\unprotect
-%def\layouthwratio{\withoutpt{\the\dimexpr(8\paperheight/\dimexpr(\paperwidth/ 8192))}}
-%def\layouthwratio{\withoutpt{\the\dimexpr(4\paperheight/\dimexpr(\paperwidth/16384))}}
-%def\layouthwratio{\withoutpt{\the\dimexpr(2\paperheight/\dimexpr(\paperwidth/32768))}}
+% \def\layouthwratio{\withoutpt\the\dimexpr(8\paperheight/\dimexpr(\paperwidth/ 8192))}
+% \def\layouthwratio{\withoutpt\the\dimexpr(4\paperheight/\dimexpr(\paperwidth/16384))}
+% \def\layouthwratio{\withoutpt\the\dimexpr(2\paperheight/\dimexpr(\paperwidth/32768))}
\def\layouthwratio
- {\withoutpt{\the\dimexpr(2\paperheight/(\paperwidth/32768))}}
+ {\withoutpt\the\dimexpr(2\paperheight/(\paperwidth/32768))}
\def\layouthfheight
{\dimexpr(\layoutparameter\c!hoofd+\layoutparameter\c!hoofdafstand+
diff --git a/tex/context/base/m-quest.tex b/tex/context/base/m-quest.tex
index f56ee90b3..5ea34164b 100644
--- a/tex/context/base/m-quest.tex
+++ b/tex/context/base/m-quest.tex
@@ -8,26 +8,26 @@
%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.
-%I Invuloefeningen kunnen worden vormgegeven met het
+%I Invuloefeningen kunnen worden vormgegeven met het
%I de commando's:
-%I
+%I
%I \definieerinvulwoord[trefwoord]{woord,woord}
%I \invulwoord[trefwoord]
%I \invulwoord{woord,woord,...}
-%I
-%I Daarbij kan het een en ander worden ingesteld met
+%I
+%I Daarbij kan het een en ander worden ingesteld met
%I
%I \stelinvullenin[status=,nummer=,links=,rechts=,letter=]
%P
%I Er zijn drie manieren om woorden in te vullen. De meest
-%I eenvoudige is die waarbij de in te vullen woorden in de
-%I tekst staan.
+%I eenvoudige is die waarbij de in te vullen woorden in de
+%I tekst staan.
%I
%I bla bla \invulwoord{een,alfa} bla bla bla bla bla bla
-%I bla bla bla bla bla bla bla bla \invulwoord{twee,beta}.
+%I bla bla bla bla bla bla bla bla \invulwoord{twee,beta}.
%I
%I De gezette tekst hangt af van de instellingen:
%I
@@ -35,52 +35,52 @@
%I [status=vol,nummer=1] 'een' respectievelijk 'twee'
%I [status=vol,nummer=2] 'alfa' respectievelijk 'beta'
%I
-%I Het nummer heeft dus betrekking op het volgnummer in de
-%I opgegeven reeks.
+%I Het nummer heeft dus betrekking op het volgnummer in de
+%I opgegeven reeks.
%P
-%I Bij de tweede manier worden eerste de alternatieven
+%I Bij de tweede manier worden eerste de alternatieven
%I gedefinieerd:
%I
%I \definieerinvulwoord{een,alfa}
-%I \definieerinvulwoord{twee,beta}
+%I \definieerinvulwoord{twee,beta}
+%I
+%I die vervolgens worden opgeroepen:
%I
-%I die vervolgens worden opgeroepen:
-%I
%I bla \invulwoord[+] bla bla bla bla bla bla bla bla bla
-%I bla bla bla bla bla bla bla bla bla bla \invulwoord[+].
+%I bla bla bla bla bla bla bla bla bla bla \invulwoord[+].
%I
%I De mogelijke instellingen komen overeen met die van de
-%I eerste manier.
-%P
-%I De derde manier is een variant op de tweede. Bij grote
-%I teksten kan men het overzicht kwijtraken. Het is daarom
-%I mogelijk 'logische' namen toe te kennen aan woorden.
+%I eerste manier.
+%P
+%I De derde manier is een variant op de tweede. Bij grote
+%I teksten kan men het overzicht kwijtraken. Het is daarom
+%I mogelijk 'logische' namen toe te kennen aan woorden.
%I
%I \definieerinvulwoord[a]{een,alfa}
-%I \definieerinvulwoord[b]{twee,beta}
+%I \definieerinvulwoord[b]{twee,beta}
+%I
+%I die vervolgens worden opgeroepen:
%I
-%I die vervolgens worden opgeroepen:
-%I
%I bla \invulwoord[a] bla bla bla bla bla bla bla bla bla
-%I bla bla bla bla bla bla bla bla bla bla \invulwoord[b].
+%I bla bla bla bla bla bla bla bla bla bla \invulwoord[b].
+%I
+%I Dit maakt het bovendien mogelijk woorden meerdere malen
+%I (in een willekeurige volgorde op te roepen:
%I
-%I Dit maakt het bovendien mogelijk woorden meerdere malen
-%I (in een willekeurige volgorde op te roepen:
-%I
-%I bla \invulwoord[a] bla \invulwoord[b] bla bla bla bla
-%I bla bla bla bla \invulwoord[b] bla bla \invulwoord[a].
+%I bla \invulwoord[a] bla \invulwoord[b] bla bla bla bla
+%I bla bla bla bla \invulwoord[b] bla bla \invulwoord[a].
%P
-%I Bij [status=leeg] wordt een streep gezet die in breedte
-%I overeenkomt met het woord dat er eigenlijk hoort te
-%I staan. De ingevulde tekst komt visueel daardoor overeen
-%I met de in te vullen tekst, wat vergelijken vereenvoudigd.
+%I Bij [status=leeg] wordt een streep gezet die in breedte
+%I overeenkomt met het woord dat er eigenlijk hoort te
+%I staan. De ingevulde tekst komt visueel daardoor overeen
+%I met de in te vullen tekst, wat vergelijken vereenvoudigd.
%I
-%I Met [status=reset] worden enkele tellers weer op 0 gezet.
-%I Dit kan nodig zijn als meerdere invuloefeningen in een
-%I tekst worden gezet.
+%I Met [status=reset] worden enkele tellers weer op 0 gezet.
+%I Dit kan nodig zijn als meerdere invuloefeningen in een
+%I tekst worden gezet.
%I
%I Als \versie[voorlopig] is ingesteld, worden bij invullers
-%I zonder logische namen tussen haakjes de volgnummers
+%I zonder logische namen tussen haakjes de volgnummers
%I getoond.
%S \startsetup
@@ -133,11 +133,11 @@
%S [\c!text!]
%S \stopsetup
-% Mogelijke uitbreidingen
+% Mogelijke uitbreidingen
%
% - [breedte=<maat>,passend,ruim]
% - invullijst met nummers
-% - weergeven lijst tijdens definitie blokkeren
+% - weergeven lijst tijdens definitie blokkeren
% - door elkaar definieren
\unprotect
@@ -146,9 +146,9 @@
\definereferenceconstant {fillin} {:iv:}
-\newcount\invulteller \newcount\invulput \newcount\invulget
+\newcount\invulteller \newcount\invulput \newcount\invulget
-\def\stelinvullenin%
+\def\stelinvullenin
{\dosingleargument\dostelinvullenin}
\def\dostelinvullenin[#1]%
@@ -156,7 +156,7 @@
\doif\@@ivstatus\v!reset
{\global\invulput\zerocount
\global\invulget\zerocount
- \let\@@ivstatus\empty}}
+ \let\@@ivstatus\empty}}
\def\definieerinvulwoord
{\dosingleempty\dodefinieerinvulwoord}
@@ -176,7 +176,7 @@
\def\dosimpleinvulwoord#1%
{\ifnum\@@ivnummer>0 \advance\invulteller \plusone \fi
- \ifnum\invulteller=\@@ivnummer\relax
+ \ifnum\invulteller=\@@ivnummer\relax
\bgroup
\doconvertfont\@@ivletter
{\@@ivlinks
@@ -220,11 +220,11 @@
% when nummer > 0, then commalist processing; beware of $(1,2)$, use { } there
\stelinvullenin
- [\c!nummer=0,
- \c!letter=\v!vet,
+ [\c!nummer=0,
+ \c!letter=\v!vet,
\c!lijn=\v!aan,
\c!links=,
\c!rechts=,
\c!status=]
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/meta-clp.tex b/tex/context/base/meta-clp.tex
index 8b841e876..a160e7661 100644
--- a/tex/context/base/meta-clp.tex
+++ b/tex/context/base/meta-clp.tex
@@ -1,31 +1,31 @@
%D \module
%D [ file=meta-clp,
%D version=2000.07.06,
-%D title=\METAPOST\ Graphics,
-%D subtitle=Clipping,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Clipping,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-%D In this library, we define a bunch of clipping paths that
-%D can be fed to \type {\clip}.
+%D In this library, we define a bunch of clipping paths that
+%D can be fed to \type {\clip}.
\startMPclip{ellipse}
- clip currentpicture to unitcircle
+ clip currentpicture to unitcircle
xscaled \width yscaled \height ;
\stopMPclip
\startMPclip{negellipse}
- clip currentpicture to (unitcircle peepholed unitsquare)
+ clip currentpicture to (unitcircle peepholed unitsquare)
xscaled \width yscaled \height ;
\stopMPclip
\startMPclip{urellipse}
- clip currentpicture to urcircle scaled 2
+ clip currentpicture to urcircle scaled 2
xscaled \width yscaled \height ;
\stopMPclip
@@ -65,17 +65,17 @@
\stopMPclip
\startMPclip{diamond}
- clip currentpicture to unitdiamond
+ clip currentpicture to unitdiamond
xscaled \width yscaled \height ;
\stopMPclip
\startMPclip{negdiamond}
- clip currentpicture to (unitdiamond peepholed unitsquare)
+ clip currentpicture to (unitdiamond peepholed unitsquare)
xscaled \width yscaled \height ;
\stopMPclip
\startMPclip{urtriangle}
- clip currentpicture to urtriangle scaled 2
+ clip currentpicture to urtriangle scaled 2
xscaled \width yscaled \height ;
\stopMPclip
@@ -94,43 +94,43 @@
xscaled \width yscaled \height ;
\stopMPclip
-% More efficient:
+% More efficient:
%
% \def\dosimpleMPclip#1
% {clip currentpicture to (#1) xscaled \width yscaled \height ;}
-%
+%
% \def\simpleMPclip#1#2%
% {\startMPclip{#1}\dosimpleMPclip{#2}\stopMPclip}
-%
+%
% \simpleMPclip {ellipse} {unitcircle}
-% \simpleMPclip {diamond} {unitdiamond}
-%
+% \simpleMPclip {diamond} {unitdiamond}
+%
% \simpleMPclip {negellipse} {unitcircle peepholed unitsquare}
% \simpleMPclip {negdiamond} {unitdiamond peepholed unitsquare}
-%
+%
% \simpleMPclip {urellipse} {urcircle scaled 2 shifted (0,0)}
% \simpleMPclip {ulellipse} {ulcircle scaled 2 shifted (1,0)}
% \simpleMPclip {llellipse} {llcircle scaled 2 shifted (1,1)}
% \simpleMPclip {lrellipse} {lrcircle scaled 2 shifted (0,1)}
-%
+%
% \simpleMPclip {tellipse} {tcircle shifted (.5,0) yscaled 2}
% \simpleMPclip {bellipse} {bcircle shifted (.5,.5) yscaled 2}
% \simpleMPclip {lellipse} {lcircle shifted (.5,.5) xscaled 2}
% \simpleMPclip {rellipse} {rcircle shifted (0,.5) xscaled 2}
-%
+%
% \simpleMPclip {urtriangle} {urtriangle scaled 2 shifted (0,0)}
% \simpleMPclip {ultriangle} {ultriangle scaled 2 shifted (1,0)}
% \simpleMPclip {lltriangle} {lltriangle scaled 2 shifted (1,1)}
% \simpleMPclip {lrtriangle} {lrtriangle scaled 2 shifted (0,1)}
-%D \in {Figure} [fig:clipping paths] shows which paths are
-%D predefined. When applied to a whole picture, their usage
-%D is:
-%D
+%D \in {Figure} [fig:clipping paths] shows which paths are
+%D predefined. When applied to a whole picture, their usage
+%D is:
+%D
%D \starttypen
%D \clip[nx=1,ny=1,mp=ellipse]{some clippable content}
%D \stoptypen
-%D
+%D
%D \startbuffer
%D \setupclipping [nx=1,ny=1,x=1,y=1]
%D \setupblackrules[width=2cm,height=1cm]
@@ -155,10 +155,10 @@
%D {\clip[mp=negdiamond]{\blackrule}} {negdiamond}
%D \stopcombinatie % \stopcombination
%D \stopbuffer
-%D
-%D \plaatsfiguur % \placefigure
+%D
+%D \plaatsfiguur % \placefigure
%D [here][fig:clipping paths]
%D {The predefined clipping paths.}
%D {\haalbuffer} % {\getbuffer}
-\endinput
+\endinput \ No newline at end of file
diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex
index dd1f193c3..ecfd053c1 100644
--- a/tex/context/base/meta-ini.tex
+++ b/tex/context/base/meta-ini.tex
@@ -196,11 +196,11 @@
%D {\getvalue{\@@MPG#1}}
%D \stoptypen
-%\def\overlaystamp% watch the \MPcolor, since colors can be redefined
+%\def\overlaystamp % watch the \MPcolor, since colors can be redefined
% {\overlaywidth:\overlayheight:\overlaydepth
% :\MPcolor{\overlaycolor}:\MPcolor{\overlaylinecolor}}
-\def\overlaystamp% watch the \MPcolor, since colors can be redefined
+\def\overlaystamp % watch the \MPcolor, since colors can be redefined
{\overlaywidth:\overlayheight:\overlaydepth
:\MPcolor\overlaycolor:\MPcolor\overlaylinecolor}
@@ -272,7 +272,7 @@
\long\def\startuseMPgraphic
{\dodoublegroupempty\dostartuseMPgraphic}
-\long\def\dostartuseMPgraphic#1#2#3\stopuseMPgraphic%
+\long\def\dostartuseMPgraphic#1#2#3\stopuseMPgraphic
{\blabelgroup
\long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}{#3}}%
\elabelgroup}
@@ -280,7 +280,7 @@
\long\def\startusableMPgraphic % redundant but handy
{\dodoublegroupempty\dostartusableMPgraphic}
-\long\def\dostartusableMPgraphic#1#2#3\stopusableMPgraphic%
+\long\def\dostartusableMPgraphic#1#2#3\stopusableMPgraphic
{\blabelgroup
\long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}{#3}}%
\elabelgroup}
@@ -300,7 +300,7 @@
\getvalue{\@@MPG#1}%
\elabelgroup}
-\long\def\startreusableMPgraphic%
+\long\def\startreusableMPgraphic
{\dodoublegroupempty\dostartreusableMPgraphic}
% \long\def\dostartreusableMPgraphic#1#2#3\stopreusableMPgraphic%
@@ -353,10 +353,17 @@
\unexpanded\def\uniqueMPpagegraphic
{\dodoublegroupempty\douniqueMPpagegraphic}
+% \def\douniqueMPpagegraphic#1#2%
+% {\blabelgroup
+% \let\overlaystamp\overlaypagestamp
+% \setupMPvariables[#1][#2]%
+% \getvalue{\@@MPG\MPpageprefix#1}{}%
+% \elabelgroup}
+
\def\douniqueMPpagegraphic#1#2%
{\blabelgroup
\let\overlaystamp\overlaypagestamp
- \setupMPvariables[#1][#2]%
+ \setupMPvariables[\MPpageprefix#1][#2]% prefix is new here
\getvalue{\@@MPG\MPpageprefix#1}{}%
\elabelgroup}
@@ -511,9 +518,9 @@
\newtoks\everyMPTEXgraphic
\fi
-%D A more generar of passing environments is:
+%D A more general way of passing environments is:
-\def\startMPenvironment% % second arg gobbles spaces, so
+\def\startMPenvironment % second arg gobbles spaces, so
{\dodoubleempty\dostartMPenvironment} % that reset gives \emptytoks
\long\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment%
@@ -529,9 +536,7 @@
\global\loadfontfileoncetrue
\stopMPenvironment}
-\startMPenvironment
- \global\loadfontfileoncetrue
-\stopMPenvironment
+\resetMPenvironment
%D This command takes \type {[reset]} as optional
%D argument.
@@ -558,14 +563,21 @@
% \immediate\closeout\MPwrite
% }%\fi}
-\def\initializeMPgraphicfile
- {\bgroup
- \doinitializeMPgraphicfile
- \MPruntrue
- \doinitializeMPgraphicfile
- \egroup}
+% strange :
+
+% \def\initializeMPgraphicfile
+% {\bgroup
+% \doinitializeMPgraphicfile
+% \MPruntrue
+% \doinitializeMPgraphicfile
+% \egroup}
-\def\doinitializeMPgraphicfile
+% \def\doinitializeMPgraphicfile
+% {\immediate\openout\scratchwrite\MPgraphicfile.mp
+% \immediate\write\scratchwrite{end.}%
+% \immediate\closeout\scratchwrite}
+
+\def\initializeMPgraphicfile
{\immediate\openout\scratchwrite\MPgraphicfile.mp
\immediate\write\scratchwrite{end.}%
\immediate\closeout\scratchwrite}
@@ -844,6 +856,72 @@
\def\doifelseMPgraphic#1{\doifdefinedelse{\@@MPG#1}}
+%D \macros
+%D {startMPcolor}
+%D
+%D The following time consuming method uses \METAPOST\ to
+%D calculate a color. This enables a match between colors
+%D resulting from a complex calculation (e.g. for a title
+%D page) and those in the text.
+
+% \startuseMPgraphic{somecolors}
+% color c[] ; c[1] := .7[red,green] ; c[2] := .7[blue,yellow] ;
+% \stopuseMPgraphic
+
+% \startMPcolor[shade-1][t=.2,a=1]
+% \includeMPgraphic{somecolors} ; fill fullcircle withcolor c[1] ;
+% \stopMPcolor
+
+% \startMPcolor[shade-2][t=.2,a=1]
+% \includeMPgraphic{somecolors} ; fill fullcircle withcolor c[2] ;
+% \stopMPcolor
+
+% \blackrule[width=\hsize,height=4cm,color=shade-1]
+% \blackrule[width=\hsize,height=4cm,color=shade-2]
+
+\def\startMPcolor
+ {\dodoubleempty\dostartMPcolor}
+
+\long\def\dostartMPcolor[#1][#2]#3\stopMPcolor % slow but sometimes handy
+ {\startnointerference
+ \def\handleMPgraycolor{\expanded{\defineglobalcolor[#1][s=\!MPgMPa1,#2]}}%
+ \def\handleMPrgbcolor {\expanded{\defineglobalcolor[#1][r=\!MPgMPa1,g=\!MPgMPa2,b=\!MPgMPa3,#2]}}%
+ \def\handleMPcmykcolor{\expanded{\defineglobalcolor[#1][c=\!MPgMPa1,m=\!MPgMPa2,y=\!MPgMPa3,k=\!MPgMPa4,#2]}}%
+ \startMPcode#3\stopMPcode
+ \stopnointerference}
+
+%D New:
+
+\definelayerpreset
+ [mp]
+ [\c!y=-\MPury bp,
+ \c!x=\MPllx bp,
+ \c!methode=\v!passend]
+
+\definelayer
+ [mp]
+ [\c!preset=mp]
+
+%D Usage:
+%D
+%D \starttypen
+%D \defineproperty[one][layer][state=start]
+%D \defineproperty[two][layer][state=stop]
+%D
+%D \startuseMPgraphic{step-1}
+%D fill fullcircle scaled 10cm withcolor red ;
+%D \stopuseMPgraphic
+%D
+%D \startuseMPgraphic{step-2}
+%D fill fullcircle scaled 5cm withcolor green ;
+%D \stopuseMPgraphic
+%D
+%D \setlayer[mp]{\property[one]{\useMPgraphic{step-1}}}
+%D \setlayer[mp]{\property[two]{\useMPgraphic{step-2}}}
+%D
+%D \ruledhbox{\tightlayer[mp]}
+%D \stoptypen
+
%D New:
% \appendtoks \closeMPgraphicfiles \to \everystoptext
@@ -854,4 +932,4 @@
%
% linecap := rounded ;
% linejoin := rounded ;
-% drawoptions () ;
+% drawoptions () ; \ No newline at end of file
diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex
index 0db0f2201..b89489942 100644
--- a/tex/context/base/mult-com.tex
+++ b/tex/context/base/mult-com.tex
@@ -2014,6 +2014,13 @@ definecolumnset: definieerkolomgroep definecolumnset
stopcolumnset stopcolumnset
terminagruppocolonne stopcolumnset
+ setupcolumnsetlines: stelkolomgroepregelsin setupcolumnsetlines
+ setupcolumnsetlines setupcolumnsetlines
+ setupcolumnsetlines setupcolumnsetlines
+ setupcolumnsetstart: stelkolomgroepstartin setupcolumnsetstart
+ setupcolumnsetstart setupcolumnsetstart
+ setupcolumnsetstart setupcolumnsetstart
+
startcolumnmakeup: startkolomopmaak startcolumnmakeup
startcolumnmakeup startcolumnmakeup
startcolumnmakeup startcolumnmakeup
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index 0ca131b07..a4b56f4bf 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -559,6 +559,10 @@ component: component component
eigennummer: eigennummer ownnumber
eigenenummer vlastnicislo
numeroproprio numarpropriu
+% new
+% eigenschap: eigenschap property
+% property property
+% property property
evenmarge: evenmarge evenmargin
geraderand sudamarginalie
marginepari marginepara
@@ -1288,6 +1292,10 @@ zijuitlijnen: zijuitlijnen sidealign
zij: zij side
objektabstand pocitat
lato parte
+% new
+veldlaag: veldlaag fieldlayer
+ fieldlayer fieldlayer
+ fieldlayer fieldlayer
veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor
feldhintergrundfarbe barvapozadipole
coloresfondocampo culoarefundalcamp
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index f591be99e..dcf414bce 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -328,8 +328,9 @@
\def\!!twelvepoint {12pt}
\def\!!fourteenpointfour {14.4pt}
-\newdimen\zeropoint \zeropoint = 0pt
-\newdimen\onepoint \onepoint = 1pt
+\newdimen \zeropoint \zeropoint = 0pt
+\newdimen \onepoint \onepoint = 1pt
+\chardef \scaledpoint = 1
\newcount\medcard \medcard\!!medcard % used in font module
\newcount\maxcard \maxcard\!!maxcard % used in font module
diff --git a/tex/context/base/page-bck.tex b/tex/context/base/page-bck.tex
index 58bf4922b..720b9fa69 100644
--- a/tex/context/base/page-bck.tex
+++ b/tex/context/base/page-bck.tex
@@ -626,6 +626,22 @@
\next
\doglobal\increment\localpositionnumber\relax} % afterwards !
+\def\doaddlocalbackground#1%
+ {\edef\next
+ {\noexpand\redoglobal\wd#1\the\wd#1%
+ \noexpand\redoglobal\ht#1\the\ht#1%
+ \noexpand\dodoglobal\dp#1\the\dp#1}%
+ \dodoglobal\setbox#1\hbox
+ {\fastlocalframed
+ [\??ma\v!lokaal]
+ [\c!component=local,\c!kader=\v!uit,\c!offset=\v!overlay,%
+ \c!breedte=\wd#1,\c!hoogte=\ht#1,\c!diepte=\dp#1,%
+ \c!achtergrond=\localbackground]%
+ {\registerMPlocaltextarea{\box#1}}}%
+ \next
+ \doglobal\increment\localpositionnumber\relax} % afterwards !
+
+
% Test how previous macro behaves with depth:
%
% \startcolumnset
diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex
index a76d17e63..a680a19fb 100644
--- a/tex/context/base/page-flt.tex
+++ b/tex/context/base/page-flt.tex
@@ -255,69 +255,6 @@
\let\floatrotation\!!zerocount
-% \def\presetfloatvariables#1#2#3#4%
-% {\doifcommonelse
-% {#2}
-% {\v!links,\v!rechts,\v!binnen,\v!buiten,%
-% \v!inlinker,\v!inrechter,\v!inmarge,%
-% \v!rugwit,\v!snijwit,%
-% \v!binnenmarge,\v!buitenmarge,\v!binnenrand,\v!buitenrand,%
-% \v!linkermarge,\v!linkerrand,\v!rechtermarge,\v!rechterrand}
-% {\global\parfloattrue}
-% {\global\parfloatfalse}%
-% \ifbinnenkolommen
-% \global\parfloatfalse
-% \fi
-% \global\sidefloatshift\zeropoint
-% \global\sidefloatmaximum\zeropoint
-% \global\chardef\sidefloatmethod\getvalue{\??fl#1\c!zijmethode}%
-% \global\chardef\textfloatmethod\getvalue{\??fl#1\c!tekstmethode}%
-% \global\chardef\sidefloatalign\zerocount
-% \globallet\floatrotation\!!zerocount
-% \calculatefloatskips{#1}%
-% \ifparfloat
-% \processaction
-% [\getvalue{\??fl#1\c!zijuitlijnen}]
-% [\v!hoogte=>\global\chardef\sidefloatalign\plusone,%
-% \v!regel=>\global\chardef\sidefloatalign\plustwo,% (***)
-% \v!diepte=>\global\chardef\sidefloatalign\plusthree,%
-% \v!grid=>\global\chardef\sidefloatalign4]%
-% \ifcase\sidefloatalign\relax
-% \doifinset\v!hoogte{#2}{\global\chardef\sidefloatalign\plusone}%
-% \doifinset\v!regel {#2}{\global\chardef\sidefloatalign\plustwo}%
-% \doifinset\v!diepte{#2}{\global\chardef\sidefloatalign\plusthree}%
-% \doifinset\v!grid {#2}{\global\chardef\sidefloatalign4}%
-% \fi
-% \doifinset\v!hoog{#2}{\global\sidefloattopskip \zeropoint}%
-% \doifinset\v!laag{#2}{\global\sidefloatbottomskip\zeropoint}%
-% \doifinset\v!passend{#2}
-% {\global\sidefloattopskip \zeropoint
-% \global\sidefloatbottomskip\zeropoint
-% \global\floatsideskip \zeropoint}%
-% \else
-% \processallactionsinset
-% [#2]
-% [ 90=>\globallet\floatrotation\commalistelement,%
-% 180=>\globallet\floatrotation\commalistelement,%
-% 270=>\globallet\floatrotation\commalistelement]%
-% \fi
-% \doifinsetelse\v!geennummer{#2}
-% {\global\nofloatnumbertrue}
-% {\doifelsevalue{\??kj#1\c!nummer}\v!ja
-% {\global\nofloatnumberfalse}
-% {\global\nofloatnumbertrue}}%
-% \ConvertToConstant\doifelse{#4}{}
-% {\global\emptyfloatcaptiontrue}
-% {\global\emptyfloatcaptionfalse}%
-% \doifinsetelse\v!geen{#2}
-% {\global\nofloatcaptiontrue}
-% {\ConvertToConstant\doifelse{#4}\v!geen
-% {\global\nofloatcaptiontrue}
-% {\global\nofloatcaptionfalse}}%
-% \ifemptyfloatcaption \ifnofloatnumber
-% \global\nofloatcaptiontrue
-% \fi \fi}
-
\def\presetfloatvariables#1#2#3#4%
{\doifcommonelse
{#2}
@@ -661,26 +598,16 @@
\def\dodefinefloatcommands[#1][#2]%
{\definieerlijst[#1]%
\presetheadtext[#2=\Word{#2}]%
- \setvalue{\e!plaats\e!lijstmet#2}%
- {\dodoubleempty\doplaatslijst[#1]}%
- \setvalue{\e!volledige\e!lijstmet#2}%
- {\dotripleempty\dodovolledigelijst[#1][#2]}%
- \setvalue{\e!plaats#1}%
- {\dotripleempty\docomplexplaatsblok[#1]}%
- \setvalue{\e!reserveer#1}%
- {\doquadrupleempty\docomplexreserveerblok[#1]}%
- \setvalue{\e!start#1\e!tekst}%
- {\dotripleempty\docomplexstarttekstblok[#1]}%
- \setvalue{\e!stop#1\e!tekst}%
- {\dostoptextfloat}%
- \setvalue{\e!start\e!reserveer#1\e!tekst}%
- {\doquadrupleempty\docomplexstartreserveertekstblok[#1]}%
- \setvalue{\e!stop\e!reserveer#1\e!tekst}%
- {\dostoptextfloat}%
- \setvalue{\e!lege#1}%
- {\doleegblok{#1}}%
- \setvalue{\e!leeg#1}%
- {\doleegblok{#1}}}
+ \setvalue {\e!plaats\e!lijstmet#2}{\dodoubleempty\doplaatslijst[#1]}%
+ \setvalue {\e!volledige\e!lijstmet#2}{\dotripleempty\dodovolledigelijst[#1][#2]}%
+ \setvalue {\e!plaats#1}{\dotripleempty\docomplexplaatsblok[#1]}%
+ \setvalue {\e!reserveer#1}{\doquadrupleempty\docomplexreserveerblok[#1]}%
+ \setvalue {\e!start#1\e!tekst}{\dotripleempty\docomplexstarttekstblok[#1]}%
+ \setvalue {\e!stop#1\e!tekst}{\dostoptextfloat}%
+ \setvalue{\e!start\e!reserveer#1\e!tekst}{\doquadrupleempty\docomplexstartreserveertekstblok[#1]}%
+ \setvalue {\e!stop\e!reserveer#1\e!tekst}{\dostoptextfloat}%
+ \setvalue {\e!lege#1}{\doleegblok{#1}}%
+ \setvalue {\e!leeg#1}{\doleegblok{#1}}}
% \setupfloat[...][leftmargindistance=1cm,default={left,none}]
@@ -1370,6 +1297,66 @@
{\hsize\wd\tempfloatbox
\putcompletecaption{#4}{#2}{#3}{0}}}
+% \def\dopreparestackcaptionaut#1#2#3#4%
+% {\doifsomething\@@kjkjuitlijnen
+% {\ExpandBothAfter\doifnotinset\v!midden\@@kjkjuitlijnen
+% {\let\captionovershoot\!!zeropoint}}%
+% \ifdim\wd\tempfloatbox>\hsize
+% % float is wider than \hsize
+% \dosetraggedvbox\@@kjkjuitlijnen
+% \setbox\scratchbox\raggedbox % trial run
+% {\hsize\wd\tempfloatbox
+% \notesenabledfalse
+% \putcompletecaption{#4}{#2}{#3}{0}}%
+% \ifdim\ht\scratchbox>\lineheight % more lines
+% \dosetraggedvbox\@@kjkjuitlijnen
+% \setbox\tempcaptionbox\raggedbox
+% {\hsize\wd\tempfloatbox
+% \advance\hsize -\captionovershoot\relax
+% \ifdim\hsize<\captionminwidth\relax
+% \hsize\wd\tempfloatbox
+% \fi
+% \putcompletecaption{#4}{#2}{#3}{0}}%
+% \else
+% \setbox\tempcaptionbox\raggedbox
+% {\hsize\wd\tempfloatbox
+% \putcompletecaption{#4}{#2}{#3}{0}}%
+% \fi
+% \else
+% % float is smaller of equal to \hsize
+% \ifdim\wd\tempfloatbox<\captionminwidth\relax
+% \scratchdimen\captionminwidth % float smaller than min width
+% \else
+% \scratchdimen\wd\tempfloatbox % float width
+% \fi
+% \setbox\scratchbox\vbox % test with overshoot
+% {\advance\scratchdimen \captionovershoot
+% \advance\scratchdimen 3em % an average word length
+% \ifdim\scratchdimen<\hsize \hsize\scratchdimen \fi
+% \notesenabledfalse
+% \putcompletecaption{#4}{#2}{#3}{0}}%
+% \ifdim\ht\scratchbox>\lineheight
+% % at least an average word longer than a line
+% \dosetraggedvbox\@@kjkjuitlijnen
+% \setbox\tempcaptionbox\raggedbox
+% {\advance\scratchdimen \captionovershoot
+% \ifdim\scratchdimen<\hsize \hsize\scratchdimen \fi
+% \putcompletecaption{#4}{#2}{#3}{0}}%
+% \else
+% % just over a line, don't use an overshoot
+% \doifinsetelse\@@kjkjuitlijnen{\v!links,\v!rechts}
+% {\dosetraggedvbox\@@kjkjuitlijnen
+% \setbox\tempcaptionbox\raggedbox
+% {\hsize\scratchdimen
+% \raggedcenter
+% \putcompletecaption{#4}{#2}{#3}{0}}}
+% {% nicer
+% \setbox\tempcaptionbox\cbox
+% {\hsize\scratchdimen
+% \putcompletecaption{#4}{#2}{#3}{0}}}%
+% \fi
+% \fi}
+
\def\dopreparestackcaptionaut#1#2#3#4%
{\doifsomething\@@kjkjuitlijnen
{\ExpandBothAfter\doifnotinset\v!midden\@@kjkjuitlijnen
@@ -1421,7 +1408,7 @@
{\dosetraggedvbox\@@kjkjuitlijnen
\setbox\tempcaptionbox\raggedbox
{\hsize\scratchdimen
- \raggedcenter
+% strange : \raggedcenter
\putcompletecaption{#4}{#2}{#3}{0}}}
{% nicer
\setbox\tempcaptionbox\cbox
diff --git a/tex/context/base/page-imp.tex b/tex/context/base/page-imp.tex
index 29501a833..ac2d2b0c5 100644
--- a/tex/context/base/page-imp.tex
+++ b/tex/context/base/page-imp.tex
@@ -164,6 +164,12 @@
{\setbox0\hbox{#1}% just in case there are objects there
\setbox\scratchbox\hbox
{\the\everyshipout\relax
+ % so, these two come *after* the main one
+ \ifcase\realfolio \or
+ \the\everyfirstshipout
+ \global\everyfirstshipout\emptytoks
+ \fi
+ % one page document can do both
\ifnum\realpageno=\lastpage\relax
\flushtextdata
\the\everylastshipout
diff --git a/tex/context/base/page-ini.tex b/tex/context/base/page-ini.tex
index 1a4fda7f0..07ca4dea2 100644
--- a/tex/context/base/page-ini.tex
+++ b/tex/context/base/page-ini.tex
@@ -664,6 +664,19 @@
\newtoks \mainoutput
\newcount\otrlevel
+% Shipout handler (see page[stop] for example usage)
+
+\ifx\undefined\normalshipout \let\normalshipout=\shipout \fi
+
+\def\noshipout
+ {\writestatus\m!systems{ignoring further shipouts}%
+ \dowithnextbox{\deadcycles\zerocount}}
+
+\def\doignorerestoftext
+ {\ifarrangingpages \else \ifnum\textlevel>\zerocount \else
+ \globallet\shipout\noshipout
+ \fi \fi}
+
% When issuing two \par\penalty-\@M's, only the first
% triggers the otr; obscure feature or optimization?
@@ -1185,9 +1198,9 @@
{\chardef\showgridstate\plusone % downward compatible default
\processaction
[#1]%
- [\v!reset=>\chardef\showgridstate0,
- %\v!onder=>\chardef\showgridstate1,%
- \v!boven=>\chardef\showgridstate2]}
+ [\v!reset=>\chardef\showgridstate\zerocount,
+ %\v!onder=>\chardef\showgridstate\plusone,
+ \v!boven=>\chardef\showgridstate\plustwo]}
\def\buildpagebox#1%
{\setbox#1\vbox to \papierhoogte
@@ -1610,6 +1623,12 @@
\od
\filluparrangedpages}
+\installpagebreakhandler \v!start
+ {\globallet\shipout\normalshipout}
+
+\installpagebreakhandler \v!stop
+ {\globallet\shipout\noshipout}
+
% nb: \executepagebreakhandler\v!hoofd in other ones
\installpagebreakhandler \v!hoofd
@@ -1838,4 +1857,4 @@
\box#3%
\egroup}
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex
index dd93d2101..24e28e67b 100644
--- a/tex/context/base/page-lay.tex
+++ b/tex/context/base/page-lay.tex
@@ -281,10 +281,7 @@
{\ifsecondargument
\getparameters
[\??pp#1] % geen \c!schaal, scheelt hash ruimte
- [\c!breedte=\@@ppbreedte,
- \c!hoogte=\@@pphoogte,
- \c!offset=\@@ppoffset,
- #2]%
+ [\c!breedte=\@@ppbreedte,\c!hoogte=\@@pphoogte,\c!offset=\@@ppoffset,#2]%
\else
\getparameters[\??pp][#1]%
\setuppapersize
@@ -355,6 +352,60 @@
{\getparameters[\??pp#1][#2]}
{\dodosetuppapersize[#1][#2]}}}
+% \def\dodosetuppapersize[#1][#2]%
+% {\ifsecondargument
+% \xdef\restorepapersize
+% {\noexpand\setuppapersize[#1][#2]}%
+% \dostelpapierrichtingin{#1}\paperlandscape\paperrotation\paperreverse\papermirror
+% \dostelpapierrichtingin{#2}\printlandscape\printrotation\printreverse\printmirror
+% \def\docommando##1%
+% {\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
+% {\global\papierbreedte\getvalue{\??pp##1\c!breedte}%
+% \global\papierhoogte\getvalue{\??pp##1\c!hoogte}%
+% \calculatepaperoffsets{##1}%
+% \xdef\papersize{##1}}}}%
+% \processcommacommand[#1]\docommando
+% \doifdefinedelse{\??pp#1\c!schaal}
+% {\edef\paperscale{\getvalue{\??pp#1\c!schaal}}}
+% {\edef\paperscale{1}}%
+% \def\docommando##1%
+% {\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
+% {\global\printpapierbreedte\getvalue{\??pp##1\c!breedte}%
+% \global\printpapierhoogte\getvalue{\??pp##1\c!hoogte}%
+% \xdef\printpapersize{##1}}}}%
+% \processcommacommand[#2]\docommando
+% \global\setdimentoatleast\papierbreedte \onepoint
+% \global\setdimentoatleast\papierhoogte \onepoint
+% \global\setdimentoatleast\printpapierbreedte\onepoint
+% \global\setdimentoatleast\printpapierhoogte \onepoint
+% \ifcase\paperlandscape\else
+% \doglobal\swapdimens\papierbreedte\papierhoogte
+% \fi
+% \ifcase\printlandscape\else
+% \doglobal\swapdimens\printpapierbreedte\printpapierhoogte
+% \fi
+% % this check can be confusing, maybe we should add
+% % an option \setuppapersize[option=fit] or so
+% \ifdim\papierhoogte>\printpapierhoogte
+% \global\printpapierhoogte\papierhoogte
+% \writestatus\m!systems{print height forced to paper height}%
+% \fi
+% \ifdim\papierbreedte>\printpapierbreedte
+% \global\printpapierbreedte\papierbreedte
+% \writestatus\m!systems{print width forced to paper width}%
+% \fi
+% %
+% \calculatehsizes
+% \calculatevsizes
+% \recalculatelogos
+% \recalculatebackgrounds
+% \recalculatelayout
+% \else\iffirstargument
+% \setuppapersize[#1][#2]%
+% \else\ifx\papersize\undefined\else
+% \restorepapersize
+% \fi\fi\fi}
+
\def\dodosetuppapersize[#1][#2]%
{\ifsecondargument
\xdef\restorepapersize
@@ -387,12 +438,23 @@
\ifcase\printlandscape\else
\doglobal\swapdimens\printpapierbreedte\printpapierhoogte
\fi
- \ifdim\papierhoogte>\printpapierhoogte
- \global\printpapierhoogte\papierhoogte
- \fi
- \ifdim\papierbreedte>\printpapierbreedte
- \global\printpapierbreedte\papierbreedte
- \fi
+ % this check can be confusing, so we've added the possibility
+ % to bypass this test: \setuppapersize[option=fit]
+ \doif\@@ppoptie\v!max % \v!fit is
+ {\bgroup
+ % we need to pre-swap else we get the wrong paper size
+ \doifinset\paperrotation{90,270}{\swapdimens\papierbreedte\papierhoogte}%
+ \doifinset\printrotation{90,270}{\swapdimens\printpapierbreedte\printpapierhoogte}%
+ \ifdim\papierhoogte>\printpapierhoogte
+ \global\printpapierhoogte\papierhoogte
+ \writestatus\m!systems{print height forced to paper height}%
+ \fi
+ \ifdim\papierbreedte>\printpapierbreedte
+ \global\printpapierbreedte\papierbreedte
+ \writestatus\m!systems{print width forced to paper width}%
+ \fi
+ \egroup}%
+ %
\calculatehsizes
\calculatevsizes
\recalculatelogos
@@ -854,8 +916,7 @@
\def\rotatepagebodybox#1#2#3%
{\ifnum#2#3>\zerocount
\setbox#1\vbox
- {\edef\somerotation
- {\ifdubbelzijdig\ifodd\realpageno#2\else#3\fi\else#2\fi}%
+ {\edef\somerotation{\ifdubbelzijdig\ifodd\realpageno#2\else#3\fi\else#2\fi}%
\dorotatebox\somerotation\hbox{\box#1}}%
\fi}
@@ -1279,7 +1340,27 @@
\c!bodemwit=\!!zeropoint]
%D First we define a whole range of (DIN) papersizes,
-%D of which the A-series makes most sense.
+%D of which the A-series makes most sense. We enable checking.
+
+%D We also set some of the parameters that will be used when
+%D positioning the typeset paper onto the print paper.
+
+\setuppaper % (size) % only used in XY imposition
+ [\c!breedte=\zeropoint,
+ \c!hoogte=\zeropoint,
+ \c!kopwit=\zeropoint,
+ \c!rugwit=\zeropoint,
+ \c!dx=\zeropoint,
+ \c!dy=\zeropoint,
+ \c!nx=1,
+ \c!ny=1]
+
+\setuppapersize
+ [\c!optie=\v!max,
+ \c!boven=,
+ \c!onder=\vss,
+ \c!links=,
+ \c!rechts=\hss]
\definepapersize [A0] [\c!breedte=841mm,\c!hoogte=1189mm]
\definepapersize [A1] [\c!breedte=594mm,\c!hoogte=841mm]
@@ -1372,25 +1453,6 @@
\setuppapersize
[A4][A4]
-%D We also set some of the parameters that will be used when
-%D positioning the typeset paper onto the print paper.
-
-\setuppaper % (size) % only used in XY imposition
- [\c!breedte=\zeropoint,
- \c!hoogte=\zeropoint,
- \c!kopwit=\zeropoint,
- \c!rugwit=\zeropoint,
- \c!dx=\zeropoint,
- \c!dy=\zeropoint,
- \c!nx=1,
- \c!ny=1]
-
-\setuppapersize
- [\c!boven=,
- \c!onder=\vss,
- \c!links=,
- \c!rechts=\hss]
-
%D A few goodies:
\beginETEX \dimexpr
diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex
index d469c9361..953019775 100644
--- a/tex/context/base/page-lyr.tex
+++ b/tex/context/base/page-lyr.tex
@@ -19,6 +19,8 @@
% displacement. Should be an option, on by default
% (compatibility).
+% positie=forceer == ja maar dan ook in status=herhaal
+
%D The layering mechanism implemented here is independent of
%D the output routine, but future extensions may depend on a
%D more close cooperation.
@@ -134,24 +136,6 @@
\dodosetlayer[#1][][#2]%
\fi}}
-% \def\dodosetlayer[#1][#2][#3]% #2 = links/rechts
-% {\bgroup
-% \recalculatebackgrounds
-% \recalculatelogos
-% \doglobal\increment\currentlayerdata
-% \forgetall
-% \dontcomplain
-% \doifvalue{\??ll#1\c!optie}\v!test\tracelayerstrue
-% \iftracelayers\traceboxplacementtrue\fi
-% \dowithnextbox % sneller als aparte macro
-% {\ifundefined{\@@layerbox#1}%
-% \writestatus{layer}{unknown layer #1}%
-% \else
-% \dododosetlayer[#1][#2][#3]%
-% \fi
-% \egroup}
-% \hbox}
-
\def\dodosetlayer[#1][#2][#3]% #2 = links/rechts
{\bgroup
\recalculatebackgrounds
@@ -221,29 +205,26 @@
\newdimen\layerwidth
\newdimen\layerheight
+\chardef\@@lacome=1 % LAyerCOnstructionMEthod / temp, will be default
+
\def\dododosetlayer[#1][#2][#3]% will be sped up
{% we use the global width, never change this
\def\currentlayer{#1}%
\@@layerxsiz\layerparameter\c!breedte
\@@layerysiz\layerparameter\c!hoogte
-\layerwidth \@@layerxsiz
-\layerheight\@@layerysiz
+ \layerwidth \@@layerxsiz
+ \layerheight\@@layerysiz
% preroll
\getparameters[\??ll#1][#3]%
% presets and real roll
- \doifdefined{\??ll\??ll\layerparameter\c!preset}
- {\getvalue{\??ll\??ll\layerparameter\c!preset}{#1}{#3}}%
+ \executeifdefined{\??ll\??ll\layerparameter\c!preset}\gobbletwoarguments{#1}{#3}%
% that was real slow
- \doifvalue{\??ll#1\c!positie}\v!overlay % slow
- {\getparameters[\??ll#1]
- [\c!breedte=\zeropoint,
- \c!hoogte=\zeropoint,
- \c!positie=\v!ja]}%
- \doifvaluesomething{\??ll#1\c!rotatie}
+ \doif{\layerparameter\c!positie}\v!overlay % slow
+ {\getparameters[\??ll\currentlayer][\c!breedte=\zeropoint,\c!hoogte=\zeropoint,\c!positie=\v!ja]}%
+ \doifsomething{\layerparameter\c!rotatie}
{\setbox\nextbox\hbox
- {\rotate
- [\c!plaats=\v!hoog,
- \c!rotatie=\layerparameter\c!rotatie]
+ {\rotate % to be checked with new rotation
+ [\c!plaats=\v!hoog,\c!rotatie=\layerparameter\c!rotatie]
{\flushnextbox}}}%
% no, not local
% \@@layerxsiz\layerparameter\c!breedte
@@ -251,19 +232,17 @@
% never change that
\@@layerxpos\layerparameter\c!x
\@@layerypos\layerparameter\c!y
- \doifelsevalue{\??ll#1\c!hoffset}\v!max
- {\@@layerxoff\@@layerxsiz}
- {\@@layerxoff\layerparameter\c!hoffset}%
- \doifelsevalue{\??ll#1\c!voffset}\v!max
- {\@@layeryoff\@@layerysiz}
- {\@@layeryoff\layerparameter\c!voffset}%
+ \doifelse{\layerparameter\c!hoffset}\v!max
+ {\@@layerxoff\@@layerxsiz}{\@@layerxoff\layerparameter\c!hoffset}%
+ \doifelse{\layerparameter\c!voffset}\v!max
+ {\@@layeryoff\@@layerysiz}{\@@layeryoff\layerparameter\c!voffset}%
\advance\@@layerxoff\layerparameter\c!offset
\advance\@@layeryoff\layerparameter\c!offset
\@@layerxpos\layerparameter\c!sx\@@layerxpos
\@@layerypos\layerparameter\c!sy\@@layerypos
\@@layerxoff\layerparameter\c!sx\@@layerxoff
\@@layeryoff\layerparameter\c!sy\@@layeryoff
- \doifelsevalue{\??ll#1\c!positie}\v!ja % combine ^
+ \doifelse{\layerparameter\c!positie}\v!ja % combine ^
{\setlastlayerpos{#2#1}% todo l/r %%%%%%%%%%%%
\@@layerxpos\lastlayerxpos
\@@layerypos\lastlayerypos
@@ -313,55 +292,92 @@
\doifundefined{\@@layerbox#2#1\layerpage}
{\global\expandafter\newbox\csname\@@layerbox#2#1\layerpage\endcsname}}%
\dontcomplain % more comfortable
- \global\setbox\csname\@@layerbox#2#1\layerpage\endcsname\vbox
- to \layerparameter\c!hoogte % new, otherwise no negative y possible
+ \chardef\layerpagebox\csname\@@layerbox#2#1\layerpage\endcsname
+ \ifvoid\layerpagebox
+ \gsetboxllx\layerpagebox\zeropoint
+ \gsetboxlly\layerpagebox\zeropoint
+ \fi
+ \global\setbox\layerpagebox\vbox %to \layerparameter\c!hoogte % new, otherwise no negative y possible
{\offinterlineskip
- \hsize\layerparameter\c!breedte % new, keep box small
- \ifvoid\csname\@@layerbox#1\layerpage\endcsname\else
- \ht\csname\@@layerbox#2#1\layerpage\endcsname\zeropoint
- \dp\csname\@@layerbox#2#1\layerpage\endcsname\zeropoint
- \wd\csname\@@layerbox#2#1\layerpage\endcsname\zeropoint
- \doifnotvalue{\layerparameter\c!richting}\v!omgekeerd
- {\box\csname\@@layerbox#2#1\layerpage\endcsname}%
+ %postpone, to after nextboxwd correction % \hsize\layerparameter\c!breedte % new, keep box small
+ %\ifvoid\csname\@@layerbox#1\layerpage\endcsname\else % why not #2#1
+ \ifvoid\layerpagebox
+ \let\lastlayerwidth \zeropoint
+ \let\lastlayerheight\zeropoint
+ \else
+ \edef\lastlayerwidth {\the\wd\layerpagebox}%
+ \edef\lastlayerheight{\the\ht\layerpagebox}%
+ \ht\layerpagebox\zeropoint
+ \dp\layerpagebox\zeropoint
+ \wd\layerpagebox\zeropoint
+ \doifnotvalue{\layerparameter\c!richting}\v!omgekeerd{\box\layerpagebox}%
\fi
- \xdef\lastlayerwd{\the\wd\nextbox}%
- \xdef\lastlayerht{\the\ht\nextbox}% % not entirely ok when grid !
- \xdef\lastlayerdp{\the\dp\nextbox}% % not entirely ok when grid !
- \doifelsevalue{\??ll#1\c!plaats}\v!grid\donetrue\donefalse
- \ifdone
- \nextboxht\strutheight
- \nextboxdp\strutdepth
- \else
- \setbox\nextbox\hbox
- {\alignedbox[\layerparameter\c!plaats]\vbox{\flushnextbox}}%
- \fi
- \ifnum\layerparameter\c!regel=\zerocount\else % no \ifcase, can be negative
- \advance\@@layerypos \layerparameter\c!regel\lineheight
- \advance\@@layerypos \topskip
- \advance\@@layerypos-\lineheight
- \advance\@@layerypos-\nextboxht
- \fi
- \ifnum\layerparameter\c!kolom=\zerocount\else % no \ifcase, can be negative
- \advance\@@layerxpos \layoutcolumnoffset{\layerparameter\c!kolom}%
- \fi
-\ifdone
- \setbox\nextbox\hbox
- {\alignedbox[rb]\vbox{\flushnextbox}}%
-\fi
- \smashbox\nextbox
- \vskip\@@layerypos
- \vskip\@@layeryoff
- \hskip\@@layerxpos
- \hskip\@@layerxoff
- \flushnextbox
- \ifvoid\csname\@@layerbox#2#1\layerpage\endcsname
- % already flushed
+ % don't move
+ \xdef\lastlayerwd{\wd\nextboxwd}%
+ \xdef\lastlayerht{\ht\nextboxht}% % not entirely ok when grid !
+ \xdef\lastlayerdp{\dp\nextboxdp}% % not entirely ok when grid !
+ % this code
+ \doifelse{\layerparameter\c!plaats}\v!grid\donetrue\donefalse
+ \ifdone
+ \nextboxht\strutheight
+ \nextboxdp\strutdepth
\else
- % the reverse case % check !
- \vskip-\@@layerypos
- \vskip-\@@layeryoff
- \box\csname\@@layerbox#2#1\layerpage\endcsname
- \fi}%
+ \setbox\nextbox\hbox{\alignedbox[\layerparameter\c!plaats]\vbox{\flushnextbox}}%
+ \fi
+ \ifnum\layerparameter\c!regel=\zerocount\else % no \ifcase, can be negative
+ \advance\@@layerypos \layerparameter\c!regel\lineheight
+ \advance\@@layerypos \topskip
+ \advance\@@layerypos-\lineheight
+ \advance\@@layerypos-\nextboxht
+ \fi
+ \ifnum\layerparameter\c!kolom=\zerocount\else % no \ifcase, can be negative
+ \advance\@@layerxpos \layoutcolumnoffset{\layerparameter\c!kolom}%
+ \fi
+ \ifdone
+ \setbox\nextbox\hbox{\alignedbox[rb]\vbox{\flushnextbox}}%
+ \fi
+ % ll registration
+ \scratchdimen\@@layerxpos
+ \advance\scratchdimen\@@layerxoff
+ \ifdim\scratchdimen<\getboxllx\layerpagebox
+ \gsetboxllx\layerpagebox\scratchdimen
+ \fi
+\ifcase\@@lacome\or % this test will become obsolete
+ \advance\scratchdimen\nextboxwd
+ \nextboxwd\ifdim\scratchdimen>\lastlayerwidth \scratchdimen \else \lastlayerwidth \fi
+\fi
+ \scratchdimen\@@layerypos
+ \advance\scratchdimen\@@layeryoff
+ \ifdim\scratchdimen<\getboxlly\layerpagebox
+ \gsetboxlly\layerpagebox\scratchdimen
+ \fi
+ % ll compensation
+\ifcase\@@lacome\or % this test will become obsolete
+ \advance\scratchdimen\nextboxht
+ \advance\scratchdimen\nextboxdp
+ \nextboxht\ifdim\scratchdimen>\lastlayerheight \scratchdimen \else \lastlayerheight \fi
+ \nextboxdp\zeropoint
+\fi
+ % placement
+ \hsize\layerparameter\c!breedte % new, keep box small
+ \vbox to \layerparameter\c!hoogte \bgroup
+ \smashbox\nextbox
+ \vskip\@@layerypos
+ \vskip\@@layeryoff
+ \hskip\@@layerxpos
+ \hskip\@@layerxoff
+ \flushnextbox
+ \ifvoid\layerpagebox
+ % already flushed
+ \else
+ % the reverse case % check !
+ \vskip-\@@layerypos
+ \vskip-\@@layeryoff
+ \box\layerpagebox
+ \fi
+ \egroup}%
+ % when position is true, the layerbox holds the compensation and needs
+ % to be placed; never change this !
\ifvoid\layerbox\else\box\layerbox\fi}
%D Given the task to be accomplished, the previous macro is
@@ -371,6 +387,19 @@
%D reference point is chosen.
%D \macros
+%D {doifelselayerdata}
+%D
+
+\def\doifelselayerdata#1%
+ {\ifundefined{\@@layerbox#1}%
+ \@EA\secondoftwoarguments
+ \else\ifvoid\csname\@@layerbox#1\endcsname
+ \@EAEAEA\secondoftwoarguments
+ \else
+ \@EAEAEA\firstoftwoarguments
+ \fi\fi}
+
+%D \macros
%D {flushlayer}
%D
%D When we flush a layer, we flush both the main one and the
@@ -378,48 +407,6 @@
%D efficient in \ETEX\ since there testing for an undefined
%D macro does not takes hash space.
-% \unexpanded\def\flushlayer[#1]%
-% {\doifnotvalue{\??ll#1\c!status}{\v!stop}
-% {\startoverlay
-% {\doflushlayer1{#1}{#1}}
-% {\doflushlayer0{#1}{#1:\realfolio}}
-% \stopoverlay}}
-%
-% \def\doflushlayer#1#2#3%
-% {\ifundefined{\@@layerbox#3}%
-% \ifcase#1\else\writestatus{layer}{unknown layer #3}\fi
-% \else
-% \doifvalue{\??ll#2\c!optie}{\v!test}
-% {\traceboxplacementtrue\tracelayerstrue}%
-% \iftracelayers \ruledvbox \else \vbox \fi to \overlayheight
-% {\forgetall
-% \hbox to \overlaywidth
-% {\doifvalue{\??ll#3\realfolio\c!positie}{\v!ja}
-% {\xypos{lyr:#3:\realfolio}}%
-% \let\next\box
-% \ifcase#1\else
-% \doifnotvalue{\??ll#2\c!positie}{\v!ja}
-% {\doifvalue{\??ll#2\c!status}{\v!herhaal}
-% {\let\next\copy}}%
-% \fi
-% \next\csname\@@layerbox#3\endcsname
-% \hss}%
-% \vss}%
-% \fi}
-
-% \unexpanded\def\flushlayer[#1]%
-% {\doifelsevalue{\??ll#1\c!dubbelzijdig}\v!ja
-% {\doifundefinedelse{\@@layerbox#1}%
-% {\dodoflushlayerA[#1]}
-% {\doifbothsidesoverruled
-% \dodoflushlayerB[#1][\v!links]% left
-% \orsideone
-% \dodoflushlayerB[#1][\v!rechts]% right
-% \orsidetwo
-% \dodoflushlayerB[#1][\v!links]% left
-% \od}}
-% {\dodoflushlayerA[#1]}}
-
\unexpanded\def\flushlayer[#1]%
{\doifelsevalue{\??ll#1\c!status}\v!volgende
{\global\letvalue{\??ll#1\c!status}\v!start} % dangerous, stack-built-up
@@ -442,15 +429,6 @@
{\dodoflushlayer0{#1}{#1:\realfolio}}
\stopoverlay}}
-% \def\dodoflushlayerB[#1][#2]%
-% {\doifnotvalue{\??ll#1\c!status}\v!stop
-% {\startoverlay
-% {\dodoflushlayer1{#1}{#1}}
-% {\dodoflushlayer0{#1}{#1:\realfolio}}
-% {\dodoflushlayer1{#1}{#2#1}}
-% {\dodoflushlayer0{#1}{#2#1:\realfolio}}
-% \stopoverlay}}
-
\def\dodoflushlayerB#1[#2]%
{\doifnotvalue{\??ll#2\c!status}\v!stop
{\startoverlay
@@ -460,58 +438,65 @@
{\dodoflushlayer0{#2}{#1#2:\realfolio}}
\stopoverlay}}
-% \def\dodoflushlayer#1#2#3%
-% {\ifundefined{\@@layerbox#3}%
-% \ifcase#1\else\writestatus{layer}{unknown layer #3}\fi
-% \else
-% \doifvalue{\??ll#2\c!optie}\v!test\tracelayerstrue
-% \iftracelayers\traceboxplacementtrue\fi
-% \doifelsevalue{\??ll#2\c!methode}\v!tekst\donetrue\donefalse
-% \iftracelayers \ruledvbox \else \vbox \fi \ifdone \else to \overlayheight \fi
-% {\forgetall
-% \hbox \ifdone \else to \overlaywidth \fi
-% {% klopt dit? #3 en niet #2 ?
-% \doifvalue{\??ll#3\realfolio\c!positie}\v!ja
-% {\xypos{lyr:#3:\realfolio}}%
-% \let\next\box
-% \ifcase#1\else
-% \doifnotvalue{\??ll#2\c!positie}\v!ja
-% {\doifvalue{\??ll#2\c!status}\v!herhaal
-% {\let\next\copy}}%
-% \fi
-% \next\csname\@@layerbox#3\endcsname
-% \hss}%
-% \vss}%
-% \fi}
-
\def\dodoflushlayer#1#2#3%
{\ifundefined{\@@layerbox#3}%
\ifcase#1\else\writestatus{layer}{unknown layer #3}\fi
\else
+ \bgroup
+ \forgetall
+ \offinterlineskip
\doifvalue{\??ll#2\c!optie}\v!test\tracelayerstrue
\iftracelayers\traceboxplacementtrue\fi
- \doifelsevalue{\??ll#2\c!methode}\v!tekst\donetrue\donefalse
- \iftracelayers \ruledvbox \else \vbox \fi \ifdone \else to \overlayheight \fi
- {\forgetall
- \hbox \ifdone \else to \overlaywidth \fi
+ \!!doneafalse
+ \!!donebfalse
+ \doifvalue{\??ll#2\c!methode}\v!overlay\!!doneatrue
+ \doifvalue{\??ll#2\c!methode}\v!passend\!!donebtrue
+ \!!donectrue
+ \ifcase#1\else
+ \doifnotvalue{\??ll#2\c!positie}\v!ja
+ {\doifvalue{\??ll#2\c!herhaal}\v!ja\!!donecfalse
+ \doifvalue{\??ll#2\c!status}\v!herhaal\!!donecfalse}% old method
+ \fi
+ \chardef\layerbox\csname\@@layerbox#3\endcsname
+ % we need to copy in order to retain the negative offsets for a next
+ % stage of additions, i.e. llx/lly accumulate in repeat mode and the
+ % compensation is may differ each flush depending on added content
+ \setbox\nextbox \if!!doneb
+ \vbox
+ {\scratchdimen\getboxlly\layerbox
+ \vskip-\scratchdimen
+ \scratchdimen\getboxllx\layerbox
+ \hskip-\scratchdimen
+ \advance\scratchdimen-\wd\layerbox
+ \hsize-\scratchdimen
+ \if!!donec\box\else\copy\fi\layerbox}%
+ \else
+ \if!!donec\box\else\copy\fi\layerbox % sorry for the delay due to copying
+ \fi
+ \iftracelayers \ruledvbox \else \vbox \fi \if!!donea to \overlayheight \fi
+ {\hbox \if!!donea to \overlaywidth \fi
{% klopt dit? #3 en niet #2 ?
\doifvalue{\??ll#3\realfolio\c!positie}\v!ja
{\xypos{lyr:#3:\realfolio}}%
- \let\next\box
- \ifcase#1\else
- \doifnotvalue{\??ll#2\c!positie}\v!ja
- {\doifvalue{\??ll#2\c!status}\v!herhaal
- {\let\next\copy}}%
- \fi
\doifoverlayelse{#3}
- {\next\csname\@@layerbox#3\endcsname}%
- {\startlayoutcomponent{l:#3}{layer #3}%
- \next\csname\@@layerbox#3\endcsname
- \stoplayoutcomponent}%
+ {\box\nextbox}
+ {\startlayoutcomponent{l:#3}{layer #3}\box\nextbox\stoplayoutcomponent}%
\hss}%
\vss}%
+ \if!!donec
+ \gsetboxllx\layerbox\zeropoint
+ \gsetboxlly\layerbox\zeropoint
+ \fi
+ \egroup
\fi}
+% \definelayer[test][method=fit] \setupcolors[state=start] \tracelayerstrue
+%
+% \framed[framecolor=red,offset=overlay]{\setlayer[test]{aa}\setlayer[test][x=10pt]{g}\flushlayer[test]}
+% \framed[framecolor=red,offset=overlay]{\setlayer[test]{aa}\setlayer[test][x=-10pt]{bb}\flushlayer[test]}
+% \framed[framecolor=red,offset=overlay]{\setlayer[test][x=-20pt]{cccccc}\flushlayer[test]}
+% \framed[framecolor=red,offset=overlay]{\setlayer[test]{dd}\setlayer[test][x=-20pt,y=-3pt]{eeeeee}\flushlayer[test]}
+
%D \macros
%D {composedlayer,placelayer,tightlayer}
%D
@@ -647,7 +632,7 @@
\c!xoffset=\!!zeropoint,%
\c!yoffset=\!!zeropoint]}
-\def\setuppositioning%
+\def\setuppositioning
{\resetpositioning
\dodoubleargument\getparameters[\??ps]}
diff --git a/tex/context/base/page-mar.tex b/tex/context/base/page-mar.tex
index 78118a418..2c4428128 100644
--- a/tex/context/base/page-mar.tex
+++ b/tex/context/base/page-mar.tex
@@ -16,6 +16,7 @@
\writestatus{loading}{Context Core Macros / Maginal Things}
% todo: compensate distance when setuplayout[textwidth=..]
+% todo: generalize margin/edge model, now too much duplication
\unprotect
@@ -100,7 +101,7 @@
\dostopattributes
\@@imna}%
\doif\@@imstapel\v!ja
- {\def\overlappingmargin{-2\s!sp}% test value, maybe .25\strutboxdp, maybe configurable
+ {\def\overlappingmargin{-20\scaledpoint}% test value, maybe .25\strutboxdp, maybe configurable
\setbox0\vbox{\stackeddown\vbox{\box0}}}% new
\ht0\strutht
\box0
@@ -145,9 +146,14 @@
{\llap{\plaatsmargetekstscheider}}{\hskip\margetekstafstand}
{#1}}
-\def\rechtermargetekstblok#1%
+% \def\rechtermargetekstblok#1%
+% {\maakmargetekstblok \rightmargintextwidth \v!rechts \v!links
+% {\hskip\margetekstafstand}{\rlap{\plaatsmargetekstscheider}}
+% {#1}}
+
+\def\rechtermargetekstblok#1% new: hsize correction
{\maakmargetekstblok \rightmargintextwidth \v!rechts \v!links
- {\hskip\margetekstafstand}{\rlap{\plaatsmargetekstscheider}}
+ {\hskip\margetekstafstand\hskip\tekstbreedte\hskip-\hsize }{\rlap{\plaatsmargetekstscheider}}
{#1}}
\def\doplacemargintext#1#2#3%
@@ -212,7 +218,7 @@
\definetwopasslist\s!margin
-\def\domarginreference
+\def\domarginreference % todo: use doonrightpage
{\doglobal\increment\nofmarginnotes\relax
\edef\writemarref
{\writeutilitycommand%
@@ -285,7 +291,7 @@
[\v!rechts][\doinlinker][\doinrechter]}
\def\inmarge
- {\doquintupleempty\doinmarge
+ { \doquintupleempty\doinmarge
[\@@implaats][\doinlinker][\doinrechter]}
\def\inanderemarge
@@ -499,10 +505,24 @@
\popindentation
\ignorespaces}
-\def\inrightmargin#1%
+% \def\inrightmargin#1%
+% {\pushindentation
+% \rlap
+% {\hskip\hsize
+% \hskip-\rightskip
+% \hskip\rechtermargeafstand
+% \hsize\rechtermargebreedte
+% #1}%
+% \popindentation
+% \ignorespaces}
+
+
+\def\inrightmargin#1% new: hsize correction
{\pushindentation
\rlap
- {\hskip\hsize
+ {\hskip\tekstbreedte
+ %\hskip-\hsize
+ %\hskip\hsize
\hskip-\rightskip
\hskip\rechtermargeafstand
\hsize\rechtermargebreedte
@@ -512,10 +532,10 @@
\def\inleftedge#1%
{\inleftmargin
- {\hsize\linkermargebreedte
- #1\relax
- \hskip\linkermargebreedte
- \hskip\linkerrandafstand}}
+ {\hsize\linkermargebreedte
+ #1\relax
+ \hskip\linkermargebreedte
+ \hskip\linkerrandafstand}}
\def\inrightedge#1%
{\inrightmargin
diff --git a/tex/context/base/page-new.tex b/tex/context/base/page-new.tex
index 6bab8a7d6..1c79f428c 100644
--- a/tex/context/base/page-new.tex
+++ b/tex/context/base/page-new.tex
@@ -1,11 +1,11 @@
-\unprotect
+\unprotect
-% clean up footnotes to notes
+% clean up footnotes to notes
-% We need to set the \dimen globally since we are in the
-% OTR. Unfortunately this interferes with local settings,
-% although we may assume that they will not cross page
-% boundaries.
+% We need to set the \dimen globally since we are in the
+% OTR. Unfortunately this interferes with local settings,
+% although we may assume that they will not cross page
+% boundaries.
\def\OTRSETcheckcontent
{\bgroup
@@ -17,16 +17,16 @@
\dorecurse{\nofcolumns}
{\OTRSETcheckcontent\columngettextbox
\OTRSETcheckcontent\columngetfootbox
- \OTRSETcheckcontent\columngettopbox
+ \OTRSETcheckcontent\columngettopbox
\OTRSETcheckcontent\columngetbotbox}%
- \ifdone\egroup\donefalse\else\egroup\donetrue\fi}
+ \ifdone\egroup\donefalse\else\egroup\donetrue\fi}
\def\OTRSETgetcolumntextheight#1% max - boven - top
{\scratchdimen=\OTRSETgetparameter\c!maxhoogte#1%
\advance\scratchdimen -\OTRSETgetparameter\c!bovenoffset#1%
\advance\scratchdimen -\ht\columntopbox#1%
\advance\scratchdimen -\getvalue{\??mc\number\mofcolumns-f}%
- \advance\scratchdimen -\ht\columnbotbox#1} % not used
+ \advance\scratchdimen -\ht\columnbotbox#1} % not used
\def\OTRSETgetcolumnnaturalheight#1% max - boven - top
{\setbox\scratchbox\vbox{\unvcopy\columntextbox#1}%
@@ -34,7 +34,7 @@
\advance\scratchdimen \OTRSETgetparameter\c!bovenoffset#1%
\advance\scratchdimen \ht\columntopbox#1%
\advance\scratchdimen -\getvalue{\??mc\number\mofcolumns-f}%
- \advance\scratchdimen \ht\columnbotbox#1} % not used
+ \advance\scratchdimen \ht\columnbotbox#1} % not used
\def\OTRSETdobalance% splitten in met en zonder footnotes
{\bgroup
@@ -44,13 +44,13 @@
\OTRSEToutput
{\global\setbox1\vbox{\unvbox\normalpagebox}%
\global\setbox3\vbox{\unvbox\footins}}%
- \verticalstrut\vskip-\struttotal % makes footnotes flush
+ \verticalstrut\vskip-\struttotal % makes footnotes flush
\eject
\global\collectingcontentfalse
- % check for footnotes only
- \ifdim\ht1<\topskip % real dirty
+ % check for footnotes only
+ \ifdim\ht1<\topskip % real dirty
\global\setbox1=\vbox{}
- % fix height of first line
+ % fix height of first line
\ifdim\ht3>\!!zeropoint
\global\setbox3\vbox
{\setfootnotebodyfont
@@ -58,19 +58,19 @@
\kern\topskip
\unvbox3}
\fi
- % prepare trial box
+ % prepare trial box
\global\setbox5\vbox
- {\ifdim\ht1>\zeropoint
+ {\ifdim\ht1>\zeropoint
\unvcopy1 \ifdim\ht3>\zeropoint \kern\skip\footins \fi
\fi
\ifdim\ht3>\zeropoint \unvcopy3 \fi}
\egroup
- % erase old stuff
+ % erase old stuff
\columnerasetextboxes
\columnerasefootboxes
% prepare floats
\OTRSETdotopinsertions
- \OTRSETdobotinsertions % not used can be removed
+ \OTRSETdobotinsertions % not used can be removed
% calculate available space
\!!heighta\zeropoint % available total height
\dorecurse{\nofcolumns}
@@ -82,30 +82,30 @@
% use normal routine
\columnerasetextboxes
\columnerasefootboxes
- % TEMP, TODO, FORCE NEXT PASS !
+ % TEMP, TODO, FORCE NEXT PASS !
\unvbox1
- \unvbox3
+ \unvbox3
\doglobal\addtocommalist{-\realfolio}\OTRSETbalancinglist
\donefalse
%\writestatus\m!columns{no balancing, text overflows height}%
\else\ifdim\ht5>\zeropoint \relax
% some text and/or notes
\donetrue
- \else
+ \else
\donefalse
\dorecurse\nofcolumns
{\ifdim\ht\columntopbox\recurselevel>\zeropoint \donetrue \fi}%
- \ifdone
- % no text and notes, but figures
+ \ifdone
+ % no text and notes, but figures
\else
- % no text, no notes, no figures
+ % no text, no notes, no figures
\doglobal\addtocommalist{-\realfolio}\OTRSETbalancinglist
\writestatus\m!columns{no balancing, nothing to be placed}%
\fi
\fi\fi
\ifdone
\ifdim\ht5>\zeropoint \relax
- % balancing text and notes
+ % balancing text and notes
%\writestatus\m!columns{text may fit, balancing}%
\newcounter\loopcounter
\newcounter\balancinglines
@@ -114,7 +114,7 @@
% initialize
\columnerasetextboxes
\columnerasefootboxes
- \setbox0=\copy5
+ \setbox0=\copy5
\splittopskip\topskip
% pre-split loop and quality calculation
%\writestatus\m!columns{pass \loopcounter: correction -\balancinglines}
@@ -126,7 +126,7 @@
\advance\!!heightc -\balancinglines\lineheight
\fi
\columnsettextbox\recurselevel\vsplit0 to \!!heightc}
- % just one method
+ % just one method
\OTRSETgetcolumnnaturalheight1 \dimen4\scratchdimen
\OTRSETgetcolumnnaturalheight\nofcolumns \dimen6\scratchdimen
%\writestatus\m!columns{first column: \the\dimen4}%
@@ -143,9 +143,9 @@
\decrement\balancinglines
\fi
\fi\fi
- % extra check
+ % extra check
% \ifdim\ht0>\zeropoint\relax \donefalse \fi
- % another check
+ % another check
\ifdone
%\writestatus\m!columns{balancing finished in pass \loopcounter}%
\else \ifnum\loopcounter>100 \donetrue
@@ -166,7 +166,7 @@
\ifnum\recurselevel<\nofcolumns
\advance\!!heightc -\balancinglines\lineheight
\fi
- % split off text
+ % split off text
\ifdim\ht0>\zeropoint
\columnsettextbox\recurselevel\vsplit0 to \!!heightc
\setbox4\vbox{\unvcopy\columntextbox\recurselevel}
@@ -177,7 +177,7 @@
\fi
\fi
% split off footnotes
- \ifdim\ht0>\zeropoint\relax \else
+ \ifdim\ht0>\zeropoint\relax \else
\ifdim\ht2>\zeropoint\relax
\setbox4\vsplit2 to \!!heightc
\setbox\footins=\vbox{\unvbox4} % ugly and dirty trick
@@ -194,7 +194,7 @@
\exitloop
\fi}
\else
- % no reason to balance floats
+ % no reason to balance floats
\fi
\fi
\doglobal\addtocommalist{\realfolio}\OTRSETbalancinglist
@@ -202,4 +202,62 @@
\fi
\egroup}
-\protect \endinput
+\protect \endinput
+
+% \def\OTRSETsetbalanceht#1#2% var col
+% {#1\getvalue{\??mc\OTRSETidentifier\number#2\c!regels}\relax
+% \ifcase#1#1\getvalue{\??mc\OTRSETidentifier\c!regels}\relax\fi
+% \ifcase#1#1\savedcolumnmaxcells\relax\fi}
+
+% \def\OTRSETinitbalancing
+% {\ifbalancecolumns
+% \let\savedcolumnmaxcells\columnmaxcells
+% \ifnum\realpageno=\balancingpageno\relax
+% \ifnum\mofcolumns=\plusone\relax
+% \ifcase\OTRSETbottombalance \else
+% \!!countc\zeropoint
+% \dorecurse\nofcolumns
+% {\OTRSETsetbalanceht\!!countb\recurselevel
+% \ifnum\!!countb>\!!countc\!!countc\!!countb\fi}%
+% \fi
+% \dorecurse\nofcolumns
+% {\!!counta\recurselevel\relax
+% % can be an option: absolute versus relative
+% \ifcase\OTRSETbottombalance
+% \OTRSETsetbalanceht\!!countb\recurselevel
+% \advance\!!countb\precolumnlines
+% \ifnum\!!countb>\localcolumnmaxcells\relax
+% \xdef\localcolumnmaxcells{\the\!!countb}%
+% \fi
+% \advance\!!countb \plusone
+% \dostepwiserecurse\!!countb\columnmaxcells\plusone
+% {\ifvoid\OTRSETgridcell\!!counta\recurselevel
+% \OTRSETsetgridcell\!!counta\recurselevel\copy\placeholderboxe
+% \fi}%
+% \else
+% \globallet\localcolumnmaxcells\columnmaxcells
+% \!!countb\!!countc
+% \advance\!!countb-\columnmaxcells
+% \!!countb-\!!countb
+% \advance\!!countb \minusone
+% \ifnum\!!countb>\zerocount
+% \dostepwiserecurse\plusone\!!countb\plusone
+% {\ifvoid\OTRSETgridcell\!!counta\recurselevel
+% \OTRSETsetgridcell\!!counta\recurselevel\copy\placeholderboxe
+% \fi}%
+% \OTRSETsetbalanceht\!!countb\recurselevel
+% \ifnum\!!countc>\!!countb
+% \!!countd\columnmaxcells
+% \advance\!!countd-\!!countc
+% \advance\!!countd+\!!countb
+% \dostepwiserecurse\!!countd\columnmaxcells\plusone
+% {\ifvoid\OTRSETgridcell\!!counta\recurselevel
+% \OTRSETsetgridcell\!!counta\recurselevel\copy\placeholderboxe
+% \fi}%
+% \fi
+% \fi
+% \fi}%
+% \OTRSETsetvsize % ! ! !
+% \fi
+% \fi
+% \fi}
diff --git a/tex/context/base/page-run.tex b/tex/context/base/page-run.tex
index 3709bc869..801ca4c6d 100644
--- a/tex/context/base/page-run.tex
+++ b/tex/context/base/page-run.tex
@@ -2,7 +2,7 @@
%D [ file=page-run,
%D version=2000.10.20,
%D title=\CONTEXT\ Page Macros,
-%D subtitle=Runtime Macros,
+%D subtitle=Runtime Macros,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
@@ -11,9 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\writestatus{loading}{Context Page Macros / Runtime Macros}
+\writestatus{loading}{Context Page Macros / Runtime Macros}
-\unprotect
+\unprotect
\gdef\doshowprint[#1][#2][#3]%
{\framed
@@ -97,7 +97,7 @@
\c!hoek=\v!recht,
\c!kaderoffset=\!!zeropoint,
\c!kaderdiepte=\!!zeropoint,
- \c!kaderkleur=green]
+ \c!kaderkleur=layout:page]
\setupbackgrounds
[#1][#2]
[\c!achtergrond=,
@@ -128,19 +128,19 @@
\gdef\showsetupB#1#2#3%
{#1&&#2#3&\tttf\string#3\cr}
-\iffixedlayoutdimensions
+\iffixedlayoutdimensions
\global\let\showsetupC=\showsetupA
\else % we could have used \@the
- \gdef\showsetupC#1#2% \relax is really needed here !
+ \gdef\showsetupC#1#2% \relax is really needed here !
{#1&\scratchdimen#2\PtToCm{\the\scratchdimen}&%
\scratchdimen#2\relax\the\scratchdimen&\tttf\string#2\cr}
\fi
-% \startinterface english % english is fallback
+% \startinterface english % english is fallback
\gdef\showsetups
{\noindent
@@ -184,7 +184,7 @@
\showsetupB{topskip} \relax \topskipfactor
\showsetupB{maxdepth} \relax \maxdepthfactor}}}
-% \stopinterface
+% \stopinterface
\startinterface dutch
@@ -283,7 +283,7 @@
\startinterface czech
-\gdef\showsetups%
+\gdef\showsetups%
{\noindent
\vbox
{\forgetall
@@ -391,4 +391,4 @@
\NC inner margin \NC \the\innermarginwidth \NC \NR
\stoptabulate}
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/page-set.tex b/tex/context/base/page-set.tex
index a4e98abc3..84327dc44 100644
--- a/tex/context/base/page-set.tex
+++ b/tex/context/base/page-set.tex
@@ -13,7 +13,7 @@
% getnoflines vs getrawnoflines
-% some day: cleanup
+% some day: cleanup and go etex
\writestatus{loading}{Context OTR Macros / Column Sets}
@@ -25,6 +25,8 @@
% todo : test page areas per page
% todo : leftmargin/rightmargin (better than afstand(1))
+% use the OTRSET layer for more purposes, like the footnotes !
+
\unprotect
\newcount\tofcolumns % total
@@ -50,20 +52,71 @@
\def\@otr@{otr}
-\def\OTRSETgridcell#1#2%
- {\csname\@otr@:\number#1:\number#2\endcsname}
+\def\OTRSETgridcell #1#2{\csname \@otr@:\number#1:\number#2\endcsname}
+\def\OTRSETgetgridcell#1#2{\box\csname \@otr@:\number#1:\number#2\endcsname}
+\def\OTRSETsetgridcell#1#2{\global\setbox\csname\@otr@:\number#1:\number#2\endcsname}
-\def\OTRSETgetgridcell#1#2%
- {\box\csname\@otr@:\number#1:\number#2\endcsname}
+\long\def\OTRSETdoifcellelse#1#2#3#4%
+ {\relax\ifvoid\csname\@otr@:\number#1:\number#2\endcsname#4\else#3\fi}
-\def\OTRSETsetgridcell#1#2%
- {\global\setbox\csname\@otr@:\number#1:\number#2\endcsname}
+\long\def\OTRSETdoifcellelse#1#2%
+ {\relax\ifvoid\csname\@otr@:\number#1:\number#2\endcsname
+ \@EA\secondoftwoarguments\else\@EA\firstoftwoarguments
+ \fi}
-% \def\OTRSETgetgridcell{\box \OTRSETgridcell}
-% \def\OTRSETsetgridcell{\global\setbox\OTRSETgridcell}
+% The following two macros are used to compensate for a switch in body fonts
+% as in:
+%
+% \definecolumnset [twee] [n=2,balanceren=ja]
+% \definecolumnset [three] [n=3,balanceren=ja]
+%
+% \setupcolumnsetlines[twee][1][1][7]
+% \setupcolumnsetlines[twee][1][2][10]
+%
+% \setupcolumnsetlines[three][1][1][40]
+% \setupcolumnsetlines[three][1][2][40]
+% \setupcolumnsetlines[three][1][3][40]
+%
+% \setupcolumnsetstart[three][1][1][15]
+% \setupcolumnsetstart[three][1][2][20]
+% \setupcolumnsetstart[three][1][3][20]
+%
+% \starttext
+% \startcolumnset [twee] \dorecurse {1}{\input tufte \par} \stopcolumnset
+% \switchnaarkorps[klein]
+% \startcolumnset [three] \dorecurse {1}{\input tufte \par} \stopcolumnset
+% \stoptext
+
+\def\OTRSETsetcorrectnofcells#1%
+ {\bgroup
+ \!!counta#1\relax
+ \ifdim\globalbodyfontsize=\localbodyfontsize
+ % already ok
+ \else
+ \!!dimena-\!!counta\lineheight
+ \restoreglobalbodyfont % slow, we need a fast one
+ \advance\!!dimena\!!counta\lineheight
+ \getnoflines\!!dimena
+ \advance\!!counta\noflines
+ \ifnum\!!counta<#1\else
+ \!!counta#1\relax
+ \fi
+ \fi
+ \relax % needed ! ! ! ! else lookahead over \fi and \@EA
+ \@EA\egroup\@EA\scratchcounter\the\!!counta\relax}
+
+\def\OTRSETsetcorrectcellht
+ {\bgroup
+ \!!dimena-\strutht\relax
+ \ifdim\globalbodyfontsize=\localbodyfontsize
+ % already ok
+ \else
+ \restoreglobalbodyfont
+ \fi
+ \advance\!!dimena\strutht
+ \relax % needed ! ! ! ! else lookahead over \fi and \@EA
+ \@EA\egroup\@EA\scratchdimen\the\!!dimena\relax}
-\long\def\OTRSETdoifcellelse#1#2#3#4%
- {\relax\ifvoid\csname\@otr@:\number#1:\number#2\endcsname#4\else#3\fi}
\beginETEX \ifcsname
@@ -185,112 +238,89 @@
\def\OTRSETerasegridcells#1#2#3#4%
{\doOTRSETsetgridcells{\box\voidb@x}{#1}{#2}{#3}{#4}{\box\voidb@x}}
-% \def\OTRSETsetfreecells#1#2% col start
-% {\global\columnfirstcell\ifnum#2=0 1\else#2\fi\relax
-% \ifnum\columnfirstcell>\columnmaxcells
-% \global\columnfreecells\zerocount
-% \global\columnfirstcell\plusone
-% \global\columnlastcell \zerocount
-% \global\somefreecolumncellsfalse
-% %\message{no cells a}%
-% \else
-% \doloop
-% {\ifnum\columnfirstcell>\columnmaxcells\relax
-% \exitloop
-% \else
-% \OTRSETdoifcellelse{#1}\columnfirstcell
-% {\global\advance\columnfirstcell\plusone}
-% {\exitloop}%
-% \fi}%
-% \global\columnlastcell\columnfirstcell
-% \doloop
-% {\ifnum\columnlastcell>\columnmaxcells\relax
-% \exitloop
-% \else
-% \OTRSETdoifcellelse{#1}\columnlastcell
-% {\global\advance\columnlastcell \minusone \exitloop}
-% {\global\advance\columnlastcell \plusone }%
-% \fi}%
-% \ifnum\columnfirstcell>\columnmaxcells
-% \global\columnfreecells\zerocount
-% \global\columnfirstcell\plusone
-% \global\columnlastcell \zerocount
-% \global\somefreecolumncellsfalse
-% %\message{no cells b}%
-% \else
-% \ifnum\columnlastcell>\columnmaxcells
-% \global\columnlastcell\columnmaxcells
-% \fi
-% \global\columnfreecells\columnlastcell
-% \global\advance\columnfreecells -\columnfirstcell
-% \global\advance\columnfreecells \plusone
-% \global\somefreecolumncellstrue
-% %\message{\number\columnfirstcell-\number\columnlastcell=\number\columnfreecells}%
-% \fi
-% \fi}
+\def\setupcolumnsetlines{\doquintupleempty\dosetupcolumnsettrick[l]}
+\def\setupcolumnsetstart{\doquintupleempty\dosetupcolumnsettrick[s]}
+
+\def\dosetupcolumnsettrick[#1][#2][#3][#4][#5]% tag id page col value
+ {% not needed, is already relative
+ % \doifinstringelse{+}{#3}{\scratchcounter\realpageno}{\scratchcounter\zerocount}%
+ % \advance\scratchcounter#3\relax % \relax needed
+ % \setevalue{\??mc:#1:#2:\the\scratchcounter:\number#4}{\number#5}}
+ \iffifthargument
+ \setevalue{\??mc:#1:#2:\number#3:\number#4}{\number#5}%
+ \else
+ \setevalue{\??mc:#1:#2:\number#3:0}{\number#4}%
+ \fi}
-% \def\OTRSETgetmaxfreecells#1#2% col start
-% {\scratchcounter\zerocount
-% \let\columnmaxfreecells\!!zerocount
-% \let\columnfrmfreecells\!!zerocount
-% \dostepwiserecurse{#2}\columnmaxcells\plusone
-% {\OTRSETdoifcellelse{#1}\recurselevel
-% {\ifnum\columnmaxfreecells<\scratchcounter
-% \edef\columnmaxfreecells{\the\scratchcounter}%
-% \let\columnfrmfreecells\recurselevel
-% \fi
-% \scratchcounter\zerocount}
-% {\advance\scratchcounter\plusone}}}
-
-\def\setupcolumnsetlines
- {\doquadrupleargument\dosetupcolumnsetlines}
-
-\def\dosetupcolumnsetlines[#1][#2][#3][#4]%
- {\setevalue{\??mc#1:#2:\number#3}{\number#4}}
+\def\currentcolumnmaxcellstag #1{\??mc:l:\OTRSETidentifier:\columnsetpage:\number#1}
+\def\currentcolumnstartcelltag#1{\??mc:s:\OTRSETidentifier:\columnsetpage:\number#1}
\beginTEX
-\def\currentcolumnmaxcells
- {\ifundefined{\??mc\OTRSETidentifier:\columnsetpage:\number\mofcolumns}%
- \columnmaxcells
- \else\ifnum\csname\??mc\OTRSETidentifier:\columnsetpage:\number\mofcolumns\endcsname=0
- \columnmaxcells
- \else
- \csname\??mc\OTRSETidentifier:\columnsetpage:\number\mofcolumns\endcsname
- \fi\fi}
+ \def\doresetcolumnsetlines#1%
+ {\ifundefined{\currentcolumnmaxcellstag{#1}}\else
+ \letgvalue{\currentcolumnmaxcellstag{#1}}\zerocount
+ \fi
+ \ifundefined{\currentcolumnmaxcellstag{#1}}\else
+ \letgvalue{\currentcolumnmaxcellstag{#1}}\zerocount
+ \fi}
+
+ \def\currentcolumnsomecells#1#2%
+ {\expandafter\ifx\csname#1\mofcolumns\endcsname\relax
+ \expandafter\ifx\csname#10\endcsname\relax
+ #2%
+ \else
+ \ifnum\csname#10\endcsname=\zerocount
+ #2\else\csname#10\endcsname
+ \fi
+ \fi
+ \else
+ \ifnum\csname#1\mofcolumns\endcsname=\zerocount
+ #2\else\csname#1\mofcolumns\endcsname
+ \fi
+ \fi}
\endTEX
-% in etex we also support negative numbers
-
-\def\currentcolumnmaxcellstag
- {\??mc\OTRSETidentifier:\columnsetpage:\number\mofcolumns}
-
\beginETEX \numexpr
-\def\currentcolumnmaxcells
- {\ifcsname\currentcolumnmaxcellstag\endcsname
- \ifnum\csname\currentcolumnmaxcellstag\endcsname=0
- \columnmaxcells
- \else
- \number\numexpr(\ifnum\csname\currentcolumnmaxcellstag\endcsname<0
- \columnmaxcells+\fi\csname\currentcolumnmaxcellstag\endcsname)%
+ \def\doresetcolumnsetlines#1%
+ {\ifcsname\currentcolumnmaxcellstag{#1}\endcsname
+ \letgvalue{\currentcolumnmaxcellstag{#1}}\zerocount
\fi
- \else
- \columnmaxcells
- \fi}
+ \ifcsname\currentcolumnmaxcellstag{#1}\endcsname
+ \letgvalue{\currentcolumnmaxcellstag{#1}}\zerocount
+ \fi}
+
+ \def\currentcolumnsomecells#1#2%
+ {\ifcsname#1\mofcolumns\endcsname
+ \ifnum\csname#1\mofcolumns\endcsname=\zerocount
+ #2%
+ \else
+ \number\numexpr(\ifnum\csname#1\mofcolumns\endcsname<\zerocount
+ \columnmaxcells+\fi\csname#1\mofcolumns\endcsname)%
+ \fi
+ \else\ifcsname#10\endcsname
+ \ifnum\csname#10\endcsname=\zerocount
+ #2%
+ \else
+ \number\numexpr(\ifnum\csname#10\endcsname<\zerocount
+ \columnmaxcells+\fi\csname#10\endcsname)%
+ \fi
+ \else
+ #2%
+ \fi\fi}
\endETEX
-\def\doresetcolumnsetlines#1%
- {\ifundefined{\??mc\OTRSETidentifier:\columnsetpage:\number#1}\else
- \letgvalue{\??mc\OTRSETidentifier:\columnsetpage:\number#1}\!!zerocount
- \fi}
+\def\currentcolumnmaxcells {\currentcolumnsomecells\currentcolumnmaxcellstag \columnmaxcells}
+\def\currentcolumnstartcell{\currentcolumnsomecells\currentcolumnstartcelltag\plusone}
\def\OTRSETsetfreecells#1#2% col start
- {\global\columnfirstcell\ifnum#2=0 1\else#2\fi\relax
- \pushmacro \columnmaxcells
- \edef\columnmaxcells{\currentcolumnmaxcells}%
+ {\bgroup
+ \global\columnfirstcell\ifnum#2=0 1\else#2\fi\relax
+\OTRSETsetcorrectnofcells\currentcolumnmaxcells % sets \scratchcounter
+\edef\columnmaxcells{\the\scratchcounter}%
\ifnum\columnfirstcell>\columnmaxcells
\global\columnfreecells\zerocount
\global\columnfirstcell\plusone
@@ -303,8 +333,7 @@
\exitloop
\else
\OTRSETdoifcellelse{#1}\columnfirstcell
- {\global\advance\columnfirstcell\plusone}
- {\exitloop}%
+ {\global\advance\columnfirstcell\plusone}\exitloop
\fi}%
\global\columnlastcell\columnfirstcell
\doloop
@@ -332,14 +361,15 @@
%\message{\number\columnfirstcell-\number\columnlastcell=\number\columnfreecells}%
\fi
\fi
- \popmacro \columnmaxcells}
+ \egroup}
\def\OTRSETgetmaxfreecells#1#2% col start
- {\scratchcounter\zerocount
- \let\columnmaxfreecells\!!zerocount
+ {\let\columnmaxfreecells\!!zerocount
\let\columnfrmfreecells\!!zerocount
\pushmacro \columnmaxcells
- \edef\columnmaxcells{\currentcolumnmaxcells}%
+\OTRSETsetcorrectnofcells\currentcolumnmaxcells % sets \scratchcounter
+\edef\columnmaxcells{\the\scratchcounter}%
+ \scratchcounter\zerocount
\dostepwiserecurse{#2}\columnmaxcells\plusone
{\OTRSETdoifcellelse{#1}\recurselevel
{\ifnum\columnmaxfreecells<\scratchcounter
@@ -373,8 +403,7 @@
\localcolumnwidth\OTRSETlocalwidth\mofcolumns
\setbox\scratchbox\hbox\localframed
[\??mc\OTRSETidentifier\number\mofcolumns]%
- [\c!breedte=\localcolumnwidth,\c!hoogte=\!!heighta,
- \c!regels=]%
+ [\c!breedte=\localcolumnwidth,\c!hoogte=\!!heighta,\c!regels=]%
{}%
\wd\scratchbox\localcolumnwidth
\ht\scratchbox\!!heighta
@@ -392,8 +421,19 @@
{\mofcolumns\recurselevel
\localcolumnwidth\OTRSETlocalwidth\mofcolumns
\offinterlineskip
- \setbox\scratchbox\vbox to \!!heighta % \teksthoogte
- {\topskipcorrection
+ \setbox\scratchbox\vbox to \!!heighta
+ {\topskipcorrection % not needed
+ \ifcase\OTRSETbalancemethod
+ % no
+ \or
+ % yes
+ \doifelselayerdata{OTRTEXT}\vfill\relax % temp hack
+ \or
+ % top
+ \or
+ % bottom
+ \vfill
+ \fi
\dorecurse\columnmaxcells
{\setbox\scratchbox\hbox{\OTRSETgetgridcell\mofcolumns\recurselevel}%
\ht\scratchbox\strutht
@@ -404,7 +444,19 @@
\hbox to \localcolumnwidth
{\hskip\localcolumnwidth\llap{\box\scratchbox}}%
\fi
- \par}}%
+ \par}%
+ \ifcase\OTRSETbalancemethod
+ % no
+ \else
+ % yes, top, bottom
+ \ifdim\globalbodyfontsize=\localbodyfontsize
+ \removedepth
+ \restoreglobalbodyfont
+ \vskip\strutdepth
+ \fi
+ \kern\zeropoint
+ \vss
+ \fi}%
\wd\scratchbox\localcolumnwidth % \tekstbreedte
\ifcase\columndirection
\hskip\OTRSETgetparameter\c!afstand\recurselevel\box\scratchbox
@@ -413,9 +465,33 @@
\fi}}%
\egroup}
-\def\OTRSETreducegridbox
- {\ifnum\localcolumnmaxcells>\zerocount
- \let\columnmaxcells\localcolumnmaxcells
+\let\OTRSETbalht\zeropoint
+
+\def\OTRSETreducegridbox % for the moment no difference between methods
+ {\globallet\OTRSETbalht\zeropoint
+ \ifcase\OTRSETbalancemethod
+ % no balancing
+ \else
+ \bgroup
+ \!!counta\columnmaxcells
+ \donetrue
+ \doloop
+ {\dorecurse\nofcolumns{\OTRSETdoifcellelse\recurselevel\!!counta\donefalse\donothing}%
+ \ifdone
+ \ifnum\!!counta>\plusone\advance\!!counta\minusone\else\exitloop\fi
+ \else
+ \exitloop
+ \fi}%
+ \ifnum\!!counta>\plusone
+ \!!heighta\lineheight
+ \multiply\!!heighta \!!counta
+ \advance\!!heighta \topskip
+ \advance\!!heighta -\lineheight
+ \else
+ \!!heighta\zeropoint
+ \fi
+ \xdef\OTRSETbalht{\the\!!heighta}%
+ \egroup
\fi}
\def\OTRSETflushfinalfootnotes
@@ -449,14 +525,6 @@
\initializecolumntextareas
\fi}
-%\def\OTRSETdofinalflush % see \OTRSETdoflush
-% {\OTRSETflushfinalfootnotes
-% \placecolumntextareas
-% \OTRSETcentergridcells
-% \setbox\scratchbox=\OTRSETmakegridbox
-% \global\mofcolumns=\nofcolumns % otherwise problems in finaloutput
-% \finaloutput\box\scratchbox}
-
\newbox\OTRfinalpagebox
\def\OTRSETdofinalflush % see \OTRSETdoflush
@@ -473,7 +541,17 @@
\def\OTRSETdofinaloutput
{\ifdim\ht\OTRfinalpagebox=\teksthoogte
% \bgroup \let\OTRSETsetvsize\relax % prevents useless search for gap
+ \ifcase\OTRSETbalancemethod
+ \finaloutput\box\OTRfinalpagebox
+ \else\ifdim\OTRSETbalht>\zeropoint
+ \global\setbox\OTRfinalpagebox \iftracecolumnset\ruledvbox\else\vbox\fi to \OTRSETbalht
+ {\box\OTRfinalpagebox}%
+ \global\dp\OTRfinalpagebox\strutdepth
+ \box\OTRfinalpagebox
+ \else
\finaloutput\box\OTRfinalpagebox
+ \fi \fi
+ \globallet\OTRSETbalht\zeropoint
% \egroup
\fi}
@@ -715,23 +793,6 @@
\appendtoks \OTRSETflushsavednotes \to \OTRSETeverystartofcolumn
-% \def\OTRSETnaturalflush
-% {\bgroup
-% \forgetall % new, needed !
-% \setbox0\vbox to \columnfreecells\lineheight
-% {\vskip-\topskip
-% \vskip\lineheight
-% \prevdepth\strutdp
-% \unvbox\normalpagebox
-% \vfill}%
-% \setbox2\hbox
-% {\OTRSETplacebottomnotes}%
-% \setbox\scratchbox\hbox
-% {\wd0\zeropoint\box0\box2}%
-% \dp\scratchbox\strutdp
-% \OTRSEThandleflushedtext1
-% \egroup}
-
\def\OTRSETnaturalflush
{\bgroup
\forgetall % new, needed !
@@ -862,9 +923,9 @@
\bgroup
\scratchdimen#2%
\advance\scratchdimen-\wd#1\relax
- \ifdim-10\s!sp>\scratchdimen
+ \ifdim-10\scaledpoint>\scratchdimen
\egroup
- \else\ifdim10\s!sp<\scratchdimen
+ \else\ifdim10\scaledpoint<\scratchdimen
\egroup
\else
\egroup
@@ -1122,12 +1183,15 @@
\else
% crappy test / needed for o-pbu-f / will be replaced
\getnoflines{\ht#1}%
- \scratchdimen\dimexpr(\noflines\lineheight+\lineheight)\relax
+ \scratchdimen\noflines\lineheight
+ \advance\scratchdimen\lineheight
\advance\scratchdimen\pagetotal\relax
\ifdim\scratchdimen<\pagegoal
- \OTRSETprepareforcolumnslot3{#1}%
- \snaptogrid\vbox{\box#1}%
- \blanko
+ %OTRSETprepareforcolumnslot3{#1}%
+ %ruledvskip\columnslotspacing\lineheight
+ \blanko[\columnslotspacing*\v!regel]%
+ \snaptogrid\hbox to \hsize{\hss\box#1\hss}% strange, why the centering
+ \blanko[\columnslotspacing*\v!regel]%
\else
\OTRSETstoreincolumnslotSOMEWHERE2{#1}%
\fi
@@ -1637,12 +1701,14 @@
\fi
\decrement\columnsetlevel\relax}
+\chardef\OTRSETbalancemethod\zerocount
+
\def\dostopcolumnset
{%\OTRSETdofinalflushfloats % yes/no
- \ifbalancecolumns
- \OTRSETdobalance
- \else
+ \ifcase\OTRSETbalancemethod
\OTRSETnobalance
+ \else
+ \OTRSETdobalance
\fi}
\def\OTRSETdobalance
@@ -1655,10 +1721,8 @@
% 2-3 columns on one page with both sets balanced: the
% second set does not see the first set
-\chardef\OTRSETbottombalance\zerocount
-
% \def\OTRSETinitbalancing
-% {\ifbalancecolumns
+% {\ifcase\OTRSETbalancemethod\or
% \let\savedcolumnmaxcells\columnmaxcells
% \ifnum\realpageno=\balancingpageno\relax
% \ifnum\mofcolumns=\plusone
@@ -1672,7 +1736,7 @@
% \!!countb \savedcolumnmaxcells\relax
% \fi
% % can be an option: absolute versus relative
-% \ifcase\OTRSETbottombalance
+% \ifnum\OTRSETbalancemethod=\plusthree
% \advance\!!countb\precolumnlines
% \ifnum\!!countb>\localcolumnmaxcells\relax
% \xdef\localcolumnmaxcells{\the\!!countb}%
@@ -1774,8 +1838,31 @@
\OTRSETsetplaceholders
\OTRSEThandlepreposttext
\initializecolumntextareas % name !
+ \OTRSETcheckstartcells
\OTRSETsetvsize}
+% \def\OTRSETcheckstartcells
+% {\dorecurse\nofcolumns
+% {\bgroup
+% \mofcolumns\recurselevel
+% \scratchcounter\currentcolumnstartcell % uses \mofcolumns, returns 1 or more
+% \advance\scratchcounter \minusone
+% \dorecurse\scratchcounter
+% {\OTRSETdoifcellelse\mofcolumns\recurselevel
+% \donothing{\OTRSETsetgridcell\mofcolumns\recurselevel\copy\placeholderboxe}}%
+% \egroup}}
+
+\def\OTRSETcheckstartcells
+ {\dorecurse\nofcolumns
+ {\bgroup
+ \mofcolumns\recurselevel
+\OTRSETsetcorrectnofcells\currentcolumnstartcell
+\advance\scratchcounter \minusone
+ \dorecurse\scratchcounter
+ {\OTRSETdoifcellelse\mofcolumns\recurselevel
+ \donothing{\OTRSETsetgridcell\mofcolumns\recurselevel\copy\placeholderboxe}}%
+ \egroup}}
+
\OTRSEToutput
{\OTRSETnaturalflush
%\OTRSETstartnextpage
@@ -1792,15 +1879,12 @@
{\chardef\columndirection\zerocount}
{\chardef\columndirection\plusone}%
% balancing
- \balancecolumnsfalse
- \chardef\OTRSETbottombalance\zerocount
+ \chardef\OTRSETbalancemethod\zerocount
\processaction
[\getvalue{\??mc\OTRSETidentifier\c!balanceren}]
- [ \v!ja=>\balancecolumnstrue,
- \v!onder=>\chardef\OTRSETbottombalance\plusone
- \balancecolumnstrue,
- \v!boven=>%chardef\OTRSETbottombalance\zerocount
- \balancecolumnstrue]}
+ [ \v!ja=>\chardef\OTRSETbalancemethod\plusone,
+ \v!boven=>\chardef\OTRSETbalancemethod\plustwo,
+ \v!onder=>\chardef\OTRSETbalancemethod\plusthree]}
% keep 'm for a while
%
@@ -1882,6 +1966,30 @@
\let\precolumnlines \!!zerocount
\let\postcolumnlines\!!zerocount
+% \def\OTRSEThandlepreposttext
+% {\ifdim\ht\precolumnbox>\zeropoint % new
+% \getnoflines{\ht\precolumnbox}%
+% \edef\precolumnlines{\the\noflines}%
+% \doOTRSETsetgridcells
+% {\copy\placeholderboxe}
+% \plusone\plusone\nofcolumns\noflines
+% {\box\precolumnbox}%
+% \else
+% \let\precolumnlines\!!zerocount
+% \fi
+% \ifdim\ht\postcolumnbox>\zeropoint % new, otherwise empty bottom line
+% \getnoflines{\ht\postcolumnbox}%
+% \edef\postcolumnlines{\the\noflines}%
+% \advance\columnfreecells -\noflines
+% \advance\columnfreecells \plusone
+% \doOTRSETsetgridcells
+% {\copy\placeholderboxe}
+% \plusone\columnfreecells\nofcolumns\noflines
+% {\box\postcolumnbox}%
+% \else
+% \let\postcolumnlines\!!zerocount
+% \fi}
+
\def\OTRSEThandlepreposttext
{\ifdim\ht\precolumnbox>\zeropoint % new
\getnoflines{\ht\precolumnbox}%
@@ -1889,7 +1997,12 @@
\doOTRSETsetgridcells
{\copy\placeholderboxe}
\plusone\plusone\nofcolumns\noflines
- {\box\precolumnbox}%
+ % normal version (single column set)
+ % {\box\precolumnbox}%
+ % compensated for bodyfont change
+ {\hbox
+ {\OTRSETsetcorrectcellht
+ \raise\scratchdimen\box\precolumnbox}}%
\else
\let\precolumnlines\!!zerocount
\fi
@@ -1920,7 +2033,7 @@
\brokenpenalty\zerocount
\fi}
-\def\OTRSETcheckinsert%
+\def\OTRSETcheckinsert
{\iflastcolumnfootnotes
\ifnum\nofcolumns=\mofcolumns
\OTRSETforceinserts
@@ -1939,35 +2052,6 @@
% interface to footnotes
-%\def\OTRSETassignwidth#1\to#2%
-% {\doifelsevalue{\??mc#1\c!breedte}{\v!passend}
-% {#2=\zetbreedte
-% \scratchcounter=\getvalue{\??mc#1\c!nlinks}\relax
-%\ifnum\getvalue{\??mc#1\c!nrechts}>\scratchcounter
-% \scratchcounter=\getvalue{\??mc#1\c!nrechts}%
-%\fi
-% \dorecurse{\scratchcounter}
-% {\advance#2 -\getvalue{\??mc#1\recurselevel\c!afstand}}%
-% \divide#2 \scratchcounter}
-% {#2=\getvalue{\??mc#1\c!breedte}}}
-
-%\def\OTRSETassignwidth#1\to#2% assumes mofcolumns
-% {\doifelsevalue{\??mc#1\number\mofcolumns\c!breedte}{\v!passend}
-% {#2=\zetbreedte
-% \scratchcounter=0
-% \dorecurse{\getvalue{\??mc#1\c!n}}
-% {\doifelsevalue{\??mc#1\number\recurselevel\c!breedte}{\v!passend}
-% {\advance\scratchcounter by 1 }
-% {\advance#2 by -\getvalue{\??mc#1\recurselevel\c!breedte}}%
-% \advance#2 by -\getvalue{\??mc#1\recurselevel\c!afstand}}%
-% \divide#2 by \scratchcounter}
-% {#2=\getvalue{\??mc#1\number\mofcolumns\c!breedte}}}
-%
-% replaced by
-%
-%\def\OTRSETassignwidth#1\to#2% assumes mofcolumns
-% {#2=\OTRSETlocalwidth\mofcolumns}
-
\def\OTRSETassignwidths
{%\scratchdimen\zetbreedte
\freezetextwidth \scratchdimen\tekstbreedte
@@ -2004,7 +2088,8 @@
{\localcolortrue
\setbox\scratchbox\hbox to \hsize
{\iftracecolumnset \incolortrue \localcolortrue
- #2\hskip-.5ex\vrule\!!width1ex\!!height.5ex\!!depth.5ex\hss
+ \hskip-.5ex%
+ \startcolor[columnset:#2]\vrule\!!width1ex\!!height.5ex\!!depth.5ex\stopcolor
\fi
\hss}%
\ifcase#1\relax
@@ -2018,13 +2103,17 @@
\fi
\box\scratchbox}}
+\definepalet
+ [columnset]
+ [a=cyan,b=green,c=blue,d=red,e=magenta,f=darkgray]
+
\def\OTRSETsetplaceholders
- {\global\setbox\placeholderboxa\columnplaceholder0\cyan
- \global\setbox\placeholderboxb\columnplaceholder0\green
- \global\setbox\placeholderboxc\columnplaceholder0\blue
- \global\setbox\placeholderboxd\columnplaceholder0\red
- \global\setbox\placeholderboxe\columnplaceholder0\magenta
- \global\setbox\placeholderboxf\columnplaceholder1\darkgray}
+ {\global\setbox\placeholderboxa\columnplaceholder0a%
+ \global\setbox\placeholderboxb\columnplaceholder0b%
+ \global\setbox\placeholderboxc\columnplaceholder0c%
+ \global\setbox\placeholderboxd\columnplaceholder0d%
+ \global\setbox\placeholderboxe\columnplaceholder0e%
+ \global\setbox\placeholderboxf\columnplaceholder1f}
\def\doOTRSETshowstatus
{\llap{\incolortrue \localcolortrue \tt\tfxx\blue
@@ -2048,8 +2137,6 @@
\def\OTRSETsometopfloat {\def\floatmethod{TOPS}\OTRSETsomeslotfloat} % check
\def\OTRSETsomebottomfloat{\def\floatmethod{BOTS}\OTRSETsomeslotfloat} % check
-% \def\OTRSETsomeslotfloat {\let\floatmethod\v!hier\OTRONEsomeelsefloat}
-
\def\OTRSETflushfloatbox% nog verder doorvoeren en meer info in marge
{\iftestfloatbox\ruledhbox\fi{\box\floatbox}}
@@ -2300,18 +2387,6 @@
\doplacecolumntextareas\columnleftareas\v!links
\fi}
-%\def\doplacecolumntextareas#1#2% global ?
-% {\bgroup
-% \forgetall
-% \def\docommando##1%
-% {\doifelsevalue{\??mt##1#2\c!status}\v!start
-% {\doglobal\removefromcommalist{##1}#1%
-% \dodoplacecolumntextareas{##1}{#2}}
-% {\doifvalue{\??mt##1#2\c!status}\v!herhaal
-% {\dodoplacecolumntextareas{##1}{#2}}}}%
-% \processcommacommand[#1]\docommando
-% \egroup}
-
\def\doplacecolumntextareas#1#2% global ?
{\bgroup
\forgetall
@@ -2535,7 +2610,7 @@
\hsize\columnsetspanhsize
\setbox\scratchbox\vbox\bgroup
\dostartframedtext[cs:#1][\v!geen]% geen nils placement
- \vskip-\struttotal\par\verticalstrut\par
+ % spoils spacing : \vskip-\struttotal\par\verticalstrut\par
\ifnum\columnsetlevel>\zerocount
\framedtextparameter{cs:#1}\c!voor
\fi
diff --git a/tex/context/base/page-txt.tex b/tex/context/base/page-txt.tex
index 44d9ec1f8..a36dfed78 100644
--- a/tex/context/base/page-txt.tex
+++ b/tex/context/base/page-txt.tex
@@ -444,13 +444,18 @@
\hss}%
\dp#1\zeropoint}
+\definepalet
+ [layout]
+ [grid=red,
+ page=green]
+
\def\addtextgridlayer#1% tzt run time
{\ifcase\showgridstate\else % 1=bottom 2=top
\setgridbox\scratchbox\zetbreedte\teksthoogte
\setbox#1\hbox
{\ifcase\showgridstate\or\or\box#1\hskip-\zetbreedte\fi
\bgroup % color
-\startlayoutcomponent{gridcolumns}{grid columns}%
+ \startlayoutcomponent{gridcolumns}{grid columns}%
\incolortrue
\ifcase\layoutcolumns\else
\gray
@@ -465,11 +470,10 @@
\fi}}%
\hskip-\zetbreedte
\fi
-\stoplayoutcomponent
-\startlayoutcomponent{gridlines}{grid lines}%
- \red
- \box\scratchbox
-\stoplayoutcomponent
+ \stoplayoutcomponent
+ \startlayoutcomponent{gridlines}{grid lines}%
+ \startcolor[layout:grid]\box\scratchbox\stopcolor
+ \stoplayoutcomponent
\egroup
\ifcase\showgridstate\or\hskip-\zetbreedte\box#1\fi}%
\fi}
@@ -760,4 +764,4 @@
\setupfooter[\c!letter=,\c!kleur=]
\setupbottom[\c!letter=,\c!kleur=]
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/prop-ini.tex b/tex/context/base/prop-ini.tex
index 3c077564f..49f4e48de 100644
--- a/tex/context/base/prop-ini.tex
+++ b/tex/context/base/prop-ini.tex
@@ -2,7 +2,7 @@
%D [ file=prop-ini,
%D version=2003.04.20,
%D title=\CONTEXT\ Property Macros,
-%D subtitle=Initialization,
+%D subtitle=Initialization,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
@@ -11,11 +11,11 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\writestatus{loading}{Context Property Macros / initialization}
+\writestatus{loading}{Context Property Macros / initialization}
-%D Experimental module.
+%D Experimental module.
-%D local or not? like colors? cross pages? needed?
+%D local or not? like colors? cross pages? needed?
%D combine with newfont.tex
@@ -24,13 +24,44 @@
\def\defineproperty
{\dotripleempty\dodefineproperty}
-\def\dodefineproperty[#1][#2][#3]% todo : global def
+% \def\dodefineproperty[#1][#2][#3]% todo : global def
+% {\ifundefined{\??py#1\c!titel}%
+% \getgparameters[\??py#1][\c!titel=#1,\c!type=#2,#3]% global ! ! ! !
+% \setgvalue{\e!start#1}{\getvalue{init#2property}{#1}{#2}}% init should set "start#2property"
+% \setgvalue{\e!stop #1}{\getvalue{stop#2property}}%
+% \fi}
+
+\def\dodefineproperty[#1][#2][#3]% todo : global def
{\ifundefined{\??py#1\c!titel}%
- \getgparameters[\??py#1][\c!titel=#1,#3]%
- \setgvalue{\e!start#1}{\getvalue{init#2property}{#1}{#2}}%
- \setgvalue{\e!stop #1}{\getvalue{stop#2property}}%
+ \getgparameters[\??py#1][\c!titel=#1,\c!type=#2,#3]% global ! ! ! !
+ \setgvalue{\s!check#1}{\docheckproperty{#1}}%
+ \setgvalue{\e!start#1}{\dostartproperty{#1}}%
+ \setgvalue{\e!stop #1}{\dostopproperty {#1}}%
\fi}
+\def\docheckproperty#1% watch the s instead of e
+ {\def\currentproperty{#1}%
+ \csname\s!check\csname\??py#1\c!type\endcsname property\endcsname{#1}%
+ \letgvalue{\s!check#1}\relax}
+
+\def\dostartproperty#1%
+ {\checkproperty{#1}%
+ \csname\s!start\csname\??py#1\c!type\endcsname property\endcsname{#1}}
+
+\def\dostopproperty#1%
+ {\csname\s!stop\csname\??py#1\c!type\endcsname property\endcsname}
+
+\def\checkproperty#1%
+ {\csname\s!check#1\endcsname}
+
+\def\propertyparameter#1{\csname\??py\currentproperty #1\endcsname}
+%def\currentpropertytype{\csname\??py\currentproperty\c!type\endcsname}
+
+%def\checkedpropertyparameter#1#2{\executeifdefined{\??py\currentproperty#1}{#2}}
+\def\checkedpropertyparameter #1{\executeifdefined{\??py\currentproperty#1}}
+
+\let\currentproperty\s!unknown
+
\unexpanded\def\startproperty[#1]%
{\bgroup\edef\currentproperty{#1}%
\csname\e!start\currentproperty\endcsname}
@@ -45,4 +76,74 @@
\csname\e!start\currentproperty\endcsname}
{\csname\e!stop \currentproperty\endcsname}}
-\protect \endinput
+% grouped
+
+% \def\restartproperty#1%
+% {\edef\currentproperty{#1}%
+% \csname\e!start\currentproperty\endcsname}
+
+% \def\restopproperty
+% {\csname\e!stop \currentproperty\endcsname}
+
+% \unexpanded\def\startproperty[#1]%
+% {\bgroup\restartproperty{#1}}
+
+% \unexpanded\def\stopproperty
+% {\restopproperty\egroup}
+
+% \unexpanded\def\property[#1]%
+% {\groupedcommand{\restartproperty{#1}}\restopproperty}
+
+% \newtoks\nestedproperties
+
+% \unexpanded\def\startproperties[#1]%
+% {\bgroup
+% \getcommalistsize[#1]\edef\nofnestedproperties{\number\commalistsize}%
+% \nestedproperties\emptytoks
+% \doxprecurse\nofnestedproperties
+% {\appendtoks\restopproperty\to\nestedproperties
+% \expanded{\appendtoks\noexpand\restartproperty{\commalistelement}}\to\scratchtoks}%
+% \the\scratchtoks}
+
+% \unexpanded\def\stopproperties
+% {\the\nestedproperties\egroup}
+
+% not grouped (but we assume grouped, maybe some day an ungrouped extra!)
+
+% \newcount\propertydepth
+% \newcount\pstackeddepth
+
+% \def\currentproperty{\csname\??py:\number\propertydepth\endcsname}
+% \def\currentpstacked{\csname\??py:\number\pstackeddepth\endcsname}
+
+% \def\restartproperty#1%
+% {\advance\propertydepth\plusone
+% \setvalue{\??py:\number\propertydepth}{#1}%
+% \csname\e!start\currentproperty\endcsname}
+
+% \def\restopproperty
+% {\csname\e!stop \currentproperty\endcsname
+% \advance\propertydepth\minusone}
+
+% \unexpanded\def\startproperty[#1]%
+% {\restartproperty{#1}}
+
+% \unexpanded\def\stopproperty
+% {\restopproperty}
+
+% \unexpanded\def\property[#1]%
+% {\groupedcommand{\restartproperty{#1}}\restopproperty}
+
+% \unexpanded\def\startproperties[#1]%
+% {\advance\pstackeddepth\plusone
+% \getcommacommandsize[#1]%
+% \setvalue{\??py:\number\pstackeddepth}{\number\commalistsize}%
+% \rawprocesscommacomand[#1]\restartproperty}
+
+% \unexpanded\def\stopproperties
+% {\doxprecurse\currentpstacked\restopproperty
+% \advance\pstackeddepth\minusone}
+
+% so far
+
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/prop-lay.tex b/tex/context/base/prop-lay.tex
index d8e7fcb2e..f8e67e459 100644
--- a/tex/context/base/prop-lay.tex
+++ b/tex/context/base/prop-lay.tex
@@ -2,7 +2,7 @@
%D [ file=prop-lay,
%D version=2003.04.20,
%D title=\CONTEXT\ Property Macros,
-%D subtitle=Layers,
+%D subtitle=Layers,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
@@ -11,24 +11,32 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\writestatus{loading}{Context Property Macros / layers}
+\writestatus{loading}{Context Property Macros / layers}
-%D Highly experimental, will probably change/evolve.
+%D Highly experimental, will probably change/evolve.
-\unprotect
+\unprotect
-\def\initlayerproperty#1#2%
- {\dodefineviewerlayer
- {#1}% tag
- {\getvalue{\??py#1\c!titel}}% title
- {1}% visible
+% \def\initlayerproperty#1#2%
+% {\dodefineviewerlayer
+% {#1}% tag
+% {\propertyparameter\c!titel}% title
+% {1}% visible
+% {0}% type (1=frozen)
+% {0}% printable
+% \setgvalue{\e!start#1}{\getvalue{start#2property}{#1}}%
+% \getvalue{\e!start#1}}
+
+\def\checklayerproperty#1%
+ {\dodefineviewerlayer
+ \currentproperty % tag
+ {\propertyparameter\c!titel}% title
+ {\checkedpropertyparameter\c!status\v!start}% visible
{0}% type (1=frozen)
- {0}% printable
- \setgvalue{\e!start#1}{\getvalue{start#2property}{#1}}%
- \getvalue{\e!start#1}}
+ {0}}% printable
\def\startlayerproperty#1%
- {\dostartviewerlayer{#1}}
+ {\dostartviewerlayer{#1}}
\def\stoplayerproperty
{\dostopviewerlayer}
@@ -52,64 +60,64 @@
% \defineproperty [navigation] [layer] [title=navigation]
%D \starttext
-%D
+%D
%D \setuppapersize[S4][S4]
%D \setuplayout[middle]
%D \setupcolors[state=start]
%D \setupinteraction[state=start,color=,contrastcolor=]
-%D
+%D
%D \defineproperty [L1] [layer] [title=layer 1]
%D \defineproperty [L2] [layer] [title=layer 2]
-%D
+%D
%D \button{HIDE L1}[HideLayer{L1}]
%D \button{VIDE L1}[VideLayer{L1}]
%D \button{TOGGLE L1}[ToggleLayer{L1}]
-%D
+%D
%D \button{HIDE L2}[HideLayer{L2}]
%D \button{VIDE L2}[VideLayer{L2}]
%D \button{TOGGLE L2}[ToggleLayer{L2}]
-%D
+%D
%D \noheaderandfooterlines \centerbox{\startoverlay
%D {\definedfont[Mono at 150pt]%
%D \startproperty[L1]\red TEST\stopproperty}
%D {\definedfont[Mono at 150pt]%
%D \startproperty[L2]\green TEST\stopproperty}
%D \stopoverlay} \page
-%D
+%D
%D \noheaderandfooterlines \centerbox{\startoverlay
%D {\definedfont[Mono at 15pt]%
%D \goto{\startproperty[L1]\red TEST\stopproperty}[CloseDocument]}
%D {\definedfont[Mono at 15pt]%
%D \goto{\startproperty[L2]\green TEST\stopproperty}[CloseDocument]}
%D \stopoverlay} \page
-%D
-%D \startproperty[L1]
-%D level 1 \startproperty[L2]level 2 \stopproperty level 1
-%D \stopproperty
-%D
-%D \startproperty[L1]
-%D level 1 \page \startproperty[L2]level 2 \stopproperty level 1
-%D \stopproperty
-%D
-%D \stoptext
+%D
+%D \startproperty[L1]
+%D level 1 \startproperty[L2]level 2 \stopproperty level 1
+%D \stopproperty
+%D
+%D \startproperty[L1]
+%D level 1 \page \startproperty[L2]level 2 \stopproperty level 1
+%D \stopproperty
+%D
+%D \stoptext
\fetchruntimecommand \showlayoutcomponents {\f!propprefix\s!run}
-\protect \endinput
+\protect \endinput
% \def\remaplayering
% {\dodoubleargument\doremaplayering}
-%
+%
% \def\remaplayering[#1][#2]%
% {\setvalue{\??lm#1}{#2}}
-%
+%
% \def\remappedlayering#1%
% {\ifcsname\??lm#1\endcsname
% \@EA\remappedlayering\csname\??lm#1\endcsname\else#1%
% \fi}
-%
+%
% \def\startshowlayering#1#2%
-% {\ifshowlayering
+% {\ifshowlayering
% \defineproperty[\remappedlayering{#1}][layer][\c!titel=#2]%
% \startproperty[\remappedlayering{#1}]%
-% \fi}
+% \fi} \ No newline at end of file
diff --git a/tex/context/base/s-mag-01.tex b/tex/context/base/s-mag-01.tex
index 8d7a9ebbf..6e2471e99 100644
--- a/tex/context/base/s-mag-01.tex
+++ b/tex/context/base/s-mag-01.tex
@@ -197,44 +197,50 @@
\stopsetups
\setupbottomtexts
- [\RightBanner][]
- [][\LeftBanner]
-
-\def\LeftBanner
- {\definedfont[Regular at \bottomheight]%
- \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}%
- \ht\scratchbox1ex
- \dp\scratchbox\zeropoint
- \MainColor
- \definedfont[Regular sa 2]%
- \doifsomething{\getvariable{magazine}{number}}
- {\doifnot{\getvariable{magazine}{number}}{0}
- {\#\getvariable{magazine}{number}}}%
- \quad
- \currentdate
- \quad
- \scale[height=.25\bottomheight]{\box\scratchbox}%
- \quad
- \hbox to 1.5em{\hss\pagenumber\hss}%
- \quad
- \hskip-\backspace}
-
-\def\RightBanner
- {\definedfont[Regular at \bottomheight]%
- \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}%
- \ht\scratchbox1ex
- \dp\scratchbox\zeropoint
- \MainColor
- \hskip-\backspace
- \definedfont[Regular sa 2]%
- \quad
- \hbox to 1.5em{\hss\pagenumber\hss}%
- \quad
- \scale[height=.25\bottomheight]{\box\scratchbox}%
- \quad
- \currentdate
- \quad
- \doifmode{atpragma}{\#\getvariable{magazine}{number}}}
+ [\setups{rightbanner}] []
+ [] [\setups{leftbanner}]
+
+\startsetups [leftbanner]
+
+ \definedfont[Regular at \bottomheight]
+ \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}
+ \ht\scratchbox1ex
+ \dp\scratchbox\zeropoint
+ \MainColor
+ \definedfont[Regular sa 2]
+ \doifsomething{\getvariable{magazine}{number}}
+ {\doifnot{\getvariable{magazine}{number}}{0}
+ {\#\getvariable{magazine}{number}}}
+ \quad
+ \currentdate
+ \quad
+ \scale[height=.25\bottomheight]{\box\scratchbox}
+ \quad
+ \hbox to 1.5em{\hss\pagenumber\hss}
+ \quad
+ \hskip-\backspace
+
+\stopsetups
+
+\startsetups [rightbanner]
+
+ \definedfont[Regular at \bottomheight]
+ \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}
+ \ht\scratchbox1ex
+ \dp\scratchbox\zeropoint
+ \MainColor
+ \hskip-\backspace
+ \definedfont[Regular sa 2]
+ \quad
+ \hbox to 1.5em{\hss\pagenumber\hss}
+ \quad
+ \scale[height=.25\bottomheight]{\box\scratchbox}
+ \quad
+ \currentdate
+ \quad
+ \doifmode{atpragma}{\#\getvariable{magazine}{number}}
+
+\stopsetups
\startsetups[titlepage]
diff --git a/tex/context/base/setupb.tex b/tex/context/base/setupb.tex
index 4dfda5fa1..279a07451 100644
--- a/tex/context/base/setupb.tex
+++ b/tex/context/base/setupb.tex
@@ -829,6 +829,10 @@
[\c!tekstkleur]
[\c!identifier!]
[]
+ \variable
+ [\c!interactie]
+ [\v!ja,\v!nee]
+ [\v!ja]
\inheritvariables
[\y!framed]
[]
@@ -3964,7 +3968,7 @@
\value
[\v!ja,\v!opmaak,\v!nee,\v!voorkeur,\v!grotevoorkeur,
\v!links,\v!rechts,\v!blokkeer,\v!laatste,\v!viertal,
- \v!even,\v!oneven,\v!blanko,\v!leeg,\v!reset]
+ \v!even,\v!oneven,\v!blanko,\v!leeg,\v!reset,\v!start,\v!stop]
[\v!ja]
\stopsetup
diff --git a/tex/context/base/spec-def.tex b/tex/context/base/spec-def.tex
index e0b472603..cf9f64724 100644
--- a/tex/context/base/spec-def.tex
+++ b/tex/context/base/spec-def.tex
@@ -8,11 +8,11 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-%D This module used to be integrated in \type {spec-ini},
-%D but testing optimization is more convenient this way.
+%D This module used to be integrated in \type {spec-ini},
+%D but testing optimization is more convenient this way.
\writestatus{loading}{Context Special Macros / Definitions}
@@ -100,7 +100,7 @@
%D can easily be accomplished by using \TEX's mark mechanism.
%D In \CONTEXT\ we follow this approach. More and more, drivers
%D are starting to support color, including stacking them.
-%D
+%D
%D Colors as well as grayscales can be represented in scales
%D from~0 to~1. When drivers use values in the range 0..255,
%D this value has to be adapted in the translation process.
@@ -109,8 +109,8 @@
%D Green and Blue components of 0.80 show the same gray as a
%D Gray Scale specified 0.80. The \kap{CMYK} color system
%D supports a Black component apart from Cyan, Magenta and
-%D Yellow.
-%D
+%D Yellow.
+%D
%D Depending on the target format, color support differs from
%D gray support. PostScript for example offers different
%D operators for setting gray and color. This is because
@@ -174,45 +174,45 @@
%D Probably the most problematic special is the following
%D one. Because we want to be able to support different
%D schemes, we pass a lot of data to it.
-%D
+%D
%D The support of inserting files (like illustrations) comes in
%D many flavors. Some drivers use scales, some take dimensions.
%D Some need offsets and others act on stored characteristics.
%D They need one thing in common: a filename. Although separate
%D specials for different formats sometimes are more clear, we
-%D decided to combine them all in one:
-%D
+%D decided to combine them all in one:
+%D
%D \starttypen
-%D \doinsertfile {type,method} {file,label}
-%D {xscale} {yscale} {x} {y} {w} {h}
+%D \doinsertfile {type,method} {file,label}
+%D {xscale} {yscale} {x} {y} {w} {h}
%D {options}
%D \stoptypen
%D
-%D The scale is given percents, the other values are base
+%D The scale is given percents, the other values are base
%D points.
-%D
+%D
%D The special is implemented as \type{or}. Because \DVIPSONE\
%D understands them all, a chain of alternatives would generate
-%D multiple occurrences of the same illustration.
-%D
+%D multiple occurrences of the same illustration.
+%D
%D When option 1 is passed, the viewers is asked to present a
-%D preview, like the first frame of a movie.
+%D preview, like the first frame of a movie.
\installspecial [\doinsertfile] [or] [9]
%D No start||stop construction is needed here, because there in
%D no further interference of \TEX. All dimensions are output
-%D in points and scales as a number, where 100 equal 100\%. (We
-%D used to pass scaled points).
+%D in points and scales as a number, where 100 equal 100\%. (We
+%D used to pass scaled points).
%D \macros
%D {doinsertsoundtrack}
%D
-%D Sounds are (for the moment) just files with
-%D associated options.
+%D Sounds are (for the moment) just files with
+%D associated options.
%D
%D \starttypen
-%D \doinsertsoundtrack {file} {label} {options}
+%D \doinsertsoundtrack {file} {label} {options}
%D \stoptypen
\installspecial [\doinsertsoundtrack] [or] [3]
@@ -220,21 +220,21 @@
%D \macros
%D {dogetnofinsertpages}
%D
-%D Some file formats support more than one page, like \PDF,
-%D and for special applications, one may want to have access
-%D to the total number of pages.
+%D Some file formats support more than one page, like \PDF,
+%D and for special applications, one may want to have access
+%D to the total number of pages.
%D
%D \starttypen
%D \dogetnofinsertpages{filename}
%D \stoptypen
%D
-%D The number is also available after the insert is placed,
-%D since inclusion may take place immediate when an insert is
-%D called upon.
+%D The number is also available after the insert is placed,
+%D since inclusion may take place immediate when an insert is
+%D called upon.
-\def\nofinsertpages{1} % one of the few 'talk backs'
+\def\nofinsertpages{1} % one of the few 'talk backs'
-\installspecial [\dogetnofinsertpages] [or] [1]
+\installspecial [\dogetnofinsertpages] [or] [1]
%D \macros
%D {dostartrotation,
@@ -262,7 +262,7 @@
%D \dostartscaling {x} {y} ... \dostopscaling
%D \stoptypen
%D
-%D Like the previous one, these specials are of category
+%D Like the previous one, these specials are of category
%D \type{or}.
\installspecial [\dostartscaling] [or] [2]
@@ -287,7 +287,7 @@
%D {dostartnegative,
%D dostopnegative}
%D
-%D When producing output for an image setter, negating the
+%D When producing output for an image setter, negating the
%D page comes into view. Here are the tools:
\installspecial [\dostartnegative] [or] [0]
@@ -295,7 +295,7 @@
%D The following two specials are used in for instance \type
-%D {\vadjust}'d margin material inside colored paragraphs.
+%D {\vadjust}'d margin material inside colored paragraphs.
\installspecial [\dostartgraphicgroup] [or] [0]
\installspecial [\dostopgraphicgroup ] [or] [0]
@@ -323,22 +323,22 @@
%D This command has to return a \type{\vbox} which can be used
%D to lay over another one (with text). The radius is in
%D degrees, the stroke and fill are~\type{1} (true) of~\type{0}
-%D (false).
+%D (false).
\installspecial [\doovalbox] [or] [7]
-%D \macros
+%D \macros
%D {dostartclipping,dostopclipping}
-%D
-%D Clipping is implemented in such a way that an arbitrary
-%D can be fed.
-%D
-%D \starttypen
-%D \dostartclipping {pathname}{width} {height}
-%D \dostopclipping
+%D
+%D Clipping is implemented in such a way that an arbitrary
+%D can be fed.
+%D
+%D \starttypen
+%D \dostartclipping {pathname}{width} {height}
+%D \dostopclipping
%D \stoptyping
%D
-%D
+%D
\installspecial [\dostartclipping] [or] [3]
\installspecial [\dostopclipping] [or] [0]
@@ -348,11 +348,11 @@
%D
%D We can declare some characteristics of the document with
%D
-%D \starttypen
+%D \starttypen
%D \dosetupidentity {title} {subject} {author} {creator} {date} {keys}
%D \stoptypen
%D
-%D All data is in string format.
+%D All data is in string format.
\installspecial [\dosetupidentity] [and] [6]
@@ -360,30 +360,30 @@
%D {dosetuppaper}
%D
%D This special can be used to tell the driver what page size
-%D to use. The special takes three arguments.
+%D to use. The special takes three arguments.
%D
%D \starttypen
%D \dosetuppaper {type} {width} {height}
%D \stoptypen
%D
-%D The type is one of the common identifiers, like A4, A5 or
-%D B2.
+%D The type is one of the common identifiers, like A4, A5 or
+%D B2.
\installspecial [\dosetuppaper] [and] [3]
%D \macros
%D {dosetupprinter}
%D
-%D Some drivers enable the user to specify the paper type
-%D used and/or page dimensions to be taken into account.
+%D Some drivers enable the user to specify the paper type
+%D used and/or page dimensions to be taken into account.
%D
%D \starttypen
%D \dosetupprinter {type} {hoffset} {voffset} {width} {height}
%D \stoptypen
%D
-%D The first argument is one of \type{letter}, \type{legal},
-%D \type{A4}, \type{A5} etc. The dimensions are in
-%D basepoints.
+%D The first argument is one of \type{letter}, \type{legal},
+%D \type{A4}, \type{A5} etc. The dimensions are in
+%D basepoints.
\installspecial [\dosetupprinter] [and] [5]
@@ -405,7 +405,7 @@
%D \stoptypen
%D
%D Normally this command does nothing but giving a message
-%D that some scheme is supported.
+%D that some scheme is supported.
%D
%D \starttypen
%D \dosetupstartaction
@@ -413,9 +413,9 @@
%D \stoptypen
%D
%D These two setup the actions to be executed when the document
-%D is opened and closed.
+%D is opened and closed.
%D
-%D The next commands sets up the page and screen. They are
+%D The next commands sets up the page and screen. They are
%D kind of related.
%D
%D \starttypen
@@ -423,24 +423,28 @@
%D \dosetupscreen {hoffset} {voffset} {width} {height} {options}
%D \stoptypen
%D
-%D The first four arguments are in points. Option~1 results in a
+%D The first four arguments are in points. Option~1 results in a
%D full screen launch.
%D
%D \starttypen
%D \dosetuppageview {keyword}
%D \stoptypen
%D
-%D For the moment we only support \type{fit}.
+%D For the moment we only support \type{fit}.
\installspecial [\dosetupinteraction] [and] [0]
+
\installspecial [\dosetupopenaction] [and] [0]
-\installspecial [\dosetupcloseaction] [and] [0]
-\installspecial [\dosetupopenpageaction] [and] [0]
-\installspecial [\dosetupclosepageaction] [and] [0]
\installspecial [\dosetupscreen] [and] [5]
\installspecial [\dosetuppageview] [and] [1]
-% new, yet undocumented, replaces \dosetupscreen
+\installspecial [\dosetupcloseaction] [and] [0]
+\installspecial [\dosetupopenpageaction] [and] [0]
+\installspecial [\dosetupclosepageaction] [and] [0]
+\installspecial [\dosetuprenderingopenpageaction] [and] [0]
+\installspecial [\dosetuprenderingclosepageaction] [and] [0]
+
+% new, yet undocumented, replaces \dosetupscreen
\installspecial [\dosetupcropbox] [and] [4]
\installspecial [\dosetuptrimbox] [and] [4]
@@ -467,14 +471,14 @@
%D {dostartgotolocation, dostopgotolocation,
%D dostartgotorealpage, dostopgotorealpage}
%D
-%D When we want to support hypertext buttons, again we have
+%D When we want to support hypertext buttons, again we have
%D to deal with two concepts.
%D
%D \startopsomming[opelkaar,n]
%D \som let \TEX\ highlight the text
%D \som let the driver show us where to click
%D \stopopsomming
-%D
+%D
%D The first approach is the most secure one. It gives us
%D complete control over the visual appearance of hyper
%D buttons. The second alternative lets the driver guess what
@@ -487,9 +491,9 @@
%D However, it's no trivial matter to let a driver find out
%D where things begin and end. Because most hyperlinks can be
%D found in tables of contents and registers, the saving in
-%D terms of bytes can be neglected and the first approach is a
-%D clear winner.
-%D
+%D terms of bytes can be neglected and the first approach is a
+%D clear winner.
+%D
%D The most convenient way of cross||referencing is using named
%D destinations. A more simple scheme is using page numbers as
%D destinations. Because the latter alternative can often be
@@ -508,7 +512,7 @@
%D implementation of \type{pdfmarks} in version 1.0 of
%D Acrobat. Because only pagenumbers were supported as
%D destination, we had to provide both labels (\DVIWINDO) and
-%D pagenumbers (\PDF). Some drivers use start stop pairs.
+%D pagenumbers (\PDF). Some drivers use start stop pairs.
%D
%D \starttypen
%D \dostartgotolocation {w} {h} {url} {file} {label} {page}
@@ -518,14 +522,14 @@
%D Their counterparts are:
%D
%D \starttypen
-%D \dostopgotolocation
-%D \dostopgotorealpage
+%D \dostopgotolocation
+%D \dostopgotorealpage
%D \stoptypen
%D
%D The internal alternative is used for system||generated
-%D links, the external one for user||generated links. The
-%D Uniform Resource Locator can be used to let the reader
-%D surf the net.
+%D links, the external one for user||generated links. The
+%D Uniform Resource Locator can be used to let the reader
+%D surf the net.
\installspecial [\dostartgotolocation] [and] [6]
\installspecial [\dostopgotolocation] [and] [0]
@@ -539,15 +543,15 @@
%D \macros
%D {dostartgotoJS, doflushJSpreamble}
-%D
-%D Rather special is the option to include and execute
+%D
+%D Rather special is the option to include and execute
%D JavaScript code. This is a typical \PDF\ option.
%D
%D \starttypen
%D \dostartgotoJS {w} {h} {script}
%D \stoptypen
%D
-%D This not so standard \TEX\ feature should be used with
+%D This not so standard \TEX\ feature should be used with
%D care. Preamble scripts are flushed by
%D
%D \doflushJSpreamble {script}
@@ -574,11 +578,11 @@
%D \dostartthisisrealpage {page}
%D \stoptypen
%D
-%D These commands are accompanied by:
+%D These commands are accompanied by:
%D
%D \starttypen
-%D \dostopthisislocation
-%D \dostopthisisrealpage
+%D \dostopthisislocation
+%D \dostopthisisrealpage
%D \stoptypen
%D
%D As with all interactive commands's they are installed as
@@ -589,13 +593,13 @@
\installspecial [\dostartthisisrealpage] [and] [1]
\installspecial [\dostopthisisrealpage] [and] [0]
-%D In \CONTEXT\ we don't use the \type{\stopsomething}
-%D macros because we let \TEX\ take care of typographic
-%D issues.
+%D In \CONTEXT\ we don't use the \type{\stopsomething}
+%D macros because we let \TEX\ take care of typographic
+%D issues.
%D \macros
%D {doresetgotowhereever}
-%D
+%D
%D These and others need:
\installspecial [\doresetgotowhereever] [and] [0]
@@ -603,21 +607,21 @@
%D \macros
%D {dostartexecutecommand, dostopexecutecommand}
%D
-%D The actual behavior of the next pair of commands depends
-%D much on the viewing engine. Therefore one cannot depend
-%D too much on their support.
+%D The actual behavior of the next pair of commands depends
+%D much on the viewing engine. Therefore one cannot depend
+%D too much on their support.
%D
%D \starttypen
-%D \dostartexecutecommand {w} {h} {command} {options}
+%D \dostartexecutecommand {w} {h} {command} {options}
%D \stoptypen
%D
-%D At least the next commands are supported (more examples
-%D can be found in \type {spec-fdf.tex}:
+%D At least the next commands are supported (more examples
+%D can be found in \type {spec-fdf.tex}:
%D
%D \startregelcorrectie\steluitlijnenin[midden]\leavevmode
-%D \starttabel[|l|l|]
+%D \starttabel[|l|l|]
%D \HL
-%D \NC \bf command \NC \bf action \NC\SR
+%D \NC \bf command \NC \bf action \NC\SR
%D \HL
%D \NC first \NC go to the first page \NC\FR
%D \NC previous \NC go to the previous page \NC\MR
@@ -634,20 +638,20 @@
%D \stoptabel
%D \stopregelcorrectie
%D
-%D Options are to be passed as a comma separated list of
+%D Options are to be passed as a comma separated list of
%D assignments.
\installspecial [\dostartexecutecommand] [and] [4]
\installspecial [\dostopexecutecommand] [and] [0]
%D \macros
-%D {dostartobject,
+%D {dostartobject,
%D dostopobject,
%D doresetobjects,
%D doinsertobject}
%D
-%D Reuse of object can reduce the output filesize
-%D considerably. Reusable objects are implemented with:
+%D Reuse of object can reduce the output filesize
+%D considerably. Reusable objects are implemented with:
%D
%D \starttypen
%D \dostartobject{class}{name}{width}{height}{depth}
@@ -659,7 +663,7 @@
%D \doinsertobject{class}{name}
%D \stoptypen
%D
-%D The savings can be huge in interactive texts.
+%D The savings can be huge in interactive texts.
%D
%D \starttypen
%D \doresetobjects
@@ -672,26 +676,26 @@
%D \macros
%D {doregisterfigure}
-%D
+%D
%D Images can be objects as well and it's up to the driver to
%D handle this. Alternative images are also up to the driver,
%D and the next macro tells the driver that the previous image
%D is somehow followed by another and that both have to be
-%D handled together. This is a rather fuzzy model, but for the
+%D handled together. This is a rather fuzzy model, but for the
%D moment it suits its purpose: low res screen versions combined
-%D with high res printable ones.
+%D with high res printable ones.
\installspecial [\doregisterfigure][or] [2]
% %D \macros
-% %D {dogetobjectreference}
+% %D {dogetobjectreference}
% %D
-% %D For very special purposes, one can ask for the internal
+% %D For very special purposes, one can ask for the internal
% %D reference to the object. Beware!
-%
+%
% \installspecial [\dogetobjectreference] [or] [3]
-%
-% %D The first argument is the name, the second a macro that
+%
+% %D The first argument is the name, the second a macro that
% %D gets the associated value.
%D \macros
@@ -714,36 +718,36 @@
%D \macros
%D {doinsertbookmark}
-%D
+%D
%D Bookmarks, that is viewer generated tables of contents, are
%D a strange phenomena, mainly because \TEX\ can provide
-%D whatever kind of table in much better quality.
+%D whatever kind of table in much better quality.
\installspecial [\doinsertbookmark] [and] [5]
%D This special is called as:
-%D
+%D
%D \starttypen
%D \doinstallbookmark {level} {nofsubentries} {text} {page} {open}
%D \stoptypen
%D
-%D This definition is very \PDF\ oriented, so for more
-%D information we kindly refer to the \PDF\ manuals.
+%D This definition is very \PDF\ oriented, so for more
+%D information we kindly refer to the \PDF\ manuals.
%D \macros
%D {dosetpagetransition}
%D
%D In presentations, fancy page transitions can, at least for a
%D short moment, let the audience focus at the screen. Like the
-%D previous one, this special is very \PDF.
+%D previous one, this special is very \PDF.
%D
%D \starttypen
%D \dosetpagetransition{dissolve}{0}
%D \stoptypen
%D
%D Transitions have symbolic names, like dissolve, box, split,
-%D blinds, wipe and glitter. The second argument determines
-%D the wait time (unless zero).
+%D blinds, wipe and glitter. The second argument determines
+%D the wait time (unless zero).
\installspecial [\dosetpagetransition] [or] [2]
@@ -756,29 +760,29 @@
%D The special drivers are programmed independant from their
%D calling macros are thereby use the standard \TEX\ way of
%D passing parameters. Unfortunately fields often have more
-%D than nine characteristics, so we pack some arguments in one.
-%D
+%D than nine characteristics, so we pack some arguments in one.
+%D
%D \starttypen
%D \dopresettextfield / \dopresetlinefield
-%D {name} {width} {height} {default} {length}
+%D {name} {width} {height} {default} {length}
%D {style,color} {options} {alignment} {actions}
-%D
+%D
%D \dopresetchoicefield / \dopresetpopupfield / \dopresetcombofield
-%D {name} {width} {height} {default}
+%D {name} {width} {height} {default}
%D {style,color} {options} {values} {actions}
-%D
-%D \dopresetpushfield
+%D
+%D \dopresetpushfield
%D {name} {width} {height} {default}
%D {options} {values} {actions}
-%D
-%D \dopresetcheckfield
-%D {name} {width} {height} {default}
+%D
+%D \dopresetcheckfield
+%D {name} {width} {height} {default}
%D {options} {values} {actions}
-%D
+%D
%D \dopresetradiofield
%D {name} {width} {height} {default}
%D {options} {parent} {values} {actions}
-%D
+%D
%D \dopresetradiorecord
%D {name} {top} {options} {kids} {actions}
%D \stoptypen
@@ -795,7 +799,7 @@
%D \macros
%D {dodefinefieldset,dogetfieldset,doiffieldset}
-%D
+%D
%D Field sets, used in resetting and submitting, are handled
%D by:
@@ -803,11 +807,11 @@
\installspecial [\dogetfieldset] [or] [1]
\installspecial [\doiffieldset] [or] [2]
-%D \macros
+%D \macros
%D {dosetfieldstatus}
%D
-%D For practical reasons we set some field characteristics
-%D using:
+%D For practical reasons we set some field characteristics
+%D using:
%D
%D \starttypen
%D \dosetfieldstatus {mode} {parent} {kids} {root}
@@ -822,7 +826,7 @@
\def\fieldchildmode {2} % no \chardef here
\def\fieldcopymode {3} % no \chardef here
-%D \macros
+%D \macros
%D {doregistercalculationset}
%D
%D We can define a calculation order list with:
@@ -833,18 +837,18 @@
\installspecial [\doregistercalculationset] [or] [1]
-%D \macros
+%D \macros
%D {doinsertcomment, doflushcomments}
%D
-%D Not so much out of need, but to be complete, we also
+%D Not so much out of need, but to be complete, we also
%D implement text annotations, so called comment:
-%D
+%D
%D \starttypen
%D \doinsertcomment
-%D {title} {width} {height} {color} {open} {symbol} {collect} {data}
+%D {title} {width} {height} {color} {open} {symbol} {collect} {data}
%D \stoptypen
%D
-%D When enables, comments can be collected and flushed:
+%D When enables, comments can be collected and flushed:
%D
%D \starttypen
%D \doflushcomments
@@ -854,27 +858,27 @@
\installspecial[\doflushcomments] [and] [0]
%D \macros
-%D {dosetposition, dosetpositionwhd, dosetpositionplus,
+%D {dosetposition, dosetpositionwhd, dosetpositionplus,
%D dosetpositionpapersize}
%D
-%D Not natural to \TEX, but available in \PDFTEX, and by
-%D means of postprocessed \DVI, we can save and call upon
-%D positions.
+%D Not natural to \TEX, but available in \PDFTEX, and by
+%D means of postprocessed \DVI, we can save and call upon
+%D positions.
%D
%D \starttypen
%D \dosetposition {identifier}
%D \dosetpositionwhd {identifier} {width} {height} {depth}
%D \dosetpositionplus {identifier} {width} {height} {depth} {list}
-%D \dosetpositionpapersize {width} {height}
+%D \dosetpositionpapersize {width} {height}
%D \stoptypen
%D
-%D This is one of the few specials where when using \PDFTEX\
-%D the driver directly deals with the utility file.
+%D This is one of the few specials where when using \PDFTEX\
+%D the driver directly deals with the utility file.
-\installspecial [\dosetposition] [or] [1]
-\installspecial [\dosetpositionwhd] [or] [4]
-\installspecial [\dosetpositionplus] [or] [5]
-\installspecial [\dosetpositionpapersize] [or] [2]
+\installspecial [\dosetposition] [or] [1]
+\installspecial [\dosetpositionwhd] [or] [4]
+\installspecial [\dosetpositionplus] [or] [5]
+\installspecial [\dosetpositionpapersize] [or] [2]
%D \macros
%D {dostarttransparency,dostoptransparency}
@@ -883,10 +887,10 @@
%D \dostarttransparency{fraction}{type}
%D \dostoptransparency
%D \stoptypen
-%D
-%D Although in \CONTEXT\ transparency is closely integrated
-%D in the color drivers, in the end it is an independent
-%D feature.
+%D
+%D Although in \CONTEXT\ transparency is closely integrated
+%D in the color drivers, in the end it is an independent
+%D feature.
\installspecial [\dostarttransparency] [or] [2]
\installspecial [\dostoptransparency] [or] [0]
@@ -900,7 +904,7 @@
\installspecial [\doattachfile] [or] [8]
-%D Experimental (properties):
+%D Experimental (properties):
\installspecial[\dostartviewerlayer] [or] [1]
\installspecial[\dostopviewerlayer] [or] [0]
@@ -909,19 +913,24 @@
%installspecial[\doflushviewerpagelayers] [or] [0]
\installspecial[\domakeviewerlayerlist] [or] [1]
-%D We define a couple of backends:
+\installspecial[\doinsertrenderingwindow] [or] [4]
+\installspecial[\doinsertrendering] [or] [4]
+\installspecial[\doinsertrenderingobject] [or] [4]
+\installspecial[\doinsertrenderingobject] [or] [4]
+
+%D We define a couple of backends:
\defineoutput [dvipsone] [dvi,ps,yy]
\defineoutput [dviwindo] [dvi,ps,yy,win]
\defineoutput [dvips] [dvi,ps,tr]
\defineoutput [dviview] [dvi,ps,tr,dv]
-\defineoutput [pdftex] [tpd]
-\defineoutput [pdf] [tpd]
+\defineoutput [pdftex] [tpd]
+\defineoutput [pdf] [tpd]
\defineoutput [dvipdfm] [dpm]
-\defineoutput [dpm] [dpm]
+\defineoutput [dpm] [dpm]
\defineoutput [dvipdfmx] [dpx]
-\defineoutput [dpx] [dpx]
-\defineoutput [acrobat] [pdf,ps,tr]
+\defineoutput [dpx] [dpx]
+\defineoutput [acrobat] [pdf,ps,tr]
%D Please let me know if we need more. From now on we default
%D to:
@@ -929,18 +938,18 @@
\setupoutput [dvips]
%D We don't enable \ACROBAT, because pure \POSTSCRIPT\ is not
-%D that strong on objects and \PDFTEX\ does a better job.
+%D that strong on objects and \PDFTEX\ does a better job.
%D Some reasonable alternatives are:
-%D
+%D
%D \starttypen
%D \setupoutput [dvipsone,acrobat]
%D \setupoutput [dviwindo,acrobat]
%D \stoptypen
-%D
+%D
%D Although, better is:
-%D
+%D
%D \starttypen
%D \setupoutput [pdftex]
%D \stoptypen
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
index 47a904145..1e1a6ec52 100644
--- a/tex/context/base/spec-fdf.tex
+++ b/tex/context/base/spec-fdf.tex
@@ -379,11 +379,10 @@
\egroup}
\appendtoksonce % hack to prevent duplicates
- \ifcase\realfolio \or % only at page one
- \doPDFaddtocatalog{\currentPDFpagemode\currentPDFviewerprefs}%
- \doPDFaddtoinfo{/Trapped /False}%
- \fi
-\to \everyshipout
+ \doPDFaddtocatalog{\currentPDFpagemode\currentPDFviewerprefs}%
+ \doPDFaddtoinfo{/Trapped /False}%
+ \doPDFaddtoinfo{/ConTeXt.Version (\contextversion)}%
+\to \everyfirstshipout
\def\doPDFsetupwhateverbox#1#2#3#4#5#6% watch the extra arguments
{\bgroup
@@ -445,6 +444,15 @@
%D because action chains are derived from the reference
%D mechanism.
+%D Starting with version~5 viewers, when the open actions
+%D started yto give problems, for testing purposes we
+%D decided use indirect actions.
+
+% \definespecial\dosetupopenaction {\doPDFsetupopenaction}
+% \definespecial\dosetupcloseaction {\doPDFsetupcloseaction}
+% \definespecial\dosetupopenpageaction {\doPDFsetupopenpageaction}
+% \definespecial\dosetupclosepageaction{\doPDFsetupclosepageaction}
+
\let\lastPDFaction\empty
%D We can safe a couple of references by moving this code
@@ -454,15 +462,42 @@
%D update of Acrobat Viewers, upward compatibility was
%D just a dream.
-\def\doPDFsetupopenaction
- {\doPDFaddtocatalog{/OpenAction <<\lastPDFaction>>}}
-
-\def\doPDFsetupcloseaction
- {\doPDFaddtocatalog{/CloseAction <<\lastPDFaction>>}}
-
-%D So, starting with version~5 viewers, when the open actions
-%D started yto give problems, for testing purposes we
-%D decided use indirect actions.
+\definespecial\dosetupopenaction {\doPDFaddtocatalog{/OpenAction <<\lastPDFaction>>}}
+\definespecial\dosetupcloseaction{\doPDFaddtocatalog{/CloseAction <<\lastPDFaction>>}}
+
+% todo: /AA << dictionary in catalog >>
+
+% \globalletempty\PDFdocumentclose
+% \globalletempty\PDFwillsave
+% \globalletempty\PDFdidsave
+% \globalletempty\PDFwillprint
+% \globalletempty\PDFdidprint
+
+% \definespecial\dosetupdocumentcloseaction {\global\let\PDFdocumentclose\lastPDFaction}
+% \definespecial\dosetupwillsaveaction {\global\let\PDFwillsave \lastPDFaction}
+% \definespecial\dosetupdidsaveaction {\global\let\PDFdidsave \lastPDFaction}
+% \definespecial\dosetupwillprintaction {\global\let\PDFwillprint \lastPDFaction}
+% \definespecial\dosetupdidprintaction {\global\let\PDFdidprint \lastPDFaction}
+
+% \def\checkPDFdocumentactions
+% {\iflocation
+% \doPDFpageattribute
+% {/AA <<\ifx\PDFdocumentclose\empty \else /DC <<\PDFdocumentclose>> \fi
+% \ifx\PDFwillsave \empty \else /WS <<\PDFwillsave >> \fi
+% \ifx\PDFdidsave \empty \else /DS <<\PDFdidsave >> \fi
+% \ifx\PDFwillprint \empty \else /WP <<\PDFwillprint >> \fi
+% \ifx\PDFdidprint \empty \else /DP <<\PDFdidprint >> \fi>>}%
+% % \globalletempty\PDFdocumentclose
+% % \globalletempty\PDFwillsave
+% % \globalletempty\PDFdidsave
+% % \globalletempty\PDFwillprint
+% % \globalletempty\PDFdidprint
+% \global\let\checkPDFdocumentactions\relax
+% \fi}
+
+% \appendtoksonce
+% \checkPDFdocumentactions
+% \to \everylastshipout
%\def\doPDFsetupopenaction%
% {\doPDFdictionaryobject class FDF name local:openaction data \lastPDFaction
@@ -477,11 +512,8 @@
\let\PDFopenpageaction \empty
\let\PDFclosepageaction\empty
-\def\doPDFsetupopenpageaction
- {\global\let\PDFopenpageaction\lastPDFaction}
-
-\def\doPDFsetupclosepageaction
- {\global\let\PDFclosepageaction\lastPDFaction}
+\definespecial\dosetupopenpageaction {\global\let\PDFopenpageaction \lastPDFaction}
+\definespecial\dosetupclosepageaction{\global\let\PDFclosepageaction\lastPDFaction}
\def\checkPDFpageactions
{\iflocation % important since direct -)
@@ -771,7 +803,7 @@
%\@EA\aftersplitstring \string\at{ }\to\parameters
%\edef\action%
% {/S /Launch /F (\program) /P (\parameters) /D (.)}%
- \edef\action%
+ \edef\action
{/S /Launch /F (#3) /P (#4) /D (.)}%
\ifsecondaryreference
\savesecondaryPDFreference\action
@@ -794,7 +826,7 @@
{\bgroup
\setPDFdestination{#3}%
\doifsomething\PDFdestination
- {\edef\action%
+ {\edef\action
{/S /Thread /D (\PDFdestination)}%
\ifsecondaryreference
\savesecondaryPDFreference\action
@@ -814,6 +846,23 @@
%D the transitions look awful anyway. By the way, \CONTEXT\ is
%D able to select transitions randomly.
+% some day, when 1.5 is on linux and apple, we will add:
+%
+% \def\pagetransitions
+% {{split,in,vertical},{split,in,horizontal},
+% {split,out,vertical},{split,out,horizontal},
+% {blinds,horizontal},{blinds,vertical},
+% {box,in},{box,out},
+% {wipe,east},{wipe,west},{wipe,north},{wipe,south},
+% dissolve,
+% {glitter,east},{glitter,south},
+% {fly,in,east},{fly,in,west},{fly,in,north},{fly,in,south},
+% {fly,out,east},{fly,out,west},{fly,out,north},{fly,out,south},
+% {push,east},{push,west},{push,north},{push,south},
+% {cover,east},{cover,west},{cover,north},{cover,south},
+% {uncover,east},{uncover,west},{uncover,north},{uncover,south},
+% fade}
+
\def\pagetransitions
{{split,in,vertical},{split,in,horizontal},
{split,out,vertical},{split,out,horizontal},
@@ -834,6 +883,12 @@
\def\PDFpageglitter {/S /Glitter }
\def\PDFpagereplace {/S /R }
+\def\PDFpagefly {/S /Fly } % 1.5
+\def\PDFpagepush {/S /Push } % 1.5
+\def\PDFpagecover {/S /Cover } % 1.5
+\def\PDFpageuncover {/S /Uncover } % 1.5
+\def\PDFpagefade {/S /Fade } % 1.5
+
\def\PDFpagehorizontal {/Dm /H }
\def\PDFpagevertical {/Dm /V }
\def\PDFpagein {/M /I }
@@ -863,6 +918,10 @@
%D link}, but here is another one: the {\em movie} annotation.
%D The driver module must implement \type {setcurrentmovie}.
+%D Great: this will become an obsolete pdf feature; why did we have to
+%D keep up with the bugs ... and by the time acrobat gets better in
+%D handling it have to drop it.
+
\let\currentmovie\s!unknown
\def\doPDFinsertmov#1#2#3#4#5#6#7#8#9%
@@ -916,6 +975,33 @@
\def\doPDFfilestreamobject class #1 name #2 file #3 source #4%
{}
+\def\doPDFfilestreamidentifier#1%
+ {0}
+
+\def\doPDFgetfilestreamreference#1#2%
+ {0 0 R}
+
+% \def\doPDFattachfile#1#2#3#4#5#6#7#8%
+% {\bgroup % title width height color symbol file
+% \edef\PDFfile{#8}\convertcommand\PDFfile\to\PDFfile
+% % beware: the symbol may (indirectly) use the file
+% % reference when typesetting the object number;
+% \presetPDFsymbolappearance{#5}{#6}{#2}{#3}{#4}% sets width/height
+% \startPDFsymbolappearance
+% \doifnotflagged{a:\PDFfile}%
+% {\doPDFfilestreamobject
+% class PDFEF name {\PDFfile} file {#7} source {#8}%
+% \doglobal\setflag{a:\PDFfile}}%
+% \doPDFgetobjectreference{PDFEF}\PDFfile\PDFobjectreference
+% \doPDFannotation width {\width} height {\totalheight} data
+% {/Subtype /FileAttachment
+% /FS \PDFobjectreference\space
+% /Contents (#1)
+% \PDFsymbol
+% \PDFattributes}%
+% \stopPDFsymbolappearance
+% \egroup}
+
\def\doPDFattachfile#1#2#3#4#5#6#7#8%
{\bgroup % title width height color symbol file
\edef\PDFfile{#8}\convertcommand\PDFfile\to\PDFfile
@@ -923,11 +1009,8 @@
% reference when typesetting the object number;
\presetPDFsymbolappearance{#5}{#6}{#2}{#3}{#4}% sets width/height
\startPDFsymbolappearance
- \doifnotflagged{a:\PDFfile}%
- {\doPDFfilestreamobject
- class PDFEF name {\PDFfile} file {#7} source {#8}%
- \doglobal\setflag{a:\PDFfile}}%
- \doPDFgetobjectreference{PDFEF}\PDFfile\PDFobjectreference
+ \doPDFembedfile\PDFfile{#7}{#8}%
+ \doPDFgetembeddedfilereference\PDFfile\PDFobjectreference
\doPDFannotation width {\width} height {\totalheight} data
{/Subtype /FileAttachment
/FS \PDFobjectreference\space
@@ -937,6 +1020,23 @@
\stopPDFsymbolappearance
\egroup}
+% semi-public
+
+\def\doPDFembedfile#1#2#3% symbolic name | filename | user name
+ {\edef\PDFfile{#1}\convertcommand\PDFfile\to\PDFfile
+ \doifnotflagged{a:\PDFfile}%
+ {\doPDFfilestreamobject
+ class PDFEF name {\PDFfile} file {#2} source {#3}%
+ \doglobal\setflag{a:\PDFfile}}}
+
+\def\doPDFgetembeddedfilereference#1#2%
+ {\edef\PDFfile{#1}\convertcommand\PDFfile\to\PDFfile
+ \doPDFgetobjectreference{PDFEF}\PDFfile#2}
+
+\def\doPDFgetembeddedfilestreamreference#1#2%
+ {\edef\PDFfile{#1}\convertcommand\PDFfile\to\PDFfile
+ \doPDFgetfilestreamreference\PDFfile#2} % == \doPDFgetobjectreference{PDFFS}\PDFfile#2
+
\definespecial \doattachfile {\doPDFattachfile}
% requested by Jens-Uwe Morawski: permits usage of pdftosrc
@@ -962,6 +1062,169 @@
\fi}
%D \macros
+%D {...}
+%D
+%D Rather preliminary. We have to wait till the complete specs
+%D show up. As usual, we cannot really check it (Acrobat 6.0
+%D has a bug that inhibits us to make a test file). Half a day
+%D of testing made clear that trying to control the plugin fails
+%D in most cases (we need plugin specs -). We also miss a feature
+%D to let acrobat wait with proceeding (action processing) till
+%D the media clip is ready.
+
+% aiff audio/aiff
+% au audio/basic
+% avi video/avi
+% mid audio/midi
+% mov video/quicktime
+% mp3 audio/x-mp3 (mpeg)
+% mp4 audio/mp4
+% mp4 video/mp4
+% mpeg video/mpeg
+% smil application/smil
+% swf application/x-shockwave-flash
+
+% beware, this is preliminary code, should be improved
+
+\def\PDFrenderingspecs#1{\executeifdefined{PDFMR:#1}\empty}
+
+\def\PDFexecutestartrendering {/Rendition /OP 0 \PDFrenderingspecs\argumentA}
+\def\PDFexecutestoprendering {/Rendition /OP 1 \PDFrenderingspecs\argumentA}
+\def\PDFexecutepauserendering {/Rendition /OP 2 \PDFrenderingspecs\argumentA}
+\def\PDFexecuteresumerendering {/Rendition /OP 3 \PDFrenderingspecs\argumentA}
+
+% todo : sub files
+%
+% \doPDFembedfile{pier-39.png}{pier-39.png}{pier-39.png}%
+% \doPDFgetembeddedfilestreamreference{pier-39.png}\xPDFobjectreference
+% \edef\xxxx{/RF [(pier-39.png) \xPDFobjectreference]}%
+
+% todo: alternative renderings
+%
+% object_1 -> <</Type /Rendition /S /MR /C << /Type /MediaClip ... >> >>
+% object_2 -> <</Type /Rendition /S /MR /C << /Type /MediaClip ... >> >>
+%
+% rendering -> <</Type /Rendition /S /MS [objref_1 objref_2]>>
+
+% todo: embedded files (too buggy)
+%
+% \let\PDFattribute\empty
+% % /D \PDFobjectreference
+% % test one, no error, but ignored
+% \doifinset\v!file{#4}
+% {\doPDFembedfile{#3}{#3}{#3}%
+% \doPDFgetembeddedfilestreamreference{#3}\PDFobjectreference
+% \edef\PDFattribute{/EF \PDFobjectreference}}%
+% % official, does not work either
+% \doifinset\v!file{#4}
+% {\doPDFembedfile{#3}{#3}{#3}%
+% \doPDFgetembeddedfilereference{#3}\PDFobjectreference}
+% % do we play the game as follows
+
+\definespecial\doinsertrendering#1#2#3#4% tag mime file options
+ {\ifundefined{PDFMR:#1}%
+ \doifinstringelse{://}{#3}\donetrue\donefalse % evt url as keyword
+ \doPDFdictionaryobject class {PDFMF} name {#1} data
+ {/Type /Rendition
+ /S /MR
+ % does not work: /SP << /Type /MediaScreenParam /BE << /B [1 0 0] /O 0.5 >> >>
+ /C << /Type /MediaClip
+ /S /MCD
+ /N (#1)
+ /Alt [() (file not found)] % language id + message
+ /D << /Type /Filespec
+ /F (#3)
+ \ifdone/FS /URL\fi >>
+ /CT (#2) >>}%
+ % common code
+ \doifobjectreferencefoundelse{PDFMS}{#1}
+ {\doPDFgetobjectreference{PDFMS}{#1}\PDFobjectreferenceB}
+ {\doPDFgetobjectreference{PDFMU}{#1}\PDFobjectreferenceB}%
+ \doPDFgetobjectreference{PDFMF}{#1}\PDFobjectreferenceA
+ \setxvalue{PDFMR:#1}% needed /AA actions in /Screen
+ {/R \PDFobjectreferenceA
+ /AN \PDFobjectreferenceB}%
+ \doifobjectreferencefoundelse{PDFMS}{#1}\donothing
+ {\dodoinsertrenderingwindow{PDFMU}{#1}\zeropoint\zeropoint{#4}}%
+ \fi}
+
+\definespecial\doinsertrenderingobject#1#2#3#4% tag class objectname options
+ {\ifundefined{PDFMR:#1}%
+ \doPDFgetobjectreference{#2}{#3}\PDFobjectreference
+ \doPDFdictionaryobject class {PDFMF} name {#1} data
+ {/Type /Rendition
+ /S /MR
+ /C << /Type /MediaClip
+ /S /MCD
+ /N (#1)
+ /D \PDFobjectreference>>}%
+ % common code
+ \doifobjectreferencefoundelse{PDFMS}{#1}
+ {\doPDFgetobjectreference{PDFMS}{#1}\PDFobjectreferenceB}
+ {\doPDFgetobjectreference{PDFMU}{#1}\PDFobjectreferenceB}%
+ \doPDFgetobjectreference{PDFMF}{#1}\PDFobjectreferenceA
+ \setxvalue{PDFMR:#1}% needed /AA actions in /Screen
+ {/R \PDFobjectreferenceA
+ /AN \PDFobjectreferenceB}%
+ \doifobjectreferencefoundelse{PDFMS}{#1}\donothing
+ {\dodoinsertrenderingwindow{PDFMU}{#1}\zeropoint\zeropoint{#4}}%
+ \fi}
+
+\definespecial\doinsertrenderingwindow
+ {\dodoinsertrenderingwindow{PDFMS}}
+
+\def\dodoinsertrenderingwindow#1#2#3#4#5%
+ {\vbox to #4 \bgroup
+ \checkPDFscreenactions{#2}{#5}%
+ \doPDFgetobjectpagereference{PDFMF}{#2}\PDFobjectreferenceA
+ \doPDFgetobjectreference {PDFMF}{#2}\PDFobjectreferenceB
+ \vss
+ \hbox to #3 \bgroup
+ \doPDFannotationobject class {#1} name {#2} width #3 height #4 data
+ {/Subtype /Screen
+ /P \PDFobjectreferenceA
+ /A \PDFobjectreferenceB
+ \PDFattributes
+ /Border [0 0 0]}%
+ \hss
+ \egroup
+ \egroup}
+
+\global\let\PDFrenderingopenpageaction \empty
+\global\let\PDFrenderingclosepageaction\empty
+
+\def\checkPDFscreenactions#1#2%
+ {\let\PDFattributes\empty
+ \iflocation % important since direct -)
+ % the action can either (already) be set by the window handler
+ % or (normally when no window [i.e a zero dimensions one] is present) by keyword
+ \doifinset\v!auto{#2}
+ {% brrr, here instead of in navigation module, must move and become special
+ % now two sided dependency
+ \let\checkrendering\gobbleoneargument
+ \ifx\PDFrenderingopenpageaction \empty
+ \handlereferenceactions{\v!StartRendering{#1}}\dosetuprenderingopenpageaction
+ \fi
+ \ifx\PDFrenderingclosepageaction\empty
+ \handlereferenceactions{\v!StopRendering {#1}}\dosetuprenderingclosepageaction
+ \fi
+ }%
+ \donefalse
+ \ifx\PDFrenderingopenpageaction \empty\!!doneafalse\else\donetrue\!!doneatrue\fi
+ \ifx\PDFrenderingclosepageaction\empty\!!donebfalse\else\donetrue\!!donebtrue\fi
+ \ifdone
+ \edef\PDFattributes
+ {/AA <<\if!!donea/PO <<\PDFrenderingopenpageaction >> \fi
+ \if!!doneb/PC <<\PDFrenderingclosepageaction>> \fi>>}%
+ \fi
+ \global\let\PDFrenderingopenpageaction \empty
+ \global\let\PDFrenderingclosepageaction\empty
+ \fi}
+
+\definespecial\dosetuprenderingopenpageaction {\global\let\PDFrenderingopenpageaction \lastPDFaction}
+\definespecial\dosetuprenderingclosepageaction{\global\let\PDFrenderingclosepageaction\lastPDFaction}
+
+%D \macros
%D {doPDFinsertbookmark}
%D
%D Well, here is the dreadfull bookmark, rather useless because
@@ -983,6 +1246,37 @@
%D support. These macros are complicated by the fact that
%D cloning is possible.
+% new approach, 'global' variables, since we run out of
+% arguments
+
+\ifx\undefined\@@DriverFieldName
+
+ \letempty \@@DriverFieldName
+ \letempty \@@DriverFieldWidth
+ \letempty \@@DriverFieldHeight
+ \letempty \@@DriverFieldDefault
+ \letempty \@@DriverFieldNumber
+ \letempty \@@DriverFieldNumber
+ \letempty \@@DriverFieldStyle
+ \letempty \@@DriverFieldColor
+ \letempty \@@DriverFieldBackgroundColor
+ \letempty \@@DriverFieldFrameColor
+ \letempty \@@DriverFieldLayer
+ \letempty \@@DriverFieldOption
+ \letempty \@@DriverFieldAlign
+ \letempty \@@DriverFieldClickIn
+ \letempty \@@DriverFieldClickOut
+ \letempty \@@DriverFieldRegionIn
+ \letempty \@@DriverFieldRegionOut
+ \letempty \@@DriverFieldAfterKey
+ \letempty \@@DriverFieldFormat
+ \letempty \@@DriverFieldValidate
+ \letempty \@@DriverFieldCalculate
+ \letempty \@@DriverFieldFocusIn
+ \letempty \@@DriverFieldFocusOut
+
+\fi
+
%D \macros
%D {FDFflag...,FDFplus...}
%D
@@ -1022,6 +1316,11 @@
\def\FDFplusHidden {2} % 2
\def\FDFplusPrintable {4} % 3
+%def\FDFplusNoView {32} % 6
+%def\FDFplusToggleNoView {256} % 9
+
+\def\FDFplusAutoView {256} % {288} % 6+9
+
%D \macros
%D {setFDFswitches}
%D
@@ -1043,6 +1342,8 @@
\letvalue {\@@FDFplus\v!verborgen}=\FDFplusHidden
\letvalue {\@@FDFplus\v!printbaar}=\FDFplusPrintable
+\letvalue {\@@FDFplus\v!auto}=\FDFplusAutoView
+
%D A set of switches is collected into the flags we mentioned
%D before by the next macro (we don't handle negations yet,
%D but do take care of redundancy):
@@ -1196,25 +1497,51 @@
% \fi}
%% {\setFDFaction A#2}% mouseup % changed for version 5
+% \def\setFDFactions[#1,#2,#3,#4,#5,#6,#7,#8,%
+% {\global\let\FDFactions\empty
+% \setFDFaction D#1% mousedown
+% %\setFDFaction U#2% mouseup
+% \setFDFaction E#3% enterregion
+% \setFDFaction X#4% exitregion
+% \setFDFaction K#5% afterkeystroke
+% \setFDFaction F#6% formatresult
+% \setFDFaction V#7% validateresult
+% \setFDFaction C#8% calculatewhatever
+% \setFDFactionsmore#2,}
+
+% \def\setFDFactionsmore#1,#2,#3]%
+% {\setFDFaction{Fo}#2% focusin
+% \setFDFaction{Bl}#3% focusout % was I (now pdf ref manual explicitly talks about lowercase l)
+% \ifx\FDFactions\empty\else
+% \xdef\FDFactions{/AA << \FDFactions >>}% since 1.3 no longer inherited
+% \fi
+% \setFDFaction A#1}% mouseup
+
\def\setFDFactions[#1,#2,#3,#4,#5,#6,#7,#8,%
{\global\let\FDFactions\empty
\setFDFaction D#1% mousedown
-% \setFDFaction U#2% mouseup
+ \setFDFaction U#2% mouseup
\setFDFaction E#3% enterregion
\setFDFaction X#4% exitregion
\setFDFaction K#5% afterkeystroke
\setFDFaction F#6% formatresult
\setFDFaction V#7% validateresult
\setFDFaction C#8% calculatewhatever
- \setFDFactionsmore#2,}
+ \setFDFactionsmore}
-\def\setFDFactionsmore#1,#2,#3]%
- {\setFDFaction{Fo}#2% focusin
- \setFDFaction{Bi}#3% focusout
+\def\setFDFactionsmore#1,#2]%
+ {\setFDFaction{Fo}#1% focusin
+ \setFDFaction{Bl}#2% focusout % was I (now pdf ref manual explicitly talks about lowercase l)
\ifx\FDFactions\empty\else
\xdef\FDFactions{/AA << \FDFactions >>}% since 1.3 no longer inherited
- \fi
- \setFDFaction A#1}% mouseup
+ \fi}
+
+% todo, when new var scheme is implemented
+%
+% \setFDFaction{PO}\@@DriverFieldPageOpen
+% \setFDFaction{PC}\@@DriverFieldPageClose
+% \setFDFaction{PV}\@@DriverFieldPageVisible
+% \setFDFaction{PI}\@@DriverFieldPageInVisible
%D The event handler becomes something:
%D
@@ -1247,8 +1574,7 @@
\def\setFDFaction#1#2%
{\bgroup
- \def\docommando%
- {\xdef\FDFactions{\FDFactions /#1 << \lastPDFaction >> }}%
+ \def\docommando{\xdef\FDFactions{\FDFactions /#1 << \lastPDFaction >> }}%
\@EA\handlereferenceactions\@EA{#2}\docommando % one level expansion
\egroup}
@@ -1486,6 +1812,7 @@
\def\doFDFpresetlinefield#1#2#3#4#5#6#7#8#9%
{\bgroup
+ \setFDFlayer
\setFDFswitches[#7]%
\setFDFattributes[#6]%
\setFDFalignment[#8]%
@@ -1500,6 +1827,7 @@
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
+ \FDFlayer\space
\FDFsurroundings\space
/Q \FDFalign\space
\FDFactions}%
@@ -1515,6 +1843,7 @@
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
+ \FDFlayer\space
\FDFsurroundings\space
/Q \FDFalign\space
\FDFactions}%
@@ -1528,6 +1857,7 @@
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
+ \FDFlayer\space
\FDFsurroundings\space
/Q \FDFalign\space
\FDFactions}%
@@ -1547,6 +1877,7 @@
\def\doFDFpresetchoicefield#1#2#3#4#5#6#7#8%
{\bgroup
+ \setFDFlayer
\setFDFswitches[#6]%
\setFDFattributes[#5]%
\setFDFvalues[#7][#4]%
@@ -1559,6 +1890,7 @@
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
+ \FDFlayer\space
\FDFsurroundings\space
/Opt [\FDFvalues]
\FDFactions}%
@@ -1572,6 +1904,7 @@
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
+ \FDFlayer\space
\FDFsurroundings\space
/Opt [\FDFvalues]
\FDFactions}%
@@ -1585,6 +1918,7 @@
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
+ \FDFlayer\space
\FDFsurroundings\space
\FDFactions}%
\or
@@ -1608,6 +1942,7 @@
\def\doFDFpresetpushcheckfield#1#2#3#4#5#6#7#8% in acro<5 (\FDFdefault)
{\bgroup % in acro>5 /\FDFdefault
+ \setFDFlayer
\ifcase#8\relax\FDFvaluesfalse\else\FDFvaluestrue\fi
\setFDFswitches[#5]%
\setFDFactions[#7]%
@@ -1623,12 +1958,14 @@
/V /\FDFdefault\space
/AS /\FDFdefault\space
\fi
+ \FDFlayer
/Ff \FDFflag\space
/F \FDFplus\space
+ \FDFlayer\space
\FDFappearance\space
\FDFactions}%
\registerFDFobject{#1}%
- \or
+ \or % no appearance and layer ?
\setFDFkids[kids:][\currentFDFkids]%
\doPDFdictionaryobject class FDF name #1 data
{/T (#1) /FT /Btn
@@ -1656,6 +1993,7 @@
\fi
/Ff \FDFflag\space
/F \FDFplus\space
+ \FDFlayer\space
\FDFappearance\space
\FDFactions}%
\or
@@ -1671,6 +2009,7 @@
/V /\FDFdefault\space
/AS /\FDFdefault\space
\fi
+ \FDFlayer\space
\FDFappearance
\FDFactions}%
\fi
@@ -1684,14 +2023,15 @@
\def\doFDFpresetradiofield#1#2#3#4#5#6#7#8%
{\bgroup
+ \setFDFlayer
\FDFvaluestrue
\setFDFswitches[#5]%
\setFDFactions[#8]%
\doifelsenothing{#4}
{\def\FDFdefault{Off}}
{\def\FDFdefault{#4}}%
-\@EA\aftersplitstring\FDFdefault\at=>\to\FDFdefaultvalue
-\ifx\FDFdefaultvalue\empty\else\let\FDFdefault\FDFdefaultvalue\fi
+ \@EA\aftersplitstring\FDFdefault\at=>\to\FDFdefaultvalue
+ \ifx\FDFdefaultvalue\empty\else\let\FDFdefault\FDFdefaultvalue\fi
\ifcase\currentFDFmode
\doFDFappearance{#1}{#7}{1}%
\doPDFgetobjectreference{FDF}{#6}\PDFobjectreference
@@ -1700,6 +2040,7 @@
/Parent \PDFobjectreference\space
/F \FDFplus\space
/AS /\FDFdefault\space
+ \FDFlayer\space
\FDFappearance\space
\FDFactions}%
\registerFDFobject{#1}%
@@ -1722,6 +2063,7 @@
/Parent \PDFobjectreference\space
/AS /\FDFdefault\space
/F \FDFplus\space
+ \FDFlayer\space
\FDFappearance\space
\FDFactions}%
\or
@@ -1734,6 +2076,7 @@
/Parent \PDFobjectreference\space
/AS /\FDFdefault\space
/F \FDFplus\space
+ \FDFlayer\space
\FDFappearance\space
\FDFactions}%
\fi
@@ -1766,13 +2109,13 @@
% /V (#2)
% and now finally this works
/H /N
-% /opt is buggy in 5.05, only works once, sigh
-%\ifx\FDFfirstvalues\FDFsecondvalues
- /V /#2
-%\else
-% /V /\FDFdefaultindex\space
-% /Opt [\FDFsecondvalues]
-%\fi
+ % /opt is buggy in 5.05, only works once, sigh
+ %\ifx\FDFfirstvalues\FDFsecondvalues
+ /V /#2
+ %\else
+ % /V /\FDFdefaultindex\space
+ % /Opt [\FDFsecondvalues]
+ %\fi
/Ff \FDFflag\space
/F \FDFplus\space
/Kids [\FDFkids]
@@ -1843,6 +2186,17 @@
\def\doFDFdefault#1#2%
{\doifelse{#2}{1}{\def\FDFdefault{On}}{\def\FDFdefault{Off}}}
+%D Layer support:
+
+\def\setFDFlayer % todo : \ifx\PDFobjectreference\noPDFobjectreference ipv found
+ {\letempty\FDFlayer
+ \doifsomething\@@DriverFieldLayer
+ {\checkproperty\@@DriverFieldLayer
+ \doifobjectreferencefoundelse{PDLN}\@@DriverFieldLayer
+ {\doPDFgetobjectreference{PDLN}\@@DriverFieldLayer\PDFobjectreference
+ \edef\FDFlayer{/OC \PDFobjectreference}}%
+ \donothing}}
+
%D The three appearances {\em normal}, \type{roll over} and
%D \type{push down} are passed as comma separated triplets,
%D that is, the second argument can look like:
@@ -1908,10 +2262,10 @@
\beginETEX \ifcsname
-\def\getsecondaryPDFreferences%
+\def\getsecondaryPDFreferences
{\ifcase\nofsecondaryreferences\else
\ifcsname PDF-SR:\the\nofsecondaryreferences\endcsname
- \xdef\secondaryPDFreferences%
+ \xdef\secondaryPDFreferences
{/Next << \csname PDF-SR:\the\nofsecondaryreferences\endcsname\space
\secondaryPDFreferences >>}%
\fi
@@ -1923,10 +2277,10 @@
\beginTEX
-\def\getsecondaryPDFreferences%
+\def\getsecondaryPDFreferences
{\ifcase\nofsecondaryreferences\else
\@EA\ifx\csname PDF-SR:\the\nofsecondaryreferences\endcsname\relax\else
- \xdef\secondaryPDFreferences%
+ \xdef\secondaryPDFreferences
{/Next << \csname PDF-SR:\the\nofsecondaryreferences\endcsname\space
\secondaryPDFreferences >>}%
\fi
@@ -2010,7 +2364,7 @@
\egroup}
%D The next macro does the same job, but now in the \TEX\ way
-%D of doing things. Easy eh?
+%D of doing things. Easy eh? Will become obsolete!
\bgroup
@@ -2627,11 +2981,9 @@
/Name (#2)}%
\doPDFgetobjectreference{PDLN}{#1}\PDFobjectreference
\xdef\PDFtextlayers{\PDFtextlayers\space\PDFobjectreference}%
- \ifcase#3\relax
- \xdef\PDFhidelayers{\PDFhidelayers\space\PDFobjectreference}%
- \or
- \xdef\PDFvidelayers{\PDFvidelayers\space\PDFobjectreference}%
- \fi
+ \doifelse{#3}\v!start
+ {\xdef\PDFvidelayers{\PDFvidelayers\space\PDFobjectreference}}%
+ {\xdef\PDFhidelayers{\PDFhidelayers\space\PDFobjectreference}}%
%\driverreferenced \doPDFdictionaryobject class PDLD name #1 data
\doPDFdictionaryobject class PDLD name #1 data
{/Type /OCMD
@@ -2704,4 +3056,4 @@
\fi
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/spec-ini.tex b/tex/context/base/spec-ini.tex
index feaaf5b8b..33cae54dc 100644
--- a/tex/context/base/spec-ini.tex
+++ b/tex/context/base/spec-ini.tex
@@ -8,17 +8,20 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-\newif\ifsimplifyspecials \simplifyspecialstrue % see later
+\newif\ifsimplifyspecials \simplifyspecialstrue % see later
-%D We will forbid loading specials after the first page is
-%D shipped out.
+% todo: no args, named vars instead
+% maybe also drop multiple drivers and make simply the default, then simplier defs
-\ifx\realpageno\undefined
+%D We will forbid loading specials after the first page is
+%D shipped out.
+
+\ifx\realpageno\undefined
\countdef\realpageno=0 \realpageno=1
-\fi
+\fi
%D Specials are \TEX's channel to the outside world. They make
%D \TEX\ even more platform independant and permit easy
@@ -141,8 +144,8 @@
%D are used which can optionally be followed by length
%D specifiers and arguments. The \DVI||format incorporates a
%D channel to the outside world. This channel is activated by
-%D the \TEX\ primitive \type {\special}. The sequence
-%D
+%D the \TEX\ primitive \type {\special}. The sequence
+%D
%D \starttypen
%D \special{Hello here I am.}
%D \stoptypen
@@ -156,26 +159,26 @@
%D The \type {xxx1} is represented in byte code 239 and the
%D number of following bytes in a~1, 2, 3 or~4 byte number. So
%D here we get $1+1+16$ bytes of code.
-%D
+%D
%D Translating these codes is upto the \DVI\ driver. It's
%D common use to ignore specials that cannot be interpreted, so
%D the example string should have no consequences for the
-%D output.
+%D output.
-%D \macros
+%D \macros
%D {everyresetspecials}
%D
-%D Now what will this one do? We'll see in a few lines.
+%D Now what will this one do? We'll see in a few lines.
\newevery \everyresetspecials \relax
%D \macros
%D {jobsuffix}
%D
-%D By default, \TEX\ produces \DVI\ files which can be
-%D converted to other filetypes. Sometimes it is handy to
-%D know what the target file will be. In other driver
-%D modules we wil set \type {\jobsuffix} to \type {pdf}.
+%D By default, \TEX\ produces \DVI\ files which can be
+%D converted to other filetypes. Sometimes it is handy to
+%D know what the target file will be. In other driver
+%D modules we wil set \type {\jobsuffix} to \type {pdf}.
\def\jobsuffix{dvi}
@@ -187,12 +190,12 @@
%D settings is that the latter don't interfere with typesetting
%D but must be set before the first shipout, while the specials
%D must be packaged in the shipped out box in such a way that
-%D they don't interfere.
+%D they don't interfere.
\newif\ifspecialbasedsettings \specialbasedsettingstrue
-\appendtoksonce
- \specialbasedsettingstrue
+\appendtoksonce
+ \specialbasedsettingstrue
\to \everyresetspecials
%D Because there is no standardization in the use of specials,
@@ -214,9 +217,9 @@
%D \stopspecials
%D \stoptypen
%D
-%D Because drivers can have overlap in low level macros, a
-%D mechanism of inheritance is implemented. The libraries
-%D defined as second argument are loaded first.
+%D Because drivers can have overlap in low level macros, a
+%D mechanism of inheritance is implemented. The libraries
+%D defined as second argument are loaded first.
%D
%D Every special has to be predefined first. We do this with
%D the command:
@@ -267,7 +270,7 @@
\def\@@specarg@@{@@spcarg@@}
\def\@@specexc@@{@@spcexc@@}
-% not faster
+% not faster
%
% \def\@@specfil@@{@sp@f@}
% \def\@@speclst@@{@sp@l@}
@@ -298,7 +301,7 @@
%D overruled. The name may differ from the file||tag.
%D
%D The optional second argument can consist of a list of
-%D libraries that are to be loaded first.
+%D libraries that are to be loaded first.
\def\dostartspecials[#1][#2]%
{\doifsomething{#2}
@@ -316,7 +319,7 @@
\def\stopspecials
{\localpopmacro\currentspecial
\protect}
-
+
%D \macros
%D {installspecial,
%D resetspecials}
@@ -333,7 +336,7 @@
%D
%D With \type{\resetspecials} we can unload the predefined
%D specials. Special reset actions |<|look in \type{spec-mis}
-%D for an example|>| can be assigned to the token register
+%D for an example|>| can be assigned to the token register
%D \type{\everyresetspecials}.
\let\@@allspecials=\empty
@@ -393,7 +396,7 @@
%D We use \type{\usespecials} to load a specific library.
%D This command is only permitted outside the definition part.
-\def\dousespecials#1%
+\def\dousespecials#1%
{\doifelse{#1}\v!reset
{\resetspecials}
{\doifdefinedelse{\@@specfil@@#1}
@@ -420,10 +423,10 @@
%D defined specials. Once a special is installed, the special
%D itself calls for this command, so it's not needed outside
%D this module. One can use it if wanted.
-%D
-%D A former implementation grouped the execution. Recent
-%D additions however |<|like the specials that implement object
-%D handling|>| asked for non||grouped execution.
+%D
+%D A former implementation grouped the execution. Recent
+%D additions however |<|like the specials that implement object
+%D handling|>| asked for non||grouped execution.
%D \starttypen
%D \def\executespecials#1#2%
@@ -431,7 +434,7 @@
%D {\getvalue{##1\string#1}#2\relax}%
%D \processcommacommand
%D [\getvalue{\@@speclst@@\string#1}]\doonespecial}
-%D
+%D
%D \def\executespecial#1%
%D {\expandafter\ifcase\getvalue{\@@specarg@@\string#1}\relax
%D \def\next%
@@ -462,24 +465,24 @@
%D {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}}}%
%D \or
%D \def\next##1##2##3##4##5##6##7##8##9%
-%D {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}}%
+%D {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}}%
%D \else
%D \def\next%
%D {\message{illegal special: \string#1}}%
%D \fi
%D \next}
-%D \stoptypen
-%D
+%D \stoptypen
+%D
%D Because specials happen quite often, we will use a bit more
%D brute force. Keep in mind that we have to collect the
-%D arguments because we want to support more drivers at once.
-%D
-%D I tested this on the next test. Where the previous alternative
-%D took about 32 seconds, the new alternative takes 25 seconds.
+%D arguments because we want to support more drivers at once.
+%D
+%D I tested this on the next test. Where the previous alternative
+%D took about 32 seconds, the new alternative takes 25 seconds.
%D
-%D \starttypen
+%D \starttypen
%D \testfeature{10000}{\setbox0=\hbox{test \color[red]{oeps} test}}
-%D \stoptypen
+%D \stoptypen
\def\@@exsp{exsp}
@@ -500,15 +503,15 @@
%D {\csname##1\xspecialcommand\endcsname#1\relax}%
%D \@EA\rawprocesscommalist\@EA
%D [\csname\@@speclst@@\xspecialcommand\endcsname]\doonespecial}
-%D
+%D
%D \def\executespecial#1%
%D {\def\xspecialcommand{\string#1}%
%D \@EA\@EA\@EA\executespecials\csname\@@exsp\csname\@@specarg@@\xspecialcommand\endcsname\endcsname}
-%D \stoptypen
+%D \stoptypen
-%D Some more speed can be gained by using a dedicated string
-%D processing routine. Now we can bring down the execution
-%D time to 21 seconds, one third less than the original run time.
+%D Some more speed can be gained by using a dedicated string
+%D processing routine. Now we can bring down the execution
+%D time to 21 seconds, one third less than the original run time.
\def\executespecials#1%
{\@EA\let\@EA\speciallist\csname\@@speclst@@\xspecialcommand\endcsname
@@ -527,32 +530,32 @@
\doonespecial{#1}\expandafter\dodoonespecial
\fi}
-%D This kind of saving only shows up when making interative
-%D documents with lots of color switches. In such documents
-%D tens of thousands of special calls are rather normal.
-%D On a 650 Mhz Pentium, the previous test takes 15 seconds
-%D less (on about 65 seconds). When processing 2000 page
-%D interactive documents this saving can be neglected.
+%D This kind of saving only shows up when making interative
+%D documents with lots of color switches. In such documents
+%D tens of thousands of special calls are rather normal.
+%D On a 650 Mhz Pentium, the previous test takes 15 seconds
+%D less (on about 65 seconds). When processing 2000 page
+%D interactive documents this saving can be neglected.
-%D In the previous macros, the \type{{{...}}} are needed
+%D In the previous macros, the \type{{{...}}} are needed
%D because we pass all those arguments to the specials support
-%D macro.
+%D macro.
\let\openspecialfile \relax
\let\closespecialfile \relax
%D \macros
%D {doifspecialavailableelse}
-%D
-%D For testing purposes (this was first needed when object
-%D support was implemented) we have:
-%D
+%D
+%D For testing purposes (this was first needed when object
+%D support was implemented) we have:
+%D
%D \starttypen
%D \doifspecialavailableelse\specialcommand{true}{false}
%D \stoptypen
-%D
-%D e.g:
-%D
+%D
+%D e.g:
+%D
%D \starttypen
%D \doifspecialavailableelse\doinsertobject{...}{...}
%D \stoptypen
@@ -564,9 +567,9 @@
%D In the file \type {spec-def} you will find the predefined
%D specials.
-%D Now that we have seen the flexible way (permitting
-%D special chains) we will implement a faster and flat
-%D alternative. But only if flag si set.
+%D Now that we have seen the flexible way (permitting
+%D special chains) we will implement a faster and flat
+%D alternative. But only if flag si set.
\ifsimplifyspecials
@@ -594,54 +597,54 @@
\let\preloadedspecials\empty}
\def\definespecial#1%
- {\@EA\chardef\csname\@@speclst@@\string#1\endcsname=1
+ {\@EA\chardef\csname\@@speclst@@\string#1\endcsname=1
\def#1}
- \def\doifspecialavailableelse#1%
+ \def\doifspecialavailableelse#1%
{\ifcase\csname\@@speclst@@\string#1\endcsname
\expandafter\secondoftwoarguments
\else
\expandafter\firstoftwoarguments
\fi}
-\fi
+\fi
%D For quite some time the \CONTEXT\ way of specifying the
-%D output format has been:
-%D
+%D output format has been:
+%D
%D \starttypen
%D \usespecials[ps,yy,win,pdf]
%D \stoptypen
%D
-%D Because at \PRAGMA\ we use \DVIPSONE, this was a suitable
-%D setting, but with \CONTEXT\ going public, the next sequence
-%D is more suitable for \DVIPS\ users:
-%D
+%D Because at \PRAGMA\ we use \DVIPSONE, this was a suitable
+%D setting, but with \CONTEXT\ going public, the next sequence
+%D is more suitable for \DVIPS\ users:
+%D
%D \starttypen
%D \usespecials[reset,ps,tr,pdf]
%D \stoptypen
%D
-%D On the other hand, for \PDFTEX\ we needed:
+%D On the other hand, for \PDFTEX\ we needed:
%D
%D \starttypen
%D \usespecials[tpd]
%D \stoptypen
%D
-%D To simplify things, I decided to provide a higher level
-%D command.
+%D To simplify things, I decided to provide a higher level
+%D command.
%D
%D \starttypen
%D \defineoutput[name][specials]
%D \setupoutput[name,...]
%D \stoptypen
%D
-%D In a \type {spec-def} you can find some examples.
+%D In a \type {spec-def} you can find some examples.
\def\defineoutput
{\dodoubleargument\dodefineoutput}
\def\dodefineoutput[#1][#2]%
- {\setvalue{\??ui#1}{#2}}
+ {\setvalue{\??ui#1}{#2}}
\def\dosetupoutput#1%
{\doifdefinedelse{\??ui#1}
@@ -651,7 +654,7 @@
{\showmessage\m!specials7{#1}}}}
\def\setupoutput[#1]%
- {\ifnum\realpageno<2 % new
+ {\ifnum\realpageno<2 % new
\resetspecials\processcommacommand[#1]\dosetupoutput
\fi}
diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex
index f673e97c3..47c887acf 100644
--- a/tex/context/base/spec-tpd.tex
+++ b/tex/context/base/spec-tpd.tex
@@ -347,7 +347,7 @@
\immediate\pdfobj
{[ << /Image \PDFfigurereference\space0 R
/DefaultForPrinting true >> ]}%
- \xdef\pdfimageattributes%
+ \xdef\pdfimageattributes
{attr {/Alternates \the\pdflastobj\space0 R}}%
\fi}
@@ -549,8 +549,7 @@
{\pdfliteral{Q n}}
%D \macros
-%D {dosetupinteraction,
-%D dosetupopenaction,dosetupcloseaction}
+%D {dosetupinteraction}
%D
%D Nothing special is needed to enable \PDF\ commands and
%D interaction. We stick with a message.
@@ -558,9 +557,6 @@
\definespecial\dosetupinteraction
{\showmessage\m!interactions{21}{pdftex}}
-\definespecial\dosetupopenaction {\doPDFsetupopenaction}
-\definespecial\dosetupcloseaction{\doPDFsetupcloseaction}
-
%D \macros
%D {doresetgotowhereever,
%D dostartthisisrealpage,dostartthisislocation,
@@ -1156,7 +1152,8 @@
%D use feed this number to \type {pdftosrc} and filter the
%D file from the \PDF\ file.
-\let\PDFlaststreamobject\s!unknown
+\let\PDFlaststreamobject \s!unknown
+%def\PDFlaststreamreference{0 0 R}
\def\doPDFfilestreamobject class #1 name #2 file #3 source #4%
{\immediate\pdfobj stream file{#4}%
@@ -1165,9 +1162,12 @@
\doPDFdictionaryobject class {#1} name {#2} data
{/Type /Filespec /F (#3) /EF <</F \PDFlaststreamobject\space0 R>>}}
+\def\doPDFgetfilestreamreference#1#2%
+ {\doPDFgetobjectreference{PDFFS}{#1}#2}
+
\def\doPDFfilestreamidentifier#1%
{\doifsomething{#1}
- {\doPDFgetobjectreference{PDFFS}{#1}\PDFobjectreference
+ {\doPDFgetfilestreamreference{#1}\PDFobjectreference
\@EA\beforesplitstring\PDFobjectreference\at{ }\to\PDFlaststreamobject
\PDFlaststreamobject}}
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index 9a8e36874..b5e908c8e 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -852,12 +852,19 @@
%D of \type {\normalhbox}, since it manages the height and depth of
%D the line.
-\def\shapedhbox
- {\dowithnextbox
- {\nextboxht\zeropoint
- \nextboxdp\zeropoint
- \flushnextbox}
- \normalhbox}
+% \def\shapedhbox
+% {\dowithnextbox
+% {\nextboxht\zeropoint
+% \nextboxdp\zeropoint
+% \flushnextbox}
+% \normalhbox}
+
+\def\shapedhbox % lines with non strutted dimensions have
+ {\expanded{\dowithnextbox % interlineskip so if we want the original
+ {\nextboxht\the\ht\shapebox % spacing, we need to preserve the original
+ \nextboxdp\the\dp\shapebox % height and depth which is definitely
+ \noexpand\flushnextbox}} % needed if we apply struts to the 'new'
+ \normalhbox} % box or do something that changed ist size
%D \macros
%D {hyphenatedword,
@@ -1640,27 +1647,27 @@
\def\setvboxtohbox
{\bgroup
\ifdim\baselineskip<16pt \relax
- \dimen0\baselineskip
- \multiply\dimen0 1024
+ \scratchdimen\baselineskip
+ \multiply\scratchdimen 1024
\else
\message{cropping \baselineskip to 16pt}%
- \dimen0\maxdimen
+ \scratchdimen\maxdimen
\fi
- \divide\dimen0 \hsize
- \multiply\dimen0 64
- \xdef\normalvboxtohboxfactor{\expandafter\withoutpt\the\dimen0}%
+ \divide\scratchdimen \hsize
+ \multiply\scratchdimen 64
+ \xdef\normalvboxtohboxfactor{\withoutpt\the\scratchdimen}%
\egroup}
\def\startvboxtohbox
{\bgroup
\setvboxtohbox
- \setbox0\normalhbox\bgroup}
+ \setbox\scratchbox\normalhbox\bgroup}
\def\stopvboxtohbox
{\egroup
- \dp0=\zeropoint
- \ht0=\normalvboxtohboxfactor\wd0
- \box0
+ \dp\scratchbox\zeropoint
+ \ht\scratchbox\normalvboxtohboxfactor\wd\scratchbox
+ \box\scratchbox
\egroup}
% % to be done: start halfway a line combined with one line
@@ -1690,6 +1697,8 @@
% \box0
% \egroup}
+% todo: \scratchbox
+
\def\convertvboxtohbox
{\setvboxtohbox
\makehboxofhboxes
@@ -2500,7 +2509,7 @@
{\dorecurse5{\unskip\unkern\unpenalty}}
\def\removelastskip % \ifvmode the plain tex one \fi
- {\ifvmode\ifdim\lastskip=\z@\else\vskip-\lastskip\fi\fi}
+ {\ifvmode\ifdim\lastskip=\zeropoint\else\vskip-\lastskip\fi\fi}
%D \macros
%D {makestrutofbox}
@@ -2663,4 +2672,34 @@
\def\frozenhbox
{\hbox\bgroup\dowithnextbox{\hbox{\hbox{\flushnextbox}}\egroup}\hbox}
+%D \macros
+%D {setboxllx,setboxlly,gsetboxllx,gsetboxlly,getboxllx,getboxlly}
+%D
+%D A prelude to an extended \TEX:
+
+% it's about time to drop tex in favour of etex / TEX VERSION TO BE TESTED
+
+\beginTEX
+
+ \def\setboxllx #1#2{\bgroup\scratchdimen#2\expanded{\egroup\noexpand\setevalue{b@@x\number#1}{\the\scratchdimen}}}
+ \def\setboxlly #1#2{\bgroup\scratchdimen#2\expanded{\egroup\noexpand\setevalue{b@@y\number#1}{\the\scratchdimen}}}
+
+ \def\gsetboxllx#1#2{\bgroup\scratchdimen#2\setxvalue{b@@x\number#1}{\the\scratchdimen}\egroup}
+ \def\gsetboxlly#1#2{\bgroup\scratchdimen#2\setxvalue{b@@y\number#1}{\the\scratchdimen}\egroup}
+
+\endTEX
+
+\beginETEX
+
+ \def\setboxllx#1#2{\setevalue{b@@x\number#1}{\the\dimexpr(#2)}}
+ \def\setboxlly#1#2{\setevalue{b@@y\number#1}{\the\dimexpr(#2)}}
+
+ \def\gsetboxllx{\global\setboxllx}
+ \def\gsetboxlly{\global\setboxlly}
+
+\endETEX
+
+\def\getboxllx#1{\executeifdefined{b@@x\number#1}\zeropoint}
+\def\getboxlly#1{\executeifdefined{b@@y\number#1}\zeropoint}
+
\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/supp-emp.tex b/tex/context/base/supp-emp.tex
index 5d9a22e2a..fd9f473c9 100644
--- a/tex/context/base/supp-emp.tex
+++ b/tex/context/base/supp-emp.tex
@@ -8,46 +8,46 @@
%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.
-%M \input supp-emp
+%M \input supp-emp
%D When \THANH, the author of \PDFTEX, and I were exchanging
%D some emails on \PDFTEX\ functionality, positional
%D information popped up as potential extension. Actually, it
%D did not take that much time to cook up the basic
%D functionality and the author had implemented it before I
-%D could even start to think about real advanced applications.
-%D
+%D could even start to think about real advanced applications.
+%D
%D I'm sure that \TEX\ programmers can spend many days on how
%D and what kind of information is needed if you want to have
%D access to positions, but since high level macros will
%D probably be used anyway, even things like multiple reference
%D points have proved to be rather unimportant at the system
-%D level.
-%D
-%D Therefore, \PDFTEX\ provides just these three primitives:
-%D
+%D level.
+%D
+%D Therefore, \PDFTEX\ provides just these three primitives:
+%D
%D \starttabulatie[|l|l|]
%D \NC \type {\pdfsavepos} \NC marks the current position \NC \NR
%D \NC \type {\pdflastxpos} \NC the last marked horizontal position \NC \NR
%D \NC \type {\pdflastypos} \NC the last marked vertical position \NC \NR
%D \stoptabulatie
-%D
+%D
%D Based on these three primitives, very advanced systems can
%D be build, and for some time now, \CONTEXT\ has such a
%D system in its core. However, not everyone uses \CONTEXT, so
-%D we will demonstrate position tracking in generic applications.
-%D
+%D we will demonstrate position tracking in generic applications.
+%D
%D Because \PDFTEX\ produces its output directly, many of those
%D nice tricks provided by back||ends by means of \type
%D {\special} fail when producing \PDF\ code directly. Take for
%D instance \EMTEX\ specials. When someone sent me a mail
-%D asking if \PDFTEX\ did support those specials, the original
-%D answer was \citaat {no}, but in the last few years I have learned
-%D that you must never underestimate \TEX's capabilities.
-%D
+%D asking if \PDFTEX\ did support those specials, the original
+%D answer was \citaat {no}, but in the last few years I have learned
+%D that you must never underestimate \TEX's capabilities.
+%D
%D I must admit that I never use those specials myself, but
%D from the way they were used in the macros I was sent, I
%D learned that they depend on the back||end's capability to
@@ -56,20 +56,20 @@
%D positional information. So in order to use those specials,
%D you must be sure that they are supported by every driver you
%D use. However, the good news is that \PDFTEX\ does support
-%D position tracking, so here is our generic example.
-%D
+%D position tracking, so here is our generic example.
+%D
%D The two \EMTEX\ specials we need to implement are packaged
%D into the macros \type {\EMmoveto} and \type {\EMlineto},
-%D like:
-%D
+%D like:
+%D
%D \starttypen
%D \def\EMmoveto{\special{em:moveto}}
%D \def\EMlineto{\special{em:lineto}}
%D \stoptypen
-%D
+%D
%D They are used in macro packages to draw lines, and the
-%D results are often boxes with content like the following:
-%D
+%D results are often boxes with content like the following:
+%D
%D \startbuffer
%D \vbox to 2cm
%D {\offinterlineskip \EMmoveto
@@ -77,12 +77,12 @@
%D \vskip 2cm \EMlineto
%D \vskip-2cm \EMlineto}
%D \stopbuffer
-%D
+%D
%D \typebuffer
-%D
+%D
%D This box will contain a triangle, and when typeset, it should
-%D look like:
-%D
+%D look like:
+%D
%D \startregelcorrectie[blanko]
%D \haalbuffer
%D \stopregelcorrectie
@@ -94,7 +94,7 @@
%D Once they are known, we use them to draw a line and
%D afterwards we save these end coordinates as starting point
%D for the next line segment. So, at each point specified by
-%D \type {\EMlineto} we need to know the coordinates.
+%D \type {\EMlineto} we need to know the coordinates.
\def\EMmoveto
{\EMgetposition\EMlastmovex\EMlastmovey}
@@ -107,8 +107,8 @@
%D literal \PDF\ code into the text using \type {\pdfliteral}.
%D Here, the \type {m} means \citeer {moveto}, the \type {l}
%D means \citeer {lineto} and the \type {S} operator \citeer
-%D {strokes} (draws) the line. The macro \type {\EMlinewd}
-%D holds the linewidth in basepoints.
+%D {strokes} (draws) the line. The macro \type {\EMlinewd}
+%D holds the linewidth in basepoints.
\def\EMlinewd{.4}
@@ -124,8 +124,8 @@
\global\let\EMlastmovey\EMlastliney
\egroup}
-%D We need a fresh start, so we first set the current position
-%D to zero.
+%D We need a fresh start, so we first set the current position
+%D to zero.
\def\resetEMspecials
{\gdef\EMlastmovex{0}\gdef\EMlastmovey{0}}
@@ -134,8 +134,8 @@
%D current position is marked with \type {\pdfsavepos} and its
%D coordinates are written to a file whenever the page is
%D shipped out, since \type {\write} postpones its action
-%D until that moment. The file has entries like:
-%D
+%D until that moment. The file has entries like:
+%D
%D \starttypen
%D \EMsetpos 1 4661756 46651918
%D \EMsetpos 2 5000359 46990521
@@ -143,22 +143,22 @@
%D \EMsetpos 4 5338962 46990521
%D \EMsetpos 5 4661756 45974712
%D \stoptypen
-%D
-%D These lines are written with the command:
-%D
+%D
+%D These lines are written with the command:
+%D
%D \starttypen
%D \write\EMfile
%D {\EMsetpos\number\EMcounter
%D \space\number\pdflastxpos\space\number\pdflastypos}%
%D \stoptypen
-%D
+%D
%D In reality the argument to \type {\write} looks slightly
%D more complicated, because we have to make sure that the
%D number of the current position is frozen and \type
%D {\EMsetpos} is not expanded. We do so by explicitly
%D expanding the number beforehand and preventing expansion of
-%D \type {\EMsetpos}.
-
+%D \type {\EMsetpos}.
+
\def\EMgetposition#1#2%
{\bgroup
\pdfsavepos
@@ -171,17 +171,17 @@
\xdef#2{\the\count2}%
\egroup}
-%D The counter mentioned a few lines ago needs to be
-%D declared before it can be used.
+%D The counter mentioned a few lines ago needs to be
+%D declared before it can be used.
-\newcount\EMcounter
+\newcount\EMcounter
-%D We also need a dedicated file slot.
+%D We also need a dedicated file slot.
\newwrite\EMfile
-%D Before we open the file for writing, we read in the data
-%D written in the previous pass, but only if the file is
+%D Before we open the file for writing, we read in the data
+%D written in the previous pass, but only if the file is
%D present.
\def\EMfilename{\jobname.emp}
@@ -196,14 +196,14 @@
\def\stopEMspecials
{\closeout\EMfile}
-%D Just to be sure, we test if \type {\scratchread} is defined,
-%D and if not, we allocate a slot.
+%D Just to be sure, we test if \type {\scratchread} is defined,
+%D and if not, we allocate a slot.
\ifx\undefined\scratchread \newread\scratchread \fi
-%D This leaves us two commands. The \type {\EMsetpos} command
+%D This leaves us two commands. The \type {\EMsetpos} command
%D that ends up in the file stores each position in a macro.
-%D When this macro is expanded, it assigns the coordinates to
+%D When this macro is expanded, it assigns the coordinates to
%D two scratch counters.
\def\EMsetpos#1 #2 #3 % number x y
@@ -212,15 +212,15 @@
%D This position is recalled with its companion macro. First we
%D set the counters to zero. When the position is unknown,
%D nothing happens since the \type {\csname...} will expand to
-%D \type {\relax}.
+%D \type {\relax}.
\def\EMsetcounters%
- {\count0=0 \count2=0
+ {\count0=0 \count2=0
\csname EM:\the\EMcounter\endcsname}
%D These macros are rather independent of the macro package you
-%D use. For instance, in \CONTEXT\ the following works well:
-%D
+%D use. For instance, in \CONTEXT\ the following works well:
+%D
%D \startbuffer[pos-en]
%D \setuppositioning[unit=ex]
%D \startpositioning
@@ -229,7 +229,7 @@
%D \position(\recurselevel,0){\EMlineto}}
%D \stoppositioning
%D \stopbuffer
-%D
+%D
%D \startbuffer[pos-nl]
%D \stelpositionerenin[eenheid=ex]
%D \startpositioneren
@@ -238,42 +238,42 @@
%D \positioneer(\recurselevel,0){\EMlineto}}
%D \stoppositioneren
%D \stopbuffer
-%D
+%D
%D \typebuffer[pos-en]
-%D
-%D Here, we hook the \EMTEX\ macros into an existing text
+%D
+%D Here, we hook the \EMTEX\ macros into an existing text
%D positioning mechanism, which positions the commands
-%D using \TEX's skips and kerns.
-%D
+%D using \TEX's skips and kerns.
+%D
%D \startregelcorrectie[blanko]
%D \haalbuffer[pos-nl]
%D \stopregelcorrectie
-%D
+%D
%D Of course one should start and end the file with:
-%D
+%D
%D \starttypen
%D \startEMspecials
%D \stopEMspecials
-%D \stoptypen
-%D
-%D and, if needed, reset the begin position at each page using:
-%D
+%D \stoptypen
+%D
+%D and, if needed, reset the begin position at each page using:
+%D
%D \starttypen
-%D \resetEMspecials
+%D \resetEMspecials
%D \stoptypen
-\fi % end of non context part
+\fi % end of non context part
\ifx\dosetpositionpt\undefined \else % context part
-% \edef\EMlinewd{\expandafter\withoutpt\the\linewidth}
+% \edef\EMlinewd{\withoutpt\the\linewidth}
-%D A few pages ago, we mentioned that \CONTEXT\ has built||in
+%D A few pages ago, we mentioned that \CONTEXT\ has built||in
%D position tracking. This means that when we want to implement
%D this kind of trickery in this macro package, we can fall
%D back on existing functionality. In the following alternative
%D we will also use a few skips. This keeps the source readable
-%D and \CONTEXT\ has plenty of unused registers to accomodate
+%D and \CONTEXT\ has plenty of unused registers to accomodate
%D this strategy.
\newcount\EMcounter \def\EMvariable{EM:\the\EMcounter}
@@ -289,13 +289,13 @@
%D Watch how we reset the specials after a page is flushed. We
%D don't have to bother about files here, because saving and
%D recalling is already implemented. Although not needed, we
-%D define the start||stop macros, so that \CONTEXT\ users who
-%D key them in are not confronted with error messages.
+%D define the start||stop macros, so that \CONTEXT\ users who
+%D key them in are not confronted with error messages.
\let\startEMspecials\relax \let\stopEMspecials\relax
\def\EMgetposition#1#2%
- {\global\advance\EMcounter 1
+ {\global\advance\EMcounter 1
\setposition\EMvariable
\global#1=\POSx\EMvariable
\global#2=\POSy\EMvariable}
@@ -315,8 +315,8 @@
%D The command \type {\setposition} registers a position by
%D name (here \type {\EMvariable}), while \type {\POSx} and
-%D \type {\POSy} give you access to the coordinates.
-%D
+%D \type {\POSy} give you access to the coordinates.
+%D
%D These three commands are containes in a suite of low level
%D commands that can be used to register and get access to
%D positional information. The current mechanism is not yet
@@ -325,22 +325,22 @@
%D to the \METAPOST\ support already present in \CONTEXT.
%D Therefore, more advanced examples can be found in the
%D \METAFUN\ manual, since they fall beyond the scope of this
-%D module.
+%D module.
+
+\fi % end of context part
-\fi % end of context part
-
%D As a bonus, I will now provide a few macros that will make
%D this mechanism transparant to \DVI\ as well as \PDF\
-%D output. We will use \type {\pdfoutput} as trigger.
+%D output. We will use \type {\pdfoutput} as trigger.
-\ifx\pdfoutput\undefined \chardef\pdfoutput=0 \fi
+\ifx\pdfoutput\undefined \chardef\pdfoutput=0 \fi
%D We save some of the macros we defined previously:
\let\pdfEMmoveto\EMmoveto \let\pdfstartEMspecials\startEMspecials
\let\pdfEMlineto\EMlineto \let\pdfstopEMspecials \stopEMspecials
-%D We now redefine them to support \DVI\ and \PDF.
+%D We now redefine them to support \DVI\ and \PDF.
\def\EMmoveto{\ifcase\pdfoutput\special{em:moveto}\else\pdfEMmoveto\fi}
\def\EMlineto{\ifcase\pdfoutput\special{em:lineto}\else\pdfEMlineto\fi}
@@ -350,13 +350,13 @@
%D If there is any real demand for this in \CONTEXT, I will
%D hook these macros in the special drivers, so that their
-%D support becomes more natural.
-
+%D support becomes more natural.
+
%D You may want to change the default linewidth. The following
%D macro does the job. Beware of the fact that \type
-%D {\special}'s may interfere with the typesetting process.
+%D {\special}'s may interfere with the typesetting process.
%D
-%D \starttypen
+%D \starttypen
%D \setEMlinewidth{1pt}
%D \stoptypen
@@ -365,8 +365,8 @@
\dimen0=#1\relax
\count0=\dimen0
\divide\count0 65536
- \ifcase\pdfoutput
- \special{em:linewidth \the\dimen0}%
+ \ifcase\pdfoutput
+ \special{em:linewidth \the\dimen0}%
\fi
\xdef\EMlinewd{\the\count0}%
\egroup}
@@ -381,6 +381,6 @@
%D cleaner, but also faster. It was more out of curiosity than
%D out of need that we provided the \DVI\ methods as well.
%D Also, it is always good to have more roads to reach the same
-%D goal.
+%D goal.
-\endinput
+\endinput
diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex
index 460cb02f1..31fe2f23f 100644
--- a/tex/context/base/supp-lan.tex
+++ b/tex/context/base/supp-lan.tex
@@ -1223,7 +1223,7 @@
% 2 => alles na
% 3 => alles voor
-\bgroup \catcode`\~=\active \catcode`\/=\active
+% \bgroup \catcode`\~=\active \catcode`\/=\active
% Why not convert to ascii first? I will redo this one!
@@ -1263,6 +1263,47 @@
%
% Better (a mere copy with \dohyphens):
+% \bgroup \catcode`\~=\active \catcode`\/=\active
+%
+% \unexpanded\gdef\hyphenatedurl#1% {}{} handles accents
+% {\bgroup
+% \ifnum\hyphenpenalty<10000 \else
+% \def\discretionary##1##2##3{##1\allowbreak##2}%
+% \fi
+% \obeyhyphens
+% \def\splitbefore##1%
+% {\setbox\scratchbox=\hbox{##1{}{}}%
+% \ifcase\urlsplitmode
+% \box\scratchbox
+% \or
+% \postwordbreak\box\scratchbox\prewordbreak
+% \or
+% \prewordbreak\discretionary{\box\scratchbox}{}{\box\scratchbox}\prewordbreak
+% \else
+% \postwordbreak\box\scratchbox\prewordbreak
+% \fi}%
+% \def\splitafter##1%
+% {\ifcase\urlsplitmode
+% ##1{}{}%
+% \or
+% \prewordbreak\discretionary{##1{}{}}{}{##1{}{}}\prewordbreak
+% \or
+% \prewordbreak\discretionary{##1{}{}}{}{##1{}{}}\prewordbreak
+% \else
+% \prewordbreak\discretionary{}{##1{}{}}{##1{}{}}\prewordbreak
+% \fi}%
+% \def\flushurl%
+% {\savedurl\let\savedurl\empty}%
+% \def\\%
+% {\spliturl\#}%
+% \let\~=\lettertilde\let~=\~%
+% \let\/=\letterslash\let/=\/%
+% \let\savedurl\empty
+% \handletokens#1\with\scanurl\savedurl
+% \egroup}
+%
+% \egroup
+
\bgroup \catcode`\~=\active \catcode`\/=\active
\unexpanded\gdef\hyphenatedurl#1% {}{} handles accents
@@ -1299,6 +1340,7 @@
\let\~=\lettertilde\let~=\~%
\let\/=\letterslash\let/=\/%
\let\savedurl\empty
+ \scratchcounter\zerocount % used for hyphenmethod
\handletokens#1\with\scanurl\savedurl
\egroup}
@@ -1311,10 +1353,60 @@
%D \expandafter\handletokens\ascii\with\scanurl
%D \stoptypen
-\egroup
+% \def\scanurl#1%
+% {\ifx#1\~%
+% \flushurl\splitbefore\~%
+% \else\ifx#1\#%
+% \flushurl\splitbefore\#%
+% \else\ifx#1\&%
+% \flushurl\splitbefore\&%
+% \else\ifx#1\%%
+% \flushurl\splitbefore\%%
+% \else\ifx#1\_%
+% \flushurl\splitbefore\_%
+% \else\if\noexpand#1\relax
+% #1%
+% \else\ifnum\catcode`#1=8
+% \flushurl\splitbefore\_%
+% \else\ifnum\catcode`#1=6
+% \flushurl\splitbefore\#%
+% \else\ifnum\catcode`#1=4
+% \flushurl\splitbefore\&%
+% \else\if#1\lettertilde
+% \flushurl\splitbefore\~%
+% \else\if#1\letterpercent
+% \flushurl\splitbefore\%%
+% \else\if#1\letterunderscore
+% \flushurl\splitbefore\_%
+% \else\if#1\letterquestionmark
+% \flushurl\splitafter\letterquestionmark
+% \else\if#1\letterat
+% \flushurl\splitafter\letterat
+% \else\if#1\letterslash
+% \edef\savedurl{\savedurl\letterslash}%
+% \else\if#1+%
+% \flushurl\splitafter+%
+% \else\if#1:%
+% \flushurl\splitafter:%
+% \else\if#1.%
+% \flushurl\splitafter.%
+% \else\if#1(%
+% \flushurl\splitbefore(%
+% \else\if#1)%
+% \flushurl\splitafter)%
+% \else
+% \ifx\savedurl\empty\else
+% \splitbefore\savedurl
+% \let\savedurl\empty
+% \fi
+% #1%
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+\chardef\urlhyphenmethod=0
\def\scanurl#1%
- {\ifx#1\~%
+ {\advance\scratchcounter\plusone
+ \ifx#1\~%
\flushurl\splitbefore\~%
\else\ifx#1\#%
\flushurl\splitbefore\#%
@@ -1359,9 +1451,26 @@
\splitbefore\savedurl
\let\savedurl\empty
\fi
- #1%
+ \ifcase\urlhyphenmethod
+ #1%
+ \else
+ \ifnum\scratchcounter>\plusthree % so, \http: will not break
+ \edef\savedurl{#1}%
+ \else
+ #1%
+ \fi
+ \fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+% \setupinteraction[state=start]
+% \def\gotoURL#1{\useURL[foo][#1]\goto{\url[foo]}[url(foo)]}
+% \starttext
+% \endgraf \chardef\urlhyphenmethod=0
+% \hsize1pt\gotoURL{http://www.physik.fu-berlin.de/SomeVeryVeryVeryLongDirectory/And/AQuiteLongFileName.html}
+% \endgraf \chardef\urlhyphenmethod=1
+% \hsize1pt\gotoURL{http://www.physik.fu-berlin.de/SomeVeryVeryVeryLongDirectory/And/AQuiteLongFileName.html}
+% \stoptext
+
%D When Joop Susan asked (on the \CONTEXT\ mailing list) how
%D to handle url's passed as argument, the following solutions
%D came to my mind:
diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex
index 53988892c..2462140ba 100644
--- a/tex/context/base/supp-mis.tex
+++ b/tex/context/base/supp-mis.tex
@@ -22,7 +22,7 @@
%D Because \LATEX\ has no safe package loading mechanism, we
%D need to take care of possible interference.
-\def\StartLatexHack%
+\def\StartLatexHack
{\edef\StopLatexHack
{\catcode`\noexpand/=\the\catcode`/
\catcode`\noexpand:=\the\catcode`:
@@ -53,16 +53,16 @@
%D Furthermore nested \type{\if}'s can get us into
%D trouble.
-\def\definecontextobject%
+\def\definecontextobject
{\iftrue}
-\def\gobblecontextobject%
- {\setbox0=\hbox
+\def\gobblecontextobject
+ {\setbox0\hbox
\bgroup
\long\def\gobblecontextobject##1\fi{\egroup}%
\expandafter\gobblecontextobject\string}
-\long\def\ifnocontextobject#1\do%
+\long\def\ifnocontextobject#1\do
{\ifx#1\undefined
\expandafter\definecontextobject
\else
@@ -115,11 +115,11 @@
\ifnocontextobject \unprotect \do
- \def\unprotect%
+ \def\unprotect
{\advance\protectiondepth 1
\ifnum\protectiondepth=1
\let\normalprotect=\protect
- \def\protect%
+ \def\protect
{\ifnum\protectiondepth>0
\advance\protectiondepth -1
\ifnum\protectiondepth=0
@@ -127,7 +127,7 @@
\let\protect=\normalprotect
\fi
\fi}
- \edef\doprotect%
+ \edef\doprotect
{\catcode`\noexpand @=\the\catcode`@\relax
\catcode`\noexpand !=\the\catcode`!\relax
\catcode`\noexpand ?=\the\catcode`?\relax}
@@ -151,6 +151,25 @@
%D undefined. This way we can't mess up other macro packages,
%D but of course previous definitions can mess up our modules.
+\ifnocontextobject \donetrue \do \newif\ifdone \fi
+
+% no time now, will do a better test later (based on dimendef)
+
+\def\!!stringa{plain} \ifx\!!stringa\fmtname \donetrue \else
+\def\!!stringa{babel-plain} \ifx\!!stringa\fmtname \donetrue \else
+ \donefalse \fi \fi
+
+\ifdone
+ % plain defines some 15 dimens, so we need to define a few
+ % dummies in order to get out of the scratch area
+ \newdimen\scratchdimen % 16
+ \newdimen\scratchdimen % 17
+ \newdimen\scratchdimen % 18
+ \newdimen\scratchdimen % 19
+ \newdimen\scratchdimen % 20
+ \newdimen\scratchdimen % 21
+\fi
+
\ifnocontextobject \scratchcounter \do \newcount \scratchcounter \fi
\ifnocontextobject \scratchtoks \do \newtoks \scratchtoks \fi
\ifnocontextobject \scratchdimen \do \newdimen \scratchdimen \fi
@@ -179,7 +198,6 @@
\ifnocontextobject \nextdepth \do \newdimen \nextdepth \fi
\ifnocontextobject \CONTEXTtrue \do \newif\ifCONTEXT \fi
-\ifnocontextobject \donetrue \do \newif\ifdone \fi
\ifnocontextobject \eightbitcharacterstrue \do \newif\ifeightbitcharacters \fi
\ifnocontextobject \MPdrawingdonetrue \do \newif\ifMPdrawingdone \fi
@@ -458,7 +476,7 @@
\ifnocontextobject \uncatcodespecials \do
- \def\uncatcodespecials%
+ \def\uncatcodespecials
{\def\do##1{\catcode`##1=12 }\dospecials
\catcode`\ =\@@space
\catcode`\^^L=\@@ignore
@@ -469,7 +487,7 @@
\ifnocontextobject \setnaturalcatcodes \do
-\def\setnaturalcatcodes%
+\def\setnaturalcatcodes
{\catcode`\!=\@@other \catcode`\?=\@@other \catcode`\@=\@@other
\catcode`\#=\@@other \catcode`\&=\@@other \catcode`\|=\@@other
\catcode`\$=\@@other \catcode`\^=\@@other \catcode`\_=\@@other
@@ -538,10 +556,10 @@
\def\dorecurse#1%
{\dostepwiserecurse{1}{#1}{1}}
-\def\doloop%
+\def\doloop
{\dostepwiserecurse{1}{\maxdimen}{1}}
-\def\exitloop%
+\def\exitloop
{\recursecounter=\maxdimen}
%D \macros
@@ -620,13 +638,13 @@
\ifnocontextobject \dohandletokens \do
-\def\dodohandletokens%
+\def\dodohandletokens
{\ifx\next\end \else
\docommando{\next}%
\expandafter\dohandletokens
\fi}
-\def\dohandletokens%
+\def\dohandletokens
{\afterassignment\dodohandletokens\let\next= }
\long\def\handletokens#1\with#2%
@@ -675,4 +693,4 @@
%D That's it. Please forget this junk and take a look at how
%D it should be done.
-\StopLatexHack \protect \endinput
+\StopLatexHack \protect \endinput \ No newline at end of file
diff --git a/tex/context/base/supp-mpe.tex b/tex/context/base/supp-mpe.tex
index a964b450e..0285b9e82 100644
--- a/tex/context/base/supp-mpe.tex
+++ b/tex/context/base/supp-mpe.tex
@@ -913,6 +913,7 @@
\defineMPspecial{50} % x y width height label
{\bgroup
\scratchdimen\MPllx\s!bp \scratchdimen-\scratchdimen
+ % \scratchdimen-\MPllx\s!bp % moet ook werken
\advance\scratchdimen\gMPs1\s!bp
\edef\x{\number\scratchdimen}%
\scratchdimen\gMPs2\s!bp \scratchdimen-\scratchdimen
@@ -1267,4 +1268,4 @@
\fi
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex
index ca56f6eaf..91b6a9e03 100644
--- a/tex/context/base/supp-mps.tex
+++ b/tex/context/base/supp-mps.tex
@@ -1351,9 +1351,9 @@
\immediate\write\scratchwrite
{\@@cl@@s \space setgray #4}%
\else
- \dimen0=1\s!pt \advance\dimen0 -#1\s!pt
- \dimen2=1\s!pt \advance\dimen2 -#2\s!pt
- \dimen4=1\s!pt \advance\dimen4 -#3\s!pt
+ \dimen0=\onepoint \advance\dimen0 -#1\points
+ \dimen2=\onepoint \advance\dimen2 -#2\points
+ \dimen4=\onepoint \advance\dimen4 -#3\points
\ifreduceMPcolors
\dimen6\dimen0
\ifdim\dimen2<\dimen6 \dimen6\dimen2 \fi
@@ -1365,10 +1365,10 @@
\dimen6\zeropoint
\fi
\immediate\write\scratchwrite
- {\withoutpt{\the\dimen0} \space
- \withoutpt{\the\dimen2} \space
- \withoutpt{\the\dimen4} \space
- \withoutpt{\the\dimen6} \space setcmykcolor #4}%
+ {\withoutpt\the\dimen0 \space
+ \withoutpt\the\dimen2 \space
+ \withoutpt\the\dimen4 \space
+ \withoutpt\the\dimen6 \space setcmykcolor #4}%
\fi
\fi
\egroup
diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex
index 7775842c2..52df7a63c 100644
--- a/tex/context/base/supp-pdf.tex
+++ b/tex/context/base/supp-pdf.tex
@@ -220,8 +220,8 @@
\global\let\PDFyoffset\PDFyoffset}
\def\setPDFmediabox#1[#2 #3 #4 #5]#6\done
- {\dimen2=#2bp\dimen2=-\dimen2
- \dimen4=#3bp\dimen4=-\dimen4
+ {\dimen2=#2bp\dimen2=-\dimen2 % \dimen2=-#2bp also works since tex handles --
+ \dimen4=#3bp\dimen4=-\dimen4 % \dimen4=-#3bp also works since tex handles --
\dimen6=#4bp\advance\dimen6 \dimen2
\dimen8=#5bp\advance\dimen8 \dimen4
\setPDFboundingbox{\dimen2}{\dimen4}{\dimen6}{\dimen8}\PDFxscale\PDFyscale}
@@ -328,7 +328,7 @@
\def\PDFxscale{1}%
\def\PDFyscale{1}%
\uncatcodespecials
- \endlinechar=-1
+ \endlinechar\minusone
\def\checkPDFtypepage##1/Type /Page##2##3\done%
{\ifx##2\relax
\else\if##2s% accept /Page and /Pages
@@ -482,17 +482,17 @@
\def\@@MP{@@MP}
\def\setMPargument% #1%
- {\advance\nofMParguments 1
+ {\advance\nofMParguments \plusone
\expandafter\def
\csname\@@MP\the\nofMPsegments\the\nofMParguments\endcsname} % {#1}
\def\letMPargument
- {\advance\nofMParguments 1
+ {\advance\nofMParguments \plusone
\expandafter\let
\csname\@@MP\the\nofMPsegments\the\nofMParguments\endcsname}
\def\setMPsequence#1 %
- {\advance\nofMParguments 1
+ {\advance\nofMParguments \plusone
\expandafter\def
\csname\@@MP\the\nofMPsegments\the\nofMParguments\endcsname{#1}%
\handleMPsequence}
@@ -508,8 +508,8 @@
\def\setMPkeyword#1 %
{\expandafter\def\csname\@@MP\the\nofMPsegments0\endcsname{#1}%
- \advance\nofMPsegments1
- \nofMParguments0 }
+ \advance\nofMPsegments \plusone
+ \nofMParguments\zerocount}
\def\getMPkeyword#1%
{\csname\@@MP#10\endcsname}
@@ -799,8 +799,8 @@
\xdef\MPurx{#4}\xdef\MPury{#5}%
\dimen0=#2pt\dimen0=-\MPxscale\dimen0
\dimen2=#3pt\dimen2=-\MPyscale\dimen2
- \xdef\MPxoffset{\withoutpt{\the\dimen0}}%
- \xdef\MPyoffset{\withoutpt{\the\dimen2}}%
+ \xdef\MPxoffset{\withoutpt\the\dimen0}%
+ \xdef\MPyoffset{\withoutpt\the\dimen2}%
\dimen0=#2bp\dimen0=-\dimen0
\dimen2=#3bp\dimen2=-\dimen2
\advance\dimen0 #4bp
@@ -810,7 +810,7 @@
\xdef\MPyshift{\the\dimen2}% unscaled
\dimen2=\MPyscale\dimen2
\xdef\MPheight{\the\dimen2}%
- \chardef\currentMPboundingbox=#1\relax
+ \chardef\currentMPboundingbox#1\relax
\fi
\doresetMPstack
\let\handleMPsequence\dohandleMPsequence
@@ -873,31 +873,31 @@
{\obeyMPspecials
\edef\size{\gMPa\nofMParguments}%
\ifx\size\PSnfont % round font size (to pt)
- \advance\nofMParguments -1
- \expandafter\scratchdimen\gMPa\nofMParguments pt\relax
- \ifdim\scratchdimen<1pt
+ \advance\nofMParguments \minusone
+ \expandafter\scratchdimen\gMPa\nofMParguments\onepoint\relax
+ \ifdim\scratchdimen<\onepoint
\def\size{1pt}%
\else
- \advance\scratchdimen .5pt
+ \advance\scratchdimen .5\onepoint
\def\size##1.##2\relax{\def\size{##1pt}}%
\expandafter\size\the\scratchdimen\relax
\fi
\else
\edef\size{\size bp}%
\fi
- \advance\nofMParguments -1
+ \advance\nofMParguments \minusone
%\font\temp=\gMPa\nofMParguments\space at \size
\let\temp\relax % to be sure
\setMPfshowfont{\gMPa\nofMParguments}\size
- \advance\nofMParguments -1
+ \advance\nofMParguments \minusone
\temp
\MPfshowcommand
- {\ifnum\nofMParguments=1
+ {\ifnum\nofMParguments=\plusone
\def\do(##1){##1}%
\dogMPa1%
\else
% we need to catch ( a ) (a a a) (\123 \123 \123) etc
- \scratchcounter=1
+ \scratchcounter\plusone
\def\dodo##1% Andreas Fieger's bug: (\304...)
{\edef\!!stringa{##1\empty\empty}% and another one: ( 11) -> \ifx 11
\ifx\!!stringa\MPspacechar\MPspacechar\else\expandafter##1\fi}%
@@ -905,7 +905,7 @@
\dogMPa\scratchcounter\MPspacechar
\let\do\relax
\loop
- \advance\scratchcounter 1
+ \advance\scratchcounter \plusone
\ifnum\scratchcounter<\nofMParguments\relax
\gMPa\scratchcounter\MPspacechar
\repeat
@@ -1156,18 +1156,18 @@
{\multiply\dimen#1 \MPconcatfactor\relax}
\def\presetMPconcat
- {\dimen 0=\gMPs1 pt \doMPreducedimen 0 % r_x
- \dimen 2=\gMPs2 pt \doMPreducedimen 2 % s_x
- \dimen 4=\gMPs3 pt \doMPreducedimen 4 % s_y
- \dimen 6=\gMPs4 pt \doMPreducedimen 6 % r_y
- \dimen 8=\gMPs5 pt \doMPreducedimen 8 % t_x
- \dimen10=\gMPs6 pt \doMPreducedimen10 } % t_y
+ {\dimen 0=\gMPs1 \onepoint \doMPreducedimen 0 % r_x
+ \dimen 2=\gMPs2 \onepoint \doMPreducedimen 2 % s_x
+ \dimen 4=\gMPs3 \onepoint \doMPreducedimen 4 % s_y
+ \dimen 6=\gMPs4 \onepoint \doMPreducedimen 6 % r_y
+ \dimen 8=\gMPs5 \onepoint \doMPreducedimen 8 % t_x
+ \dimen10=\gMPs6 \onepoint \doMPreducedimen10 } % t_y
\def\presetMPscale
- {\dimen 0=\gMPs1 pt \doMPreducedimen 0
+ {\dimen 0=\gMPs1 \onepoint \doMPreducedimen 0
\dimen 2=\zeropoint
\dimen 4=\zeropoint
- \dimen 6=\gMPs2 pt \doMPreducedimen 6
+ \dimen 6=\gMPs2 \onepoint \doMPreducedimen 6
\dimen 8=\zeropoint
\dimen10=\zeropoint}
@@ -1212,8 +1212,8 @@
%D \divide \dimen18 \dimen16 \doMPexpanddimen18
%D \divide \dimen12 \dimen16 \doMPexpanddimen12
%D %
-%D \edef#2{\withoutpt{\the\dimen18}}% % p_x^\prime
-%D \edef#4{\withoutpt{\the\dimen12}}} % p_y^\prime
+%D \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+%D \edef#4{\withoutpt\the\dimen12}} % p_y^\prime
%D \stoptypen
%D The following optimization resulted from some tests by
@@ -1264,8 +1264,8 @@
%D \fi
%D \fi
%D %
-%D \edef#2{\withoutpt{\the\dimen18}}% % p_x^\prime
-%D \edef#4{\withoutpt{\the\dimen12}}} % p_y^\prime
+%D \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+%D \edef#4{\withoutpt\the\dimen12}} % p_y^\prime
%D \stoptypen
%D
%D But, this one is still too inaccurate, so we now have:
@@ -1325,8 +1325,8 @@
% \divide\dimen18 \MPfactor
% \divide\dimen12 \MPfactor
% %
-% \edef#2{\withoutpt{\the\dimen18}}% % p_x^\prime
-% \edef#4{\withoutpt{\the\dimen12}}} % p_y^\prime
+% \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+% \edef#4{\withoutpt\the\dimen12}} % p_y^\prime
%D We cannot use \type {\beginETEX} here since in plain we
%D get \type {\outer} problems, sigh.
@@ -1405,8 +1405,8 @@
\multiply \dimen20 \dimen10
\advance \dimen12 -\dimen20
%
- \ifdim\dimen16=1pt \else
- \ifdim\dimen16>\MPconcatfactor pt
+ \ifdim\dimen16=\onepoint \else
+ \ifdim\dimen16>\MPconcatfactor \onepoint \relax
\doMPreducedimen16
\divide \dimen18 \dimen16 \doMPexpanddimen18
\divide \dimen12 \dimen16 \doMPexpanddimen12
@@ -1419,8 +1419,8 @@
\divide\dimen18 \MPfactor
\divide\dimen12 \MPfactor
%
- \edef#2{\withoutpt{\the\dimen18}}% % p_x^\prime
- \edef#4{\withoutpt{\the\dimen12}}} % p_y^\prime
+ \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+ \edef#4{\withoutpt\the\dimen12}} % p_y^\prime
%D The following explanation of the conversion process was
%D posted to the \PDFTEX\ mailing list by Tanmoy. The original
@@ -1902,7 +1902,7 @@
\or
\scratchdimen\PDFMPformoffset\relax
\ifdim\scratchdimen>\zeropoint % compensate for error
- \setbox\scratchbox=\vbox spread 2\scratchdimen
+ \setbox\scratchbox\vbox spread 2\scratchdimen
{\forgetall
\vss
\hbox spread 2\scratchdimen
diff --git a/tex/context/base/symb-nav.tex b/tex/context/base/symb-nav.tex
index 20cb2d5d6..161fa5dad 100644
--- a/tex/context/base/symb-nav.tex
+++ b/tex/context/base/symb-nav.tex
@@ -8,108 +8,112 @@
%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.
\unprotect
\definefontsynonym [ContextNavigation] [contnav]
\loadmapfile [original-context-symbol.map]
-
+
% \def\ContextNavigationGlyph#1{\getglyph{ContextNavigation}{\char#1}}
\def\ContextNavigationGlyph#1{\getrawglyph{contnav}{\char#1}}
\startsymbolset [navigation 1]
- \definesymbol [\v!vorigepagina] [\ContextNavigationGlyph{1}]
- \definesymbol [\v!volgendepagina] [\ContextNavigationGlyph{2}]
- \definesymbol [\v!eerstepagina] [\ContextNavigationGlyph{3}]
- \definesymbol [\v!laatstepagina] [\ContextNavigationGlyph{4}]
+ \definesymbol [\v!vorigepagina] [\ContextNavigationGlyph{1}]
+ \definesymbol [\v!volgendepagina] [\ContextNavigationGlyph{2}]
+ \definesymbol [\v!eerstepagina] [\ContextNavigationGlyph{3}]
+ \definesymbol [\v!laatstepagina] [\ContextNavigationGlyph{4}]
- \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{5}]
- \definesymbol [\v!NextJump] [\ContextNavigationGlyph{6}]
+ \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{5}]
+ \definesymbol [\v!NextJump] [\ContextNavigationGlyph{6}]
- \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{7}]
+ \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{7}]
- \definesymbol [\v!vorigesubpagina] [\ContextNavigationGlyph{1}]
- \definesymbol [\v!volgendesubpagina] [\ContextNavigationGlyph{2}]
- \definesymbol [\v!eerstesubpagina] [\ContextNavigationGlyph{3}]
- \definesymbol [\v!laatstesubpagina] [\ContextNavigationGlyph{4}]
+ \definesymbol [\v!vorigesubpagina] [\ContextNavigationGlyph{1}]
+ \definesymbol [\v!volgendesubpagina] [\ContextNavigationGlyph{2}]
+ \definesymbol [\v!eerstesubpagina] [\ContextNavigationGlyph{3}]
+ \definesymbol [\v!laatstesubpagina] [\ContextNavigationGlyph{4}]
- \definesymbol [\v!StartSound] [\ContextNavigationGlyph{2}]
- \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{8}]
- \definesymbol [\v!StopSound] [\ContextNavigationGlyph{7}]
+ \definesymbol [\v!StartSound] [\ContextNavigationGlyph{2}]
+ \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{8}]
+ \definesymbol [\v!StopSound] [\ContextNavigationGlyph{7}]
- \definesymbol [\v!StartMovie] [\ContextNavigationGlyph{2}]
- \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{8}]
- \definesymbol [\v!StopMovie] [\ContextNavigationGlyph{7}]
+ \definesymbol [\v!StartMovie] [\ContextNavigationGlyph{2}]
+ \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{8}]
+ \definesymbol [\v!StopMovie] [\ContextNavigationGlyph{7}]
- \definesymbol [\v!StartRendering] [\ContextNavigationGlyph{2}]
- \definesymbol [\v!PauseRendering] [\ContextNavigationGlyph{8}]
- \definesymbol [\v!StopRendering] [\ContextNavigationGlyph{7}]
+ \definesymbol [\v!StartRendering] [\ContextNavigationGlyph{2}]
+ \definesymbol [\v!PauseRendering] [\ContextNavigationGlyph{8}]
+ \definesymbol [\v!StopRendering] [\ContextNavigationGlyph{7}]
+ \definesymbol [\v!ResumeRendering] [\ContextNavigationGlyph{2}]
-\stopsymbolset
+\stopsymbolset
\startsymbolset [navigation 2]
- \definesymbol [\v!vorigepagina] [\ContextNavigationGlyph{101}]
- \definesymbol [\v!volgendepagina] [\ContextNavigationGlyph{102}]
- \definesymbol [\v!eerstepagina] [\ContextNavigationGlyph{103}]
- \definesymbol [\v!laatstepagina] [\ContextNavigationGlyph{104}]
+ \definesymbol [\v!vorigepagina] [\ContextNavigationGlyph{101}]
+ \definesymbol [\v!volgendepagina] [\ContextNavigationGlyph{102}]
+ \definesymbol [\v!eerstepagina] [\ContextNavigationGlyph{103}]
+ \definesymbol [\v!laatstepagina] [\ContextNavigationGlyph{104}]
+
+ \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{105}]
+ \definesymbol [\v!NextJump] [\ContextNavigationGlyph{106}]
- \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{105}]
- \definesymbol [\v!NextJump] [\ContextNavigationGlyph{106}]
+ \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{107}]
- \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{107}]
+ \definesymbol [\v!vorigesubpagina] [\ContextNavigationGlyph{101}]
+ \definesymbol [\v!volgendesubpagina] [\ContextNavigationGlyph{102}]
+ \definesymbol [\v!eerstesubpagina] [\ContextNavigationGlyph{103}]
+ \definesymbol [\v!laatstesubpagina] [\ContextNavigationGlyph{104}]
- \definesymbol [\v!vorigesubpagina] [\ContextNavigationGlyph{101}]
- \definesymbol [\v!volgendesubpagina] [\ContextNavigationGlyph{102}]
- \definesymbol [\v!eerstesubpagina] [\ContextNavigationGlyph{103}]
- \definesymbol [\v!laatstesubpagina] [\ContextNavigationGlyph{104}]
+ \definesymbol [\v!StartSound] [\ContextNavigationGlyph{102}]
+ \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{108}]
+ \definesymbol [\v!StopSound] [\ContextNavigationGlyph{107}]
- \definesymbol [\v!StartSound] [\ContextNavigationGlyph{102}]
- \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{108}]
- \definesymbol [\v!StopSound] [\ContextNavigationGlyph{107}]
+ \definesymbol [\v!StartMovie] [\ContextNavigationGlyph{102}]
+ \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{108}]
+ \definesymbol [\v!StopMovie] [\ContextNavigationGlyph{107}]
- \definesymbol [\v!StartMovie] [\ContextNavigationGlyph{102}]
- \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{108}]
- \definesymbol [\v!StopMovie] [\ContextNavigationGlyph{107}]
+ \definesymbol [\v!StartRendering] [\ContextNavigationGlyph{102}]
+ \definesymbol [\v!PauseRendering] [\ContextNavigationGlyph{108}]
+ \definesymbol [\v!StopRendering] [\ContextNavigationGlyph{107}]
+ \definesymbol [\v!ResumeRendering] [\ContextNavigationGlyph{102}]
- \definesymbol [\v!StartRendering] [\ContextNavigationGlyph{102}]
- \definesymbol [\v!PauseRendering] [\ContextNavigationGlyph{108}]
- \definesymbol [\v!StopRendering] [\ContextNavigationGlyph{107}]
\stopsymbolset
\startsymbolset [navigation 3]
- \definesymbol [\v!vorigepagina] [\ContextNavigationGlyph{201}]
- \definesymbol [\v!volgendepagina] [\ContextNavigationGlyph{202}]
- \definesymbol [\v!eerstepagina] [\ContextNavigationGlyph{203}]
- \definesymbol [\v!laatstepagina] [\ContextNavigationGlyph{204}]
+ \definesymbol [\v!vorigepagina] [\ContextNavigationGlyph{201}]
+ \definesymbol [\v!volgendepagina] [\ContextNavigationGlyph{202}]
+ \definesymbol [\v!eerstepagina] [\ContextNavigationGlyph{203}]
+ \definesymbol [\v!laatstepagina] [\ContextNavigationGlyph{204}]
- \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{205}]
- \definesymbol [\v!NextJump] [\ContextNavigationGlyph{206}]
+ \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{205}]
+ \definesymbol [\v!NextJump] [\ContextNavigationGlyph{206}]
- \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{207}]
+ \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{207}]
- \definesymbol [\v!vorigesubpagina] [\ContextNavigationGlyph{201}]
- \definesymbol [\v!volgendesubpagina] [\ContextNavigationGlyph{202}]
- \definesymbol [\v!eerstesubpagina] [\ContextNavigationGlyph{203}]
- \definesymbol [\v!laatstesubpagina] [\ContextNavigationGlyph{204}]
+ \definesymbol [\v!vorigesubpagina] [\ContextNavigationGlyph{201}]
+ \definesymbol [\v!volgendesubpagina] [\ContextNavigationGlyph{202}]
+ \definesymbol [\v!eerstesubpagina] [\ContextNavigationGlyph{203}]
+ \definesymbol [\v!laatstesubpagina] [\ContextNavigationGlyph{204}]
- \definesymbol [\v!StartSound] [\ContextNavigationGlyph{202}]
- \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{208}]
- \definesymbol [\v!StopSound] [\ContextNavigationGlyph{207}]
+ \definesymbol [\v!StartSound] [\ContextNavigationGlyph{202}]
+ \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{208}]
+ \definesymbol [\v!StopSound] [\ContextNavigationGlyph{207}]
- \definesymbol [\v!StartMovie] [\ContextNavigationGlyph{202}]
- \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{208}]
- \definesymbol [\v!StopMovie] [\ContextNavigationGlyph{207}]
+ \definesymbol [\v!StartMovie] [\ContextNavigationGlyph{202}]
+ \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{208}]
+ \definesymbol [\v!StopMovie] [\ContextNavigationGlyph{207}]
- \definesymbol [\v!StartRendering] [\ContextNavigationGlyph{202}]
- \definesymbol [\v!PauseRendering] [\ContextNavigationGlyph{208}]
- \definesymbol [\v!StopRendering] [\ContextNavigationGlyph{207}]
+ \definesymbol [\v!StartRendering] [\ContextNavigationGlyph{202}]
+ \definesymbol [\v!PauseRendering] [\ContextNavigationGlyph{208}]
+ \definesymbol [\v!StopRendering] [\ContextNavigationGlyph{207}]
+ \definesymbol [\v!ResumeRendering] [\ContextNavigationGlyph{202}]
\stopsymbolset
@@ -117,4 +121,4 @@
%D \showsymbolset[navigation 2]
%D \showsymbolset[navigation 3]
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/syst-con.tex b/tex/context/base/syst-con.tex
index b69adcf66..0ce6ea579 100644
--- a/tex/context/base/syst-con.tex
+++ b/tex/context/base/syst-con.tex
@@ -1,6 +1,6 @@
-%D \module
+%D \module
%D [ file=syst-con,
-%D version=2000.12.10, % actually very old -)
+%D version=2000.12.10, % actually very old -)
%D title=\CONTEXT\ System Macros,
%D subtitle=Conversions,
%D author=Hans Hagen,
@@ -8,29 +8,29 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context System Macro's / Conversions}
\unprotect
%D When the number of conversions grew, it did no longer make
-%D sense to spread them over multiple files. So, instead of
-%D defining these in \type {font-ini}, we now have a dedicated
-%D module.
+%D sense to spread them over multiple files. So, instead of
+%D defining these in \type {font-ini}, we now have a dedicated
+%D module.
-%D \macros
+%D \macros
%D {lchexnumber,uchexnumber,lchexnumbers,uchexnumbers}
%D
-%D In addition to the uppercase hex conversion, as needed in
-%D math families, we occasionally need a lowercase one, for
+%D In addition to the uppercase hex conversion, as needed in
+%D math families, we occasionally need a lowercase one, for
%D instance when we want to compose gbsong fontnames.
%D
-%D The ugly indirectness is needed to get rid of \TEX\
-%D induced spaces and \type {\relax}'s.
-%D
-%D \starttypen
+%D The ugly indirectness is needed to get rid of \TEX\
+%D induced spaces and \type {\relax}'s.
+%D
+%D \starttypen
%D [\uchexnumber{0}]
%D [\uchexnumber\scratchcounter]
%D [\uchexnumber\zerocount]
@@ -53,7 +53,7 @@
{\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
8\or 9\or a\or b\or c\or d\or e\or f\else 0\fi}
-\def\uchexnumber#1%
+\def\uchexnumber#1%
{\@EA\douchexnumber\number#1\relax}
\def\douchexnumber#1\relax % \def\uchexnumber#1%
@@ -84,7 +84,7 @@
e0\or e1\or e2\or e3\or e4\or e5\or e6\or e7\or e8\or e9\or ea\or eb\or ec\or ed\or ee\or ef\or
f0\or f1\or f2\or f3\or f4\or f5\or f6\or f7\or f8\or f9\or fa\or fb\or fc\or fd\or fe\or ff\fi}
-\def\uchexnumbers#1%
+\def\uchexnumbers#1%
{\@EA\douchexnumbers\number#1\relax}
\def\douchexnumbers#1\relax % \def\uchexnumbers#1%
@@ -106,61 +106,61 @@
E0\or E1\or E2\or E3\or E4\or E5\or E6\or E7\or E8\or E9\or EA\or EB\or EC\or ED\or EE\or EF\or
F0\or F1\or F2\or F3\or F4\or F5\or F6\or F7\or F8\or F9\or FA\or FB\or FC\or FD\or FE\or FF\fi}
-%D \macros
+%D \macros
%D {octnumber}
%D
-%D For unicode remapping purposes, we need octal numbers.
+%D For unicode remapping purposes, we need octal numbers.
\def\octnumber#1%
{\@EA\dooctnumber\number#1\relax}
\def\dooctnumber#1\relax % \def\octnumber#1%
{\ifcase#1
- 000\or 001\or 002\or 003\or 004\or 005\or 006\or 007\or
- 010\or 011\or 012\or 013\or 014\or 015\or 016\or 017\or
- 020\or 021\or 022\or 023\or 024\or 025\or 026\or 027\or
- 030\or 031\or 032\or 033\or 034\or 035\or 036\or 037\or
- 040\or 041\or 042\or 043\or 044\or 045\or 046\or 047\or
- 050\or 051\or 052\or 053\or 054\or 055\or 056\or 057\or
- 060\or 061\or 062\or 063\or 064\or 065\or 066\or 067\or
- 070\or 071\or 072\or 073\or 074\or 075\or 076\or 077\or
+ 000\or 001\or 002\or 003\or 004\or 005\or 006\or 007\or
+ 010\or 011\or 012\or 013\or 014\or 015\or 016\or 017\or
+ 020\or 021\or 022\or 023\or 024\or 025\or 026\or 027\or
+ 030\or 031\or 032\or 033\or 034\or 035\or 036\or 037\or
+ 040\or 041\or 042\or 043\or 044\or 045\or 046\or 047\or
+ 050\or 051\or 052\or 053\or 054\or 055\or 056\or 057\or
+ 060\or 061\or 062\or 063\or 064\or 065\or 066\or 067\or
+ 070\or 071\or 072\or 073\or 074\or 075\or 076\or 077\or
100\or 101\or 102\or 103\or 104\or 105\or 106\or 107\or
- 110\or 111\or 112\or 113\or 114\or 115\or 116\or 117\or
- 120\or 121\or 122\or 123\or 124\or 125\or 126\or 127\or
- 130\or 131\or 132\or 133\or 134\or 135\or 136\or 137\or
- 140\or 141\or 142\or 143\or 144\or 145\or 146\or 147\or
- 150\or 151\or 152\or 153\or 154\or 155\or 156\or 157\or
- 160\or 161\or 162\or 163\or 164\or 165\or 166\or 167\or
+ 110\or 111\or 112\or 113\or 114\or 115\or 116\or 117\or
+ 120\or 121\or 122\or 123\or 124\or 125\or 126\or 127\or
+ 130\or 131\or 132\or 133\or 134\or 135\or 136\or 137\or
+ 140\or 141\or 142\or 143\or 144\or 145\or 146\or 147\or
+ 150\or 151\or 152\or 153\or 154\or 155\or 156\or 157\or
+ 160\or 161\or 162\or 163\or 164\or 165\or 166\or 167\or
170\or 171\or 172\or 173\or 174\or 175\or 176\or 177\or
- 200\or 201\or 202\or 203\or 204\or 205\or 206\or 207\or
- 210\or 211\or 212\or 213\or 214\or 215\or 216\or 217\or
- 220\or 221\or 222\or 223\or 224\or 225\or 226\or 227\or
- 230\or 231\or 232\or 233\or 234\or 235\or 236\or 237\or
- 240\or 241\or 242\or 243\or 244\or 245\or 246\or 247\or
- 250\or 251\or 252\or 253\or 254\or 255\or 256\or 257\or
- 260\or 261\or 262\or 263\or 264\or 265\or 266\or 267\or
- 270\or 271\or 272\or 273\or 274\or 275\or 276\or 277\or
- 300\or 301\or 302\or 303\or 304\or 305\or 306\or 307\or
- 310\or 311\or 312\or 313\or 314\or 315\or 316\or 317\or
- 320\or 321\or 322\or 323\or 324\or 325\or 326\or 327\or
- 330\or 331\or 332\or 333\or 334\or 335\or 336\or 337\or
- 340\or 341\or 342\or 343\or 344\or 345\or 346\or 347\or
- 350\or 351\or 352\or 353\or 354\or 355\or 356\or 357\or
- 360\or 361\or 362\or 363\or 364\or 365\or 366\or 367\or
+ 200\or 201\or 202\or 203\or 204\or 205\or 206\or 207\or
+ 210\or 211\or 212\or 213\or 214\or 215\or 216\or 217\or
+ 220\or 221\or 222\or 223\or 224\or 225\or 226\or 227\or
+ 230\or 231\or 232\or 233\or 234\or 235\or 236\or 237\or
+ 240\or 241\or 242\or 243\or 244\or 245\or 246\or 247\or
+ 250\or 251\or 252\or 253\or 254\or 255\or 256\or 257\or
+ 260\or 261\or 262\or 263\or 264\or 265\or 266\or 267\or
+ 270\or 271\or 272\or 273\or 274\or 275\or 276\or 277\or
+ 300\or 301\or 302\or 303\or 304\or 305\or 306\or 307\or
+ 310\or 311\or 312\or 313\or 314\or 315\or 316\or 317\or
+ 320\or 321\or 322\or 323\or 324\or 325\or 326\or 327\or
+ 330\or 331\or 332\or 333\or 334\or 335\or 336\or 337\or
+ 340\or 341\or 342\or 343\or 344\or 345\or 346\or 347\or
+ 350\or 351\or 352\or 353\or 354\or 355\or 356\or 357\or
+ 360\or 361\or 362\or 363\or 364\or 365\or 366\or 367\or
370\or 371\or 372\or 373\or 374\or 375\or 376\or 377\fi}
%D \macros
%D {rawcharacter}
%D
%D This conversion macro produces raw characters. We have to
-%D construct the macro in a special way to avoid problems with
-%D characters with special meanings. So, we revert to the
+%D construct the macro in a special way to avoid problems with
+%D characters with special meanings. So, we revert to the
%D lowercase conversion trick to bypass \TEX's input parser.
\bgroup
-\catcode`\^^@=12 % ascii null == ignored in plain
-\catcode`\^^?=12 % ascii delete == invalid in plain
+\catcode`\^^@=12 % ascii null == ignored in plain
+\catcode`\^^?=12 % ascii delete == invalid in plain
\let\or\relax
@@ -175,4 +175,4 @@
\egroup
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex
index 2550ffc53..2f99824f1 100644
--- a/tex/context/base/syst-ext.tex
+++ b/tex/context/base/syst-ext.tex
@@ -2714,8 +2714,8 @@
\def\withoutunit#1#2%
{\begingroup
- \dimen0=#1\relax
- \@EA\convertargument\the\dimen0\to\asciiA
+ \scratchdimen#1\relax
+ \@EA\convertargument\the\scratchdimen\to\asciiA
\@EA\convertargument#2\to\asciiB
%\@EA\@EA\@EA\beforesplitstring\@EA\asciiA\@EA\at\asciiB\to\!!stringa
\@EA\beforesplitstring\@EA\asciiA\@EA\at\asciiB\to\!!stringa
@@ -2748,7 +2748,7 @@
{\begingroup
\scratchdimen#1\relax
\scratchdimen0.0351459804\scratchdimen % 2.54/72.27
- \withoutpt{\the\scratchdimen}cm%
+ \withoutpt\the\scratchdimen cm%
\endgroup}
%D We also support:
@@ -2760,10 +2760,12 @@
%D
%D Both macros return a rounded number.
+% todo: etex version
+
\def\numberofpoints#1%
{\scratchdimen#1%
\advance\scratchdimen .5pt
- \withoutpt{\the\scratchdimen}}
+ \withoutpt\the\scratchdimen}
\def\dimensiontocount#1#2%
{\scratchdimen#1%
@@ -2895,7 +2897,7 @@
%D \macros
%D {processtokens}
%D
-%D We fully agree with (most) typogaphers that inter||letter
+%D We fully agree with (most) typographers that inter||letter
%D spacing is only permitted in fancy titles, we provide a
%D macro that can be used to do so. Because this is
%D (definitely and fortunately) no feature of \TEX, we have to
@@ -3648,7 +3650,7 @@
\def\PointsToBigPoints#1#2%
{\scratchdimen#1%
\scratchdimen.996264\scratchdimen
- \edef#2{\withoutpt{\the\scratchdimen}}}
+ \edef#2{\withoutpt\the\scratchdimen}}
\def\PointsToWholeBigPoints#1#2%
{\scratchdimen#1%
@@ -3670,7 +3672,7 @@
\def\PointsToReal#1#2%
{\scratchdimen#1%
- \edef#2{\withoutpt{\the\scratchdimen}}}
+ \edef#2{\withoutpt\the\scratchdimen}}
%D \macros
%D {dontleavehmode}
@@ -4387,6 +4389,32 @@
\else
\strippedcsname\gobblethreearguments
\fi
+ \or
+ \ifcase#3\or
+ \strippedcsname\firstoffourarguments
+ \or
+ \strippedcsname\secondoffourarguments
+ \or
+ \strippedcsname\thirdoffourarguments
+ \or
+ \strippedcsname\fourthoffourarguments
+ \else
+ \strippedcsname\gobblefourarguments
+ \fi
+ \or
+ \ifcase#3\or
+ \strippedcsname\firstoffivearguments
+ \or
+ \strippedcsname\secondoffivearguments
+ \or
+ \strippedcsname\thirdoffivearguments
+ \or
+ \strippedcsname\fourthoffivearguments
+ \or
+ \strippedcsname\fifthoffivearguments
+ \else
+ \strippedcsname\gobblefivearguments
+ \fi
\fi
\fi
\endcsname\csname#1\endcsname}
diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex
index ebc24ea16..5f6ca4570 100644
--- a/tex/context/base/syst-gen.tex
+++ b/tex/context/base/syst-gen.tex
@@ -4182,16 +4182,21 @@
%D used to select arguments. Their names explain their
%D functionality.
-\long\def\firstofoneargument #1{#1}
-\long\def\firstoftwoarguments #1#2{#1}
-\long\def\firstofthreearguments #1#2#3{#1}
-\long\def\firstoffourarguments #1#2#3#4{#1}
-\long\def\secondoftwoarguments #1#2{#2}
-\long\def\secondofthreearguments #1#2#3{#2}
-\long\def\secondoffourarguments #1#2#3#4{#2}
-\long\def\thirdofthreearguments #1#2#3{#3}
-\long\def\thirdoffourarguments #1#2#3#4{#3}
-\long\def\fourthoffourarguments #1#2#3#4{#4}
+\long\def\firstofoneargument #1{#1}
+\long\def\firstoftwoarguments #1#2{#1}
+\long\def\firstofthreearguments #1#2#3{#1}
+\long\def\firstoffourarguments #1#2#3#4{#1}
+\long\def\firstoffivearguments #1#2#3#4#5{#1}
+\long\def\secondoftwoarguments #1#2{#2}
+\long\def\secondofthreearguments #1#2#3{#2}
+\long\def\secondoffourarguments #1#2#3#4{#2}
+\long\def\secondoffivearguments #1#2#3#4#5{#2}
+\long\def\thirdofthreearguments #1#2#3{#3}
+\long\def\thirdoffourarguments #1#2#3#4{#3}
+\long\def\thirdoffivearguments #1#2#3#4#5{#3}
+\long\def\fourthoffourarguments #1#2#3#4{#4}
+\long\def\fourthoffivearguments #1#2#3#4#5{#4}
+\long\def\fifthoffivearguments #1#2#3#4#5{#5}
%D \macros
%D {globalletempty,letempty,letvalueempty,letgvalueempty}
diff --git a/tex/context/base/syst-new.tex b/tex/context/base/syst-new.tex
index 183ad8cb4..84733098c 100644
--- a/tex/context/base/syst-new.tex
+++ b/tex/context/base/syst-new.tex
@@ -360,14 +360,14 @@
\def\testfeature#1#2%
{\def\dotestfeature
{\advance\featuretest \plusone
- \ifnum\featuretest<#1\relax#2\expandafter\dotestfeature\fi}%
+ \ifnum\featuretest>#1\else#2\expandafter\dotestfeature\fi}%
\retestfeature}
\def\retestfeature
{\bgroup
\ifcase\interactionmode\let\wait\relax\fi
\message{starting feature test}\wait
- \featuretest=-1 \dotestfeature
+ \featuretest\zerocount \dotestfeature
\message{feature test done}\wait
\egroup}
diff --git a/tex/context/base/thrd-ran.tex b/tex/context/base/thrd-ran.tex
index 057e51127..63b3e1371 100644
--- a/tex/context/base/thrd-ran.tex
+++ b/tex/context/base/thrd-ran.tex
@@ -1,12 +1,12 @@
% Since we cannot be sure that this file is available at any
-% system, we have copied the original in this file. These
-% macros are encapsulates and extended in supp-ran.tex.
+% system, we have copied the original in this file. These
+% macros are encapsulates and extended in supp-ran.tex.
%
-% This module is slightly recoded to bring it more in tune
+% This module is slightly recoded to bring it more in tune
% with \CONTEXT's scratch registers and protection mechanisms.
% RANDOM.TEX v.1 (Donald Arseneau)
-% Generating "random" numbers in TeX.
+% Generating "random" numbers in TeX.
%
% Random integers are generated in the range 1 to 2147483646 by the
% macro \nextrandom. The result is returned in the counter \randomi.
@@ -43,12 +43,12 @@
% code deals with initialization and type-conversion. On the other hand,
% the large range may be wasted due to the sparse seed initialization.
-% original code
-%
+% original code
+%
% \newcount\randomi % the random number seed (while executing)
% \global\randomi\catcode`\@ % scratch variable during definitions
% \catcode`\@=11
-%
+%
% \def\nextrandom{\begingroup
% \ifnum\randomi<\@ne % then initialize with time
% \global\randomi\time
@@ -69,11 +69,11 @@
% \ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi
% \endgroup
% }
-%
+%
% \countdef\count@ii=2 % use only in boxes!
% \ifx\@tempcnta\undefined \csname newcount\endcsname \@tempcnta \fi
% \ifx\@tempcntb\undefined \csname newcount\endcsname \@tempcntb \fi
-%
+%
% \def\setrannum#1#2#3{% count register, minimum, maximum
% \@tempcnta#3\advance\@tempcnta-#2\advance\@tempcnta\@ne
% \@tempcntb 2147483645 % = m - 2 = 2^{31} - 3
@@ -82,40 +82,40 @@
% \advance\ranval#2\relax
% #1\ranval
% }
-%
+%
% \def\setrandim#1#2#3{% dimen register, minimum length, maximum length
% \dimen@#2\dimen@ii#3\relax
% \setrannum\ranval\dimen@\dimen@ii
% #1\ranval sp\relax
% }
-%
+%
% \def\getr@nval{% The values in \@tempcnta and \@tempcntb are parameters
% \nextrandom
% \ranval\randomi \advance\ranval\m@ne \divide\ranval\@tempcntb
% \ifnum\ranval<\@tempcnta\else \expandafter\getr@nval \fi
% }
-%
-% %D The next macro is not needed in \CONTEXT, which provides
-% %D the \type {\withoutpt} macro.
+%
+% %D The next macro is not needed in \CONTEXT, which provides
+% %D the \type {\withoutpt} macro.
% %D
-% %D \starttypen
+% %D \starttypen
% %D \def\pointless{\expandafter\PoinTless\the}
% %D {\catcode`p=12 \catcode`t=12 \gdef\PoinTless#1pt{#1}}
-% %D \stoptypen
-%
+% %D \stoptypen
+%
% \catcode`\@=\randomi
% \global\randomi=0
% \newcount\ranval
-% the recoded version, using \CONTEXT\ methods and variables;
-% the magic is kept untouched
+% the recoded version, using \CONTEXT\ methods and variables;
+% the magic is kept untouched
-\unprotect
+\unprotect
\newcount\randomi % the random number seed (while executing)
\newcount\ranval
-\ifx\m!systems\undefined \def\m!systems{system} \fi
+\ifx\m!systems\undefined \def\m!systems{system} \fi
\def\nextrandom
{\begingroup
@@ -135,8 +135,8 @@
\global\multiply\randomi 16807
\multiply\!!countc 2836
\global\advance\randomi-\!!countc\relax
- \ifnum\randomi<\zerocount
- \global\advance\randomi 2147483647
+ \ifnum\randomi<\zerocount
+ \global\advance\randomi 2147483647
\fi
\endgroup}
@@ -154,15 +154,15 @@
{\!!dimenc#2%
\!!dimend#3%
\setrannum\ranval\!!dimenc\!!dimend
- #1\ranval\s!sp\relax}
+ #1\ranval\s!sp\relax} % \s!sp not needed
\def\getr@nval % The values in \!!counta and \!!countb are parameters
{\nextrandom
- \ranval\randomi
+ \ranval\randomi
\advance\ranval\minusone
\divide\ranval\!!countb
- \ifnum\ranval<\!!counta \else
- \expandafter\getr@nval
+ \ifnum\ranval<\!!counta \else
+ \expandafter\getr@nval
\fi}
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/thrd-trg.tex b/tex/context/base/thrd-trg.tex
index 8c60986c9..32e042b38 100644
--- a/tex/context/base/thrd-trg.tex
+++ b/tex/context/base/thrd-trg.tex
@@ -21,9 +21,9 @@
\def\tg@series
{\!!dimena\@lxxi\!!dimena
\divide\!!dimena\@mmmmlxviii
- \edef\!!stringa{\withoutpt{\the\!!dimena}}%
+ \edef\!!stringa{\withoutpt\the\!!dimena}%
\!!dimena\!!stringa\!!dimena
- \edef\!!stringb{\withoutpt{\the\!!dimena}}%
+ \edef\!!stringb{\withoutpt\the\!!dimena}%
\divide\!!dimena\tr@coeffz
\advance\!!dimena\minusone\onepoint
\!!dimena\!!stringb\!!dimena
@@ -54,7 +54,7 @@
{{\expandafter\ifx\csname sin \number#1\endcsname\relax
\!!dimena#1\onepoint
\tg@@sin
- \expandafter\xdef\csname sin \number#1\endcsname{\withoutpt{\the\!!dimena}}%
+ \expandafter\xdef\csname sin \number#1\endcsname{\withoutpt\the\!!dimena}%
\fi}}
\def\calculatecos#1%
@@ -62,7 +62,7 @@
\!!dimena\@xc\onepoint
\advance\!!dimena-#1\onepoint
\tg@@sin
- \expandafter\xdef\csname cos \number#1\endcsname{\withoutpt{\the\!!dimena}}%
+ \expandafter\xdef\csname cos \number#1\endcsname{\withoutpt\the\!!dimena}%
\fi}}
\def\calculatetan#1%
@@ -74,7 +74,7 @@
\!!dimenb\calculatedsin{#1}\onepoint
\!!dimenb\@xvi@k\!!dimenb
\divide\!!dimenb\!!dimena
- \expandafter\xdef\csname tan \number#1\endcsname{\withoutpt{\the\!!dimenb}}%
+ \expandafter\xdef\csname tan \number#1\endcsname{\withoutpt\the\!!dimenb}%
\fi}}
%D The results are accessed with:
diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex
index e8c1e6e2b..16eaff96f 100644
--- a/tex/context/base/type-enc.tex
+++ b/tex/context/base/type-enc.tex
@@ -1367,4 +1367,4 @@
\stoptypescript
-\endinput
+\endinput \ No newline at end of file
diff --git a/tex/context/base/type-ghz.tex b/tex/context/base/type-ghz.tex
index 56e39318e..98687fe91 100644
--- a/tex/context/base/type-ghz.tex
+++ b/tex/context/base/type-ghz.tex
@@ -4,6 +4,20 @@
% texfont --en=texnansi --ve=linotype --co=optima-nova type-ghz.dat
% texfont --en=texnansi --ve=linotype --co=palatino type-ghz.dat
+% zapfino
+
+\starttypescript [serif] [zapfino] [texnansi,ec,8r] % todo: handwriting
+
+ \definefontsynonym [ZapfinoOne] [\typefaceencoding-lt-54223] [encoding=\typefaceencoding]
+ \definefontsynonym [ZapfinoTwo] [\typefaceencoding-lt-54224] [encoding=\typefaceencoding]
+ \definefontsynonym [ZapfinoThree] [\typefaceencoding-lt-54225] [encoding=\typefaceencoding]
+ \definefontsynonym [ZapfinoFour] [\typefaceencoding-lt-54226] [encoding=\typefaceencoding]
+
+ \loadmapfile[\typefaceencoding-linotype-zapfino.map]
+
+\stoptypescript
+
+
% optima
\starttypescript [sans] [optima] [name]
diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex
index d2ef37410..48e67009b 100644
--- a/tex/context/base/type-ini.tex
+++ b/tex/context/base/type-ini.tex
@@ -325,7 +325,7 @@
\else
\writestatus{pdftex}{using map file: #1}%
\fi
- \pdfmapfile{+#1}%
+ \doiffileelse{#1}{\pdfmapfile{+#1}}\donothing
\setxvalue{#1 \c!status}{1}}}
\def\doreportfontmapfile#1%
diff --git a/tex/context/base/type-map.tex b/tex/context/base/type-map.tex
index ca23fc788..bea38ec32 100644
--- a/tex/context/base/type-map.tex
+++ b/tex/context/base/type-map.tex
@@ -44,7 +44,7 @@
\starttypescript [map] [8r]
\loadmapfile[8r-adobe-utopia.map]
- \loadmapfile[8r-bit-charter.map]
+ \loadmapfile[8r-bitstrea-charter.map]
\loadmapfile[8r-public-antp.map]
\loadmapfile[8r-public-antt.map]
\loadmapfile[8r-urw-bookman.map]
@@ -58,7 +58,7 @@
\starttypescript [map] [ec]
\loadmapfile[ec-adobe-utopia.map]
- \loadmapfile[ec-bit-charter.map]
+ \loadmapfile[ec-bitstrea-charter.map]
\loadmapfile[ec-public-antp.map]
\loadmapfile[ec-public-antt.map]
\loadmapfile[ec-urw-bookman.map]
@@ -72,7 +72,7 @@
\starttypescript [map] [texnansi]
\loadmapfile[texnansi-adobe-utopia.map]
- \loadmapfile[texnansi-bit-charter.map]
+ \loadmapfile[texnansi-bitstrea-charter.map]
\loadmapfile[texnansi-public-antp.map]
\loadmapfile[texnansi-public-antt.map]
\loadmapfile[texnansi-urw-bookman.map]
diff --git a/tex/context/base/x-res-01.tex b/tex/context/base/x-res-01.tex
index d3f888376..9b724411f 100644
--- a/tex/context/base/x-res-01.tex
+++ b/tex/context/base/x-res-01.tex
@@ -55,7 +55,7 @@
\setupoutput[pdftex] \overcomePDFspacefalse
-\setjobfullname {xml} % default suffix
+\setjobfullname {xml} % default suffix
\doifnothing {\jobfullname} {\end}
\doiffileelse {\jobfullname} {} {\end}
@@ -90,7 +90,7 @@
height=\XMLpar{rl:dummy}{height}{8cm},
background=color,
backgroundcolor=gray,
- foregroundcolor=darkred,
+ foregroundcolor=darkred,
align=normal,
frame=off]
{\bf \XMLflush{rl:dummy}}
@@ -448,4 +448,4 @@
\processXMLfilegrouped{\jobfullname} \page
-\stoptext
+\stoptext \ No newline at end of file
diff --git a/tex/context/base/x-res-02.tex b/tex/context/base/x-res-02.tex
index 19584f921..5ef8e901d 100644
--- a/tex/context/base/x-res-02.tex
+++ b/tex/context/base/x-res-02.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=x-fig-02,
+%D [ file=x-res-02,
%D version=2001.03.21,
%D title=\CONTEXT\ Style File,
%D subtitle=Figure Base Inclusion (I),
@@ -11,22 +11,22 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D This module enables non||\ConTeXt\ users to access the
-%D database. For this, you need to run
-%D
+%D This module enables non||\ConTeXt\ users to access the
+%D database. For this, you need to run
+%D
%D \starttypen
%D texexec --pdf --use=fig-fake yourfile.xml
%D \stoptypen
-%D
-%D The resulting file, \type {yourfile.fig}, can be loaded
-%D in the normal way. The figures can be accessed with:
+%D
+%D The resulting file, \type {yourfile.fig}, can be loaded
+%D in the normal way. The figures can be accessed with:
%D
%D \starttypen
-%D \getfigurefile{label}
-%D \getfigurepage{label}
+%D \getfigurefile{label}
+%D \getfigurepage{label}
%D \stoptypen
%D
-%D A a bonus, the following macro is defined:
+%D A a bonus, the following macro is defined:
%D
%D \starttypen
%D \includefigurefile width 10cm {label}
@@ -42,7 +42,7 @@
\defineXMLenvironment [rl:figure] \StartFigure \StopFigure
\def\StartLibrary
- {\immediate\openout \scratchwrite=\jobfilename.fig
+ {\immediate\openout \scratchwrite=\jobfilename.fig
\immediate\write\scratchwrite{\string\input\space x-fig-03.tex \string\relax}
\immediate\write\scratchwrite{}}
diff --git a/tex/context/base/x-res-50.tex b/tex/context/base/x-res-50.tex
new file mode 100644
index 000000000..d708b0821
--- /dev/null
+++ b/tex/context/base/x-res-50.tex
@@ -0,0 +1,415 @@
+%D \module
+%D [ file=x-res-50,
+%D version=2004.02.18,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Multimedia Presentation,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={\PRAGMA\ / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is a preliminary module, using a preliminary xml media format that
+%D looks as follows (record is embedded in resource library element):
+%D
+%D \starttypen
+%D <rl:mediaclip label="sample 1">
+%D <rl:name>Sample One</rl:name>
+%D <rl:mime>application/x-shockwave-flash</rl:mime>
+%D <rl:file>http://localhost/mb.swf</rl:file>
+%D <rl:width>8cm</rl:width>
+%D <rl:height>6cm</rl:height>
+%D <rl:text>Nothing special to be said.</rl:text>
+%D <rl:picture>cow.pdf</rl:picture>
+%D </rl:mediaclip>
+%D
+%D <rl:mediaclip label="sample 2">
+%D <rl:name>Sample Two</rl:name>
+%D <rl:mime>audio/mpeg</rl:mime>
+%D <rl:file>mb.mp3</rl:file>
+%D <rl:picture>mb.jpg</rl:picture>
+%D </rl:mediaclip>
+%D \stoptypen
+%D
+%D \starttypen
+%D texexec --pdf --use=med-show yourfile.xml
+%D \stoptypen
+%D
+%D Bonus:
+%D
+%D \starttypen
+%D --arg="url=http://localhost:8881/e:/media"
+%D \stoptypen
+
+% output=pdftex
+
+% bugs in recognizing embedded stream cq. player
+% bugs in layers + hide/vide
+% bugs in save javascripts
+% bugs all over the place
+
+% in principe kan menu overal hetzelfde zijn als we via JS per pagina de clip var zetten,
+% hoewel, misschien zal het menu gaan afhangen van de soort clip
+
+% property (eigenschap) aan framed en layer
+
+\usemodule[meta-dum]
+\usemodule[contml]
+
+\doifelsevariable{environment}{url}
+ {\setvariables[mediaclip][url=\getvariable{environment}{url}/]}
+ {\setvariables[mediaclip][url=]}
+
+\startmode [silent]
+
+ \setvariables[mediaclip:option][start=]
+
+\stopmode
+
+\startnotmode [silent]
+
+ \setvariables[mediaclip:option][start=auto]
+
+\stopnotmode
+
+\chardef\XMLtokensreduction=1 \dontcomplain % \showframe \pdfcompresslevel=0
+
+\setuppapersize
+ [S6][S6]
+
+\definemeasure [GapSize] [\dimexpr( 15pt)]
+\definemeasure [EdgeWidth] [\dimexpr(100pt)]
+\definemeasure [TextWidth] [\dimexpr(.5\textwidth)]
+\definemeasure [RenderingWidth] [\dimexpr(\textwidth)]
+\definemeasure [RenderingHeight] [\dimexpr(\textheight)]
+
+% \XMLflush{rl:ratio}\dimexpr(.75\textwidth),
+
+\setuplayout
+ [backspace=\measure{GapSize},
+ topspace=\measure{GapSize},
+ header=0pt,
+ footer=0pt,
+ margin=0pt,
+ edgedistance=2\measure{GapSize},
+ rightedge=\measure{EdgeWidth},
+ bottomdistance=2\measure{GapSize},
+ bottom=2\measure{GapSize},
+ height=fit,
+ width=fit]
+
+\setupinteraction
+ [state=start,
+ color=lightgray,
+ contrastcolor=lightgray,
+ openaction=PresetFields,
+ closeaction=ForgetChanges,
+ menu=on,
+ click=no]
+
+\setupinteractionscreen
+ [option=max]
+
+\setupcolors
+ [state=start]
+
+\usetypescript
+ [palatino][texnansi]
+
+\setupbodyfont
+ [palatino]
+
+\definecolor[darkgray] [s=.2]
+\definecolor[mediumgray][s=.5]
+\definecolor[lightgray] [s=.8]
+\definecolor[transgray] [s=1,t=.9,a=1]
+
+\setupbackgrounds
+ [page]
+ [backgroundoffset=\measure{GapSize},
+ background={color,pagebutton},
+ backgroundcolor=black]
+
+\definelayer
+ [main]
+ [width=\textwidth,
+ height=\textheight]
+
+\definelayer
+ [extra]
+ [width=\rightedgewidth,
+ height=\bottomheight]
+
+\setupbackgrounds
+ [text]
+ [backgroundoffset=0pt,
+ background=main]
+
+\setupbackgrounds
+ [bottom][rightedge]
+ [backgroundoffset=0pt,
+ background=extra]
+
+% java scripts
+
+\startJSpreamble {handy} used now
+
+ function ForgetChanges ()
+ { this.dirty = false }
+
+ function PresetFields ()
+ { this.syncAnnotScan() }
+
+\stopJSpreamble
+
+\definereference[PresetFields] [JS(PresetFields)]
+\definereference[ForgetChanges][JS(ForgetChanges)]
+
+% layers
+
+\defineproperty [menulayer] [layer] [title=menulayer]
+\defineproperty [textlayer] [layer] [title=textlayer,state=stop]
+\defineproperty [datalayer] [layer] [title=datalayer,state=stop]
+
+\setupfield
+ [rollbutton]
+ [fieldlayer=menulayer]
+
+\setupfield
+ [rollbutton]
+ [option=auto]
+
+\definepalet
+ [rollover]
+ [n=darkgray,
+ r=lightgray,
+ d=darkgray]
+
+% list
+
+\definelist
+ [clips]
+ [expansion=yes,
+ criterium=text,
+ alternative=f]
+
+% navigation
+
+\defineoverlay[pagebutton][\overlaybutton{HideLayer{textlayer},HideLayer{datalayer},ToggleLayer{menulayer}}]
+\defineoverlay[textbutton][\overlaybutton{HideLayer{textlayer},HideLayer{datalayer}}]
+\defineoverlay[databutton][\overlaybutton{HideLayer{textlayer},HideLayer{datalayer}}]
+
+% clips
+
+\defineXMLenvironment
+ [rl:mediaclip]
+ {\setups[mediaclip:start]}
+ {\setups[mediaclip:stop]}
+
+\newcounter\MediaClip
+
+\startsetups[mediaclip:start]
+
+ \bgroup \startXMLignore
+
+ % no \startstandardmakeup here since we need the dsta in the menuconstruction
+
+ \defineXMLsave [rl:name]
+ \defineXMLsave [rl:visualization]
+ \defineXMLsave [rl:file]
+ \defineXMLsave [rl:mime]
+ \defineXMLsave [rl:picture] [backgroundcolor=lightgray]
+
+ \defineXMLsavecontent [rl:text] {No additional info.}
+ \defineXMLsavecontent [rl:width] {\measure{RenderingWidth}}
+ \defineXMLsavecontent [rl:height] {\measure{RenderingHeight}}
+ \defineXMLsavecontent [rl:aspect] {1}
+
+\stopsetups
+
+\startsetups[mediaclip:stop]
+
+ \startstandardmakeup
+
+ \doifXMLdataelse{rl:file}
+ {\setups[mediaclip:file:yes]}
+ {}
+
+ \doifXMLdataelse{rl:picture}
+ {\doifelse{\XMLflush{rl:picture}}{self}
+ {\setups[mediaclip:picture:self]}
+ {\setups[mediaclip:picture:yes]}}
+ {\setups[mediaclip:picture:no]}
+
+ \doifXMLdata{rl:text}
+ {\setups[mediaclip:text]}
+
+ \setlayerframed
+ [extra]
+ [preset=rightbottom]
+ [frame=off,offset=overlay,width=fit,background=databutton,align=left]
+ {\startproperty[datalayer]\setups[mediaclip:data]\stopproperty}
+
+ \doifXMLdataelse{rl:name}
+ {\writetolist[clips]{}{\XMLflush{rl:name}}}
+ {\writetolist[clips]{}{\XMLpar{rl:mediaclip}{label}{unknown}}}
+
+ \stopstandardmakeup
+
+ \stopXMLignore \egroup
+
+\stopsetups
+
+\startsetups[mediaclip:data]
+
+ \noindent \buttonframed
+ [framecolor=lightgray,
+ foregroundcolor=lightgray]
+ {\bf\XMLflush{rl:file}}
+
+ \vskip12pt
+
+ \noindent \buttonframed
+ [framecolor=lightgray,
+ foregroundcolor=lightgray]
+ {\bf\XMLflush{rl:mime}}
+
+\stopsetups
+
+\startsetups[mediaclip:picture:self]
+
+ \definerenderingwindow
+ [mediaclip]
+ [width=\XMLflush{rl:width},
+ height=\XMLflush{rl:height},
+ frame=off,
+ openpageaction=StartCurrentRendering,
+ closepageaction=StopCurrentRendering]
+
+ \setlayer
+ [main]
+ {\placerenderingwindow[mediaclip][mediaclip-\MediaClip]}
+
+\stopsetups
+
+\startsetups[mediaclip:picture:yes]
+
+ \setlayer
+ [main]
+ {\externalfigure
+ [\XMLflush{rl:picture}]
+ [background=color,
+ backgroundcolor=\XMLpar{rl:picture}{backgroundcolor}{lightgray},
+ factor=max,
+ width=\XMLflush{rl:width},
+ height=\XMLflush{rl:height}]}
+
+\stopsetups
+
+\startsetups[mediaclip:picture:no]
+
+ \setlayer
+ [main]
+ {\externalfigure
+ [dummy]
+ [width=\XMLflush{rl:width},
+ height=\XMLflush{rl:height}]}
+
+\stopsetups
+
+\startsetups[mediaclip:file:yes]
+
+ \doglobal\increment\MediaClip
+
+ \useexternalrendering
+ [mediaclip-\MediaClip]
+ [\XMLflush{rl:mime}]
+ [\getvariable{mediaclip}{url}\XMLflush{rl:file}]
+ [\getvariable{mediaclip:option}{start}]
+
+\stopsetups
+
+\defineinteractionmenu
+ [navigation] [right]
+
+\defineinteractionmenu
+ [control] [bottom]
+
+\setupinteractionmenu
+ [navigation,control]
+ [state=start,
+ frame=on,
+ middle=\hskip.5\measure{GapSize},
+ inbetween=\vskip.5\measure{GapSize}]
+
+\setupinteractionmenu
+ [right,bottom]
+ [distance=overlay]
+
+\startinteractionmenu [navigation]
+ \rob [HideLayer{textlayer},FirstPage] First Page \\
+ \rob [HideLayer{textlayer},PreviousPage] Previous Page \\
+ \rob [HideLayer{textlayer},NextPage] Next Page \\
+ \rob [HideLayer{textlayer},LastPage] Last Page \\
+ \rob [HideLayer{textlayer},clips] List Of Clips \\
+ \rob [ForgetChanges,CloseDocument] Close Document \\
+\stopinteractionmenu
+
+\startinteractionmenu [control]
+ \rob [StartRendering{mediaclip-\MediaClip}] Start \\
+ \rob [StopRendering{mediaclip-\MediaClip}] Stop \\
+ \rob [PauseRendering{mediaclip-\MediaClip}] Pause \\
+ \rob [ResumeRendering{mediaclip-\MediaClip}] Resume \\
+ \rob [ToggleLayer{datalayer}] Info \\
+ \doifXMLdata{rl:text}{\rob [HideLayer{datalayer},ToggleLayer{textlayer}] Text \\}
+\stopinteractionmenu
+
+\startsetups[mediaclip:text]
+
+ \setlayer
+ [extra]
+ [preset=rightbottom]
+ {\startproperty[textlayer]
+ \framed
+ [align=normal,
+ frame=off,
+ width=\measure{TextWidth},
+ foregroundcolor=darkgray,
+ background={color,textbutton},
+ backgroundcolor=lightgray]
+ {\XMLflush{rl:text}}
+ \stopproperty}
+
+\stopsetups
+
+\setupcolors[textcolor=lightgray]
+
+\startsetups [library:start]
+
+ \starttext
+
+ \setupinteractionmenu[control][state=stop]
+
+ \title[clips]{List of Media Clips}
+
+ \placelist[clips] \page
+
+ \setupinteractionmenu[control][state=start]
+
+\stopsetups
+
+\startsetups [library:stop]
+
+ \stoptext
+
+\stopsetups
+
+\defineXMLenvironment [rl:resourcelibrary]
+ {\setups[library:start]}
+ {\setups[library:stop]}
+
+\doifelsenothing{\inputfilename}
+ {\processXMLfile{mediaclient.xml}}
+ {\processXMLfile{\inputfilename}} \ No newline at end of file
diff --git a/tex/context/base/xtag-xsl.tex b/tex/context/base/xtag-xsl.tex
index df7c320de..2ebb15e9b 100644
--- a/tex/context/base/xtag-xsl.tex
+++ b/tex/context/base/xtag-xsl.tex
@@ -11,18 +11,18 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D This module is rather experimental so users may expect
+%D This module is rather experimental so users may expect
%D changes in the interface.
-\unprotect
+\unprotect
-\definesystemvariable {xl}
+\definesystemvariable {xl}
\newif\iftraceXSLTprocessing % \traceXSLTprocessingtrue
\def\XSLTscriptfile{\bufferprefix xlscript}
-% to be sped up:
+% to be sped up:
\def\presetXSLTcharacters
{\let\par\empty
@@ -39,21 +39,29 @@
\obeyXSLTcharacters
\doifelse{#2}{capsule}\dostartXSLTscript\nostartXSLTscript#1 #2 }
-\long\def\dostartXSLTscript#1 #2 #3 #4\stopXSLTscript
+\long\def\dostartXSLTscript#1 #2 #3 %
+ {\obeylines
+ \dodostartXSLTscript#1 #2 #3 }
+
+\long\def\dodostartXSLTscript#1 #2 #3 #4\stopXSLTscript
{\egroup
\long\setvalue{\??xl#1}{\doXSLTscript{#3}{#4}}}
-\long\def\nostartXSLTscript#1 #2\stopXSLTscript
+\long\def\nostartXSLTscript
+ {\obeylines
+ \nonostartXSLTscript}
+
+\long\def\nonostartXSLTscript#1 #2\stopXSLTscript
{\egroup
\long\setvalue{\??xl#1}{\doXSLTscript\empty{#2}}}
-\long\def\donormalXSLTscript#1#2%
+\long\def\donormalXSLTscript#1#2%
{\includeXSLTscript{b-capsule-#1}%
#2%
\includeXSLTscript{e-capsule-#1}}
-
+
\def\includeXSLTscript#1%
- {\csname\ifcsname\??xl#1\endcsname\??xl#1\else empty\fi\endcsname}
+ {\csname\ifcsname\??xl#1\endcsname\??xl#1\else\s!empty\fi\endcsname}
\startXSLTscript b-capsule-1.0
<?xml version="1.0"?>
@@ -73,41 +81,40 @@
\let\doXSLTscript\donormalXSLTscript
\presetXSLTcharacters
\donefalse
- \def\docommando##1%
- {\dodoapplyXSLTscript{##1}{\ifdone#3\else#2\fi}{#3}\donetrue}%
+ \def\docommando##1{\dodoapplyXSLTscript{##1}{\ifdone#3\else#2\fi}{#3}\donetrue}%
\processcommalist[#1]\docommando
\egroup
\else
\applyXSLTscript[#1][#2][#2]%
\fi}
-% Since a \XML\ file is loaded into memory as a tree, we
+% Since a \XML\ file is loaded into memory as a tree, we
% can safely use the same input and output filename, thereby
-% avoiding temporary files.
-
+% avoiding temporary files.
+
\def\dodoapplyXSLTscript#1#2#3%
{\bgroup
\doifundefined{\??xl#1}%
{\writestatus{XSLT}{unknown script #1}}
{\writestatus{XSLT}{convert #2 into #3 using #1}%
+ \edef\par{\rawcharacter{13}}%
\edef\!!stringc{\getvalue{\??xl#1}}%
\immediate\openout\scratchwrite=\XSLTscriptfile.xsl
\immediate\write\scratchwrite{\!!stringc}%
\immediate\closeout\scratchwrite
\iftraceXSLTprocessing\wait\fi
\executeXSLT{\XSLTscriptfile.xsl}{#2}{#3}%
- \iftraceXSLTprocessing\wait\fi}%
+ \iftraceXSLTprocessing\wait\fi}%
\egroup}
-\def\executeXSLT#1#2#3% script input output
+\def\executeXSLT#1#2#3% script input output
{\executesystemcommand{xsltproc -o #3 #1 #2}}
\long\def\applyXSLTtobuffer
{\dodoubleempty\doapplyXSLTtobuffer}
\long\def\doapplyXSLTtobuffer[#1][#2]%
- {\expanded{\applyXSLTscript
- [#1][\TEXbufferfile{\ifsecondargument#2\else\jobname\fi}]}}
+ {\expanded{\applyXSLTscript[#1][\TEXbufferfile{\ifsecondargument#2\else\jobname\fi}]}}
\def\resetXSLTscripting#1%
{\setgvalue{\??xl\s!dummy}{\doXSLTscript{#1}{}}}
@@ -117,6 +124,7 @@
\def\startXSLTscripting
{\bgroup
\obeyXSLTcharacters
+ \obeylines
\dostartXSLTscripting}
\long\def\dostartXSLTscripting#1\stopXSLTscripting
@@ -130,57 +138,57 @@
\def\applyXSLTscripting
{\applyXSLTscript[\s!dummy]}
-\protect
+\protect
-\doifnotmode{mytest}{\endinput}
+\doifnotmode{demo}{\endinput}
-\starttext
-
% \def\Whow{Whow It Works}
-%
-% \startXSLTscript test capsule 1.0
+%
+% \startXSLTscript test capsule 1.0
% <xsl:output method="text"/>
-%
+%
% <xsl:template match="/figurelibrary/figure">
% \Whow \\ #<xsl:apply-templates/>
% </xsl:template>
-%
+%
% <xsl:template match="/">
% <xsl:apply-templates/>
% </xsl:template>
-% \stopXSLTscript
-%
+% \stopXSLTscript
+%
% \applyXSLTscript [test] [figtest.xml] [crap.tmp] \typefile{crap.tmp}
-%
+%
% \startbuffer
% <hello>world</hello>
% \stopbuffer
-%
+%
% \applyXSLTtobuffer[test] \typebuffer
-%
+%
% \startXSLTscripting
% <xsl:output method="text"/>
-% \stopXSLTscripting
-%
+% \stopXSLTscripting
+%
% \startXSLTscripting
% <xsl:template match="/figurelibrary/figure">
% <xsl:apply-templates/>
% </xsl:template>
-% \stopXSLTscripting
-%
+% \stopXSLTscripting
+%
% \startXSLTscripting
% <xsl:template match="/">
% <xsl:apply-templates/>
% </xsl:template>
-% \stopXSLTscripting
-%
+% \stopXSLTscripting
+%
% \applyXSLTscripting [figtest.xml] [crap.tmp] \typefile{crap.tmp}
-\startXSLTscript another
+\starttext
+
+\startXSLTscript another
<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cd="http://www.pragma-ade.com/commands"
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:cd="http://www.pragma-ade.com/commands"
version="1.0">
<xsl:output method="text"/>
@@ -198,10 +206,10 @@
</xsl:template>
</xsl:stylesheet>
-\stopXSLTscript
+\stopXSLTscript
-\applyXSLTscript [another] [cont-en.xml] [whatever.tmp]
+\applyXSLTscript [another] [cont-en.xml] [whatever.tmp]
\readfile{whatever.tmp}{}{}
-\stoptext
+\stoptext
diff --git a/tex/context/sample/tufte.tex b/tex/context/sample/tufte.tex
index 72f39da35..154dfa3fb 100644
--- a/tex/context/sample/tufte.tex
+++ b/tex/context/sample/tufte.tex
@@ -1,13 +1,13 @@
-We thrive in information||thick worlds because of our
-marvelous and everyday capacity to select, edit,
-single out, structure, highlight, group, pair, merge,
-harmonize, synthesize, focus, organize, condense,
-reduce, boil down, choose, categorize, catalog, classify,
-list, abstract, scan, look into, idealize, isolate,
-discriminate, distinguish, screen, pigeonhole, pick over,
-sort, integrate, blend, inspect, filter, lump, skip,
-smooth, chunk, average, approximate, cluster, aggregate,
-outline, summarize, itemize, review, dip into,
-flip through, browse, glance into, leaf through, skim,
-refine, enumerate, glean, synopsize, winnow the wheat
-from the chaff and separate the sheep from the goats.
+We thrive in information||thick worlds because of our
+marvelous and everyday capacity to select, edit,
+single out, structure, highlight, group, pair, merge,
+harmonize, synthesize, focus, organize, condense,
+reduce, boil down, choose, categorize, catalog, classify,
+list, abstract, scan, look into, idealize, isolate,
+discriminate, distinguish, screen, pigeonhole, pick over,
+sort, integrate, blend, inspect, filter, lump, skip,
+smooth, chunk, average, approximate, cluster, aggregate,
+outline, summarize, itemize, review, dip into,
+flip through, browse, glance into, leaf through, skim,
+refine, enumerate, glean, synopsize, winnow the wheat
+from the chaff and separate the sheep from the goats. \ No newline at end of file
diff --git a/tex/context/sample/ward.tex b/tex/context/sample/ward.tex
index 9922beb6e..a95b90f5f 100644
--- a/tex/context/sample/ward.tex
+++ b/tex/context/sample/ward.tex
@@ -1,5 +1,5 @@
The Earth, as a habitat for animal life, is in old age and
has a fatal illness. Several, in fact. It would be happening
-whether humans has ever evolved or not. But our presence is
+whether humans had ever evolved or not. But our presence is
like the effect of an old|-|age patient who smokes many packs
of cigarettes per day |.| and we humans are the cigarettes. \ No newline at end of file