From 51d573f4c0e8d3b8499bff7a3c6fba3dcd71d725 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 10 Jun 2004 00:00:00 +0200 Subject: stable 2004.06.10 --- tex/context/base/colo-ext.tex | 62 + tex/context/base/colo-hex.tex | 117 ++ tex/context/base/colo-ini.tex | 790 +++++--- tex/context/base/colo-rgb.tex | 4 +- tex/context/base/colo-run.tex | 47 +- tex/context/base/cont-cz.tex | 8 +- tex/context/base/cont-de.tex | 18 +- tex/context/base/cont-en.tex | 24 +- tex/context/base/cont-fil.tex | 7 + tex/context/base/cont-it.tex | 24 +- tex/context/base/cont-log.tex | 23 +- tex/context/base/cont-new.tex | 961 ++++++++-- tex/context/base/cont-nl.tex | 14 +- tex/context/base/cont-old.tex | 30 +- tex/context/base/cont-ro.tex | 6 +- tex/context/base/cont-uk.tex | 14 +- tex/context/base/cont-usr.ori | 135 +- tex/context/base/context.tex | 316 +-- tex/context/base/core-box.tex | 336 ++-- tex/context/base/core-buf.tex | 243 +-- tex/context/base/core-con.tex | 237 +-- tex/context/base/core-dat.tex | 44 +- tex/context/base/core-def.tex | 4 +- tex/context/base/core-des.tex | 1083 +++++------ tex/context/base/core-fig.tex | 593 +++--- tex/context/base/core-fil.tex | 63 +- tex/context/base/core-fld.tex | 172 +- tex/context/base/core-fnt.tex | 233 +-- tex/context/base/core-gen.tex | 172 +- tex/context/base/core-grd.tex | 92 +- tex/context/base/core-hlp.tex | 64 +- tex/context/base/core-ini.tex | 41 +- tex/context/base/core-int.tex | 1340 ++++++------- tex/context/base/core-itm.tex | 542 ++---- tex/context/base/core-job.tex | 146 +- tex/context/base/core-lnt.tex | 59 +- tex/context/base/core-lst.tex | 668 +++---- tex/context/base/core-ltb.tex | 146 +- tex/context/base/core-mak.tex | 40 +- tex/context/base/core-mar.tex | 170 +- tex/context/base/core-mat.tex | 260 +-- tex/context/base/core-mis.tex | 1072 +++++------ tex/context/base/core-nav.tex | 143 +- tex/context/base/core-new.tex | 106 +- tex/context/base/core-not.tex | 508 ++--- tex/context/base/core-ntb.tex | 707 ++----- tex/context/base/core-num.tex | 160 +- tex/context/base/core-obj.tex | 58 +- tex/context/base/core-par.tex | 10 +- tex/context/base/core-pos.tex | 339 ++-- tex/context/base/core-ref.tex | 881 +++++---- tex/context/base/core-reg.tex | 356 ++-- tex/context/base/core-rul.tex | 1460 +++++++------- tex/context/base/core-sec.tex | 1384 +++++++------- tex/context/base/core-snc.tex | 21 +- tex/context/base/core-spa.tex | 1789 +++++++++++------ tex/context/base/core-syn.tex | 261 ++- tex/context/base/core-sys.tex | 95 +- tex/context/base/core-tab.tex | 296 +-- tex/context/base/core-tbl.tex | 454 +---- tex/context/base/core-uti.tex | 68 +- tex/context/base/core-var.tex | 57 +- tex/context/base/core-ver.tex | 293 +-- tex/context/base/core-vis.tex | 85 +- tex/context/base/enco-acc.tex | 2 +- tex/context/base/enco-cyr.tex | 64 +- tex/context/base/enco-def.tex | 10 +- tex/context/base/enco-ec.tex | 26 +- tex/context/base/enco-ecm.tex | 4 +- tex/context/base/enco-fde.tex | 2 +- tex/context/base/enco-ffr.tex | 7 +- tex/context/base/enco-ini.tex | 117 +- tex/context/base/enco-pdf.tex | 2 +- tex/context/base/enco-pfr.tex | 22 +- tex/context/base/enco-pol.tex | 2 +- tex/context/base/enco-qx.tex | 21 +- tex/context/base/enco-run.tex | 10 +- tex/context/base/filt-ini.tex | 87 +- tex/context/base/font-arb.tex | 195 +- tex/context/base/font-bfm.tex | 8 +- tex/context/base/font-chi.tex | 186 +- tex/context/base/font-heb.tex | 47 +- tex/context/base/font-ini.tex | 563 +++--- tex/context/base/font-map.tex | 26 +- tex/context/base/font-run.tex | 32 +- tex/context/base/font-uni.tex | 88 +- tex/context/base/font-unk.tex | 2 +- tex/context/base/font-vnr.tex | 18 +- tex/context/base/hand-def.tex | 565 +++--- tex/context/base/hand-ini.tex | 384 ++-- tex/context/base/java-exa.tex | 367 ++-- tex/context/base/java-fil.tex | 2 +- tex/context/base/java-fld.tex | 2 +- tex/context/base/java-ini.tex | 76 +- tex/context/base/java-stp.tex | 2 +- tex/context/base/lang-alt.tex | 50 +- tex/context/base/lang-ana.tex | 6 +- tex/context/base/lang-art.tex | 8 +- tex/context/base/lang-bal.tex | 8 +- tex/context/base/lang-cel.tex | 6 +- tex/context/base/lang-chi.tex | 46 +- tex/context/base/lang-cyr.tex | 118 +- tex/context/base/lang-frd.tex | 2 +- tex/context/base/lang-frq.tex | 20 +- tex/context/base/lang-ger.tex | 427 ++--- tex/context/base/lang-grk.tex | 55 +- tex/context/base/lang-ind.tex | 10 +- tex/context/base/lang-ini.tex | 284 +-- tex/context/base/lang-ita.tex | 398 ++-- tex/context/base/lang-lab.tex | 34 +- tex/context/base/lang-sla.tex | 393 ++-- tex/context/base/lang-spa.tex | 14 +- tex/context/base/lang-spe.tex | 141 +- tex/context/base/lang-ura.tex | 106 +- tex/context/base/lang-vn.tex | 62 +- tex/context/base/m-chart.tex | 572 +++--- tex/context/base/m-cweb.tex | 52 +- tex/context/base/m-edtsnc.tex | 207 ++ tex/context/base/m-educat.tex | 40 +- tex/context/base/m-graph.tex | 16 +- tex/context/base/m-layout.tex | 82 +- tex/context/base/m-newmat.tex | 138 +- tex/context/base/m-pdfsnc.tex | 200 ++ tex/context/base/m-pictex.tex | 20 +- tex/context/base/m-plus.tex | 28 +- tex/context/base/m-pstric.tex | 4 +- tex/context/base/m-quest.tex | 46 +- tex/context/base/m-steps.tex | 150 +- tex/context/base/m-tex4ht.tex | 9 + tex/context/base/m-tryout.tex | 6 +- tex/context/base/m-units.tex | 312 +-- tex/context/base/m-visual.tex | 287 +++ tex/context/base/math-ams.tex | 3 +- tex/context/base/math-fou.tex | 28 +- tex/context/base/math-ini.tex | 43 +- tex/context/base/math-run.tex | 6 +- tex/context/base/math-tex.tex | 2 +- tex/context/base/math-tim.tex | 8 +- tex/context/base/meta-clp.tex | 14 +- tex/context/base/meta-dum.tex | 30 +- tex/context/base/meta-fig.tex | 18 +- tex/context/base/meta-ini.tex | 203 +- tex/context/base/meta-nav.tex | 6 +- tex/context/base/meta-pag.tex | 166 +- tex/context/base/meta-txt.tex | 123 +- tex/context/base/meta-xml.tex | 19 +- tex/context/base/mult-com.tex | 633 +++--- tex/context/base/mult-con.tex | 1370 +++++++------ tex/context/base/mult-ini.tex | 246 +-- tex/context/base/mult-sys.tex | 35 +- tex/context/base/page-app.tex | 92 +- tex/context/base/page-bck.tex | 381 ++-- tex/context/base/page-flt.tex | 1066 +++++------ tex/context/base/page-flw.tex | 10 +- tex/context/base/page-imp.tex | 394 ++-- tex/context/base/page-ini.tex | 389 ++-- tex/context/base/page-lay.tex | 1234 ++++++------ tex/context/base/page-lin.tex | 274 ++- tex/context/base/page-log.tex | 84 +- tex/context/base/page-lyr.tex | 305 ++- tex/context/base/page-mak.tex | 148 +- tex/context/base/page-mar.tex | 1241 ++++++------ tex/context/base/page-mul.tex | 565 +++--- tex/context/base/page-not.tex | 22 +- tex/context/base/page-num.tex | 344 ++-- tex/context/base/page-one.tex | 131 +- tex/context/base/page-run.tex | 166 +- tex/context/base/page-set.tex | 350 ++-- tex/context/base/page-sid.tex | 74 +- tex/context/base/page-spr.tex | 32 +- tex/context/base/page-txt.tex | 538 +++--- tex/context/base/pdfr-il2.tex | 24 +- tex/context/base/plus-rul.tex | 45 +- tex/context/base/ppchtex.tex | 264 +-- tex/context/base/prop-ini.tex | 270 +-- tex/context/base/prop-lay.tex | 28 +- tex/context/base/prop-mis.tex | 224 +++ tex/context/base/prop-run.tex | 21 +- tex/context/base/regi-cyr.tex | 12 +- tex/context/base/regi-ibm.tex | 2 +- tex/context/base/regi-utf.tex | 2 +- tex/context/base/s-abr-01.tex | 20 +- tex/context/base/s-abr-02.tex | 4 +- tex/context/base/s-abr-03.tex | 6 +- tex/context/base/s-chi-00.tex | 54 +- tex/context/base/s-dtk-01.tex | 257 --- tex/context/base/s-faq-00.tex | 2 +- tex/context/base/s-grk-00.tex | 77 + tex/context/base/s-mag-01.tex | 2 - tex/context/base/s-map-01.tex | 635 ------ tex/context/base/s-mod-00.tex | 198 +- tex/context/base/s-mod-01.tex | 112 +- tex/context/base/s-mod-02.tex | 220 +-- tex/context/base/s-pre-00.tex | 52 +- tex/context/base/s-pre-01.tex | 22 +- tex/context/base/s-pre-02.tex | 12 +- tex/context/base/s-pre-03.tex | 8 +- tex/context/base/s-pre-06.tex | 10 +- tex/context/base/s-pre-07.tex | 4 +- tex/context/base/s-pre-08.tex | 4 +- tex/context/base/s-pre-09.tex | 6 +- tex/context/base/s-pre-15.tex | 4 +- tex/context/base/s-pre-19.tex | 238 +-- tex/context/base/s-pre-22.tex | 14 +- tex/context/base/s-pre-50.tex | 4 +- tex/context/base/s-pre-60.tex | 38 +- tex/context/base/s-pre-61.tex | 53 +- tex/context/base/setupa.tex | 97 +- tex/context/base/setupb.tex | 3921 +++++++++++++++++++------------------- tex/context/base/spec-def.tex | 231 ++- tex/context/base/spec-dpm.tex | 80 +- tex/context/base/spec-dpx.tex | 231 ++- tex/context/base/spec-dvi.tex | 22 +- tex/context/base/spec-fdf.tex | 342 ++-- tex/context/base/spec-ini.tex | 63 +- tex/context/base/spec-mis.tex | 146 +- tex/context/base/spec-pdf.tex | 72 +- tex/context/base/spec-ps.tex | 167 +- tex/context/base/spec-tpd.tex | 212 ++- tex/context/base/spec-tr.tex | 47 +- tex/context/base/spec-var.tex | 70 + tex/context/base/spec-win.tex | 36 +- tex/context/base/spec-xtx.tex | 111 ++ tex/context/base/supp-box.tex | 389 ++-- tex/context/base/supp-emp.tex | 76 +- tex/context/base/supp-eps.tex | 114 +- tex/context/base/supp-fil.tex | 168 +- tex/context/base/supp-fun.tex | 77 +- tex/context/base/supp-lan.tex | 120 +- tex/context/base/supp-mat.tex | 75 +- tex/context/base/supp-mis.tex | 19 +- tex/context/base/supp-mpe.tex | 299 +-- tex/context/base/supp-mps.tex | 448 +++-- tex/context/base/supp-mrk.tex | 68 +- tex/context/base/supp-num.tex | 62 +- tex/context/base/supp-pdf.tex | 448 +++-- tex/context/base/supp-ran.tex | 12 +- tex/context/base/supp-spe.tex | 28 +- tex/context/base/supp-tpi.tex | 22 +- tex/context/base/supp-vis.tex | 433 +++-- tex/context/base/symb-eur.tex | 2 +- tex/context/base/symb-glm.tex | 42 +- tex/context/base/symb-ini.tex | 30 +- tex/context/base/symb-mis.tex | 36 +- tex/context/base/symb-mvs.tex | 6 +- tex/context/base/symb-nav.tex | 50 +- tex/context/base/symb-run.tex | 14 +- tex/context/base/syst-con.tex | 30 +- tex/context/base/syst-etx.tex | 33 +- tex/context/base/syst-ext.tex | 776 ++++---- tex/context/base/syst-gen.tex | 462 +++-- tex/context/base/syst-new.tex | 38 +- tex/context/base/syst-omg.tex | 4 +- tex/context/base/syst-pln.tex | 289 +-- tex/context/base/syst-tex.tex | 168 +- tex/context/base/thrd-ran.tex | 6 +- tex/context/base/thrd-trg.tex | 2 +- tex/context/base/type-akb.tex | 12 +- tex/context/base/type-buy.tex | 121 +- tex/context/base/type-cbg.tex | 349 ++++ tex/context/base/type-enc.tex | 2 +- tex/context/base/type-exa.tex | 34 +- tex/context/base/type-fsf.tex | 17 +- tex/context/base/type-ghz.tex | 29 +- tex/context/base/type-ini.tex | 135 +- tex/context/base/type-map.tex | 43 +- tex/context/base/type-pre.tex | 18 +- tex/context/base/type-run.tex | 17 +- tex/context/base/type-siz.tex | 26 +- tex/context/base/type-spe.tex | 2 +- tex/context/base/type-syn.tex | 14 +- tex/context/base/typo-ini.tex | 22 +- tex/context/base/unic-000.tex | 10 +- tex/context/base/unic-001.tex | 2 +- tex/context/base/unic-002.tex | 2 +- tex/context/base/unic-032.tex | 201 +- tex/context/base/unic-exp.tex | 2 +- tex/context/base/unic-ini.tex | 77 +- tex/context/base/verb-ini.tex | 184 +- tex/context/base/verb-pas.tex | 36 +- tex/context/base/verb-sql.tex | 14 +- tex/context/base/verb-tex.tex | 10 +- tex/context/base/verb-xml.tex | 2 +- tex/context/base/x-chemml.tex | 68 +- tex/context/base/x-contml.tex | 78 +- tex/context/base/x-corres.tex | 2 +- tex/context/base/x-dir-01.tex | 15 +- tex/context/base/x-fe.tex | 118 ++ tex/context/base/x-fig-00.tex | 18 +- tex/context/base/x-fig-01.tex | 22 +- tex/context/base/x-fig-02.tex | 12 +- tex/context/base/x-fo.tex | 3607 +++++++++++++++++++++++++++++++++++ tex/context/base/x-foxet.tex | 13 + tex/context/base/x-mathml.tex | 38 +- tex/context/base/x-physml.tex | 10 +- tex/context/base/x-res-01.tex | 34 +- tex/context/base/x-res-02.tex | 12 +- tex/context/base/x-res-04.tex | 90 +- tex/context/base/x-res-08.tex | 42 +- tex/context/base/x-res-11.tex | 12 +- tex/context/base/x-res-50.tex | 32 +- tex/context/base/x-sch-01.tex | 4 +- tex/context/base/x-xml-01.tex | 42 +- tex/context/base/x-xml-02.tex | 24 +- tex/context/base/x-xml-11.tex | 103 + tex/context/base/xtag-ent.tex | 2 +- tex/context/base/xtag-exp.tex | 6 +- tex/context/base/xtag-ext.tex | 20 +- tex/context/base/xtag-hyp.tex | 2 +- tex/context/base/xtag-ini.tex | 800 ++++++-- tex/context/base/xtag-map.tex | 78 +- tex/context/base/xtag-meb.tex | 2 +- tex/context/base/xtag-mmc.tex | 132 +- tex/context/base/xtag-mml.tex | 13 +- tex/context/base/xtag-mmp.tex | 34 +- tex/context/base/xtag-pre.tex | 83 +- tex/context/base/xtag-prs.tex | 42 + tex/context/base/xtag-rng.tex | 4 +- tex/context/base/xtag-run.tex | 45 +- tex/context/base/xtag-utf.tex | 2 +- tex/context/base/xtag-xsd.tex | 4 +- tex/context/base/xtag-xsl.tex | 9 + tex/context/config/cont-usr.tex | 135 +- tex/context/foxet/fe-bryson.xml | 12 + tex/context/foxet/fe-ward.xml | 8 + tex/context/foxet/fe-zapf.xml | 14 + tex/context/foxet/fo-0101.fo | 8 + tex/context/foxet/fo-0102.fo | 16 + tex/context/foxet/fo-0103.fo | 12 + tex/context/foxet/fo-0201.fo | 22 + tex/context/foxet/fo-0301.fo | 56 + tex/context/foxet/fo-0601.fo | 26 + tex/context/foxet/fo-0602.fo | 27 + tex/context/foxet/fo-0603.fo | 26 + tex/context/foxet/fo-0604.fo | 26 + tex/context/foxet/fo-0611.fo | 21 + tex/context/foxet/fo-0612.fo | 21 + tex/context/foxet/fo-0613.fo | 21 + tex/context/foxet/fo-0621.fo | 100 + tex/context/foxet/fo-0641.fo | 25 + tex/context/foxet/fo-0642.fo | 27 + tex/context/foxet/fo-0643.fo | 27 + tex/context/foxet/fo-0644.fo | 27 + tex/context/foxet/fo-0650.fo | 26 + tex/context/foxet/fo-0651.fo | 26 + tex/context/foxet/fo-0701.fo | 39 + tex/context/foxet/fo-0801.fo | 54 + tex/context/foxet/fo-0901.fo | 48 + tex/context/foxet/fo-1001.fo | 63 + tex/context/foxet/fo-1002.fo | 31 + tex/context/foxet/fo-1003.fo | 31 + tex/context/foxet/fo-1004.fo | 35 + tex/context/foxet/fo-1101.fo | 68 + tex/context/sample/hawking.tex | 7 + tex/context/sample/sample.tex | 29 +- tex/context/sample/thuan.tex | 10 + tex/context/sample/zapf.tex | 2 +- tex/generic/context/m-metapo.tex | 4 +- tex/generic/context/mptopdf.tex | 20 +- tex/generic/context/ppchtex.noc | 117 +- tex/latex/context/m-ch-de.sty | 20 +- tex/latex/context/m-ch-en.sty | 20 +- tex/latex/context/m-ch-nl.sty | 20 +- tex/latex/context/m-metapo.sty | 6 +- tex/latex/context/m-pictex.sty | 6 +- 365 files changed, 34317 insertions(+), 25759 deletions(-) create mode 100644 tex/context/base/colo-ext.tex create mode 100644 tex/context/base/colo-hex.tex create mode 100644 tex/context/base/m-edtsnc.tex create mode 100644 tex/context/base/m-pdfsnc.tex create mode 100644 tex/context/base/m-tex4ht.tex create mode 100644 tex/context/base/m-visual.tex create mode 100644 tex/context/base/prop-mis.tex delete mode 100644 tex/context/base/s-dtk-01.tex create mode 100644 tex/context/base/s-grk-00.tex delete mode 100644 tex/context/base/s-map-01.tex create mode 100644 tex/context/base/spec-var.tex create mode 100644 tex/context/base/spec-xtx.tex create mode 100644 tex/context/base/type-cbg.tex create mode 100644 tex/context/base/x-fe.tex create mode 100644 tex/context/base/x-fo.tex create mode 100644 tex/context/base/x-foxet.tex create mode 100644 tex/context/base/x-xml-11.tex create mode 100644 tex/context/base/xtag-prs.tex create mode 100644 tex/context/foxet/fe-bryson.xml create mode 100644 tex/context/foxet/fe-ward.xml create mode 100644 tex/context/foxet/fe-zapf.xml create mode 100644 tex/context/foxet/fo-0101.fo create mode 100644 tex/context/foxet/fo-0102.fo create mode 100644 tex/context/foxet/fo-0103.fo create mode 100644 tex/context/foxet/fo-0201.fo create mode 100644 tex/context/foxet/fo-0301.fo create mode 100644 tex/context/foxet/fo-0601.fo create mode 100644 tex/context/foxet/fo-0602.fo create mode 100644 tex/context/foxet/fo-0603.fo create mode 100644 tex/context/foxet/fo-0604.fo create mode 100644 tex/context/foxet/fo-0611.fo create mode 100644 tex/context/foxet/fo-0612.fo create mode 100644 tex/context/foxet/fo-0613.fo create mode 100644 tex/context/foxet/fo-0621.fo create mode 100644 tex/context/foxet/fo-0641.fo create mode 100644 tex/context/foxet/fo-0642.fo create mode 100644 tex/context/foxet/fo-0643.fo create mode 100644 tex/context/foxet/fo-0644.fo create mode 100644 tex/context/foxet/fo-0650.fo create mode 100644 tex/context/foxet/fo-0651.fo create mode 100644 tex/context/foxet/fo-0701.fo create mode 100644 tex/context/foxet/fo-0801.fo create mode 100644 tex/context/foxet/fo-0901.fo create mode 100644 tex/context/foxet/fo-1001.fo create mode 100644 tex/context/foxet/fo-1002.fo create mode 100644 tex/context/foxet/fo-1003.fo create mode 100644 tex/context/foxet/fo-1004.fo create mode 100644 tex/context/foxet/fo-1101.fo create mode 100644 tex/context/sample/hawking.tex create mode 100644 tex/context/sample/thuan.tex (limited to 'tex') diff --git a/tex/context/base/colo-ext.tex b/tex/context/base/colo-ext.tex new file mode 100644 index 000000000..182c438fa --- /dev/null +++ b/tex/context/base/colo-ext.tex @@ -0,0 +1,62 @@ +%D \module +%D [ file=colo-ext, % mostof thsi code used to be in colo-ini.tex +%D version=1997.04.01, +%D title=\CONTEXT\ Color Macros, +%D subtitle=Extras, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{Context Color Macros / extras} + +\unprotect + +%D \macros +%D {negatecolorcomponent, negativecolorbox} +%D +%D Sometimes, especially when we deal with typesetting +%D devices, we want to reverse the color scheme. Instead of +%D recalculating all those colors, we use a quick and dirty +%D approach: +%D +%D \starttyping +%D \negativecolorbox0 +%D \stoptyping +%D +%D will negate the colors in box zero. + +\def\negatecolorcomponent#1% #1 = \macro + {\scratchdimen\onepoint\advance\scratchdimen-#1\onepoint + \ifdim\scratchdimen<\zeropoint\scratchdimen\zeropoint\fi + \edef#1{\withoutpt\the\scratchdimen}} + +\def\negatecolorbox#1% + {\setbox#1\hbox + {\dostartnegative + \localstartcolor[white]\vrule\!!height\ht#1\!!depth\dp#1\!!width\wd#1\localstopcolor + \hskip-\wd#1% + \box#1% + \dostopnegative}} + +%D There are in principle two ways to handle overprint: bound to colors +%D or independent. For the moment we only support independent overprint +%D handling. Here we deal with a per-document setting. + +\setupcolors + [\c!overprint=\v!no] + +\def\starttextoverprint + {\doifelse\@@cloverprint\v!yes + {\let\stoptextoverprint\dostopoverprint\dostartoverprint} + {\let\stoptextoverprint\donothing}} + +\let\stoptextoverprint\donothing + +\appendtoks \starttextoverprint \to \everystarttextproperties +\appendtoks \stoptextoverprint \to \everystoptextproperties + +\protect \endinput diff --git a/tex/context/base/colo-hex.tex b/tex/context/base/colo-hex.tex new file mode 100644 index 000000000..b493b8c6b --- /dev/null +++ b/tex/context/base/colo-hex.tex @@ -0,0 +1,117 @@ +%D \module +%D [ file=colo-hex, +%D version=2004.06.23, +%D title=\CONTEXT\ Color Macros, +%D subtitle=Hex Colors, +%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. + +\ifx\dodododefinecolor\undefined + \beginTEX \endinput \endTEX +\else + \endinput +\fi + +\writestatus{loading}{Context Color Macros / hexadecimal} + +% \edef\testcolor{\string#FFC0C0} +% \edef\testcolor{\string#55} +% +% \setupcolors[state=start] +% +% \expanded{\definecolor[thehexcolor][\hexcolorspec\testcolor]} +% +% \checkhexcolor[\testcolor] +% +% \definecolor[thehexcolor][\testcolor] +% +% \starttext +% +% test \color[thehexcolor]{rood} +% test \color[red]{rood} +% test \color[\testcolor]{rood} +% +% \stoptext + +\unprotect + +\newdimen\hexcolorfraction \hexcolorfraction=\dimexpr(1pt/256) + +\chardef\hexcolorprefix=`# + +\def\hexcolorspec #1{\expandafter\dohexcolorspec #1\empty\empty\empty\empty\relax} +\def\hexcolorpattern#1{\expandafter\dohexcolorpattern#1\empty\empty\empty\empty\relax} + +\ifx\dohexstringtonumber\undefined \def\dohexstringtonumber{"} \fi + +\def\hexcolorcomponent#1#2% + {\ifnum\dohexstringtonumber#1#2=\zerocount0\else\ifnum\dohexstringtonumber#1#2=\plusone1\else + \expandafter\withoutpt\the\dimexpr(\dohexstringtonumber#1#2\hexcolorfraction)% + \fi\fi} + +\def\dohexcolorspec#1#2#3#4#5#6#7#8\relax + {\ifx#4\empty + s=\hexcolorcomponent#2#3% + \else + r=\hexcolorcomponent#2#3,g=\hexcolorcomponent#4#5,b=\hexcolorcomponent#6#7% + \fi} + +\def\dohexcolorpattern#1#2#3#4#5#6#7#8\relax + {0\ifx#4\empty + S:\hexcolorcomponent#2#3% + \else + R:\hexcolorcomponent#2#3:\hexcolorcomponent#4#5:\hexcolorcomponent#6#7% + \fi:0:0} + +\def\doifhexcolorelse#1% + {\expandafter\dodoifhexcolorelse#10\od} % 0 is a dirty trick to catch an empty #1 + +\def\dodoifhexcolorelse#1#2\od + {\ifnum`#1=\hexcolorprefix + \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments + \fi} + +\def\docheckhexcolor#1% + {\doifhexcolorelse{#1}{\doifundefined{#1}{\setxvalue{\??cr#1}{\hexcolorpattern{#1}}}}\donothing} + +\def\checkhexcolor[#1]% + {\expanded{\docheckhexcolor{#1}}} + +\def\colorHpattern{\@EA\hexcolorpattern\@EA{\@EA*\@@cl@@h}} % * == dummy placeholder + +\let\dodododefinecolor\dododefinecolor % we will overload this one + +\def\dododefinecolor#1#2#3#4[#5][#6]% + {\doifhexcolorelse{#6} + {\setxvalue{\??cr#5}{\hexcolorpattern{#6}}} + {\dodododefinecolor#1#2#3#4[#5][#6]}} + +%D For Adam Lindsay and his XeTeX special driver: + +% because we intercept the zero condition, the .23pt in 1.23pt will disappear in the +% ifcase zero part branch + +\def\colorhexcomponent#1% + {\ifdim#1\points<.005\points + 00\else\lchexnumbers{\the\dimexpr(255\dimexpr(#1\points)\relax+.5\points)\relax}% + \fi} + +% the faster one + +\newdimen\hex@color@a \hex@color@a=.005pt +\newdimen\hex@color@b \hex@color@b=.5pt +\chardef \hex@color@c =255 + +\def\colorhexcomponent#1% + {\ifdim#1\points<\hex@color@a + 00\else\lchexnumbers{\the\dimexpr(#1\points*\hex@color@c+\hex@color@b)\relax}% + \fi} + +\protect \endinput diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex index d82445383..2e0d6bd92 100644 --- a/tex/context/base/colo-ini.tex +++ b/tex/context/base/colo-ini.tex @@ -11,11 +11,13 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\writestatus{loading}{Context Color Macros} +\writestatus{loading}{Context Color Macros / initialization} %D To do: stroke versus fill color %D 1000 100 10 -> constants +%D Possible optimization: store level in mark instead of name + \unprotect %D Color support is not present in \TEX. Colorful output can @@ -184,25 +186,25 @@ %D \macros %D {definecolor} %D -%D We will enable users to specify colors in \kap{RGB} and -%D \kap{CMYK} color spaces or gray scales using +%D We will enable users to specify colors in \cap{RGB} and +%D \cap{CMYK} color spaces or gray scales using %D %D \showsetup{\y!definecolor} %D %D For example: %D -%D \starttypen +%D \starttyping %D \definecolor [SomeKindOfRed] [r=.8,g=.05,b=.05] -%D \stoptypen +%D \stoptyping %D %D Such color specifications are saved in a macro in the %D following way: %D -%D \starttypen +%D \starttyping %D \setvalue{\??cr name}{R:r:g:b} %D \setvalue{\??cr name}{C:c:m:y:k} %D \setvalue{\??cr name}{S:s} -%D \stoptypen +%D \stoptyping %D %D Gray scales are specified with the \type{s} parameter, %D where the \type {s} is derived from {\em screen}. @@ -214,11 +216,11 @@ %D (probably by symbolic methods. So, currently the data is %D stored as follows: %D -%D \starttypen +%D \starttyping %D \setvalue{\??cr name}{R:r:g:b:a:t} %D \setvalue{\??cr name}{C:c:m:y:k:a:t} %D \setvalue{\??cr name}{S:s:a:t} -%D \stoptypen +%D \stoptyping % beware: comparisons asked/current on name, not value @@ -230,11 +232,20 @@ \def\@@cl@@z{0} \def\@@cl@@o{1} +% \def\@@resetcolorparameters +% {\let\@@cl@@r\@@cl@@z\let\@@cl@@g\@@cl@@z\let\@@cl@@b\@@cl@@z +% \let\@@cl@@c\@@cl@@z\let\@@cl@@m\@@cl@@z\let\@@cl@@y\@@cl@@z\let\@@cl@@k\@@cl@@z +% \let\@@cl@@s\@@cl@@z\let\@@cl@@p\@@cl@@o +% \let\@@cl@@t\@@cl@@z\let\@@cl@@a\@@cl@@z +% \let\@@cl@@h\empty \let\@@cl@@n\empty} + \def\@@resetcolorparameters - {\let\@@cl@@r\@@cl@@z\let\@@cl@@g\@@cl@@z\let\@@cl@@b\@@cl@@z - \let\@@cl@@c\@@cl@@z\let\@@cl@@m\@@cl@@z\let\@@cl@@y\@@cl@@z - \let\@@cl@@k\@@cl@@z\let\@@cl@@s\@@cl@@z\let\@@cl@@p\@@cl@@o - \let\@@cl@@t\@@cl@@z\let\@@cl@@a\@@cl@@z\let\@@cl@@n\empty} + {\let\@@cl@@r\@@cl@@z \let\@@cl@@g\@@cl@@z \let\@@cl@@b\@@cl@@z + \let\@@cl@@c\@@cl@@z \let\@@cl@@m\@@cl@@z \let\@@cl@@y\@@cl@@z \let\@@cl@@k\@@cl@@z + \let\@@cl@@s\@@cl@@z + \let\@@cl@@p\@@cl@@o \let\@@cl@@n\empty \let\@@cl@@d\empty \let\@@cl@@f\@@cl@@o + \let\@@cl@@h\empty + \let\@@cl@@t\@@cl@@z \let\@@cl@@a\@@cl@@z} \def\@@cl@@A{\@@cl@@a} % a hook for symbolic conversion, see below @@ -245,9 +256,9 @@ %D does not work, but \type {\romannumeral} does. Actually, %D \type{\romannumeral0} returns nothing, so it's a perfect %D candidate for this kind of hackery. This reminds me that I -%D have to look into David Karstrup's (check spelling) -%D Euro\TeX\ 2002 article because he is using \type -%D {\romannumeral} for loops (repetitive \quote {m} stuff). +%D have to look into David Kastrup's Euro\TeX\ 2002 article +%D because he is using \type {\romannumeral} for loops +%D (repetitive \quote {m} stuff). % \def\x{\y}\def\y{\z}\def\z{0:1:1:1} % @@ -260,7 +271,10 @@ \def\colorSpattern{0S:\@@cl@@s:\@@cl@@A:\@@cl@@t} \def\colorCpattern{0C:\@@cl@@c:\@@cl@@m:\@@cl@@y:\@@cl@@k:\@@cl@@A:\@@cl@@t} \def\colorRpattern{0R:\@@cl@@r:\@@cl@@g:\@@cl@@b:\@@cl@@A:\@@cl@@t} -\def\colorPpattern{0P:\@@cl@@n:\@@cl@@p:\@@cl@@A:\@@cl@@t} + +%def\colorPpattern{0P:\@@cl@@n:\@@cl@@p:\@@cl@@A:\@@cl@@t} + +\def\colorPpattern{0P:\@@cl@@n:\@@cl@@f:\@@cl@@d:\@@cl@@p:\@@cl@@A:\@@cl@@t} %D The extra 0 catches empty colors specs (needed for the %D \type {\MPcolor} and \type {\PDFcolor} conversion (\type @@ -304,18 +318,22 @@ % \unexpanded\setvalue{#1}{\color[#1]}} % \unexpanded toegevoegd \def\dododefinecolor#1#2#3#4[#5][#6]% #2==set(g)value #3==set[e|x]value - {#1\addtocommalist{#5}\colorlist + {#1\addtocommalist{#5}\colorlist % optional \doifassignmentelse{#6} {\@@resetcolorparameters \getparameters[\??cl @@][#6]% - \doifelse{\@@cl@@r\@@cl@@g\@@cl@@b}{\@@cl@@z\@@cl@@z\@@cl@@z} - {\doifelse{\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k}{\@@cl@@z\@@cl@@z\@@cl@@z\@@cl@@z} - {\doifelse\@@cl@@s\@@cl@@z - {\showmessage\m!colors8{{[#6]},#5}% - #3{\??cr#5}{\colorZpattern}} - {#3{\??cr#5}{\colorSpattern}}} - {#3{\??cr#5}{\colorCpattern}}} - {#3{\??cr#5}{\colorRpattern}}} + \ifx\@@cl@@h\empty + \doifelse{\@@cl@@r\@@cl@@g\@@cl@@b}{\@@cl@@z\@@cl@@z\@@cl@@z} + {\doifelse{\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k}{\@@cl@@z\@@cl@@z\@@cl@@z\@@cl@@z} + {\doifelse\@@cl@@s\@@cl@@z + {\showmessage\m!colors8{{[#6]},#5}% + #3{\??cr#5}{\colorZpattern}} + {#3{\??cr#5}{\colorSpattern}}} + {#3{\??cr#5}{\colorCpattern}}} + {#3{\??cr#5}{\colorRpattern}}% + \else + \setxvalue{\??cr#5}{\colorHpattern}% + \fi} {\doifdefinedelse{\??cr#6} {\doifelse{#5}{#6} {% this way we can freeze \definecolor[somecolor][somecolor] @@ -328,24 +346,29 @@ \unexpanded#2{#5}{\switchtocolor[#5]}% \unexpanded toegevoegd \fi} +%D Hex color support is not enabled by default. You need to say \setupcolor +%D [hex] to get this working. + +\ifx\colorHpattern\undefined \let\colorHpattern\colorZpattern \fi + %D New and experimental. -\let\allspotcolors\empty +\let\allspotcolors \empty +\let\usedspotcolors \empty +\let\usedcolorchannels\empty \def\definespotcolor % [name] [color] [p=,t=,a=] {\dotripleempty\dodefinespotcolor} -\def\dodefinespotcolor[#1][#2][#3]% +\def\dodefinespotcolor[#1][#2][#3]% todo: always global {\doifnot{#1}{#2} {\@@resetcolorparameters \edef\@@cl@@n{#2}% \getparameters[\??cl @@][#3]% \doifnothing\@@cl@@p{\let\@@cl@@p\!!plusone}% \doglobal\addtocommalist{#2}\allspotcolors - \setevalue{\??cr#1}{\colorPpattern}% - \setvalue{#1}{\switchtocolor[#1]}}} - -\let\usedspotcolors\empty + \setxvalue{\??cr#1}{\colorPpattern}% was \setevalue + \setgvalue{#1}{\switchtocolor[#1]}}} % was \setvalue \def\registerusedspotcolors {\ifx\allspotcolors\empty \else @@ -358,8 +381,6 @@ \egroup \fi} -\let\usedcolorchannels\empty - \def\registerusedcolorchannels {\bgroup \doifdefinedelse{\??cs c} @@ -381,6 +402,90 @@ \def\registerusedspotcolor#1% {\global\@EA\chardef\csname\??cs#1\endcsname\zerocount} +%D On top of spotcolors, we define multitone colors. You'd better know +%D what you're doing because invalid definitions will lead to invalid +%D documents (i.e.\ resources). + +% \definecolor [darkblue] [c=.5,m=.5] +% \definecolor [darkyellow] [y=.5] +% +% \definemultitonecolor [whatever] [darkblue=.5,darkyellow=.5] [c=.25,m=.25,y=.25] [a=1,t=.5] +% \definemultitonecolor [another] [darkblue=.5,darkyellow=.5] [c=.25,m=.25,y=.25] + +\def\definemultitonecolor + {\doquadrupleempty\dodefinemultitonecolor} + +\def\dodefinemultitonecolor[#1][#2][#3][#4]% + {\let\@@cl@@cl@@D\empty % n's + \let\@@cl@@cl@@P\empty % p's + \let\@@cl@@cl@@N\empty % name + \scratchcounter\zerocount + \processcommacommand[#2]\dododefinemultitonecolor + \bgroup + \lccode`\.=`\_\lccode`\,=`\_\lccode`\:=`\_\lccode`\;=`\_% + \lccode`\+=`\_\lccode`\-=`\_\lccode`\*=`\_\lccode`\/=`\_% + % not needed, other attribute in driver: + % + % \@@resetcolorparameters + % \getparameters[#4]% + % \ifx\@@cl@@t\@@cl@@z\else + % \edef\@@cl@@cl@@N{\@@cl@@cl@@N_\@@cl@@t_\@@cl@@a}% + % \fi + \lowercase\@EA{\@EA\xdef\@EA\multitonecolor\@EA{\@@cl@@cl@@N}}% + \egroup + \setxvalue{\??cl\multitonecolor\s!check}{\noexpand\docheckmultitonecolor{\@@cl@@cl@@D}}% + \expanded{\defineglobalcolor[\multitonecolor][#3,#4]}% + \expanded{\definespotcolor[#1][\multitonecolor][#4,f=\the\scratchcounter,p={\@@cl@@cl@@P},d={\@@cl@@cl@@D}]}} + +\def\docheckmultitonecolor#1% + {\flushatshipout + {\let\checkmultitonecolor\gobbleoneargument + \def\docommand##1{\hbox{\definecolor[\s!dummy-100][##1][p=1]\color[\s!dummy-100]}}% + \processcommalist[#1]\docommand}} + +\def\checkmultitonecolor#1% + {\getvalue{\??cl#1\s!check}\letgvalue{\??cl#1\s!check}\relax} + +\def\dodefinespotcolor[#1][#2][#3]% todo: always global + {\doifnot{#1}{#2} + {\@@resetcolorparameters + \edef\@@cl@@n{#2}% + \getparameters[\??cl @@][#3]% + \doifnothing\@@cl@@p{\let\@@cl@@p\!!plusone}% + \doglobal\addtocommalist{#2}\allspotcolors + \setxvalue{\??cr#1}{\colorPpattern}% was \setevalue + \setgvalue{#1}{\switchtocolor[#1]}}}% was \setvalue + +\def\dododefinemultitonecolor#1% + {\advance\scratchcounter\plusone + \splitstring#1\at=\to\!!stringa\and\!!stringb + \ifx\@@cl@@cl@@D\empty + \let\@@cl@@cl@@D\!!stringa + \let\@@cl@@cl@@P\!!stringb + \normalizecolor\!!stringb + \edef\@@cl@@cl@@N{\!!stringa_\!!stringb}% + \else + \edef\@@cl@@cl@@D{\@@cl@@cl@@D,\!!stringa}% + \edef\@@cl@@cl@@P{\@@cl@@cl@@P,\!!stringb}% + \normalizecolor\!!stringb + \edef\@@cl@@cl@@N{\@@cl@@cl@@N_\!!stringa_\!!stringb}% + \fi} + +% \def\dododefinemultitonecolor#1% a/b safe +% {\advance\scratchcounter\plusone +% \splitstring#1\at=\to\@@cl@@one\and\@@cl@@two +% \ifx\@@cl@@cl@@D\empty +% \let\@@cl@@cl@@D\@@cl@@one +% \let\@@cl@@cl@@P\@@cl@@two +% \normalizecolor\@@cl@@two +% \edef\@@cl@@cl@@N{\@@cl@@one_\@@cl@@two}% +% \else +% \edef\@@cl@@cl@@D{\@@cl@@cl@@D,\@@cl@@one}% +% \edef\@@cl@@cl@@P{\@@cl@@cl@@P,\@@cl@@two}% +% \normalizecolor\@@cl@@two +% \edef\@@cl@@cl@@N{\@@cl@@cl@@N_\@@cl@@one_\@@cl@@two}% +% \fi} + %D We now redefine the color definition macro so that you %D can define both normal and spotcolors. @@ -391,7 +496,7 @@ {\ifthirdargument \doifassignmentelse{#2} {\dododefinecolor[#1][#2,#3]}% actually this is an error - {\dodefinespotcolor[#1][#2][#3]}% + {\dodefinespotcolor[#1][#2][#3]}% and this the prefered method \else \dodefinecolor[#1][#2]% \fi} @@ -400,12 +505,12 @@ %D only for the purpose of showing them with \type {\showcolor}. %D %D \typebuffer -%D \haalbuffer +%D \getbuffer %D %D This color shows up as \color [SomeKindOfRed] {some kind %D of red}. %D -%D \starttypen +%D \starttyping %D \setupcolors[state=start] %D %D \definecolor[mygreen][green] @@ -419,16 +524,16 @@ %D \definecolor[green][g=.5] %D %D \startcolor[mygreen]test\stopcolor -%D \stoptypen +%D \stoptyping %D \macros %D {setupcolor} %D %D Color definitions can be grouped in files with the name: %D -%D \starttypen +%D \starttyping %D \f!colorprefix-identifier.tex -%D \stoptypen +%D \stoptyping %D %D where \type{\f!colorprefix} is \unprotect {\tttf \f!colorprefix}. %D Loading such a file is done by \protect @@ -438,9 +543,9 @@ %D Some default colors are specified in \type{colo-rgb.tex}, %D which is loaded into the format by: %D -%D \starttypen +%D \starttyping %D \setupcolor[rgb] -%D \stoptypen +%D \stoptyping \let\colorstyle\empty @@ -460,24 +565,24 @@ \let\usecolors\setupcolor -%D When typesetting for paper, we prefer using the \kap{CMYK} -%D color space, but for on||screen viewing we prefer \kap{RGB} +%D When typesetting for paper, we prefer using the \cap{CMYK} +%D color space, but for on||screen viewing we prefer \cap{RGB} %D (the previous implementation supported only this scheme). %D Independant of such specifications, we support some automatic %D conversions: %D -%D \startopsomming[opelkaar] -%D \som convert all colors to \kap{RGB} -%D \som convert all colors to \kap{CMYK} -%D \som convert all colors to gray scales -%D \stopopsomming +%D \startitemize[packed] +%D \item convert all colors to \cap{RGB} +%D \item convert all colors to \cap{CMYK} +%D \item convert all colors to gray scales +%D \stopitemize %D %D We also support optimization of colors to gray scales. %D -%D \startopsomming[verder] -%D \som reduce gray colors to gray scales -%D \som reduce \kap{CMY} components to \kap{K} -%D \stopopsomming +%D \startitemize[continue] +%D \item reduce gray colors to gray scales +%D \item reduce \cap{CMY} components to \cap{K} +%D \stopitemize %D %D These options are communicated by means of: @@ -488,8 +593,8 @@ \newif\ifGRAYprefered \newif\ifreduceCMYK -%D The last boolean controls reduction of \kap{CMYK} to -%D \kap{CMY} colors. When set to true, the black component +%D The last boolean controls reduction of \cap{CMYK} to +%D \cap{CMY} colors. When set to true, the black component %D is added to the other ones. %D %D Prefering gray is not the same as converting to gray. @@ -520,7 +625,7 @@ %D author of this module) it makes sense to optimize switching %D to the max. %D -%D \starttypen +%D \starttyping %D \def\startcolormode#1% %D {\ifincolor\ifpermitcolormode %D \doifcolorelse{#1} @@ -528,7 +633,7 @@ %D \expandafter\dostartcolormode\currentcolorspecs\od} %D {\nostartcolormode}% %D \fi\fi} -%D \stoptypen +%D \stoptyping %D %D So, the more readable alternatives like the one above are %D gone now. @@ -697,11 +802,35 @@ \doexeccolorgray \exectransparency} -\def\doexeccolorP#1:#2:% +% \def\doexeccolorP#1:#2:% +% {\edef\@@cl@@n{#1}% +% \edef\@@cl@@p{#2}% +% \registerusedspotcolor\@@cl@@n +% \ifSPOTsupported +% \dowithcolor\registerspotcolor\@@cl@@n +% \dostartspotcolormode\@@cl@@n\@@cl@@p +% \else +% \doingspotcolortrue +% \let\spotcolorfactor\@@cl@@p +% \factorizecolortrue % using counter and array +% \dowithcolor\execcolorRCSP\@@cl@@n +% \factorizecolorfalse +% \let\spotcolorfactor\@@cl@@o +% \doingspotcolorfalse +% \fi +% \exectransparency} + +\def\doexeccolorP#1:#2:#3:#4:% {\edef\@@cl@@n{#1}% - \edef\@@cl@@p{#2}% + \edef\@@cl@@f{#2}% + \edef\@@cl@@d{#3}% + \edef\@@cl@@p{#4}% + \ifx\@@cl@@d\empty + \let\@@cl@@d\@@cl@@n + \fi \registerusedspotcolor\@@cl@@n \ifSPOTsupported + \checkmultitonecolor\@@cl@@n \dowithcolor\registerspotcolor\@@cl@@n \dostartspotcolormode\@@cl@@n\@@cl@@p \else @@ -715,17 +844,19 @@ \fi \exectransparency} -% \def\doexeccolorPP#1:#2:% -% {\edef\@@cl@@n{#1}% -% \edef\@@cl@@p{#2}% -% \registerusedspotcolor\@@cl@@n -% \ifx\@@cl@@n\currentspotcolor -% \normalizeSPOT -% \dostartgraycolormode\@@cl@@p % was spotcolormode -% \else -% \dostartgraycolormode\@@cl@@o -% \fi -% \exectransparency} +\def\doexeccolorPindex#1:#2:#3:#4:% + {\edef\@@cl@@n{#1}% + \edef\@@cl@@f{#2}% + \edef\@@cl@@d{#3}% + \edef\@@cl@@p{#4}% + \ifx\@@cl@@d\empty + \let\@@cl@@d\@@cl@@n + \fi + \ifSPOTsupported + \checkmultitonecolor\@@cl@@n + \dowithcolor\registerindexcolor\@@cl@@n + \fi + \noexectransparency} \def\doexeccolorPP#1:#2:% {\edef\@@cl@@n{#1}% @@ -828,8 +959,12 @@ {\edef\@@cl@@s{#1}% \dohidecolor\@@cl@@s\@@cl@@o} -\def\noexeccolorP#1:#2:#3\od - {\edef\@@cl@@p{#2}% +% \def\noexeccolorP#1:#2:#3\od +% {\edef\@@cl@@p{#2}% +% \dohidecolor\@@cl@@p\@@cl@@z} + +\def\noexeccolorP#1:#2:#3:#4:#5\od + {\edef\@@cl@@p{#4}% \dohidecolor\@@cl@@p\@@cl@@z} %D For the sake of postprocessing (i.e.\ color separation) @@ -900,29 +1035,86 @@ %D We need to register spot colors (i.e.\ resources need to %D be created. +% \def\registerspotcolor#1:% +% {\ifundefined{\??cl:\c!p:\@@cl@@n}% +% \letgvalue{\??cl:\c!p:\@@cl@@n}\empty +% %\@EA\@EA\csname registerspotcolor#1\endcsname +% \csname registerspotcolor#1\@EA\endcsname +% \else +% \@EA\dontregisterspotcolor +% \fi} + \def\registerspotcolor#1:% {\ifundefined{\??cl:\c!p:\@@cl@@n}% \letgvalue{\??cl:\c!p:\@@cl@@n}\empty %\@EA\@EA\csname registerspotcolor#1\endcsname \csname registerspotcolor#1\@EA\endcsname \else - \@EA\dontregistersplotcolor + \@EA\dontregisterspotcolor \fi} -\def\dontregistersplotcolor#1\od - {} +% \def\dontregisterspotcolor #1\od{} +% \def\registerspotcolorR #1:#2:#3:#4\od{\doregisterrgbspotcolor \@@cl@@n{#1}{#2}{#3}} +% \def\registerspotcolorC#1:#2:#3:#4:#5\od{\doregistercmykspotcolor\@@cl@@n{#1}{#2}{#3}{#4}} +% \def\registerspotcolorS #1:#2\od{\doregistergrayspotcolor\@@cl@@n{#1}} +% \def\registerspotcolorP #1:#2:#3\od{\doregistergrayspotcolor\@@cl@@n{#2}} + +\def\dontregisterspotcolor #1\od{} +\def\registerspotcolorR #1:#2:#3:#4\od{\doregisterrgbspotcolor \@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#1}{#2}{#3}} +\def\registerspotcolorC#1:#2:#3:#4:#5\od{\doregistercmykspotcolor\@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#1}{#2}{#3}{#4}} +\def\registerspotcolorS #1:#2\od{\doregistergrayspotcolor\@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#1}} +\def\registerspotcolorP #1:#2:#3\od{\doregistergrayspotcolor\@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#2}} + +%D Experimental feature: + +% \definecolor [darkblue] [c=1,m=.38,y=0,k=.64] % pantone pms 2965 uncoated m +% \definecolor [darkyellow] [c=0,m=.28,y=1,k=.06] % pantone pms 124 uncoated m +% +% \definecolor [darkblue-50] [darkblue] [p=.5] +% \definecolor [darkyellow-50] [darkyellow] [p=.5] +% \definecolor [darkblue-80] [darkblue] [p=.8] +% \definecolor [darkyellow-80] [darkyellow] [p=.8] +% +% \definecolor [darkblue,darkyellow] [r=.8] +% \definecolor [darkdull-5030] [darkblue,darkyellow] [p={.5,.3}] +% +% \setupcolors[state=start] +% +% \blackrule[width=4cm,height=3cm,color=darkblue-50] +% \blackrule[width=4cm,height=3cm,color=darkblue-80] +% \blackrule[width=4cm,height=3cm,color=darkyellow-50] +% \blackrule[width=4cm,height=3cm,color=darkyellow-80] +% \blackrule[width=4cm,height=3cm,color=darkdull-5030] + +%D Experimental too (special purpose code). + +\def\registerindexcolor#1:% + {\ifundefined{\??cl:i:\@@cl@@n}% + \letgvalue{\??cl:i:\@@cl@@n}\empty % signal + \writestatus\m!colors{registering index color \@@cl@@n}% + \@EA\@EA\csname registerindexcolor#1\endcsname + \else + \@EA\dontregisterindexcolor + \fi} -\def\registerspotcolorR#1:#2:#3:#4\od - {\doregisterrgbspotcolor\@@cl@@n{#1}{#2}{#3}} +\let\dontregisterindexcolor\dontregisterspotcolor -\def\registerspotcolorC#1:#2:#3:#4:#5\od - {\doregistercmykspotcolor\@@cl@@n{#1}{#2}{#3}{#4}} +\def\registerindexcolorR #1:#2:#3:#4\od{\doregisterrgbindexcolor \@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#1}{#2}{#3}} +\def\registerindexcolorC#1:#2:#3:#4:#5\od{\doregistercmykindexcolor\@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#1}{#2}{#3}{#4}} +\def\registerindexcolorS #1:#2\od{\doregistergrayindexcolor\@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#1}} +\def\registerindexcolorP #1:#2:#3\od{\doregistergrayindexcolor\@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#2}} -\def\registerspotcolorS#1:#2\od - {\doregistergrayspotcolor\@@cl@@n{#1}} +\def\predefinecolor[#1]% + {\bgroup + \flushatshipout{\hbox{\localcolortrue\color[#1]}}% real ones + \egroup} -\def\registerspotcolorP#1:#2:#3\od - {\doregistergrayspotcolor\@@cl@@n{#2}} +\def\predefineindexcolor[#1]% + {\bgroup + \flushatshipout{\hbox{\localcolortrue\color[#1]}}% real ones + \let\doexeccolorP\doexeccolorPindex + \flushatshipout{\hbox{\localcolortrue\color[#1]}}% index one + \egroup} %D Transparency is handled similar for all three color modes. We %D can turn transparency off with the following switch: @@ -1061,20 +1253,20 @@ %D (actually, the first application was in foreground %D colors). %D -%D \starttypen +%D \starttyping %D \starttextcolor[red] %D \dorecurse{10}{\input tufte \color[green]{oeps} \par} %D \stoptextcolor -%D \stoptypen +%D \stoptyping %D %D This is more efficient than the alternative: %D -%D \starttypen +%D \starttyping %D \setupbackgrounds[text][foregroundcolor=red] %D \startregistercolor[red] %D \dorecurse{10}{\input tufte \color[green]{oeps} \par} %D \stopregistercolor -%D \stoptypen +%D \stoptyping \let\maintextcolor\empty \def\defaulttextcolor{black} @@ -1126,10 +1318,10 @@ % global ? \def\initializemaintextcolor - {\doifelsenothing\@@cltekstkleur + {\doifelsenothing\@@cltextcolor {\let\maintextcolor\empty} {\let\maintextcolor\@@themaintextcolor - \definecolor[\@@themaintextcolor][\@@cltekstkleur]% + \definecolor[\@@themaintextcolor][\@@cltextcolor]% \doinitializemaintextcolor}} \def\doinitializemaintextcolor @@ -1167,41 +1359,41 @@ %D Consistent use of these scratch variables saves us %D unneccessary hash entries. %D -%D \starttypen +%D \starttyping %D \@@cl@@r \@@cl@@g \@@cl@@b %D \@@cl@@c \@@cl@@m \@@cl@@y \@@cl@@k %D \@@cl@@s -%D \stoptypen +%D \stoptyping %D %D We implement several conversion routines. %D -%D \starttypen +%D \starttyping %D \convertRGBtoCMYK {r} {g} {b} %D \convertRGBtoGRAY {r} {g} {b} %D \convertCMYKtoRGB {c} {m} {y} {k} %D \convertCMYKtoGRAY {c} {m} {y} {k} %D \convertCMYKtoCMY {c} {m} {y} {k} -%D \stoptypen +%D \stoptyping %D -%D The relation between \kap{Gray}, \kap{RGB} and \kap{CMYK} +%D The relation between \cap{Gray}, \cap{RGB} and \cap{CMYK} %D is: %D -%D \plaatsformule[-] -%D \startformule +%D \placeformula[-] +%D \startformula %D G = .30r + .59g + .11b %D = 1.0 - \min(1.0,\ .30c + .59m + .11y + k) -%D \stopformule +%D \stopformula %D -%D When converting from \kap{CMYK} to \kap{RGB} we use the +%D When converting from \cap{CMYK} to \cap{RGB} we use the %D formula: %D -%D \plaatsformule[-] -%D \startformule +%D \placeformula[-] +%D \startformula %D \eqalign %D {r &= 1.0 - \min(1.0,\ c+k) \cr %D g &= 1.0 - \min(1.0,\ m+k) \cr %D b &= 1.0 - \min(1.0,\ y+k)} -%D \stopformule +%D \stopformula %D %D In the conversion routine the color components are calculated %D in three digits precision. @@ -1316,8 +1508,8 @@ \let\currentspotcolor\empty \filterspotcolorfalse} -\def\colorsplitsuffix{\ifcase\currentcolorchannel\else-\@@clsplitsen\fi} -\def\colorsplitprefix{\ifcase\currentcolorchannel\else\@@clsplitsen-\fi} +\def\colorsplitsuffix{\ifcase\currentcolorchannel\else-\@@clsplit\fi} +\def\colorsplitprefix{\ifcase\currentcolorchannel\else\@@clsplit-\fi} \ifx\resetsystemmode\undefined \let\setsystemmode \gobbleoneargument @@ -1325,10 +1517,10 @@ \fi \def\setcolorsplitting - {\resetsystemmode{\v!kleur\colorsplitsuffix}% + {\resetsystemmode{\v!color\colorsplitsuffix}% \resetcolorsplitting \processaction - [\@@clsplitsen] + [\@@clsplit] [ c=>\chardef\currentcolorchannel1,% m=>\chardef\currentcolorchannel2,% y=>\chardef\currentcolorchannel3,% @@ -1337,48 +1529,48 @@ g=>\chardef\currentcolorchannel6,% b=>\chardef\currentcolorchannel7,% s=>\chardef\currentcolorchannel8,% - \v!nee=>,% \currentcolorchannel0,% all colors + \v!no=>,% \currentcolorchannel0,% all colors \s!default=>,% \currentcolorchannel0,% all colors \s!unknown=>\filterspotcolortrue \edef\currentspotcolor{\commalistelement}]% - \setsystemmode{\v!kleur\colorsplitsuffix}% - \iffilterspotcolor \let\@@clrgb\v!nee \fi} + \setsystemmode{\v!color\colorsplitsuffix}% + \iffilterspotcolor \let\@@clrgb\v!no \fi} \def\dosetupcolors[#1]% {\getparameters[\??cl][#1]% - \doifelse\@@clspot\v!ja + \doifelse\@@clspot\v!yes \SPOTsupportedtrue \SPOTsupportedfalse - \doifelsenothing\@@clsplitsen + \doifelsenothing\@@clsplit \resetcolorsplitting \setcolorsplitting - \doifelse\@@clreductie\v!ja + \doifelse\@@clreduction\v!yes \reduceCMYKtrue \reduceCMYKfalse - \doifelse\@@clexpansie\v!ja + \doifelse\@@clexpansion\v!yes \freezecolorstrue \freezecolorsfalse - \doifelse\@@clcriterium\v!alles + \doifelse\@@clcriterium\v!all \hidesplitcolortrue \hidesplitcolorfalse - \doifelse\@@clrgb\v!nee + \doifelse\@@clrgb\v!no {\ifRGBsupported \showmessage\m!colors {9}\v!rgb\RGBsupportedfalse\fi} {\ifRGBsupported\else\showmessage\m!colors{10}\v!rgb\RGBsupportedtrue \fi}% - \doifelse\@@clcmyk\v!nee + \doifelse\@@clcmyk\v!no {\ifCMYKsupported \showmessage\m!colors {9}\v!cmyk\CMYKsupportedfalse\fi} {\ifCMYKsupported\else\showmessage\m!colors{10}\v!cmyk\CMYKsupportedtrue \fi}% % todo : mpspot - \doifelse\@@clmpcmyk\v!nee + \doifelse\@@clmpcmyk\v!no {\ifMPcmykcolors \showmessage\m!colors {9}{\v!mp\v!cmyk}\MPcmykcolorsfalse\fi} {\ifMPcmykcolors\else\showmessage\m!colors{10}{\v!mp\v!cmyk}\MPcmykcolorstrue \fi}% - \doifelse\@@clmpspot\v!nee + \doifelse\@@clmpspot\v!no {\ifMPspotcolors \showmessage\m!colors {9}{\v!mp\v!spot}\MPspotcolorsfalse\fi} {\ifMPspotcolors\else\showmessage\m!colors{10}{\v!mp\v!spot}\MPspotcolorstrue \fi}% \preferGRAYfalse \processaction - [\@@clconversie] - [ \v!ja=>\preferGRAYtrue, - \v!altijd=>\preferGRAYtrue\RGBsupportedfalse\CMYKsupportedfalse]% + [\@@clconversion] + [ \v!yes=>\preferGRAYtrue, + \v!always=>\preferGRAYtrue\RGBsupportedfalse\CMYKsupportedfalse]% \ifRGBsupported \converttoGRAYfalse \forcegrayMPcolorsfalse @@ -1397,14 +1589,14 @@ \reduceMPcolorsfalse \fi\fi \processaction - [\@@clstatus] - [\v!globaal=>\ifincolor\else\showmessage\m!colors1\colorstyle\fi + [\@@clstate] + [\v!global=>\ifincolor\else\showmessage\m!colors1\colorstyle\fi \incolortrue\localcolorfalse, - \v!lokaal=>\ifincolor\else\showmessage\m!colors2\colorstyle\fi + \v!local=>\ifincolor\else\showmessage\m!colors2\colorstyle\fi \incolortrue\localcolortrue, \v!start=>\ifincolor\else\showmessage\m!colors1\colorstyle\fi \incolortrue\localcolorfalse - \let\@@clstatus\v!globaal, + \let\@@clstate\v!global, \v!stop=>\incolorfalse\localcolorfalse \forcegrayMPcolorstrue]% \initializemaintextcolor} @@ -1418,43 +1610,27 @@ \let\currentpalet\empty -\beginETEX \ifcsname +\beginTEX \def\doifcolorelse#1% - {\ifcsname\??cr\ifcsname\??cr\currentpalet#1\endcsname\currentpalet\fi#1\endcsname - \expandafter\firstoftwoarguments - \else + {\@EA\ifx\csname\??cr\@EA\ifx\csname\??cr\currentpalet#1\endcsname\relax\else\currentpalet\fi#1\endcsname\relax \expandafter\secondoftwoarguments + \else + \expandafter\firstoftwoarguments \fi} -% no longer needed -% -% \def\getcurrentcolorspecs#1% -% {\edef\currentcolorspecs% -% {\csname\??cr -% \ifcsname\??cr\currentpalet#1\endcsname\currentpalet\fi -% #1\endcsname}} - -\endETEX +\endTEX -\beginTEX +\beginETEX \ifcsname \def\doifcolorelse#1% - {\@EA\ifx\csname\??cr\@EA\ifx\csname\??cr\currentpalet#1\endcsname\relax\else\currentpalet\fi#1\endcsname\relax - \expandafter\secondoftwoarguments - \else + {\ifcsname\??cr\ifcsname\??cr\currentpalet#1\endcsname\currentpalet\fi#1\endcsname \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments \fi} -% no longer needed -% -% \def\getcurrentcolorspecs#1% -% {\edef\currentcolorspecs% -% {\csname\??cr\@EA -% \ifx\csname\??cr\currentpalet#1\endcsname\relax\else\currentpalet\fi -% #1\endcsname}} - -\endTEX +\endETEX %D \macros %D {localstartcolor,localstopcolor} @@ -1618,14 +1794,14 @@ %D This color mechanism takes care of nested colors, like in: %D %D \startbuffer -%D \kleur[groen]{groen \kleur[groen]{groen \kleur[rood]{rood}} groen} -%D \kleur[groen]{groen \kleur[]{groen \kleur[rood]{rood}} groen} -%D \kleur[groen]{groen \kleur[rood]{rood \kleur[rood]{rood}} groen} -%D \kleur[groen]{groen \kleur[groen]{groen \kleur[]{groen}} groen} -%D \kleur[groen]{groen \kleur[rood]{rood} groen} -%D \kleur[groen]{groen \kleur[]{groen} groen} -%D \kleur[]{zwart \kleur[rood]{rood} zwart} -%D \kleur[]{zwart} +%D \color[green]{groen \color[green]{groen \color[red]{rood}} groen} +%D \color[green]{groen \color[]{groen \color[red]{rood}} groen} +%D \color[green]{groen \color[red]{rood \color[red]{rood}} groen} +%D \color[green]{groen \color[green]{groen \color[]{groen}} groen} +%D \color[green]{groen \color[red]{rood} groen} +%D \color[green]{groen \color[]{groen} groen} +%D \color[]{zwart \color[red]{rood} zwart} +%D \color[]{zwart} %D \stopbuffer %D %D \typebuffer @@ -1633,9 +1809,9 @@ %D or %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D Crossing page boundaries is of course also handled. @@ -1643,26 +1819,26 @@ %D efficient as possible. %D %D \startbuffer -%D \startkleur[groen] -%D [groen] \input tufte [groen] \par -%D \startkleur[] -%D [groen] \input knuth [groen] \par -%D \startkleur[rood] -%D [rood] \input tufte [rood] \par -%D \startkleur[geel] -%D [geel] \input knuth [geel] \par -%D \stopkleur -%D [rood] \input tufte [rood] \par -%D \stopkleur -%D [groen] \input knuth [groen] \par -%D \stopkleur -%D [groen] \input tufte [groen] \par -%D \stopkleur +%D \startcolor[green] +%D [green] \input tufte [green] \par +%D \startcolor[] +%D [green] \input knuth [green] \par +%D \startcolor[red] +%D [red] \input tufte [red] \par +%D \startcolor[yellow] +%D [yellow] \input knuth [yellow] \par +%D \stopcolor +%D [red] \input tufte [red] \par +%D \stopcolor +%D [green] \input knuth [green] \par +%D \stopcolor +%D [green] \input tufte [green] \par +%D \stopcolor %D \stopbuffer %D -%D \startopelkaar -%D \haalbuffer -%D \stopopelkaar +%D \startpacked +%D \getbuffer +%D \stoppacked %D %D These quotes are typeset by saying: %D @@ -1738,6 +1914,10 @@ {%\debuggerinfo\m!colors{split popping \getsplitbotmark\colormark}% \startcolormode{\rawgetsplitbotmark\colormark}}} +\appendtoks\pushcolor \to\everypushproperties +\appendtoks\popcolor \to\everypopproperties +\appendtoks\popsplitcolor\to\everypopsplitproperties + % Private macro: only needed in test cases (like multiple % seperations in one file); no user command! @@ -1780,6 +1960,9 @@ \global\colorlevel\savedcolorlevel \egroup} +\appendtoks \startcolorpage\to\everystarttextproperties +\prependtoks\stopcolorpage \to\everystoptextproperties + %D \macros %D {color,graycolor} %D @@ -1788,7 +1971,7 @@ %D \showsetup{\y!color} %D \showsetup{\y!graycolor} %D -%D Which can be used straightforward: \color[groen]{green as gras}. +%D Which can be used straightforward: \color[green]{green as gras}. %D We want color support to be similar to font support and %D therefore implement \type{\color} as: @@ -1811,21 +1994,19 @@ {\bgroup\startcolor[#1]\aftergroup\stopcolor\aftergroup\egroup} \unexpanded\def\color[#1]% - {\groupedcommand - {\startcolor[#1]}\stopcolor} + {\groupedcommand{\startcolor[#1]}\stopcolor} \unexpanded\def\graycolor[#1]% not \gray because this is a color - {\groupedcommand - {\RGBsupportedfalse\CMYKsupportedfalse\startcolor[#1]}\stopcolor} + {\groupedcommand{\RGBsupportedfalse\CMYKsupportedfalse\startcolor[#1]}\stopcolor} \let\grey\graycolor %D This implementation enables use of defined colors like: %D -%D \starttypen +%D \starttyping %D Look at the {\brightgreen bright} side of life and get %D yourself no \red{red} head! -%D \stoptypen +%D \stoptyping %D \macros %D {colorvalue, grayvalue} @@ -1843,7 +2024,7 @@ %D show us: %D %D \startvoorbeeld -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D We can speed the following macros a bit up, but this @@ -1899,7 +2080,10 @@ \def\doformatgrayS#1:#2:#3\od {\dodoformatcolor{#1}} -\def\doformatgrayP#1:#2:#3:#4\od +% \def\doformatgrayP#1:#2:#3:#4\od +% {\dowithcolor\doformatcolor{#1}} + +\def\doformatgrayP#1:#2:#3:#4:#5:#6\od {\dowithcolor\doformatcolor{#1}} \def\doformatgray#1:% @@ -1922,7 +2106,7 @@ \def\localstartraster[#1]% {\doifelsenothing{#1} - {\dostartgraymode\@@rsraster} + {\dostartgraymode\@@rsscreen} {\dostartgraymode{#1}}} \def\localstopraster @@ -1933,7 +2117,7 @@ %D In this documentation we will not go into too much details %D on palets. Curious users can find more information on this -%D topic in \uit[use of color]. +%D topic in \from[use of color]. %D %D At the moment we implemented color in \CONTEXT\ color %D printing was not yet on the desktop. In spite of this lack our @@ -1955,11 +2139,11 @@ %D have colorful names, but best is to use names that specify %D their use, like {\em important} or {\em danger}. As a sort %D of example \CONTEXT\ has some palets predefined, -%D like:\voetnoot{At the time I wrote the palet support, I was +%D like:\footnote{At the time I wrote the palet support, I was %D reading 'A hort history of time' of S.~Hawkins, so that's %D why we stuck to quarks.} %D -%D \starttypen +%D \starttyping %D \definepalet %D [alfa] %D [ top=rood:7, @@ -1968,7 +2152,7 @@ %D down=cyaan:4, %D strange=magenta:3, %D charm=geel:2] -%D \stoptypen +%D \stoptyping %D %D It's formal definition is: %D @@ -1977,21 +2161,21 @@ %D Visualized, such a palet looks like: %D %D \startbuffer[palet] -%D \showpalet [alfa] [horizontaal,naam,nummer,waarde] +%D \showpalet [alfa] [horizontal,name,number,value] %D \stopbuffer %D -%D \startregelcorrectie -%D \haalbuffer[palet] -%D \stopregelcorrectie +%D \startlinecorrection +%D \getbuffer[palet] +%D \stoplinecorrection %D %D This bar shows both the color and gray alternatives of the %D palet components (not visible in black and white print). %D %D When needed, one can copy a palet by saying: %D -%D \starttypen +%D \starttyping %D \definepalet [TEXcolorpretty] [colorpretty] -%D \stoptypen +%D \stoptyping %D %D This saves us some typing in for instance the modules that %D deal with pretty verbatim typesetting. @@ -2070,9 +2254,9 @@ %D The naming of the colors in this palet suggests some %D ordening, which in turn is suported by color grouping. %D -%D \starttypen +%D \starttyping %D \definecolorgroup -%D [rood] +%D [red] %D [1.00:0.90:0.90, %D 1.00:0.80:0.80, %D 1.00:0.70:0.70, @@ -2081,7 +2265,7 @@ %D 1.00:0.25:0.25, %D 1.00:0.15:0.15, %D 0.90:0.00:0.00] -%D \stoptypen +%D \stoptyping %D %D In such a color group colors are numbered from~$1$ to~$n$. %D @@ -2100,7 +2284,7 @@ [#2] [ \v!cmyk=>\edef\currentcolorspace{C}, \v!rgb=>\edef\currentcolorspace{R}, - \v!grijs=>\edef\currentcolorspace{S}, + \v!gray=>\edef\currentcolorspace{S}, \v!spot=>\edef\currentcolorspace{P}, \v!s=>\edef\currentcolorspace{S}, \s!unknown=>\edef\currentcolorspace{R}]% @@ -2125,16 +2309,16 @@ %D We can show the group by: %D %D \startbuffer -%D \showcolorgroup [blauw] [horizontaal,naam,nummer,waarde] +%D \showcolorgroup [blue] [horizontal,name,number,value] %D \stopbuffer %D %D \typebuffer %D %D or in color: %D -%D \startregelcorrectie -%D \haalbuffer -%D \stopregelcorrectie +%D \startlinecorrection +%D \getbuffer +%D \stoplinecorrection %D %D which uses: %D @@ -2143,20 +2327,20 @@ \fetchruntimecommand \showcolorgroup {\f!colorprefix\s!run} %D There are ten predefined color groups, like -%D \color[groen]{\em groen}, \color[rood]{\em rood}, -%D \color[blauw]{\em blauw}, \color[cyaan]{\em cyaan}, -%D \color[magenta]{\em magenta} and \color[geel]{\em geel}. +%D \color[green]{\em groen}, \color[red]{\em rood}, +%D \color[blue]{\em blauw}, \color[cyan]{\em cyaan}, +%D \color[magenta]{\em magenta} and \color[yellow]{\em geel}. %D -%D \startregelcorrectie +%D \startlinecorrection %D \hbox to \hsize %D {\hss -%D \showcolorgroup [rood] [vertikaal,naam,nummer]\hss -%D \showcolorgroup [groen] [vertikaal,naam]\hss -%D \showcolorgroup [blauw] [vertikaal,naam]\hss -%D \showcolorgroup [cyaan] [vertikaal,naam]\hss -%D \showcolorgroup [magenta] [vertikaal,naam]\hss -%D \showcolorgroup [geel] [vertikaal,naam]\hss} -%D \stopregelcorrectie +%D \showcolorgroup [red] [vertical,name,number]\hss +%D \showcolorgroup [green] [vertical,name]\hss +%D \showcolorgroup [blue] [vertical,name]\hss +%D \showcolorgroup [cyan] [vertical,name]\hss +%D \showcolorgroup [magenta] [vertical,name]\hss +%D \showcolorgroup [yellow] [vertical,name]\hss} +%D \stoplinecorrection %D %D These groups are used to define palets {\em alfa} upto {\em %D zeta}. As long as we don't use colors from the same row, we @@ -2164,17 +2348,17 @@ %D one gains access to its members {\em top} to {\em charm} (of %D course one should use more suitable names than these). %D -%D \startregelcorrectie +%D \startlinecorrection %D \hbox to \hsize -%D {\showpalet [alfa] [vertikaal,naam,nummer]\hss -%D \showpalet [beta] [vertikaal,naam]\hss -%D \showpalet [gamma] [vertikaal,naam]\hss -%D \showpalet [delta] [vertikaal,naam]\hss -%D \showpalet [epsilon] [vertikaal,naam]\hss -%D \showpalet [zeta] [vertikaal,naam]} -%D \stopregelcorrectie -%D -%D By using the keyword \type{\v!waarde} the individual color +%D {\showpalet [alfa] [vertical,name,number]\hss +%D \showpalet [beta] [vertical,name]\hss +%D \showpalet [gamma] [vertical,name]\hss +%D \showpalet [delta] [vertical,name]\hss +%D \showpalet [epsilon] [vertical,name]\hss +%D \showpalet [zeta] [vertical,name]} +%D \stoplinecorrection +%D +%D By using the keyword \type {value} the individual color %D components are shown too. When printed in color, these %D showcases show both the colors and the gray value. @@ -2191,9 +2375,9 @@ %D %D shows the palet colors against a background: %D -%D \startregelcorrectie -%D \haalbuffer -%D \stopregelcorrectie +%D \startlinecorrection +%D \getbuffer +%D \stoplinecorrection %D %D The formal definition is: %D @@ -2207,16 +2391,16 @@ %D The similar command: %D %D \startbuffer -%D \comparecolorgroup [blauw] +%D \comparecolorgroup [blue] %D \stopbuffer %D %D \typebuffer %D %D shows color groups: %D -%D \startregelcorrectie -%D \haalbuffer -%D \stopregelcorrectie +%D \startlinecorrection +%D \getbuffer +%D \stoplinecorrection %D %D this commands are defined as: %D @@ -2230,9 +2414,9 @@ %D But let's not forget that we also have the more traditional %D non||related colors. These show up after: %D -%D \starttypen +%D \starttyping %D \showcolor [name] -%D \stoptypen +%D \stoptyping %D %D Where \type{name} for instance can be \type{rgb}. %D @@ -2240,33 +2424,8 @@ \fetchruntimecommand \showcolor {\f!colorprefix\s!run} -%D \macros -%D {negatecolorcomponent, negativecolorbox} -%D -%D Sometimes, especially when we deal with typesetting -%D devices, we want to reverse the color scheme. Instead of -%D recalculating all those colors, we use a quick and dirty -%D approach: -%D -%D \starttypen -%D \negativecolorbox0 -%D \stoptypen -%D -%D will negate the colors in box zero. - -\def\negatecolorcomponent#1% #1 = \macro - {\scratchdimen\onepoint\advance\scratchdimen-#1\onepoint - \ifdim\scratchdimen<\zeropoint\scratchdimen\zeropoint\fi - \edef#1{\withoutpt\the\scratchdimen}} - -\def\negatecolorbox#1% - {\setbox#1\hbox - {\dostartnegative - \localstartcolor[white]% - \vrule\!!height\ht#1\!!depth\dp#1\!!width\wd#1% - \localstopcolor - \hskip-\wd#1% - \box#1\dostopnegative}} +%D It would make sense to put the following code in \type +%D {colo-mps}, but it it rather low level. %D \macros %D {ifMPgraphics, ifMPcmykcolors, MPcolor} @@ -2274,13 +2433,13 @@ %D A very special macro is \type{\MPcolor}. This one can be %D used to pass a \CONTEXT\ color to \METAPOST. %D -%D \starttypen +%D \starttyping %D \MPcolor{my own red} -%D \stoptypen +%D \stoptyping %D %D This macro returns a \METAPOST\ triplet \type{(R,G,B)}. %D Unless \CMYK\ color support is turned on with \type -%D {MPcmyk}, only \kap{RGB} colors and gray scales are +%D {MPcmyk}, only \cap{RGB} colors and gray scales are %D supported. \newif\ifMPcmykcolors % \MPcmykcolorsfalse @@ -2321,14 +2480,14 @@ %D Before we had transparency available, the following %D conversion macro was available: %D -%D \starttypen +%D \starttyping %D \def\doMPcolor#1:#2:#3:#4:#5:#6:#7:#8\end %D {\if #1R(#2,#3,#4)% %D \else\if#1C\ifMPcmykcolors cmyk(#2,#3,#4,#5)\else(1-#2-#5,1-#3-#5,1-#4-#5)\fi %D \else\if#1S(#2,#2,#2)% %D \else (0,0,0)% %D \fi\fi\fi} -%D \stoptypen +%D \stoptyping %D %D In order to be useful, this macro is to be fully %D expandabele. @@ -2368,13 +2527,22 @@ \def\doMPcmykN#1:#2:#3:#4:#5\end#6\end {\doMPtransparent{\cmykASrgbMP(#1,#2,#3,#4,#6)}#5\end} -\def\doMPspotY#1:#2:#3\end#4\end - {\doMPtransparent{\spotMP("#1",#2)}#3\end} +% \def\doMPspotY#1:#2:#3\end#4\end +% {\doMPtransparent{\spotMP("#1",#2)}#3\end} +% +% \def\doMPspotN#1:#2:#3\end#4\end +% {\scaledMPcolor{#2}{#1}} + +\def\doMPspotY#1:#2:#3:#4:#5\end#6\end % best make #3 same as #1 when empty + {\doMPtransparent{multitonecolor("#1",#2,"#3","#4")}#5\end} -\def\doMPspotN#1:#2:#3\end#4\end - {\scaledMPcolor{#2}{#1}} +\def\doMPspotN#1:#2:#3:#4:#5\end#6\end + {\scaledMPcolor{#4}{#1}} \def\doMPblack#1\end#2\end + {\unknownMPcolor} + +\def\unknownMPcolor {(0,0,0)} %D \macros @@ -2382,36 +2550,55 @@ %D %D Similar alternatives are avaliable for \PDF: -\def\PDFcolor#1% - {\handlecolorwith\doPDFcolor\csname\??cr#1\endcsname:::::::\end} +\def\PDFcolor #1{\handlecolorwith\doPDFcolor \csname\??cr#1\endcsname:::::::\end} +\def\PDFcolorvalue#1{\handlecolorwith\doPDFcolorvalue\csname\??cr#1\endcsname:::::::\end} +\def\FDFcolor #1{\handlecolorwith\doFDFcolor \csname\??cr#1\endcsname:::::::\end} + +% \def\doPDFcolor#1:#2:#3:#4:#5:#6:#7:#8\end +% {\if #1R#2 #3 #4 rg% +% \else\if#1C#2 #3 #4 #5 k% +% \else\if#1S#2 g% +% \else\if#1P#3 g% todo +% \else 0 g% +% \fi\fi\fi\fi} +% +% \def\doPDFcolorvalue#1:#2:#3:#4:#5:#6:#7:#8\end +% {\if #1R#2 #3 #4% +% \else\if#1C#2 #3 #4 #5% +% \else\if#1S#2% +% \else\if#1P#3% +% \else 0% +% \fi\fi\fi\fi} +% +% \def\doFDFcolor#1:#2:#3:#4:#5:#6:#7:#8\end +% {[\if #1R#2 #3 #4% +% \else\if#1C#2 #3 #4 #5% +% \else\if#1S#2% +% \else\if#1P#3% todo +% \else 0% +% \fi\fi\fi\fi]} \def\doPDFcolor#1:#2:#3:#4:#5:#6:#7:#8\end {\if #1R#2 #3 #4 rg% \else\if#1C#2 #3 #4 #5 k% \else\if#1S#2 g% - \else\if#1P#3 g% todo + \else\if#1P#5 g% \else 0 g% \fi\fi\fi\fi} -\def\PDFcolorvalue#1% - {\handlecolorwith\doPDFcolorvalue\csname\??cr#1\endcsname:::::::\end} - \def\doPDFcolorvalue#1:#2:#3:#4:#5:#6:#7:#8\end {\if #1R#2 #3 #4% \else\if#1C#2 #3 #4 #5% \else\if#1S#2% - \else\if#1P#3% + \else\if#1P#5% \else 0% \fi\fi\fi\fi} -\def\FDFcolor#1% - {\handlecolorwith\doFDFcolor\csname\??cr#1\endcsname:::::::\end} - \def\doFDFcolor#1:#2:#3:#4:#5:#6:#7:#8\end {[\if #1R#2 #3 #4% \else\if#1C#2 #3 #4 #5% \else\if#1S#2% - \else\if#1P#3% todo + \else\if#1P#5% \else 0% \fi\fi\fi\fi]} @@ -2424,21 +2611,21 @@ \appendtoks \localcolortrue \to \everyshapebox %D We default to the colors defined in \module{colo-rgb} and -%D support both \kap{RGB} and \kap{CMYK} output. +%D support both \cap{RGB} and \cap{CMYK} output. \setupcolors - [\c!status=\v!stop, - \c!conversie=\v!ja, - \c!reductie=\v!nee, - \c!rgb=\v!ja, - \c!cmyk=\v!ja, - \c!spot=\v!ja, + [\c!state=\v!stop, + \c!conversion=\v!yes, + \c!reduction=\v!no, + \c!rgb=\v!yes, + \c!cmyk=\v!yes, + \c!spot=\v!yes, \c!mp\c!cmyk=\@@clcmyk, \c!mp\c!spot=\@@clspot, - \c!expansie=\v!nee, - \c!tekstkleur=, - \c!splitsen=\v!nee, - \c!criterium=\v!alles] + \c!expansion=\v!no, + \c!textcolor=, + \c!split=\v!no, + \c!criterium=\v!all] \setupcolor [\v!rgb] @@ -2475,7 +2662,7 @@ {\doifseparatingcolorselse {\doifelsenothing{#1} \secondoftwoarguments - {\doifelse{#1}\@@clsplitsen + {\doifelse{#1}\@@clsplit \firstoftwoarguments \secondoftwoarguments}} \secondoftwoarguments} @@ -2487,10 +2674,15 @@ %D These can be used in selecting specific files (like %D figuredatabases). -\def\colorchannelprefix{\doifseparatingcolorselse\@@clsplitsen\empty-} -\def\colorchannelsuffix{-\doifseparatingcolorselse\@@clsplitsen\empty} +% we already have: +% +% \def\colorsplitsuffix{\ifcase\currentcolorchannel\else-\@@clsplitsen\fi} +% \def\colorsplitprefix{\ifcase\currentcolorchannel\else\@@clsplitsen-\fi} + +\def\colorchannelprefix{\doifseparatingcolorselse\@@clsplit\empty-} +\def\colorchannelsuffix{-\doifseparatingcolorselse\@@clsplit\empty} %D As we can see, color support is turned off by default. %D Reduction of gray colors to gray scales is turned on. -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/colo-rgb.tex b/tex/context/base/colo-rgb.tex index 7554ed344..038e0ab0b 100644 --- a/tex/context/base/colo-rgb.tex +++ b/tex/context/base/colo-rgb.tex @@ -18,8 +18,8 @@ %D interface dependant colors. We use the color inheritance %D mechanisms to implement the interface dependant ones. -%D First we define some simple primary \kap{RGB} and \kap{CMYK} -%D colors. All colors are defined in \kap{RGB} color space. +%D First we define some simple primary \cap{RGB} and \cap{CMYK} +%D colors. All colors are defined in \cap{RGB} color space. \definecolor [red] [r=1, g=0, b=0] \definecolor [green] [r=0, g=1, b=0] diff --git a/tex/context/base/colo-run.tex b/tex/context/base/colo-run.tex index 8cd9f62dd..9b3d0e94b 100644 --- a/tex/context/base/colo-run.tex +++ b/tex/context/base/colo-run.tex @@ -1,3 +1,16 @@ +%D \module +%D [ file=colo-run, +%D version=1997.04.01, +%D title=\CONTEXT\ Color Macros, +%D subtitle=Runtime loaded commands, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + \unprotect \gdef\showpalet @@ -5,7 +18,7 @@ \gdef\doshowpalet[#1][#2]% {\doifdefined{\??pa#1} - {\doifinsetelse\v!vertikaal{#2} + {\doifinsetelse\v!vertical{#2} {\showverticalpalet[#1][#2]} {\showhorizontalpalet[#1][#2]}}} @@ -17,12 +30,12 @@ {\vrule\!!width3em\!!height\strutht\!!depth\strutdp} \tabskip\zeropoint \def\doshowpalet##1% - {\doifinsetelse\v!nummer{#2}{##1\hskip.5em}{}& + {\doifinsetelse\v!number{#2}{##1\hskip.5em}{}& \color[##1]{\rule}\graycolor[##1]{\rule}& - \doifinset\v!waarde{#2}{\hskip.5em\colorvalue{##1}}\crcr} + \doifinset\v!value{#2}{\hskip.5em\colorvalue{##1}}\crcr} \halign {\hss##&\hss##\hss&##\cr - &\doifinset{\v!naam}{#2}{\strut#1}&\cr% + &\doifinset{\v!name}{#2}{\strut#1}&\cr% \processpalet[#1]\doshowpalet\crcr}}} \gdef\showhorizontalpalet[#1][#2]% @@ -31,7 +44,7 @@ \setuppalet[#1] \tabskip\zeropoint \!!widtha\zeropoint - \doifinset\v!nummer{#2} + \doifinset\v!number{#2} {\def\doshowpalet##1% {\setbox0\hbox{##1}% \ifdim\!!widtha<\wd0\!!widtha\wd0\fi}% @@ -42,17 +55,17 @@ \fi \halign {##&&\hbox to \!!widtha{\hss##\hss}\cr - \doifinset\v!nummer{#2} + \doifinset\v!number{#2} {\def\doshowpalet##1{&\strut##1}% \processpalet[#1]\doshowpalet}\cr - \doifinset\v!naam{#2}{#1\hskip.5em}% + \doifinset\v!name{#2}{#1\hskip.5em}% \def\doshowpalet##1% {&\color[##1]{\vrule\!!width\!!widtha\!!height\strutht\!!depth\zeropoint}}% \processpalet[#1]\doshowpalet\crcr \def\doshowpalet##1% {&\graycolor[##1]{\vrule\!!width\!!widtha\!!height\zeropoint\!!depth\strutdp}}% \processpalet[#1]\doshowpalet\crcr - \doifinset\v!waarde{#2} + \doifinset\v!value{#2} {\def\doshowpalet##1% {&\vbox {\hsize\!!widtha @@ -72,7 +85,7 @@ \gdef\doshowcolorgroup[#1][#2]% {\doifdefined{\??cr#1:1} - {\doifinsetelse\v!vertikaal{#2} + {\doifinsetelse\v!vertical{#2} {\showverticalcolorgroup[#1][#2]} {\showhorizontalcolorgroup[#1][#2]}}} @@ -87,17 +100,17 @@ \def\dodoshowgroup##1% {\halign {\hss####\hss\cr - \doifinset\v!nummer{#2}{\strut##1}\cr + \doifinset\v!number{#2}{\strut##1}\cr \color[#1:##1]{\vrule\!!width4em\!!height\strutht\!!depth\zeropoint}\cr \graycolor[#1:##1]{\vrule\!!width4em\!!height\zeropoint\!!depth\strutdp}\cr - \doifinset\v!waarde{#2}{\colorvalue{#1:##1}\strut}\crcr}} + \doifinset\v!value{#2}{\colorvalue{#1:##1}\strut}\crcr}} \def\doshowgroup##1% {\doifdefined{\??cr#1:##1} {\vbox{\dodoshowgroup{##1}}}} \hbox - {\doifinset\v!naam{#2} + {\doifinset\v!name{#2} {\strut - \doifinsetelse\v!waarde{#2} + \doifinsetelse\v!value{#2} {\raise3\lineheight\hbox{#1\hskip.5em}} {#1}% \hskip.5em}% @@ -113,12 +126,12 @@ {\vrule\!!width2.5em\!!height\strutht\!!depth\strutdp} \def\doshowgroup##1% {\doifdefined{\??cr#1:##1} - {\doifinset\v!nummer{#2}{##1\hskip.5em}& + {\doifinset\v!number{#2}{##1\hskip.5em}& \color[#1:##1]{\rule}\graycolor[#1:##1]{\rule}& - \doifinset\v!waarde{#2}{\hskip.5em\colorvalue{#1:##1}}\crcr}} + \doifinset\v!value{#2}{\hskip.5em\colorvalue{#1:##1}}\crcr}} \halign {\hss##&\hss##\hss&##\hss\cr - &\doifinset\v!naam{#2}{\strut#1}&\crcr + &\doifinset\v!name{#2}{\strut#1}&\crcr \doshowgroup1\doshowgroup2\doshowgroup3\doshowgroup4% \doshowgroup5\doshowgroup6\doshowgroup7\doshowgroup8}}} @@ -132,7 +145,7 @@ \let\colorstyle\empty \setupcolor[#1]% \fi - \setupwhitespace[\v!geen] + \setupwhitespace[\v!none] \def\rule {\vrule\!!width4em\!!height\strutht\!!depth\strutdp} \def\docommand##1% diff --git a/tex/context/base/cont-cz.tex b/tex/context/base/cont-cz.tex index 84c0a5ca2..39fb5c291 100644 --- a/tex/context/base/cont-cz.tex +++ b/tex/context/base/cont-cz.tex @@ -21,10 +21,10 @@ \loaduserspecifications -\installlanguage [\s!en] [\c!status=\v!start] -\installlanguage [\s!de] [\c!status=\v!start] -\installlanguage [\s!sk] [\c!status=\v!start] -\installlanguage [\s!cz] [\c!status=\v!start] +\installlanguage [\s!en] [\c!state=\v!start] +\installlanguage [\s!de] [\c!state=\v!start] +\installlanguage [\s!sk] [\c!state=\v!start] +\installlanguage [\s!cz] [\c!state=\v!start] \setupbodyfont [csr,ams,rm,12pt] diff --git a/tex/context/base/cont-de.tex b/tex/context/base/cont-de.tex index 314122ab9..90bbe875d 100644 --- a/tex/context/base/cont-de.tex +++ b/tex/context/base/cont-de.tex @@ -21,15 +21,15 @@ \loaduserspecifications -\installlanguage [\s!en] [\c!status=\v!start] -\installlanguage [\s!uk] [\c!status=\v!start] -\installlanguage [\s!de] [\c!status=\v!start] -\installlanguage [\s!fr] [\c!status=\v!start] -\installlanguage [\s!es] [\c!status=\v!start] -\installlanguage [\s!nl] [\c!status=\v!start] -\installlanguage [\s!it] [\c!status=\v!start] - -\installlanguage [deo] [\c!status=\v!start] +\installlanguage [\s!en] [\c!state=\v!start] +\installlanguage [\s!uk] [\c!state=\v!start] +\installlanguage [\s!de] [\c!state=\v!start] +\installlanguage [\s!fr] [\c!state=\v!start] +\installlanguage [\s!es] [\c!state=\v!start] +\installlanguage [\s!nl] [\c!state=\v!start] +\installlanguage [\s!it] [\c!state=\v!start] + +\installlanguage [deo] [\c!state=\v!start] \setupbodyfont [cmr,ams,rm,12pt] diff --git a/tex/context/base/cont-en.tex b/tex/context/base/cont-en.tex index b84470695..ee291b7f3 100644 --- a/tex/context/base/cont-en.tex +++ b/tex/context/base/cont-en.tex @@ -2,18 +2,18 @@ %D [ file=cont-en, %D version=1997.08.19, %D title=\CONTEXT, -%D subtitle=\CONTEXT\ English Format Generation, +%D subtitle=\CONTEXT\ English Format Generation, %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. -\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{english} +\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{english} -\input context.tex +\input context.tex \unprotect @@ -21,13 +21,13 @@ \loaduserspecifications -\installlanguage [\s!en] [\c!status=\v!start] -\installlanguage [\s!uk] [\c!status=\v!start] -\installlanguage [\s!de] [\c!status=\v!start] -\installlanguage [\s!fr] [\c!status=\v!start] -\installlanguage [\s!es] [\c!status=\v!start] -\installlanguage [\s!it] [\c!status=\v!start] -\installlanguage [\s!nl] [\c!status=\v!start] +\installlanguage [\s!en] [\c!state=\v!start] +\installlanguage [\s!uk] [\c!state=\v!start] +\installlanguage [\s!de] [\c!state=\v!start] +\installlanguage [\s!fr] [\c!state=\v!start] +\installlanguage [\s!es] [\c!state=\v!start] +\installlanguage [\s!it] [\c!state=\v!start] +\installlanguage [\s!nl] [\c!state=\v!start] \setupbodyfont [cmr,ams,rm,12pt] diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex index 8cd6a5639..6c39a2c4d 100644 --- a/tex/context/base/cont-fil.tex +++ b/tex/context/base/cont-fil.tex @@ -26,14 +26,19 @@ %definefilesynonym [sch-base] [sch-00] %definefilesynonym [sch-make] [sch-01] +\definefilesynonym [dir-make] [dir-01] + \definefilesynonym [xml-format] [xml-01] \definefilesynonym [xml-pretty] [xml-02] +\definefilesynonym [xml-analyze] [xml-11] \definefilesynonym [fig-base] [fig-00] \definefilesynonym [fig-make] [fig-01] \definefilesynonym [fig-fake] [fig-02] \definefilesynonym [fig-missing] [fig-06] +\definefilesynonym [exi-interface] [exi-21] + \definefilesynonym [res-make] [res-01] \definefilesynonym [res-base] [res-04] \definefilesynonym [res-crop] [res-07] @@ -88,4 +93,6 @@ \definefilesynonym [chi-simplified] [chi-01] \definefilesynonym [chi-traditional] [chi-02] +\definefilesynonym [greek] [grk-00] + \endinput diff --git a/tex/context/base/cont-it.tex b/tex/context/base/cont-it.tex index 4957f966e..2ade466b9 100644 --- a/tex/context/base/cont-it.tex +++ b/tex/context/base/cont-it.tex @@ -2,18 +2,18 @@ %D [ file=cont-it, %D version=1997.08.19, %D title=\CONTEXT, -%D subtitle=\CONTEXT\ Italian Format Generation, +%D subtitle=\CONTEXT\ Italian Format Generation, %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. -\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{italian} +\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{italian} -\input context.tex +\input context.tex \unprotect @@ -21,13 +21,13 @@ \loaduserspecifications -\installlanguage [\s!en] [\c!status=\v!start] -\installlanguage [\s!uk] [\c!status=\v!start] -\installlanguage [\s!de] [\c!status=\v!start] -\installlanguage [\s!fr] [\c!status=\v!start] -\installlanguage [\s!es] [\c!status=\v!start] -\installlanguage [\s!it] [\c!status=\v!start] -%\installlanguage [\s!nl] [\c!status=\v!start] +\installlanguage [\s!en] [\c!state=\v!start] +\installlanguage [\s!uk] [\c!state=\v!start] +\installlanguage [\s!de] [\c!state=\v!start] +\installlanguage [\s!fr] [\c!state=\v!start] +\installlanguage [\s!es] [\c!state=\v!start] +\installlanguage [\s!it] [\c!state=\v!start] +%installlanguage [\s!nl] [\c!state=\v!start] \setupbodyfont [cmr,ams,rm,12pt] diff --git a/tex/context/base/cont-log.tex b/tex/context/base/cont-log.tex index 07b208b2f..488e0a735 100644 --- a/tex/context/base/cont-log.tex +++ b/tex/context/base/cont-log.tex @@ -23,14 +23,17 @@ \convertargument cmr\to\someCMRfont -\def\doifCMRfontelse#1#2% - {\doifinstringelse{\someCMRfont}{\fontname\font} - {\def\next{#1}} - {\def\next{#2}}% - \next} +% \def\doifCMRfontelse#1#2% +% {\doifinstringelse{\someCMRfont}{\fontname\font} +% {\def\next{#1}} +% {\def\next{#2}}% +% \next} + +\def\doifCMRfontelse + {\doifinstringelse\someCMRfont{\fontname\font}} \unexpanded\def\CMRkern - {\doifCMRfontelse{\kern}{\scratchdimen=}} + {\doifCMRfontelse\kern{\scratchdimen=}} % \def\TeX % {T% @@ -124,7 +127,7 @@ %D The \METAFONT\ and \METAPOST\ logos adapt themselves to the %D current fontsize, an ugly but usefull hack. -\unexpanded\def\setMFPfont% +\unexpanded\def\setMFPfont {\font\logofont=logo% \ifnum\fam=\bffam bf\else \ifnum\fam=\slfam sl\else @@ -166,13 +169,13 @@ \def\MetaHyphen% there is no hyphenchar in this font {\discretionary{\vrule\!!height.33em\!!depth-.27em\!!width.33em}{}{}} -\unexpanded\def\MetaFont% +\unexpanded\def\MetaFont {{\setMFPfont META\MetaHyphen FONT}} -\unexpanded\def\MetaPost% +\unexpanded\def\MetaPost {{\setMFPfont META\MetaHyphen POST}} -\unexpanded\def\MetaFun% +\unexpanded\def\MetaFun {MetaFun} %D \macros diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 723d14f53..966740bd3 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -20,17 +20,737 @@ \unprotect \writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!} + +\ifx\normalcompound\undefined \let\normalcompound=| \fi + +% in xtag-ini: + +\def\doexecuteXMLhexcharacter#1\relax{\getXMLcharacter{"#1}} + +% in xtag-map: + +\unexpanded\def\xmlrent#1{\doXMLentity#1;} + +% In 2005 we will abandon support for font encodings that don't have +% the ascii characters { } $ etc in their normal slot, i.e. latin modern +% instead of computer modern. Then we can also clean up some of the ugly +% xml internals that are a result from the need to deal with funny +% encodings. +% +% a solution: +% +% \defineXMLargument[ctx:c]{\getXMLcharacter} +% \defineXMLargument[ctx:e]{\getXMLentity } +% \defineXMLargument[ctx:u]{\unicodechar } +% +% \bgroup \catcode`\<=\active \catcode`\&=\active +% +% \gdef\dontexpandutf +% {\def\getXMLcharacter##1{##1}% +% \def\getXMLentity ##1{##1}% +% \def\unicodechar ##1{##1}} +% +% \egroup +% +% more generic + +\def\XMLexpanded#1% + {\bgroup + \honorunexpanded +% \dontexpandencoding +% \dontexpandutf + \let\dohandleactivecharacter\donthandleactivecharacter + \xdef\@@globalexpanded{#1}% + \egroup + \@@globalexpanded} + +\def\setXMLexpandedmark#1#2% using a tok prevents unwanted expansion in mark + {\XMLexpanded{\scratchtoks{\enableXML#2}}% + \expanded{\normalsetnormalmark{#1}{\the\scratchtoks}}} + +\def\checksoundtrack#1% + {\iflocation + \doifdefined{\??sd:#1}{\doifvaluesomething{\??sd:#1} + {\doinsertsoundtrack{\getvalue{\??sd:#1}}{#1}\@@sdoption + % brr, \..empty not really needed and maybe even wrong; + % also, not here but in driver + % well, no: sounds need to be reinitialize each time (i.e., be on page), so no + }}% \letgvalueempty{\??sd:#1}}}% + \fi} + +\def\placemargincontent + {\ifcase\margintextcollected\else % was level check + \bgroup + \redoconvertfont % !! + \chardef\graphicvadjustmode\zerocount + \doflushmargincontents + \egroup + \fi} + +\def\noconvertfont#1% #2% + {\doifdefinedelse{\@noletter@#1} + {\doifelsenothing{#1}\gobbleoneargument\@@donoconvertfont}\gobbleoneargument + {#1}} % {#2}} + +\appendtoks + \spacing\!!plusone % new per 10/08/2004, else problems in otr / !! needed +\to \everyforgetall + +% \dorecurse{50} +% {[before normal] \input thuan +% \placefigure{normal}{\framed[height=1cm,width=8cm]{}} +% \placefigure{normal}{\framed[height=2cm,width=8cm]{}} +% [before force] \input thuan +% \placefigure[force]{force}{\framed[height=8cm,width=8cm]{}}} + +\chardef\fixedfloatmethod=3 + +\def\OTRONEsomefixdfloat % [#1] + {\docheckiffloatfits + \ifroomforfloat\else + \ifzeropt\pagetotal + % let's assume that there is room + \else + \ifcase\fixedfloatmethod + % disabled + \or % 1 (old method) + \goodbreak + \or % 2 (safe method) + \page + \or % 3 (keeps in stream) + \vskip-.5\floatheight % play safe + \vskip\textheight + \fi + \fi + \fi + \showmessage\m!floatblocks9\empty + \someherefloat} % [#1] + +%D Ok, I got tired of making dediccated clean up macros using the +%D same mechanism again and again, so now we have: +%D +%D \starttyping +%D \def\xxxx{abc.d} \replacecharacters\xxxx{a.}{-} \xxxx +%D \stoptyping + +\def\replacecharacters#1#2#3% macro characters replacement + {\bgroup + \edef\ascii{#1}% + \obeylccodes % watch how this is optimized! + \def\docommand##1{\lccode\expandafter`\csname##1\endcsname=\expandafter`\csname#3\endcsname}% + \handletokens#2\with\docommand + \lowercase\@EA{\@EA\xdef\@EA\globalascii\@EA{\ascii}}% + \egroup + \dodoglobal\let#1\globalascii} + +\def\resetsetups[#1]% + {\ifundefined{\??su\ifgridsnapping\v!grid\fi:#1}% + \letbeundefined{\??su:#1}% + \else + \letbeundefined{\??su\ifgridsnapping\v!grid\fi:#1}% + \fi} + +% \def\resetsetups[#1]% +% {\letbeundefined +% {\??su:% +% \ifundefined{\??su\ifgridsnapping\v!grid\fi:#1}#1\else\ifgridsnapping\v!grid\fi% +% #1}} + +\ifx\pagediscards\undefined \let\pagediscards\relax \fi + +\installoutput\synchronizeoutput % maybe add pagediscards + {\ifvoid\normalpagebox\else + \unvbox\normalpagebox + \pagediscards + \fi} + +\def\testpage {\dotripleempty\dotestpage[\plusone]} +\def\testpageonly {\dotripleempty\dotestpage[\plustwo]} + +\chardef\testpagetrigger=0 + +\def\dotestpage[#1][#2][#3]% + {%\relax % needed before \if + \ifpaginageblokkeerd + \endgraf + \else + % new from here + \ifcase\testpagetrigger + \endgraf + \or + \ifvmode + \dosomebreak\allowbreak + \else % indeed? + \vadjust{\allowbreak}% + \endgraf + \fi + \fi + % till here + \ifdim\pagegoal<\maxdimen \relax + \ifdim\pagetotal<\pagegoal \relax + \scratchdimen\lineheight + \multiply\scratchdimen#2\relax + \advance\scratchdimen \pagetotal + \ifdim\lastskip<\parskip + \advance\scratchdimen \parskip + \fi + \ifthirdargument + \advance\scratchdimen#3\relax + \fi + \ifcase\testpagemethod + \ifdim\scratchdimen>.99\pagegoal + \penalty-\!!tenthousand\relax + \fi + \or + \advance\scratchdimen-\pagegoal + \ifdim\scratchdimen>-\lineheight + \penalty-\!!tenthousand\relax + \fi + \or + \getnoflines\pagegoal + \advance\scratchdimen-\noflines\lineheight \relax + \ifdim\scratchdimen>-\lineheight + \penalty-\!!tenthousand\relax + \fi + \or % same as 0 but more accurate + \advance\scratchdimen-10\s!sp\relax + \ifdim\scratchdimen>\pagegoal + \penalty-\!!tenthousand\relax + \fi + \fi + \else + % force page break / new / does not work as expected + % never: \penalty-\!!tenthousand\relax + \fi + \else + \ifnum#1=\plusone\goodbreak\fi + \fi + \fi} + +% temp hack, else no proper default fall back (like \textmultiply); todo: sync encoding + +\appendtoks + \let\characterencoding\nocharacterencoding +\to \everymathematics + +% \separatestring123 456\to\test [\test] + +% \def\separatestring#1\to#2% +% {\let#2\empty +% \def\docommand##1{\edef#2{\ifx#2\empty\else#2,\fi##1}}% +% \processseparatedlist[#1][ ]\docommand} +% +% \processseparatedlist[aap noot][]\ruledhbox + +% \startbuffer +% \scratchdimen\dimexpr(3pt) \getnoflines\scratchdimen 1=\the\noflines \endgraf +% \scratchdimen\dimexpr(10\lineheight) \getnoflines\scratchdimen 10=\the\noflines \endgraf +% \scratchdimen\dimexpr(10.1\lineheight) \getnoflines\scratchdimen 11=\the\noflines \endgraf +% \scratchdimen\dimexpr(10.5\lineheight) \getnoflines\scratchdimen 11=\the\noflines \endgraf +% \scratchdimen\dimexpr(10.9\lineheight) \getnoflines\scratchdimen 11=\the\noflines \endgraf +% \scratchdimen\dimexpr(10\lineheight+3pt) \getnoflines\scratchdimen 11=\the\noflines \endgraf +% \scratchdimen\dimexpr(10\lineheight+3sp) \getnoflines\scratchdimen 10=\the\noflines \endgraf +% \scratchdimen\dimexpr(10\lineheight-3sp) \getnoflines\scratchdimen 10=\the\noflines \endgraf +% +% \scratchdimen\dimexpr(3pt) \getrawnoflines\scratchdimen 0=\the\noflines \endgraf +% \scratchdimen\dimexpr(10\lineheight) \getrawnoflines\scratchdimen 10=\the\noflines \endgraf +% \scratchdimen\dimexpr(10.1\lineheight) \getrawnoflines\scratchdimen 10=\the\noflines \endgraf +% \scratchdimen\dimexpr(10.5\lineheight) \getrawnoflines\scratchdimen 11=\the\noflines \endgraf +% \scratchdimen\dimexpr(10.9\lineheight) \getrawnoflines\scratchdimen 11=\the\noflines \endgraf +% \scratchdimen\dimexpr(10\lineheight+3pt) \getrawnoflines\scratchdimen 10=\the\noflines \endgraf +% \scratchdimen\dimexpr(10\lineheight+3sp) \getrawnoflines\scratchdimen 10=\the\noflines \endgraf +% \scratchdimen\dimexpr(10\lineheight-3sp) \getrawnoflines\scratchdimen 10=\the\noflines \endgraf +% \stopbuffer +% +% \typebuffer \getbuffer + +\ifx\roundingeps\undefined \newdimen\roundingeps \roundingeps=10sp \fi + +\def\getnoflines {\xdogetnoflines\plusone } % compensated +\def\getroundednoflines{\xdogetnoflines\plustwo } % rounded +\def\getrawnoflines {\xdogetnoflines\plusthree} % truncated + +\def\xdogetnoflines#1#2% + {\noflinesheight#2\relax + \ifzeropt\noflinesheight + \noflines\zerocount + \else\ifdim#2>\zeropoint + \ifcase#1\or + \advance\noflinesheight-\roundingeps + \divide\noflinesheight\openlineheight + \noflines\noflinesheight + \advance\noflines\plusone + \or + \advance\noflinesheight\roundingeps + \divide\noflinesheight\openlineheight + \noflines\noflinesheight + \or + \advance\noflinesheight\roundingeps + \advance\noflinesheight.5\openlineheight + \divide\noflinesheight\openlineheight + \noflines\noflinesheight + \fi + \else + \ifcase#1\or + \advance\noflinesheight\roundingeps + \divide\noflinesheight\openlineheight + \noflines\noflinesheight + \advance\noflines\minusone + \or + \advance\noflinesheight-\roundingeps + \divide\noflinesheight\openlineheight + \noflines\noflinesheight + \or + \advance\noflinesheight-\roundingeps + \advance\noflinesheight-.5\openlineheight + \divide\noflinesheight\openlineheight + \noflines\noflinesheight + \fi + \fi\fi} + +\def\splittblboxb#1% + {\scratchdimen-\extratblsplitheight + \advance\scratchdimen-\tbltblsplitoffset + \expanded{\testpage[2][\the\scratchdimen]}% quite save since a row is > 1 lineheight and we don't want one-liners + \setbox\TABLEsplitbox\vbox{#1}% + \setbox8\vbox{\doifsomething\tbltblspaceinbetween{\blanko[\tbltblspaceinbetween]}}% + \dimen8\ht8\advance\dimen8\dp8 + \ifmultipleTBLheads + \setbox2\vbox{}% + \setbox4\vbox{}% + \dorecurse\noftblheadlines + {\setbox0\vsplit\TABLEsplitbox to \lineheight + \setbox2\vbox{\unvcopy2\unvcopy0}}% + \dorecurse\noftblnextlines + {\setbox0\vsplit\TABLEsplitbox to \lineheight + \setbox4\vbox{\unvcopy4\unvcopy0}}% + \fi + \!!doneafalse + \doloop + {\ifdim\pagegoal<\maxdimen + \scratchdimen\pagegoal + \advance\scratchdimen-\pagetotal + \else + \scratchdimen\textheight + \fi + \advance\scratchdimen-\dimen8 + \advance\scratchdimen-\extratblsplitheight + \advance\scratchdimen-\tbltblsplitoffset + \setbox\finaltblbox\vbox + {\ifmultipleTBLheads + \ifcase\noftblheadlines\else + \unvcopy2 \doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}% + \fi + \fi}% + \if!!donea\else\ifcase\noftblnextlines\else + \setbox2\box4 + \fi\fi + \!!doneatrue + % alternatively we could use a kind of balancing like splitter + % first to scratchdimen and then smaller etc; more code and copy -) + \doloop + {\setbox\scratchbox\vsplit\TABLEsplitbox to \onepoint + \setbox\scratchbox\vbox{\unvbox\scratchbox}% + \bgroup + \advance\scratchdimen-\ht\scratchbox + \advance\scratchdimen-\dp\scratchbox + \advance\scratchdimen-\ht\finaltblbox + \advance\scratchdimen-\dp\finaltblbox\relax + \ifdim\scratchdimen>\zeropoint + \egroup + \setbox\finaltblbox\vbox + {\unvbox\finaltblbox + \unvbox\scratchbox}% + \ifvoid\TABLEsplitbox \exitloop \fi + \else + \egroup + \setbox\TABLEsplitbox\vbox + {\unvbox\scratchbox + \ifvoid\TABLEsplitbox\else\unvbox\TABLEsplitbox\allowbreak\fi}% + \exitloop + \fi}% + % + \postprocessTABLEsplitbox\finaltblbox + \ifvoid\TABLEsplitbox + \beforeTABLEsplitbox + \box\finaltblbox + \afterTABLEsplitbox + \@@tblsplitafter + \exitloop + \else + % hack + \ifdim\pagegoal<\maxdimen + \scratchdimen\pagegoal + \advance\scratchdimen \lineheight + \global\pagegoal\scratchdimen + \fi + % brrr + \beforeTABLEsplitbox + \box\finaltblbox + \afterTABLEsplitbox + \@@tblsplitafter + \pagina + \fi}} + +% this will be activated when + +% \newinsert\thispageinsert % <- installinsertion + +% \def\flushatthispage +% {\bgroup +% \dowithnextbox{\insert\thispageinsert{\box\nextbox}\egroup}% +% \hbox} + +% \appendtoks +% \ifvoid\thispageinsert\else\hbox{\smashedbox\thispageinsert}\fi +% \to \everyshipout + +% \definemarkedpage[nobackgrounds] +% \markpage[nobackgrounds] +% \doifmarkedpageelse{nobackgrounds} + +\def\gettwopassdatalist#1% + {\loadtwopassdata + \letcscsname\twopassdatalist\csname#1:\s!list\endcsname + \ifx\twopassdatalist\relax\let\twopassdatalist\empty\fi} + +\newcounter\nofmarkedpages + +\def\definemarkedpage[#1]% + {\definetwopasslist{\v!page:#1}} + +\def\markpage[#1]% looks very much like domarginreference and doparagraphreference + {\iftrialtypesetting\else + \doglobal\increment\nofmarkedpages\relax + \edef\writeparref% + {\writeutilitycommand% + {\twopassentry% + {\v!page:#1}% + {\nofmarkedpages}% + {\noexpand\realfolio}}}% + \writeparref + \fi} + +\def\doifmarkedpageelse#1% + {\gettwopassdatalist{\v!page:#1}% + \expanded{\doifinsetelse{\realfolio}{\twopassdatalist}}} + +% Just a simple and fast hanger, for usage in macros. + +\def\setuphanging + {\dodoubleempty\getparameters[\??ha]} + +\setuphanging + [\c!distance=.5em] + +\def\starthanging + {\noindent\bgroup + \dowithnextbox + {\setbox\nextbox\hbox{\flushnextbox\hskip\@@hadistance}% + \hangindent\nextboxwd + \hangafter\plusone + \flushnextbox\ignorespaces} + \hbox} + +\def\stophanging + {\endgraf + \egroup} + +\def\modevalue#1#2#3% + {\@EA\ifx\csname\@mode@\systemmodeprefix#1\endcsname\endcsname\enabledmode#2\else#2\fi} + +\def\systemmodevalue#1% + {\modevalue{\systemmodeprefix#1}} + +% \getmulticolumnlines -> now in cont-loc, to be tested and really needed + +\long\def\startprocesscommalist[#1]#2\stopprocesscommalist + {\long\def\currentcommalistcommand##1{\def\currentcommalistitem{##1}#2}% + \processcommalist[#1]\currentcommalistcommand} + +\long\def\startexpanded#1\stopexpanded % beware, this time no \noexpand before #1 + {\long\xdef\@@expanded{#1}\@@expanded} + +% \tracefonthandlingtrue + +\def\parseTR[#1][#2]% [#2] is dummy that kills spaces / no #3 argument + {\def\currentcol{0}\increment\maximumrow + \let\currentcolpos\currentcol + \let\eTR\relax + \setupTABLE[\v!row][\maximumrow][#1]} + +\long\def\parseTD[#1][#2]#3\eTD % [#2] is dummy that kills spaces + {\getparameters[\@@tbl][\c!ny=\tblnr,\c!nx=\tblnc,nc=1,nr=1,\c!n=\currentcol,#1]% + % goto first cell % NEW, n=cellnumber + \increment\currentcolpos + \doifvaluesomething{\@@tbl\c!n} + {\ifnum\getvalue{\@@tbl\c!n}=\currentcol\else + \scratchcounter\getvalue{\@@tbl\c!n}% + \advance\scratchcounter-\currentcol + \advance\scratchcounter\plusone + \expanded{\parseTD[][\c!nx=\the\scratchcounter]}\eTD + \getparameters[\@@tbl][\c!ny=\tblnr,\c!nx=\tblnc,nc=1,nr=1,\c!n=\currentcol,#1]% + \fi}% + \doloop + {\increment\currentcol + \doifnottbltag\maximumrow\currentcol\exitloop}% + % fill r*c cells and set span + \let\row\maximumrow + \let\col\currentcol + \dorecurse\tblny + {\let\col\currentcol + \settblcol\row\col\tblnx + \ifnum\tblnx>\maximumrowspan\relax + \let\maximumrowspan\tblnx + \fi + \dorecurse\tblnx + {\settbltag\row\col\tblnone + \increment\col}% + \increment\row}% + % check max column + \decrement\col + \ifnum\col>\maximumcol\relax + \let\maximumcol\col + \fi + % set values + \settbltag\maximumrow\currentcol\tblcell + \settblcol\maximumrow\currentcol\tblnx + \settblrow\maximumrow\currentcol\tblny + % save text + \edef\celltag{{\maximumrow}{\currentcol}}% + \@EA\settbltxt\@EA\maximumrow\@EA\currentcol\@EA + {\@EA\handleTBLcell\celltag[#1]{#3}}} + +% new, still to be improved +% +% \dorecurse{10} +% {\input thuan +% \placefigure{}{\framed[height=1.5cm]{test}} +% \placefloatplaceholder} + +\def\placefloatplaceholder + {\ifroomforfloat \else + \scratchdimen\pagegoal + \advance\scratchdimen-\pagetotal + \advance\scratchdimen-3\lineheight + \ifdim\scratchdimen>\zeropoint + \startlinecorrection[blank] + \mhbox{\inframed{\labeltexts{placeholder}{\lastcaptiontag}}}% + \stoplinecorrection + \else + \allowbreak + \fi + \fi} +\setuplabeltext + [placeholder={, moved}] + +\newif\ifpercentdimendone + +\bgroup % usage: \setpercentdimen\somedimen{% or dimen} todo: pct +\catcode124=\@@comment +\catcode 37=\@@active +\gdef\setpercentdimen#1#2| + {\xdef\@@expanded{#2}| + \ifx\@@expanded\empty\else + \bgroup + \global\percentdimendonefalse + \def\%{\dimexpr(#1/100)\global\percentdimendonetrue\ignorespaces}| scantokens add's a space + \catcode`%=\@@active + \let%\%| + \global\globalscratchdimen\scantokens\@EA{\@@expanded}| i'm lazy and use etex + \egroup + #1\globalscratchdimen + \fi} +\egroup + +\bgroup + +\obeylines + +\gdef\collapsedspace#1% + {\ifx#1^^M% + \expandafter\collapsedspace + \else + \space + \expandafter#1% + \fi} + +\gdef\collapsespaces% + {\prependtoksonce\relax\to\everyeof% + \ignorelines% + \ignoretabs% + \let\obeyedspace\collapsedspace% + \obeyspaces} + +\egroup + +% \def\doshowpardata#1#2{\hbox{\string#1: \the#2}\endgraf} +% +% \def\showpardata +% {\edef\thepardata +% {\hbox{font: \fontname\font}\endgraf +% \doshowpardata{interword space}{\fontdimen2\font}% +% \doshowpardata{interword stretch}{\fontdimen3\font}% +% \doshowpardata{interword shrink}{\fontdimen4\font}% +% \doshowpardata{quad space}{\fontdimen6\font}% +% \doshowpardata{extra space}{\fontdimen7\font}% +% \doshowpardata\hsize\hsize +% \doshowpardata\leftskip\leftskip +% \doshowpardata\rightskip\rightskip +% \doshowpardata\spaceskip\spaceskip +% \doshowpardata\xspaceskip\xspaceskip +% \doshowpardata\parindent\parindent +% \doshowpardata\parfillskip\parfillskip +% \doshowpardata\hyphenpenalty\hyphenpenalty +% \doshowpardata\exhyphenpenalty\exhyphenpenalty +% \doshowpardata\displaywidowpenalty\displaywidowpenalty +% \doshowpardata\widowpenalty\widowpenalty +% \doshowpardata\clubpenalty\clubpenalty +% \doshowpardata\brokenpenalty\brokenpenalty +% \doshowpardata\doublehyphendemerits\doublehyphendemerits +% \doshowpardata\finalhyphendemerits\finalhyphendemerits +% \doshowpardata\adjdemerits\adjdemerits}% +% \begingroup +% \dontshowcomposition +% \inleftmargin{\vsmash +% {\switchtobodyfont[7pt,tt]% +% \framed[\c!align=\v!right]{\thepardata}}}% +% \endgroup} +% +% \def\startshowpardata +% {\begingroup +% \showcomposition +% \showstruts\tracepositionstrue \tracingparagraphs\maxdimen +% \appendtoksonce\showpardata\let\showpardata\relax\to\everypar} +% +% \def\stopshowpardata +% {\endgraf +% \endgroup} +% +% \defineXMLenvironment[showpardata] \startshowpardata \stopshowpardata +% \defineXMLsingular [showpardata] \showpardata + +\newskip\@@raggedskipa +\newskip\@@raggedskipb + +\def\setraggedness#1% + {\ifnum\tolerance<1500\relax % small values have + \tolerance1500\relax % unwanted side effects + \fi + \ifx\dohyphens\relax + % this code will be reconsidered / kind of fuzzy (and old) + \@@raggedskipa 2.5\hsize + \@@raggedskipb #1\relax + \divide\@@raggedskipa \@@raggedskipb + \hyphenpenalty\@@raggedskipa + \fi} + % todo : test low level translation (nl->en) and optimize script -\def\tightlayer[#1]% - {\begingroup - \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 - \hbox to \hsize{\composedlayer{#1}}% - \endgroup} +% \definestylecollection[mine] + +% \definestyleinstance[mine][default][sorry] +% \definestyleinstance[mine][tt][bs][ttbs:\rm\sl] +% \definestyleinstance[mine][tt][bf][ttbf:\rm\sl] +% \definestyleinstance[mine][bf][\sl] +% \definestyleinstance[mine][sl][\tt] + +% {\bf test \mine test \sl test \mine test \bs oeps \mine oeps {\tt test \mine \bf test}} + +\definesystemvariable{sx} + +\def\definestylecollection + {\dosingleargument\dodefinestylecollection} + +\def\dodefinestylecollection[#1]% + {\iffirstargument + \unexpanded\setvalue{#1}{\styleinstance[#1]}% + \def\docommand##1% + {\def\dodocommand####1{\letbeundefined{\??sx##1:####1:\commalistelement}}% + \processcommacommand[\alternativelist,\s!default]\dodocommand}% + \processcommacommand[\stylelist,\s!default]\docommand + \fi} + +\def\definestyleinstance + {\doquadrupleargument\dodefinestyleinstance} + +\def\dodefinestyleinstance[#1][#2][#3][#4]% [name] [rm|ss|tt|..] [sl|bf|...] [whatever] + {\iffirstargument + \doifundefined{#1}{\definestylecollection[#1]}% + \fi + \iffourthargument + \setvalue{\??sx#1:#2:#3}{#4}% + \else\ifthirdargument + \setvalue{\??sx#1::#2}{#3}% + \else\ifsecondargument + \letvalue{\??sx#1::#2}\empty + \fi\fi\fi} + +\unexpanded\def\styleinstance[#1]% will be faster + {%\begingroup\expanded{\infofont[#1:\fontstyle:\fontalternative]}\endgroup + \executeifdefined{\??sx#1:\fontstyle:\fontalternative}% + {\executeifdefined{\??sx#1:\fontstyle:\s!default}% + {\executeifdefined{\??sx#1::\fontalternative} + {\getvalue {\??sx#1::\s!default}}}}} + +% \beginETEX \ifcsname +% +% \unexpanded\def\styleinstance[#1]% +% {\csname\??sx#1% +% \ifcsname:\fontstyle:\fontalternative\endcsname +% :\fontstyle:\fontalternative +% \else\ifcsname:\fontstyle:\s!default\endcsname +% :\fontstyle:\s!default +% \else\ifcsname::\fontalternative\endcsname +% ::\fontalternative +% \else\ifcsname::\s!default\endcsname +% ::\s!default +% \else +% % nothing, \relax +% \fi\fi\fi\fi +% \endcsname} +% +% \endETEX + +% cleaner +% +% \long\def\doMPTEXcheck#1% +% {\long\def\dodoMPTEXcheck##1#1##2##3\war{\if##2@\else\@EA\donoMPTEXcheck\fi}% +% \@EA\dodoMPTEXcheck\MPascii#1@@\war} + +% \long\def\donoMPTEXcheck#1\relax +% {\global\MPTEXgraphictrue} + +% \MPTEXgrapicchecks\emptytoks + +% \def\forceMPTEXcheck#1% +% {\convertargument#1\to\ascii +% \@EA\appendtoks\@EA\doMPTEXcheck\@EA{\ascii}\to\MPTEXgrapicchecks} + +% \forceMPTEXcheck{etex} +% \forceMPTEXcheck{textext} +% \forceMPTEXcheck{graphictext} + +% \long\def\checkMPTEXgraphic#1% +% {\ifforceMPTEXgraphic +% \global\MPTEXgraphictrue +% \else +% \global\MPTEXgraphicfalse +% \expandafter\convertargument#1\to\MPascii +% \the\MPTEXgrapicchecks\relax % \relax is end condition! +% \fi} + +% no, wrong! never! +% +% \def\tightlayer[#1]% +% {\begingroup +% \def\currentlayer{#1}% todo: left/right +% \setbox\nextbox\emptybox % hoogte/breedte are \wd\nextbox/\ht\nextbox +% \hsize\layerparameter\c!width % \overlaywidth = \hsize +% \vsize\layerparameter\c!height % \overlaywheight = \vsize +% \hbox to \hsize{\composedlayer{#1}}% +% \endgroup} \let\locatedfilepath\empty @@ -45,15 +765,6 @@ {\processcommacommand[.,\allinputpaths]\docommando}% \fi} -\def\setfontstrut - {\setcharstrut{(gplQT}} - -\def\doifXMLtextelse#1% - {\doiftextelse{\simplifyXMLelements#1}} - -\def\doifXMLtext#1#2% - {\doiftextelse{\simplifyXMLelements#1}{#2}\donothing} - % todo : share symbols % \definecolor[rollover:n][red] @@ -80,8 +791,8 @@ % {\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}}}}% +% [\c!framecolor=rollover,\c!backgroundcolor=rollover,\c!color=rollover]% +% {\dolocationattributes{##1}\c!style\c!color{#3}}}}% % \iffirstargument % \ifsecondargument % \def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[#2]}% @@ -100,7 +811,7 @@ % \nextsystemfield % \setupfield % [rollbutton] -% [\c!kader=\v!uit,\c!offset=\v!overlay,\c!klikuit={#4}]% +% [\c!frame=\v!off,\c!offset=\v!overlay,\c!klickoff={#4}]% % \definefield % [\currentsystemfield][push][rollbutton] % [rsym:\nofrollovers:n,% @@ -120,10 +831,10 @@ \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 + \doifelse{##2}{n}{\doifelsevalue{##1\c!alternative}\v!hidden\phantom\hbox}\hbox {\localframed[##1] - [\c!kaderkleur=rollover,\c!achtergrondkleur=rollover,\c!kleur=rollover]% - {\dolocationattributes{##1}\c!letter\c!kleur{#3}}}}% + [\c!framecolor=rollover,\c!backgroundcolor=rollover,\c!color=rollover]% + {\dolocationattributes{##1}\c!style\c!color{#3}}}}% \iffirstargument \ifsecondargument \def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[#2]}% @@ -141,9 +852,9 @@ \definesymbol[rsym:\nofrollovers:d][\setlocationbox d]% \setupfield [rollbutton] - [\c!kader=\v!uit, + [\c!frame=\v!off, \c!offset=\v!overlay, - \c!klikuit={#4}]% + \c!clickout={#4}]% \definefield [roll:\nofrollbuttons][push][rollbutton] [rsym:\nofrollovers:n,% @@ -189,10 +900,10 @@ \nextsystemfield \setupfield [overlayrollbutton] - [\c!kader=\v!uit,\c!offset=\v!overlay,\c!gebiedin={#1},\c!gebieduit={#2}]% + [\c!frame=\v!off,\c!offset=\v!overlay,\c!regionin={#1},\c!regionout={#2}]% \definesymbol [\currentsystemfield] - [{\framed[\c!kader=\v!uit,\c!breedte=\overlaywidth,\c!hoogte=\overlayheight]{}}]% + [{\framed[\c!frame=\v!off,\c!width=\overlaywidth,\c!height=\overlayheight]{}}]% \definefield [\currentsystemfield][push][overlayrollbutton][\currentsystemfield][\currentsystemfield]% \fitfield[\currentsystemfield]% @@ -349,7 +1060,7 @@ \fi \fi \advance\boislevel\minusone} -\defineblankmethod [\v!synchroniseer] {\verticalstrut\vskip-2\lineheight\verticalstrut} +\defineblankmethod [\v!synchronize] {\verticalstrut\vskip-2\lineheight\verticalstrut} % \vtop{\blank[synchronize]\blank[line]test} @@ -549,8 +1260,8 @@ {\presetlocalframed[\??rw#1]% \getparameters% [\??rw#1]% - [\c!openpaginaactie=,\c!sluitpaginaactie=,% - \c!breedte=\renderingwidth,\c!hoogte=\renderingheight,% + [\c!openpageaction=,\c!closepageaction=,% + \c!width=\renderingwidth,\c!height=\renderingheight,% #2]} \def\setuprenderingwindow @@ -576,13 +1287,13 @@ \edef\renderingwidth{\objectwidth}% \fi % create fall back if needed - \doifdefinedelse{\??rw#1\c!breedte} + \doifdefinedelse{\??rw#1\c!width} {\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 + \handlereferenceactions{\getvalue{\??rw\currentrenderingwindow\c!openpageaction }}\dosetuprenderingopenpageaction + \handlereferenceactions{\getvalue{\??rw\currentrenderingwindow\c!closepageaction}}\dosetuprenderingclosepageaction \localframed [\??rw\currentrenderingwindow][\c!offset=\v!overlay]% {\expanded{\doinsertrenderingwindow @@ -726,27 +1437,6 @@ {\endgraf\verticalstrut\endgraf\kern-2\lineheight \egroup} -% Just a simple and fast hanger, for usage in macros. - -\def\setuphanging - {\dodoubleempty\getparameters[\??ha]} - -\setuphanging - [\c!afstand=.5em] - -\def\starthanging - {\noindent\bgroup - \dowithnextbox - {\setbox\nextbox\hbox{\flushnextbox\hskip\@@haafstand}% - \hangindent\nextboxwd - \hangafter\plusone - \flushnextbox\ignorespaces} - \hbox} - -\def\stophanging - {\endgraf - \egroup} - \def\definepushbutton % name optional setup {\dodoubleempty\dodefinepushbutton} @@ -777,9 +1467,9 @@ \nextsystemfield \setupfield [pushbutton] - [\c!kader=\v!overlay, + [\c!frame=\v!overlay, \c!offset=\v!overlay, - \c!klikuit=#3,#2]% + \c!clickout=#3,#2]% \definefield [\currentsystemfield] [push] @@ -813,7 +1503,7 @@ \def\tabulaterule % to be redone, not correct {\dotabulaterule {\hrule\!!height.5\scratchdimen\!!depth.5\scratchdimen\relax - \doifvalue{\??tt\currenttabulate\c!afstand}\v!grid + \doifvalue{\??tt\currenttabulate\c!distance}\v!grid {\kern-\scratchdimen}}} % experimental tm-prikkels % todo: \setupinterlinespace[\c!regel=\v!vast] => ==\the\baselineskip @@ -849,8 +1539,8 @@ \vskip-\lineheight \nointerlineskip % top of text - \scratchdimen\MPy{\v!tekst:\MPp\gridsynctag}% - \advance\scratchdimen\MPh{\v!tekst:\MPp\gridsynctag}% + \scratchdimen\MPy{\v!text:\MPp\gridsynctag}% + \advance\scratchdimen\MPh{\v!text:\MPp\gridsynctag}% % move to first baseline \advance\scratchdimen-\topskip % subtract wrong baseline @@ -886,15 +1576,15 @@ \processaction [#2] [% first test true, rest depends - \v!volgende=>\setgvalue{\??ie#1}{\setgvalue{\??ie#1}{#3}\firstoftwoarguments}, + \v!next=>\setgvalue{\??ie#1}{\setgvalue{\??ie#1}{#3}\firstoftwoarguments}, % rest true if first true - % \v!eerste=>\setgvalue{\??ie#1}{#3{\letgvalue{\??ie#1}% + % \v!first=>\setgvalue{\??ie#1}{#3{\letgvalue{\??ie#1}% % \firstoftwoarguments\firstoftwoarguments}% % \secondoftwoarguments}, % always true - \v!ja=>\letgvalue{\??ie#1}\firstoftwoarguments, + \v!yes=>\letgvalue{\??ie#1}\firstoftwoarguments, % always false - \v!nee=>\letgvalue{\??ie#1}\secondoftwoarguments]% + \v!no=>\letgvalue{\??ie#1}\secondoftwoarguments]% \fi} \def\doperformtest#1% @@ -951,10 +1641,10 @@ {\csname#1\endcsname}} \def\@@sectiekoppeling#1% - {\expandifnonempty{\??ko#1\c!koppeling}{#1}} + {\expandifnonempty{\??ko#1\c!coupling}{#1}} \def\@@sectiesectie#1% - {\expandifnonempty{\??ko#1\c!sectie}{\@@sectiekoppeling{#1}}} + {\expandifnonempty{\??ko#1\c!section}{\@@sectiekoppeling{#1}}} \def\sectioncountervalue#1% {\@@sectionvalue{\@@sectiesectie{#1}}} @@ -976,8 +1666,8 @@ \strut\penalty-9999 % \break fails on case (3) \fi} -\def\startdisplay{\displaybreak\ignorespaces\startopelkaar} -\def\stopdisplay {\stopopelkaar\displaybreak\ignorespaces} +\def\startdisplay{\displaybreak\ignorespaces\startpacked} +\def\stopdisplay {\stoppacked\displaybreak\ignorespaces} \def\tightvbox {\dowithnextbox{\nextboxdp\zeropoint\flushnextbox}\vbox} @@ -989,7 +1679,8 @@ % % actually we should nil all writes, marks, specials -\appendtoks \globallet\popcolor\relax \to \everylastshipout +\appendtoks \globallet\popproperties \relax \to \everylastshipout +\appendtoks \globallet\popsplitproperties\relax \to \everylastshipout \def\incrementvalue#1{\expandafter\increment\csname#1\endcsname} \def\decrementvalue#1{\expandafter\decrement\csname#1\endcsname} @@ -1074,7 +1765,7 @@ \def\dostartgridcorrection[#1]% {\ifgridsnapping - \iffirstargument\doifsomething{#1}{\verplaatsopgrid[#1]}\fi + \iffirstargument\doifsomething{#1}{\moveongrid[#1]}\fi \snaptogrid\vbox\bgroup \else \startbaselinecorrection @@ -1098,10 +1789,10 @@ \noindent\bgroup \setlocalhsize \hbox to \localhsize\bgroup - \doifnot{#1}\v!links\hss + \doifnot{#1}\v!left\hss \def\stopplaatsen {\unskip\unskip\unskip - \doifnot{#1}\v!rechts\hss + \doifnot{#1}\v!right\hss \egroup \egroup \endgraf}% @@ -1127,7 +1818,7 @@ \def\dosetrastercolor#1% {\edef\@@cl@@s{#1}% \ifx\@@cl@@s\empty - \let\@@cl@@s\@@rsraster + \let\@@cl@@s\@@rsscreen \fi \setevalue{\??cr\??rs}{\colorSpattern}} @@ -1164,7 +1855,7 @@ \def\startcolumnmakeup % don't change {\bgroup - \getrawnoflines\teksthoogte % teksthoogte kan topskip hebben, dus raw + \getrawnoflines\textheight % teksthoogte kan topskip hebben, dus raw \scratchdimen\noflines\lineheight \advance\scratchdimen-\lineheight \advance\scratchdimen\topskip @@ -1175,7 +1866,7 @@ \def\stopcolumnmakeup {\egroup \dp\scratchbox\zeropoint - \wd\scratchbox\tekstbreedte + \wd\scratchbox\textwidth \box\scratchbox \egroup \synchronizehsize} @@ -1192,70 +1883,6 @@ \let\figuredescription\empty -% beware, changing this will break some code (like pos/backgrounds) - -\newtoks\everyfirstparagraphintro -\newtoks\everynextparagraphintro - -\chardef\everyparagraphintro\zerocount - -\def\setupparagraphintro - {\dodoubleempty\dosetupparagraphintro} - -\def\dosetupparagraphintro[#1][#2]% - {\processallactionsinset - [#1] - [ \v!reset=>\global\chardef\everyparagraphintro\zerocount - \global\everyfirstparagraphintro\emptytoks - \global\everynextparagraphintro \emptytoks, - \v!eerste=>\global\chardef\everyparagraphintro\plusone - \doglobal\appendtoks#2\to\everyfirstparagraphintro, - \v!volgende=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plusone\fi - \doglobal\appendtoks#2\to\everynextparagraphintro, - \v!elk=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plustwo\fi - \doglobal\appendtoks#2\to\everyfirstparagraphintro - \doglobal\appendtoks#2\to\everynextparagraphintro]} - -\def\doinsertparagraphintro - {\ifcase\everyparagraphintro\relax - % no data - \or - % first data - \global\chardef\everyparagraphintro\plustwo - \scratchtoks\everyfirstparagraphintro - \global\everyfirstparagraphintro\emptytoks - \or - % next data - \scratchtoks\everynextparagraphintro - \fi - \the\scratchtoks} - -\def\insertparagraphintro - {\ifcase\everyparagraphintro\else\@EA\doinsertparagraphintro\fi} - -\appendtoks\insertparagraphintro\to\everypar - -%D \starttypen -%D \setupparagraphintro[first][\hbox to 3.5em{\tt FIRST \hss}] -%D \setupparagraphintro[first][\hbox to 3.5em{\tt TSRIF \hss}] -%D \setupparagraphintro[next] [\hbox to 3.5em{\tt NEXT \hss}] -%D \setupparagraphintro[next] [\hbox to 3.5em{\tt TXEN \hss}] -%D \setupparagraphintro[each] [\hbox to 3.0em{\tt EACH \hss}] -%D \setupparagraphintro[each] [\hbox to 3.0em{\tt HCEA \hss}] -%D -%D some paragraph \par -%D some paragraph \par -%D some paragraph \par -%D -%D \definelabel[parnumber] -%D -%D \setupparagraphintro[reset,each][\inleft{\slxx\parnumber}] -%D -%D some paragraph \par -%D some paragraph \par -%D some paragraph \par -%D \stoptypen - % wrong names \newif\ifpagechanged \let\lastchangedpage\empty @@ -1283,7 +1910,7 @@ \def\startfixed{\dosingleempty\dostartfixed} -\long\def\dostartfixed[#1]% +\def\dostartfixed[#1]% {\expanded{\dowithnextbox{\noexpand\dodofixed{\ifhmode0\else1\fi}{#1}}}% \vbox\bgroup \setlocalhsize} @@ -1295,15 +1922,15 @@ {\ifcase#1\relax \processaction [#2] - [ \v!hoog=>\bbox {\flushnextbox}, - \v!laag=>\tbox {\flushnextbox}, - \v!midden=>\vcenter{\flushnextbox}, - \v!laho=>\vcenter{\flushnextbox}, + [ \v!high=>\bbox {\flushnextbox}, + \v!low=>\tbox {\flushnextbox}, + \v!middle=>\vcenter{\flushnextbox}, + \v!lohi=>\vcenter{\flushnextbox}, \s!unknown=>\tbox {\flushnextbox}, \s!default=>\tbox {\flushnextbox}]% \else \startbaselinecorrection - \noindent\flushnextbox + \noindent\flushnextbox \stopbaselinecorrection \fi} @@ -1337,31 +1964,6 @@ % % \stopitemize -% \def\docalculatefigurenorm#1#2% -% {\dodocalculatefigurenorm{#1}[#2\empty\empty]} -% -% \def\dodocalculatefigurenorm#1[#2#3#4]#5#6#7% -% {\ExpandFirstAfter\processaction -% [#2#3#4] -% [ \v!max=>\global#1=#6\relax, -% \v!kolom=>\global#1=#6\relax, -% \v!tekst=>\global#1=#6\relax, -% \v!passend=>\global#1=#7\relax, -% \v!ruim=>\global#1=#7\relax -% \global\advance #1 -4\@@exkorps\relax, -% #2*\v!kolom=>\global#1=#6\relax -% \ifbinnenkolommen -% \global\advance#1 \intercolumnwidth -% \global\multiply#1 #2\relax -% \global\advance#1 -\intercolumnwidth -% \fi, -% #2*\v!tekst=>\global#1=\zetbreedte -% \global\advance#1 \papierbreedte, -% \s!default=>\doifsomething{#5}{\global#1=#5\relax}, -% \s!unknown=>\global#1=\@@exkorps\relax -% \global\divide#1 \!!ten\relax -% \global\multiply#1 #2#3#4\relax]} - % still needed for uguide \let\placefloatlabel \placefloatcaption @@ -1459,7 +2061,7 @@ \setupcolumnspan [\c!n=2, \c!offset=\v!overlay, - \c!kader=\v!uit] + \c!frame=\v!off] \newbox\columnspanbox \let\postprocesscolumnspanbox\gobbleoneargument @@ -1467,14 +2069,14 @@ {\bgroup \setupcolumnspan[#1]% \forgetall - \ifbinnenkolommen + \ifinsidecolumns \advance\hsize \intercolumnwidth \hsize\@@ksn\hsize \advance\hsize -\intercolumnwidth \fi \dowithnextbox {\setbox\columnspanbox\flushnextbox - \ifbinnenkolommen\wd\columnspanbox\hsize\fi + \ifinsidecolumns\wd\columnspanbox\hsize\fi \postprocesscolumnspanbox\columnspanbox \scratchdimen\ht\columnspanbox \setbox\columnspanbox\hbox % depth to be checked, probably option! @@ -1482,7 +2084,7 @@ \ht\columnspanbox\scratchdimen \dp\columnspanbox\strutdp \wd\columnspanbox\hsize - \ifbinnenkolommen + \ifinsidecolumns \ifnum\@@ksn>1 \setvsize \dohandleallcolumns @@ -1526,18 +2128,21 @@ %D Far from complete. \def\startgeheel - {\startregelcorrectie + {\startlinecorrection \insidefloattrue} \def\stopgeheel - {\stopregelcorrectie} + {\stoplinecorrection} %D No more news. \protect -%D A few local optimizations and new features, if defined: +%D Next we load a few local optimizations and new features. They +%D live on on my machine and are not distributed, but they may end +%D up in the distributed files. -\readfile {cont-loc} {} {} +\readfile {cont-loc} {} {} % local improvements, patches, new features +\readfile {cont-exp} {} {} % experimental features (e.g. local speed-ups) -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/cont-nl.tex b/tex/context/base/cont-nl.tex index 259ce0b1b..d29711997 100644 --- a/tex/context/base/cont-nl.tex +++ b/tex/context/base/cont-nl.tex @@ -21,13 +21,13 @@ \loaduserspecifications -\installlanguage [\s!en] [\c!status=\v!start] -\installlanguage [\s!uk] [\c!status=\v!start] -\installlanguage [\s!de] [\c!status=\v!start] -\installlanguage [\s!fr] [\c!status=\v!start] -\installlanguage [\s!es] [\c!status=\v!start] -\installlanguage [\s!nl] [\c!status=\v!start] -\installlanguage [\s!it] [\c!status=\v!start] +\installlanguage [\s!en] [\c!state=\v!start] +\installlanguage [\s!uk] [\c!state=\v!start] +\installlanguage [\s!de] [\c!state=\v!start] +\installlanguage [\s!fr] [\c!state=\v!start] +\installlanguage [\s!es] [\c!state=\v!start] +\installlanguage [\s!nl] [\c!state=\v!start] +\installlanguage [\s!it] [\c!state=\v!start] \setupbodyfont [cmr,ams,rm,12pt] diff --git a/tex/context/base/cont-old.tex b/tex/context/base/cont-old.tex index 4e364fbff..2e2825131 100644 --- a/tex/context/base/cont-old.tex +++ b/tex/context/base/cont-old.tex @@ -8,17 +8,15 @@ %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 Old Macros} \unprotect \def\dosubstitutecommand#1#2% - {\writestatus - {pas op} - {\string#1\normalspace is nu \string#2}% + {\writestatus\m!systems{\string#1\normalspace -> \string#2}% \gdef#1{#2}% #2} @@ -34,16 +32,16 @@ %substitutecommand \stelmargesin \stellayoutin %substitutecommand \steloffsetin \stellayoutin - %def \randbreedte {\rechterrandbreedte} + %def \edgewidth {\rightedgewidth} %substitutecommand \steldoordefinitiein \steldoordefinierenin %substitutecommand \steldoornummerin \steldoornummerenin %substitutecommand \steldoorsprongin \steldoorspringenin -\substitutecommand \volgendehoofdstuk {\stelkopnummerin[hoofdstuk][+1]} -\substitutecommand \volgendeparagraaf {\stelkopnummerin[paragraaf][+1]} -\substitutecommand \volgendesubparagraaf {\stelkopnummerin[subparagraaf][+1]} -\substitutecommand \volgendesubsubparagraaf {\stelkopnummerin[subsubparagraaf][+1]} +\substitutecommand \volgendehoofdstuk {\setupheadnumber[hoofdstuk][+1]} +\substitutecommand \volgendeparagraaf {\setupheadnumber[paragraaf][+1]} +\substitutecommand \volgendesubparagraaf {\setupheadnumber[subparagraaf][+1]} +\substitutecommand \volgendesubsubparagraaf {\setupheadnumber[subsubparagraaf][+1]} \substitutecommand \volledigeinhoudsopgave \volledigeinhoud \substitutecommand \plaatsinhoudsopgave \plaatsinhoud @@ -52,9 +50,9 @@ \substitutecommand \streep \onderstreep \substitutecommand \strepen \onderstrepen -\substitutecommand \pragmakenmerk \kenmerk +\substitutecommand \pragmakenmerk \referral -\substitutecommand \definieersynoniem \definieersynoniemen +\substitutecommand \definieersynoniem \definesynonyms %substitutecommand \stelvoetnootin \stelvoetnotenin @@ -62,9 +60,9 @@ %substitutecommand \diepevoetnoot \voetnoot -% english: +% english: -%substitutecommand \setupformulas \setupformulae +%substitutecommand \setupformulas \setupformulae %substitutecommand \useexternalfigures \setupexternalfigures @@ -85,6 +83,4 @@ \substitutecommand \showencoding {\showaccents\showcharacters} -\protect - -\endinput +\protect \endinput diff --git a/tex/context/base/cont-ro.tex b/tex/context/base/cont-ro.tex index 48f8c6164..c25bc6f35 100644 --- a/tex/context/base/cont-ro.tex +++ b/tex/context/base/cont-ro.tex @@ -21,9 +21,9 @@ \loaduserspecifications -\installlanguage [\s!en] [\c!status=\v!start] -\installlanguage [\s!de] [\c!status=\v!start] -\installlanguage [\s!ro] [\c!status=\v!start] +\installlanguage [\s!en] [\c!state=\v!start] +\installlanguage [\s!de] [\c!state=\v!start] +\installlanguage [\s!ro] [\c!state=\v!start] \setupbodyfont [cmr,ams,rm,12pt] diff --git a/tex/context/base/cont-uk.tex b/tex/context/base/cont-uk.tex index dbfb0263a..185f5c993 100644 --- a/tex/context/base/cont-uk.tex +++ b/tex/context/base/cont-uk.tex @@ -21,13 +21,13 @@ \loaduserspecifications -\installlanguage [\s!en] [\c!status=\v!start] -\installlanguage [\s!uk] [\c!status=\v!start] -\installlanguage [\s!de] [\c!status=\v!start] -\installlanguage [\s!fr] [\c!status=\v!start] -\installlanguage [\s!es] [\c!status=\v!start] -\installlanguage [\s!nl] [\c!status=\v!start] -\installlanguage [\s!it] [\c!status=\v!start] +\installlanguage [\s!en] [\c!state=\v!start] +\installlanguage [\s!uk] [\c!state=\v!start] +\installlanguage [\s!de] [\c!state=\v!start] +\installlanguage [\s!fr] [\c!state=\v!start] +\installlanguage [\s!es] [\c!state=\v!start] +\installlanguage [\s!nl] [\c!state=\v!start] +\installlanguage [\s!it] [\c!state=\v!start] \setupbodyfont [cmr,ams,rm,12pt] diff --git a/tex/context/base/cont-usr.ori b/tex/context/base/cont-usr.ori index 22b8a63f5..50556c463 100644 --- a/tex/context/base/cont-usr.ori +++ b/tex/context/base/cont-usr.ori @@ -26,11 +26,9 @@ %D Thomas Esser's \TETEX\ distribution.) This list will be %D adapted to the actual situation. -%definefilesynonym [lang-cz.pat] [czhyph.tex] % is bound to latex (tl 8+) -\definefilesynonym [lang-cz.pat] [czhyphen.tex] +\definefilesynonym [lang-ca.pat] [cahyph.tex] \definefilesynonym [lang-da.pat] [dkhyph.tex] \definefilesynonym [lang-de.pat] [dehyphn.tex] -\definefilesynonym [lang-en.pat] [ushyph1.tex] \definefilesynonym [lang-es.pat] [eshyph.tex] \definefilesynonym [lang-fi.pat] [fihyph.tex] \definefilesynonym [lang-fr.pat] [frhyph.tex] @@ -38,19 +36,30 @@ \definefilesynonym [lang-hu.pat] [huhyph.tex] \definefilesynonym [lang-it.pat] [ithyph.tex] \definefilesynonym [lang-la.pat] [lahyph7.tex] -\definefilesynonym [lang-nl.pat] [nehyph.tex] \definefilesynonym [lang-no.pat] [nohyph.tex] \definefilesynonym [lang-pl.pat] [plhyph.tex] \definefilesynonym [lang-pt.pat] [pthyph.tex] \definefilesynonym [lang-ro.pat] [rohyph.tex] -\definefilesynonym [lang-ru.pat] [ruenhyph.tex] -%definefilesynonym [lang-sk.pat] [skhyph.tex] % is bound to latex (tl 8+) -\definefilesynonym [lang-sk.pat] [skhyphen.tex] -\definefilesynonym [lang-sv.pat] [sehyph.tex] -\definefilesynonym [lang-tr.pat] [trhyph.tex] -\definefilesynonym [lang-ua.pat] [ukrenhyp.tex] -\definefilesynonym [lang-uk.pat] [ukhyphen.tex] -\definefilesynonym [lang-us.pat] [ushyph1.tex] +\definefilesynonym [lang-ru.pat] [ruenhyph.tex] % sic: ruen +\definefilesynonym [lang-sl.pat] [sihyph.tex] % sic: sl/si +\definefilesynonym [lang-sv.pat] [svhyph.tex] % was [sehyph.tex] +\definefilesynonym [lang-tr.pat] [tkhyph.tex] % was [trhyph.tex] +\definefilesynonym [lang-ua.pat] [ukrenhyp.tex] % sic ukren +\definefilesynonym [lang-uk.pat] [ukhyph.tex] + +\definefilesynonym [lang-nl.pat] [nlhyphen.tex] % symbolic name, see below +\definefilesynonym [lang-af.pat] [nlhyphen.tex] % symbolic name, see below + +\definefilesynonym [lang-en.pat] [ushyphen.tex] % symbolic name, see below +\definefilesynonym [lang-us.pat] [ushyphen.tex] % symbolic name, see below + +\definefilesynonym [lang-cz.pat] [czhyphen.tex] % in a different part of the tree, sigh +\definefilesynonym [lang-sk.pat] [skhyphen.tex] % in a different part of the tree, sigh + +%definefilesynonym [lang-cz.hyp] [czhyphen.ex] % in a different part of the tree, sigh +%definefilesynonym [lang-sk.hyp] [skhyphen.ex] % in a different part of the tree, sigh + +\definefilesynonym [lang-deo.pat] [dehypht.tex] % old german patterns %D When the dutch spelling changed, new patterns were %D constructed. For long these were named \type {dutch96.pat}. @@ -60,63 +69,78 @@ %D files as well as their coding is one of the dark areas of %D \TEX\ distributions. -\doiffileelse{nehyph96.tex} - {\definefilesynonym[lang-nl.pat][nehyph96.tex]} - {\doiffileelse{dutch96.pat} - {\definefilesynonym[lang-nl.pat][dutch96.pat]} - {\definefilesynonym[lang-nl.pat][nehyph.tex]}} + \doiffileelse{nehyph96.tex} {\definefilesynonym[nlhyphen.tex][nehyph96.tex]} +{\doiffileelse{dutch96.pat} {\definefilesynonym[nlhyphen.tex][dutch96.pat]} + {\definefilesynonym[nlhyphen.tex][nehyph.tex]}} -%D Pattern files are (can be) encoded! And, alas, not all -%D pattern files are self contained, which is why (for the -%D moment) we specify encodings here. +%D Ah, something changed in 2003 with respect to ushyph.tex, so let's +%D fall back when needed. I first noticed this during a workshop at the +%D practical tex conference 2004 in sf. Yet another proof of a mess in +%D filenames. So, we now use \type {ushyphen} as name and do some +%D searching. + + \doiffileelse{ushyph.tex} {\definefilesynonym[ushyphen.tex][ushyph.tex]} +{\doiffileelse{ushyph1.tex} {\definefilesynonym[ushyphen.tex][ushyph1.tex]} +{\doiffileelse{ushyph2.tex} {\definefilesynonym[ushyphen.tex][ushyph2.tex]} + {\definefilesynonym[ushyphen.tex][ukhyph.tex]}}} + +%D In order to get 8 bit characters hyphenated, we need to load +%D patterns under the right circumstances. In some countries, more +%D than one font encoding is in use. I can add more defaults here +%D if users let me know what encoding they use. + +\installlanguage [\s!nl] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] +\installlanguage [\s!fr] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] +\installlanguage [\s!de] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] +\installlanguage [\s!it] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] -\installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}] \installlanguage [\s!hr] [\s!mapping={il2,ec},\s!encoding={il2,ec}] -%installlanguage [\s!pl] [\s!mapping=pl0,\s!encoding=pl0] \installlanguage [\s!pl] [\s!mapping={pl0,ec},\s!encoding={pl0,ec}] +\installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}] \installlanguage [\s!sk] [\s!mapping={il2,ec},\s!encoding={il2,ec}] - -%D Sometimes these are not wanted: - -%\definefilesynonym [lang-deo.pat] [dehypht.tex] % old patterns -%\definefilesynonym [lang-nlx.pat] [dutch96.pat] % new patterns +\installlanguage [\s!sl] [\s!mapping={il2,ec},\s!encoding={il2,ec}] %D Additional languages can be defined here. Beware of %D encoding incompatibilities. Please take a look at the %D \type {cont-en.tex}, \type {cont-nl.tex}, enz.\ files -%D first. Normally you don't have to change a byte. - -% \installlanguage [\s!af] [\c!status=\v!start] % afrikaans -% \installlanguage [\s!cz] [\c!status=\v!start] % czech -% \installlanguage [\s!da] [\c!status=\v!start] % danish -% \installlanguage [\s!de] [\c!status=\v!start] % german -% \installlanguage [\s!en] [\c!status=\v!start] % english us -% \installlanguage [\s!es] [\c!status=\v!start] % spanish -% \installlanguage [\s!fi] [\c!status=\v!start] % finnish -% \installlanguage [\s!fr] [\c!status=\v!start] % french -% \installlanguage [\s!hr] [\c!status=\v!start] % croatian -% \installlanguage [\s!hu] [\c!status=\v!start] % hungarian -% \installlanguage [\s!it] [\c!status=\v!start] % italian -% \installlanguage [\s!la] [\c!status=\v!start] % latin -% \installlanguage [\s!nl] [\c!status=\v!start] % dutch -% \installlanguage [\s!no] [\c!status=\v!start] % norwegian -% \installlanguage [\s!pl] [\c!status=\v!start] % polish -% \installlanguage [\s!pt] [\c!status=\v!start] % portuguese -% \installlanguage [\s!ro] [\c!status=\v!start] % romanian -% \installlanguage [\s!ru] [\c!status=\v!start] % russian -% \installlanguage [\s!sk] [\c!status=\v!start] % slovak -% \installlanguage [\s!sv] [\c!status=\v!start] % swedish -% \installlanguage [\s!tr] [\c!status=\v!start] % turkish -% \installlanguage [\s!ua] [\c!status=\v!start] % ukrainian -% \installlanguage [\s!uk] [\c!status=\v!start] % english uk - -% \installlanguage [deo] [\c!status=\v!start] % old german -% \installlanguage [nlx] [\c!status=\v!start] % dutch 8 bit +%D first. Normally you don't have to change a byte. If you +%D want to play safe, use \typ {texexec --make --alone +%D --all}. + +% \installlanguage [\s!af] [\c!state=\v!start] % afrikaans +% \installlanguage [\s!ca] [\c!state=\v!start] % catalan +% \installlanguage [\s!cz] [\c!state=\v!start] % czech +% \installlanguage [\s!da] [\c!state=\v!start] % danish +% \installlanguage [\s!de] [\c!state=\v!start] % german +% \installlanguage [\s!en] [\c!state=\v!start] % english us +% \installlanguage [\s!es] [\c!state=\v!start] % spanish +% \installlanguage [\s!fi] [\c!state=\v!start] % finnish +% \installlanguage [\s!fr] [\c!state=\v!start] % french +% \installlanguage [\s!hr] [\c!state=\v!start] % croatian +% \installlanguage [\s!hu] [\c!state=\v!start] % hungarian +% \installlanguage [\s!it] [\c!state=\v!start] % italian +% \installlanguage [\s!la] [\c!state=\v!start] % latin +% \installlanguage [\s!nl] [\c!state=\v!start] % dutch +% \installlanguage [\s!no] [\c!state=\v!start] % norwegian +% \installlanguage [\s!pl] [\c!state=\v!start] % polish +% \installlanguage [\s!pt] [\c!state=\v!start] % portuguese +% \installlanguage [\s!ro] [\c!state=\v!start] % romanian +% \installlanguage [\s!ru] [\c!state=\v!start] % russian +% \installlanguage [\s!sk] [\c!state=\v!start] % slovak +% \installlanguage [\s!sl] [\c!state=\v!start] % slovenian +% \installlanguage [\s!sv] [\c!state=\v!start] % swedish +% \installlanguage [\s!tr] [\c!state=\v!start] % turkish +% \installlanguage [\s!ua] [\c!state=\v!start] % ukrainian +% \installlanguage [\s!uk] [\c!state=\v!start] % english uk +% \installlanguage [\s!vn] [\c!state=\v!start] % vietnamese + +% \installlanguage [deo] [\c!state=\v!start] % old german %D The next lines can be used for setting the language to be %D used at startup time. % \setupcurrentlanguage[\s!af] +% \setupcurrentlanguage[\s!ca] % \setupcurrentlanguage[\s!cz] % \setupcurrentlanguage[\s!da] % \setupcurrentlanguage[\s!de] @@ -135,6 +159,7 @@ % \setupcurrentlanguage[\s!ro] % \setupcurrentlanguage[\s!ru] % \setupcurrentlanguage[\s!sk] +% \setupcurrentlanguage[\s!sl] % \setupcurrentlanguage[\s!sv] % \setupcurrentlanguage[\s!tr] % \setupcurrentlanguage[\s!ua] diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 13f4d6643..81ba6572e 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -12,36 +12,81 @@ %C details. % dec 07 2001 : cont-en.efmt : 4,035,912 +% aug 07 2004 : cont-en.efmt : 4,928,967 (5 more patterns) + +% todo 1: each module english commands +% todo 2: replace lowlevel *!* by english variants +% todo 3: make files more independent +% todo 4: cleanup specials + adapt interface +% todo 5: remove/replace old stuff (by new stuff, like couplepaper) +% todo 6: create even more hooks (so that users can overload) +% todo 7: conditionals +% todo 8: redesign tui/tuo \catcode`\{=1 \catcode`\}=2 -\def\contextversion{2004.4.9} +%D From the next string (which is set by the script that assembles the +%D distribution) later on we will calculate a number that can be used +%D by use modules to identify the feature level. Starting with version +%D 2004.8.30 the low level interface is english. Watch out and adapt +%D your styles an modules. + +\def\contextversion{2004.06.10} %D Welcome to the main module. When this module is ran through -%D \type{initex} or \type{tex -i} or \type{whatevertex} using +%D \type{initex} or \type {tex -i} or \type {whatevertex} using %D \type{whatever switch}, the \CONTEXT\ format file is %D generated. During this process the user is asked for an %D interface language. Supplying \type{dutch} will generate a -%D dutch version of \CONTEXT, supplying \type{english} will of +%D dutch version of \CONTEXT, supplying \type {english} will of %D course end op in a english version. %D +%D Another option is to use \TEXEXEC: +%D +%D \starttyping +%D texexec --make [--alone] [--engine] [--all] +%D texexec --make [--alone] [--engine] en nl ... metafun mptopdf +%D \stoptyping +%D +%D More information can be found in the \TEXEXEC\ manual. + +%D When you write modules (or extensions) you should avoid +%D conflicts with existing macro names and mechanisms. If you are +%D coming from another macro package, don't assume that macros +%D with the same name are doing the same! \CONTEXT\ was written +%D from scratch and therefore similarities are often a coincidence +%D (to some extent one always ends up with the same names for +%D similar concepts). The underlying models for elementary subsystems +%D that deal with encodings, languages and fonts probably differ. +%D +%D Time has learned that users coming from \LATEX\ should not fall +%D into thinking that macros like \type {\protect} represent the +%D same functionality in both systems; actually, due to the way +%D \CONTEXT\ is set up, some of those macros do complete different +%D things. Macro packages evolve independent of each other, which +%D means that code written for one system will not work in another +%D system, unless it's real generic code. +%D +%D An API will become available soon (keep an eye on the ConTeXt +%D Wiki www.contextgarden.org) and or listen in to the context +%D mailing list (ntg-context@ntg.nl). Much additional information +%D can be found at the PRAGMA website (www.pragma-ade.com). + %D First we load the system modules. These implement a lot of %D manipulation macros. The first one loads \PLAIN\ \TEX, as %D minimal as possible. -%input syst-tex.tex - -\input syst-pln.tex % stripped plain -\input syst-prm.tex % saved primitives (will be extended) +\input syst-pln.tex % english / stripped plain +\input syst-prm.tex % english / saved primitives (will be extended) -\input syst-etx.tex % etex -\input syst-omg.tex % omega -\input syst-gen.tex -\input syst-ext.tex -\input syst-new.tex -\input syst-con.tex +\input syst-etx.tex % english / etex +\input syst-omg.tex % english / omega-aleph +\input syst-gen.tex % english +\input syst-ext.tex % english +\input syst-new.tex % english +\input syst-con.tex % english -\input math-pln.tex % basic plain math +\input math-pln.tex % english / basic plain math %D To enable selective loading, we say: @@ -50,50 +95,50 @@ %D In order to conveniently load files, we need a few %D support modules. -\input supp-ini.tex -\input supp-fil.tex +\input supp-ini.tex % english +\input supp-fil.tex % english %D After this we're ready for the multi||lingual interface %D modules. -\input mult-ini.tex -\input mult-sys.tex -\input mult-con.tex -\input mult-com.tex +\input mult-ini.tex % english +\input mult-sys.tex % english +\input mult-con.tex % english +\input mult-com.tex % english %D We also use some third party macros. These are loaded by %D saying: -\input thrd-ran.tex % based on: David Carlisle -\input thrd-trg.tex % based on: Donald Arseneau +\input thrd-ran.tex % english / based on: Donald Arseneau +\input thrd-trg.tex % english / based on: David Carlisle %D Now we're ready for some general support modules. These %D modules implement some basic typesetting functionality. -\input supp-box.tex -\input supp-mrk.tex -\input supp-vis.tex -\input supp-fun.tex -\input supp-eps.tex -\input supp-pdf.tex -\input supp-spe.tex -\input supp-mps.tex -\input supp-mpe.tex -\input supp-tpi.tex -\input supp-mat.tex -\input supp-ran.tex -\input supp-ali.tex +\input supp-box.tex % english +\input supp-mrk.tex % english +\input supp-vis.tex % english +\input supp-fun.tex % english +\input supp-eps.tex % english +\input supp-pdf.tex % english +\input supp-spe.tex % english +\input supp-mps.tex % english +\input supp-mpe.tex % english +\input supp-tpi.tex % english +\input supp-mat.tex % english +\input supp-ran.tex % english +\input supp-ali.tex % english %D The next module deals with language specific typographic %D extensions. -\input typo-ini.tex +\input typo-ini.tex % english / I must not forget about this module %D Verbatim typesetting is implemented in a separate class of %D modules. The pretty typesetting modules are loaded at run %D time. -\input verb-ini.tex % replaces supp-ver +\input verb-ini.tex % english / replaces supp-ver %D The following modules are not sequentially dependent, %D i.e. they have ugly dependencies, which will be cleaned @@ -103,68 +148,70 @@ %D bit more advanced file handling as well as some general %D variables, and features, so next we load: -\input core-var.tex -\input core-ins.tex -\input core-fil.tex -\input core-con.tex +\input core-var.tex % english +\input core-ins.tex % english +\input core-fil.tex % english +\input core-con.tex % english %D We already need some synonyms (patterns). At runtime this %D file will be reloaded. -\input cont-fil.tex +\input cont-fil.tex % english %D \CONTEXT\ does not implement its own table handling. We %D just go for the best there is and load \TABLE. Just to be %D sure we do it here, before we redefine \type{|}. -\input thrd-tab.tex % based on: Michael Wichura +\input thrd-tab.tex % english / based on: Michael Wichura / will be reimplemented %D Here comes the last support modules. They take care of %D some language specific things. -\input supp-lan.tex -\input supp-num.tex +\input supp-lan.tex % english +\input supp-num.tex % english %D The next few modules do what their names state. They %D load additional definition modules when needed. -\input enco-ini.tex -\input filt-ini.tex -\input hand-ini.tex -\input regi-ini.tex -\input lang-ini.tex -\input unic-ini.tex +\input enco-ini.tex % english +\input filt-ini.tex % english +\input hand-ini.tex % english +\input regi-ini.tex % english +\input lang-ini.tex % english +\input unic-ini.tex % english -\input colo-ini.tex -%input colo-sep.tex +\input colo-ini.tex % english +\input colo-ext.tex % english -\input spec-mis.tex -\input spec-ini.tex -\input spec-def.tex +\input spec-mis.tex % english +\input spec-ini.tex % english +\input spec-def.tex % english +\input spec-var.tex % english %D For the moment we load a lot of languages. In the future %D we'll have to be more space conservative. -\input lang-spe.tex -\input lang-lab.tex +\input lang-spe.tex % english +\input lang-lab.tex % english -\input lang-alt.tex -\input lang-ana.tex -\input lang-art.tex -\input lang-bal.tex -\input lang-cel.tex -\input lang-ger.tex -\input lang-grk.tex -\input lang-ind.tex -\input lang-ita.tex -\input lang-sla.tex -\input lang-ura.tex +\input lang-ger.tex % english +\input lang-ita.tex % english +\input lang-sla.tex % english -\input lang-vn.tex % vietnamese, will be grouped +\input lang-alt.tex % english +\input lang-ana.tex % english +\input lang-art.tex % english +\input lang-bal.tex % english +\input lang-cel.tex % english +\input lang-grk.tex % english +\input lang-ind.tex % english +\input lang-ura.tex % english + +\input lang-vn.tex % english / vietnamese, maybe this belongs in lang-ita %D All kind of symbols are handled in: -\input symb-ini.tex +\input symb-ini.tex % english %D Next we load some core macro's. These implement the %D macros' that are seen by the users. The order of loading @@ -180,26 +227,23 @@ \input core-ver.tex \input core-vis.tex %input core-con.tex -\input core-rul.tex +\input core-rul.tex % english \input core-tab.tex \input core-nav.tex \input core-ref.tex -\input core-obj.tex +\input core-obj.tex % english \input core-buf.tex \input core-lst.tex -\input core-num.tex +\input core-num.tex % english \input core-itm.tex \input core-des.tex -\input core-mat.tex +\input core-mat.tex % english \input core-syn.tex -%input core-mul.tex % moved \input core-spa.tex \input core-sys.tex -% experimental otr - \input page-ini.tex -\input page-not.tex +\input page-not.tex % english \input page-one.tex \input page-lay.tex \input page-log.tex @@ -208,15 +252,15 @@ \input page-flt.tex \input page-mul.tex \input page-set.tex -\input page-lyr.tex +\input page-lyr.tex % english \input page-mak.tex -\input page-num.tex +\input page-num.tex % english \input page-lin.tex -\input page-mar.tex -\input page-bck.tex -\input page-app.tex -\input page-flw.tex % flows - experimental -\input page-spr.tex % spreads - experimental +\input page-mar.tex % english +\input page-bck.tex % english +\input page-app.tex % english / unfinished +\input page-flw.tex % english / experimental: flows +\input page-spr.tex % english / experimental: spreads \input core-job.tex @@ -232,25 +276,25 @@ %D Like languages, fonts, encodings and symbols, \METAPOST\ %D support is also organized in its own class of modules. -\input meta-ini.tex -\input meta-pag.tex -\input meta-fig.tex +\input meta-ini.tex % english +\input meta-pag.tex % english +\input meta-fig.tex % english %D On which the next one depends: -\input core-pos.tex -\input core-snc.tex +\input core-pos.tex % english +\input core-snc.tex % english %D A few more languages, that have specifics using core %D functionality: -\input lang-chi.tex +\input lang-chi.tex % english %D How about fill||in fields and related stuff? -\input java-ini.tex -\input core-fld.tex -\input core-hlp.tex +\input java-ini.tex % english / needs a cleanup +\input core-fld.tex % english / needs a cleanup +\input core-hlp.tex % english / will become a m-module %D Registers can depend on fields, so we load that now. @@ -261,62 +305,64 @@ %D content. Here we also redefine \type{\it} as {\it italic} %D instead of italian. -\input font-ini.tex -\input font-uni.tex -\input font-bfm.tex +\input font-ini.tex % english +\input font-uni.tex % english +\input font-bfm.tex % english -\input type-ini.tex +\input type-ini.tex % english -\input prop-ini.tex -\input prop-lay.tex % needs core-ref.tex +\input prop-ini.tex % english +\input prop-lay.tex % english / needs core-ref.tex +\input prop-mis.tex % english -\input math-ini.tex % after enco-ini.tex +\input math-ini.tex % english / needs enco-ini.tex %D Now we're ready for more core modules. -\input core-fnt.tex -\input core-not.tex -\input core-lnt.tex +\input core-fnt.tex % english / todo: document setupinitial ! +\input core-not.tex % english +\input core-lnt.tex % english / to be documented (with idris) \input core-mis.tex -\input core-fig.tex % after page body -\input core-par.tex +\input core-fig.tex % english / after page body +\input core-par.tex % english / maybe this should become a m-module -\input core-box.tex +\input core-box.tex % english %D Language specific spacing. -\input lang-spa.tex +\input lang-spa.tex % english %D Only the basic XML parser and remapper are part of the core. %D These macrosa re loaded last since they overload and|/|or %D extend previously defined ones. -\input xtag-ini.tex -\input xtag-ext.tex -\input xtag-map.tex -\input xtag-exp.tex -\input xtag-pre.tex -\input xtag-xsd.tex -\input xtag-rng.tex -%input xtag-ent.tex +\input xtag-ini.tex % english +\input xtag-ext.tex % english +\input xtag-prs.tex % english +\input xtag-map.tex % english +\input xtag-exp.tex % english +\input xtag-pre.tex % english +\input xtag-xsd.tex % english +\input xtag-rng.tex % english +%input xtag-ent.tex % english %D How about this: -\input meta-xml.tex +\input meta-xml.tex % english / to be documented % %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 +% \input docs-ini.tex % obsolete +% \input list-ini.tex % obsolete %D \TEX\ related logo's are always typeset in a special way. %D Here they come: -\input cont-log.tex +\input cont-log.tex % english %D Defaults go here (more will be moved to this module %D later): @@ -326,12 +372,12 @@ %D At run time, a few more files are loaded, like: %D -%D \startopsomming[opelkaar] -%D \som \type{cont-sys}: local (system dependant) defaults -%D \som \type{cont-old}: substitutes for old (obsolete) macros -%D \som \type{cont-new}: new macro implementations (for testing) -%D \som \type{cont-fil}: filename and module synonyms -%D \stopopsomming +%D \startitemize[packed] +%D \item \type{cont-sys}: local (system dependant) defaults +%D \item \type{cont-old}: substitutes for old (obsolete) macros +%D \item \type{cont-new}: new macro implementations (for testing) +%D \item \type{cont-fil}: filename and module synonyms +%D \stopitemize %D Just to keep the user busy for a while, we say: @@ -443,11 +489,11 @@ \unprotect -\installlanguage [\s!en] [\c!status=\v!start] +\installlanguage [\s!en] [\c!state=\v!start] \startinterface english - \installlanguage [\s!uk] [\c!status=\v!start] + \installlanguage [\s!uk] [\c!state=\v!start] \stopinterface @@ -456,7 +502,7 @@ \startinterface german - \installlanguage [\s!de] [\c!status=\v!start] + \installlanguage [\s!de] [\c!state=\v!start] \appendtoks \language [\s!de] \to \everyjob \appendtoks \mainlanguage [\s!de] \to \everyjob @@ -465,7 +511,7 @@ \startinterface dutch - \installlanguage [\s!nl] [\c!status=\v!start] + \installlanguage [\s!nl] [\c!state=\v!start] \appendtoks \language [\s!nl] \to \everyjob \appendtoks \mainlanguage [\s!nl] \to \everyjob @@ -474,7 +520,7 @@ \startinterface czech - \installlanguage [\s!cz] [\c!status=\v!start] + \installlanguage [\s!cz] [\c!state=\v!start] \appendtoks \language [\s!cz] \to \everyjob \appendtoks \mainlanguage [\s!cz] \to \everyjob @@ -483,7 +529,7 @@ \startinterface italian - \installlanguage [\s!it] [\c!status=\v!start] + \installlanguage [\s!it] [\c!state=\v!start] \appendtoks \language [\s!it] \to \everyjob \appendtoks \mainlanguage [\s!it] \to \everyjob @@ -492,7 +538,7 @@ \startinterface romanian - \installlanguage [\s!ro] [\c!status=\v!start] + \installlanguage [\s!ro] [\c!state=\v!start] \appendtoks \language [\s!ro] \to \everyjob \appendtoks \mainlanguage [\s!ro] \to \everyjob @@ -517,4 +563,4 @@ \errorstopmode \dump -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/core-box.tex b/tex/context/base/core-box.tex index 7b2f4b624..c1bfaefc6 100644 --- a/tex/context/base/core-box.tex +++ b/tex/context/base/core-box.tex @@ -28,15 +28,15 @@ % on the content, which in itsel fis ok, but can lead to loops % due to rounding errors (happened in demo-obv) -\definelayer[\v!tekst-2][\c!positie=\v!ja,\c!breedte=\overlaywidth,\c!hoogte=\overlayheight] -\definelayer[\v!tekst-1][\c!positie=\v!ja,\c!breedte=\overlaywidth,\c!hoogte=\overlayheight] -\definelayer[\v!tekst+1][\c!positie=\v!ja,\c!breedte=\overlaywidth,\c!hoogte=\overlayheight] -\definelayer[\v!tekst+2][\c!positie=\v!ja,\c!breedte=\overlaywidth,\c!hoogte=\overlayheight] +\definelayer[\v!text-2][\c!position=\v!yes,\c!width=\overlaywidth,\c!height=\overlayheight] +\definelayer[\v!text-1][\c!position=\v!yes,\c!width=\overlaywidth,\c!height=\overlayheight] +\definelayer[\v!text+1][\c!position=\v!yes,\c!width=\overlaywidth,\c!height=\overlayheight] +\definelayer[\v!text+2][\c!position=\v!yes,\c!width=\overlaywidth,\c!height=\overlayheight] \def\internaltextoverlay#1% will become more generic and installable {\startoverlay % i.e. probably an overlay by itself - {\positionoverlay{\v!tekst#1}} % see later - {\composedlayer {\v!tekst#1}} + {\positionoverlay{\v!text#1}} % see later + {\composedlayer {\v!text#1}} \stopoverlay} %\def\internaltextoverlay#1% @@ -45,10 +45,10 @@ % todo: share info, so that tuo will be smaller -\defineoverlay[\v!tekst-2][\internaltextoverlay{-2}] -\defineoverlay[\v!tekst-1][\internaltextoverlay{-1}] -\defineoverlay[\v!tekst+1][\internaltextoverlay{+1}] -\defineoverlay[\v!tekst+2][\internaltextoverlay{+2}] +\defineoverlay[\v!text-2][\internaltextoverlay{-2}] +\defineoverlay[\v!text-1][\internaltextoverlay{-1}] +\defineoverlay[\v!text+1][\internaltextoverlay{+1}] +\defineoverlay[\v!text+2][\internaltextoverlay{+2}] % to be documented @@ -86,16 +86,16 @@ \dp\scratchbox\nextboxdp \setlayer [anchor] - [\c!breedte=\wd\scratchbox, - \c!hoogte=\ht\scratchbox, + [\c!width=\wd\scratchbox, + \c!height=\ht\scratchbox, \c!offset=\!!zeropoint, #2,#3] {\setlayer[#1]{\flushnextbox}}% \framed [#2, - \c!achtergrond=anchor, + \c!background=anchor, \c!offset=\v!overlay, - \c!kader=\v!uit, + \c!frame=\v!off, #3] {\box\scratchbox}% \egroup}% @@ -131,11 +131,11 @@ \resetcollector[#1]% \setupcollector [#1] - [\c!status=\v!start, + [\c!state=\v!start, \c!x=\!!zeropoint,\c!y=\!!zeropoint, - \c!offset=\!!zeropoint,\c!rotatie=, % geen 0 ! + \c!offset=\!!zeropoint,\c!rotation=, % geen 0 ! \c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint, - \c!plaats=rb,\c!hoek=,#2]} + \c!location=rb,\c!corner=,#2]} \def\setupcollector {\dodoubleargument\dosetupcollector} @@ -168,36 +168,36 @@ \getparameters[\??cb#1][#2]% \@@layerxsiz\wd\collectorbox \@@layerysiz\ht\collectorbox - \doifvaluesomething{\??cb#1\c!rotatie} + \doifvaluesomething{\??cb#1\c!rotation} {\setbox\nextbox\hbox {\rotate - [\c!plaats=\v!hoog, - \c!rotatie=\collectorparameter\c!rotatie] + [\c!location=\v!high, + \c!rotation=\collectorparameter\c!rotation] {\flushnextbox}}}% \advance\@@layerysiz\dp\collectorbox \@@layerxpos\collectorparameter\c!x \advance\@@layerxpos\collectorparameter\c!hoffset \@@layerypos\collectorparameter\c!y \advance\@@layerypos\collectorparameter\c!voffset - \doifelse\v!midden{\collectorparameter\c!hoek} + \doifelse\v!middle{\collectorparameter\c!corner} {\ifdim\@@layerxsiz>\zeropoint \advance\@@layerxpos.5\@@layerxsiz \fi \ifdim\@@layerysiz>\zeropoint \advance\@@layerypos.5\@@layerysiz \fi}% - {\ExpandBothAfter\doifinset\v!onder{\collectorparameter\c!hoek} + {\ExpandBothAfter\doifinset\v!bottom{\collectorparameter\c!corner} {\ifdim\@@layerysiz>\zeropoint \advance\@@layerypos-\@@layerysiz \@@layerypos-\@@layerypos \fi}% - \ExpandBothAfter\doifinset\v!rechts{\collectorparameter\c!hoek} + \ExpandBothAfter\doifinset\v!right{\collectorparameter\c!corner} {\ifdim\@@layerxsiz>\zeropoint \advance\@@layerxpos-\@@layerxsiz \@@layerxpos-\@@layerxpos \fi}}% \setbox\nextbox\hbox - {\alignedbox[\collectorparameter\c!plaats]\vbox{\flushnextbox}}% + {\alignedbox[\collectorparameter\c!location]\vbox{\flushnextbox}}% \boxmaxdepth\zeropoint % really needed, nice example \global\advance\boxhdisplacement\@@layerxpos \ifdim\boxhdisplacement<\zeropoint @@ -239,10 +239,10 @@ {\ifundefined{\@@collectorbox#1}% \writestatus{collector}{unknown collector #1}% \else - \doifnotvalue{\??cb#1\c!status}\v!stop + \doifnotvalue{\??cb#1\c!state}\v!stop {\vbox {\hbox - {\doifelsevalue{\??cb#1\c!status}\v!herhaal + {\doifelsevalue{\??cb#1\c!state}\v!repeat {\let\next\copy}{\let\next\box}% \raise\dp\csname\@@collectorbox#1\endcsname \next\csname\@@collectorbox#1\endcsname}}}% @@ -297,10 +297,10 @@ \setcollector [caption][#1] {\getparameters[\??du][#2]% - \dosetfontattribute\??du\c!letter\setupinterlinespace + \dosetfontattribute\??du\c!style\setupinterlinespace \framed % watch the special setting of kader/overlay - [\c!kader=\v!overlay,#2] - {\doattributes\??du\c!letter\c!kleur{#3}}}% + [\c!frame=\v!overlay,#2] + {\doattributes\??du\c!style\c!color{#3}}}% \composedcollector{caption}% \egroup}% \hbox} @@ -337,22 +337,22 @@ \bgroup % preserve \nextbox \setuplayer [caption] - [\c!breedte=\!!widtha,\c!hoogte=\!!heighta]% + [\c!width=\!!widtha,\c!height=\!!heighta]% \setlayer [caption] [#1] {\getparameters[\??du][#2]% - \dosetfontattribute\??du\c!letter\setupinterlinespace + \dosetfontattribute\??du\c!style\setupinterlinespace \framed - [\c!kader=\v!overlay,,#2] - {\doattributes\??du\c!letter\c!kleur{#3}}}% + [\c!frame=\v!overlay,,#2] + {\doattributes\??du\c!style\c!color{#3}}}% \egroup \framed [\c!offset=\v!overlay, - \c!kader=\v!uit, - \c!achtergrond={\v!voorgrond,caption}, - \c!breedte=\!!widtha, - \c!hoogte=\!!heighta] + \c!frame=\v!off, + \c!background={\v!foreground,caption}, + \c!width=\!!widtha, + \c!height=\!!heighta] {\flushnextbox}% \egroup}% \hbox} @@ -381,7 +381,7 @@ \def\doornamenttext[#1][#2]% {\bgroup \doifassignmentelse{#1} - {\getparameters[\s!dummy][\c!variant=\v!a,#1]% + {\getparameters[\s!dummy][\c!alternative=\v!a,#1]% \doifelse\dummyvariant\v!a {\egroup\collectedtext}% {\egroup\layeredtext }% @@ -434,12 +434,12 @@ {\dodoubleempty\getparameters[\??bg]} \setupbleeding - [\c!plaats=l, - \c!rek=\v!ja, - \c!breedte=3cm, - \c!hoogte=3cm, + [\c!location=l, + \c!stretch=\v!yes, + \c!width=3cm, + \c!height=3cm, \c!offset=2mm, - \c!pagina=\v!nee, + \c!page=\v!no, \c!voffset=\@@bgoffset, \c!hoffset=\@@bgoffset] @@ -462,7 +462,7 @@ \!!donedfalse % bottom % replace this part ! todo: default location \processaction - [\@@bgplaats] + [\@@bglocation] [ t=>\!!donectrue\let\@@bghoffset\!!zeropoint, b=>\!!donedtrue\let\@@bghoffset\!!zeropoint, l=>\!!doneatrue\let\@@bgvoffset\!!zeropoint, @@ -475,22 +475,22 @@ lt=>\!!doneatrue\!!donectrue, tr=>\!!donebtrue\!!donectrue, rt=>\!!donebtrue\!!donectrue]% - \doifelse\@@bgrek\v!ja\donetrue\donefalse - \scratchdimen\@@bgbreedte + \doifelse\@@bgstretch\v!yes\donetrue\donefalse + \scratchdimen\@@bgwidth \ifdone \if!!donea \advance\scratchdimen\MPx{\??bg:\nofbleeds}% \else\if!!doneb - \scratchdimen\papierbreedte + \scratchdimen\paperwidth \advance\scratchdimen-\MPx{\??bg:\nofbleeds}% \fi\fi \fi \advance\scratchdimen\@@bghoffset \xdef\bleedwidth{\the\scratchdimen}% - \scratchdimen\@@bghoogte + \scratchdimen\@@bgheight \ifdone \if!!donec - \scratchdimen\papierhoogte + \scratchdimen\paperheight \advance\scratchdimen-\MPy{\??bg:\nofbleeds}% \else\if!!doned \advance\scratchdimen\MPy{\??bg:\nofbleeds}% @@ -501,16 +501,16 @@ \hsize\bleedwidth \vsize\bleedheight \setbox\scratchbox\hbox{#2}% - \doif\@@bgpagina\v!ja + \doif\@@bgpage\v!yes {\setbox\scratchbox\topskippedbox{\box\scratchbox}}% - \setbox\scratchbox\hbox to \@@bgbreedte + \setbox\scratchbox\hbox to \@@bgwidth {\if!!donea\hss\fi\box\scratchbox\if!!doneb\hss\fi}% \if!!doned \setbox\scratchbox\hbox - {\lower\bleedheight\hbox{\raise\@@bghoogte\box\scratchbox}}% + {\lower\bleedheight\hbox{\raise\@@bgheight\box\scratchbox}}% \fi - \wd\scratchbox\@@bgbreedte - \ht\scratchbox\@@bghoogte + \wd\scratchbox\@@bgwidth + \ht\scratchbox\@@bgheight \dp\scratchbox\zeropoint \ifdone \hpos{\??bg:\nofbleeds}{\box\scratchbox}% @@ -519,9 +519,9 @@ \fi \egroup} -\setupbleeding[\c!rek=\v!ja] +\setupbleeding[\c!stretch=\v!yes] -\defineexternalfigure[bleed][\c!breedte=\bleedwidth,\c!hoogte=\bleedheight] +\defineexternalfigure[bleed][\c!width=\bleedwidth,\c!height=\bleedheight] % \placefigure[left]{none} % {\bleed[width=5cm,height=3cm,location=lt]{\externalfigure[koe][bleed]}} @@ -576,10 +576,10 @@ {\dowithnextbox {\setlayer [#1] - [\c!breedte=\nextboxwd,\c!hoogte=\nextboxht, + [\c!width=\nextboxwd,\c!height=\nextboxht, \c!offset=\!!zeropoint,#2] {\flushnextbox}}% - \hbox\framed[\c!plaats=\v!normaal,#2]} + \hbox\framed[\c!location=\v!normal,#2]} \def\setlayertext {\dotripleempty\dosetlayertext} @@ -588,17 +588,17 @@ {\bgroup \getparameters [\??lx] - [\c!uitlijnen=, - \c!breedte=\hsize, - \c!kleur=, - \c!letter=, + [\c!align=, + \c!width=\hsize, + \c!color=, + \c!style=, #3]% \dowithnextboxcontent {\forgetall - \hsize\@@lxbreedte - \expanded{\setupalign[\@@lxuitlijnen]}% - \dosetfontattribute\??lx\c!letter} - {\setlayer[#1][#2]{\strut\color[\@@lxkleur]{\flushnextbox}}% + \hsize\@@lxwidth + \expanded{\setupalign[\@@lxalign]}% + \dosetfontattribute\??lx\c!style} + {\setlayer[#1][#2]{\strut\color[\@@lxcolor]{\flushnextbox}}% \egroup}% \vtop} @@ -625,40 +625,40 @@ % \setlayer[pagefigures][preset=rightbottom] \definelayerpreset - [\v!links\v!boven] - [\c!hoek={\v!links,\v!boven},\c!plaats={\v!rechts,\v!onder}] + [\v!left\v!top] + [\c!corner={\v!left,\v!top},\c!location={\v!right,\v!bottom}] \definelayerpreset - [\v!rechts\v!boven] - [\c!hoek={\v!rechts,\v!boven},\c!plaats={\v!links,\v!onder}] + [\v!right\v!top] + [\c!corner={\v!right,\v!top},\c!location={\v!left,\v!bottom}] \definelayerpreset - [\v!links\v!onder] - [\c!hoek={\v!links,\v!onder},\c!plaats={\v!rechts,\v!boven}] + [\v!left\v!bottom] + [\c!corner={\v!left,\v!bottom},\c!location={\v!right,\v!top}] \definelayerpreset - [\v!rechts\v!onder] - [\c!hoek={\v!rechts,\v!onder},\c!plaats={\v!links,\v!boven}] + [\v!right\v!bottom] + [\c!corner={\v!right,\v!bottom},\c!location={\v!left,\v!top}] \definelayerpreset - [\v!midden] - [\c!hoek=\v!midden,\c!plaats=\v!midden] + [\v!middle] + [\c!corner=\v!middle,\c!location=\v!middle] \definelayerpreset - [\v!midden\v!boven] - [\c!plaats=\v!onder,\c!hoffset=.5\layerwidth] + [\v!middle\v!top] + [\c!location=\v!bottom,\c!hoffset=.5\layerwidth] \definelayerpreset - [\v!midden\v!onder] - [\c!plaats=\v!boven,\c!hoffset=.5\layerwidth,\c!voffset=\layerheight] + [\v!middle\v!bottom] + [\c!location=\v!top,\c!hoffset=.5\layerwidth,\c!voffset=\layerheight] \definelayerpreset - [\v!midden\v!links] - [\c!plaats=\v!rechts,\c!voffset=.5\layerwidth] + [\v!middle\v!left] + [\c!location=\v!right,\c!voffset=.5\layerwidth] \definelayerpreset - [\v!midden\v!rechts] - [\c!plaats=\v!links,\c!hoffset=\layerwidth,\c!voffset=.5\layerheight] + [\v!middle\v!right] + [\c!location=\v!left,\c!hoffset=\layerwidth,\c!voffset=.5\layerheight] \def\alignedbox {\dodoubleempty\doalignedbox[]} @@ -688,27 +688,27 @@ \egroup}#1} \setvalue{\??ab\??ab }{\middlebox} -\setvalue{\??ab\??ab\v!midden}{\middlebox} -\setvalue{\??ab\??ab\v!links }{\leftbox } -\setvalue{\??ab\??ab\v!rechts}{\rightbox } -\setvalue{\??ab\??ab\v!onder }{\bottombox} -\setvalue{\??ab\??ab\v!boven }{\topbox } - -\setvalue{\??ab\??ab\v!midden\v!midden}{\middlebox} -\setvalue{\??ab\??ab\v!links \v!boven }{\lefttopbox} -\setvalue{\??ab\??ab\v!links \v!onder }{\leftbottombox} -\setvalue{\??ab\??ab\v!rechts\v!boven }{\righttopbox} -\setvalue{\??ab\??ab\v!rechts\v!onder }{\rightbottombox} -\setvalue{\??ab\??ab\v!boven \v!links }{\topleftbox} -\setvalue{\??ab\??ab\v!onder \v!links }{\bottomleftbox} -\setvalue{\??ab\??ab\v!boven \v!rechts}{\toprightbox} -\setvalue{\??ab\??ab\v!onder \v!rechts}{\bottomrightbox} +\setvalue{\??ab\??ab\v!middle}{\middlebox} +\setvalue{\??ab\??ab\v!left }{\leftbox } +\setvalue{\??ab\??ab\v!right}{\rightbox } +\setvalue{\??ab\??ab\v!bottom }{\bottombox} +\setvalue{\??ab\??ab\v!top }{\topbox } + +\setvalue{\??ab\??ab\v!middle\v!middle}{\middlebox} +\setvalue{\??ab\??ab\v!left \v!top }{\lefttopbox} +\setvalue{\??ab\??ab\v!left \v!bottom }{\leftbottombox} +\setvalue{\??ab\??ab\v!right\v!top }{\righttopbox} +\setvalue{\??ab\??ab\v!right\v!bottom }{\rightbottombox} +\setvalue{\??ab\??ab\v!top \v!left }{\topleftbox} +\setvalue{\??ab\??ab\v!bottom \v!left }{\bottomleftbox} +\setvalue{\??ab\??ab\v!top \v!right}{\toprightbox} +\setvalue{\??ab\??ab\v!bottom \v!right}{\bottomrightbox} \setvalue{\??ab\??ab c}{\middlebox} \setvalue{\??ab\??ab l}{\leftbox} \setvalue{\??ab\??ab r}{\rightbox} -\setvalue{\??ab\??ab o}{\bottombox} -\setvalue{\??ab\??ab b}{\topbox} +\setvalue{\??ab\??ab b}{\bottombox} +\setvalue{\??ab\??ab t}{\topbox} \setvalue{\??ab\??ab lt}{\lefttopbox} \setvalue{\??ab\??ab lb}{\leftbottombox} @@ -718,12 +718,27 @@ \setvalue{\??ab\??ab bl}{\bottomleftbox} \setvalue{\??ab\??ab tr}{\toprightbox} \setvalue{\??ab\??ab br}{\bottomrightbox} + +\setvalue{\??ab\??ab m}{\middlebox} + +% The next ones were desparately needed by Vit Zyka (see +% \type {supp-box} for definitions). + +\setvalue{\??ab\??ab g}{\baselinemiddlebox} +\setvalue{\??ab\??ab gl}{\baselineleftbox} +\setvalue{\??ab\??ab gc}{\baselinemiddlebox} +\setvalue{\??ab\??ab gr}{\baselinerightbox} + +\setvalue{\??ab\??ab \v!line }{\baselinemiddlebox} % \v!grid is taken +\setvalue{\??ab\??ab \v!line\v!left }{\baselineleftbox} +\setvalue{\??ab\??ab \v!line\v!middle}{\baselinemiddlebox} +\setvalue{\??ab\??ab \v!line\v!right}{\baselinerightbox} \def\offsetbox {\dodoubleempty\dooffsetbox[]} % left/right/top/bottomoffset -> dimensions change -% x/y -> dimensions don't change +% x/y | method=fixed -> dimensions don't change \def\dooffsetbox[#1][#2]% {\bgroup @@ -731,45 +746,70 @@ {\getparameters[\??ox] [\c!x=\zeropoint, \c!y=\zeropoint, - \c!breedte=\nextboxwd, - \c!hoogte=\nextboxht, - \c!diepte=\nextboxdp, - \c!plaats=, - \c!linkeroffset=\zeropoint, - \c!rechteroffset=\zeropoint, - \c!bovenoffset=\zeropoint, - \c!onderoffset=\zeropoint, + \c!width=\nextboxwd, + \c!height=\nextboxht, + \c!depth=\nextboxdp, + \c!location=, + \c!leftoffset=\zeropoint, + \c!rightoffset=\zeropoint, + \c!topoffset=\zeropoint, + \c!bottomoffset=\zeropoint, + \c!method=, #2]% \donefalse - \ifdim\@@oxlinkeroffset >\zeropoint\donetrue\fi - \ifdim\@@oxrechteroffset>\zeropoint\donetrue\fi - \ifdim\@@oxbovenoffset >\zeropoint\donetrue\fi - \ifdim\@@oxonderoffset >\zeropoint\donetrue\fi + \ifdim\@@oxleftoffset =\zeropoint\else\donetrue\fi + \ifdim\@@oxrightoffset=\zeropoint\else\donetrue\fi + \ifdim\@@oxtopoffset =\zeropoint\else\donetrue\fi + \ifdim\@@oxbottomoffset =\zeropoint\else\donetrue\fi + \ifdone + \doif\@@oxmethod\v!fixed % new + {\ifdim\@@oxleftoffset=\zeropoint + \ifdim\@@oxrightoffset=\zeropoint \else + \scratchdimen-\@@oxrightoffset + \edef\@@oxx{\the\scratchdimen}% + \let\@@oxrightoffset\zeropoint + \fi + \else + \let\@@oxx\@@oxleftoffset + \let\@@oxleftoffset\zeropoint + \fi + \ifdim\@@oxtopoffset=\zeropoint + \ifdim\@@oxbottomoffset=\zeropoint \else + \scratchdimen-\@@oxbottomoffset + \edef\@@oxy{\the\scratchdimen}% + \let\@@oxbottomoffset\zeropoint + \fi + \else + \let\@@oxy\@@oxtopoffset + \let\@@oxtopoffset\zeropoint + \fi + \donefalse}% + \fi \ifdone \setbox\nextbox\vbox {\forgetall\offinterlineskip - \vskip\@@oxbovenoffset + \vskip\@@oxtopoffset \hbox - {\hskip\@@oxlinkeroffset + {\hskip\@@oxleftoffset \flushnextbox - \hskip\@@oxrechteroffset}% - \vskip\@@oxonderoffset}% + \hskip\@@oxrightoffset}% + \vskip\@@oxbottomoffset}% \scratchdimen\nextboxht \advance\scratchdimen\nextboxdp \nextboxht\scratchdimen \nextboxdp\zeropoint \fi - \freezedimenmacro\@@oxbreedte - \freezedimenmacro\@@oxhoogte - \freezedimenmacro\@@oxdiepte + \freezedimenmacro\@@oxwidth + \freezedimenmacro\@@oxheight + \freezedimenmacro\@@oxdepth \setbox\nextbox\hbox {\hskip\@@oxx\lower\@@oxy\hbox - {\doifelsenothing\@@oxplaats + {\doifelsenothing\@@oxlocation {\flushnextbox} - {\alignedbox[\@@oxplaats]\hbox{\flushnextbox}}}}% - \nextboxwd\@@oxbreedte - \nextboxht\@@oxhoogte - \nextboxdp\@@oxdiepte + {\alignedbox[\@@oxlocation]\hbox{\flushnextbox}}}}% + \nextboxwd\@@oxwidth + \nextboxht\@@oxheight + \nextboxdp\@@oxdepth \flushnextbox \egroup}#1} @@ -850,14 +890,46 @@ {\hbox\bgroup \getparameters [\??ol] - [\c!breedte=\zeropoint,% - \c!hoogte=\zeropoint,% - \c!diepte=\zeropoint,#1]% + [\c!width=\zeropoint,% + \c!height=\zeropoint,% + \c!depth=\zeropoint,#1]% \setbox\scratchbox\null - \wd\scratchbox\@@olbreedte - \ht\scratchbox\@@olhoogte - \dp\scratchbox\@@oldiepte + \wd\scratchbox\@@olwidth + \ht\scratchbox\@@olheight + \dp\scratchbox\@@oldepth \box\scratchbox \egroup} +% \backgroundimage{\hsize}{\vsize}{1}{\externalfigure[cow][\c!width=3cm]} + +\def\backgroundimage#1#2#3% repeat hsize vsize + {\bgroup + \dowithnextbox + {\ifcase#1\relax + % just one + \else + \scratchdimen#2\divide\scratchdimen\nextboxwd\count0\scratchdimen\advance\count0\plusone + \scratchdimen#3\divide\scratchdimen\nextboxht\count2\scratchdimen\advance\count2\plusone + % to be considered, probably methods + \ifcase#1\or % x and y + \setbox\nextbox\hbox{\dorecurse{\count0}{\copy\nextbox}}% + \setbox\nextbox\vbox{\dorecurse{\count2}{\copy\nextbox\endgraf}}% + \or % x + \setbox\nextbox\hbox{\dorecurse{\count0}{\copy\nextbox}}% + \or % y + \setbox\nextbox\vbox{\dorecurse{\count2}{\copy\nextbox\endgraf}}% + \fi + \fi + \ifdim\nextboxwd>#2\relax + \setbox\nextbox\hbox to #2{\hss\flushnextbox\hss}% + \setbox\scratchbox\hbox{\expanded{\clip[\c!width=#2,\c!height=\the\nextboxht]{\box\scratchbox}}}% + \fi + \ifdim\nextboxht>#3\relax + \setbox\nextbox\vbox to #3{\vss\flushnextbox\vss}% + \setbox\nextbox\hbox{\expanded{\clip[\c!width=\the\nextboxwd,\c!height=#3]{\flushnextbox}}}% + \fi + \flushnextbox + \egroup}% + \hbox} + \protect \endinput diff --git a/tex/context/base/core-buf.tex b/tex/context/base/core-buf.tex index 2871475ed..dcd4030e6 100644 --- a/tex/context/base/core-buf.tex +++ b/tex/context/base/core-buf.tex @@ -188,7 +188,7 @@ \def\dostartbuffer {\bgroup - \obeylines % nodig, anders gaat 't fout als direct \starttabel (bv) + \obeylines % nodig, anders gaat 't fout als direct \starttable (bv) \doquadrupleempty\dodostartbuffer} \def\dodostartbuffer[#1][#2][#3][#4]% upward compatible @@ -201,11 +201,10 @@ \def\dododostartbuffer[#1][#2][#3][#4]% {%\showmessage\m!systems{15}{#2}% - \doifelsevalue{\??bu#1\c!alinea}\v!ja + \doifelsevalue{\??bu#1\c!paragraph}\v!yes {\segmentatebuffertrue} - {\doifnumberelse{\getvalue{\??bu#1\c!alinea}} - \segmentatebuffertrue\segmentatebufferfalse}% - \doifelse{#4}{} + {\doifnumberelse{\getvalue{\??bu#1\c!paragraph}}\segmentatebuffertrue\segmentatebufferfalse}% + \doifelsenothing{#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 @@ -221,10 +220,10 @@ \egroup \getvalue{#4}}% \doifelsenothing{#2} - {\message{<\TEXbufferfile{\jobname}>}% - \immediate\openout\tmpblocks\TEXbufferfile\jobname} - {\message{<\TEXbufferfile{#2}>}% - \immediate\openout\tmpblocks\TEXbufferfile{#2}}% + {\edef\bufferfilename{\TEXbufferfile\jobname}}% + {\edef\bufferfilename{\TEXbufferfile{#2}}}% + \message{<\bufferfilename>}% + \immediate\openout\tmpblocks\bufferfilename \ifsegmentatebuffer \immediate\write\tmpblocks{\string\startbufferparagraph}% \fi @@ -238,22 +237,27 @@ % \setbuffer[name]#2\endbuffer : saves to file #1.tmp \def\setbuffer[#1]#2\endbuffer - {\immediate\openout\tmpblocks=\TEXbufferfile{#1}% + {\edef\bufferfilename{\TEXbufferfile{#1}}% + \message{<\bufferfilename>}% + \immediate\openout\tmpblocks\bufferfilename \convertargument#2\to\ascii \immediate\write\tmpblocks{\ascii}% \immediate\closeout\tmpblocks} +\def\dodobuffer#1#2% + {\beginrestorecatcodes + \ifundefined{\??bu#2\c!number}% + \edef\bufferfilename{\TEXbufferfile{#2}}% + \else + \edef\bufferfilename{\TEXbufferfile{def-\getvalue{\??bu#2\c!number}}}% + \fi + #1\bufferfilename\donothing\donothing + \endrestorecatcodes} + \def\dobuffer#1[#2]#3% - {\def\dodobuffer##1% - {%\showmessage\m!systems{#1}{##1}% - \beginrestorecatcodes - \doifdefinedelse{\??bu##1\c!nummer} - {#3{\TEXbufferfile{def-\getvalue{\??bu##1\c!nummer}}}\donothing\donothing} - {#3{\TEXbufferfile{##1}}\donothing\donothing}% - \endrestorecatcodes}% - \doifelsenothing{#2} - {\dodobuffer\jobname} - {\processcommalist[#2]\dodobuffer}} + {\doifelsenothing{#2} + {\dodobuffer#3\jobname} + {\processcommalist[#2]{\dodobuffer#3}}} \def\processTEXbuffer {\dodoubleempty\doprocessTEXbuffer} @@ -266,12 +270,12 @@ \fi} \def\dodoprocessTEXbuffer[#1][#2]% - {\getvalue{\??bu#1\c!voor}% + {\getvalue{\??bu#1\c!before}% \dobuffer{16}[#2]\readjobfile - \getvalue{\??bu#1\c!na}} + \getvalue{\??bu#1\c!after}} \let\getbuffer \processTEXbuffer % handy -\let\haalbuffer\processTEXbuffer % will move to mult-com.tex +\let\getbuffer\processTEXbuffer % will move to mult-com.tex \def\typebuffer {\dodoubleempty\dotypebuffer} @@ -283,31 +287,31 @@ \dobuffer{17}[#2]\typefile \fi} -\def\stelbufferin - {\dodoubleempty\dostelbufferin} +\def\setupbuffer + {\dodoubleempty\dosetupbuffer} -\def\dostelbufferin[#1][#2]% +\def\dosetupbuffer[#1][#2]% {\ifsecondargument \getparameters[\??bu#1][#2]% \else \getparameters[\??bu][#1]% \fi} -\def\dodefinieerbuffer[#1]% +\def\dodefinebuffer[#1]% {\iffirstargument % else problems \doglobal\increment\nofdefinedbuffers - \letvalue{\??bu#1\c!nummer}\nofdefinedbuffers - \letvalue{\??bu#1\c!alinea}\v!nee + \letvalue{\??bu#1\c!number}\nofdefinedbuffers + \letvalue{\??bu#1\c!paragraph}\v!no \setevalue{\e!start#1}% {\noexpand\dostartbuffer[#1][def-\nofdefinedbuffers][\e!start#1][\e!stop#1]}% - \setevalue{\e!haal#1}% + \setevalue{\e!get#1}% {\noexpand\dodoprocessTEXbuffer[#1][def-\nofdefinedbuffers]}% \setevalue{\e!type#1}% {\noexpand\dodotypebuffer[#1][def-\nofdefinedbuffers]}% \fi} -\def\definieerbuffer - {\dosingleargument\dodefinieerbuffer} +\def\definebuffer + {\dosingleargument\dodefinebuffer} % yet another undocumented feature, but who cares: @@ -350,8 +354,8 @@ {\dodoubleempty\dogetbufferparagraphs} \def\dosetbufferoffset#1% - {\doifnumberelse{\getvalue{\??bu#1\c!alinea}} - {\currentbufferparagraph-\getvalue{\??bu#1\c!alinea}} + {\doifnumberelse{\getvalue{\??bu#1\c!paragraph}} + {\currentbufferparagraph-\getvalue{\??bu#1\c!paragraph}} {\currentbufferparagraph \zerocount}% \relax} @@ -359,7 +363,7 @@ {\iffirstargument \ifsecondargument \dosetbufferoffset{#1}% - \doifelse{#2}\v!alles + \doifelse{#2}\v!all {\def\startbufferparagraph{\normalbufferparagraph{#1}}} {\def\startbufferparagraph{\filterbufferparagraph{#1}{#2}}}% \def\stopbufferparagraph{\dostopbufferparagraph{#1}}% @@ -382,10 +386,10 @@ {\dobuffer{16}[#1]\readjobfile} \def\dostopbufferparagraph#1% - {\getvalue{\??bu#1\c!na}\par} + {\getvalue{\??bu#1\c!after}\par} \def\dostartbufferparagraph#1% - {\par\getvalue{\??bu#1\c!voor}} + {\par\getvalue{\??bu#1\c!before}} \def\normalbufferparagraph {\advance\currentbufferparagraph \plusone @@ -406,6 +410,19 @@ \fi \next{#1}} +% nicer, but untested +% +% \def\filterbufferparagraph#1#2% +% {\advance\currentbufferparagraph \plusone +% \ifcase\currentbufferparagraph +% \@EA\gobblebufferparagraph +% \else +% \doifinsetelse{\the\currentbufferparagraph}{#2} +% {\@EA\dostartbufferparagraph} +% {\@EA\fakebufferparagraph}% +% \fi +% {#1}} + \long\def\gobblebufferparagraph#1#2\stopbufferparagraph {} @@ -434,7 +451,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!after}}}} % ???? \def\dosetblockcounters[#1]% {\ifblockpermitted @@ -546,7 +563,7 @@ \global\copyingblocksfalse \fi} -\def\geenblokkenmeer +\def\nomoreblocks {\stopcopyingblocks} \def\copyblockfile @@ -614,15 +631,9 @@ \bgroup \obeylines \long\gdef\copyblocklineAB#1 - {\processnextblocklineAB{#1}% - {\closeblock}% - {\writeoutblocks{#1}% - \writetmpblock{#1}% - \copyblocklineAB}} + {\processnextblocklineAB{#1}\closeblock{\writeoutblocks{#1}\writetmpblock{#1}\copyblocklineAB}} \long\gdef\skipblocklineAB#1 - {\processnextblocklineAB{#1}% - {\closeblock}% - {\skipblocklineAB}} + {\processnextblocklineAB{#1}\closeblock\skipblocklineAB} \egroup % \def\processnextblockline#1#2#3% @@ -655,15 +666,9 @@ \bgroup \obeylines \long\gdef\copyblockline#1 - {\processnextblockline{#1}% - {\closeblock}% - {\writeoutblocks{#1}% - \writetmpblock{#1}% - \copyblockline}} + {\processnextblockline{#1}\closeblock{\writeoutblocks{#1}\writetmpblock{#1}\copyblockline}} \long\gdef\skipblockline#1 - {\processnextblockline{#1}% - {\closeblock}% - {\skipblockline}} + {\processnextblockline{#1}\closeblock\skipblockline} \egroup \def\skipblock#1% @@ -688,8 +693,8 @@ \def\saveblock#1#2% {\checkcopyingblocks \obeylines - \@EA\@EA\@EA\convertargument\@EA\string\csname\e!eindvan#1\endcsname\to\endofblockA - %testen: \expanded{\convertargument\string\csname\e!eindvan#1\endcsname\to\endofblockA}% + \@EA\@EA\@EA\convertargument\@EA\string\csname\e!end#1\endcsname\to\endofblockA + %testen: \expanded{\convertargument\string\csname\e!end#1\endcsname\to\endofblockA}% \@EA\convertargument\string\eindvanblok[#1]\to\endofblockB % MULTI LINGUAL MAKEN \def\openblock {\dobeforeblock{#1}{#2}% @@ -721,25 +726,25 @@ \readjobfile\blockfilename\donothing\donothing \setblocklevel-}% -\def\dodefinieerblok[#1]% +\def\dodefineblock[#1]% {\passeerblok[#1]% - \handhaafblokken[#1]% - \stelblokin + \keepblocks[#1]% + \setupblock [#1] - [\c!voor=\blanko, - \c!na=\blanko, - \c!binnen=, - \c!letter=, + [\c!before=\blank, + \c!after=\blank, + \c!inner=, + \c!style=, \c!file=\jobname]} -\def\definieerblok - {\dosingleargumentwithset\dodefinieerblok} +\def\defineblock + {\dosingleargumentwithset\dodefineblock} -\def\dostelblokin[#1][#2]% +\def\dosetupblock[#1][#2]% {\getparameters[\??tb#1][#2]} -\def\stelblokin - {\dodoubleargumentwithset\dostelblokin} +\def\setupblock + {\dodoubleargumentwithset\dosetupblock} \def\passeerblok[#1]% {\setvalue{\s!thisisblock#1}##1[##2]% @@ -796,28 +801,28 @@ \fi \next} -\def\doverbergblokken[#1][#2]% +\def\dohideblocks[#1][#2]% {\def\docommando##1% - {\setvalue{\e!beginvan##1}% + {\setvalue{\e!begin##1}% {\bgroup\obeylines\dotripleempty\doverbergblok[##1][#2]}}% \processcommalist[#1]\docommando} -\def\verbergblokken - {\dodoubleempty\doverbergblokken} +\def\hideblocks + {\dodoubleempty\dohideblocks} \def\doexecuteloadedblock#1#2% {\blockpermittedtrue % ? - \bgroup % before \c!voor (think of: \c!voor=\startitemize) + \bgroup % before \c!before (think of: \c!before=\startitemize) \dosetupblockparameters[#1][#2]% voor 'voor'? - \getvalue{\??tb#1\c!voor}% - \dostartattributes{\??tb#1}\c!letter\c!kleur\empty + \getvalue{\??tb#1\c!before}% + \dostartattributes{\??tb#1}\c!style\c!color\empty \visibletrue \catcode`\^^M=\@@endofline\relax - \getvalue{\??tb#1\c!binnen}% + \getvalue{\??tb#1\c!inner}% \loadoneblock \par \dostopattributes - \getvalue{\??tb#1\c!na} + \getvalue{\??tb#1\c!after}% \egroup} \def\dohandhaafblok[#1][#2][#3]% @@ -832,7 +837,7 @@ {\doifcommonelse{#2}{#3} {\global\blockpermittedtrue \edef\bloktitel{#1:#2}} - {\doifinsetelse\v!alles{#2} + {\doifinsetelse\v!all{#2} {\doifelsenothing{#3} {\global\blockpermittedtrue \edef\bloktitel{#1}} @@ -854,14 +859,14 @@ \fi \saveblock{#1}{#3#4}} -\def\dohandhaafblokken[#1][#2]% +\def\dokeepblocks[#1][#2]% {\def\docommando##1% - {\setvalue{\e!beginvan##1}% + {\setvalue{\e!begin##1}% {\bgroup\obeylines\dotripleempty\dohandhaafblok[##1][#2]}}% \processcommalist[#1]\docommando} -\def\handhaafblokken - {\dodoubleempty\dohandhaafblokken} +\def\keepblocks + {\dodoubleempty\dokeepblocks} \newconditional\processblockstatus \newconditional\dummyblockstatus @@ -911,7 +916,7 @@ \setvalue{\s!thiswasblock#1}% {\par \dostopattributes - \getvalue{\??tb#1\c!na}% + \getvalue{\??tb#1\c!after}% \egroup \setblocklevel-}% \def\next @@ -919,10 +924,10 @@ \ifconditional\blockassignmentstatus \dosetupblockparameters[#1][#3]% \fi - \getvalue{\??tb#1\c!voor}% - \dostartattributes{\??tb#1}\c!letter\c!kleur\empty + \getvalue{\??tb#1\c!before}% + \dostartattributes{\??tb#1}\c!style\c!color\empty \visibletrue - \getvalue{\??tb#1\c!binnen}}% + \getvalue{\??tb#1\c!inner}}% \fi \else \def\next @@ -935,7 +940,7 @@ {\setvalue{\s!thisisblock#1}##1[##2]% {\dodogebruikblok{#1}{##1}{##2}{#2}}} -\def\dodogebruikblokken[#1][#2]% +\def\dodouseblocks[#1][#2]% {\def\docommando##1% {\dogebruikblok[##1][#2]}% \processcommalist[#1]\docommando @@ -944,40 +949,40 @@ {\loadallblocks{\getvalue{\??tb\commalistelement\c!file}}}% \endgroup} -\def\dogebruikblokken +\def\douseblocks {\begingroup - \doassign[\??bs][\c!criterium=\v!alles]% - \dodoubleempty\dodogebruikblokken} + \doassign[\??bs][\c!criterium=\v!all]% + \dodoubleempty\dodouseblocks} -\def\gebruikblokken - {\setfalse\processblockstatus\dogebruikblokken} +\def\useblocks + {\setfalse\processblockstatus\douseblocks} -\def\verwerkblokken - {\settrue \processblockstatus\dogebruikblokken} +\def\processblocks + {\settrue \processblockstatus\douseblocks} -\def\doselecteerblokken[#1][#2][#3]% +\def\doselectblocks[#1][#2][#3]% {\doifelsenothing{#3} {\getparameters[\??bs][#2]% - \dogebruikblokken[#1][]} + \douseblocks[#1][]} {\getparameters[\??bs][#3]% - \dogebruikblokken[#1][#2]}}% + \douseblocks[#1][#2]}}% -\def\selecteerblokken +\def\selectblocks {\begingroup - \doassign[\??bs][\c!criterium=\v!alles]% - \dotripleempty\doselecteerblokken} + \doassign[\??bs][\c!criterium=\v!all]% + \dotripleempty\doselectblocks} \def\beginvanblok[#1]% % er wordt ook gechecked op \eindvanblok[..] - {\getvalue{\e!beginvan#1}} + {\getvalue{\e!begin#1}} \def\forceerblokken[#1]% {\def\docommando##1% - {\setvalue{\e!beginvan##1}% + {\setvalue{\e!begin##1}% {\setblocklevel+\bgroup \dodoubleempty\doforceerblok[##1]}% - \setvalue{\e!eindvan##1}% + \setvalue{\e!end##1}% {\dostopattributes - \getvalue{\??tb##1\c!na}% + \getvalue{\??tb##1\c!after}% \egroup\setblocklevel-}}% \processcommalist[#1]\docommando} @@ -988,17 +993,17 @@ \ifconditional\blockassignmentstatus \dosetupblockparameters[#1][#2]% \fi - \getvalue{\??tb#1\c!voor}% - \dostartattributes{\??tb#1}\c!letter\c!kleur\empty - \getvalue{\??tb#1\c!binnen}} + \getvalue{\??tb#1\c!before}% + \dostartattributes{\??tb#1}\c!style\c!color\empty + \getvalue{\??tb#1\c!inner}} -\def\passeerblokken[#1]% +\def\bypassblocks[#1]% {\def\docommando##1% - {\setvalue{\e!beginvan##1}% + {\setvalue{\e!begin##1}% {\setblocklevel+\bgroup \obeylines % here, since we look ahead \dodoubleempty\dopasseerblok[##1]}%}% - \setvalue{\e!eindvan##1}% + \setvalue{\e!end##1}% {}}% \processcommalist[#1]\docommando} @@ -1007,20 +1012,20 @@ {\egroup\setblocklevel-}% \checkcopyingblocks \obeylines - \@EA\@EA\@EA\convertargument\@EA\string\csname\e!eindvan#1\endcsname\to\endofblockA + \@EA\@EA\@EA\convertargument\@EA\string\csname\e!end#1\endcsname\to\endofblockA \@EA\convertargument\string\eindvanblok[#1]\to\endofblockB % MULTI LINGUAL MAKEN \setupcopyblock \skipblocklineAB} % the buffer mechanism handles nesting, add some switch -\setvalue{\e!start\v!verbergen}% +\setvalue{\e!start\v!hiding}% {\dostartbuffer[buf-\nofpostponedblocks] - [\e!start\v!verbergen][\e!stop\v!verbergen]} + [\e!start\v!hiding][\e!stop\v!hiding]} -\stelbufferin - [\c!alinea=\v!nee, - \c!voor=, - \c!na=] +\setupbuffer + [\c!paragraph=\v!no, + \c!before=, + \c!after=] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-con.tex b/tex/context/base/core-con.tex index f5da17cfe..88fe60728 100644 --- a/tex/context/base/core-con.tex +++ b/tex/context/base/core-con.tex @@ -63,10 +63,10 @@ %D For some years we had \unknown %D -%D \starttypen +%D \starttyping %D \def\Romannumerals#1% %D {\uppercase\expandafter{\romannumeral#1}} -%D \stoptypen +%D \stoptyping %D %D \unknown but we need to be fully expandable in order to get %D the utility output file right, so now we have the following @@ -99,9 +99,9 @@ %D be done with numbers less or equal to~26. At the cost of %D much more macros a faster conversion is possible, using: %D -%D \starttypen +%D \starttyping %D \setvalue{char1}{a} \def\character#1{\getvalue{char#1}} -%D \stoptypen +%D \stoptyping %D %D But we prefer a simpel \type{\case}. %D @@ -165,22 +165,27 @@ %D Why should we only honour the romans, and not the greek? \def\greeknumerals#1% watch the \normalxi - {\mathematics - {\ifcase#1\unknowncharacter\or - \alpha\or\beta\or\gamma\or\delta\or\varepsilon\or - \zeta\or\eta\or\theta\or\iota\or\kappa\or\lambda\or - \mu\or\nu\or\normalxi\or o\or\pi\or\varrho\or\sigma\or - \tau\or\upsilon\or\phi\or\chi\or\psi\or\omega - \else - \unknowncharacter - \fi}} + {\mathematics + {\ifcase#1\unknowncharacter\or + \alpha \or \beta \or \gamma \or \delta \or + \varepsilon \or \zeta \or \eta \or \theta \or + \iota \or \kappa \or \lambda \or \mu \or + \nu \or \xi \or \omicron \or \pi \or + \varrho \or \sigma \or \tau \or \upsilon \or + \phi \or \chi \or \psi \or \omega + \else + \unknowncharacter + \fi}} \def\Greeknumerals#1% {\mathematics {\ifcase#1\unknowncharacter \or - A\or B\or\Gamma\or\Delta\or E\or Z\or H\or\Theta\or - I\or K\or\Lambda\or M\or N\or\Xi\or O\or\Pi\or P\or - \Sigma\or T\or\Upsilon\or\Phi\or X\or\Psi\or\Omega + \Alpha \or \Beta \or \Gamma \or \Delta \or + \Epsilon \or \Zeta \or \Eta \or \Theta \or + \Iota \or \Kappa \or \Lambda \or \Mu \or + \Nu \or \Xi \or \Omicron \or \Pi \or + \Rho \or \Sigma \or \Tau \or \Upsilon \or + \Phi \or \Xi \or \Psi \or \Omega \else \unknowncharacter \fi}} @@ -229,9 +234,9 @@ %D mechanism. This way users can easily redefine a label from %D for instance german into austrian. %D -%D \starttypen +%D \starttyping %D \setuplabeltext [de] [january=J\"anner] -%D \stoptypen +%D \stoptyping %D %D Anyhow, the conversion looks like: @@ -260,11 +265,11 @@ %D days, taking leapyears into account. For those who are %D curious: %D -%D \startopsomming[opelkaar] -%D \som years that can be divided by 4 are leapyears -%D \som exept years that can be divided by 100 -%D \som unless years can be divided by 400 -%D \stopopsomming +%D \startitemize[packed] +%D \item years that can be divided by 4 are leapyears +%D \item exept years that can be divided by 100 +%D \item unless years can be divided by 400 +%D \stopitemize %D %D This makes the year 1900 into a normal year and 1996 and %D 2000 into leap years, right? Well, converting to string @@ -338,9 +343,9 @@ %D gives %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D The macro \type {\getdayoftheweek} can be used to calculate @@ -366,10 +371,10 @@ %D %D {\em not yet implemented:} %D -%D \starttypen +%D \starttyping %D \def\weekoftheday#1#2#3% %D {} -%D \stoptypen +%D \stoptyping %D \macros %D {doifleapyearelse, @@ -378,15 +383,15 @@ %D Sometimes we need to know if we're dealing with a %D leapyear, so here is a testmacro: %D -%D \starttypen +%D \starttyping %D \doifleapyearelse{year}{yes}{no} -%D \stoptypen +%D \stoptyping %D %D An example of its use can be seen in the macro %D -%D \starttypen +%D \starttyping %D \getdayspermonth{year}{month} -%D \stoptypen +%D \stoptyping %D %D The number of days is available in the macro \type %D {\numberofdays}. @@ -431,14 +436,14 @@ %D instance: %D %D \startbuffer -%D \currentdate[weekdag,dag,maand,jaar] % still dutch example -%D \currentdate[WEEKDAG,dag,MAAND,jaar] % still dutch example +%D \currentdate[weekday,day,month,year] % still dutch example +%D \currentdate[WEEKDAY,day,MONTH,year] % still dutch example %D \stopbuffer %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D depending of course on the keywords. Here we gave: @@ -453,7 +458,7 @@ %D %D \typebuffer %D -%D or typeset: \haalbuffer. +%D or typeset: \getbuffer. %D %D When no argument is passed, the current date is given as %D specified per language (using \type{\installlanguage}). @@ -462,7 +467,7 @@ %D %D \startbuffer %D \date -%D \date[d=12,m=12,y=1998][weekdag] +%D \date[d=12,m=12,y=1998][weekday] %D \date[d=12,m=12,y=1998] %D \stopbuffer %D @@ -474,9 +479,9 @@ %D The date is specified by one character keys. When no date %D is given, we get the current date. %D -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines \def\kenmerkdatumpatroon{j,mm,dd} % jj,mm,dd changed at januari 1-1-2000 @@ -488,102 +493,35 @@ \hskip\datesignal\relax \fi} -% \def\complexcurrentdate[#1]% -% {\bgroup -% \let\labellanguage\currentlanguage -% \def\betweendates{\let\betweendates\dobetweendates}% -% \lowercase{\edef\!!stringa{#1}}% permits usage in \kap -% \@EA\processallactionsinset\@EA -% [\!!stringa] -% [ \v!dag=>\betweendates\the\normalday, -% \v!maand=>\betweendates\month\normalmonth, -% \v!jaar=>\betweendates\the\normalyear, -% \space=>\unskip\ \hskip\datesignal,% optimization -) -% \ =>\unskip\ \hskip\datesignal,% optimization -) -% d=>\the\normalday, -% m=>\the\normalmonth, -% j=>\the\normalyear, -% y=>\the\normalyear, -% w=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear, -% dd=>\ifnum\normalday >9 \else0\fi\the\normalday, -% mm=>\ifnum\normalmonth>9 \else0\fi\the\normalmonth, -% jj=>\expandafter\gobbletwoarguments\the\normalyear, -% yy=>\expandafter\gobbletwoarguments\the\normalyear, -% \v!weekdag=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear, -% \v!kenmerk=>\expanded{\complexcurrentdate[\kenmerkdatumpatroon]}, -% \s!unknown=>\unskip -% \commalistelement -% \hskip\datesignal -% \def\betweendates{\let\betweendates\dobetweendates}]% -% \ifdim\lastskip=\datesignal\relax -% \unskip -% \fi -% \egroup} - -% \def\complexcurrentdate[#1]% -% {\bgroup -% \let\labellanguage\currentlanguage -% \def\betweendates{\let\betweendates\dobetweendates}% -% \lowercase{\edef\!!stringa{#1}}% permits usage in \kap -% \@EA\processallactionsinset\@EA -% [\!!stringa] -% [ \v!dag=>\betweendates\the\normalday, -% \v!dag+=>\betweendates\ordinaldaynumber\normalday, -% \v!maand=>\betweendates\month\normalmonth, -% \v!jaar=>\betweendates\the\normalyear, -% \v!spatie=>\unskip\ \hskip\datesignal,% optimization -) -% \ =>\unskip\ \hskip\datesignal,% optimization -) -% d=>\the\normalday, -% d+=>\ordinaldaynumber\normalday, -% m=>\the\normalmonth, -% j=>\the\normalyear, -% y=>\the\normalyear, -% w=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear, -% dd=>\ifnum\normalday >9 \else0\fi\the\normalday, -% dd+=>\ordinaldaynumber{\ifnum\normalday >9 \else0\fi\the\normalday}, -% mm=>\ifnum\normalmonth>9 \else0\fi\the\normalmonth, -% jj=>\expandafter\gobbletwoarguments\the\normalyear, -% yy=>\expandafter\gobbletwoarguments\the\normalyear, -% \v!weekdag=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear, -% \v!kenmerk=>\expanded{\complexcurrentdate[\kenmerkdatumpatroon]}, -% \s!unknown=>\unskip -% \commalistelement -% \hskip\datesignal -% \def\betweendates{\let\betweendates\dobetweendates}]% -% \ifdim\lastskip=\datesignal\relax -% \unskip -% \fi -% \egroup} - \def\complexcurrentdate[#1]% {\bgroup \let\labellanguage\currentlanguage \def\betweendates{\let\betweendates\dobetweendates}% - \lowercase{\edef\!!stringa{#1}}% permits usage in \kap + \lowercase{\edef\!!stringa{#1}}% permits usage in \smallcapped \@EA\processallactionsinset\@EA [\!!stringa] - [ \v!dag=>\betweendates\the\normalday, - %\v!dag+=>\betweendates\ordinaldaynumber\normalday, - \v!dag+=>\betweendates\convertnumber{\v!dag+}\normalday, - \v!maand=>\betweendates\month\normalmonth, - \v!jaar=>\betweendates\the\normalyear, - \v!spatie=>\unskip\ \hskip\datesignal,% optimization -) + [ \v!day=>\betweendates\the\normalday, + %\v!day+=>\betweendates\ordinaldaynumber\normalday, + \v!day+=>\betweendates\convertnumber{\v!day+}\normalday, + \v!month=>\betweendates\month\normalmonth, + \v!year=>\betweendates\the\normalyear, + \v!space=>\unskip\ \hskip\datesignal,% optimization -) \ =>\unskip\ \hskip\datesignal,% optimization -) - d=>\convertnumber\v!dag\normalday, + d=>\convertnumber\v!day\normalday, %d+=>\ordinaldaynumber\normalday, - d+=>\convertnumber{\v!dag+}\normalday, - m=>\convertnumber\v!maand\normalmonth, - j=>\convertnumber\v!jaar\normalyear, - y=>\convertnumber\v!jaar\normalyear, + d+=>\convertnumber{\v!day+}\normalday, + m=>\convertnumber\v!month\normalmonth, + j=>\convertnumber\v!year\normalyear, + y=>\convertnumber\v!year\normalyear, w=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear, dd=>\ifnum\normalday >9 \else0\fi\the\normalday, %dd+=>\ordinaldaynumber{\ifnum\normalday >9 \else0\fi\the\normalday}, - dd+=>\convertnumber{\v!dag+}{\ifnum\normalday >9 \else0\fi\the\normalday}, + dd+=>\convertnumber{\v!day+}{\ifnum\normalday >9 \else0\fi\the\normalday}, mm=>\ifnum\normalmonth>9 \else0\fi\the\normalmonth, jj=>\expandafter\gobbletwoarguments\the\normalyear, yy=>\expandafter\gobbletwoarguments\the\normalyear, - \v!weekdag=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear, - \v!kenmerk=>\expanded{\complexcurrentdate[\kenmerkdatumpatroon]}, + \v!weekday=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear, + \v!referral=>\expanded{\complexcurrentdate[\kenmerkdatumpatroon]}, \s!unknown=>\unskip \commalistelement \hskip\datesignal @@ -650,10 +588,10 @@ %D Because we're dealing with dates, we also introduce a few %D day loops: %D -%D \starttypen +%D \starttyping %D \processmonth{year}{month}{command} %D \processyear{year}{command}{before}{after} -%D \stoptypen +%D \stoptyping %D %D The counters \type {\normalyear}, \type {\normalmonth} and %D \type{\normalday} can be used for for date manipulations. @@ -691,16 +629,16 @@ %D a set of conversion symbols. Both need a bit different %D treatment. %D -%D \starttypen +%D \starttyping %D \defineconversion [roman] [\romannumerals] %D \defineconversion [set 1] [$\star$,$\bullet$,$\ast$] -%D \stoptypen +%D \stoptyping %D %D You can define a language dependent conversion with: %D -%D \starttypen +%D \starttyping %D \defineconversion [en] [whatever] [\something] -%D \stoptypen +%D \stoptyping % \def\dodefineconversion[#1][#2]% % {\ConvertConstantAfter\doifinstringelse{,}{#2} @@ -821,44 +759,47 @@ \defineconversion [a] [\characters] \defineconversion [A] [\Characters] -\defineconversion [AK] [\kap\characters] -\defineconversion [KA] [\kap\characters] +\defineconversion [AK] [\smallcapped\characters] +\defineconversion [KA] [\smallcapped\characters] \defineconversion [n] [\numbers] \defineconversion [N] [\Numbers] \defineconversion [m] [\mediaeval] +\defineconversion [i] [\romannumerals] +\defineconversion [I] [\Romannumerals] \defineconversion [r] [\romannumerals] \defineconversion [R] [\Romannumerals] -\defineconversion [KR] [\kap\romannumerals] -\defineconversion [RK] [\kap\romannumerals] +\defineconversion [KR] [\smallcapped\romannumerals] +\defineconversion [RK] [\smallcapped\romannumerals] \defineconversion [g] [\greeknumerals] \defineconversion [G] [\Greeknumerals] \defineconversion [o] [\oldstylenumerals] +\defineconversion [O] [\oldstylenumerals] \defineconversion [or] [\oldstyleromannumerals] -\defineconversion [\v!letter] [\character] -\defineconversion [\v!Letter] [\Character] +\defineconversion [\v!character] [\character] +\defineconversion [\v!Character] [\Character] -\defineconversion [\v!letters] [\characters] -\defineconversion [\v!Letters] [\Characters] +\defineconversion [\v!characters] [\characters] +\defineconversion [\v!Characters] [\Characters] -\defineconversion [\v!cijfers] [\numbers] -\defineconversion [\v!Cijfers] [\Numbers] -\defineconversion [\v!mediaeval] [\mediaeval] +\defineconversion [\v!numbers] [\numbers] +\defineconversion [\v!Numbers] [\Numbers] +\defineconversion [\v!mediaeval] [\mediaeval] -\defineconversion [\v!romeins] [\romannumerals] -\defineconversion [\v!Romeins] [\Romannumerals] +\defineconversion [\v!romannumerals] [\romannumerals] +\defineconversion [\v!Romannumerals] [\Romannumerals] -\defineconversion [\v!grieks] [\greeknumerals] -\defineconversion [\v!Grieks] [\Greeknumerals] +\defineconversion [\v!greek] [\greeknumerals] +\defineconversion [\v!Greek] [\Greeknumerals] % Some bonus ones: -\defineconversion [\v!leeg] [\gobbleoneargument] -\defineconversion [\v!geen] [\numbers] +\defineconversion [\v!empty] [\gobbleoneargument] +\defineconversion [\v!none] [\numbers] \defineconversion [set 0] @@ -916,4 +857,4 @@ \mathematics{\ast\ast}, \mathematics{\ast\ast\ast}] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-dat.tex b/tex/context/base/core-dat.tex index 2389aa616..239b27d70 100644 --- a/tex/context/base/core-dat.tex +++ b/tex/context/base/core-dat.tex @@ -83,55 +83,55 @@ %D A database file |<|in most cases such a base is generated %D from another one|>| is structured as follows: %D -%D \starttypen +%D \starttyping %D \startrecord{tag} %D \memberofgroup{grouplist} %D \setrecordentry{name}{...} %D .... %D \stoprecord -%D \stoptypen +%D \stoptyping %D %D The interface to such a database is defined as follows: %D -%D \starttypen +%D \starttyping %D \definerecord[class][settings] %D \setuprecord[class][settings] %D \definerecordentry[class][name] -%D \stoptypen +%D \stoptyping %D %D and processed by %D -%D \starttypen +%D \starttyping %D \processrecords[file list][tag and/or group list] -%D \stoptypen +%D \stoptyping %D %D The actual processing is done by a macro assigned to \type %D {command}: %D -%D \starttypen +%D \starttyping %D \setuprecord[class][command=\DoWithRecord] -%D \stoptypen +%D \stoptyping %D %D Given that one can ask for a field with %D -%D \starttypen +%D \starttyping %D \getrecordentry{name} -%D \stoptypen +%D \stoptyping %D %D such a command can look like: %D -%D \starttypen +%D \starttyping %D \def\DoWithRecord#1% %D {\startpacked %D \let\\=\quad %D name: \getrecordentry{name}~\getrecordentry{family name}\par %D address: \getrecordentry{postal address}\par %D \stoppacked} -%D \stoptypen +%D \stoptyping %D %D The argument passed is the tag. The database can look like: %D -%D \starttypen +%D \starttyping %D \startrecord{hagenj} %D \memberofgroup{a,b} %D \setrecordentry{naam}{Hans} @@ -145,27 +145,27 @@ %D \setrecordentry{family name}{Otten} %D \setrecordentry{postal address}{A.F. Otten\\Prinsengracht 17\\Hasselt NL} %D \stoprecord -%D \stoptypen +%D \stoptyping %D %D The definition of this database looks like: %D -%D \starttypen +%D \starttyping %D \definerecord[address][command=\DoWithRecord] %D %D \definerecordentry[address][name] %D \definerecordentry[address][family name] %D \definerecordentry[address][postal address] -%D \stoptypen +%D \stoptyping %D %D The actual processing is now done by (for instance): %D -%D \starttypen +%D \starttyping %D \processrecords[datafile][hagenj] %D \processrecords[datafile][hagenj,offenaf] %D \processrecords[datafile][all] %D \processrecords[datafile][a] %D \processrecords[datafile][b] -%D \stoptypen +%D \stoptyping %D %D Of course one can reassign the command used to handle the %D records in between. @@ -185,7 +185,7 @@ {\getparameters [\??db#1] [\c!velden=, - \c!commando=\gobbleoneargument, + \c!command=\gobbleoneargument, #2]} \def\setuprecord @@ -225,13 +225,13 @@ \processcommacommand[\getvalue{\??db#1\c!velden}]\docommando \let\setrecordentry\skiprecord \the\resetrecordlist - \doifelse{#2}\v!alles % 't Is nu eenmaal alles + \doifelse{#2}\v!all % 't Is nu eenmaal alles \recordoktrue {\doifelsenothing{#2} % of niets \recordoktrue \recordokfalse}% % zullen we maar zeggen. \ifrecordok - \let\askedrecords\v!alles + \let\askedrecords\v!all \else \makerawcommalist[#2]\askedrecords \fi @@ -264,7 +264,7 @@ {\relax \egroup %\the\everyrecord - \getvalue{\??db#1\c!commando}{##1}}% + \getvalue{\??db#1\c!command}{##1}}% \showmessage\m!databases1\askedrecords \def\doprocessrecords##1% {\readjobfile{##1} diff --git a/tex/context/base/core-def.tex b/tex/context/base/core-def.tex index 5cce2f2fc..3e7a3585d 100644 --- a/tex/context/base/core-def.tex +++ b/tex/context/base/core-def.tex @@ -27,8 +27,8 @@ \usesymbols[nav] \setupsymbolset[navigation 1] -\setupinteraction[\c!symboolset=navigation 1] +\setupinteraction[\c!symbolset=navigation 1] %D In \type {core-nav}, we choose this set as well. -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex index f33b11de1..3c107b6ff 100644 --- a/tex/context/base/core-des.tex +++ b/tex/context/base/core-des.tex @@ -27,213 +27,188 @@ % Op die manier is meer mogelijk en worden \par's geskipt. % % De macro \??dd#1\s!do\c!commando levert de koppeling tussen -% \doornummeren en \doordefinieren. Deze constructie is nodig +% \@@descriptionnumberen en \doordefinieren. Deze constructie is nodig % omdat doornummeren geen argument heeft en omdat subnummers % niet worden genest binnen het hogere niveau. Het commando -% \??dd#1\s!do\c!status moet in dat geval \v!start zijn. +% \??dd#1\s!do\c!state moet in dat geval \v!start zijn. % % herimplementeren met \nextbox en \unhbox\unvbox -\newbox\@@definitiebox +\newbox\@@descriptionbox -\def\@@definitiewoord#1% - {\getvalue{\??dd#1\s!do\c!commando}{#1}} +\def\@@descriptionhandler#1% + {\getvalue{\??dd#1\s!do\c!command}{#1}} -% \def\normal@@definitiewoord#1[#2]#3#4% -% {\doattributes -% {\??dd#1}\c!kopletter\c!kopkleur -% {\getvalue{\??dd#1\c!commando}% NAAR BUITENSTE NIVEAU ! -% {\begstrut\getvalue{\??dd#1\c!tekst}#4\endstrut}}% -% \rawreference\s!def{#2}{#3}} - -\def\normal@@definitiewoord#1[#2]#3#4% +\def\normal@@descriptionhandler#1[#2]#3#4% {\doattributes - {\??dd#1}\c!kopletter\c!kopkleur - {\getvalue{\??dd#1\c!commando}{#4}}% NAAR BUITENSTE NIVEAU ! + {\??dd#1}\c!headstyle\c!headcolor + {\getvalue{\??dd#1\c!command}{#4}}% NAAR BUITENSTE NIVEAU ! \rawreference\s!def{#2}{#3}} % brrr moet in #4 -\setvalue{@@definitie\v!links}#1% - {\@@definitiehang{#1}\@@definitielinkspure\@@definitielinkshang} +\setvalue{@@description\v!left}#1% + {\@@descriptionhang{#1}\@@descriptionleftpure\@@descriptionlefthang} -\setvalue{@@definitie\v!rechts}#1% - {\@@definitiehang{#1}\@@definitierechtspure\@@definitierechtshang} +\setvalue{@@description\v!right}#1% + {\@@descriptionhang{#1}\@@descriptionrightpure\@@descriptionrighthang} -\def\@@definitiehang#1#2#3% +\def\@@descriptionhang#1#2#3% {\processaction [\getvalue{\??dd#1\c!hang}] - [ \v!geen=>\let\next#2,% + [ \v!none=>\let\next#2,% 0=>\let\next#2,% \s!unknown=>\let\next#3,% \s!default=>\let\next#2]% \next{#1}} -\def\@@definitielinkspure#1[#2]#3% - {\@@dostartdefinitie{#1}[#2]{#3}% +\def\@@descriptionleftpure#1[#2]#3% + {\@@dostartdescription{#1}[#2]{#3}% \noindent\ignorespaces - \leftskip\@@leftdefinitieskip - \rightskip\@@rightdefinitieskip + \leftskip\@@leftdescriptionskip + \rightskip\@@rightdescriptionskip \advance\leftskip \!!widtha - \@@makedefinitiepurebox{#1}\raggedright + \@@makedescriptionpurebox{#1}\raggedright \advance\leftskip \!!widthb \llap {\hbox to \leftskip - {\hskip\@@leftdefinitieskip - \copy\@@definitiebox\hss}}% - \@@dodefinitie{#1}} + {\hskip\@@leftdescriptionskip + \copy\@@descriptionbox\hss}}% + \@@dodescription{#1}} -\def\@@definitierechtspure#1[#2]#3% - {\@@dostartdefinitie{#1}[#2]{#3}% +\def\@@descriptionrightpure#1[#2]#3% + {\@@dostartdescription{#1}[#2]{#3}% \noindent\ignorespaces - \leftskip\@@leftdefinitieskip - \rightskip\@@rightdefinitieskip + \leftskip\@@leftdescriptionskip + \rightskip\@@rightdescriptionskip \advance\rightskip \!!widtha - \@@makedefinitiepurebox{#1}\raggedleft + \@@makedescriptionpurebox{#1}\raggedleft \rlap {\hskip\hsize \hskip-\leftskip \hskip-\rightskip - \copy\@@definitiebox - \hskip\@@rightdefinitieskip}% + \copy\@@descriptionbox + \hskip\@@rightdescriptionskip}% \advance\rightskip \!!widthb - \@@dodefinitie{#1}} + \@@dodescription{#1}} -\def\@@makedefinitiepurebox#1#2% - {\setbox\@@definitiebox\vtop - {\mindermeldingen +\def\@@makedescriptionpurebox#1#2% + {\setbox\@@descriptionbox\vtop + {\dontcomplain \hsize\!!widtha \leftskip\zeropoint \rightskip\zeropoint - #2\setupalign[\getvalue{\??dd#1\c!uitlijnen}]% - \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}% - \ht\@@definitiebox\strutht - \dp\@@definitiebox\strutdp} - -\def\@@definitielinkshang#1[#2]#3% - {\@@dostartdefinitie{#1}[#2]{#3}% - \mindermeldingen + #2\setupalign[\getvalue{\??dd#1\c!align}]% + \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox}% + \ht\@@descriptionbox\strutht + \dp\@@descriptionbox\strutdp} + +\def\@@descriptionlefthang#1[#2]#3% + {\@@dostartdescription{#1}[#2]{#3}% + \dontcomplain \advance\!!widtha \!!widthb \hangindent\!!widtha - \@@makedefinitiehangbox{#1}\raggedright{\advance\rightskip \!!widthb}% + \@@makedescriptionhangbox{#1}\raggedright{\advance\rightskip \!!widthb}% \noindent\ignorespaces \llap {\dontshowcomposition - \vtop to \zeropoint{\box\@@definitiebox}}% - \@@dodefinitie{#1}}% + \vtop to \zeropoint{\box\@@descriptionbox}}% + \@@dodescription{#1}}% -\def\@@definitierechtshang#1[#2]#3% - {\@@dostartdefinitie{#1}[#2]{#3}% - \mindermeldingen +\def\@@descriptionrighthang#1[#2]#3% + {\@@dostartdescription{#1}[#2]{#3}% + \dontcomplain \advance\!!widtha \!!widthb \hangindent-\!!widtha - \@@makedefinitiehangbox{#1}\raggedleft{\advance\leftskip \!!widthb}% + \@@makedescriptionhangbox{#1}\raggedleft{\advance\leftskip \!!widthb}% \noindent\ignorespaces \rlap - {\mindermeldingen + {\dontcomplain \dontshowcomposition - \dimen0=\hsize - \advance\dimen0 -\leftskip - \advance\dimen0 -\rightskip - \hbox to \dimen0 - {\hss\vtop to \zeropoint{\box\@@definitiebox}}}% - \@@dodefinitie{#1}} - -\def\@@makedefinitiehangbox#1#2#3% - {\setbox\@@definitiebox\vtop % \vbox gaat fout in hang + \scratchdimen\hsize + \advance\scratchdimen -\leftskip + \advance\scratchdimen -\rightskip + \hbox to \scratchdimen + {\hss\vtop to \zeropoint{\box\@@descriptionbox}}}% + \@@dodescription{#1}} + +\def\@@makedescriptionhangbox#1#2#3% + {\setbox\@@descriptionbox\vtop % \vbox gaat fout in hang {\forgetall - \mindermeldingen + \dontcomplain \hsize\!!widtha - #2\setupalign[\getvalue{\??dd#1\c!uitlijnen}]#3% - \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox}% - \ht\@@definitiebox\strutht - \dp\@@definitiebox\strutdp - \doifinsetelse{\getvalue{\??dd#1\c!hang}}{\v!passend,\v!ruim} - {\dimen0=\ht\@@definitiebox - \advance\dimen0 \dp\@@definitiebox - \doifvalue{\??dd#1\c!hang}\v!ruim - {\advance\dimen0 .5\strutht}% - \getnoflines{\dimen0}% + #2\setupalign[\getvalue{\??dd#1\c!align}]#3% + \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox}% + \ht\@@descriptionbox\strutht + \dp\@@descriptionbox\strutdp + \doifinsetelse{\getvalue{\??dd#1\c!hang}}{\v!fit,\v!broad} + {\scratchdimen\ht\@@descriptionbox + \advance\scratchdimen \dp\@@descriptionbox + \doifvalue{\??dd#1\c!hang}\v!broad + {\advance\scratchdimen .5\strutht}% + \getnoflines\scratchdimen \hangafter-\noflines} {\hangafter-\getvalue{\??dd#1\c!hang}}}% -\setvalue{@@definitie\v!boven}#1[#2]#3% - {%\pagina[\v!voorkeur]% % Weg ermee! +\setvalue{@@description\v!top}#1[#2]#3% + {%\page[\v!preference]% % Weg ermee! %\dosomebreak{\goodbreak}% % Dit is beter en nodig! - \dohandelpaginaafX1 % En dit moet het maar worden. - \@@dostartdefinitie{#1}[#2]{\let\\=\space#3}% + \dohandelpaginaafX\plusone % En dit moet het maar worden. + \@@dostartdescription{#1}[#2]{\let\\=\space#3}% \noindent\ignorespaces - \copy\@@definitiebox\par + \copy\@@descriptionbox\par \nobreak - \getvalue{\??dd#1\c!tussen}% + \getvalue{\??dd#1\c!inbetween}% \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}% -% \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 - #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}% + \@@dodescription{#1}} + +\def\do@@description#1#2[#3]#4% + {\@@dostartdescription{#2}[#3]{#4}% + \noindent\ignorespaces % not needed this ignore + #1{\ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox}% + \@@dodescription{#2}} + +\setvalue{@@description\v!inmargin }{\do@@description\inmargin} +\setvalue{@@description\v!inleft }{\do@@description\inleft } +\setvalue{@@description\v!inright }{\do@@description\inright } +\setvalue{@@description\v!margin }{\do@@description\inmargin} +\setvalue{@@description\v!leftmargin }{\do@@description\inleft } +\setvalue{@@description\v!rightmargin }{\do@@description\inright } +\setvalue{@@description\v!innermargin }{\do@@description\ininner } +\setvalue{@@description\v!outermargin }{\do@@description\inouter } + +\setvalue{@@description\v!serried\v!fit}#1[#2]#3% + {\@@dostartdescription{#1}[#2]{#3}% \noindent\ignorespaces - \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox + \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox \hskip\!!widthb % toegevoegd - \@@dodefinitie{#1}} + \@@dodescription{#1}} -\def\@@definitieaanelkaarruim#1[#2]#3% - {\@@dostartdefinitie{#1}[#2]{#3}% +\setvalue{@@description\v!serried\v!broad}#1[#2]#3% + {\@@dostartdescription{#1}[#2]{#3}% \noindent\ignorespaces - \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox + \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox \hskip\!!widthb \!!plus .5\!!widthb \!!minus .25\!!widthb - \@@dodefinitie{#1}} + \@@dodescription{#1}} -\def\@@definitieaanelkaarbreed#1[#2]#3% - {\@@dostartdefinitie{#1}[#2]{#3}% +\setvalue{@@description\v!serried\v!wide}#1[#2]#3% + {\@@dostartdescription{#1}[#2]{#3}% \noindent\ignorespaces \hbox to \!!widtha - {\ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox\hss}% + {\ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox\hss}% \hskip\!!widthb \ignorespaces - \@@dodefinitie{#1}} + \@@dodescription{#1}} -\setvalue{@@definitie\v!aanelkaar}#1[#2]#3% +\setvalue{@@description\v!serried}#1[#2]#3% {\processaction - [\getvalue{\??dd#1\c!breedte}] - [\v!passend=>\let\next\@@definitieaanelkaarpassend, - \v!ruim=>\let\next\@@definitieaanelkaarruim, - \s!unknown=>\let\next\@@definitieaanelkaarbreed, - \s!default=>\let\next\@@definitieaanelkaarruim]% - \next{#1}[#2]{#3}} - -\setvalue{@@definitie\v!hangend}#1[#2]#3% - {\@@dostartdefinitie{#1}[#2]{#3}% % adds \c!marge to \leftskip + [\getvalue{\??dd#1\c!width}] + [ \v!fit=>\let\next\v!fit, + \v!broad=>\let\next\v!broad, + \s!unknown=>\let\next\v!wide, + \s!default=>\let\next\v!broad]% + \getvalue{@@description\v!serried\next}{#1}[#2]{#3}} + +\setvalue{@@description\v!hanging}#1[#2]#3% + {\@@dostartdescription{#1}[#2]{#3}% % adds \c!margin to \leftskip \noindent\ignorespaces \advance\leftskip -\leftskipadaption \relax \ifdim\leftskipadaption=\zeropoint @@ -248,634 +223,532 @@ \advance\leftskip \leftskipadaption \fi \hskip-\leftskipadaption - \ifhbox\@@definitiebox\unhcopy\else\copy\fi\@@definitiebox - \ifdim\!!widthb=\zeropoint - \kern.75em % another default - \else - \kern\!!widthb - \fi + \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox + \kern\ifdim\!!widthb=\zeropoint .75em\else\!!widthb\fi \ignorespaces - \@@dodefinitie{#1}} + \@@dodescription{#1}} -%D A new key 'titeluitlijnen' in definitions. +%D A bonus definition +%D +%D \starttyping +%D \setupfootnotedefinition[location=command,headcommand=\llap] +%D \stoptyping + +\setvalue{@@description\v!command}#1% + {\do@@description{\executeifdefined{\??dd#1\c!headcommand}\framed}{#1}} + +%D A new key 'headalign' in definitions. \chardef\insidedefinition=0 -\let\@@leftdefinitieskip \!!zeropoint -\let\@@rightdefinitieskip\!!zeropoint +\let\@@leftdescriptionskip \!!zeropoint +\let\@@rightdescriptionskip\!!zeropoint -\def\@@dostartdefinitie#1[#2]#3% - {\getvalue{\??dd#1\c!voor}% +\def\@@dostartdescription#1[#2]#3% + {\getvalue{\??dd#1\c!before}% \begingroup - \doadaptleftskip{\getvalue{\??dd#1\c!marge}}% + \doadaptleftskip{\getvalue{\??dd#1\c!margin}}% \showcomposition - \!!widthb\getvalue{\??dd#1\c!afstand}\relax + \!!widthb\getvalue{\??dd#1\c!distance}\relax \ifdim\!!widthb=\zeropoint\relax - \doifvalue{\??dd#1\c!breedte}\v!ruim{\!!widthb=1em}% + \doifvalue{\??dd#1\c!width}\v!broad{\!!widthb=1em}% \fi % temp hack, we need to avoid this kind of preprocessing - \setbox\@@definitiebox\hbox % preroll + \setbox\@@descriptionbox\hbox % preroll {\forgetall \trialtypesettingtrue - \mindermeldingen - \def\\{\crcr}% - \@@definitiewoord{#1}[#2]{#3}% - {\begstrut\getvalue{\??dd#1\c!tekst}\ignorespaces#3\endstrut}}% + \dontcomplain + \def\\{\crlf}% + \@@descriptionhandler{#1}[#2]{#3}% + {\begstrut\getvalue{\??dd#1\c!text}\ignorespaces#3\endstrut}}% % so far \assignwidth {\!!widtha}% - {\getvalue{\??dd#1\c!breedte}}% - {\doifelsevaluenothing{\??dd#1\c!monster}% + {\getvalue{\??dd#1\c!width}}% + {\doifelsevaluenothing{\??dd#1\c!sample}% {% preroll can move here (test first) - \ifhbox\@@definitiebox\unhcopy\else\copy\fi \@@definitiebox}% - {\@@definitiewoord{#1}[#2]{#3}% - {\getvalue{\??dd#1\c!tekst}\getvalue{\??dd#1\c!monster}}}} + \ifhbox\@@descriptionbox\unhcopy\else\copy\fi \@@descriptionbox}% + {\@@descriptionhandler{#1}[#2]{#3}% + {\getvalue{\??dd#1\c!text}\getvalue{\??dd#1\c!sample}}}} {\!!widthb}% - \setbox\@@definitiebox\hbox + \setbox\@@descriptionbox\hbox {\forgetall - \mindermeldingen + \dontcomplain \let\\\endgraf - \doifelsevalue{\??dd#1\c!plaats}\v!aanelkaar - {\@@definitiewoord{#1}[#2]{#3}% - {\begstrut\getvalue{\??dd#1\c!tekst}#3\endstrut}} - {\@@definitiewoord{#1}[#2]{#3}% + \doifelsevalue{\??dd#1\c!location}\v!serried + {\@@descriptionhandler{#1}[#2]{#3}% + {\begstrut\getvalue{\??dd#1\c!text}#3\endstrut}} + {\@@descriptionhandler{#1}[#2]{#3}% {\vtop{\hsize\!!widtha\advance\hsize-\!!widthb - \begstrut\getvalue{\??dd#1\c!tekst}\ignorespaces#3\endstrut}}}}% - \doifelsevalue{\??dd#1\c!titeluitlijnen}\v!nee - {\edef\@@leftdefinitieskip {\the\leftskip }% - \edef\@@rightdefinitieskip{\the\rightskip}} + \begstrut\getvalue{\??dd#1\c!text}\ignorespaces#3\endstrut}}}}% + \doifelsevalue{\??dd#1\c!aligntitle}\v!no + {\edef\@@leftdescriptionskip {\the\leftskip }% + \edef\@@rightdescriptionskip{\the\rightskip}} {\ifcase\insidedefinition - \edef\@@leftdefinitieskip {\the\leftskip }% - \edef\@@rightdefinitieskip{\the\rightskip}% + \edef\@@leftdescriptionskip {\the\leftskip }% + \edef\@@rightdescriptionskip{\the\rightskip}% \fi}% - \expanded{\inspringen[\getvalue{\??dd#1\c!inspringen}]}% + \expanded{\indenting[\getvalue{\??dd#1\c!indenting}]}% \ifcase\insidedefinition % better a system mode \chardef\insidedefinition\plusone \or \chardef\insidedefinition\plustwo \fi} % now happens elsewhere : \noindent\ignorespaces -\def\@@stopdefinitie#1% +\def\@@stopdescription#1% {\par % maybe better after \dostopattributes \dostopattributes \endgroup - \getvalue{\??dd#1\c!na}% + \getvalue{\??dd#1\c!after}% \egroup % temporary hack \dochecknextindentation{\??dd#1}} -\def\@@dodefinitie#1% - {\dostartattributes{\??dd#1}\c!letter\c!kleur\empty +\def\@@dodescription#1% + {\dostartattributes{\??dd#1}\c!style\c!color\empty \ignorespaces} -% \def\@@somedefinitie#1[#2]#3% -% {\bgroup % temporary hack -% \BeforePar{\executedoordefinitie{#1}[#2]{#3}}% -% \AfterPar{\@@stopdefinitie{#1}}% -% \GetPar} -% -% nicer and better: - -\def\@@somedefinitie#1[#2]#3% +\def\@@somedescription#1[#2]#3% {\dowithpar - {\bgroup\executedoordefinitie{#1}[#2]{#3}}% - {\@@stopdefinitie{#1}}} + {\bgroup\@@makedescription{#1}[#2]{#3}}% + {\@@stopdescription{#1}}} -\def\@@startsomedefinitie#1[#2]#3% +\def\@@startsomedescription#1[#2]#3% {\bgroup % temporary hack - \BeforePar{\executedoordefinitie{#1}[#2]{#3}}% + \BeforePar{\@@makedescription{#1}[#2]{#3}}% \GotoPar} -\def\dodosteldoordefinierenin[#1][#2]% +\def\dodosetupdescriptions[#1][#2]% {\getparameters[\??dd#1][#2]} -\def\dosteldoordefinierenin[#1][#2]% % beter: \iffirstargument +\def\dosetupdescriptions[#1][#2]% % beter: \iffirstargument {\ConvertToConstant\doifelse{#2}{} - {\dodosteldoordefinierenin[][#1]} - {\dodoubleargumentwithset\dodosteldoordefinierenin[#1][#2]}} + {\dodosetupdescriptions[][#1]} + {\dodoubleargumentwithset\dodosetupdescriptions[#1][#2]}} -\def\steldoordefinierenin% - {\dodoubleempty\dosteldoordefinierenin} +\def\setupdescriptions + {\dodoubleempty\dosetupdescriptions} -\def\executedoordefinitie#1[#2]% - {\ExpandAfter\doifundefined{@@definitie\getvalue{\??dd#1\c!plaats}} - {\setvalue{\??dd#1\c!plaats}{\v!links}}% - \getvalue{@@definitie\getvalue{\??dd#1\c!plaats}}{#1}[#2]} +\def\@@makedescription#1[#2]% + {\ExpandAfter\doifundefined{@@description\getvalue{\??dd#1\c!location}} + {\setvalue{\??dd#1\c!location}{\v!left}}% + \getvalue{@@description\getvalue{\??dd#1\c!location}}{#1}[#2]} -\def\dodoordefinieren[#1][#2]% +\def\dodefinedescription[#1][#2]% {\copyparameters[\??dd#1][\??dd] - [\c!plaats,\c!kopletter,\c!letter,\c!kleur,\c!kopkleur, - \c!breedte,\c!hang,\c!monster,\c!voor,\c!tussen,\c!na,\c!marge, - \c!inspringen,\c!springvolgendein,\c!uitlijnen, - \c!tekst,\c!afstand,\c!commando]% + [\c!location,\c!headstyle,\c!style,\c!color,\c!headcolor, + \c!width,\c!hang,\c!sample,\c!before,\c!inbetween,\c!after,\c!margin, + \c!indenting,\c!indentnext,\c!align,\c!text,\c!distance,\c!command]% \getparameters[\??dd#1] - [\s!do\c!status=\v!stop, - \s!do\c!commando=\normal@@definitiewoord, + [\s!do\c!state=\v!stop, + \s!do\c!command=\normal@@descriptionhandler, #2]% - \doifvalue{\??dd#1\c!plaats}\v!boven - {\doassign[\??dd#1][\c!tussen={\blanko}]}% - \setvalue{#1}% - {\dodoubleempty\@@definitie[#1]}% - \setvalue{\e!start#1}% - {\dodoubleempty\@@startdefinitie[#1]}% - \setvalue{\e!stop#1}% - {\@@stopdefinitie{#1}}}% - -\def\@@startdefinitie[#1][#2]% - {\doifelsevalue{\??dd#1\s!do\c!status}\v!start - {\@@startsomedefinitie{#1}[#2]{}} - {\dowithwargument{\@@startsomedefinitie{#1}[#2]}}} - -\def\@@definitie[#1][#2]% - {\doifelsevalue{\??dd#1\s!do\c!status}\v!start - {\@@somedefinitie{#1}[#2]{}} - {\dowithwargument{\@@somedefinitie{#1}[#2]}}} - -\def\doordefinieren% - {\dodoubleemptywithset\dodoordefinieren} + \doifvalue{\??dd#1\c!location}\v!top + {\doassign[\??dd#1][\c!inbetween=\blank]}% + \setvalue {#1}{\dodoubleempty\@@description[#1]}% + \setvalue{\e!start#1}{\dodoubleempty\@@startdescription[#1]}% + \setvalue{\e!stop #1}{\@@stopdescription{#1}}}% + +\def\@@startdescription[#1][#2]% + {\doifelsevalue{\??dd#1\s!do\c!state}\v!start + {\@@startsomedescription{#1}[#2]{}} + {\dowithwargument{\@@startsomedescription{#1}[#2]}}} + +\def\@@description[#1][#2]% + {\doifelsevalue{\??dd#1\s!do\c!state}\v!start + {\@@somedescription{#1}[#2]{}} + {\dowithwargument{\@@somedescription{#1}[#2]}}} + +\def\definedescription + {\dodoubleemptywithset\dodefinedescription} \def\showdnpuretext#1% - {\strut\getvalue{\??dd#1\c!tekst}} % geen spatie - -% \def\showdntext#1% -% {\doifelsevaluenothing{\??dd#1\c!tekst} -% {\ignorespaces} -% {\strut\getvalue{\??dd#1\c!tekst}\fixedspace}} + {\strut\getvalue{\??dd#1\c!text}} % geen spatie \def\showdntext#1% - {\doifelsevaluenothing{\??dd#1\c!tekst} + {\doifelsevaluenothing{\??dd#1\c!text} {\ignorespaces} {\strut - \getvalue{\??dd#1\c!tekst}% + \getvalue{\??dd#1\c!text}% \removeunwantedspaces\fixedspace}} -% \def\showdnnummer#1% -% {\voorafgaandenummer -% \nummer[\getvalue{\??dd#1\??dd\c!nummer}]} - -\def\showdnnummer#1% - {%\preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber - \preparednumber - \nummer[\getvalue{\??dd#1\??dd\c!nummer}]} +\def\showdnnumber#1% + {\preparednumber + \convertednumber[\getvalue{\??dd#1\??dd\c!number}]} -\def\showdnsubnummer#1% - {\showdnnummer{#1}% - \getvalue{\??dd#1\c!scheider}% - \nummer[\v!sub\getvalue{\??dd#1\??dd\c!nummer}]} +\def\showdnsubnumber#1% + {\showdnnumber{#1}% + \getvalue{\??dd#1\c!separator}% + \convertednumber[\v!sub\getvalue{\??dd#1\??dd\c!number}]} -\def\showdnsubsubnummer#1% - {\showdnsubnummer{#1}% - \getvalue{\??dd#1\c!scheider}% - \nummer[\v!sub\v!sub\getvalue{\??dd#1\??dd\c!nummer}]} +\def\showdnsubsubnumber#1% + {\showdnsubnumber{#1}% + \getvalue{\??dd#1\c!separator}% + \convertednumber[\v!sub\v!sub\getvalue{\??dd#1\??dd\c!number}]} -\def\showdnsubsubsubnummer#1% - {\showdnsubsubnummer{#1}% - \getvalue{\??dd#1\c!scheider}% - \nummer[\v!sub\v!sub\v!sub\getvalue{\??dd#1\??dd\c!nummer}]} +\def\showdnsubsubsubnumber#1% + {\showdnsubsubnumber{#1}% + \getvalue{\??dd#1\c!separator}% + \convertednumber[\v!sub\v!sub\v!sub\getvalue{\??dd#1\??dd\c!number}]} -\def\domakednnummer#1#2#3% - {\getvalue{\??dd#2#1\c!links}% +\def\domakednnumber#1#2#3% + {\getvalue{\??dd#2#1\c!left}% \strut#3{#1}% - \getvalue{\??dd#2#1\c!afsluiter}% - \getvalue{\??dd#2#1\c!rechts}} - -% #1=name #2=level #3=\show #4[#5]#6#7=#1[#2]#3#4 van definitie - -% \def\special@@definitiewoord#1#2#3#4[#5]#6#7% -% {\strut -% \doifelsevalue{\??dd#1\c!nummer}\v!nee -% \!!doneafalse -% {\doifelse{#5}{-} -% \!!doneafalse -% \!!doneatrue}% -% \chardef\definitiekoppeling\zerocount -% \iflocation -% \doifvaluesomething{\??dd#1\c!koppeling} -% {\processaction % genereert > of < -% [\getvalue{\??dd#1\c!koppelwijze}] -% [ \v!lokaal=>\chardef\definitiekoppeling1, % old: default -% \v!globaal=>\chardef\definitiekoppeling2]}% new: global crosslinking -% \fi -% \stelnummerin % the number is called indirectly -% [\getvalue{\??dd#1\??dd\c!nummer}] -% [\c!sectienummer=\getvalue{\??dd#1\c!sectienummer}]% -% \if!!donea -% \getvalue{\e!volgende#2#1}% -% \iflocation -% \bgroup -% \letvalue{\??dd#1\c!sectienummer}\v!ja -% \protectconversion -% \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]% -% \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber -% \ifcase\definitiekoppeling \or -% \xdef\internaldoornummer{#3{#1}}% -% \rawreference\s!num{#1:\internaldoornummer}{}% -% \or -% \xdef\internaldoornummer{\countervalue{\??dd\c!koppeling#1}}% -% \rawreference\s!num{#1:\internaldoornummer}{}% -% \fi -% \egroup -% \fi -% \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]% -% \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber -% \hbox -% {\let\normalkap\relax % sorry, uppercase causes troubles -% \doattributes % \nocase primitive needed -% {\??dd#2#1}\c!kopletter\c!kopkleur -% {\getvalue{\??dd#1\c!commando}% hook for taco -% {\showdntext{#2#1}% -% \domakednnummer{#1}{#2}{#3}}}% -% \iflocation\ifcase\definitiekoppeling \else -% \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}% -% \doifreferencefoundelse\localconnection -% % {\in[\localconnection]}{}% genereert > of < -% \fi\fi}% -% \doifnot{#5}{-}{\rawreference\s!num{#5}{#3{#1}}}% -% \else % Why was this strange expansion needed? -% \hbox -% {\edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded -% \expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur -% {\noexpand\getvalue{\??dd#1\c!commando}{\!!stringa}}}% -% \doifnot{#5}{-}{\rawreference\s!num{#5}{}}}% -% \fi} - -\def\special@@definitiewoord#1#2#3#4[#5]#6#7% + \getvalue{\??dd#2#1\c!stopper}% + \getvalue{\??dd#2#1\c!right}} + +% #1=name #2=level #3=\show #4[#5]#6#7=#1[#2]#3#4 van description + +\def\special@@descriptionhandler#1#2#3#4[#5]#6#7% {\strut - \doifelsevalue{\??dd#1\c!nummer}\v!nee + \doifelsevalue{\??dd#1\c!number}\v!no \!!doneafalse{\doifelse{#5}{-}\!!doneafalse\!!doneatrue}% - \chardef\definitiekoppeling\zerocount + \chardef\descriptioncoupling\zerocount \iflocation - \doifvaluesomething{\??dd#1\c!koppeling} + \doifvaluesomething{\??dd#1\c!coupling} {\processaction % genereert > of < - [\getvalue{\??dd#1\c!koppelwijze}] - [ \v!lokaal=>\chardef\definitiekoppeling1, % old: default - \v!globaal=>\chardef\definitiekoppeling2]}% new: global crosslinking + [\getvalue{\??dd#1\c!couplingway}] + [ \v!local=>\chardef\descriptioncoupling1, % old: default + \v!global=>\chardef\descriptioncoupling2]}% new: global crosslinking \fi - \stelnummerin % the number is called indirectly - [\getvalue{\??dd#1\??dd\c!nummer}] - [\c!sectienummer=\getvalue{\??dd#1\c!sectienummer}]% + \setupnumber % the number is called indirectly + [\getvalue{\??dd#1\??dd\c!number}] + [\c!sectionnumber=\getvalue{\??dd#1\c!sectionnumber}]% \if!!donea -\iftrialtypesetting\startlocal\fi - \getvalue{\e!volgende#2#1}% tricky but we need the preroll -\iftrialtypesetting\stoplocal\fi - % \getvalue{\e!volgende#2#1}% + \iftrialtypesetting\startlocal\fi + \getvalue{\e!next#2#1}% tricky but we need the preroll + \iftrialtypesetting\stoplocal\fi + % \getvalue{\e!next#2#1}% \iflocation \bgroup - \letvalue{\??dd#1\c!sectienummer}\v!ja + \letvalue{\??dd#1\c!sectionnumber}\v!yes \protectconversion - \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]% + \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!number}]% \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber - \ifcase\definitiekoppeling \or - \xdef\internaldoornummer{#3{#1}}% - \rawreference\s!num{#1:\internaldoornummer}{}% + \ifcase\descriptioncoupling \or + \xdef\@@internalenumber{#3{#1}}% + \rawreference\s!num{#1:\@@internalenumber}{}% \or - \xdef\internaldoornummer{\countervalue{\??dd\c!koppeling#1}}% - \rawreference\s!num{#1:\internaldoornummer}{}% + \xdef\@@internalenumber{\countervalue{\??dd\c!coupling#1}}% + \rawreference\s!num{#1:\@@internalenumber}{}% \fi \egroup \fi - \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]% + \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!number}]% \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber - \let\normalkap\relax % sorry, uppercase causes troubles + \disablepseudocaps % sorry, uppercase causes troubles \doattributes % \nocase primitive needed - {\??dd#1}\c!kopletter\c!kopkleur - {\getvalue{\??dd#1\c!commando}% hook for taco + {\??dd#1}\c!headstyle\c!headcolor + {\getvalue{\??dd#1\c!command}% hook for taco {\showdntext{#2#1}% - \domakednnummer{#1}{#2}{#3}}}% - \iflocation\ifcase\definitiekoppeling \else - \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}% + \domakednnumber{#1}{#2}{#3}}}% + \iflocation\ifcase\descriptioncoupling \else + \edef\localconnection{\getvalue{\??dd#1\c!coupling}:\@@internalenumber}% \doifreferencefoundelse\localconnection {\in[\localconnection]}\donothing % genereert > of < \fi\fi \doifnot{#5}{-}{\rawreference\s!num{#5}{#3{#1}}}% \else % Why was this strange expansion needed? \edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded - \expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur - {\noexpand\getvalue{\??dd#1\c!commando}{\!!stringa}}}% + \expanded{\doattributes{\??dd#1}\noexpand\c!headstyle\noexpand\c!headcolor + {\noexpand\getvalue{\??dd#1\c!command}{\!!stringa}}}% \doifnot{#5}{-}{\rawreference\s!num{#5}{}}% \fi} -\def\@@ddsetsubsubsubnummer#1% - {\edef\doornummer{\getvalue{\??dd#1\??dd\c!nummer}}% - \setnumber[\v!sub\v!sub\v!sub\doornummer]} +\setvalue{\??dd\s!set\v!sub\s!sub\s!sub\c!number}#1% + {\edef\@@descriptionnumber{\getvalue{\??dd#1\??dd\c!number}}% + \setnumber[\v!sub\v!sub\v!sub\@@descriptionnumber]} -\def\@@ddsetsubsubnummer#1% - {\@@ddresetsubsubsubnummer{#1}% - \setnumber[\v!sub\v!sub\doornummer]} +\setvalue{\??dd\s!set\v!sub\s!sub\c!number}#1% + {\@@ddresetsubsubsubnumber{#1}% + \setnumber[\v!sub\v!sub\@@descriptionnumber]} -\def\@@ddsetsubnummer#1% - {\@@ddresetsubsubnummer{#1}% - \setnumber[\v!sub\doornummer]} +\setvalue{\??dd\s!set\v!sub\c!number}#1% + {\@@ddresetsubsubnumber{#1}% + \setnumber[\v!sub\@@descriptionnumber]} -\def\@@ddsetnummer#1% - {\@@ddresetsubnummer{#1}% - \setnumber[\doornummer]} +\setvalue{\??dd\s!set\c!number}#1% + {\@@ddresetsubnumber{#1}% + \setnumber[\@@descriptionnumber]} -\def\@@ddresetsubsubsubnummer#1% - {\edef\doornummer{\getvalue{\??dd#1\??dd\c!nummer}}% - \resetnumber[\v!sub\v!sub\v!sub\doornummer]} +\setvalue{\??dd\s!reset\v!sub\v!sub\v!sub\c!number}#1% + {\edef\@@descriptionnumber{\getvalue{\??dd#1\??dd\c!number}}% + \resetnumber[\v!sub\v!sub\v!sub\@@descriptionnumber]} -\def\@@ddresetsubsubnummer#1% - {\@@ddresetsubsubsubnummer{#1}% - \resetnumber[\v!sub\v!sub\doornummer]} +\setvalue{\??dd\s!reset\v!sub\v!sub\c!number}#1% + {\@@ddresetsubsubsubnumber{#1}% + \resetnumber[\v!sub\v!sub\@@descriptionnumber]} -\def\@@ddresetsubnummer#1% - {\@@ddresetsubsubnummer{#1}% - \resetnumber[\v!sub\doornummer]} +\setvalue{\??dd\s!reset\v!sub\c!number}#1% + {\@@ddresetsubsubnumber{#1}% + \resetnumber[\v!sub\@@descriptionnumber]} -\def\@@ddresetnummer#1% - {\@@ddresetsubnummer{#1}% - \resetnumber[\doornummer]} +\setvalue{\??dd\s!reset\c!number}#1% + {\@@ddresetsubnumber{#1}% + \resetnumber[\@@descriptionnumber]} -\def\@@ddvolgendesubsubsubnummer#1[#2]% - {\edef\doornummer{\getvalue{\??dd#1\??dd\c!nummer}}% - \verhoognummer[\v!sub\v!sub\v!sub\doornummer]% - \rawreference\s!num{#2}{\showdnsubsubsubnummer{\doornummer}}}% +\setvalue{\??dd\e!next\v!sub\v!sub\v!sub\c!number}#1[#2]% + {\edef\@@descriptionnumber{\getvalue{\??dd#1\??dd\c!number}}% + \incrementnumber[\v!sub\v!sub\v!sub\@@descriptionnumber]% + \rawreference\s!num{#2}{\showdnsubsubsubnumber{\@@descriptionnumber}}}% -\def\@@ddvolgendesubsubnummer#1[#2]% - {\@@ddresetsubsubsubnummer{#1}% - \verhoognummer[\v!sub\v!sub\doornummer]% - \rawreference\s!num{#2}{\showdnsubsubnummer{\doornummer}}} +\setvalue{\??dd\e!next\v!sub\v!sub\c!number}#1[#2]% + {\@@ddresetsubsubsubnumber{#1}% + \incrementnumber[\v!sub\v!sub\@@descriptionnumber]% + \rawreference\s!num{#2}{\showdnsubsubnumber{\@@descriptionnumber}}} -\def\@@ddvolgendesubnummer#1[#2]% - {\@@ddresetsubsubnummer{#1}% - \verhoognummer[\v!sub\doornummer]% - \rawreference\s!num{#2}{\showdnsubnummer{\doornummer}}} +\setvalue{\??dd\e!next\v!sub\c!number}#1[#2]% + {\@@ddresetsubsubnumber{#1}% + \incrementnumber[\v!sub\@@descriptionnumber]% + \rawreference\s!num{#2}{\showdnsubnumber{\@@descriptionnumber}}} -\def\@@ddvolgendenummer#1[#2]% - {\@@ddresetsubnummer{#1}% - \verhoognummer[\doornummer]% - \rawreference\s!num{#2}{\showdnnummer{\doornummer}}} +\setvalue{\??dd\e!next\c!number}#1[#2]% + {\@@ddresetsubnumber{#1}% + \incrementnumber[\@@descriptionnumber]% + \rawreference\s!num{#2}{\showdnnumber{\@@descriptionnumber}}} -\def\dodosteldoornummerenin[#1][#2]% +\def\dodosetupenumerations[#1][#2]% {\getparameters[\??dd#1][#2]% \doifdefined{\??dd#1\c!start} - {\stelnummerin[#1][\c!start=\getvalue{\??dd#1\c!start}]}% - \stelnummerin[#1][\c!conversie=\getvalue{\??dd#1\c!conversie}]} + {\setupnumber[#1][\c!start=\getvalue{\??dd#1\c!start}]}% + \setupnumber[#1][\c!conversion=\getvalue{\??dd#1\c!conversion}]} -\def\dosteldoornummerenin[#1][#2]% +\def\dosetupenumerations[#1][#2]% {\ConvertToConstant\doifelse{#2}{} {\getparameters[\??dn][#1]} - {\dodoubleargumentwithset\dodosteldoornummerenin[#1][#2]}} + {\dodoubleargumentwithset\dodosetupenumerations[#1][#2]}} -\def\steldoornummerenin% - {\dodoubleempty\dosteldoornummerenin} +\def\setupenumerations + {\dodoubleempty\dosetupenumerations} -\def\dododoornummeren#1#2#3[#4][#5]#6% - {\makecounter{\??dd\c!koppeling#1}% new: global cross linking - \dodoordefinieren[#3#1]% - [\s!do\c!status=\v!start, - \s!do\c!commando=\special@@definitiewoord{#1}{#3}{#6}]% +\def\dododefineenumeration#1#2#3[#4][#5]#6% + {\makecounter{\??dd\c!coupling#1}% new: global cross linking + \dodefinedescription[#3#1]% + [\s!do\c!state=\v!start, + \s!do\c!command=\special@@descriptionhandler{#1}{#3}{#6}]% \copyparameters[\??dd#3#1][\??dn] - [\c!plaats,\c!kopletter,\c!letter,\c!kleur,\c!kopkleur, - \c!breedte,\c!nummer,\c!afstand,\c!commando, - \c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na, - \c!niveaus,\c!wijze,\c!blokwijze,\c!scheider,\c!marge, - \c!inspringen,\c!springvolgendein,\c!afsluiter,\c!sectienummer, - \c!nummer]% + [\c!location,\c!headstyle,\c!style,\c!color,\c!headcolor, + \c!width,\c!number,\c!distance,\c!command, + \c!sample,\c!hang,\c!align,\c!before,\c!inbetween,\c!after, + \c!levels,\c!way,\c!blockway,\c!separator,\c!margin, + \c!indenting,\c!indentnext,\c!stopper,\c!sectionnumber, + \c!number]% \doifassignmentelse{#4} {\getparameters[\??dd#3#1]% - [\c!tekst=#1,\??dd\c!nummer=#1,\c!conversie=, - \c!links=,\c!rechts=,\c!koppeling=,\c!koppelwijze=\v!lokaal,#4]}% + [\c!text=#1,\??dd\c!number=#1,\c!conversion=, + \c!left=,\c!right=,\c!coupling=,\c!couplingway=\v!local,#4]}% {\doifelsenothing{#4} {\getparameters[\??dd#3#1]% - [\c!tekst=#1,\??dd\c!nummer=#1,\c!conversie=, - \c!afsluiter=, - \c!links=,\c!rechts=,\c!koppeling=,\c!koppelwijze=,#4]}% + [\c!text=#1,\??dd\c!number=#1,\c!conversion=, + \c!stopper=, + \c!left=,\c!right=,\c!coupling=,\c!couplingway=,#4]}% {\copyparameters[\??dd#3#1][\??dd#3#4] - [\c!plaats,\c!kopletter,\c!letter,\c!kleur,\c!kopkleur, - \c!breedte,\c!nummer,\c!afstand,\c!commando,\c!marge, - \c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na, - \c!afsluiter,\c!inspringen,\c!springvolgendein,\c!links,\c!rechts, - \c!koppeling,\c!koppelwijze]% + [\c!location,\c!headstyle,\c!style,\c!color,\c!headcolor, + \c!width,\c!number,\c!distance,\c!command,\c!margin, + \c!sample,\c!hang,\c!align,\c!before,\c!inbetween,\c!after, + \c!stopper,\c!indenting,\c!indentnext,\c!left,\c!right, + \c!coupling,\c!couplingway]% \getparameters[\??dd#3#1] - [\c!tekst=#1,\??dd\c!nummer=#4,\c!conversie=,#5]}}% - \ExpandBothAfter\doif{\getvalue{\??dd#3#1\??dd\c!nummer}}{#1} - {\definieernummer + [\c!text=#1,\??dd\c!number=#4,\c!conversion=,#5]}}% + \ExpandBothAfter\doif{\getvalue{\??dd#3#1\??dd\c!number}}{#1} + {\definenumber [#3#1] - [\c!wijze=\getvalue{\??dd#1\c!wijze}, - \c!blokwijze=\getvalue{\??dd#1\c!blokwijze}, - \c!sectienummer=\getvalue{\??dd#1\c!sectienummer}]% - \doifvalue{\??dd#1\c!niveaus}{#2}% % for - {\doifsomething{\getvalue{\??dd#1\c!conversie}}% % old - {\stelnummerin[#3#1] % times - [\c!conversie=\getvalue{\??dd#1\c!conversie}]}}}% % sake - \setvalue{\s!set#3#1}% - {\dosetdoornummer[#1][#3]}% - \setvalue{\s!reset#3#1}% - {\doresetdoornummer[#1][#3]}% - \setvalue{\e!volgende#3#1}% - {\dotripleempty\dovolgendedoornummer[#1][#3]}} - -\def\dovolgendedoornummer[#1][#2]% - {\pluscounter{\??dd\c!koppeling#1}% new: global crosslinking - \getvalue{\??dd\c!volgende#2\c!nummer}{#1}}% - -\def\doresetdoornummer[#1][#2]% - {\getvalue{\??dd\s!reset#2\c!nummer}{#1}}% - -\def\dosetdoornummer[#1][#2]% - {\getvalue{\??dd\s!set#2\c!nummer}{#1}}% - -\def\dodoornummeren[#1][#2][#3]% - {\dododoornummeren{#1}{1}{}[#2][#3]\showdnnummer - \dododoornummeren{#1}{2}{\v!sub}[#2][#3]\showdnsubnummer - \dododoornummeren{#1}{3}{\v!sub\v!sub}[#2][#3]\showdnsubsubnummer - \dododoornummeren{#1}{4}{\v!sub\v!sub\v!sub}[#2][#3]\showdnsubsubsubnummer} - -\def\doornummeren% - {\dotripleemptywithset\dodoornummeren} + [\c!way=\getvalue{\??dd#1\c!way}, + \c!blockway=\getvalue{\??dd#1\c!blockway}, + \c!sectionnumber=\getvalue{\??dd#1\c!sectionnumber}]% + \doifvalue{\??dd#1\c!levels}{#2}% % for + {\doifsomething{\getvalue{\??dd#1\c!conversion}}% % old + {\setupnumber[#3#1] % times + [\c!conversion=\getvalue{\??dd#1\c!conversion}]}}}% % sake + \setvalue{\s!set #3#1}{\dosetenumerationnumber[#1][#3]}% + \setvalue{\s!reset#3#1}{\doresetenumerationnumber[#1][#3]}% + \setvalue{\e!next #3#1}{\dotripleempty\donextenumerationnumber[#1][#3]}} + +\def\doresetenumerationnumber[#1][#2]% + {\getvalue{\??dd\s!reset#2\c!number}{#1}}% + +\def\dosetenumerationnumber[#1][#2]% + {\getvalue{\??dd\s!set#2\c!number}{#1}}% + +\def\donextenumerationnumber[#1][#2]% + {\pluscounter{\??dd\c!coupling#1}% new: global crosslinking + \getvalue{\??dd\e!next#2\c!number}{#1}}% + +\def\dodefineenumeration[#1][#2][#3]% + {\dododefineenumeration{#1}{1}{}[#2][#3]\showdnnumber + \dododefineenumeration{#1}{2}{\v!sub}[#2][#3]\showdnsubnumber + \dododefineenumeration{#1}{3}{\v!sub\v!sub}[#2][#3]\showdnsubsubnumber + \dododefineenumeration{#1}{4}{\v!sub\v!sub\v!sub}[#2][#3]\showdnsubsubsubnumber} + +\def\defineenumeration + {\dotripleemptywithset\dodefineenumeration} % Het default-mechanisme kan mooier: leegtest, enz. % -% Werkprocedure buiten definitie +% Werkprocedure buiten description -\def\dodosteldoorspringenin[#1][#2]% +\def\dodosetupindentations[#1][#2]% {\getparameters[\??ds#1][#2]} -\def\dosteldoorspringenin[#1][#2]% +\def\dosetupindentations[#1][#2]% {\ConvertToConstant\doifelse{#2}{} - {\dodosteldoorspringenin[][#1]} - {\dodoubleargumentwithset\dodosteldoorspringenin[#1][#2]}} + {\dodosetupindentations[][#1]} + {\dodoubleargumentwithset\dodosetupindentations[#1][#2]}} + +\def\setupindentations + {\dodoubleempty\dosetupindentations} -\def\steldoorspringenin - {\dodoubleempty\dosteldoorspringenin} +% what to do with this \def\startdoorspringen - {\witruimte - \@@dsvoor - \dosomebreak{\goodbreak}% \pagina[\v!voorkeur] + {\whitespace + \@@dsbefore + \dosomebreak\goodbreak % \page[\v!preference] \begingroup \parskip\zeropoint\relax} \def\stopdoorspringen {\endgroup - \@@dsna} + \@@dsafter} -\def\dododoorspringen#1#2#3% +% + +\def\dododefineindenting#1#2#3% {\par - \getvalue{\??ds#1\c!voor}% + \getvalue{\??ds#1\c!before}% \begingroup - \doifvaluenothing{\??ds#1\c!monster} - {\setvalue{\??ds#1\c!monster}% - {\getvalue{\??ds#1\c!tekst}}}% + \doifvaluenothing{\??ds#1\c!sample} + {\setvalue{\??ds#1\c!sample}% + {\getvalue{\??ds#1\c!text}}}% \assignwidth {\!!widtha} - {\getvalue{\??ds#1\c!breedte}} + {\getvalue{\??ds#1\c!width}} {\doattributes - {\??ds#1}\c!kopletter\c!kopkleur - {\getvalue{\??ds#1\c!monster}\getvalue{\??ds#1\c!scheider}}} - {\getvalue{\??ds#1\c!afstand}}% - \advance\!!widtha \getvalue{\??ds#1\c!afstand}% + {\??ds#1}\c!headstyle\c!headcolor + {\getvalue{\??ds#1\c!sample}\getvalue{\??ds#1\c!separator}}} + {\getvalue{\??ds#1\c!distance}}% + \advance\!!widtha \getvalue{\??ds#1\c!distance}% \setbox2\hbox to \!!widtha {\doattributes - {\??ds#1}\c!kopletter\c!kopkleur + {\??ds#1}\c!headstyle\c!headcolor {\strut - \getvalue{\??ds#1\c!tekst}% + \getvalue{\??ds#1\c!text}% \hss - \getvalue{\??ds#1\c!scheider}% - \hskip\getvalue{\??ds#1\c!afstand}}}% + \getvalue{\??ds#1\c!separator}% + \hskip\getvalue{\??ds#1\c!distance}}}% \parindent\zeropoint \hskip#2\!!widtha\indent\box2% \hangindent#3\!!widtha - \doattributes{\??ds#1}\c!letter\c!kleur\empty + \doattributes{\??ds#1}\c!style\c!color\empty \AfterPar% must be redone {\endgroup - \getvalue{\??ds#1\c!na}}% + \getvalue{\??ds#1\c!after}}% \GetPar} -\def\dodoorspringen[#1][#2]% +\def\dodefineindenting[#1][#2]% {\copyparameters[\??ds#1][\??ds] - [\c!tekst,\c!scheider,\c!breedte,\c!letter,\c!kleur, - \c!kopletter,\c!monster,\c!voor,\c!na,\c!afstand]% + [\c!text,\c!separator,\c!width,\c!style,\c!color, + \c!headstyle,\c!sample,\c!before,\c!after,\c!distance]% \getparameters[\??ds#1][#2]% - \setvalue{#1}% - {\dododoorspringen{#1}{0}{1}}% - \setvalue{\v!sub#1}% - {\dododoorspringen{#1}{1}{2}}% - \setvalue{\v!sub\v!sub#1}% - {\dododoorspringen{#1}{2}{3}}} - -\def\doorspringen% - {\dodoubleargumentwithset\dodoorspringen} - -% \def\dodoorlabel[#1][#2]% -% {\getvalue{\s!number#1\c!voor}% -% \bgroup -% \doifvalue{\s!number#1\c!plaats}{\v!marge} -% {\setvalue{\s!number#1\c!plaats}{\v!inmarge}}% -% \doattributes{\s!number#1}\c!kopletter\c!kopkleur -% {\getvalue{\e!volgende#1}[#2]}% -% \egroup -% \getvalue{\s!number#1\c!na}}% -% -% \def\dovolgendedoorlabel[#1][#2]% -% {\volgendenummer[#1][\s!lab][#2]} -% -% \def\dodoorlabelen[#1][#2]% -% {\definieernummer -% [#1][\c!voor=,\c!na=,\c!kopletter=,\c!wijze=\@@nrwijze,#2]% -% \setvalue {#1}{\dodoubleempty\dodoorlabel[#1]}% -% \setvalue{\s!reset #1}{\resetnumber[#1]}% -% \setvalue{\e!verhoog #1}{\verhoognummer[#1]}% -% \setvalue{\e!volgende#1}{\dodoubleempty\dovolgendedoorlabel[#1]}% -% \setvalue{\c!huidige #1}{\huidigenummer[#1]}} -% -% \def\doorlabelen% -% {\dodoubleargumentwithset\dodoorlabelen} + \setvalue {#1}{\dododefineindenting{#1}{0}{1}}% + \setvalue {\v!sub#1}{\dododefineindenting{#1}{1}{2}}% + \setvalue{\v!sub\v!sub#1}{\dododefineindenting{#1}{2}{3}}} -\def\dodoorlabel[#1][#2]% - {\getvalue{\??lb#1\c!voor}% - \getvalue{\??lb#1\c!commando}% - {\doattributes{\??lb#1}\c!kopletter\c!kopkleur - {\dotextprefix{\getvalue{\??lb#1\c!tekst}}% - \getvalue{\e!volgende#1}[#2]}}% - \getvalue{\??lb#1\c!na}}% - -\def\dovolgendedoorlabel[#1][#2]% - {\volgendenummer[#1][\s!lab][#2]} +\def\defineindenting + {\dodoubleargumentwithset\dodefineindenting} + +\def\definelabel + {\dodoubleargumentwithset\dodefinelabel} -\def\dodoorlabelen[#1][#2]% +\def\dodefinelabel[#1][#2]% {\getparameters [\??lb#1] - [\c!wijze=\@@nrwijze,\c!commando=,\c!plaats=,#2]% + [\c!way=\@@nrway,\c!command=,\c!location=,#2]% % downward compatible \processaction - [\getvalue{\??lb#1\c!plaats}] - [ \v!inmarge=>\setvalue{\??lb#1\c!commando}{\inmarge }, - \v!inlinker=>\setvalue{\??lb#1\c!commando}{\inlinker }, - \v!inrechter=>\setvalue{\??lb#1\c!commando}{\inrechter}, - \v!marge=>\setvalue{\??lb#1\c!commando}{\inmarge }]% + [\getvalue{\??lb#1\c!location}] + [ \v!inmargin=>\setvalue{\??lb#1\c!command}{\inmargin}, + \v!inleft=>\setvalue{\??lb#1\c!command}{\inleft }, + \v!inright=>\setvalue{\??lb#1\c!command}{\inright }, + \v!margin=>\setvalue{\??lb#1\c!command}{\inmargin}]% % inefficient, we need to redesign this command - \definieernummer + \definenumber [#1] - [\c!wijze=\getvalue{\??lb#1\c!wijze}]% + [\c!way=\getvalue{\??lb#1\c!way}]% % generated commands - \setvalue {#1}{\dodoubleempty\dodoorlabel[#1]}% - \setvalue{\s!reset #1}{\resetnumber[#1]}% - \setvalue{\e!verhoog #1}{\verhoognummer[#1]}% - \setvalue{\e!volgende#1}{\dodoubleempty\dovolgendedoorlabel[#1]}% - \setvalue{\c!huidige #1}{\huidigenummer[#1]}} - -\def\doorlabelen - {\dodoubleargumentwithset\dodoorlabelen} + \setvalue {#1}{\dodoubleempty\do@@label[#1]}% + \setvalue{\s!reset #1}{\resetnumber[#1]}% + \setvalue{\e!increment#1}{\incrementnumber[#1]}% + \setvalue{\e!next #1}{\dodoubleempty\do@@nextlabel[#1]}% + \setvalue{\c!current #1}{\currentnumber[#1]}} % todo + +\def\do@@label[#1][#2]% + {\getvalue{\??lb#1\c!before}% + \getvalue{\??lb#1\c!command}% + {\doattributes{\??lb#1}\c!headstyle\c!headcolor + {\dotextprefix{\getvalue{\??lb#1\c!text}}% + \getvalue{\e!next#1}[#2]}}% + \getvalue{\??lb#1\c!after}}% + +\def\do@@nextlabel[#1][#2]% + {\nextnumber[#1][\s!lab][#2]} -\steldoordefinierenin - [\c!plaats=\v!links, - \c!kopletter=\v!vet, - \c!letter=\v!normaal, - \c!kleur=, - \c!kopkleur=, - \c!breedte=8em, - \c!afstand=0pt, +\setupdescriptions + [\c!location=\v!left, + \c!headstyle=\v!bold, + \c!style=\v!normal, + \c!color=, + \c!headcolor=, + \c!width=8em, + \c!distance=0pt, \c!hang=, - \c!monster=, - \c!uitlijnen=, - \c!marge=\v!nee, - \c!voor=\blanko, - \c!tussen=\blanko, - \c!na=\blanko, - \c!springvolgendein=\v!ja, - \c!inspringen=\v!nooit, - \c!commando=] - -\steldoornummerenin - [\c!plaats=\v!boven, - \c!kopletter=\v!vet, - \c!kopkleur=, - \c!letter=\v!normaal, - \c!kleur=, - \c!breedte=8em, - \c!afstand=0pt, + \c!sample=, + \c!align=, + \c!margin=\v!no, + \c!before=\blank, + \c!inbetween=\blank, + \c!after=\blank, + \c!indentnext=\v!yes, + \c!indenting=\v!never, + \c!command=] + +\setupenumerations + [\c!location=\v!top, + \c!headstyle=\v!bold, + \c!headcolor=, + \c!style=\v!normal, + \c!color=, + \c!width=8em, + \c!distance=0pt, \c!hang=, - \c!monster=, - \c!uitlijnen=, - \c!marge=\v!nee, - \c!voor=\blanko, - \c!tussen=\blanko, - \c!na=\blanko, - \c!springvolgendein=\v!ja, - \c!inspringen=\v!nooit, - \c!tekst=, - \c!niveaus=3, % to be upward compatible - \c!conversie=, % to be upward compatible - \c!wijze=\v!per\v!tekst, - \c!sectienummer=\v!ja, - \c!scheider=., - \c!afsluiter=, - \c!nummer=, - \c!commando=] - -\steldoorspringenin - [\c!letter=\v!normaal, - \c!kopletter=\v!normaal, - \c!kleur=, - \c!kopkleur=, - \c!breedte=\v!passend, - \c!tekst=\unknown, - \c!monster=, - \c!voor=\blanko, - \c!na=\blanko, - \c!afstand=1em, - \c!scheider={ :}] + \c!sample=, + \c!align=, + \c!margin=\v!no, + \c!before=\blank, + \c!inbetween=\blank, + \c!after=\blank, + \c!indentnext=\v!yes, + \c!indenting=\v!never, + \c!text=, + \c!levels=3, % to be upward compatible + \c!conversion=, % to be upward compatible + \c!way=\v!by\v!text, + \c!sectionnumber=\v!yes, + \c!separator=., + \c!stopper=, + \c!number=, + \c!command=] + +\setupindentations + [\c!style=\v!normal, + \c!headstyle=\v!normal, + \c!color=, + \c!headcolor=, + \c!width=\v!fit, + \c!text=\unknown, + \c!sample=, + \c!before=\blank, + \c!after=\blank, + \c!distance=1em, + \c!separator={ :}] \protect \endinput diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex index acd77e496..fa47c0639 100644 --- a/tex/context/base/core-fig.tex +++ b/tex/context/base/core-fig.tex @@ -181,21 +181,20 @@ %D The next values are set: %D -%D \startopsomming[opelkaar] +%D \startitemize[packed] %D \sym 0 the dimensions are not found %D \sym 1 the dimensions are not preset at all %D \sym 2 the dimensions are taken from other %D \sym 3 the dimensions are taken from figure %D \sym 4 the dimensions are taken from texutil.tuf %D \sym 5 the dimensions are generated by texutil.tmp -%D \stopopsomming +%D \stopitemize %D %D In our search for the right file, that is, when no %D filetype is specified, we scan for the next set of files. %D As one can see, we prefer outlines over bitmaps. -\def\figuretypes% - {\c!eps,\c!mps,\c!pdf,\c!png,\c!jpg,\c!tif} % ,\c!tex,\c!tmp} % \c!mov +\def\figuretypes{\c!eps,\c!mps,\c!pdf,\c!png,\c!jpg,\c!tif} % ,\c!tex,\c!tmp} % \c!mov %D Instead of using a comma separated list, we could have use a %D faster alternative, but the current implementation is not @@ -319,7 +318,7 @@ \global\setbox\foundexternalfigure\vbox {\insidefloattrue \forgetall - \blanko[\v!blokkeer]% niet meer weg ! + \blank[\v!disable]% niet meer weg ! \startreadingfile \readfile{#1}\donothing\donothing \stopreadingfile @@ -350,7 +349,7 @@ \doifdefinedelse{\@@dogetfiguresize\@@efcurrenttype} {\executedtrue \getvalue{\@@dogetfiguresize\@@efcurrenttype}% - \@@efcurrentfile\@@efpagina + \@@efcurrentfile\@@efpage \!!widtha\!!heighta\!!widthb\!!heightb} \executedfalse \ifexecuted @@ -585,38 +584,38 @@ % bools gebruiken \def\setnaturalfiguresize - {\doifsomething\@@efbreedte - {\global\figwid\@@efbreedte}% - \doifsomething\@@efhoogte - {\global\fighei\@@efhoogte}% - \doifsomething\@@efschaal - {\figxsca\@@efschaal - \figysca\@@efschaal}} + {\doifsomething\@@efwidth + {\global\figwid\@@efwidth}% + \doifsomething\@@efheight + {\global\fighei\@@efheight}% + \doifsomething\@@efscale + {\figxsca\@@efscale + \figysca\@@efscale}} \def\setfactorfiguresize - {\doifinsetelse\@@effactor{\v!max,\v!passend,\v!ruim} + {\doifinsetelse\@@effactor{\v!max,\v!fit,\v!broad} {\doapplyfiguresize \ifdim\@@epw>\@@eph\relax - \docalculatefigurenorm\figwid\@@effactor\@@efmaxbreedte\hsize\@@efhsize + \docalculatefigurenorm\figwid\@@effactor\@@efmaxwidth\hsize\@@efhsize \docalculatefigurescales\figwid\@@epw\fighei\@@eph \else - \docalculatefigurenorm\fighei\@@effactor\@@efmaxhoogte\figurevsize\@@efvsize + \docalculatefigurenorm\fighei\@@effactor\@@efmaxheight\figurevsize\@@efvsize \docalculatefigurescales\fighei\@@eph\figwid\@@epw \fi \!!doneatrue} - {\doifinsetelse\@@efhfactor{\v!max,\v!passend,\v!ruim} + {\doifinsetelse\@@efhfactor{\v!max,\v!fit,\v!broad} {\doapplyfiguresize - \docalculatefigurenorm\fighei\@@efhfactor\@@efmaxhoogte\figurevsize\@@efvsize + \docalculatefigurenorm\fighei\@@efhfactor\@@efmaxheight\figurevsize\@@efvsize \docalculatefigurescales\fighei\@@eph\figwid\@@epw \!!doneatrue} - {\doifinsetelse\@@efbfactor{\v!max,\v!passend,\v!ruim} + {\doifinsetelse\@@efwfactor{\v!max,\v!fit,\v!broad} {\doapplyfiguresize - \docalculatefigurenorm\figwid\@@efbfactor\@@efmaxbreedte\hsize\@@efhsize + \docalculatefigurenorm\figwid\@@efwfactor\@@efmaxwidth\hsize\@@efhsize \docalculatefigurescales\figwid\@@epw\fighei\@@eph \!!doneatrue} % max ??? - {\docalculatefigurenorm\fighei\@@effactor \@@efhoogte \teksthoogte\@@efvsize - \docalculatefigurenorm\fighei\@@efhfactor\@@efhoogte \teksthoogte\@@efvsize - \docalculatefigurenorm\figwid\@@efbfactor\@@efbreedte\hsize\hsize + {\docalculatefigurenorm\fighei\@@effactor \@@efheight \textheight\@@efvsize + \docalculatefigurenorm\fighei\@@efhfactor\@@efheight \textheight\@@efvsize + \docalculatefigurenorm\figwid\@@efwfactor\@@efwidth\hsize\hsize \!!doneafalse}}}% \if!!donea \ifdim\figwid>\@@efhsize\relax @@ -629,35 +628,26 @@ \fi} \def\setscalefiguresize - {\doifsomething\@@efschaal + {\doifsomething\@@efscale {\doapplyfigurescale\figwid\@@epw\figxsca \doapplyfigurescale\fighei\@@eph\figysca \global\figwid\zeropoint \global\fighei\zeropoint - \doifelsenothing\@@efmaxbreedte - {\doifsomething\@@efmaxhoogte - {\ifdim\@@eph>\@@efmaxhoogte - \global\fighei\@@efmaxhoogte + \doifelsenothing\@@efmaxwidth + {\doifsomething\@@efmaxheight + {\ifdim\@@eph>\@@efmaxheight + \global\fighei\@@efmaxheight \fi}} - {\ifdim\@@epw>\@@efmaxbreedte - \global\figwid\@@efmaxbreedte + {\ifdim\@@epw>\@@efmaxwidth + \global\figwid\@@efmaxwidth \fi}}} -% \def\dosetdimensionfiguresize#1#2#3% -% {#1\relax -% \doifsomething\@@efmaxbreedte -% {\ifdim\figwid>\@@efmaxbreedte\global\figwid\@@efmaxbreedte#2\relax\fi}% -% \doifsomething\@@efmaxhoogte -% {\ifdim\fighei>\@@efmaxhoogte \global\fighei\@@efmaxhoogte #3\relax\fi}} - \let\@@efgrid\empty \def\dosetdimensionfiguresize#1#2#3% {#1\relax - \doifsomething\@@efmaxbreedte - {\ifdim\figwid>\@@efmaxbreedte\global\figwid\@@efmaxbreedte#2\relax\fi}% - \doifsomething\@@efmaxhoogte - {\ifdim\fighei>\@@efmaxhoogte \global\fighei\@@efmaxhoogte #3\relax\fi}} + \doifsomething\@@efmaxwidth {\ifdim\figwid>\@@efmaxwidth \global\figwid\@@efmaxwidth #2\relax\fi}% + \doifsomething\@@efmaxheight{\ifdim\fighei>\@@efmaxheight\global\fighei\@@efmaxheight#3\relax\fi}} \def\setdimensionfiguresize {\ifdim\figwid>\zeropoint\relax @@ -697,14 +687,14 @@ {\getparameters[\??ex][#1]% \getparameters[\??ef][#1]% dangerous for figs with backgrounds \checkfiguresettings - \doifelsenothing\@@explaats % fig file paths + \doifelsenothing\@@exlocation % fig file paths {\scratchcounter\plusthree} {\doifelsenothing\@@exfile % tuf file paths {\scratchcounter\plusthree} {\scratchcounter\zerocount - \ExpandBothAfter\doifinset\v!lokaal\@@explaats + \ExpandBothAfter\doifinset\v!local\@@exlocation {\advance\scratchcounter\plusone}% - \ExpandBothAfter\doifinset\v!globaal\@@explaats + \ExpandBothAfter\doifinset\v!global\@@exlocation {\advance\scratchcounter\plustwo}}}% \chardef\figurefilemode\scratchcounter\relax \ifcase\figurefilemode @@ -712,11 +702,11 @@ \or % lokaal \let\figurepathlist\f!currentpath \or % globaal - \let\figurepathlist\@@exgebied + \let\figurepathlist\@@exdirectory \or % lokaal,globaal / non empty gebied - \edef\figurepathlist{\f!currentpath\ifx\@@exgebied\empty\else,\fi\@@exgebied}% + \edef\figurepathlist{\f!currentpath\ifx\@@exdirectory\empty\else,\fi\@@exdirectory}% \fi - \ExpandBothAfter\doifinset\v!default\@@explaats + \ExpandBothAfter\doifinset\v!default\@@exlocation {\edef\figurepathlist{\figurepathlist,}}% default tex path search \ifx\@@exfile\empty \chardef\figurefilemode\zerocount @@ -726,32 +716,32 @@ \def\resetexternalfigures {\setupexternalfigures - [\c!optie=,\c!maxbreedte=,\c!maxhoogte=, - %\c!splitskleur=,% needed ? - \c!voorgrondkleur=, - \c!kader=\v!uit,\c!achtergrond=]} + [\c!option=,\c!maxwidth=,\c!maxheight=, + %\c!splitcolor=,% needed ? + \c!foregroundcolor=, + \c!frame=\v!off,\c!background=]} %D Since we only need to reset some parameters, we can %D better use a faster alternative: \def\resetexternalfigures {\getparameters[\??ef] - [\c!optie=,\c!maxbreedte=,\c!maxhoogte=, - %\c!splitskleur=,% needed ? - \c!voorgrondkleur=, - \c!kader=\v!uit,\c!achtergrond=]} + [\c!option=,\c!maxwidth=,\c!maxheight=, + %\c!splitcolor=,% needed ? + \c!foregroundcolor=, + \c!frame=\v!off,\c!background=]} %D This one dropped the runtime of the \MAPS\ bibliography %D from over 110 seconds down to less than 105 seconds. The %D tremendously faster (but uglier) implementation is: \def\resetexternalfigures - {\let\@@efoptie \empty - \let\@@efmaxbreedte \empty - \let\@@efmaxhoogte \empty - \let\@@efkader \v!uit - \let\@@efvoorgrondkleur\empty - \let\@@efachtergrond \empty} + {\let\@@efoption \empty + \let\@@efmaxwidth \empty + \let\@@efmaxheight \empty + \let\@@efframe \v!off + \let\@@efforegroundcolor\empty + \let\@@efbackground \empty} % The following code will move: @@ -764,11 +754,11 @@ {\processaction [#2] [ \v!max=>\global#1=#4\relax, - \v!passend=>\global#1=#5\relax, - \v!ruim=>\global#1=#5\relax - \global\advance #1 -4\@@exkorps\relax, + \v!fit=>\global#1=#5\relax, + \v!broad=>\global#1=#5\relax + \global\advance #1 -4\@@exbodyfont\relax, \s!default=>\doifsomething{#3}{\global#1=#3\relax}, - \s!unknown=>\global#1=\@@exkorps\relax + \s!unknown=>\global#1=\@@exbodyfont\relax \global\divide#1 \!!ten\relax \global\multiply#1 #2\relax]} @@ -795,10 +785,10 @@ \def\doapplyfigurescale#1#2#3% {\global#1=#2\relax - \ifcase0\@@efschaal\relax % beter: doifnum... + \ifcase0\@@efscale\relax % beter: doifnum... #3=\plusthousand \else - #3=\@@efschaal + #3=\@@efscale \fi\relax % important ! \ifnum#3=\plusthousand\else \global\divide #1 \plusthousand @@ -821,11 +811,11 @@ {#3\dimexpr(#1/\dimexpr(#2/\plusthousand))} \def\doapplyfigurescale#1#2#3% - {% #3=\ifnum0\number\@@efschaal=\zerocount\plusthousand\else\@@efschaal\fi - \ifcase0\@@efschaal\relax % @@efschaal kan empty zijn + {% #3=\ifnum0\number\@@efscale=\zerocount\plusthousand\else\@@efscale\fi + \ifcase0\@@efscale\relax % @@efschaal kan empty zijn #3=\plusthousand \else - #3=\@@efschaal + #3=\@@efscale \fi\relax % important ! \global#1\ifnum#3=\plusthousand#2\else\dimexpr(#3\dimexpr(#2/\plusthousand))\fi \relax} @@ -835,36 +825,36 @@ \newdimen\figurevsize % we cannot manipulate any global vsize ! \def\doapplyfiguresize - {\doifelsenothing\@@efmaxhoogte - {\figurevsize\teksthoogte + {\doifelsenothing\@@efmaxheight + {\figurevsize\textheight \ifinner - \figurevsize \vsize % \teksthoogte =\vsize - \scratchdimen\vsize % \scratchdimen=\teksthoogte + \figurevsize \vsize % \textheight =\vsize + \scratchdimen\vsize % \scratchdimen=\textheight \else\ifinsidefloat - \figurevsize \vsize % \teksthoogte =\vsize - \scratchdimen\vsize % \scratchdimen=\teksthoogte + \figurevsize \vsize % \textheight =\vsize + \scratchdimen\vsize % \scratchdimen=\textheight \else\ifinpagebody - \figurevsize \vsize % \teksthoogte =\vsize - \scratchdimen\vsize % \scratchdimen=\teksthoogte + \figurevsize \vsize % \textheight =\vsize + \scratchdimen\vsize % \scratchdimen=\textheight \else % hm, there should be an option to force this \ifdim\pagegoal<\maxdimen \ifdim\pagetotal<\pagegoal \scratchdimen\pagegoal \advance\scratchdimen -\pagetotal \else - \scratchdimen\figurevsize % \teksthoogte + \scratchdimen\figurevsize % \textheight \fi \else - \scratchdimen\figurevsize % \teksthoogte + \scratchdimen\figurevsize % \textheight \fi \fi\fi\fi} - {\figurevsize\@@efmaxhoogte}% - \doifelsenothing\@@efhoogte + {\figurevsize\@@efmaxheight}% + \doifelsenothing\@@efheight {\edef\@@efvsize{\the\scratchdimen}} - {\let\@@efvsize\@@efhoogte}% - \doifelsenothing\@@efbreedte + {\let\@@efvsize\@@efheight}% + \doifelsenothing\@@efwidth {\edef\@@efhsize{\the\hsize}} - {\let\@@efhsize\@@efbreedte}} + {\let\@@efhsize\@@efwidth}} % \def\convertfigureinsertscale#1#2#3#4% % {\scratchdimen#1\relax @@ -906,13 +896,13 @@ \def\presetundefinedfigure#1% {\let\@@eftype #1% \let\@@efextension #1% - \let\@@efobject \v!nee - \let\@@efpreset \v!nee - \ifx\@@efbreedte\empty - \def\@@efbreedte{8\lineheight}% 4cm + \let\@@efobject \v!no + \let\@@efpreset \v!no + \ifx\@@efwidth\empty + \def\@@efwidth{8\lineheight}% 4cm \fi - \ifx\@@efhoogte\empty - \def\@@efhoogte{6\lineheight}% 3cm + \ifx\@@efheight\empty + \def\@@efheight{6\lineheight}% 3cm \fi} \def\presetfiguremov{\presetundefinedfigure\c!mov} @@ -942,16 +932,20 @@ % need to patch texutil. \def\checkfiguresettings - {\doifsomething\@@efregels - {\scratchdimen\@@efregels\lineheight - \edef\@@efhoogte{\the\scratchdimen}}} + {\doifsomething\@@eflines + {\scratchdimen\@@eflines\lineheight + \edef\@@efheight{\the\scratchdimen}}} \chardef\splitexternalfigure=0 % 0 nosplit 1 split/yes 2 split/no \newif\ifgridfigure +% the preset for mov/avi should move to the driver +% +% this whole mess needs a clean up anyway + \def\calculateexternalfigure[#1][#2][#3][#4][#5][#6]% - {\mindermeldingen + {\dontcomplain \setupexternalfigures \the\externalfigureresets % hook, see resource libraries \global\figwid\zeropoint \figxsca\plusone % see note * @@ -983,41 +977,47 @@ \c!t=,\c!s=,\c!a=,\c!f=\@@effilename]% \getparameters [\??ef] - [\c!type=\s!unknown,\c!methode=\@@eftype,\c!symbool=\v!nee, - \c!object=\@@exobject,\c!preset=\v!ja, - \c!pagina=0,\c!sturing=\v!nee,\c!preview=\v!nee,\c!herhaal=\v!nee, - \c!maxbreedte=\@@exmaxbreedte,\c!maxhoogte=\@@exmaxhoogte, - \c!schaal=,\c!breedte=,\c!hoogte=,\c!scherm=,\c!regels=,\c!grid=, - %\c!voorgrondkleur=, - \c!splitsen=, - \c!factor=,\c!hfactor=,\c!bfactor=]% + [\c!type=\s!unknown,\c!method=\@@eftype,\c!symbol=\v!no, + \c!object=\@@exobject,\c!preset=\v!yes,\c!split=,\c!size=, + \c!page=0,\c!controls=\v!no,\c!preview=\v!no,\c!repeat=\v!no, + \c!maxwidth=\@@exmaxwidth,\c!maxheight=\@@exmaxheight, + \c!scale=,\c!width=,\c!height=,\c!display=,\c!lines=,\c!grid=, + %\c!foregroundcolor=, + \c!factor=,\c!hfactor=,\c!wfactor=]% \doif\@@efextension\c!mov\presetfiguremov \doif\@@efextension\c!avi\presetfigureavi #1[#4][#5][#6]% + % new, somehow needed when \textwidth is used: + \doifsomething\@@efmaxwidth {\freezedimenmacro\@@efmaxwidth }% + \doifsomething\@@efmaxheight{\freezedimenmacro\@@efmaxheight}% % lines -> height \checkfiguresettings + % new + \doifinsetelse\@@efsize{mediabox,cropbox,artbox,bleedbox,trimbox} + {\let\@@DriverImageBox\@@efsize}% + {\let\@@DriverImageBox\empty}% % new, color separation \doifseparatingcolorselse - {\let\@@efvoorgrondkleur\empty - \doifelsenothing\@@efsplitsen + {\let\@@efforegroundcolor\empty + \doifelsenothing\@@efsplit {\chardef\splitexternalfigure0} - {\doifcolorchannelelse\@@efsplitsen - {\let\@@efobject\v!nee % ? + {\doifcolorchannelelse\@@efsplit + {\let\@@efobject\v!no % ? \chardef\splitexternalfigure1} {\chardef\splitexternalfigure2}}} {\chardef\splitexternalfigure0}% \relax % ends \chardef % new, fake color in gray bitmaps - \doifsomething\@@efvoorgrondkleur + \doifsomething\@@efforegroundcolor {\getparameters[\??ef] - [\c!achtergrond={\v!voorgrond,\v!kleur}, - \c!achtergrondkleur=\@@efvoorgrondkleur]}% + [\c!background={\v!foreground,\v!color}, + \c!backgroundcolor=\@@efforegroundcolor]}% % - \doif\@@efreset\v!ja \resetexternalfigures + \doif\@@efreset\v!yes \resetexternalfigures \doif\@@eftype \c!mov\presetfiguremov \doif\@@eftype \c!avi\presetfigureavi % hack - \doif\@@efmethode\c!mov + \doif\@@efmethod\c!mov {\doifsomething\@@efextension{\presetundefinedfigure\@@efextension}}% % \doif\@@eftype\v!buffer @@ -1040,10 +1040,10 @@ % Since tex code can have positional stuff and worse, % we want to avoid interference with how objects end % up in files, therefore: - \let\@@efobject\v!nee + \let\@@efobject\v!no \fi - \edef\@@efobjectname{\@@effilename-\@@eftype-\@@efextension-\@@efpagina}% - \doifelse\@@efobject\v!nee + \edef\@@efobjectname{\@@effilename-\@@eftype-\@@efextension-\@@efpage}% + \doifelse\@@efobject\v!no \donefalse {\doifspecialavailableelse\dostartscaling {\doifobjectssupportedelse @@ -1089,7 +1089,7 @@ \edef\@@effullname{\@@effilename.\@@efextension}% \def\figureextension##1{\@@efextension}% \fi}% - \doifelse\@@efpreset\v!nee + \doifelse\@@efpreset\v!no {\doifelse\@@eftype\s!unknown {\chardef\figurestatus0 \let\@@eftype\figuretypes @@ -1116,12 +1116,12 @@ \edef\@@efextension{\figureextension{\@@eftype}}% dirty trick \global\figwid\zeropoint \figxsca\plusone \global\fighei\zeropoint \figysca\plusone - \doif\v!kader\@@exoptie - {\let\@@efkader\v!aan}% + \doif\v!frame\@@exoption + {\let\@@efframe\v!on}% \fi \ifcase\figurestatus - \let\@@efkader\v!aan - \let\@@efobject\v!nee + \let\@@efframe\v!on + \let\@@efobject\v!no \showmessage\m!figures1{\@@effilename}% \or \showmessage\m!figures2{\@@effullname}% @@ -1132,7 +1132,7 @@ \or \showmessage\m!figures5{\@@effullname,\@@efloadname}% \or % no message - \doifnot\@@efsymbool\v!ja + \doifnot\@@efsymbol\v!yes {\showmessage\m!figures8{\@@effullname}}% \fi \ifdim\@@epw=\zeropoint \chardef\figurestatus1 \fi @@ -1142,7 +1142,7 @@ \setnaturalfiguresize \xdef\naturalfigurewidth{\the\figwid}% \xdef\naturalfigureheight{\the\fighei}% - \let\@@efkader\v!uit + \let\@@efframe\v!off \else \global\let\naturalfigurewidth\@@epw \global\let\naturalfigureheight\@@eph @@ -1151,26 +1151,26 @@ \setdimensionfiguresize \processaction [\@@efgrid] - [ \v!ja=>\getnoflines\fighei - \edef\@@efhoogte{\the\noflines\lineheight}% + [ \v!yes=>\getnoflines\fighei + \edef\@@efheight{\the\noflines\lineheight}% \global\gridfiguretrue, - \v!hoogte=>\getrawnoflines\fighei + \v!height=>\getrawnoflines\fighei \scratchdimen\noflines\lineheight \advance\scratchdimen\strutdepth - \edef\@@efhoogte{\the\scratchdimen}% + \edef\@@efheight{\the\scratchdimen}% \global\gridfiguretrue, - \v!diepte=>\getrawnoflines\fighei + \v!depth=>\getrawnoflines\fighei \scratchdimen\noflines\lineheight \advance\scratchdimen-\strutdepth - \edef\@@efhoogte{\the\scratchdimen}% + \edef\@@efheight{\the\scratchdimen}% \global\gridfiguretrue, - \v!halveregel=>\getrawnoflines\fighei + \v!halfline=>\getrawnoflines\fighei \scratchdimen\noflines\lineheight \advance\scratchdimen+.5\lineheight - \edef\@@efhoogte{\the\scratchdimen}% + \edef\@@efheight{\the\scratchdimen}% \global\gridfiguretrue, - \v!passend=>\getrawnoflines\fighei - \edef\@@efhoogte{\the\noflines\lineheight}% + \v!fit=>\getrawnoflines\fighei + \edef\@@efheight{\the\noflines\lineheight}% \global\gridfiguretrue]% \ifgridfigure \setfactorfiguresize @@ -1184,31 +1184,32 @@ \message {\externalfigurelog [\@@effullname: - t={\@@eftype}\space m={\@@efmethode}\space l=\@@eflabel\space + t={\@@eftype}\space m={\@@efmethod}\space l=\@@eflabel\space w=\number\figwid\space h=\number\fighei\space \c!sx=\scax\space\c!sy=\scay\space ox=\figx\space oy=\figy]}% \fi - \doif\v!leeg\@@exoptie + \doif\v!empty\@@exoption {\skipexternalfigurestrue - \let\@@efkader\v!uit}% ? ? - \doifelsenothing\@@efpagina % NIEUW ?? + \let\@@efframe\v!off}% ? ? + \doifelsenothing\@@efpage % NIEUW ?? {\let\@@efoptions\empty} - {\let\@@efoptions\@@efpagina}% - \doif\@@efpreview\v!ja{\addtocommalist\v!preview\@@efoptions}% - \doif\@@efsturing\v!ja{\addtocommalist\v!sturing\@@efoptions}% - \doif\@@efherhaal\v!ja{\addtocommalist\v!herhaal\@@efoptions}% + {\let\@@efoptions\@@efpage}% + \doif\@@efpreview\v!yes{\addtocommalist\v!preview\@@efoptions}% + \doif\@@efcontrols\v!yes{\addtocommalist\v!controls\@@efoptions}% + \doif\@@efrepeat\v!yes{\addtocommalist\v!repeat\@@efoptions}% \doif\@@eftype\c!mps {\ifcase\EPSspecial\else\ifinobject\else \@@eftrace{special mps, object forced}% \doglobal\increment\forcedMPSobject \edef\@@efobjectname{\c!mps::\forcedMPSobject}% - \let\@@efobject\v!ja + \let\@@efobject\v!yes \fi\fi}% \global\let\lastfigureobjectname\@@efobjectname - \doifelse\@@efobject\v!nee + \doifelse\@@efobject\v!no \donefalse {\doifobjectssupportedelse\donetrue\donefalse}% + % this (for the moment) conveniently maps onto pdf which saves mapping \ifdone \doifobjectfoundelse{FIG}\@@efobjectname \donothing @@ -1225,12 +1226,12 @@ {\vfill \ifdim\wd\foundexternalfigure=\zeropoint \doinsertfile - {\@@eftype,\@@efmethode}{\@@effullname,\@@eflabel} + {\@@eftype,\@@efmethod}{\@@effullname,\@@eflabel} {100}{100}\@@epx\@@epy\@@epw\@@eph\@@efoptions \else\ifskipexternalfigures \ruledhbox {\backgroundline - [\@@efsplitskleur]{\fakebox\foundexternalfigure}}% + [\@@efsplitcolor]{\fakebox\foundexternalfigure}}% \else \box\foundexternalfigure \fi\fi}% @@ -1249,13 +1250,13 @@ \edef\scax{\withoutpt\the\scratchdimen}% \scratchdimen\scay\points\divide\scratchdimen \plushundred \edef\scay{\withoutpt\the\scratchdimen}% - %\schaal[\c!sx=\scax,\c!sy=\scay]{\dowithfigure{\getobject{FIG}{\@@efobjectname}}}% + %\scale[\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}}% \else\ifdim\wd\foundexternalfigure=\zeropoint \dowithfigure {\doinsertfile - {\@@eftype,\@@efmethode}{\@@effullname,\@@eflabel} + {\@@eftype,\@@efmethod}{\@@effullname,\@@eflabel} \scax\scay\figx\figy\figwid\fighei\@@efoptions}% \xdef\noffigurepages{\number\nofinsertpages}% \else @@ -1263,12 +1264,13 @@ \edef\scax{\withoutpt\the\scratchdimen}% \scratchdimen\scay\points\divide\scratchdimen \plushundred \edef\scay{\withoutpt\the\scratchdimen}% - %\schaal[\c!sx=\scax,\c!sy=\scay]{\dowithfigure{\box\foundexternalfigure}}% + %\scale[\c!sx=\scax,\c!sy=\scay]{\dowithfigure{\box\foundexternalfigure}}% \doscalenextbox\scax\scay\figwid\fighei{\dowithfigure{\box\foundexternalfigure}}% \xdef\noffigurepages{\number\nofinsertpages}% \fi\fi \global\let\appliedfigurexscale\scax \global\let\appliedfigureyscale\scay}% +\doresetobjects % clean up driver left overs \global\wd\foundexternalfigure\figwid \finalizeexternalfigure{#2}{\expandedfigurename}} @@ -1303,18 +1305,19 @@ \xdef\figurelabel {#1}% \xdef\figurefilename{#2}% \xdef\figurefiletype{\@@eftype}% - \xdef\figurefilepage{\@@efpagina}% + \xdef\figurefilepage{\@@efpage}% \global\setbox\foundexternalfigure\vbox {\forgetall \ifcase\figurestatus - \resetsystemmode\v!figuur + \resetsystemmode\v!figure \let\figurefiletype\empty \else - \setsystemmode \v!figuur % beter resource + \setsystemmode \v!figure % beter resource \fi \ifconditional\externalfigurelevel % probably background \ifskipexternalfigures % nothing +\fakebox\foundexternalfigure \else\ifcase\figurestatus % nothing \else\ifnum\splitexternalfigure=2\else @@ -1329,11 +1332,11 @@ \else\ifcase\figurestatus \externalfigurereplacement{#1}{#2}{unknown}% \else\ifnum\splitexternalfigure=2 - \backgroundline[\@@efsplitskleur] + \backgroundline[\@@efsplitcolor] {\fakebox\foundexternalfigure}% \else \the\externalfigurepostprocessors - \doifelse\@@efreset\v!ja + \doifelse\@@efreset\v!yes {\ht\foundexternalfigure\figureheight \dp\foundexternalfigure\zeropoint \wd\foundexternalfigure\figurewidth @@ -1341,13 +1344,13 @@ {\localframed % should also be applied to high res ! [\??ef] [\c!offset=\v!overlay, - \c!breedte=\figurewidth, - \c!hoogte=\figureheight] + \c!width=\figurewidth, + \c!height=\figureheight] {\vfilll \ifnum\splitexternalfigure=1 % hm, eigenlijk in dit geval achtergrondkleur \hidesplitcolorfalse % really needed - \backgroundline[\@@efsplitskleur] + \backgroundline[\@@efsplitcolor] {\box\foundexternalfigure}% \else % = 0, no split mode \box\foundexternalfigure @@ -1363,16 +1366,16 @@ \def\externalfigurereplacement#1#2#3% {\setupcolors - [\c!status=\v!lokaal]% + [\c!state=\v!local]% \expanded{\localframed [\??ef] - [\c!breedte=\figurewidth, - \c!hoogte=\figureheight, - \c!achtergrond=\v!raster, - \c!achtergrondraster=.8, - %\c!kader=\ifincolor\v!uit\else\v!aan\fi] - %\c!kader=\ifincolor\@@efkader\else\v!aan\fi]}% - \c!kader=\@@efkader]}% + [\c!width=\figurewidth, + \c!height=\figureheight, + \c!background=\v!screen, + \c!backgroundscreen=.8, + %\c!frame=\ifincolor\v!off\else\v!on\fi] + %\c!frame=\ifincolor\@@efframe\else\v!on\fi]}% + \c!frame=\@@efframe]}% {\tt\tfxx \nohyphens name: \expanded{\verbatimstring{#1}}\\% file: \expanded{\verbatimstring{#2}}\\% @@ -1393,7 +1396,7 @@ \def\appliedfigureshortname {\@@efcurrentpath/\@@effilename} \def\appliedfigurefullname {\@@efcurrentfile} \def\appliedfigureidentifier{\@@efobjectname} -\def\appliedfigureoptions {\@@efoptie} +\def\appliedfigureoptions {\@@efoption} %D In \PDF\ one can specify an alternative graphic. This means %D that for instance a low resolution graphic can be used for @@ -1412,15 +1415,15 @@ %D The next macro does not work well with figure bases yet. \def\calculateexternalscreenfigure[#1][#2][#3][#4][#5][#6]% - {\ifx\@@efscherm\empty\else - \doifnot\@@efobject\v!nee + {\ifx\@@efdisplay\empty\else + \doifnot\@@efobject\v!no {\doifobjectssupportedelse {\doifspecialavailableelse\doregisterfigure {\bgroup #1[#4][#5][#6]% \doregisterfigure{FIG}{\lastfigureobjectname}% - \let\@@ef@@scherm\@@efscherm - \calculateexternalfigure[#1][\@@ef@@scherm][\@@ef@@scherm][#4,\c!scherm=][#5][#6]% + \let\@@ef@@scherm\@@efdisplay + \calculateexternalfigure[#1][\@@ef@@scherm][\@@ef@@scherm][#4,\c!display=][#5][#6]% \egroup} {}} {}}% @@ -1440,7 +1443,7 @@ \def\dogetfiguredimensions[#1][#2]% {{\let\immediate\relax % very dirty but prevents flushing, will change - \setbox0\hbox{\externalfigure[#1][#2,\c!scherm=,\c!object=\v!nee]}}} + \setbox0\hbox{\externalfigure[#1][#2,\c!display=,\c!object=\v!no]}}} % use the next one when the object must be forgotten (xobj % nums can migrate to the next object; maybe it should @@ -1463,9 +1466,11 @@ \def\dodoplaceexternalfigure[#1][#2][#3][#4][#5][#6]% {\doifsomething{#3}% catches \defineexternalfigure dummies {\bgroup - \def\textunderscore{_}% brrr, temp hack +\pushmacro\textunderscore + \edef\textunderscore{\string_}% brrr, temp hack, still needed? \calculateexternalfigure[#1][#2][#3][#4][#5][#6]% \calculateexternalscreenfigure[#1][#2][#3][#4][#5][#6]% +\popmacro\textunderscore \box\foundexternalfigure \egroup}} @@ -1540,7 +1545,7 @@ \def\doexternalfigure[#1][#2][#3]% {\bgroup \doifelsenothing{#1} - {\framed[\c!breedte=8\lineheight,\c!hoogte=6\lineheight]{external\\figure}} + {\framed[\c!width=8\lineheight,\c!height=6\lineheight]{external\\figure}} {\doifundefinedelse{\??ef\??ef#1} {\useexternalfigure[\s!dummy][#1][#2][#3]% \getexternalfigure{\s!dummy}[#3]} @@ -1560,27 +1565,27 @@ \def\showexternalfigurea {\bgroup - \mindermeldingen + \dontcomplain \def\presetfigure[##1][##2]% - {\getvalue{\e!start\v!figuur\e!tekst}[\v!links][] - {\v!geen} + {\getvalue{\e!start\v!figure\e!text}[\v!left,\v!none][] + {} {\hbox - {\externalfigure[##1][\c!kader=\v!aan,\c!breedte=6cm][##2]% + {\externalfigure[##1][\c!frame=\v!on,\c!width=6cm][##2]% \tfskip - \framed[\c!breedte=\figurewidth,\c!hoogte=\figureheight]{}}}% - {\tfa ##1}% - \blanko + \framed[\c!width=\figurewidth,\c!height=\figureheight]{}}}% + {\tt\tfa\expanded{\asciistr{##1}}}% + \blank \tfx \def\docommando####1% {\beforesplitstring####1\at=\to\asciia \aftersplitstring ####1\at=\to\asciib \convertcommand\asciib\to\asciib - \doifsomething{\asciib} + \doifsomething\asciib {\hsmash{\hbox to .75em{\asciia\hss}: \asciib}\endgraf}}% \processcommalist[##2]\docommando \strut \endgraf - \getvalue{\e!stop\v!figuur\e!tekst}}% + \getvalue{\e!stop\v!figure\e!text}}% \pushendofline \readjobfile\@@exfile\donothing\donothing \popendofline @@ -1591,7 +1596,7 @@ \def\total{5}% \globalletempty\allfigures \doglobal\newcounter\figurecounter - \mindermeldingen + \dontcomplain \def\docommando##1{##1&}% \def\figurecaptions% {\crcr @@ -1606,7 +1611,7 @@ \advance\hsize -1em \externalfigure [##1] - [\c!kader=\v!aan,\c!factor=\v!max,\c!breedte=\hsize][##2]}% + [\c!frame=\v!on,\c!factor=\v!max,\c!width=\hsize][##2]}% \doglobal\addtocommalist{##1}\allfigures %\getvalue{\s!figurepreset}% \doglobal\increment\figurecounter @@ -1639,7 +1644,7 @@ \def\presetfigure[##1][##2]% {\getfiguredimensionsonly[##1]% \pagefigure[##1]% \immediate\write\scratchwrite - {registerfigure("##1",\figurewidth,\figureheight)}} + {registerfigure("##1",\figurewidth,\figureheight);}} \pushendofline \readjobfile\@@exfile\donothing\donothing \popendofline @@ -1669,16 +1674,16 @@ \def\doshowexternalfigures[#1]% {\bgroup - \setupcolors[\c!status=\v!start]% to prevent mps color conversion - \getparameters[\??ex][\c!variant=a,\c!offset=\!!zeropoint,#1]% - \getvalue{showexternalfigure\@@exvariant}% + \setupcolors[\c!state=\v!start]% to prevent mps color conversion + \getparameters[\??ex][\c!alternative=a,\c!offset=\!!zeropoint,#1]% + \getvalue{showexternalfigure\@@exalternative}% \egroup} \def\showexternalfigures {\dosingleempty\doshowexternalfigures} \def\overlayfigure#1% - {\externalfigure[#1][\c!breedte=\overlaywidth,\c!hoogte=\overlayheight]} + {\externalfigure[#1][\c!width=\overlaywidth,\c!height=\overlayheight]} %D Still undocumented! @@ -1707,10 +1712,10 @@ {\position(#2,#3)% {\setnostrut \framed - [\c!breedte=#5\efxsteps, - \c!hoogte=#6\exysteps, - \c!offset=\v!geen, - \c!kader=#1, + [\c!width=#5\efxsteps, + \c!height=#6\exysteps, + \c!offset=\v!none, + \c!frame=#1, ##1]% {##2}}}% \complexorsimpleempty\efdocomment} @@ -1721,10 +1726,10 @@ \def\efdomarker(#1,#2)#3#4% (h,b){kader}{tekst} {\framed - [\c!breedte=#1\efxsteps, - \c!hoogte=#2\efysteps, - \c!offset=\v!geen, - \c!kader=#3]% + [\c!width=#1\efxsteps, + \c!height=#2\efysteps, + \c!offset=\v!none, + \c!frame=#3]% {#4}} \def\effigure#1% @@ -1734,16 +1739,16 @@ {\bgroup \setnostrut \framed - [\c!breedte=#1\efxsteps, - \c!hoogte=#2\efysteps, + [\c!width=#1\efxsteps, + \c!height=#2\efysteps, \c!offset=\!!zeropoint, - \c!kader=#3] + \c!frame=#3] {#4}% \egroup} \def\efgoto(#1,#2)#3[#4]% (h,b)kader[ref] {\setbox0=\vbox{\efdoarea(#1,#2)#3{}}% - \naarbox{\copy0}[#4]} + \gotobox{\copy0}[#4]} \def\efmark(#1,#2)#3(#4,#5)#6[#7]% {\advance\efreference \plusone @@ -1751,7 +1756,7 @@ {\hbox{\the\efreference}}% \position(#1,#2) {\gotosomeinternal\s!vwb{#7}\realfolio - {\efdomarker(#4,#5)\v!aan{\thisissomeinternal\s!vwa{#7}}}}} + {\efdomarker(#4,#5)\v!on{\thisissomeinternal\s!vwa{#7}}}}} \def\eftext#1(#2,#3)#4(#5,#6)#7[#8]% {\advance\efreference \plusone @@ -1772,14 +1777,14 @@ {\def\docommando##1% {\color[##1] {\blackrule - [\c!breedte=2em, - \c!hoogte=1ex, - \c!diepte=\!!zeropoint]}% + [\c!width=2em, + \c!height=1ex, + \c!depth=\!!zeropoint]}% \endgraf}% - \global\setbox\colorbarbox=\vbox + \global\setbox\colorbarbox\vbox {\forgetall \processcommalist[#1]\docommando}% - \global\setbox\colorbarbox=\vbox + \global\setbox\colorbarbox\vbox {\hskip2em\box\colorbarbox}% \global\wd\colorbarbox\zeropoint} @@ -1792,10 +1797,10 @@ \startpositioning \def\referring(##1,##2)##3(##4,##5)##6[##7]% {\position(##1,##2) - {\efgoto(##4,##5){\@@exhokjes}[##7]}}% + {\efgoto(##4,##5){\@@exframes}[##7]}}% \def\marking(##1,##2)##3(##4,##5)##6[##7]% {\position(##1,##2) - {\efthisis(##4,##5){\@@exhokjes}[##7]}}% + {\efthisis(##4,##5){\@@exframes}[##7]}}% \def\remark% {\efnocomment}% \def\colorbar##1[##2]% @@ -1803,16 +1808,16 @@ \position(0,0){\box0}% \linewidth\onepoint \setuppositioning - [\c!eenheid=pt, - \c!xschaal=\withoutpt\the\efxsteps, - \c!yschaal=\withoutpt\the\efysteps, + [\c!unit=pt, + \c!xscale=\withoutpt\the\efxsteps, + \c!yscale=\withoutpt\the\efysteps, \c!factor=1]% \ignorespaces#4% \def\referring(##1,##2)##3(##4,##5)##6[##7]% {}% \let\marking\referring \def\remark% - {\efcomment\v!nee}% + {\efcomment\v!no}% \def\colorbar##1[##2]% {\makecolorbar[##2]}% \ignorespaces#4% @@ -1820,10 +1825,10 @@ \box\colorbarbox}} \def\dodostartfigure[#1][#2][#3]#4\stopfigure - {\doifelse\v!test\@@exoptie + {\doifelse\v!test\@@exoption {\teststartfigure[#1][#2][#3]#4\teststopfigure - \let\@@exhokjes\v!aan} - {\let\@@exhokjes\v!uit}% + \let\@@exframes\v!on} + {\let\@@exframes\v!off}% \setvalue{\??ef\??ef#1}% {\dosingleempty{\placestartfigure[#1][#2][#3]#4\placestopfigure}}% \doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}} @@ -1834,14 +1839,14 @@ \def\teststartfigure[#1][#2][#3]#4\teststopfigure% {\begingroup \setbox0\hbox - {\useexternalfigure[\s!dummy][#2][\c!bfactor=\v!max]% + {\useexternalfigure[\s!dummy][#2][\c!wfactor=\v!max]% \externalfigure[\s!dummy]}% \def\referring {\efmark}% \def\marking {\efmark}% \def\remark - {\efcomment\v!ja}% + {\efcomment\v!yes}% \def\colorbar##1[##2]% {}% \efreference\zerocount @@ -1857,15 +1862,15 @@ \c!dx=\withoutpt\the\efxsteps, \c!ny=\@@exymax, \c!dy=\withoutpt\the\efysteps, - \c!xstap=1, - \c!ystap=1, - \c!schaal=1, - \c!offset=\v!nee, - \c!eenheid=pt]}% + \c!xstep=1, + \c!ystep=1, + \c!scale=1, + \c!offset=\v!no, + \c!unit=pt]}% \setuppositioning - [\c!eenheid=pt, - \c!xschaal=\withoutpt\the\efxsteps, - \c!yschaal=\withoutpt\the\efysteps, + [\c!unit=pt, + \c!xscale=\withoutpt\the\efxsteps, + \c!yscale=\withoutpt\the\efysteps, \c!factor=1]% \linewidth\onepoint \ignorespaces#4\relax @@ -1882,7 +1887,7 @@ {}% \setbox2\vbox {{\tfa\doifelsenothing{#1}{#2}{#1}} - \blanko + \blank \tfxx#4 \vfilll}% \ifdim\ht0>\ht2 @@ -1896,20 +1901,11 @@ \vtop{\vskip12pt\box2\vskip6pt}}% \endgroup} -% \def\dodostartfigure[#1][#2][#3]#4\stopfigure -% {\doifelse\v!test\@@exoptie -% {\teststartfigure[#1][#2][#3]#4\teststopfigure -% \let\@@exhokjes\v!aan} -% {\let\@@exhokjes\v!uit}% -% \setvalue{\??ef\??ef#1}% -% {\dosingleempty{\placestartfigure[#1][#2][#3]#4\placestopfigure}}% -% \doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}} - \def\dodostartfigure[#1][#2][#3]#4\stopfigure - {\doifelse\v!test\@@exoptie + {\doifelse\v!test\@@exoption {\teststartfigure[#1][#2][#3]#4\teststopfigure - \let\@@exhokjes\v!aan} - {\let\@@exhokjes\v!uit}% + \let\@@exframes\v!on} + {\let\@@exframes\v!off}% \setvalue{\??ef\??ef#1}% {\def\next{\placestartfigure[#1][#2][#3]#4\placestopfigure}% \dosingleempty\next}% @@ -1919,7 +1915,7 @@ {\dotripleargument\dodostartfigure#1\stopfigure} \def\startfigure - {\grabuntil{\e!stop\v!figuur}\dostartfigure} + {\grabuntil{\e!stop\v!figure}\dostartfigure} %D \macros %D {clip, setupclipping} @@ -1928,25 +1924,25 @@ %D arbitrary content. We can use \METAPOST\ to provide a non %D rectangular clipping path. %D -%D \starttypen +%D \starttyping %D \startMPclip{fun} %D clip currentpicture to fullcircle %D shifted (.5,.5) xscaled \width yscaled \height ; %D \stopMPclip -%D \stoptypen +%D \stoptyping %D %D We get a rectangular piece of the figure when we say: %D -%D \starttypen +%D \starttyping %D \clip[x=2,y=1]{\externalfigure[photo]} -%D \stoptypen +%D \stoptyping %D %D When we want to clip to the oval we defined a few lines ago, %D we say: %D -%D \starttypen +%D \starttyping %D \clip[nx=1,ny=1,x=1,y=1,mp=fun]{\externalfigure[photo]} -%D \stoptypen +%D \stoptyping %D %D The general characteristics of clipping can be set up with %D @@ -1955,12 +1951,12 @@ \def\doclip[#1]% nb top->bottom left->right {\bgroup \getparameters[\??cp][#1]% - \doifelse\@@cpstatus\v!start\dodoclip{\egroup\hbox}} + \doifelse\@@cpstate\v!start\dodoclip{\egroup\hbox}} \def\dodoclip {\dowithnextbox - {\ifdim\@@cpbreedte>\zeropoint - \!!dimena\@@cpbreedte + {\ifdim\@@cpwidth>\zeropoint + \!!dimena\@@cpwidth \!!dimenc\@@cphoffset \else \!!dimena\nextboxwd @@ -1970,8 +1966,8 @@ \!!dimena\@@cpsx\!!dimena \fi \relax % sure - \ifdim\@@cphoogte>\zeropoint - \!!dimenb\@@cphoogte + \ifdim\@@cpheight>\zeropoint + \!!dimenb\@@cpheight \!!dimend\nextboxht \advance\!!dimend -\@@cpvoffset \advance\!!dimend -\!!dimenb @@ -1985,23 +1981,23 @@ \advance\!!dimend \nextboxht \fi \setbox\nextbox\hbox % old - {\advance\!!dimenc -\@@cplinkeroffset % new ! - \advance\!!dimend -\@@cponderoffset % new ! % - added + {\advance\!!dimenc -\@@cpleftoffset % new ! + \advance\!!dimend -\@@cpbottomoffset % new ! % - added \hskip-\!!dimenc\lower\!!dimend\flushnextbox}% old \nextboxwd\zeropoint \nextboxht\zeropoint \nextboxdp\zeropoint \setbox\nextbox\hbox - {\advance\!!dimena \@@cplinkeroffset % new ! - \advance\!!dimena \@@cprechteroffset % new ! - \advance\!!dimenb \@@cponderoffset % new ! - \advance\!!dimenb \@@cpbovenoffset % new ! + {\advance\!!dimena \@@cpleftoffset % new ! + \advance\!!dimena \@@cprightoffset % new ! + \advance\!!dimenb \@@cpbottomoffset % new ! + \advance\!!dimenb \@@cptopoffset % new ! \dostartclipping\@@cpmp\!!dimena\!!dimenb % old \flushnextbox \dostopclipping}% \setbox\nextbox\hbox % new ! - {\!!dimena-\@@cplinkeroffset % new ! - \!!dimenb \@@cponderoffset % new ! % - removed + {\!!dimena-\@@cpleftoffset % new ! + \!!dimenb \@@cpbottomoffset % new ! % - removed \hskip\!!dimena\lower\!!dimenb\flushnextbox}% new ! \nextboxwd\!!dimena \nextboxht\!!dimenb @@ -2017,9 +2013,9 @@ %D defining sound tracks: %D -%D \starttypen +%D \starttyping %D \useexternalsoundtrack[label][file] -%D \stoptypen +%D \stoptyping %D %D associated actions: StartSound StopSound PauseSound ResumeSound %D @@ -2035,10 +2031,11 @@ \def\checksoundtrack#1% {\iflocation \doifdefined{\??sd:#1}{\doifvaluesomething{\??sd:#1} - {\doinsertsoundtrack{\getvalue{\??sd:#1}}{#1}\@@sdoptie + {\doinsertsoundtrack{\getvalue{\??sd:#1}}{#1}\@@sdoption % brr, \..empty not really needed and maybe even wrong; % also, not here but in driver - \letgvalueempty{\??sd:#1}}}% + % well, no: sounds need to be reinitialize each time (i.e., be on page), so no + }}% \letgvalueempty{\??sd:#1}}}% \fi} \setexecutecommandcheck {startsound} \checksoundtrack @@ -2047,7 +2044,7 @@ {\dodoubleargument\getparameters[\??sd]} \setupexternalsoundtracks - [\c!optie=] + [\c!option=] %D NEW: used in styledesign manual @@ -2066,8 +2063,8 @@ \defineexternalfigure [typeset] - [\c!achtergrond=\v!kleur, - \c!achtergrondkleur=white] + [\c!background=\v!color, + \c!backgroundcolor=\s!white] \def\dotypesetbuffer[#1][#2]% beware: this will mix up the mp graphics {\bgroup @@ -2082,55 +2079,73 @@ \doglobal\increment\noftypesetbuffers % batch is needed \executesystemcommand{texexec --batch --pdf --result=\bufferprefix typeset-\noftypesetbuffers\space \bufferprefix typeset.tex}% - %\externalfigure[\bufferprefix typeset-\noftypesetbuffers.pdf][\c!object=\v!nee,#2]% + %\externalfigure[\bufferprefix typeset-\noftypesetbuffers.pdf][\c!object=\v!no,#2]% \externalfigure[\bufferprefix typeset-\noftypesetbuffers.pdf][#2]% \egroup} -\appendtoks \setupexternalfigures[\c!optie=\v!leeg] \to \everyfastmode +% for me only (manuals and sucn) + +\definesystemvariable{tz} + +\def\definetypesetting{\dotripleempty\dodefinetypesetting} +\def\typesetfile {\dotripleempty\dotypesetfile} + +\def\dodefinetypesetting[#1][#2][#3]% + {\doifsomething{#1}{\setvalue{\??tz#1}{\dodotypesetfile{#2}{#3}}}} + +\def\dotypesetfile[#1][#2][#3]% + {\executeifdefined{\??tz#1}\gobbletwoarguments{#2}{#3}} + +\def\dodotypesetfile#1#2#3#4% args settings file settings + {\doifmode{*\v!first}{\executesystemcommand{texmfstart texexec.pl --batch --pdf #1 #3}}% + \doglobal\beforesplitstring#3\at.\to\typesetfilename + \externalfigure[\typesetfilename.pdf][#2,#4]} + +\appendtoks \setupexternalfigures[\c!option=\v!empty] \to \everyfastmode \appendtoks \runMPgraphicsfalse \to \everyfastmode \appendtoks \insertMPgraphicsfalse \to \everyfastmode \appendtoks \flushMPgraphics \to \everygoodbye % \everylastshipout \setupexternalfigures - [\c!optie=, - \c!object=\v!ja, - \c!reset=\v!nee, - \c!maxbreedte=\@@efbreedte, - \c!maxhoogte=\@@efhoogte, - \c!korps=\korpsgrootte, - \c!gebied=, + [\c!option=, + \c!object=\v!yes, + \c!reset=\v!no, + \c!maxwidth=\@@efwidth, + \c!maxheight=\@@efheight, + \c!bodyfont=\korpsgrootte, + \c!directory=, \c!file=\f!utilityfilename.\f!figureextension, - \c!straal=.5\korpsgrootte, - \c!hoek=\v!recht, - \c!kader=\v!uit, - \c!achtergrond=, % new - \c!splitskleur=white, + \c!radius=.5\korpsgrootte, + \c!corner=\v!rectangular, + \c!frame=\v!off, + \c!background=, % new + \c!splitcolor=\s!white, % \c!grid=, - \c!plaats={\v!lokaal,\v!globaal}] + \c!location={\v!local,\v!global}] \setupexternalfigures - [\c!hokjes=\v!uit, + [\c!frames=\v!off, \c!ymax=24, \c!xmax=] \useexternalfigure - [buffer] [\jobname] [\c!type=\v!buffer,\c!object=\v!nee] + [buffer] [\jobname] [\c!type=\v!buffer,\c!object=\v!no] \setupclipping - [\c!status=\v!start, + [\c!state=\v!start, \c!n=1, % was 2 \c!nx=\@@cpn,\c!x=1,\c!sx=1, \c!ny=\@@cpn,\c!y=1,\c!sy=1, - \c!breedte=\!!zeropoint, - \c!hoogte=\!!zeropoint, + \c!width=\!!zeropoint, + \c!height=\!!zeropoint, \c!hoffset=\!!zeropoint, \c!voffset=\!!zeropoint, \c!offset=\zeropoint, - \c!linkeroffset=\@@cpoffset, % \zeropoint, - \c!rechteroffset=\@@cpoffset, % \zeropoint, - \c!bovenoffset=\@@cpoffset, % \zeropoint, - \c!onderoffset=\@@cpoffset, % \zeropoint, + \c!leftoffset=\@@cpoffset, % \zeropoint, + \c!rightoffset=\@@cpoffset, % \zeropoint, + \c!topoffset=\@@cpoffset, % \zeropoint, + \c!bottomoffset=\@@cpoffset, % \zeropoint, \c!mp=] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex index cb8f0ed1d..4bfdff2c0 100644 --- a/tex/context/base/core-fil.tex +++ b/tex/context/base/core-fil.tex @@ -62,34 +62,40 @@ %D method to define filesynonyms. The actual synonyms are %D defined elsewhere, but look like: %D -%D \starttypen +%D \starttyping %D \definefilesynonym [chemic] [chemie] -%D \definefilesynonym [einheit] [eenheid] -%D \definefilesynonym [unit] [eenheid] -%D \stoptypen +%D \definefilesynonym [einheit] [unit] +%D \definefilesynonym [unit] [unit] +%D \stoptyping %D %D So we can say in english: %D -%D \starttypen +%D \starttyping %D \usemodules[pictex,chemic,unit] -%D \stoptypen +%D \stoptyping %D %D and in dutch: %D -%D \starttypen -%D \usemodules[pictex,chemie,eenheid] -%D \stoptypen +%D \starttyping +%D \usemodules[pictex,chemie,unit] +%D \stoptyping \def\definefilesynonym {\dodoubleempty\dodefinefilesynonym} +% \def\dodefinefilesynonym[#1][#2]% +% {\doifdefined{\??fs#1} +% {\doifnotvalue{\??fs#1}{#2} +% {\showmessage\m!files1{#1 (#2),\getvalue{\??fs#1}}}}% +% \doifelse{#1}{#2} +% {\letbeundefined{\??fs#1}{#2}} +% {\setevalue{\??fs#1}{#2}}} + \def\dodefinefilesynonym[#1][#2]% - {\doifdefined{\??fs#1} - {\doifnotvalue{\??fs#1}{#2} - {\showmessage\m!files1{#1 (#2),\getvalue{\??fs#1}}}}% - \doifelse{#1}{#2} - {\letbeundefined{\??fs#1}{#2}} - {\setevalue{\??fs#1}{#2}}} + {\ifundefined{\??fs#1}\else + \doifnotvalue{\??fs#1}{#2}{\showmessage\m!files1{#1 (#2),\getvalue{\??fs#1}}}% + \fi + \doifelse{#1}{#2}{\letbeundefined{\??fs#1}{#2}}{\setevalue{\??fs#1}{#2}}} %D \macros %D {truefilename} @@ -97,18 +103,14 @@ %D At the system level such a filename can be called upon by %D saying: %D -%D \starttypen +%D \starttyping %D \truefilename{filename/filesynonym} -%D \stoptypen +%D \stoptyping %D %D The implementation shows that nesting is supported. \def\truefilename#1% - {\ifundefined{\??fs#1}% - #1% - \else - \truefilename{\getvalue{\??fs#1}}% - \fi} + {\ifundefined{\??fs#1}#1\else\truefilename{\csname\??fs#1\endcsname}\fi} %D \macros %D {makeshortfilename} @@ -221,9 +223,9 @@ %D in a lazy way. Nota bene: such runtime definitions are %D global. %D -%D \starttypen +%D \starttyping %D \fetchruntimecommand\showaccents{\f!encodingprefix ...} -%D \stoptypen +%D \stoptyping \def\fetchruntimecommand#1#2% {\def#1{\dofetchruntimecommand#1{#2}}} @@ -239,20 +241,21 @@ \stopreadingfile \doglobal\setflag{#2}}% \ifx#1\undefined - \writestatus{\m!systems}{command \string#1 not found in file #2}% + \writestatus\m!systems{command \string#1 not found in file #2}% \def#1{{\infofont[unknown command \string#1]}}% \fi #1} %D To be documented and probably moved -\def\stelexternebronnenin - {\dodoubleargument\getparameters[\??er]} - \def\documentresources{\@@erurl} -\stelexternebronnenin[url=] +\def\setupexternalresources + {\dodoubleargument\getparameters[\??er]} + +\setupexternalresources + [url=] %D This module will be perfected / changed / weeded. -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex index cf11c889a..51cf8749d 100644 --- a/tex/context/base/core-fld.tex +++ b/tex/context/base/core-fld.tex @@ -58,23 +58,23 @@ \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\@@DriverFieldStyle \@@fdstyle + \let\@@DriverFieldColor \@@fdcolor + \let\@@DriverFieldBackgroundColor\@@fdfieldbackgroundcolor + \let\@@DriverFieldFrameColor \@@fdfieldframecolor + \let\@@DriverFieldLayer \@@fdfieldlayer + \let\@@DriverFieldOption \@@fdoption + \let\@@DriverFieldAlign \@@fdalign + \let\@@DriverFieldClickIn \@@fdclickin + \let\@@DriverFieldClickOut \@@fdclickout + \let\@@DriverFieldRegionIn \@@fdregionin + \let\@@DriverFieldRegionOut \@@fdregionout + \let\@@DriverFieldAfterKey \@@fdafterkey + \let\@@DriverFieldFormat \@@fdformat + \let\@@DriverFieldValidate \@@fdvalidate + \let\@@DriverFieldCalculate \@@fdcalculate \let\@@DriverFieldFocusIn \@@fdfocusin - \let\@@DriverFieldFocusOut \@@fdfocusuit} + \let\@@DriverFieldFocusOut \@@fdfocusout} % todo : remove arguments, consider DriverField a namespace @@ -304,7 +304,7 @@ \def\logfields {\dosingleempty\doLogFields} -%D \starttypen +%D \starttyping %D \definefield [name] [type] [group] [values] [default] %D %D \definefield [WWWW] [text] [textsetup] [default text] @@ -327,7 +327,7 @@ %D %D \field[XXXX] %D \fitfield[XXXX] -%D \stoptypen +%D \stoptyping \newif\ifdefinemainfield \definemainfieldfalse @@ -337,7 +337,7 @@ %D The first alternative used a two pass data list and was %D implemented as follows: %D -%D \starttypen +%D \starttyping %D \def\getmainfieldkids#1% %D {\let\@@DriverFieldKids\empty %D \ifdefinemainfield @@ -351,24 +351,24 @@ %D \exitloop %D \fi}% %D \fi} -%D \stoptypen +%D \stoptyping %D %D However, the next alternative is much faster when we have %D a field with thousands of clones, something not that %D imaginary. %D -%D \starttypen +%D \starttyping %D \def\getmainfieldkids#1% %D {\let\@@DriverFieldKids\empty %D \ifdefinemainfield %D \definerawpasslist{fld:#1}% runtime defined by system %D \moverawpasslist{fld:#1}\@@DriverFieldKids %D \fi} -%D \stoptypen +%D \stoptyping %D %D The data is written by file using: %D -%D \starttypen +%D \starttyping %D \newcounter\nofmainfieldkids %D %D \def\setmainfieldkid#1#2% @@ -378,7 +378,7 @@ %D {fld:#1}% %D {\nofmainfieldkids}% %D {#2}}} -%D \stoptypen +%D \stoptyping %D %D The trade of of this mechanism is that for each cloned or %D copied field, the uitlity file is to be read in order to @@ -670,7 +670,7 @@ \else\ifcase\@@DriverFieldFree\relax \doifdefinedelse{\strippedcsname\setupfield\@@DriverFieldGroup} {\let\dosetupfield=#1\getvalue{\strippedcsname\setupfield\@@DriverFieldGroup}} - {#1[\@@DriverFieldName][\v!label,\v!kader,\v!horizontaal][][][]}% + {#1[\@@DriverFieldName][\v!label,\v!frame,\v!horizontal][][][]}% \iftrialtypesetting\else \def\@@DriverFieldFree{1}% \changefield{#2}% @@ -801,78 +801,78 @@ [ \v!reset=>\ShowFieldLabelfalse\ShowFieldFramefalse \HorizontalFieldfalse\VerticalFieldfalse, \v!label=>\ShowFieldLabeltrue, - \v!kader=>\ShowFieldFrametrue, - \v!horizontaal=>\HorizontalFieldtrue, - \v!vertikaal=>\VerticalFieldtrue]% + \v!frame=>\ShowFieldFrametrue, + \v!horizontal=>\HorizontalFieldtrue, + \v!vertical=>\VerticalFieldtrue]% \ifVerticalField \getparameters[\??fd] - [\c!afstand=\!!zeropoint,\c!tussen=\vskip\@@localoffset, - \c!uitlijnen=\v!rechts,\c!breedte=20em]% + [\c!distance=\!!zeropoint,\c!inbetween=\vskip\@@localoffset, + \c!align=\v!right,\c!width=20em]% \else\ifHorizontalField \getparameters[\??fd] - [\c!afstand=\@@localoffset,\c!tussen=,\c!uitlijnen=\c!links, - \c!hoogte=10ex]% + [\c!distance=\@@localoffset,\c!inbetween=,\c!align=\c!left, + \c!height=10ex]% \else \getparameters[\??fd] - [\c!afstand=\!!zeropoint,\c!tussen=,\c!uitlijnen=\c!links]% + [\c!distance=\!!zeropoint,\c!inbetween=,\c!align=\c!left]% \fi\fi \getparameters[\??fd] - [\c!n=,\c!voor=,\c!na=\vss,\c!letter=,\c!kleur=,#3]% + [\c!n=,\c!before=,\c!after=\vss,\c!style=,\c!color=,#3]% \reshapeframeboxfalse % else ugly spacing \ifShowFieldFrame - \localframed[\??fd][\c!strut=\v!nee,\c!uitlijnen=]\bgroup + \localframed[\??fd][\c!strut=\v!no,\c!align=]\bgroup \else \vbox\bgroup \fi - \mindermeldingen + \dontcomplain \ifShowFieldLabel \setbox0=\hbox {\reshapeframeboxtrue % else wrong dimensions \framed - [\c!letter=,\c!kleur=,\c!uitlijnen=\c!rechts,#4] + [\c!style=,\c!color=,\c!align=\c!right,#4] {\@@DriverFieldLabel}}% \fi \setbox2=\hbox {\reshapeframeboxtrue % else wrong dimensions \ifVerticalField - \setupframed[\c!hoogte=6ex,\c!breedte=\hsize]% + \setupframed[\c!height=6ex,\c!width=\hsize]% \else\ifHorizontalField - \setupframed[\c!hoogte=\vsize,\c!breedte=20em]% + \setupframed[\c!height=\vsize,\c!width=20em]% \else - \setupframed[\c!hoogte=2cm,\c!breedte=2cm]% + \setupframed[\c!height=2cm,\c!width=2cm]% \fi\fi \framed - [\c!uitlijnen=\v!rechts,\c!strut=\v!nee,#5] + [\c!align=\v!right,\c!strut=\v!no,#5] {\getparameters [\??fd] - [\c!kleur=,\c!letter=,\c!uitlijnen=\v!rechts,\c!optie=, - \c!klikin=,\c!klikuit=,\c!gebiedin=,\c!gebieduit=, - \c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=, - \c!focusin=,\c!focusuit=, - \c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=, - \c!veldkaderkleur=,\c!veldlaag=,#5]% + [\c!color=,\c!style=,\c!align=\v!right,\c!option=, + \c!clickin=,\c!clickout=,\c!regionin=,\c!regionout=, + \c!afterkey=,\c!format=,\c!validate=,\c!calculate=, + \c!focusin=,\c!focusout=, + \c!fieldoffset=\!!zeropoint,\c!fieldbackgroundcolor=, + \c!fieldframecolor=,\c!fieldlayer=,#5]% \scratchdimen\framedwidth \edef\@@DriverFieldWidth {\the\scratchdimen}% \scratchdimen\framedheight\edef\@@DriverFieldHeight{\the\scratchdimen}% \vfill - \hbox{\lower\@@fdveldoffset\hbox{\typesetfield}} + \hbox{\lower\@@fdfieldoffset\hbox{\typesetfield}} \vss}}% \ifShowFieldLabel \ifVerticalField \vbox {\copy0 - \@@fdtussen + \@@fdinbetween \copy2}% \else \hbox {\vbox \ifdim\ht2>\ht0 to \ht2 \fi - {\@@fdvoor + {\@@fdbefore \copy0 - \@@fdna}% - \hskip\@@fdafstand + \@@fdafter}% + \hskip\@@fddistance \vbox \ifdim\ht0>\ht2 to \ht0 \fi - {\@@fdvoor + {\@@fdbefore \box2 - \@@fdna}}% + \@@fdafter}}% \fi \else \box2 @@ -884,12 +884,12 @@ \localframed [\??fd] [\c!n=1024, % beware: weblink plug in truncates - \c!strut=\v!nee,\c!kleur=,\c!letter=,\c!optie=, - \c!klikin=,\c!klikuit=,\c!gebiedin=,\c!gebieduit=, - \c!focusin=,\c!focusuit=, - \c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=, - \c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=, - \c!veldkaderkleur=,\c!veldlaag=,#5,\c!uitlijnen=] + \c!strut=\v!no,\c!color=,\c!style=,\c!option=, + \c!clickin=,\c!clickout=,\c!regionin=,\c!regionout=, + \c!focusin=,\c!focusout=, + \c!afterkey=,\c!format=,\c!validate=,\c!calculate=, + \c!fieldoffset=\!!zeropoint,\c!fieldbackgroundcolor=, + \c!fieldframecolor=,\c!fieldlayer=,#5,\c!align=] {\dogetcommacommandelement1\from\@@DriverFieldValues\to\@@DriverFieldValue \ifx\@@DriverFieldValue\empty \let\@@DriverFieldValue\@@DriverFieldDefault @@ -933,13 +933,13 @@ \setupfield [systemfield] [\c!n=1024, % beware: weblink plugin truncates - \c!plaats=\v!laag,\c!strut=\v!ja,\c!veldoffset=0pt, - \c!hoogte=1.2\openlineheight,\c!breedte=\dimen0,\c!offset=\v!overlay, - \c!letter=,\c!uitlijnen=\v!midden,\c!kader=\v!uit, - \c!kleur=red,\c!veldachtergrondkleur=white,\c!veldkaderkleur=blue, - \c!valideer=JS(Check_Answer{\currentsystemfield,\therightanswer})]% + \c!location=\v!low,\c!strut=\v!yes,\c!fieldoffset=0pt, + \c!height=1.2\openlineheight,\c!width=\dimen0,\c!offset=\v!overlay, + \c!style=,\c!align=\v!middle,\c!frame=\v!off, + \c!color=red,\c!fieldbackgroundcolor=\s!white,\c!fieldframecolor=blue, + \c!validate=JS(Check_Answer{\currentsystemfield,\therightanswer})]% \switchtobodyfont - [\c!klein]% + [\c!small]% \hbox to \wd0 {\copy0\hskip-\wd0\hss\field[\currentsystemfield]\hss}}} @@ -953,42 +953,42 @@ \setupfields[\v!reset]% \useJSscripts[fld]% \setbox0\hbox - {\mindermeldingen + {\dontcomplain \nextsystemfield \setbox0=\hbox{#2}% \definesymbol [\currentsystemfield:txt] - [{\inframed[\c!kader=\v!uit,\c!achtergrond=\v!raster]{#3}}]% + [{\inframed[\c!frame=\v!off,\c!background=\v!screen]{#3}}]% \setbox2\hbox{\symbol[\currentsystemfield:txt]}% \definefield [\currentsystemfield:txt][check] [dummy][\currentsystemfield:txt][\currentsystemfield:txt]% \setupfield [dummy] - [\c!kader=\v!uit, - \c!gebieduit=JS(Hide_Field{\currentsystemfield:txt}), - \c!optie=\v!verborgen]% + [\c!frame=\v!off, + \c!regionout=JS(Hide_Field{\currentsystemfield:txt}), + \c!option=\v!hidden]% \hbox to \zeropoint {\dimen0\wd2\advance\dimen0 -\wd0 - \doifelse{#1}\v!links + \doifelse{#1}\v!left {\hskip-\dimen0} - {\doif{#1}\v!midden + {\doif{#1}\v!middle {\hskip-.5\dimen0}}% \lower\openlineheight\hbox to \zeropoint {\fitfield[\currentsystemfield:txt]}}% \dimen0=\ifdim\wd0=\zeropoint 3em\else\wd0\fi \definesymbol [\currentsystemfield:but] - [{\framed[\c!hoogte=2ex,\c!breedte=\dimen0,\c!kader=\v!uit]{}}]% + [{\framed[\c!height=2ex,\c!width=\dimen0,\c!frame=\v!off]{}}]% \definefield [\currentsystemfield:but][push] [dummy][\currentsystemfield:but][\currentsystemfield:but]% \setupfield [dummy] - [\c!kader=\v!uit, - \c!optie=, - \c!gebiedin=JS(Vide_Field{\currentsystemfield:txt}), - \c!gebieduit=JS(Hide_Field{\currentsystemfield:txt})]% + [\c!frame=\v!off, + \c!option=, + \c!regionin=JS(Vide_Field{\currentsystemfield:txt}), + \c!regionout=JS(Hide_Field{\currentsystemfield:txt})]% \lower2ex\hbox to \zeropoint {\fitfield[\currentsystemfield:but]}% #2}% @@ -1008,19 +1008,19 @@ {\bgroup \getparameters[\??fd][\c!start=1,#3]% \setupfields[\v!reset]% - \definesymbol[\v!leeg][]% + \definesymbol[\v!empty][]% \useJSscripts[fld][FieldStack]% \newcounter\stackedfieldnumber \def\dododofieldstack##1% {\increment\stackedfieldnumber \ifnum\stackedfieldnumber=\@@fdstart\relax - \definefield[#1:\stackedfieldnumber][check][#1][##1,\v!leeg][##1]% + \definefield[#1:\stackedfieldnumber][check][#1][##1,\v!empty][##1]% \else - \definefield[#1:\stackedfieldnumber][check][#1][##1,\v!leeg][\v!leeg]% + \definefield[#1:\stackedfieldnumber][check][#1][##1,\v!empty][\v!empty]% \fi}% \processcommalist[#2]\dododofieldstack \setupfield[#1][\v!reset]% added - \setupfield[#1][\c!optie=\v!alleenleesbaar,#3]% #3 swapped + \setupfield[#1][\c!option=\v!readonly,#3]% #3 swapped \newcounter\stackedfieldnumber \def\dododofieldstack##1% {\doglobal\increment\stackedfieldnumber @@ -1049,13 +1049,11 @@ {\dodoubleargument\getparameters[\??fr]} \def\checksubmitform#1% - {\setsubmitoutputformat\@@frmethode} + {\setsubmitoutputformat\@@frmethod} \setexecutecommandcheck {submitform} \checksubmitform \setupforms - [\c!methode=HTML] + [\c!method=HTML] -\protect - -\endinput +\protect \endinput diff --git a/tex/context/base/core-fnt.tex b/tex/context/base/core-fnt.tex index 1187774fe..5315f4d88 100644 --- a/tex/context/base/core-fnt.tex +++ b/tex/context/base/core-fnt.tex @@ -22,9 +22,9 @@ %D to save its meaning in order to be able to use this handy %D macro. %D -%D \starttypen +%D \starttyping %D so test\compound{}test can be used instead of test||test -%D \stoptypen +%D \stoptyping \bgroup \catcode`\|=\@@active \gdef\compound#1{|#1|} \egroup @@ -39,104 +39,107 @@ %D \macros %D {kap,KAP,Kap,Kaps,nokap,userealcaps,usepseudocaps} %D -%D We already introduced \type{\kap} as way to capitalize +%D We already introduced \type{\cap} as way to capitalize %D words. This command comes in several versions: %D %D \startbuffer -%D \kap {let's put on a \kap{cap}} -%D \kap {let's put on a \nokap{cap}} -%D \KAP {let's put on a \\{cap}} -%D \Kap {let's put on a \\{cap}} -%D \Kaps{let's put on a cap} +%D \cap {let's put on a \cap{cap}} +%D \cap {let's put on a \nocap{cap}} +%D \CAP {let's put on a \\{cap}} +%D \Cap {let's put on a \\{cap}} +%D \Caps{let's put on a cap} %D \stopbuffer %D %D \typebuffer %D -%D Note the use of \type{\nokap}, \type{\\} and the nested -%D \type{\kap}. +%D Note the use of \type{\nocap}, \type{\\} and the nested +%D \type{\cap}. %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D These macros show te main reason why we introduced the %D smaller \type{\tx} and \type{\txx}. %D -%D \starttypen -%D \kap\romeins{1995} -%D \stoptypen +%D \starttyping +%D \cap\romannumerals{1995} +%D \stoptyping %D %D This at first sight unusual capitilization is completely %D legal. %D -%D \showsetup{\y!kap} -%D \showsetup{\y!Kap} -%D \showsetup{\y!KAP} -%D \showsetup{\y!Kaps} -%D \showsetup{\y!nokap} +%D \showsetup{\y!smallcapped} +%D \showsetup{\y!notsmallcapped} +%D \showsetup{\y!CAPPED} +%D \showsetup{\y!SmallCapped} +%D \showsetup{\y!SmallCaps} %D %D The difference between pseudo and real caps is demonstrated %D below: %D %D \startbuffer -%D \usepseudocaps \kap{Hans Hagen} -%D \userealcaps \kap{Hans Hagen} +%D \usepseudocaps \cap{Hans Hagen} +%D \userealcaps \cap{Hans Hagen} %D \stopbuffer %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D The \type {\bgroup} trickery below is needed because of %D \type {\groupedcommand}. -\def\usepseudocaps% +\def\usepseudocaps {\def\cap@@uppercase{\the\everyuppercase\uppercased}% \def\cap@@lowercase{\the\everylowercase\lowercased}% \def\cap@@visualize{\tx}} -\def\userealcaps% +\def\userealcaps {\let\cap@@uppercase\relax %\let\cap@@lowercase\relax % Definitely not! \def\cap@@visualize{\sc}} \usepseudocaps -\def\dodokap#1#2% +\unexpanded\def\smallcapped % else conflict with math + {\futurelet\next\dosmallcapped} + +\def\disablepseudocaps + {\let\smallcapped\donothing} + +\def\dosmallcapped + {\ifx\next\bgroup + \expandafter\dodosmallcapped\expandafter\relax + \else + \expandafter\dodosmallcapped + \fi} + +\def\dodosmallcapped#1#2% {\ifmmode\hbox\fi \bgroup \cap@@visualize \cap@@uppercase{#1{#2}}% \egroup} -\unexpanded\def\nokap#1% +\unexpanded\def\notsmallcapped#1% {\cap@@lowercase{#1}} -\unexpanded\def\kap% - {\futurelet\next\dokap} +\unexpanded\def\CAPPED#1% + {{\def\\##1{\smallcapped{##1}}#1}} -\def\dokap% - {\ifx\next\bgroup - \expandafter\dodokap\expandafter\relax - \else - \expandafter\dodokap - \fi} +\unexpanded\def\SmallCapped#1% + {\CAPPED{\\#1}} -\unexpanded\def\KAP#1% - {{\def\\##1{\kap{##1}}#1}} - -\unexpanded\def\Kap#1% - {\KAP{\\#1}} - -\unexpanded\def\Kaps - {\let\processword\Kap +\unexpanded\def\SmallCaps + {\let\processword\SmallCapped \processwords} %D Sure: -\let\normalkap\kap +\def\kap{\smallcapped} % for old times sake %D Some precautions for a \PLAIN\ \TEX\ definition. @@ -146,7 +149,7 @@ {\ifmmode \expandafter\normalcap \else - \expandafter\kap + \expandafter\smallcapped \fi} %D \macros @@ -157,21 +160,23 @@ %D %D \showsetup{setupcapitals} -\def\setupcapitals% +\let\normalsmallcapped\smallcapped + +\def\setupcapitals {\dosingleempty\dosetupcapitals} \def\dosetupcapitals[#1]% {\getparameters[\??kk][#1]% - \doifelse{\@@kktitel}{\v!ja} - {\definealternativestyle[\v!kapitaal][\normalkap][\normalkap]% + \doifelse\@@kktitle\v!yes + {\definealternativestyle[\v!capital][\normalsmallcapped][\normalsmallcapped]% \definealternativestyle[\v!smallcaps][\sc][\sc]% - \let\kap\normalkap} - {\definealternativestyle[\v!kapitaal][\normalkap][\uppercased]% + \let\smallcapped\normalsmallcapped} + {\definealternativestyle[\v!capital][\normalsmallcapped][\uppercased]% \definealternativestyle[\v!smallcaps][\sc][\uppercased]% - \def\kap{\doconvertfont{\v!kapitaal}}}% - \doifelse{\@@kksc}{\v!ja} - {\userealcaps} - {\usepseudocaps}} + \def\smallcapped{\doconvertfont\v!capital}}% + \doifelse\@@kksc\v!yes + \userealcaps + \usepseudocaps} \ifx\uppercased\undefined \let\uppercased\uppercase \fi \ifx\lowercased\undefined \let\lowercased\lowercase \fi @@ -188,8 +193,8 @@ \def\lowercased#1{{\forceunexpanded\xdef\@@expanded{\lowercase{#1}}}\@@expanded} \setupcapitals - [\c!titel=\v!ja, - \c!sc=\v!nee] + [\c!title=\v!yes, + \c!sc=\v!no] %D \macros %D {Word, Words, WORD, WORDS, doprocesswords} @@ -197,21 +202,21 @@ %D This is probably not the right place to present the next set %D of macros. %D -%D \starttypen +%D \starttyping %D \Word {far too many words} %D \Words{far too many words} %D \WORD {far too many words} %D \WORDS{far too many words} -%D \stoptypen +%D \stoptyping %D %D \typebuffer %D %D This calls result in: %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D \showsetup{\y!Word} @@ -245,9 +250,7 @@ \unexpanded\def\WORD#1% {\bgroup \the\everyuppercase - %\def\kap##1{##1}% - %\def\WORD##1{##1}% - \let\kap\firstofoneargument + \let\smallcapped\firstofoneargument \let\WORD\firstofoneargument \uppercase{#1}% No expansion here, otherwise \getvalue problems! %\edef\next{#1}% keep this to prevent roll back @@ -264,16 +267,16 @@ %D murder. Nevertheless we support this manipulation for use in %D for instance titles. %D -%D \starttypen +%D \starttyping %D \hbox to 5cm{\stretched{murder}} -%D \stoptypen +%D \stoptyping %D %D \typebuffer %D %D or %D %D \startvoorbeeld -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D \showsetup{\y!stretched} @@ -289,7 +292,7 @@ %D \hbox to 3cm{\stretched{sp{\'e}c{\`\i}{\"a}l}} %D \stopbuffer %D -%D \haalbuffer +%D \getbuffer %D %D The first line of this macros takes care of boxing. Normally %D one will use an \type{\hbox} specification. The last line @@ -302,16 +305,16 @@ %D %D A convenient alternative is: %D -%D \starttypen +%D \starttyping %D \stretcheduppercase{Is this what you like?} -%D \stoptypen +%D \stoptyping %D %D \typebuffer %D %D this one uses fixed skips and kerns. %D %D \startvoorbeeld -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D The default skip can be set with: @@ -383,8 +386,8 @@ \else \setbox\scratchbox\hbox {\expandafter\handletokens\midwordbreaktokens\with\setmidwordbreaktoken - a\space \!!dimena=\the\lastskip - #1\space\!!dimenb=\the\lastskip \relax % needed + a\space \!!dimena\lastskip + #1\space\!!dimenb\lastskip \relax % needed \ifdim\!!dimena=\!!dimenb \globallet\domidwordbreak\relax \else @@ -412,9 +415,9 @@ %D \typebuffer %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D The next macros are derived from the \PLAIN\ \TEX\ one, but @@ -434,12 +437,12 @@ %D \showsetup{\y!setupunderbar} %D %D The alternatives show up as -%D {\setupunderbar [variant=a]\underbar{alternative a}}, -%D {\setupunderbar [variant=b]\underbar{alternative b}}, -%D {\setupunderbar [variant=c]\underbar{alternative c}} +%D {\setupunderbar [alternativevariant=a]\underbar{alternative a}}, +%D {\setupunderbar [alternativevariant=b]\underbar{alternative b}}, +%D {\setupunderbar [alternativevariant=c]\underbar{alternative c}} %D and -%D {\setupunderbar [lijndikte=1pt]\underbar{1pt width}}, -%D {\setupunderbar [lijndikte=2pt]\underbar{2pt width}}, +%D {\setupunderbar [rulethickness=1pt]\underbar{1pt width}}, +%D {\setupunderbar [rulethickness=2pt]\underbar{2pt width}}, %D or whatever. Because \type{\overstrike} uses the same %D method, the settings also apply to that macro. @@ -467,7 +470,7 @@ \def\dododounderbar#1#2#3% {\startmathmode \setbox0\hbox{#3}% - \setbox2\hbox{\color[\@@onlijnkleur]{\getvalue{underbarmethod\@@onvariant}{\wd0}{#1}{#2}}}% + \setbox2\hbox{\color[\@@onrulecolor]{\getvalue{underbarmethod\@@onalternative}{\wd0}{#1}{#2}}}% \wd0\zeropoint \ht2\ht0 \dp2\dp0 @@ -476,21 +479,20 @@ \unexpanded\def\dodounderbar#1% {\bgroup - \dimen0=\@@ononderoffset + \dimen0=\@@onbottomoffset \dimen0=\underbarlevel\dimen0 \ifdone \else %\advance\dimen0 -1pt \advance\dimen0 -\strutht \fi \dimen2\dimen0 - \advance\dimen2 \@@onlijndikte + \advance\dimen2 \@@onrulethickness \dododounderbar{-\dimen0}{\dimen2}{#1}% \egroup} \def\betweenunderbarwords {\bgroup - \setbox0\hbox - {\dodounderbar{\hskip\fontdimen2\font}}% + \setbox0\hbox{\dodounderbar{\hskip\fontdimen2\font}}% \nobreak \hskip\zeropoint\!!minus\fontdimen4\font \discretionary{}{}{\box0}% @@ -530,16 +532,15 @@ \def\dooverstrike#1% {\bgroup - \dimen0=\@@onbovenoffset + \dimen0=\@@ontopoffset \dimen2=\dimen0 - \advance\dimen2 \@@onlijndikte + \advance\dimen2 \@@onrulethickness \dododounderbar{\dimen2}{-\dimen0}{#1}% \egroup} \def\betweenoverstrikewords {\bgroup - \setbox0\hbox - {\dooverstrike{\hskip\fontdimen2\font}}% + \setbox0\hbox{\dooverstrike{\hskip\fontdimen2\font}}% \nobreak \hskip\zeropoint\!!minus\fontdimen4\font \discretionary{}{}{\box0}% @@ -559,6 +560,18 @@ \def\setupunderbar {\dodoubleargument\getparameters[\??on]} +%D \macros +%D {shiftedword, shiftedwords} +%D +%D Used as \type {\shiftedwords {10pt} {some text}} this macro will +%D move + +% \def\shiftedword#1% #2% +% {\raise#1\hbox} % {#2}} % officially: {\ifdim#1>\zeropoint\raise\else\lower\fi#1\hbox{#2}} + +% \def\shiftedwords#1#2% +% {\processisolatedwords{#2}{\shiftedword{#1}}} + %D \macros %D {low, high, lohi} %D @@ -572,7 +585,7 @@ %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D Note the different placement of \type {\lohi}, where we %D need a bit more space. The implementation looks a bit @@ -624,7 +637,7 @@ \hbox {\setbox4\hbox{\dohighlow\lower{16}{.48}{.1}{#2}}% \setbox6\hbox{\dohighlow\raise{14}{.86}{.1}{#3}}% - \doif{#1}{\v!links} + \doif{#1}{\v!left} {\ifdim\wd4<\wd6 \setbox4\hbox to \wd6{\hss\box4}% \else @@ -643,30 +656,30 @@ %D %D \startbuffer %D \lohi{aha}{ah} test \lohi{aha}{ah} test -%D \lohi[links]{aha}{ah} test \lohi[links]{aha}{ah} test +%D \lohi[left]{aha}{ah} test \lohi[left]{aha}{ah} test %D \lohi{aha}{ah} test\lohi{aha}{ah} test -%D \lohi[links]{aha}{ah}test \lohi[links]{aha}{ah}test +%D \lohi[left]{aha}{ah}test \lohi[left]{aha}{ah}test %D \stopbuffer %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D \macros %D {setupinitial,placeinitial,checkinitial} %D %D {\em To be documented.} %D -%D \starttypen +%D \starttyping %D \setupinitial[state=start] \placeinitial \input tufte -%D \stoptypen +%D \stoptyping %D %D and %D -%D \starttypen +%D \starttyping %D \def\bpar{\ifvmode\checkinitial\fi} %D \def\epar{\ifhmode\par\fi\checkinitial} -%D \stoptypen +%D \stoptyping % to do: more fine tuning @@ -677,24 +690,24 @@ \definefontsynonym[initial][Initial] % internal but accepted too \setupinitial - [\c!status=\v!stop, - \c!plaats=\v!tekst, + [\c!state=\v!stop, + \c!location=\v!text, \c!n=3, \s!font=initial] \def\placeinitial - {\doifelse\@@dcplaats\v!marge{\chardef\DropMode\plusone}{\chardef\DropMode\zerocount}% - \doif \@@dcstatus\v!start{\ifnum\@@dcn>0 \AutoDroppedCaps\fi}} + {\doifelse\@@dclocation\v!margin{\chardef\DropMode\plusone}{\chardef\DropMode\zerocount}% + \doif \@@dcstate\v!start{\ifnum\@@dcn>0 \AutoDroppedCaps\fi}} \let\checkinitial\CheckDroppedCaps %D This module has only a few setups: \setupunderbar - [\c!variant=a, - \c!lijndikte=\linewidth, - \c!onderoffset=1.5pt, - \c!bovenoffset=2.5pt, - \c!lijnkleur=] + [\c!alternative=a, + \c!rulethickness=\linewidth, + \c!bottomoffset=1.5pt, + \c!topoffset=2.5pt, + \c!rulecolor=] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-gen.tex b/tex/context/base/core-gen.tex index 679dbcddc..1b7133280 100644 --- a/tex/context/base/core-gen.tex +++ b/tex/context/base/core-gen.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Context Core Macros / General} @@ -22,27 +22,27 @@ %D toekenningen. Allereerst een commando om waarden aan %D een \DIMENSION\ toe te kennen: %D -%D \starttypen +%D \starttyping %D \assigndimension %D {|klein|middel|groot|-klein|-middel|-groot|geen} -%D {\dimensie} +%D {\dimension} %D {waarde klein} %D {waarde middel} %D {waarde groot} -%D \stoptypen +%D \stoptyping %D -%D Hierbij krijgt de \DIMENSION\ \type{\dimensie} een waarde +%D Hierbij krijgt de \DIMENSION\ \type{\dimension} een waarde %D afhankelijk van het meegegeven trefwoord. %D -%D \startsmaller -%D \startregels +%D \startnarrower +%D \startlines %D \type{(-)klein }\qquad (--) waarde klein %D \type{(-)middel}\qquad (--) waarde middel %D \type{(-)groot }\qquad (--) waarde groot %D \type{geen }\qquad 0pt %D \type{waarde }\qquad waarde -%D \stopregels -%D \stopsmaller +%D \stoplines +%D \stopnarrower %D %D Een trefwoord mag worden voorafgegaan door een \type{-}. %D Deze macro toont een voorbeeld van het gebruik van @@ -51,106 +51,87 @@ %D Analoog aan het bovenstaande commando kennen we een %D commando om waarden toe te kennen aan een macro: %D -%D \starttypen +%D \starttyping %D \assignalfadimension %D {|klein|middel|groot|geen} %D {\macro} %D {waarde klein} %D {waarde middel} %D {waarde groot} -%D \stoptypen +%D \stoptyping \def\assigndimension#1#2#3#4#5% {\processaction [#1] - [ \v!klein=>#2=#3, - \v!middel=>#2=#4, - \v!groot=>#2=#5, - \v!geen=>#2=\zeropoint, - -\v!klein=>#2=-#3, - -\v!middel=>#2=-#4, - -\v!groot=>#2=-#5, + [ \v!small=>#2=#3, + \v!medium=>#2=#4, + \v!big=>#2=#5, + \v!none=>#2=\zeropoint, + -\v!small=>#2=-#3, + -\v!medium=>#2=-#4, + -\v!big=>#2=-#5, \s!unknown=>#2=#1]} \def\assignalfadimension#1#2#3#4#5% {\processaction [#1] - [ \v!klein=>\edef#2{#3}, - \v!middel=>\edef#2{#4}, - \v!groot=>\edef#2{#5}, - \v!geen=>\edef#2{0}, + [ \v!small=>\edef#2{#3}, + \v!medium=>\edef#2{#4}, + \v!big=>\edef#2{#5}, + \v!none=>\edef#2{0}, \s!unknown=>\edef#2{#1}]} %D De onderstaande implementatie is veel sneller, maar %D tegelijkertijd ook veel lelijker. Omdat we deze macro %D relatief weinig aanroepen laten we deze optimalisatie maar %D achterwege. Bovendien kunnen oplossingen als deze de -%D hash||table aardig uitputten (\type{\doifdefined}). +%D hash||table aardig uitputten (\type {\doifdefined}). %D -%D \starttypen +%D \starttyping %D \edef\@@dimension{@@dim} %D \edef\@@negdimension{\@@dimension-} %D %D \def\assigndimension#1#2#3#4#5% -%D {\setvalue{\@@dimension\v!klein}{#3}% -%D \setvalue{\@@dimension\v!middel}{#4}% -%D \setvalue{\@@dimension\v!groot}{#5}% -%D \setvalue{\@@dimension\v!geen}{\!!zeropoint}% -%D \setvalue{\@@negdimension\v!klein}{-#3}% -%D \setvalue{\@@negdimension\v!middel}{-#4}% -%D \setvalue{\@@negdimension\v!groot}{-#5}% -%D \setvalue{\@@negdimension\v!geen}{\!!zeropoint}% +%D {\setvalue{\@@dimension \v!small }{#3}% +%D \setvalue{\@@dimension \v!medium}{#4}% +%D \setvalue{\@@dimension \v!big }{#5}% +%D \setvalue{\@@dimension \v!none }{\!!zeropoint}% +%D \setvalue{\@@negdimension\v!small }{-#3}% +%D \setvalue{\@@negdimension\v!medium}{-#4}% +%D \setvalue{\@@negdimension\v!big }{-#5}% +%D \setvalue{\@@negdimension\v!none }{\!!zeropoint}% %D \doifdefinedelse{\@@dimension#1} %D {#2=\getvalue{\@@dimension#1}} %D {#2=#1}} -%D \stoptypen -%D -%D Let's give this a try: - -\let\nopv!geen \v!geen -\let\posv!groot \v!groot -\let\posv!middel \v!middel -\let\posv!klein \v!klein -\edef\negv!groot {-\v!groot } -\edef\negv!middel{-\v!middel} -\edef\negv!klein {-\v!klein } - -%\def\assigndimension#1#2#3#4#5% -% {\edef\!!stringa{#1}% -% \ifx\!!stringa\nopv!geen #2=\zeropoint\else -% \ifx\!!stringa\posv!groot #2=#5\else -% \ifx\!!stringa\posv!middel#2=#4\else -% \ifx\!!stringa\posv!klein #2=#3\else -% \ifx\!!stringa\negv!groot #2=-#5\else -% \ifx\!!stringa\negv!middel#2=-#4\else -% \ifx\!!stringa\negv!klein #2=-#3\else -% #2=#1\fi\fi\fi\fi\fi\fi\fi} -% -%\def\assignalfadimension#1#2#3#4#5% -% {\edef\!!stringa{#1}% -% \ifx\!!stringa\posv!groot \edef#2{#5}\else -% \ifx\!!stringa\posv!middel\edef#2{#4}\else -% \ifx\!!stringa\posv!klein \edef#2{#3}\else -% \ifx\!!stringa\nopv!geen \edef#2{0}\else -% \edef#2{#1}\fi\fi\fi\fi} +%D \stoptyping +%D +%D Let's give this a try: + +\let\nopv!none \v!none +\let\posv!big \v!big +\let\posv!middle \v!medium +\let\posv!small \v!small +\edef\negv!big {-\v!big} +\edef\negv!middle{-\v!medium} +\edef\negv!small {-\v!small} \def\assigndimension#1#2#3#4#5% {\edef\!!stringa{#1}% - #2=\ifx\!!stringa\nopv!geen \zeropoint\else - \ifx\!!stringa\posv!groot #5\else - \ifx\!!stringa\posv!middel #4\else - \ifx\!!stringa\posv!klein #3\else - \ifx\!!stringa\negv!groot -#5\else - \ifx\!!stringa\negv!middel-#4\else - \ifx\!!stringa\negv!klein -#3\else + #2=\ifx\!!stringa\nopv!none \zeropoint\else + \ifx\!!stringa\posv!big #5\else + \ifx\!!stringa\posv!middle #4\else + \ifx\!!stringa\posv!small #3\else + \ifx\!!stringa\negv!big -#5\else + \ifx\!!stringa\negv!middle-#4\else + \ifx\!!stringa\negv!small -#3\else #1\fi\fi\fi\fi\fi\fi\fi} \def\assignalfadimension#1#2#3#4#5% {\edef\!!stringa{#1}% - \edef#2{\ifx\!!stringa\posv!groot #5\else - \ifx\!!stringa\posv!middel#4\else - \ifx\!!stringa\posv!klein #3\else - \ifx\!!stringa\nopv!geen 0\else + \edef#2{\ifx\!!stringa\posv!big #5\else + \ifx\!!stringa\posv!middle#4\else + \ifx\!!stringa\posv!small #3\else + \ifx\!!stringa\nopv!none 0\else #1\fi\fi\fi\fi}} %D \macros @@ -158,51 +139,44 @@ %D %D Een variant hierop is het commando: %D -%D \starttypen +%D \starttyping %D \assignvalue %D {|klein|middel|groot} %D {\macro} %D {waarde klein } %D {waarde middel} %D {waarde groot} -%D \stoptypen +%D \stoptyping %D %D Hierbij krijgt \type{\macro} een waarde afhankelijk van %D het meegegeven trefwoord: %D -%D \startsmaller -%D \startregels +%D \startnarrower +%D \startlines %D \type{klein }\qquad waarde klein %D \type{middel}\qquad waarde middel %D \type{groot }\qquad waarde groot %D \type{waarde}\qquad waarde -%D \stopregels -%D \stopsmaller +%D \stoplines +%D \stopnarrower %D %D Hier doet \type{geen} dus niet mee. \def\assignvalue#1#2#3#4#5% {\processaction [#1] - [ \v!klein=>\edef#2{#3}, - \v!middel=>\edef#2{#4}, - \v!groot=>\edef#2{#5}, + [ \v!small=>\edef#2{#3}, + \v!medium=>\edef#2{#4}, + \v!big=>\edef#2{#5}, \s!unknown=>\edef#2{#1}]} -%D Or faster: - -%\def\assignvalue#1#2#3#4#5% -% {\edef\!!stringa{#1}% -% \ifx\!!stringa\posv!groot \edef#2{#5}\else -% \ifx\!!stringa\posv!middel\edef#2{#4}\else -% \ifx\!!stringa\posv!klein \edef#2{#3}\else -% \edef#2{#1}\fi\fi\fi} +%D Or faster: \def\assignvalue#1#2#3#4#5% {\edef\!!stringa{#1}% - \edef#2{\ifx\!!stringa\posv!groot #5\else - \ifx\!!stringa\posv!middel#4\else - \ifx\!!stringa\posv!klein #3\else + \edef#2{\ifx\!!stringa\posv!big #5\else + \ifx\!!stringa\posv!middle#4\else + \ifx\!!stringa\posv!small #3\else #1\fi\fi\fi}} %D \macros @@ -211,12 +185,12 @@ %D Een breedte van een opgegeven tekst kan worden berekend en %D toegekend aan een \DIMENSION\ met: %D -%D \starttypen +%D \starttyping %D \assignwidth -%D {\dimensie} +%D {\dimension} %D {|passend|ruim} %D {tekst} -%D \stoptypen +%D \stoptyping %D %D Dit commando sluit, evenals de bovenstaande %D \type{\assign}||commando's, aan op de wijze waarop @@ -228,10 +202,10 @@ {\doifelsenothing{#2} {\setbox0\hbox{#3}% #1\wd0} - {\doifinsetelse{#2}{\v!passend,\v!ruim} + {\doifinsetelse{#2}{\v!fit,\v!broad} {\setbox0=\hbox{#3}% #1\wd0 - \doif{#2}\v!ruim{\advance#1 #4}}% + \doif{#2}\v!broad{\advance#1 #4}}% {#1=#2}}}% \protect \endinput diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex index 18cb70347..3056e69d7 100644 --- a/tex/context/base/core-grd.tex +++ b/tex/context/base/core-grd.tex @@ -34,7 +34,7 @@ %D %D The macros put some white space around the box: %D -%D \haalbuffer[1] +%D \getbuffer[1] %D %D A simple alternative is \type {\baselinecorrection}, which %D only looks at the previous line. @@ -50,7 +50,7 @@ %D This time the last preceding line gets a correction,% %D dependant on the depth. %D -%D \haalbuffer[2] +%D \getbuffer[2] %D %D One can make the correction visible by saying \type %D {\showbaselinecorrection}. Part of the correction is @@ -59,11 +59,11 @@ %D %D When visualize the first example looks like: %D -%D {\showbaselinecorrection\haalbuffer[1]} +%D {\showbaselinecorrection\getbuffer[1]} %D %D and the second one comes out as: %D -%D {\showbaselinecorrection\haalbuffer[2]} +%D {\showbaselinecorrection\getbuffer[2]} % \definecolor[GridLineColor][red] % \definecolor[GridTextColor][blue] @@ -206,7 +206,7 @@ % \nointerlineskip % \dotopbaselinecorrection % % \else -% % \ifbinnenkolommen +% % \ifinsidecolumns % % % \vskip\dimen2 % this could definitely % % % \penalty\outputpenalty % be improved % % \else @@ -236,7 +236,7 @@ {\ifvmode \ifdim\pagegoal<\maxdimen \bgroup \setbaselinecorrections - \witruimte + \whitespace \nointerlineskip \dotopbaselinecorrection \egroup @@ -321,7 +321,7 @@ \def\dosnaptogrid[#1]% {\resetlastlinewidth % maybe in more places, otherwise spacing gets messed up \ifgridsnapping - \iffirstargument\doifsomething{#1}{\verplaatsopgrid[#1]}\fi + \iffirstargument\doifsomething{#1}{\moveongrid[#1]}\fi \expandafter\dodosnaptogrid \fi} @@ -384,7 +384,7 @@ \chardef\depthsnapmethod \plustwo \chardef\heightsnapmethod\plustwo \fi - \ifdim\nextboxht<\teksthoogte % handle special case (like page fig) + \ifdim\nextboxht<\textheight % handle special case (like page fig) \ifcase\@@alignsnapbox\relax \ifcase\@@alignsnap\else % 1=top 2=high 3=middle 4=low \ifshowgridboxes @@ -410,7 +410,7 @@ \edef\presnapskip{\the\lastskip}% % mixing single/double columns sometimes goes wrong, % check 'som' document - \ifbinnenkolommen + \ifinsidecolumns \forcepresnaptrue \fi \forcedpresnapcorrection @@ -443,7 +443,7 @@ \advance\scratchdimen-\strutheight % fit (text) \or \advance\scratchdimen-\strutheight % tolerant - \advance\scratchdimen-10sp + \advance\scratchdimen-\roundingeps \fi \getnoflines\scratchdimen \ifnum\noflines>0 @@ -454,7 +454,7 @@ \else \scratchdimen\zeropoint \fi - \ifnum\@@extrasnap=1 \advance\scratchdimen \extrasnapsign\lineheight \fi + \ifnum\@@extrasnap=1 \advance\scratchdimen \extrasnapsign \lineheight \fi \ifnum\@@extrasnap=2 \advance\scratchdimen \extrasnapsign.5\lineheight \fi \edef\presnap{\the\scratchdimen}% \ifstrutsnapping @@ -481,7 +481,7 @@ \advance\scratchdimen-\strutdepth % fit (text) \or \advance\scratchdimen-\strutdepth % tolerant - \advance\scratchdimen-10sp + \advance\scratchdimen-\roundingeps \fi \getnoflines\scratchdimen \ifnum\noflines>0 @@ -493,7 +493,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 @@ -589,7 +589,7 @@ \flushnextbox \fi \else - \setbox\nextbox\vbox to \teksthoogte + \setbox\nextbox\vbox to \textheight {\ifdim\nextboxdp=\zeropoint \hbox{\lower\strutdepth\flushnextbox} \else % this branch is yet untested @@ -614,7 +614,7 @@ \def\snaptomathgrid % probably not working ok, also kind of obsolete {\ifgridsnapping \dowithnextbox - {\blanko[\v!regel]\snaptogrid\vbox{\flushnextbox}\blanko[\v!regel]} + {\blank[\v!line]\snaptogrid\vbox{\flushnextbox}\blank[\v!line]} \vbox\bgroup \let\setdisplayskips\relax \abovedisplayskip\zeropoint @@ -790,11 +790,11 @@ {\global\chardef\@@alignsnapbox3 \global\let\@@alignsnapamount\commalistelement} -\def\doverplaatsopgrid[#1]% - {\ifgridsnapping\doifsomething{#1}{\dodoverplaatsopgrid[#1]}\fi} +\def\domoveongrid[#1]% + {\ifgridsnapping\doifsomething{#1}{\dodomoveongrid[#1]}\fi} -\def\dodoverplaatsopgrid[#1]% some day : speed up +\def\dodomoveongrid[#1]% some day : speed up {\global\chardef\@@alignsnap\zerocount \global\chardef\@@alignsnapbox\zerocount \global\chardef\@@alignsnapdepth\zerocount @@ -802,40 +802,40 @@ \global\let\@@alignsnapamount\!!zeropoint \donefalse \expanded{\processallactionsinset[#1]} - [\v!standaard=>, - \v!normaal=>, % to be sure - \v!ja=>, % to be sure - \v!boven=>\gridwarning+\positiveextrasnap\extrasnapbefore, - \v!onder=>\gridwarning+\positiveextrasnap\extrasnapafter, - \v!beide=>\positiveextrasnap\extrasnaparound, - -\v!boven=>\gridwarning-\negativeextrasnap\extrasnapbefore, - -\v!onder=>\gridwarning-\negativeextrasnap\extrasnapafter, - -\v!beide=>\negativeextrasnap\extrasnaparound, - \v!tekst=>\global\chardef\@@alignsnapmethod\plusone, % accurate calculations - \v!pagina=>\global\chardef\@@alignsnap1, % topskip - \v!hoog=>\global\chardef\@@alignsnap2, - \v!midden=>\global\chardef\@@alignsnap3, - \v!laag=>\global\chardef\@@alignsnap4, - \v!passend=>\global\chardef\@@alignsnapbox1, % new - \v!ruim=>\global\chardef\@@alignsnapbox2, % new - \v!diepte=>\global\chardef\@@alignsnapdepth1, % new - \v!regel=>\global\chardef\@@alignsnapbox3 + [\v!standard=>, + \v!normal=>, % to be sure + \v!yes=>, % to be sure + \v!top=>\gridwarning+\positiveextrasnap\extrasnapbefore, + \v!bottom=>\gridwarning+\positiveextrasnap\extrasnapafter, + \v!both=>\positiveextrasnap\extrasnaparound, + -\v!top=>\gridwarning-\negativeextrasnap\extrasnapbefore, + -\v!bottom=>\gridwarning-\negativeextrasnap\extrasnapafter, + -\v!both=>\negativeextrasnap\extrasnaparound, + \v!text=>\global\chardef\@@alignsnapmethod\plusone, % accurate calculations + \v!page=>\global\chardef\@@alignsnap1, % topskip + \v!high=>\global\chardef\@@alignsnap2, + \v!middle=>\global\chardef\@@alignsnap3, + \v!low=>\global\chardef\@@alignsnap4, + \v!fit=>\global\chardef\@@alignsnapbox1, % new + \v!broad=>\global\chardef\@@alignsnapbox2, % new + \v!depth=>\global\chardef\@@alignsnapdepth1, % new + \v!line=>\global\chardef\@@alignsnapbox3 % \global\chardef\@@alignsnapdepth1 \global\chardef\@@alignsnap4, \v!reset=>\positiveextrasnap\extrasnapreset, - \v!geen=>\global\chardef\@@alignsnap0 + \v!none=>\global\chardef\@@alignsnap0 \global\chardef\@@alignsnapbox0, \s!default=>, \s!unknown=>\@@unknowngriddisplacement]} -\def\verplaatsopgrid - {\dosingleempty\doverplaatsopgrid} +\def\moveongrid + {\dosingleempty\domoveongrid} -\def\doplaatsopgrid[#1]% - {\doverplaatsopgrid[#1]\snaptogrid\vbox} +\def\doplaceongrid[#1]% + {\domoveongrid[#1]\snaptogrid\vbox} -\def\plaatsopgrid - {\dosingleempty\doplaatsopgrid} +\def\placeongrid + {\dosingleempty\doplaceongrid} %D Snapping is rather robust as long as we use whole lines. %D Half lines of white space can however be handled when they @@ -845,11 +845,11 @@ %D was written as an extension to the grid typesetting needed %D for typesetting (part of) the \MAPS. %D -%D \starttypen +%D \starttyping %D \setuptyping %D [before={\blank[halfline]}, %D after={\blank[halfline]}] -%D \stoptypen +%D \stoptyping \newif\iffuzzysnapdone \newif\iffuzzysnapping @@ -942,7 +942,7 @@ \def\docheckfuzzysnap#1% {\bgroup - \mindermeldingen + \dontcomplain \setbox\fuzzysnapbox\copy#1\relax \setbox\fuzzysnapsplit\vsplit\fuzzysnapbox to 1\lineheight \let\topfuzzymark\empty % indeed here ... no real mark diff --git a/tex/context/base/core-hlp.tex b/tex/context/base/core-hlp.tex index 198a5e09a..a5653f88f 100644 --- a/tex/context/base/core-hlp.tex +++ b/tex/context/base/core-hlp.tex @@ -8,30 +8,30 @@ %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. -% todo : dedicated vide/hide voor helps +% todo : dedicated vide/hide voor helps %D This is an experimental and private module, so the interface %D and functionality can change. Pieces of code will be moved -%D to other modules. More features are possible but will be -%D interfaces later. See m-chart for an application as well -%D as the second tno-tpd manual (graphic in margin, click -%D on it, pop up big one, use menu with hides, as well as +%D to other modules. More features are possible but will be +%D interfaces later. See m-chart for an application as well +%D as the second tno-tpd manual (graphic in margin, click +%D on it, pop up big one, use menu with hides, as well as %D background, etc. etc. -\unprotect +\unprotect \defineframedtext [\v!helptext] \setupframedtexts [\v!helptext] - [\c!breedte=.75\tekstbreedte, - \c!uitlijnen=\v!normaal, - \c!kader=\v!uit, - \c!achtergrond=\v!raster] + [\c!width=.75\textwidth, + \c!align=\v!normal, + \c!frame=\v!off, + \c!background=\v!screen] \newcounter \nofhelpdataentries \newconditional \somehelpdatadefined @@ -39,7 +39,7 @@ \appendtoks \getpagehelpdata \to \beforeeverypage \appendtoks \synchronizepagehelpdata \to \aftereverypage -% will be proper state variable +% will be proper state variable \let\pagehelpdata\empty @@ -47,7 +47,7 @@ {\let\synchronizepagehelpdata\relax} \def\resetpagehelpdata - {\iflocation + {\iflocation \let\synchronizepagehelpdata\resetpagehelpdata \global\let\pagehelpdata\empty \resetreference[HideHelp]% @@ -72,7 +72,7 @@ \fi \ifx\pagehelpdata\empty \else \useJSscripts[fld]% - \definereference[HideHelp][JS(Hide_Fields)]% for the moment + \definereference[HideHelp][JS(Hide_Fields)]% for the moment \fi \fi\fi} @@ -100,7 +100,7 @@ \fi \dostartbuffer[\v!helptext][\e!start\v!helptext][\e!stop\v!helptext]} -\long\def\helptext[#1]#2% +\long\def\helptext[#1]#2% {\iflocation \global\settrue\somehelpdatadefined %\definesymbol[helpinfo:#1][{\doframedtext[\v!helptext]{#2}}]% @@ -109,12 +109,12 @@ \dopresetfieldsymbol{\v!helptext:#1}% \fi} -\let\definehelptext\helptext % for backward compabilities sake +\let\definehelptext\helptext % for backward compabilities sake \def\dohelpdata#1% - {\setbox0\hbox + {\setbox\scratchbox\hbox {\startoverlay - {\box0} + {\box\scratchbox} %{\definemainfield[help:#1][check][helpsetup][helpinfo:#1][helpinfo:#1]% {\definemainfield[help:#1][check][helpsetup][\v!helptext:#1][\v!helptext:#1]% \fitfield[help:#1]} @@ -128,16 +128,16 @@ \setupfields[\v!reset]% \setupfield [helpsetup] - [\c!breedte=\v!passend, - \c!hoogte=\v!passend, - \c!kader=\v!uit, - \c!klikin=JS(Hide_Fields), - \c!optie={\v!alleenleesbaar,\v!verborgen}]% - \setbox0=\box\voidb@x + [\c!width=\v!fit, + \c!height=\v!fit, + \c!frame=\v!off, + \c!clickin=JS(Hide_Fields), + \c!option={\v!readonly,\v!hidden}]% + \setbox\scratchbox\emptybox \processcommacommand[\pagehelpdata]\dohelpdata - \box0 + \box\scratchbox \fi - \egroup + \egroup \fi} \def\helpbutton % also gobble spaces between [][] @@ -150,15 +150,15 @@ \expandafter\dodohelpbutton \fi} -\def\dodohelpbutton[#1][#2]#3[#4]% #2 is space gobbling dummy - {\iflocation +\def\dodohelpbutton[#1][#2]#3[#4]% #2 is space gobbling dummy + {\iflocation \setpagehelpdata[#4]% \useJSscripts[fld]% \button[#1]{#3}[JS(Vide_Hide_Fields{help:#4})]% \fi} -\def\donohelpbutton[#1][#2]% - {\dodohelpbutton[#1][]{}[#2]} +\def\donohelpbutton[#1][#2]% + {\dodohelpbutton[#1][]{}[#2]} \def\doifhelpinfo#1#2% {\iflocation @@ -170,4 +170,4 @@ \doifsymboldefinedelse{helpinfo:#1}{#2}{#3}% \fi} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/core-ini.tex b/tex/context/base/core-ini.tex index 4fe47b813..ef7523953 100644 --- a/tex/context/base/core-ini.tex +++ b/tex/context/base/core-ini.tex @@ -18,15 +18,40 @@ \unprotect -\appendtoks \flushsyncresets \to \everyendoftextbody +\everypar \emptytoks +\neverypar \emptytoks -\appendtoks \ignorespaces \to \everybeginofpar +\appendtoks \flushnotes \to \everypar +\appendtoks \synchronizesidefloats \to \everypar +\appendtoks \checkindentation \to \everypar +\appendtoks \showparagraphnumber \to \everypar +\appendtoks \flushmargincontents \to \everypar +\appendtoks \flushcommentanchors \to \everypar +\appendtoks \synchronizenotes \to \everypar +\appendtoks \OTRSETshowstatus \to \everypar +\appendtoks \flushpostponedbookmark \to \everypar +\appendtoks \registerparoptions \to \everypar +\appendtoks \flushsyncpositions \to \everypar +\appendtoks \flushpostponednodedata \to \everypar +\appendtoks \dohandlespeech \to \everypar +\appendtoks \insertparagraphintro \to \everypar -\appendtoks \removeunwantedspaces \to \everyendofpar -%appendtoks \strut \to \everyendofpar % option ? -\appendtoks \flushsyncresets \to \everyendofpar -\appendtoks \setlastlinewidth \to \everyendofpar % must happen before endgraf -\appendtoks \endgraf \to \everyendofpar +\appendtoks \flushpostponedbookmark \to \neverypar + +\appendtoks \flushnotes \to \everydisplay +\appendtoks \adjustsidefloatdisplaylines \to \everydisplay + +\appendtoks \flushsyncpositions \to \everyheadstart + +\appendtoks \flushsyncresets \to \everyendoftextbody + +\appendtoks \ignorespaces \to \everybeginofpar + +\appendtoks \removeunwantedspaces \to \everyendofpar +%appendtoks \strut \to \everyendofpar % option ? +\appendtoks \flushsyncresets \to \everyendofpar +\appendtoks \setlastlinewidth \to \everyendofpar % must happen before endgraf +\appendtoks \endgraf \to \everyendofpar % Todo: verbatim, xml, tex, move code to here @@ -35,4 +60,4 @@ \appendtoks \catcode`|=\@@active \let|\normalcompound \to \everyTEXinputmode \appendtoks \catcode`|=\@@letter \to \everyXMLinputmode -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex index 01a273693..230f833b5 100644 --- a/tex/context/base/core-int.tex +++ b/tex/context/base/core-int.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% evt interactiebalken runtime laden (scheelt 8K) +% evt interactionbaren runtime laden (scheelt 8K) %D Still to be done properly. @@ -197,8 +197,8 @@ \fi \iflocation \hbox - {%\setupinteraction[\c!breedte=\!!zeropoint]% - \setinteractionparameter\c!breedte\!!zeropoint + {%\setupinteraction[\c!width=\!!zeropoint]% + \setinteractionparameter\c!width\!!zeropoint \doganaareenpagina\??lk\gotobegincharacter\firstlink\hss \ifnum\noflinks>2 \hskip\@@lkafstand @@ -259,8 +259,8 @@ \fi \iflocation \hbox - {%\setupinteraction[\c!breedte=\!!zeropoint]% - \setinteractionparameter\c!breedte\!!zeropoint + {%\setupinteraction[\c!width=\!!zeropoint]% + \setinteractionparameter\c!width\!!zeropoint #2\relax \hskip\@@lkafstand \doganaareenpagina\??lk\gotobegincharacter\firstlink\hss @@ -279,42 +279,42 @@ \let\setupinteractionscreens\empty -\def\berekeninteractiescherm - {\doifelse\@@scbreedte\v!passend - {\!!widtha\linkerrandbreedte - \advance\!!widtha \linkerrandafstand - \advance\!!widtha \linkermargebreedte - \advance\!!widtha \linkermargeafstand - \ifdim\rugwit>\!!widtha\ifdim\rugwit>\zeropoint\relax - \advance\rugwit -\!!widtha +\def\docalculateinteractionscreen + {\doifelse\@@scwidth\v!fit + {\!!widtha\leftedgewidth + \advance\!!widtha \leftedgedistance + \advance\!!widtha \leftmarginwidth + \advance\!!widtha \leftmargindistance + \ifdim\backspace>\!!widtha\ifdim\backspace>\zeropoint\relax + \advance\backspace -\!!widtha \fi\fi - \advance\!!widtha \zetbreedte - \advance\!!widtha \rechtermargeafstand - \advance\!!widtha \rechtermargebreedte - \advance\!!widtha \rechterrandafstand - \advance\!!widtha \rechterrandbreedte - \scratchdimen\@@scrugwit - \advance\scratchdimen \@@scrugoffset + \advance\!!widtha \makeupwidth + \advance\!!widtha \rightmargindistance + \advance\!!widtha \rightmarginwidth + \advance\!!widtha \rightedgedistance + \advance\!!widtha \rightedgewidth + \scratchdimen\@@scbackspace + \advance\scratchdimen \@@schoroffset \advance\!!widtha 2\scratchdimen} - {\doifelse\@@scbreedte\v!max - {\!!widtha\printpapierbreedte} - {\!!widtha\@@scbreedte}}% - \doifelse\@@schoogte\v!passend - {\!!heighta\bovenhoogte - \advance\!!heighta \bovenafstand - \ifdim\kopwit>\!!heighta\ifdim\kopwit>\zeropoint\relax - \advance\kopwit -\!!heighta + {\doifelse\@@scwidth\v!max + {\!!widtha\printpaperwidth} + {\!!widtha\@@scwidth}}% + \doifelse\@@scheight\v!fit + {\!!heighta\topheight + \advance\!!heighta \topdistance + \ifdim\topspace>\!!heighta\ifdim\topspace>\zeropoint\relax + \advance\topspace -\!!heighta \fi\fi - \advance\!!heighta \zethoogte - \advance\!!heighta \onderafstand - \advance\!!heighta \onderhoogte - \scratchdimen\@@sckopwit - \advance\scratchdimen \@@sckopoffset + \advance\!!heighta \makeupheight + \advance\!!heighta \bottomdistance + \advance\!!heighta \bottomheight + \scratchdimen\@@sctopspace + \advance\scratchdimen \@@scveroffset \advance\!!heighta 2\scratchdimen} - {\doifelse\@@schoogte\v!max - {\!!heighta\printpapierhoogte} - {\!!heighta\@@schoogte}}% - \doif\@@scwachttijd\v!geen{\let\@@scwachttijd\zerocountervalue}} + {\doifelse\@@scheight\v!max + {\!!heighta\printpaperheight} + {\!!heighta\@@scheight}}% + \doif\@@scdelay\v!none{\let\@@scdelay\zerocountervalue}} % The macro is not to be changed; only the \@@ia-variables % may be set! ConTeXt is the producer but we no longer @@ -323,10 +323,10 @@ % with documents produced outside our control. \def\doprepareidentity - {\let\!!stringa\@@iatrefwoord - \let\@@iatrefwoord\empty - \def\doprepareidentity##1{\edef\@@iatrefwoord - {\@@iatrefwoord\ifx\@@iatrefwoord\empty\else\space\fi##1}}% + {\let\!!stringa\@@iakeyword + \let\@@iakeyword\empty + \def\doprepareidentity##1{\edef\@@iakeyword + {\@@iakeyword\ifx\@@iakeyword\empty\else\space\fi##1}}% \@EA\processcommacommand\@EA[\!!stringa]\doprepareidentity \global\let\doprepareidentity\relax} @@ -335,8 +335,8 @@ \doprepareidentity \expanded {\dosetupidentity - {\@@iatitel}{\@@iasubtitel}{\@@iaauteur}{#1}% - {\@@iadatum}{\@@iatrefwoord}}% + {\@@iatitle}{\@@iasubtitle}{\@@iaauthor}{#1}% + {\@@iadate}{\@@iakeyword}}% \global\let\initializeidentity\relax }%\fi} @@ -347,11 +347,11 @@ \def\initializepaper {\bgroup - \ifx\@@pplinks \empty - \ifx\@@pprechts\empty - \ifx\@@ppboven \empty - \ifx\@@pponder \empty - \ifx\@@pcstatus\v!start + \ifx\@@ppleft \empty + \ifx\@@ppright\empty + \ifx\@@pptop \empty + \ifx\@@ppbottom \empty + \ifx\@@pcstate\v!start \locationfalse\fi\else \locationfalse\fi\else \locationfalse\fi\else @@ -359,43 +359,43 @@ \locationfalse\fi \iflocation % without screen settings \egroup - \dosetuppaper\papersize\papierbreedte\papierhoogte + \dosetuppaper\papersize\paperwidth\paperheight \else \egroup - \dosetuppaper\printpapersize\printpapierbreedte\printpapierhoogte + \dosetuppaper\printpapersize\printpaperwidth\printpaperheight \fi} \appendtoks \initializepaper \to \everyshipout \def\doinitializepaper {\bgroup - \berekeninteractiescherm - \ifdim\!!widtha>\papierbreedte\ifdim\!!widtha>\zeropoint - \papierbreedte\!!widtha + \docalculateinteractionscreen + \ifdim\!!widtha>\paperwidth\ifdim\!!widtha>\zeropoint + \paperwidth\!!widtha \fi\fi - \ifdim\!!heighta>\papierhoogte\ifdim\!!heighta>\zeropoint - \papierhoogte\!!heighta + \ifdim\!!heighta>\paperheight\ifdim\!!heighta>\zeropoint + \paperheight\!!heighta \fi\fi \dosetuppaper {\printpapersize} - {\the\papierbreedte} - {\the\papierhoogte}% + {\the\paperwidth} + {\the\paperheight}% \egroup} \let\@@pcscreendata\empty \def\dosetupinteractionscreens % met a, b en \number - {\doifnot\@@pcstatus\v!start\dodosetupinteractionscreens} + {\doifnot\@@pcstate\v!start\dodosetupinteractionscreens} -\setvalue{\??sc\c!optie\v!max }{1} % tzt share with driver -\setvalue{\??sc\c!optie\v!bookmark }{2} % tzt share with driver -\setvalue{\??sc\c!optie\v!passend }{3} % tzt share with driver -\setvalue{\??sc\c!optie\v!dubbelzijdig}{4} % tzt share with driver +\setvalue{\??sc\c!option\v!max }{1} % tzt share with driver +\setvalue{\??sc\c!option\v!bookmark }{2} % tzt share with driver +\setvalue{\??sc\c!option\v!fit }{3} % tzt share with driver +\setvalue{\??sc\c!option\v!doublesided}{4} % tzt share with driver \def\dodosetupinteractionscreens % met a, b en \number {\bgroup - \berekeninteractiescherm - \!!counte=0\getvalue{\??sc\c!optie\@@scoptie}\relax + \docalculateinteractionscreen + \!!counte=0\getvalue{\??sc\c!option\@@scoption}\relax % niet waterdicht \doifnot{\the\!!widtha\the\!!heighta}\@@pcscreendata {\xdef\@@pcscreendata{\the\!!widtha\the\!!heighta}% @@ -406,17 +406,18 @@ \dosetupcropbox\rugoffset\kopoffset\!!widtha\!!heighta \egroup} -\def\dostelinteractieschermin[#1]% +\def\dosetupinteractionscreen[#1]% {\getparameters[\??sc][#1]% \ifproductionrun \let\initializepaper\doinitializepaper \let\setupinteractionscreens\dosetupinteractionscreens \fi} -\appendtoks \setupinteractionscreens \to \everyshipout +\appendtoks \setupinteractionscreens \to \everyfirstshipout % needed to get option=max etc working +\appendtoks \setupinteractionscreens \to \everyshipout % needed for page/screen dimensions -\def\stelinteractieschermin - {\dosingleempty\dostelinteractieschermin} +\def\setupinteractionscreen + {\dosingleempty\dosetupinteractionscreen} %D Due to requests I finally decided to support bookmarks, a %D driver dependant way of showing tables of content. The most @@ -441,10 +442,10 @@ \def\@@booklevel{bl::} \def\@@bookcount{bc::} -\definieerlijst[\@@bookmark] +\definelist[\@@bookmark] -\appendtoks\flushpostponedbookmark\to\everypar -\appendtoks\flushpostponedbookmark\to\neverypar +% \appendtoks\flushpostponedbookmark\to\everypar +% \appendtoks\flushpostponedbookmark\to\neverypar \newtoks\postponedbookmarks @@ -458,15 +459,15 @@ {\ifx\flushpostponedbookmark\relax \else \bgroup \convertargument#1\to\ascii - \writestatus{system}{clashing bookmarks: \ascii}% ECHTE MESSAGE MAKEN + \writestatus\m!systems{clashing bookmarks: \ascii}% ECHTE MESSAGE MAKEN \egroup \fi \doglobal\prependtoks - \schrijfnaarlijst[\@@bookmark]{}{#1}% + \writetolist[\@@bookmark]{}{#1}% \to\postponedbookmarks} \def\complexbookmark[#1]#2% - {\doglobal\appendtoks\schrijfnaarlijst[#1]{}{#2}\to\postponedbookmarks} + {\doglobal\appendtoks\writetolist[#1]{}{#2}\to\postponedbookmarks} \definecomplexorsimple\bookmark @@ -494,7 +495,7 @@ \flushbookmark \egroup \else - \expanded{\placebookmarks\@EA[\getvalue{\??ih\v!inhoud\c!lijst}]}% + \expanded{\placebookmarks\@EA[\getvalue{\??ih\v!content\c!list}]}% \fi \fi} @@ -510,7 +511,7 @@ \setxvalue{\@@bookcount0}{1}% \global\chardef\currentbookmarklevel\zerocount \global\chardef\previousbookmarklevel\zerocount - \doutilities{#1,\@@bookmark}\jobname{#1}\relax\relax} + \doutilities{listentries,#1,\@@bookmark}\jobname{#1}\relax\relax} \def\dodogetbookmarkelement#1#2#3#4#5#6% {\doifelsenothing{#1} @@ -608,7 +609,7 @@ \iftracebookmarks(#6: #4)\quad(\the\openbookmark)\par\fi \doinsertbookmark{#2}{#3}{#4}{#5}{\openbookmark}} -% \startinteractiemenu[rechts] +% \startinteractionmenu[rechts] % \but [eerste] eerste \\ % \txt hello world \\ % \but [tweede] tweede \\ @@ -620,14 +621,14 @@ % \but [tweede] tweede \\ % \com \vfill \\ % \but [derde] derde \\ -% \stopinteractiemenu +% \stopinteractionmenu \newif\iflocationmenupermitted -\def\testinteractiemenu#1% +\def\testinteractionmenu#1% {\iflocation - \doifelse\@@iamenu\v!aan - {\doifelsevalue{\??am#1\c!status}\v!start + \doifelse\@@iamenu\v!on + {\doifelsevalue{\??am#1\c!state}\v!start {\global\locationmenupermittedtrue} {\global\locationmenupermittedfalse}} {\global\locationmenupermittedfalse}% @@ -635,22 +636,22 @@ \global\locationmenupermittedfalse \fi} -\def\doblokkeerinteractiemenu[#1][#2][#3]% - {\def\dodoblokkeerinteractiemenu##1% +\def\dodisableinteractionmenu[#1][#2][#3]% + {\def\dododisableinteractionmenu##1% {\doifelse{#3}{} - {\letvalue{\??am##1\c!blokkade}\empty} - {\edef\interactieblokkade{\getvalue{\??am##1\c!blokkade}} + {\letvalue{\??am##1\c!obstruction}\empty} + {\edef\interactieblokkade{\getvalue{\??am##1\c!obstruction}} \def\docommando####1% {#1{####1}{\interactieblokkade}}% #1 = \remove or \add \processcommalist[#3]\docommando - \setevalue{\??am##1\c!blokkade}{\interactieblokkade}}}% - \processcommalist[#2]\dodoblokkeerinteractiemenu} + \setevalue{\??am##1\c!obstruction}{\interactieblokkade}}}% + \processcommalist[#2]\dododisableinteractionmenu} -\def\blokkeerinteractiemenu - {\dotripleempty\doblokkeerinteractiemenu[\addtocommalist]} +\def\disableinteractionmenu + {\dotripleempty\dodisableinteractionmenu[\addtocommalist]} -\def\geefinteractiemenuvrij - {\dotripleempty\doblokkeerinteractiemenu[\removefromcommalist]} +\def\enableinteractionmenu + {\dotripleempty\dodisableinteractionmenu[\removefromcommalist]} % ja : kader/achtergrond met tekst % leeg : kader/achtergrond maar geen tekst @@ -683,7 +684,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!style\c!color{#3}}}% \iflocationclick \hbox{\gotolocation{#4}{\box\locationbox}}% \else @@ -693,10 +694,10 @@ \let\dosetlocationboxyes\dosetlocationboxcontent \def\dosetlocationboxempty#1[% - {\dosetlocationboxcontent{#1}[\c!leeg=\v!ja,} + {\dosetlocationboxcontent{#1}[\c!empty=\v!yes,} \def\dosetlocationboxno#1[% - {\dosetlocationboxcontent{#1}[\c!leeg=\v!ja,\c!kader=,\c!achtergrond=,} + {\dosetlocationboxcontent{#1}[\c!empty=\v!yes,\c!frame=,\c!background=,} \def\dosetlocationboxnone#1[#2]#3[#4]% {\global\skippedmenuitemtrue} @@ -712,8 +713,8 @@ % \!!doneafalse % \fi % \if!!donea -% \ifcase\csname\??am\??am\csname#1\c!zelfdepagina\endcsname\endcsname\relax -% \copycsname#1\c!kleur\endcsname\csname#1\c!contrastkleur\endcsname +% \ifcase\csname\??am\??am\csname#1\c!samepage\endcsname\endcsname\relax +% \copycsname#1\c!color\endcsname\csname#1\c!contrastkleur\endcsname % \@EAEAEA\dosetlocationboxyes % \or % \@EAEAEA\dosetlocationboxempty @@ -728,7 +729,7 @@ % % \def\setlocationboxnop#1% % {\locationclickfalse -% \ifcase\csname\??am\??am\csname#1\c!onbekendeverwijzing\endcsname\endcsname\relax +% \ifcase\csname\??am\??am\csname#1\c!unknownreference\endcsname\endcsname\relax % \@EA\dosetlocationboxyes % \or % \@EA\dosetlocationboxempty @@ -740,14 +741,14 @@ % % \def\setlocationbox#1[#2]#3[#4]% % {\bgroup % really needed ! -% \edef\permittedreferences{\csname#1\c!blokkade\endcsname}% +% \edef\permittedreferences{\csname#1\c!obstruction\endcsname}% % \doifreferencepermittedelse{#4} % {\setlocationboxyes{#1}[#2]{#3}[#4]} % {\setlocationboxnop{#1}[#2]{#3}[#4]}% % \egroup} % % \def\setlocationboxraw#1[#2]#3[#4]% -% {\localframed[#1][#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}} +% {\localframed[#1][#2]{\dolocationattributes{#1}\c!style\c!color{#3}}} \def\setlocationboxyes#1[#2]#3[#4]% {\locationclicktrue @@ -757,18 +758,18 @@ \gotolocation {#4}% % needed {\ifrealreferencepage - \ifcase\csname\??am\??am\csname#1\c!zelfdepagina\endcsname\endcsname\relax - \copycsname#1\c!kleur\endcsname\csname#1\c!contrastkleur\endcsname - \localframed[#1][#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}% + \ifcase\csname\??am\??am\csname#1\c!samepage\endcsname\endcsname\relax + \copycsname#1\c!color\endcsname\csname#1\c!contrastcolor\endcsname + \localframed[#1][#2]{\dolocationattributes{#1}\c!style\c!color{#3}}% \or - \localframed[#1][\c!leeg=\v!ja,#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}% + \localframed[#1][\c!empty=\v!yes,#2]{\dolocationattributes{#1}\c!style\c!color{#3}}% \or - \localframed[#1][\c!leeg=\v!ja,\c!kader=,\c!achtergrond=,#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}% + \localframed[#1][\c!empty=\v!yes,\c!frame=,\c!background=,#2]{\dolocationattributes{#1}\c!style\c!color{#3}}% \or \global\skippedmenuitemtrue \fi \else - \localframed[#1][#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}% + \localframed[#1][#2]{\dolocationattributes{#1}\c!style\c!color{#3}}% \fi}}% \ifskippedmenuitem\else\box\locationbox\fi} @@ -777,23 +778,23 @@ \setbox\locationbox\hbox {\resetgoto % anders cyclische aanroep ! \global\skippedmenuitemfalse - \ifcase\csname\??am\??am\csname#1\c!onbekendeverwijzing\endcsname\endcsname\relax - \localframed[#1][#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}% + \ifcase\csname\??am\??am\csname#1\c!unknownreference\endcsname\endcsname\relax + \localframed[#1][#2]{\dolocationattributes{#1}\c!style\c!color{#3}}% \or - \localframed[#1][\c!leeg=\v!ja,#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}% + \localframed[#1][\c!empty=\v!yes,#2]{\dolocationattributes{#1}\c!style\c!color{#3}}% \or - \localframed[#1][\c!leeg=\v!ja,\c!kader=,\c!achtergrond=,#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}% + \localframed[#1][\c!empty=\v!yes,\c!frame=,\c!background=,#2]{\dolocationattributes{#1}\c!style\c!color{#3}}% \or \global\skippedmenuitemtrue \fi}% \ifskippedmenuitem\else\box\locationbox\fi} \def\setlocationboxraw#1[#2]#3[#4]% - {\localframed[#1][#2]{\dolocationattributes{#1}\c!letter\c!kleur{#3}}} + {\localframed[#1][#2]{\dolocationattributes{#1}\c!style\c!color{#3}}} \def\setlocationbox#1[#2]#3[#4]% {\bgroup % really needed ! - \edef\permittedreferences{\csname#1\c!blokkade\endcsname}% + \edef\permittedreferences{\csname#1\c!obstruction\endcsname}% \doifreferencepermittedelse{#4}% {\setlocationboxyes{#1}[#2]{#3}[#4]}% {\setlocationboxnop{#1}[#2]{#3}[#4]}% @@ -819,9 +820,9 @@ \def\executeamboxcommands#1#2#3#4#5% {%\processaction % [\getvalue{\??am#1\c!dummy}] - % [ \v!ja=>\chardef\handleunknownmenuitem=0\relax, - % \v!leeg=>\chardef\handleunknownmenuitem=1\relax, - % \v!nee=>\chardef\handleunknownmenuitem=2\relax]% + % [ \v!yes=>\chardef\handleunknownmenuitem=0\relax, + % \v!empty=>\chardef\handleunknownmenuitem=1\relax, + % \v!no=>\chardef\handleunknownmenuitem=2\relax]% \getvalue{\??am#1#3}\relax \ifextendedmenu \setamboxcommands{#1}{#4}% @@ -861,20 +862,20 @@ \to \everysetmenucommands \def\menu@raw[#1]#2\\% - {\@@amboxcommand\naarbox{\ignorespaces#2\unskip}[#1]\\}% + {\@@amboxcommand\gotobox{\ignorespaces#2\unskip}[#1]\\}% \def\menu@but[#1]#2\\% {\@@amboxcommand\do@@amposition\currentmenu{#1}{\setlocationbox{\??am\currentmenu}[]{\ignorespaces#2\unskip}[#1]}\\}% \def\menu@got[#1]#2\\% pas op! offset - {\@@amboxcommand\setlocationbox{\??am\currentmenu}[\c!kader=\v!uit,\c!achtergrond=]{\ignorespaces#2\unskip}[#1]\\}% + {\@@amboxcommand\setlocationbox{\??am\currentmenu}[\c!frame=\v!off,\c!background=]{\ignorespaces#2\unskip}[#1]\\}% \def\menu@nop#1\\% %{\@@amboxcommand\phantom{\localframed[\??am\currentmenu][]{#1}}\\}% - {\@@amboxcommand\setlocationboxraw{\??am\currentmenu}[\c!kader=\v!uit,\c!achtergrond=,\c!leeg=\v!ja]{\ignorespaces#1\unskip}[]\\}% + {\@@amboxcommand\setlocationboxraw{\??am\currentmenu}[\c!frame=\v!off,\c!background=,\c!empty=\v!yes]{\ignorespaces#1\unskip}[]\\}% \def\menu@txt#1\\% - {\@@amboxcommand\localframed[\??am\currentmenu][\c!kader=\v!uit,\c!achtergrond=]{\ignorespaces#1\unskip}\\}% + {\@@amboxcommand\localframed[\??am\currentmenu][\c!frame=\v!off,\c!background=]{\ignorespaces#1\unskip}\\}% \def\menu@rul#1\\% ook \do@@amposition ! {\@@amboxcommand\localframed[\??am\currentmenu][]{\ignorespaces#1\unskip}\\}% @@ -902,24 +903,24 @@ \def\@@amhbox#1#2#3#4% {\def\currentmenu{#3}% - \testinteractiemenu{#3}% + \testinteractionmenu{#3}% \iflocationmenupermitted \bgroup \showcomposition \def\dolocationcommand##1{\dosetlocationcommanditem{#3}{##1}}% - \dimen0=\zetbreedte + \dimen0=\makeupwidth \advance\dimen0 \pagebackgroundhoffset \advance\dimen0 \pagebackgroundhoffset - \advance\dimen0 -\getvalue{\??am#3\c!linkeroffset}% - \advance\dimen0 -\getvalue{\??am#3\c!rechteroffset}% + \advance\dimen0 -\getvalue{\??am#3\c!leftoffset}% + \advance\dimen0 -\getvalue{\??am#3\c!rightoffset}% \setbox0\hbox to \dimen0 {\forgetall - \executeamboxcommands{#3}{#4}\c!links\c!midden\c!rechts}% + \executeamboxcommands{#3}{#4}\c!left\c!middle\c!right}% \setbox0\hbox{\do@@ammenuposition{#3}{\box0}}% - \wd0=\zetbreedte + \wd0=\makeupwidth % geen \ht=#2 setting (yet) \hskip-\pagebackgroundhoffset - \hskip \getvalue{\??am#3\c!linkeroffset}% + \hskip \getvalue{\??am#3\c!leftoffset}% \box0\relax \egroup \else @@ -928,30 +929,30 @@ \def\@@amvbox#1#2#3#4% don't change skipping, this one works! {\def\currentmenu{#3}% - \testinteractiemenu{#3}% + \testinteractionmenu{#3}% \iflocationmenupermitted \bgroup \showcomposition - \dimen0=\teksthoogte + \dimen0=\textheight \advance\dimen0 \pagebackgroundvoffset \advance\dimen0 \pagebackgroundvoffset \advance\dimen0 \pagebackgrounddepth - \advance\dimen0 -\getvalue{\??am#3\c!bovenoffset}% - \advance\dimen0 -\getvalue{\??am#3\c!onderoffset}% + \advance\dimen0 -\getvalue{\??am#3\c!topoffset}% + \advance\dimen0 -\getvalue{\??am#3\c!bottomoffset}% \setbox0\vbox to \dimen0 {\forgetall % Voor't geval de afstand - %\setupblank[\v!standaard]% % (tijdelijk) is aangepast. + %\setupblank[\v!standard]% % (tijdelijk) is aangepast. \restorestandardblank \hsize#2\relax - \executeamboxcommands{#3}{#4}\c!voor\c!tussen\c!na}% + \executeamboxcommands{#3}{#4}\c!before\c!inbetween\c!after}% \setbox0\vbox{\hbox{\do@@ammenuposition{#3}{\box0}}}% \setbox0\vbox {\vskip-\pagebackgroundvoffset - \vskip\getvalue{\??am#3\c!bovenoffset}% + \vskip\getvalue{\??am#3\c!topoffset}% \ht0=\zeropoint \box0 \vskip\pagebackgroundvoffset}% overbodig - \ht0=\teksthoogte + \ht0=\textheight \wd0=#2\relax \box0 \egroup @@ -963,84 +964,84 @@ \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!right}{\@@amvbox{\dodummypageskip\v!right}\rightedgewidth} +\setvalue{\??am\s!do\v!left }{\@@amvbox{\dodummypageskip\v!left}\leftedgewidth} +\setvalue{\??am\s!do\v!top }{\@@amhbox{\dodummypageskip\v!top}\topheight} +\setvalue{\??am\s!do\v!bottom }{\@@amhbox{\dodummypageskip\v!bottom}\bottomheight} -\def\dointeractiemenu#1#2% - {\getvalue{\??am\s!do\getvalue{\??am#1\c!plaats}}{#1}{#2}} +\def\dointeractionmenu#1#2% + {\getvalue{\??am\s!do\getvalue{\??am#1\c!location}}{#1}{#2}} -\unexpanded\def\interactiemenu[#1]% +\unexpanded\def\interactionmenu[#1]% {\getvalue{\??am\c!menu#1}} -\def\horizontaalinteractiemenu#1#2#3#4% +\def\horizontalinteractionmenu#1#2#3#4% {\ifdim#2>\zeropoint % new \dimen2\zeropoint \setbox0\hbox {\def\docommando##1% - {\doifnotvalue{\??am##1\c!status}\v!geen + {\doifnotvalue{\??am##1\c!state}\v!none {\hskip\dimen2 \setbox2\hbox to #2 - {\getvalue{\??am##1#3}\interactiemenu[##1]\getvalue{\??am##1#4}}% - \doifelsevalue{\??am##1\c!afstand}\v!overlay + {\getvalue{\??am##1#3}\interactionmenu[##1]\getvalue{\??am##1#4}}% + \doifelsevalue{\??am##1\c!distance}\v!overlay {\dimen2\zeropoint \wd2\zeropoint}% - {\dimen2=\getvalue{\??am##1\c!afstand}}% + {\dimen2=\getvalue{\??am##1\c!distance}}% \box2}}% - \startinteractie + \startinteraction \processcommacommand[\getvalue{\??am#1}]\docommando - \stopinteractie}% + \stopinteraction}% \wd0=#2\relax \box0\relax \fi} -\def\vertikaalinteractiemenu#1#2#3#4% +\def\verticalinteractionmenu#1#2#3#4% {\ifdim#2>\zeropoint % new \dimen2\zeropoint \setbox0\vbox {\def\docommando##1% - {\doifnotvalue{\??am##1\c!status}\v!geen + {\doifnotvalue{\??am##1\c!state}\v!none {\vskip\dimen2 \setbox2\vbox to #2 - {\getvalue{\??am##1#3}\interactiemenu[##1]\getvalue{\??am##1#4}}% - \doifelsevalue{\??am##1\c!afstand}\v!overlay + {\getvalue{\??am##1#3}\interactionmenu[##1]\getvalue{\??am##1#4}}% + \doifelsevalue{\??am##1\c!distance}\v!overlay {\dimen2\zeropoint \offinterlineskip \dp2\zeropoint \ht2\zeropoint}% - {\dimen2=\getvalue{\??am##1\c!afstand}}% + {\dimen2=\getvalue{\??am##1\c!distance}}% \box2}}% - \startinteractie + \startinteraction \processcommacommand[\getvalue{\??am#1}]\docommando - \stopinteractie}% + \stopinteraction}% \ht0=#2\relax \dp0\zeropoint \box0\relax \fi} -\letvalue{\??am\v!links }\empty -\letvalue{\??am\v!rechts}\empty -\letvalue{\??am\v!boven }\empty -\letvalue{\??am\v!onder }\empty +\letvalue{\??am\v!left }\empty +\letvalue{\??am\v!right}\empty +\letvalue{\??am\v!top }\empty +\letvalue{\??am\v!bottom }\empty % todo : \defineinteractionmenuclass -\def\interactiemenus[#1]% +\def\interactionmenus[#1]% {\iflocation \getvalue{\??am\??am\c!menu#1}% \else \dodummypageskip{#1}% \fi} -\setvalue{\??am\??am\c!menu\v!links}% - {\horizontaalinteractiemenu\v!links\linkerrandbreedte\c!links\c!rechts} -\setvalue{\??am\??am\c!menu\v!rechts}% - {\horizontaalinteractiemenu\v!rechts\rechterrandbreedte\c!links\c!rechts} -\setvalue{\??am\??am\c!menu\v!boven}% - {\vertikaalinteractiemenu\v!boven\bovenhoogte\c!voor\c!na} -\setvalue{\??am\??am\c!menu\v!onder}% - {\vertikaalinteractiemenu\v!onder\onderhoogte\c!voor\c!na} +\setvalue{\??am\??am\c!menu\v!left}% + {\horizontalinteractionmenu\v!left\leftedgewidth\c!left\c!right} +\setvalue{\??am\??am\c!menu\v!right}% + {\horizontalinteractionmenu\v!right\rightedgewidth\c!left\c!right} +\setvalue{\??am\??am\c!menu\v!top}% + {\verticalinteractionmenu\v!top\topheight\c!before\c!after} +\setvalue{\??am\??am\c!menu\v!bottom}% + {\verticalinteractionmenu\v!bottom\bottomheight\c!before\c!after} % this can be implemented with the following command (which % is new, undocumented, experimental, untested, etc etc) @@ -1049,13 +1050,13 @@ {\dodoubleargument\dodefineinteractionmenuclass} \def\dodefineinteractionmenuclass[#1][#2]% tag hori|veri - {\doifelse{#2}\v!vertikaal + {\doifelse{#2}\v!vertical {\setvalue{\??am\??am\c!menu#1}% - {\vertikaalinteractiemenu - {#1}{\getvalue{\??am#1\c!breedte}}\c!voor\c!na}} + {\verticalinteractionmenu + {#1}{\getvalue{\??am#1\c!width}}\c!before\c!after}} {\setvalue{\??am\??am\c!menu#1}% - {\horizontaalinteractiemenu - {#1}{\getvalue{\??am#1\c!hoogte}}\c!links\c!rechts}}} + {\horizontalinteractionmenu + {#1}{\getvalue{\??am#1\c!height}}\c!left\c!right}}} % \setupinteraction[menu=on,state=start] % @@ -1075,7 +1076,7 @@ % \but [nextpage] test-b \\ % \stopinteractionmenu % -% \setupheadertexts[{\interactiemenu[another]}] +% \setupheadertexts[{\interactionmenu[another]}] % % \starttext % @@ -1090,18 +1091,18 @@ \def\local@@ambox#1#2#3#4% don't change skipping, this one works! {\bgroup - \testinteractiemenu{#3}% + \testinteractionmenu{#3}% \iflocationmenupermitted - \executeamboxcommands{#3}{#4}\c!voor\c!tussen\c!na + \executeamboxcommands{#3}{#4}\c!before\c!inbetween\c!after \else #1\relax \fi \egroup} \unprotected\def\includemenu[#1]% - {\doifvalue{\??am#1\c!status}\v!lokaal + {\doifvalue{\??am#1\c!state}\v!local {\bgroup - \letvalue{\??am#1\c!status}\v!start + \letvalue{\??am#1\c!state}\v!start \let\@@amvbox\local@@ambox \let\@@amhbox\local@@ambox \getvalue{\??am\c!menu#1}% @@ -1112,83 +1113,83 @@ % for the moment we will support the old method % -% \stelinteractiemenuin[right][{abc[xyz]},...] -% \stelinteractiemenuin[right][key=val,...] +% \stelinteractionmenuin[right][{abc[xyz]},...] +% \stelinteractionmenuin[right][key=val,...] \newif\ifextendedmenu -\def\definieerinteractiemenu - {\dotripleempty\dodefinieerinteractiemenu} +\def\defineinteractionmenu + {\dotripleempty\dodefineinteractionmenu} -\def\dodefinieerinteractiemenu[#1][#2]% compatibility hack +\def\dodefineinteractionmenu[#1][#2]% compatibility hack {\convertargument#2\to\ascii % will disappear soon \doifinstringelse[\ascii \dodostelinteractielijstmenuinx - \dododefinieerinteractiemenu + \dododefineinteractionmenu [#1][#2]} % [name] [location] % [name] [location] [pars] -\def\dododefinieerinteractiemenu[#1][#2][#3]% +\def\dododefineinteractionmenu[#1][#2][#3]% {% main settings \letvalue{\??am\c!menu#1}\empty % \setvalue{\??am\c!menu#1}% - % {\extendedmenufalse\dointeractiemenu{#1}{}}% + % {\extendedmenufalse\dointeractionmenu{#1}{}}% \setvalue{\@@dodolijstelement#1}% - {\def\dosomelijstelement{\dodomenulijstelement{#1}}}% + {\def\dosomelijstelement{\dodomenulistelement{#1}}}% \presetlocalframed[\??am#1]% % register location \expanded{\addtocommalist{#1}\@EA\noexpand\csname\??am#2\endcsname}% % inherit settings \doifnot{#1}{#2} {\copyparameters[\??am#1][\??am#2] - [\c!links,\c!midden,\c!rechts,\c!voor,\c!na,\c!tussen,% - \c!breedte,\c!hoogte,\c!afstand,\c!offset,% - \c!kader,\c!kaderkleur,\c!lijndikte,% - \c!achtergrond,\c!achtergrondkleur,\c!achtergrondraster,% - \c!letter,\c!kleur,\c!contrastkleur,\c!zelfdepagina,\c!onbekendeverwijzing,% - \c!linkeroffset,\c!rechteroffset,\c!bovenoffset,\c!onderoffset]}% + [\c!left,\c!middle,\c!right,\c!before,\c!after,\c!inbetween,% + \c!width,\c!height,\c!distance,\c!offset,% + \c!frame,\c!framecolor,\c!rulethickness,% + \c!background,\c!backgroundcolor,\c!backgroundscreen,% + \c!style,\c!color,\c!contrastcolor,\c!samepage,\c!unknownreference,% + \c!leftoffset,\c!rightoffset,\c!topoffset,\c!bottomoffset]}% % additional settings - \getparameters[\??am#1][\c!plaats=#2,\c!blokkade=,#3]} + \getparameters[\??am#1][\c!location=#2,\c!obstruction=,#3]} -\def\stelinteractiemenuin - {\dodoubleargument\dostelinteractiemenuin} +\def\setupinteractionmenu + {\dodoubleargument\dosetupinteractionmenu} -\def\dostelinteractiemenuin[#1][% compatibillity hack +\def\dosetupinteractionmenu[#1][% compatibillity hack {\doifnextcharelse\bgroup % will disappear soon {\dodostelinteractielijstmenuiny[#1][} - {\dodostelinteractiemenuin [#1][}} + {\dodosetupinteractionmenu [#1][}} \def\dodostelinteractielijstmenuinx[#1][#2][#3]% compatibillity hack - {\setvalue{\??am\c!menu#1}{\extendedmenufalse\dointeractiemenu{#1}{#2}}} + {\setvalue{\??am\c!menu#1}{\extendedmenufalse\dointeractionmenu{#1}{#2}}} \def\dodostelinteractielijstmenuiny[#1][#2]% compatibillity hack {\setvalue{\??am\c!menu#1}% - {\extendedmenufalse\dointeractiemenu{#1}{#2}}} + {\extendedmenufalse\dointeractionmenu{#1}{#2}}} -\def\dodostelinteractiemenuin[#1][#2]% +\def\dodosetupinteractionmenu[#1][#2]% {\def\docommando##1{\getparameters[\??am##1][#2]}% \processcommalist[#1]\docommando} -\setvalue{\??am\??am\v!ja }{0} -\setvalue{\??am\??am\v!leeg}{1} -\setvalue{\??am\??am\v!nee }{2} -\setvalue{\??am\??am\v!geen}{3} +\setvalue{\??am\??am\v!yes }{0} +\setvalue{\??am\??am\v!empty}{1} +\setvalue{\??am\??am\v!no }{2} +\setvalue{\??am\??am\v!none}{3} \setvalue{\??am\??am }{1} % default -\processbetween{\v!interactiemenu}\dostartinteractiemenu +\processbetween{\v!interactionmenu}\dostartinteractionmenu -\def\dostartinteractiemenu#1% - {\dodostartinteractiemenu#1\dodostopinteractiemenu} +\def\dostartinteractionmenu#1% + {\dodostartinteractionmenu#1\dodostopinteractionmenu} -\def\dodostartinteractiemenu[#1]#2\dodostopinteractiemenu - {\setvalue{\??am\c!menu#1}{\extendedmenutrue\dointeractiemenu{#1}{#2}}} +\def\dodostartinteractionmenu[#1]#2\dodostopinteractionmenu + {\setvalue{\??am\c!menu#1}{\extendedmenutrue\dointeractionmenu{#1}{#2}}} \def\resetinteractionmenu[#1]% {\letvalue{\??am\c!menu#1}\empty} -\def\dodomenulijstelement#1#2#3#4#5#6#7% +\def\dodomenulistelement#1#2#3#4#5#6#7% {\setbox0=\hbox {\let\gotolocation\gobbleoneargument % hack to catch last [] %\locationclickfalse % ipv ^ @@ -1196,24 +1197,18 @@ \setlocationboxyes {\??am#1}% % needed ! []% no settings - {\limitatetext{#5}{\getvalue{\??li#2\c!maxbreedte}}{\unknown}}% % needed ! + {\limitatetext{#5}{\getvalue{\??li#2\c!maxwidth}}{\unknown}}% % needed ! []}% normally the destination, catch by gobble \@@amboxcommand\do@@amposition{#1}{#7}% beware, we pass the pagenumber {\ignorespaces\linklisttoelement{#2}{#3}{#6}{#7}{\box0}\unskip}\\} -% \scherm moet worden als \pagina - -\def\simplescherm% zou niet nodig moeten zijn - {\iflocation - \pagina[\v!ja]% - \fi} +% \scherm moet worden als \page -\def\complexscherm[#1]% - {\iflocation - \pagina[#1]% - \fi} +\def\screen + {\dosingleempty\doscreen} -\definecomplexorsimple\scherm +\def\doscreen[#1]% + {\iflocation\page[#1]\fi} \unexpanded\def\menubutton {\dodoubleempty\domenubutton} @@ -1259,7 +1254,7 @@ {\bgroup \def\setlocationbox##1[##2]##3[##4]% {\localframed[##1][##2]% - {\dolocationattributes{##1}\c!letter\c!kleur{##3}}}% + {\dolocationattributes{##1}\c!style\c!color{##3}}}% \domenubutton[#1][#2]#3[]% \egroup} @@ -1277,8 +1272,8 @@ \def\syncprefix{sync} \def\syncmarker{syncmark} -%\definieermarkering[\syncmarker] -%\stelmarkeringin[\syncmarker][\c!expansie=\v!ja] +%\definemarking[\syncmarker] +%\setupmarking[\syncmarker][\c!expansie=\v!ja] \newmark\syncmarker @@ -1286,15 +1281,15 @@ \newif\ifsynchronisation -\def\startsynchronisatie% +\def\startsynchronization% {\iflocation\ifsynchronisation \doglobal\increment\synccounter \fi\fi} -\def\stopsynchronisatie% +\def\stopsynchronization% {\iflocation\ifsynchronisation %\thisisdestination{\syncprefix:\synccounter}% - \paginareferentie[\syncprefix:\synccounter]% + \pagereference[\syncprefix:\synccounter]% \ifvmode \@EA\setmark\@EA\syncmarker\@EA{\synccounter} % \marking[\syncmarker]{\synccounter}% \else @@ -1302,35 +1297,35 @@ \fi \fi\fi} -\def\synchroniseer% - {\startsynchronisatie - \stopsynchronisatie} +\def\synchronize% + {\startsynchronization + \stopsynchronization} -\def\dostelsynchronisatiein[#1]% +\def\dosetupsynchronization[#1]% {\getparameters[\??sy][#1]% - \doifelse\@@systatus\v!start + \doifelse\@@systate\v!start \synchronisationtrue \synchronisationfalse} -\def\stelsynchronisatiein - {\dosingleargument\dostelsynchronisatiein} +\def\setupsynchronization + {\dosingleargument\dosetupsynchronization} -\def\definieersynchronisatie - {\dosingleargument\dodefinieersynchronisatie} +\def\definesynchronization + {\dosingleargument\dodefinesynchronization} -\def\stelsynchronisatiebalkin +\def\setupsynchronizationbar {\dodoubleargument\getparameters[\??ba]} \presetlocalframed[\??ba] -\setvalue{synchronisatie\v!pagina}[#1]% +\setvalue{synchronisatie\v!page}[#1]% {\bgroup - %\setupinteraction[\c!breedte=\!!zeropoint]% - \setinteractionparameter\c!breedte\!!zeropoint + %\setupinteraction[\c!width=\!!zeropoint]% + \setinteractionparameter\c!width\!!zeropoint \setbox0=\hbox {\localframed[\??ba][]% - {\dolocationattributes\??ba\c!letter\c!kleur{\strut\@@batekst}}}% - \mindermeldingen + {\dolocationattributes\??ba\c!style\c!color{\strut\@@batext}}}% + \dontcomplain \def\onder% {\leaders\hrule\!!depth1ex\!!height-.5ex\hfil}% \def\boven##1##2##3% @@ -1341,9 +1336,9 @@ \advance\dimen0 -##3\dimen2 %\gotodestination % {}{#1}{\syncprefix:##1}{} - % {\hbox to \dimen0{\color[\locationcolor\@@bakleur]{\onder}}}}% - \naarbox - {\hbox to \dimen0{\color[\locationcolor\@@bakleur]{\onder}}}% + % {\hbox to \dimen0{\color[\locationcolor\@@bacolor]{\onder}}}}% + \gotobox + {\hbox to \dimen0{\color[\locationcolor\@@bacolor]{\onder}}}% [#1::\syncprefix:##1]}% \hbox {\def\check##1##2% @@ -1370,25 +1365,25 @@ \box0\relax}% \egroup} -\setvalue{synchronisatie\v!lokaal}[#1]% +\setvalue{synchronisatie\v!local}[#1]% {\bgroup - %\setupinteraction[\c!breedte=\!!zeropoint]% - \setinteractionparameter\c!breedte\!!zeropoint + %\setupinteraction[\c!width=\!!zeropoint]% + \setinteractionparameter\c!width\!!zeropoint \def\blackrule{\hbox{\vrule\!!height.5em\!!width.5em}}% %\gotodestination % {}{##1}{\syncprefix:#1}{0} - % {\color[\locationcolor\@@bakleur]{\blackrule}}% - \naarbox % - {\color[\locationcolor\@@bakleur]{\blackrule}}% + % {\color[\locationcolor\@@bacolor]{\blackrule}}% + \gotobox % + {\color[\locationcolor\@@bacolor]{\blackrule}}% [#1::\syncprefix:\synccounter]% \egroup} -\def\synchronisatiebalk[#1][#2]% +\def\synchronizationbar[#1][#2]% {\iflocation\ifsynchronisation \bgroup - \stelsynchronisatiebalkin - [\c!tekst=\getvalue{doc:des:#1},#2]% - \getvalue{synchronisatie\@@bavariant}[#1]% + \setupsynchronizationbar + [\c!text=\getvalue{doc:des:#1},#2]% + \getvalue{synchronisatie\@@baalternative}[#1]% \egroup \fi\fi} @@ -1408,7 +1403,7 @@ {\hbox{\gotorealpage{}{}{#3} {#2}}} {\hbox{\gotorealpage{}{}{#3} - {\dolocationattributes{#1}\c!letter\c!kleur{#2}}}}% + {\dolocationattributes{#1}\c!style\c!color{#2}}}}% \fi \else {#2}% @@ -1416,13 +1411,13 @@ \presetlocalframed[\??ib] -\def\interactiebalka +\def\interactionbara {\iflocation \bgroup - %\setupinteraction[\c!breedte=\!!zeropoint]% - \setinteractionparameter\c!breedte\!!zeropoint - \setupblackrules[\c!hoogte=\v!max,\c!diepte=\v!max]% maten ?? - \!!widthb\@@ibbreedte + %\setupinteraction[\c!width=\!!zeropoint]% + \setinteractionparameter\c!width\!!zeropoint + \setupblackrules[\c!height=\v!max,\c!depth=\v!max]% maten ?? + \!!widthb\@@ibwidth \advance\!!widthb -2.75em\relax \!!widtha\!!widthb \divide\!!widtha \lastpage\relax @@ -1431,20 +1426,20 @@ \ifvoid\meterbox \bgroup \processaction - [\@@ibstap] - [ \v!klein=>\dimen0=.25em\relax, - \v!middel=>\dimen0=.5em\relax, - \v!groot=>\dimen0=1em\relax, + [\@@ibstep] + [ \v!small=>\dimen0=.25em\relax, + \v!medium=>\dimen0=.5em\relax, + \v!big=>\dimen0=1em\relax, \s!unknown=>\dimen0=\!!widtha]% \ifdim\!!widtha<\dimen0\relax \!!counta\dimen0\relax \!!countb\!!widtha \divide\!!counta \!!countb \else - \!!counta\@@ibstap\relax + \!!counta\@@ibstep\relax \fi \!!widtha=\!!counta\!!widtha - \setbox0\hbox{\blackrule[\c!breedte=\!!widtha]}% + \setbox0\hbox{\blackrule[\c!width=\!!widtha]}% \global\setbox\meterbox\hbox to \!!widthb {\hss % brrr @@ -1457,9 +1452,9 @@ \egroup \noindent \strut - \hbox to \@@ibbreedte - {\mindermeldingen - \setupblackrules[\c!breedte=1em]% + \hbox to \@@ibwidth + {\dontcomplain + \setupblackrules[\c!width=1em]% \doganaareenpagina\??ib\blackrule\firstpage \hss \color[middlegray]{\copy\meterbox}% @@ -1467,7 +1462,7 @@ {\ifdim\!!widtha<1em\relax \!!widtha=1em\relax \fi - \setupblackrules[\c!breedte=\!!widtha]% + \setupblackrules[\c!width=\!!widtha]% \ifnum\realpageno>\plusone \!!counta\realpageno \advance\!!counta -2\relax @@ -1475,7 +1470,7 @@ % or just: \hskip\zeropoint\!!plus\!!counta \relax % cm gives overflow \doganaareenpagina\??ib\blackrule\prevpage \fi - \color[\@@ibcontrastkleur]{\blackrule[\c!breedte=.5em]}% + \color[\@@ibcontrastcolor]{\blackrule[\c!width=.5em]}% \ifnum\realpageno<\lastpage\relax \doganaareenpagina\??ib\blackrule\nextpage \!!counta\lastpage @@ -1489,23 +1484,23 @@ \egroup \fi} -\def\interactiebalkb +\def\interactionbarb {\ifnum\lastpage>\firstpage\relax - \interactiebuttons - [\v!eerstepagina, - \v!vorigepagina, - \v!volgendepagina, - \v!laatstepagina]% + \interactionbuttons + [\v!firstpage, + \v!previouspage, + \v!nextpage, + \v!lastpage]% \fi} -\def\interactiebalkc +\def\interactionbarc {\iflocation \ifnum\lastpage>\plusone - \hbox to \@@ibbreedte - {\setupblackrules[\c!hoogte=\@@ibhoogte,\c!diepte=\@@ibdiepte]% + \hbox to \@@ibwidth + {\setupblackrules[\c!height=\@@ibheight,\c!depth=\@@ibdepth]% \def\gotox##1% - {\doganaareenpagina{}{\blackrule[\c!breedte=##1]}}% - \dimen0=\@@ibbreedte\relax + {\doganaareenpagina{}{\blackrule[\c!width=##1]}}% + \dimen0=\@@ibwidth\relax \advance\dimen0 -4em \!!counta\lastpage \advance\!!counta \minusone @@ -1516,11 +1511,11 @@ \!!countb\lastpage \advance\!!countb -\realpageno \!!widthb\!!countb\dimen0 - \startcolor[\locationcolor\@@ibkleur]% + \startcolor[\locationcolor\@@ibcolor]% \gotox{1em}\firstpage \hss \gotox\!!widtha\prevpage - \color[\@@ibcontrastkleur]{\blackrule[\c!breedte=1em]}% + \color[\@@ibcontrastcolor]{\blackrule[\c!width=1em]}% \gotox\!!widthb\nextpage \hss \gotox{1em}\lastpage @@ -1528,28 +1523,28 @@ \fi \fi} -\def\interactiebalkd +\def\interactionbard {\iflocation\ifshowingsubpage \ifnum\nofsubpages>\plusone \hbox \bgroup - %\setupinteraction[\c!breedte=\!!zeropoint]% - \setinteractionparameter\c!breedte\!!zeropoint + %\setupinteraction[\c!width=\!!zeropoint]% + \setinteractionparameter\c!width\!!zeropoint \ifbalksymbool % beter: 3 chars assign en 3*box - \setupsymbolset[\@@iasymboolset]% - \setbox0\hbox{\symbol[\v!vorige]}% - \setbox2\hbox{\symbol[\v!ergens]}% - \setbox4\hbox{\symbol[\v!volgende]}% + \setupsymbolset[\@@iasymbolset]% + \setbox0\hbox{\symbol[\v!previous]}% + \setbox2\hbox{\symbol[\v!somewhere]}% + \setbox4\hbox{\symbol[\v!next]}% \else \setbox0\hbox {\vrule - \!!height\@@ibhoogte - \!!depth\@@ibdiepte - \!!width\@@ibbreedte}% + \!!height\@@ibheight + \!!depth\@@ibdepth + \!!width\@@ibwidth}% \setbox2\copy0 \setbox4\copy0 \fi - \startcolor[\locationcolor\@@ibkleur]% + \startcolor[\locationcolor\@@ibcolor]% \for\teller=1\to\nofsubpages\step1\do % brr, \dostepwiserecurse {\bgroup \increment(\teller,\firstsubpage)\relax @@ -1558,52 +1553,52 @@ \gotorealpage{}{}{\teller}{\copy0}\relax \else\ifnum\teller=\realpageno\relax \color - [\@@ibcontrastkleur] + [\@@ibcontrastcolor] {\gotorealpage{}{}{\teller}{\copy2}}% \else \gotorealpage{}{}{\teller}{\copy4}\relax \fi\fi \egroup - \hskip\@@ibafstand}% + \hskip\@@ibdistance}% \unskip \stopcolor \egroup \fi \fi\fi} -\def\interactiebalke% KAN WORDEN GECOMBINEERD MET D +\def\interactionbare% KAN WORDEN GECOMBINEERD MET D {\iflocation\ifshowingsubpage \ifnum\nofsubpages>\plusone \bgroup - \!!widthb\@@ibafstand + \!!widthb\@@ibdistance \multiply\!!widthb \nofsubpages - \advance\!!widthb -\@@ibafstand % (n-1) - \!!widtha\@@ibbreedte + \advance\!!widthb -\@@ibdistance % (n-1) + \!!widtha\@@ibwidth \advance\!!widtha -\!!widthb \divide\!!widtha \nofsubpages\relax - \ifdim\!!widtha<\@@ibafstand\relax - \interactiebalkf + \ifdim\!!widtha<\@@ibdistance\relax + \interactionbarf \else - %\setupinteraction[\c!breedte=\!!zeropoint]% - \setinteractionparameter\c!breedte\!!zeropoint + %\setupinteraction[\c!width=\!!zeropoint]% + \setinteractionparameter\c!width\!!zeropoint \noindent - \hbox to \@@ibbreedte + \hbox to \@@ibwidth \bgroup \ifbalksymbool - \setupsymbolset[\@@iasymboolset]% - \setbox0\hbox{\symbol[\v!vorige]}% - \setbox2\hbox{\symbol[\v!ergens]}% - \setbox4\hbox{\symbol[\v!volgende]}% + \setupsymbolset[\@@iasymbolset]% + \setbox0\hbox{\symbol[\v!previous]}% + \setbox2\hbox{\symbol[\v!somewhere]}% + \setbox4\hbox{\symbol[\v!next]}% \else \setbox0\hbox {\vrule - \!!height\@@ibhoogte - \!!depth\@@ibdiepte + \!!height\@@ibheight + \!!depth\@@ibdepth \!!width\!!widtha}% \setbox2\copy0 \setbox4\copy0 \fi - \startcolor[\locationcolor\@@ibkleur]% + \startcolor[\locationcolor\@@ibcolor]% \for\teller=1\to\nofsubpages\step1\do {\bgroup \increment(\teller,\firstsubpage)\relax @@ -1612,7 +1607,7 @@ \gotorealpage{}{}{\teller}{\copy0}\relax \else\ifnum\teller=\realpageno\relax \color - [\@@ibcontrastkleur] + [\@@ibcontrastcolor] {\gotorealpage{}{}{\teller}{\copy2}}% \else \gotorealpage{}{}{\teller}{\copy4}\relax @@ -1627,13 +1622,13 @@ \fi \fi\fi} -\def\interactiebalkf% !! KAN WORDEN GECOMBINEERD MET D !! +\def\interactionbarf% !! KAN WORDEN GECOMBINEERD MET D !! {\iflocation\ifshowingsubpage \ifnum\nofsubpages>\plusone - %\setupinteraction[\c!breedte=\!!zeropoint]% - \setinteractionparameter\c!breedte\!!zeropoint + %\setupinteraction[\c!width=\!!zeropoint]% + \setinteractionparameter\c!width\!!zeropoint \noindent - \hbox to \@@ibbreedte + \hbox to \@@ibwidth \bgroup \!!countb\zerocount \loop @@ -1641,32 +1636,32 @@ \!!countc\nofsubpages \divide\!!countc \!!countb \advance\!!countc \plusone - \!!widthb\@@ibafstand + \!!widthb\@@ibdistance \multiply\!!widthb \!!countc - \advance\!!widthb -\@@ibafstand - \!!widtha\@@ibbreedte + \advance\!!widthb -\@@ibdistance + \!!widtha\@@ibwidth \advance\!!widtha -\!!widthb \divide\!!widtha \!!countc - \ifdim\!!widtha<\@@ibafstand\relax + \ifdim\!!widtha<\@@ibdistance\relax \repeat \advance\!!countc -2 -\!!widtha-\@@ibafstand +\!!widtha-\@@ibdistance \!!widtha=\!!countc\!!widtha -\advance\!!widtha \@@ibbreedte +\advance\!!widtha \@@ibwidth \advance\!!countc \plusone \divide\!!widtha \!!countc \ifbalksymbool - \setupsymbolset[\@@iasymboolset]% - \setbox0\hbox{\symbol[\v!vorige]}% - \setbox4\hbox{\symbol[\v!ergens]}% - \setbox8\hbox{\symbol[\v!volgende]}% + \setupsymbolset[\@@iasymbolset]% + \setbox0\hbox{\symbol[\v!previous]}% + \setbox4\hbox{\symbol[\v!somewhere]}% + \setbox8\hbox{\symbol[\v!next]}% \setbox2\copy4 \setbox6\copy4 \else \setbox0\hbox {\vrule - \!!height\@@ibhoogte - \!!depth\@@ibdiepte + \!!height\@@ibheight + \!!depth\@@ibdepth \!!width\!!widtha}% \setbox4\copy0 \setbox8\copy0 @@ -1682,14 +1677,14 @@ \def\gotox##1% {\ifnum\teller=\realpageno \color - [\@@ibcontrastkleur] + [\@@ibcontrastcolor] {\gotorealpage{}{}{\teller}{\copy##1}}% \else \gotorealpage{}{}{\teller}{\copy##1}% \fi \!!countf\zerocount \hss}% - \startcolor[\locationcolor\@@ibkleur]% + \startcolor[\locationcolor\@@ibcolor]% \!!countc\realpageno \advance\!!countc -2 \!!countd\realpageno \advance\!!countd 2 \!!countf\zerocount @@ -1722,47 +1717,47 @@ \fi \fi\fi} -\def\interactiebalkg +\def\interactionbarg {\ifnum\lastsubpage>\firstsubpage\relax - \interactiebuttons - [\v!eerstesubpagina, - \v!vorigesubpagina, - \v!volgendesubpagina, - \v!laatstesubpagina]% + \interactionbuttons + [\v!firstsubpage, + \v!previoussubpage, + \v!nextsubpage, + \v!lastsubpage]% \fi} -\def\checkinteractiebalk#1#2#3% - {\ifdim\@@ibbreedte=\zeropoint\def\@@ibbreedte{#1}\fi - \doifnothing\@@ibhoogte{\def\@@ibhoogte{#2}}% - \doifnothing\@@ibdiepte{\def\@@ibdiepte{#3}}} +\def\checkinteractionbar#1#2#3% + {\ifdim\@@ibwidth=\zeropoint\def\@@ibwidth{#1}\fi + \doifnothing\@@ibheight{\def\@@ibheight{#2}}% + \doifnothing\@@ibdepth{\def\@@ibdepth{#3}}} -\def\complexinteractiebalk[#1]% +\def\complexinteractionbar[#1]% {\doifelse{#1}\v!reset {\global\setbox\meterbox\box\voidb@x}% {\bgroup \iflocation \checksubpages % goes wrong / loads \numberofpages too \getparameters[\??ib][#1]% - \doif\@@ibstatus\v!start - {\startinteractie + \doif\@@ibstate\v!start + {\startinteraction \processaction % breedte defaults ! - [\@@ibvariant] - [ c=>\checkinteractiebalk{.5em}\v!max \v!max, - d=>\checkinteractiebalk{.5em}{.5em} \!!zeropoint, - e=>\checkinteractiebalk{.5em}{.5em} \!!zeropoint, - f=>\checkinteractiebalk{.5em}{.5em} \!!zeropoint, - \s!default=>\checkinteractiebalk{10em}\v!ruim\!!zeropoint, - \s!unknown=>\checkinteractiebalk{10em}\v!ruim\!!zeropoint]% - \doifelse\@@ibsymbool\v!ja + [\@@ibalternative] + [ c=>\checkinteractionbar{.5em}\v!max \v!max, + d=>\checkinteractionbar{.5em}{.5em} \!!zeropoint, + e=>\checkinteractionbar{.5em}{.5em} \!!zeropoint, + f=>\checkinteractionbar{.5em}{.5em} \!!zeropoint, + \s!default=>\checkinteractionbar{10em}\v!broad\!!zeropoint, + \s!unknown=>\checkinteractionbar{10em}\v!broad\!!zeropoint]% + \doifelse\@@ibsymbol\v!yes \balksymbooltrue\balksymboolfalse - \getvalue{interactiebalk\@@ibvariant}% - \stopinteractie}% + \getvalue{interactionbar\@@ibalternative}% + \stopinteraction}% \fi \egroup}} -\definecomplexorsimpleempty\interactiebalk +\definecomplexorsimpleempty\interactionbar -\def\stelinteractiebalkin% +\def\setupinteractionbar {\dodoubleargument\getparameters[\??ib]} % Er wordt vooralsnog uitgegaan van een symmetrische @@ -1771,20 +1766,20 @@ \def\c!profiel!! {profiel:} % brrr \def\c!versie!! {versie:} -\def\dodefinieerprofiel[#1][#2]% +\def\dodefineprofile[#1][#2]% {\iflocation - \def\dododefinieerprofiel##1% - {\def\dodododefinieerprofiel####1% + \def\dododefineprofile##1% + {\def\dodododefineprofile####1% {\doifdefinedelse{\c!profiel!!####1}% {\edef\!!stringa{\getvalue{\c!profiel!!####1}}% \setevalue{\c!profiel!!####1}{\!!stringa,##1}}% {\setevalue{\c!profiel!!####1}{##1}}}% - \processcommalist[#2]\dodododefinieerprofiel}% - \processcommalist[#1]\dododefinieerprofiel + \processcommalist[#2]\dodododefineprofile}% + \processcommalist[#1]\dododefineprofile \fi} -\def\definieerprofiel% - {\dodoubleargument\dodefinieerprofiel} +\def\defineprofile% + {\dodoubleargument\dodefineprofile} % Als met \getpar wordt gewerkt, dan moet \next worden toegepast. @@ -1807,25 +1802,25 @@ {\addtocommalist{##2}\processedprofiles ##1\relax \ifcase#1\relax - \dobeginofprofile{##2}\papierbreedte\papierhoogte\profilepage + \dobeginofprofile{##2}\paperwidth\paperheight\profilepage \else \doendofprofile \fi}}% \let\processedprofiles\empty \def\doprocessprofile##1% - {\doifelse{\@@pfoptie}{\v!test}% - {\goodbreak\blanko\nobreak\tt[\spatie - \ifcase#1\v!start\else\v!stop\fi profiel\spatie ##1:\spatie + {\doifelse{\@@pfoption}{\v!test}% + {\goodbreak\blank\nobreak\tt[\space + \ifcase#1\v!start\else\v!stop\fi profiel\space ##1:\space \doifdefinedelse{\c!profiel!!##1}% {\def\dodoprocessprofile####1% {\processoneprofile - {\naar{####1}[\c!profiel!!####1]}% + {\goto{####1}[\c!profiel!!####1]}% {####1}% - \spatie}% + \space}% \processcommacommand [\getvalue{\c!profiel!!##1}]\dodoprocessprofile}% {- }% - ]\nobreak\blanko}% + ]\nobreak\blank}% {\doifdefined{\c!profiel!!##1}% {\def\dodoprocessprofile####1% {\processoneprofile{}{####1}}% @@ -1836,11 +1831,11 @@ \par % needed for pdftex \fi} -\def\startprofiel[#1]% +\def\startprofile[#1]% {\iflocation \bgroup \addtocommalist{#1}\actualprofile - \def\stopprofiel% + \def\stopprofile% {\processprofile1[#1]% \egroup}% \def\next{\processprofile0[#1]}% % \DoAfterFi \processprofile0[#1]% @@ -1849,14 +1844,14 @@ \fi \next} -\let\stopprofiel\relax +\let\stopprofile\relax -\def\dovolgprofiel#1[#2]% +\def\dofollowprofile#1[#2]% {\iflocation \hbox {\dostartgoto \data - {\dolocationattributes\??ia\c!letter\c!kleur{#1\presetgoto}}% + {\dolocationattributes\??ia\c!style\c!color{#1\presetgoto}}% \start \dostartgotoprofile\buttonwidth\buttonheight{#2}% \stop @@ -1866,13 +1861,13 @@ {#1}% \fi} -\def\volgprofiel#1[#2]% +\def\followprofile#1[#2]% {\iflocation - \doif\@@pfoptie\v!test{\pagereference[\c!profiel!!#2]}% - \dovolgprofiel{#1}[#2]% + \doif\@@pfoption\v!test{\pagereference[\c!profiel!!#2]}% + \dofollowprofile{#1}[#2]% \fi} -\def\stelprofielenin% +\def\setupprofiles% {\dodoubleargument\getparameters[\??pf]} % Als er nog geen tekst op de pagina staat, dan heeft het @@ -1916,13 +1911,13 @@ \def\minimumversion{0} \def\actualversion{0} -\def\dostelversiesin[#1]% +\def\dosetupversions[#1]% {\getparameters[\??ve][#1] - \stripcharacter.\from\@@venummer\to\minimumversion + \stripcharacter.\from\@@venumber\to\minimumversion \setversion} -\def\stelversiesin% - {\dosingleargument\dostelversiesin} +\def\setupversions% + {\dosingleargument\dosetupversions} \definetwopasslist{\s!versionbegin} \definetwopasslist{\s!versionend} @@ -1990,11 +1985,11 @@ \let\resetpageversion = \relax \let\checkpageversion = \relax -\def\complexstartversie[#1]% +\def\complexstartversion[#1]% {\bgroup \doifelsenothing\actualprofile - {\startprofiel[#1]}% - {\startprofiel[#1,\actualprofile]}% + {\startprofile[#1]}% + {\startprofile[#1,\actualprofile]}% \def\docomplexstartversie##1% {\stripcharacter.\from##1\to\actualversion \ifnum\versionlevel>\zerocount\relax @@ -2013,10 +2008,10 @@ {\docomplexstartversie{0}}% {\processcommalist[#1]\docomplexstartversie}} -\definecomplexorsimpleempty\startversie +\definecomplexorsimpleempty\startversion -\def\stopversie% - {\stopprofiel +\def\stopversion% + {\stopprofile \doglobal\decrement\versionlevel \ifnum\versionlevel<\zerocount \showmessage\m!versions1\empty @@ -2031,21 +2026,21 @@ {\catcode`@=\active % we can't use \@@active here \long\def@##1##2 % {\ifx##1+% - \startversie[##2]% + \startversion[##2]% \else\ifx##1-% - \stopversie + \stopversion \else \oldatcharacter##1##2 % \fi\fi}} \egroup -\def\markeerversie +\def\markversion {\showmessage\m!versions2\empty \let\setpageversion\dosetpageversion \let\resetpageversion\relax \let\checkpageversion\relax} -\def\selecteerversie +\def\selectversion {\checkrecentcontributions \showmessage\m!versions3\recentcontributions \let\setpageversio\gobbleoneargument @@ -2053,50 +2048,50 @@ \let\checkpageversion\docheckpageversion \setversion} -\def\dodefinieerversie[#1][#2]% +\def\dodefineversion[#1][#2]% {\setvalue{\c!versie!!#1}{#2}% - \definieerprofiel[#1][#2]} + \defineprofile[#1][#2]} -\def\definieerversie - {\dodoubleargument\dodefinieerversie} +\def\defineversion + {\dodoubleargument\dodefineversion} -\def\volgversie - {\volgprofiel} +\def\followversion + {\followprofile} -\def\volgprofielversie#1[#2][#3]% +\def\followprofileversion#1[#2][#3]% {\def\docommando##1% - {\definieerprofiel[#2#3][##1]}% + {\defineprofile[#2#3][##1]}% \processcommacommand[\getvalue{\c!versie!!#3}]\docommando - \volgprofiel#1[#2#3]} + \followprofile#1[#2#3]} \newcounter\currentpagetransition \newif\ifrandomtransitions -\def\stelpaginaovergangenin% - {\dosingleempty\dostelpaginaovergangenin} +\def\setuppagetransitions% + {\dosingleempty\dosetuppagetransitions} -\def\dostelpaginaovergangenin[#1]% +\def\dosetuppagetransitions[#1]% {\doifelsenothing{#1} - {\doifnot\@@scwachttijd\v!geen + {\doifnot\@@scdelay\v!none {\let\setpagetransition\setsomepagedelay}} {\doifelse{#1}\v!start - {\doifnot\@@scwachttijd\v!geen + {\doifnot\@@scdelay\v!none {\let\setpagetransition\setsomepagedelay}} {\doglobal\newcounter\currentpagetransition \doifinsetelse{#1}{\v!reset,\v!stop} {\let\setpagetransition\relax} {\let\setpagetransition\setsomepagetransition - \doifinsetelse\v!willekeurig{#1} + \doifinsetelse\v!random{#1} {\randomtransitionstrue}{\randomtransitionsfalse}% \edef\userpagetransitions{#1}% - \@EA\removefromcommalist\@EA{\v!willekeurig}\userpagetransitions + \@EA\removefromcommalist\@EA{\v!random}\userpagetransitions \ifx\userpagetransitions\empty \let\userpagetransitions\pagetransitions \fi}}}} \def\setsomepagedelay - {\expanded{\dosetpagetransition{0}{\@@scwachttijd}}} + {\expanded{\dosetpagetransition{0}{\@@scdelay}}} \def\setsomepagetransition {\iflocation @@ -2114,9 +2109,9 @@ \doglobal\newcounter\currentpagetransition \setsomepagetransition \else - \doifelse\@@scwachttijd\v!geen + \doifelse\@@scdelay\v!none {\expanded{\dosetpagetransition{\commalistelement}{0}}} - {\expanded{\dosetpagetransition{\commalistelement}{\@@scwachttijd}}}% + {\expanded{\dosetpagetransition{\commalistelement}{\@@scdelay}}}% \fi \fi} @@ -2134,7 +2129,7 @@ %D \hbox to 15em %D {\hss %D \dorecurse{10} -%D {\verticalpositionbar\pos\recurselevel\min1\max10\token\blokje\\ +%D {\verticalpositionbar\pos\recurselevel\min1\max10\token\blackrule\\ %D \hss}} %D \stopbuffer @@ -2176,27 +2171,16 @@ \newbox\commentbox -% \def\doflushcommentanchors -% {\let\next\relax -% \processaction -% [\@@ccplaats] -% [ \v!inmarge=>\let\next\inmarge, -% \v!linkerrand=>\let\next\inleftedge, -% \v!rechterrand=>\let\next\inrightedge, -% \v!linkermarge=>\let\next\inleftmargin, -% \v!rechtermarge=>\let\next\inrightmargin]% -% \next{\hbox{\raise\strutht\box\commentbox}}} - \def\doflushcommentanchors {\let\next\relax % new \processaction - [\@@ccplaats] - [% \v!tekst=>\let\next\relax, % new - \v!inmarge=>\let\next\inmarge, - \v!linkerrand=>\let\next\inleftedge, - \v!rechterrand=>\let\next\inrightedge, - \v!linkermarge=>\let\next\inleftmargin, - \v!rechtermarge=>\let\next\inrightmargin]% + [\@@cclocation] + [% \v!text=>\let\next\relax, % new + \v!inmargin=>\let\next\inmargin, % brr not the same as inleft|rightmargin + \v!leftedge=>\let\next\inleftedge, + \v!rightedge=>\let\next\inrightedge, + \v!leftmargin=>\let\next\inleftmargin, + \v!rightmargin=>\let\next\inrightmargin]% \next{\hbox{\raise\strutht\box\commentbox}}} \def\flushcommentanchors % in everypar so indirect @@ -2208,37 +2192,41 @@ \setvalue{\e!start\v!comment}% the dummy triple gobbles trailing spaces {\dotripleempty\dostartcommentaar} -\def\commentaar - {\dodoubleempty\docommentaar} +\def\comment + {\dodoubleempty\docomment} -\def\dodocommentaar#1% - {\!!widtha\@@ccbreedte - \!!heighta\@@cchoogte - \doifelse\@@ccoptie\v!max +\def\dodocomment#1% + {\!!widtha\@@ccwidth + \!!heighta\@@ccheight + \doifelse\@@ccoption\v!max {\let\@@ccopen \!!plusone}{\let\@@ccopen \!!zerocount}% - \doifelse\@@ccoptie\v!buffer + \doifelse\@@ccoption\v!buffer {\let\@@cccollect\!!plusone}{\let\@@cccollect\!!zerocount}% + \preparecommentvariables \doinsertcomment - \@@cctitel\!!widtha\!!heighta - \@@cckleur\@@ccopen\@@ccsymbool + \@@cctitle\!!widtha\!!heighta + \@@cccolor\@@ccopen\@@ccsymbol \@@cccollect{#1}} +\def\preparecommentvariables % more will move here as with fields + {\let\@@DriverCommentLayer\@@cctextlayer} + \def\dopreparecommentaar#1#2% {\doifassignmentelse{#1} {\getparameters[\??cc][#1]} - {\getparameters[\??cc][\c!titel=#1,#2]}% + {\getparameters[\??cc][\c!title=#1,#2]}% \obeylines - \doif\@@ccspatie\v!ja\obeyspaces} + \doif\@@ccspace\v!yes\obeyspaces} \def\dostartcommentaar[#1][#2][#3]% {\bgroup - \doifelse\@@ccstatus\v!start + \doifelse\@@ccstate\v!start {\dopreparecommentaar{#1}{#2}% \long\def\docommando##1% {\global\setbox\commentbox\frozenhbox {\hbox to \zeropoint - {\struttedbox{\tbox{\dodocommentaar{##1}}}\hss}% - \hskip\ifvoid\commentbox\@@ccmarge\else\@@ccafstand\fi + {\struttedbox{\tbox{\dodocomment{##1}}}\hss}% + \hskip\ifvoid\commentbox\@@ccmargin\else\@@ccdistance\fi \box\commentbox}% \egroup}}% {\long\def\docommando##1% @@ -2247,53 +2235,53 @@ \letvalue{\e!stop\v!comment}\relax % handy for \expanded{...} -\def\docommentaar[#1][#2]#3% - {\doif\@@ccstatus\v!start +\def\docomment[#1][#2]#3% + {\doif\@@ccstate\v!start {\hbox to \zeropoint {\dopreparecommentaar{#1}{#2}% - \hskip-\@@ccmarge - \struttedbox{\tbox{\dodocommentaar{#3}}\hss}}}% + \hskip-\@@ccmargin + \struttedbox{\tbox{\dodocomment{#3}}\hss}}}% \ignorespaces} -% \startcommentaar +% \startcomment % hello beautiful\\world -% \stopcommentaar +% \stopcomment % -% \startcommentaar[hallo] +% \startcomment[hello] % hello << \'e\'erste >> % beautiful % world -% \stopcommentaar +% \stopcomment % -% \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm] +% \startcomment[hello][color=green,width=4cm,height=3cm] % hello \leftguillemot\ \'e\'erste \rightguillemot\ % beautiful % world % \stopcommentaar % -% \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm] +% \startcomment[hello][color=green,width=4cm,height=3cm] % hello \leftguillemot\ \'e\'erste \rightguillemot\ test % % beautiful % % world -% \stopcommentaar +% \stopcomment % -% \startcommentaar[symbool=Balloon] +% \startcomment[symbol=Balloon] % Do we want this kind of rubish? And, why isn't this and % some more features related to text annotations so poorly % (actually not) documented? Anyhow, by providing this % functionality we demonstrate that \pdfTeX\ can do it. By % the way, it's funny that when in Acrobat we scale up the % text, the symbols scale down. -% \stopcommentaar +% \stopcomment -% \definesymbol [comment-normal][{\externalfigure[koe.pdf]}] -% \definesymbol [comment-down] [{\externalfigure[koe.pdf]}] +% \definesymbol [comment-normal][{\externalfigure[cow.pdf]}] +% \definesymbol [comment-down] [{\externalfigure[cow.pdf]}] % % \def\CowSymbol#1#2% % {\scale -% [\c!hoogte=#1] +% [\c!height=#1] % {\startMPcode % loadfigure "koe.mp" number 1 ; % refill currentpicture withcolor #2 ; @@ -2306,8 +2294,8 @@ % [\CowSymbol{4ex}{green}] % % \setupcomment -% [\c!symbool={comment-normal,comment-down}, -% \c!optie=\v!buffer] +% [\c!symbol={comment-normal,comment-down}, +% \c!option=\v!buffer] % % \setupfootertexts[\placecomments] @@ -2355,30 +2343,63 @@ \edef\attachmentname{\attachmentname.\!!stringd}% \fi} -\def\attachment[#1]% currently title equals newname +% \def\attachment[#1]% currently title equals newname +% {\iflocation +% \doifundefinedelse{\??at:#1} +% {\writestatus\m!interactions6{#1}}% +% {\doif\@@atstatus\v!start +% {\bgroup +% \getattachmentdata[#1]% +% \doiffileelse\attachmentfile +% {\doattachfile +% \attachmenttitle +% {1em}{\strutheight}{\strutdepth}\@@atkleur\@@atsymbool +% \attachmentname +% \attachmentfile}% +% {\writestatus\m!interactions5\attachmentfile}% +% \egroup}}% +% \fi} + +\def\attachment + {\dodoubleempty\doattachment} + +\def\doattachment[#1][#2]% currently title equals newname {\iflocation - \doifundefinedelse{\??at:#1} - {\writestatus\m!interactions6{#1}}% - {\doif\@@atstatus\v!start - {\bgroup - \getattachmentdata[#1]% - \doiffileelse\attachmentfile - {\doattachfile - \attachmenttitle - {1em}{\strutheight}{\strutdepth}\@@atkleur\@@atsymbool - \attachmentname - \attachmentfile}% - {\writestatus\m!interactions5\attachmentfile}% - \egroup}}% + \ifsecondargument + \doifundefined{\??at:#2} + {\writestatus\m!interactions6{#2}% + \useattachment[#2]}% + \doif\@@atstatus\v!start + {\bgroup + \getattachmentdata[#2]% + \doiffileelse\attachmentfile + {\setupattachments[#1]% + \presetattachmentvariables +\struttedbox{\tbox{% + \doattachfile + \attachmenttitle + {1em}\strutheight\strutdepth\@@atkleur\@@atsymbool + \attachmentname + \attachmentfile}% +}}% + {\writestatus\m!interactions5\attachmentfile}% + \egroup}% + \else\iffirstargument + \attachment[][#1]% + \fi\fi \fi} +\def\presetattachmentvariables + {\let\@@DriverAttachmentLayer\@@attekstlaag} + \def\setupattachments {\dodoubleempty\getparameters[\??at]} \setupattachments - [\c!status=\v!start, - \c!kleur=\@@iakleur, - \c!symbool=] + [\c!state=\v!start, + \c!color=\@@iacolor, + \c!textlayer=, + \c!symbol=] % jammer, tussen/midden had erin gemoeten; \c!commando toevoegen @@ -2388,15 +2409,15 @@ \def\doregistermenubuttons[#1][#2]% [menu id] [register] {\bgroup \ifsecondargument - \stelinteractiemenuin - [#1][\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja]% + \setupinteractionmenu + [#1][\c!unknownreference=\v!yes,\c!samepage=\v!yes]% \def\docommando##1% {\registermenucommand{\menubutton[#1]{##1}[#2:##1]}}% \else \def\docommando##1% {\registermenucommand {\button - [\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja] + [\c!unknownreference=\v!yes,\c!samepage=\v!yes] {##1}[#1:##1]}}% \fi \handletokens abcdefghijklmnopqrstuvwxyz\with\docommando % moet anders @@ -2406,204 +2427,197 @@ {\dodoubleempty\doregistermenubuttons} \stelkoppelingenin - [\c!afstand=.25em, - \c!breedte=\v!passend, - \c!plaats=\v!laag, - \c!kleur=\@@iakleur, - \c!kader=\v!uit, - \c!achtergrond=, - \c!achtergrondraster=\@@rsraster, - \c!achtergrondkleur=] - -\definieerinteractiemenu - [\v!rechts] - [\v!rechts] - [\c!voor=, - \c!na=\vfil, - \c!tussen=\blanko, - \c!afstand=\bodyfontsize, % 12pt - \c!links=\hss, - \c!rechts=\hss, - \c!breedte=\rechterrandbreedte, - \c!hoogte=\v!ruim] - -\definieerinteractiemenu - [\v!links] - [\v!links] - [\c!voor=, - \c!na=\vfil, - \c!tussen=\blanko, - \c!afstand=\bodyfontsize, % 12pt - \c!links=\hss, - \c!rechts=\hss, - \c!breedte=\linkerrandbreedte, - \c!hoogte=\v!ruim] - -\definieerinteractiemenu - [\v!onder] - [\v!onder] - [\c!voor=\vss, - \c!na=\vss, - \c!midden=\hfil, - \c!afstand=\bodyfontsize, % 12pt - \c!breedte=\v!passend, - \c!hoogte=\v!ruim] - -\definieerinteractiemenu - [\v!boven] - [\v!boven] - [\c!voor=\vss, - \c!na=\vss, - \c!midden=\hfil, - \c!afstand=\bodyfontsize, % 12pt - \c!breedte=\v!passend, - \c!hoogte=\v!ruim] - -\stelinteractiemenuin - [\v!links,\v!rechts,\v!boven,\v!onder] + [\c!distance=.25em, + \c!width=\v!fit, + \c!location=\v!low, + \c!color=\@@iacolor, + \c!frame=\v!off, + \c!background=, + \c!backgroundscreen=\@@rsscreen, + \c!backgroundcolor=] + +\defineinteractionmenu + [\v!right] + [\v!right] + [\c!before=, + \c!after=\vfil, + \c!inbetween=\blank, + \c!distance=\bodyfontsize, % 12pt + \c!left=\hss, + \c!right=\hss, + \c!width=\rightedgewidth, + \c!height=\v!broad] + +\defineinteractionmenu + [\v!left] + [\v!left] + [\c!before=, + \c!after=\vfil, + \c!inbetween=\blank, + \c!distance=\bodyfontsize, % 12pt + \c!left=\hss, + \c!right=\hss, + \c!width=\leftedgewidth, + \c!height=\v!broad] + +\defineinteractionmenu + [\v!bottom] + [\v!bottom] + [\c!before=\vss, + \c!after=\vss, + \c!middle=\hfil, + \c!distance=\bodyfontsize, % 12pt + \c!width=\v!fit, + \c!height=\v!broad] + +\defineinteractionmenu + [\v!top] + [\v!top] + [\c!before=\vss, + \c!after=\vss, + \c!middle=\hfil, + \c!distance=\bodyfontsize, % 12pt + \c!width=\v!fit, + \c!height=\v!broad] + +\setupinteractionmenu + [\v!left,\v!right,\v!top,\v!bottom] [\c!offset=.25em, - \c!positie=\v!nee, - \c!kader=\v!aan, - \c!achtergrond=, - \c!achtergrondkleur=, - \c!achtergrondraster=\@@rsraster, - \c!letter=\@@ialetter, - \c!kleur=\@@iakleur, - \c!contrastkleur=\@@iacontrastkleur, - \c!status=\v!start, - \c!zelfdepagina=\v!ja, - \c!onbekendeverwijzing=\v!leeg, - \c!bovenoffset=\!!zeropoint, - \c!onderoffset=\!!zeropoint, - \c!linkeroffset=\!!zeropoint, - \c!rechteroffset=\!!zeropoint] - -%\def\plaatslinkerrandtekstblok {\interactiemenus[\v!links ]} -%\def\plaatsrechterrandtekstblok{\interactiemenus[\v!rechts]} -%\def\plaatsboventekstblok {\interactiemenus[\v!boven ]} -%\def\plaatsondertekstblok {\interactiemenus[\v!onder ]} - -\def\plaatslinkerrandtekstblok % Is \hss/\hsize really needed here? - {\hbox to \linkerrandbreedte % (check outer level and settings) - {\hsize\linkerrandbreedte + \c!position=\v!no, + \c!frame=\v!on, + \c!background=, + \c!backgroundcolor=, + \c!backgroundscreen=\@@rsscreen, + \c!style=\@@iastyle, + \c!color=\@@iacolor, + \c!contrastcolor=\@@iacontrastcolor, + \c!state=\v!start, + \c!samepage=\v!yes, + \c!unknownreference=\v!empty, + \c!topoffset=\!!zeropoint, + \c!bottomoffset=\!!zeropoint, + \c!leftoffset=\!!zeropoint, + \c!rightoffset=\!!zeropoint] + +\def\placeleftedgetextblock % Is \hss/\hsize really needed here? + {\hbox to \leftedgewidth % (check outer level and settings) + {\hsize\leftedgewidth \hss - \interactiemenus[\v!links]}} + \interactionmenus[\v!left]}} -\def\plaatsrechterrandtekstblok % Is \hss/\hsize really needed here? - {\hbox to \rechterrandbreedte % (check outer level and settings) - {\hsize\rechterrandbreedte - \interactiemenus[\v!rechts]% +\def\placerightedgetextblock % Is \hss/\hsize really needed here? + {\hbox to \rightedgewidth % (check outer level and settings) + {\hsize\rightedgewidth + \interactionmenus[\v!right]% \hss}} -\def\plaatsboventekstblok - {\vbox to \bovenhoogte - {\vsize\bovenhoogte +\def\placetoptextblock + {\vbox to \topheight + {\vsize\topheight % \getvalue{\??tk\v!boven\v!tekst\c!voor} - \getvalue{\??tk\v!boven\c!voor} - \interactiemenus[\v!boven] + \getvalue{\??tk\v!top\c!before} + \interactionmenus[\v!top] % \getvalue{\??tk\v!boven\v!tekst\c!na} - \getvalue{\??tk\v!boven\c!na} + \getvalue{\??tk\v!top\c!after} \kern\zeropoint}} -\def\plaatsondertekstblok - {\vbox to \onderhoogte - {\vsize\onderhoogte +\def\placebottomtextblock + {\vbox to \bottomheight + {\vsize\bottomheight % \getvalue{\??tk\v!onder\v!tekst\c!voor} - \getvalue{\??tk\v!onder\c!voor} - \interactiemenus[\v!onder] + \getvalue{\??tk\v!bottom\c!before} + \interactionmenus[\v!bottom] % \getvalue{\??tk\v!onder\v!tekst\c!na} - \getvalue{\??tk\v!onder\c!na} + \getvalue{\??tk\v!bottom\c!after} \kern\zeropoint}} \ifx\leftedgetextcontent\undefined \else - \appendtoks \plaatslinkerrandtekstblok \hskip-\linkerrandbreedte \to \leftedgetextcontent - \appendtoks \plaatsrechterrandtekstblok \hskip-\rechterrandbreedte \to \rightedgetextcontent - \appendtoks \plaatsboventekstblok \vskip-\bovenhoogte \to \toptextcontent - \appendtoks \plaatsondertekstblok \vskip-\onderhoogte \to \bottomtextcontent + \appendtoks \placeleftedgetextblock \hskip-\leftedgewidth \to \leftedgetextcontent + \appendtoks \placerightedgetextblock \hskip-\rightedgewidth \to \rightedgetextcontent + \appendtoks \placetoptextblock \vskip-\topheight \to \toptextcontent + \appendtoks \placebottomtextblock \vskip-\bottomheight \to \bottomtextcontent \fi -\stelinteractieschermin - [\c!breedte=\printpapierbreedte, - \c!hoogte=\printpapierhoogte, - \c!rugoffset=\!!zeropoint, - \c!kopoffset=\!!zeropoint, - \c!rugwit=\rugwit, - \c!kopwit=\kopwit, - \c!optie=\v!min, - \c!wachttijd=\v!geen] - -\stelbuttonsin - [\c!status=\v!start, - \c!breedte=\v!passend, - \c!hoogte=\v!ruim, +\setupinteractionscreen + [\c!width=\printpaperwidth, + \c!height=\printpaperheight, + \c!horoffset=\!!zeropoint, + \c!veroffset=\!!zeropoint, + \c!backspace=\backspace, + \c!topspace=\topspace, + \c!option=\v!min, + \c!delay=\v!none] + +\setupbuttons + [\c!state=\v!start, + \c!width=\v!fit, + \c!height=\v!broad, \c!offset=0.25em, - \c!kader=\v!aan, - \c!achtergrond=, - \c!achtergrondraster=\@@rsraster, - \c!achtergrondkleur=, - \c!letter=\@@ialetter, - \c!kleur=\@@iakleur, - \c!contrastkleur=\@@iacontrastkleur, - \c!zelfdepagina=\v!ja, - \c!onbekendeverwijzing=\v!ja] - -\stelinteractiebalkin - [\c!status=\v!start, - \c!variant=a, - \c!symbool=\v!nee, - \c!breedte=\rechterrandbreedte, - \c!hoogte=, % these are taken care - \c!diepte=, % of at calling time - \c!afstand=.5em, % beter relateren aan breedte - \c!stap=1, - \c!kleur=\@@iakleur, - \c!contrastkleur=\@@iacontrastkleur, - \c!kader=\v!aan, - \c!achtergrond=, - \c!achtergrondraster=\@@rsraster, - \c!achtergrondkleur=, - \c!zelfdepagina=\v!ja, - \c!onbekendeverwijzing=\v!ja] - -\stelsynchronisatiebalkin - [\c!variant=\v!pagina, - \c!breedte=\rechterrandbreedte, - \c!letter=\@@ialetter, - \c!kleur=\@@iakleur, - \c!achtergrond=, - \c!achtergrondraster=\@@rsraster, - \c!achtergrondkleur=] - -\stelsynchronisatiein - [\c!status=\v!stop] - -\stelprofielenin - [\c!optie=] - -\stelprogrammasin - [\c!gebied=] - -\stelpaginaovergangenin + \c!frame=\v!on, + \c!background=, + \c!backgroundscreen=\@@rsscreen, + \c!backgroundcolor=, + \c!style=\@@iastyle, + \c!color=\@@iacolor, + \c!contrastcolor=\@@iacontrastcolor, + \c!samepage=\v!yes, + \c!unknownreference=\v!yes] + +\setupinteractionbar + [\c!state=\v!start, + \c!alternative=a, + \c!symbol=\v!no, + \c!width=\rightedgewidth, + \c!height=, % these are taken care + \c!depth=, % of at calling time + \c!distance=.5em, % beter relateren aan breedte + \c!step=1, + \c!color=\@@iacolor, + \c!contrastcolor=\@@iacontrastcolor, + \c!frame=\v!on, + \c!background=, + \c!backgroundscreen=\@@rsscreen, + \c!backgroundcolor=, + \c!samepage=\v!yes, + \c!unknownreference=\v!yes] + +\setupsynchronizationbar + [\c!alternative=\v!page, + \c!width=\rightedgewidth, + \c!style=\@@iastyle, + \c!color=\@@iacolor, + \c!background=, + \c!backgroundscreen=\@@rsscreen, + \c!backgroundcolor=] + +\setupsynchronization + [\c!state=\v!stop] + +\setupprofiles + [\c!option=] + +\setuppagetransitions [\v!reset] \setupcomment - [\c!status=\v!start, - \c!marge=2.5em, - \c!afstand=1em, - \c!breedte=.3\tekstbreedte, - \c!hoogte=.2\teksthoogte, - \c!kleur=\@@iakleur, - \c!titel=, - \c!spatie=\v!nee, - \c!symbool=\v!normaal, - \c!plaats=\v!inmarge, - \c!optie=] - -\stelversiesin % beware, @ is made active here, - [\c!nummer=1, % therefore we set this one at the end - \c!letter=\ss, - \c!kleur=] + [\c!state=\v!start, + \c!margin=2.5em, + \c!distance=1em, + \c!width=.3\textwidth, + \c!height=.2\textheight, + \c!color=\@@iacolor, + \c!title=, + \c!space=\v!no, + \c!symbol=\v!normal, + \c!location=\v!inmargin, + \c!option=, + \c!textlayer=] + +\setupversions % beware, @ is made active here, + [\c!number=1, % therefore we set this one at the end + \c!style=\ss, + \c!color=] \protect \endinput diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex index 69fe63dec..a248b1077 100644 --- a/tex/context/base/core-itm.tex +++ b/tex/context/base/core-itm.tex @@ -80,9 +80,9 @@ \def\doitemattributes #1{\doattributes{\??op\currentitemgroup#1}} -\def\@@globalitemsymbol #1{\??op\currentitemgroup\c!symbool\s!global#1} -\def\@@localitemsymbol #1{\??op\currentitemgroup\c!symbool\s!local #1} -\def\@@currentitemsymbol#1{\??op\currentitemgroup\c!symbool #1} +\def\@@globalitemsymbol #1{\??op\currentitemgroup\c!symbol\s!global#1} +\def\@@localitemsymbol #1{\??op\currentitemgroup\c!symbol\s!local #1} +\def\@@currentitemsymbol#1{\??op\currentitemgroup\c!symbol #1} \def\@@itemcounter{\s!itemcount\currentitemgroup} @@ -103,29 +103,30 @@ \fi} \def\initializeitemgrouplevel#1% safeguard - {\ifundefined{\??op\currentitemgroup#1\c!breedte}% + {\ifundefined{\??op\currentitemgroup#1\c!width}% \doinitializeitemgrouplevel{#1}% \fi} \def\doinitializeitemgrouplevel#1% {\copyparameters [\??op\currentitemgroup#1][\??oo] - [\c!breedte,\c!factor,\c!afstand,\c!uitlijnen,\c!optie, - \c!letter,\c!marletter,\c!symletter,\c!kopletter, - \c!kleur,\c!markleur,\c!symkleur,\c!kopkleur, - \c!kopvoor,\c!kopna,\c!voor,\c!tussen,\c!na, - \c!afsluiter,\c!plaatsafsluiter,\c!inspringen, - \c!n,\c!binnen,\c!symbool,\c!marge,\c!items, - \c!start,\c!linkertekst,\c!rechtertekst]} + [\c!width,\c!factor,\c!distance,\c!align,\c!option, + \c!style,\c!marstyle,\c!symstyle,\c!headstyle, + \c!color,\c!marcolor,\c!symcolor,\c!headcolor, + \c!beforehead,\c!afterhead,\c!before,\c!inbetween,\c!after, + \c!stopper,\c!placestopper,\c!indenting, + \c!n,\c!inner,\c!symbol,\c!margin,\c!items, + \c!leftmargin,\c!rightmargin, + \c!start,\c!lefttext,\c!righttext]} \def\setupitemgroups {\dosingleargument\dosetupitemgroups} \def\dosetupitemgroups[#1]% still undocumented - {\getparameters[\??oo][\c!niveaus=4,#1]% + {\getparameters[\??oo][\c!levels=4,#1]% % will change (remove) - \ifnum\@@ooniveaus>\maxitemlevel - \edef\maxitemlevel{\@@ooniveaus}% + \ifnum\@@oolevels>\maxitemlevel + \edef\maxitemlevel{\@@oolevels}% \dorecurse\maxitemlevel{\initializeitemgroupslevel\recurselevel}% \fi} @@ -152,52 +153,52 @@ \def\dododosetupitemgroupconstant[#1][#2#3#4]% * permits [2] {\processaction [#2#3#4] - [ \v!opelkaar*=>\packitems, + [ \v!packed*=>\packitems, \v!intro*=>\itemintrotrue, \v!autointro*=>\autoitemintrotrue, - \v!ruim*=>\setitemparameter{#1}\c!factor{1}, - #2#3*\v!ruim*=>\setitemparameter{#1}\c!factor{#2#3}, - #2*\v!ruim*=>\setitemparameter{#1}\c!factor{#2}, - \v!tekst*=>\textitemstrue + \v!broad*=>\setitemparameter{#1}\c!factor{1}, + #2#3*\v!broad*=>\setitemparameter{#1}\c!factor{#2#3}, + #2*\v!broad*=>\setitemparameter{#1}\c!factor{#2}, + \v!text*=>\textitemstrue \settrue\inlinelistitem \dosetuppackeditemgroup{#1}% \packitems, - \v!kolommen*=>\packitems, - \v!marge*=>\setitemparameter{#1}\c!breedte{-2em}, % signal - \v!inmarge*=>\setitemparameter{#1}\c!breedte{-2em}, % signal - \v!opmarge*=>\doifnot{#1}{1}{\setitemparameter{#1}\c!breedte{0em}}, % signal - \v!intekst*=>\settrue\inlinelistitem, % new - \v!los*=>\optimizeitemsfalse, - \v!alinea*=>\paragraphitemstrue + \v!columns*=>\packitems, + \v!margin*=>\setitemparameter{#1}\c!width{-2em}, % signal + \v!inmargin*=>\setitemparameter{#1}\c!width{-2em}, % signal + \v!atmargin*=>\doifnot{#1}{1}{\setitemparameter{#1}\c!width{0em}}, % signal + \v!intext*=>\settrue\inlinelistitem, % new + \v!loose*=>\optimizeitemsfalse, + \v!paragraph*=>\paragraphitemstrue \packitems, - \v!aansluitend*=>\dosetuppackeditemgroup{#1}% + \v!joinedup*=>\dosetuppackeditemgroup{#1}% \packitems, - \v!aanelkaar*=>\setitemparameter{#1}\c!factor{-1}, - #2#3*\v!aanelkaar*=>\setitemparameter{#1}\c!factor{-#2#3}, - #2*\v!aanelkaar*=>\setitemparameter{#1}\c!factor{-#2}, - \v!afsluiter*=>\setitemparameter{#1}\c!plaatsafsluiter\v!ja, - \v!vanelkaar*=>\packeditemsfalse, - \v!standaard*=>\dosetupstandarditemgroup{#1}]} + \v!serried*=>\setitemparameter{#1}\c!factor{-1}, + #2#3*\v!serried*=>\setitemparameter{#1}\c!factor{-#2#3}, + #2*\v!serried*=>\setitemparameter{#1}\c!factor{-#2}, + \v!stopper*=>\setitemparameter{#1}\c!placestopper\v!yes, + \v!unpacked*=>\packeditemsfalse, + \v!standard*=>\dosetupstandarditemgroup{#1}]} \def\dosetupstandarditemgroup#1% {\getparameters [\??op\currentitemgroup#1] - [\c!breedte=1.5em, + [\c!width=1.5em, \c!factor=0, - \c!afstand=.5em, - \c!kopvoor=, - \c!kopna=\blanko, - \c!voor=\blanko, - \c!tussen=\blanko, - \c!na=\blanko, - \c!binnen=]} + \c!distance=.5em, + \c!beforehead=, + \c!afterhead=\blank, + \c!before=\blank, + \c!inbetween=\blank, + \c!after=\blank, + \c!inner=]} \def\dosetuppackeditemgroup#1% - {\letitemparameter{#1}\c!kopvoor\empty - \letitemparameter{#1}\c!kopna \empty - \letitemparameter{#1}\c!voor \empty - \letitemparameter{#1}\c!na \empty - \letitemparameter{#1}\c!tussen \empty} + {\letitemparameter{#1}\c!beforehead\empty + \letitemparameter{#1}\c!afterhead \empty + \letitemparameter{#1}\c!before \empty + \letitemparameter{#1}\c!after \empty + \letitemparameter{#1}\c!inbetween \empty} \def\dosetupitemgroupconstant[#1][#2]% {\def\dodosetupitemgroupconstant##1% @@ -212,18 +213,18 @@ \def\dododododosetupitemgroup[#1][#2]% {\doifassignmentelse{#2}% {\dosetupitemgroupvariable[#1][#2]}% - {\setitemparameter{#1}\c!optie{#2}}}% + {\setitemparameter{#1}\c!option{#2}}}% \def\dodododosetupitemgroup[#1][#2]% {\ConvertToConstant\doifnot{#2}{} - {\doifelse{#1}\v!elk + {\doifelse{#1}\v!each {\dorecurse\maxitemlevel{\ExpandFirstAfter\dododododosetupitemgroup[\recurselevel][#2]}} {\ExpandFirstAfter\dododododosetupitemgroup[#1][#2]}}} \def\dododosetupitemgroup[#1][#2]% {\ConvertToConstant\doifelse{#2}{} {\ifcase\itemlevel\relax - \dodododosetupitemgroup[\v!elk][#1]% + \dodododosetupitemgroup[\v!each][#1]% \else \dodododosetupitemgroup[\itemlevel][#1]% \fi} @@ -266,7 +267,7 @@ \def\setitemlevel#1% {\ifnum\itemlevel>\zerocount \firstlisttrue - \doifnotinset\v!verder{#1} + \doifnotinset\v!continue{#1} {\doifinset{0}{#1}{\setitemparameter\itemlevel\c!start{0}}% \doifsomething{\getitemparameter\itemlevel\c!start} {\setcounter{\@@itemcounter\itemlevel}{\getitemparameter\itemlevel\c!start}% @@ -274,8 +275,8 @@ \letitemparameter\itemlevel\c!start\empty}}% \def\tempnumber {\countervalue{\@@itemcounter\itemlevel}}% - \doifelse{\getitemparameter\itemlevel\c!plaatsafsluiter}\v!ja - {\def\tempsymbol{\getitemparameter\itemlevel\c!afsluiter}} + \doifelse{\getitemparameter\itemlevel\c!placestopper}\v!yes + {\def\tempsymbol{\getitemparameter\itemlevel\c!stopper}} {\let\tempsymbol\empty}% \fi} @@ -315,32 +316,32 @@ \setxvalue{\@@globalitemsymbol\itemlevel}{\currentitemsymbol}% \setgvalue{\@@localitemsymbol \itemlevel}{\unknownitemsymbol}% \def\listitem{\symbol[\currentitemsymbol]}% - \let\@@opsymbool\empty}% \let\docommando\gobbleoneargument} + \let\@@opsymbol\empty}% \let\docommando\gobbleoneargument} {\doifconversiondefinedelse{#1} {\edef\currentitemsymbol{#1}% \setxvalue{\@@globalitemsymbol\itemlevel}{\currentitemsymbol}% \setgvalue{\@@localitemsymbol \itemlevel}% {\convertnumber{\currentitemsymbol}{\countervalue{\@@itemcounter\itemlevel}}}% \iftextitems - \doifsomething{\getitemparameter\itemlevel\c!linkertekst} + \doifsomething{\getitemparameter\itemlevel\c!lefttext} {\let\tempsymbol\empty}% \fi \def\listitem {\getitemparameter\itemlevel - {\iftextitems\c!linkertekst\else\c!links\fi}% + {\iftextitems\c!lefttext\else\c!left\fi}% \getvalue{\@@localitemsymbol\itemlevel}\tempsymbol \getitemparameter\itemlevel - {\iftextitems\c!rechtertekst\else\c!rechts\fi}}% - \let\@@opsymbool\empty}%\let\docommando\gobbleoneargument} + {\iftextitems\c!righttext\else\c!right\fi}}% + \let\@@opsymbol\empty}%\let\docommando\gobbleoneargument} {}}} \def\calculatelistwidth#1#2% distance deals with 'broad' - {#2=\getitemparameter{#1}\c!afstand\relax + {#2=\getitemparameter{#1}\c!distance\relax \ifnum\getitemparameter{#1}\c!factor>\zerocount \ifdim#2=\zeropoint #2=.5em\fi \fi \multiply#2 \getitemparameter{#1}\c!factor - \advance #2 \getitemparameter{#1}\c!breedte\relax} + \advance #2 \getitemparameter{#1}\c!width\relax} % The next conditionals deal with \item \startitemgroup. It % looks like a hack to skip back, but that way we preserve @@ -365,112 +366,6 @@ {\dodostartitemgroup[#2][]}% \fi} -% \def\dodostartitemgroup[#1][#2]% -% {\setfalse\inlinelistitem % new, no indent (leftskip) -% \setfalse\concatnextitem % new, concat -% \ifhmode -% \ifconditional\autoconcatnextitem % new, concat -% \ifdim\lastskip=\itemsignal % new, concat -% \settrue\concatnextitem % new, concat -% \fi % new, concat -% \fi % new, concat -% \iftextitems\else\doifnotinset\v!tekst{#1}\par\fi % suboptimal -% \fi -% \ifnum\itemlevel=\maxitemlevel\relax -% \showmessage\m!layouts9\maxitemlevel -% \def\itemincrement{0}% -% \else -% \def\itemincrement{1}% -% \fi -% \doglobal\increment(\itemlevel,\itemincrement)% -% \initializeitemgrouplevel\itemlevel % safeguard -% \begingroup -% \ifnum\itemlevel=\plusone % NIEUW -% \doadaptleftskip{\getitemparameter1\c!marge}% -% \fi -% \dosetraggedcommand{\getitemparameter\itemlevel\c!uitlijnen}\raggedcommand -% \doifsomething{\getitemparameter\itemlevel\c!inspringen} -% {\expanded{\setupindenting[\getitemparameter\itemlevel\c!inspringen]}}% -% \doifinset\v!kolommen{#1}% -% {\ifbinnenkolommen\else\ifnum\itemcolumndepth=\zerocount -% \globallet\itemcolumndepth\itemlevel -% \getitemparameter\itemlevel\c!voor -% \processfirstactioninset -% [#1] -% [ \v!een=>\!!counta1\relax, -% \v!twee=>\!!counta2\relax, -% \v!drie=>\!!counta3\relax, -% \v!vier=>\!!counta4\relax, -% \v!vijf=>\!!counta5\relax, -% \s!unknown=>\@EA\!!counta\getitemparameter\itemlevel\c!n]% -% % new -% \edef\columneditemleftskip{\the\leftskip}% -% \def\postprocesscolumnbox##1% -% {\scratchdimen\columneditemleftskip -% \divide\scratchdimen \nofcolumns -% \hbox{\hskip\columneditemleftskip\hbox{\box##1}}}% -% \scratchdimen-\columneditemleftskip -% \multiply\scratchdimen \nofcolumns -% \advance\scratchdimen \columneditemleftskip -% \advance\scratchdimen \hsize -% \edef\columntextwidth{\the\scratchdimen}% -% \leftskip\zeropoint -% % so far -% \startkolommen -% [\c!n=\!!counta, % netter \??op\itemlevel\c!n -% \c!hoogte=, -% \c!lijn=\v!uit, -% \c!balanceren=\v!ja, -% \c!uitlijnen=\v!nee]% -% \fi\fi}% -% \doifinsetelse\v!intro{#1}\itemintrotrue\itemintrofalse -% \doglobal\increment\noflists -% \let\currentlist\noflists -% \newcounter\noflistelements -% \headitemfalse -% \subitemfalse -% \symbolitemfalse -% \let\marsymbol\relax -% \globallet\somdestination\empty -% \let\symsymbol\empty -% \the\itemgroupcommands -% \setitemlevel{#1}% -% \getitemparameter\itemlevel\empty -% \doifelsenothing{#1} % iffirstargument -% {\edef\@@opsymbool{\getitemparameter\itemlevel\c!symbool}% -% \letgvalueempty{\@@globalitemsymbol\itemlevel}% -% \global\letitemparameter\itemlevel\v!verder\empty -% \setitemmark\@@opsymbool -% \dosetupitemgroupvariable[\itemlevel][#2]} -% {\dosetupitemgroupconstant[\itemlevel][#1]% -% \dosetupitemgroupvariable[\itemlevel][#2]% -% \doifinsetelse\v!verder{#1}% \noexpand, else problems in non-etex with chinese -% {\edef\@@opsymbool{\noexpand\getvalue{\@@globalitemsymbol\itemlevel}}% -% \getitemparameter\itemlevel\v!verder} -% {\edef\@@opsymbool{\noexpand\getitemparameter{\itemlevel}{\c!symbool}}% -% \global\setitemparameter\itemlevel\v!verder -% {\dosetupitemgroupconstant[\itemlevel][#1]% -% \dosetupitemgroupvariable[\itemlevel][#2]}}% -% \def\docommando##1% \setitemmark resets \docommando -% {\doifnot{##1}{0}{\setitemmark{##1}}}% -% \processcommalist[#1,\@@opsymbool]\docommando}% -% \ifautoitemintro\ifnum\prevgraf<3 -% \itemintrotrue -% \fi\fi -% \ifparagraphitems -% \ifnum\itemlevel>\plusone -% \letitemparameter\itemlevel\c!tussen\empty -% \fi -% \else\ifpackeditems -% \letitemparameter\itemlevel\c!tussen\empty -% \fi\fi -% \calculatelistwidth\itemlevel{\dimen0}% -% \ifdim\dimen0>\zeropoint\relax -% \ifconditional\inlinelistitem\else -% \advance\leftskip \dimen0\relax -% \fi -% \fi} - \def\dodostartitemgroup[#1]% [#2]% {\relax % prevents lookahead \ifnum\itemlevel=\maxitemlevel\relax @@ -481,7 +376,7 @@ \fi \doglobal\increment(\itemlevel,\itemincrement)% \initializeitemgrouplevel\itemlevel % safeguard - \edef\itemgroupoptions{\getitemparameter\itemlevel\c!optie}% + \edef\itemgroupoptions{\getitemparameter\itemlevel\c!option}% \ifx\itemgroupoptions\empty \edef\itemgroupoptions{#1}% \else @@ -489,105 +384,6 @@ \fi \expanded{\redostartitemgroup[\itemgroupoptions]}}% [#2] -% \def\redostartitemgroup[#1][#2]% -% {\setfalse\inlinelistitem % new, no indent (leftskip) -% \setfalse\concatnextitem % new, concat -% \ifhmode -% \ifconditional\autoconcatnextitem % new, concat -% \ifdim\lastskip=\itemsignal % new, concat -% \settrue\concatnextitem % new, concat -% \fi % new, concat -% \fi % new, concat -% \iftextitems\else\doifnotinset\v!tekst{#1}\par\fi % suboptimal -% \fi -% \begingroup -% \ifnum\itemlevel=\plusone % NIEUW -% \doadaptleftskip{\getitemparameter1\c!marge}% -% \fi -% \dosetraggedcommand{\getitemparameter\itemlevel\c!uitlijnen}\raggedcommand -% \doifsomething{\getitemparameter\itemlevel\c!inspringen} -% {% is \expanded needed? -% \expanded{\setupindenting[\getitemparameter\itemlevel\c!inspringen]}}% -% \doifinset\v!kolommen{#1}% -% {\ifbinnenkolommen\else\ifnum\itemcolumndepth=\zerocount -% \globallet\itemcolumndepth\itemlevel -% \getitemparameter\itemlevel\c!voor -% \processfirstactioninset -% [#1] -% [ \v!een=>\!!counta1\relax, -% \v!twee=>\!!counta2\relax, -% \v!drie=>\!!counta3\relax, -% \v!vier=>\!!counta4\relax, -% \v!vijf=>\!!counta5\relax, -% \s!unknown=>\@EA\!!counta\getitemparameter\itemlevel\c!n]% -% % new -% \edef\columneditemleftskip{\the\leftskip}% -% \def\postprocesscolumnbox##1% -% {\scratchdimen\columneditemleftskip -% \divide\scratchdimen \nofcolumns -% \hbox{\hskip\columneditemleftskip\hbox{\box##1}}}% -% \scratchdimen-\columneditemleftskip -% \multiply\scratchdimen \nofcolumns -% \advance\scratchdimen \columneditemleftskip -% \advance\scratchdimen \hsize -% \edef\columntextwidth{\the\scratchdimen}% -% \leftskip\zeropoint -% % so far -% \startkolommen -% [\c!n=\!!counta, % netter \??op\itemlevel\c!n -% \c!hoogte=, -% \c!lijn=\v!uit, -% \c!balanceren=\v!ja, -% \c!uitlijnen=\v!nee]% -% \fi\fi}% -% \doifinsetelse\v!intro{#1}\itemintrotrue\itemintrofalse -% \doglobal\increment\noflists -% \let\currentlist\noflists -% \newcounter\noflistelements -% \headitemfalse -% \subitemfalse -% \symbolitemfalse -% \let\marsymbol\relax -% \globallet\somdestination\empty -% \let\symsymbol\empty -% \the\itemgroupcommands -% \setitemlevel{#1}% -% %\getitemparameter\itemlevel\empty -% \doifelsenothing{#1} % iffirstargument -% {\edef\@@opsymbool{\getitemparameter\itemlevel\c!symbool}% -% \letgvalueempty{\@@globalitemsymbol\itemlevel}% -% \global\letitemparameter\itemlevel\v!verder\empty -% \setitemmark\@@opsymbool -% \dosetupitemgroupvariable[\itemlevel][#2]} -% {\dosetupitemgroupconstant[\itemlevel][#1]% -% \dosetupitemgroupvariable[\itemlevel][#2]% -% \doifinsetelse\v!verder{#1}% \noexpand, else problems in non-etex with chinese -% {\edef\@@opsymbool{\noexpand\getvalue{\@@globalitemsymbol\itemlevel}}% -% \getitemparameter\itemlevel\v!verder} -% {\edef\@@opsymbool{\noexpand\getitemparameter{\itemlevel}{\c!symbool}}% -% \global\setitemparameter\itemlevel\v!verder -% {\dosetupitemgroupconstant[\itemlevel][#1]% -% \dosetupitemgroupvariable[\itemlevel][#2]}}% -% \def\docommando##1% \setitemmark resets \docommando -% {\doifnot{##1}{0}{\setitemmark{##1}}}% -% \processcommalist[#1,\@@opsymbool]\docommando}% -% \ifautoitemintro\ifnum\prevgraf<3 -% \itemintrotrue -% \fi\fi -% \ifparagraphitems -% \ifnum\itemlevel>\plusone -% \letitemparameter\itemlevel\c!tussen\empty -% \fi -% \else\ifpackeditems -% \letitemparameter\itemlevel\c!tussen\empty -% \fi\fi -% \calculatelistwidth\itemlevel{\dimen0}% -% \ifdim\dimen0>\zeropoint\relax -% \ifconditional\inlinelistitem\else -% \advance\leftskip \dimen0\relax -% \fi -% \fi} - \def\redostartitemgroup[#1][#2]% {\setfalse\inlinelistitem % new, no indent (leftskip) \setfalse\concatnextitem % new, concat @@ -597,27 +393,29 @@ \settrue\concatnextitem % new, concat \fi % new, concat \fi % new, concat - \iftextitems\else\doifnotinset\v!tekst{#1}\par\fi % suboptimal + \iftextitems\else\doifnotinset\v!text{#1}\par\fi % suboptimal \fi \begingroup \ifnum\itemlevel=\plusone % NIEUW - \doadaptleftskip{\getitemparameter1\c!marge}% + \doadaptleftskip {\getitemparameter1\c!margin}% + \doadaptleftskip {\getitemparameter1\c!leftmargin}% + \doadaptrightskip{\getitemparameter1\c!rightmargin}% \fi - \dosetraggedcommand{\getitemparameter\itemlevel\c!uitlijnen}\raggedcommand - \doifsomething{\getitemparameter\itemlevel\c!inspringen} + \dosetraggedcommand{\getitemparameter\itemlevel\c!align}\raggedcommand + \doifsomething{\getitemparameter\itemlevel\c!indenting} {% is \expanded needed? - \expanded{\setupindenting[\getitemparameter\itemlevel\c!inspringen]}}% - \doifinset\v!kolommen{#1}% - {\ifbinnenkolommen\else\ifnum\itemcolumndepth=\zerocount + \expanded{\setupindenting[\getitemparameter\itemlevel\c!indenting]}}% + \doifinset\v!columns{#1}% + {\ifinsidecolumns\else\ifnum\itemcolumndepth=\zerocount \globallet\itemcolumndepth\itemlevel - \getitemparameter\itemlevel\c!voor + \getitemparameter\itemlevel\c!before \processfirstactioninset [#1] - [ \v!een=>\!!counta1\relax, - \v!twee=>\!!counta2\relax, - \v!drie=>\!!counta3\relax, - \v!vier=>\!!counta4\relax, - \v!vijf=>\!!counta5\relax, + [ \v!one=>\!!counta1\relax, + \v!two=>\!!counta2\relax, + \v!three=>\!!counta3\relax, + \v!four=>\!!counta4\relax, + \v!five=>\!!counta5\relax, \s!unknown=>\@EA\!!counta\getitemparameter\itemlevel\c!n]% % new \edef\columneditemleftskip{\the\leftskip}% @@ -632,12 +430,12 @@ \edef\columntextwidth{\the\scratchdimen}% \leftskip\zeropoint % so far - \startkolommen + \startcolumns [\c!n=\!!counta, % netter \??op\itemlevel\c!n - \c!hoogte=, - \c!lijn=\v!uit, - \c!balanceren=\v!ja, - \c!uitlijnen=\v!nee]% + \c!height=, + \c!rule=\v!off, + \c!balance=\v!yes, + \c!align=\v!no]% \fi\fi}% \doifinsetelse\v!intro{#1}\itemintrotrue\itemintrofalse \doglobal\increment\noflists @@ -654,26 +452,26 @@ %\getitemparameter\itemlevel\empty \let\listitem\empty % ** start value \doifelsenothing{#1} % iffirstargument - {\edef\@@opsymbool{\getitemparameter\itemlevel\c!symbool}% + {\edef\@@opsymbol{\getitemparameter\itemlevel\c!symbol}% \letgvalueempty{\@@globalitemsymbol\itemlevel}% - \global\letitemparameter\itemlevel\v!verder\empty - % \setitemmark\@@opsymbool % ** default value + \global\letitemparameter\itemlevel\v!continue\empty + % \setitemmark\@@opsymbol % ** default value \dosetupitemgroupvariable[\itemlevel][#2]} {\dosetupitemgroupconstant[\itemlevel][#1]% \dosetupitemgroupvariable[\itemlevel][#2]% - \doifinsetelse\v!verder{#1}% \noexpand, else problems in non-etex with chinese - {\edef\@@opsymbool{\noexpand\getvalue{\@@globalitemsymbol\itemlevel}}% - \getitemparameter\itemlevel\v!verder} - {\edef\@@opsymbool{\noexpand\getitemparameter{\itemlevel}{\c!symbool}}% - \global\setitemparameter\itemlevel\v!verder + \doifinsetelse\v!continue{#1}% \noexpand, else problems in non-etex with chinese + {\edef\@@opsymbol{\noexpand\getvalue{\@@globalitemsymbol\itemlevel}}% + \getitemparameter\itemlevel\v!continue} + {\edef\@@opsymbol{\noexpand\getitemparameter{\itemlevel}{\c!symbol}}% + \global\setitemparameter\itemlevel\v!continue {\dosetupitemgroupconstant[\itemlevel][#1]% \dosetupitemgroupvariable[\itemlevel][#2]}}% \def\docommando##1% \setitemmark resets \docommando {\doifnot{##1}{0}{\setitemmark{##1}}}% - % \processcommalist[#1,\@@opsymbool]\docommando + % \processcommalist[#1,\@@opsymbol]\docommando \processcommalist[#1]\docommando}% ** preset sequence or provided sequence \ifx\listitem\empty - \setitemmark\@@opsymbool % ** default value + \setitemmark\@@opsymbol % ** default value \ifx\listitem\empty \edef\currentitemsymbol{\itemlevel}% ** fall back \fi @@ -683,10 +481,10 @@ \fi\fi \ifparagraphitems \ifnum\itemlevel>\plusone - \letitemparameter\itemlevel\c!tussen\empty + \letitemparameter\itemlevel\c!inbetween\empty \fi \else\ifpackeditems - \letitemparameter\itemlevel\c!tussen\empty + \letitemparameter\itemlevel\c!inbetween\empty \fi\fi \calculatelistwidth\itemlevel{\dimen0}% \ifdim\dimen0>\zeropoint\relax @@ -704,26 +502,28 @@ \ifnum\itemcolumndepth=\zerocount \dolistreference \fi % beware ! \iffirstlist \else \endgroup \fi % toegevoegd, eerste \som opent groep \ifnum\itemcolumndepth=\itemlevel\relax - \stopkolommen + \stopcolumns \doglobal\newcounter\itemcolumndepth - \getitemparameter\itemlevel\c!na + \getitemparameter\itemlevel\c!after \else \ifnum\itemlevel=\plusone \doitembreak\allowbreak % toegevoegd - \getitemparameter1\c!na + \getitemparameter1\c!after \dochecknextindentation\??oo \else % nieuw, not yet nobreak handling \ifcase\autoitemgroupspacing - \getitemparameter\itemlevel\c!na + \getitemparameter\itemlevel\c!after \or - \getitemparameter\itemlevel\c!na + \getitemparameter\itemlevel\c!after \fi \fi \fi \endgroup \doglobal\decrement(\itemlevel,\itemincrement)% - \egroup} + \egroup + % new needed in sidefloats (surfaced in volker's proceedings) + \iftextitems\else\par\fi} \newtoks\itemgroupcommands @@ -741,7 +541,7 @@ {\subitemtrue\itemgroupitem} \def\itemgroupsymbol#1% - {\def\symsymbol{\doitemattributes\itemlevel\c!symletter\c!symkleur{#1}}% + {\def\symsymbol{\doitemattributes\itemlevel\c!symstyle\c!symcolor{#1}}% \symbolitemtrue \itemgroupitem} @@ -749,7 +549,7 @@ {\itemgroupsymbol {\calculatelistwidth\itemlevel{\dimen0}% \hbox to \dimen0 - {#1\hskip\getitemparameter\itemlevel\c!afstand}}} + {#1\hskip\getitemparameter\itemlevel\c!distance}}} \def\itemgrouphead {\headitemtrue\doitemgrouphead} @@ -765,20 +565,20 @@ \def\itemgroupmargin#1% {\def\marsymbol {\llap - {\doitemattributes\itemlevel\c!marletter\c!markleur{#1}% - \hskip\leftskip\hskip\linkermargeafstand}}% + {\doitemattributes\itemlevel\c!marstyle\c!marcolor{#1}% + \hskip\leftskip\hskip\leftmargindistance}}% \itemgroupitem} -\appendtoks \let\item \itemgroupitem \to \itemgroupcommands -\appendtoks \let\itm \itemgroupitem \to \itemgroupcommands -\appendtoks \let\but \itemgroupbutton \to \itemgroupcommands -\appendtoks \let\nop \itemgroupdummy \to \itemgroupcommands -\appendtoks \letvalue\v!sub \itemgroupsubitem \to \itemgroupcommands -\appendtoks \letvalue\v!sym \itemgroupsymbol \to \itemgroupcommands -\appendtoks \letvalue\v!ran \itemgroupedge \to \itemgroupcommands -\appendtoks \letvalue\v!kop \itemgrouphead \to \itemgroupcommands -\appendtoks \letvalue\v!its \itemgroupitems \to \itemgroupcommands -\appendtoks \letvalue\v!mar \itemgroupmargin \to \itemgroupcommands +\appendtoks \let\item \itemgroupitem \to \itemgroupcommands +\appendtoks \let\itm \itemgroupitem \to \itemgroupcommands +\appendtoks \let\but \itemgroupbutton \to \itemgroupcommands +\appendtoks \let\nop \itemgroupdummy \to \itemgroupcommands +\appendtoks \letvalue\v!sub \itemgroupsubitem \to \itemgroupcommands +\appendtoks \letvalue\v!sym \itemgroupsymbol \to \itemgroupcommands +\appendtoks \letvalue\v!ran \itemgroupedge \to \itemgroupcommands +\appendtoks \letvalue\v!head \itemgrouphead \to \itemgroupcommands +\appendtoks \letvalue\v!its \itemgroupitems \to \itemgroupcommands +\appendtoks \letvalue\v!mar \itemgroupmargin \to \itemgroupcommands % Sometimes the user demands get pretty weird: % @@ -789,7 +589,7 @@ % \stopitemize \def\itemgroupheadsym#1% - {\def\symsymbol{\doitemattributes\itemlevel\c!symletter\c!symkleur{#1}}% + {\def\symsymbol{\doitemattributes\itemlevel\c!symstyle\c!symcolor{#1}}% \symbolitemtrue \headitemtrue \doitemgrouphead} @@ -800,7 +600,7 @@ {\flushnotes\penalty-5\relax} \def\itemnobreak % +5 - {\flushnotes\penalty+5\ifbinnenkolommen\else00\fi\relax} + {\flushnotes\penalty+5\ifinsidecolumns\else00\fi\relax} \def\dolistitem % evt aantal items opslaan per niveau, scheelt zoeken {\iftextitems @@ -842,22 +642,22 @@ \noindent \setbox8\hbox {\ifheaditem - \doitemattributes\itemlevel\c!kopletter\c!kopkleur{\listitem}% + \doitemattributes\itemlevel\c!headstyle\c!headcolor{\listitem}% \else\ifsymbolitem \symsymbol \else - \doitemattributes\itemlevel\c!letter\c!kleur{\listitem}% + \doitemattributes\itemlevel\c!style\c!color{\listitem}% \fi\fi}% \doifsomething\somdestination - {\setbox8\hbox{\naar{\box8}[\somdestination]}}% + {\setbox8\hbox{\goto{\box8}[\somdestination]}}% \globallet\somdestination\empty - \dimen2=\getitemparameter\itemlevel\c!breedte\relax + \dimen2=\getitemparameter\itemlevel\c!width\relax % new, prevents loops when symbol is (not yet found) graphic \ht8=\strutheight \dp8=\strutdepth % so that content differs per run (esp mp graphics afterwards) \ifdim\dimen2<\zeropoint\relax - \llap{\ifsubitem\llap{+}\fi\box8\hskip\linkermargeafstand}% + \llap{\ifsubitem\llap{+}\fi\box8\hskip\leftmargindistance}% \else \ifdim\dimen2=\zeropoint\relax \calculatelistwidth1{\dimen0}% @@ -909,7 +709,7 @@ \or % 1 \ifnum\itemcolumndepth=0\relax \ifitemintro\doitembreak\nobreak\fi - \getitemparameter1\c!voor + \getitemparameter1\c!before \ifitemintro\doitembreak\nobreak\fi \fi \else % 2 en hoger @@ -917,18 +717,18 @@ \let\previtemlevel\itemlevel \decrement\previtemlevel \ifcase\autoitemgroupspacing\relax % nieuw - \getitemparameter\itemlevel\c!voor + \getitemparameter\itemlevel\c!before \or - \doifelsenothing{\getitemparameter\itemlevel\c!voor} - {\getitemparameter\itemlevel\c!voor} - {\getitemparameter\previtemlevel\c!tussen}% + \doifelsenothing{\getitemparameter\itemlevel\c!before} + {\getitemparameter\itemlevel\c!before} + {\getitemparameter\previtemlevel\c!inbetween}% \else - \getitemparameter\previtemlevel\c!tussen % == itemlevel-1 + \getitemparameter\previtemlevel\c!inbetween % == itemlevel-1 \fi \fi \fi \else - \getitemparameter\itemlevel\c!tussen + \getitemparameter\itemlevel\c!inbetween \fi \ifconditional\concatnextitem % new, concat \vskip-\lastskip % new, concat @@ -938,9 +738,9 @@ \ignorespaces \dolistitem \ifpackeditems - \setupwhitespace[\v!geen]% + \setupwhitespace[\v!none]% \fi - \getitemparameter\itemlevel\c!binnen + \getitemparameter\itemlevel\c!inner \marsymbol \let\marsymbol\relax \doifsomething{#1} @@ -964,11 +764,11 @@ \def\complexdoitemgrouphead[#1]#2\par% % beter in \complexdosom hangen met een if {\iffirstlist\else\doitembreak\allowbreak\fi - \ifpackeditems\else\getitemparameter\itemlevel\c!kopvoor\fi + \ifpackeditems\else\getitemparameter\itemlevel\c!beforehead\fi \iffirstlist\ifitemintro\else\ifcase\itemlevel % incr in \complexdosom \doitembreak\allowbreak \fi\fi\fi - \complexdoitemgroupitem[#1]{\doitemattributes\itemlevel\c!kopletter\c!kopkleur + \complexdoitemgroupitem[#1]{\doitemattributes\itemlevel\c!headstyle\c!headcolor {\ignorespaces#2}}% \iftextitems \removeunwantedspaces\space\ignorespaces @@ -976,7 +776,7 @@ \par \fi \doitembreak\nobreak - \ifpackeditems\else\getitemparameter\itemlevel\c!kopna\fi + \ifpackeditems\else\getitemparameter\itemlevel\c!afterhead\fi \doitembreak\nobreak \noindentation} @@ -1009,39 +809,41 @@ \ignorespaces} \setupitemgroups % undocumented - [\c!niveaus=6, - \c!marge=\!!zeropoint, - \c!springvolgendein=\v!ja, - \c!breedte=1.5em, + [\c!levels=6, + \c!margin=\zeropoint, + \c!leftmargin=\zeropoint, + \c!rightmargin=\zeropoint, + \c!indentnext=\v!yes, + \c!width=1.5em, \c!factor=0, - \c!afstand=.5em, - %\c!uitlijnen=\v!normaal, % definitely not \v!normaal, see mails and - \c!uitlijnen=, % debug reports of David A & Patrick G on context list - \c!kleur=, - \c!inspringen=, % untouched if empty - \c!kleur=, - \c!letter=, % kan tzt weg - \c!marletter=\c!type, % \c! ??? - \c!symletter=, - \c!kopletter=, - \c!markleur=, - \c!symkleur=, - \c!kopkleur=, - \c!kopvoor=, - \c!kopna=\blanko, - \c!voor=\blanko, - \c!tussen=\blanko, - \c!na=\blanko, - \c!afsluiter=., - \c!plaatsafsluiter=\v!ja, - \c!binnen=, + \c!distance=.5em, + %\c!align=\v!normal, % definitely not \v!normal, see mails and + \c!align=, % debug reports of David A & Patrick G on context list + \c!color=, + \c!indenting=, % untouched if empty + \c!color=, + \c!style=, % kan tzt weg + \c!marstyle=\c!type, % \c! ??? + \c!symstyle=, + \c!headstyle=, + \c!marcolor=, + \c!symcolor=, + \c!headcolor=, + \c!beforehead=, + \c!afterhead=\blank, + \c!before=\blank, + \c!inbetween=\blank, + \c!after=\blank, + \c!stopper=., + \c!placestopper=\v!yes, + \c!inner=, \c!n=2, \c!items=4, - \c!linkertekst=(, - \c!rechtertekst=), + \c!lefttext=(, + \c!righttext=), \c!start=1, - \c!optie=, - \c!symbool=\itemlevel] % \v!niveau + \c!option=, + \c!symbol=\itemlevel] % \v!niveau \def\defineitemgroup {\dodoubleempty\dodefineitemgroup} @@ -1052,18 +854,18 @@ \def\currentitemgroup{#1}% \setvalue{\e!start#1}{\startitemgroup[#1]}% \setvalue{\e!stop#1}{\stopitemgroup}% - \setvalue{\e!stel#1\e!in}{\setupitemgroup[#1]}% - \getparameters[\??ig#1][\c!niveaus=3,#2]% - \ifnum\getvalue{\??ig#1\c!niveaus}<\maxitemlevel\relax - \letvalue{\??ig#1\c!niveaus}\maxitemlevel + \setvalue{\e!setup#1\e!endsetup}{\setupitemgroup[#1]}% + \getparameters[\??ig#1][\c!levels=3,#2]% + \ifnum\getvalue{\??ig#1\c!levels}<\maxitemlevel\relax + \letvalue{\??ig#1\c!levels}\maxitemlevel \fi - \dorecurse{\getvalue{\??ig#1\c!niveaus}}{\initializeitemgrouplevel\recurselevel}% + \dorecurse{\getvalue{\??ig#1\c!levels}}{\initializeitemgrouplevel\recurselevel}% \popmacro\currentitemgroup}} % efficient default itemize as well as upward compatible % definition: -\defineitemgroup [\v!itemize] [\c!niveaus=6] +\defineitemgroup [\v!itemize] [\c!levels=6] % keep these, needed for styles: @@ -1071,4 +873,4 @@ % \def\stopitemize {\stopitemgroup} % \def\setupitemize {\setupitemgroup[\v!itemize]} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex index 13573f50d..5957b5c98 100644 --- a/tex/context/base/core-job.tex +++ b/tex/context/base/core-job.tex @@ -15,24 +15,6 @@ \writestatus{loading}{Context Core Macros / Job Handling} -%S InputFile \input -%S InputFile \omgeving \environment -%S InputFile \projekt \project -%S InputFile \produkt \product -%S InputFile \onderdeel \component -%S -%S CheckStrings \start \stop -%S CheckStrings \begin \end -%S CheckStrings \begin \eind -%S -%S CheckChars { } -%S CheckChars [ ] -%S CheckChars ( ) -%S -%S CheckChar $ - -% \appendtoks \reportprotectionstate \to \everydump - \unprotect \let \currentproject \empty @@ -43,7 +25,7 @@ \let \loadedfiles \empty \let \processedfiles \empty -\let \geenfilesmeer \relax +\let \nomorefiles \relax \newcounter\textlevel \newcounter\fileprocesslevel @@ -133,12 +115,12 @@ % test \@@svgebied \def\loadallsystemfiles#1#2% - {\ifx\@@svgebied\empty + {\ifx\@@svdirectory\empty \readsysfile{#1}{\showmessage\m!systems2{#1}}{#2}% \else% yet undocumented \def\doloadsystemfile##1% {\readsetfile{##1}{#1}{\showmessage\m!systems2{#1}}{#2}}% - \processcommacommand[\@@svgebied]\doloadsystemfile + \processcommacommand[\@@svdirectory]\doloadsystemfile \fi} \def\loadsystemfiles @@ -184,8 +166,6 @@ % \newevery \everyjob \EveryJob % \appendtoks ... \to \everyjob -\prependtoks \showcontextbanner \to \everyjob - \appendtoks \loadsystemfiles \to \everyjob \appendtoks \preloadfonts \to \everyjob \appendtoks \settopskip \to \everyjob @@ -199,7 +179,7 @@ \appendtoks \checknotes \to \everyjob % depends on bodyfont \appendtoks \initializeMPgraphics \to \everyjob % after loading system files -\appendtoks \pagina[\v!laatste] \pagina \to \everybye +\appendtoks \page[\v!last] \page \to \everybye \appendtoks \ifarrangingpages\poparrangedpages\fi \to \everybye \appendtoks \registerfileinfo[end]\jobname \to \everybye @@ -229,7 +209,7 @@ {\the\everystarttext \global\everystarttext\emptytoks} -\def\starttekst +\def\starttext {\doateverystarttext \ifnum\textlevel=\zerocount \registerfileinfo[begin]\jobname @@ -237,7 +217,7 @@ \fi \doglobal\increment\textlevel\relax} -\def\stoptekst +\def\stoptext {\doglobal\decrement\textlevel\relax \ifnum\textlevel>\zerocount \else \the\everystoptext @@ -247,9 +227,6 @@ \expandafter\end \fi} -\let\starttext\starttekst -\let\stoptext \stoptekst - \let\normalend=\end \def\end @@ -261,6 +238,8 @@ \expandafter\normalend \fi} +\def\currentfile{\inputfilename} + \def\doexecutefileonce#1% {\beforesplitstring#1\at.\to\currentfile \fullexpandtwoargsafter\doifnotinset\currentfile\loadedfiles @@ -280,79 +259,72 @@ \def\verwerkfile#1 % {\doexecutefile{#1}} -\def\omgeving #1 % at outermost level only - {\def\startomgeving ##1 {}% - \let\stopomgeving\relax +\def\environment #1 % at outermost level only + {\def\startenvironment ##1 {}% + \let\stopenvironment\relax \dostarttextfile{#1}% \startreadingfile \processfile{#1}% was : \readlocfile{#1}{}{} \stopreadingfile \dostoptextfile} -\def\onderdeel #1 % at outermost level only +\def\component #1 % at outermost level only {\dostarttextfile{#1}% \processfile{#1}% \dostoptextfile} -\def\environment{\omgeving} % for the moment, no \let ! - \newcounter\filelevel -\def\!!donextlevel#1#2#3#4#5#6\\% +\def\donextlevel#1#2#3#4#5#6\\% {\beforesplitstring#6\at.\to#1 \ifcase\filelevel\relax - \starttekst - \def\projekt ##1 {#2{##1}}% - \def\omgeving ##1 {#3{##1}}% - \def\produkt ##1 {#4{##1}}% - \def\onderdeel ##1 {#5{##1}}% + \starttext + \def\project ##1 {#2{##1}}% + \def\environment ##1 {#3{##1}}% + \def\product ##1 {#4{##1}}% + \def\component ##1 {#5{##1}}% \fi \increment\filelevel\relax \fullexpandoneargafter\addtocommalist{#1}\loadedfiles} \def\doprevlevel {\ifnum\filelevel=\plusone - \expandafter\stoptekst + \expandafter\stoptext \else \decrement\filelevel\relax \expandafter\endinput \fi} -\def\startprojekt #1 % - {\!!donextlevel\currentproject +\def\startproject #1 % + {\donextlevel\currentproject \donotexecutefile\doexecutefileonce \doexecutefileonce\doexecutefile#1\\} -\def\stopprojekt - {\doprevlevel} - -\def\startprodukt #1 % +\def\startproduct #1 % {\doateverystarttext - \!!donextlevel\currentproduct + \donextlevel\currentproduct \doexecutefileonce\doexecutefileonce \donotexecutefile\doexecutefile#1\\} -\def\stopprodukt - {\doprevlevel} - -\def\startonderdeel #1 % +\def\startcomponent #1 % {\doateverystarttext - \!!donextlevel\currentcomponent + \donextlevel\currentcomponent \doexecutefileonce\doexecutefileonce \donotexecutefile\doexecutefile#1\\} -\def\stoponderdeel - {\doprevlevel} - -\def\startomgeving #1 % - {\!!donextlevel\currentenvironment +\def\startenvironment #1 % + {\donextlevel\currentenvironment \donotexecutefile\doexecutefileonce \donotexecutefile\donotexecutefile#1\\} -\def\stopomgeving - {\doprevlevel} +\def\stopproject {\doprevlevel} +\def\stopproduct {\doprevlevel} +\def\stopcomponent {\doprevlevel} +\def\stopenvironment{\doprevlevel} + +% more or less replaced by modes -\def\startdeelomgeving[#1]% +\setvalue{\e!start\v!localenvironment}[#1]% {\let\loadedlocalenvironments\empty \def\docommando##1% {\beforesplitstring##1\at.\to\someevironment @@ -362,18 +334,10 @@ {\currentproject,\currentproduct,% \currentcomponent,\currentenvironment} {\loadedlocalenvironments} - {\letvalue{\e!stop\v!deelomgeving}\relax} - {\grabuntil{\e!stop\v!deelomgeving}\relax}} + {\letvalue{\e!stop\v!localenvironment}\relax} + {\grabuntil{\e!stop\v!localenvironment}\relax}} -\def\startproduct{\startprodukt} -\def\stopproduct {\stopprodukt} -\def\startproject{\startprojekt} -\def\stopproject {\stopprojekt} - -\def\project{\projekt} -\def\product{\produkt} - -\def\deelomgeving #1 % +\setvalue{\v!localenvironment} #1 % {\doexecutefileonce{#1}} % Het -karakter (FormFeed), wordt omgezet in \par @@ -384,23 +348,39 @@ \neverypar=\emptytoks -\appendtoks \flushnotes \to \everypar -\appendtoks \ifinner\else\checksidefloat\fi \to \everypar -\appendtoks \checkindentation \to \everypar -\appendtoks \showparagraphnumber \to \everypar -\appendtoks \flushmargincontents \to \everypar -\appendtoks \flushcommentanchors \to \everypar -\appendtoks \synchronizenotes \to \everypar +% \appendtoks \flushnotes \to \everypar +% \appendtoks \synchronizesidefloats \to \everypar +% \appendtoks \checkindentation \to \everypar +% \appendtoks \showparagraphnumber \to \everypar +% \appendtoks \flushmargincontents \to \everypar +% \appendtoks \flushcommentanchors \to \everypar +% \appendtoks \synchronizenotes \to \everypar -\appendtoks \flushnotes \to \everydisplay -\appendtoks \adjustsidefloatdisplaylines \to \everydisplay +% \appendtoks \flushnotes \to \everydisplay +% \appendtoks \adjustsidefloatdisplaylines \to \everydisplay %D Better here than in supp-mps: \def\executesystemcommand{\immediate\write18} +\ifnum\etexversion<202 + \prependtoks + \writestatus\m!systems{eTeX version \number\etexversion\space -> too old (bugs)}% + \writeline + \to \everyjob +\fi + +\ifnum\number\pdftexversion<120 + \prependtoks + \writestatus\m!systems{pdfTeX version \number\pdftexversion\space -> please update}% + \writeline + \to \everyjob +\fi + +\prependtoks \showcontextbanner \to \everyjob + % Default-instellingen (verborgen) \resetutilities -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-lnt.tex b/tex/context/base/core-lnt.tex index b1082bd01..ed03672ad 100644 --- a/tex/context/base/core-lnt.tex +++ b/tex/context/base/core-lnt.tex @@ -29,13 +29,13 @@ \global\collectedlinenotes\emptytoks \to \beforeeverylinenumbering -% \def\handlelinenote#1#2% +% \def\dohandlelinenote#1#2#3% % {\bgroup -% \expanded{\beforesplitstring#1}\at--\to\linenotelinenumber +% \expanded{\beforesplitstring#2}\at--\to\linenotelinenumber % \ifnum\linenotelinenumber=\linenumber\relax -% % todo: \onlyfootnote{#1}{#2}% == configurable -% \setupfootnotes[\c!nummercommando=\gobbleoneargument]% -% \footnotetext{#1: #2}% +% % todo: \onlyfootnote{#2}{#3}% == configurable +% \setupnote[#1][\c!nummercommando=\gobbleoneargument]% +% \setnotetext[#1]{#2: #3}% % \fi % \egroup} @@ -44,25 +44,14 @@ \expanded{\beforesplitstring#2}\at--\to\linenotelinenumber \ifnum\linenotelinenumber=\linenumber\relax % todo: \onlyfootnote{#2}{#3}% == configurable - \setupnote[#1][\c!nummercommando=\gobbleoneargument]% - \setnotetext[#1]{#2: #3}% + % \setupnote[#1][\c!numbercommand=\gobbleoneargument]% + % \setnotetext[#1]{\rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}#2: #3}% + \def\linenotelinenumber##1{#2}% + \setupnote[#1][\c!numbercommand=\linenotelinenumber]% + \setnote[#1]{#3}% \fi \egroup} -% \def\tracedlinenote#1% -% {\iftracelinenotes -% \hbox to \zeropoint -% {\forgetall -% \localcolortrue -% \hsize\zeropoint -% \hss -% \vbox to \strutheight{\llap{\red\infofont\setstrut\linenotecounter}\vss}% -% {\blue\vl}% -% \vbox to \strutheight{\rlap{\red\infofont\setstrut#1}\vss}% -% \hss}% -% \prewordbreak -% \fi} - \def\dotracedlinenote#1% {\iftracelinenotes \hbox to \zeropoint @@ -77,15 +66,6 @@ \prewordbreak \fi} -% \def\linenote#1% -% {\doglobal\increment\linenotecounter -% \doifreferencefoundelse{\??rr:\linenotecounter}% -% {\doglobal\@EA\appendtoks\@EA\handlelinenote\@EA -% {\currenttextreference}{#1}\to\collectedlinenotes} -% \donothing -% \tracedlinenote\empty -% \expanded{\eenregel[\??rr:\linenotecounter]}} - \def\dolinenote#1#2% {\doglobal\increment\linenotecounter \doifreferencefoundelse{\??rr:\linenotecounter}% @@ -93,15 +73,7 @@ {#1}{\currenttextreference}}{#2}\to\collectedlinenotes} \donothing \dotracedlinenote\empty - \expanded{\eenregel[\??rr:\linenotecounter]}} - -% \def\startlinenote[#1]#2% -% {\doifreferencefoundelse{\??rr:#1}% -% {\doglobal\@EA\appendtoks\@EA\handlelinenote\@EA -% {\currenttextreference}{#2}\to\collectedlinenotes} -% \donothing -% \tracedlinenote{#1}% -% \startregel[\??rr:#1]} + \expanded{\someline[\??rr:\linenotecounter]}} \def\dostartlinenote#1[#2]#3% {\doifreferencefoundelse{\??rr:#2}% @@ -109,13 +81,10 @@ {#1}{\currenttextreference}}{#3}\to\collectedlinenotes} \donothing \dotracedlinenote{#2}% - \startregel[\??rr:#2]} - -% \def\stoplinenote[#1]% -% {\stopregel[\??rr:#1]} + \startline[\??rr:#2]} \def\dostoplinenote#1[#2]% - {\stopregel[\??rr:#2]} + {\stopline[\??rr:#2]} % defining them @@ -233,4 +202,4 @@ % % {\typebuffer[setup-1] \getbuffer[setup-1,setup-2,test]} \page -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex index 60872d9fb..0d5b0f0de 100644 --- a/tex/context/base/core-lst.tex +++ b/tex/context/base/core-lst.tex @@ -20,10 +20,10 @@ % can be made faster if needed \def\getlistlevel[#1]#2#3% [list] \variable \default - {\doifdefinedelse{\??ko#1\c!sectie} - {\edef#2{\getvalue{\??ko#1\c!sectie}}% - \doifdefinedelse{\??se#2\c!niveau} - {\edef#2{\getvalue{\??se#2\c!niveau}}} + {\doifdefinedelse{\??ko#1\c!section} + {\edef#2{\getvalue{\??ko#1\c!section}}% + \doifdefinedelse{\??se#2\c!level} + {\edef#2{\getvalue{\??se#2\c!level}}} {\edef#2{#3}}} {\edef#2{#3}}} @@ -33,21 +33,21 @@ % number uses the text container. We use reference mapping % (define reference) to keep track of the current ref. -\def\doschrijfnaarlijst#1% - {\doifelsevalue{\??li#1\c!status}\v!start - \dodoschrijfnaarlijst\gobblefourarguments{#1}} +\def\dowritetolist#1% + {\doifelsevalue{\??li#1\c!state}\v!start + \dodowritetolist\gobblefourarguments{#1}} -\def\dodoschrijfnaarlijst#1#2#3#4% +\def\dodowritetolist#1#2#3#4% {\begingroup \def\currentlist{#1}% \convertexpanded{\??li\currentlist}{#3}\asciilistentry \makesectionformat - \doifelse\@@nmstatus\v!start + \doifelse\@@nmstate\v!start {\def\dopaginanummer{\noexpand\pagenumber}} {\def\dopaginanummer{0}}% % niet waterdicht, wat te doen met figuren en zo % first hack: scheelt rommel, second hack: alleen koppen - \doifelsevalue{\??rf\currentlist\c!status}\v!start + \doifelsevalue{\??rf\currentlist\c!state}\v!start {\doif{\@@sectionlevel\@@sectie}{0}\autocrossdocumentfalse} {\autocrossdocumentfalse}% % blijft nog wat zwakjes en inefficient @@ -57,7 +57,7 @@ %\thisisdestination{\currentlist::\sectionformat}% \@EA\setsectieenkoppeling\@EA{\currentlist}% \edef\currentlevel{\@@sectionlevel\@@sectie}% - \processcommacommand[\crossdocumentreferences]\dododoschrijfnaarlijst + \processcommacommand[\crossdocumentreferences]\dododowritetolist \egroup \else \thisisnextinternal\currentlist @@ -74,13 +74,13 @@ \next % \schrijfwegnaarlijst \endgroup} -\def\dododoschrijfnaarlijst#1% +\def\dododowritetolist#1% {\def\docommando##1% - {\doifvalue{\??rf##1\c!status}\v!start + {\doifvalue{\??rf##1\c!state}\v!start {\setsectieenkoppeling{##1}% \def\level{\@@sectionlevel\@@sectie}% \ifnum\level>\currentlevel - \expanded{\definereference[#1::##1][\v!geen]}% + \expanded{\definereference[#1::##1][\v!none]}% \else\ifnum\level=\currentlevel \expanded{\definereference[#1::##1][#1::{##1::\sectionformat}]}% \fi\fi}}% @@ -88,35 +88,12 @@ % so far -% \def\doschrijftussenlijst#1#2% -% {\doifvalue{\??li#1\c!status}\v!start -% {\dodoschrijftussenlijst{#1}{#2}}} -% -% \def\dodoschrijftussenlijst#1#2% -% {\begingroup -% \convertargument#2\to\ascii -% \makesectionformat -% \doifelse{\@@nmstatus}\v!start -% {\def\dopaginanummer{\noexpand\pagenumber}} -% {\def\dopaginanummer{0}}% -% \edef\schrijfwegnaarlijst% -% {\writeutilitycommand% -% {\listbetween% -% {#1}% -% {\ascii}% -% {\sectionformat\sectionseparator\sectionseparator\dopaginanummer}% -% {\noexpand\realfolio}}}% -% \schrijfwegnaarlijst -% \endgroup} -% -% no reason for indirectness - -\def\doschrijftussenlijst#1#2% - {\doifvalue{\??li#1\c!status}\v!start +\def\dowritebetweenlist#1#2% + {\doifvalue{\??li#1\c!state}\v!start {\begingroup \convertargument#2\to\ascii \makesectionformat - \doifelse{\@@nmstatus}\v!start + \doifelse{\@@nmstate}\v!start {\def\dopaginanummer{\noexpand\pagenumber}} {\def\dopaginanummer{0}}% \edef\next % \schrijfwegnaarlijst @@ -153,11 +130,17 @@ {\realfolio}}% \endgroup} -\def\listentry#1% - {\executeifdefined{#1\c!lijst}\gobblefivearguments} +\def\setlistentries + {\def\listentry ##1{\executeifdefined{##1\c!list }\gobblefivearguments }% + \def\listbetween##1{\executeifdefined{##1\c!inbetween}\gobblethreearguments}} -\def\listbetween#1% - {\executeifdefined{#1\c!tussen}\gobblethreearguments} +\def\resetlistentries + {\let\listentry \gobblesixarguments + \let\listbetween\gobblefourarguments} + +\resetlistentries + +\addutilityreset{listentries} %\def\@@livariantaa% nr - tit - pag % {\def\lijstfill{\hskip .5em}% @@ -182,113 +165,111 @@ \def\lijstdots{\leaders\hbox to .5em{\hss.\hss}\hfill} -\def\@@livariant% +\def\@@lialternative% {\lijstvariantb} \@@livariantb \def\setlistparameter#1#2{\@EA\def\csname\??li#1#2\endcsname} -\def\dostellijstin[#1][#2]% slow -) +\def\dosetuplist[#1][#2]% slow -) {\def\docommando##1% {\getparameters[\??li##1][#2]% - \preparepaginaprefix{\??li##1}}% + \preparepageprefix{\??li##1}}% \processcommalist[#1]\docommando} -\def\stellijstin - {\dodoubleargument\dostellijstin} +\def\setuplist + {\dodoubleargument\dosetuplist} \def\dodosetlijst#1% - {\def\geenlijst{\splitsequence{\getvalue{\??li#1\c!limittext}}}% - \setvalue{#1\c!tussen}{\dotussenlijst {#1}}% - \setvalue{#1\c!lijst }{\dolijstelement{#1}}} + {\def\nolist{\splitsequence{\getvalue{\??li#1\c!limittext}}}% + \setvalue{#1\c!inbetween}{\dotussenlijst {#1}}% + \setvalue{#1\c!list }{\dolijstelement{#1}}} \def\dodoresetlijst#1% - {\let\geenlijst\empty - \setvalue{#1\c!tussen}{\gobblefourarguments{#1}}% - \setvalue{#1\c!lijst }{\gobblesixarguments {#1}}} + {\let\nolist\empty + \setvalue{#1\c!inbetween}{\gobblefourarguments{#1}}% + \setvalue{#1\c!list }{\gobblesixarguments {#1}}} -\let\geenlijst\empty +\let\nolist\empty -\def\dodefinieerlijst[#1][#2][#3]% +\def\dodefinelist[#1][#2][#3]% {\presetlocalframed[\??li#1]% \getparameters [\??li#1] - [\c!hoogte=\v!ruim, - \c!diepte=\v!ruim, + [\c!height=\v!broad, + \c!depth=\v!broad, \c!offset=0.25em, - \c!maxbreedte=, - \c!status=\v!start, - \c!koppeling=\v!uit, - \c!criterium=\v!lokaal, - \c!breedte=3em, - \c!variant=\c!b, - \c!letter=\v!normaal, - \c!tekstletter=\getvalue{\??li#1\c!letter}, - \c!nummerletter=\getvalue{\??li#1\c!letter}, - \c!paginaletter=\getvalue{\??li#1\c!letter}, - \c!kleur=, - \c!tekstkleur=\getvalue{\??li#1\c!kleur}, - \c!nummerkleur=\getvalue{\??li#1\c!kleur}, - \c!paginakleur=\getvalue{\??li#1\c!kleur}, - \c!nummercommando=\lijstnummercommando, - \c!tekstcommando=\lijsttekstcommando, - \c!paginacommando=\lijstpaginacommando, - \c!paginanummer=\v!ja, - \c!paginaovergangen=, - \c!marge=\!!zeropoint, - \c!titeluitlijnen=, - \c!voor=, - \c!na=, - \c!tussen=, - \c!symbool=, - \c!interactie=\v!sectienummer, - \v!deel\v!nummer=\v!ja, % nodig ? % v - \c!label=\v!nee, - \c!afstand=\!!zeropoint, - \c!scheider=\@@koscheider, + \c!maxwidth=, + \c!state=\v!start, + \c!coupling=\v!off, + \c!criterium=\v!local, + \c!width=3em, + \c!alternative=\c!b, + \c!style=\v!normal, + \c!textstyle=\getvalue{\??li#1\c!style}, + \c!numberstyle=\getvalue{\??li#1\c!style}, + \c!pagestyle=\getvalue{\??li#1\c!style}, + \c!color=, + \c!textcolor=\getvalue{\??li#1\c!color}, + \c!numbercolor=\getvalue{\??li#1\c!color}, + \c!pagecolor=\getvalue{\??li#1\c!color}, + \c!numbercommand=\lijstnummercommando, + \c!textcommand=\lijsttekstcommando, + \c!pagecommand=\lijstpaginacommando, + \c!pagenumber=\v!yes, + \c!pageboundaries=, + \c!margin=\!!zeropoint, + \c!aligntitle=, + \c!before=, + \c!after=, + \c!inbetween=, + \c!symbol=, + \c!interaction=\v!sectionnumber, + \v!part\v!number=\v!yes, % nodig ? % v + \c!label=\v!no, + \c!distance=\!!zeropoint, + \c!separator=\@@koseparator, \c!limittext=\@@kolimittext, - \c!afsluiter=, - \c!expansie=]% + \c!stopper=, + \c!expansion=]% \doifassignmentelse{#2} {\getparameters[\??li#1][#2]} {\ConvertToConstant\doifnot{#2}{} {\copyparameters % interactie ? [\??li#1][\??li#2] - [\c!status,\c!breedte,\c!variant,\c!letter,\c!kleur, - \c!tekstletter,\c!tekstkleur,\c!tekstcommando, - \c!paginaletter,\c!paginacommando,\c!paginakleur, - \c!nummerletter,\c!nummerkleur,\c!nummercommando, - \c!paginanummer,\c!paginaovergangen,\c!marge,\c!symbool, + [\c!state,\c!width,\c!alternative,\c!style,\c!color, + \c!textstyle,\c!textcolor,\c!textcommand, + \c!pagestyle,\c!pagecommand,\c!pagecolor, + \c!numberstyle,\c!numbercolor,\c!numbercommand, + \c!pagenumber,\c!pageboundaries,\c!margin,\c!symbol, \c!limittext, - \c!titeluitlijnen,\c!voor,\c!na,\c!tussen,\v!deel\c!nummer,\c!label]% + \c!aligntitle,\c!before,\c!after,\c!inbetween,\v!part\c!number,\c!label]% \getparameters[\??li#1][#3]}}% - \addutilityreset{#1}% - \setvalue{\s!set#1}% - {\dodosetlijst{#1}}% - \setvalue{\s!reset#1}% - {\dodoresetlijst{#1}}} + \addutilityreset{#1}% + \setvalue{\s!set #1}{\dodosetlijst {#1}}% + \setvalue{\s!reset#1}{\dodoresetlijst{#1}}} -\def\definieerlijst - {\dotripleempty\dodefinieerlijst} +\def\definelist + {\dotripleempty\dodefinelist} \def\iflijstgeplaatst{\ifutilitydone} -\def\plaatslijst - {\dodoubleempty\doplaatslijst} +\def\placelist + {\dodoubleempty\doplacelist} \def\plaatsruwelijst {\dodoubleempty\doplaatsruwelijst} \def\dobeginoflist {\begingroup - \startopelkaar[\v!blanko]} + \startpacked[\v!blank]} \def\doendoflist - {\stopopelkaar + {\stoppacked \endgroup} -\def\doplaatslijst[#1][#2]% +\def\doplacelist[#1][#2]% {\dobeginoflist \plaatsruwelijst[#1][#2]% \doendoflist} @@ -296,12 +277,12 @@ \def\plaatsruwelijst[#1][#2]% {\begingroup \dogetcommalistelement1\from#1\to\firstlistelement - \dostellijstin[#1][#2]% - \doifvalue{\??li\firstlistelement\c!koppeling}\v!aan + \dosetuplist[#1][#2]% + \doifvalue{\??li\firstlistelement\c!coupling}\v!on {\startlistreferences{#1}}% \dosettoclevel\??li\firstlistelement \honorlocalfilterlevel - \doutilities{#1}\jobname{#1}\relax\par + \doutilities{listentries,#1}\jobname{#1}\relax\par \stoplistreferences{#1}% \dosetlistmode \endgroup} @@ -324,33 +305,33 @@ % \stoptypen \def\dosettoclevel#1#2% - {\ifundefined{#1#2\c!nummer}% + {\ifundefined{#1#2\c!number}% \dosetfilterlevel{\getvalue{#1#2\c!criterium}}\empty \else - \doifelsevaluenothing{#1#2\c!nummer}% + \doifelsevaluenothing{#1#2\c!number}% {\dosetfilterlevel{\getvalue{#1#2\c!criterium}}\empty} {\setsectieenkoppeling{\getvalue{#1#2\c!criterium}}% \dosetfilterlevel {\previoussection\@@sectie}% - {\getvalue{#1#2\c!nummer}}}% + {\getvalue{#1#2\c!number}}}% \fi} \def\dosetlistmode {\iflijstgeplaatst - \setsystemmode \v!lijst + \setsystemmode \v!list \else - \resetsystemmode\v!lijst + \resetsystemmode\v!list \fi} -\def\dodovolledigelijst[#1][#2][#3]% enkelvoud, meervoud, instellingen +\def\dodocompletelist[#1][#2][#3]% enkelvoud, meervoud, instellingen {\expanded{\systemsuppliedtitle[#2]{\noexpand\headtext{#2}}}% expansion needed for v! vs french ! - \doplaatslijst[#1][#3]} + \doplacelist[#1][#3]} -\def\dovolledigelijst[#1][#2]% - {\dodovolledigelijst[#1][#1][#2]} +\def\docompletelist[#1][#2]% + {\dodocompletelist[#1][#1][#2]} -\def\volledigelijst% - {\dodoubleempty\dovolledigelijst} +\def\completelist + {\dodoubleempty\docompletelist} \def\lijstelementen {} % bevat lijst met paginaovergangen \def\lijstnummercommando #1{#1} % geen strut i.v.m. intractieve versie @@ -358,7 +339,7 @@ \def\lijstpaginacommando #1{\strut#1} \def\doassigndimen#1#2#3% - {\doifinsetelse{#2}{\v!passend,\v!ruim} + {\doifinsetelse{#2}{\v!fit,\v!broad} {#1=#3\relax} {#1=#2\relax}} @@ -368,45 +349,6 @@ \def\dohandlelistnumber#1{\separatednumber{#1}} -% \let\currentlistsymbol\empty -% -% the big original one: -% -% \def\listsymbol[#1]#2% -% {{\dosetlistsymbol{#1}{#2}\currentlistsymbol}} -% -% \def\dosetlistsymbol#1#2% kan sneller, default case afvangen -% {\processaction -% [\getvalue{\??li#1\c!symbool}] -% [ \v!geen=>\def\currentlistsymbol% -% {\doassigndimen{\dimen0}{\getvalue{\??li#1\c!breedte}}{1.5em}% -% \hbox to \dimen0{}}, -% 1=>\def\currentlistsymbol% -% {\strut$\bullet$}, -% 2=>\def\currentlistsymbol% -% {\vrule\!!width1em\!!height1ex\!!depth\zeropoint}, -% 3=>\def\currentlistsymbol% very slow -% {{\doassigndimen{\dimen0}{\getvalue{\??li#1\c!breedte}}{1.5em}% -% \doassigndimen{\dimen2}{\getvalue{\??li#1\c!hoogte}}{1ex}% -% \doassigndimen{\dimen4}{\getvalue{\??li#1\c!diepte}}{0pt}% -% \vrule\!!width\dimen0\!!height\dimen2\!!depth\dimen4}}, -% \s!unknown=>\def\currentlistsymbol{\getvalue{\??li#1\c!symbool}}, -% \s!default=>\doifelsevalue{\??li#1\c!prefix}\v!nee % ook nog eerste -% {\edef\splitlistsymbol{\removefirstprefix{#2}}} -% {\doifelsevalue{\??li#1\c!prefix}\v!geen -% {\edef\splitlistsymbol{\removeallprefixes{#2}}}% -% {\def\splitlistsymbol{#2}}}% geen \edef ivm enz -% \def\currentlistsymbol% kan iets efficienter met \ifdone -% {\doifvalue{\??li#1\c!label}\v!ja{\leftlabeltext{#1}}% -% \strut -% \def\numberseparator{\getvalue{\??li#1\c!scheider}}% -% \@EA\dohandlelistnumber\@EA{\splitlistsymbol}% -% \getvalue{\??li#1\c!afsluiter}% -% \doifvalue{\??li#1\c!label}\v!ja{\rightlabeltext{#1}}}]} -% -% This may be fragile ! test for a long time ; it is a -% prelude to an definable symbol handler. - \let\currentlistsymbol\empty \def\listsymbol[#1]#2% @@ -414,13 +356,13 @@ \def\dosetlistsymbol#1% #2% {\executeifdefined - {listsymbol@\getvalue{\??li#1\c!symbool}}% + {listsymbol@\getvalue{\??li#1\c!symbol}}% \listsymbol@default {#1}} % {#2} \def\listsymbol@none#1#2% {\def\currentlistsymbol% - {\doassigndimen{\dimen0}{\getvalue{\??li#1\c!breedte}}{1.5em}% + {\doassigndimen{\dimen0}{\getvalue{\??li#1\c!width}}{1.5em}% \hbox to \dimen0{}}} \def\listsymbol@one#1#2% @@ -431,27 +373,27 @@ \def\listsymbol@three#1#2% {\def\currentlistsymbol % very slow - {{\doassigndimen{\dimen0}{\getvalue{\??li#1\c!breedte}}{1.5em}% - \doassigndimen{\dimen2}{\getvalue{\??li#1\c!hoogte}}{1ex}% - \doassigndimen{\dimen4}{\getvalue{\??li#1\c!diepte}}{0pt}% + {{\doassigndimen{\dimen0}{\getvalue{\??li#1\c!width}}{1.5em}% + \doassigndimen{\dimen2}{\getvalue{\??li#1\c!height}}{1ex}% + \doassigndimen{\dimen4}{\getvalue{\??li#1\c!depth}}{0pt}% \vrule\!!width\dimen0\!!height\dimen2\!!depth\dimen4}}} \def\listsymbol@default#1#2% - {\doifelsevalue{\??li#1\c!prefix}\v!nee % ook nog eerste + {\doifelsevalue{\??li#1\c!prefix}\v!no % ook nog eerste {\edef\splitlistsymbol{\removefirstprefix{#2}}} - {\doifelsevalue{\??li#1\c!prefix}\v!geen + {\doifelsevalue{\??li#1\c!prefix}\v!none {\edef\splitlistsymbol{\removeallprefixes{#2}}}% {\def\splitlistsymbol{#2}}}% geen \edef ivm enz \def\currentlistsymbol% kan iets efficienter met \ifdone - {\doifvalue{\??li#1\c!label}\v!ja{\leftlabeltext{#1}}% + {\doifvalue{\??li#1\c!label}\v!yes{\leftlabeltext{#1}}% \strut - \def\numberseparator{\getvalue{\??li#1\c!scheider}}% + \def\numberseparator{\getvalue{\??li#1\c!separator}}% \@EA\dohandlelistnumber\@EA{\splitlistsymbol}% - \getvalue{\??li#1\c!afsluiter}% - \doifvalue{\??li#1\c!label}\v!ja{\rightlabeltext{#1}}}} + \getvalue{\??li#1\c!stopper}% + \doifvalue{\??li#1\c!label}\v!yes{\rightlabeltext{#1}}}} \def\listsymbol@unknown#1#2% - {\def\currentlistsymbol{\getvalue{\??li#1\c!symbool}}} + {\def\currentlistsymbol{\getvalue{\??li#1\c!symbol}}} % so far for list symbols @@ -467,16 +409,16 @@ \setvalue{\@@dodolijstelement f}{\let\dosomelijstelement\dodofixdlijstelementF} \setvalue{\@@dodolijstelement g}{\let\dosomelijstelement\dodofixdlijstelementG} -\setvalue{\@@dodolijstelement\v!geen}% +\setvalue{\@@dodolijstelement\v!none}% {\def\dosomelijstelement{\dodofreevlijstelement}} -\setvalue{\@@dodolijstelement\v!vertikaal}% +\setvalue{\@@dodolijstelement\v!vertical}% {\def\dosomelijstelement{\dodofreevlijstelement}} -\setvalue{\@@dodolijstelement\v!horizontaal}% +\setvalue{\@@dodolijstelement\v!horizontal}% {\def\dosomelijstelement{\dodofreehlijstelement}} -\setvalue{\@@dodolijstelement\v!commando}% +\setvalue{\@@dodolijstelement\v!command}% {\let\dosomelijstelement\dodocommandlijstelement} % Here I learned something new: \leftskip can be changed @@ -494,17 +436,17 @@ {\doiftoclevelelse[#5]{\dodolijstelement{#1}{#2}{#3}{#4}{#5}{#6}}{}} \def\dodolijstelement#1#2#3#4#5#6% - {\getvalue{\@@dodolijstelement\getvalue{\??li#1\c!variant}}% + {\getvalue{\@@dodolijstelement\getvalue{\??li#1\c!alternative}}% %\showcomposition - \let\@@iabreedte\!!zeropoint % moet boolean worden + \let\@@iawidth\!!zeropoint % moet boolean worden \bgroup \edef\lijstelementen - {\getvalue{\??li#1\c!paginaovergangen}}% + {\getvalue{\??li#1\c!pageboundaries}}% \ExpandBothAfter\doifinset{#3}\lijstelementen {\showmessage\m!systems{14}{#3}% - \pagina}% + \page}% \egroup - \mindermeldingen + \dontcomplain \setfullsectionnumber{\??li#1}% \dosetlistsymbol{#1}{#3}% \dosomelijstelement{#1}{#2}{#3}{#4}{#5}{#6}% @@ -512,53 +454,53 @@ \def\dolistattributes#1#2#3% {\doifvaluesomething{\??li#1#3} - {\resetinteractionparameter\c!kleur - \resetinteractionparameter\c!contrastkleur}% + {\resetinteractionparameter\c!color + \resetinteractionparameter\c!contrastcolor}% \doattributes{\??li#1}{#2}{#3}} \def\dodocommandlijstelement#1#2#3#4#5#6% - {\doifdefinedelse{\??li#1\c!commando} - {\getvalue{\??li#1\c!commando}% - {#3}{#4}{\paginaprefix\??li#1[#5]\translatednumber[#5]}} - {[#1: #3 - #4 - \paginaprefix\??li#1[#5]\translatednumber[#5]]}} + {\doifdefinedelse{\??li#1\c!command} + {\getvalue{\??li#1\c!command}% + {#3}{#4}{\pageprefix\??li#1[#5]\translatednumber[#5]}} + {[#1: #3 - #4 - \pageprefix\??li#1[#5]\translatednumber[#5]]}} \def\dodofreelijstelement#1#2#3#4#5#6#7#8% {\def\makelijstelement##1##2% {\noindent % new and needed \hbox - {\doifelsevalue{\??li#1\c!interactie}{##1} % \??li ipv \??ia + {\doifelsevalue{\??li#1\c!interaction}{##1} % \??li ipv \??ia {\setbox0\hbox{\showcontrastlocation{\??li#1}{#6}{##2}}% \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\copy0}}% {##2}}}% - \getvalue{\??li#1\c!voor}% can be \hskip - \doifdefinedelse{\??li#1\c!commando} - {\makelijstelement{\getvalue{\??li#1\c!interactie}}% this forces all - {\getvalue{\??li#1\c!commando}% + \getvalue{\??li#1\c!before}% can be \hskip + \doifdefinedelse{\??li#1\c!command} + {\makelijstelement{\getvalue{\??li#1\c!interaction}}% this forces all + {\getvalue{\??li#1\c!command}% {#3}% geen conversies etc {#4}% geen conversies etc - {\paginaprefix\??li#1[#5]% + {\pageprefix\??li#1[#5]% \translatednumber[#5]}}} {#7% \vbox {\forgetall - \makelijstelement\v!alles - {\makelijstelement\v!sectienummer - {\dolistattributes{#1}\c!nummerletter\c!nummerkleur - {\getvalue{\??li#1\c!nummercommando}{\currentlistsymbol}}}% - \makelijstelement\v!tekst - {\dolistattributes{#1}\c!tekstletter\c!tekstkleur + \makelijstelement\v!all + {\makelijstelement\v!sectionnumber + {\dolistattributes{#1}\c!numberstyle\c!numbercolor + {\getvalue{\??li#1\c!numbercommand}{\currentlistsymbol}}}% + \makelijstelement\v!text + {\dolistattributes{#1}\c!textstyle\c!textcolor {\let\\=\newlineinlist \dontconvertfont - \getvalue{\??li#1\c!tekstcommando}{#4}}}% - \doifvalue{\??li#1\c!paginanummer}\v!ja + \getvalue{\??li#1\c!textcommand}{#4}}}% + \doifvalue{\??li#1\c!pagenumber}\v!yes {\doifsomething{#5} - {\makelijstelement\v!paginanummer - {\dolistattributes{#1}\c!paginaletter\c!paginakleur - {\getvalue{\??li#1\c!paginacommando} - {\paginaprefix\??li#1[#5]% + {\makelijstelement\v!pagenumber + {\dolistattributes{#1}\c!pagestyle\c!pagecolor + {\getvalue{\??li#1\c!pagecommand} + {\pageprefix\??li#1[#5]% \translatednumber[#5]}}}}}}}% #8}% - \getvalue{\??li#1\c!na}} + \getvalue{\??li#1\c!after}} \def\dodofreehlijstelement#1#2#3#4#5#6% {\dodofreelijstelement{#1}{#2}{#3}{#4}{#5}{#6} @@ -574,64 +516,64 @@ % now also in abc \def\limitatedlistentry#1#2% - {\doifelsenothing{\??li#1\c!maxbreedte} - {\getvalue{\??li#1\c!tekstcommando}{#2}} - {\getvalue{\??li#1\c!tekstcommando}% + {\doifelsenothing{\??li#1\c!maxwidth} + {\getvalue{\??li#1\c!textcommand}{#2}} + {\getvalue{\??li#1\c!textcommand}% {\limitatetext {#2}% - {\getvalue{\??li#1\c!maxbreedte}}% + {\getvalue{\??li#1\c!maxwidth}}% {\splitsymbol{\getvalue{\??li#1\c!limittext}}}}}} \def\dodofixdlijstelementABC#1#2#3#4#5#6% weeden {\endgraf - \leftskip\getvalue{\??li#1\c!marge}% na de \endgraf ! - \getvalue{\??li#1\c!voor}% - \!!widthc\getvalue{\??li#1\c!afstand}% - \doifelsevalue{\??li#1\c!breedte}\v!passend + \leftskip\getvalue{\??li#1\c!margin}% na de \endgraf ! + \getvalue{\??li#1\c!before}% + \!!widthc\getvalue{\??li#1\c!distance}% + \doifelsevalue{\??li#1\c!width}\v!fit {\!!widtha\zeropoint} {\doifelsenothing{#3} - {\doifelsevalue{\??li#1\c!titeluitlijnen}\v!ja + {\doifelsevalue{\??li#1\c!aligntitle}\v!yes {\!!widtha\zeropoint \!!widthc\zeropoint} - {\!!widtha\getvalue{\??li#1\c!breedte}}} - {\!!widtha\getvalue{\??li#1\c!breedte}}}% - \getvalue{\??li\c!variant\getvalue{\??li#1\c!variant}}% + {\!!widtha\getvalue{\??li#1\c!width}}} + {\!!widtha\getvalue{\??li#1\c!width}}}% + \getvalue{\??li\c!alternative\getvalue{\??li#1\c!alternative}}% \endgraf \def\makelijstelement##1##2% - {\doifelsevalue{\??li#1\c!interactie}{##1} + {\doifelsevalue{\??li#1\c!interaction}{##1} {\setbox0\hbox{\showcontrastlocation\??ia{#6}{##2}}% \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\copy0}}% {\hbox{##2}}}% - \doifvalue{\??li#1\c!interactie}\v!tekst % not supported - {\setlistparameter{#1}\c!interactie\v!alles}% - \makelijstelement\v!alles + \doifvalue{\??li#1\c!interaction}\v!text % not supported + {\setlistparameter{#1}\c!interaction\v!all}% + \makelijstelement\v!all {\hbox to \hsize - {\dostartattributes{\??li#1}\c!letter\c!kleur\empty + {\dostartattributes{\??li#1}\c!style\c!color\empty \!!widthb\hsize \setbox2\hbox \ifdim\!!widtha>\zeropoint to \!!widtha \fi - {\makelijstelement\v!sectienummer - {\dolistattributes{#1}\c!nummerletter\c!nummerkleur - {\getvalue{\??li#1\c!nummercommando}{\currentlistsymbol}}% + {\makelijstelement\v!sectionnumber + {\dolistattributes{#1}\c!numberstyle\c!numbercolor + {\getvalue{\??li#1\c!numbercommand}{\currentlistsymbol}}% \hfill}}% \setbox4\hbox - {\doifvalue{\??li#1\c!paginanummer}\v!ja + {\doifvalue{\??li#1\c!pagenumber}\v!yes {\doifsomething{#5} % \lijstwidth is new ; temp hack {\hbox \ifdim\lijstwidth>\zeropoint to \lijstwidth\fi {\hfill - \makelijstelement\v!paginanummer - {\dolistattributes{#1}\c!paginaletter\c!paginakleur - {\getvalue{\??li#1\c!paginacommando}% - {\paginaprefix\??li#1[#5]% + \makelijstelement\v!pagenumber + {\dolistattributes{#1}\c!pagestyle\c!pagecolor + {\getvalue{\??li#1\c!pagecommand}% + {\pageprefix\??li#1[#5]% \translatednumber[#5]}}}}}}}% \vbox {\hsize\!!widthb - \setupalign[\getvalue{\??li#1\c!uitlijnen}]% + \setupalign[\getvalue{\??li#1\c!align}]% \ifdim\!!widtha<\hsize \hangindent=\wd2 - \dimen2=\!!widthc % \getvalue{\??li#1\c!afstand}% + \dimen2=\!!widthc % \getvalue{\??li#1\c!distance}% \advance\hangindent \dimen2 \hangafter=1 - \doifvalue{\??li#1\c!hang}\v!nee{\hangafter\zerocount}% + \doifvalue{\??li#1\c!hang}\v!no{\hangafter\zerocount}% \ifdim\wd4=\zeropoint % \ifvoid4 % we kunnen gewoon afbreken aan het eind \else @@ -648,10 +590,10 @@ \box2\relax \hskip\dimen2 \bgroup - \dolistattributes{#1}\c!tekstletter\c!tekstkleur + \dolistattributes{#1}\c!textstyle\c!textcolor {\let\\=\newlineinlist \dontconvertfont - %\getvalue{\??li#1\c!tekstcommando}{#4}}% + %\getvalue{\??li#1\c!textcommand}{#4}}% \limitatedlistentry{#1}{#4}}% %\carryoverpar % new otherwise wrong linespacing \egroup @@ -667,54 +609,54 @@ \nointerlineskip % anders verkeerde spatiering bij multi-line \endgraf \allowbreak - \getvalue{\??li#1\c!na}} + \getvalue{\??li#1\c!after}} % overrulen interactie kan sneller, bv door hulpconstanten % te gebruiken en die te letten \def\dodofixdlijstelementD#1#2#3#4#5#6% - {%\leftskip=\getvalue{\??li#1\c!marge}% + {%\leftskip=\getvalue{\??li#1\c!margin}% \ifvmode - \advance\leftskip\getvalue{\??li#1\c!marge}% AANGEPAST + \advance\leftskip\getvalue{\??li#1\c!margin}% AANGEPAST \fi \bgroup \ifvmode \noindent\leavevmode % leavevmode ? ? ? \fi - \doifvalue{\??li#1\c!interactie}\v!tekst % not supported - {\setlistparameter{#1}\c!interactie\v!sectienummer}% - \doifvalue{\??li#1\c!interactie}\v!alles % not supported - {\setlistparameter{#1}\c!interactie\v!sectienummer}% + \doifvalue{\??li#1\c!interaction}\v!text % not supported + {\setlistparameter{#1}\c!interaction\v!sectionnumber}% + \doifvalue{\??li#1\c!interaction}\v!all % not supported + {\setlistparameter{#1}\c!interaction\v!sectionnumber}% \def\makelijstelement##1##2% - {\doifelsevalue{\??li#1\c!interactie}{##1} + {\doifelsevalue{\??li#1\c!interaction}{##1} {\setbox0\hbox{\showcontrastlocation\??ia{#6}{##2}}% \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\copy0}}% {\hbox{##2}}}% \setbox4=\hbox - {\doifvalue{\??li#1\c!paginanummer}\v!ja + {\doifvalue{\??li#1\c!pagenumber}\v!yes {\doifsomething{#5} - {\makelijstelement\v!paginanummer - {\dolistattributes{#1}\c!paginaletter\c!paginakleur - {\getvalue{\??li#1\c!paginacommando} - {\paginaprefix\??li#1[#5]% + {\makelijstelement\v!pagenumber + {\dolistattributes{#1}\c!pagestyle\c!pagecolor + {\getvalue{\??li#1\c!pagecommand} + {\pageprefix\??li#1[#5]% \translatednumber[#5]}}}}}}% \donetrue - \doifnothing{#3}{\doifvaluenothing{\??li#1\c!symbool}\donefalse}% + \doifnothing{#3}{\doifvaluenothing{\??li#1\c!symbol}\donefalse}% \ifdone \hbox - {\getvalue{\??li#1\c!links}% - \makelijstelement\v!sectienummer - {\dolistattributes{#1}\c!nummerletter\c!nummerkleur - {\getvalue{\??li#1\c!nummercommando}{\currentlistsymbol}}}% - \getvalue{\??li#1\c!rechts}% + {\getvalue{\??li#1\c!left}% + \makelijstelement\v!sectionnumber + {\dolistattributes{#1}\c!numberstyle\c!numbercolor + {\getvalue{\??li#1\c!numbercommand}{\currentlistsymbol}}}% + \getvalue{\??li#1\c!right}% \hskip.5em}% \nobreak \fi \tolerance3500 % niet zomaar veranderen - \dolistattributes{#1}\c!tekstletter\c!tekstkleur + \dolistattributes{#1}\c!textstyle\c!textcolor {\let\\=\newlineinlist \dontconvertfont - %\getvalue{\??li#1\c!tekstcommando}{#4}}% + %\getvalue{\??li#1\c!textcommand}{#4}}% \limitatedlistentry{#1}{#4}}% \ifvoid4\else \nobreak @@ -722,7 +664,7 @@ \nobreak \box4 \fi - \dimen0=\getvalue{\??li#1\c!afstand}\relax + \dimen0=\getvalue{\??li#1\c!distance}\relax \ifdim\dimen0<1em\relax \hskip1em\!!plus1em\!!minus.25em\relax \else @@ -732,20 +674,20 @@ \def\dodofixdlijstelementE#1% {\dodofixdlijstelementEFG - {\setupinteraction[\c!strut=\v!nee]} - {\localframed[\??li#1][\c!diepte=\!!zeropoint,\c!kleur=]} + {\setupinteraction[\c!strut=\v!no]} + {\localframed[\??li#1][\c!depth=\!!zeropoint,\c!color=]} {#1}} \def\dodofixdlijstelementF#1% {\dodofixdlijstelementEFG {} - {\dosetraggedhbox{\getvalue{\??li#1\c!uitlijnen}}\raggedbox} + {\dosetraggedhbox{\getvalue{\??li#1\c!align}}\raggedbox} {#1}} \def\dodofixdlijstelementG#1% {\dodofixdlijstelementEFG {} - \regelmidden + \midaligned {#1}} \def\dodofixdlijstelementEFG#1#2#3#4#5#6#7#8% @@ -755,18 +697,18 @@ \let\\=\newlineinlist \setbox0\hbox {#2{\showcontrastlocation\??ia{#8}% - {\dostartattributes{\??li#3}\c!letter\c!kleur\empty + {\dostartattributes{\??li#3}\c!style\c!color\empty \ignorespaces\dontconvertfont\setstrut \begstrut - %\doifelsenothing{\??li#3\c!maxbreedte} - % {\getvalue{\??li#3\c!tekstcommando}{#6}} - % {\getvalue{\??li#3\c!tekstcommando}{\limitatetext{#6}{\getvalue{\??li#3\c!maxbreedte}}{\unknown}}}% + %\doifelsenothing{\??li#3\c!maxwidth} + % {\getvalue{\??li#3\c!textcommand}{#6}} + % {\getvalue{\??li#3\c!textcommand}{\limitatetext{#6}{\getvalue{\??li#3\c!maxwidth}}{\unknown}}}% \limitatedlistentry{#3}{#6}% \endstrut % struts new \dostopattributes}}}% \linklisttoelement{#3}{#4}{#7}{#8}{\box0}}%{\copy0}}% \par % should be an option - \getvalue{\??li#3\c!tussen}} + \getvalue{\??li#3\c!inbetween}} % better: % @@ -782,22 +724,22 @@ \def\linklisttoelement#1#2#3#4#5% % list location format page data {\gotonextinternal{#1}{#2}{#4}{#5}} -\def\schrijfnaarlijst[#1]#2#3% +\def\writetolist[#1]#2#3% {\doifsomething{#1} {\convertargument#2\to\firstlistelement - \@EA\doschrijfnaarlijst\@EA{#1}{\firstlistelement}{#3}{\v!kop}}} + \@EA\dowritetolist\@EA{#1}{\firstlistelement}{#3}{\v!head}}} \def\dotussenlijst#1#2#3#4% pas op: wordt ook elders gedefinieerd {\doiftoclevelelse[#3]{#2}{}} -\def\schrijftussenlijst[#1]#2% - {\@EA\doschrijftussenlijst\@EA{#1}{#2}} % #2 weg en \expanded +\def\writebetweenlist[#1]#2% + {\@EA\dowritebetweenlist\@EA{#1}{#2}} % #2 weg en \expanded % NOG ENGELS MAKEN -\def\lijstlengte {\utilitylistlength} -\def\lijstbreedte {\utilitylistwidth} -\def\lijsthoogte {\utilitylistheight} +\def\listlength {\utilitylistlength} +\def\listwidth {\utilitylistwidth} +\def\listheight {\utilitylistheight} \def\utilitylistlength {0} \def\utilitylistwidth {0pt} @@ -808,28 +750,28 @@ {\doglobal\increment\utilitylistlength \hbox {\doattributes - {\??li#1}\c!tekstletter\c!tekstkleur + {\??li#1}\c!textstyle\c!textcolor {\let\\=\newlineinlist \dontconvertfont - \getvalue{\??li#1\c!tekstcommando}{#4}}}% + \getvalue{\??li#1\c!textcommand}{#4}}}% \global\utilitydonetrue} {}} -\def\dobepaallijstkenmerken[#1][#2]% +\def\dodeterminelistcharacteristics[#1][#2]% {\begingroup \doglobal\newcounter\utilitylistlength \let\dolijstelement\dolijstelementX - \dostellijstin[#1][#2]% + \dosetuplist[#1][#2]% \dogetcommalistelement1\from#1\to\commalistelement \dosettoclevel\??li\commalistelement - \setbox0\vbox{\doutilities{#1}\jobname{#1}\relax\par}% + \setbox0\vbox{\doutilities{listentries,#1}\jobname{#1}\relax\par}% \xdef\utilitylistheight{\the\ht0}% \xdef\utilitylistwidth {\the\wd0}% \endgroup \dosetlistmode} -\def\bepaallijstkenmerken - {\dodoubleempty\dobepaallijstkenmerken} +\def\determinelistcharacteristics + {\dodoubleempty\dodeterminelistcharacteristics} % \definieerreferentielijst % [externalfigure] @@ -873,41 +815,41 @@ \def\referentiebutton#1[#2]% {\hbox\bgroup % the \hbox is needed to bypass - \let\referenceprefix=\empty % \dontleavehmode in \naarbox - \setupinteraction[\c!kleur=,\c!contrastkleur=,\c!strut=]% + \let\referenceprefix=\empty % \dontleavehmode in \gotobox + \setupinteraction[\c!color=,\c!contrastcolor=,\c!strut=]% \setupreferencing[\c!prefix=]% - \naarbox{\hbox{\ignorespaces#1}}[#2]% + \gotobox{\hbox{\ignorespaces#1}}[#2]% \egroup} \newcounter\referencecounter \def\doreferentielijstelement#1#2#3#4#5% {\doiftoclevelelse[#4] - {\getvalue{\??rl#1\c!voor}% + {\getvalue{\??rl#1\c!before}% \referentiebutton - {\getvalue{\??rl#1\c!commando}{#3}\pagereference[\r!to#2]}% + {\getvalue{\??rl#1\c!command}{#3}\pagereference[\r!to#2]}% [\r!from#2]% \global\utilitydonetrue - \getvalue{\??rl#1\c!na}} + \getvalue{\??rl#1\c!after}} {}} \def\doplaatsreferentielijst[#1][#2]% {\begingroup % \let\doschrijfnaarreferentielijst=\gobblethreearguments - \stelreferentielijstin[#1][#2,\c!status=\v!stop]% + \setupreferencelist[#1][#2,\c!state=\v!stop]% \dogetcommalistelement1\from#1\to\commalistelement \dosettoclevel\??rl\commalistelement - \doutilities{#1}\jobname{#1}\relax\par + \doutilities{listentries,#1}\jobname{#1}\relax\par \endgroup} \def\plaatsreferentielijst% {\dodoubleempty\doplaatsreferentielijst} -\def\doschrijfnaarreferentielijst#1#2#3% - {\doifvalue{\??rl#1\c!status}\v!start +\def\dowritetoreferencelist#1#2#3% + {\doifvalue{\??rl#1\c!state}\v!start {\begingroup \makesectionformat - \doifelse{\@@nmstatus}\v!start + \doifelse{\@@nmstate}\v!start {\def\dopaginanummer{\noexpand\pagenumber}} {\def\dopaginanummer{0}}% \edef\schrijfwegnaarlijst% @@ -921,127 +863,117 @@ \schrijfwegnaarlijst \endgroup}} -%\def\schrijfnaarreferentielijst[#1]#2#3% #1=class #2=data #3=visualization -% {\doifelsevalue{\??rl#1\c!status}{\v!start} -% {\doglobal\increment\referencecounter -% \referentiebutton -% {#3% -% \pagereference[\r!from\referencecounter]% -% \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}% -% [\r!to\referencecounter]} -% {#3}} - -\def\schrijfnaarreferentielijst[#1]#2% #1=class #2=data #3=visualization +\def\writetoreferencelist[#1]#2% #1=class #2=data #3=visualization {\dowithnextbox - {\doifelsevalue{\??rl#1\c!status}\v!start + {\doifelsevalue{\??rl#1\c!state}\v!start {\doglobal\increment\referencecounter % must be resolved due to #2 \referentiebutton {\flushnextbox \pagereference[\r!from\referencecounter]% - \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}% + \dowritetoreferencelist{#1}{\referencecounter}{#2}}% [\r!to\referencecounter]} {\flushnextbox}} \hbox} % \vbox ? \def\referencelistentry#1% - {\executeifdefined{#1\c!lijst}\gobblefourarguments} + {\executeifdefined{#1\c!list}\gobblefourarguments} \def\dodosetreferentielijst#1% - {\setvalue{#1\c!lijst}{\doreferentielijstelement{#1}}} + {\setvalue{#1\c!list}{\doreferentielijstelement{#1}}} \def\dodoresetreferentielijst#1% - {\setvalue{#1\c!lijst}{\gobblefourarguments}} - -\def\dodefinieerreferentielijst[#1][#2]% - {\stelreferentielijstin[#1] - [\c!commando=, - \c!status=\v!start, - \c!criterium=\v!alles, - \c!voor=, - \c!na=, + {\setvalue{#1\c!list}{\gobblefourarguments}} + +\def\dodefinereferencelist[#1][#2]% + {\setupreferencelist[#1] + [\c!command=, + \c!state=\v!start, + \c!criterium=\v!all, + \c!before=, + \c!after=, #2]% \setcounter{#1}{0}% \addutilityreset{#1}% \setvalue{\s!set #1}{\dodosetreferentielijst {#1}}% \setvalue{\s!reset#1}{\dodoresetreferentielijst{#1}}} -\def\definieerreferentielijst% - {\dodoubleempty\dodefinieerreferentielijst} +\def\definereferencelist% + {\dodoubleempty\dodefinereferencelist} -\def\dostelreferentielijstin[#1][#2]% +\def\dosetupreferencelist[#1][#2]% {\getparameters[\??rl#1][#2]} -\def\stelreferentielijstin% - {\dodoubleempty\dostelreferentielijstin} +\def\setupreferencelist% + {\dodoubleempty\dosetupreferencelist} -\def\dostelsamengesteldelijstin[#1][#2]% +\def\dosetupcombinedlist[#1][#2]% {\getparameters[\??ih#1][#2]% - \expanded{\stellijstin[\getvalue{\??ih#1\c!lijst}]}[#2]} + \expanded{\setuplist[\getvalue{\??ih#1\c!list}]}[#2]} -\def\stelsamengesteldelijstin% - {\dodoubleargument\dostelsamengesteldelijstin} +\def\setupcombinedlist% + {\dodoubleargument\dosetupcombinedlist} -\def\doplaatssamengesteldelijst[#1][#2]% +\def\doplacecombinedlist[#1][#2]% {\begingroup \getparameters[\??ih#1][#2]% \dosettoclevel\??ih{#1}% - \edef\samengesteldelijst{\getvalue{\??ih#1\c!lijst}}% + \edef\samengesteldelijst{\getvalue{\??ih#1\c!list}}% %\stripspaces\from\samengesteldelijst\to\samengesteldelijst - \doifelsevalue{\??ih#1\c!niveau}\v!huidige % criterium=vorige,niveau=huidige - {\!!counta=0\@@koniveau} % hm: \@@koniveau - {\fullexpandoneargafter\doifnumberelse{\getvalue{\??ih#1\c!niveau}}% in verband - {\!!counta\getvalue{\??ih#1\c!niveau}% met de vorige implementatie + \doifelsevalue{\??ih#1\c!level}\v!current % criterium=vorige,niveau=huidige + {\!!counta=0\@@kolevel} % hm: \@@kolevel + {\fullexpandoneargafter\doifnumberelse{\getvalue{\??ih#1\c!level}}% in verband + {\!!counta\getvalue{\??ih#1\c!level}% met de vorige implementatie \advance\!!counta \plusone % accepteren we ook nummers (0==deel) \getfromcommacommand[\samengesteldelijst][\!!counta]% \edef\maximumlijst{\commalistelement}}% - {\edef\maximumlijst{\getvalue{\??ih#1\c!niveau}}}% - \!!counta\getvalue{\??se\getvalue{\??ko\maximumlijst\c!sectie}\c!niveau}}% + {\edef\maximumlijst{\getvalue{\??ih#1\c!level}}}% + \!!counta\getvalue{\??se\getvalue{\??ko\maximumlijst\c!section}\c!level}}% \let\!!stringa\samengesteldelijst \let\samengesteldelijst\empty \def\docommando##1% - {\ifnum\getvalue{\??se\getvalue{\??ko##1\c!sectie}\c!niveau}>\!!counta + {\ifnum\getvalue{\??se\getvalue{\??ko##1\c!section}\c!level}>\!!counta \else \addtocommalist{##1}\samengesteldelijst \fi}% \processcommacommand[\!!stringa]\docommando - \doifvalue{\??ih#1\c!koppeling}\v!aan + \doifvalue{\??ih#1\c!coupling}\v!on {\startlistreferences{#1}}% - \ExpandFirstAfter\dodoplaatssamengesteldelijst[\samengesteldelijst][#2]% + \ExpandFirstAfter\dodoplacecombinedlist[\samengesteldelijst][#2]% \stoplistreferences{#1}% \endgroup \dosetlistmode} -\def\dodoplaatssamengesteldelijst[#1][#2]% +\def\dodoplacecombinedlist[#1][#2]% {\dobeginoflist - \dostellijstin[#1][#2]% - \doutilities{#1}\jobname{#1}\relax\par + \dosetuplist[#1][#2]% + \doutilities{listentries,#1}\jobname{#1}\relax\par \doendoflist} \def\dovolledigesamengesteldelijst[#1][#2]% {\expanded{\systemsuppliedtitle[#1]{\noexpand\headtext{#1}}}% expansion due to v! vs french ! - \doplaatssamengesteldelijst[#1][#2]} + \doplacecombinedlist[#1][#2]} -\def\dodefinieersamengesteldelijst[#1][#2][#3]% +\def\dodefinecombinedlist[#1][#2][#3]% {\makerawcommalist[#2]\samengesteldelijst % for fast processing - \letvalue{\??ih#1\c!lijst}\samengesteldelijst + \letvalue{\??ih#1\c!list}\samengesteldelijst \getcommalistsize[#2]% \getfromcommalist[#2][\commalistsize]% - \doeassign[\??ih#1][\c!niveau=\commalistelement]% + \doeassign[\??ih#1][\c!level=\commalistelement]% \getparameters [\??ih#1] - [\c!criterium=\v!lokaal,#3]% - \setvalue{\e!stel#1\e!in}% - {\dodoubleempty\dostelsamengesteldelijstin[#1]}% - \setvalue{\e!plaats#1}% - {\dodoubleempty\doplaatssamengesteldelijst[#1]}% - \setvalue{\e!volledige#1}% + [\c!criterium=\v!local,#3]% + \setvalue{\e!setup#1\e!endsetup}% + {\dodoubleempty\dosetupcombinedlist[#1]}% + \setvalue{\e!place#1}% + {\dodoubleempty\doplacecombinedlist[#1]}% + \setvalue{\e!complete#1}% {\dodoubleempty\dovolledigesamengesteldelijst[#1]}} -\def\definieersamengesteldelijst% - {\dotripleempty\dodefinieersamengesteldelijst} +\def\definecombinedlist% + {\dotripleempty\dodefinecombinedlist} -\def\plaatssamengesteldelijst% - {\dodoubleempty\doplaatssamengesteldelijst} +\def\placecombinedlist% + {\dodoubleempty\doplacecombinedlist} % new and yet undocumented (used in cocoa qa) % @@ -1064,15 +996,15 @@ \xdef\listlengthcounter{0}} \setupremaininglistlength - [\c!links=\hss,\c!rechts=,\c!nummer=\v!ja, - \c!voor=\blanko,\c!na=\pagina, - \c!letter=\v!kleinnormaal,\c!kleur=] + [\c!left=\hss,\c!right=,\c!number=\v!yes, + \c!before=\blank,\c!after=\page, + \c!style=\v!smallnormal,\c!color=] \def\resetremaininglistlength {\dodoubleempty\doresetremaininglistlength} \def\doresetremaininglistlength[#1][#2]% - {\bepaallijstkenmerken[#1][#2]% \determinelistcharacteristics[#1][#2]% + {\determinelistcharacteristics[#1][#2]% \determinelistcharacteristics[#1][#2]% \xdef\listlengthcounter{\number\utilitylistlength}} \def\showremaininglistlength @@ -1080,21 +1012,21 @@ \ifnum\listlengthcounter>\plusone \scratchdimen\pagetotal \setbox\scratchbox\vbox - {\@@llvoor\par\horizontalstrut\par\horizontalstrut\par\@@llna}% + {\@@llbefore\par\horizontalstrut\par\horizontalstrut\par\@@llafter}% \advance\scratchdimen \ht\scratchbox \advance\scratchdimen \dp\scratchbox \ifdim\scratchdimen>\pagegoal - \@@llvoor + \@@llbefore \nobreak\hbox to \hsize - {\doifnot\@@llnummer\v!ja{\let\listlengthcounter\empty}% - \doattributes\??ll\c!letter\c!kleur{\@@lllinks\listlengthcounter\@@llrechts}} - \@@llna + {\doifnot\@@llnumber\v!yes{\let\listlengthcounter\empty}% + \doattributes\??ll\c!style\c!color{\@@llleft\listlengthcounter\@@llright}} + \@@llafter \fi \fi \doglobal\decrement\listlengthcounter\relax \egroup} -\stelreferentielijstin - [\c!letter=\v!normaal] +\setupreferencelist + [\c!style=\v!normal] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-ltb.tex b/tex/context/base/core-ltb.tex index b5521cfad..ba0ba862d 100644 --- a/tex/context/base/core-ltb.tex +++ b/tex/context/base/core-ltb.tex @@ -61,8 +61,8 @@ \unprotect -\chardef\linetablesplitstatus\zerocount -\chardef\linetableheadstatus \zerocount +\chardef\linetablesplitstate\zerocount +\chardef\linetableheadstate \zerocount \edef\??ler{\??le:r:} \edef\??lec{\??le:c:} @@ -107,23 +107,23 @@ \setuplinetable [\c!n=\!!maxcard, - \c!regels=\!!maxcard, + \c!lines=\!!maxcard, \c!nx=\plusone, - \c!nlinks=0, - \c!herhaal=\v!ja, % when \c!nlinks>0, repeat on both pages - \c!voor=, - \c!na=, - \c!tussen=\pagina, - \c!afstand=\zeropoint, - \c!rek=\v!nee, - \c!uitlijnen=\c!rechts, - \c!linkeroffset=.25ex, - \c!rechteroffset=\linetableparameter\c!linkeroffset, - \c!maxbreedte=\zeropoint, - \c!breedte=5em, - \c!hoogte=\v!passend, % \v!regel = faster - \c!achtergrond=, - \c!achtergrondkleur=] + \c!nleft=0, + \c!repeat=\v!yes, % when \c!nleft>0, repeat on both pages + \c!before=, + \c!after=, + \c!inbetween=\page, + \c!distance=\zeropoint, + \c!stretch=\v!no, + \c!align=\c!right, + \c!leftoffset=.25ex, + \c!rightoffset=\linetableparameter\c!leftoffset, + \c!maxwidth=\zeropoint, + \c!width=5em, + \c!height=\v!fit, % \v!line = faster + \c!background=, + \c!backgroundcolor=] \def\linetableparameter#1% {\csname\??le#1\endcsname} @@ -147,8 +147,8 @@ \def\linetablerparameter#1% faster, leaner and meaner {\csname \ifnum\linetablerow=\zerocount % geen ifcase - \ifcsname\??ler\v!hoofd#1\endcsname - \??ler\v!hoofd#1% + \ifcsname\??ler\v!header#1\endcsname + \??ler\v!header#1% \else\ifcsname\??ler0#1\endcsname \??ler0#1% \else @@ -166,13 +166,13 @@ \endcsname} \def\setnoftableslines - {\doifelse{\linetableparameter\c!regels}\v!passend + {\doifelse{\linetableparameter\c!lines}\v!fit {% nearly the same as core-tab, so same bugs \ifdim\pagegoal<\maxdimen \scratchdimen\pagegoal \advance\scratchdimen -\pagetotal \else - \scratchdimen\teksthoogte + \scratchdimen\textheight \fi \advance\scratchdimen -\strutdp \ifdim\prevdepth<\maxdimen\ifdim\prevdepth>\zeropoint @@ -181,7 +181,7 @@ \fi\fi \getrawnoflines\scratchdimen \xdef\noflinetablelines{\the\noflines}} - {\xdef\noflinetablelines{\linetableparameter\c!regels}}} + {\xdef\noflinetablelines{\linetableparameter\c!lines}}} \def\startlinetablecell {\dosingleempty\dostartlinetablecell} @@ -193,17 +193,17 @@ \fi \xdef\linetablestep{\linetablecparameter\c!nx}% \ifcase\linetablestep\or - \scratchdimen\linetablecparameter\c!breedte - \scratchskip \linetablecparameter\c!afstand + \scratchdimen\linetablecparameter\c!width + \scratchskip \linetablecparameter\c!distance \else \scratchdimen \zeropoint \scratchskip \zeropoint \scratchcounter\linetablecolumn \dorecurse\linetablestep - {\advance\scratchdimen\linetablecparameter\c!breedte - %\advance\scratchskip \linetablecparameter\c!afstand + {\advance\scratchdimen\linetablecparameter\c!width + %\advance\scratchskip \linetablecparameter\c!distance \global\advance \linetablecolumn\plusone - \advance\scratchskip \linetablecparameter\c!afstand + \advance\scratchskip \linetablecparameter\c!distance }% \global\linetablecolumn\scratchcounter \fi @@ -227,25 +227,25 @@ \setbox\scratchbox\hbox \bgroup \dontcomplain - \hskip\linetablecparameter\c!linkeroffset\relax + \hskip\linetablecparameter\c!leftoffset\relax % 0 = width, unknown height % 1 = width, fixed height % 2 = no width, auto hsize \ifnum\linetablemode<\plustwo - \advance\scratchdimen-\linetablecparameter\c!linkeroffset - \advance\scratchdimen-\linetablecparameter\c!rechteroffset + \advance\scratchdimen-\linetablecparameter\c!leftoffset + \advance\scratchdimen-\linetablecparameter\c!rightoffset \fi \ifcase\linetablemode - \dosetraggedcommand{\linetablecparameter\c!uitlijnen}% + \dosetraggedcommand{\linetablecparameter\c!align}% \vtop \ifdim\linetableheight>\zeropoint to\linetableheight \fi \bgroup \hsize\scratchdimen \raggedcommand \else - \setalignmentswitch{\linetablecparameter\c!uitlijnen}% + \setalignmentswitch{\linetablecparameter\c!align}% \hbox \ifcase\linetablemode \or to\scratchdimen \fi \bgroup \ifcase\alignmentswitch\hss\or\hss\fi \fi - \dostartattributes{\??lec\number\linetablecolumn}\c!letter\c!kleur\empty + \dostartattributes{\??lec\number\linetablecolumn}\c!style\c!color\empty \begstrut \ignorespaces} \def\stoplinetablecell @@ -257,13 +257,13 @@ \ifcase\alignmentswitch\else\hss\fi \fi \egroup - \hskip\linetablecparameter\c!rechteroffset + \hskip\linetablecparameter\c!rightoffset \egroup \iflinetablepreroll \box\scratchbox \else - \doif{\linetablecparameter\c!achtergrond}\v!kleur - {\backgroundline[\linetablecparameter\c!achtergrondkleur]}% + \doif{\linetablecparameter\c!background}\v!color + {\backgroundline[\linetablecparameter\c!backgroundcolor]}% {\box\scratchbox}% \fi \egroup} @@ -275,11 +275,11 @@ \else \vbox {\ifvoid\tablebox\linetablepart\else\unvbox\tablebox\linetablepart\fi - \doif{\linetablerparameter\c!achtergrond}\v!kleur - {\backgroundline[\linetablerparameter\c!achtergrondkleur]}% + \doif{\linetablerparameter\c!background}\v!color + {\backgroundline[\linetablerparameter\c!backgroundcolor]}% {\box\scratchbox}% is also arg to \backgroundline \endgraf - \linetablerparameter\c!na}% + \linetablerparameter\c!after}% \fi} \def\flushlinetableparts @@ -290,7 +290,7 @@ \iflinetablepreroll % forget about them \else - \doifelse{\linetableparameter\c!regels}\v!passend + \doifelse{\linetableparameter\c!lines}\v!fit {\scratchdimen\pagetotal}% {\scratchdimen\zeropoint}% \dorecurse\noflinetableparts @@ -308,14 +308,14 @@ \dp\tablebox\linetablepart\strutdepth \hbox to \hsize{\box\tablebox\linetablepart\hss}% \ifnum\linetablepart<\noflinetableparts\relax - \linetableparameter\c!tussen + \linetableparameter\c!inbetween \fi}% \ifnum\linetablerows<\noflinetablerows\relax - \linetableparameter\c!tussen + \linetableparameter\c!inbetween \else % after, later \fi - \chardef\linetableheadstatus\plusthree + \chardef\linetableheadstate\plusthree \global\setbox\tablebox\zerocount\emptybox % here \fi % reset \linetablerow will be an option, currently @@ -350,8 +350,8 @@ \def\startlinetablepart {\global\linetablesubcol\zerocount \setbox\scratchbox\hbox\bgroup - \doconvertfont{\linetablerparameter\c!letter}% - \startcolor[\linetablerparameter\c!kleur]% + \doconvertfont{\linetablerparameter\c!style}% + \startcolor[\linetablerparameter\c!color]% \ignorespaces} \def\stoplinetablepart @@ -365,7 +365,7 @@ % we're collecting the repeater \else \scratchdimen\hsize \advance\scratchdimen-\wd\scratchbox\relax - \ifdim\scratchdimen>\linetableparameter\c!rek\else + \ifdim\scratchdimen>\linetableparameter\c!stretch\else \setbox\scratchbox\hbox to \hsize{\unhbox\scratchbox}% \fi \fi @@ -378,7 +378,7 @@ \relax %\message{\the\linetablecolumn,\the\linetablesubcol}\wait % from now on the column counter is already incremented - \ifcase\linetablesplitstatus + \ifcase\linetablesplitstate \iflinetablepreroll \else \box\linetablecell % the columncounter is one ahead ! @@ -478,22 +478,22 @@ {\bgroup \inlinetabletrue % autowidth - \doif{\linetableparameter\c!maxbreedte}\v!passend - {\setuplinetable[\c!maxbreedte=\zeropoint]}% + \doif{\linetableparameter\c!maxwidth}\v!fit + {\setuplinetable[\c!maxwidth=\zeropoint]}% \processaction - [\linetableparameter\c!rek] - [\v!nee=>{\setuplinetable[\c!rek=\maxdimen]},% no stretch - \v!ja=>{\setuplinetable[\c!rek=\zeropoint]}]% max stretch - \chardef\linetablerepeat\linetableparameter\c!nlinks - \chardef\linetablesplitstatus % = - \ifdim\linetableparameter\c!maxbreedte>\zeropoint + [\linetableparameter\c!stretch] + [\v!no=>{\setuplinetable[\c!stretch=\maxdimen]},% no stretch + \v!yes=>{\setuplinetable[\c!stretch=\zeropoint]}]% max stretch + \chardef\linetablerepeat\linetableparameter\c!nleft + \chardef\linetablesplitstate % = + \ifdim\linetableparameter\c!maxwidth>\zeropoint \zerocount \else \plusone \fi % optional prevdepth correction \iflinetablepreroll \globallet\noflinetablerows\!!zerocount \else - \linetableparameter\c!voor + \linetableparameter\c!before \fi \globallet\linetablerows\!!zerocount \globallet\noflinetablecolumns\!!zerocount @@ -530,10 +530,10 @@ \def\stoplinetablerun {\globallet\linetableline\!!maxcard - \chardef\linetableheadstatus\zerocount % blocked + \chardef\linetableheadstate\zerocount % blocked \flushlinetableparts \iflinetablepreroll \else - \linetableparameter\c!na + \linetableparameter\c!after \fi \globallet\linetablepart \!!zerocount \globallet\noflinetableparts\!!zerocount @@ -579,19 +579,19 @@ {\dosingleempty\dolinetableBR} \def\dolinetableBR[#1]% #1 not yet implemented - {\ifnum\linetableheadstatus=1\else + {\ifnum\linetableheadstate=1\else \doglobal\increment\linetablerow \doglobal\increment\linetablerows \fi \global\linetablecolumn\plusone \global\linetablesubcol\plusone -% \linetableheight\linetablerparameter\c!hoogte +% \linetableheight\linetablerparameter\c!height % % \ifx\linetableheight\empty % % nothing -% \else\ifx\linetableheight\v!passend +% \else\ifx\linetableheight\v!fit % % keep it simple -% \else\ifx\linetableheight\v!regel +% \else\ifx\linetableheight\v!line % \chardef\linetablemode\plusone % \else % \!!heighta\linetableheight @@ -599,12 +599,12 @@ % \fi\fi\fi % \linetableheight\zeropoint - \edef\!!stringa{\linetablerparameter\c!hoogte}% + \edef\!!stringa{\linetablerparameter\c!height}% \ifx\!!stringa\empty \chardef\linetablehmode\zerocount - \else\ifx\!!stringa\v!passend + \else\ifx\!!stringa\v!fit \chardef\linetablehmode\plusone - \else\ifx\!!stringa\v!regel + \else\ifx\!!stringa\v!line \chardef\linetablehmode\plustwo \else \linetableheight\!!stringa @@ -646,12 +646,12 @@ \def\checklinetablepage {\global\chardef\linetablepage\zerocount \ifcase\linetablerepeat \else \ifcase\linetablepage - \doif{\linetableparameter\c!herhaal}\v!nee + \doif{\linetableparameter\c!repeat}\v!no {\global\chardef\linetablepage\doifoddpageelse\plusone\plustwo}% \fi \fi} \def\flushlinetablehead - {\ifcase\linetableheadstatus + {\ifcase\linetableheadstate % 0 blocked \or % 1 doing head @@ -659,9 +659,9 @@ % 2 head done \or % 3 trigger flush - \chardef\linetableheadstatus\plusone + \chardef\linetableheadstate\plusone \the\@@linetablehead\relax - \chardef\linetableheadstatus\plustwo + \chardef\linetableheadstate\plustwo \fi} \def\linetableNC % first time special treatment @@ -695,7 +695,7 @@ \globallet\noflinetablerows\linetablerows \dorecurse\noflinetablecolumns % global, from last run {\linetableparameter\c!n} {%\writestatus{linetable}{\recurselevel->\getvalue{\??lew\recurselevel}}% - \setevalue{\??lec\recurselevel\c!breedte}{\getvalue{\??lew\recurselevel}}% + \setevalue{\??lec\recurselevel\c!width}{\getvalue{\??lew\recurselevel}}% \letgvalue{\??lew\recurselevel}\!!zeropoint}} % init next table % todo: store in box instead of macro @@ -706,7 +706,7 @@ {\ifinlinetable \@@linetablehead\emptytoks \fi - \chardef\linetableheadstatus3 % full + \chardef\linetableheadstate3 % full \@@linetablehead{#1}% \ifinlinetable \flushlinetablehead @@ -785,4 +785,4 @@ {\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR} \stoplinetable -\stoptext \ No newline at end of file +\stoptext diff --git a/tex/context/base/core-mak.tex b/tex/context/base/core-mak.tex index 0d41bd8f5..68315ea57 100644 --- a/tex/context/base/core-mak.tex +++ b/tex/context/base/core-mak.tex @@ -25,16 +25,16 @@ \def\dodefineplacement[#1][#2]% {\getparameters [\??pl#1] - [\c!links=\hss, - \c!rechts=\hss, - \c!regelcorrectie=\v!uit, - \c!dieptecorrectie=\v!uit, - \c!marge=\v!standaard, - \c!grid=\v!midden, - %\c!voor=, - %\c!na=, + [\c!left=\hss, + \c!right=\hss, + \c!linecorrection=\v!off, + \c!depthcorrection=\v!off, + \c!margin=\v!standard, + \c!grid=\v!middle, + %\c!before=, + %\c!after=, #2]% - \setvalue{\e!plaats#1}{\doplacement[\??pl#1]}} + \setvalue{\e!place#1}{\doplacement[\??pl#1]}} \def\defineplacement {\dodoubleempty\dodefineplacement} @@ -72,31 +72,31 @@ {\forgetall} {\setlocalhsize \getparameters[#1][#2]% - \getvalue{#1\c!voor}% + \getvalue{#1\c!before}% \begingroup \positioningparfalse \setbox\nextbox\hbox to \localhsize - {\getvalue{#1\c!links}% + {\getvalue{#1\c!left}% \flushnextbox - \getvalue{#1\c!rechts}}% + \getvalue{#1\c!right}}% \ifinsidefloat \else \addlocalbackgroundtobox\nextbox \fi \ifgridsnapping - \doifundefined{#1\c!grid}{\letvalue{#1\c!grid}\v!midden}% + \doifundefined{#1\c!grid}{\letvalue{#1\c!grid}\v!middle}% % unchecked - \doifinset{\getvalue{#1\c!marge}}{\v!standaard,\v!ja}\noindent + \doifinset{\getvalue{#1\c!margin}}{\v!standard,\v!yes}\noindent \snaptogrid[\getvalue{#1\c!grid}]\hbox{\flushnextbox}% \else - \doifvalue{#1\c!regelcorrectie}\v!aan \startbaselinecorrection - \doifinset{\getvalue{#1\c!marge}}{\v!standaard,\v!ja}\noindent + \doifvalue{#1\c!linecorrection}\v!on \startbaselinecorrection + \doifinset{\getvalue{#1\c!margin}}{\v!standard,\v!yes}\noindent \flushnextbox - \doifvalue{#1\c!dieptecorrectie}\v!aan\baselinecorrection - \doifvalue{#1\c!regelcorrectie }\v!aan\stopbaselinecorrection + \doifvalue{#1\c!depthcorrection}\v!on\baselinecorrection + \doifvalue{#1\c!linecorrection }\v!on\stopbaselinecorrection \fi \endgroup - \getvalue{#1\c!na}% + \getvalue{#1\c!after}% \egroup} \vbox} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-mar.tex b/tex/context/base/core-mar.tex index 55aaf660e..cdc09838e 100644 --- a/tex/context/base/core-mar.tex +++ b/tex/context/base/core-mar.tex @@ -22,41 +22,41 @@ % % \fetchmark[naam][plaats] -% nog expansie in hoofdmarkering +% nog expansie in mainmarking % ook nog reset koppelen aan sectie -%\def\hoofdmarkering#1% +%\def\mainmarking#1% % {\csname\??mk#1\c!koppeling\endcsname} % %\def\fastresetmarker#1% -% {\doifdefined{\??mk\hoofdmarkering{#1}} -% {\expandafter\resetmark\csname\??mk\hoofdmarkering{#1}\endcsname}} +% {\doifdefined{\??mk\maimarking{#1}} +% {\expandafter\resetmark\csname\??mk\mainmarking{#1}\endcsname}} \beginTEX -\def\hoofdmarkering#1% - {\@EA\ifx\csname\??mk#1\c!koppeling\endcsname\else - \csname\??mk#1\c!koppeling\endcsname +\def\mainmarking#1% + {\@EA\ifx\csname\??mk#1\c!coupling\endcsname\else + \csname\??mk#1\c!coupling\endcsname \fi} \def\fastresetmarker#1% - {\@EA\ifx\csname\??mk#1\c!koppeling\endcsname\else - \@EA\resetmark\csname\??mk\csname\??mk#1\c!koppeling\endcsname\endcsname + {\@EA\ifx\csname\??mk#1\c!coupling\endcsname\else + \@EA\resetmark\csname\??mk\csname\??mk#1\c!coupling\endcsname\endcsname \fi} \endTEX \beginETEX \ifcsname -\def\hoofdmarkering#1% - {\ifcsname\??mk#1\c!koppeling\endcsname - \csname\??mk#1\c!koppeling\endcsname +\def\mainmarking#1% + {\ifcsname\??mk#1\c!coupling\endcsname + \csname\??mk#1\c!coupling\endcsname \fi} \def\fastresetmarker#1% - {\ifcsname\??mk#1\c!koppeling\endcsname - \@EA\resetmark\csname\??mk\csname\??mk#1\c!koppeling\endcsname\endcsname + {\ifcsname\??mk#1\c!coupling\endcsname + \@EA\resetmark\csname\??mk\csname\??mk#1\c!coupling\endcsname\endcsname \fi} \endETEX @@ -64,57 +64,89 @@ \def\fastresetmarkerlist[#1]% {\expanded{\rawprocesscommalist[#1]}\fastresetmarker} -\def\doresetmarkering[#1]% +\def\doresetmarking[#1]% {\processcommalist[#1]\fastresetmarker} -\def\resetmarkering - {\dosingleargument\doresetmarkering} +\def\resetmarking + {\dosingleargument\doresetmarking} -\def\dostelmarkeringin[#1][#2]% +\def\dosetupmarking[#1][#2]% {\def\docommando##1{\getparameters[\??mk##1][#2]}% \processcommalist[#1]\docommando} -\def\stelmarkeringin - {\dodoubleargument\dostelmarkeringin} +\def\setupmarking + {\dodoubleargument\dosetupmarking} % betere protectie -\letvalue{\??mk\??mk \v!vorige}\gettopmark -\letvalue{\??mk\??mk \v!eerste}\getfirstmark -\letvalue{\??mk\??mk\v!laatste}\getbotmark -\letvalue{\??mk\??mk\v!huidige}\getcurrentmark +\letvalue{\??mk\??mk\v!previous}\gettopmark +\letvalue{\??mk\??mk\v!first }\getfirstmark +\letvalue{\??mk\??mk\v!last }\getbotmark +\letvalue{\??mk\??mk\v!current }\getcurrentmark -\def\dododefinieermarkering[#1][#2]% - {\stelmarkeringin[#1] - [\c!expansie=\v!nee, % saves a macro - \c!scheider={ --- }, % watch the spaces +% todo: make it work in balancing +% +% \definemarking[vers][] +% \setupheadertexts +% [\doiftext{\getmarking[vers][first]} +% {\doiftextelse{\getmarking[vers][column:last]} +% {\getmarking[vers][first] -- \getmarking[vers][column:last]} +% {\getmarking[vers][first]}}] +% \starttext +% \startcolumns[n=2,balance=no] +% \dorecurse{10}{\expanded{\marking[vers]{\recurselevel}} \recurselevel:\dorecurse{4}{\input ward } \endgraf} +% \stopcolumns +% \stoptext + +\letvalue{\??mk\??mk\v!column:\v!first}\getsplitfirstmark +\letvalue{\??mk\??mk\v!column:\v!last }\getsplitbottommark + +\ifx\decouplemarking\undefined \def\decouplemarking[#1]{} \fi + +\def\dododefinemarking[#1][#2]% + {\getparameters[\??mk#1] + [\c!expansion=\v!no, % saves a macro + \c!separator={ --- }, % watch the spaces \c!limittext=\@@kolimittext, - \c!status=\v!start]% - \ontkoppelmarkering[#1]% % no coupling with sections - \setevalue{\??mk#1\c!koppeling}{#2}% + \c!state=\v!start]% + \decouplemarking[#1]% % no coupling with sections + \setevalue{\??mk#1\c!coupling}{#2}% \expandafter\newmark\csname\??mk#2\endcsname \showmessage\m!systems{13}{#1,[#2]}} -\def\dodefinieermarkering[#1][#2]% +\def\dodefinemarking[#1][#2]% {\doifelsenothing{#2} - {\dododefinieermarkering[#1][#1]} - {\dododefinieermarkering[#1][#2]}} + {\dododefinemarking[#1][#1]} + {\dododefinemarking[#1][#2]}} + +\def\definemarking + {\dodoubleempty\dodefinemarking} + +\def\definerawmarking[#1]% global ! ! ! ! + {\getgparameters[\??mk#1] + [\c!expansion=\v!no, % saves a macro + \c!separator={ --- }, % watch the spaces + \c!limittext=, + \c!state=\v!start]% + \setxvalue{\??mk#1\c!coupling}{#1}% + \expandafter\newmark\csname\??mk#1\endcsname + \showmessage\m!systems{13}{#1}} -\def\definieermarkering - {\dodoubleempty\dodefinieermarkering} +\let\nomarking\empty -\let\geenmarkering\empty +\def\doifmarkingelse#1% + {\doifdefinedelse{\??mk#1}} % \def\fetchmark[#1][#2]% never \unexpanded % {\@EA\@EA\csname\??mk\??mk#2\endcsname -% \csname\??mk\hoofdmarkering{#1}\endcsname} +% \csname\??mk\mainmarking{#1}\endcsname} \beginTEX \def\fetchmark[#1][#2]% never \unexpanded - {\@EA\ifx\csname\??mk#1\c!koppeling\endcsname\else + {\@EA\ifx\csname\??mk#1\c!coupling\endcsname\else \@EA\@EA\csname\??mk\??mk#2\endcsname - \csname\??mk\csname\??mk#1\c!koppeling\endcsname\endcsname + \csname\??mk\csname\??mk#1\c!coupling\endcsname\endcsname \fi} \endTEX @@ -122,59 +154,59 @@ \beginETEX \ifcsname \def\fetchmark[#1][#2]% never \unexpanded - {\ifcsname\??mk#1\c!koppeling\endcsname + {\ifcsname\??mk#1\c!coupling\endcsname % \@EA\@EA\csname\??mk\??mk#2\endcsname - % \csname\??mk\csname\??mk#1\c!koppeling\endcsname\endcsname + % \csname\??mk\csname\??mk#1\c!coupling\endcsname\endcsname \csname\??mk\??mk#2\@EA\endcsname - \csname\??mk\csname\??mk#1\c!koppeling\endcsname\endcsname + \csname\??mk\csname\??mk#1\c!coupling\endcsname\endcsname \fi} \endETEX \def\fetchtwomarks[#1]% - {\doifsomething{\fetchmark[#1][\v!eerste]} - {\fetchmark[#1][\v!eerste]% - \doifsomething{\fetchmark[#1][\v!laatste]} - {\doifnot{\fetchmark[#1][\v!eerste]}{\fetchmark[#1][\v!laatste]} - {\getvalue{\??mk#1\c!scheider}\fetchmark[#1][\v!laatste]}}}} + {\doifsomething{\fetchmark[#1][\v!first]} + {\fetchmark[#1][\v!first]% + \doifsomething{\fetchmark[#1][\v!last]} + {\doifnot{\fetchmark[#1][\v!first]}{\fetchmark[#1][\v!last]} + {\getvalue{\??mk#1\c!separator}\fetchmark[#1][\v!last]}}}} \def\fetchallmarks[#1]% - {\doifsomething{\fetchmark[#1][\v!eerste]} - {\doifsomething{\fetchmark[#1][\v!vorige]} - {\doifnot{\fetchmark[#1][\v!vorige]}{\fetchmark[#1][\v!eerste]} - {\fetchmark[#1][\v!vorige]\getvalue{\??mk#1\c!scheider}}}}% + {\doifsomething{\fetchmark[#1][\v!first]} + {\doifsomething{\fetchmark[#1][\v!previous]} + {\doifnot{\fetchmark[#1][\v!previous]}{\fetchmark[#1][\v!first]} + {\fetchmark[#1][\v!previous]\getvalue{\??mk#1\c!separator}}}}% \fetchtwomarks[#1]} -\def\dohaalmarkering[#1][#2]% - {\doifvalue{\??mk#1\c!status}\v!start +\def\dogetmarking[#1][#2]% + {\doifvalue{\??mk#1\c!state}\v!start {\bgroup - %\def\geenmarkering##1{\unknown\ }% - \def\geenmarkering{\splitsequence{\getvalue{\??mk#1\c!limittext}}}% + %\def\nomarking##1{\unknown\ }% + \def\nomarking{\splitsequence{\getvalue{\??mk#1\c!limittext}}}% \setfullsectionnumber{\??mk#1}% \processaction % slow [#2] - [ \v!beide=>{\fetchtwomarks[#1]}, - \v!alles=>{\fetchallmarks[#1]}, - \s!default=>{\fetchmark [#1][\v!eerste]}, + [ \v!both=>{\fetchtwomarks[#1]}, + \v!all=>{\fetchallmarks[#1]}, + \s!default=>{\fetchmark [#1][\v!first]}, \s!unknown=>{\fetchmark [#1][#2]}]% \egroup}} -\def\nohaalmarkering[#1][#2]% +\def\nogetmarking[#1][#2]% {} -\unexpanded\def\haalmarkering% - {\dodoubleargument\dohaalmarkering} +\unexpanded\def\getmarking + {\dodoubleargument\dogetmarking} \let\setsomemark\setmark \beginTEX \def\domarking[#1]#2% - {\@EA\ifx\csname\??mk#1\c!koppeling\endcsname\else + {\@EA\ifx\csname\??mk#1\c!coupling\endcsname\else \bgroup - \doifelsevalue{\??mk#1\c!expansie}\v!ja + \doifelsevalue{\??mk#1\c!expansion}\v!yes \expandmarkstrue\expandmarksfalse - \@EA\setsomemark\csname\??mk\csname\??mk#1\c!koppeling\endcsname\endcsname{#2}% + \@EA\setsomemark\csname\??mk\csname\??mk#1\c!coupling\endcsname\endcsname{#2}% \egroup \fi} @@ -183,11 +215,11 @@ \beginETEX \ifcsname \def\domarking[#1]#2% - {\ifcsname\??mk#1\c!koppeling\endcsname + {\ifcsname\??mk#1\c!coupling\endcsname \bgroup - \doifelsevalue{\??mk#1\c!expansie}\v!ja + \doifelsevalue{\??mk#1\c!expansion}\v!yes \expandmarkstrue\expandmarksfalse - \@EA\setsomemark\csname\??mk\csname\??mk#1\c!koppeling\endcsname\endcsname{#2}% + \@EA\setsomemark\csname\??mk\csname\??mk#1\c!coupling\endcsname\endcsname{#2}% \egroup \fi} @@ -199,7 +231,7 @@ %D Used in placing text lines. \def\doifelsemarking#1% - {\ifundefined{\??mk#1\c!koppeling}% + {\ifundefined{\??mk#1\c!coupling}% \expandafter\secondoftwoarguments \else \expandafter\firstoftwoarguments diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex index ccdccb2e5..a243b91c4 100644 --- a/tex/context/base/core-mat.tex +++ b/tex/context/base/core-mat.tex @@ -52,7 +52,7 @@ \bgroup \forgetdisplayskips \displaywidowpenalty\widowpenalty % brrr, else widowpenalty does not work - \everymath\emptytoks + \everymath \emptytoks \everydisplay\emptytoks $$\strut\global\lastlinewidth\predisplaysize$$ \vskip-\lineheight @@ -82,8 +82,8 @@ % we don't use the skip's \def\displayskipsize#1#2% obsolete - {\ifdim\tussenwit>\zeropoint - #1\tussenwit\!!plus#2\tussenwit\!!minus#2\tussenwit\relax + {\ifdim\ctxparskip>\zeropoint + #1\ctxparskip\!!plus#2\ctxparskip\!!minus#2\ctxparskip\relax \else #1\lineheight\!!plus#2\lineheight\!!minus#2\lineheight\relax \fi} @@ -124,12 +124,12 @@ \abovedisplayshortskip\zeropoint \belowdisplayshortskip\zeropoint} -\definieernummer % \doorlabelen - [\v!formule] - [\c!tekst=\v!formule, - \c!wijze=\@@fmwijze, - \c!blokwijze=\@@fmblokwijze, - \c!plaats=\v!intekst] +\definenumber % \definelabel + [\v!formula] + [\c!text=\v!formula, + \c!way=\@@fmway, + \c!blockway=\@@fmblockway, + \c!location=\v!intext] \def\setupformulas {\dodoubleargument\getparameters[\??fm]} @@ -137,13 +137,13 @@ \newconditional\handleformulanumber \newconditional\incrementformulanumber -\def\dododoformulenummer#1#2#3#4% (#1,#2)=outer(ref,sub) (#3,#4)=inner(ref,sub) +\def\dododoformulanumber#1#2#3#4% (#1,#2)=outer(ref,sub) (#3,#4)=inner(ref,sub) {\hbox\bgroup \ifconditional\handleformulanumber \ifconditional\incrementformulanumber - \verhoognummer[\v!formule]% + \incrementnumber[\v!formula]% \fi - \maakhetnummer[\v!formule]% + \maakhetnummer[\v!formula]% \setbox0\hbox{\ignorespaces#2\unskip}% \ifdim\wd0>\zeropoint \edef\hetsubnummer{#2}% @@ -157,26 +157,26 @@ \fi \doifsomething{#3}{\rawreference\s!for{#3}{\hetnummer\hetsubnummer}}% \rm % nodig ? - \@@fmnummercommando - {\dostartattributes\??fm\c!nummerletter\c!nummerkleur + \@@fmnumbercommand + {\dostartattributes\??fm\c!numberstyle\c!numbercolor \strut - \@@fmlinks + \@@fmleft \preparethenumber\??fm\hetnummer\preparednumber - \labeltexts\v!formule + \labeltexts\v!formula {\ignorespaces\preparednumber\ignorespaces\hetsubnummer\unskip}% - \@@fmrechts + \@@fmright \dostopattributes}% \fi \egroup} -\def\dodoformulenummer[#1][#2][#3]% - {\doquadruplegroupempty\dododoformulenummer{#1}{#2}{#3}} +\def\dodoformulanumber[#1][#2][#3]% + {\doquadruplegroupempty\dododoformulanumber{#1}{#2}{#3}} -\def\doformulenummer - {\dotripleempty\dodoformulenummer} +\def\doformulanumber + {\dotripleempty\dodoformulanumber} -\setvalue{\e!start\v!formule}{\dostartformula{}} -\setvalue{\e!stop \v!formule}{\dostopformula} +\setvalue{\e!start\v!formula}{\dostartformula{}} +\setvalue{\e!stop \v!formula}{\dostopformula} \def\definieerformule {\dodoubleempty\dodefinieerformule} @@ -185,13 +185,13 @@ {\doifsomething{#1} {\copyparameters [\??fm#1][\??fm] - [\c!voorwit,\c!nawit,\c!grid, - \c!linkermarge,\c!rechtermarge,\c!marge, - \c!springvolgendein,\c!variant, - \c!strut,\c!uitlijnen,\c!afstand]% + [\c!spacebefore,\c!spaceafter,\c!grid, + \c!leftmargin,\c!rightmargin,\c!margin, + \c!indentnext,\c!alternative, + \c!strut,\c!align,\c!distance]% \setupformulas[#1][#2]% - \setvalue{\e!start#1\v!formule}{\dostartformula{#1}}% - \setvalue{\e!stop #1\v!formule}{\dostopformula}}} + \setvalue{\e!start#1\v!formula}{\dostartformula{#1}}% + \setvalue{\e!stop #1\v!formula}{\dostopformula}}} \newtoks \everysetupformulas \relax % we need a hook for extensions in modules @@ -210,38 +210,38 @@ {\csname\??fm\currentformula#1\endcsname} \setupformulas - [\c!wijze=\@@nrwijze, - \c!blokwijze=, - \c!sectienummer=\@@nrsectienummer, - \c!plaats=\v!rechts, - \c!links=(, - \c!rechts=), - \c!voorwit=, - \c!nawit=\@@fmvoorwit, - \c!linkermarge=\!!zeropoint, - \c!rechtermarge=\!!zeropoint, - \c!marge=, - \c!springvolgendein=\v!nee, - \c!variant=\s!default, - \c!uitlijnen=, - \c!strut=\v!nee, - \c!scheider=\@@koscheider, - \c!afstand=1em] + [\c!way=\@@nrway, + \c!blockway=, + \c!sectionnumber=\@@nrsectionnumber, + \c!location=\v!right, + \c!left=(, + \c!right=), + \c!spacebefore=, + \c!spaceafter=\@@fmspacebefore, + \c!leftmargin=\!!zeropoint, + \c!rightmargin=\!!zeropoint, + \c!margin=, + \c!indentnext=\v!no, + \c!alternative=\s!default, + \c!align=, + \c!strut=\v!no, + \c!separator=\@@koseparator, + \c!distance=1em] \def\currentformula {} \def\predisplaysizethreshhold{2em} % was 3em \def\leftdisplayskip {\leftskip} \def\rightdisplayskip {\rightskip} -\def\leftdisplaymargin {\formulaparameter\c!linkermarge} -\def\rightdisplaymargin {\formulaparameter\c!rechtermarge} +\def\leftdisplaymargin {\formulaparameter\c!leftmargin} +\def\rightdisplaymargin {\formulaparameter\c!rightmargin} \def\displaygridsnapping{\formulaparameter\c!grid} \def\beforedisplayspace - {\doifnot{\formulaparameter\c!voorwit}\v!geen{\blanko[\formulaparameter\c!voorwit]}} + {\doifnot{\formulaparameter\c!spacebefore}\v!none{\blank[\formulaparameter\c!spacebefore]}} \def\afterdisplayspace - {\doifnot{\formulaparameter\c!nawit }\v!geen{\blanko[\formulaparameter\c!nawit ]}} + {\doifnot{\formulaparameter\c!spaceafter }\v!none{\blank[\formulaparameter\c!spaceafter ]}} \def\setpredisplaysize#1% {\predisplaysize#1\relax @@ -294,8 +294,8 @@ \switchtoformulabodyfont[#2]% \parskip\formulaparskip \def\currentformula{#1}% - \doifsomething{\formulaparameter\c!marge}% so we test first - {\dosetleftskipadaption{\formulaparameter\c!marge}% + \doifsomething{\formulaparameter\c!margin}% so we test first + {\dosetleftskipadaption{\formulaparameter\c!margin}% \edef\leftdisplaymargin{\the\leftskipadaption}}% overloaded \long\def\dostartformula##1{\bgroup\let\dostopformula\egroup}% \freezedimenmacro\leftdisplayskip @@ -312,11 +312,11 @@ \else \resetlastlinewidth \fi - \getvalue{\e!start\formulaparameter\c!variant\v!formule}} + \getvalue{\e!start\formulaparameter\c!alternative\v!formula}} \def\switchtoformulabodyfont{\switchtobodyfont} -\setvalue{\v!formule}{\dosingleempty\doformula} +\setvalue{\v!formula}{\dosingleempty\doformula} \def\doformula[#1]#2% {\begingroup @@ -329,7 +329,7 @@ \def\dostopformula {\doplaceformulanumber - \getvalue{\e!stop\formulaparameter\c!variant\v!formule}% + \getvalue{\e!stop\formulaparameter\c!alternative\v!formula}% \resetlastlinewidth \nonoindentation \dochecknextindentation{\??fm\currentformula}% @@ -396,10 +396,10 @@ \ifdim\lastskip<\zeropoint\else \par \ifvmode \ifdim\parskip>\zeropoint\relax - \witruimte \vskip-\parskip % kind of forces and cancels again + \whitespace \vskip-\parskip % kind of forces and cancels again \fi \fi \fi - \doif\displaygridcorrection{-\v!boven}{\kern-\strutht}% new, currently only option/default + \doif\displaygridcorrection{-\v!top}{\kern-\strutht}% new, currently only option/default \beforedisplayspace \par \ifvmode @@ -419,7 +419,7 @@ \egroup \afterdisplayspace \else - \par\ifvmode\ifdim\parskip>\zeropoint\witruimte\vskip-\parskip\fi\fi + \par\ifvmode\ifdim\parskip>\zeropoint\whitespace\vskip-\parskip\fi\fi \afterdisplayspace \egroup \fi @@ -470,7 +470,7 @@ {\iffirstargument \xdef\displaygridcorrection{#1}% \else - \gdef\displaygridcorrection{-\v!boven}% handy with short preline + \gdef\displaygridcorrection{-\v!top}% handy with short preline \fi \globallet\displaylinecorrection\displaygridcorrection} @@ -481,8 +481,8 @@ {\dotripleargument\dodefineformulaalternative} \def\dodefineformulaalternative[#1][#2][#3]% - {\setvalue{\e!start#1\v!formule}{#2}% - \setvalue{\e!stop #1\v!formule}{#3}} + {\setvalue{\e!start#1\v!formula}{#2}% + \setvalue{\e!stop #1\v!formula}{#3}} \defineformulaalternative[\s!default][\startdisplaymath][\stopdisplaymath] @@ -494,25 +494,25 @@ \definieerformule [sp] - [\c!voorwit=\v!geen,\c!nawit=\v!geen, - \c!springvolgendein=\v!nee, - \c!variant=single] + [\c!spacebefore=\v!none,\c!spaceafter=\v!none, + \c!indentnext=\v!no, + \c!alternative=single] \definieerformule [sd] - [\c!voorwit=\v!geen,\c!nawit=\v!geen, - \c!springvolgendein=\v!ja, - \c!variant=single] + [\c!spacebefore=\v!none,\c!spaceafter=\v!none, + \c!indentnext=\v!yes, + \c!alternative=single] \definieerformule [mp] - [\c!springvolgendein=\v!nee, - \c!variant=multi] + [\c!indentnext=\v!no, + \c!alternative=multi] \definieerformule [md] - [\c!springvolgendein=\v!ja, - \c!variant=multi] + [\c!indentnext=\v!yes, + \c!alternative=multi] % in m-math % @@ -540,15 +540,15 @@ % \convertcommand\next\to\ascii \getfirstcharacter\ascii % \ifx\firstcharacter\letterbackslash % a \cs -\def\plaatsformule +\def\placeformula {\settrue\incrementformulanumber - \dodoubleempty\doplaatsformule} + \dodoubleempty\doplaceformula} -\def\plaatssubformule +\def\placesubformula {\setfalse\incrementformulanumber - \dodoubleempty\doplaatsformule} + \dodoubleempty\doplaceformula} -\def\doplaatsformule[#1][#2]% #2 = dummy, gobbles spaces +\def\doplaceformula[#1][#2]% #2 = dummy, gobbles spaces {\def\redoplaatsformule {\bgroup\def\dostartformula####1{\relax}% \ifx\next\bgroup @@ -557,7 +557,7 @@ \expandafter\convertargument\e!start\to\asciiA \expandafter\convertargument\next \to\asciiB \ExpandBothAfter\doifincsnameelse\asciiA\asciiB - {\egroup \@EA\dodoplaatsformule}% [ref]\start + {\egroup \@EA\dodoplaceformula}% [ref]\start {\egroup \@EA\dispplaatsformule}% [ref]$$ \fi[#1]{}}% \futurelet\next\redoplaatsformule} @@ -567,48 +567,48 @@ {\expandafter\convertargument\e!start\to\asciiA \expandafter\convertargument\next \to\asciiB \ExpandBothAfter\doifincsnameelse\asciiA\asciiB - {\egroup \dodoplaatsformule}% [ref]\start + {\egroup \dodoplaceformula}% [ref]\start {\egroup \dispplaatsformule}% [ref]$$ [#1]{#3}}% \futurelet\next\redoplaatsformule#4} \def\dispplaatsformule[#1]#2$$#3$$% - {\dodoplaatsformule[#1]{#2}\dostartformula{}#3\dostopformula} + {\dodoplaceformula[#1]{#2}\dostartformula{}#3\dostopformula} \let\normalreqno\eqno \let\normalleqno\leqno -\def\dodoplaatsformule[#1]#2% messy, needs a clean up +\def\dodoplaceformula[#1]#2% messy, needs a clean up {\doifelse{#1}{-} {\setfalse\handleformulanumber} {\doifelse{#2}{-} {\setfalse\handleformulanumber} {\settrue\handleformulanumber}}% \ifconditional\handleformulanumber - \def\formulenummer - {%\global\let\subformulenummer\doformulenummer % no, bug - \doformulenummer[#1][#2]}% - \def\subformulenummer + \def\formulanumber + {%\global\let\subformulanumber\doformulanumber % no, bug + \doformulanumber[#1][#2]}% + \def\subformulanumber {\setfalse\incrementformulanumber - \formulenummer}% + \formulanumber}% \gdef\doplaceformulanumber {\global\let\doplaceformulanumber\empty - \doifelse\@@fmplaats\v!links - {\normalleqno{\doformulenummer[#1][#2][]{}}} - {\normalreqno{\doformulenummer[#1][#2][]{}}}}% + \doifelse\@@fmlocation\v!left + {\normalleqno{\doformulanumber[#1][#2][]{}}} + {\normalreqno{\doformulanumber[#1][#2][]{}}}}% \else - \def\formulenummer{\doformulenummer[#1][#2]}% - \global\let\subformulenummer\doformulenummer + \def\formulanumber{\doformulanumber[#1][#2]}% + \global\let\subformulanumber\doformulanumber \global\let\doplaceformulanumber\empty \fi} %D We need a hook into the plain math alignment macros %D -%D \starttypen +%D \starttyping %D \displaylines %D \eqalignno %D \eqalignno -%D \stoptypen +%D \stoptyping %D %D Otherwise we get a missing \type {$$} error reported. @@ -627,13 +627,13 @@ %D modules. \def\startinnermath - {\getvalue{\e!start\??fm\formulaparameter\c!uitlijnen}} + {\getvalue{\e!start\??fm\formulaparameter\c!align}} \def\stopinnermath - {\getvalue{\e!stop \??fm\formulaparameter\c!uitlijnen}} + {\getvalue{\e!stop \??fm\formulaparameter\c!align}} \def\mathinnerstrut - {\doif{\formulaparameter\c!strut}\v!ja\strut} + {\doif{\formulaparameter\c!strut}\v!yes\strut} \long\def\defineinnermathhandler#1#2#3% {\setvalue{\e!start\??fm#1}{#2}% @@ -659,7 +659,7 @@ \ifx\@leqno\empty\else \ifcase#2 \rlap{\@leqno}% \else - \@leqno\hskip\formulaparameter\c!afstand + \@leqno\hskip\formulaparameter\c!distance \fi \fi #1} @@ -668,13 +668,13 @@ \ifx\@eqno\empty\else \ifcase#2 \llap{\@eqno}% \else - \hskip\formulaparameter\c!afstand\@eqno + \hskip\formulaparameter\c!distance\@eqno \fi \fi \egroup} -\defineinnermathhandler\v!rechts{\startmathbox\empty1}{\stopmathbox\hfill0} -\defineinnermathhandler\v!links {\startmathbox\hfill0}{\stopmathbox\empty1} -\defineinnermathhandler\v!midden{\startmathbox\hfill0}{\stopmathbox\hfill0} +\defineinnermathhandler\v!right{\startmathbox\empty1}{\stopmathbox\hfill0} +\defineinnermathhandler\v!left {\startmathbox\hfill0}{\stopmathbox\empty1} +\defineinnermathhandler\v!middle{\startmathbox\hfill0}{\stopmathbox\hfill0} %D [The examples below are in english and don't process in the %D documentation style, which will be english some day.] @@ -867,7 +867,7 @@ \to \everysupersub \appendtoks - \doifelse\@@mtformaat\v!klein + \doifelse\@@mtsize\v!small {\let\gridsupsubstyle \scriptscriptstyle \let\gridsupsubbodyfont \setsmallbodyfont}% {\let\gridsupsubstyle \scriptstyle @@ -875,7 +875,7 @@ \to \everysetuptextformulas \setuptextformulas - [\c!formaat=\v!normaal] + [\c!size=\v!normal] \def\dogridsupsub#1#2% {\begingroup @@ -1005,13 +1005,13 @@ % \to \everysetuptextformulas \appendtoks - \doifelse\@@mtgrid\v!ja \settrue\setfalse\crazymathsnapping - \doifelse\@@mtstap\v!halveregel\settrue\setfalse\halfcrazymathlines + \doifelse\@@mtgrid\v!yes \settrue\setfalse\crazymathsnapping + \doifelse\@@mtstep\v!halfline\settrue\setfalse\halfcrazymathlines \to \everysetuptextformulas \setuptextformulas - [\c!grid=\v!ja, - \c!stap=\v!regel] + [\c!grid=\v!yes, + \c!step=\v!line] \newcount\crazymathhack @@ -1021,7 +1021,7 @@ \let\lastcrazymathpostlines\!!zerocount \def\crazymathtag{amh:\the\crazymathhack} -\def\crazytexttag{\v!tekst:\lastcrazymathpage} +\def\crazytexttag{\v!text:\lastcrazymathpage} \def\crazymathindent{\hskip\MPx\crazymathtag\hskip-\MPx\crazytexttag} @@ -1040,13 +1040,13 @@ \def\snappedinlineformula {\dosingleempty\dosnappedinlineformula} -%D \starttabulatie[|Tl|l|] +%D \starttabulate[|Tl|l|] %D \NC - \NC half lines \NC \NR %D \NC + \NC full lines \NC \NR %D \NC = \NC force \NC \NR %D \NC < \NC force, minus pre \NC \NR %D \NC > \NC force, minus post \NC \NR -%D \stoptabulatie +%D \stoptabulate \newif\if!!donee \newif\if!!donef @@ -1362,7 +1362,7 @@ % \gform{\frac{1200}{k+12} - 42 = 6} % \stopregels -%D \macro +%D \macros %D {restoremathstyle} %D %D We can pick up the current math style by calling \type @@ -1385,9 +1385,9 @@ %D If one want to be sure that something is typeset in the %D appropriate style, \type {\mathstyle} can be used: %D -%D \starttypen +%D \starttyping %D \mathstyle{something} -%D \stoptypen +%D \stoptyping \def\mathstyle#1% {\mathchoice @@ -1418,7 +1418,7 @@ %D Because we may overload \type {\text} in other (structuring) %D macros, we say: -\appendtoks \let\text\mathtext \to \everymath +\appendtoks \let\text\mathtext \to \everymathematics %D \macros %D {frac, xfrac, xxfrac} @@ -1428,7 +1428,7 @@ %D handle math style restoring, which makes sure units and %D chemicals come out ok. %D -%D \starttypen +%D \starttyping %D \def\frac#1#2% %D {\relax %D \ifmmode @@ -1436,14 +1436,14 @@ %D \else %D $\frac{#1}{#2}$% %D \fi} -%D \stoptypen +%D \stoptyping %D %D Better is: %D -%D \starttypen +%D \starttyping %D \def\frac#1#2% %D {\relax\mathematics{{{\mathstyle{#1}}\over{\mathstyle{#2}}}}} -%D \stoptypen +%D \stoptyping %D %D The \type {\frac} macro kind of replaces the awkward \type %D {\over} primitive. Say that we have the following formulas: @@ -1539,7 +1539,7 @@ \bgroup \catcode`\/=\@@other \global \let\normalforwardslash/ -\catcode`\/=\@@active \doglobal\appendtoks\let/\normalforwardslash\to\everymath +\catcode`\/=\@@active \doglobal\appendtoks\let/\normalforwardslash\to\everymathematics \egroup @@ -1599,17 +1599,17 @@ %D $\negative 10^{\negative 10^{\negative 10}}$. \setupformulas - [\c!wijze=\@@nrwijze, - \c!blokwijze=, - \c!sectienummer=\@@nrsectienummer, - \c!plaats=\v!rechts, - \c!links=(, - \c!rechts=), - \c!nummerletter=, - \c!nummerkleur=, - \c!nummercommando=, - \c!voorwit=\v!groot, - \c!nawit=\@@fmvoorwit, + [\c!way=\@@nrway, + \c!blockway=, + \c!sectionnumber=\@@nrsectionnumber, + \c!location=\v!right, + \c!left=(, + \c!right=), + \c!numberstyle=, + \c!numbercolor=, + \c!numbercommand=, + \c!spacebefore=\v!big, + \c!spaceafter=\@@fmspacebefore, \c!grid=] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex index 80461a555..d157a7ee4 100644 --- a/tex/context/base/core-mis.tex +++ b/tex/context/base/core-mis.tex @@ -13,6 +13,8 @@ \writestatus{loading}{Context Core Macros / Misc Commands} +% todo: kleur in legenda + letter + % Obsolete % % \startmessages dutch library: systems @@ -82,8 +84,8 @@ \appendtoks \def\TeX{TeX}\to\simplifiedcommands \appendtoks \def\ConTeXt{ConTeXt}\to\simplifiedcommands \appendtoks \def\MetaPost{MetaPost}\to\simplifiedcommands -\appendtoks \def\MetaPost{MetaFont}\to\simplifiedcommands -\appendtoks \def\MetaPost{MetaFun}\to\simplifiedcommands +\appendtoks \def\MetaFont{MetaFont}\to\simplifiedcommands +\appendtoks \def\MetaFun{MetaFun}\to\simplifiedcommands \appendtoks \def||{-}\to\simplifiedcommands % THIS WAS MAIN-002.TEX @@ -104,11 +106,11 @@ \def\docommando##1% {\advance\!!counta \plusone \processaction - [\@@isuitlijnen] - [ \v!links=>\hbox to \scratchdimen{\strut##1\hss}, - \v!rechts=>\hbox to \scratchdimen{\hss\strut##1}, - \v!midden=>\hbox to \scratchdimen{\hss\strut##1\hss}, - \v!marge=>\ifnum\!!counta=\plusone\hss\else\hfill\fi + [\@@isalign] + [ \v!left=>\hbox to \scratchdimen{\strut##1\hss}, + \v!right=>\hbox to \scratchdimen{\hss\strut##1}, + \v!middle=>\hbox to \scratchdimen{\hss\strut##1\hss}, + \v!margin=>\ifnum\!!counta=\plusone\hss\else\hfill\fi \strut##1% \ifnum\!!counta=\nofitems\hss\else\hfill\fi, \s!default=>\hbox to \scratchdimen{\hss\strut##1\hss}, % midden @@ -127,22 +129,22 @@ \fi\fi}% \vbox{#2}} -\def\dostelitemsin[#1]% +\def\dosetupitems[#1]% {\getparameters[\??is][#1]% - \doif\@@isbreedte\v!onbekend - {\def\@@isbreedte{\hsize}}% - \doifconversiondefinedelse\@@issymbool - {\def\doitembullet##1{\convertnumber{\@@issymbool}{##1}}} - {\doifsymboldefinedelse\@@issymbool - {\def\doitembullet##1{\symbol[\@@issymbool]}}{}}} + \doif\@@iswidth\v!unknown + {\def\@@iswidth{\hsize}}% + \doifconversiondefinedelse\@@issymbol + {\def\doitembullet##1{\convertnumber{\@@issymbol}{##1}}} + {\doifsymboldefinedelse\@@issymbol + {\def\doitembullet##1{\symbol[\@@issymbol]}}{}}} \def\makeitemsandbullets#1% - {\doifelse\@@isn\v!onbekend + {\doifelse\@@isn\v!unknown {\getcommalistsize[#1]% \edef\nofitems{\commalistsize}} {\edef\nofitems{\@@isn}}% \setbox0\hbox - {\doitems \@@isbreedte + {\doitems \@@iswidth {\processcommalist[#1]\docommando}}% \setbox2\hbox {\doitems \@@isbulletbreedte @@ -153,90 +155,90 @@ {\let\doitems#2% \def\@@isbulletbreedte{#3}% \makeitemsandbullets{#1}% - \@@isvoor} + \@@isbefore} \def\dostopitems - {\@@isna + {\@@isafter \egroup} -\setvalue{doitems\v!boven}#1% - {\dostartitems{#1}\horitems\@@isbreedte +\setvalue{doitems\v!top}#1% + {\dostartitems{#1}\horitems\@@iswidth \noindent\vbox {\forgetall - \doifsomething\@@issymbool - {\doifnot\@@issymbool\v!geen + \doifsomething\@@issymbol + {\doifnot\@@issymbol\v!none {\box2 - \@@istussen + \@@isinbetween \nointerlineskip}}% \box0}% \dostopitems} -\setvalue{doitems\v!onder}#1% - {\dostartitems{#1}\horitems\@@isbreedte +\setvalue{doitems\v!bottom}#1% + {\dostartitems{#1}\horitems\@@iswidth \noindent\vbox {\forgetall \box0 - \doifsomething\@@issymbool - {\@@istussen + \doifsomething\@@issymbol + {\@@isinbetween \nointerlineskip \box2}}% \dostopitems} -\setvalue{doitems\v!inmarge}#1% +\setvalue{doitems\v!inmargin}#1% {\dostartitems{#1}\veritems{-1.5em}% - is a signal - \noindent\hbox{\llap{\box2\hskip\linkermargeafstand}\box0}% + \noindent\hbox{\llap{\box2\hskip\leftmargindistance}\box0}% \dostopitems} -\setvalue{doitems\v!links}#1% +\setvalue{doitems\v!left}#1% {\advance\hsize -1.5em% \dostartitems{#1}\veritems{1.5em}% \noindent\hbox{\box2\box0}% \dostopitems} -\setvalue{doitems\v!rechts}#1% +\setvalue{doitems\v!right}#1% {\dostartitems{#1}\veritems{0em}% \noindent\hbox{\box0\hskip-\wd2\box2}% \dostopitems} -\def\stelitemsin - {\dosingleargument\dostelitemsin} +\def\setupitems + {\dosingleargument\dosetupitems} \def\complexitems[#1]% {\bgroup - \stelitemsin[#1]% + \setupitems[#1]% \parindent\zeropoint \setlocalhsize \hsize\localhsize - \mindermeldingen - %\doifundefined{doitems\@@isplaats}% - % {\let\@@isplaats\v!links}% - %\getvalue{doitems\@@isplaats}} - \executeifdefined{doitems\@@isplaats}{\let\@@isplaats\v!links}} + \dontcomplain + %\doifundefined{doitems\@@islocation}% + % {\let\@@islocation\v!left}% + %\getvalue{doitems\@@islocation}} + \executeifdefined{doitems\@@islocation}{\let\@@islocation\v!left}} \definecomplexorsimpleempty\items -\stelitemsin - [\c!plaats=\v!links, - \c!symbool=5, - \c!breedte=\hsize, - \c!uitlijnen=\v!midden, - \c!n=\v!onbekend, - \c!voor=\blanko, - \c!tussen={\blanko[\v!middel]}, - \c!na=\blanko] +\setupitems + [\c!location=\v!left, + \c!symbol=5, + \c!width=\hsize, + \c!align=\v!middle, + \c!n=\v!unknown, + \c!before=\blank, + \c!inbetween={\blank[\v!medium]}, + \c!after=\blank] % Te zijner tijd [plaats=boven,onder,midden] implementeren, % in dat geval moet eerst de maximale hoogte worden bepaald. % % Overigens kan een en ander mooier met \halign. -\def\dodefinieeralineas[#1][#2]% +\def\dodefineparagraphs[#1][#2]% {\setvalue{\s!do\s!next#1}% {\def\\{\getvalue{#1}}}% \setvalue{#1}% {\getvalue{\s!do\s!next#1}% \dostartalineas{#1}}% - \setvalue{\e!volgende#1}% + \setvalue{\e!next#1}% {\getvalue{#1}}% \setvalue{\e!start#1}% {\bgroup @@ -247,54 +249,42 @@ \getvalue{#1}}% \getparameters[\??al#1]% [\c!n=3, - \c!voor=\blanko, - \c!na=\blanko, - \c!afstand=1em, - \c!hoogte=\v!passend, - \c!lijn=\v!uit, - \c!commando=, - \c!uitlijnen=, - \c!tolerantie=\v!soepel, - \c!letter=, - \c!kleur=, - \c!boven=, - \c!boven=\vss, - \c!onder=\vfill, + \c!before=\blank, + \c!after=\blank, + \c!distance=1em, + \c!height=\v!fit, + \c!rule=\v!off, + \c!command=, + \c!align=, + \c!tolerance=\v!tolerant, + \c!style=, + \c!color=, + \c!top=, + \c!top=\vss, + \c!bottom=\vfill, #2]% - \setvalue{\e!stel#1\e!in}% - {\stelalineasin[#1]}% + \setvalue{\e!setup#1\e!endsetup}% + {\setupparagraphs[#1]}% \dorecurse {\getvalue{\??al#1\c!n}} - {\stelalineasin[#1][\recurselevel] - [\c!breedte=, - \c!onder=\getvalue{\??al#1\c!onder}, - \c!boven=\getvalue{\??al#1\c!boven}, - \c!hoogte=\getvalue{\??al#1\c!hoogte}, - \c!letter=\getvalue{\??al#1\c!letter}, - \c!kleur=\getvalue{\??al#1\c!kleur}, - \c!lijn=\getvalue{\??al#1\c!lijn}, - \c!uitlijnen=\getvalue{\??al#1\c!uitlijnen}, - \c!tolerantie=\getvalue{\??al#1\c!tolerantie}, - \c!afstand=\getvalue{\??al#1\c!afstand}]}% - \stelalineasin[#1][1][\c!afstand=0em]} - -% nog monster -% -%\assignwidth -% {\!!widtha} -% {\getvalue{\??dd#1\c!breedte}} -% {\doifelsevaluenothing{\??dd#1\c!monster} -% {\hskip -% {\doattributes -% {\??al#1}\c!letter\c!kleur -% {\getvalue{\??dd#1\c!monster}}}} -% {0pt} - -\def\definieeralineas% - {\dodoubleargument\dodefinieeralineas} - -\def\dostelalineasin[#1][#2][#3]% - {\doifelse{#2}\v!elk + {\setupparagraphs[#1][\recurselevel] + [\c!width=, + \c!bottom=\getvalue{\??al#1\c!bottom}, + \c!top=\getvalue{\??al#1\c!top}, + \c!height=\getvalue{\??al#1\c!height}, + \c!style=\getvalue{\??al#1\c!style}, + \c!color=\getvalue{\??al#1\c!color}, + \c!rule=\getvalue{\??al#1\c!rule}, + \c!align=\getvalue{\??al#1\c!align}, + \c!tolerance=\getvalue{\??al#1\c!tolerance}, + \c!distance=\getvalue{\??al#1\c!distance}]}% + \setupparagraphs[#1][1][\c!distance=0em]} + +\def\defineparagraphs + {\dodoubleargument\dodefineparagraphs} + +\def\dosetupparagraphs[#1][#2][#3]% + {\doifelse{#2}\v!each {\dorecurse {\getvalue{\??al#1\c!n}} {\getparameters[\??al#1\recurselevel][#3]}} @@ -304,15 +294,15 @@ {\getparameters[\??al#1##1][#3]}% \processcommalist[#2]\docommando}}} -\def\stelalineasin - {\dotripleempty\dostelalineasin} +\def\setupparagraphs + {\dotripleempty\dosetupparagraphs} \newcount\alteller \newcount\alnsize \newdimen\alhsize \def\doalinealijn#1#2% - {\doifelsevalue{\??al#2\the\alteller\c!lijn}\v!aan + {\doifelsevalue{\??al#2\the\alteller\c!rule}\v!on {\dimen2=#1\relax \hskip.5\dimen2 \hskip-\linewidth @@ -321,26 +311,26 @@ {\hskip#1}} \def\dostartalinea#1% - {\doifelsevaluenothing{\??al#1\the\alteller\c!breedte} + {\doifelsevaluenothing{\??al#1\the\alteller\c!width} {\!!widtha\alhsize \divide\!!widtha \alnsize} - {\!!widtha\getvalue{\??al#1\the\alteller\c!breedte}}% + {\!!widtha\getvalue{\??al#1\the\alteller\c!width}}% \dostartattributes - {\??al#1\the\alteller}\c!letter\c!kleur + {\??al#1\the\alteller}\c!style\c!color \empty - \doifelsevalue{\??al#1\the\alteller\c!hoogte}\v!passend + \doifelsevalue{\??al#1\the\alteller\c!height}\v!fit {\setbox0\vtop} - {\setbox0\vtop to \getvalue{\??al#1\the\alteller\c!hoogte}}% + {\setbox0\vtop to \getvalue{\??al#1\the\alteller\c!height}}% \bgroup - \blanko[\v!blokkeer]% + \blank[\v!disable]% \forgetall - \getvalue{\??al#1\the\alteller\c!boven}% - \getvalue{\??al#1\c!binnen}% + \getvalue{\??al#1\the\alteller\c!top}% + \getvalue{\??al#1\c!inner}% \hsize\!!widtha % setting \wd afterwards removed - \getvalue{\??al#1\the\alteller\c!binnen}% - \edef\!!stringa{\getvalue{\??al#1\the\alteller\c!uitlijnen}}% nodig? + \getvalue{\??al#1\the\alteller\c!inner}% + \edef\!!stringa{\getvalue{\??al#1\the\alteller\c!align}}% nodig? \expandafter\setupalign\expandafter[\!!stringa]% - \edef\!!stringa{\getvalue{\??al#1\the\alteller\c!tolerantie}}% nodig? + \edef\!!stringa{\getvalue{\??al#1\the\alteller\c!tolerance}}% nodig? \expandafter\setuptolerance\expandafter[\!!stringa]% \ignorespaces \endgraf @@ -355,7 +345,7 @@ \everypar{\begstrut\everypar\emptytoks}% % \ignorespaces\geenspatie % dubbel: \ignorespaces - \getvalue{\??al#1\the\alteller\c!commando}} + \getvalue{\??al#1\the\alteller\c!command}} \def\dostopalinea#1% {\ifvmode @@ -363,7 +353,7 @@ \else \unskip\endstrut\endgraf \fi - \getvalue{\??al#1\the\alteller\c!onder}% + \getvalue{\??al#1\the\alteller\c!bottom}% \egroup \ifdim\wd0=\zeropoint % no data \wd0\!!widtha @@ -384,12 +374,12 @@ \def\doalinea#1% {\global\advance\alteller \plusone - \doifelsevaluenothing{\??al#1\the\alteller\c!afstand} + \doifelsevaluenothing{\??al#1\the\alteller\c!distance} {\doifnot{\the\alteller}{1} - {\hskip\getvalue{\??al#1\c!afstand}}} + {\hskip\getvalue{\??al#1\c!distance}}} {\doifelse{\the\alteller}{1}% - {\hskip\getvalue{\??al#1\the\alteller\c!afstand}} - {\doalinealijn{\getvalue{\??al#1\the\alteller\c!afstand}}{#1}}}% + {\hskip\getvalue{\??al#1\the\alteller\c!distance}} + {\doalinealijn{\getvalue{\??al#1\the\alteller\c!distance}}{#1}}}% \setvalue{#1}{\dostopalinea{#1}}% \dostartalinea{#1}} @@ -401,15 +391,15 @@ \alnsize\getvalue{\??al#1\c!n}\relax \dorecurse {\getvalue{\??al#1\c!n}} - {\doifelsevaluenothing{\??al#1\recurselevel\c!afstand} + {\doifelsevaluenothing{\??al#1\recurselevel\c!distance} {\doifnot{\recurselevel}{1} - {\global\advance\alhsize -\getvalue{\??al#1\c!afstand}\relax}} - {\global\advance\alhsize -\getvalue{\??al#1\recurselevel\c!afstand}\relax}% - \doifvaluesomething{\??al#1\recurselevel\c!breedte} + {\global\advance\alhsize -\getvalue{\??al#1\c!distance}\relax}} + {\global\advance\alhsize -\getvalue{\??al#1\recurselevel\c!distance}\relax}% + \doifvaluesomething{\??al#1\recurselevel\c!width} {\global\advance\alnsize \minusone - \global\advance\alhsize -\getvalue{\??al#1\recurselevel\c!breedte}\relax}}% - %\witruimte % gaat fout bij \framed - \getvalue{\??al#1\c!voor}% + \global\advance\alhsize -\getvalue{\??al#1\recurselevel\c!width}\relax}}% + %\whitespace % gaat fout bij \framed + \getvalue{\??al#1\c!before}% \leavevmode % gaat wel goed bij \framed \vbox\bgroup\hbox\bgroup\doalinea{#1}} @@ -417,33 +407,33 @@ {\egroup \egroup \par - \getvalue{\??al#1\c!na}}% + \getvalue{\??al#1\c!after}}% -\def\dosteltabin[#1]% +\def\dosetuptab[#1]% {\getparameters[\??ta] - [\c!kopletter=\v!normaal, - \c!kopkleur=, - \c!letter=\v!normaal, - \c!kleur=, - \c!breedte=\v!ruim, - \c!monster={\hskip4em}, - \c!voor=, - \c!na=, + [\c!headstyle=\v!normal, + \c!headcolor=, + \c!style=\v!normal, + \c!color=, + \c!width=\v!broad, + \c!sample={\hskip4em}, + \c!before=, + \c!after=, #1]% - \doordefinieren + \definedescription [tab] - [\c!kopletter=\@@takopletter, - \c!kopkleur=\@@takleur, - \c!monster=\@@tamonster, - \c!breedte=\@@tabreedte, - \c!voor=\@@tavoor, - \c!na=\@@tana]} - -\def\steltabin - {\dosingleargument\dosteltabin} - -\steltabin - [\c!plaats=\v!links] + [\c!headstyle=\@@taheadstyle, + \c!headcolor=\@@tacolor, + \c!sample=\@@tasample, + \c!width=\@@tawidth, + \c!before=\@@tabefore, + \c!after=\@@taafter]} + +\def\setuptab + {\dosingleargument\dosetuptab} + +\setuptab + [\c!location=\v!left] % The following macro's are derived from PPCHTEX and % therefore take some LaTeX font-switching into account. @@ -509,7 +499,7 @@ \def\celsius#1{#1\mathematics{^\circ}C} \def\graden {\mathematics{^\circ}} \def\inch {\hbox{\rm\char125\relax}} -\def\breuk#1#2{\mathematics{#1\over#2}} +\def\fraction#1#2{\mathematics{#1\over#2}} \def\bedragprefix {\euro\normalfixedspace} \def\bedragsuffix {} @@ -544,10 +534,10 @@ \def\doorsnede {\hbox{\rlap/$\circ$} } -\unexpanded\def\punten - {\dosingleempty\dopunten} +\unexpanded\def\periods + {\dosingleempty\doperiods} -\def\dopunten[#1]% +\def\doperiods[#1]% {\scratchdimen.5em% \hbox to \iffirstargument#1\else5\fi \scratchdimen {\leaders\hbox to \scratchdimen{\hss.\hss}\hss}} @@ -558,7 +548,7 @@ % for compatibility \unexpanded\def\unknown - {\dontleavehmode\punten[3]} + {\dontleavehmode\periods[3]} \def\midboundarycharacter#1#2% {%\nobreak @@ -579,11 +569,11 @@ % actually this is pretty old, but temporary moved here -\def\stelkoppeltekenin +\def\setuphyphenmark {\dodoubleargument\getparameters[\??kp]} -\stelkoppeltekenin - [\c!teken=\compoundhyphen] +\setuphyphenmark + [\c!sign=\compoundhyphen] \definehspace [sentence] [\zeropoint] \definehspace [intersentence] [.250em] @@ -608,7 +598,7 @@ [\c!rightsubsentence] [\rightboundarycharacter\c!rightsubsentence{sentence}] -\installdiscretionaries || \@@kpteken +\installdiscretionaries || \@@kpsign \newsignal \subsentencesignal \newcounter\subsentencelevel @@ -695,7 +685,7 @@ \def\leftquotationmark {\setbox\scratchbox\hbox{\symbol[\c!leftquotation]}% - \doif\@@ciplaats\v!marge{\hskip-\wd\scratchbox}% + \doif\@@cilocation\v!margin{\hskip-\wd\scratchbox}% \box\scratchbox} \def\rightquotationmark @@ -703,32 +693,32 @@ \newsignal\quotationsignal -\def\stelciterenin +\def\setupquote {\dodoubleargument\getparameters[\??ci]} -\def\stelcitatenin - {\stelciterenin} +% \def\setuoquotation +% {\setupquote} -\def\startcitaat - {\bgroup\dosingleempty\dostartcitaat} +\def\startquotation + {\bgroup\dosingleempty\dostartquotation} -\def\dostartcitaat[#1]% - {\@@civoor +\def\dostartquotation[#1]% + {\@@cibefore \doifelsenothing{#1} - {\let\dostopcitaat\relax} - {\startsmaller[#1]% - \let\dostopcitaat\stopsmaller}% - \dostartattributes\??ci\c!letter\c!kleur\empty + {\let\dostopquotation\relax} + {\startnarrower[#1]% + \let\dostopquotation\stopnarrower}% + \dostartattributes\??ci\c!style\c!color\empty \leftquotationmark \ignorespaces} -\def\stopcitaat +\def\stopquotation {\removeunwantedspaces \removelastskip \rightquotationmark \dostopattributes - \dostopcitaat - \@@cina + \dostopquotation + \@@ciafter \egroup} \def\dohandlequotation#1#2% @@ -747,13 +737,13 @@ \def\handlequotation#1% {\dohandlequotation{#1}\relax} -\unexpanded\def\citaat +\unexpanded\def\quotation {\groupedcommand {\dohandlequotation\c!leftquotation \relax} {\dohandlequotation\c!rightquotation\removelastskip}} -\unexpanded\def\citeer - {\doifelse\@@ciletter\v!normaal\doquotedcite\doattributedcite} +\unexpanded\def\quote + {\doifelse\@@cistyle\v!normal\doquotedcite\doattributedcite} \def\doquotedcite {\groupedcommand @@ -762,14 +752,14 @@ \def\doattributedcite {\groupedcommand - {\dostartattributes\??ci\c!letter\c!kleur} + {\dostartattributes\??ci\c!style\c!color} {\dostopattributes}} %D The previous one fails in \placefloat[left]{}{}, so instead %D we use the next alternative, where the first one is handled %D outside group. Watch the strut. -\unexpanded\def\citaat +\unexpanded\def\quotation {\dohandlequotation\c!leftquotation\relax \groupedcommand \donothing {\dohandlequotation\c!rightquotation\removelastskip}} @@ -779,12 +769,12 @@ \groupedcommand \donothing {\dohandlequotation\c!rightquote\removelastskip}} -\stelciterenin - [\c!plaats=\v!marge, - \c!letter=\v!normaal, - \c!kleur=, - \c!voor=\startsmaller, - \c!na=\stopsmaller] +\setupquote + [\c!location=\v!margin, + \c!style=\v!normal, + \c!color=, + \c!before=\startnarrower, + \c!after=\stopnarrower] %D The next features was so desperately needed by Giuseppe %D Bilotta that he made a module for it. Since this is a @@ -827,7 +817,7 @@ {\dohandlequotation\c!rightspeech\removelastskip \doglobal\decrement\speechlevel\relax}} -\appendtoks \dohandlespeech \to \everypar +% \appendtoks \dohandlespeech \to \everypar % this will replace the quotation and speed definitions @@ -845,26 +835,26 @@ {\doifassignmentelse{#2} {\getparameters [\??ci#1] - [\c!plaats=\v!marge, % \v!tekst \v!alinea - \c!voorwit=, - \c!nawit=\delimitedtextparameter\c!voorwit, - \c!letter=\v!normaal, - \c!kleur=, - \c!linkermarge=\zeropoint, - \c!rechtermarge=\delimitedtextparameter\c!linkermarge, - \c!springvolgendein=\v!ja, - \c!voor=, - \c!na=, - \c!links=, - \c!rechts=, - \c!niveau=0, - \c!herhaal=\v!nee, + [\c!location=\v!margin, % \v!text \v!paragraph + \c!spacebefore=, + \c!spaceafter=\delimitedtextparameter\c!spacebefore, + \c!style=\v!normal, + \c!color=, + \c!leftmargin=\zeropoint, + \c!rightmargin=\delimitedtextparameter\c!leftmargin, + \c!indentnext=\v!yes, + \c!before=, + \c!after=, + \c!left=, + \c!right=, + \c!level=0, + \c!repeat=\v!no, #2]}% {\doifdefined{#2} {\copyparameters[\??ci#1][\??ci#2] - [\c!plaats,\c!voorwit,\c!nawit,\c!letter,\c!kleur, - \c!linkermarge,\c!rechtermarge,\c!springvolgendein, - \c!voor,\c!na,\c!links,\c!rechts]}}% + [\c!location,\c!spacebefore,\c!spaceafter,\c!style,\c!color, + \c!leftmargin,\c!rightmargin,\c!indentnext, + \c!before,\c!after,\c!left,\c!right]}}% \doifsomething{#1} {\unexpanded\setvalue{#1}{\delimitedtext[#1]}% \setvalue{\e!start#1}{\startdelimitedtext[#1]}% @@ -881,37 +871,37 @@ \fi} \def\dorepeatdelimitedtext - {\relax\ifcase\delimitedtextparameter\c!niveau\else - \dohandledelimitedtext\c!midden + {\relax\ifcase\delimitedtextparameter\c!level\else + \dohandledelimitedtext\c!middle \fi} \def\startdelimitedtext[#1]% {\bgroup \def\currentdelimitedtext{#1}% - \doif{\delimitedtextparameter\c!herhaal}\v!ja + \doif{\delimitedtextparameter\c!repeat}\v!yes {\appendtoks \dorepeatdelimitedtext \to \everypar}% - \doifinsetelse{\delimitedtextparameter\c!plaats}{\v!alinea,\v!marge}% + \doifinsetelse{\delimitedtextparameter\c!location}{\v!paragraph,\v!margin}% {\dosingleempty\dostartdelimitedtextpar}\dostartdelimitedtexttxt} \def\dostartdelimitedtextpar[#1]% {\let\dostopdelimitedtext\dostopdelimitedtextpar - \doifsomething{\delimitedtextparameter\c!voorwit} - {\blanko[\delimitedtextparameter\c!voorwit]}% - \delimitedtextparameter\c!voor + \doifsomething{\delimitedtextparameter\c!spacebefore} + {\blank[\delimitedtextparameter\c!spacebefore]}% + \delimitedtextparameter\c!before % nicer: - % \doadaptleftskip {\delimitedtextparameter\c!linkermarge}% - % \doadaptrightskip{\delimitedtextparameter\c!rechtermarge}% + % \doadaptleftskip {\delimitedtextparameter\c!leftmargin}% + % \doadaptrightskip{\delimitedtextparameter\c!rightmargin}% % backward compatible: \doifelsenothing{#1} - {\doadaptleftskip {\delimitedtextparameter\c!linkermarge}% - \doadaptrightskip{\delimitedtextparameter\c!rechtermarge}% + {\doadaptleftskip {\delimitedtextparameter\c!leftmargin}% + \doadaptrightskip{\delimitedtextparameter\c!rightmargin}% \let\dodostopdelimitedtextpar\endgraf} - {\startsmaller[#1]\let\dodostopdelimitedtextpar\stopsmaller}% + {\startnarrower[#1]\let\dodostopdelimitedtextpar\stopnarrower}% % so far \dochecknextindentation{\??ci\currentdelimitedtext}% - \dostartattributes{\??ci\currentdelimitedtext}\c!letter\c!kleur\empty + \dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color\empty \leftdelimitedtextmark - \doglobal\incrementvalue{\??ci\currentdelimitedtext\c!niveau}% + \doglobal\incrementvalue{\??ci\currentdelimitedtext\c!level}% \ignorespaces} \def\dostopdelimitedtextpar @@ -920,30 +910,30 @@ \rightdelimitedtextmark \dostopattributes \dodostopdelimitedtextpar - \delimitedtextparameter\c!na - \doifsomething{\delimitedtextparameter\c!nawit} - {\blanko[\delimitedtextparameter\c!nawit]}} + \delimitedtextparameter\c!after + \doifsomething{\delimitedtextparameter\c!spaceafter} + {\blank[\delimitedtextparameter\c!spaceafter]}} \def\dostartdelimitedtexttxt {\let\dostopdelimitedtext\dostopdelimitedtexttxt - \dostartattributes{\??ci\currentdelimitedtext}\c!letter\c!kleur\empty - \dohandledelimitedtext\c!links + \dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color\empty + \dohandledelimitedtext\c!left \ignorespaces} \def\dostopdelimitedtexttxt {\removeunwantedspaces - \dohandledelimitedtext\c!rechts + \dohandledelimitedtext\c!right \dostopattributes} \def\stopdelimitedtext {\dostopdelimitedtext - \doglobal\decrementvalue{\??ci\currentdelimitedtext\c!niveau}% + \doglobal\decrementvalue{\??ci\currentdelimitedtext\c!level}% \egroup} \def\delimitedtext[#1]% {\pushmacro\currentdelimitedtext \def\currentdelimitedtext{#1}% - \doifinsetelse{\delimitedtextparameter\c!plaats}{\v!alinea,\v!marge}% + \doifinsetelse{\delimitedtextparameter\c!location}{\v!paragraph,\v!margin}% \dodelimitedtextpar\dodelimitedtexttxt} % shortcuts @@ -954,12 +944,12 @@ \def\leftdelimitedtextmark {\dontleavehmode - \setbox\scratchbox\hbox{\delimitedtextparameter\c!links}% - \doif{\delimitedtextparameter\c!plaats}\v!marge{\hskip-\wd\scratchbox}% + \setbox\scratchbox\hbox{\delimitedtextparameter\c!left}% + \doif{\delimitedtextparameter\c!location}\v!margin{\hskip-\wd\scratchbox}% \box\scratchbox} \def\rightdelimitedtextmark - {\hsmash{\delimitedtextparameter\c!rechts}} + {\hsmash{\delimitedtextparameter\c!right}} \def\dohandledelimitedtext#1#2% {\bgroup @@ -983,26 +973,26 @@ {\dohandledelimitedtext{#1}\relax} \unexpanded\def\dodelimitedtextpar - {\dohandledelimitedtext\c!links\relax + {\dohandledelimitedtext\c!left\relax \groupedcommand \donothing - {\dohandledelimitedtext\c!rechts\removelastskip}} + {\dohandledelimitedtext\c!right\removelastskip}} \unexpanded\def\dodelimitedtexttxt - {\doifelse{\delimitedtextparameter\c!letter}\v!normaal + {\doifelse{\delimitedtextparameter\c!style}\v!normal \doquoteddelimited\doattributeddelimited} \def\doquoteddelimited - {\dohandledelimitedtext\c!links\relax + {\dohandledelimitedtext\c!left\relax \groupedcommand \donothing - {\dohandledelimitedtext\c!rechts + {\dohandledelimitedtext\c!right \removelastskip \popmacro\currentdelimitedtext}} \def\doattributeddelimited {\groupedcommand - {\dostartattributes{\??ci\currentdelimitedtext}\c!letter\c!kleur} + {\dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color} {\dostopattributes \popmacro\currentdelimitedtext}} @@ -1068,22 +1058,22 @@ % seldom used, move from kernel to run time module -\def\dotoevoegen#1% +\def\doadding#1% {\def\next{#1}% - \dorecurse{#1}{\inlinker{\next~+}\let\next\empty\crlf}} + \dorecurse{#1}{\inleft{\next~+}\let\next\empty\crlf}} -\def\complextoevoegen[#1]% - {\blanko +\def\complexadding[#1]% + {\blank \processaction [#1] - [ \v!klein=>\dotoevoegen{3}, - \v!middel=>\dotoevoegen{6}, - \v!groot=>\dotoevoegen{9}, - \s!default=>\dotoevoegen{6}, - \s!unknown=>\dotoevoegen{#1}] - \blanko} - -\definecomplexorsimpleempty\toevoegen + [ \v!small=>\doadding{3}, + \v!medium=>\doadding{6}, + \v!big=>\doadding{9}, + \s!default=>\doadding{6}, + \s!unknown=>\doadding{#1}] + \blank} + +\definecomplexorsimpleempty\adding % seldom used, move from kernel to run time module @@ -1096,20 +1086,20 @@ [\c!x=0,\c!y=0, \c!nx=10,\c!ny=10, \c!dx=.5,\c!dy=.5, - \c!xstap=0,\c!ystap=0, - \c!eenheid=\s!cm, - \c!schaal=1, + \c!xstep=0,\c!ystep=0, + \c!unit=\s!cm, + \c!scale=1, \c!factor=1, - \c!offset=\v!ja, - \c!plaats=\v!links, + \c!offset=\v!yes, + \c!location=\v!left, #1]% \startpositioning - \dimen0=\@@rtdx\@@rteenheid\relax - \dimen0=\@@rtschaal\dimen0\relax + \dimen0=\@@rtdx\@@rtunit\relax + \dimen0=\@@rtscale\dimen0\relax \dimen0=\@@rtfactor\dimen0\relax \multiply\dimen0 \@@rtnx\relax - \dimen2=\@@rtdy\@@rteenheid\relax - \dimen2=\@@rtschaal\dimen2\relax + \dimen2=\@@rtdy\@@rtunit\relax + \dimen2=\@@rtscale\dimen2\relax \dimen2=\@@rtfactor\dimen2\relax \multiply\dimen2 \@@rtny\relax \def\horline @@ -1129,8 +1119,8 @@ \def\setlegend##1##2##3% {\gdef\@@gridc{0}% \dimen0=2em\relax - \dimen2=##2\@@rteenheid\relax - \dimen2=\@@rtschaal\dimen2\relax + \dimen2=##2\@@rtunit\relax + \dimen2=\@@rtscale\dimen2\relax \dimen2=\@@rtfactor\dimen2\relax \divide\dimen0 \dimen2\relax \xdef\@@gride{\number\dimen0}% @@ -1157,16 +1147,16 @@ \doglobal\increment(\@@gridc,##1)}}% \def\draw##1##2##3##4##5##6##7##8##9% {\setuppositioning - [\c!status=##8, - \c!xstap=\v!absoluut, - \c!ystap=\v!absoluut, - \c!eenheid=\@@rteenheid, - \c!schaal=\@@rtschaal, + [\c!state=##8, + \c!xstep=\v!absolute, + \c!ystep=\v!absolute, + \c!unit=\@@rtunit, + \c!scale=\@@rtscale, \c!factor=\@@rtfactor, \c!offset=\@@rtoffset, \c!xoffset=##6, \c!yoffset=##7]% - \doifelse{##9}\v!midden + \doifelse{##9}\v!middle {\scratchdimen##3pt\scratchdimen.5\scratchdimen \edef\@@psxx{\withoutpt\the\scratchdimen}% \scratchdimen##4pt\scratchdimen.5\scratchdimen @@ -1176,25 +1166,25 @@ {\edef\@@psxx{0}\edef\@@psyy{0}\edef\@@pszz{##2}}% \position(\@@psxx,\@@psyy){##1}% \setuppositioning - [\c!status=##8, - \c!xstap=\v!relatief, - \c!ystap=\v!relatief, - \c!schaal=\@@rtschaal, + [\c!state=##8, + \c!xstep=\v!relative, + \c!ystep=\v!relative, + \c!scale=\@@rtscale, \c!factor=\@@rtfactor, \c!offset=\@@rtoffset, - \c!eenheid=\@@rteenheid]% + \c!unit=\@@rtunit]% \dorecurse\@@pszz{\position(##3,##4){##5}}}% \draw \verline\@@rtnx\@@rtdx0\verline\!!zeropoint\!!zeropoint\v!start\empty \draw \horline\@@rtny0\@@rtdy\horline\!!zeropoint\!!zeropoint\v!start\empty \tfx - \doifnot\@@rtxstap{0} - {\setlegend\@@rtxstap\@@rtdx\@@rtx - \draw\legend\@@rtnx\@@rtdx0\legend{-1em}{-1.5em}\v!overlay\@@rtplaats}% - \doifnot\@@rtystap{0} - {\setlegend\@@rtystap\@@rtdy\@@rty - \draw\legend\@@rtny0\@@rtdy\legend{-2em}{-.75ex}\v!overlay\@@rtplaats}% + \doifnot\@@rtxstep{0} + {\setlegend\@@rtxstep\@@rtdx\@@rtx + \draw\legend\@@rtnx\@@rtdx0\legend{-1em}{-1.5em}\v!overlay\@@rtlocation}% + \doifnot\@@rtystep{0} + {\setlegend\@@rtystep\@@rtdy\@@rty + \draw\legend\@@rtny0\@@rtdy\legend{-2em}{-.75ex}\v!overlay\@@rtlocation}% \stoppositioning \endgroup} @@ -1218,21 +1208,21 @@ % % eigenlijk kan ook door... zo worden uitgebreid! -\doornummeren +\defineenumeration [@publicatie] - [\c!plaats=\v!links, - \c!breedte=\@@pbbreedte,\c!hang=,\c!monster=, - \c!voor=\@@pbvoor,\c!na=\@@pbna,\c!tussen=, - \c!kopletter=\@@pbkopletter,\c!letter=, - \c!kopkleur=\@@pbkopkleur,\c!kleur=, - \c!wijze=\@@pbwijze,\c!blokwijze=\@@pbblokwijze, - \c!tekst=,\c!links=\@@pblinks,\c!rechts=\@@pbrechts] - -\def\dostelpublicatiesin[#1]% + [\c!location=\v!left, + \c!width=\@@pbwidth,\c!hang=,\c!sample=, + \c!before=\@@pbbefore,\c!after=\@@pbafter,\c!inbetween=, + \c!headstyle=\@@pbheadstyle,\c!style=, + \c!headcolor=\@@pbheadcolor,\c!color=, + \c!way=\@@pbway,\c!blockway=\@@pbblockway, + \c!text=,\c!left=\@@pbleft,\c!right=\@@pbright] + +\def\dosetuppublications[#1]% {\getparameters[\??pb][#1]} -\def\stelpublicatiesin% - {\dosingleargument\dostelpublicatiesin} +\def\setuppublications% + {\dosingleargument\dosetuppublications} \def\apa@publicatie {\doifsomething\@@pb@naam {\@@pb@naam,\space}% @@ -1255,50 +1245,50 @@ {\letvalue{\??pb @##1}\empty \setvalue{##1}####1{\setvalue{\??pb @##1}{####1}\ignorespaces}}% \def\getpublicatie% - {\doifsomething\@@pbvariant{\getvalue{\@@pbvariant @publicatie}}}% - \doifelse\@@pbnummeren\v!ja + {\doifsomething\@@pbalternative{\getvalue{\@@pbalternative @publicatie}}}% + \doifelse\@@pbnumbering\v!yes {\@publicatie[#1]\dosetpublicatie#2\getpublicatie\par}% - {\@@pbvoor + {\@@pbbefore \dosetpublicatie\ignorespaces#2\getpublicatie - \@@pbna}% + \@@pbafter}% \egroup} \definecomplexorsimpleempty\startpublicatie -\def\publicatie#1[#2]% - {\@@pblinks\in{#1}[#2]\@@pbrechts} +\def\publication#1[#2]% + {\@@pbleft\in{#1}[#2]\@@pbright} -\stelpublicatiesin - [\c!nummeren=\v!ja, - \c!variant=\c!apa, - \c!breedte=2em, +\setuppublications + [\c!numbering=\v!yes, + \c!alternative=\c!apa, + \c!width=2em, \c!hang=, - \c!monster=, - \c!voor=, - \c!na=, - \c!tussen=, - \c!kopletter=, - \c!kopkleur=, - \c!letter=, - \c!kleur=, - \c!blokwijze=\v!per\v!tekst, - \c!wijze=\v!per\v!tekst, - \c!tekst=, - \c!links={[}, - \c!rechts={]}] + \c!sample=, + \c!before=, + \c!after=, + \c!inbetween=, + \c!headstyle=, + \c!headcolor=, + \c!style=, + \c!color=, + \c!blockway=\v!by\v!text, + \c!way=\v!by\v!text, + \c!text=, + \c!left={[}, + \c!right={]}] % only used at pragma, move from kernel to run time module -\def\kenmerkdatum - {\currentdate[\v!kenmerk]} +\def\referraldate + {\currentdate[\v!referral]} -\def\dokenmerk[#1]% +\def\doreferral[#1]% {\noheaderandfooterlines \bgroup \getparameters [\??km] [\c!bet=\unknown,\c!dat=\unknown,\c!ken=\unknown, - \c!van=,\c!aan=,\c!ref=,#1]% + \c!from=,\c!to=,\c!ref=,#1]% % moet anders, hoort niet in 01b \assigntranslation[\s!nl=referentie,\s!en=reference,\s!de=Referenz,\s!sp=referencia]\to\@@@kmref \assigntranslation[\s!nl=van,\s!en=from,\s!de=Von,\s!sp=de]\to\@@@kmvan @@ -1311,16 +1301,16 @@ \startdummy \NC\@@@kmbet\EQ\@@kmbet\NC\NR \NC\@@@kmdat\EQ\@@kmdat\NC\NR - \NC\@@@kmken\EQ\expanded{\kap{\@@kmken}}\NC\NR - \doifsomething{\@@kmvan\@@kmaan}{\NC\NC\NC\NR}% - \doifsomething \@@kmvan {\NC\@@@kmvan\EQ\@@kmvan\NC\NR}% - \doifsomething \@@kmaan {\NC\@@@kmaan\EQ\@@kmaan\NC\NR}% + \NC\@@@kmken\EQ\expanded{\smallcapped{\@@kmken}}\NC\NR + \doifsomething{\@@kmfrom\@@kmto}{\NC\NC\NC\NR}% + \doifsomething \@@kmfrom {\NC\@@@kmvan\EQ\@@kmfrom\NC\NR}% + \doifsomething \@@kmto {\NC\@@@kmaan\EQ\@@kmto\NC\NR}% \doifsomething \@@kmref {\NC\NC\NC\NR\NC\@@@kmref\EQ\@@kmref\NC\NR}% \stopdummy \egroup} -\def\kenmerk - {\dosingleargument\dokenmerk} +\def\referral + {\dosingleargument\doreferral} % NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW % NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW @@ -1357,8 +1347,8 @@ \stelrijenin [\c!n=2, - \c!boven=, - \c!onder=\vfill] + \c!top=, + \c!bottom=\vfill] % THIS WAS MAIN-003.TEX @@ -1391,24 +1381,24 @@ \stopmessages \definetabulate - [\v!legenda] + [\v!legend] [|emj1|i1|mR|] \setuptabulate - [\v!legenda] - [\c!eenheid=.75em,\c!binnen=\setquicktabulate\leg,EQ={=}] + [\v!legend] + [\c!unit=.75em,\c!inner=\setquicktabulate\leg,EQ={=}] \definetabulate - [\v!legenda][\v!twee] + [\v!legend][\v!two] [|emj1|emk1|i1|mR|] \definetabulate - [\v!gegeven] + [\v!fact] [|R|ecmj1|i1mR|] \setuptabulate - [\v!gegeven] - [\c!eenheid=.75em,\c!binnen=\setquicktabulate\geg,EQ={=}] + [\v!fact] + [\c!unit=.75em,\c!inner=\setquicktabulate\fact,EQ={=}] \unexpanded\def\xbox {\bgroup\aftergroup\egroup\hbox\bgroup\tx\let\next=} @@ -1519,7 +1509,7 @@ %D \type {bottom} or \type {right}. The macro macro is used as %D follows. %D -%D \starttypen +%D \starttyping %D \placefigure %D {whow} %D {\placelegend @@ -1570,7 +1560,7 @@ %D {\startitemize[packed] %D \item head \item legs \item tail \item belly \item horns %D \stopitemize}} -%D \stoptypen +%D \stoptyping \newbox\firstpairedbox \newbox\secondpairedbox @@ -1582,20 +1572,22 @@ {\getparameters [\??ld#1] [\c!n=1, - \c!afstand=\bodyfontsize, - \c!voor=, - \c!na=, - \c!tussen={\blanko[\v!middel]}, - \c!breedte=\hsize, - \c!hoogte=\vsize, - \c!maxbreedte=\zetbreedte, - \c!maxhoogte=\zethoogte, - \c!korps=, - \c!uitlijnen=, - \c!plaats=\v!onder, + \c!distance=\bodyfontsize, + \c!before=, + \c!after=, + \c!color=, + \c!style=, + \c!inbetween={\blank[\v!medium]}, + \c!width=\hsize, + \c!height=\vsize, + \c!maxwidth=\makeupwidth, + \c!maxheight=\makeupheight, + \c!bodyfont=, + \c!align=, + \c!location=\v!bottom, #2]% - \setvalue{\e!stel#1\e!in}{\setuppairedbox[#1]}% - \setvalue{\e!plaats#1}{\placepairedbox[#1]}} + \setvalue{\e!setup#1\e!endsetup}{\setuppairedbox[#1]}% + \setvalue{\e!place#1}{\placepairedbox[#1]}} \def\setuppairedbox {\dodoubleempty\dosetuppairedbox} @@ -1608,19 +1600,19 @@ \def\doplacepairedbox[#1][#2]% watch the hsize/vsize tricks {\setuppairedbox[#1][#2]% % and don't change them - \copyparameters + \copyparameters % brrr [\??ld][\??ld#1] - [\c!n,\c!afstand,\c!tussen,\c!voor,\c!na, - \c!breedte,\c!hoogte,\c!maxbreedte,\c!maxhoogte, - \c!korps,\c!uitlijnen,\c!plaats]% - \@@ldvoor\bgroup + [\c!n,\c!distance,\c!inbetween,\c!before,\c!after, + \c!width,\c!height,\c!maxwidth,\c!maxheight, + \c!color,\c!style,\c!bodyfont,\c!align,\c!location]% + \@@ldbefore\bgroup \global\setsystemmode{pairedbox}% \beforefirstpairedbox \dowithnextbox {\betweenbothpairedboxes \dowithnextbox {\afterbothpairedboxes - \egroup\@@ldna + \egroup\@@ldafter \egroup} \vbox\bgroup \insidesecondpairedbox @@ -1630,47 +1622,47 @@ \def\beforefirstpairedbox {\chardef\pairedlocationa1 % left \chardef\pairedlocationb4 % middle - \getfromcommacommand[\@@ldplaats][1]% + \getfromcommacommand[\@@ldlocation][1]% \processaction [\commalistelement] - [ \v!links=>\chardef\pairedlocationa0, - \v!rechts=>\chardef\pairedlocationa1, - \v!boven=>\chardef\pairedlocationa2, - \v!onder=>\chardef\pairedlocationa3]% - \getfromcommacommand[\@@ldplaats][2]% + [ \v!left=>\chardef\pairedlocationa0, + \v!right=>\chardef\pairedlocationa1, + \v!top=>\chardef\pairedlocationa2, + \v!bottom=>\chardef\pairedlocationa3]% + \getfromcommacommand[\@@ldlocation][2]% \processaction [\commalistelement] - [ \v!links=>\chardef\pairedlocationb0, - \v!rechts=>\chardef\pairedlocationb1, - \v!hoog=>\chardef\pairedlocationb2, - \v!boven=>\chardef\pairedlocationb2, - \v!laag=>\chardef\pairedlocationb3, - \v!onder=>\chardef\pairedlocationb3, - \v!midden=>\chardef\pairedlocationb4]} + [ \v!left=>\chardef\pairedlocationb0, + \v!right=>\chardef\pairedlocationb1, + \v!high=>\chardef\pairedlocationb2, + \v!top=>\chardef\pairedlocationb2, + \v!low=>\chardef\pairedlocationb3, + \v!bottom=>\chardef\pairedlocationb3, + \v!middle=>\chardef\pairedlocationb4]} \def\betweenbothpairedboxes - {\switchtobodyfont[\@@ldkorps]% split under same regime + {\switchtobodyfont[\@@ldbodyfont]% split under same regime \setbox\firstpairedbox\flushnextbox \ifnum\pairedlocationa<2 \hsize\wd\firstpairedbox % trick - \hsize\@@ldbreedte + \hsize\@@ldwidth \scratchdimen\wd\firstpairedbox - \advance\scratchdimen \@@ldafstand + \advance\scratchdimen \@@lddistance \bgroup\advance\scratchdimen \hsize - \ifdim\scratchdimen>\@@ldmaxbreedte\relax + \ifdim\scratchdimen>\@@ldmaxwidth\relax \egroup - \hsize\@@ldmaxbreedte + \hsize\@@ldmaxwidth \advance\hsize -\scratchdimen \else \egroup \fi \else \hsize\wd\firstpairedbox - \hsize\@@ldbreedte % can be \hsize - \ifdim\hsize>\@@ldmaxbreedte\relax \hsize\@@ldmaxbreedte \fi % can be \hsize + \hsize\@@ldwidth % can be \hsize + \ifdim\hsize>\@@ldmaxwidth\relax \hsize\@@ldmaxwidth \fi % can be \hsize \fi \ifnum\@@ldn>\plusone - \setrigidcolumnhsize\hsize\@@ldafstand\@@ldn + \setrigidcolumnhsize\hsize\@@lddistance\@@ldn \fi} % \def\afterbothpairedboxes @@ -1718,17 +1710,23 @@ \def\afterbothpairedboxes {\setbox\secondpairedbox\vbox - {\ifnum\@@ldn>1 \rigidcolumnbalance\nextbox \else \flushnextbox \fi}% + {% \localstartcolor[\@@ldcolor]% does not work yet + \ifnum\@@ldn>1 + \rigidcolumnbalance\nextbox + \else + \flushnextbox + \fi + }% \localstopcolor}% \ifnum\pairedlocationa<2\hbox\else\vbox\fi\bgroup % hide vsize \forgetall \ifnum\pairedlocationa<2 \scratchdimen\maxoftwoboxdimens\ht\firstpairedbox\secondpairedbox \vsize\scratchdimen - \ifdim\scratchdimen<\@@ldhoogte\relax % can be \vsize - \scratchdimen\@@ldhoogte + \ifdim\scratchdimen<\@@ldheight\relax % can be \vsize + \scratchdimen\@@ldheight \fi - \ifdim\scratchdimen>\@@ldmaxhoogte\relax - \scratchdimen\@@ldmaxhoogte + \ifdim\scratchdimen>\@@ldmaxheight\relax + \scratchdimen\@@ldmaxheight \fi \valignpairedbox\firstpairedbox \scratchdimen \valignpairedbox\secondpairedbox\scratchdimen @@ -1738,11 +1736,11 @@ \halignpairedbox\secondpairedbox\scratchdimen \scratchdimen\ht\secondpairedbox \vsize\scratchdimen - \ifdim\ht\secondpairedbox<\@@ldhoogte\relax % can be \vsize - \scratchdimen\@@ldhoogte\relax % \relax needed + \ifdim\ht\secondpairedbox<\@@ldheight\relax % can be \vsize + \scratchdimen\@@ldheight\relax % \relax needed \fi - \ifdim\scratchdimen>\@@ldmaxhoogte\relax % todo: totale hoogte - \scratchdimen\@@ldmaxhoogte\relax % \relax needed + \ifdim\scratchdimen>\@@ldmaxheight\relax % todo: totale hoogte + \scratchdimen\@@ldmaxheight\relax % \relax needed \fi \ifdim\scratchdimen>\ht\secondpairedbox \setbox\secondpairedbox\vbox to \scratchdimen @@ -1752,18 +1750,18 @@ \fi \fi \ifcase\pairedlocationa - \box\secondpairedbox\hskip\@@ldafstand\box\firstpairedbox \or - \box\firstpairedbox \hskip\@@ldafstand\box\secondpairedbox\or - \box\secondpairedbox\par \nointerlineskip \@@ldtussen \box\firstpairedbox \or - \box\firstpairedbox \par \nointerlineskip \@@ldtussen \box\secondpairedbox\else + \box\secondpairedbox\hskip\@@lddistance\box\firstpairedbox \or + \box\firstpairedbox \hskip\@@lddistance\box\secondpairedbox\or + \box\secondpairedbox\endgraf \nointerlineskip \@@ldinbetween \box\firstpairedbox \or + \box\firstpairedbox \endgraf \nointerlineskip \@@ldinbetween \box\secondpairedbox\else \fi \egroup} \def\insidesecondpairedbox {\forgetall - \setupalign[\@@lduitlijnen]% + \setupalign[\@@ldalign]% \tolerantTABLEbreaktrue % hm. - \blanko[\v!blokkeer]% + \blank[\v!disable]% \everypar{\begstrut}} \def\maxoftwoboxdimens#1#2#3% @@ -1781,7 +1779,7 @@ \box#1\relax \ifcase\pairedlocationb\hss\or\or\or\or\hss\fi}} -\definepairedbox[\v!legenda] +\definepairedbox[\v!legend] %D Goody: @@ -1801,9 +1799,9 @@ \def\dodefinecombination[#1][#2]% {\copyparameters [\??co#1][\??co] - [\c!breedte,\c!hoogte,\c!afstand,\c!plaats,% - \c!voor,\c!tussen,\c!na,\c!uitlijnen,% - \c!letter,\c!kleur]% + [\c!width,\c!height,\c!distance,\c!location,% + \c!before,\c!inbetween,\c!after,\c!align,% + \c!style,\c!color]% \getparameters [\??co#1][#2]} @@ -1832,8 +1830,8 @@ \let\currentcombination\empty \fi \forgetall - \doifelse{\combinationparameter\c!hoogte}\v!passend - \vbox {\vbox to \combinationparameter\c!hoogte}% + \doifelse{\combinationparameter\c!height}\v!fit + \vbox {\vbox to \combinationparameter\c!height}% \bgroup %\doifelsenothing{#1} % {\dodostartcombination[2*1*]} @@ -1844,21 +1842,21 @@ [\ifsecondargument#2\else\iffirstargument#1\else2\fi\fi*1*]}} \long\def\dodostartcombination[#1*#2*#3]% - {\stelfractiesin - [\c!n=\v!passend,\c!afstand=\combinationparameter\c!afstand]% + {\setuphorizontaldivision + [\c!n=\v!fit,\c!distance=\combinationparameter\c!distance]% \global\horcombination#1% \global\totcombination#2% \global\setbox\combinationstack\emptybox \xdef\maxhorcombination{\the\horcombination}% \multiply\totcombination\horcombination \tabskip\zeropoint - \doifelse{\combinationparameter\c!breedte}\v!passend - {\halign}{\halign to \combinationparameter\c!breedte}% + \doifelse{\combinationparameter\c!width}\v!fit + {\halign}{\halign to \combinationparameter\c!width}% \bgroup&% %\hfil##\hfil% now : location={left,top} - \ExpandBothAfter\doifnotinset\v!links{\combinationparameter\c!plaats}\hfil + \ExpandBothAfter\doifnotinset\v!left{\combinationparameter\c!location}\hfil ##% - \ExpandBothAfter\doifnotinset\v!rechts{\combinationparameter\c!plaats}\hfil + \ExpandBothAfter\doifnotinset\v!right{\combinationparameter\c!location}\hfil &\tabskip\zeropoint \!!plus 1fill##\cr \docombination} @@ -1874,8 +1872,8 @@ \def\nextnext {\ifx\nexttoken\egroup \else % the next box is empty \hsize\wd0 - \setupalign[\combinationparameter\c!uitlijnen]% - \dostartattributes{\??co\currentcombination}\c!letter\c!kleur\empty + \setupalign[\combinationparameter\c!align]% + \dostartattributes{\??co\currentcombination}\c!style\c!color\empty \bgroup \aftergroup\endstrut \aftergroup\dostopattributes @@ -1890,19 +1888,19 @@ % % \def\dodocombination % {\vbox -% {\forgetall % \setupwhitespace[\v!geen]% +% {\forgetall % \setupwhitespace[\v!none]% % \let\next\vbox % \ExpandFirstAfter\processallactionsinset -% [\combinationparameter\c!plaats] -% [ \v!boven=>\let\next\tbox, -% \v!midden=>\let\next\halfwaybox]% +% [\combinationparameter\c!location] +% [ \v!top=>\let\next\tbox, +% \v!middle=>\let\next\halfwaybox]% % \next{\copy0}% % \ifdim\ht2>\zeropoint % beter dan \wd2, nu \strut mogelijk -% \@@cotussen +% \combinationparameter\c!inbetween % %\vtop % wrong code % % {\nointerlineskip % recently added % % \hsize\wd0 -% % \setupalign[\combinationparameter\c!uitlijnen]% % \raggedcenter +% % \setupalign[\combinationparameter\c!align]% % \raggedcenter % % \begstrut\unhbox2\endstrut}% % \box2 % \fi}% @@ -1914,15 +1912,15 @@ % {\cr\noalign % {\forgetall % \setupwhitespace[\v!geen]% no % \nointerlineskip -% \combinationparameter\c!na -% \combinationparameter\c!voor +% \combinationparameter\c!before +% \combinationparameter\c!after % \vss % \nointerlineskip}% % \global\horcombination\maxhorcombination\relax % \docombination}% % \else % \def\next -% {&&&\hskip\combinationparameter\c!afstand&\docombination}% +% {&&&\hskip\combinationparameter\c!distance&\docombination}% % \fi % \else % \def\next @@ -1932,12 +1930,12 @@ % \def\dodocombination % {\vbox -% {\forgetall % \setupwhitespace[\v!geen]% +% {\forgetall % \setupwhitespace[\v!none]% % \let\next\vbox % \ExpandFirstAfter\processallactionsinset % [\combinationparameter\c!plaats] -% [ \v!boven=>\let\next\tbox, -% \v!midden=>\let\next\halfwaybox]% +% [ \v!top=>\let\next\tbox, +% \v!middle=>\let\next\halfwaybox]% % \next{\copy0}% % % we need to save the caption for a next alignment line % \saveoncombinationstack2}% @@ -1949,18 +1947,18 @@ % {\cr % \flushcombinationstack % \noalign -% {\forgetall % \setupwhitespace[\v!geen]% no +% {\forgetall % \setupwhitespace[\v!none]% no % \global\setbox\combinationstack\emptybox % \nointerlineskip -% \combinationparameter\c!na -% \combinationparameter\c!voor +% \combinationparameter\c!after +% \combinationparameter\c!before % \vss % \nointerlineskip}% % \global\horcombination\maxhorcombination\relax % \docombination}% % \else % \def\next -% {&&&\hskip\combinationparameter\c!afstand&\docombination}% +% {&&&\hskip\combinationparameter\c!distance&\docombination}% % \fi % \else % \def\next @@ -1982,12 +1980,12 @@ \def\dodocombination {\vbox - {\forgetall % \setupwhitespace[\v!geen]% + {\forgetall % \setupwhitespace[\v!none]% \let\next\vbox \ExpandFirstAfter\processallactionsinset - [\combinationparameter\c!plaats] - [ \v!boven=>\let\next\depthonlybox, % \tbox, - \v!midden=>\let\next\halfwaybox]% + [\combinationparameter\c!location] + [ \v!top=>\let\next\depthonlybox, % \tbox, + \v!middle=>\let\next\halfwaybox]% \next{\copy0}% % we need to save the caption for a next alignment line \saveoncombinationstack2}% @@ -1999,18 +1997,18 @@ {\cr \flushcombinationstack \noalign - {\forgetall % \setupwhitespace[\v!geen]% no + {\forgetall % \setupwhitespace[\v!none]% no \global\setbox\combinationstack\emptybox \nointerlineskip - \combinationparameter\c!na - \combinationparameter\c!voor + \combinationparameter\c!after + \combinationparameter\c!before \vss \nointerlineskip}% \global\horcombination\maxhorcombination\relax \docombination}% \else \def\next - {&&&\hskip\combinationparameter\c!afstand&\docombination}% + {&&&\hskip\combinationparameter\c!distance&\docombination}% \fi \else \def\next @@ -2034,7 +2032,7 @@ {\noalign {\ifdim\ht\combinationstack>\zeropoint \nointerlineskip % nieuw - \combinationparameter\c!tussen + \combinationparameter\c!inbetween \global\horcombination\maxhorcombination \globallet\doflushcombinationstack\dodoflushcombinationstack \else @@ -2059,16 +2057,16 @@ \next} \setupcombinations - [\c!breedte=\v!passend, - \c!hoogte=\v!passend, - \c!afstand=1em, - \c!plaats=\v!onder, % can be something {top,left} - \c!voor=\blanko, - \c!tussen={\blanko[\v!middel]}, - \c!letter=, - \c!kleur=, - \c!na=, - \c!uitlijnen=\v!midden] + [\c!width=\v!fit, + \c!height=\v!fit, + \c!distance=1em, + \c!location=\v!bottom, % can be something {top,left} + \c!before=\blank, + \c!inbetween={\blank[\v!medium]}, + \c!style=, + \c!color=, + \c!after=, + \c!align=\v!middle] % does not work % @@ -2105,20 +2103,20 @@ \def\placesidebyside {\plaatsondernaastelkaar\valign\vss} -\def\dogebruikexternefiles[#1][#2]% +\def\douseexternalfiles[#1][#2]% {\getparameters [\??fi#1] [\c!file=, - \c!korps=, - \c!optie=, + \c!bodyfont=, + \c!option=, #2]} -\def\gebruikexternefiles - {\dodoubleargument\dogebruikexternefiles} +\def\useexternalfiles + {\dodoubleargument\douseexternalfiles} \def\dostelexternefilesin[#1][#2]% {\doifundefinedelse{\??fi#1\c!file} - {\gebruikexternefiles[#1][#2]} + {\useexternalfiles[#1][#2]} {\getparameters[\??fi#1][#2]}} \def\stelexternefilesin @@ -2128,28 +2126,28 @@ {\bgroup \getparameters[\??fi#1][\c!file=,#3]% \doinputonce{\getvalue{\??fi#1\c!file}}% - \ExpandFirstAfter\switchtobodyfont[\getvalue{\??fi#1\c!korps}]% + \ExpandFirstAfter\switchtobodyfont[\getvalue{\??fi#1\c!bodyfont}]% \readsysfile{#2} % beter: loc of fix gebied \donothing {\showmessage\m!systems{41}{#2,#1}}% \egroup} -\def\dogebruikexternefile[#1][#2][#3][#4]% +\def\douseexternalfile[#1][#2][#3][#4]% {\stelexternefilesin[#1][]% \doinputonce{\getvalue{\??fi#1\c!file}}% \doifelsenothing{#2} {\setvalue{#3}{\verwerkexternefile{#1}{#3}{#4}}} {\setvalue{#2}{\verwerkexternefile{#1}{#3}{#4}}}} -\def\gebruikexternefile - {\doquadrupleargument\dogebruikexternefile} +\def\useexternalfile + {\doquadrupleargument\douseexternalfile} -\gebruikexternefiles +\useexternalfiles [pictex] - [\c!korps=\v!klein, + [\c!bodyfont=\v!small, \c!file=pictex] -\gebruikexternefiles +\useexternalfiles [table] [\c!file=table] @@ -2175,7 +2173,7 @@ % {\bgroup % \hbox\bgroup % compatibility hack % \dowithnextbox -% {\edef\@@rorotatie{#1}% +% {\edef\@@rorotation{#1}% % \setbox\nextbox\vbox{\flushnextbox}% % \dostoprotate % \egroup}} @@ -2183,16 +2181,16 @@ % \def\dodostoprotate#1#2#3#4#5#6% % {\dontshowcomposition % \scratchdimen\nextboxht\advance\scratchdimen\nextboxdp -% \doif\@@roplaats\v!hoog +% \doif\@@rolocation\v!high % {\setbox\nextbox\vbox{\hbox{\raise\nextboxdp\flushnextbox}}}% % \setbox\nextbox\vbox to #1 % {#2\relax % \hbox to #4 % {#5\relax % \number removes leading spaces too -% \edef\@@rorotatie{\number\@@rorotatie}% -% \doifelsenothing\@@rorotatie +% \edef\@@rorotation{\number\@@rorotation}% +% \doifelsenothing\@@rorotation % {\dostartrotation{90}} -% {\dostartrotation{\@@rorotatie}}% +% {\dostartrotation{\@@rorotation}}% % \nextboxwd\zeropoint % \nextboxht\zeropoint % %\nextboxdp\zeropoint @@ -2205,7 +2203,7 @@ % \egroup} % % \def\dostoprotate -% {\!!counta\@@rorotatie +% {\!!counta\@@rorotation % \divide\!!counta 90 % \ifcase\!!counta % \dodostoprotate\nextboxht\relax\vfill\nextboxwd\relax\hfill @@ -2220,7 +2218,7 @@ % \or % \dodostoprotate\nextboxht\relax\vfill\nextboxwd\relax\hfill % \else -% \def\@@rotatie{90}% +% \def\@@rotation{90}% % \dodostoprotate\nextboxht\relax\vfill\nextboxwd\relax\hfill % \fi} % @@ -2234,11 +2232,11 @@ % {\bgroup\complexorsimpleempty\rotate} % % \setuprotate -% [\c!rotatie=90, -% \c!breedte=\v!passend, -% \c!hoogte=\v!passend, +% [\c!rotation=90, +% \c!width=\v!fir, +% \c!height=\v!fit, % \c!offset=\v!overlay, -% \c!kader=\v!uit] +% \c!frame=\v!off] % The previous implementation is replaced by one that supports % rotation over arbitrary angles. @@ -2256,7 +2254,7 @@ {\setbox\nextbox\vbox to \@@layerysiz {\vfill \hbox to \@@layerxsiz - {\dostartrotation\@@rorotatie + {\dostartrotation\@@rorotation \nextboxwd\zeropoint \nextboxht\zeropoint \flushnextbox @@ -2288,8 +2286,8 @@ \fi \setbox\nextbox\vbox{\hbox{\raise\nextboxdp\flushnextbox}}% \!!dimena \nextboxht - \calculatecos\@@rorotatie\edef\cos{\calculatedcos\@@rorotatie}% - \calculatesin\@@rorotatie\edef\sin{\calculatedsin\@@rorotatie}% + \calculatecos\@@rorotation\edef\cos{\calculatedcos\@@rorotation}% + \calculatesin\@@rorotation\edef\sin{\calculatedsin\@@rorotation}% \@@layerxpos\zeropoint \@@layerypos\zeropoint \@@layerxoff\zeropoint @@ -2376,9 +2374,9 @@ \def\dorotatenextbox#1#2% {\doifsomething{#1} - {\edef\@@rorotatie{\number#1}% get rid of leading zeros and spaces + {\edef\@@rorotation{\number#1}% get rid of leading zeros and spaces \setbox\nextbox\vbox{\flushnextbox}% not really needed - \dodorotatenextbox\@@rorotatie#2}% + \dodorotatenextbox\@@rorotation#2}% \hbox{\boxcursor\flushnextbox}} \def\dodorotatebox#1% {angle} \hbox/\vbox/\vtop @@ -2400,19 +2398,19 @@ \def\complexrotate[#1]% framed met diepte ! {\getparameters[\??ro][#1]% \processaction - [\@@roplaats] - [\v!diepte=>\!!counta\plusthree\donefalse,% depth fit - raw box - \v!passend=>\!!counta\plustwo \donefalse,% depth tight - raw box - \v!ruim=>\!!counta\plusone \donefalse,% nodepth fit - raw box - \v!hoog=>\!!counta\plusone \donetrue,% nodepth fit - framed + [\@@rolocation] + [\v!depth=>\!!counta\plusthree\donefalse,% depth fit - raw box + \v!fit=>\!!counta\plustwo \donefalse,% depth tight - raw box + \v!broad=>\!!counta\plusone \donefalse,% nodepth fit - raw box + \v!high=>\!!counta\plusone \donetrue,% nodepth fit - framed \s!default=>\!!counta\plusthree\donetrue,% depth fit - framed \s!unknown=>\!!counta\plusthree\donetrue]% depth fit - framed \ifdone - \def\docommand{\localframed[\??ro][#1,\c!plaats=]}% + \def\docommand{\localframed[\??ro][#1,\c!location=]}% \else \let\docommand\relax \fi - \dowithnextbox{\dorotatenextbox\@@rorotatie\!!counta\egroup}\vbox\docommand} + \dowithnextbox{\dorotatenextbox\@@rorotation\!!counta\egroup}\vbox\docommand} \presetlocalframed[\??ro] @@ -2420,12 +2418,12 @@ {\dodoubleargument\getparameters[\??ro]} \setuprotate - [\c!rotatie=90, - \c!plaats=\v!normaal, - \c!breedte=\v!passend, - \c!hoogte=\v!passend, + [\c!rotation=90, + \c!location=\v!normal, + \c!width=\v!fit, + \c!height=\v!fit, \c!offset=\v!overlay, - \c!kader=\v!uit] + \c!frame=\v!off] % \dostepwiserecurse{0}{360}{10} % {\startlinecorrection[blank] @@ -2439,72 +2437,18 @@ % \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=high] {\ruledhbox{\bfb (high)}}}}} % \stoplinecorrection} -% schaal - -% \def\doscalelikeafigure -% {\doifsomething{\@@xyfactor\@@xyhfactor\@@xybfactor\@@xyschaal -% \@@xybreedte\@@xyhoogte\@@xyregels} -% {\let \@@efschaal \@@xyschaal -% \let \@@effactor \@@xyfactor -% \let \@@efbfactor\@@xybfactor -% \let \@@efhfactor\@@xyhfactor -% \let \@@efbreedte\@@xybreedte -% \let \@@efhoogte \@@xyhoogte -% \let \@@efregels \@@xyregels -% \let \@@epx \!!zeropoint -% \let \@@epy \!!zeropoint -% \edef\@@epw {\the\nextboxwd}% -% \edef\@@eph {\the\nextboxht}% -% \checkfiguresettings -% \setfactorfiguresize -% \setscalefiguresize -% \setdimensionfiguresize -% \convertfigureinsertscale\@@epx\figx\figxsca\scax -% \convertfigureinsertscale\@@epy\figy\figysca\scay -% \scratchdimen\scax\points\divide\scratchdimen 100 -% \edef\@@xysx{\withoutpt\the\scratchdimen}% -% \scratchdimen\scay\points\divide\scratchdimen 100 -% \edef\@@xysy{\withoutpt\the\scratchdimen}}} - -% \def\doschaal[#1]% -% {\bgroup -% \forgetall -% \getparameters -% [\??xy] -% [\c!schaal=,\c!breedte=,\c!hoogte=,\c!regels=, -% \c!factor=,\c!hfactor=,\c!bfactor=, -% \c!sx=1,\c!sy=1,#1]% -% \dowithnextbox -% {\dontshowcomposition -% \ifdim\nextboxht>\zeropoint \ifdim\nextboxwd>\zeropoint -% \doscalelikeafigure -% \dimen0=\@@xysy\nextboxht -% \dimen2=\@@xysy\nextboxdp -% \dimen4=\@@xysx\nextboxwd -% \dimen6=\dimen0\advance\dimen6 \dimen2 -% \setbox\nextbox\vbox to \dimen6 -% {\nextboxht\zeropoint -% \nextboxdp\zeropoint -% \vfill % erbij -% \dostartscaling\@@xysx\@@xysy\flushnextbox\dostopscaling}% -% \nextboxht\dimen0 -% \nextboxdp\dimen2 -% \nextboxwd\dimen4 -% \fi \fi -% \flushnextbox -% \egroup} -% \hbox} +% scale \def\doscalelikeafigure % quite dirty and potential interference possible - {\doifsomething{\@@xyfactor\@@xyhfactor\@@xybfactor\@@xyschaal - \@@xybreedte\@@xyhoogte\@@xyregels} - {\let \@@efschaal \@@xyschaal + {\doifsomething{\@@xyfactor\@@xyhfactor\@@xywfactor\@@xyscale + \@@xywidth\@@xyheight\@@xylines} + {\let \@@efscale \@@xyscale \let \@@effactor \@@xyfactor - \let \@@efbfactor\@@xybfactor + \let \@@efwfactor\@@xywfactor \let \@@efhfactor\@@xyhfactor - \let \@@efbreedte\@@xybreedte - \let \@@efhoogte \@@xyhoogte - \let \@@efregels \@@xyregels + \let \@@efwidth\@@xywidth + \let \@@efheight \@@xyheight + \let \@@eflines \@@xylines \let \@@efgrid \@@xygrid \let \@@epx \!!zeropoint \let \@@epy \!!zeropoint @@ -2523,13 +2467,13 @@ \scratchdimen\scay\points \divide\scratchdimen \plushundred \edef\@@xysy{\withoutpt\the\scratchdimen}}} -\def\doschaal[#1]% +\def\doscale[#1]% {\bgroup \forgetall \getparameters [\??xy] - [\c!schaal=,\c!breedte=,\c!hoogte=,\c!regels=, - \c!factor=,\c!hfactor=,\c!bfactor=,\c!grid=, + [\c!scale=,\c!width=,\c!height=,\c!lines=, + \c!factor=,\c!hfactor=,\c!wfactor=,\c!grid=, \c!sx=1,\c!sy=1,#1]% \dowithnextbox {\dontshowcomposition @@ -2555,8 +2499,8 @@ \egroup} \hbox} -\def\schaal - {\dosingleempty\doschaal} +\def\scale + {\dosingleempty\doscale} % mirror @@ -2571,7 +2515,7 @@ \flushnextbox \egroup}} -\def\spiegel +\def\mirror {\domirrorbox\hbox} %\setbox0=\hbox{gans} @@ -2582,32 +2526,38 @@ % to be used in some other places! todo! % -% verdelen \hsize in fracties, wordt nog wat algemener, -% beetje vaag nu +% divides \hsize in fractions, will be made a bit more +% clever and advanced when needed % -% \fractie[n/m,elementen,afstand] +% \horizontaldivision[n/m,elements,distance] % -% \fractie[2/5,3,1em] -% \fractie[2/5,3,1em] -% \fractie[1/5,3,1em] +% \horizontaldivision[2/5,3,1em] +% \horizontaldivision[2/5,3,1em] +% \horizontaldivision[1/5,3,1em] % -% \stelfractiesin[afstand=,aantal=] (passend,passend) +% \setuphorizontaldivision[afstand=,aantal=] (passend,passend) \def\??fr{@@fr} -\def\stelfractiesin +\def\setuphorizontaldivision {\dodoubleargument\getparameters[\??fr]} -\def\dodofractie[#1/#2,#3,#4,#5]% +\def\horizontaldivision + {\dosingleargument\dohorizontaldivision} + +\def\dohorizontaldivision[#1]% + {\dodohorizontaldivision[#1,,,,,,]} + +\def\dodohorizontaldivision[#1/#2,#3,#4,#5]% {\doifelsenothing{#3} - {\doifelse\@@frn\v!passend + {\doifelse\@@frn\v!fit {\!!counta#2\relax} {\!!counta\@@frn\relax}} {\!!counta#3\relax}% \doifelsenothing{#4} - {\doifelse\@@frafstand\v!passend + {\doifelse\@@frdistance\v!fit {\!!widtha\zeropoint} - {\!!widtha\@@frafstand}} + {\!!widtha\@@frdistance}} {\!!widtha#4}% \advance\!!counta \minusone \multiply\!!widtha \!!counta @@ -2615,15 +2565,9 @@ \divide\hsize #2\relax \hsize#1\hsize} -\def\dofractie[#1]% - {\dodofractie[#1,,,,,,]} - -\def\fractie - {\dosingleargument\dofractie} - -\stelfractiesin - [\c!afstand=\tfskipsize, - \c!n=\v!passend] +\setuphorizontaldivision + [\c!distance=\tfskipsize, + \c!n=\v!fit] %D This one is for Daniel Pittman, who wanted tight %D fractions. We show three versions. First the simple @@ -2636,7 +2580,7 @@ %D test \vfrac{1}{2} test \vfrac{123}{456} test %D \stopbuffer %D -%D \typebuffer {\showmakeup\haalbuffer} +%D \typebuffer {\showmakeup\getbuffer} %D %D A better way to handle the kerning is the following, here %D we kind of assume that tye slash is symmetrical and has @@ -2647,11 +2591,11 @@ %D {\hbox{\high{\tx#1}\hbox to \zeropoint{\hss/\hss}\low{\tx#2}}} %D \stopbuffer %D -%D \typebuffer {\showmakeup\haalbuffer} +%D \typebuffer {\showmakeup\getbuffer} %D %D The third and best alternative is the following: %D -%D {\showmakeup\haalbuffer}\crlf\haalbuffer +%D {\showmakeup\getbuffer}\crlf\getbuffer %D %D This time we measure the height of the \type {/} and %D shift over the maximum height and depths of this @@ -2700,11 +2644,11 @@ %D Under construction: %D -%D \starttypen +%D \starttyping %D \commalistsentence[aap,noot,mies] %D \commalistsentence[aap,noot] %D \commalistsentence[aap] -%D \stoptypen +%D \stoptyping \let\handlecommalistsentence\firstofoneargument diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex index c1c065208..3c47f885f 100644 --- a/tex/context/base/core-nav.tex +++ b/tex/context/base/core-nav.tex @@ -34,9 +34,9 @@ %D There is no interaction at all unless enabled by saying: %D -%D \starttypen +%D \starttyping %D \setupinteraction[state=start] -%D \stoptypen +%D \stoptyping %D %D The other settings are: %D @@ -57,7 +57,7 @@ \def\dodosetupinteraction[#1]% % \dosetupinteraction == special {\getparameters[\??ia][#1]% - \doifelse\@@iastatus\v!start + \doifelse\@@iastate\v!start {\iflocation\else \showmessage\m!interactions2{\ifusepagedestinations\space(PAGE)\fi}% \global\locationtrue @@ -67,26 +67,26 @@ \global\locationfalse \fi}% \iflocation - \setsystemmode \v!interactie + \setsystemmode \v!interaction \else - \resetsystemmode\v!interactie + \resetsystemmode\v!interaction \fi \dosetuppageview\@@iafocus - \doifsomething\@@iabereken - {\doregistercalculationset\@@iabereken}% - \doifelse\@@iastrut\v!ja + \doifsomething\@@iacalculate + {\doregistercalculationset\@@iacalculate}% + \doifelse\@@iastrut\v!yes \locationstruttrue \locationstrutfalse - \doifelse\@@iaklik\v!ja + \doifelse\@@iaclick\v!yes \highlighthyperlinkstrue \highlighthyperlinksfalse - \doifelse\@@iasplitsen\v!ja + \doifelse\@@iasplit\v!yes \locationsplittrue \locationsplitfalse - \doifelse\@@iascherm\v!nieuw + \doifelse\@@iadisplay\v!new \gotonewwindowtrue \gotonewwindowfalse - \doifelse\@@iapagina\v!ja + \doifelse\@@iapage\v!yes {\global\usepagedestinationstrue} {\global\usepagedestinationsfalse}} @@ -95,8 +95,8 @@ \def\dolocationstartup {\iflocation \dosetupinteraction - \handlereferenceactions\@@iaopenactie \dosetupopenaction - \handlereferenceactions\@@iasluitactie\dosetupcloseaction + \handlereferenceactions\@@iaopenaction \dosetupopenaction + \handlereferenceactions\@@iacloseaction\dosetupcloseaction \setupinteractionscreens \global\let\dolocationstartup\relax \fi} @@ -105,8 +105,8 @@ \def\dolocationpagecheck % brr pdf dependent {\iflocation - \handlereferenceactions\@@iaopenpaginaactie \dosetupopenpageaction - \handlereferenceactions\@@iasluitpaginaactie\dosetupclosepageaction + \handlereferenceactions\@@iaopenpageaction \dosetupopenpageaction + \handlereferenceactions\@@iaclosepageaction\dosetupclosepageaction \fi} \appendtoks \dolocationpagecheck \to \everyshipout @@ -127,9 +127,9 @@ %D The solution lays in passing the strut characteristics in %D a proper way, in our case by applying \type{\presetgoto}: %D -%D \starttypen +%D \starttyping %D {some piece of text \presetgoto} -%D \stoptypen +%D \stoptyping %D %D This macro stores the current strut values. @@ -150,21 +150,29 @@ \globallet\@@ia@@hoogte\strutheight \globallet\@@ia@@diepte\strutdepth \else - \globallet\@@ia@@hoogte\@@iahoogte - \globallet\@@ia@@diepte\@@iadiepte + \globallet\@@ia@@hoogte\@@iaheight + \globallet\@@ia@@diepte\@@iadepth \fi} %D In the macros that deal with making areas into hyperlinks, %D we use: +\newbox\driverresources + +\def\collectdriverresource#1% + {\global\setbox\driverresources\hbox{\box\driverresources#1}} + +\def\flushdriverresources + {\ifvoid\driverresources\else\box\driverresources\fi} + \def\dostartgoto\data#1\start#2\stop#3\dostopgoto {\ifsecondaryreference \bgroup\setbox0\hbox{#2#3}\egroup \else \hbox {\setbox0\hbox{#1}% - \ifdim\wd0<\@@iabreedte\relax - \buttonwidth\@@iabreedte\relax + \ifdim\wd0<\@@iawidth\relax + \buttonwidth\@@iawidth\relax \else \buttonwidth\wd0 \fi @@ -181,7 +189,7 @@ \advance\buttonheight \dimen0 \setbox2\hbox {\lower\dimen0\hbox - {\mindermeldingen + {\dontcomplain \dimen0=.5\wd0 % direct skipping is faster of course \advance\dimen0 -.5\buttonwidth % buts this is nicer \hskip\dimen0#2#3}}% when visualizing things @@ -190,7 +198,8 @@ \dimen0\wd0\box0\kern-\dimen0\smashbox2\box2\kern\dimen0 \else \smashbox2\box2\box0 - \fi}% + \fi + \flushdriverresources}% \resetgoto}% \fi} @@ -233,16 +242,16 @@ \def\interactioncolor {\iflocation \ifrealreferencepage - \@@iacontrastkleur + \@@iacontrastcolor \else - \@@iakleur + \@@iacolor \fi \fi} %D CHECK WHERE USED / CONSISTENCY \def\showlocation#1% - {\iflocation\color[\@@iakleur]{#1\presetgoto}\else#1\fi} + {\iflocation\color[\@@iacolor]{#1\presetgoto}\else#1\fi} %D When local color settings are to be used, we can use the %D next macro, where \type{#1} is a tag like \type{\??tg} and @@ -250,7 +259,7 @@ \def\showcoloredlocation#1#2% {\iflocation - \color[\getvalue{#1\c!kleur}]{#2\presetgoto}% + \color[\getvalue{#1\c!color}]{#2\presetgoto}% \else #2% \fi} @@ -261,11 +270,11 @@ \def\showcontrastlocation#1#2#3% the \@EA is needed {\iflocation \ifnum#2=\realpageno\relax - \doifelsevaluenothing{#1\c!kleur} + \doifelsevaluenothing{#1\c!color} {#3\presetgoto} - {\color[\getvalue{#1\c!contrastkleur}]{#3\presetgoto}}% + {\color[\getvalue{#1\c!contrastcolor}]{#3\presetgoto}}% \else - \color[\getvalue{#1\c!kleur}]{#3\presetgoto}% + \color[\getvalue{#1\c!color}]{#3\presetgoto}% \fi \else #3% @@ -294,20 +303,20 @@ \egroup} \def\navigating - {\dolocationattributes\??ia\c!letter\c!kleur} + {\dolocationattributes\??ia\c!style\c!color} %D Although not decently supported in current viewers, a %D provisory hiding mechanims is implemented. Areas marked as %D such, are visible on screen, but invisible on paper. Don't %D trust this mechanism yet! -\def\dostartinteractie +\def\dostartinteraction {\bgroup - \let\stopinteractie\egroup + \let\stopinteraction\egroup \dowithnextbox{\dostarthide\flushnextbox\dostophide\egroup}\hbox} -\let\startinteractie = \relax -\let\stopinteractie = \relax +\let\startinteraction = \relax +\let\stopinteraction = \relax % in the future: % @@ -326,34 +335,34 @@ % \definereference [AtOpenInitializeForm] [\v!geen] \setupinteraction % start fit page and reset form - [\c!status=\v!stop, - \c!pagina=\v!nee, - \c!klik=\v!ja, - \c!scherm=, - %\c!openactie={\v!eerstepagina,AtOpenInitializeForm}, - %\c!openactie={\v!eerstepagina,\v!ResetForm}, - %\c!openactie=\v!ResetForm, % too buggy in reader 4.05 - \c!openactie=, - \c!sluitactie=, - \c!openpaginaactie=, - \c!sluitpaginaactie=, - \c!scherm=\v!normaal, - \c!focus=\v!passend, - \c!menu=\v!uit, - \c!letter=\v!vet, - \c!bereken=, - \c!strut=\v!ja, - \c!splitsen=\v!ja, - \c!kleur=interactioncolor, - \c!contrastkleur=interactioncontrastcolor, - \c!symboolset=, - \c!breedte=1em, - \c!hoogte=\!!zeropoint, - \c!diepte=\!!zeropoint, - \c!titel=\jobname, % needed for fdf/x - \c!subtitel=, - \c!auteur=, - \c!trefwoord=, - \c!datum=\@@iatimestamp] - -\protect \endinput \ No newline at end of file + [\c!state=\v!stop, + \c!page=\v!no, + \c!click=\v!yes, + \c!display=, + %\c!openaction={\v!firstpage,AtOpenInitializeForm}, + %\c!openaction={\v!firstpage,\v!ResetForm}, + %\c!openaction=\v!ResetForm, % too buggy in reader 4.05 + \c!openaction=, + \c!closeaction=, + \c!openpageaction=, + \c!closepageaction=, + \c!display=\v!normal, + \c!focus=\v!fit, + \c!menu=\v!off, + \c!style=\v!bold, + \c!calculate=, + \c!strut=\v!yes, + \c!split=\v!yes, + \c!color=interactioncolor, + \c!contrastcolor=interactioncontrastcolor, + \c!symbolset=, + \c!width=1em, + \c!height=\!!zeropoint, + \c!depth=\!!zeropoint, + \c!title=\jobname, % needed for fdf/x + \c!subtitle=, + \c!author=, + \c!keyword=, + \c!date=\@@iatimestamp] + +\protect \endinput diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex index 908414e72..9c5ec0578 100644 --- a/tex/context/base/core-new.tex +++ b/tex/context/base/core-new.tex @@ -272,18 +272,15 @@ % todo : \startsetups[name][XML] \setups[name][XML] \expanded - {\long\def\@EA\noexpand\csname\e!start\v!instellingen\endcsname + {\long\def\@EA\noexpand\csname\e!start\v!setups\endcsname {\bgroup\noexpand\doifnextcharelse[% - {\noexpand\startsetupsA\@EA\noexpand\csname\e!stop\v!instellingen\endcsname} - {\noexpand\startsetupsB\@EA\noexpand\csname\e!stop\v!instellingen\endcsname}}} + {\noexpand\startsetupsA\@EA\noexpand\csname\e!stop\v!setups\endcsname} + {\noexpand\startsetupsB\@EA\noexpand\csname\e!stop\v!setups\endcsname}}} -\letvalue{\e!stop\v!instellingen}\relax +\letvalue{\e!stop\v!setups}\relax -\unexpanded \def\setups % {..} or [..] - {\doifnextcharelse\bgroup\dosetupsA\dosetupsB} - -\unexpanded \def\setup % {..} or [..] - {\doifnextcharelse\bgroup\dosetups\dosetupsC} +\unexpanded \def\setups{\doifnextcharelse\bgroup\dosetupsA\dosetupsB} % {..} or [..] +\unexpanded \def\setup {\doifnextcharelse\bgroup\dosetups \dosetupsC} % {..} or [..] \def\dosetupsA #1{\processcommacommand[#1]\dosetups} % {..} \def\dosetupsB[#1]{\processcommacommand[#1]\dosetups} % [..] @@ -297,35 +294,28 @@ \def\doifsetupselse#1% to be done: grid {\doifdefinedelse{\??su:#1}} -\def\startsetups % for international purposes - {\bgroup\doifnextcharelse[{\startsetupsA\stopsetups}{\startsetupsB\stopsetups}} +\chardef\setupseolmode\plusone -\def\startlocalsetups % for nested purposes - {\bgroup\doifnextcharelse[{\startsetupsA\stoplocalsetups}{\startsetupsB\stoplocalsetups}} +\def\startsetups {\xxstartsetups\plusone \stopsetups } \let\stopsetups \relax +\def\startlocalsetups{\xxstartsetups\plusone \stoplocalsetups} \let\stoplocalsetups\relax +\def\startrawsetups {\xxstartsetups\zerocount\stoprawsetups } \let\stoprawsetups \relax -\let\stopsetups \relax -\let\stoplocalsetups\relax +\def\xxstartsetups#1#2% + {\bgroup\chardef\setupseolmode#1\doifnextcharelse[{\startsetupsA#2}{\startsetupsB#2}} -\def\startsetupsA#1% - {\catcode`\^^M\@@ignore +\def\startsetupsA#1% [ ] delimited + {\ifcase\setupseolmode\or\catcode`\^^M\@@ignore\fi \dotripleempty\dostartsetups[#1]} -\def\startsetupsB#1#2 % space delimited / kind of obsolete - {\catcode`\^^M\@@ignore +\def\startsetupsB#1#2 % space delimited + {\ifcase\setupseolmode\or\catcode`\^^M\@@ignore\fi \dodostartsetups#1\empty{#2}} -\def\dostartsetups - {\ifthirdargument - \@EA\startsetupsC - \else - \@EA\startsetupsD - \fi} - -\def\startsetupsC[#1][#2][#3]% [..] [..] - {\dodostartsetups#1{#2}{#3}} +\def\startsetupsC[#1][#2][#3]{\dodostartsetups#1{#2}{#3}} % [..] [..] +\def\startsetupsD[#1][#2][#3]{\dodostartsetups#1\empty{#2}} % [..] -\def\startsetupsD[#1][#2][#3]% [..] - {\dodostartsetups#1\empty{#2}} +\def\dostartsetups + {\ifthirdargument\@EA\startsetupsC\else\@EA\startsetupsD\fi} \long\def\dodostartsetups#1#2#3% watch out: not \grabuntil {\dograbuntil#1{\egroup\long\setvalue{\??su#2:#3}}} @@ -363,7 +353,7 @@ % {\ifsecondargument % \catcode`\<=\@@active % \def<{\ifmmode\expandafter\normalless\else\expandafter\doshortcut\fi}% -% \getparameters[\??te#1][\c!commandos=,\c!commando=,\c!letter=,\c!kleur=,#2]% +% \getparameters[\??te#1][\c!commands=,\c!command=,\c!style=,\c!color=,#2]% % \else % \defineshortcut[][#1]% % \fi} @@ -381,17 +371,17 @@ % % \def\dododoshortcut#1:#2\end % {\doifelsenothing{#2} -% {\doifundefinedelse{\??te\c!commandos} +% {\doifundefinedelse{\??te\c!commands} % {\shortcut} % {\@EA\dodododoshortcut\@EA\??te\@EA:\shortcut:\end}} -% {\doifundefinedelse{\??te#1\c!commandos} +% {\doifundefinedelse{\??te#1\c!commands} % {\shortcut} % {\dodododoshortcut\??te#1:#2\end}}% % \egroup} % % \def\dodododoshortcut#1:#2:\end -% {\getvalue{#1\c!commandos}% -% \doattributes{#1}\c!letter\c!kleur{\getvalue{#1\c!commando}{#2}}} +% {\getvalue{#1\c!commands}% +% \doattributes{#1}\c!style\c!color{\getvalue{#1\c!command}{#2}}} \def\defineshortcut {\dotripleargument\dodefineshortcut} @@ -412,7 +402,7 @@ \defineactivecharacter #1 {\@EA\doshortcut\string#2} % \getparameters [\??te\string#2#3] - [\c!commandos=,\c!commando=,\c!letter=,\c!kleur=,#4]} + [\c!commands=,\c!command=,\c!style=,\c!color=,#4]} \def\doshortcut#1% {\ifmmode @@ -429,27 +419,27 @@ \def\dododoshortcut#1:#2\end {\doifelsenothing{#2} - {\doifundefinedelse{\shorttag\c!commandos} + {\doifundefinedelse{\shorttag\c!commands} {\shortcut} {\@EA\dodododoshortcut\@EA\shorttag\@EA:\shortcut:\end}} - {\doifundefinedelse{\shorttag#1\c!commandos} + {\doifundefinedelse{\shorttag#1\c!commands} {\shortcut} {\dodododoshortcut\shorttag#1:#2\end}}% \egroup} \def\dodododoshortcut#1:#2:\end - {\getvalue{#1\c!commandos}% - \doattributes{#1}\c!letter\c!kleur{\getvalue{#1\c!commando}{#2}}} - -%D \defineshortcut [\c!letter=\v!type] -%D \defineshortcut [b] [\c!letter=\v!vet] -%D \defineshortcut [e] [\c!letter=\em] -%D \defineshortcut [t] [\c!letter=\v!type] -%D \defineshortcut [c] [\c!letter=\v!kap] -%D \defineshortcut [k] [\c!letter=\v!kap] -%D \defineshortcut [u] [\c!letter=\v!type,\c!commando=\hyphenatedurl] + {\getvalue{#1\c!commands}% + \doattributes{#1}\c!style\c!color{\getvalue{#1\c!command}{#2}}} + +%D \defineshortcut [style=type] +%D \defineshortcut [b] [style=bold] +%D \defineshortcut [e] [style=\em] +%D \defineshortcut [t] [style=type] +%D \defineshortcut [c] [style=cap] +%D \defineshortcut [k] [style=cap] +%D \defineshortcut [u] [style=type,command=\hyphenatedurl] %D -%D \startregels +%D \startlines %D test test %D test test %D test test @@ -461,21 +451,21 @@ %D test test dat (zi:ezo:) %D well, looks fuzzy %D $10<20$ -%D \stopregels +%D \stoplines %D -%D \defineshortcut [<>] [i] [\c!letter=\it] -%D \defineshortcut [()] [b] [\c!letter=\bf] -%D \defineshortcut [++] [s] [\c!letter=\sl] -%D \defineshortcut [//] [u] [\c!letter=\underbars] -%D \defineshortcut [--] [a] [\c!letter=\overstrike] +%D \defineshortcut [<>] [i] [style=\it] +%D \defineshortcut [()] [b] [style=\bf] +%D \defineshortcut [++] [s] [style=\sl] +%D \defineshortcut [//] [u] [style=\underbars] +%D \defineshortcut [--] [a] [style=\overstrike] %D -%D \startregels +%D \startlines %D it seems well %D it seems (b:to work) well %D it seems +s:to work+ well %D it seems /u:to work/ well %D it seems -a:to work- well -%D \stopregels +%D \stoplines % \def\setupenv{\dodoubleargument\rawgetparameters[\??en]} % @@ -545,4 +535,4 @@ \egroup -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex index 6e25a89a6..6f8bfdcc8 100644 --- a/tex/context/base/core-not.tex +++ b/tex/context/base/core-not.tex @@ -25,13 +25,13 @@ %D Footnotes are can be characterized by three components: %D -%D \startopsomming[opelkaar] -%D \som a small number \voetnoot {a footnote number} or -%D symbol {\stelvoetnotenin [conversie=set 2]\voetnoot +%D \startitemize[packed] +%D \item a small number \footnote {a footnote number} or +%D symbol {\setupfootnotes [conversionconversie=set 2]\footnote %D {a footnote}} -%D \som and a similar mark at the bottom of the page -%D \som followed by some additional text -%D \stopopsomming +%D \item and a similar mark at the bottom of the page +%D \item followed by some additional text +%D \stopitemize %D %D Because footnotes are declared at the location of their %D reference. Footnotes can be seen as a special kind of @@ -50,9 +50,9 @@ %D It's sort of a custom to precede footnotes by a horizontal %D rule and although fancy rules like %D -%D \starttypen +%D \starttyping %D \hbox to 10em{\hskip-3em\dotfill} -%D \stoptypen +%D \stoptyping %D %D Are quite ligitimate, we default to a simple one 20\% of the %D text width. @@ -66,18 +66,19 @@ \newif\ifendnotes \endnotesfalse \newif\ifbottomnotes \bottomnotestrue -\newif\ifclevernotes \clevernotesfalse % being [plaats=kolommen] + +\chardef\clevernotes=\zerocount % 0=page 1=firstcolumn 2=lastcolumn %D The next definitions indicate that we can frame the footnote %D area. The footnotes themselves are treated as definitions. %D %D \showsetup{\y!setupfootnotes} -\let\currentnote\v!voetnoot +\let\currentnote\v!footnote \def\noteparameter #1{\csname\??vn \currentnote#1\endcsname} \def\notedefparameter #1{\csname\??vn\??vn\currentnote#1\endcsname} -\def\footnoteparameter #1{\csname\??vn \v!voetnoot#1\endcsname} +\def\footnoteparameter #1{\csname\??vn \v!footnote#1\endcsname} \def\startnotedef {\csname\e!start\??vn\??vn\currentnote\endcsname} \def\stopnotedef {\csname\e!stop \??vn\??vn\currentnote\endcsname} @@ -143,9 +144,9 @@ %D suitable symbol set, symbols can be used instead of numbers, %D by saying: %D -%D \starttypen +%D \starttyping %D \setupfootnotes[conversion=set 2] -%D \stoptypen +%D \stoptyping \def\definenote {\dodoubleempty\dodefinenote} @@ -159,62 +160,62 @@ \@EA\newbox\csname\??vn+\currentnote\endcsname % local box \@EA\newbox\csname\??vn-\currentnote\endcsname % local box \doglobal\addtocommalist{#1}\noteinsertions - \doordefinieren + \definedescription [\??vn\??vn\currentnote] - [\c!plaats=\v!inlinker, - \c!breedte=\v!passend, - \c!kopletter=\noteparameter\c!letter, - \c!kopkleur=\noteparameter\c!kleur, - \c!voor=, - \c!na=]% + [\c!location=\v!inleft, + \c!width=\v!fit, + \c!headstyle=\noteparameter\c!style, + \c!headcolor=\noteparameter\c!color, + \c!before=, + \c!after=]% \presetlocalframed [\??vn\currentnote]% \getparameters [\??vn\currentnote] - [\c!plaats=\v!pagina, - \c!wijze=\v!per\v!deel, - \c!sectienummer=\v!nee, - \c!conversie=, - \c!lijn=\v!aan, - \c!voor=\blanko, - \c!korps=\v!klein, - \c!letter=, - \c!kleur=, - \c!na=, - \c!lijnkleur=, - \c!lijndikte=\linewidth, - \c!kader=\v!uit, - \c!margeafstand=.5em, - \c!kolomafstand=1em, - \c!afstand=.125em, - \c!uitlijnen=\v!normaal, - \c!tolerantie=\v!soepel, - \c!splitsen=\v!soepel, - %\c!breedte=\zetbreedte, - %\c!breedte=\ifdim\hsize<\zetbreedte\hsize\else\zetbreedte\fi, - \c!breedte=\defaultnotewidth, - \c!hoogte=\teksthoogte, - \c!nummercommando=\high, - \c!commando=\noteparameter\c!nummercommando, % downward compatible - \c!scheider=\@@koscheider, - \c!tekstcommando=\high, - \c!tekstletter=\tx, - \c!tekstkleur=, - \c!interactie=\v!ja, + [\c!location=\v!page, + \c!way=\v!by\v!part, + \c!sectionnumber=\v!no, + \c!conversion=, + \c!rule=\v!on, + \c!before=\blank, + \c!bodyfont=\v!small, + \c!style=, + \c!color=, + \c!after=, + \c!rulecolor=, + \c!rulethickness=\linewidth, + \c!frame=\v!off, + \c!margindistance=.5em, + \c!columndistance=1em, + \c!distance=.125em, + \c!align=\v!normal, + \c!tolerance=\v!tolerant, + \c!split=\v!tolerant, + %\c!width=\makeupwidth, + %\c!width=\ifdim\hsize<\makeupwidth\hsize\else\makeupwidth\fi, + \c!width=\defaultnotewidth, + \c!height=\textheight, + \c!numbercommand=\high, + \c!command=\noteparameter\c!numbercommand, % downward compatible + \c!separator=\@@koseparator, + \c!textcommand=\high, + \c!textstyle=\tx, + \c!textcolor=, + \c!interaction=\v!yes, \c!n=1]% - \definieernummer + \definenumber [\currentnote] - [\c!wijze=\noteparameter\c!wijze, - \c!sectienummer=\noteparameter\c!wijze, - \c!conversie=\noteparameter\c!conversie]% - \letvalue{\??vn\c!lijn:\currentnote}\normalnoterule + [\c!way=\noteparameter\c!way, + \c!sectionnumber=\noteparameter\c!way, + \c!conversion=\noteparameter\c!conversion]% + \letvalue{\??vn\c!rule:\currentnote}\normalnoterule \unexpanded\setvalue{\currentnote}{\setnote[#1]}% - \unexpanded\setvalue{\currentnote\v!tekst}{\setnotetext[#1]}% + \unexpanded\setvalue{\currentnote\v!text}{\setnotetext[#1]}% \setupnote[\currentnote][#2]% \fi} \def\setupnotedefinition[#1]% - {\steldoordefinierenin[\??vn\??vn#1]} + {\setupdescriptions[\??vn\??vn#1]} \def\setupnote {\dodoubleempty\dosetupnote} @@ -225,16 +226,16 @@ \getparameters [\??vn\currentnote][#2]% \processaction - [\noteparameter\c!lijn] - [ \v!aan=>\letvalue{\??vn\c!lijn:\currentnote}\normalnoterule, - \v!uit=>\letvalue{\??vn\c!lijn:\currentnote}\relax, - \s!default=>\letvalue{\??vn\c!lijn:\currentnote}\relax, - \s!unknown=>\setvalue{\??vn\c!lijn:\currentnote}{\noteparameter\c!lijn}]% + [\noteparameter\c!rule] + [ \v!on=>\letvalue{\??vn\c!rule:\currentnote}\normalnoterule, + \v!off=>\letvalue{\??vn\c!rule:\currentnote}\relax, + \s!default=>\letvalue{\??vn\c!rule:\currentnote}\relax, + \s!unknown=>\setvalue{\??vn\c!rule:\currentnote}{\noteparameter\c!rule}]% \processaction % todo - [\noteparameter\c!splitsen] - [ \v!soepel=>\notepenalty\zeropoint, - \v!streng=>\notepenalty9999, - \v!zeerstreng=>\notepenalty\maxdimen, + [\noteparameter\c!split] + [ \v!tolerant=>\notepenalty\zeropoint, + \v!strict=>\notepenalty9999, + \v!verystrict=>\notepenalty\maxdimen, \s!default=>\notepenalty\zeropoint, \s!unknown=>\notepenalty\commalistelement]% \fi @@ -250,42 +251,47 @@ {\edef\noteinsertions{#1}}% \fi\fi} -\def\dochecknote % for the moment no mixed text/endnotes modes - {\setnotedistance - \count\currentnoteins1000 - %ExpandBothAfter\doifinsetelse\v!kolommen{\noteparameter\c!plaats} - \ExpandBothAfter\doifinsetelse\v!kolommen{\footnoteparameter\c!plaats} - {\clevernotestrue % global ? - \ifnum\@@kln=\zerocount +\def\dochecknote + {% for the moment no mixed text/endnotes modes, so we use + % \footnoteparameter and not \noteparameter (**) + \setnotedistance + \count\currentnoteins\plusthousand + \expanded{\doifcommonelse{\v!columns,\v!lastcolumn}{\footnoteparameter\c!location}}% ** + {\chardef\clevernotes\plustwo} + {\expanded{\doifinsetelse{\v!firstcolumn}{\footnoteparameter\c!location}}% ** + {\chardef\clevernotes\plusone}% + {\chardef\clevernotes\zerocount}}% + \ifcase\clevernotes\relax + % notes not in column areas + \ifnum\noteparameter\c!n=\zerocount + \settextnotes + \scratchcounter\plusone + \else + \setcolumnnotes + \scratchcounter\noteparameter\c!n\relax + \divide\count\currentnoteins \scratchcounter + \fi + \ExpandBothAfter\doifinsetelse\v!page{\footnoteparameter\c!location} % ** + {\global\endnotesfalse + \ExpandBothAfter\doifinsetelse\v!high{\footnoteparameter\c!location} % ** + {\global\bottomnotesfalse} + {\global\bottomnotestrue}} + {\global\endnotestrue + \global\bottomnotestrue + \postponenotes}% + \else + % notes in column areas + \ifnum\@@kln=\zerocount % brrr dependency on \??kl \scratchcounter\plusone \else - %scratchcounter\noteparameter\c!n\relax - \scratchcounter\footnoteparameter\c!n\relax + \scratchcounter\footnoteparameter\c!n\relax % ** \fi \global\endnotesfalse \global\bottomnotestrue - \setclevernotes} - {\clevernotesfalse - \ifnum\noteparameter\c!n=\zerocount - \settextnotes - \scratchcounter\plusone - \else - \setcolumnnotes - \scratchcounter\noteparameter\c!n\relax - \divide\count\currentnoteins \scratchcounter - \fi - %ExpandBothAfter\doifinsetelse\v!pagina{\noteparameter\c!plaats} - \ExpandBothAfter\doifinsetelse\v!pagina{\footnoteparameter\c!plaats} - {\global\endnotesfalse - %ExpandBothAfter\doifinsetelse\v!hoog{\noteparameter\c!plaats} - \ExpandBothAfter\doifinsetelse\v!hoog{\footnoteparameter\c!plaats} - {\global\bottomnotesfalse} - {\global\bottomnotestrue}} - {\global\endnotestrue - \global\bottomnotestrue - \postponenotes}}% + \setclevernotes + \fi \ifnotelimit - \dimen\currentnoteins\noteparameter\c!hoogte + \dimen\currentnoteins\noteparameter\c!height \multiply\dimen\currentnoteins \scratchcounter \fi} @@ -298,15 +304,15 @@ %D those of the stretch component. \def\placenoterule - {\getvalue{\??vn\c!lijn:\currentnote}} + {\getvalue{\??vn\c!rule:\currentnote}} \def\normalnoterule {\ifvmode \color - [\noteparameter\c!lijnkleur] + [\noteparameter\c!rulecolor] {\hrule \!!width .2\hsize - \!!height\noteparameter\c!lijndikte + \!!height\noteparameter\c!rulethickness \!!depth \zeropoint}% \kern\strutdepth \fi} @@ -320,21 +326,21 @@ \def\setnotedistance {\setbox\scratchbox\vbox {\forgetall - \noteparameter\c!voor + \noteparameter\c!before \placenoterule - \noteparameter\c!na}% + \noteparameter\c!after}% \global\skip\currentnoteins\ht\scratchbox \setbox\scratchbox\box\voidb@x} % scratchbox can be in use \ifx\setnotehsize\undefined - \def\setnotehsize{\hsize\noteparameter\c!breedte} % can be overloaded + \def\setnotehsize{\hsize\noteparameter\c!width} % can be overloaded \fi \def\setclevernotes {\def\startpushnote {\bgroup % wellicht ooit kopuitlijnen - \stelinmargein[\c!uitlijnen=\v!links]% + \setupinmargin[\c!align=\v!left]% \startnotedef}% \def\stoppushnote {\stopnotedef \egroup}% @@ -343,15 +349,15 @@ \def\setcolumnnotes {\def\startpushnote {\setnotehsize % possibly overloaded - \setrigidcolumnhsize\hsize{\noteparameter\c!kolomafstand}{\noteparameter\c!n}% + \setrigidcolumnhsize\hsize{\noteparameter\c!columndistance}{\noteparameter\c!n}% \bgroup - \stelinmargein[\c!uitlijnen=\v!links]% + \setupinmargin[\c!align=\v!left]% \startnotedef}% \def\stoppushnote {\stopnotedef \egroup}% \def\startpopnotes {\bgroup \setnotehsize - \setrigidcolumnhsize\hsize{\noteparameter\c!kolomafstand}{\noteparameter\c!n}% + \setrigidcolumnhsize\hsize{\noteparameter\c!columndistance}{\noteparameter\c!n}% \setbox0\vbox\bgroup}% \def\stoppopnotes {\egroup \setbox0\vbox @@ -361,12 +367,12 @@ \def\settextnotes {\def\startpushnote {\startvboxtohbox - \dostartattributes{\??vn\currentnote}\c!letter\c!kleur{}}% - \def\stoppushnote {\hskip\noteparameter\c!kolomafstand % plus.5em minus.5em + \dostartattributes{\??vn\currentnote}\c!style\c!color{}}% + \def\stoppushnote {\hskip\noteparameter\c!columndistance % plus.5em minus.5em \dostopattributes \stopvboxtohbox}% \def\startpopnotes {\vbox\bgroup - \doifnotinset{\noteparameter\c!breedte}{\v!passend,\v!ruim}\setnotehsize + \doifnotinset{\noteparameter\c!width}{\v!fit,\v!broad}\setnotehsize \beginofshapebox}% \def\stoppopnotes {\endofshapebox \reshapebox{\ifhbox\shapebox\unhbox\else\box\fi\shapebox\endgraf}% @@ -376,7 +382,7 @@ %D The formatting depends on the width of the table, so we %D have to set \type {n} to zero. %D -%D \starttypen +%D \starttyping %D \startbuffer %D \bTABLE %D \bTR \bTD one \footnote{\dorecurse{10}{abcd }} \eTD \bTD two \eTD \eTR @@ -387,7 +393,7 @@ %D \startlocalfootnotes[n=0,location={text,none}] %D \placelegend[n=2]{\getbuffer}{\placelocalfootnotes} %D \stoplocalfootnotes -%D \stoptypen +%D \stoptyping %D \macros %D {footnote} @@ -415,10 +421,10 @@ %D something like: %D %D \bgroup -%D \startsmaller -%D \stelvoetnotenin[conversie=set 1] -%D \haalbuffer -%D \stopsmaller +%D \startnarrower +%D \setupfootnotes[conversionconversie=set 1] +%D \getbuffer +%D \stopnarrower %D \egroup %D %D Typesetting footnotes is, at least for the moment, disabled @@ -462,9 +468,9 @@ %D instead of a reference, no number is typeset. We can %D temporary disable footnotes by saying %D -%D \starttypen +%D \starttyping %D \notesenabledfalse -%D \stoptypen +%D \stoptyping %D %D which can be handy while for instance typesetting tables %D of contents. The pagewise footnote numbering is dedicated @@ -504,7 +510,7 @@ \def\dododonote#1% {\doglobal\increment\internalfootreference - \doifelse{\noteparameter\c!wijze}{\v!per\v!pagina} + \doifelse{\noteparameter\c!way}{\v!by\v!page} {\settrue\pagewisenotes} {\setfalse\pagewisenotes}% \doifelse{#1}{-} @@ -517,7 +523,7 @@ \fi} {}% \fi - \verhoognummer[\currentnote]% + \incrementnumber[\currentnote]% \maakhetnummer[\currentnote]% \rawreference\s!fnt{#1}\hetnummer \let\lastnotenumber\hetnummer}% @@ -535,7 +541,7 @@ %D especially when we keep the reference and text at one page. %D On the other hand we need interactivity when we refer to %D previous notes or use end notes. Therefore we support -%D interactive footnote numbers in two ways \voetnoot{This +%D interactive footnote numbers in two ways \footnote{This %D feature was implemented years after we were able to do so, %D mainly because endnotes had to be supported.} that is, %D automatically (vise versa) and by user supplied reference. @@ -556,7 +562,7 @@ {\bgroup \settrue\processingnote %\restorecatcodes % to be tested first - \ifinregels % otherwise problems with \type {xxx} + \iftypesettinglines % otherwise problems with \type {xxx} \ignorelines % makes footnotes work in \startlines ... \stoplines \fi \ifnotesymbol @@ -573,27 +579,22 @@ \redoconvertfont % to undo \undo calls in in headings etc \splittopskip\strutht % not actually needed here \splitmaxdepth\strutdp % not actually needed here - \iffixedlayoutdimensions % ugly hack, will change - \linkermargeafstand\noteparameter\c!margeafstand - \rechtermargeafstand\linkermargeafstand - \else - \def\linkermargeafstand{\noteparameter\c!margeafstand}% - \let\rechtermargeafstand\linkermargeafstand - \fi + \leftmargindistance\noteparameter\c!margindistance + \rightmargindistance\leftmargindistance \ifcase\noteparameter\c!n\relax % new 31-07-99 ; always ? - \doifnotinset{\noteparameter\c!breedte}{\v!passend,\v!ruim}\setnotehsize + \doifnotinset{\noteparameter\c!width}{\v!fit,\v!broad}\setnotehsize \fi \startpushnote {\ifx\lastnotenumber\empty \else \preparethenumber{\??vn\currentnote}\lastnotenumber\preparednumber - \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}}% + \doifelse{\noteparameter\c!interaction}\v!no + {\noteparameter\c!numbercommand + {\preparednumber\domovednote\v!nextpage\v!previouspage}}% + {\gotobox{\noteparameter\c!command % was \c!numbercommand, but compatible + {\preparednumber\domovednote\v!nextpage\v!previouspage}}% [\s!fnt:f:\internalfootreference]}% \fi - \doifelse{\noteparameter\c!interactie}\v!nee + \doifelse{\noteparameter\c!interaction}\v!no {\ifconditional\pagewisenotes \rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}% \fi}% @@ -633,16 +634,16 @@ \def\dolastnotesymbol {\unskip\unskip \ifdim\lastkern=\notesignal - \dodonotesymbol{\kern\noteparameter\c!afstand}% gets the font right, hack ! + \dodonotesymbol{\kern\noteparameter\c!distance}% gets the font right, hack ! \fi \nobreak - \doifelse{\noteparameter\c!interactie}\v!nee - {\dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}% + \doifelse{\noteparameter\c!interaction}\v!no + {\dodonotesymbol{\lastnotenumber\domovednote\v!previouspage\v!nextpage}% \ifconditional\pagewisenotes \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}% \fi} - {\naarbox - {\dodonotesymbol{\lastnotenumber\domovednote\v!vorigepagina\v!volgendepagina}}% + {\gotobox + {\dodonotesymbol{\lastnotenumber\domovednote\v!previouspage\v!nextpage}}% [\s!fnt:t:\internalfootreference]% \rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}}% \globallet\lastnotesymbol\relax} @@ -680,7 +681,7 @@ % \egroup} \def\dodonotesymbol#1% - {\noteparameter\c!tekstcommando{\doattributes{\??vn\currentnote}\c!tekstletter\c!tekstkleur{#1}}} + {\noteparameter\c!textcommand{\doattributes{\??vn\currentnote}\c!textstyle\c!textcolor{#1}}} \def\donotesymbol[#1][#2]% {\bgroup @@ -689,7 +690,7 @@ \ifsecondargument \ifx\lastnotesymbol\relax \unskip - \naarbox{\dodonotesymbol\currenttextreference}[#2]% + \gotobox{\dodonotesymbol\currenttextreference}[#2]% \else \lastnotesymbol \fi @@ -708,10 +709,13 @@ \let\stoppopnotes = \relax \def\placenoteinserts + {\processnotes\doplacenoteinserts} + +\def\doplacenoteinserts {%\ifvoid\currentnoteins \else % unsafe, strange - \ifdim\ht\currentnoteins>\zeropoint\relax + \relax\ifdim\ht\currentnoteins>\zeropoint\relax \ifendnotes \else - \noteparameter\c!voor + \noteparameter\c!before \placenoterule % alleen in ..mode \bgroup \setnotebodyfont @@ -727,19 +731,23 @@ % \fi % this is too ugly actually \stoppopnotes}% - \localframed - [\??vn\currentnote] - [\c!breedte=\v!passend, - \c!hoogte=\v!passend, - \c!strut=\v!nee, - \c!offset=\v!overlay] - {\ifdim\dp0=\zeropoint % this hack is needed because \vadjust - \hbox{\lower\strutdp\box0}% % in margin number placement - \else % hides the (always) present depth - \box0 - \fi}% + \setbox2\hbox + {\localframed + [\??vn\currentnote] + [\c!width=\v!fit, + \c!height=\v!fit, + \c!strut=\v!no, + \c!offset=\v!overlay] + {\ifdim\dp0=\zeropoint % this hack is needed because \vadjust + \hbox{\lower\strutdp\box0}% % in margin number placement + \else % hides the (always) present depth + \box0 + \fi}}% + \setbox2\hbox{\lower\strutdepth\box2}% + \dp2=\strutdepth % so we know that it has the note bodyfont depth + \box2 \egroup - \noteparameter\c!na + \noteparameter\c!after \fi \fi} @@ -748,21 +756,21 @@ %D problem of disappearing inserts when they're called for in %D deeply nested boxes. The general case looks like: %D -%D \starttypen +%D \starttyping %D \postponenotes %D \.box{whatever we want with footnotes} %D \flushnotes -%D \stoptypen +%D \stoptyping %D %D This alternative can be used in headings, captions, tables %D etc. The latter one sometimes calls for notes local to %D the table, which can be realized by saying %D -%D \starttypen +%D \starttyping %D \setlocalfootnotes %D some kind of table with local footnotes %D \placelocalfootnotes -%D \stoptypen +%D \stoptyping %D %D Postponing is accomplished by simply redefining the (local) %D insert operation. A not too robust method uses the @@ -836,9 +844,9 @@ %D This is a nasty and new secondary footnote flusher. It %D can be hooked into \type {\everypar} like: %D -%D \starttypen +%D \starttyping %D \appendtoks \synchronizenotes \to \everypar -%D \stoptypen +%D \stoptyping \def\dosynchronizenotes {\insert\currentnoteins{\unvbox\currentnoteins}} @@ -852,8 +860,8 @@ {\ifdim\ht#1>\zeropoint \endgraf \ifvmode - \witruimte - \noteparameter\c!voor + \whitespace + \noteparameter\c!before \fi \snaptogrid\hbox {\setnotebodyfont @@ -861,7 +869,7 @@ {\startpopnotes \unvbox#1\endgraf\relax \stoppopnotes}% - \doif{\noteparameter\c!breedte}\v!passend % new, auto width + \doif{\noteparameter\c!width}\v!fit % new, auto width {\setbox0\hbox % uggly but ok. {\beginofshapebox \unhbox0\setbox0=\lastbox\unvbox0 @@ -870,9 +878,9 @@ \vbox{\flushshapebox}}}% \localframed [\??vn\currentnote] - [\c!breedte=\v!passend, - \c!hoogte=\v!passend, - \c!strut=\v!nee, + [\c!width=\v!fit, + \c!height=\v!fit, + \c!strut=\v!no, \c!offset=\v!overlay] {\ifdim\dp0=\zeropoint % this hack is needed because \vadjust \hbox{\lower\strutdp\box0}% % in margin number placement @@ -880,25 +888,25 @@ \box0 \fi}}% \ifvmode - \noteparameter\c!na + \noteparameter\c!after \fi \fi} %D A stupid alternative is also provided: %D -%D \starttypen +%D \starttyping %D \setupfootnotes[location={text,none}] -%D \stoptypen +%D \stoptyping \def\placenotesasnone#1% is grouped already {\ifdim\ht#1>\zeropoint - \noteparameter\c!voor + \noteparameter\c!before \setnotebodyfont \startpopnotes % make sure that fake height is killed \unvbox#1\endgraf \stoppopnotes \setbox0=\lastbox \ifvbox0 \unvbox0\else\box0\fi % enable columns - \noteparameter\c!na + \noteparameter\c!after \fi} %D \macros @@ -910,7 +918,7 @@ %D \showsetup{\y!startlocalfootnotes} %D \showsetup{\y!placelocalfootnotes} -\def\defaultnotewidth{\zetbreedte} +\def\defaultnotewidth{\makeupwidth} \def\collectlocalnotes {\def\localnoteinsert##1% was \gdef, but never reset! @@ -928,7 +936,7 @@ \def\dostartlocalnotes[#1]% {\let\autopostponenotes\postponenotes \let\postponenotes\collectlocalnotes - \def\defaultnotewidth{\ifdim\hsize<\zetbreedte\hsize\else\zetbreedte\fi}% + \def\defaultnotewidth{\ifdim\hsize<\makeupwidth\hsize\else\makeupwidth\fi}% \processnotes {\doifsomething{#1}{\setupnote[\currentnote][#1]}% \savenumber[\currentnote]% @@ -947,7 +955,7 @@ {\bgroup \dolocalsetupnotes{#1}{#2} \processnotes - {\ExpandBothAfter\doifinsetelse\v!geen{\noteparameter\c!plaats} + {\ExpandBothAfter\doifinsetelse\v!none{\noteparameter\c!location} \placenotesasnone\placenotesintext\localpostponednotes}% \egroup \checknotes} @@ -955,16 +963,16 @@ %D These commands can be used like: %D %D \startbuffer -%D \startlocalnotes[breedte=.3\hsize,n=0] -%D \plaatstabel +%D \startlocalnotes[width=.3\hsize,n=0] +%D \placetable %D {Some Table} -%D \plaatsonderelkaar -%D {\starttabel[|l|r|] +%D \placeontopofeachother +%D {\starttable[|l|r|] %D \HL -%D \VL Nota\voetnoot{Bene} \VL Bene\voetnoot{Nota} \VL\SR -%D \VL Bene\voetnoot{Nota} \VL Nota\voetnoot{Bene} \VL\SR +%D \VL Nota\footnote{Bene} \VL Bene\footnote{Nota} \VL\SR +%D \VL Bene\footnote{Nota} \VL Nota\footnote{Bene} \VL\SR %D \HL -%D \stoptabel} +%D \stoptable} %D {\placelocalnotes} %D \stoplocalnotes %D \stopbuffer @@ -975,7 +983,7 @@ %D thanks to the grouping of the local footnotes, we don't need %D additional braces. %D -%D \haalbuffer +%D \getbuffer %D \macros %D {placefootnotes} @@ -1013,7 +1021,7 @@ \def\dodoplacenotes {\ifendnotes % hm, todo: per noteclass \ifinpagebody \else \ifdim\ht\localpostponednotes>\zeropoint - \ExpandBothAfter\doifinsetelse\v!geen{\noteparameter\c!plaats} + \ExpandBothAfter\doifinsetelse\v!none{\noteparameter\c!location} \placenotesasnone\placenotesintext\localpostponednotes \fi \fi \else \ifdim\ht\currentnoteins>\zeropoint @@ -1024,30 +1032,44 @@ %D {fakenotes} \def\fakenotes - {\ifhmode - \endgraf - \fi - \ifvmode - \calculatetotalnoteheight + {\ifhmode\endgraf\fi\ifvmode + \calculatetotalclevernoteheight + \ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi + \fi} + +\def\fakepagenotes + {\ifhmode\endgraf\fi\ifvmode + \calculatetotalpagenoteheight \ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi \fi} \newdimen\totalnoteheight + +\def\doaddtototalnoteheight#1% + {\ifdim\ht#1>\zeropoint + \advance\totalnoteheight\ht #1% + \advance\totalnoteheight\skip#1% + \fi} + \def\docalculatetotalnoteheight - {\ifdim\ht\currentnoteins>\zeropoint - \ifclevernotes % tricky here ! ! ! to be sorted out ! ! ! - \advance\totalnoteheight\ht \currentbackupnoteins - \advance\totalnoteheight\skip\currentbackupnoteins - \else - \advance\totalnoteheight\ht \currentnoteins - \advance\totalnoteheight\skip\currentnoteins - \fi + {\ifcase\clevernotes % tricky here ! ! ! to be sorted out ! ! ! + \doaddtototalnoteheight\currentnoteins + \else + \doaddtototalnoteheight\currentbackupnoteins \fi} -\def\calculatetotalnoteheight - {\totalnoteheight\zeropoint - \processnotes\docalculatetotalnoteheight} +\def\docalculatetotalclevernoteheight + {\ifcase\clevernotes \else % tricky here ! ! ! to be sorted out ! ! ! + \doaddtototalnoteheight\currentnoteins + \fi} + +\def\docalculatetotalpagenoteheight + {\doaddtototalnoteheight\currentnoteins} + +\def\calculatetotalnoteheight {\totalnoteheight\zeropoint\processnotes\docalculatetotalnoteheight} +\def\calculatetotalclevernoteheight{\totalnoteheight\zeropoint\processnotes\docalculatetotalclevernoteheight} +\def\calculatetotalpagenoteheight {\totalnoteheight\zeropoint\processnotes\docalculatetotalpagenoteheight} \newif\ifnotespresent @@ -1064,19 +1086,19 @@ %D explictly postponing footnotes? The solution turned out to %D be rather simple: %D -%D \starttypen +%D \starttyping %D \everypar {...\flushnotes...} %D \neverypar {...\postponenotes} -%D \stoptypen +%D \stoptyping %D %D and %D -%D \starttypen +%D \starttyping %D \def\ejectinsert% %D {... %D \flushnotes %D ...} -%D \stoptypen +%D \stoptyping %D %D We can use \type{\neverypar} because in most commands %D sensitive to footnote gobbling we disable \type{\everypar} @@ -1091,33 +1113,33 @@ \def\setnotebodyfont {\let\setnotebodyfont\relax \restoreglobalbodyfont - \switchtobodyfont[\noteparameter\c!korps]% - \setuptolerance[\noteparameter\c!tolerantie]% - \setupalign[\noteparameter\c!uitlijnen]} + \switchtobodyfont[\noteparameter\c!bodyfont]% + \setuptolerance[\noteparameter\c!tolerance]% + \setupalign[\noteparameter\c!align]} %D The footnote mechanism defaults to a traditional one %D column way of showing them. By default we precede them by %D a small line. -\definenote[\v!voetnoot] +\definenote[\v!footnote] %D Compatibility macros: - \def\setupfootnotedefinition{\setupnotedefinition [\v!voetnoot]} - \def\setupfootnotes {\setupnote [\v!voetnoot]} -\unexpanded \def\footnote {\setnote [\v!voetnoot]} -\unexpanded \def\footnotetext {\setnotetext [\v!voetnoot]} - \def\note {\dodoubleempty\notesymbol [\v!voetnoot]} % alleen footnote - \def\placefootnotes {\dodoubleempty\doplacefootnotes [\v!voetnoot]} - \def\placelocalfootnotes {\dodoubleempty\doplacelocalfootnotes[\v!voetnoot]} + \def\setupfootnotedefinition{\setupnotedefinition [\v!footnote]} + \def\setupfootnotes {\setupnote [\v!footnote]} +\unexpanded \def\footnote {\setnote [\v!footnote]} +\unexpanded \def\footnotetext {\setnotetext [\v!footnote]} + \def\note {\dodoubleempty\notesymbol [\v!footnote]} % alleen footnote + \def\placefootnotes {\dodoubleempty\doplacefootnotes [\v!footnote]} + \def\placelocalfootnotes {\dodoubleempty\doplacelocalfootnotes[\v!footnote]} \def\startlocalfootnotes {\startlocalnotes} \def\stoplocalfootnotes {\stoplocalnotes } \def\doplacefootnotes [#1][#2]% - {\ifsecondargument\placenotes [#1][#2,\c!hoogte=\teksthoogte]\else\placenotes [#1]\fi} + {\ifsecondargument\placenotes [#1][#2,\c!height=\textheight]\else\placenotes [#1]\fi} \def\doplacelocalfootnotes[#1][#2]% - {\ifsecondargument\placelocalnotes[#1][#2,\c!hoogte=\teksthoogte]\else\placelocalnotes[#1]\fi} + {\ifsecondargument\placelocalnotes[#1][#2,\c!height=\textheight]\else\placelocalnotes[#1]\fi} %D Backward compatibility command: @@ -1125,4 +1147,52 @@ \def\postponefootnotes {\postponenotes} \def\autopostponefootnotes{\autopostponenotes} -\protect \endinput \ No newline at end of file +\protect \endinput + +% \def\myfootnote[#1]#2% let's guess that #2 is without catcode problems +% {\setgvalue{note:t:#1}% +% {\setxvalue{note:l:#1}{\getvalue{note:n:#1}}% +% \footnote[note:a:#1:\getvalue{note:l:#1}]{#2}}% +% \setgvalue{note:n:#1}% +% {1}% +% \getvalue{note:t:#1}}% + +% \def\mynote[#1]% +% {\removeunwantedspaces +% \scratchcounter\getvalue{note:n:#1}\relax +% \edef\NoteNumber{\the\scratchcounter}% +% \doglobal\incrementvalue{note:n:#1}\relax +% \doifreferencefoundelse{note:a:#1:1} +% {\edef\NotePageA{\number\currentrealreference}% +% \doifreferencefoundelse{note:a:#1:\getvalue{note:n:#1}} +% {\edef\NotePageB{\number\currentrealreference}% +% \doifreferencefoundelse{note:a:#1:\NoteNumber} +% {\ifnum\currentrealreference=\NotePageB\relax +% \pagereference[note:a:#1:\getvalue{note:n:#1}]% +% \note[note:a:#1:\getvalue{note:l:#1}]% +% \else\ifnum\NotePageA=\NotePageB\relax +% \pagereference[note:a:#1:\getvalue{note:n:#1}]% +% \note[note:a:#1:\getvalue{note:l:#1}]% +% \else +% \getvalue{note:t:#1}% +% \fi\fi} +% {\ifnum\NotePageA=\NotePageB\relax +% \pagereference[note:a:#1:\getvalue{note:n:#1}]% +% \note[note:a:#1:\getvalue{note:l:#1}]% +% \else +% \getvalue{note:t:#1}% +% \fi}} +% {\pagereference[note:a:#1:\getvalue{note:n:#1}]% +% \note[note:a:#1:\getvalue{note:l:#1}]}} +% {\pagereference[note:a:#1:\getvalue{note:n:#1}]% +% \note[note:a:#1:\getvalue{note:l:#1}]}} + +% \starttext + +% funny \myfootnote[funny]{funny} funny \mynote[funny] \page + +% funny \mynote[funny] funny \mynote[funny] funny \mynote[funny] \page +% funny \mynote[funny] funny \mynote[funny] \page +% funny \mynote[funny] funny \mynote[funny] funny \mynote[funny] \page + +% \stoptext diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex index 8029d0476..65a9a92be 100644 --- a/tex/context/base/core-ntb.tex +++ b/tex/context/base/core-ntb.tex @@ -25,11 +25,13 @@ %D To Do: %D +%D \starttyping %D splitsen = ja | herhaal => als nofTH>1 then ja als herhaal +%D \stoptyping %D To Do: %D -%D \starttypen +%D \starttyping %D break over pagina %D kop herhalen %D reset settings @@ -41,7 +43,7 @@ %D \setupTABLE [a=b] %D %D \bTH \eTH -%D \stoptypen +%D \stoptyping % the section setup does not work yet, data needs to be stored, % i.e.each row should know if it's a head/body/foot, and there @@ -51,16 +53,16 @@ %D A simple way to force equal line spacing is to say: %D -%D \starttypen +%D \starttyping %D \def\bTBLCELL{\begstrut} %D \def\eTBLCELL{\endstrut} -%D \stoptypen +%D \stoptyping %D However, the next alternative also takes care of preceding %D and following white space. \def\bTBLCELL % why not \doinhibitblank - {\inhibitblank\doconvertfont\tbltblletter\empty\everypar{\begstrut}} + {\inhibitblank\doconvertfont\tbltblstyle\empty\everypar{\begstrut}} \def\eTBLCELL {\ifhmode @@ -169,26 +171,26 @@ {\ifthirdargument \processaction [#1] - [ \v!rij=>{\dosetupTABLExy[\c!y][#2][#3]},% - \v!kolom=>{\dosetupTABLExy[\c!x][#2][#3]},% + [ \v!row=>{\dosetupTABLExy[\c!y][#2][#3]},% + \v!column=>{\dosetupTABLExy[\c!x][#2][#3]},% r=>{\dosetupTABLExy[\c!y][#2][#3]},% c=>{\dosetupTABLExy[\c!x][#2][#3]},% y=>{\dosetupTABLExy[\c!y][#2][#3]},% x=>{\dosetupTABLExy[\c!x][#2][#3]},% \v!start=>{\dosetupTABLExy[#1][#2][#3]},% - \v!hoofd=>{\dosetupTABLExy[#1][#2][#3]},% + \v!header=>{\dosetupTABLExy[#1][#2][#3]},% \s!unknown=>{\dosetupTABLEzz[#1][#2][#3]}]% \else\ifsecondargument \processaction [#1] - [ \v!rij=>{\dosetupTABLExy[\c!y][\v!elk][#2]},% - \v!kolom=>{\dosetupTABLExy[\c!x][\v!elk][#2]},% - r=>{\dosetupTABLExy[\c!y][\v!elk][#2]},% - c=>{\dosetupTABLExy[\c!x][\v!elk][#2]},% - y=>{\dosetupTABLExy[\c!y][\v!elk][#2]},% - x=>{\dosetupTABLExy[\c!x][\v!elk][#2]},% - \v!start=>{\dosetupTABLExy[#1][\v!elk][#2]},% - \v!hoofd=>{\dosetupTABLExy[#1][\v!elk][#2]},% + [ \v!row=>{\dosetupTABLExy[\c!y][\v!each][#2]},% + \v!column=>{\dosetupTABLExy[\c!x][\v!each][#2]},% + r=>{\dosetupTABLExy[\c!y][\v!each][#2]},% + c=>{\dosetupTABLExy[\c!x][\v!each][#2]},% + y=>{\dosetupTABLExy[\c!y][\v!each][#2]},% + x=>{\dosetupTABLExy[\c!x][\v!each][#2]},% + \v!start=>{\dosetupTABLExy[#1][\v!each][#2]},% + \v!header=>{\dosetupTABLExy[#1][\v!each][#2]},% \s!unknown=>{\dosetupTABLEzz[\c!x][#1][#2]}]% \else \getparameters[\@@tbl\@@tbl][#1]% @@ -225,41 +227,41 @@ \def\setupTBLcell#1#2% cell over col over row {\setupTBLsection % already forgotten - \getvalue{\@@tblprefix\c!y\v!elk}% - \getvalue{\@@tblprefix\c!x\v!elk}% + \getvalue{\@@tblprefix\c!y\v!each}% + \getvalue{\@@tblprefix\c!x\v!each}% \getvalue{\@@tblprefix\c!y\v!oddeven{#1}}% \getvalue{\@@tblprefix\c!x\v!oddeven{#2}}% \getvalue{\@@tblprefix\c!x\v!oddeven{#2}\c!y\v!oddeven{#1}}% \ifnum#1=\plusone - \getvalue{\@@tblprefix\c!y\v!eerste}% - \executeifdefined{\@@tblprefix\c!x#2\c!y\v!eerste}\donothing + \getvalue{\@@tblprefix\c!y\v!first}% + \executeifdefined{\@@tblprefix\c!x#2\c!y\v!first}\donothing \fi \ifnum#2=\plusone - \getvalue{\@@tblprefix\c!x\v!eerste}% - \executeifdefined{\@@tblprefix\c!x\v!eerste\c!y#1}\donothing + \getvalue{\@@tblprefix\c!x\v!first}% + \executeifdefined{\@@tblprefix\c!x\v!first\c!y#1}\donothing \fi \ifnum#1=\maximumrow\relax - \getvalue{\@@tblprefix\c!y\v!laatste}% - \executeifdefined{\@@tblprefix\c!x#2\c!y\v!laatste}\donothing + \getvalue{\@@tblprefix\c!y\v!last}% + \executeifdefined{\@@tblprefix\c!x#2\c!y\v!last}\donothing \fi \ifnum#2=\maximumcol\relax - \getvalue{\@@tblprefix\c!x\v!laatste}% - \executeifdefined{\@@tblprefix\c!x\v!laatste\c!y#1}\donothing + \getvalue{\@@tblprefix\c!x\v!last}% + \executeifdefined{\@@tblprefix\c!x\v!last\c!y#1}\donothing \fi \ifnum#1=\maximumrow\relax\ifnum#2=\maximumcol\relax - \getvalue{\@@tblprefix\c!x\v!laatste\c!y\v!laatste}% + \getvalue{\@@tblprefix\c!x\v!last\c!y\v!last}% \fi\fi \ifnum#1=\plusone \ifnum#2=\plusone - \getvalue{\@@tblprefix\c!x\v!eerste\c!y\v!eerste}% + \getvalue{\@@tblprefix\c!x\v!first\c!y\v!first}% \fi\fi \ifnum#1>\noftblhdnxlines\else - \executeifdefined{\@@tblprefix\v!hoofd\v!elk}\donothing - \executeifdefined{\@@tblprefix\v!hoofd#2}\donothing + \executeifdefined{\@@tblprefix\v!header\v!each}\donothing + \executeifdefined{\@@tblprefix\v!header#2}\donothing \fi \executeifdefined{\@@tblprefix\c!y#1}\donothing \executeifdefined{\@@tblprefix\c!x#2}\donothing \executeifdefined{\@@tblprefix\c!x#2\c!y#1}\donothing - \global\letcscsname\@@tblsplitafter\csname\@@tbl\@@tbl\c!na\endcsname + \global\letcscsname\@@tblsplitafter\csname\@@tbl\@@tbl\c!after\endcsname \relax} \globallet\@@tblsplitafter\relax @@ -268,7 +270,7 @@ % % \bTABLE[split=yes] % \bTR \bTD left \eTD\bTD right \eTD\eTR -% \bTR[after=\pagina] \bTD left \eTD\bTD right \eTD\eTR +% \bTR[after=\page] \bTD left \eTD\bTD right \eTD\eTR % \bTR \bTD left \eTD\bTD right \eTD\eTR % \eTABLE @@ -277,7 +279,8 @@ \long\def\parseTR[#1][#2]#3\eTR% [#2] is dummy that kills spaces {\def\currentcol{0}\increment\maximumrow - \setupTABLE[\v!rij][\maximumrow][#1]#3} + \let\currentcolpos\currentcol + \setupTABLE[\v!row][\maximumrow][#1]#3} \long\def\parseTD[#1][#2]#3\eTD % [#2] is dummy that kills spaces {\getparameters[\@@tbl][\c!ny=\tblnr,\c!nx=\tblnc,nc=1,nr=1,#1]% @@ -313,9 +316,7 @@ {\@EA\handleTBLcell\celltag[#1]{#3}}} \long\def\parseTH[#1]#2\eTH - {\parseTD - [#1,\c!kleur=\tbltblkopkleur,\c!letter=\tbltblkopletter,% - \c!karakteruitlijnen=\v!nee]#2\eTD} + {\parseTD[#1,\c!color=\tbltblheadcolor,\c!style=\tbltblheadstyle,\c!aligncharacter=\v!no]#2\eTD} %D new @@ -334,17 +335,10 @@ \long\def\bTABLEbody{\dosingleempty\doTABLEbody} \long\def\bTABLEfoot{\dosingleempty\doTABLEfoot} -\long\def\doTABLEhead[#1]#2\eTABLEhead - {\appendtoks\doTABLEsection[#1]{#2}\to\TBLhead} - -\long\def\doTABLEnext[#1]#2\eTABLEnext - {\appendtoks\doTABLEsection[#1]{#2}\to\TBLnext} - -\long\def\doTABLEbody[#1]#2\eTABLEbody - {\appendtoks\doTABLEsection[#1]{#2}\to\TBLbody} - -\long\def\doTABLEfoot[#1]#2\eTABLEfoot - {\appendtoks\doTABLEsection[#1]{#2}\to\TBLfoot} +\long\def\doTABLEhead[#1]#2\eTABLEhead{\appendtoks\doTABLEsection[#1]{#2}\to\TBLhead} +\long\def\doTABLEnext[#1]#2\eTABLEnext{\appendtoks\doTABLEsection[#1]{#2}\to\TBLnext} +\long\def\doTABLEbody[#1]#2\eTABLEbody{\appendtoks\doTABLEsection[#1]{#2}\to\TBLbody} +\long\def\doTABLEfoot[#1]#2\eTABLEfoot{\appendtoks\doTABLEsection[#1]{#2}\to\TBLfoot} \long\def\doTABLEsection[#1]#2% {\def\setupTBLsection{\getparameters[\@@tbl\@@tbl][#1]}% @@ -357,85 +351,13 @@ \chardef\TBLpass=0 \def\presetallTABLEparameters% each odd|even level - {\executeifdefined{\@@rawtblprefix\v!start\v!elk}\relax + {\executeifdefined{\@@rawtblprefix\v!start\v!each}\relax \executeifdefined{\@@rawtblprefix\v!start\v!oddeven\TBLlevel}\relax \executeifdefined{\@@rawtblprefix\v!start\number\TBLlevel}\relax} \def\bTABLE {\dosingleempty\dobTABLE} -% \def\dobTABLE[#1]% -% {\pushTBL -% % box not here -% \bgroup -% \resetcharacteralign % new -% \getparameters -% [\@@tbl\@@tbl] -% [\c!uitlijnen={\v!rechts,\v!ruim,\v!hoog},#1]% -% \processaction -% [\tbltblsplitsen] -% [ \v!ja=>\enableTBLbreaktrue, -% \v!herhaal=>\enableTBLbreaktrue\multipleTBLheadstrue]% -% \processaction -% [\tbltblhoofd] -% [\v!herhaal=>\multipleTBLheadstrue]% -% \ifnum\TBLlevel>\plusone -% \vbox -% \else\ifenableTBLbreak -% % no \vbox -% \else -% \vbox -% \fi\fi -% \bgroup -% \localcolortrue -% \presetallTABLEparameters -% \ExpandFirstAfter\processallactionsinset -% [\tbltbloptie] -% [\v!rek=>\autoTBLspreadtrue]% -% \linewidth\tbltbllijndikte % needs to be frozen -% \dontcomplain -% \let\currentcol\!!zerocount -% \let\maximumrowspan\!!plusone -% \let\maximumcol\currentcol -% \let\maximumrow\currentcol -% \def\bTR{\dodoubleempty\parseTR}% -% \def\bTD{\dodoubleempty\parseTD}% -% \def\bTH{\dodoubleempty\parseTH}% -% \def\bTN{\dodoubleempty\parseTN}% -% \endgraf} - -% \def\dobTABLE[#1]% -% {\pushTBL -% % box not here -% \bgroup -% \resetcharacteralign % new -% \getparameters -% [\@@tbl\@@tbl] -% [\c!uitlijnen={\v!rechts,\v!ruim,\v!hoog},#1]% -% \processaction -% [\tbltblsplitsen] -% [ \v!ja=>\enableTBLbreaktrue, -% \v!herhaal=>\enableTBLbreaktrue\multipleTBLheadstrue]% -% \processaction -% [\tbltblhoofd] -% [\v!herhaal=>\multipleTBLheadstrue]% -% \localcolortrue -% \presetallTABLEparameters -% \ExpandFirstAfter\processallactionsinset -% [\tbltbloptie] -% [\v!rek=>\autoTBLspreadtrue]% -% \linewidth\tbltbllijndikte % needs to be frozen -% \dontcomplain -% \let\currentcol\!!zerocount -% \let\maximumrowspan\!!plusone -% \let\maximumcol\currentcol -% \let\maximumrow\currentcol -% \def\bTR{\dodoubleempty\parseTR}% -% \def\bTD{\dodoubleempty\parseTD}% -% \def\bTH{\dodoubleempty\parseTH}% -% \def\bTN{\dodoubleempty\parseTN}% -% \endgraf} - \def\dobTABLE[#1]% {\pushTBL % box not here @@ -444,14 +366,14 @@ \resetcharacteralign % new \getparameters [\@@tbl\@@tbl] - [\c!uitlijnen={\v!rechts,\v!ruim,\v!hoog},#1]% + [\c!align={\v!right,\v!broad,\v!high},#1]% \processaction - [\tbltblsplitsen] - [ \v!ja=>\enableTBLbreaktrue, - \v!herhaal=>\enableTBLbreaktrue\multipleTBLheadstrue]% + [\tbltblsplit] + [ \v!yes=>\enableTBLbreaktrue, + \v!repeat=>\enableTBLbreaktrue\multipleTBLheadstrue]% \processaction - [\tbltblhoofd] - [\v!herhaal=>\multipleTBLheadstrue]% + [\tbltblheader] + [\v!repeat=>\multipleTBLheadstrue]% % \ifnum\TBLlevel>\plusone % \vbox % \else\ifenableTBLbreak @@ -463,9 +385,9 @@ \localcolortrue \presetallTABLEparameters \ExpandFirstAfter\processallactionsinset - [\tbltbloptie] - [\v!rek=>\autoTBLspreadtrue]% - \linewidth\tbltbllijndikte % needs to be frozen + [\tbltbloption] + [\v!stretch=>\autoTBLspreadtrue]% + \linewidth\tbltblrulethickness % needs to be frozen \dontcomplain \let\currentcol\!!zerocount \let\maximumrowspan\!!plusone @@ -576,17 +498,17 @@ \let\startTBLprocessing\relax \let\stopTBLprocessing \relax -\def\processTBL - {\begTBL - \dorecurse\maximumrow - {\bTBL - \let\row\recurselevel - \dorecurse\maximumcol - {\let\col\recurselevel - \expanded{\doTBL{\row}{\col}}}% - \eTBL}% - \removeunwantedspaces % only if hmode - \endTBL} +% \def\processTBL +% {\begTBL +% \dorecurse\maximumrow +% {\bTBL +% \let\row\recurselevel +% \dorecurse\maximumcol +% {\let\col\recurselevel +% \expanded{\doTBL{\row}{\col}}}% +% \eTBL}% +% \removeunwantedspaces % only if hmode +% \endTBL} \def\spanTBL#1#2% {\scratchcounter\gettblcol{#1}{#2}\relax @@ -630,7 +552,7 @@ \increment\rowTBL\relax \ifnum\rowTBL>\noftblhdnxlines\relax \ifnum\rowTBL<\maximumrow\relax - \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}% + \doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}% \fi \fi \egroup}} @@ -675,133 +597,6 @@ \begintbl \to\tbltoks} -% \def\endTBL -% {\appendtoks -% \endtbl -% \to\tbltoks -% \setbox\scratchbox\hbox -% {\localframed -% [\@@tbl\@@tbl] -% [\c!kader=\v!uit,\c!achtergrond=,\c!uitlijnen=\v!nee] -% {\strut}}% -% \edef\minimalcellheight{\the\ht\scratchbox}% -% \dorecurse\maximumcol -% {\settblaut\recurselevel\!!zeropoint % \zeropoint etc -% % new -% \let\xcol\recurselevel -% \dorecurse\maximumrow -% {\settblwd \recurselevel\xcol\!!zeropoint -% \settblht \recurselevel\xcol\!!zeropoint}% -% % till here -% \settblwid\recurselevel\!!zeropoint}% -% \dorecurse\maximumrow -% {\settblhei\recurselevel\maxdimen}% -% \chardef\TBLpass\plusone -% \let\handleTBLcell\dohandleTBLcellA -% \def\makeTBL##1##2% -% {\gettbltxt{##1}{##2}}% -% \def\inTBLcell##1##2% -% {\ExpandBothAfter\doifinsetelse\localwidth{\v!passend,\v!ruim} % user set -% {} -% {\scratchdimen\gettblaut\colTBL\relax -% \ifdim\localwidth>\scratchdimen -% \settblaut\colTBL\localwidth -% \fi}}% -% \setbox0\vbox{\trialtypesettingtrue \the\tbltoks}% -% \ifautoTBLspread -% % experimental, stretch non fixed cells to \hsize -% \checktblwidthsone % trial run -% \checktblwidthstwo % real run -% \stretchtblwidths -% \let\handleTBLcell\dohandleTBLcellB -% \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}% -% \else\ifdim\wd0>\hsize -% \ifautoTBLhsize -% \checktblwidthsone % trial run -% \checktblwidthstwo % real run -% \let\handleTBLcell\dohandleTBLcellB -% \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}% -% \fi -% \else\ifautoTBLrowspan\ifnum\maximumrowspan>1 % max ? -% % added jan 2002 because nx=* did no longer work -% \checktblwidthsone % trial run -% \checktblwidthstwo % real run -% % -% \let\handleTBLcell\dohandleTBLcellC -% \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}% -% \fi\fi\fi\fi -% \let\handleTBLcell\dohandleTBLcellD -% \chardef\TBLpass2 -% \def\makeTBL##1##2% meer in cellD -% {\dimen2\zeropoint -% \pushmacro\colTBL -% \dorecurse{\gettblcol{##1}{##2}} -% {\advance\dimen2 \gettblwid\colTBL -% \increment\colTBL}% -% \edef\widthTBL{\the\dimen2}% -% \popmacro\colTBL -% \setbox\scratchbox\hbox{\gettbltxt{##1}{##2}}% -% \settblht{##1}{##2}{\the\ht\scratchbox}% -% \settblwd{##1}{##2}{\the\wd\scratchbox}% -% \ifdim\ht\scratchbox>\gettblhei{##1}\relax -% \settblhei{##1}{\the\ht\scratchbox}% -% \fi}% -% \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}% -% \checktblheightsone -% \checktblheightstwo -% \let\handleTBLcell\dohandleTBLcellE -% \chardef\TBLpass3 -% \def\makeTBL##1##2% -% {% height -% \pushmacro\rowTBL -% \scratchdimen\zeropoint -% \def\rowTBL{##1}% -% \ifnum\gettblcol{##1}{##2}=\maximumcol\relax -% % case: nc=maxcolumns -% \else -% \dorecurse{\gettblrow{##1}{##2}} -% {\advance\scratchdimen \gettblhei\rowTBL -% \increment\rowTBL}% -% \ifdim\scratchdimen<\gettblht{##1}{##2}\relax -% \scratchdimen\gettblht{##1}{##2}\relax -% \fi -% \fi -% \edef\heightTBL{\the\scratchdimen}% -% \popmacro\rowTBL -% % width -% \pushmacro\colTBL -% \scratchdimen\zeropoint -% \dorecurse{\gettblcol{##1}{##2}} -% {\advance\scratchdimen \gettblwid\colTBL -% \increment\colTBL}% -% \edef\widthTBL{\the\scratchdimen}% -% \popmacro\colTBL -% % cell -% \setbox\scratchbox\hbox{\gettbltxt{##1}{##2}}% -% \ifnum\gettblcol{##1}{##2}=\maximumcol\relax -% % case: nc=maxcolumns -% \else -% \scratchdimen\gettblhei{##1}% -% \setbox\scratchbox\hbox -% {\lower\ht\scratchbox\hbox{\raise\scratchdimen\box\scratchbox}}% -% \ht\scratchbox\scratchdimen -% \fi -% \dp\scratchbox\zeropoint -% \box\scratchbox}% -% \iftraceTABLE\showtbltoks\fi -% \ifnum\TBLlevel>\plusone -% \vbox{\the\tbltoks}% -% \else\ifenableTBLbreak -% \ifmultipleTBLheads -% \setbox\scratchbox\vbox{\the\tbltoks}% -% \splittblbox\scratchbox -% \else -% \the\tbltoks -% \fi -% \else -% \vbox{\the\tbltoks}% -% \fi\fi} - \def\endTBL {\appendtoks \endtbl @@ -809,7 +604,7 @@ \setbox\scratchbox\hbox {\localframed [\@@tbl\@@tbl] - [\c!kader=\v!uit,\c!achtergrond=,\c!uitlijnen=\v!nee] + [\c!frame=\v!off,\c!background=,\c!align=\v!no] {\strut}}% \edef\minimalcellheight{\the\ht\scratchbox}% \dorecurse\maximumcol @@ -828,7 +623,7 @@ \def\makeTBL##1##2% {\gettbltxt{##1}{##2}}% \def\inTBLcell##1##2% - {\ExpandBothAfter\doifinsetelse\localwidth{\v!passend,\v!ruim} % user set + {\ExpandBothAfter\doifinsetelse\localwidth{\v!fit,\v!broad} % user set {} {\scratchdimen\gettblaut\colTBL\relax \ifdim\localwidth>\scratchdimen @@ -939,103 +734,6 @@ \settblwid\recurselevel{\the\scratchdimen}}% \fi} -% \def\splittblbox#1% #1 <> 0/2 -% {\unvbox#1} - -% \def\splittblbox#1% #1 <> 0/2 -% {\ifinsidefloat -% \unvbox#1% -% \else -% % spacing between rows gets lost in split -% \setbox4\vbox -% {\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}% -% \setbox2\vbox -% {}% -% \dorecurse\noftblheadlines -% {\setbox0\vsplit#1 to \lineheight -% \setbox2\vbox{\unvcopy2\unvcopy0}}% -% \ifcase\noftblheadlines\else\unvcopy2\fi -% \donefalse -% \doloop -% {\setbox0\vsplit#1 to \lineheight -% \ifdim\pagegoal<\maxdimen -% \setbox0\vbox{\unvbox0}% -% \dimen0\ht0 -% \advance\dimen0\ht4 -% \advance\dimen0\pagetotal -% \ifdim\dimen0>\pagegoal -% \bgroup \pagina \egroup % make sure that local vars are kept -% \ifcase\noftblheadlines\else\unvcopy2\fi -% \fi -% \fi -% \ifdone -% \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}% -% \fi -% \unvbox0 -% \allowbreak -% \ifvoid#1 \exitloop \else \donetrue \fi}% -% \fi} - -% \bTABLE[split=repeat] -% \bTABLEhead -% \bTR \bTH lxxxeft \eTH\bTD right \eTD\eTR -% \eTABLEhead -% \bTABLEbody -% \dorecurse{100}{\bTR[after={\pagina[bigpreference]}] \bTD left \eTD\bTD right \eTD\eTR} -% \dorecurse{100}{\bTR\bTD left \eTD\bTD right \eTD\eTR} -% \eTABLEbody -% \eTABLE - -% \def\splittblbox#1% #1 <> 0/2 -% {\ifinsidefloat -% \unvbox#1% -% \else -% % spacing between rows gets lost in split -% \setbox4\vbox -% {\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}% -% \setbox2\vbox -% {}% -% \dorecurse\noftblheadlines -% {\setbox0\vsplit#1 to \lineheight -% \setbox2\vbox{\unvcopy2\unvcopy0}}% -% \ifcase\noftblheadlines\else\unvcopy2\fi -% \donefalse -% \doloop -% {\setbox0\vsplit#1 to \lineheight -% \ifdim\pagegoal<\maxdimen -% \setbox0\vbox{\unvbox0}% -% \dimen0\ht0 -% \advance\dimen0\ht4 -% \advance\dimen0\pagetotal -% \ifdim\dimen0>\pagegoal -% \bgroup \pagina \egroup % make sure that local vars are kept -% \ifcase\noftblheadlines\else\unvcopy2\fi -% \fi -% \fi -% \ifdone -% \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}% -% \fi -% \unvbox0 -% %\allowbreak -% \bgroup -% \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#1 \exitloop \else \donetrue \fi}% -% \fi} - \newbox\finaltblbox \def\notsplittblbox#1% @@ -1049,86 +747,14 @@ {\ifinsidefloat \notsplittblbox{#1}% \else - \executeifdefined{splittblbox\tbltblsplitsmethode}\splittblboxa{#1}% + \executeifdefined{splittblbox\tbltblsplitmethod}\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} - \newbox\TABLEsplitbox \def\splittblboxa#1% spacing between rows gets lost in split {\setbox\TABLEsplitbox\vbox{#1}% - \setbox8\vbox{\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}% + \setbox8\vbox{\doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}}% \ifmultipleTBLheads \setbox2\vbox{}% \setbox4\vbox{}% @@ -1144,7 +770,7 @@ \advance\dimen0\ht8 \advance\dimen0\pagetotal\relax \ifdim\dimen0>\pagegoal - \bgroup\pagina\egroup % make sure that local vars are kept + \bgroup\page\egroup % make sure that local vars are kept \fi \fi \unvcopy2 @@ -1165,7 +791,7 @@ \advance\dimen0\ht8 \advance\dimen0\pagetotal\relax \ifdim\dimen0>\pagegoal - \bgroup\pagina\egroup % make sure that local vars are kept + \bgroup\page\egroup % make sure that local vars are kept \ifmultipleTBLheads \ifcase\noftblheadlines\else\unvcopy2\fi \fi @@ -1175,7 +801,7 @@ \fi \!!doneatrue \ifdone - \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}% + \doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}% \fi \unvbox0 %\allowbreak @@ -1202,63 +828,12 @@ \egroup \ifvoid\TABLEsplitbox \exitloop \else \donetrue \fi}} -% \def\splittblboxb#1% -% {\setbox\scratchbox\vbox{#1}% -% \setbox8\vbox{\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}% -% \ifmultipleTBLheads -% \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}}% -% \fi -% \!!doneafalse -% \doloop -% {\ifdim\pagegoal<\maxdimen -% \scratchdimen\pagegoal -% \advance\scratchdimen-\pagetotal -% \else -% \scratchdimen\teksthoogte -% \fi -% \ifmultipleTBLheads -% \ifcase\noftblheadlines\else -% \advance\scratchdimen-\ht2 -% \fi -% \fi -% \advance\scratchdimen-\ht8 -% \setbox\finaltblbox\vbox -% {\ifmultipleTBLheads -% \ifcase\noftblheadlines\else -% \unvcopy2 -% \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}% -% \fi -% \fi -% \setbox0\vsplit\scratchbox to\scratchdimen -% \unvbox0}% -% \if!!donea\else\ifcase\noftblnextlines\else -% \setbox2\box4 -% \fi\fi -% \!!doneatrue -% \postprocessTABLEsplitbox\finaltblbox -% \beforeTABLEsplitbox -% \box\finaltblbox -% \afterTABLEsplitbox -% \setupTBLcell{\number\scratchcounter}1 -% \@@tblsplitafter -% \ifvoid\scratchbox -% \exitloop -% \else -% \pagina -% \fi}} - \let\extratblsplitheight\zeropoint % additional space taken by before/afterTABLEsplitbox \def\splittblboxb#1% - {\setbox\TABLEsplitbox\vbox{#1}% - \setbox8\vbox{\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}% + {\testpage[2]% quite save since a row is > 1 lineheight and we don't want one-liners + \setbox\TABLEsplitbox\vbox{#1}% + \setbox8\vbox{\doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}}% \ifmultipleTBLheads \setbox2\vbox{}% \setbox4\vbox{}% @@ -1269,14 +844,13 @@ {\setbox0\vsplit\TABLEsplitbox to \lineheight \setbox4\vbox{\unvcopy4\unvcopy0}}% \fi - \testpage[2]% quite save since a row is > 1 lineheight and we don't want one-liners \!!doneafalse \doloop {\ifdim\pagegoal<\maxdimen \scratchdimen\pagegoal \advance\scratchdimen-\pagetotal \else - \scratchdimen\teksthoogte + \scratchdimen\textheight \fi \ifmultipleTBLheads \ifcase\noftblheadlines\else @@ -1288,12 +862,12 @@ \ifdim\noflines\lineheight>\scratchdimen \advance\scratchdimen-\lineheight \fi -\advance\scratchdimen-\extratblsplitheight + \advance\scratchdimen-\extratblsplitheight \setbox\finaltblbox\vbox {\ifmultipleTBLheads \ifcase\noftblheadlines\else \unvcopy2 - \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}% + \doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}% \fi \fi \setbox0\vsplit\TABLEsplitbox to\scratchdimen @@ -1321,7 +895,7 @@ \box\finaltblbox \afterTABLEsplitbox \@@tblsplitafter - \pagina + \page \fi}} % ! ! ! ! TODO: naast \postprocessTABLEsplitbox ook evt \postprocessTABLEbox voor niet split @@ -1347,7 +921,7 @@ \advance\!!dimena -\scratchdimen \else \scratchdimen\gettblwid\recurselevel\relax - \ifdim\scratchdimen>\tbltblmaxbreedte\relax + \ifdim\scratchdimen>\tbltblmaxwidth\relax \ifcase#1\else\settblwid\recurselevel\!!zeropoint\fi \advance\!!counta \plusone \else @@ -1445,57 +1019,18 @@ \the\tbltoks}} \def\TBLcharalign - {\doifelse\tbltblkarakteruitlijnen\v!ja + {\doifelse\tbltblaligncharacter\v!yes \doTBLcharalign\gobbleoneargument} \long\def\doTBLcharalign#1#2% column data {\edef\alignmentclass{#1}% - \edef\alignmentcharacter{\tbltbluitlijnkarakter}% + \edef\alignmentcharacter{\tbltblaligncharacter}% \ifcase\TBLpass\or \setfirstpasscharacteralign\checkalignment{#2}% {\strut#2\unskip}% \fi % force hsize, so always a second \setsecondpasscharacteralign \checkalignment{#2}% {\strut#2\unskip}% \ignorespaces} -% \long\def\dohandleTBLcellA#1#2[#3]#4% -% {\setbox\scratchbox\hbox -% {\setupTBLcell{#1}{#2}% -% \localframed -% [\@@tbl\@@tbl] -% [#3,\c!achtergrond=,\c!kader=\v!uit]% 25% faster -% {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL\inTBLcell{#1}{#2}}}% -% \scratchdimen\gettblwid\colTBL\relax -% \ifdim\wd\scratchbox>\scratchdimen -% \settblwid\colTBL{\the\wd\scratchbox}% auto set -% \fi -% \let\rowTBLx\rowTBL\increment\rowTBLx -% \scratchdimen\gettblhei\rowTBLx\relax -% \ifdim\ht\scratchbox<\scratchdimen -% \settblhei\rowTBLx{\the\ht\scratchbox}% auto set -% \fi -% \settblht{#1}{#2}{\the\ht\scratchbox}% -% \settblwd{#1}{#2}{\the\wd\scratchbox}% -% \ifautoTBLcheckwidth -% \ifdim\wd\scratchbox<.75\hsize -% \ifdim\ht\scratchbox>2\openlineheight % honor width since this can be a -% \scratchdimen\gettblaut\colTBL\relax % figure or so -% \ifdim\scratchdimen=\zeropoint -% % side effect: when width is set to 0pt, -% % we can force a span that fits the sum of spans widths -% \settblaut\colTBL{\the\scratchdimen}% -% \else\ifdim\wd\scratchbox>\scratchdimen -% % unless span -% \settblaut\colTBL{\the\wd\scratchbox}% -% % to be translated -% \writestatus\m!TABLE{no auto width in (\number#1,\number#2)\space\the\wd\scratchbox/\the\hsize}% -% \fi\fi -% \fi -% \fi -% \fi -% \setbox2\null -% \wd2\wd\scratchbox \ht2\ht\scratchbox \dp2\dp\scratchbox -% \box2} - % new, needed for icare first col of 'doeltabel', experimental \long\def\dohandleTBLcellA#1#2[#3]#4% @@ -1503,7 +1038,7 @@ {\setupTBLcell{#1}{#2}% \localframed [\@@tbl\@@tbl] - [#3,\c!achtergrond=,\c!kader=\v!uit]% 25% faster + [#3,\c!background=,\c!frame=\v!off]% 25% faster {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL\inTBLcell{#1}{#2}}}% \scratchdimen\gettblwid\colTBL\relax \ifdim\wd\scratchbox>\scratchdimen @@ -1546,7 +1081,7 @@ {\setupTBLcell{#2}{#3}% \localframed [\@@tbl\@@tbl] - [#4,#1,\c!kader=\v!uit,\c!achtergrond=] + [#4,#1,\c!frame=\v!off,\c!background=] {\bTBLCELL#5\eTBLCELL}}% \setbox2\null \wd2\wd\scratchbox \ht2\ht\scratchbox \dp2\dp\scratchbox @@ -1563,14 +1098,14 @@ \long\def\dohandleTBLcellB#1#2[#3]#4% {\scratchdimen\gettblaut\colTBL\relax \ifdim\scratchdimen>\zeropoint\relax - \let\tblwidthkey\c!breedte \edef\tblwidth{\the\scratchdimen}% + \let\tblwidthkey\c!width \edef\tblwidth{\the\scratchdimen}% \else \scratchdimen\gettblwid\colTBL\relax \ifdim\scratchdimen>\zeropoint\relax \ifnum\gettblcol{#1}{#2}=\maximumcol\relax \scratchdimen\hsize \fi - \let\tblwidthkey\c!breedte \edef\tblwidth{\the\scratchdimen}% + \let\tblwidthkey\c!width \edef\tblwidth{\the\scratchdimen}% \else \let\tblwidthkey\s!unknown \let \tblwidth \!!zeropoint \fi @@ -1585,8 +1120,7 @@ \bgroup \localframed [\@@tbl\@@tbl] - [#3,\c!breedte=\widthTBL, - \c!achtergrond=,\c!kader=\v!uit]% 25% faster + [#3,\c!width=\widthTBL,\c!background=,\c!frame=\v!off]% 25% faster {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL}% \egroup} @@ -1594,36 +1128,37 @@ {\setupTBLcell{#1}{#2}% \getparameters[\@@tbl\@@tbl][#3]% to get the color right, the way we \color % handle color here prevents interference due to whatsit nodes - [\tbltblkleur] % as well as permits local colors to take precedence + [\tbltblcolor] % as well as permits local colors to take precedence {\ifdim\heightTBL=\zeropoint\relax % case: nc=maxcolumns \localframed [\@@tbl\@@tbl] - [\c!kleur=,\c!breedte=\widthTBL] + [\c!color=,\c!width=\widthTBL] {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL}% \else \localframed [\@@tbl\@@tbl] - [\c!kleur=,\c!breedte=\widthTBL,\c!hoogte=\heightTBL] + [\c!color=,\c!width=\widthTBL,\c!height=\heightTBL] {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL}% \fi}} \setupTABLE - [\c!kaderoffset=.5\linewidth, - \c!achtergrondoffset=\v!kader, - \c!kaderkleur=black, - \c!kleur=, - \c!letter=, - \c!kopletter=\v!vet, - \c!kopkleur=, - \c!strut=\v!nee, - \c!karakteruitlijnen=\v!nee, - \c!uitlijnkarakter={,}, - \c!optie=, % \v!rek - \c!splitsen=\v!nee, - \c!hoofd=, - \c!tussenwit=, - \c!maxbreedte=8em, - \c!splitsmethode=a] + [\c!frameoffset=.5\linewidth, + \c!backgroundoffset=\v!frame, + \c!framecolor=\s!black, + \c!color=, + \c!style=, + \c!headstyle=\v!bold, + \c!headcolor=, + \c!strut=\v!no, + \c!aligncharacter=\v!no, + \c!alignmentcharacter={,}, + \c!option=, % \v!stretch + \c!header=, + \c!spaceinbetween=, + \c!maxwidth=8em, + \c!split=\v!no, + \c!splitoffset=0pt, + \c!splitmethod=a] %D We have already prepared the previous macros for nesting, %D so we only have to pop in the right ones: @@ -1688,21 +1223,21 @@ [\@@tbl\@@tbl]% % achtergrond, achtergrondraster, achtergrondkleur % not ok yet \setupTABLE - [\c!kaderoffset=.5\linewidth, - \c!achtergrondoffset=\v!kader, - \c!kaderkleur=black, - \c!kleur=, - \c!letter=, - \c!kopletter=, - \c!kopkleur=, - \c!strut=\v!nee, - \c!karakteruitlijnen=\v!nee, - \c!uitlijnkarakter={,}, - \c!maxbreedte=8em]% + [\c!frameoffset=.5\linewidth, + \c!backgroundoffset=\v!frame, + \c!framecolor=\s!black, + \c!color=, + \c!style=, + \c!headstyle=, + \c!headcolor=, + \c!strut=\v!no, + \c!aligncharacter=\v!no, + \c!alignmentcharacter={,}, + \c!maxwidth=8em]% \else \setupTABLE - [\c!breedte=\v!passend, - \c!hoogte=\v!passend]% + [\c!width=\v!fit, + \c!height=\v!fit]% \fi \fi} @@ -1724,8 +1259,8 @@ % \VL text \VL text \VL \AR % \stoptable -\def\complexTableTB[#1]{\TABLEnoalign{\blanko[#1]}} -\def\simpleTableTB {\TABLEnoalign{\blanko}} +\def\complexTableTB[#1]{\TABLEnoalign{\blank[#1]}} +\def\simpleTableTB {\TABLEnoalign{\blank}} \def\TabulateTB {\complexorsimpleTable{TB}} @@ -1749,4 +1284,4 @@ \appendtoks\let\TB\TableTB \to\everytable \appendtoks\let\TB\TabulateTB\to\everytabulate -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-num.tex b/tex/context/base/core-num.tex index 43e1832f4..1054c4e19 100644 --- a/tex/context/base/core-num.tex +++ b/tex/context/base/core-num.tex @@ -17,140 +17,134 @@ % Commando's ten behoeve van nummeren: % -% \definieernummer[naam] -% \stelnummerin[naam][wijze=,blok=,tekst=,plaats=,conversie=,start=] -% \setnumber[naam]{waarde} -% \resetnumber[naam] -% \verhoognummer[naam] -% \verlaagnummer[naam] -% \volgendenummer[naam][tag][referentie] -% \nummer[naam] -% \huidigenummer[naam] -% \savenumber[naam] -% \restorenumber[naam] - -\newif\ifnummeren - -\def\@@thenumber#1{\s!number\csname\s!number#1\c!nummer\endcsname} - -\def\dostelnummerin[#1][#2]% +% \definenumber[name] +% \setupnumber[name][wijze=,blok=,tekst=,plaats=,conversie=,start=] +% \setnumber[name]{value} +% \resetnumber[name] +% \incrementnumber[name] +% \decrementnumber[name] +% \convertednumber[name] % getnumber +% \savenumber[name] +% \restorenumber[name] +% \convertednumner[name] +% \rawnumber[name] + +% private (defined in core-sec.tex) +% +% \nextnumber[name][tag][reference] +% \currentnumber[name] + +\def\@@thenumber#1{\s!number\csname\s!number#1\c!number\endcsname} + +% this will be the new (public) one: \let\numberparameterprefix\@@thenumber + +\def\numberparameter#1#2{\csname\@@thenumber{#1}#2\endcsname} % sort of public + +\def\dosetupnumber[#1][#2]% {\@EA\let\@EA\savedstartnumber\csname\@@thenumber{#1}\c!start\endcsname \getparameters[\@@thenumber{#1}][\c!start=,#2]% - \doifelsevaluenothing{\@@thenumber{#1}\c!start} + \doifelsenothing{\numberparameter{#1}\c!start} {\letvalue{\@@thenumber{#1}\c!start}\savedstartnumber} - {\setcounter{\@@thenumber{#1}}{\getvalue{\@@thenumber{#1}\c!start}}}} + {\setcounter{\@@thenumber{#1}}{\numberparameter{#1}\c!start}}} + +\def\setupnumber + {\dodoubleargument\dosetupnumber} -\def\stelnummerin - {\dodoubleargument\dostelnummerin} +\def\definenumber + {\dodoubleempty\dodefinenumber} -\def\dodefinieernummer[#1][#2]% ook overal class als localframed +\def\dodefinenumber[#1][#2]% ook overal class als localframed {\doifassignmentelse{#2} - {\dododefinieernummer[#1][#2]} + {\dododefinenumber[#1][#2]} {\doifelsenothing{#2} % can break on not yet defined macros in #2 - {\dododefinieernummer[#1][#2]} - {\setvalue{\s!number#1\c!nummer}{#2}}}} + {\dododefinenumber[#1][#2]} + {\setvalue{\s!number#1\c!number}{#2}}}} -\def\dododefinieernummer[#1][#2]% +\def\dododefinenumber[#1][#2]% {\getparameters [\s!number#1] - [\c!nummer=#1, + [\c!number=#1, \s!check=, - \c!wijze=\@@nrwijze, - \c!wijze\c!lokaal=\getvalue{\@@thenumber{#1}\c!wijze}, - \c!sectienummer=\v!ja, - \c!tekst=, % weg hier - \c!plaats=, % weg hier, was trouwens \c!zetwijze - \c!conversie=\v!cijfers, + \c!way=\@@nrway, + \c!way\c!local=\numberparameter{#1}\c!way, + \c!sectionnumber=\v!yes, + \c!text=, % no longer used here, will go away + \c!location=, % no longer used here, will go away (was ooit \c!zetwijze) + \c!conversion=\v!numbers, \c!start=0, #2]% \makecounter{\@@thenumber{#1}}% - \setcounter{\@@thenumber{#1}}{\getvalue{\@@thenumber{#1}\c!start}}} - -\def\definieernummer - {\dodoubleempty\dodefinieernummer} + \setcounter{\@@thenumber{#1}}{\numberparameter{#1}\c!start}} \def\setnumber[#1]#2% {\setcounter{\@@thenumber{#1}}{#2}} \def\resetnumber[#1]% - {\setcounter{\@@thenumber{#1}}{0\csname\@@thenumber{#1}\c!start\endcsname}} + {\setcounter{\@@thenumber{#1}}{0\numberparameter{#1}\c!start}} \def\dodoreset#1% {\getvalue{\s!reset#1}}% -\def\doreset[#1]% - {\processcommalist[#1]\dodoreset} - -\def\reset - {\dosingleargument\doreset} - -%\def\verhoognummer[#1]% -% {\checknummer{#1}% -% \ifnummeren -% \else -% \resetcounter{\@@thenumber{#1}}% -% \fi -% \pluscounter{\@@thenumber{#1}}} - \def\savenumber[#1]% {\savecounter{\@@thenumber{#1}}} \def\restorenumber[#1]% {\restorecounter{\@@thenumber{#1}}} +%D Bonus macro (we need to keep this one for downward +%D compatibility reasons). + +\def\doreset[#1]% + {\processcommalist[#1]\dodoreset} + +\def\reset + {\dosingleargument\doreset} + % nieuw, maar kan dit (i.v.m. (sub)page?) -% \def\verhoognummer[#1]% +% \def\incrementnumber[#1]% % {\checknummer{#1}% -% \ifnummeren -% \pluscounter{\@@thenumber{#1}}% -% \else -% \setcounter{\@@thenumber{#1}}{0\csname\@@thenumber{#1}\c!start\endcsname}% -% \fi} - -\def\verhoognummer[#1]% - {\doifelsevalue{\@@thenumber{#1}\c!wijze}{\v!per\v!pagina} +% \doifelse\@@nrstatus\v!start +% {\pluscounter{\@@thenumber{#1}}} +% {\setcounter{\@@thenumber{#1}}{0\csname\@@thenumber{#1}\c!start\endcsname}}} + +\def\incrementnumber[#1]% bypage tricky: needs a + {\doifelse{\numberparameter{#1}\c!way}{\v!by\v!page} {\checkpagechange{#1}% \ifpagechanged\resetcounter{\@@thenumber{#1}}\fi} {\checknummer{#1}}% - \ifnummeren - \pluscounter{\@@thenumber{#1}}% - \else - \setcounter{\@@thenumber{#1}}{0\getvalue{\@@thenumber{#1}\c!start}}% - \fi} + \doifelse\@@nrstate\v!start % only here + {\pluscounter{\@@thenumber{#1}}} + {\setcounter{\@@thenumber{#1}}{0\numberparameter{#1}\c!start}}} % \defineenumeration [test] [way=bypage,text=\lastchangedpage] % % \starttext \dorecurse{10}{\test \input tufte \par} \stoptext -\def\verlaagnummer[#1]% +\def\decrementnumber[#1]% {\minuscounter{\@@thenumber{#1}}} -\def\nummer[#1]% +\def\convertednumber[#1]% {\convertnumber - {\getvalue{\@@thenumber{#1}\c!conversie}} + {\numberparameter{#1}\c!conversion} {\countervalue{\@@thenumber{#1}}}} -\def\ruwenummer[#1]% +\def\rawnumber[#1]% {\countervalue{\@@thenumber{#1}}} + +\let\getnumber\convertednumber \ifx\checknummer\undefined \let\checknummer\gobbleoneargument \fi % ook de pag nummers hierheen halen ivm \@@nrwijze -\def\dostelnummerenin[#1]% globaal - {\getparameters[\??nr][#1]% - \doifelse\@@nrstatus\v!start - {\global\nummerentrue} - {\global\nummerenfalse}}% - -\def\stelnummerenin - {\dosingleargument\dostelnummerenin} +\def\setupnumbering + {\dodoubleempty\getparameters[\??nr]} -\stelnummerenin - [\c!wijze=\v!per\v!hoofdstuk, - \c!blokwijze=, - \c!sectienummer=\v!ja, - \c!status=\v!start] +\setupnumbering + [\c!way=\v!by\v!chapter, + \c!blockway=, + \c!sectionnumber=\v!yes, + \c!state=\v!start] \protect \endinput diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex index 48e7b11ba..8f482848d 100644 --- a/tex/context/base/core-obj.tex +++ b/tex/context/base/core-obj.tex @@ -71,10 +71,10 @@ %D application can save lots of bytes, while the latter use is %D more a necessity than byte saving. %D -%D \starttypen +%D \starttyping %D \setobject{class}{name}\somebox{} %D \getobject{class}{name} -%D \stoptypen +%D \stoptyping %D %D Here \type{\somebox} can be whatever box specification suits %D \TEX. We save the dimensions of an object, although some @@ -115,7 +115,6 @@ %D clip. \def\objectoffset{1cm} - {} % \def\dodosetobject#1#2#3% % {\bgroup @@ -177,7 +176,30 @@ % \box\scratchbox % \elabelgroup} -\def\dogetobject#1#2#3#4#5#6#7% +% \def\dogetobject#1#2#3#4#5#6#7% +% {\initializepaper +% \forgetall +% \dontshowcomposition +% \setbox\scratchbox\vbox +% {\doinsertobject{#1}{#2}}% +% \setbox\scratchbox#3% +% {\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\scaledpoint +% \setbox\nextbox\hbox +% {\hskip-\scratchdimen\lower\scratchdimen\flushnextbox}% +% \wd\scratchbox#4\scaledpoint +% \ht\scratchbox#5\scaledpoint +% \dp\scratchbox#6\scaledpoint +% \box\scratchbox +% \elabelgroup} + +\def\dogetobject#1#2#3#4#5#6#7% don't change this, should work for dvi & pdf {\initializepaper \forgetall \dontshowcomposition @@ -186,25 +208,20 @@ \setbox\scratchbox#3% {\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\ifdim\wd\scratchbox>#4\scaledpoint \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss \else \vss\box\scratchbox - \fi}}% - \scratchdimen#7\scaledpoint - \setbox\nextbox\hbox - {\hskip-\scratchdimen\lower\scratchdimen\flushnextbox}% - \wd\scratchbox#4\scaledpoint - \ht\scratchbox#5\scaledpoint - \dp\scratchbox#6\scaledpoint + \fi\fi}}% \box\scratchbox \elabelgroup} %D If needed one can ask for the dimensions of an object with: %D -%D \starttypen +%D \starttyping %D \getobjectdimensions{class}{name} -%D \stoptypen +%D \stoptyping %D %D The results are reported in \type {\objectwidth}, \type %D {\objectheight} and \type {\objectdepth}. @@ -235,15 +252,14 @@ %D defined before they are used, but forward referencing %D sometimes occurs. %D -%D \starttypen +%D \starttyping %D \dosetobjectreference {class} {identifier} {reference value} {page} %D \dogetobjectreference {class} {identifier} \csname -%D \stoptypen +%D \stoptyping %D %D These commands are to be called by the \type{\startobject}, %D \type{\stopobject} and \type{\insertobject} specials. - \def\objectreferenced{\global\chardef\crossreferenceobject\plusone} \def\driverreferenced{\global\chardef\crossreferenceobject\zerocount} @@ -316,10 +332,10 @@ %D To prevent redundant definition of objects, one can use %D the next tests: %D -%D \starttypen +%D \starttyping %D \doifobjectfoundelse{class}{object}{do then}{do else} %D \doifobjectreferencefoundelse{class}{object}{do then}{do else} -%D \stoptypen +%D \stoptyping \beginTEX @@ -366,9 +382,9 @@ %D reuse when possible. To enable mechanisms to determine %D what method to use, we provide: %D -%D \starttypen +%D \starttyping %D \doifobjectssupportedelse{true action}{false action} -%D \stoptypen +%D \stoptyping %D %D As we can see, currently objects depend on the special %D driver. diff --git a/tex/context/base/core-par.tex b/tex/context/base/core-par.tex index 0c68a1427..66c3ad850 100644 --- a/tex/context/base/core-par.tex +++ b/tex/context/base/core-par.tex @@ -88,14 +88,14 @@ \def\doresetparagraph {\resetparagraphlines}% \def\dobeforeparagraph - {\startregelnummeren[\v!verder]}% + {\startlinenumbering[\v!continue]}% \def\doafterparagraph - {\stopregelnummeren}% + {\stoplinenumbering}% \def\dobeforeskipparagraph - {\stopregelnummeren + {\stoplinenumbering \let\paragraphnumber\relax}% \def\doafterskipparagraph - {\startregelnummeren[\v!verder]}} + {\startlinenumbering[\v!continue]}} \long\def\directpushparagraph#1% {\doglobal\increment\totalnofparagraphs @@ -173,7 +173,7 @@ \fi} \def\dopopparagraphs[#1]% - {\doifnotinset{#1}{\v!geen,0} + {\doifnotinset{#1}{\v!none,0} {\dosetparagraph \doglobal\newcounter\globalparagraphnumber \doglobal\newcounter\discardedparagraphs diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex index 61257abf2..9022fa131 100644 --- a/tex/context/base/core-pos.tex +++ b/tex/context/base/core-pos.tex @@ -79,22 +79,22 @@ %D %D The three specials involved are: %D -%D \starttypen +%D \starttyping %D \dosetposition {identifier} %D \dosetpositionwhd {identifier} {width} {height} {depth} %D \dosetpositionplus {identifier} {width} {height} {depth} {list} %D \dosetpositionpapersize {width} {height} -%D \stoptypen +%D \stoptyping %D %D Either directly, when using \PDFTEX, or by means of a %D postprocessor, when using \DVI\ output, these end up in the %D utility file as: %D -%D \starttypen +%D \starttyping %D \pospxy {identifier} {page} {x} {y} %D \pospxywhd {identifier} {page} {x} {y} {w} {h} {d} %D \pospxylist {identifier} {page} {x} {y} {w} {h} {d} {list} -%D \stoptypen +%D \stoptyping %D %D This means that we have to provide both a utility set and %D reset macro for positions. @@ -115,6 +115,8 @@ \let\pospxywhd \setpospxywhd \let\pospxyplus\setpospxyplus} +\addutilityreset{positions} + %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. @@ -128,8 +130,8 @@ \def\registerpageposition#1% this one is flushed first ! {\ifpositioning\ifcase\realpageno\or - \ifdim\printpapierhoogte=\papierhoogte\else - \ifdim\printpapierbreedte=\papierbreedte\else + \ifdim\printpaperheight=\paperheight\else + \ifdim\printpaperwidth=\paperwidth\else \setbox#1\hbox{\hpos\pageanchor{\box#1}}% \fi \fi @@ -356,15 +358,15 @@ %D extra argument, denoting what additional parameter to pick %D up. So, the third extra is fetched with, %D -%D \starttypen +%D \starttyping %D \MPplus{identifier}{3}{default} -%D \stoptypen +%D \stoptyping %D %D All extras (comma separated) are fetched with: %D -%D \starttypen +%D \starttyping %D \MPrest{identifier} -%D \stoptypen +%D \stoptyping %D %D The extra parameters are not treated. @@ -428,8 +430,8 @@ {\ifpositioning \else \global\positioningtrue \dosetpositionpapersize - {\number\printpapierbreedte}% - {\number\printpapierhoogte }% + {\number\printpaperwidth}% + {\number\printpaperheight }% \fi \doglobal\increment\currentpositions} @@ -580,7 +582,7 @@ %D The next one will be overloaded later. %D -%D \starttypen +%D \starttyping %D \def\dopositionaction#1% test saves hash entry in etex %D {\ifundefined{\POSactionprefix#1::}\else %D \ifnum\MPp{#1}>\zerocount % new @@ -610,11 +612,11 @@ %D \traceposstring\clap\cyan{<#1>}% %D \fi %D \fi} -%D \stoptypen +%D \stoptyping \def\doifpositionaction#1% {\ifundefined{\POSactionprefix#1::}% - \@EA\gobblefirstargument + \@EA\gobbleoneargument \else \@EA\firstofoneargument \fi} @@ -628,9 +630,9 @@ %D We can copy a position with: %D -%D \starttypen +%D \starttyping %D \copyposition {to} {from} -%D \stoptypen +%D \stoptyping %D %D Again, this is a global action. @@ -648,9 +650,9 @@ %D one of the reasons why we need to be able to test for %D existence, using: %D -%D \starttypen +%D \starttyping %D \doifpositionelse {identifier} {found action} {not found action} -%D \stoptypen +%D \stoptyping % \def\doifpositionelse#1% % {\doifdefinedelse{\POSprefix#1}} @@ -671,7 +673,7 @@ %D We have several macros available to save positions. Later %D we will see applications. %D -%D \starttabulatie[|l|l||] +%D \starttabulate[|l|l||] %D \NC \type {\xypos} \NC \NC simple position with no dimensions \NC \NR %D \NC \type {\hpos} \NC \NC position and characteristics of a \type {\hbox} \NC \NR %D \NC \type {\vpos} \NC \NC position and characteristics of a \type {\vbox} \NC \NR @@ -679,7 +681,7 @@ %D \NC \type {\epos} \NC e: \NC end point in a line \NC \NR %D \NC \type {\fpos} \NC f: \NC begin point in a paragraph \NC \NR %D \NC \type {\tpos} \NC t: \NC end point in a paragraph \NC \NR -%D \stoptabulatie +%D \stoptabulate %D %D Each macro takes an identifier as argument, and the \type %D {\hpos} and \type {\vpos} also expect box content. @@ -808,7 +810,7 @@ \hss}% \fi} -\appendtoks \registerparoptions \to \everypar +% \appendtoks \registerparoptions \to \everypar %D \macros %D {doifoverlappingelse} @@ -816,11 +818,11 @@ %D A first application of positional information, is to %D determine if two boxes do overlap: %D -%D \starttypen +%D \starttyping %D \doifoverlappingelse{point a}{point b} %D {action when overlapping} %D {action when not overlapping} -%D \stoptypen +%D \stoptyping % \def\doifoverlappingelse#1#2#3#4% % {\relax\ifnum\MPp{#1}=\MPp{#2}\relax @@ -913,14 +915,14 @@ %D Instead of letting the user handle fuzzy expansion, we %D provide a simple test on positione being on the same page. %D -%D \starttypen +%D \starttyping %D \doifpositionsonsamepageelse{point a}{point b} %D {action when on same page} %D {action when not on same page} %D \doifpositionsonthispageelse{point a}{point b} %D {action when on this page} %D {action when not on this page} -%D \stoptypen +%D \stoptyping \def\dodoifpositionsonsamepageelse#1#2#3#4% {\bgroup @@ -964,16 +966,16 @@ \def\placepositionanchors % todo : depth pagebox {\ifpositioning - \setbox\scratchbox\vbox to \teksthoogte + \setbox\scratchbox\vbox to \textheight {\simpletopskipcorrection \hbox{\strut\dopositionaction\headanchor}% \vfill \hbox{\strut\dopositionaction\tailanchor}}% \dp\scratchbox\zeropoint - \wd\scratchbox\zetbreedte % not \zeropoint, else wrong text backgrounds + \wd\scratchbox\makeupwidth % not \zeropoint, else wrong text backgrounds \hpos\textanchor{\box\scratchbox}% \else - \vskip\teksthoogte + \vskip\textheight \fi} %D The first version of this module implemented head and tail @@ -1068,17 +1070,17 @@ %D We can best demonstrate this in an example, say: %D %D \startbuffer[text] -%D \omlijnd -%D [achtergrond=sample,uitlijnen=midden,breedte=7cm] +%D \framed +%D [backgroundachtergrond=sample,align=middle,width=7cm] %D {We want to connect \hpos {A-1} {this} word with its %D grammatical cousin \hpos {A-2} {that}.} %D \stopbuffer %D %D \typebuffer[text] %D -%D \startregelcorrectie -%D %\haalbuffer[graphic,sample,text] -%D \stopregelcorrectie +%D \startlinecorrection +%D %\getbuffer[graphic,sample,text] +%D \stoplinecorrection %D %D The graphic is defined in the following way, using some %D macros defined in an auxiliary \METAPOST\ module that is @@ -1499,17 +1501,17 @@ % will be overloaded, and/or code below moved to core-box -\defineoverlay[\v!tekst-2][\positionoverlay{\v!tekst-2}] -\defineoverlay[\v!tekst-1][\positionoverlay{\v!tekst-1}] -\defineoverlay[\v!tekst+1][\positionoverlay{\v!tekst+1}] -\defineoverlay[\v!tekst+2][\positionoverlay{\v!tekst+2}] +\defineoverlay[\v!text-2][\positionoverlay{\v!text-2}] +\defineoverlay[\v!text-1][\positionoverlay{\v!text-1}] +\defineoverlay[\v!text+1][\positionoverlay{\v!text+1}] +\defineoverlay[\v!text+2][\positionoverlay{\v!text+2}] %D The auxiliary \METAPOST\ macros are defined by default, %D by saying: \appendtoks if unknown context_core : input mp-core.mp ; fi ; -\to \MPinitializations +\to \MPextensions %D Some of these macros are pretty clever but too complicated %D to be nice. When things are kind of stable I'll clean up @@ -1683,12 +1685,12 @@ \MPpositiongraphic{mpos:par}{}% \stopMPpositionmethod -%D \starttypen +%D \starttyping %D \setupbackground %D [test] %D [mp=mpos:par:columnset, -%D methode=mpos:par:columnset] -%D \stoptypen +%D methodmethode=mpos:par:columnset] +%D \stoptyping %D We need to treat floats in a special way. @@ -1697,7 +1699,7 @@ \to \MPinitializations \def\textbackgroundoverlay#1% - {\iflocalpositioning\v!lokaal\else\v!tekst\fi#1} + {\iflocalpositioning\v!local\else\v!text\fi#1} \newcounter\localpositionnumber @@ -1748,6 +1750,29 @@ \def\backgroundvariable#1% {\csname\??td\currenttextbackground#1\endcsname} +% \definetextbackground[more][state=start,backgroundcolor=red] % location=paragraph +% \definetextbackground[test][state=start,backgroundcolor=green] +% +% \page \placefigure[left]{}{} +% +% \starttextbackground[test] +% \readfile{ward}{}{} +% \starttextbackground[more] +% \readfile{ward}{}{} +% \stoptextbackground +% \readfile{ward}{}{} +% \stoptextbackground +% +% \page \placefigure[right]{}{} +% +% \starttextbackground[test] +% \readfile{ward}{}{} +% \starttextbackground[more] +% \readfile{ward}{}{} +% \stoptextbackground +% \readfile{ward}{}{} +% \stoptextbackground + \def\dostarttextbackground[#1][#2]% {\checktextbackgrounds \def\currenttextbackground{#1}% @@ -1763,7 +1788,7 @@ \setuptextbackground[#1][#2]% \let\dodostarttextbackground\relax \let\dodostoptextbackground \relax - \doifvalue{\??td#1\c!status}\v!start + \doifvalue{\??td#1\c!state}\v!start {\dopresettextbackground{#1}}% \dodostarttextbackground} @@ -1771,12 +1796,12 @@ \def\dopresettextbackground#1% todo: \backgroundparameter {\ExpandFirstAfter\processaction % \EFA niet echt nodig - [\getvalue{\??td#1\c!plaats}] - [ \v!tekst=>\let\dodostarttextbackground\dostarttextbackgroundtxt + [\getvalue{\??td#1\c!location}] + [ \v!text=>\let\dodostarttextbackground\dostarttextbackgroundtxt \let\dodostoptextbackground \dostoptextbackgroundtxt, - \v!alinea=>\let\dodostarttextbackground\dostarttextbackgroundpar + \v!paragraph=>\let\dodostarttextbackground\dostarttextbackgroundpar \let\dodostoptextbackground \dostoptextbackgroundpar, - \v!geen=>\let\dodostarttextbackground\relax + \v!none=>\let\dodostarttextbackground\relax \let\dodostoptextbackground \relax]% \ifx\dodostarttextbackground\dostarttextbackgroundpar % untested \ifnum\textbackgrounddepth>\plusone % new @@ -1784,33 +1809,33 @@ \let\dodostoptextbackground \dostoptextbackgroundtxt \fi \fi - \doifelsevalue{\??td#1\c!kader}\v!aan - {\doifelsevalue{\??td#1\c!hoek}\v!rond - {\setvalue{\??td#1\c!kader}{2}} - {\setvalue{\??td#1\c!kader}{1}}} - {\setvalue{\??td#1\c!kader}{0}}% - \doifelsevalue{\??td#1\c!achtergrond}\v!kleur - {\setvalue{\??td#1\c!achtergrond}{1}} - {\setvalue{\??td#1\c!achtergrond}{0}}% - %\startpositionoverlay{\v!tekst\getvalue{\??td#1\c!niveau}}% - \startpositionoverlay{\textbackgroundoverlay{\getvalue{\??td#1\c!niveau}}}% + \doifelsevalue{\??td#1\c!frame}\v!on + {\doifelsevalue{\??td#1\c!corner}\v!round + {\setvalue{\??td#1\c!frame}{2}} + {\setvalue{\??td#1\c!frame}{1}}} + {\setvalue{\??td#1\c!frame}{0}}% + \doifelsevalue{\??td#1\c!background}\v!color + {\setvalue{\??td#1\c!background}{1}} + {\setvalue{\??td#1\c!background}{0}}% + %\startpositionoverlay{\v!text\getvalue{\??td#1\c!level}}% + \startpositionoverlay{\textbackgroundoverlay{\getvalue{\??td#1\c!level}}}% \expanded {\setMPpositiongraphicrange % moet veel efficienter {\btbanchor}% {b:\currentparbackground}% {\etbanchor}% {e:\currentparbackground}% - {\getvalue{\??td#1\c!methode}}% + {\getvalue{\??td#1\c!method}}% {self=\currentparbackground, mp=\getvalue{\??td#1\c!mp}, - gridtype=\getvalue{\??td#1\c!variant}, - filltype=\getvalue{\??td#1\c!achtergrond}, - linetype=\getvalue{\??td#1\c!kader}, - gridcolor=\getvalue{\??td#1\c!kaderkleur}, - linecolor=\getvalue{\??td#1\c!kaderkleur}, - fillcolor=\getvalue{\??td#1\c!achtergrondkleur}, - filloffset=\getvalue{\??td#1\c!achtergrondoffset}, - gridwidth=\getvalue{\??td#1\c!lijndikte}, - linewidth=\getvalue{\??td#1\c!lijndikte}, - lineradius=\getvalue{\??td#1\c!straal}}}% + gridtype=\getvalue{\??td#1\c!alternative}, + filltype=\getvalue{\??td#1\c!background}, + linetype=\getvalue{\??td#1\c!frame}, + gridcolor=\getvalue{\??td#1\c!framecolor}, + linecolor=\getvalue{\??td#1\c!framecolor}, + fillcolor=\getvalue{\??td#1\c!backgroundcolor}, + filloffset=\getvalue{\??td#1\c!backgroundoffset}, + gridwidth=\getvalue{\??td#1\c!rulethickness}, + linewidth=\getvalue{\??td#1\c!rulethickness}, + lineradius=\getvalue{\??td#1\c!radius}}}% \stoppositionoverlay} \def\stoptextbackground @@ -1818,7 +1843,7 @@ \carryoverpar\egroup} \def\starttextbackgroundmanual - {\dostartattributes{\??td\currenttextbackground}\c!letter\c!kleur\empty + {\dostartattributes{\??td\currenttextbackground}\c!style\c!color\empty \fpos\currentparbackground\ignorespaces} \def\stoptextbackgroundmanual @@ -1827,7 +1852,7 @@ \def\dostarttextbackgroundtxt {\ifvmode \leavevmode \fi - \dostartattributes{\??td\currenttextbackground}\c!letter\c!kleur\empty + \dostartattributes{\??td\currenttextbackground}\c!style\c!color\empty \fpos\currentparbackground\ignorespaces} \def\dostoptextbackgroundtxt @@ -1838,37 +1863,37 @@ % % \def\dostarttextbackgroundpar % {\endgraf % new -% \getvalue{\??td\currenttextbackground\c!voor}% +% \getvalue{\??td\currenttextbackground\c!before}% % \noindent\fpos\currentparbackground\ignorespaces % \bgroup % \nobreak \vskip-\lineheight \nobreak -% \doassignsomeskip\getvalue{\??td\currenttextbackground\c!bovenoffset}\to\scratchskip +% \doassignsomeskip\getvalue{\??td\currenttextbackground\c!topoffset}\to\scratchskip % \kern\scratchskip\nobreak -% \dosetleftskipadaption{\getvalue{\??td\currenttextbackground\c!linkeroffset}}% +% \dosetleftskipadaption{\getvalue{\??td\currenttextbackground\c!leftoffset}}% % \advance\leftskip\leftskipadaption -% \dosetleftskipadaption{\getvalue{\??td\currenttextbackground\c!rechteroffset}}% +% \dosetleftskipadaption{\getvalue{\??td\currenttextbackground\c!rightoffset}}% % \advance\rightskip\leftskipadaption -% \dostartattributes{\??td\currenttextbackground}\c!letter\c!kleur{}% -% \geenwitruimte +% \dostartattributes{\??td\currenttextbackground}\c!style\c!color{}% +% \nowhitespace % \seteffectivehsize % \par} % % \def\dostoptextbackgroundpar % {\par % \dostopattributes -% \doassignsomeskip\getvalue{\??td\currenttextbackground\c!onderoffset}\to\scratchskip +% \doassignsomeskip\getvalue{\??td\currenttextbackground\c!bottomoffset}\to\scratchskip % \kern\scratchskip\nobreak % \nobreak \vskip-\lineheight \nobreak -% \geenwitruimte +% \nowhitespace % \egroup % \nobreak \noindent \strut \hfill \kern\zeropoint \tpos\currentparbackground % \endgraf % new -% \getvalue{\??td\currenttextbackground\c!na}} +% \getvalue{\??td\currenttextbackground\c!after}} \def\dostarttextbackgroundpar {\endgraf % new - \getvalue{\??td\currenttextbackground\c!voor}% - \doassignsomeskip\getvalue{\??td\currenttextbackground\c!bovenoffset}\to\scratchskip + \getvalue{\??td\currenttextbackground\c!before}% + \doassignsomeskip\getvalue{\??td\currenttextbackground\c!topoffset}\to\scratchskip \xdef\textbackgroundskip{\the\scratchskip}% \noindent \ifgridsnapping @@ -1881,30 +1906,31 @@ \fpos\currentparbackground \fi \bgroup + \endgraf % we need a vertical nobreak - 29/06/2004 \nobreak \vskip-\lineheight \nobreak - \doassignsomeskip\getvalue{\??td\currenttextbackground\c!bovenoffset}\to\scratchskip + \doassignsomeskip\getvalue{\??td\currenttextbackground\c!topoffset}\to\scratchskip \ifgridsnapping \else \ifdim\textbackgroundskip>\zeropoint \kern\textbackgroundskip\nobreak \fi \fi - \dosetleftskipadaption{\getvalue{\??td\currenttextbackground\c!linkeroffset}}% + \dosetleftskipadaption{\getvalue{\??td\currenttextbackground\c!leftoffset}}% \advance\leftskip\leftskipadaption - \dosetleftskipadaption{\getvalue{\??td\currenttextbackground\c!rechteroffset}}% + \dosetleftskipadaption{\getvalue{\??td\currenttextbackground\c!rightoffset}}% \advance\rightskip\leftskipadaption -% new -\dosetraggedcommand{\getvalue{\??td\currenttextbackground\c!uitlijnen}}% -\raggedcommand -% - \dostartattributes{\??td\currenttextbackground}\c!letter\c!kleur\empty - \geenwitruimte + % new + \dosetraggedcommand{\getvalue{\??td\currenttextbackground\c!align}}% + \raggedcommand + % + \dostartattributes{\??td\currenttextbackground}\c!style\c!color\empty + \nowhitespace \seteffectivehsize - \doinhibitblank % \blanko[\v!blokkeer]% new + \doinhibitblank % \blank[\v!disable]% new \par} \def\dostoptextbackgroundpar {\par \removelastskip % new \dostopattributes - \doassignsomeskip\getvalue{\??td\currenttextbackground\c!onderoffset}\to\scratchskip + \doassignsomeskip\getvalue{\??td\currenttextbackground\c!bottomoffset}\to\scratchskip \ifdim\lastskip>\zeropoint \advance\scratchskip-\lastskip \fi @@ -1913,7 +1939,7 @@ \kern\scratchskip\nobreak \fi \fi \nobreak \vskip-\lineheight \nobreak - \geenwitruimte + \nowhitespace \egroup \bgroup \forgeteverypar % NOT REALLY NEEDED, SAVES HASH/MEM \nobreak \noindent \strut \hfill \kern\zeropoint @@ -1928,7 +1954,7 @@ \fi \egroup \endgraf % new - \getvalue{\??td\currenttextbackground\c!na}} + \getvalue{\??td\currenttextbackground\c!after}} \let\textparpages \!!zeropoint \let\textparheight\!!zeropoint @@ -1957,12 +1983,12 @@ \advance\scratchdimen \MPh\textanchor\relax \ifcase\scratchcounter>2 \ifnum\scratchcounter<5 % more pages - \scratchdimen\teksthoogte + \scratchdimen\textheight \advance\scratchcounter \minusone \multiply\scratchdimen \scratchcounter \else % keep'm small - \scratchdimen5\teksthoogte + \scratchdimen5\textheight \fi \fi \fi \edef\textparheight{\the\scratchdimen}% @@ -1973,7 +1999,7 @@ \else % two or more pages / maybe also hang \ifx#3\relax - \scratchdimen\zetbreedte % \tekstbreedte + \scratchdimen\makeupwidth % \textwidth \else \scratchdimen\MPw\MPparanchor \advance\scratchdimen-\MPl\MPparanchor @@ -1985,18 +2011,18 @@ \def\mintextparheight{4\lineheight} \def\dontsplitnexttextbackground % dangerous but useful - {\ifdim\pagetotal>\teksthoogte \else + {\ifdim\pagetotal>\textheight \else \ifdim\pagegoal=\maxdimen \else \calculatenexttextpardimensions % too tricky % \scratchdimen=\textparheight % \advance\scratchdimen\pagetotal\relax % \ifdim\scratchdimen>\pagegoal - % \pagina + % \page % \fi \ifdim\textparheight>\zeropoint \ifdim\textparheight>\mintextparheight\else - \pagina % option + \page % option \fi \fi \fi @@ -2008,13 +2034,13 @@ \def\dodefinetextbackground[#1][#2]% {\ifsecondargument % why ? \copyparameters[\??td#1][\??td] - [\c!status,\c!plaats,\c!variant,\c!mp,\c!methode, - \c!achtergrond,\c!achtergrondkleur,\c!hoek,\c!niveau, - \c!achtergrondoffset,\c!voor,\c!na,\c!uitlijnen, - \c!straal,\c!kader,\c!kaderkleur,\c!lijndikte, - \c!linkeroffset,\c!rechteroffset,\c!bovenoffset,\c!onderoffset]% + [\c!state,\c!location,\c!alternative,\c!mp,\c!method, + \c!background,\c!backgroundcolor,\c!corner,\c!level, + \c!backgroundoffset,\c!before,\c!after,\c!align, + \c!radius,\c!frame,\c!framecolor,\c!rulethickness, + \c!leftoffset,\c!rightoffset,\c!topoffset,\c!bottomoffset]% \getparameters[\??td#1][#2]% - \doifvalue{\??td#1\c!status}\v!start\checktextbackgrounds + \doifvalue{\??td#1\c!state}\v!start\checktextbackgrounds \unexpanded\setvalue{#1}% {\groupedcommand{\starttextbackground[#1]}{\stoptextbackground}}% \setvalue{\e!start#1}{\starttextbackground[#1]}% @@ -2024,15 +2050,6 @@ \def\setuptextbackground {\dodoubleargument\dosetuptextbackground} -%\def\dosetuptextbackground[#1][#2]% -% {\ifsecondargument -% \getparameters[\??td#1][#2]% -% \def\currenttextbackground{#1}% -% \doifvalue{\??td#1\c!status}{\v!start}{\checktextbackgrounds}% -% \else -% \setuptextbackground[][#1]% -% \fi} - \def\dosetuptextbackground[#1][#2]% {\ifsecondargument \doifelsenothing{#1} @@ -2045,7 +2062,7 @@ \def\dodosetuptextbackground#1#2% {\getparameters[\??td#2][#1]% \def\currenttextbackground{#2}% - \doifvalue{\??td#2\c!status}\v!start\checktextbackgrounds} + \doifvalue{\??td#2\c!state}\v!start\checktextbackgrounds} \let\currenttextbackground\empty @@ -2057,35 +2074,35 @@ \setuptextbackground [\c!mp=mpos:par:columnset, % buggy: mpos:par:shape - \c!methode=mpos:par:columnset, % - \c!status=\v!start, - \c!plaats=\v!tekst, - \c!linkeroffset=\!!zeropoint, % 1em, - \c!rechteroffset=\getvalue{\??td\currenttextbackground\c!linkeroffset}, - \c!bovenoffset=\!!zeropoint, % \v!middel, - \c!onderoffset=\getvalue{\??td\currenttextbackground\c!bovenoffset}, - \c!niveau=-1, - \c!variant=0, - \c!uitlijnen=, - \c!achtergrond=\v!kleur, - \c!achtergrondkleur=lightgray, - \c!achtergrondoffset=\!!zeropoint, - \c!hoek=\v!recht, - \c!straal=.5\bodyfontsize, - \c!kader=\v!aan, - \c!kaderkleur=blue, - \c!lijndikte=\linewidth] + \c!method=mpos:par:columnset, % + \c!state=\v!start, + \c!location=\v!text, + \c!leftoffset=\!!zeropoint, % 1em, + \c!rightoffset=\getvalue{\??td\currenttextbackground\c!leftoffset}, + \c!topoffset=\!!zeropoint, % \v!medium, + \c!bottomoffset=\getvalue{\??td\currenttextbackground\c!topoffset}, + \c!level=-1, + \c!alternative=0, + \c!align=, + \c!background=\v!color, + \c!backgroundcolor=lightgray, + \c!backgroundoffset=\!!zeropoint, + \c!corner=\v!rectangular, + \c!radius=.5\bodyfontsize, + \c!frame=\v!on, + \c!framecolor=blue, + \c!rulethickness=\linewidth] %D As an example we define a grid background: \definetextbackground [\v!grid] - [\c!status=\v!stop, - \c!plaats=\v!alinea, - \c!kader=\v!uit, - \c!kaderkleur=red, - \c!achtergrond=, - \c!variant=1] + [\c!state=\v!stop, + \c!location=\v!paragraph, + \c!frame=\v!off, + \c!framecolor=red, + \c!background=, + \c!alternative=1] \ifx\basegrid\undefined \else \letvalue\v!grid=\basegrid \fi @@ -2144,15 +2161,15 @@ %D A non graphic example of the use of positioning, is to stack %D text in for instance the margin. %D -%D \stackposdown \inlinker {some text}The text \type {some text} -%D goes into the left margin, and \stackposdown \inlinker {some +%D \stackposdown \inleft {some text}The text \type {some text} +%D goes into the left margin, and \stackposdown \inleft {some %D more}\type {some more} as well. When they overlap, they %D will not touch. %D -%D Here we said \type {\stackposdown \inlinker{some text}}. Instead -%D of \stackposleft \inlinker {one}stacking \stackposleft \inlinker +%D Here we said \type {\stackposdown \inleft{some text}}. Instead +%D of \stackposleft \inleft {one}stacking \stackposleft \inleft %D {two}vertically, one can stack horizontally by \stackposleft -%D \inlinker {three}using \type {\stackposleft}. +%D \inleft {three}using \type {\stackposleft}. %D %D We can go in all four directions, using \type {\stackposdown}, %D \type {\stackposup}, \type {\stackposleft} and \type @@ -2258,11 +2275,14 @@ % \stopbuffer % \getbuffer \typebuffer \flushstatus \page +\newdimen\laststackvmove + \def\stackeddown {\bgroup % this macro assumes a few things and is meant to work for margin notes \dowithnextbox {\doglobal\increment\currentautopos + \global\laststackvmove\zeropoint \hpos{\POSstackprefix\currentautopos} {\edef\next {\nextboxht\the\nextboxht @@ -2309,6 +2329,7 @@ {\MPw\currentposition}{\the\scratchskip}{\MPd\currentposition}}% %\registerstatus{new \currentautopos: \MPy\currentposition/\MPh\currentposition}% \egroup + \global\laststackvmove\scratchdimen % new \setbox\nextbox\iftracepositions\@EA\ruledhbox\else\@EA\hbox\fi {\lower\scratchdimen\flushnextbox}% \next @@ -2368,9 +2389,9 @@ %D For a right menu, a sequence of calls to \type %D {right_menu_button} is generated. %D -%D \starttypen +%D \starttyping %D right_menu_button (n, p, s=0/1/2, x, y, w, h, d) ; -%D \stoptypen +%D \stoptyping %D %D Here, n is the number of the button, s a status variable, %D while the rest is positional info. The status variable is @@ -2389,7 +2410,7 @@ % 0=notfound 1=found 2=currentpage \def\do@@amposition#1#2#3% - {\doifelsevalue{\??am#1\c!positie}\v!ja + {\doifelsevalue{\??am#1\c!position}\v!yes {\doglobal\increment\currentamposition \doifnumberelse{#2} {\docheckrealreferencepage{#2}% @@ -2537,21 +2558,21 @@ %D %D \typebuffer %D -%D % \haalbuffer +%D % \getbuffer %D %D \startbuffer -%D \starttabulatie[|c|c|c|] +%D \starttabulate[|c|c|c|] %D \GFC[f:x] this is a small \NC table \NC in which we \NC \FR %D \NC will demonstrate \GFC[g:z] that this \GTC[g] positioning \NC \MR %D \GSC[e:y] mechanism also \GTC[f] works quite well \NC in tables \NC \LR -%D \stoptabulatie +%D \stoptabulate %D \stopbuffer %D %D The table itself defines three areas (a, b and~c) using %D these frames. %D %D \typebuffer -%D % \haalbuffer +%D % \getbuffer %D %D Tables (based on \TABLE) are supported by: @@ -2588,22 +2609,22 @@ %D \setMPpositiongraphic{b:z}{tableshade}{from=b:z,to=e:z,color=blue} %D \stopbuffer %D -%D \typebuffer \haalbuffer +%D \typebuffer \getbuffer %D %D The definition of the table looks about the same as the %D previous one: %D %D \startbuffer -%D \starttabel[|c|c|c|] +%D \starttable[|c|c|c|] %D \GFC[b:z] \cw{this is a small} \NC \cw{table} \NC in which we \NC \FR %D \NC \cw{will demonstrate} \GFC[c:y] \cw{that this} \GTC[c] \cw{positioning} \NC \MR %D \GSC[a:x] \cw{mechanism also} \GTC[b] \cw{works quite well} \NC in tables \NC \LR -%D \stoptabel +%D \stoptable %D \stopbuffer %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer % \definepositionframed[w][background=color,backgroundcolor=yellow] % \definepositionframed[x][background=color,backgroundcolor=red] @@ -2671,7 +2692,7 @@ \lower\dimen2\hbox {\advance\dimen2 \MPh{b:#1}% \framed - [\c!breedte=\dimen0,\c!hoogte=\dimen2, + [\c!width=\dimen0,\c!height=\dimen2, \c!offset=\v!overlay,#2]{}}}% \smashedbox\scratchbox \egroup} @@ -2687,4 +2708,4 @@ % \advance\scratchdimen -\MPx{mh:#1}% % \edef\righthdistance{\the\scratchdimen}} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex index ee31798bc..75ff24a6d 100644 --- a/tex/context/base/core-ref.tex +++ b/tex/context/base/core-ref.tex @@ -136,16 +136,16 @@ %D %D There are three ways of defining a reference: %D -%D \starttypen +%D \starttyping %D \pagereference[here] %D \textreference[here]{some text} -%D \stoptypen +%D \stoptyping %D %D the third alternative combines them in: %D -%D \starttypen +%D \starttyping %D \reference[here]{some text} -%D \stoptypen +%D \stoptyping \def\textreference {\dosingleargument\dotextreference} \def\pagereference {\dosingleargument\dopagereference} @@ -153,11 +153,11 @@ %D These are implemented in a low level form as: %D -%D \starttypen +%D \starttyping %D \def\dotextreference[#1]{\rawtextreference\s!txt{#1}} % #2 %D \def\dopagereference[#1]{\rawpagereference\s!pag{#1}} %D \def\doreference [#1]{\rawreference \s!ref{#1}} % #2 -%D \stoptypen +%D \stoptyping %D %D or without expansion problems: @@ -244,9 +244,9 @@ %D a the utility file. The next macro does the job and %D generates entries like: %D -%D \starttypen +%D \starttyping %D \mainreference{prefix}{reference}{page}{realpage}{text} -%D \stoptypen +%D \stoptyping %D %D We did not yet discuss prefixing. Especially in interactive %D documents, it's not always easy to keep track of duplicate @@ -314,18 +314,18 @@ %D In practice this comes to giving \type {\mainreference} a %D appropriate meaning and loading the utility file. -% \def\setreferences% +% \def\setreferences % {\def\mainreference##1##2##3##4##5% % {\doifundefinedelse{\r!cross\fileprefix##1##2} % {\setglobalcrossreference{##1##2}{##3}{##4}{##5}} -% {\showmessage{\m!references}{2}{[##1][##2],##4}}}} +% {\showmessage\m!references{2}{[##1][##2],##4}}}} -% \def\setreferences% +% \def\setreferences % {\the\everyreference % we're grouped anyway % \def\mainreference##1##2##3##4##5% % {\doifundefinedelse{\r!cross\fileprefix##1##2} % {\setglobalcrossreference{##1##2}{##3}{##4}{##5}} -% {\ifcase0##4\else\showmessage{\m!references}{2}{[##1][##2],##4}\fi}}} +% {\ifcase0##4\else\showmessage\m!references{2}{[##1][##2],##4}\fi}}} %D For a long time the only way to access an external file was %D to use the file prefix (\type {somefile::}. However, when @@ -335,16 +335,16 @@ %D {page}, you can access the reference directly. The latter %D case nills the prefix method, thereby saving some memory. %D -%D \starttabulatie[||||] +%D \starttabulate[||||] %D \NC filename::tag \NC page(filename::pnum) \NC tag \NC\NR %D \NC $\star$ \NC \NC \NC\NR %D \NC $\star$ \NC $\star$ \NC $\star$ \NC\NR %D \NC \NC $\star$ \NC \NC\NR -%D \stoptabulatie +%D \stoptabulate \chardef\autocrossfilereferences=0 -% \def\setreferences% some day, filename will be stored in ref record +% \def\setreferences % some day, filename will be stored in ref record % {\the\everyreference % we're grouped anyway % \def\mainreference##1##2##3##4##5% % {\doifundefinedelse{\r!cross\fileprefix##1##2} @@ -354,14 +354,14 @@ % \setglobalcrossreference{##1##2}{##3}{##4}{##5}% % \doifundefinedelse{\r!cross##1##2} % {\expanded{\definereference[##1##2][\fileprefix##1##2]}} -% {\showmessage{\m!references}{2}{[##1][##2],##4 (auto \currentutilityfilename)}}% +% {\showmessage\m!references2{[##1][##2],##4 (auto \currentutilityfilename)}}% % \or % \doifundefinedelse{\r!cross##1##2} % {\expanded{\definereference[##1##2][\noexpand\v!pagina(\fileprefix##4)]}} -% {\showmessage{\m!references}{2}{[##1][##2],##4 (auto \currentutilityfilename)}}% +% {\showmessage\m!references2{[##1][##2],##4 (auto \currentutilityfilename)}}% % \fi} % {\ifcase0##4\else -% \showmessage{\m!references}{2}{[##1][##2],##4 (\currentutilityfilename)}% +% \showmessage\m!references2{[##1][##2],##4 (\currentutilityfilename)}% % \fi}}} % optimizing this one makes sense when we have docs with 10K @@ -380,7 +380,7 @@ {\showmessage\m!references2{[##1][##2],##4 (auto \currentutilityfilename)}}% \or \doifundefinedelse{\r!cross##1##2} - {\expanded{\definereference[##1##2][\noexpand\v!pagina(\fileprefix##4)]}} + {\expanded{\definereference[##1##2][\noexpand\v!page(\fileprefix##4)]}} {\showmessage\m!references2{[##1][##2],##4 (auto \currentutilityfilename)}}% \fi \else\ifcase0##4\else @@ -448,10 +448,10 @@ %D for navigational purposes. The main reason for this is that %D we want to treat both categories alike: %D -%D \starttypen +%D \starttyping %D \goto{go back}[PreviousJump] %D \goto{colofon}[colofon page] -%D \stoptypen +%D \stoptyping %D %D Here \type{PreviousJump} is handled by the viewer, while the %D \type{colofon page} reference is, apart from hyperlinking, a @@ -534,19 +534,19 @@ %D In practice accessing a reference comes down to: %D -%D \startopsomming[opelkaar] -%D \som checking the validity -%D \som determining the type -%D \som filtering the content -%D \stopopsomming +%D \startitemize[packed] +%D \item checking the validity +%D \item determining the type +%D \item filtering the content +%D \stopitemize %D %D We'll deal with the last two steps first. References are %D saved in the general format: %D -%D \starttypen +%D \starttyping %D {\referenceclass{realpage}{page}{text}} %D {\referenceclass{type}{data}} -%D \stoptypen +%D \stoptyping %D %D When we filter the content, next macros are set when we %D meet a normal cross reference: @@ -602,10 +602,18 @@ \fi} {\realreferencepagefalse}} +\def\currentfolioreference{0} + \def\dogetreferenceelements#1#2#3#4#5% {\chardef\currentreferencetype=\ifx#1\relax0\else#1\fi\relax \ifnum\currentreferencetype<2 - \def\currentpagereference{\referencepagenumber[#2]}% + \edef\currentpagereference{#2}% + \ifx\currentpagereference \empty + \let\currentfolioreference\folio + \else + \def \currentpagereference {\referencepagenumber[#2]}% + \edef\currentfolioreference{\dosplitofffoliopart[#2]}% + \fi \edef\currentrealreference{#3}% \settextreferences#4\end \ifnum0#5<\crossreferencenumber @@ -614,8 +622,9 @@ \forwardreferencefalse \fi \else - \edef\currentrealreference{#3}% - \def\currentdatareference{#2}% + \edef\currentrealreference {#3}% + \def \currentdatareference {#2}% + \let \currentfolioreference\folio \settextreferences#4\end \forwardreferencefalse \fi @@ -637,15 +646,15 @@ %D Text references can contain more than one entry and %D therefore we check for %D -%D \starttypen +%D \starttyping %D {entry} -%D \stoptypen +%D \stoptyping %D %D or %D -%D \starttypen +%D \starttyping %D {{entry}{entry}{entry}} -%D \stoptypen +%D \stoptyping %D %D and split accordingly. @@ -740,7 +749,7 @@ %D have \type{\goto}, \type{\button} and alike. These are more %D versatile and look like: %D -%D \starttypen +%D \starttyping %D \goto[reference] %D \goto[outer reference::] %D \goto[outer reference::inner reference] @@ -748,7 +757,7 @@ %D \goto[operation(action{argument,argument})] %D \goto[action] %D \goto[action{argument}] -%D \stoptypen +%D \stoptyping %D %D The first one is a normal reference, the second and third %D are references to a file or \URL. The brace delimited @@ -758,21 +767,21 @@ %D When we split off the components of such a reference, the %D results are available in: %D -%D \starttypen +%D \starttyping %D \currentreferencespecial %D \currentreferenceoperation %D \currentreferencearguments %D \currentinnerreference %D \currentouterreference %D \currentfullreference -%D \stoptypen +%D \stoptyping %D %D Splitting a reference is done by: %D -%D \starttypen +%D \starttyping %D \splitofffullreference {reference} %D \splitoffreference {reference} -%D \stoptypen +%D \stoptyping %D %D The second alternative can be used in a second stage %D splitoff and only handles \type{::}. @@ -886,20 +895,20 @@ %D prefixed one. Consider for instance the prefix set to %D \type{sidetrack}. %D -%D \starttypen +%D \starttyping %D \pagereference[important] %D \pagereference[unimportant] -%D \setupreferencing[prefix=sidetrack] +%D \setupreferencing[prefixprefix=sidetrack] %D \pagereference[important] -%D \stoptypen +%D \stoptyping %D %D results in saving (writing) the references %D -%D \starttypen +%D \starttyping %D ...{}{important} %D ...{}{unimportant} %D ...{sidetrack}{important}... -%D \stoptypen +%D \stoptyping %D %D Now when we call for \type{unimportant}, we will indeed get %D the pagenumber associated to this reference. But when we @@ -913,16 +922,16 @@ %D Before we start analyzing, I introduce a general %D definition macro. Consider: %D -%D \starttypen +%D \starttyping %D \goto{do}[JS(My_Script{"test",123}),titlepage] -%D \stoptypen +%D \stoptyping %D %D This can also be achieved by: %D -%D \starttypen +%D \starttyping %D \definereference[startup][JS(My_Script{"test",123}),titlepage] %D \goto{do}[REF(startup)] -%D \stoptypen +%D \stoptyping %D %D Now is this is a handy feature or not? %D @@ -1203,16 +1212,16 @@ %D For most situations, we could use: %D -%D \starttypen +%D \starttyping %D \let\doifreferencefoundelse=\dodoifreferencefoundelse -%D \stoptypen +%D \stoptyping %D %D But when we also want to support chained references, we need %D some more. Such a chained reference is defined as: %D -%D \starttypen +%D \starttyping %D \goto{somewhere}[JS(somescript),nextpage,JS(anotherscript)] -%D \stoptypen +%D \stoptyping %D %D Actually supporting chains is up to the special driver. Here %D we only provide the hooks. @@ -1452,10 +1461,10 @@ %D The inner case is simple. Only two cases have to be taken %D care of: %D -%D \starttypen -%D \naar{some text}[reference] -%D \naar{some text}[prefix:reference] -%D \stoptypen +%D \starttyping +%D \goto{some text}[reference] +%D \goto{some text}[prefix:reference] +%D \stoptyping %\def\docheckinnerreference% % {\global\let\predefinedreference=\currentinnerreference @@ -1531,13 +1540,13 @@ %D References to other files however are treated strict or %D tolerant, depending on their loading and availability: %D -%D \starttypen +%D \starttyping %D \useexternaldocument[somefile][filename][a nice description] %D %D \goto{checked reference}[somefile::reference] %D \goto{unchecked reference}[somefile::] %D \goto{unchecked reference}[anotherfile::reference] -%D \stoptypen +%D \stoptyping %D %D Here we use the dummy reference \type{somefile::} set in %D \type{\setouterreference} as a signal that indeed references @@ -1662,9 +1671,9 @@ \the\everyreference % cleanup : etc in french \ifvoorlopig\ifinpagebody\else \doifsomething{#2} - {\inlinker + {\inleft {\infofont - \scratchdimen\linkermargebreedte + \scratchdimen\leftmarginwidth \advance\scratchdimen -2em \doboundtext{#2}\scratchdimen{..}->}}% \fi\fi @@ -1725,9 +1734,9 @@ %D Sometimes we want to temporary put a reference out of %D order. An example can be found in the menu macros. %D -%D \starttypen +%D \starttyping %D \doifreferencepermittedelse{reference}{set}{true}{false} -%D \stoptypen +%D \stoptyping %D %D The second argument can be a comma seperated list. @@ -1798,10 +1807,10 @@ %D location. The latter one can be seen as a hyperlink to the %D former one. In the next macros one we use constructs like: %D -%D \starttypen +%D \starttyping %D \dostart... %D \dostop... -%D \stoptypen +%D \stoptyping %D %D Such macros are used to invoke the relevant specials from %D the special driver modules (see \type{spec-ini}). The flag @@ -1820,13 +1829,13 @@ %D The previous tho macros were easy ones, opposite to their %D counterparts. A common component in these is: %D -%D \starttypen +%D \starttyping %D \dostartgoto %D \data {..} %D \start {..} %D \stop {..} %D \dostopgoto -%D \stoptypen +%D \stoptyping %D %D Here data can be whatever needs highlighting, e.g. {\em %D figure 2.4}, and the start and stop entries handle the @@ -1880,9 +1889,9 @@ %D uppercase here, since the suffix is handled in the special %D driver. Conversion is taken care of by: %D -%D \starttypen +%D \starttyping %D \setreferencefilename somefilename\to\SomeFileName -%D \stoptypen +%D \stoptyping % \def\setreferencefilename#1\to#2% % {\doifelse{\@@converteerfile}{\v!ja} % boolean is sneller @@ -1906,10 +1915,10 @@ %D macros. Setting such references to unique values is %D completely up to the macros that call them. %D -%D \starttypen +%D \starttyping %D \thisissomeinternal{tag}{identifier} %D \gotosomeinternal {tag}{identifier}{pagenumber}{text} -%D \stoptypen +%D \stoptyping \def\thisissomeinternal#1#2% tag reference {\doifsomething{#2}{\thisisdestination{#1:#2}}} @@ -1919,10 +1928,10 @@ %D An automatic mechanism is provided too: %D -%D \starttypen +%D \starttyping %D \thisisnextinternal{tag} %D \gotonextinternal {tag}{number}{pagenumber}{text} -%D \stoptypen +%D \stoptyping %D %D The first macro increments a counter. The value of this %D counter is available in the macro \type{\nextinternalreference} @@ -2008,25 +2017,25 @@ %D Special locations are those that are accessed by saying %D things like: %D -%D \starttypen +%D \starttyping %D \goto{calculate total}[JS(summarize{10,23,56}] -%D \stoptypen +%D \stoptyping %D %D After several intermediate steps this finally arrives at %D the next macro and expands into (simplified): %D -%D \starttypen +%D \starttyping %D \gotoJSlocation{total{summarize{10,23,56}}}{calculate total} -%D \stoptypen +%D \stoptyping %D %D The first argument is the full reference, the second one %D is the text, in some kind of manipulated form. In practice %D we split references, so we get: %D -%D \starttypen +%D \starttyping %D \gotoJSlocation{summarize{10,23,56}}{calculate} %D \gotoJSlocation{summarize{10,23,56}}{total} -%D \stoptypen +%D \stoptyping %D %D where \type{calculate} and \type{total} are colored, boxed %D or whatever \type{\goto} is told to do. @@ -2051,9 +2060,9 @@ %D This \type{\def} alike macro is to be used as: %D -%D \starttypen +%D \starttyping %D \definespeciallocation{JS}#1#2{... #1 ... #2 ...} -%D \stoptypen +%D \stoptyping %D %D In module \type {java-ini} one can see that \type %D {\gotoJSlocation} looks much like the previous goto @@ -2095,9 +2104,9 @@ %D In case a command action needs to do some checking in %D advance, one can assign an check function by: %D -%D \starttypen +%D \starttyping %D \setexecutecommandcheck{startsound}\checksoundtrack -%D \stoptypen +%D \stoptyping \def\setexecutecommandcheck#1#2% #2 permits \first \second {\setvalue{\s!do:\s!do:#1}{#2}} @@ -2164,6 +2173,7 @@ \setglobalsystemreference \rt!exec \v!HideField {hide} \setglobalsystemreference \rt!exec \v!ShowField {show} \setglobalsystemreference \rt!exec \v!GotoPage {gotopage} +\setglobalsystemreference \rt!exec \v!GotoPage {gotopage} \setglobalsystemreference \rt!exec \v!Query {query} \setglobalsystemreference \rt!exec \v!QueryAgain {queryagain} \setglobalsystemreference \rt!exec \v!FitWidth {fitwidth} @@ -2220,29 +2230,29 @@ [\??rf] [\c!prefix=\s!unknown,#1]% \processaction - [\@@rfstatus] + [\@@rfstate] [ \v!stop=>\referencingfalse, \v!start=>\referencingtrue]% \processaction - [\@@rfinteractie] - [ \v!alles=>\let\dowantedreference\docompletereference, + [\@@rfinteraction] + [ \v!all=>\let\dowantedreference\docompletereference, \v!label=>\let\dowantedreference\dolabelonlyreference, - \v!tekst=>\let\dowantedreference\dotextonlyreference, - \v!symbool=>\let\dowantedreference\dosymbolreference]% + \v!text=>\let\dowantedreference\dotextonlyreference, + \v!symbol=>\let\dowantedreference\dosymbolreference]% \chardef\autocrossfilereferences\zerocount \processaction [\@@rfautofile] - [ \v!ja=>\chardef\autocrossfilereferences\plusone, - \v!pagina=>\chardef\autocrossfilereferences\plustwo]% + [ \v!yes=>\chardef\autocrossfilereferences\plusone, + \v!page=>\chardef\autocrossfilereferences\plustwo]% \chardef\referencefilecase\zerocount - \processaction[\@@rfconverteerfile] - [ \v!ja=>\chardef\referencefilecase\plusone, - \v!groot=>\chardef\referencefilecase\plusone, - \v!klein=>\chardef\referencefilecase\plustwo]% - %\doifelse\@@rfstrut\v!ja % some day an option + \processaction[\@@rfconvertfile] + [ \v!yes=>\chardef\referencefilecase\plusone, + \v!big=>\chardef\referencefilecase\plusone, + \v!small=>\chardef\referencefilecase\plustwo]% + %\doifelse\@@rfstrut\v!yes % some day an option % \referencetruttrue\referencestrutfalse \setupreferenceprefix[\@@rfprefix]% - \doifelse\@@rfglobaal\v!ja + \doifelse\@@rfglobal\v!yes {\settrue \autoglobalfilereferences} {\setfalse\autoglobalfilereferences}} @@ -2276,9 +2286,9 @@ %D and passes them to a handle. This is a rather dreadfull %D hack! %D -%D \starttypen +%D \starttyping %D \handlereferenceactions{references}\handle -%D \stoptypen +%D \stoptyping %D %D So, \type {\handle} does the final job, which in for %D instance the \PDF\ drivers comes down to doing something @@ -2304,7 +2314,7 @@ %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D We can ask for upto five reference components: %D @@ -2320,9 +2330,9 @@ %D %D And get back: %D -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines \def\ref{\dodoubleargument\doref} @@ -2364,24 +2374,26 @@ % \let\normalover \over -\definecommand in {\doinatreference\currenttextreference} -\definecommand op {\doinatreference\currentpagereference} -\definecommand over {\dospecialover} +\definecommand in {\doinatreference\currenttextreference} +\definecommand at {\doinatreference\currentpagereference} +\definecommand about {\dospecialabout} +\definecommand from {\dospecialfrom} +\definecommand over {\dospecialabout} % needed here, else math problems -\unexpanded\def\dospecialover[#1]% +\unexpanded\def\dospecialabout[#1]% {\dontleavehmode \bgroup \def\thecurrentsubtextreference - {\limitatetext\currentsubtextreference\@@rfbreedte\unknown}% + {\limitatetext\currentsubtextreference\@@rfwidth\unknown}% %\leaveoutervmode % no - \@@rflinks + \@@rfleft \doifreferencefoundelse{#1} {\let\crlf\space \let\\\space - \let\donaarfixed\donaarspace - \donaarspace{\thecurrentsubtextreference}[#1]} + \let\dogotofixed\dogotospace + \dogotospace{\thecurrentsubtextreference}[#1]} {\unknownreference{#1}\dummyreference}% - \@@rfrechts + \@@rfright \referentieinfo{<}{#1}% \egroup} @@ -2389,14 +2401,14 @@ %D would at first sight expect. This is due to the fact that we %D distinguish three (five) alternative calls: %D -%D \plaatsfiguur -%D [hier][three calls] +%D \placefigure +%D [here][three calls] %D {Three alternatives reference calls.} -%D \startcombinatie[1*3] -%D {\framed{\type{ \in }}} {a} -%D {\framed{\type{ \at }}} {b} -%D {\framed{\type{\goto}}} {c} -%D \stopcombinatie +%D {\startcombination[1*3] +%D {\framed{\type{ \in }}} {a} +%D {\framed{\type{ \at }}} {b} +%D {\framed{\type{\goto}}} {c} +%D \stopcombination} %D %D \startbuffer %D \in figure[fig:three calls] @@ -2410,9 +2422,9 @@ %D %D This turns up as: %D -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D %D The dual \type{{}} results in a split reference. In a %D document meant for paper, one is tempted to use the last @@ -2471,30 +2483,30 @@ \def\dosymbolreference#1#2[#3]% {\bgroup - \setupsymbolset[\@@iasymboolset]% + \setupsymbolset[\@@iasymbolset]% \removelastskip \ifx\currentreferencespecial\empty \ifx\currentouterreference\empty \ifnum0\currentrealreference=\zerocount - \ifhmode\strut\high{\symbol[\v!nergens]}\fi + \ifhmode\strut\high{\symbol[\v!nowhere]}\fi \else\ifnum0\currentrealreference>\realpageno - \dodosymbolreference{#2}{\high{\symbol[\v!volgende]}}% + \dodosymbolreference{#2}{\high{\symbol[\v!next]}}% \else\ifnum0\currentrealreference<\realpageno - \dodosymbolreference{#2}{\high{\symbol[\v!vorige]}}% + \dodosymbolreference{#2}{\high{\symbol[\v!previous]}}% \else - \ifhmode\strut\high{\symbol[\v!nergens]}\fi + \ifhmode\strut\high{\symbol[\v!nowhere]}\fi \fi\fi\fi \else - \gotoouterlocation{#3}{\showlocation{\high{\symbol[\v!ergens]}}}% + \gotoouterlocation{#3}{\showlocation{\high{\symbol[\v!somewhere]}}}% \fi \else - \gotospeciallocation{#3}{\showlocation{\high{\symbol[\v!ergens]}}}% + \gotospeciallocation{#3}{\showlocation{\high{\symbol[\v!somewhere]}}}% \fi \egroup} \def\dodosymbolreference#1#2% {#1\hbox{\gotorealpage\empty\empty\currentrealreference - {\dolocationattributes\??ia\c!letter\c!kleur{#2}}}} + {\dolocationattributes\??ia\c!style\c!color{#2}}}} %D The other alternatives just conform their names: only the %D label, only the text, or the label and the text. @@ -2504,36 +2516,36 @@ % \def\docompletereference#1#2[#3]% % {\doifsomespaceelse{#2} -% {\doifsomething{#2}{\donaarspace{#2}[#3]~}\donaarfixed{#1}[#3]} -% {\donaarfixed{\dotextprefix{#2}#1}[#3]}} +% {\doifsomething{#2}{\dogotospace{#2}[#3]~}\dogotofixed{#1}[#3]} +% {\dogotofixed{\dotextprefix{#2}#1}[#3]}} % % better: % \def\docompletereference#1#2[#3]% % {\iflocationsplit % \doifsomespaceelse{#2} -% {\donaarspace{\dotextprefix{#2}#1}[#3]} -% {\donaarfixed{\dotextprefix{#2}#1}[#3]}% +% {\dogotospace{\dotextprefix{#2}#1}[#3]} +% {\dogotofixed{\dotextprefix{#2}#1}[#3]}% % \else -% \donaarfixed{\dotextprefix{#2}#1}[#3]% +% \dogotofixed{\dotextprefix{#2}#1}[#3]% % \fi} % % more efficient \def\docompletereference#1#2[#3]% {\iflocationsplit - \doifsomespaceelse{#2}\donaarspace\donaarfixed{\dotextprefix{#2}#1}[#3]% + \doifsomespaceelse{#2}\dogotospace\dogotofixed{\dotextprefix{#2}#1}[#3]% \else - \donaarfixed{\dotextprefix{#2}#1}[#3]% + \dogotofixed{\dotextprefix{#2}#1}[#3]% \fi} \def\dolabelonlyreference#1#2[#3]% {\doifsomespaceelse{#2} - {\doifsomething{#2}{\donaarspace{#2}[#3]}} - {\donaarfixed{\dotextprefix{#2}}[#3]}} + {\doifsomething{#2}{\dogotospace{#2}[#3]}} + {\dogotofixed{\dotextprefix{#2}}[#3]}} \def\dotextonlyreference#1#2[#3]% - {\dotextprefix{#2}\donaarfixed{#1}[#3]} + {\dotextprefix{#2}\dogotofixed{#1}[#3]} \let\dowantedreference=\docompletereference @@ -2546,7 +2558,7 @@ %D %D [more documentation will be added] %D -%D \starttypen +%D \starttyping %D \definereferenceformat[informula] [left=(,right=),text=formula] %D \definereferenceformat[informulas] [left=(,right=),text=formulas] %D \definereferenceformat[andformula] [left=(,right=),text=and] @@ -2557,7 +2569,7 @@ %D the \informulas {formulas}[b] \informula {and} [for:c] %D the \informulas [b] \informula {en} [for:c] %D the \informulas [b] \andformula [for:c] -%D \stoptypen +%D \stoptyping %D %D Instead of a text, one can specify a label, which should %D be defined with \type {\setuplabeltext}. @@ -2568,29 +2580,29 @@ \def\dodefinereferenceformat[#1][#2]% {\iffirstargument \getparameters[\??rf#1] - [\c!links=, % of the number - \c!rechts=, % of the number - \c!tekst=, % before the number + [\c!left=, % of the number + \c!right=, % of the number + \c!text=, % before the number \c!label=, % can be {left}{right} - \c!commando=\in, + \c!command=\in, #2]% \unexpanded\setvalue{#1}% {\dontleavehmode\doexecutereferenceformat{#1}}% \fi} \def\noexecutelabelreferenceformat#1% - {\doifvaluesomething{\??rf#1\c!tekst} - {\gdef\textofreference{\csname\??rf#1\c!tekst\endcsname}}% - \csname\??rf#1\c!commando\endcsname} + {\doifvaluesomething{\??rf#1\c!text} + {\gdef\textofreference{\csname\??rf#1\c!text\endcsname}}% + \csname\??rf#1\c!command\endcsname} \def\doexecutelabelreferenceformat#1% - {\csname\??rf#1\c!commando\endcsname + {\csname\??rf#1\c!command\endcsname {\leftlabeltext {\csname\??rf#1\c!label\endcsname}}% {\rightlabeltext{\csname\??rf#1\c!label\endcsname}}} \def\doexecutereferenceformat#1% - {\gdef\leftofreference {\csname\??rf#1\c!links \endcsname}% - \gdef\rightofreference{\csname\??rf#1\c!rechts\endcsname}% + {\gdef\leftofreference {\csname\??rf#1\c!left \endcsname}% + \gdef\rightofreference{\csname\??rf#1\c!right\endcsname}% \global\let\textofreference\empty % otherwise ~ added \doifelsevaluenothing{\??rf#1\c!label} \noexecutelabelreferenceformat\doexecutelabelreferenceformat{#1}} @@ -2599,20 +2611,57 @@ \let\rightofreference\relax \let\textofreference \relax -\def\dodododoinatreference#1#2#3[#4]% - {\ifx\next\bgroup +\def\dodododoinatreference#1#2#3[#4]% \removeunwantedspaces added june 2004 + {\ifx\next\bgroup % but removed later, fails on metafun \dododododoinatreference + % fails on metafun {\leftofreference#1\ignorespaces#3\removeunwantedspaces\rightofreference}{#2}[#4]% {\leftofreference#1\ignorespaces#3\rightofreference}{#2}[#4]% \else \dododododoinatreference {\leftofreference#1\rightofreference}{#2#3}[#4]% \fi} +% \def\dododododoinatreference#1#2[#3]% +% {\bgroup +% \forgetall +% \postponefootnotes +% \leaveoutervmode +% \doifreferencefoundelse{#3} +% {\bgroup +% \let\ignorespaces \empty % rather dirty trick, but ok +% \let\leftofreference \empty % the same, again ok +% \let\rightofreference\empty % and once more +% \def\textofreference {#2}% % temporary value +% \ifx\textofreference\empty % simple expansion +% %\doifelsenothing{#1} +% % {\egroup\dosymbolreference{#1}{\textofreference}[#3]} +% % {\egroup\dowantedreference{#1}{\textofreference}[#3]}% +% \doifelsenothing{#1}% +% {\egroup\dosymbolreference}% +% {\egroup\dowantedreference}% +% {#1}{\textofreference}[#3]% +% \else +% %\doifelsenothing{#1} +% % {\egroup\dosymbolreference{#1}{#2}[#3]} +% % {\egroup\dowantedreference{#1}{#2}[#3]}% +% \doifelsenothing{#1}% +% {\egroup\dosymbolreference}% +% {\egroup\dowantedreference}% +% {#1}{#2}[#3]% +% \fi} +% {\dounknownreference{#1}{#2}[#3]}% +% \referentieinfo<{#3}% +% \global\let\leftofreference \empty +% \global\let\rightofreference\empty +% \global\let\textofreference \empty +% \egroup} + \def\dododododoinatreference#1#2[#3]% - {\bgroup + {\dontleavehmode % replaces \leaveoutervmode + \bgroup \forgetall -\postponefootnotes - \leaveoutervmode + \postponefootnotes + %\leaveoutervmode % replaced by \dontleavehmode \doifreferencefoundelse{#3} {\bgroup \let\ignorespaces \empty % rather dirty trick, but ok @@ -2652,7 +2701,7 @@ %D previous macros are implemented using the goto %D functionality. %D -%D \showsetup{\y!naar} +%D \showsetup{\y!goto} %D %D One important chaacteristic is that the first argument of %D \type{\goto} (and therefore \type{\at} and \type{\in} is @@ -2665,11 +2714,11 @@ % \doifreferencefoundelse{#2} % {\doifelsenothing{#1} % {\dosymbolreference{}{}[#2]} -% {\donaarspace{#1}[#2]}} +% {\dogotospace{#1}[#2]}} % {\unknownreference{#2}#1}% % \referentieinfo{<}{#2}} -\def\donaar#1[#2]% +\def\dogoto#1[#2]% {\dontleavehmode %\leaveoutervmode \bgroup @@ -2677,35 +2726,35 @@ \doifreferencefoundelse{#2} {\doifelsenothing{#1} {\dosymbolreference{}{}[#2]} - {\donaarspace{#1}[#2]}} + {\dogotospace{#1}[#2]}} {\unknownreference{#2}#1\relax}% \relax catches lookahead \egroup \referentieinfo{<}{#2}} -\unexpanded\def\naar#1#2% - {\donaar{#1}#2} +\unexpanded\def\goto#1#2% + {\dogoto{#1}#2} \newif\ifsharesimilarreferences \sharesimilarreferencestrue \newcount\similarreference % 0=noppes 1=create/refer 2,3,..=refer -\def\donaarspace#1[#2]% +\def\dogotospace#1[#2]% {\iflocationsplit \ifsecondaryreference\setbox0\hbox\fi % due to space insertion - {\let\donaarspace\donaarfixed + {\let\dogotospace\dogotofixed \iflocation \def\processisolatedword##1% {\ifisolatedwords\ifsharesimilarreferences \global\advance\similarreference \plusone \fi\fi \hbox{\gotolocation{#2}{##1\presetgoto}}}% - \doattributes\??ia\c!letter\c!kleur + \doattributes\??ia\c!style\c!color {\processisolatedwords{#1}\processisolatedword}% \else #1\relax % \relax prevents #1's next macros from gobbling \fi \fi}% \else \iflocation - \doattributes\??ia\c!letter\c!kleur + \doattributes\??ia\c!style\c!color {\gotolocation{#2}{#1\presetgoto}}% \else #1\relax % \relax prevents #1's next macros from gobbling \fi @@ -2713,9 +2762,9 @@ \fi \global\similarreference\zerocount} -\def\donaarfixed#1[#2]% +\def\dogotofixed#1[#2]% {{\iflocation - \hbox{\gotolocation{#2}{\doattributes\??ia\c!letter\c!kleur + \hbox{\gotolocation{#2}{\doattributes\??ia\c!style\c!color {#1\presetgoto}}}% \else #1% @@ -2726,13 +2775,13 @@ %D --- NOG IN HANDLEIDING --- -\unexpanded\def\naarbox#1[#2]% +\unexpanded\def\gotobox#1[#2]% {\dontleavehmode \bgroup \locationstrutfalse %\leaveoutervmode \doifreferencefoundelse{#2} - {\donaarfixed{#1}[#2]} + {\dogotofixed{#1}[#2]} {\hbox{\unknownreference{#2}#1}}% \referentieinfo{<}{#2}% \egroup} @@ -2741,9 +2790,9 @@ %D or as an \URL. Both are handled by the same mechanism and %D can be issued by saying something like: %D -%D \starttypen +%D \starttyping %D \goto[dictionary::the letter a] -%D \stoptypen +%D \stoptyping %D %D The macros that are responsible for handling these %D references, use the next six variables: @@ -2759,41 +2808,41 @@ %D are made, so in most cases such a document reference in an %D indirect one. %D -%D \showsetup{\y!gebruikexterndocument} +%D \showsetup{\y!useexternaldocument} %D %D For example: %D -%D \starttypen +%D \starttyping %D \useexternaldocument %D [dictionary][engldict] %D [The Famous English Dictionary] -%D \stoptypen +%D \stoptyping %D %D The next macro implements these relations, and also take %D care of loading the document specific references. -\def\gebruikexterndocument% - {\dotripleargument\dogebruikexterndocument} +\def\useexternaldocument% + {\dotripleargument\douseexternaldocument} -\def\dogebruikexterndocument[#1][#2][#3]% +\def\douseexternaldocument[#1][#2][#3]% {\bgroup \ifsecondargument \doifelsenothing{#1} - {\dogebruikexterndocument[#2][#2][#3]} + {\douseexternaldocument[#2][#2][#3]} {\doifelsenothing{#3} - {\dogebruikexterndocument[#1][#2][#2]} + {\douseexternaldocument[#1][#2][#2]} {\doifsomething{#2} {\setgvalue{\v!file:::#1}{\doexternaldocument[][#2][#3]}% just \do - \doif\@@rfstatus\v!start + \doif\@@rfstate\v!start {\doifparentfileelse{#2} {\showmessage\m!references{21}{#2}} - {\dodogebruikexterndocument{#1}{#2}}}}}}% + {\dodouseexternaldocument{#1}{#2}}}}}}% \else - \dodogebruikexterndocument{#1}{#1}% + \dodouseexternaldocument{#1}{#1}% \fi \egroup} -\def\dodogebruikexterndocument#1#2% +\def\dodouseexternaldocument#1#2% {\bgroup % prevents wrong loading of \jobname \def\fileprefix{#1::}% \let\setglobalcrossreference\setoutercrossreference @@ -2803,39 +2852,39 @@ %D The \URL\ alternative takes four arguments: %D -%D \showsetup{\y!gebruikURL} +%D \showsetup{\y!useURL} %D %D like: %D -%D \starttypen +%D \starttyping %D \useURL %D [dictionary][http://www.publisher.com/public][engldict] %D [The Famous English Dictionary] -%D \stoptypen +%D \stoptyping %D %D Several specifications are possible: %D -%D \starttypen +%D \starttyping %D \useURL [id] [url] [file] [description] %D \useURL [id] [url] [file] %D \useURL [id] [url] -%D \stoptypen +%D \stoptyping %D %D This time we don't load the references when no file is %D specified. This is logical when one keeps in mind that a %D valid \URL\ can also be a mail address. -\def\gebruikURL +\def\useURL {\bgroup \protectlabels \catcode`\#=12\catcode`\%=12\catcode`\/=12 \catcode`\_=12\catcode`\~=12\catcode`\:=12 - \dodoubleempty\dogebruikURL} + \dodoubleempty\douseURL} -\def\dogebruikURL[#1][#2]% - {\egroup\doquadrupleempty\dodogebruikURL[#1][#2]} +\def\douseURL[#1][#2]% + {\egroup\doquadrupleempty\dodouseURL[#1][#2]} -\def\dodogebruikURL[#1][#2][#3][#4]% +\def\dodouseURL[#1][#2][#3][#4]% {\iffirstargument \iffourthargument \setgvalue{\v!file:::#1}{\doexternaldocument[#2][#3][#4]}% @@ -2846,20 +2895,18 @@ \fi\fi\fi \fi} -\let\gebruikurl\gebruikURL - %D \macros %D {url,setupurl} %D %D We also have: \type{\url} for directly calling the %D description. So we can say: %D -%D \starttypen +%D \starttyping %D \useURL [one] [http://www.test.nl] %D \useURL [two] [http://www.test.nl] [] [Some Site] %D %D \url[one] or \from[two] or \goto{Whatever Site}[URL(two)] -%D \stoptypen +%D \stoptyping %D %D An \URL\ can be set up with %D @@ -2871,18 +2918,18 @@ \unexpanded\def\url[#1]% slow {\bgroup \processaction - [\@@urvariant] - [ \v!geen=>\chardef\urlsplitmode\zerocount, - \v!beide=>\chardef\urlsplitmode\plusone, - \v!na=>\chardef\urlsplitmode\plustwo, - \v!voor=>\chardef\urlsplitmode\plusthree]% - \doifelse\@@urspatie\v!ja + [\@@uralternative] + [ \v!none=>\chardef\urlsplitmode\zerocount, + \v!both=>\chardef\urlsplitmode\plusone, + \v!after=>\chardef\urlsplitmode\plustwo, + \v!before=>\chardef\urlsplitmode\plusthree]% + \doifelse\@@urspace\v!yes {\setbetweenisolatedwords% {\scratchskip\currentspaceskip \hskip\zeropoint\!!plus.2\scratchskip}} {\setbetweenisolatedwords\allowbreak}% \def\doexternaldocument[##1][##2][##3]{\hyphenatedurl{##1}}% - \dostartattributes\??ur\c!letter\c!kleur{}% + \dostartattributes\??ur\c!style\c!color{}% \getvalue{\v!file:::#1}% \dostopattributes \egroup} @@ -2891,7 +2938,7 @@ %D \URL's break ok, according to the setting of a switch, %D %D \startbuffer -%D \gebruikURL +%D \useURL %D [test] %D [sentence_sentence%sentence#sentence~sentence/sentence//sentence:sentence.sentence] %D \stopbuffer @@ -2900,21 +2947,21 @@ %D %D Such an \URL\ is, depending on the settings, hyphenated as: %D -%D \haalbuffer +%D \getbuffer %D -%D \startregelcorrectie +%D \startlinecorrection %D \hbox to \hsize %D {\hss\en -%D \stelrefererenin[urlvariant=beide]% +%D \setupreferencing[urlalternative=both]% %D \vbox{\hsize.25cm\hbox{\bf both}\prewordbreak\url[test]}% %D \hss -%D \stelrefererenin[urlvariant=voor]% +%D \setupreferencing[urlalternative=before]% %D \vbox{\hsize.25cm\hbox{\bf before}\prewordbreak\url[test]}% %D \hss -%D \stelrefererenin[urlvariant=na]% +%D \setupreferencing[urlalternative=after]% %D \vbox{\hsize.25cm\hbox{\bf after}\prewordbreak\url[test]}% %D \hss} -%D \stopregelcorrectie +%D \stoplinecorrection %D %D By setting \type{urlspace=yes} one can get slightly better %D spacing when using very long \URL's. @@ -2955,60 +3002,63 @@ %D also specify a suitable name (the last argument). This name %D can be called upon with: %D -%D \showsetup{\y!uit} +%D \showsetup{\y!from} %D %D As can be expected, this macro used \type{\goto} to %D perform its task. -\definecomplexorsimple\uit - -\def\simpleuit - {\bgroup - \protectlabels - \ifundefined{\v!file:::\otherlabel}% - {\tttf[\otherlabel]}% - \else - \def\doexternaldocument[##1][##2][##3]{##3}% - \csname\v!file:::\otherlabel\endcsname - \egroup} - % normal version: % -% \def\complexuit[#1]% +% \def\from[#1]% % {\dontleavehmode % added, but probably not needed % \bgroup % \doifinstringelse{::}{#1}{\docomplexuit[#1]}{\docomplexuit[#1::]}} % % since we need to serve active :'s we need the less readable: -\def\complexuit[#1]% +\def\dospecialfrom % retest this one ! + {\dosingleempty\dodospecialfrom} + +\def\dodospecialfrom[#1]% {\dontleavehmode % added, but probably not needed \bgroup \protectlabels % needed for active french :'s - \edef\!!stringa{#1}% - \doifincsnameelse{::}\!!stringa\donothing{\edef\!!stringa{#1::}}% - \@EA\docomplexuit\@EA[\!!stringa]} + \iffirstargument + \edef\!!stringa{#1}% + \doifincsnameelse{::}\!!stringa\donothing{\edef\!!stringa{#1::}}% + \expanded{\redospecialfrom[\!!stringa]}% + \else + \expanded{\nodospecialfrom[\otherlabel]}% + \fi + \egroup} -\def\docomplexuit[#1::#2]% +\def\redospecialfrom[#1::#2]% {\ifundefined{\v!file:::#1}% - {\tttf[#1]}% + \tttf[#1]% \else - \def\doexternaldocument[##1][##2][##3]{\naar{##3}[#1::#2]}% + \def\doexternaldocument[##1][##2][##3]{\goto{##3}[#1::#2]}% \csname\v!file:::#1\endcsname - \fi - \egroup} + \fi} + +\def\nodospecialfrom[#1]% + {\ifundefined{\v!file:::#1}% + \tttf[#1]% + \else + \def\doexternaldocument[##1][##2][##3]{##3}% different than ^ + \csname\v!file:::#1\endcsname + \fi} %D We also support: %D -%D \starttypen +%D \starttyping %D \goto{some text}[file(identifier{location}] -%D \stoptypen +%D \stoptyping %D %D which is completely equivalent with %D -%D \starttypen +%D \starttyping %D \goto{some text}[identifier::location] -%D \stoptypen +%D \stoptyping %D %D The fastest implementation would be: @@ -3035,75 +3085,75 @@ %D logical to have the viewer specific ones available in a dual %D way too. At first glance we could do with: %D -%D \starttypen -%D \definespeciallocation\v!actie +%D \starttyping +%D \definespeciallocation\v!action %D {\getreferenceelements\currentreferenceoperation %D \handleexecreference} -%D \stoptypen +%D \stoptyping %D %D An better alternative, slower but error aware, is % \definespecialtest\v!actie % {\localdoifreferencefoundelse\currentreferenceoperation} -\definespecialtest\v!actie % rather ugly action(whatever{argument}) +\definespecialtest\v!action % rather ugly action(whatever{argument}) {\expanded{\localdoifreferencefoundelse{\currentreferenceoperation \ifx\currentreferencearguments\empty\else{\currentreferencearguments}\fi}}} -\definespeciallocation\v!actie +\definespeciallocation\v!action {\handleexecreference} %D So now we can say: %D -%D \starttypen +%D \starttyping %D \goto{some action}[PreviousJump] -%D \stoptypen +%D \stoptyping %D %D as well as: %D -%D \starttypen +%D \starttyping %D \goto{some text}[action(PreviousJump] -%D \stoptypen +%D \stoptyping %D A special case of references are those to programs. These, %D very system dependant references are implemented by abusing %D some of the previous macros. %D -%D \showsetup{\y!stelprogrammasin} -%D \showsetup{\y!definieerprogramma} -%D \showsetup{\y!programma} +%D \showsetup{\y!setupprograms} +%D \showsetup{\y!defineprogram} +%D \showsetup{\y!program} %D %D The latter gives access to the description of the program, %D being the last argument to the definition command. -\def\stelprogrammasin +\def\setupprograms {\dodoubleargument\getparameters[\??pr]} -\def\dodefinieerprogramma[#1][#2][#3]% - {\setgvalue{\v!programma:::#1}{\doprogramma{#2}{#3}}} +\def\dodefineprogram[#1][#2][#3]% + {\setgvalue{\v!program:::#1}{\doprogram{#2}{#3}}} -\def\definieerprogramma - {\dotripleargument\dodefinieerprogramma} +\def\defineprogram + {\dotripleargument\dodefineprogram} -\def\programma#1[#2]% +\def\program#1[#2]% {\bgroup - \ifundefined{\v!programma:::#2}% + \ifundefined{\v!program:::#2}% {\tttf[#2]}% \else - \def\doprogramma##1##2% - {\naar{\doifelsenothing{#1}{##2}{#1}}[\v!programma(#2)]}% - \csname\v!programma:::#2\endcsname + \def\doprogram##1##2% + {\goto{\doifelsenothing{#1}{##2}{#1}}[\v!program(#2)]}% + \csname\v!program:::#2\endcsname \fi \egroup} % needs an update: program(abc{arg}) -\definespeciallocation\v!programma#1#2% +\definespeciallocation\v!program#1#2% {\bgroup \iflocation - \doifdefinedelse{\v!programma:::\currentreferenceoperation} - {\def\doprogramma##1##2{\def\@@programfile{##1}}% - \getvalue{\v!programma:::\currentreferenceoperation}} + \doifdefinedelse{\v!program:::\currentreferenceoperation} + {\def\doprogram##1##2{\def\@@programfile{##1}}% + \getvalue{\v!program:::\currentreferenceoperation}} {\let\@@programfile\currentreferenceoperation}% \convertcommand\@@programfile\to\ascii \dostartgoto @@ -3111,7 +3161,7 @@ {#2}% \start \dostartrunprogram\buttonwidth\buttonheight - {\@@prgebied\ascii}\currentreferencearguments + {\@@prdirectory\ascii}\currentreferencearguments \stop \dostoprunprogram \dostopgoto @@ -3123,9 +3173,9 @@ %D As we can see, we directly use the special reference %D mechanism, which means that %D -%D \starttypen +%D \starttyping %D \goto{some text}[program(name{args})] -%D \stoptypen +%D \stoptyping %D %D is valid. @@ -3135,46 +3185,46 @@ %D make this meaning available as a special reference method. %D So now one can use: %D -%D \starttypen +%D \starttyping %D \gotopage{some text}[location] %D \gotopage{some text}[number] %D \gotopage{some text}[file::number] -%D \stoptypen +%D \stoptyping %D %D as well as: %D -%D \starttypen +%D \starttyping %D \goto{some text}[page(location)] %D \goto{some text}[page(number)] %D \goto{some text}[file::page(number)] -%D \stoptypen +%D \stoptyping %D %D Here location is a keyword like \type{nextpage}. %D -%D \showsetup{\y!naarpagina} - -\def\dodefinieerpagina[#1][#2]% - {\setvalue{\v!pagina:::#1}{#2}} - -\def\definieerpagina% - {\dodoubleargument\dodefinieerpagina} - -\definieerpagina [\v!eerstepagina] [\firstpage] -\definieerpagina [\v!vorigepagina] [\prevpage] -\definieerpagina [\v!volgendepagina] [\nextpage] -\definieerpagina [\v!laatstepagina] [\lastpage] -\definieerpagina [\v!eerstesubpagina] [\firstsubpage] -\definieerpagina [\v!vorigesubpagina] [\prevsubpage] -\definieerpagina [\v!volgendesubpagina] [\nextsubpage] -\definieerpagina [\v!laatstesubpagina] [\lastsubpage] -\definieerpagina [\v!eerste] [\firstpage] -\definieerpagina [\v!vorige] [\prevpage] -\definieerpagina [\v!volgende] [\nextpage] -\definieerpagina [\v!laatste] [\lastpage] -\definieerpagina [\v!eerste\v!sub] [\firstsubpage] -\definieerpagina [\v!vorige\v!sub] [\prevsubpage] -\definieerpagina [\v!volgende\v!sub] [\nextsubpage] -\definieerpagina [\v!laatste\v!sub] [\lastsubpage] +%D \showsetup{\y!gotopage} + +\def\dodefinepage[#1][#2]% + {\setvalue{\v!page:::#1}{#2}} + +\def\definepage + {\dodoubleargument\dodefinepage} + +\definepage [\v!firstpage] [\firstpage] +\definepage [\v!previouspage] [\prevpage] +\definepage [\v!nextpage] [\nextpage] +\definepage [\v!lastpage] [\lastpage] +\definepage [\v!firstsubpage] [\firstsubpage] +\definepage [\v!previoussubpage] [\prevsubpage] +\definepage [\v!nextsubpage] [\nextsubpage] +\definepage [\v!lastsubpage] [\lastsubpage] +\definepage [\v!first] [\firstpage] +\definepage [\v!previous] [\prevpage] +\definepage [\v!next] [\nextpage] +\definepage [\v!last] [\lastpage] +\definepage [\v!first\v!sub] [\firstsubpage] +\definepage [\v!previous\v!sub] [\prevsubpage] +\definepage [\v!next\v!sub] [\nextsubpage] +\definepage [\v!last\v!sub] [\lastsubpage] %D Because we combine both methods, we have to take care of %D the \type{file::page(n)} as well as \type{page(file::n)}. @@ -3238,7 +3288,7 @@ % {#2}% % \fi} -\definespeciallocation\v!pagina#1#2% page(n) page(+n) page(-n) +\definespeciallocation\v!page#1#2% page(n) page(+n) page(-n) {\iflocation \ifx\currentouterreference\empty \splitoffreference\currentreferenceoperation @@ -3265,8 +3315,8 @@ \setouterlocation\currentouterreference \doifnonzeropositiveelse\currentinnerreference \donothing - {\doifdefinedelse{\v!pagina:::\currentinnerreference} - {\edef\currentinnerreference{\getvalue{\v!pagina:::\currentinnerreference}}} + {\doifdefinedelse{\v!page:::\currentinnerreference} + {\edef\currentinnerreference{\getvalue{\v!page:::\currentinnerreference}}} {\edef\currentinnerreference{1}}}% \gotorealpage\otherURL\otherfile\currentinnerreference{#2}% \fi @@ -3274,18 +3324,16 @@ {#2}% \fi} -\def\naarpagina#1[#2]% - {\naar{#1}[\v!pagina(#2)]} - -\let\ganaarpagina=\naarpagina +\def\gotopage#1[#2]% + {\goto{#1}[\v!page(#2)]} %D A still very rudimentary|/|experimental forward|/|backward %D reference mechanism is provided by the macro \type{\atpage}: %D -%D \starttypen +%D \starttyping %D ... \somewhere{backward text}{forward text}[someref] ... -%D ... \oppagina[someref] ... -%D \stoptypen +%D ... \atpage[someref] ... +%D \stoptyping %D %D In future versions there will be more sophisticated @@ -3298,11 +3346,11 @@ {\ifforwardreference \doifelsenothing{#1} {\dosymbolreference{}{}[#4]} - {\donaarspace{#1}[#4]}% + {\dogotospace{#1}[#4]}% \else \doifelsenothing{#2} {\dosymbolreference{}{}[#4]} - {\donaarspace{#2}[#4]}% + {\dogotospace{#2}[#4]}% \fi} {\unknownreference{#4}#1/#2}% \referentieinfo{<}{#4}} @@ -3313,15 +3361,15 @@ \doifreferencefoundelse{#1} {\ifrealreferencepage \ifforwardreference - \donaarfixed{\labeltext\v!hierboven}[#1]% + \dogotofixed{\labeltext\v!hencefore}[#1]% \else - \donaarfixed{\labeltext\v!hieronder}[#1]% + \dogotofixed{\labeltext\v!hereafter}[#1]% \fi \else - \donaarfixed{\labeltexts\v!oppagina\currentpagereference}[#1]% + \dogotofixed{\labeltexts\v!atpage\currentpagereference}[#1]% \fi} {\unknownreference{#1}% - \labeltexts\v!pagina\dummyreference}% + \labeltexts\v!page\dummyreference}% \referentieinfo{<}{#1}} %D We can cross link documents by using: @@ -3330,16 +3378,16 @@ %D %D like: %D -%D \starttypen +%D \starttyping %D \coupledocument[print][somefile][chapter,section] -%D \stoptypen +%D \stoptyping %D %D After which when applicable, we have available the %D references: %D -%D \starttypen +%D \starttyping %D \goto{print version}[print::chapter] -%D \stoptypen +%D \stoptyping %D %D and alike. The title placement definition macros have a %D key \type{file}, which is interpreted as the file to jump @@ -3361,10 +3409,10 @@ {\startnointerference \doutilities{#3}{##1}{#3}\relax\relax \stopnointerference}% - \dogebruikexterndocument[#1][#2][#4]% + \douseexternaldocument[#1][#2][#4]% \doglobal\addtocommalist{#1}\crossdocumentreferences \def\docommando##1% - {\globalletvalue{\??rf##1\c!status}\v!start % for fast checking + {\letgvalue{\??rf##1\c!state}\v!start % for fast checking \doglobal\addtocommalist{##1}\crossdocumentelements}% \processcommalist[#3]\docommando \ifutilitydone @@ -3380,13 +3428,13 @@ \def\checkcontrastreference#1% {\ifnum\currentreferencetype=\rt!page\ifnum\currentdatareference=\realpageno - \doifdefined{#1\c!contrastkleur} - {\setevalue{#1\c!kleur}{\getvalue{#1\c!contrastkleur}}}% + \doifdefined{#1\c!contrastcolor} + {\setevalue{#1\c!color}{\getvalue{#1\c!contrastcolor}}}% \fi\fi} \def\checkcontrastreference#1% {\ifnum\currentreferencetype=\rt!page\relax\ifnum\currentdatareference=\realpageno - \copycsname#1\c!kleur\endcsname\csname#1\c!contrastkleur\endcsname + \copycsname#1\c!color\endcsname\csname#1\c!contrastcolor\endcsname \fi\fi} %D Buttons are just what their names says: things that can be @@ -3403,7 +3451,7 @@ %D %D gives %D -%D \haalbuffer +%D \getbuffer %D %D This command is formally specified as: %D @@ -3411,14 +3459,9 @@ %D %D The characteristics can be set with: %D -%D \showsetup{\y!stelbuttonsin} - -%\def\dostelbuttonsin[#1]% -% {\getparameters[\??bt][#1]% -% \dododostelinteractiemenuin{\??bt\c!onbekendeverwijzing}% -% \dododostelinteractiemenuin{\??bt\c!zelfdepagina}} +%D \showsetup{\y!setupbuttons} -\def\stelbuttonsin +\def\setupbuttons {\dodoubleargument\getparameters[\??bt]} \definecomplexorsimpleempty\button @@ -3433,39 +3476,12 @@ \def\buttonframed{\dodoubleempty\localframed[\??bt]} % goodie -% \def\dodocomplexbutton#1[#2]#3[#4]% -% {\bgroup -% \doifvalue{#1\c!status}{\v!stop}{\locationfalse}% -% \iflocation -% \resetgoto -% \ConvertConstantAfter\doifelse{#3}{\v!geen} -% {\!!doneafalse} -% {\!!doneatrue}% -% \doifelsenothing{#4} % in handleiding, is soort dummy -% {\if!!donea\hbox\else\hphantom\fi -% {\localframed[#1][#2]{#3}}}% -% {\doifreferencefoundelse{#4} -% {\setbox0=\if!!donea\hbox\else\hphantom\fi -% {\localframed[#1][#2] -% {\checkcontrastreference{#1}% -% \dolocationattributes{#1}\c!letter\c!kleur{\ignorespaces#3}}}% -% \startinteractie -% %\hbox{\gotolocation{#4}{\copy0}}% -% \hbox{\gotolocation{#4}{\box0}}% -% \stopinteractie} -% {\unknownreference{#4}% -% \if!!donea\hbox\else\hphantom\fi -% {\localframed[#1][#2] -% {\ignorespaces#3}}}}% !!!!!!!!!! -% \fi -% \egroup} - \long\def\dodocomplexbutton#1[#2]#3[#4]% #3 can contain [] -> {#3} later {\bgroup - \doifvalue{#1\c!status}\v!stop\locationfalse + \doifvalue{#1\c!state}\v!stop\locationfalse \iflocation \resetgoto - \ConvertConstantAfter\doifelse{#3}\v!geen\hphantom\hbox + \ConvertConstantAfter\doifelse{#3}\v!none\hphantom\hbox {\doifelsenothing{#4} {\setlocationboxnop#1[#2]{#3}[#4]} {\doifreferencefoundelse{#4} @@ -3480,15 +3496,15 @@ %D macro builds such a row based on a specification list. %D %D \startbuffer -%D \interactiebuttons -%D [breedte=\hsize][pagina,VorigeSprong,VerlaatViewer] +%D \interactionbuttons +%D [width=\hsize][page,PreviousJump,ExitViewer] %D \stopbuffer %D %D \typebuffer %D %D gives %D -%D \haalbuffer +%D \getbuffer %D %D Apart from individual entries, one can use \type{page} and %D \type {subpage} as shortcuts to their four associated buttons. @@ -3497,67 +3513,67 @@ % does not work well with for instance SomeRef{whatever} -\def\interactiebuttons - {\dodoubleempty\dointeractiebuttons} +\def\interactionbuttons + {\dodoubleempty\dointeractionbuttons} -\def\dointeractiebuttons[#1][#2]% er is een verdeel macro \fractie +\def\dointeractionbuttons[#1][#2]% er is een verdeel macro \horizontalfractions {\iflocation \bgroup - \doif\@@ibstatus\v!stop\locationfalse + \doif\@@ibstate\v!stop\locationfalse \iflocation \ifsecondargument - \checkinteractiebalk{1.5em}\v!ruim\!!zeropoint % brrrrr + \checkinteractionbar{1.5em}\v!broad\!!zeropoint % brrrrr \setbox2=\hbox - {\setupsymbolset[\@@iasymboolset]% - \localframed[\??ib][#1,\c!achtergrond=]{\symbol[\v!vorigepagina]}}% + {\setupsymbolset[\@@iasymbolset]% + \localframed[\??ib][#1,\c!background=]{\symbol[\v!previouspage]}}% \!!heighta\ht2 % needed because we default to nothing - \stelinteractiebalkin[#1,\c!strut=\v!nee]% - %\setupinteraction[\c!breedte=\!!zeropoint]% - \setinteractionparameter\c!breedte\!!zeropoint + \setupinteractionbar[#1,\c!strut=\v!no]% + %\setupinteraction[\c!width=\!!zeropoint]% + \setinteractionparameter\c!width\!!zeropoint \!!counta\zerocount % new, was 1 \processallactionsinset [#2] - [ \v!pagina=>\advance\!!counta 4, - \v!sub\v!pagina=>\advance\!!counta 4, + [ \v!page=>\advance\!!counta 4, + \v!subpage=>\advance\!!counta 4, \s!unknown=>\advance\!!counta 1]% - \ifdim\@@ibbreedte=\!!zeropoint\relax + \ifdim\@@ibwidth=\!!zeropoint\relax \!!widtha2em - \advance\!!widtha \@@ibafstand % new + \advance\!!widtha \@@ibdistance % new \!!widthb\!!counta\!!widtha - \advance\!!widthb -\@@ibafstand % new + \advance\!!widthb -\@@ibdistance % new \else - \!!widtha\@@ibbreedte - \!!widthb\@@ibafstand % new + \!!widtha\@@ibwidth + \!!widthb\@@ibdistance % new \multiply\!!widthb \!!counta % new - \advance\!!widthb -\@@ibafstand % new + \advance\!!widthb -\@@ibdistance % new \advance\!!widtha -\!!widthb % new \divide\!!widtha \!!counta - \!!widthb\@@ibbreedte + \!!widthb\@@ibwidth \fi \def\goto##1% {\setnostrut - \setupsymbolset[\@@iasymboolset]% + \setupsymbolset[\@@iasymbolset]% \edef\localreference{##1}% \dodocomplexbutton\??ib - [\c!hoogte=\!!heighta,\c!breedte=\!!widtha]% + [\c!height=\!!heighta,\c!width=\!!widtha]% {\dontleavehmode\symbol[\localreference]}% [\localreference]% \hss}% \hbox to \!!widthb {\processallactionsinset [#2] - [ \v!pagina=>\goto\v!eerstepagina - \goto\v!volgendepagina - \goto\v!vorigepagina - \goto\v!laatstepagina, - \v!sub\v!pagina=>\goto\v!eerstesubpagina - \goto\v!volgendesubpagina - \goto\v!vorigesubpagina - \goto\v!laatstesubpagina, + [ \v!page=>\goto\v!firstpage + \goto\v!nextpage + \goto\v!previouspage + \goto\v!lastpage, + \v!subpage=>\goto\v!firstsubpage + \goto\v!nextsubpage + \goto\v!previoussubpage + \goto\v!lastsubpage, \s!unknown=>\goto\commalistelement]% \unskip}% \else - \interactiebuttons[][#1]% + \interactionbuttons[][#1]% \fi \fi \egroup @@ -3568,18 +3584,18 @@ %D %D For converience we provide: %D -%D \starttypen +%D \starttyping %D \overlaybutton[reference] -%D \stoptypen +%D \stoptyping %D %D This command can be used to define overlays an/or can be %D used in the whatevertext areas, like: %D -%D \starttypen +%D \starttyping %D \defineoverlay[PrevPage][\overlaybutton{PrevPage}] %D \setupbackgrounds[page][background=PrevPage] %D \setuptexttexts[\overlaybutton{NextPage}] -%D \stoptypen +%D \stoptyping %D %D For practical reasons, this macro accepts square brackets %D as well as braces. @@ -3589,12 +3605,6 @@ \def\simpleoverlaybutton#1% {\complexoverlaybutton[#1]} -% \def\complexoverlaybutton% no text, next argument is [reference] -% {\button -% [\c!kader=\v!uit,\c!achtergrond=, -% \c!breedte=\overlaywidth,\c!hoogte=\overlayheight]% -% {}} - \def\complexoverlaybutton[#1]% {\iflocation \doifreferencefoundelse{#1} @@ -3616,9 +3626,9 @@ %D In previous macros we used \type {\dotextprefix} to %D generate a space between a label and a number. %D -%D \starttypen +%D \starttyping %D \dotextprefix{text} -%D \stoptypen +%D \stoptyping %D %D Only when \type {text} is not empty, a space is inserted. @@ -3628,7 +3638,7 @@ \setbox\scratchbox\hbox{#1}% to be solved some day \ifdim\wd\scratchbox>\zeropoint \unhbox\scratchbox - \iflabeltextdone\else\@@rfscheider\fi + \iflabeltextdone\else\@@rfseparator\fi \else \unhbox\scratchbox \fi @@ -3639,48 +3649,37 @@ %D to are typeset. \setupreferencing - [\c!status=\v!start, - \c!autofile=\v!nee, - \v!deel\c!nummer=\v!ja, - \v!hoofdstuk\c!nummer=\v!nee, - \c!interactie=\v!alles, - %\c!urlvariant=\v!beide, - %\c!urlspatie=\v!nee, + [\c!state=\v!start, + \c!autofile=\v!no, + \v!part\c!number=\v!yes, + \v!chapter\c!number=\v!no, + \c!interaction=\v!all, + %\c!urlalternative=\v!both, + %\c!urlspace=\v!no, %\c!urlletter=, %\c!urlkleur=, - \c!converteerfile=\v!nee, - %\c!strut=\v!nee, % some day an option + \c!convertfile=\v!no, + %\c!strut=\v!no, % some day an option \c!prefix=, - \c!breedte=.75\zetbreedte, - \c!links=\citaat\bgroup, - \c!rechts=\egroup, - \c!globaal=\v!nee, - \c!expansie=\v!nee, - \c!scheider=\nonbreakablespace] + \c!width=.75\makeupwidth, + \c!left=\quotation\bgroup, + \c!right=\egroup, + \c!global=\v!no, + \c!expansion=\v!no, + \c!separator=\nonbreakablespace] \let\nonbreakablespace=~ \setupurl - [\c!variant=\v!beide, - \c!spatie=\v!nee, - \c!letter=\v!type, - \c!kleur=] - -%D We also set up buttons (not yet, this one calls a menu macro): - -% \stelbuttonsin -% [\c!status=\v!start, -% \c!breedte=\v!passend, -% \c!hoogte=\v!ruim, -% \c!offset=0.25em, -% \c!kader=\v!aan, -% \c!achtergrond=, -% \c!achtergrondraster=\@@rsraster, -% \c!achtergrondkleur=, -% \c!letter=\@@ialetter, -% \c!kleur=\@@iakleur, -% \c!zelfdepagina=\v!ja, -% \c!onbekendeverwijzing=\v!ja] + [\c!alternative=\v!both, + \c!space=\v!no, + \c!style=\v!type, + \c!color=] + +\setupprograms + [\c!directory=] + +%D We cannot set up buttons (not yet, this one calls a menu macro): % under consideration: % @@ -3724,4 +3723,4 @@ % % \stoptext -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex index 9b105df70..4830dcb32 100644 --- a/tex/context/base/core-reg.tex +++ b/tex/context/base/core-reg.tex @@ -51,22 +51,22 @@ % % \registerentry {tag} {letter} -\def\dostelregisterin[#1][#2][#3]% +\def\dosetupregister[#1][#2][#3]% {\ifthirdargument - \def\dodostelregisterin##1% + \def\dodosetupregister##1% {\getparameters[\??id##1#2][#3]% - \preparepaginaprefix{\??id##1}}% + \preparepageprefix{\??id##1}}% \else - \def\dodostelregisterin##1% + \def\dodosetupregister##1% {\getparameters[\??id##1][#2]% - \doifvalue{\??id##1\c!koppeling}\v!ja - {\appendtoks\koppelregister[##1][#2]\to\everystarttext}% - \preparepaginaprefix{\??id##1}}% + \doifvalue{\??id##1\c!coupling}\v!yes + {\appendtoks\coupleregister[##1][#2]\to\everystarttext}% + \preparepageprefix{\??id##1}}% \fi - \processcommalist[#1]\dodostelregisterin} + \processcommalist[#1]\dodosetupregister} -\def\stelregisterin - {\dotripleempty\dostelregisterin} +\def\setupregister + {\dotripleempty\dosetupregister} \def\getlastregisterentry#1% {\def\docommando##1% @@ -80,7 +80,7 @@ \ifduplicate\getlastregisterentry{#3}\fi \convertexpanded{\??id\currentregister}{#3}\asciiregisterentry \makesectionformat - \doifelsevalue{\??id\currentregister\c!eigennummer}\v!ja + \doifelsevalue{\??id\currentregister\c!ownnumber}\v!yes \donetrue\donefalse % the spaces between } { are essential for texutil's split \edef\schrijfwegnaarregister% @@ -101,7 +101,7 @@ \def\doregister#1% {\chardef\registerpagestatus\plusone \def\currentregister{#1}% - \doifelsevalue{\??id\currentregister\c!eigennummer}\v!ja + \doifelsevalue{\??id\currentregister\c!ownnumber}\v!yes {\dosingleempty\dodoregister} {\dosingleempty\donoregister}} @@ -150,11 +150,33 @@ \def\currentregister{#1}% \donoregister[#2]} +% \def\complexdozieregister[#1]#2#3% +% {\begingroup +% \thisisnextinternal\s!ind +% \ifduplicate\getlastregisterentry{#2}\fi +% \convertexpanded{\??id\currentregister}{#2}\asciiregisterentryA +% \convertexpanded{\??id\currentregister}{#3}\asciiregisterentryB +% \makesectionformat +% \edef\schrijfwegnaarregister% +% {\writeutility% +% {r s % +% {\currentregister} % +% {\nextinternalreference} % +% {#1} % +% {\asciiregisterentryA} % +% {\asciiregisterentryB} % +% {\sectionformat}}}% +% \schrijfwegnaarregister +% \endgroup +% \registerinfo{> zie}{#2}% +% \GotoPar} + \def\complexdozieregister[#1]#2#3% {\begingroup \thisisnextinternal\s!ind \ifduplicate\getlastregisterentry{#2}\fi - \convertexpanded{\??id\currentregister}{#2}\asciiregisterentry + \convertexpanded{\??id\currentregister}{#2}\asciiregisterentryA + \convertexpanded{\??id\currentregister}{#3}\asciiregisterentryB \makesectionformat \edef\schrijfwegnaarregister% {\writeutility% @@ -162,8 +184,8 @@ {\currentregister} % {\nextinternalreference} % {#1} % - {\asciiregisterentry} % - {#3} % + {\asciiregisterentryA} % + {\asciiregisterentryB} % {\sectionformat}}}% \schrijfwegnaarregister \endgroup @@ -178,12 +200,12 @@ % {\edef\currentregister{#1}% % om gebruik van \ExpandBothAfter % \doprocesspageregister} % mogelijk te maken -\def\doschrijfnaarregister[#1]% % de twee-traps-aanroep is nodig +\def\dowritetoregister[#1]% % de twee-traps-aanroep is nodig {\edef\currentregister{#1}% % om gebruik van \ExpandBothAfter \doprocesspageregister{}} % mogelijk te maken -\def\schrijfnaarregister - {\dodoubleempty\doschrijfnaarregister} +\def\writetoregister + {\dodoubleempty\dowritetoregister} \def\ifregistergeplaatst{\ifutilitydone} @@ -207,7 +229,7 @@ \def\setregisterpage#1% {\let\registerpageseparator\empty \processaction - [\getvalue{\??id#1\c!symbool}] + [\getvalue{\??id#1\c!symbol}] [ \c!n=>{\def\doregisterpage##1[##2]% {\doregisterpagelocation{#1}{\registerpagenumber}\/}}, \c!a=>{\def\doregisterpage##1[##2]% @@ -216,8 +238,8 @@ {\doregisterpagelocation{#1}{$\bullet$}}}, 2=>{\def\doregisterpage##1[##2]% {\doregisterpagelocation{#1}{\vrule\!!width1em\!!height1ex\!!depth\!!zeropoint}}}, - \v!geen=>{\def\doregisterpage##1[##2]{}},% - \s!unknown=>{\def\registerpagesymbol{\getvalue{\??id#1\c!symbool}}% + \v!none=>{\def\doregisterpage##1[##2]{}},% + \s!unknown=>{\def\registerpagesymbol{\getvalue{\??id#1\c!symbol}}% \def\doregisterpage##1[##2]% {\doregisterpagelocation{#1}{\registerpagesymbol}}}, \s!default=>{\def\registerpageseparator% @@ -225,7 +247,7 @@ \def\doregisterpage##1[##2]% {\doregisterpagehowto{##1} {\strut - \paginaprefix{\??id##1}[##2]% + \pageprefix{\??id##1}[##2]% \translatednumber[##2]}}}]} \let\registerpagehowto\empty @@ -236,13 +258,13 @@ \def\registertexthowto{#2}}% \def\doregistertexthowto#1#2% - {\dostartattributes{\??id#1\registertexthowto}\c!tekstletter\c!tekstkleur{}% - \getvalue{\??id#1\c!tekstcommando}{#2}% + {\dostartattributes{\??id#1\registertexthowto}\c!textstyle\c!textcolor{}% + \getvalue{\??id#1\c!textcommand}{#2}% \dostopattributes} \def\doregisterpagehowto#1#2% - {\dostartattributes{\??id#1\registerpagehowto}\c!paginaletter\c!paginakleur{}% - \getvalue{\??id#1\c!paginacommando}{#2}% + {\dostartattributes{\??id#1\registerpagehowto}\c!pagestyle\c!pagecolor{}% + \getvalue{\??id#1\c!pagecommand}{#2}% \dostopattributes} \def\registerentry #1{\executeifdefined{#1\s!entry }\gobbleoneargument } @@ -278,10 +300,10 @@ \chardef\lastregisterpagestatus=0 \def\limitedregisterentry#1#2% - {\getvalue{\??id#1\c!tekstcommando}% - {\doifelsenothing{\??id#1\c!maxbreedte} + {\getvalue{\??id#1\c!textcommand}% + {\doifelsenothing{\??id#1\c!maxwidth} {#2} - {\limitatetext{#2}{\getvalue{\??id#1\c!maxbreedte}}{\unknown}}}} + {\limitatetext{#2}{\getvalue{\??id#1\c!maxwidth}}{\unknown}}}} \def\dosetpageregisterpage#1#2#3#4#5#6% {\doifreglevelelse[#5]{\dodosetpageregisterpage{#1}{#2}{#3}{#4}{#5}{#6}}{}} @@ -325,7 +347,7 @@ % \donefalse % waiting for "to" pagenumber % \else % \registerpageseparator -% |\spatie|\relax % \relax needed because | looks ahead +% |\space|\relax % \relax needed because | looks ahead % \donetrue % \fi\fi\fi % \ifdone @@ -362,7 +384,7 @@ \egroup \!!doneafalse}% \!!doneafalse - \doifelsevalue{\??id#2\c!interactie}\v!tekst + \doifelsevalue{\??id#2\c!interaction}\v!text {\ifcase\currententrylevel \or \!!doneatrue\c!entrya\c!entryb\c!entryc \or \c!entrya\!!doneatrue\c!entryb\c!entryc \or @@ -376,7 +398,7 @@ % \global\firstregisterentrytrue \iffirstregisterpage \global\chardef\lastregisterpagestatus\zerocount - \expandafter\hskip\getvalue{\??id#2\c!afstand}\relax + \expandafter\hskip\getvalue{\??id#2\c!distance}\relax \donetrue \else\ifnum#1=3 |--|\relax % -- ! @@ -385,11 +407,11 @@ \donefalse % waiting for "to" pagenumber \else \registerpageseparator - |\spatie|\relax % \relax needed because | looks ahead + |\space|\relax % \relax needed because | looks ahead \donetrue \fi\fi\fi \ifdone - \doifelsevalue{\??id#2\c!interactie}\v!paginanummer + \doifelsevalue{\??id#2\c!interaction}\v!pagenumber {\bgroup \setbox0\hbox {\showlocation{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}% @@ -409,7 +431,7 @@ {\doregistertexthowto{#1}{\strut\limitedregisterentry{#1}{##1}}}% \getvalue {#1\ifcase\currententrylevel\s!entrya\or\s!entryb\else\s!entryc\fi}% - {\doregisterpagehowto{#1}{\labeltexts\v!zie{#3}}}% + {\doregisterpagehowto{#1}{\labeltexts\v!see{#3}}}% \c!entryletter\c!entrya\c!entryb\c!entryc \global\let\c!entrya\relax \global\let\c!entryb\relax @@ -425,35 +447,35 @@ \def\doregistercharacter[#1]#2% {\global\firstregisterentrytrue - \doifelsevalue{\??id#1\c!aanduiding}\v!ja + \doifelsevalue{\??id#1\c!indicator}\v!yes {\executeifdefined - {\strippedcsname\doregistercharacter\getvalue{\??id#1\c!variant}}% + {\strippedcsname\doregistercharacter\getvalue{\??id#1\c!alternative}}% \doregistercharactera [#1]{#2}} {\noregistercharacter[#1]{#2}}} \def\noregistercharacter[#1]#2% - {\getvalue{\??id#1\c!voor}% + {\getvalue{\??id#1\c!before}% \goodbreak} % a = \def\doregistercharactera[#1]#2% - {\getvalue{\??id#1\c!voor}% + {\getvalue{\??id#1\c!before}% \vskip\lineheight\goodbreak\vskip-\lineheight \ifhmode\unskip\else\noindent\fi % brrr - \getvalue{\??id#1\c!commando}{\doattributes{\??id#1}\c!letter\c!kleur{\strut\ignorespaces#2}}% - \getvalue{\??id#1\c!na}% + \getvalue{\??id#1\c!command}{\doattributes{\??id#1}\c!style\c!color{\strut\ignorespaces#2}}% + \getvalue{\??id#1\c!after}% \par\nobreak} % b = \def\doregistercharacterb[#1]#2% here no lineheight hackery ! ! ! - {\getvalue{\??id#1\c!voor}% + {\getvalue{\??id#1\c!before}% \ifhmode\unskip\else\noindent\fi % brrr - \getvalue{\??id#1\c!commando}% - {\doattributes{\??id#1}\c!letter\c!kleur{\strut\ignorespaces#2}}% - \getvalue{\??id#1\c!na}% + \getvalue{\??id#1\c!command}% + {\doattributes{\??id#1}\c!style\c!color{\strut\ignorespaces#2}}% + \getvalue{\??id#1\c!after}% \nobreak} \def\doregistercharacterA[#1]#2{\doregistercharactera[#1]{\WORD{#2}}} @@ -463,7 +485,7 @@ %D \type {#2} can be \type {\string} itself. \def\doregisterreference[#1]#2% - {\doifvalue{\??id#1\c!refereren}\v!aan + {\doifvalue{\??id#1\c!referencing}\v!on {\pagereference[#1:#2]}} \def\dosetpageregisterletter#1#2% @@ -587,7 +609,7 @@ % aangepast \def\dodocommando[##1-##2]% {\gotonextinternal{\s!ind}{##1}{##2}{\box0}}% - \doifelsevalue{\??id#1\c!interactie}\v!paginanummer + \doifelsevalue{\??id#1\c!interaction}\v!pagenumber {\limitedregisterentry{#1}{#2}} % paginanummer {{\setbox0\hbox{\limitedregisterentry{#1}{\begstrut#2}}% \ifx\firstlistreference\empty % tekst,alles @@ -599,9 +621,9 @@ \else \expandafter\dodocommando\expandafter[\firstlistreference]% \fi}}% - \doifvalue{\??id#1\c!nummer}\v!ja - {\hskip\getvalue{\??id#1\c!afstand}(\commalistsize)}% - \doifnotvalue{\??id#1\c!interactie}\v!tekst % paginanummer,alles + \doifvalue{\??id#1\c!number}\v!yes + {\hskip\getvalue{\??id#1\c!distance}(\commalistsize)}% + \doifnotvalue{\??id#1\c!interaction}\v!text % paginanummer,alles {\def\docommando##1##2% {{\setbox0\hbox{\showlocation{\hbox to 1em{\hss\symbol[##2]\hss}}}% \ifx##1\empty @@ -609,10 +631,10 @@ \else \expandafter\dodocommando\expandafter[##1]% \fi}}% - \hskip\getvalue{\??id#1\c!afstand}% - \docommando\firstlistreference\v!vorige - \docommando\midlistreference\v!ergens - \docommando\lastlistreference\v!volgende}% + \hskip\getvalue{\??id#1\c!distance}% + \docommando\firstlistreference\v!previous + \docommando\midlistreference\v!somewhere + \docommando\lastlistreference\v!next}% % tot hier \else % \endgraf @@ -622,7 +644,7 @@ \endgraf} \def\dosetregister#1% - {\doifelsevalue{\??id#1\c!koppeling}\v!ja + {\doifelsevalue{\??id#1\c!coupling}\v!yes {\ifautoregisterhack \dosetautoregister{#1}% \else @@ -674,12 +696,12 @@ {}}% \fi} -\def\dokoppelregister[#1][#2]% +\def\docoupleregister[#1][#2]% {\iflocation \ifcase0\countervalue{autolink:#1}\relax % only once \begingroup \let\dosetregister\doloadregisterlinks - \stelregisterin[#1][#2]% + \setupregister[#1][#2]% \doutilities{#1}\jobname{#1}\relax\relax \endgroup \ifautoregisterhack @@ -690,8 +712,8 @@ \fi \fi} -\def\koppelregister - {\dodoubleempty\dokoppelregister} +\def\coupleregister + {\dodoubleempty\docoupleregister} \def\dodocommandoprolinrefAA[#1-#2]% {\def\lastlistreference{#1-#2}} @@ -719,7 +741,7 @@ \def\docommandoprolinrefB#1#2#3% {\bgroup \ifx#2\empty - \doifvalue{\??id#1\c!onbekendeverwijzing}\v!leeg{\hskip1em}% + \doifvalue{\??id#1\c!unknownreference}\v!empty{\hskip1em}% \else \setbox0\hbox to 1em{\hss\showlocation{\symbol[#3]}\hss}% \expandafter\dodocommandoprolinrefB\expandafter[#2]% @@ -748,14 +770,14 @@ \let\prevlistreference\empty \let\nextlistreference\empty \fi - \setalignmentswitch{\getvalue{\??id#1\c!plaats}}% + \setalignmentswitch{\getvalue{\??id#1\c!location}}% \ifcase\alignmentswitch % links - \docommandoprolinrefB{#1}\prevlistreference\v!vorige - \docommandoprolinrefB{#1}\nextlistreference\v!volgende + \docommandoprolinrefB{#1}\prevlistreference\v!previous + \docommandoprolinrefB{#1}\nextlistreference\v!next \or % midden - \docommandoprolinrefB{#1}\prevlistreference\v!vorige + \docommandoprolinrefB{#1}\prevlistreference\v!previous \or % rechts \fi @@ -768,11 +790,11 @@ % links \or % midden - \docommandoprolinrefB{#1}\nextlistreference\v!volgende + \docommandoprolinrefB{#1}\nextlistreference\v!next \or % rechts - \docommandoprolinrefB{#1}\prevlistreference\v!vorige - \docommandoprolinrefB{#1}\nextlistreference\v!volgende + \docommandoprolinrefB{#1}\prevlistreference\v!previous + \docommandoprolinrefB{#1}\nextlistreference\v!next \fi}} \def\dodolinkedregister[#1][#2]#3% page auto link @@ -817,11 +839,11 @@ \pagereference[-:\s!lin:\internallistreference]% \pluscounter{autolink:#1}% \bgroup - %\setupinteraction[\c!kleur=,\c!contrastkleur=,\c!letter=]% kan sneller - \resetinteractionparameter\c!kleur - \resetinteractionparameter\c!contrastkleur - \resetinteractionparameter\c!letter - \naarbox + %\setupinteraction[\c!color=,\c!contrastcolor=,\c!style=]% kan sneller + \resetinteractionparameter\c!color + \resetinteractionparameter\c!contrastcolor + \resetinteractionparameter\c!style + \gotobox {\limitedregisterentry{#1}{\begstrut#2}}% [JS(SetRegisterEntry{\v!register,\countervalue{autolink:#1},#2,{\alllistreferences}})]% \egroup @@ -843,8 +865,8 @@ %D The first implementation used one main field with clones. %D In a 2500 page document this resulted in a rather (anoying) -%D long start||up time. This \citeer {every page its own field} -%D solution, combined with a \citeer {page open action}, works +%D long start||up time. This \quote {every page its own field} +%D solution, combined with a \quote {page open action}, works %D much faster, but is conceptually pretty weak. \def\complexregisterfield[#1]% @@ -858,123 +880,109 @@ \setupfield [\v!register] - [\c!breedte=10em, - \c!hoogte=3ex, - \c!uitlijnen=\v!midden, - \c!optie=\v!alleenleesbaar, - \c!plaats=\v!laag] + [\c!width=10em, + \c!height=3ex, + \c!align=\v!middle, + \c!option=\v!readonly, + \c!location=\v!low] \def\doinitializeautoregister#1% {\useJSscripts[reg]% \useJSpreamblenow{LinkedRegisters}% - \setupinteraction[\c!openpaginaactie=JS(UpdateRegisterField{\v!register})]% + \setupinteraction[\c!openpageaction=JS(UpdateRegisterField{\v!register})]% \definereference[\v!reset \v!register][JS(ResetRegisterEntry{\v!register})]% - \definereference[\v!eerste \v!register][JS(GotoFirstRegisterEntry{\v!register})]% - \definereference[\v!vorige \v!register][JS(GotoPreviousRegisterEntry{\v!register})]% - \definereference[\v!volgende\v!register][JS(GotoNextRegisterEntry{\v!register})]% - \definereference[\v!laatste \v!register][JS(GotoLastRegisterEntry{\v!register})]} + \definereference[\v!first \v!register][JS(GotoFirstRegisterEntry{\v!register})]% + \definereference[\v!previous \v!register][JS(GotoPreviousRegisterEntry{\v!register})]% + \definereference[\v!next\v!register][JS(GotoNextRegisterEntry{\v!register})]% + \definereference[\v!last \v!register][JS(GotoLastRegisterEntry{\v!register})]} \def\doinitializelinkregister#1% {} % todo ruwe register -\def\plaatsregister - {\dosingleargument\doplaatsregister} - -\def\doplaatsregister[#1]% - {\def\currentregister{#1}% - \complexorsimpleempty\doplaatsregister} - -\def\complexdoplaatsregister[#1]% - {\begingroup - \stelregisterin[\currentregister][#1]% - \raggedright - \startkolommen - [\c!n=\getvalue{\??id\currentregister\c!n}, - \c!balanceren=\getvalue{\??id\currentregister\c!balanceren}, - \c!uitlijnen=\getvalue{\??id\currentregister\c!uitlijnen}]% - \mindermeldingen - \startopelkaar[\v!blanko]% - \doutilities\currentregister\jobname\currentregister\relax\par - \stopopelkaar - \stopkolommen - \endgroup} - -% \def\complexdovolledigregister[#1]% \@EA's kunnen weg -% {\@EA\plaatsvolledig\@EA{\@EA\systemsuppliedchapter\@EA}% -% \@EA{\@EA\currentregister\@EA}% -% \@EA{\@EA\headtext\@EA{\currentregister}}% -% {\complexdoplaatsregister[#1]}} - -\def\complexdovolledigregister[#1]% the expansion is needed because we don't want - {\expanded % \v!'s in the tuo file (french) - {\plaatsvolledig - {\noexpand\systemsuppliedchapter}% - {\currentregister}% - {\noexpand\headtext{\currentregister}}% - {\noexpand\complexdoplaatsregister[#1]}}} - -\def\dovolledigregister[#1]% - {\def\currentregister{#1}% - \complexorsimpleempty\dovolledigregister} +\def\placeregister + {\dodoubleempty\doplaceregister} + +\def\doplaceregister[#1][#2]% + {\iffirstargument + \begingroup + \def\currentregister{#1}% + \setupregister[\currentregister][#2]% + \raggedright + \startcolumns + [\c!n=\getvalue{\??id\currentregister\c!n}, + \c!balance=\getvalue{\??id\currentregister\c!balance}, + \c!align=\getvalue{\??id\currentregister\c!align}]% + \dontcomplain + \startpacked[\v!blank]% + \doutilities\currentregister\jobname\currentregister\relax\par + \stoppacked + \stopcolumns + \endgroup + \fi} -\def\volledigregister - {\dosingleargument\doplaatsregister} +\def\completeregister + {\dodoubleempty\docompleteregister} + +\def\docompleteregister[#1][#2]% + {\iffirstargument + \begingroup + \def\currentregister{#1}% + \expanded % the expansion is needed because we don't want \v!'s in the tuo file (french) + {\plaatsvolledig + {\noexpand\systemsuppliedchapter}% + {\currentregister}% + {\noexpand\headtext{\currentregister}}% + {\noexpand\placeregister[\currentregister][#2]}}% + \endgroup + \fi} -\def\dodefinieerregister[#1][#2]% - {\stelregisterin[#1]% +\def\dodefineregister[#1][#2]% + {\setupregister[#1]% [\c!n=2, - \c!balanceren=\v!ja, % \v!nee komt niet zo vaak voor - \c!uitlijnen=\v!nee, - \c!voor=\blanko, % binnen kolommen: \blanko[\v!regel] - \c!na=, - \c!symbool=, - \c!interactie=\v!paginanummer, - \c!variant=\v!a, - \c!afstand=1em, - \c!letter=\v!vet, - \c!paginaletter=\v!schuin, - \c!aanduiding=\v!ja, - \v!deel\v!nummer=\v!ja, % v - \v!hoofdstuk\c!nummer=\v!nee, - \c!criterium=\v!alles, - \c!commando=, - \c!refereren=\v!aan, - \c!plaats=\v!midden, - \c!maxbreedte=, - \c!nummer=\v!nee, - \c!onbekendeverwijzing=\v!leeg, - \c!expansie=]% + \c!balance=\v!yes, % \v!no komt niet zo vaak voor + \c!align=\v!no, + \c!before=\blank, % binnen kolommen: \blank[\v!line] + \c!after=, + \c!symbol=, + \c!interaction=\v!pagenumber, + \c!alternative=\v!a, + \c!distance=1em, + \c!style=\v!bold, + \c!pagestyle=\v!slanted, + \c!indicator=\v!yes, + \v!part\v!number=\v!yes, % v + \v!chapter\c!number=\v!no, + \c!criterium=\v!all, + \c!command=, + \c!referencing=\v!on, + \c!location=\v!middle, + \c!maxwidth=, + \c!number=\v!no, + \c!unknownreference=\v!empty, + \c!expansion=]% \presetheadtext[#1=\Word{#1}]% - \setvalue{#1}% - {\doregister{#1}}% - \setvalue{\e!gekoppelde#1}% - {\dolinkedregister{#1}}% - \setvalue{\s!set#1}% - {\dosetregister{#1}}% - \setvalue{\s!reset#1}% - {\doresetregister{#1}}% \addutilityreset{#1}% - \setvalue{\e!zie#1}% - {\dozieregister{#1}}% - \setvalue{\e!plaats#1}% - {\doplaatsregister[#1]}% - \setvalue{\e!volledige#1}% - {\dovolledigregister[#1]}% - \setvalue{\e!stel#1\e!in}[##1]% - {\getparameters[\??id#1][##1]}} - -\def\definieerregister% - {\dodoubleargument\dodefinieerregister} + \setvalue{#1}{\doregister{#1}}% + \setvalue{\e!coupled#1}{\dolinkedregister{#1}}% + \setvalue{\s!set#1}{\dosetregister{#1}}% + \setvalue{\s!reset#1}{\doresetregister{#1}}% + \setvalue{\e!see#1}{\dozieregister{#1}}% + \setvalue{\e!place#1}{\placeregister[#1]}% + \setvalue{\e!complete#1}{\completeregister[#1]}% + \setvalue{\e!setup#1\e!endsetup}[##1]{\getparameters[\??id#1][##1]}} + +\def\defineregister% + {\dodoubleargument\dodefineregister} \def\registerlengte{\utilityregisterlength} \def\utilityregisterlength{0} -\def\dobepaalregisterkenmerken[#1][#2]% +\def\dodetermineregistercharacteristics[#1][#2]% {\begingroup - \stelregisterin[#1][#2]% + \setupregister[#1][#2]% \dosetreglevel{#1}% \setvalue{#1\s!from}% {\getvalue{#1\s!page}}% @@ -993,14 +1001,14 @@ \resetsystemmode\v!register \fi} -\def\bepaalregisterkenmerken - {\dodoubleempty\dobepaalregisterkenmerken} +\def\determineregistercharacteristics + {\dodoubleempty\dodetermineregistercharacteristics} -\definieerregister +\defineregister [\v!index] [\v!indices] -% \stelregisterin[index][koppeling=ja] +% \setupregister[index][koppeling=ja] % % \stelveldenin % [register][achtergrond=raster,kader=uit] @@ -1029,4 +1037,4 @@ % % \volledigeindex -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex index 65b9d9b5f..6a45e1294 100644 --- a/tex/context/base/core-rul.tex +++ b/tex/context/base/core-rul.tex @@ -57,11 +57,11 @@ %D as give access to more suitable methods of rendering. Such a %D method looks like: %D -%D \starttypen +%D \starttyping %D \def\methodegraybox %D \width#1\height#2\depth#3\raster#4\corner#5\radius#6\\% %D { ... } -%D \stoptypen +%D \stoptyping %D %D The string \type{graybox} is a common element in the name, %D so we can have for instance \type {\postscriptgraybox} or @@ -72,32 +72,32 @@ %D %D \startbuffer %D \periodgraybox -%D \width.5\hsize\height1cm\depth0cm\raster.85\corner\v!nee\radius0pt\\ +%D \width.5\hsize\height1cm\depth0cm\raster.85\corner\v!no\radius0pt\\ %D \stopbuffer %D %D \typebuffer %D %D becomes: %D -%D %\startregelcorrectie -%D % \vbox to 1cm{\haalbuffer} -%D %\stopregelcorrectie +%D %\startlinecorrection +%D % \vbox to 1cm{\getbuffer} +%D %\stoplinecorrection %D -%D \startregelcorrectie +%D \startlinecorrection %D \unprotect %D \vbox to 1cm -%D {\getvalue{\v!punt graybox}% -%D \width.5\hsize\height1cm\depth0cm\raster.85\corner\v!nee\radius0pt\\} +%D {\getvalue{period graybox}% +%D \width.5\hsize\height1cm\depth0cm\raster.85\corner\v!no\radius0pt\\} %D \protect -%D \stopregelcorrectie +%D \stoplinecorrection %D %D There are two predefined methodes, one uses periods and the %D other uses small rules. The second method is less %D efficient, but sometimes give better results. The dimensions %D of the resullting box are set to zero. -\setvalue{\v!punt graybox}{\processraster\symbol\rasterdot} -\setvalue{\v!lijn graybox}{\processraster\symbol\rasterbox} +\setvalue{\v!dot graybox}{\processraster\symbol\rasterdot} +\setvalue{\v!rule graybox}{\processraster\symbol\rasterbox} \def\rasterdot{\rasterfont.} \def\rasterbox{\hss\vrule\!!width.4pt\!!height.4pt\!!depth\zeropoint} @@ -116,7 +116,7 @@ \symbol#1\width#2\height#3\depth#4\raster#5\corner#6\radius#7\\% {\bgroup \forgetall - \mindermeldingen + \dontcomplain \dimen10=\onepoint \dimen10=\@@rsfactor\dimen10 \dimen10=#5\dimen10 @@ -146,7 +146,7 @@ %D The most appropriate way to call for this feature is %D using \type{\graybox}, which is defined as: -\def\graybox{\getvalue{\@@rsmethode graybox}} +\def\graybox{\getvalue{\@@rsmethod graybox}} %D This macro takes the five arguments mentioned earlier and %D obey the user's settings. @@ -156,13 +156,13 @@ %D terms of speed, memory usage and file size, to use a driver %D supported method. -\setvalue{\v!extern graybox}\width#1\height#2\depth#3\raster#4\corner#5\radius#6\\% +\setvalue{\v!external graybox}\width#1\height#2\depth#3\raster#4\corner#5\radius#6\\% {\setgraybox\width#1\height#2\depth#3\raster#4\corner#5\radius#6\\} %D For compatibility reasons we also define the original one: \setvalue{\v!postscript graybox}% - {\getvalue{\v!extern graybox}} + {\getvalue{\v!external graybox}} %D A quite valid way of letting drivers do the job, is giving %D a solid rule a gray texture. @@ -186,7 +186,7 @@ \def\dofilledbox\width#1\height#2\depth#3\corner#4\radius#5\\% {\bgroup - \doifelse{#4}\v!rond + \doifelse{#4}\v!round {\dimen0=#5\relax % just in case of .x\bodyfontsize \ifzeropt\dimen0 \dofilledlinedbox\width#1\height#2\depth#3\\% @@ -200,7 +200,7 @@ {\vrule\!!width#1\!!height#2\!!depth#3}% \def\dofilledroundbox\width#1\height#2\depth#3\radius#4\\% - {\ovalbox{#1}{#2}{#3}\ruledlinewidth{#4}\v!uit\v!aan} + {\ovalbox{#1}{#2}{#3}\ruledlinewidth{#4}\v!off\v!on} \def\ovalbox#1#2#3#4#5#6#7% direct #1 etc passeren {\bgroup @@ -209,10 +209,10 @@ \scratchdimen#3\edef\ovaldep{\the\scratchdimen}% \scratchdimen#4\edef\ovallin{\the\scratchdimen}% \scratchdimen#5\edef\ovalrad{\the\scratchdimen}% - \doifelse{#6}\v!aan % will be a macro that handles + \doifelse{#6}\v!on % will be a macro that handles {\let\ovalstr\!!plusone} % start, stop, ja, nee, aan, uit {\let\ovalstr\!!zerocount}% % and something \doif - \doifelse{#7}\v!aan + \doifelse{#7}\v!on {\let\ovalfil\!!plusone} {\let\ovalfil\!!zerocount}% \doovalbox\ovalwid\ovalhei\ovaldep\ovallin\ovalrad\ovalstr\ovalfil @@ -258,10 +258,10 @@ %D \startbuffer[tmp-1] %D \defineoverlay %D [fancy] -%D [{\externfiguur +%D [{\externalfigure %D [mp-cont.502] -%D [breedte=\overlaywidth, -%D hoogte=\overlayheight]}] +%D [width=\overlaywidth, +%D height=\overlayheight]}] %D \stopbuffer %D %D \typebuffer[tmp-1] @@ -269,15 +269,15 @@ %D That for instance can be uses in: %D %D \startbuffer[tmp-2] -%D \omlijnd[achtergrond=fancy]{How Fancy!} -%D \omlijnd[achtergrond=fancy,kader=uit]{Even More Fancy!} +%D \framed[backgroundachtergrond=fancy]{How Fancy!} +%D \framed[backgroundachtergrond=fancy,frame=off]{Even More Fancy!} %D \stopbuffer %D %D and looks like: %D -%D \startregelcorrectie -%D \vbox{\baselineskip24pt\haalbuffer[tmp-1]\haalbuffer[tmp-2]} -%D \stopregelcorrectie +%D \startlinecorrection +%D \vbox{\baselineskip24pt\getbuffer[tmp-1]\getbuffer[tmp-2]} +%D \stoplinecorrection %D %D The formal definition is: %D @@ -288,18 +288,18 @@ %D setting of the width, height and depth variables. %D Multiple backgrounds are possible and are specified as: %D -%D \starttypen -%D \omlijnd[achtergrond={one,two,three}]{Three backgrounds!} -%D \stoptypen +%D \starttyping +%D \framed[background={one,two,three}]{Three backgrounds!} +%D \stoptyping %D %D Most drawing packages only know width and height. Therefore %D the dimensions have a slightly different meaning here: %D -%D \startopsomming[opelkaar] -%D \som \type{\overlaywidth }: width of the overlay -%D \som \type{\overlayheight}: height plus depth of the overlay -%D \som \type{\overlaydepth }: depth of the overlay -%D \stopopsomming +%D \startitemize[packed] +%D \item \type{\overlaywidth }: width of the overlay +%D \item \type{\overlayheight}: height plus depth of the overlay +%D \item \type{\overlaydepth }: depth of the overlay +%D \stopitemize %D %D The resulting box is lowered to the right depth. @@ -401,10 +401,10 @@ %D We predefine two already familiar backgrounds: -\setvalue{\??ov\v!raster}#1#2#3#4#5#6#7% +\setvalue{\??ov\v!screen}#1#2#3#4#5#6#7% {\graybox\width#1\height#2\depth#3\raster#5\corner#6\radius#7\\} -\setvalue{\??ov\v!kleur}#1#2#3#4#5#6#7% +\setvalue{\??ov\v!color}#1#2#3#4#5#6#7% {\colorbox\width#1\height#2\depth#3\color#4\corner#6\radius#7\\} %D After all these preparations, the background macro does no @@ -412,11 +412,11 @@ %D macro starts up a call chain, depending on the background %D one needs: %D -%D \startopsomming[opelkaar] -%D \som a raster, color or user defined shape -%D \som square or round corners -%D \som a \TEX\ or driver based method -%D \stopopsomming +%D \startitemize[packed] +%D \item a raster, color or user defined shape +%D \item square or round corners +%D \item a \TEX\ or driver based method +%D \stopitemize %D %D The macro can be extended by adding commands to the token %D list register \type {\everybackgroundbox}. For this @@ -480,7 +480,7 @@ %D One can explictly insert the foreground box. For that %D purpose we introduce the overlay \type {foreground}. -\defineoverlay[\v!voorgrond][\foregroundbox] +\defineoverlay[\v!foreground][\foregroundbox] %D We can specify overlays as a comma separated list of %D overlays, a sometimes handy feature. @@ -521,7 +521,7 @@ \def\dostrokedbox\width#1\height#2\depth#3\corner#4\radius#5\toggle#6\\% {\bgroup - \doifelse{#4}\v!rond + \doifelse{#4}\v!round {\dimen0=#5\relax % just in case of .x\bodyfontsize \ifzeropt\dimen0 \dostrokedlinedbox\width#1\height#2\depth#3\toggle#6\\% @@ -554,18 +554,18 @@ \def\@@frame@@{@@frame@@} -\setvalue{t\@@frame@@\v!aan\v!aan}{\hrule\!!height\ruledlinewidth\kern-\ruledlinewidth} -\setvalue{t\@@frame@@\v!uit\v!aan}{\hrule\!!height\ruledlinewidth\kern-\ruledlinewidth} - \setvalue{t\@@frame@@\v!aan}{\hrule\!!height\ruledlinewidth\kern-\ruledlinewidth} -\setvalue{b\@@frame@@\v!aan\v!aan}{\kern-\ruledlinewidth\hrule\!!height\ruledlinewidth} -\setvalue{b\@@frame@@\v!uit\v!aan}{\kern-\ruledlinewidth\hrule\!!height\ruledlinewidth} - \setvalue{b\@@frame@@\v!aan}{\kern-\ruledlinewidth\hrule\!!height\ruledlinewidth} -\setvalue{l\@@frame@@\v!aan\v!aan}{\vrule\!!width\ruledlinewidth\kern-\ruledlinewidth} -\setvalue{l\@@frame@@\v!uit\v!aan}{\vrule\!!width\ruledlinewidth\kern-\ruledlinewidth} - \setvalue{l\@@frame@@\v!aan}{\vrule\!!width\ruledlinewidth\kern-\ruledlinewidth} -\setvalue{r\@@frame@@\v!aan\v!aan}{\kern-\ruledlinewidth\vrule\!!width\ruledlinewidth} -\setvalue{r\@@frame@@\v!uit\v!aan}{\kern-\ruledlinewidth\vrule\!!width\ruledlinewidth} - \setvalue{r\@@frame@@\v!aan}{\kern-\ruledlinewidth\vrule\!!width\ruledlinewidth} +\setvalue{t\@@frame@@\v!on\v!on}{\hrule\!!height\ruledlinewidth\kern-\ruledlinewidth} +\setvalue{t\@@frame@@\v!off\v!on}{\hrule\!!height\ruledlinewidth\kern-\ruledlinewidth} + \setvalue{t\@@frame@@\v!on}{\hrule\!!height\ruledlinewidth\kern-\ruledlinewidth} +\setvalue{b\@@frame@@\v!on\v!on}{\kern-\ruledlinewidth\hrule\!!height\ruledlinewidth} +\setvalue{b\@@frame@@\v!off\v!on}{\kern-\ruledlinewidth\hrule\!!height\ruledlinewidth} + \setvalue{b\@@frame@@\v!on}{\kern-\ruledlinewidth\hrule\!!height\ruledlinewidth} +\setvalue{l\@@frame@@\v!on\v!on}{\vrule\!!width\ruledlinewidth\kern-\ruledlinewidth} +\setvalue{l\@@frame@@\v!off\v!on}{\vrule\!!width\ruledlinewidth\kern-\ruledlinewidth} + \setvalue{l\@@frame@@\v!on}{\vrule\!!width\ruledlinewidth\kern-\ruledlinewidth} +\setvalue{r\@@frame@@\v!on\v!on}{\kern-\ruledlinewidth\vrule\!!width\ruledlinewidth} +\setvalue{r\@@frame@@\v!off\v!on}{\kern-\ruledlinewidth\vrule\!!width\ruledlinewidth} + \setvalue{r\@@frame@@\v!on}{\kern-\ruledlinewidth\vrule\!!width\ruledlinewidth} %D I condidered using the low level support command %D \type{\ruledhbox}, but this would slow down processing by a @@ -577,7 +577,7 @@ %D {\ovalbox}. \def\dostrokedroundbox\width#1\height#2\depth#3\radius#4\toggle#5\left#6\\% - {\doif{#5}{\v!aan}{\ovalbox{#1}{#2}{#3}{\ruledlinewidth}{#4}{\v!aan}{\v!uit}}} + {\doif{#5}\v!on{\ovalbox{#1}{#2}{#3}{\ruledlinewidth}{#4}\v!on\v!off}} %D The next few macros are probably the most misused ones in %D \CONTEXT. They deal with putting rules around boxes, provide @@ -636,17 +636,17 @@ \def\copylocalframed[#1]#2[#3]% {\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!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!setups]% - \copyparameters[#1\c!achtergrond][#1]% - [\c!straal,\c!hoek,\c!diepte]% - \copyparameters[#1\c!kader][#1]% - [\c!straal,\c!hoek,\c!diepte]} + [\c!width,\c!height,\c!offset,\c!empty,\c!rulethickness,% + \c!radius,\c!corner,\c!depth,\c!frame,\c!framecolor,% + \c!foregroundstyle,\c!foregroundcolor,\c!lines,\c!orientation,% + \c!topframe,\c!bottomframe,\c!leftframe,\c!rightframe,% + \c!rulethickness,\c!frameoffset,\c!background,\c!component,% + \c!backgroundoffset,\c!backgroundscreen,\c!backgroundcolor,% + \c!align,\c!bottom,\c!top,\c!strut,\c!location,\c!setups]% + \copyparameters[#1\c!background][#1]% + [\c!radius,\c!corner,\c!depth]% + \copyparameters[#1\c!frame][#1]% + [\c!radius,\c!corner,\c!depth]} \def\setupframed {\dodoubleargument\getparameters[\??oi]} @@ -687,6 +687,8 @@ %D Because it is used so often the he next macro is (and %D looks) rather optimized. +\let\postprocessframebox\relax + \let\@@framed\s!unknown \def\framedparameter#1% @@ -697,23 +699,23 @@ \inframedtrue \edef\@@framed{#1}% % this piece of pre expansion is needed (sometimes used in frameoffset) - % \doifvaluesomething{\@@framed\c!lijndikte} % obsolete - % {\ruledlinewidth\getvalue{\@@framed\c!lijndikte}}% obsolete + % \doifvaluesomething{\@@framed\c!rulethickness} % obsolete + % {\ruledlinewidth\getvalue{\@@framed\c!rulethickness}}% obsolete % this piece of pre expansion is needed (sometimes used circular) - \scratchdimen\framedparameter\c!kaderoffset - \setevalue{\@@framed\c!kaderoffset}{\the\scratchdimen}% - \doifnotvalue{\@@framed\c!achtergrondoffset}\v!kader - {\scratchdimen\framedparameter\c!achtergrondoffset - \setevalue{\@@framed\c!achtergrondoffset}{\the\scratchdimen}}% + \scratchdimen\framedparameter\c!frameoffset + \setevalue{\@@framed\c!frameoffset}{\the\scratchdimen}% + \doifnotvalue{\@@framed\c!backgroundoffset}\v!frame + {\scratchdimen\framedparameter\c!backgroundoffset + \setevalue{\@@framed\c!backgroundoffset}{\the\scratchdimen}}% % to prevent deadlock in case of self refering \ifsecondargument % faster \getparameters[\@@framed][#2]% here ! \fi % we need to register the (outer) color - \startregistercolor[\framedparameter\c!voorgrondkleur]% + \startregistercolor[\framedparameter\c!foregroundcolor]% % to get the right spacing - \doifvaluesomething{\@@framed\c!voorgrondletter} - {\@EA\doconvertfont\csname\@@framed\c!voorgrondletter\endcsname\empty}% + \doifvaluesomething{\@@framed\c!foregroundstyle} + {\@EA\doconvertfont\csname\@@framed\c!foregroundstyle\endcsname\empty}% % beware, both the frame and background offset can be overruled % \edef\doframedsetups{\framedparameter\c!setups}% @@ -722,25 +724,26 @@ \fi % the next macros are visible \edef\localoffset{\framedparameter\c!offset}% - \edef\localwidth {\framedparameter\c!breedte}% - \edef\localheight{\framedparameter\c!hoogte}% - \edef\localformat{\framedparameter\c!uitlijnen}% + \edef\localwidth {\framedparameter\c!width}% + \edef\localheight{\framedparameter\c!height}% + \edef\localformat{\framedparameter\c!align}% \edef\localstrut {\framedparameter\c!strut}% % these are not - \edef\@@localframing {\framedparameter\c!kader}% - \edef\@@locallocation{\framedparameter\c!plaats}% + \edef\@@localframing {\framedparameter\c!frame}% + \edef\@@locallocation {\framedparameter\c!location}% + \edef\@@localorientation{\framedparameter\c!orientation}% % \ifx\@@localframing\v!overlay % no frame, no offset, no framewidth \boxhasframefalse \let\localoffset\v!overlay - \else\ifx\@@localframing\v!geen % no frame, no framewidth + \else\ifx\@@localframing\v!none % no frame, no framewidth \boxhasframefalse \else \boxhasframetrue \fi\fi \ifboxhasframe - \doifvaluesomething{\@@framed\c!lijndikte} - {\ruledlinewidth\framedparameter\c!lijndikte\relax + \doifvaluesomething{\@@framed\c!rulethickness} + {\ruledlinewidth\framedparameter\c!rulethickness\relax \ifinheritruledlinewidth\linewidth\ruledlinewidth\fi}% \else \ruledlinewidth\zeropoint @@ -750,16 +753,16 @@ \else \boxhasformattrue \dosetraggedcommand\localformat - \edef\dobeforeframedbox{\raggedtopcommand\framedparameter\c!boven}% - \edef\doafterframedbox {\framedparameter\c!onder\raggedbottomcommand}% + \edef\dobeforeframedbox{\raggedtopcommand\framedparameter\c!top}% + \edef\doafterframedbox {\framedparameter\c!bottom\raggedbottomcommand}% \fi - \ifx\localoffset\v!geen + \ifx\localoffset\v!none \boxhasoffsetfalse \boxhasstrutfalse \boxisoverlaidfalse \@@localoffset\ruledlinewidth \else\ifx\localoffset\v!overlay - % \ifx\@@localframing\v!nee \boxhasframefalse \fi % test first + % \ifx\@@localframing\v!no \boxhasframefalse \fi % test first \boxhasoffsetfalse \boxhasstrutfalse \boxisoverlaidtrue @@ -777,24 +780,24 @@ \@@localoffset\localoffset \advance\@@localoffset \ruledlinewidth \fi\fi - \ifx\localwidth\v!passend + \ifx\localwidth\v!fit \ifboxhasformat \boxhaswidthtrue \!!widtha\hsize \else \boxhaswidthfalse \fi - \else\ifx\localwidth\v!vast % equals \v!ruim + \else\ifx\localwidth\v!fixed % equals \v!broad \ifboxhasformat \boxhaswidthtrue \!!widtha\hsize \else \boxhaswidthfalse \fi - \else\ifx\localwidth\v!ruim + \else\ifx\localwidth\v!broad \boxhaswidthtrue \!!widtha\hsize - \else\ifx\localwidth\v!lokaal + \else\ifx\localwidth\v!local \boxhaswidthtrue \setlocalhsize \!!widtha\localhsize @@ -802,9 +805,9 @@ \boxhaswidthtrue \!!widtha\localwidth \fi\fi\fi\fi - \ifx\localheight\v!passend + \ifx\localheight\v!fit \boxhasheightfalse % no longer: \boxhasstrutfalse - \else\ifx\localheight\v!ruim + \else\ifx\localheight\v!broad \boxhasheightfalse \else \boxhasheighttrue @@ -813,9 +816,9 @@ \ifboxhasheight % obey user set height, also downward compatible \else - \doifvaluesomething{\@@framed\c!regels} - {\ifcase\framedparameter\c!regels\else - \!!heighta\framedparameter\c!regels\lineheight + \doifvaluesomething{\@@framed\c!lines} + {\ifcase\framedparameter\c!lines\else + \!!heighta\framedparameter\c!lines\lineheight \edef\localheight{\the\!!heighta}% \boxhasheighttrue \fi}% @@ -830,11 +833,11 @@ % i.e. disable (colsetbackgroundproblemintechniek) \advance\!!widtha -2\@@localoffset \advance\!!heighta -2\@@localoffset - \ifx\localstrut\v!nee + \ifx\localstrut\v!no \boxhasstrutfalse - \else\ifx\localstrut\v!globaal + \else\ifx\localstrut\v!global \setstrut - \else\ifx\localstrut\v!lokaal + \else\ifx\localstrut\v!local \setfontstrut \fi\fi\fi \ifboxhasstrut @@ -891,22 +894,23 @@ {\ifdim\!!heighta>\zeropoint\the\!!heighta\else\zeropoint\fi}% % first alternative %\def\dowithframedbox% - % {\let\postprocessframebox\undefined %new + % {\let\postprocessframebox\relax %new % \aftergroup\stoplocalframed}% % \afterassignment\dowithframedbox % \setbox\framebox=\next} % second alternative %\dowithnextbox % {\setbox\framebox\flushnextbox - % \let\postprocessframebox\undefined %new + % \let\postprocessframebox\relax %new % \stoplocalframed} % \next} % third alternative + \@@startframedorientation \afterassignment\dodowithframebox \setbox\framebox\next} \def\dowithframebox - {\let\postprocessframebox\undefined + {% moved : \let\postprocessframebox\relax \stoplocalframed} \def\dodowithframebox @@ -935,25 +939,26 @@ %D Beware: setting \type {top} and \type {bottom} to nothing, may %D result in a frame that is larger that the given height! try: %D -%D \starttypen +%D \starttyping %D \framed %D [height=3cm,top=,bottom=,offset=overlay] %D {\strut test \shapefill \strut test} -%D \stoptypen +%D \stoptyping %D %D This is intended behaviour and not a bug! One can always set %D -%D \starttypen +%D \starttyping %D ...,bottom=\kern0pt,... -%D \stoptypen +%D \stoptyping \def\stoplocalframed {\dontshowcomposition + \@@stopframedorientation \ifboxhasformat - \ifx\localwidth\v!passend + \ifx\localwidth\v!fit \ifreshapeframebox\doreshapeframedbox\fi \boxhaswidthfalse - \else\ifx\localwidth\v!vast + \else\ifx\localwidth\v!fixed \boxhaswidthfalse \else \resetshapeframebox @@ -967,7 +972,7 @@ \ifboxhasheight \ht\framebox\!!heighta \fi - \doifvalue{\@@framed\c!leeg}\v!ja + \doifvalue{\@@framed\c!empty}\v!yes {\setbox\scratchbox\null \wd\scratchbox\wd\framebox \ht\scratchbox\ht\framebox @@ -981,37 +986,75 @@ \ifboxisoverlaid \else \dolocateframebox \fi - \ifx\postprocessframebox\undefined \else - \postprocessframebox\framebox + \ifx\postprocessframebox\relax \else + \let\next\postprocessframebox + \let\postprocessframebox\relax % prevent nesting + \next\framebox \fi - \edef\overlaylinecolor{\framedparameter\c!kaderkleur}% + \edef\overlaylinecolor{\framedparameter\c!framecolor}% \edef\overlaylinewidth{\the\ruledlinewidth}% \@@... \ifboxhasframe % real or invisible frame \doframedbox \fi - \doifvaluesomething{\@@framed\c!achtergrond}\dobackedbox - \ifx\@@locallocation\v!laag + \doifvaluesomething{\@@framed\c!background}\dobackedbox + \ifx\@@locallocation\v!low \doinlineframedbox - \else\ifx\@@locallocation\v!diepte + \else\ifx\@@locallocation\v!depth \doloweredframedbox - \else\ifx\@@locallocation\v!hangend + \else\ifx\@@locallocation\v!hanging \dohangingframedbox \fi\fi\fi \box\framebox \egroup \egroup} +% \let\@@startframedorientation\relax +% \let\@@stopframedorientation \relax + +% \framed[width=12cm,height=3cm,orientation=0]{\input ward\relax} +% \framed[width=12cm,height=3cm,orientation=90]{\input ward\relax} +% \framed[width=12cm,height=3cm,orientation=180]{\input ward\relax} +% \framed[width=12cm,height=3cm,orientation=270]{\input ward\relax} +% \framed[width=12cm,height=3cm,orientation=-90]{\input ward\relax} +% \framed[width=12cm,height=3cm,orientation=-180]{\input ward\relax} +% \framed[width=12cm,height=3cm,orientation=-270]{\input ward\relax} + +\def\@@startframedorientation + {\let\@@stopframedorientation \relax + \ifx\@@localorientation\empty\else + \ifcase\@@localorientation\else + \scratchcounter\@@localorientation + \divide\scratchcounter\plustwo + \ifodd\scratchcounter + \swapmacros\framedwidth\framedheight + \swapmacros\localwidth \localheight + \swapdimens\!!heighta \!!widtha + \def\@@stopframedorientation{\@@dostopframedorientation\plusone}% + \else + \def\@@stopframedorientation{\@@dostopframedorientation\zerocount}% + \fi + \fi + \fi} + +\def\@@dostopframedorientation#1% + {\ifcase#1\else + \swapmacros\framedwidth\framedheight + \swapmacros\localwidth \localheight + \swapdimens\!!heighta \!!widtha + \fi + \setbox\framebox\hbox{\dorotatebox\@@localorientation\hbox{\box\framebox}}} + %D The last conditional takes care of the special situation of -%D in||line \inframed[hoogte=3cm]{framed} boxes. Such boxes have +%D in||line \inframed[height=3cm]{framed} boxes. Such boxes have %D to be \inframed{aligned} with the running text. \def\doinframed[#1]% we could omit #1] but readibility ... - {\framed[\c!plaats=\v!laag,#1]} + {\framed[\c!location=\v!low,#1]} \unexpanded\def\inframed {\dosingleempty\doinframed} -%D When we set \type{\c!leeg} to \type{\v!ja}, we get +%D When we set \type{empty} to \type{yes}, we get %D ourselves a frame and/or background, but no content, so %D actually we have a sort of phantom framed box. @@ -1019,11 +1062,11 @@ %D spacing, we provide a way to specify a foregroundcolor. \def\docolorframebox - {\doifvaluesomething{\@@framed\c!voorgrondkleur} - {\doifcolorelse{\framedparameter\c!voorgrondkleur} + {\doifvaluesomething{\@@framed\c!foregroundcolor} + {\doifcolorelse{\framedparameter\c!foregroundcolor} {\setbox\framebox\hbox {\localcolortrue - \color[\framedparameter\c!voorgrondkleur]{\box\framebox}}} + \color[\framedparameter\c!foregroundcolor]{\box\framebox}}} {}}} %D \macros @@ -1032,7 +1075,7 @@ %D When Tobias asked how to frame mathematical elements in %D formulas, Taco's posted the next macro: %D -%D \starttypen +%D \starttyping %D \def\mframed#1% %D {\relax %D \ifmmode @@ -1040,13 +1083,13 @@ %D \else %D \framed{$#1$}% %D \fi} -%D \stoptypen +%D \stoptyping %D %D Because \type {\ifinner} does not (always) reports what %D one would expect, we move the test to the outer level. We %D also want to pass arguments, %D -%D \starttypen +%D \starttyping %D \def\mframed% %D {\dosingleempty\domframed} %D @@ -1061,37 +1104,13 @@ %D \else %D \inframed[#1]{$#2$}% %D \fi} -%D \stoptypen +%D \stoptyping %D %D Still better is the next alternative, if only because it %D takes care of setting the super- and subscripts styles \ifx\restoremathstyle\undefined \let\restoremathstyle\relax \fi -%\def\domframed[#1][#2]#3% -% {\begingroup -% \ifmmode -% \ifinner -% \let\mframedstyle\relax -% \else -% \let\mframedstyle\displaystyle -% \fi -% \else -% \let\mframedstyle\relax -% \fi -% #1\ifdone -% \def\normalstrut{$\mframedstyle\restoremathstyle\vphantom($}% -% \framed -% %[\c!kaderoffset=.25ex,\c!offset=\v!overlay,#2] -% [\c!kaderoffset=\@@oioffset,\c!offset=\v!overlay,#2] -% {$\mframedstyle\restoremathstyle#3$}% -% \else -% \inframed -% [#2] -% {$\mframedstyle\restoremathstyle#3$}% -% \fi -% \endgroup} - \def\domframed[#1][#2]#3% {\begingroup \ifmmode @@ -1106,7 +1125,7 @@ #1\ifdone \def\normalstrut{$\mframedstyle\vphantom($}% \framed - [\c!kaderoffset=\@@oioffset,\c!offset=\v!overlay,#2] + [\c!frameoffset=\@@oioffset,\c!offset=\v!overlay,#2] {$\mframedstyle#3$}% \else \inframed @@ -1125,42 +1144,42 @@ %D the \type {\mframed}. %D %D \startbuffer -%D \startformule +%D \startformula %D x \times \mframed{y} \times y^{z_z} %D x \times \inmframed{y} \times y^{z_z} -%D \stopformule +%D \stopformula %D \stopbuffer %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D However, we got into troubles when we want to nest sub- and %D superscripts, like in %D %D \startbuffer -%D \startformule +%D \startformula %D x \times \mframed{y} \times y^{\mframed{z}_{\mframed{z}}} -%D \stopformule +%D \stopformula %D \stopbuffer %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D Therefore, we can best use \type {\super} and \type {\suber} %D instead of \type {^} and \type {_}. Both commands take care %D of proper font switching. %D %D \startbuffer -%D \startformule +%D \startformula %D x \times \mframed{y} \times y\super{\mframed{z}\suber{\mframed{z}}} -%D \stopformule +%D \stopformula %D \stopbuffer %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D As usual, one can specify in what way the text should be %D framed. One should be aware of the fact that, inorder to @@ -1169,14 +1188,14 @@ %D instead. %D %D \startbuffer -%D \startformule -%D x \times y\super{\mframed[kaderkleur=rood]{z}\suber{z}} -%D \stopformule +%D \startformula +%D x \times y\super{\mframed[framecolor=red]{z}\suber{z}} +%D \stopformula %D \stopbuffer %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D For inline use, we also provide the \type {\inmframed} %D alternative: we want $x \times \inmframed{y}$ in inline @@ -1197,56 +1216,56 @@ %D what needs to be done by the auxiliary macros. %D %D \startbuffer -%D \framed[hoogte=1cm,offset=.5cm] {rule based learning} -%D \framed[hoogte=1cm,offset=0cm] {rule based learning} -%D \framed[hoogte=1cm,offset=geen] {rule based learning} -%D \framed[hoogte=1cm,offset=overlay]{rule based learning} +%D \framed[height=1cm,offset=.5cm] {rule based learning} +%D \framed[height=1cm,offset=0cm] {rule based learning} +%D \framed[height=1cm,offset=none] {rule based learning} +%D \framed[height=1cm,offset=overlay]{rule based learning} %D \stopbuffer %D %D \typebuffer %D -%D \startregelcorrectie -%D \hbox{\haalbuffer} -%D \stopregelcorrectie +%D \startlinecorrection +%D \hbox{\getbuffer} +%D \stoplinecorrection %D %D \startbuffer %D \framed[offset=.5cm] {rule based learning} %D \framed[offset=0cm] {rule based learning} -%D \framed[offset=geen] {rule based learning} +%D \framed[offset=none] {rule based learning} %D \framed[offset=overlay]{rule based learning} %D \stopbuffer %D %D \typebuffer %D -%D \startregelcorrectie -%D \hbox{\haalbuffer} -%D \stopregelcorrectie +%D \startlinecorrection +%D \hbox{\getbuffer} +%D \stoplinecorrection %D %D \startbuffer %D \framed[strut=nee,offset=.5cm] {rule based learning} %D \framed[strut=nee,offset=0cm] {rule based learning} -%D \framed[strut=nee,offset=geen] {rule based learning} +%D \framed[strut=nee,offset=none] {rule based learning} %D \framed[strut=nee,offset=overlay]{rule based learning} %D \stopbuffer %D %D \typebuffer %D -%D \startregelcorrectie -%D \hbox{\haalbuffer} -%D \stopregelcorrectie +%D \startlinecorrection +%D \hbox{\getbuffer} +%D \stoplinecorrection %D %D \startbuffer -%D \framed[breedte=3cm,uitlijnen=links] {rule\\based\\learning} -%D \framed[breedte=3cm,uitlijnen=midden] {rule\\based\\learning} -%D \framed[breedte=3cm,uitlijnen=rechts] {rule\\based\\learning} -%D \framed[breedte=passend,uitlijnen=midden] {rule\\based\\learning} +%D \framed[width=3cm,align=left] {rule\\based\\learning} +%D \framed[width=3cm,align=middle] {rule\\based\\learning} +%D \framed[width=3cm,align=right] {rule\\based\\learning} +%D \framed[width=fit,align=middle] {rule\\based\\learning} %D \stopbuffer %D %D \typebuffer %D -%D \startregelcorrectie -%D \hbox{\mindermeldingen\haalbuffer} -%D \stopregelcorrectie +%D \startlinecorrection +%D \hbox{\dontcomplain\getbuffer} +%D \stoplinecorrection %D %D So now we're ready for the complicated stuff. We distinguish %D between borders with straight lines and those with round @@ -1263,35 +1282,35 @@ \def\doframedbox {\setbox\framebox\vbox {\dooutlinebox\framebox - \color \framedparameter\c!kaderkleur - \offset \framedparameter\c!kaderoffset - \corner \framedparameter\c!kaderhoek - \radius \framedparameter\c!kaderstraal - \depth \framedparameter\c!kaderdiepte - \toggle \framedparameter\c!kader - \left \framedparameter\c!linkerkader - \right \framedparameter\c!rechterkader - \top \framedparameter\c!bovenkader - \bottom \framedparameter\c!onderkader\\}} + \color \framedparameter\c!framecolor + \offset \framedparameter\c!frameoffset + \corner \framedparameter\c!framecorner + \radius \framedparameter\c!frameradius + \depth \framedparameter\c!framedepth + \toggle \framedparameter\c!frame + \left \framedparameter\c!leftframe + \right \framedparameter\c!rightframe + \top \framedparameter\c!topframe + \bottom \framedparameter\c!bottomframe\\}} %D Getting the backgrounds right takes less code. Again we %D have to take care of additional offsets. \def\dobackedbox - {\doifelsevalue{\@@framed\c!achtergrondoffset}\v!kader % new - {\dodobackedbox\c!kaderoffset} - {\dodobackedbox\c!achtergrondoffset}} + {\doifelsevalue{\@@framed\c!backgroundoffset}\v!frame % new + {\dodobackedbox\c!frameoffset} + {\dodobackedbox\c!backgroundoffset}} \def\dodobackedbox#1% {\setbox\framebox\vbox {\dobackgroundbox\framebox - \background \framedparameter\c!achtergrond - \color \framedparameter\c!achtergrondkleur - \raster \framedparameter\c!achtergrondraster + \background \framedparameter\c!background + \color \framedparameter\c!backgroundcolor + \raster \framedparameter\c!backgroundscreen \offset \framedparameter{#1}% - \corner \framedparameter\c!achtergrondhoek - \radius \framedparameter\c!achtergrondstraal - \depth \framedparameter\c!achtergronddiepte + \corner \framedparameter\c!backgroundcorner + \radius \framedparameter\c!backgroundradius + \depth \framedparameter\c!backgrounddepth \component \framedparameter\c!component\\}} %D We handle left, right or middle alignment as well as fixed @@ -1394,6 +1413,7 @@ \def\doformatboxSomeFormat {\vbox to \!!heighta \bgroup + \let\postprocessframebox\relax \forgetall \oninterlineskip \hsize\!!widtha @@ -1412,6 +1432,7 @@ \def\doformatboxNoFormat {\vbox to \!!heighta \bgroup + \let\postprocessframebox\relax \forgetall \oninterlineskip \hsize\!!widtha @@ -1430,6 +1451,7 @@ \def\doformatboxHeight {\vbox to \!!heighta \bgroup + \let\postprocessframebox\relax \forgetall \oninterlineskip \doframedsetups @@ -1446,6 +1468,7 @@ \def\doformatboxWidth {\vbox \bgroup + \let\postprocessframebox\relax \forgetall \oninterlineskip \hsize\!!widtha @@ -1463,6 +1486,7 @@ \def\doformatboxVSize {\vbox to \!!heighta \bgroup + \let\postprocessframebox\relax \forgetall \vsize\!!heighta \doframedsetups @@ -1480,6 +1504,7 @@ \def\doformatboxHSize {\hbox to \!!widtha \bgroup + \let\postprocessframebox\relax \forgetall \doframedsetups \hss @@ -1493,6 +1518,7 @@ \def\doformatboxNoSize {\hbox \bgroup + \let\postprocessframebox\relax \doframedsetups \localstrut \@@handleoneliner @@ -1502,52 +1528,52 @@ %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 -%D formatting. Watch the visualized struts. \voetnoot {Here we +%D \type {fit}, \type {broad} dimensions influence the +%D formatting. Watch the visualized struts. \footnote {Here we %D used \type {\showstruts}.} %D %D \startuitstellen %D \bgroup %D \showstruts -%D \mindermeldingen -%D \startregelcorrectie +%D \dontcomplain +%D \startlinecorrection %D \halign{#\enskip&#\enskip&#\enskip&#\enskip&#\enskip&#\cr -%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=] {a\par b\par c}\cr +%D \framed[width=.2\hsize, height=.2\hsize, align=] {a\par b\par c}& +%D \framed[width=.2\hsize, height=broad, align=] {a\par b\par c}& +%D \framed[width=.2\hsize, height=fit, align=] {a\par b\par c}& +%D \framed[width=fit, height=.2\hsize, align=] {a\par b\par c}& +%D \framed[width=fit, height=broad, align=] {a\par b\par c}& +%D \framed[width=fit, height=fit, align=] {a\par b\par c}\cr %D \noalign{\vskip1em} -%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=ja] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=ja] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=ja] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=ja] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=ja] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=ja] {a\par b\par c}\cr +%D \framed[width=.2\hsize, height=.2\hsize, align=yes] {a\par b\par c}& +%D \framed[width=.2\hsize, height=broad, align=yes] {a\par b\par c}& +%D \framed[width=.2\hsize, height=fit, align=yes] {a\par b\par c}& +%D \framed[width=fit, height=.2\hsize, align=yes] {a\par b\par c}& +%D \framed[width=fit, height=broad, align=yes] {a\par b\par c}& +%D \framed[width=fit, height=fit, align=yes] {a\par b\par c}\cr %D \noalign{\vskip1em} -%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=rechts] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=rechts] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=rechts] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=rechts] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=rechts] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=rechts] {a\par b\par c}\cr +%D \framed[width=.2\hsize, height=.2\hsize, align=right] {a\par b\par c}& +%D \framed[width=.2\hsize, height=broad, align=right] {a\par b\par c}& +%D \framed[width=.2\hsize, height=fit, align=right] {a\par b\par c}& +%D \framed[width=fit, height=.2\hsize, align=right] {a\par b\par c}& +%D \framed[width=fit, height=broad, align=right] {a\par b\par c}& +%D \framed[width=fit, height=fit, align=right] {a\par b\par c}\cr %D \noalign{\vskip1em} -%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=links] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=links] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=links] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=links] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=links] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=links] {a\par b\par c}\cr +%D \framed[width=.2\hsize, height=.2\hsize, align=left] {a\par b\par c}& +%D \framed[width=.2\hsize, height=broad, align=left] {a\par b\par c}& +%D \framed[width=.2\hsize, height=fit, align=left] {a\par b\par c}& +%D \framed[width=fit, height=.2\hsize, align=left] {a\par b\par c}& +%D \framed[width=fit, height=broad, align=left] {a\par b\par c}& +%D \framed[width=fit, height=fit, align=left] {a\par b\par c}\cr %D \noalign{\vskip1em} -%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=midden] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=midden] {a\par b\par c}& -%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=midden] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=midden] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=midden] {a\par b\par c}& -%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=midden] {a\par b\par c}\cr} -%D \stopregelcorrectie -%D \blanko[2*groot] +%D \framed[width=.2\hsize, height=.2\hsize, align=middle] {a\par b\par c}& +%D \framed[width=.2\hsize, height=broad, align=middle] {a\par b\par c}& +%D \framed[width=.2\hsize, height=fit, align=middle] {a\par b\par c}& +%D \framed[width=fit, height=.2\hsize, align=middle] {a\par b\par c}& +%D \framed[width=fit, height=broad, align=middle] {a\par b\par c}& +%D \framed[width=fit, height=fit, align=middle] {a\par b\par c}\cr} +%D \stoplinecorrection +%D \blank[2*groot] %D \egroup %D \stopuitstellen @@ -1555,7 +1581,7 @@ %D {framednoflines, framedlastlength} %D %D It is possible to let the frame macro calculate the width -%D of a centered box automatically (\type{\v!passend}). When +%D of a centered box automatically (\type {fit}). When %D doing so, we need to reshape the box: \newcount\framednoflines @@ -1619,47 +1645,47 @@ %D \startuitstellen %D \bgroup %D \unprotect -%D \mindermeldingen +%D \dontcomplain %D %D \startbuffer %D \vbox to \vsize %D \bgroup -%D \startuitlijnen[midden] +%D \startalignment[middle] %D \vss %D \leavevmode\vbox to .8\vsize %D \bgroup %D \hsize=300pt %D \setupframed -%D [\c!achtergrond=\v!kleur, -%D \c!achtergrondkleur=donkerrood, -%D \c!breedte=300pt, -%D \c!hoogte=60pt, -%D \c!kaderkleur=DemoBlue, -%D \c!lijndikte=2pt] +%D [background=color, +%D backgroundcolorachtergrondkleur=darkred, +%D width=300pt, +%D height=60pt, +%D framecolorkaderkleur=DemoBlue, +%D rulethickness=2pt] %D \def\status% -%D {\c!achtergrondoffset=\@@olachtergrondoffset\\ -%D \c!kaderoffset=\@@olkaderoffset\\ -%D \c!diepte=\@@oldiepte} -%D \leavevmode \ruledhbox{\framed[achtergrondoffset=0pt,kaderoffset=0pt]{\status}} +%D {backgroundoffset=\framedparameter\c!backgroundoffset\\ +%D frameoffset=\framedparameter\c!frameoffset\\ +%D depth=\framedparameter\c!depth} +%D \leavevmode \ruledhbox{\framed[backgroundoffset=0pt,frameoffset=0pt]{\status}} %D \vss -%D \leavevmode \ruledhbox{\framed[achtergrondoffset=5pt,kaderoffset=0pt]{\status}} +%D \leavevmode \ruledhbox{\framed[backgroundoffset=5pt,frameoffset=0pt]{\status}} %D \vss -%D \leavevmode \ruledhbox{\framed[achtergrondoffset=0pt,kaderoffset=5pt]{\status}} +%D \leavevmode \ruledhbox{\framed[backgroundoffset=0pt,frameoffset=5pt]{\status}} %D \vss -%D \leavevmode \ruledhbox{\framed[achtergrondoffset=2pt,kaderoffset=5pt]{\status}} +%D \leavevmode \ruledhbox{\framed[backgroundoffset=2pt,frameoffset=5pt]{\status}} %D \vss -%D \leavevmode \ruledhbox{\framed[achtergrondoffset=5pt,kaderoffset=2pt]{\status}} +%D \leavevmode \ruledhbox{\framed[backgroundoffset=5pt,frameoffset=2pt]{\status}} %D \vss -%D \leavevmode \ruledhbox{\framed[achtergrondoffset=5pt,kaderoffset=5pt]{\status}} +%D \leavevmode \ruledhbox{\framed[backgroundoffset=5pt,frameoffset=5pt]{\status}} %D \egroup %D \vss -%D \stopuitlijnen +%D \stopalignment %D \egroup %D \stopbuffer %D -%D \haalbuffer \pagina +%D \getbuffer \page %D -%D {\setupframed[diepte=4pt]\haalbuffer} \pagina +%D {\setupframed[depth=4pt]\getbuffer} \page %D %D \protect %D \egroup @@ -1692,11 +1718,11 @@ %D Hanging the content is mainly meant for cases like the %D following: %D -%D \starttypen +%D \starttyping %D \framed[strut=no] %D {\framed[height=2cm,location=hanging]{test}% %D \framed[height=1cm,location=hanging]{test}} -%D \stoptypen +%D \stoptyping \def\dohangingframedbox % best with strut=no {\getboxheight\scratchdimen\of\box\framebox @@ -1708,16 +1734,16 @@ %D need a different treatment. %D %D \startbuffer -%D \framed[breedte=4cm] {alfa\hairline beta\hairline gamma} -%D \framed[hoogte=2cm] {alfa\hairline beta\hairline gamma} -%D \framed[breedte=4cm,hoogte=2cm]{alfa\hairline beta\hairline gamma} +%D \framed[width=4cm] {alfa\hairline beta\hairline gamma} +%D \framed[height=2cm] {alfa\hairline beta\hairline gamma} +%D \framed[width=4cm,height=2cm]{alfa\hairline beta\hairline gamma} %D \stopbuffer %D %D \typebuffer %D -%D \startregelcorrectie -%D \hbox{\haalbuffer} -%D \stopregelcorrectie +%D \startlinecorrection +%D \hbox{\getbuffer} +%D \stoplinecorrection %D %D These macros try to adapt their behaviour as good as %D possible to the circumstances and act as natural as @@ -1785,43 +1811,43 @@ {\unskip\normalspace\ignorespaces} %D We can set each rule on or off. The default setting is -%D inherited from \type{\c!kader}. An earlier implementation +%D inherited from \type{frame}. An earlier implementation %D use a bit different approach, but the new one seems more %D natural: %D %D \bgroup -%D \steltypenin[marge=0pt] -%D \startregelcorrectie +%D \setuptyping[margin=0pt] +%D \startlinecorrection %D \startbuffer -%D \omlijnd[offset=overlay,kader=aan] {\donkerrood\blokje} +%D \framed[offset=overlay,frame=on] {\donkerrood\blackrule} %D \stopbuffer -%D \hbox{\haalbuffer\vbox{\typebuffer}} +%D \hbox{\getbuffer\vbox{\typebuffer}} %D %D \startbuffer -%D \omlijnd[offset=overlay,kader=aan,onderkader=uit]{\donkerrood\blokje} +%D \framed[offset=overlay,frame=on,bottomframe=off]{\donkerrood\blackrule} %D \stopbuffer -%D \hbox{\haalbuffer\vbox{\typebuffer}} +%D \hbox{\getbuffer\vbox{\typebuffer}} %D %D \startbuffer -%D \omlijnd[offset=overlay,kader=aan,onderkader=aan]{\donkerrood\blokje} +%D \framed[offset=overlay,frame=on,bottomframe=on]{\donkerrood\blackrule} %D \stopbuffer -%D \hbox{\haalbuffer\vbox{\typebuffer}} +%D \hbox{\getbuffer\vbox{\typebuffer}} %D %D \startbuffer -%D \omlijnd[offset=overlay,kader=uit] {\donkerrood\blokje} +%D \framed[offset=overlay,frame=off] {\donkerrood\blackrule} %D \stopbuffer -%D \hbox{\haalbuffer\vbox{\typebuffer}} +%D \hbox{\getbuffer\vbox{\typebuffer}} %D %D \startbuffer -%D \omlijnd[offset=overlay,kader=uit,onderkader=uit]{\donkerrood\blokje} +%D \framed[offset=overlay,frame=off,bottomframe=off]{\donkerrood\blackrule} %D \stopbuffer -%D \hbox{\haalbuffer\vbox{\typebuffer}} +%D \hbox{\getbuffer\vbox{\typebuffer}} %D %D \startbuffer -%D \omlijnd[offset=overlay,kader=uit,onderkader=aan]{\donkerrood\blokje} +%D \framed[offset=overlay,frame=off,bottomframe=on]{\donkerrood\blackrule} %D \stopbuffer -%D \hbox{\haalbuffer\vbox{\typebuffer}} -%D \stopregelcorrectie +%D \hbox{\getbuffer\vbox{\typebuffer}} +%D \stoplinecorrection %D \egroup %D \macros @@ -1844,7 +1870,7 @@ %D %D The simple command draws only one rule. Its optional %D argument can be used to specify the dimensions. By setting -%D the width, height or depth to \type{\v!max}, one gets the +%D the width, height or depth to \type {max}, one gets the %D natural dimensions. %D %D \showsetup{\y!blackrule} @@ -1853,14 +1879,14 @@ {\hbox\bgroup \getparameters[\??bj][#1]% \setstrut - \doif\@@bjbreedte\v!max{\def\@@bjbreedte{1em}}% - \doif\@@bjhoogte \v!max{\def\@@bjhoogte{\strutht}}% - \doif\@@bjdiepte \v!max{\def\@@bjdiepte{\strutdp}}% - \localstartcolor[\@@bjkleur]% + \doif\@@bjwidth\v!max{\def\@@bjwidth{1em}}% + \doif\@@bjheight \v!max{\def\@@bjheight{\strutht}}% + \doif\@@bjdepth \v!max{\def\@@bjdepth{\strutdp}}% + \localstartcolor[\@@bjcolor]% \vrule - \!!width \@@bjbreedte - \!!height\@@bjhoogte - \!!depth \@@bjdiepte + \!!width \@@bjwidth + \!!height\@@bjheight + \!!depth \@@bjdepth \localstopcolor \egroup} @@ -1878,8 +1904,8 @@ %D The two alternative calls are therefore: %D %D \startbuffer -%D Tell me, is this according to the \blokjes[n=6]? -%D These \blokjes[variant=b,n=10,afstand=.2em,breedte=4cm] are quite clear. +%D Tell me, is this according to the \blackrules[n=6]? +%D These \blackrules[alternativevariant=b,n=10,distance=.2em,width=4cm] are quite clear. %D \stopbuffer %D %D \typebuffer @@ -1887,9 +1913,9 @@ %D or: %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D We could of course have implemented this macro using @@ -1899,9 +1925,9 @@ \def\doblackrules[#1]% {\hbox\bgroup \getparameters[\??bj][#1]% - \!!widtha\@@bjbreedte - \!!widthb\@@bjafstand - \doif\@@bjvariant\c!b + \!!widtha\@@bjwidth + \!!widthb\@@bjdistance + \doif\@@bjalternative\c!b {\scratchcounter\@@bjn \ifnum\scratchcounter=\plusone \!!widthb\zeropoint @@ -1910,18 +1936,18 @@ \advance\!!widtha -\scratchcounter\!!widthb \divide \!!widtha \@@bjn \fi}% - \localstartcolor[\@@bjkleur]% + \localstartcolor[\@@bjcolor]% \dorecurse\@@bjn {\vrule \!!width \!!widtha - \!!height\@@bjhoogte - \!!depth \@@bjdiepte + \!!height\@@bjheight + \!!depth \@@bjdepth \hskip\!!widthb}% \unskip \localstopcolor \egroup} -\unexpanded\def\blackrules% +\unexpanded\def\blackrules {\dosingleempty\doblackrules} %D The next commands can be used to draw margin rules. We @@ -1931,13 +1957,13 @@ %D put text in the margin. \def\dodrawmarginrule - {\setbox0\hbox - {\vrule\!!depth\strutdepth\!!height\strutheight\!!width\@@kalijndikte}% - \smashbox0 % no \vsmash !!! - \box0} + {\setbox\scratchbox\hbox + {\vrule\!!depth\strutdepth\!!height\strutheight\!!width\@@karulethickness}% + \smashbox\scratchbox % no \vsmash !!! + \box\scratchbox} \def\drawmarginrule - {\strut\inlinker{\dodrawmarginrule}} + {\strut\inleft{\dodrawmarginrule}} %D \macros %D {marginrule} @@ -1954,7 +1980,7 @@ \processwords} \def\complexmarginrule[#1]% - {\ifnum#1<\@@kaniveau\relax \else + {\ifnum#1<\@@kalevel\relax \else \def\@@kadefaultwidth{#1}% \expandafter\simplemarginrule \fi} @@ -1994,7 +2020,7 @@ \def\complexstartmarginrule[#1]% {\bgroup \let\drawmarginrule\relax - \ifnum#1<\@@kaniveau\relax + \ifnum#1<\@@kalevel\relax \let\stopmarginrule\egroup \else \def\@@kadefaultwidth{#1}% @@ -2010,30 +2036,30 @@ \egroup} %D \startbuffer -%D \stelkantlijnin[niveau=5] +%D \setupmarginrules[level=5] %D -%D \startkantlijn[1] +%D \startmarginrule[1] %D First we set the level at~5. Next we typeset this first %D paragraph as a level~1 one. As expected no rule show up. -%D \stopkantlijn +%D \stopmarginrule %D -%D \startkantlijn[5] +%D \startmarginrule[5] %D The second paragraph is a level~5 one. As we can see here, %D the marginal rule gets a width according to its level. -%D \stopkantlijn +%D \stopmarginrule %D -%D \startkantlijn[8] +%D \startmarginrule[8] %D It will of course be no surprise that this third paragraph %D has a even thicker margin rule. This behavior can be %D overruled by specifying the width explictly. -%D \stopkantlijn +%D \stopmarginrule %D \stopbuffer %D %D In next example we show most features. Watch the rule %D thickness adapting itself to the level. %D %D \startvoorbeeld -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D We just said: @@ -2106,7 +2132,7 @@ %D becomes %D %D \startvoorbeeld -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D So we've got @@ -2124,47 +2150,12 @@ %D %D which looks like: \thinrules[n=2] -% \def\thinrule% -% {\strut -% \leaders -% \hrule\!!height.5\linewidth\!!depth.5\linewidth -% \hfill -% \strut} - -% \def\thinrule% -% {\strut -% \bgroup -% \startcolor[\@@dlkleur]% -% \doif{\@@dlhoogte}{\v!max}{\def\@@dlhoogte{1}}% -% \doif{\@@dldiepte}{\v!max}{\def\@@dldiepte{1}}% -% \freezedimensionwithunit\@@dlhoogte{\strutht}% -% \freezedimensionwithunit\@@dldiepte{\strutdp}% -% \leaders -% \hrule\!!height\@@dlhoogte\!!depth\@@dldiepte -% \hfill -% \stopcolor -% \donefalse -% \processaction -% [\@@dlvariant] -% [\v!a=>, -% \v!b=>\dimen0=.5\linewidth\dimen2=\dimen0\donetrue, -% \v!c=>\dimen2=\@@dldiepte\dimen0=-\dimen2\donetrue -% \advance\dimen0\linewidth]% -% \ifdone -% \hfillneg -% \leaders -% \hrule\!!height\dimen0\!!depth\dimen2 -% \hfill -% \fi -% \egroup -% \strut} - \def\thinrule {\strut \bgroup \chardef\ruletype\plusone \processaction - [\@@dlvariant] + [\@@dlalternative] [ \v!a=>\chardef\ruletype0,% no line %\v!b=>\chardef\ruletype1,% height/depth \v!c=>\chardef\ruletype2,% topheight/botdepth @@ -2172,27 +2163,27 @@ 0=>\chardef\ruletype0,% compatible with backgrounds % 1=>\chardef\ruletype1,% compatible with backgrounds 2=>\chardef\ruletype2]% compatible with backgrounds - \doifsomething\@@dllijndikte - {\linewidth\@@dllijndikte}% + \doifsomething\@@dlrulethickness + {\linewidth\@@dlrulethickness}% \ifdim\linewidth=\zeropoint \chardef\ruletype\zerocount \else - \doifnot\@@dlkader\v!aan{\chardef\ruletype=0\relax}% + \doifnot\@@dlframe\v!on{\chardef\ruletype=0\relax}% \fi \ifnum\ruletype=\plusone - \doif\@@dlhoogte\v!max{\let\@@dlhoogte\!!plusone}% - \doif\@@dldiepte\v!max{\let\@@dldiepte\!!plusone}% + \doif\@@dlheight\v!max{\let\@@dlheight\!!plusone}% + \doif\@@dldepth\v!max{\let\@@dldepth\!!plusone}% \else - \let\@@dlhoogte\!!plusone - \let\@@dldiepte\!!plusone + \let\@@dlheight\!!plusone + \let\@@dldepth\!!plusone \fi - \freezedimensionwithunit\@@dlhoogte\strutht - \freezedimensionwithunit\@@dldiepte\strutdp + \freezedimensionwithunit\@@dlheight\strutht + \freezedimensionwithunit\@@dldepth\strutdp \divide\linewidth 2 - \doifelse\@@dlachtergrond\v!kleur - {\startcolor[\@@dlachtergrondkleur]% - \dimen0=\@@dlhoogte - \dimen2=\@@dldiepte + \doifelse\@@dlbackground\v!color + {\startcolor[\@@dlbackgroundcolor]% + \dimen0=\@@dlheight + \dimen2=\@@dldepth \ifnum\ruletype=2 % prevent overshoot due to rounding \advance\dimen0 -.5\linewidth \advance\dimen2 -.5\linewidth @@ -2202,21 +2193,21 @@ \ifcase\ruletype % no rule \or - \startcolor[\@@dlkleur]% + \startcolor[\@@dlcolor]% \hfillneg \leaders\hrule\!!height\linewidth\!!depth\linewidth\hfill \stopcolor \or - \startcolor[\@@dlkleur]% - \dimen2=\@@dldiepte\dimen0=-\dimen2 \advance\dimen0 \linewidth + \startcolor[\@@dlcolor]% + \dimen2=\@@dldepth\dimen0=-\dimen2 \advance\dimen0 \linewidth \hfillneg\leaders\hrule\!!height\dimen0\!!depth\dimen2\hfill - \dimen2=\@@dlhoogte\dimen0=-\dimen2 \advance\dimen0 \linewidth + \dimen2=\@@dlheight\dimen0=-\dimen2 \advance\dimen0 \linewidth \hfillneg\leaders\hrule\!!height\dimen2\!!depth\dimen0\hfill \stopcolor \fi} {\ifcase\ruletype \else - \startcolor[\@@dlkleur]% - \leaders\hrule\!!height\@@dlhoogte\!!depth\@@dldiepte\hfill + \startcolor[\@@dlcolor]% + \leaders\hrule\!!height\@@dlheight\!!depth\@@dldepth\hfill \stopcolor \fi}% \strut @@ -2233,82 +2224,51 @@ \def\setupthinrules {\dosingleargument\dosetupthinrules} -% \def\dothinrules[#1]% -% {\bgroup -% \dosetupthinrules[#1]% -% \@@dlvoor -% \assignvalue{\@@dlinterlinie}{\@@dlinterlinie}{1.0}{1.5}{2.0}% -% \spacing\@@dlinterlinie -% \dorecurse -% {\@@dln} -% {\ifnum\recurselevel=\@@dln \dothinrulesnobreak \else -% \ifnum\recurselevel=2 \dothinrulesnobreak \fi\fi -% \thinrule -% \ifnum\recurselevel<\@@dln \endgraf \fi}% -% \@@dlna -% \egroup} - -% \def\dothinrules[#1]% -% {\bgroup -% \dosetupthinrules[#1]% -% \@@dlvoor -% \assignvalue{\@@dlinterlinie}{\@@dlinterlinie}{1.0}{1.5}{2.0}% -% \spacing\@@dlinterlinie -% \dorecurse -% {\@@dln} -% {\ifnum\recurselevel=\@@dln \dothinrulesnobreak \else -% \ifnum\recurselevel=2 \dothinrulesnobreak \fi\fi -% \thinrule -% %\ifnum\recurselevel<\@@dln \endgraf \fi}% -% \ifnum\recurselevel<\@@dln \endgraf \geenwitruimte \@@dltussen \fi}% -% \@@dlna -% \egroup} - \def\dothinrules[#1]% {\bgroup \dosetupthinrules[#1]% - \@@dlvoor - \assignvalue\@@dlinterlinie\@@dlinterlinie{1.0}{1.5}{2.0}% - \spacing\@@dlinterlinie + \@@dlbefore + \assignvalue\@@dlinterlinespace\@@dlinterlinespace{1.0}{1.5}{2.0}% + \spacing\@@dlinterlinespace \dorecurse\@@dln {\ifnum\recurselevel=\@@dln \dothinrulesnobreak \else \ifnum\recurselevel=2 \dothinrulesnobreak \fi\fi \thinrule \ifnum\recurselevel<\@@dln\relax % test needed, else messed up whitespace - \ifx\@@dltussen\empty + \ifx\@@dlinbetween\empty \softbreak \else \endgraf - \geenwitruimte - \@@dltussen + \nowhitespace + \@@dlinbetween \fi \fi}% - \doifelsenothing\@@dlna + \doifelsenothing\@@dlafter {\carryoverpar\egroup} - {\@@dlna\egroup}} + {\@@dlafter\egroup}} -\def\thinrules% +\def\thinrules {\dosingleempty\dothinrules} %D A couple of examples are given below. %D %D \startbuffer -%D \steldunnelijnenin[n=3,tussen=,kleur=grijs] +%D \setupthinrules[n=3,inbetween=,color=gray] %D -%D test test \dunnelijnen\ test test \par -%D test test \dunnelijnen [kleur=groen] test test \par -%D test test \dunnelijnen [hoogte=max, diepte=max] test test \par +%D test test \thinrules\ test test \par +%D test test \thinrules [color=green] test test \par +%D test test \thinrules [height=max, depth=max] test test \par %D -%D \steldunnelijnenin[hoogte=.9,diepte=.9] +%D \setupthinrules[height=.9,depth=.9] %D -%D test test \dunnelijnen\ test test \par -%D test test \dunnelijnen [variant=b] test test \par -%D test test \dunnelijnen [variant=c] test test \par -%D test test \dunnelijnen [variant=c,tussen=\vskip2ex] test test \par +%D test test \thinrules\ test test \par +%D test test \thinrules [alternativevariant=b] test test \par +%D test test \thinrules [alternativevariant=c] test test \par +%D test test \thinrules [alternativevariant=c,inbetween=\vskip2ex] test test \par %D \stopbuffer %D -%D \typebuffer {\haalbuffer} +%D \typebuffer {\getbuffer} %D %D There are a couple of alternative ways to visualize rules %D using backgrounds. At first sight these may look strange, @@ -2317,40 +2277,40 @@ %D advanced \METAPOST\ based implementation. %D %D \startbuffer[a] -%D \steldunnelijnenin +%D \setupthinrules %D [n=2, -%D achtergrondkleur=grijs, -%D lijndikte=1pt, -%D kleur=donkerblauw, -%D na=\blanko, -%D voor=\blanko] +%D backgroundcolor=gray , +%D rulethickness=1pt, +%D colorkleur=donkerblauw, +%D after=\blank, +%D before=\blank] %D \stopbuffer %D %D \typebuffer[a] %D %D \startbuffer[b] -%D \dunnelijnen[variant=a] -%D \dunnelijnen[variant=b] -%D \dunnelijnen[variant=c] +%D \thinrules[alternativevariant=a] +%D \thinrules[alternativevariant=b] +%D \thinrules[alternativevariant=c] %D \stopbuffer %D -%D \typebuffer[b] \haalbuffer[a,b] +%D \typebuffer[b] \getbuffer[a,b] %D %D \startbuffer[b] -%D \dunnelijnen[variant=a,achtergrond=kleur] -%D \dunnelijnen[variant=b,achtergrond=kleur] -%D \dunnelijnen[variant=c,achtergrond=kleur] +%D \thinrules[alternativevariant=a,background=color] +%D \thinrules[alternativevariant=b,background=color] +%D \thinrules[alternativevariant=c,background=color] %D \stopbuffer %D -%D \typebuffer[b] \haalbuffer[a,b] +%D \typebuffer[b] \getbuffer[a,b] %D %D \startbuffer[b] -%D \dunnelijnen[variant=a,hoogte=.8,diepte=.8,achtergrond=kleur] -%D \dunnelijnen[variant=b,hoogte=.8,diepte=.8,achtergrond=kleur] -%D \dunnelijnen[variant=c,hoogte=.8,diepte=.8,achtergrond=kleur] +%D \thinrules[alternativevariant=a,height=.8,depth=.8,background=color] +%D \thinrules[alternativevariant=b,height=.8,depth=.8,background=color] +%D \thinrules[alternativevariant=c,height=.8,depth=.8,background=color] %D \stopbuffer %D -%D \typebuffer[b] \haalbuffer[a,b] +%D \typebuffer[b] \getbuffer[a,b] %D \macros %D {optimizethinrules} @@ -2372,25 +2332,25 @@ %D we have in mind. %D %D \startbuffer[framed-0] -%D \stelkadertekstenin -%D [kader=uit, -%D breedte=\hsize, -%D achtergrond=raster] +%D \setupframedtexts +%D [frame=off, +%D width=\hsize, +%D background=screen] %D %D \startkadertekst %D By default the framed text is centered \dots %D \stopkadertekst %D -%D \startkadertekst[rechts] +%D \startkadertekst[right] %D \dots\ but we can also align left, middle and right. %D \stopkadertekst %D \stopbuffer %D %D \startbuffer[framed-1] -%D \definieerkadertekst +%D \defineframedtext %D [Example] -%D [breedte=6cm, -%D hoogte=5cm] +%D [width=6cm, +%D height=5cm] %D %D \startExample %D \typebuffer[framed-1] @@ -2398,9 +2358,9 @@ %D \stopbuffer %D %D \startbuffer[framed-2] -%D \definieerkadertekst +%D \defineframedtext %D [Example] -%D [breedte=6cm] +%D [width=6cm] %D %D \startExample %D \typebuffer[framed-2] @@ -2408,9 +2368,9 @@ %D \stopbuffer %D %D \startbuffer[framed-3] -%D \definieerkadertekst +%D \defineframedtext %D [Example] -%D [hoogte=5cm] +%D [height=5cm] %D %D \startExample %D \typebuffer[framed-3] @@ -2418,18 +2378,18 @@ %D \stopbuffer %D %D \startbuffer[framed-4] -%D \definieerkadertekst +%D \defineframedtext %D [Example] -%D [breedte=passend,hoogte=ruim] +%D [width=fit,height=broad] %D %D \Example{a very exciting example} %D \stopbuffer %D -%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-0] \egroup -%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-1] \egroup -%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-2] \egroup -%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-3] \egroup -%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-4] \egroup +%D \bgroup \setuptyping[margin=0pt] \getbuffer[framed-0] \egroup +%D \bgroup \setuptyping[margin=0pt] \getbuffer[framed-1] \egroup +%D \bgroup \setuptyping[margin=0pt] \getbuffer[framed-2] \egroup +%D \bgroup \setuptyping[margin=0pt] \getbuffer[framed-3] \egroup +%D \bgroup \setuptyping[margin=0pt] \getbuffer[framed-4] \egroup %D %D Here we can see that we have a predefined framed text class %D as well as the tools for defining our own. So we have: @@ -2450,35 +2410,36 @@ \def\dodefineframedtext[#1][#2]% {\presetlocalframed[\??kd#1]% \getparameters[\??kd#1] - [\c!breedte=0.75\hsize, - \c!hoogte=\v!passend, - \c!uitlijnen=\v!ja, - \c!boven=, - \c!onder=\vfill, + [\c!width=0.75\hsize, + \c!height=\v!fit, + \c!align=\v!yes, + \c!top=, + \c!bottom=\vfill, \c!offset=1em, - \c!korps=, - \c!letter=, - \c!kleur=, - \c!links=, - \c!rechts=\hfill, - \c!voor=\blanko, - \c!na=\blanko, - \c!binnen=, - \c!kader=\v!aan, - \c!bovenkader=, - \c!onderkader=, - \c!linkerkader=, - \c!rechterkader=, - \c!straal=.5\bodyfontsize, - \c!hoek=\v!recht, - \c!voorgrondkleur=, - \c!voorgrondletter=, - \c!achtergrond=, - \c!achtergrondkleur=, - \c!achtergrondraster=\@@rsraster, - \c!regelcorrectie=\v!aan, - \c!dieptecorrectie=\v!aan, - \c!marge=\v!standaard, + \c!bodyfont=, + \c!style=, + \c!color=, + \c!left=, + \c!right=\hfill, + \c!before=\blank, + \c!after=\blank, + \c!inner=, + \c!frame=\v!on, + \c!topframe=, + \c!bottomframe=, + \c!leftframe=, + \c!rightframe=, + \c!radius=.5\bodyfontsize, + \c!corner=\v!rectangular, + \c!foregroundcolor=, + \c!foregroundstyle=, + \c!background=, + \c!backgroundcolor=, + \c!backgroundscreen=\@@rsscreen, + \c!linecorrection=\v!on, + \c!depthcorrection=\v!on, + \c!margin=\v!standard, + \c!orientation=, #2]% \setvalue{\e!start#1}{\dostartframedtext[#1]}% \setvalue{\e!stop #1}{\dostopframedtext }% @@ -2526,24 +2487,23 @@ % \setlocalhsize % can have framed texts alongside sidefloats \checksidefloat \setlocalhsize - \advance\localhsize-\hangindent \else \localhsize\hsize \fi\fi} \def\dododostartframedtext[#1][#2][#3]% - {\doifsomething{#2}{\setvalue{\??kd#1\c!plaats}{#2}}% - \processaction % \v!laag en \v!diepte are already taken ! - [\getvalue{\??kd#1\c!plaats}] - [ \v!links=>\letvalue{\??kd#1\c!links }\relax - \letvalue{\??kd#1\c!rechts}\hfill, - \v!rechts=>\letvalue{\??kd#1\c!links }\hfill - \letvalue{\??kd#1\c!rechts}\relax, - \v!midden=>\letvalue{\??kd#1\c!links }\hfill - \letvalue{\??kd#1\c!rechts}\hfill, - \v!geen=>\letvalue{\??kd#1\c!links }\relax % new - \letvalue{\??kd#1\c!rechts}\relax]% new - \letvalue{\??kd#1\c!plaats}\empty + {\doifsomething{#2}{\setvalue{\??kd#1\c!location}{#2}}% + \processaction % \v!low en \v!depth are already taken ! + [\framedtextparameter{#1}\c!location] + [ \v!left=>\letvalue{\??kd#1\c!left }\relax + \letvalue{\??kd#1\c!right}\hfill, + \v!right=>\letvalue{\??kd#1\c!left }\hfill + \letvalue{\??kd#1\c!right}\relax, + \v!middle=>\letvalue{\??kd#1\c!left }\hfill + \letvalue{\??kd#1\c!right}\hfill, + \v!none=>\letvalue{\??kd#1\c!left }\relax % new + \letvalue{\??kd#1\c!right}\relax]% new + \letvalue{\??kd#1\c!location}\empty % removed 06/2001 % \forgetparindent % added 06/2001 [see demo-bbv] @@ -2553,18 +2513,22 @@ \startboxedcontent \hsize\localhsize % \insidefloattrue % ? better - \expanded{\switchtobodyfont[\getvalue{\??kd#1\c!korps}]}% - \startcolor[\getvalue{\??kd#1\c!kleur}]% - \localframed[\??kd#1][\c!strut=\v!nee,#3]% + \expanded{\switchtobodyfont[\framedtextparameter{#1}\c!bodyfont]}% + \startcolor[\framedtextparameter{#1}\c!color]% + \localframed[\??kd#1][\c!strut=\v!no,#3]% \bgroup \let\\=\endgraf - \getvalue{\??kd#1\c!binnen}% - \doifvalue{\??kd#1\c!dieptecorrectie}\v!aan % new, inside box + \framedtextparameter{#1}\c!inner % oud spul + \doifvalue{\??kd#1\c!depthcorrection}\v!on % new, inside box {\bgroup \verticalstrut - \vskip-\struttotal}% - \doinhibitblank % \blanko[\v!blokkeer]% plaatst signal - \doconvertfont{\getvalue{\??kd#1\c!letter}}\empty + % we need \nowhitespace in case of setups setting whitespace + % nb, not safe, text vs \vbox as next + \vskip-\struttotal + \nowhitespace % na vskip ! new 20/05/2004, fails with next content being box (\scale{..}) + }% + \doinhibitblank % \blank[\v!disable]% plaatst signal + \doconvertfont{\framedtextparameter{#1}\c!style}\empty \def\dostopframedtext{\dodostopframedtext{#1}{#2}}} %D The \type {none} option is handy for nested usage, as @@ -2574,7 +2538,7 @@ \def\dodostopframedtext#1#2% % no \baselinecorrection, see faq docs {\endgraf \removelastskip - \doifvalue{\??kd#1\c!dieptecorrectie}\v!aan % local and global + \doifvalue{\??kd#1\c!depthcorrection}\v!on % local and global {\forgetall \vskip-\struttotal \verticalstrut @@ -2588,11 +2552,11 @@ \stopboxedcontent \stopcolor \egroup - \doif{#2}\v!geen\insidefloattrue % new + \doif{#2}\v!none\insidefloattrue % new \ifinsidefloat \box\framebox \else - \doplacement[\??kd#1][\c!dieptecorrectie=\v!uit]{\box\framebox}% + \doplacement[\??kd#1][\c!depthcorrection=\v!off]{\box\framebox}% \fi \egroup} @@ -2603,13 +2567,13 @@ {\bgroup\dodoubleempty\dodoframedtext} \def\dodoframedtext[#1][#2]% beware! - {\expanded{\switchtobodyfont[\getvalue{\??kd#1\c!korps}]}% - \localframed[\??kd#1][\c!strut=\v!nee,#2]% + {\expanded{\switchtobodyfont[\getvalue{\??kd#1\c!bodyfont}]}% + \localframed[\??kd#1][\c!strut=\v!no,#2]% \bgroup - \blanko[\v!blokkeer]% + \blank[\v!disable]% \let\\=\endgraf - \getvalue{\??kd#1\c!binnen}% % kleur naar outer level - \dostartattributes{\??kd#1}\c!letter\c!kleur\empty + \getvalue{\??kd#1\c!inner}% % kleur naar outer level + \dostartattributes{\??kd#1}\c!style\c!color\empty \bgroup \aftergroup\docloseframedtext \let\next=} @@ -2643,39 +2607,39 @@ %D %D Putting rules before and after a paragraph is very space %D sensitive, but the next command handles that quite well. It -%D comes in to disguises: +%D comes in two disguises: %D %D \startbuffer -%D \textrule[boven]{fragments} +%D \textrule[top]{fragments} %D \input reich %D \textrule %D \stopbuffer %D -%D \bgroup \typebuffer \haalbuffer \egroup +%D \bgroup \typebuffer \getbuffer \egroup %D %D \startbuffer %D \setuptextrules -%D [breedte=90pt,afstand=12pt,lijnkleur=blauw, -%D korps=klein,letter=\sc,kleur=rood] +%D [width=90pt,distance=12pt,rulecolor=blue, +%D bodyfont=small,style=\sc,color=red] %D %D \starttextrule{Ship Building Tools} -%D \nl \steltolerantiein[soepel] \input materie +%D \nl \setuptolerance[tolerant] \input materie %D \stoptextrule %D \stopbuffer %D -%D \bgroup \typebuffer \haalbuffer \egroup +%D \bgroup \typebuffer \getbuffer \egroup %D %D \startbuffer %D \setuptextrules -%D [plaats=inmarge, -%D korps=klein,letter=schuinvet] +%D [location=inmargin, +%D bodyfont=small,style=slantedbold] %D %D \starttextrule{wonderful} %D \input tufte %D \stoptextrule %D \stopbuffer %D -%D \bgroup \typebuffer \haalbuffer \egroup +%D \bgroup \typebuffer \getbuffer \egroup %D %D The formal definition of these commands is: %D @@ -2692,8 +2656,8 @@ \def\complextextrule[#1]% {\processaction [#1] - [ \v!boven=>\let\next\dotoptextrule, - \v!onder=>\let\next\dobottomtextrule, + [ \v!top=>\let\next\dotoptextrule, + \v!bottom=>\let\next\dobottomtextrule, \s!default=>\let\next\dobottomtextrule, \s!unknown=>\let\next\dobottomtextrule]% \dosinglegroupempty\next} @@ -2712,17 +2676,17 @@ \dimen6=-.5ex \advance\dimen4 .5\linewidth \advance\dimen6 .5\linewidth - \dimen8=\@@tlafstand + \dimen8=\@@tldistance \doifnothing{#1}\firstargumentfalse \iffirstargument - \doifelse\@@tlplaats\v!inmarge - {\llap{\doattributes\??tl\c!letter\c!kleur{#1}\hskip\linkermargeafstand}} - {\color[\@@tllijnkleur] - {\vrule\!!height\dimen4\!!depth\dimen6\!!width\@@tlbreedte}% + \doifelse\@@tllocation\v!inmargin + {\llap{\doattributes\??tl\c!style\c!color{#1}\hskip\leftmargindistance}} + {\color[\@@tlrulecolor] + {\vrule\!!height\dimen4\!!depth\dimen6\!!width\@@tlwidth}% \hbox spread 2\dimen8 - {\hss\doattributes\??tl\c!letter\c!kleur{\strut#1}\hss}}% + {\hss\doattributes\??tl\c!style\c!color{\strut#1}\hss}}% \fi - \color[\@@tllijnkleur] + \color[\@@tlrulecolor] {\leaders\hrule\!!height\dimen4\!!depth\dimen6\hfill}}% \ht\scratchbox\strutht \dp\scratchbox\strutdp @@ -2732,12 +2696,13 @@ \egroup} \def\dotoptextrule#1% - {\pagina[\v!voorkeur] % interferes - %\witruimte % no - \@@tlvoor + {\page[\v!preference] % interferes + %\whitespace % no + \@@tlbefore \docomplextextrule{#1}% - \geenwitruimte - \@@tltussen +% todo, option: \doifnothing{#1}{\ruledvskip-.5ex} + \nowhitespace + \@@tlinbetween \endgraf} \def\dodobottomtextrule#1#2% @@ -2745,41 +2710,40 @@ \endgraf \fi \dimen0\strutdp - \ifdim\prevdepth<\strutdp + \ifdim\prevdepth>\strutdp\else % was <\strutdp \ifdim\prevdepth>\zeropoint \advance\dimen0 -\prevdepth \fi \fi \advance\dimen0 .5ex \vskip\dimen0 - \@@tltussen + \@@tlinbetween \doifelsenothing{#2} {\bgroup \advance\hsize -\rightskip \advance\hsize -\leftskip \nointerlineskip \moveleft-\leftskip\vbox - {\color[\@@tllijnkleur] + {\color[\@@tlrulecolor] {\hrule\!!depth\linewidth\!!height\zeropoint\!!width\hsize}}% \egroup} {\docomplextextrule{#2}}% \ifvmode\prevdepth\zeropoint\fi #1% - \pagina[\v!voorkeur]} + \page[\v!preference]} \def\dobottomtextrule - {\dodobottomtextrule\@@tlna} + {\dodobottomtextrule\@@tlafter} \def\domiddletextrule - {\dodobottomtextrule\@@tltussen} + {\dodobottomtextrule\@@tlinbetween} \def\dounknowntextrule {\iffirstargument - \let\next\dotoptextrule + \@EA\dotoptextrule \else - \def\next{\dobottomtextrule{}}% - \fi - \next} + \@EA\dobottomtextrule\@EA\empty + \fi} %D The grouped commands also supports bodyfont switching: @@ -2788,12 +2752,12 @@ \def\dounknowntextrule{\domiddletextrule} \dotoptextrule{#1} \bgroup - \doifsomething\@@tlkorps{\switchtobodyfont[\@@tlkorps]}} + \doifsomething\@@tlbodyfont{\switchtobodyfont[\@@tlbodyfont]}} \def\stoptextrule {\par \egroup - \dobottomtextrule{}% + \dobottomtextrule\empty \egroup} %D \macros @@ -2805,10 +2769,10 @@ %D because they permit us to make questionaires. Let's start %D with some examples. %D -%D \fillinrules[n=2,breedte=passend]{first} -%D \fillinrules[n=2,breedte=ruim]{first} -%D \fillinrules[n=2,breedte=3cm]{first} -%D \fillinrules[n=2,breedte=3cm,afstand=.5em,scheider=:]{first} +%D \fillinrules[n=2,width=fit]{first} +%D \fillinrules[n=2,width=broad]{first} +%D \fillinrules[n=2,width=3cm]{first} +%D \fillinrules[n=2,width=3cm,distance=.5em,separator=:]{first} %D \fillinrules[n=2]{first}{last} %D \fillintext{first}{last} \input reich \par %D @@ -2827,37 +2791,37 @@ \def\complexfillinrules[#1]% {\def\docomplexfillinrules##1##2% {\dodocomplexfillinrules[#1]{##1}{##2}{\thinrules - [\c!n=\@@iln,\c!interlinie=\@@ilinterlinie,\c!voor=,\c!na=]}}% + [\c!n=\@@iln,\c!interlinespace=\@@ilinterlinespace,\c!before=,\c!after=]}}% \dodoublegroupempty\docomplexfillinrules} \def\dodocomplexfillinrules[#1]#2#3#4% {\endgraf - \@@ilvoor + \@@ilbefore \begingroup \setupfillinrules[#1]% \noindent - \doifelse\@@ilbreedte\v!passend - {\let\@@ilafstand\!!zeropoint + \doifelse\@@ilwidth\v!fit + {\let\@@ildistance\!!zeropoint \hbox} - {\doifelse\@@ilbreedte\v!ruim + {\doifelse\@@ilwidth\v!broad {\hbox} - {\hbox to \@@ilbreedte}} + {\hbox to \@@ilwidth}} \bgroup - \doattributes\??il\c!letter\c!kleur{\strut#2\hfill\@@ilscheider}% - \hskip\@@ilafstand + \doattributes\??il\c!style\c!color{\strut#2\hfill\@@ilseparator}% + \hskip\@@ildistance \egroup %\hangindent=\wd0\relax % tzt hang=yes,n %\parindent=\hangindent %\box0\relax - \setupwhitespace[\v!groot]% + \setupwhitespace[\v!big]% \ignorespaces #4% \doifsomething{#3} - {\kern\@@ilafstand - \doattributes\??il\c!letter\c!kleur{#3\strut}}% + {\kern\@@ildistance + \doattributes\??il\c!style\c!color{#3\strut}}% \endgroup \endgraf - \@@ilna} + \@@ilafter} %D \macros %D {fillintext} @@ -2885,11 +2849,11 @@ %D %D \startbuffer %D \fillinline \input reich \par -%D \fillinline[marge=0cm] \input reich \par +%D \fillinline[margin=0cm] \input reich \par %D \stopbuffer %D %D \startvoorbeeld -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D which was typeset by saying: @@ -2907,19 +2871,19 @@ \definecomplexorsimpleempty\fillinline \def\complexfillinline[#1]% - {%\endgraf % interferes with \doordefinieren cum suis - \@@ivvoor + {%\endgraf % interferes with \definedescription cum suis + \@@ivbefore \begingroup \setupfillinlines[#1]% - \advance\rightskip \@@ivmarge + \advance\rightskip \@@ivmargin \parfillskip\zeropoint \def\par % very dangerous {\let\par\endgraf % -) \unskip\hfill - \dimen0=\@@ivbreedte - \advance\dimen0 -\@@ivafstand - \ifdim\dimen0>\@@ivmarge\else\expandafter\rlap\fi - {\kern\@@ivafstand + \dimen0=\@@ivwidth + \advance\dimen0 -\@@ivdistance + \ifdim\dimen0>\@@ivmargin\else\expandafter\rlap\fi + {\kern\@@ivdistance \vrule \!!width \dimen0 \!!height.5\linewidth @@ -2927,27 +2891,27 @@ \endgraf % ! \endgroup \endgraf % ! - \@@ilna}} + \@@ilafter}} %D \stopdocumentation %D \bgroup %D -%D \stelkadertekstenin +%D \setupframedtexts %D [setuptext] -%D [achtergrond=kleur,achtergrondkleur=wit] +%D [background=color,backgroundcolor=white] %D %D \startbuffer -%D \stelachtergrondin -%D [achtergrondoffset=4pt, -%D achtergrond=raster, -%D kader=aan, -%D kaderkleur=rood, -%D linkeroffset=2pt] +%D \setupbackground +%D [backgroundoffset=4pt, +%D background=screen, +%D frame=on, +%D framecolor=red, +%D leftoffset=2pt] %D \stopbuffer %D -%D \haalbuffer +%D \getbuffer %D -%D \startachtergrond +%D \startbackground %D %D \macros %D {setupbackground,startbackground,background} @@ -2974,7 +2938,7 @@ \def\dosetupbackground[#1]% {\getparameters[\??ag][#1]% - \doifelse\@@agstatus\v!start + \doifelse\@@agstate\v!start {\let\startbackground\dostartbackground \let\stopbackground \dostopbackground \let\background \dobackground} @@ -3005,9 +2969,9 @@ \bgroup \setbox0\vbox\bgroup \vbox to \lineheight{}\vskip\zeropoint - \blanko[\v!blokkeer] - \advance\hsize -\@@aglinkeroffset - \advance\hsize -\@@agrechteroffset} + \blank[\v!disable] + \advance\hsize -\@@agleftoffset + \advance\hsize -\@@agrightoffset} %D This dummy line is removed by \type{\setbox2=\vsplit0 to %D \lineheight}. That way \type{\topskip} takes care of the @@ -3024,17 +2988,17 @@ \setbox2\vsplit0 to \lineheight % get rid of fake line \loop \ifdim\pagetotal=\zeropoint % empty page - \scratchdimen\teksthoogte + \scratchdimen\textheight \chardef\backgroundsplit1 % split to max height \else \scratchdimen\pagegoal - \setbox\scratchbox\vbox{\@@agvoor}% + \setbox\scratchbox\vbox{\@@agbefore}% \advance\scratchdimen -\ht\scratchbox \advance\scratchdimen -\pagetotal \chardef\backgroundsplit2 % split to partial height \fi - \advance\scratchdimen -\@@agbovenoffset - \advance\scratchdimen -\@@agonderoffset \relax + \advance\scratchdimen -\@@agtopoffset + \advance\scratchdimen -\@@agbottomoffset \relax \ifdim\scratchdimen>2\lineheight\relax % reasonable, will be configurable \ifdim\ht0>\scratchdimen % larger than page \setbox2\vsplit0 to \scratchdimen @@ -3042,32 +3006,32 @@ \setbox2\box0 \chardef\backgroundsplit0 % no split \fi - \setbox2\vbox \ifcase\backgroundsplit\or to \teksthoogte \fi % max split - {\vskip\@@agbovenoffset - \popsplitcolor + \setbox2\vbox \ifcase\backgroundsplit\or to \textheight \fi % max split + {\vskip\@@agtopoffset + \popsplitproperties \unvcopy2 \prevdepth\dp2 \obeydepth - \vskip\@@agonderoffset + \vskip\@@agbottomoffset \vfill} - \@@agvoor + \@@agbefore \ifcase\backgroundsplit\or\or % partial split \ifdim\pagegoal<\maxdimen \pagegoal=1.2\pagegoal % be a bit more tolerant \fi \fi - \startregelcorrectie + \startlinecorrection \localframed [\??ag][\c!offset=\v!overlay] - {\hskip\@@aglinkeroffset\box2\hskip\@@agrechteroffset}% - \stopregelcorrectie + {\hskip\@@agleftoffset\box2\hskip\@@agrightoffset}% + \stoplinecorrection \ifcase\backgroundsplit % no split - \@@agna + \@@agafter \else % some split - \vfill\eject % geen \pagina ! + \vfill\eject % geen \page ! \fi \else - \pagina + \page \fi \ifdim\ht0>\zeropoint \repeat \egroup @@ -3085,7 +3049,7 @@ \vbox} %D \stopdocumentation -%D \stopachtergrond +%D \stopbackground %D \egroup %D New, for the moment private; let's see when GB finds out @@ -3123,52 +3087,21 @@ %D %D \typebuffer -% test this on demo-bbv/demo-bbi ! -% -% \def\startframedcontent[#1]% -% {\bgroup -% \doifelse{#1}\v!uit -% {\let\stopframedcontent\egroup} -% {\doifdefinedelse{\??kd#1\c!kader} -% {\doifelsevalue{\??kd#1\c!regelcorrectie}\v!ja -% {\ifinsidefloat % binnen \stopframedcontent -% \def\stopframedcontent -% {\framedtextparameter{#1}\c!rechts -% \egroup -% \egroup}% -% \else -% \def\stopframedcontent -% {\framedtextparameter{#1}\c!rechts -% \egroup -% \stopbaselinecorrection -% \egroup}% -% \startbaselinecorrection -% \fi} -% {\def\stopframedcontent -% {\framedtextparameter{#1}\c!rechts -% \egroup -% \egroup}}% -% \doifvalue{\??kd#1\c!breedte}\v!passend -% {\letvalue{\??kd#1\c!breedte}\v!vast}% -% \doframedtext[#1][]\insidefloattrue -% \framedtextparameter{#1}\c!links} -% {\let\stopframedcontent\egroup}}} - \def\defineframedcontent {\dodoubleempty\dodefineframedcontent} \def\dodefineframedcontent[#1][#2]% {\presetlocalframed[\??fc#1]% \getparameters[\??fc#1] - [\c!linkeroffset=\zeropoint, - \c!rechteroffset=\getvalue{\??fc#1\c!linkeroffset}, - \c!bovenoffset=\zeropoint, - \c!onderoffset=\getvalue{\??fc#1\c!bovenoffset}, - \c!strut=\v!nee, + [\c!leftoffset=\zeropoint, + \c!rightoffset=\getvalue{\??fc#1\c!leftoffset}, + \c!topoffset=\zeropoint, + \c!bottomoffset=\getvalue{\??fc#1\c!topoffset}, + \c!strut=\v!no, \c!offset=\v!overlay, - \c!regelcorrectie=\v!nee, - \c!links=, - \c!rechts=, + \c!linecorrection=\v!no, + \c!left=, + \c!right=, #2]} \def\setupframedcontent @@ -3181,8 +3114,8 @@ \def\startframedcontent[#1]% {\bgroup \let\stopframedcontent\egroup - \doifnot{#1}\v!uit - {\doifdefined{\??fc#1\c!kader} + \doifnot{#1}\v!off + {\doifdefined{\??fc#1\c!frame} {\def\stopframedcontent{\dostopframedcontent{#1}}% \dostartframedcontent{#1}}}} @@ -3190,37 +3123,37 @@ {\setbox\framebox\hbox\bgroup \setlocalhsize \hsize\localhsize - \advance\hsize-\getvalue{\??fc#1\c!linkeroffset}% - \advance\hsize-\getvalue{\??fc#1\c!rechteroffset}% - \advance\vsize-\getvalue{\??fc#1\c!bovenoffset}% - \advance\vsize-\getvalue{\??fc#1\c!onderoffset}% - \hskip\getvalue{\??fc#1\c!linkeroffset}% + \advance\hsize-\getvalue{\??fc#1\c!leftoffset}% + \advance\hsize-\getvalue{\??fc#1\c!rightoffset}% + \advance\vsize-\getvalue{\??fc#1\c!topoffset}% + \advance\vsize-\getvalue{\??fc#1\c!bottomoffset}% + \hskip\getvalue{\??fc#1\c!leftoffset}% \vbox\bgroup - \vskip\getvalue{\??fc#1\c!bovenoffset}% + \vskip\getvalue{\??fc#1\c!topoffset}% \vbox\bgroup \forgetall - \blanko[\v!blokkeer]} + \blank[\v!disable]} \def\dostopframedcontent#1% {\removelastskip \egroup - \vskip\getvalue{\??fc#1\c!onderoffset}% + \vskip\getvalue{\??fc#1\c!bottomoffset}% \egroup - \hskip\getvalue{\??fc#1\c!rechteroffset}% + \hskip\getvalue{\??fc#1\c!rightoffset}% \egroup - \doifvalue{\??fc#1\c!breedte}\v!passend - {\letvalue{\??fc#1\c!breedte}\v!vast}% + \doifvalue{\??fc#1\c!width}\v!fit + {\letvalue{\??fc#1\c!width}\v!fixed}% \ifinsidefloat \donefalse \else - \doifelsevalue{\??fc#1\c!regelcorrectie}\v!ja\donetrue\donefalse + \doifelsevalue{\??fc#1\c!linecorrection}\v!yes\donetrue\donefalse \fi % plaats ? - \ifdone\startregelcorrectie\fi - \getvalue{\??fc#1\c!links}% new + \ifdone\startlinecorrection\fi + \getvalue{\??fc#1\c!left}% new \localframed[\??fc#1]{\box\framebox}% - \getvalue{\??fc#1\c!rechts}% new - \ifdone\stopregelcorrectie\fi + \getvalue{\??fc#1\c!right}% new + \ifdone\stoplinecorrection\fi \egroup} %D \macros @@ -3264,117 +3197,118 @@ % [\c!lijndikte=\v!middel] \setuplinewidth - [\v!middel] + [\v!medium] \setupframed - [\c!breedte=\v!passend, - \c!hoogte=\v!ruim, - \c!regels=, + [\c!width=\v!fit, + \c!height=\v!broad, + \c!lines=, \c!offset=0.25ex, % \defaultframeoffset - \c!leeg=\v!nee, - \c!kader=\v!aan, - \c!bovenkader=, - \c!onderkader=, - \c!linkerkader=, - \c!rechterkader=, - \c!straal=.5\bodyfontsize, - \c!lijndikte=\linewidth, - \c!hoek=\v!recht, - \c!diepte=\!!zeropoint, - \c!voorgrondkleur=, - \c!voorgrondletter=, - \c!achtergrond=, - \c!achtergrondraster=\@@rsraster, - \c!achtergrondkleur=, - \c!achtergrondoffset=\!!zeropoint, - \c!kaderkleur=, - \c!kaderoffset=\!!zeropoint, + \c!empty=\v!no, + \c!frame=\v!on, + \c!topframe=, + \c!bottomframe=, + \c!leftframe=, + \c!rightframe=, + \c!radius=.5\bodyfontsize, + \c!rulethickness=\linewidth, + \c!corner=\v!rectangular, + \c!depth=\!!zeropoint, + \c!foregroundcolor=, + \c!foregroundstyle=, + \c!background=, + \c!backgroundscreen=\@@rsscreen, + \c!backgroundcolor=, + \c!backgroundoffset=\!!zeropoint, + \c!framecolor=, + \c!frameoffset=\!!zeropoint, \c!component=, - \c!uitlijnen=, - \c!onder=\vss, - \c!boven=, - \c!strut=\v!ja, - \c!plaats=\v!normaal, + \c!align=, + \c!bottom=\vss, + \c!top=, + \c!strut=\v!yes, + \c!location=\v!normal, + \c!orientation=, \c!setups=] \setupscreens [\c!factor=1.0, - \c!methode=\v!extern, % \c!methode=\v!punt - \c!raster=0.95] + \c!method=\v!external, % \c!method=\v!dot + \c!screen=0.95] \setupblackrules [\c!n=3, - \c!breedte=1em, - \c!hoogte=1ex, - \c!diepte=\!!zeropoint, - \c!variant=\c!a, - \c!afstand=.25ex, - \c!kleur=] + \c!width=1em, + \c!height=1ex, + \c!depth=\!!zeropoint, + \c!alternative=\c!a, + \c!distance=.25ex, + \c!color=] \setupmarginrules - [\c!niveau=0, - \c!lijndikte=\@@kadefaultwidth\linewidth] + [\c!level=0, + \c!rulethickness=\@@kadefaultwidth\linewidth] \setupthinrules - [\c!interlinie=\v!klein, + [\c!interlinespace=\v!small, \c!n=3, - \c!voor=, - \c!tussen={\blanko[\v!wit]}, - \c!na=, - \c!kleur=, - \c!hoogte=.5\linewidth, - \c!diepte=.5\linewidth, - \c!kader=\v!aan, % compatible with textbackgrounds - \c!variant=\v!b, - \c!achtergrondkleur=, - \c!achtergrond=, - \c!lijndikte=] + \c!before=, + \c!inbetween={\blank[\v!white]}, + \c!after=, + \c!color=, + \c!height=.5\linewidth, + \c!depth=.5\linewidth, + \c!frame=\v!on, % compatible with textbackgrounds + \c!alternative=\v!b, + \c!backgroundcolor=, + \c!background=, + \c!rulethickness=] \setuptextrules - [\c!plaats=\v!links, - \c!voor=\blanko, - \c!na=\blanko, - \c!tussen=, - \c!breedte=2em, - \c!letter=\v!vet, - \c!kleur=, - \c!lijnkleur=, - \c!korps=, - \c!afstand=.5em] + [\c!location=\v!left, + \c!before=\blank, + \c!after=\blank, + \c!inbetween=, + \c!width=2em, + \c!style=\v!bold, + \c!color=, + \c!rulecolor=, + \c!bodyfont=, + \c!distance=.5em] \setupfillinrules - [\c!breedte=\v!ruim, - \c!afstand=1em, - \c!voor=\blanko, - \c!na=\blanko, + [\c!width=\v!broad, + \c!distance=1em, + \c!before=\blank, + \c!after=\blank, \c!n=1, - \c!interlinie=\v!klein, - \c!scheider=, - \c!letter=\v!normaal, - \c!kleur=] + \c!interlinespace=\v!small, + \c!separator=, + \c!style=\v!normal, + \c!color=] \setupfillinlines - [\c!breedte=3cm, - \c!marge=\@@ivbreedte, - \c!afstand=1em, - \c!voor=\blanko, - \c!na=\blanko] + [\c!width=3cm, + \c!margin=\@@ivwidth, + \c!distance=1em, + \c!before=\blank, + \c!after=\blank] \setupbackground - [\c!linkeroffset=.5\bodyfontsize, - \c!rechteroffset=\@@aglinkeroffset, - \c!bovenoffset=\!!zeropoint, - \c!onderoffset=\@@agbovenoffset, - \c!status=\v!start, - \c!straal=.5\bodyfontsize, - \c!hoek=\v!recht, - \c!kader=\v!uit, - \c!kleur=, - \c!diepte=\!!zeropoint, - \c!achtergrond=\v!raster, - \c!achtergrondkleur=\@@agkleur, - \c!raster=\@@rsraster, - \c!voor=, - \c!na=] - -\protect \endinput \ No newline at end of file + [\c!leftoffset=.5\bodyfontsize, + \c!rightoffset=\@@agleftoffset, + \c!topoffset=\!!zeropoint, + \c!bottomoffset=\@@agtopoffset, + \c!state=\v!start, + \c!radius=.5\bodyfontsize, + \c!corner=\v!rectangular, + \c!frame=\v!off, + \c!color=, + \c!depth=\!!zeropoint, + \c!background=\v!screen, + \c!backgroundcolor=\@@agcolor, + \c!screen=\@@rsscreen, + \c!before=, + \c!after=] + +\protect \endinput diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex index 8e5040e73..4d4f3248e 100644 --- a/tex/context/base/core-sec.tex +++ b/tex/context/base/core-sec.tex @@ -132,32 +132,32 @@ \def\dodochecknummer#1#2#3% will become ugly after speed up {\bgroup \doifinstringelse{.0}{.#2} - {\doifnot{#3}\v!per - {%\debuggerinfo\m!systems{number #1 #3 becomes \getnumbervariable{#1\c!wijze}}% - \setevalue{\@@thenumber{#1}\c!wijze}{#3}% geen \xdef, gaat mis met \subpage + {\doifnot{#3}\v!by + {%\debuggerinfo\m!systems{number #1 #3 becomes \getnumbervariable{#1\c!way}}% + \setevalue{\@@thenumber{#1}\c!way}{#3}% geen \xdef, gaat mis met \subpage \dochecknummer{#1}}} % tricky and ugly {\doifnotvalue{\@@thenumber{#1}\s!check}{#2} {\setcounter{\@@thenumber{#1}}{0\getvalue{\@@thenumber{#1}\c!start}}% - \setxvalue{\@@thenumber{#1}\c!wijze\c!lokaal}% - {\getvalue{\@@thenumber{#1}\c!wijze}}% + \setxvalue{\@@thenumber{#1}\c!way\c!local}% + {\getvalue{\@@thenumber{#1}\c!way}}% \setxvalue{\@@thenumber{#1}\s!check}% {#2}}}% \egroup} \def\dochecknummer#1% - {\edef\currentsection{\csname\??by\csname\@@thenumber{#1}\c!wijze\endcsname\endcsname}% + {\edef\currentsection{\csname\??by\csname\@@thenumber{#1}\c!way\endcsname\endcsname}% \ifx\currentsection\empty\else \dodochecknummer {#1}% - {\csname\currentsection\c!nummer\endcsname}% - {\v!per\previoussection\currentsection}% + {\csname\currentsection\c!number\endcsname}% + {\v!by\previoussection\currentsection}% \fi} \def\checknummer#1% {\bgroup %\ifcase\blocklevel\else \ifdoingblocks - \doifnotvalue{\@@thenumber{#1}\c!blokwijze}\v!nee\setblockcounters + \doifnotvalue{\@@thenumber{#1}\c!blockway}\v!no\setblockcounters \fi \dochecknummer{#1}% \egroup} @@ -166,18 +166,18 @@ {\bgroup % added \globallet\voorafgaandenummer\empty \ifsectienummer - \doifvalue{\??sb\@@sectieblok\c!nummer}\v!ja % added - {\doifelsevalue{\@@thenumber{#1}\c!sectienummer}\v!ja + \doifvalue{\??sb\@@sectieblok\c!number}\v!yes % added + {\doifelsevalue{\@@thenumber{#1}\c!sectionnumber}\v!yes \donetrue\donefalse - \doifvalue{\@@thenumber{#1}\c!sectienummer}\v!nummer + \doifvalue{\@@thenumber{#1}\c!sectionnumber}\v!number {\donetrue\let\@@sectionconversion\gobbleoneargument}% \ifdone \edef\currentsection - {\getvalue{\??by\getvalue{\@@thenumber{#1}\c!wijze\c!lokaal}}}% + {\getvalue{\??by\getvalue{\@@thenumber{#1}\c!way\c!local}}}% \doifnot{\currentsection}\zerosection {\doifnot{\@@sectionvalue{\currentsection}}{0} {\xdef\voorafgaandenummer% - {\getvalue{\currentsection\c!nummer}.}}}% + {\getvalue{\currentsection\c!number}.}}}% \fi}% \fi \egroup} @@ -187,7 +187,7 @@ %\ifnum\blocklevel>0 %\ifcase\blocklevel\else \ifdoingblocks - \doifnotvalue{\@@thenumber{#1}\c!blokwijze}\v!nee\setblockcounters + \doifnotvalue{\@@thenumber{#1}\c!blockway}\v!no\setblockcounters \fi \domaakvoorafgaandenummer[#1]% \egroup} @@ -195,7 +195,7 @@ % \def\maakhetnummer[#1]% % {\maakvoorafgaandenummer[#1]% % \xdef\hetnummer% -% {\voorafgaandenummer\nummer[#1]}}% +% {\voorafgaandenummer\convertednumber[#1]}}% % % hack needed for chinese and oldstyle in normal tex, will change @@ -204,7 +204,7 @@ \forceunexpanded % i don't like this hack \maakvoorafgaandenummer[#1]% \xdef\hetnummer% was \xdef maar dat gaat fout met font switches - {\voorafgaandenummer\nummer[#1]}% + {\voorafgaandenummer\convertednumber[#1]}% \egroup} % \def\preparethenumber#1#2#3% {\??id#1} \number \result @@ -215,130 +215,130 @@ % \edef#3{\@EA\separatednumber\@EA{#2}}}} % hm, etex \def\preparethenumber#1#2#3% {\??id#1} \number \result - {\doifelsevaluenothing{#1\c!scheider} + {\doifelsevaluenothing{#1\c!separator} {\let\numberseparator\empty \let#3#2} {% was \unexpanded \edef, but we need it unexpanded ! - \edef\numberseparator{\getvalue{#1\c!scheider}}% + \edef\numberseparator{\getvalue{#1\c!separator}}% \edef#3{\@EA\separatednumber\@EA{#2}}}} % hm, etex \def\lossenummer[#1]% {\maakhetnummer[#1]% \hetnummer} -%\def\huidigenummer[#1]% +%\def\currentnumber[#1]% % {%\getvalue{\getvalue{\@@thenumber{#1}\c!zetwijze}}% % \getvalue{\getvalue{\@@thenumber{#1}\c!plaats}}% % {\dotextprefix{\getvalue{\@@thenumber{#1}\c!tekst}}\lossenummer[#1]}} -\def\huidigenummer[#1]% kan tekst hier weg ? - {\dotextprefix{\getvalue{\@@thenumber{#1}\c!tekst}}\lossenummer[#1]} +\def\currentnumber[#1]% kan tekst hier weg ? + {\dotextprefix{\getvalue{\@@thenumber{#1}\c!text}}\lossenummer[#1]} -\def\volgendenummer[#1][#2][#3]% - {\verhoognummer[#1]% - \huidigenummer[#1]% +\def\nextnumber[#1][#2][#3]% + {\incrementnumber[#1]% + \currentnumber[#1]% \rawreference{#2}{#3}{\hetnummer}} % sectioning \newcount\nofsections -\let\zerosection \v!tekst +\let\zerosection \v!text \let\firstsection\empty \let\lastsection \empty \let\@@sectie \empty \let\@@koppeling \empty -\makecounter{\??se\v!tekst} +\makecounter{\??se\v!text} -\letvalueempty{\??se\v!tekst\c!voor} -\letvalueempty{\??se\v!tekst\c!na } +\letvalueempty{\??se\v!text\c!before} +\letvalueempty{\??se\v!text\c!after } -\setvalue {\v!tekst\c!nummer}{0} -\letvalueempty{\v!tekst\s!format} +\setvalue {\v!text\c!number}{0} +\letvalueempty{\v!text\s!format} -\letvalueempty{\??sk\v!tekst} +\letvalueempty{\??sk\v!text} \letvalueempty{\??sk } -\letvalue{\??by }\v!tekst -\letvalue{\??by\v!tekst }\v!tekst -\letvalue{\??by\v!alles }\v!tekst -\letvalue{\??by\v!per }\v!tekst -\letvalue{\??by\v!per\v!tekst }\v!tekst -\letvalue{\??by\v!per\v!alles }\v!tekst -\letvalue{\??by\v!per\v!pagina}\v!tekst % see footnotes +\letvalue{\??by }\v!text +\letvalue{\??by\v!text }\v!text +\letvalue{\??by\v!all }\v!text +\letvalue{\??by\v!by }\v!text +\letvalue{\??by\v!by\v!text }\v!text +\letvalue{\??by\v!by\v!all }\v!text +\letvalue{\??by\v!by\v!page}\v!text % see footnotes %%%%%%%%% old -\def\dostelsectiein[#1][#2]% +\def\dosetupsection[#1][#2]% {\getparameters[\??se#1][#2]% - \doifelsevalue{\??se#1\c!vorigenummer}\v!ja - {\setvalue{#1\c!nummer}{\@@longsectionnumber{#1}}} - {\setvalue{#1\c!nummer}{\@@shortsectionnumber{#1}}}} + \doifelsevalue{\??se#1\c!previousnumber}\v!yes + {\setvalue{#1\c!number}{\@@longsectionnumber{#1}}} + {\setvalue{#1\c!number}{\@@shortsectionnumber{#1}}}} -\def\stelsectiein% - {\dodoubleargument\dostelsectiein} +\def\setupsection% + {\dodoubleargument\dosetupsection} %%%%%%%%% new, multilingual -\def\dostelsectiein[#1][#2][#3]% +\def\dosetupsection[#1][#2][#3]% {\ifthirdargument \getparameters[\??se#1#2][#3]% \else \getparameters[\??se#1][#2]% \fi - \doifelsevalue{\??se#1\c!vorigenummer}\v!ja - {\setvalue{#1\c!nummer}{\@@longsectionnumber {#1}}} - {\setvalue{#1\c!nummer}{\@@shortsectionnumber{#1}}}} + \doifelsevalue{\??se#1\c!previousnumber}\v!yes + {\setvalue{#1\c!number}{\@@longsectionnumber {#1}}} + {\setvalue{#1\c!number}{\@@shortsectionnumber{#1}}}} -\def\stelsectiein% - {\dotripleempty\dostelsectiein} +\def\setupsection% + {\dotripleempty\dosetupsection} %%%%%%%%% -\def\dokoppelmarkering[#1][#2]% - {\doifdefinedelse{\??ko#2\c!sectie} - {\dokoppelmarkering[#1][\getvalue{\??ko#2\c!sectie}]} +\def\docouplemarking[#1][#2]% + {\doifdefinedelse{\??ko#2\c!section} + {\docouplemarking[#1][\getvalue{\??ko#2\c!section}]} {\def\donexttrackcommando##1% - {\edef\gekoppeldemarkeringen{\getvalue{\??se##1\c!markering}}% + {\edef\coupledmarkings{\getvalue{\??se##1\c!marking}}% \doifelse{##1}{#2} - {\addtocommalist{#1}\gekoppeldemarkeringen} - {\removefromcommalist{#1}\gekoppeldemarkeringen}% - \setevalue{\??se##1\c!markering}{\gekoppeldemarkeringen}% + {\addtocommalist{#1}\coupledmarkings} + {\removefromcommalist{#1}\coupledmarkings}% + \setevalue{\??se##1\c!marking}{\coupledmarkings}% \donexttracklevel{##1}}% \donexttracklevel{\zerosection}}} % \firstsection -\def\koppelmarkering - {\dodoubleargument\dokoppelmarkering} +\def\couplemarking + {\dodoubleargument\docouplemarking} -\def\ontkoppelmarkering[#1]% - {\koppelmarkering[#1][]} +\def\decouplemarking[#1]% + {\couplemarking[#1][]} -\def\definieersectie[#1]% +\def\definesection[#1]% {\doifundefined{\??se#1} {\doifelsenothing\firstsection {\def\firstsection{#1}% - \setevalue{\??se#1\c!voor}{\v!tekst}% - \setevalue{\??se\v!tekst\c!na}{#1}} - {\setevalue{\??se\commalistelement\c!na}{#1}% - \setevalue{\??se#1\c!voor}{\lastsection}% - \setevalue{\??se\lastsection\c!na}{#1}}% + \setevalue{\??se#1\c!before}{\v!text}% + \setevalue{\??se\v!text\c!after}{#1}} + {\setevalue{\??se\commalistelement\c!after}{#1}% + \setevalue{\??se#1\c!before}{\lastsection}% + \setevalue{\??se\lastsection\c!after}{#1}}% \advance\nofsections \plusone - \setevalue{\??se#1\c!niveau}{\the\nofsections}% - \letvalue{\??se#1\c!na}\empty - \setvalue{\e!volgende#1}{\@@nextsectionnumber{#1}}% - \setvalue{#1\c!nummer}{\@@longsectionnumber{#1}}% + \setevalue{\??se#1\c!level}{\the\nofsections}% + \letvalue{\??se#1\c!after}\empty + \setvalue{\e!next#1}{\@@nextsectionnumber{#1}}% + \setvalue{#1\c!number}{\@@longsectionnumber{#1}}% \setvalue{#1\s!format}{\@@longformatnumber{#1}}% \setevalue{\??by#1}{#1}% - \setevalue{\??by\v!per#1}{#1}% + \setevalue{\??by\v!by#1}{#1}% \makecounter{\??se#1}% \edef\lastsection{#1}% \setvalue{\??sk#1}{#1}% - \letvalue{\??se#1\c!markering}\empty - \stelsectiein[#1][\c!vorigenummer=\v!ja]}}% + \letvalue{\??se#1\c!marking}\empty + \setupsection[#1][\c!previousnumber=\v!yes]}}% -\def\previoussection#1{\csname\??se#1\c!voor\endcsname} -\def\nextsection #1{\csname\??se#1\c!na \endcsname} +\def\previoussection#1{\csname\??se#1\c!before\endcsname} +\def\nextsection #1{\csname\??se#1\c!after \endcsname} \def\@@setsectionnumber#1#2% {\letgvalueempty{\??se#1\s!start}% signal i.p.v. boolean @@ -375,57 +375,48 @@ \def\@@sectionconversion#1#2% a doublure with \@@shortsectionnumber {\ifnum#2=0 0\else % else troubles with \uchar - \@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax - \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax + \@EA\ifx\csname\??se#1\@@sectieblok\c!conversion\endcsname\relax + \@EA\ifx\csname\??se#1\c!conversion\endcsname\relax #2% \else - \convertnumber{\getvalue{\??se#1\c!conversie}}{#2}% + \convertnumber{\getvalue{\??se#1\c!conversion}}{#2}% \fi \else - \convertnumber{\getvalue{\??se#1\@@sectieblok\c!conversie}}{#2}% + \convertnumber{\getvalue{\??se#1\@@sectieblok\c!conversion}}{#2}% \fi \fi} \def\@@sectionlevel#1% - {\ifundefined{\??se#1\c!niveau}0\else\getvalue{\??se#1\c!niveau}\fi} + {\ifundefined{\??se#1\c!level}0\else\getvalue{\??se#1\c!level}\fi} % Omdat een markering kan worden herdefinieerd moeten we % eerst testen of er wel een keten||afhankelijkheid is. -% \def\doresetsectionmarks#1% -% {\doifdefined{\??se#1\c!markering} % skip zero level -% {\fastresetmarkerlist[\getvalue{\??se#1\c!markering}]}% -% \donexttracklevel{#1}} -% -% \def\resetsectionmarks#1% -% {\doifdefinedelse{\??se#1} -% {\let\donexttrackcommando\doresetsectionmarks -% \donexttracklevel{#1}}% -% {\fastresetmarker[\hoofdmarkering{#1}]}} % redundant \hoofdmarkering - -% \def\doresetsectionmarks#1% -% {\ifundefined{\??se#1\c!markering}\else % skip zero level -% \fastresetmarkerlist[\csname\??se#1\c!markering\endcsname]% -% \fi -% \donexttracklevel{#1}} -% -% not sure if the next one is better: - -\def\doresetsectionmarks#1% - {\ifundefined{\??se#1\c!markering}% skip zero level - \donexttracklevel{#1}% - \else - \fastresetmarkerlist[\csname\??se#1\c!markering\endcsname]% - \fi} - \def\resetsectionmarks#1% {\ifundefined{\??se#1}% - \fastresetmarker[\hoofdmarkering{#1}]% % redundant \hoofdmarkering + \fastresetmarker[\mainmarking{#1}]% % redundant \mainmarking \else \let\donexttrackcommando\doresetsectionmarks \donexttracklevel{#1}% \fi} +\def\doresetsectionmarks#1% + {\ifundefined{\??se#1\c!marking}\else % skip zero level + \fastresetmarkerlist[\csname\??se#1\c!marking\endcsname]% + \fi + \donexttracklevel{#1}} + +% I'm not sure if the next one is better: +% +% \def\doresetsectionmarks#1% +% {\ifundefined{\??se#1\c!markering}% skip zero level +% \donexttracklevel{#1}% +% \else +% \fastresetmarkerlist[\csname\??se#1\c!markering\endcsname]% +% \fi} +% +% and indeed, it isn't, actually, it does not work at all, so let's drop it. + % packaged: % % \def\resetsectioncounters#1% @@ -444,7 +435,7 @@ \def\doresetsectioncounters#1% {\resetcounter{\??se#1}% - \letgvalue{\??se#1\c!eigennummer}\relax + \letgvalue{\??se#1\c!ownnumber}\relax \donexttracklevel{#1}} \def\resetsectioncounters % #1 @@ -456,10 +447,18 @@ % evt ook level gaan opslaan tbv snelle selectie -\def\makesectionformat - {\edef\sectionformat +% \def\makesectionformat +% {\edef\sectionformat +% {\@@sectiontype\sectionseparator +% \csname\lastsection\s!format\endcsname}} + +\unprotected \def\makesectionformat % we don't want eigennummers here + {\pushmacro\@@shortsectionnumber + \let\@@shortsectionnumber\@@sectionvalue + \edef\sectionformat {\@@sectiontype\sectionseparator - \csname\lastsection\s!format\endcsname}} + \csname\lastsection\s!format\endcsname}% + \popmacro\@@shortsectionnumber} \def\dobacktracklevel#1% {\doifnot{\previoussection{#1}}\zerosection @@ -469,7 +468,7 @@ {\doifnot{#1}\lastsection {\donexttrackcommando{\nextsection{#1}}}} -\chardef\alltoclevels\zerocount % \newif\ifalllevels +\chardef\alltoclevels\zerocount \let\currentlevel\empty @@ -494,8 +493,8 @@ \globallet\currentlevel\empty} \def\dosetotherlevel#1% - {\doifdefinedelse{\??ko#1\c!sectie} % beter alteratief: ook - {\edef\@@sectie{\getvalue{\??ko#1\c!sectie}}} % hoofdstuk\c!format + {\doifdefinedelse{\??ko#1\c!section} % beter alteratief: ook + {\edef\@@sectie{\getvalue{\??ko#1\c!section}}} % hoofdstuk\c!format {\edef\@@sectie{#1}}% \doifdefinedelse{\??se\@@sectie} {\global\chardef\alltoclevels\zerocount @@ -519,17 +518,17 @@ {\bgroup \edef\askedlevel{#1}% \edef\askedfilter{#2}% - \ifx\askedlevel\v!huidige + \ifx\askedlevel\v!current \dosetcurrentlevel\askedlevel - \else\ifx\askedlevel\v!vorige + \else\ifx\askedlevel\v!previous \dosetpreviouslevel\askedlevel - \else\ifx\askedlevel\v!alles + \else\ifx\askedlevel\v!all \global\chardef\alltoclevels\plusone - \else\ifx\askedlevel\v!tekst + \else\ifx\askedlevel\v!text \global\chardef\alltoclevels\plusone \else \edef\byaskedlevel{\csname\??by\askedlevel\endcsname}% - \ifx\byaskedlevel\v!tekst + \ifx\byaskedlevel\v!text \dosettextlevel\askedlevel \else \dosetotherlevel\askedlevel @@ -822,17 +821,15 @@ % \fi % \@@shortsectionnumber{#1}} -\newif\ifreversesectionnumbers % todo: key/val - \def\@@longsectionnumber#1% {\ifreversesectionnumbers \@@shortsectionnumber{#1}% \ifnum\countervalue{\??se\previoussection{#1}}>\zerocount - .\csname\previoussection{#1}\c!nummer\endcsname + .\csname\previoussection{#1}\c!number\endcsname \fi \else \ifnum\countervalue{\??se\previoussection{#1}}>\zerocount - \csname\previoussection{#1}\c!nummer\endcsname.% + \csname\previoussection{#1}\c!number\endcsname.% \fi \@@shortsectionnumber{#1}% \fi} @@ -864,9 +861,9 @@ % \fi} \def\@@shortsectionnumber#1% - {\@EA\ifx\csname\??se#1\c!eigennummer\endcsname\relax - \@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax - \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax + {\@EA\ifx\csname\??se#1\c!ownnumber\endcsname\relax + \@EA\ifx\csname\??se#1\@@sectieblok\c!conversion\endcsname\relax + \@EA\ifx\csname\??se#1\c!conversion\endcsname\relax \@@sectionvalue{#1}% \else \@@sectionconversion{#1}{\@@sectionvalue{#1}}% @@ -875,7 +872,7 @@ \@@sectionconversion{#1}{\@@sectionvalue{#1}}% \fi \else - \csname\??se#1\c!eigennummer\endcsname + \csname\??se#1\c!ownnumber\endcsname \fi} \def\dosetlocalsectieblok#1#2#3% new \edef's @@ -887,33 +884,61 @@ % will result in an additional last page, which needs to be % captured at the end -\def\doaroundsectieblok#1% - {\doifvaluesomething{\??sb#1\c!pagina} - {\ExpandFirstAfter\pagina[\getvalue{\??sb#1\c!pagina}]}% +% \def\doaroundsectieblok#1% +% {\doifvaluesomething{\??sb#1\c!pagina} +% {\ExpandFirstAfter\page[\getvalue{\??sb#1\c!pagina}]}% +% \resetsectioncounters\zerosection % was firstsection +% \resetsectionmarks\zerosection} + +% \def\dostartsectieblok#1#2% +% {\begingroup +% \doaroundsectieblok{#1}% % going to a new page or so +% \getvalue{\??sb#1}% % set name of section block +% \getsectieblokomgeving{#1}% % special settings, grouped +% %\expandafter\csname#2true\endcsname % obsolete +% \setsystemmode{#1}% % can be used in conditionals +% \getvalue{\??sb\@@sectieblok\c!voor}% this one is not to be moved! +% \showmessage\m!structures1\@@sectieblokken} + +% \def\dostopsectieblok +% {\showmessage\m!structures2\@@sectieblokken +% \getvalue{\??sb\@@sectieblok\c!na}% don't move +% \doaroundsectieblok\@@sectieblok +% \endgroup} + +\def\doaroundsectieblok + {\doifvaluesomething{\??sb\@@sectieblok\c!page} + {\page[\getvalue{\??sb\@@sectieblok\c!page}]}% \resetsectioncounters\zerosection % was firstsection \resetsectionmarks\zerosection} -\def\dostartsectieblok#1#2% +\def\dostartsectionblock#1#2% {\begingroup - \doaroundsectieblok{#1}% % going to a new page or so - \getvalue{\??sb#1}% % set name of section block - \getsectieblokomgeving{#1}% % special settings, grouped - %\expandafter\csname#2true\endcsname % obsolete - \setsystemmode{#1}% % can be used in conditionals - \getvalue{\??sb\@@sectieblok\c!voor}% this one is not to be moved! + \getvalue{\??sb#1}% + \doaroundsectieblok +% \doifvaluesomething{\??sb\@@sectieblok\c!pagina}{\page[\getvalue{\??sb\@@sectieblok\c!pagina}]}% +% \resetsectioncounters\zerosection % was firstsection +% \resetsectionmarks\zerosection + \getsectieblokomgeving\@@sectieblok + \setsystemmode\@@sectieblok + \getvalue{\??sb\@@sectieblok\c!before}% \showmessage\m!structures1\@@sectieblokken} -\def\dostopsectieblok +\def\dostopsectionblock {\showmessage\m!structures2\@@sectieblokken - \getvalue{\??sb\@@sectieblok\c!na}% don't move - \doaroundsectieblok\@@sectieblok + \getvalue{\??sb\@@sectieblok\c!after}% don't move + \doaroundsectieblok +% \doifvaluesomething{\??sb\@@sectieblok\c!pagina}{\page[\getvalue{\??sb\@@sectieblok\c!pagina}]}% +% \resetsectioncounters\zerosection % was firstsection +% \resetsectionmarks\zerosection \endgroup} -\def\dostelsectieblokin[#1]% [#2] + +\def\dosetupsectionblock[#1]% [#2] {\getparameters[\??sb#1]} -\def\stelsectieblokin - {\dodoubleargument\dostelsectieblokin} +\def\setupsectionblock + {\dodoubleargument\dosetupsectionblock} \long\def\setsectieblokomgeving#1#2% {\long\setvalue{\??sb\s!do#1}{\do{#2}}} @@ -921,14 +946,14 @@ \def\getsectieblokomgeving#1% {\let\do\firstofoneargument\getvalue{\??sb\s!do#1}} -\setvalue{\e!start\v!sectieblokomgeving}% +\setvalue{\e!start\v!sectionblockenvironment}% {\dosingleargument\dostartsectieblokomgeving} \def\dostartsectieblokomgeving[#1]% evt \pushendofline \popendofline {\long\def\do##1##2{\setsectieblokomgeving{#1}{##1##2}}% - \grabuntil{\e!stop\v!sectieblokomgeving}{\getvalue{\??sb\s!do#1}}} + \grabuntil{\e!stop\v!sectionblockenvironment}{\getvalue{\??sb\s!do#1}}} -%D \starttypen +%D \starttyping %D \startsectionblockenvironment[frontpart] %D \setuppagenumbering[conversion=romannumerals] %D \stopsectionblockenvironment @@ -946,7 +971,7 @@ %D \startbodymatter \chapter{test} \stopbodymatter %D \startappendices \chapter{test} \stopappendices %D \stoptext -%D \stoptypen +%D \stoptyping % We used to use the first char as id, but a counter is % better, because in english we get a name clash. @@ -955,13 +980,13 @@ \def\currentsection{\@@sectieblok} -\def\dodefinieersectieblok[#1][#2][#3]% +\def\dodefinesectionblock[#1][#2][#3]% {\getparameters [\??sb#1] - [\c!nummer=\v!ja, - \c!pagina=\v!rechts, % anders worden marks te vroeg gereset ! - %\c!voor=, - %\c!na=, + [\c!number=\v!yes, + \c!page=\v!right, % anders worden marks te vroeg gereset ! + %\c!before=, + %\c!after=, #3]% \expandafter\newif\csname if#2\endcsname % better a mode \doglobal\increment\currentsectionblock @@ -969,12 +994,12 @@ \setevalue{\??sb#1}% {\noexpand\dosetlocalsectieblok{\currentsectionblock}{#1}{#2}}% \setvalue{\e!start#2}% - {\dostartsectieblok{#1}{#2}}% + {\dostartsectionblock{#1}{#2}}% \setvalue{\e!stop#2}% - {\dostopsectieblok}} + {\dostopsectionblock}} -\def\definieersectieblok - {\dotripleargument\dodefinieersectieblok} +\def\definesectionblock + {\dotripleargument\dodefinesectionblock} \def\sectiebloklabel#1#2% {\@EA\ifx\csname\??ko#1\@@sectieblok\c!label\endcsname\relax @@ -983,7 +1008,7 @@ \labeltexts{\getvalue{\??ko#1\@@sectieblok\c!label}}{#2}% \fi} -\dosetlocalsectieblok{2}{\v!hoofdtekst}{\v!hoofdteksten} % hm, dirty +\dosetlocalsectieblok{2}{\v!bodypart}{\v!bodymatter} % hm, dirty \def\setsectiontype[#1]% {\getvalue{\??sb#1}} @@ -996,23 +1021,23 @@ {\ifsectienummer#2\else(#2)\fi\normalspace\asciititle}% \egroup} -\def\@@koniveau{1} \def\kopniveau{\@@koniveau} +\def\@@kolevel{1} \def\headlevel{\@@kolevel} \def\dohandelpaginaafAA#1% {\ifnum\lastpenalty>0 \global\paginageblokkeerdtrue \fi} -\def\dohandelpaginaafAB#1% +\def\dohandelpaginaafAB#1% will be replaced by a more clever (signaling) mechanism (in beta) {\flushsidefloats - \getvalue{\??ko#1\c!voor}% - %\witruimte vervangen door \noindent elders + \getvalue{\??ko#1\c!before}% + %\whitespace vervangen door \noindent elders \relax \ifpaginageblokkeerd \global\paginageblokkeerdfalse \else - \!!countb\getvalue{\??se\@@sectie\c!niveau}\relax - \ifnum\!!countb>\@@koniveau\relax + \!!countb\getvalue{\??se\@@sectie\c!level}\relax + \ifnum\!!countb>\@@kolevel\relax \!!counta20000 \multiply\!!countb 500 \advance\!!counta \!!countb @@ -1021,35 +1046,25 @@ \dosomebreak\allowbreak \fi \fi - \xdef\@@koniveau{\getvalue{\??se\@@sectie\c!niveau}}} + \xdef\@@kolevel{\getvalue{\??se\@@sectie\c!level}}} \def\dohandelpaginaafBB#1#2#3% -% {\doifinset{\getvalue{\??tk#2\v!tekst\c!status}}{\v!normaal,\v!start} - {\doifinset{\getvalue{\??tk#2\c!status}}{\v!normaal,\v!start} + {\doifinset{\getvalue{\??tk#2\c!state}}{\v!normal,\v!start} {\doifvaluesomething{\??ko#1#3} - {\setuplayouttext[#2][\c!status=\getvalue{\??ko#1#3}]}}} - -% \def\dohandelpaginaafB#1% -% {\doifinset{\getvalue{\??ko#1\c!pagina}}{\v!ja,\v!rechts,\v!links} -% {\def\resetcurrentsectionmarks% toegevoegd, zie \pagina -% {\resetsectionmarks{\previoussection\@@sectie}}% -% \pagina[\getvalue{\??ko#1\c!pagina}]% -% \dohandelpaginaafBB{#1}\v!hoofd\c!hoofd -% \dohandelpaginaafBB{#1}\v!tekst\c!tekst -% \dohandelpaginaafBB{#1}\v!voet \c!voet}} + {\setuplayouttext[#2][\c!state=\getvalue{\??ko#1#3}]}}} \def\dohandelpaginaafB#1% - {\doifvaluesomething{\??ko#1\c!pagina} - {\def\resetcurrentsectionmarks% toegevoegd, zie \pagina + {\doifvaluesomething{\??ko#1\c!page} + {\def\resetcurrentsectionmarks% toegevoegd, zie \page {\resetsectionmarks{\previoussection\@@sectie}}% - \pagina[\getvalue{\??ko#1\c!pagina}]% - \dohandelpaginaafBB{#1}\v!hoofd\c!hoofd - \dohandelpaginaafBB{#1}\v!tekst\c!tekst - \dohandelpaginaafBB{#1}\v!voet \c!voet}} + \page[\getvalue{\??ko#1\c!page}]% + \dohandelpaginaafBB{#1}\v!header\c!header + \dohandelpaginaafBB{#1}\v!text \c!text + \dohandelpaginaafBB{#1}\v!footer\c!footer}} \def\dohandelpaginaafX#1% zie doordefinieren / boven {\bgroup - \!!countb\@@koniveau + \!!countb\@@kolevel \advance\!!countb #1 \multiply\!!countb 500 \!!counta20000 @@ -1063,8 +1078,7 @@ \ifnum\countervalue{\??se\@@sectie}>\zerocount \dohandelpaginaafB{#1}% \else - \doifnotvalue{\??ko#1\c!doorgaan}\v!ja - {\dohandelpaginaafB{#1}}% + \doifnotvalue{\??ko#1\c!continue}\v!yes{\dohandelpaginaafB{#1}}% \fi \else \dohandelpaginaafB{#1}% @@ -1072,48 +1086,45 @@ \dohandelpaginaafAB{#1}} \def\handelpaginaafC#1% - {\xdef\@@koniveau{\getvalue{\??se\@@sectie\c!niveau}}% + {\xdef\@@kolevel{\getvalue{\??se\@@sectie\c!level}}% \nobreak} -%\def\dolocalheadsetup#1% koppeling met standaard kopcommando / engels -% {\forgetall -% \doifvaluesomething{\??ko#1\c!uitlijnen} -% {\ExpandFirstAfter\setupalign[\getvalue{\??ko#1\c!uitlijnen}]}% -% \doifvaluesomething{\??ko#1\c!tolerantie} -% {\ExpandFirstAfter\setuptolerance[\getvalue{\??ko#1\c!tolerantie}]}% -% \def\\{\crlf\strut\ignorespaces}} - \def\dolocalheadsetup#1% koppeling met standaard kopcommando / engels {\forgetall % traag dus ... - \doifvaluesomething{\??ko#1\c!uitlijnen} % wordt al expanded in spa - {\expanded{\setupalign[\getvalue{\??ko#1\c!uitlijnen}]}}% - \doifvaluesomething{\??ko#1\c!tolerantie} % wordt al expanded in spa - {\expanded{\setuptolerance[\getvalue{\??ko#1\c!tolerantie}]}}% + \doifvaluesomething{\??ko#1\c!align} % wordt al expanded in spa + {\expanded{\setupalign[\getvalue{\??ko#1\c!align}]}}% + \doifvaluesomething{\??ko#1\c!tolerance} % wordt al expanded in spa + {\expanded{\setuptolerance[\getvalue{\??ko#1\c!tolerance}]}}% \def\\{\crlf\strut\ignorespaces}} \def\localkopsetup{\localheadsetup} % kan tzt weg % todo: make them conditionals: -\newif\ifplaatskop -\newif\iflegekop -\newif\ifnaarlijst -\newif\ifverhoognummer -\newif\ifkopnummer +\newif\ifincrementnumber +\newif\ifreversesectionnumbers % todo: key/val +\newif\ifsectienummer \sectienummertrue +\newif\ifdisplaysectionhead \displaysectionheadtrue +\newif\ifplacehead +\newif\ifemptyhead +\newif\ifwritetolist +\newif\ifheadnumber +\newif\ifcontinuoushead +\newif\ifheadnumbercontent % niet meer wijzigen / wordt mode +\newif\ifheadprefix +\newif\ifsomeheadconversion % new \newconditional\@@resetsubheadnumbers \def\setsectieenkoppeling#1% - {\edef\@@koppeling{\getvalue{\??ko#1\c!koppeling}}% - \edef\@@sectie{\getvalue{\??ko#1\c!sectie}}% + {\edef\@@koppeling{\getvalue{\??ko#1\c!coupling}}% + \edef\@@sectie{\getvalue{\??ko#1\c!section}}% \doifnothing\@@koppeling {\edef\@@koppeling{#1}}% \doifnothing\@@sectie - {\edef\@@sectie{\getvalue{\??ko\@@koppeling\c!sectie}}}} - -\newif\ifkopprefix + {\edef\@@sectie{\getvalue{\??ko\@@koppeling\c!section}}}} % \handelpaginaaf komt het eerst omdat eventueel % subpaginanummers moeten worden afgehandeld. Vervolgens @@ -1128,11 +1139,11 @@ \let\finalsectionnumber\empty \def\dofinalsectionnumber - {\ifundefined{\@@sectie\c!nummer}\else + {\ifundefined{\@@sectie\c!number}\else \ifsomeheadconversion \@@shortsectionnumber\@@sectie \else - \getvalue{\@@sectie\c!nummer}% + \getvalue{\@@sectie\c!number}% \fi \fi} @@ -1144,7 +1155,7 @@ {\doif{##1}{#1} {\ConvertConstantAfter\doif{##4}{#3} {\global\utilitydonetrue - \scratchcounter=0\getvalue{\??se\@@sectie\c!niveau}% + \scratchcounter=0\getvalue{\??se\@@sectie\c!level}% % %\advance\scratchcounter 2 %\@EA\def\@EA\do\@EA####\@EA1\sectionseparator####2]% @@ -1171,10 +1182,8 @@ {\doif\foundsectionnumber\!!zerocount {\globallet\foundsectionnumber\!!plusone}} {\globallet\foundsectionnumber\!!plusone}% an appendix or so - \stelkopnummerin[#1][\foundsectionnumber]% - \stelkopnummerin[#1][-1]} - -\newif\ifsomeheadconversion + \setupheadnumber[#1][\foundsectionnumber]% + \setupheadnumber[#1][-1]} % \def\setsomeheadconversion#1#2% % {\someheadconversionfalse @@ -1207,30 +1216,30 @@ \def\setsomeheadconversion#1#2% {\someheadconversionfalse - \doifelsevalue{\??ko#1\c!eigennummer}\v!ja - {\setgvalue{\??se\@@sectie\c!eigennummer}{#2}% + \doifelsevalue{\??ko#1\c!ownnumber}\v!yes + {\setgvalue{\??se\@@sectie\c!ownnumber}{#2}% \def\someheadconversion{#2}} - {\letgvalue{\??se\@@sectie\c!eigennummer}\relax - \bepaalkopnummer[#1]% - \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\relax - \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\relax + {\letgvalue{\??se\@@sectie\c!ownnumber}\relax + \determineheadnumber[#1]% + \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!headconversion\endcsname\relax + \@EA\ifx\csname\??se\@@sectie\c!headconversion\endcsname\relax \def\someheadconversion{#2}% \else - \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\empty + \@EA\ifx\csname\??se\@@sectie\c!headconversion\endcsname\empty \def\someheadconversion{#2}% \else \someheadconversiontrue \def\someheadconversion% - {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\c!kopconversie}}{#2}}% + {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\c!headconversion}}{#2}}% \fi \fi \else - \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\empty + \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!headconversion\endcsname\empty \def\someheadconversion{#2}% \else \someheadconversiontrue \def\someheadconversion% - {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\@@sectieblok\c!kopconversie}}{#2}}% + {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\@@sectieblok\c!headconversion}}{#2}}% \fi \fi}} @@ -1255,8 +1264,8 @@ {\convertnumber{#2}{#3}} \def\setfullsectionnumber#1% - {\doifelsevalue{#1\c!kopconversie}\v!ja - {\doifelsevalue{#1\c!koplabel}\v!ja + {\doifelsevalue{#1\c!headconversion}\v!yes + {\doifelsevalue{#1\c!headlabel}\v!yes {\let\fullsectionnumber\naturalfullsectionnumber} {\let\fullsectionnumber\limitedfullsectionnumber}} {\let\fullsectionnumber\ignoredfullsectionnumber}} @@ -1271,7 +1280,7 @@ \let\currentheadtext \empty \def\dodosomekop#1[#2]#3% [ref] {title} - {\doifelsevalue{\??ko#1\c!eigennummer}\v!ja + {\doifelsevalue{\??ko#1\c!ownnumber}\v!yes {\doquadruplegroupempty\dododosomekop{#1}{#2}{#3}} {\fourthargumentfalse \dododosomekop{#1}{#2}{#3}{}}} @@ -1292,7 +1301,7 @@ \unexpanded\def\\{\space} \def\emptyheadcorrection % experimental, should work - {\iflegekop % well with na=\blanko + {\ifemptyhead % well with na=\blank \vskip-\lineheight \dosomebreak\nobreak \kern\zeropoint @@ -1305,14 +1314,14 @@ {\def\currenthead{#1}% dus #1 overal vervangen \let\finalsectionnumber\dofinalsectionnumber % overloaded ungrouped -) \unexpanded\def\\{\space}% - \def\numberseparator{\getvalue{\??ko\currenthead\c!scheider}}% + \def\numberseparator{\getvalue{\??ko\currenthead\c!separator}}% \flushingcolumnfloatsfalse % {number} can be \finalsectionnumber \someheadconversionfalse \let\fullsectionnumber\limitedfullsectionnumber \setsectieenkoppeling{#1}% \doifelsevaluenothing{\??ko#1\c!prefix} - \kopprefixfalse\kopprefixtrue - \ifkopprefix + \headprefixfalse\headprefixtrue + \ifheadprefix \doifelsevalue{\??ko#1\c!prefix}{+} {\doifelsenothing{#2} {\def\localkopprefix{+}} @@ -1322,135 +1331,135 @@ \let\localkoprefix\empty \fi % \doifelsevalue{\??ko#1\c!plaatskop}\v!ja -% \plaatskoptrue\plaatskopfalse +% \placeheadtrue\placeheadfalse % \processaction % [\getvalue{\??ko#1\c!plaatskop}] -% [ \v!ja=>\plaatskoptrue \legekopfalse, -% \v!leeg=>\plaatskoptrue \legekoptrue, -% \v!nee=>\plaatskopfalse\legekoptrue]% - \plaatskoptrue +% [ \v!ja=>\placeheadtrue \emptyheadfalse, +% \v!leeg=>\placeheadtrue \emptyheadtrue, +% \v!nee=>\placeheadfalse\emptyheadtrue]% + \placeheadtrue \processaction - [\getvalue{\??ko#1\c!plaatskop}] - [ \v!ja=>\legekopfalse, - \v!leeg=>\legekoptrue, - \v!nee=>\legekoptrue\plaatskopfalse]% + [\getvalue{\??ko#1\c!placehead}] + [ \v!yes=>\emptyheadfalse, + \v!empty=>\emptyheadtrue, + \v!no=>\emptyheadtrue\placeheadfalse]% % - \doifelsevalue{\??ko#1\c!resetnummer}\v!nee + \doifelsevalue{\??ko#1\c!resetnumber}\v!no {\setfalse\@@resetsubheadnumbers}% {\settrue \@@resetsubheadnumbers}% - \naarlijstfalse + \writetolistfalse \processaction - [\getvalue{\??ko#1\c!verhoognummer}] - [ \v!ja=>\verhoognummertrue, - \v!nee=>\verhoognummerfalse, - \v!lijst=>\verhoognummerfalse + [\getvalue{\??ko#1\c!incrementnumber}] + [ \v!yes=>\incrementnumbertrue, + \v!no=>\incrementnumberfalse, + \v!list=>\incrementnumberfalse % beware, since no numbers are used, no nested lists are % possible here - \naarlijsttrue, + \writetolisttrue, \s!unknown=>{\ifx\currentproduct\empty \findsectionnumber{#1}\commalistelement{#4}% \fi - \verhoognummertrue}]% - \edef\numberheaddistance {\getvalue{\??ko#1\c!afstand}}% - \edef\numberheadalternative{\getvalue{\??ko#1\c!variant}}% - \doifelsevalue{\??ko:\numberheadalternative}\v!horizontaal + \incrementnumbertrue}]% + \edef\numberheaddistance {\getvalue{\??ko#1\c!distance}}% + \edef\numberheadalternative{\getvalue{\??ko#1\c!alternative}}% + \doifelsevalue{\??ko:\numberheadalternative}\v!horizontal \displaysectionheadfalse \displaysectionheadtrue \ifsectienummer - \doifelsevalue{\??sb\@@sectieblok\c!nummer}\v!ja - {\doifelsevalue{\??ko#1\c!nummer}\v!ja - \kopnummertrue - \kopnummerfalse} - {\kopnummerfalse}% + \doifelsevalue{\??sb\@@sectieblok\c!number}\v!yes + {\doifelsevalue{\??ko#1\c!number}\v!yes + \headnumbertrue + \headnumberfalse} + {\headnumberfalse}% \else - \kopnummerfalse + \headnumberfalse \fi \convertexpanded{\??ko#1}{#4}\asciititle % \gdef\currentheadtext{#4}% scheelt args \globallet\currentheadnumber\empty % - \ifverhoognummer - \ifplaatskop + \ifincrementnumber + \ifplacehead \checknexthead\handelpaginaaf{#1}% \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...] - \ifkopprefix + \ifheadprefix %\setupreferencing[\c!prefix=-]% \setupreferenceprefix[-]% \fi - \getvalue{\e!volgende\@@sectie}% - \ifkopnummer + \getvalue{\e!next\@@sectie}% + \ifheadnumber \setsomeheadconversion{#1}{#3}% \let\fullsectionnumber\expandablefullsectionnumber \xdef\currentheadnumber{\someheadconversion}% - \getvalue{\??ko#1\c!tussen}% + \getvalue{\??ko#1\c!inbetween}% \ifsomeheadconversion \let\fullsectionnumber\naturalfullsectionnumber \doplaatskopnummertekst {#1} {\setsectionlistreference{\@@sectie}{#1}% - \soortpagina[\@@koppeling]% + \pagetype[\@@koppeling]% \let\fullsectionnumber\writtenfullsectionnumber \rawreference\s!sec{#2}{{\someheadconversion}{\asciititle}}% \resetsectionmarks\@@sectie - \setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}% + \setlistparameter\@@koppeling\c!expansion{\getvalue{\??ko#1\c!expansion}}% \let\fullsectionnumber\writtenfullsectionnumber - \doschrijfnaarlijst\@@koppeling\someheadconversion{#4}\v!kop}% + \dowritetolist\@@koppeling\someheadconversion{#4}\v!head}% {\dohandleheadnumber\someheadconversion}% handle is new {#4} {\marking[#1]{#4}% \let\fullsectionnumber\storedfullsectionnumber - \expanded{\marking[#1\v!nummer]{\someheadconversion}}}% + \expanded{\marking[#1\v!number]{\someheadconversion}}}% \let\fullsectionnumber\ignoredfullsectionnumber \writesection{#1}{\someheadconversion}{#4}% \else \doplaatskopnummertekst {#1} {\setsectionlistreference{\@@sectie}{#1}% - \soortpagina[\@@koppeling]% + \pagetype[\@@koppeling]% \rawreference\s!sec{#2}{{#3}{\asciititle}}% \resetsectionmarks\@@sectie - \setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}% - \doschrijfnaarlijst\@@koppeling{#3}{#4}\v!kop} + \setlistparameter\@@koppeling\c!expansion{\getvalue{\??ko#1\c!expansion}}% + \dowritetolist\@@koppeling{#3}{#4}\v!head} {\sectiebloklabel{#1}{\dohandleheadnumber{#3}}}% handle is new {#4} {\marking[#1]{#4}% - \doifelsevalue{\??ko#1\c!eigennummer}\v!ja % rommelig omdat + \doifelsevalue{\??ko#1\c!ownnumber}\v!yes % rommelig omdat {\edef\finalsectionnumber{#3}} % #3 al is toegekend - {\bepaalkopnummer[#1]}% migreert naar 3e argument - \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}% + {\determineheadnumber[#1]}% migreert naar 3e argument + \expanded{\marking[#1\v!number]{\finalsectionnumber}}}% \writesection{#1}{#3}{#4}% \fi \else - \getvalue{\??ko#1\c!tussen}% - \doplaatskoptekst + \getvalue{\??ko#1\c!inbetween}% + \doplaceheadtext {#1} {\setsectionlistreference{\@@sectie}{#1}% - \soortpagina[\@@koppeling]% + \pagetype[\@@koppeling]% \rawreference\s!sec{#2}{{#3}{\asciititle}}% \resetsectionmarks\@@sectie - \setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}% - \doschrijfnaarlijst\@@koppeling{}{#4}\v!kop} + \setlistparameter\@@koppeling\c!expansion{\getvalue{\??ko#1\c!expansion}}% + \dowritetolist\@@koppeling{}{#4}\v!head} {#4} {\marking[#1]{#4}% - \doifelsevalue{\??ko#1\c!eigennummer}\v!ja % brrr + \doifelsevalue{\??ko#1\c!ownnumber}\v!yes % brrr {\edef\finalsectionnumber{#3}} - {\bepaalkopnummer[#1]}% + {\determineheadnumber[#1]}% % todo : geen markering (leeg maken) - \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}% + \expanded{\marking[#1\v!number]{\finalsectionnumber}}}% \writesection{#1}{-}{#4}% \fi - \ifkopprefix + \ifheadprefix \setupreferenceprefix[\localkopprefix]% \fi \ifdisplaysectionhead \dosomebreak\nobreak \emptyheadcorrection - \getvalue{\??ko#1\c!na}% + \getvalue{\??ko#1\c!after}% \fi \else % Whatever future tex's will do with nodes, - % we assume a node here, because other \c!na=\blanko + % we assume a node here, because other \c!after=\blank % will fail! See 'prikkels' % % so, maybe we need an explicit \kern @@ -1459,70 +1468,70 @@ % \checknexthead\dohandelpaginaafB{#1}% toegevoegd ivm subpaginanr / tug sheets \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...] - \ifkopprefix + \ifheadprefix \setupreferenceprefix[-]% \fi - \getvalue{\e!volgende\@@sectie}% - \ifkopnummer + \getvalue{\e!next\@@sectie}% + \ifheadnumber \setsomeheadconversion{#1}{#3}% \let\fullsectionnumber\expandablefullsectionnumber \xdef\currentheadnumber{\someheadconversion}% \fi - \getvalue{\??ko#1\c!tussen}% documenteren, is enige hook + \getvalue{\??ko#1\c!inbetween}% documenteren, is enige hook \bgroup \setsectionlistreference{\@@sectie}{#1}% \resetsectionmarks\@@sectie \marking[#1]{#4}% - \doifelsevalue{\??ko#1\c!eigennummer}\v!ja + \doifelsevalue{\??ko#1\c!ownnumber}\v!yes {\edef\finalsectionnumber{#3}} - {\bepaalkopnummer[#1]}% - \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}% - \soortpagina[\@@koppeling]% + {\determineheadnumber[#1]}% + \expanded{\marking[#1\v!number]{\finalsectionnumber}}% + \pagetype[\@@koppeling]% % \bgroup - \setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}% - \ifkopnummer + \setlistparameter\@@koppeling\c!expansion{\getvalue{\??ko#1\c!expansion}}% + \ifheadnumber \rawreference\s!sec{#2}{{#3}{\asciititle}}% - \doschrijfnaarlijst\@@koppeling{#3}{#4}\v!kop + \dowritetolist\@@koppeling{#3}{#4}\v!head \writesection{#1}{#3}{#4}% \else \rawreference\s!sec{#2}{{#3}{\asciititle}}% - \doschrijfnaarlijst\@@koppeling{}{#4}\v!kop + \dowritetolist\@@koppeling{}{#4}\v!head \writesection{#1}{-}{#4}% \fi \egroup - \ifkopprefix + \ifheadprefix \setupreferenceprefix[\localkopprefix]% \fi \fi \else % todo : ref prefix - \ifplaatskop + \ifplacehead \checknexthead\handelpaginaaf{#1}% \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...] - \getvalue{\??ko#1\c!tussen}% - \doplaatskoptekst + \getvalue{\??ko#1\c!inbetween}% + \doplaceheadtext {#1} {\forcesectiontolist{#1}{#4}% \rawreference\s!sec{#2}{{#3}{\asciititle}}} % #3 ? {#4} %{}% new: {\marking[#1]{#4}% - \marking[#1\v!nummer]{}}% + \marking[#1\v!number]{}}% \writesection{#1}{-}{#4}% \ifdisplaysectionhead \dosomebreak\nobreak \emptyheadcorrection - \getvalue{\??ko#1\c!na}% + \getvalue{\??ko#1\c!after}% \fi \else % do nothing / should be vbox to 0pt \checknexthead\handelpaginaaf{#1}% \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...] - \getvalue{\??ko#1\c!tussen}% + \getvalue{\??ko#1\c!inbetween}% \forcesectiontolist{#1}{#4}% \rawreference\s!sec{#2}{{#3}{\asciititle}}% #3 ? \marking[#1]{#4}% - \marking[#1\v!nummer]{}% + \marking[#1\v!number]{}% \writesection{#1}{-}{#4}% \fi \fi @@ -1532,15 +1541,15 @@ \ifdisplaysectionhead\else\expandafter\GotoPar\fi} \def\forcesectiontolist#1#2% - {\ifnaarlijst + {\ifwritetolist % we need to make sure that there is a number set (non % zero) else the list mechanism cannot determine the % level \bgroup - \stelkopnummerin[#1][+1]% traag, wordt \getvalue{\c!volgende...} - \setlistparameter\@@koppeling\c!expansie{\getvalue{\??ko#1\c!expansie}}% - \doschrijfnaarlijst\@@koppeling{}{#2}\v!kop - \stelkopnummerin[#1][-1]% traag, wordt \getvalue{\c!vorige...} + \setupheadnumber[#1][+1]% traag, wordt \getvalue{\c!next...} + \setlistparameter\@@koppeling\c!expansion{\getvalue{\??ko#1\c!expansion}}% + \dowritetolist\@@koppeling{}{#2}\v!head + \setupheadnumber[#1][-1]% traag, wordt \getvalue{\c!previous...} \egroup \fi} @@ -1562,14 +1571,14 @@ {\thisissomeinternal{\s!lst}{#1\currentsectionformat}% \setxvalue{\s!lst:#1}{\realfolio}% to be sure \setxvalue{\s!lst:#1\currentsectionformat}{\realfolio}% - \setxvalue{\e!vorigelokale#1}{\s!lst:#1\previoussectionformat}% - \setxvalue{\e!huidigelokale#1}{\s!lst:#1\currentsectionformat}% + \setxvalue{\e!previouslocal#1}{\s!lst:#1\previoussectionformat}% + \setxvalue{\e!currentlocal#1}{\s!lst:#1\currentsectionformat}% \doifelse{\currentsectionformat}{} {\setglobalcrossreference - {\e!vorige#1}{}{\realfolio}{}} + {\e!previous#1}{}{\realfolio}{}} % {\setglobalsystemreference\rt!list - {\e!vorige#1}{\getvalue{\e!vorigelokale#1}}}% + {\e!previous#1}{\getvalue{\e!previouslocal#1}}}% % % {\definereference[\e!vorige#1][\getvalue{\e!vorigelokale#1}]% % @@ -1583,7 +1592,7 @@ {\def\docommando####1% % {\setglobalsystemreference\rt!list - {\e!vorige####1}{\getvalue{\e!huidigelokale####1}}}% + {\e!previous####1}{\getvalue{\e!currentlocal####1}}}% % % {\definereference[\e!vorige####1][\getvalue{\e!huidigelokale####1}]% % @@ -1601,28 +1610,26 @@ % \onderwerp{test} \strut \input tufte % \onderwerp{test} \plaatslijst[...] -\newif\ifheadnumbercontent % niet meer wijzigen / wordt mode - % todo: kap % to be documented: \placeheadtext \placeheadnumber \unexpanded\def\placeheadtext {\doquintupleempty\doplaceheadtextornumber - [\c!tekstletter][\c!tekstkleur][\empty]} + [\c!textstyle][\c!textcolor][\empty]} \unexpanded\def\placeheadnumber {\doquintupleempty\doplaceheadtextornumber - [\c!nummerletter][\c!nummerkleur][\v!nummer]} + [\c!numberstyle][\c!numbercolor][\v!number]} \def\doplaceheadtextornumber[#1][#2][#3][#4][#5]% {\bgroup \edef\@@sectie{\??ko\iffifthargument#5\else#4\fi}% - \dostartattributes\@@sectie\c!letter\c!kleur\empty + \dostartattributes\@@sectie\c!style\c!color\empty \dontconvertfont \dostartattributes\@@sectie{#1}{#2}\empty \setupinterlinespace - \begstrut\haalmarkering[\hoofdmarkering{#4#3}]\endstrut + \begstrut\getmarking[\mainmarking{#4#3}]\endstrut \endgraf \dostopattributes \dostopattributes @@ -1647,48 +1654,49 @@ \def\placeheadmargintexts#1% {\the\everyheadstart - \doifvalue{\??ko#1\c!margetekst}\v!ja\placemargintexts} + \doifvalue{\??ko#1\c!margintext}\v!yes\placemargincontent} -\def\doplaatskoptekst#1#2#3#4% +\def\doplaceheadtext#1#2#3#4% {\beginheadplacement{#1}% - \iflegekop % = needed + \ifemptyhead % = needed \setbox0=\ifvertical\vbox\else\hbox\fi to \zeropoint {\headnumbercontentfalse - \resetsystemmode\v!sectienummer + \resetsystemmode\v!sectionnumber #2}% \makestrutofbox0 \else % = needed \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox {\headnumbercontentfalse - \resetsystemmode\v!sectienummer + \resetsystemmode\v!sectionnumber % less interfering \ifcase\headtimingmode\or#2\fi % outerside font determines distance - \dosetfontattribute{\??ko#1}\c!letter + \dosetfontattribute{\??ko#1}\c!style % but we don't want color to influence user commands % todo: get the if-else out of it - \getvalue{\??ko#1\c!commando} + \getvalue{\??ko#1\c!command} {} % no number - {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty - \dostartattributes{\??ko#1}\c!tekstletter\c!tekstkleur\empty + {\dostartattributes{\??ko#1}\c!style\c!color\empty + \dostartattributes{\??ko#1}\c!textstyle\c!textcolor\empty \dontconvertfont \ifdisplaysectionhead \setupinterlinespace \else \setupspacing \fi +% overwegen \dontleavehmode, else unwanted cr due to #2 \ifcase\headtimingmode#2\fi - \getvalue{\??ko#1\c!voorcommando}% + \getvalue{\??ko#1\c!commandbefore}% \placeheadmargintexts{#1}% binnen #3? \ifdisplaysectionhead - \getvalue{\??ko#1\c!tekstcommando}% + \getvalue{\??ko#1\c!textcommand}% {\setstrut\begstrut#3\endstrut}% \xdef\localheaddepth{\the\strutdp}% % == \globallet\localheaddepth\strutdepth \else - \getvalue{\??ko#1\c!tekstcommando}{#3}% + \getvalue{\??ko#1\c!textcommand}{#3}% \fi - \getvalue{\??ko#1\c!nacommando}% + \getvalue{\??ko#1\c!commandafter}% \ifdisplaysectionhead\endgraf\fi \dostopattributes \dostopattributes}}% @@ -1697,55 +1705,56 @@ \def\doplaatskopnummertekst#1#2#3#4#5% maybe move modes outside box {\beginheadplacement{#1}% - \iflegekop % = needed + \ifemptyhead % = needed \setbox0=\ifvertical\vbox\else\hbox\fi to \zeropoint {\doiftextelse{#3} - {\setsystemmode \v!sectienummer\headnumbercontenttrue } - {\resetsystemmode\v!sectienummer\headnumbercontentfalse}% + {\setsystemmode \v!sectionnumber\headnumbercontenttrue } + {\resetsystemmode\v!sectionnumber\headnumbercontentfalse}% #2}% \makestrutofbox0 \else % = needed \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox {\doiftextelse{#3} - {\setsystemmode \v!sectienummer\headnumbercontenttrue } - {\resetsystemmode\v!sectienummer\headnumbercontentfalse}% + {\setsystemmode \v!sectionnumber\headnumbercontenttrue } + {\resetsystemmode\v!sectionnumber\headnumbercontentfalse}% % less interfering \ifcase\headtimingmode\or#2\fi % outerside font determines distance - \dosetfontattribute{\??ko#1}\c!letter + \dosetfontattribute{\??ko#1}\c!style % but we don't want color to influence user commands - \getvalue{\??ko#1\c!commando}% - {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty - \dostartattributes{\??ko#1}\c!nummerletter\c!nummerkleur\empty - \getvalue{\??ko#1\c!voorcommando}% + \getvalue{\??ko#1\c!command}% + {\dostartattributes{\??ko#1}\c!style\c!color\empty + \dostartattributes{\??ko#1}\c!numberstyle\c!numbercolor\empty + \getvalue{\??ko#1\c!commandbefore}% \placeheadmargintexts{#1}% binnen #3? \ifdisplaysectionhead - \getvalue{\??ko#1\c!nummercommando}% + \getvalue{\??ko#1\c!numbercommand}% {\setstrut\begstrut#3\endstrut}% \else - \getvalue{\??ko#1\c!nummercommando}{#3}% + \getvalue{\??ko#1\c!numbercommand}{#3}% \fi \dostopattributes \dostopattributes} - {\dostartattributes{\??ko#1}\c!letter\c!kleur\empty - \dostartattributes{\??ko#1}\c!tekstletter\c!tekstkleur\empty + {\dostartattributes{\??ko#1}\c!style\c!color\empty + \dostartattributes{\??ko#1}\c!textstyle\c!textcolor\empty \dontconvertfont \ifdisplaysectionhead \setupinterlinespace \else \setupspacing \fi +% overwegen \dontleavehmode, else unwanted cr due to #2 \ifcase\headtimingmode#2\fi \placeheadmargintexts{#1}% binnen #3? \ifdisplaysectionhead - \getvalue{\??ko#1\c!tekstcommando}% + \getvalue{\??ko#1\c!textcommand}% {\setstrut\begstrut#4\endstrut}% \xdef\localheaddepth{\the\strutdp}% % == \globallet\localheaddepth\strutdepth \else - \getvalue{\??ko#1\c!tekstcommando}{#4}% + \getvalue{\??ko#1\c!textcommand}{#4}% \fi - \getvalue{\??ko#1\c!nacommando}% + \getvalue{\??ko#1\c!commandafter}% \ifdisplaysectionhead\endgraf\fi \dostopattributes \dostopattributes}}% @@ -1754,7 +1763,6 @@ \newsignal\headsignal \let\headlastlinewidth\!!zeropoint -\newif\ifcontinuoushead \def\beginheadplacement#1% {\bgroup @@ -1763,9 +1771,9 @@ \gdef\localheaddepth{\strutdp}% % == \globallet\localheaddepth\strutdp \everypar\emptytoks % needed indeed - \noindent % ipv \witruimte elders, na \forgetall ! + \noindent % ipv \whitespace elders, na \forgetall ! \bgroup - \doifelsevalue{\??ko#1\c!titeluitlijnen}\v!ja % new + \doifelsevalue{\??ko#1\c!aligntitle}\v!yes % new {\skip0 1\leftskip \skip2 1\rightskip \xdef\localheadskip{\the\skip0}% @@ -1776,19 +1784,18 @@ \forgetbothskips} {\globallet\localheadskip\!!zeropoint \forgetall}% - \mindermeldingen + \dontcomplain \postponefootnotes \iflocation\ifdisplaysectionhead\else\noninterferingmarks\fi\fi - \resetinteractionparameter\c!letter - \resetinteractionparameter\c!kleur - \resetinteractionparameter\c!contrastkleur + \resetinteractionparameter\c!style + \resetinteractionparameter\c!color + \resetinteractionparameter\c!contrastcolor \strictouterreferencestrue % tzt instelling - \def\localheadsetup% - {\dolocalheadsetup{#1}}% - \startsynchronisatie} + \def\localheadsetup{\dolocalheadsetup{#1}}% + \startsynchronization} \def\endheadplacement#1#2% - {\doifelsevalue{\??rf#1\c!status}\v!start + {\doifelsevalue{\??rf#1\c!state}\v!start {\doifvaluenothing{\??ko#1\c!file}{\autocrossdocumentfalse}} {\autocrossdocumentfalse}% % no message needed here, should be a proper switch @@ -1797,7 +1804,7 @@ \let\headlastlinewidth\!!zeropoint \snaptogrid[\getvalue{\??ko#1\c!grid}]\hbox {\hskip\localheadskip - \hskip\getvalue{\??ko#1\c!marge}\relax + \hskip\getvalue{\??ko#1\c!margin}\relax \iflocation \ifautocrossdocument \doifreferencefoundelse{\getvalue{\??ko#1\c!file}::#1} @@ -1821,7 +1828,7 @@ \iflocation \ifautocrossdocument \hhboxindent=\ifcontinuoushead\headlastlinewidth\else\zeropoint\fi - \unhhbox0\with{\naarbox{\box\hhbox}[\getvalue{\??ko#1\c!file}::#1]}% + \unhhbox0\with{\gotobox{\box\hhbox}[\getvalue{\??ko#1\c!file}::#1]}% \advance\lasthhboxwidth by \numberheaddistance \xdef\headlastlinewidth{\the\lasthhboxwidth}% \else @@ -1837,14 +1844,14 @@ \hskip\dimen0 \!!plus \dimen0 \!!minus .25\dimen0 \hskip\headsignal\ignorespaces \fi - \ifdisplaysectionhead + \ifdisplaysectionhead \ifvmode \ifgridsnapping % important, font related depth, see comment \prevdepth\strutdp \else \prevdepth\localheaddepth \fi - \fi - \stopsynchronisatie + \fi \fi + \stopsynchronization \egroup \egroup \ifdisplaysectionhead @@ -1869,7 +1876,7 @@ #1{#2}% \fi} -\def\dostelkopnummerin[#1][#2#3]% todo: = (don't reset) +\def\dosetupheadnumber[#1][#2#3]% todo: = (don't reset) {\bgroup \setsectieenkoppeling{#1}% \doifinstringelse{#2}{+-} @@ -1881,33 +1888,33 @@ {\@@setsectionnumber\@@sectie{#2#3}}% \egroup} -\def\stelkopnummerin - {\dodoubleargument\dostelkopnummerin} +\def\setupheadnumber + {\dodoubleargument\dosetupheadnumber} -\def\huidigekopnummer{0} +\def\currentheadnumber{0} -\def\bepaalkopnummer[#1]% +\def\determineheadnumber[#1]% {\bgroup \setsectieenkoppeling{#1}% - \xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}% + \xdef\currentheadnumber{\@@sectionvalue{\@@sectie}}% \egroup} -\def\complexkopnummer[#1]% +\def\complexheadnumber[#1]% {\bgroup - \edef\huidigekopnummer{#1}% + \edef\currentheadnumber{#1}% \doifinsetelse{-}{#1} % br undocumented - {\removefromcommalist{-}\huidigekopnummer % br - \setsectieenkoppeling\huidigekopnummer - \stelsectiein[\@@sectie][\c!vorigenummer=\v!nee]}% - {\setsectieenkoppeling\huidigekopnummer}% - \xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}% - \doifnot{\huidigekopnummer}{0}{\finalsectionnumber}% + {\removefromcommalist{-}\currentheadnumber % br + \setsectieenkoppeling\currentheadnumber + \setupsection[\@@sectie][\c!previousnumber=\v!no]}% + {\setsectieenkoppeling\currentheadnumber}% + \xdef\currentheadnumber{\@@sectionvalue{\@@sectie}}% + \doifnot{\currentheadnumber}{0}{\finalsectionnumber}% \egroup} -\def\simplekopnummer - {\huidigekopnummer} +\def\simpleheadnumber + {\currentheadnumber} -\definecomplexorsimple\kopnummer +\definecomplexorsimple\headnumber \def\alinea {\par} @@ -1926,7 +1933,7 @@ % \input tufte \par % \stopnarrower -\let\numberheadalternative\v!normaal +\let\numberheadalternative\v!normal \def\defineheadplacement {\dodoubleargument\dodefineheadplacement} @@ -1938,14 +1945,14 @@ \def\@@placehead {\executeifdefined {\??ko::\numberheadalternative} - {\getvalue{\??ko::\v!normaal}}} + {\getvalue{\??ko::\v!normal}}} -\defineheadplacement[\v!alinea][\v!vertikaal]#1#2% +\defineheadplacement[\v!paragraph][\v!vertical]#1#2% {\vbox {\localheadsetup \begstrut\ifheadnumbercontent#1\hskip\numberheaddistance\fi#2}} -\defineheadplacement[\v!normaal][\v!vertikaal]#1#2% +\defineheadplacement[\v!normal][\v!vertical]#1#2% {\ifheadnumbercontent \setbox0\hbox{{#1}\hskip\numberheaddistance}% \vbox @@ -1987,14 +1994,14 @@ \begstrut % use one \strut here! \ifheadnumbercontent \llap{\hbox to 5em{\hfill{#1}% - \hskip\localheadskip\hskip\linkermargeafstand}}% + \hskip\localheadskip\hskip\leftmargindistance}}% \fi {#2}}} -\defineheadplacement[\v!inmarge][\v!vertikaal]#1#2{\placeheadmargin{#1}{#2}} -\defineheadplacement[\v!marge] [\v!vertikaal]#1#2{\placeheadmargin{#1}{#2}} +\defineheadplacement[\v!inmargin][\v!vertical]#1#2{\placeheadmargin{#1}{#2}} +\defineheadplacement[\v!margin] [\v!vertical]#1#2{\placeheadmargin{#1}{#2}} -\defineheadplacement[\v!midden][\v!vertikaal]#1#2% +\defineheadplacement[\v!middle][\v!vertical]#1#2% {\vbox {\localheadsetup \veryraggedcenter @@ -2002,7 +2009,7 @@ \let\crlf\endgraf \ifheadnumbercontent\strut#1\par\fi\begstrut#2}} -\defineheadplacement[\v!tekst][\v!horizontaal]#1#2% +\defineheadplacement[\v!text][\v!horizontal]#1#2% {\bgroup \localheadsetup % no stretch in distance \ifheadnumbercontent{#1}\kern\numberheaddistance\fi{\begstrut#2}% @@ -2020,360 +2027,353 @@ % onder/boven lijnt het nummer op de onderste/bovenste regel % uit van een meerregelige kop -\defineheadplacement[\v!onder][\v!vertikaal]#1#2{\placeheadlohi\vbox{#1}{#2}} -\defineheadplacement[\v!boven][\v!vertikaal]#1#2{\placeheadlohi\vtop{#1}{#2}} +\defineheadplacement[\v!bottom][\v!vertical]#1#2{\placeheadlohi\vbox{#1}{#2}} +\defineheadplacement[\v!top][\v!vertical]#1#2{\placeheadlohi\vtop{#1}{#2}} % default == instellingen % koppeling == koppen, breaks, marks, enz. % sectie == nummering -\let\@@kolijst=\empty +\let\@@kolist=\empty -\def\dodefinieerkop[#1][#2]% % don't preset prefix to much +\def\dodefinehead[#1][#2]% % don't preset prefix to much {\presetlabeltext[#1=]% \getparameters [\??ko#1] - [\c!nummerletter=\getvalue{\??ko#1\c!letter}, - \c!tekstletter=\getvalue{\??ko#1\c!letter}, - \c!nummerkleur=\getvalue{\??ko#1\c!kleur}, - \c!tekstkleur=\getvalue{\??ko#1\c!kleur}]% + [\c!numberstyle=\getvalue{\??ko#1\c!style}, + \c!textstyle=\getvalue{\??ko#1\c!style}, + \c!numbercolor=\getvalue{\??ko#1\c!color}, + \c!textcolor=\getvalue{\??ko#1\c!color}]% \doifassignmentelse{#2} {\getparameters [\??ko#1] - [\c!sectie=\getvalue{\??ko\getvalue{\??ko#1\c!koppeling}\c!sectie}, + [\c!section=\getvalue{\??ko\getvalue{\??ko#1\c!coupling}\c!section}, \c!default=, - \c!koppeling=, + \c!coupling=, \c!prefix=, - \c!voor=, - \c!na=, - \c!afstand=\!!zeropoint, - \c!pagina=, - \c!hoofd=, - \c!tekst=, - \c!voet=, - \c!letter=, - \c!nummercommando=, - \c!tekstcommando=, - \c!eigennummer=\v!nee, - \c!nummer=\v!ja, - \c!kleur=, - \c!doorgaan=\v!ja, - \c!plaatskop=\v!ja, - \c!resetnummer=\v!ja, - \c!verhoognummer=\v!ja, - \c!variant=\@@kovariant, - \c!commando=\@@placehead, - \c!scheider=\@@koscheider, - \c!uitlijnen=\@@kouitlijnen, - \c!titeluitlijnen=\@@kotiteluitlijnen, - \c!tolerantie=\@@kotolerantie, - \c!springvolgendein=\@@kospringvolgendein, + \c!before=, + \c!after=, + \c!distance=\!!zeropoint, + \c!page=, + \c!header=, + \c!text=, + \c!footer=, + \c!style=, + \c!numbercommand=, + \c!textcommand=, + \c!ownnumber=\v!no, + \c!number=\v!yes, + \c!color=, + \c!continue=\v!yes, + \c!placehead=\v!yes, + \c!resetnumber=\v!yes, + \c!incrementnumber=\v!yes, + \c!alternative=\@@koalternative, + \c!command=\@@placehead, + \c!separator=\@@koseparator, + \c!align=\@@koalign, + \c!aligntitle=\@@koaligntitle, + \c!tolerance=\@@kotolerance, + \c!indentnext=\@@koindentnext, \c!file=, - \c!expansie=, + \c!expansion=, \c!grid=, - \c!margetekst=, - \c!marge=\@@komarge, + \c!margintext=, + \c!margin=\@@komargin, #2]% \ConvertToConstant\doifnot{#1}{\getvalue{\??ko#1\c!default}} {\doifsomething{\getvalue{\??ko#1\c!default}} {\copyparameters [\??ko#1][\??ko\getvalue{\??ko#1\c!default}] - [\c!voor,\c!na,\c!commando,\c!file,\c!pagina,\c!doorgaan, - \c!hoofd,\c!tekst,\c!voet,\c!scheider,\c!resetnummer, - \c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer, - \c!letter,\c!kleur,\c!afstand,\c!variant,\c!springvolgendein, + [\c!before,\c!after,\c!command,\c!file,\c!page,\c!continue, + \c!header,\c!text,\c!footer,\c!separator,\c!resetnumber, + \c!number,\c!ownnumber,\c!placehead,\c!incrementnumber, + \c!style,\c!color,\c!distance,\c!alternative,\c!indentnext, % new per 20/03/3002 (o-pbu-l) / was too confusing - % \c!nummerletter,\c!tekstletter,\c!expansie, + % \c!numberstyle,\c!textstyle,\c!expansion, % again too confusing - \c!uitlijnen,\c!titeluitlijnen,\c!tolerantie,\c!grid, - \c!nummercommando,\c!tekstcommando,\c!margetekst,\c!marge]}}% + \c!align,\c!aligntitle,\c!tolerance,\c!grid, + \c!numbercommand,\c!textcommand,\c!margintext,\c!margin]}}% \getparameters[\??ko#1][#2]% - \doifsomething{\getvalue{\??ko#1\c!sectie}} + \doifsomething{\getvalue{\??ko#1\c!section}} {\doifelsemarking{#1}% \doifundefined{\??mk#1} {}% marking #1 already defined - {\definieermarkering[#1]% - \koppelmarkering[#1][\getvalue{\??ko#1\c!sectie}]% - \definieermarkering[#1\v!nummer]% + {\definemarking[#1]% + \couplemarking[#1][\getvalue{\??ko#1\c!section}]% + \definemarking[#1\v!number]% % klopt dit wel ? - \koppelmarkering[#1\v!nummer][\getvalue{\??ko#1\c!sectie}]}}% -% \koppelmarkering[#1\v!nummer][\getvalue{\??ko#1\c!sectie}\v!nummer]}}% - \doifundefined{\??li#1}{\definieerlijst[#1]}} + \couplemarking[#1\v!number][\getvalue{\??ko#1\c!section}]}}% +% \couplemarking[#1\v!nummer][\getvalue{\??ko#1\c!sectie}\v!nummer]}}% + \doifundefined{\??li#1}{\definelist[#1]}} {\ConvertToConstant\doifelse{#1}{#2} - {\doifundefined{\??li#1}{\definieerlijst[#1]}} + {\doifundefined{\??li#1}{\definelist[#1]}} {\copyparameters [\??ko#1][\??ko#2] - [\c!niveau,\c!sectie,\c!koppeling,\c!prefix, - \c!voor,\c!na,\c!commando,\c!file,\c!pagina,\c!doorgaan, - \c!scheider, - \c!hoofd,\c!tekst,\c!voet,\c!resetnummer, - \c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer, - \c!letter,\c!kleur,\c!afstand,\c!variant,\c!springvolgendein, + [\c!level,\c!section,\c!coupling,\c!prefix, + \c!before,\c!after,\c!command,\c!file,\c!page,\c!continue, + \c!separator, + \c!header,\c!text,\c!footer,\c!resetnumber, + \c!number,\c!ownnumber,\c!placehead,\c!incrementnumber, + \c!style,\c!color,\c!distance,\c!alternative,\c!indentnext, % new per 20/03/3002 (o-pbu-l) / was too confusing - % \c!nummerletter,\c!tekstletter,\c!expansie, + % \c!numberstyle,\c!textstyle,\c!expansion, % again too confusing - \c!uitlijnen,\c!titeluitlijnen,\c!tolerantie,\c!grid, - \c!nummercommando,\c!tekstcommando,\c!margetekst,\c!marge]% -\getparameters[\??ko#1][\c!expansie=]% iig een value, rather fuzzy - \definieermarkering[#1][#2]% - \definieermarkering[#1\v!nummer][#2\v!nummer]% - \doifundefined{\??li#1}{\definieerlijst[#1][#2]}}}% - \addtocommalist{#1}\@@kolijst - \setevalue{\??sk#1}% - {\getvalue{\??ko#1\c!koppeling}}% - \setevalue{\??by#1}% - {\getvalue{\??ko#1\c!sectie}}% - \setevalue{\??by\v!per#1}% - {\getvalue{\??ko#1\c!sectie}}% - \setvalue{#1}% - {\dodoubleempty\dosomekop[#1]}} - -\def\definieerkop - {\dodoubleemptywithset\dodefinieerkop} + \c!align,\c!aligntitle,\c!tolerance,\c!grid, + \c!numbercommand,\c!textcommand,\c!margintext,\c!margin]% +\getparameters[\??ko#1][\c!expansion=]% iig een value, rather fuzzy + \definemarking[#1][#2]% + \definemarking[#1\v!number][#2\v!number]% + \doifundefined{\??li#1}{\definelist[#1][#2]}}}% + \addtocommalist{#1}\@@kolist + \setevalue{\??sk#1}{\getvalue{\??ko#1\c!coupling}}% + \setevalue{\??by#1}{\getvalue{\??ko#1\c!section}}% + \setevalue{\??by\v!by#1}{\getvalue{\??ko#1\c!section}}% + \setvalue{#1}{\dodoubleempty\dosomekop[#1]}} + +\def\definehead + {\dodoubleemptywithset\dodefinehead} \def\dosomekop[#1][#2]% {\dowithpargument{\dodosomekop{#1}[#2]}} -\def\dostelkopin[#1][#2]% +\def\dosetuphead[#1][#2]% {\getparameters[\??ko#1][#2]% % The next check prevents hard to trace problems. I once - % set \c!commando to nothing and (quite natural) got the + % set \c!command to nothing and (quite natural) got the % wrong references etc. The whole bunch should be boxed! - \expandafter\convertcommand\csname\??ko#1\c!commando\endcsname\to\ascii - \doifnothing\ascii{\setvalue{\??ko#1\c!commando}{\@@placehead}}} - -\def\stelkopin - {\dodoubleargumentwithset\dostelkopin} + \expandafter\convertcommand\csname\??ko#1\c!command\endcsname\to\ascii + \doifnothing\ascii{\setvalue{\??ko#1\c!command}{\@@placehead}}} -\newif\ifsectienummer \sectienummertrue -\newif\ifdisplaysectionhead \displaysectionheadtrue +\def\setuphead + {\dodoubleargumentwithset\dosetuphead} -\def\dostelkoppenin[#1]% +\def\dosetupheads[#1]% {\getparameters[\??ko][#1]% - \doifelse{\@@kosectienummer}\v!ja\sectienummertrue\sectienummerfalse} + \doifelse{\@@kosectionnumber}\v!yes\sectienummertrue\sectienummerfalse} -\def\stelkoppenin - {\dosingleargument\dostelkoppenin} +\def\setupheads + {\dosingleargument\dosetupheads} -\def\systemsuppliedchapter {\getvalue{\v!hoofdstuk}} -\def\systemsuppliedtitle {\getvalue{\v!titel}} +\def\systemsuppliedchapter {\getvalue{\v!chapter}} +\def\systemsuppliedtitle {\getvalue{\v!title}} % a left over \def\complexbijlage[#1]#2% - {\pagina[\v!rechts] - \setuppagenumbering[\c!status=\v!stop] + {\page[\v!right] + \setuppagenumbering[\c!state=\v!stop] \systemsuppliedchapter[#1]{#2} - \pagina[\v!rechts] - \setuppagenumbering[\c!status=\v!start] - \setuppagenumbering[\c!nummer=1]} + \page[\v!right] + \setuppagenumbering[\c!state=\v!start] + \setuppagenumbering[\c!number=1]} -\setvalue{\v!bijlage}% +\setvalue{\v!appendix}% {\complexorsimpleempty\bijlage} -\stelkoppenin - [\c!variant=\v!normaal, - \c!sectienummer=\v!ja, - \c!scheider=., - \c!limittext=\v!ja, - \c!uitlijnen=, - \c!titeluitlijnen=, - \c!tolerantie=, - \c!springvolgendein=\v!nee, - \c!marge=\zeropoint, - \c!commando=] - -\definieersectieblok [\v!hoofdtekst] [\v!hoofdteksten] [\c!nummer=\v!ja] -\definieersectieblok [\v!bijlage] [\v!bijlagen] [\c!nummer=\v!ja] -\definieersectieblok [\v!inleiding] [\v!inleidingen] [\c!nummer=\v!nee] -\definieersectieblok [\v!uitleiding] [\v!uitleidingen] [\c!nummer=\v!nee] - -\definieersectie[\v!sectionlevel-1] % deel -\definieersectie[\v!sectionlevel-2] % hoofdstuk -\definieersectie[\v!sectionlevel-3] % paragraaf -\definieersectie[\v!sectionlevel-4] % subparagraaf -\definieersectie[\v!sectionlevel-5] % subsubparagraaf -\definieersectie[\v!sectionlevel-6] % subsubsubparagraaf -\definieersectie[\v!sectionlevel-7] % subsubsubsubparagraaf +\setupheads + [\c!alternative=\v!normal, + \c!sectionnumber=\v!yes, + \c!separator=., + \c!limittext=\v!yes, + \c!align=, + \c!aligntitle=, + \c!tolerance=, + \c!indentnext=\v!no, + \c!margin=\zeropoint, + \c!command=] + +\definesectionblock [\v!bodypart] [\v!bodymatter] [\c!number=\v!yes] +\definesectionblock [\v!appendix] [\v!appendices] [\c!number=\v!yes] +\definesectionblock [\v!frontpart] [\v!frontmatter] [\c!number=\v!no] +\definesectionblock [\v!backpart] [\v!backmatter] [\c!number=\v!no] + +\definesection[\v!sectionlevel-1] % deel +\definesection[\v!sectionlevel-2] % hoofdstuk +\definesection[\v!sectionlevel-3] % paragraaf +\definesection[\v!sectionlevel-4] % subparagraaf +\definesection[\v!sectionlevel-5] % subsubparagraaf +\definesection[\v!sectionlevel-6] % subsubsubparagraaf +\definesection[\v!sectionlevel-7] % subsubsubsubparagraaf % \c!eigennummer ook hier? -\definieerkop - [\v!deel] - [\c!sectie=\v!sectionlevel-1] - -\definieerkop - [\v!hoofdstuk] - [\c!sectie=\v!sectionlevel-2] - -\definieerkop - [\v!paragraaf] - [\c!sectie=\v!sectionlevel-3] - -\definieerkop - [\v!sub\v!paragraaf] - [\c!sectie=\v!sectionlevel-4, - \c!default=\v!paragraaf] - -\definieerkop - [\v!sub\v!sub\v!paragraaf] - [\c!sectie=\v!sectionlevel-5, - %\c!default=\v!paragraaf] - \c!default=\v!sub\v!paragraaf] % nieuw - -\definieerkop - [\v!sub\v!sub\v!sub\v!paragraaf] - [\c!sectie=\v!sectionlevel-6, - %\c!default=\v!paragraaf] - \c!default=\v!sub\v!sub\v!paragraaf] % nieuw - -\definieerkop - [\v!sub\v!sub\v!sub\v!sub\v!paragraaf] - [\c!sectie=\v!sectionlevel-7, - %\c!default=\v!paragraaf] - \c!default=\v!sub\v!sub\v!sub\v!paragraaf] % nieuw - -\definieerkop - [\v!titel] - [\c!koppeling=\v!hoofdstuk, - \c!default=\v!hoofdstuk, - \c!verhoognummer=\v!nee] - -\definieerkop - [\v!onderwerp] - [\c!koppeling=\v!paragraaf, - \c!default=\v!paragraaf, - \c!verhoognummer=\v!nee] - -\definieerkop - [\v!sub\v!onderwerp] - [\c!koppeling=\v!sub\v!paragraaf, - \c!default=\v!sub\v!paragraaf, - \c!verhoognummer=\v!nee] - -\definieerkop - [\v!sub\v!sub\v!onderwerp] - [\c!koppeling=\v!sub\v!sub\v!paragraaf, - \c!default=\v!sub\v!sub\v!paragraaf, - \c!verhoognummer=\v!nee] - -\definieerkop - [\v!sub\v!sub\v!sub\v!onderwerp] - [\c!koppeling=\v!sub\v!sub\v!sub\v!paragraaf, - \c!default=\v!sub\v!sub\v!sub\v!paragraaf, - \c!verhoognummer=\v!nee] - -\definieerkop - [\v!sub\v!sub\v!sub\v!sub\v!onderwerp] - [\c!koppeling=\v!sub\v!sub\v!sub\v!sub\v!paragraaf, - \c!default=\v!sub\v!sub\v!sub\v!sub\v!paragraaf, - \c!verhoognummer=\v!nee] - -\stelsectiein +\definehead + [\v!part] + [\c!section=\v!sectionlevel-1] + +\definehead + [\v!chapter] + [\c!section=\v!sectionlevel-2] + +\definehead + [\v!section] + [\c!section=\v!sectionlevel-3] + +\definehead + [\v!subsection] + [\c!section=\v!sectionlevel-4, + \c!default=\v!section] + +\definehead + [\v!subsubsection] + [\c!section=\v!sectionlevel-5, + %\c!default=\v!section] + \c!default=\v!subsection] % nieuw + +\definehead + [\v!subsubsubsection] + [\c!section=\v!sectionlevel-6, + %\c!default=\v!section] + \c!default=\v!subsubsection] % nieuw + +\definehead + [\v!subsubsubsubsection] + [\c!section=\v!sectionlevel-7, + %\c!default=\v!section] + \c!default=\v!subsubsubsection] % nieuw + +\definehead + [\v!title] + [\c!coupling=\v!chapter, + \c!default=\v!chapter, + \c!incrementnumber=\v!no] + +\definehead + [\v!subject] + [\c!coupling=\v!section, + \c!default=\v!section, + \c!incrementnumber=\v!no] + +\definehead + [\v!subsubject] + [\c!coupling=\v!subsection, + \c!default=\v!subsection, + \c!incrementnumber=\v!no] + +\definehead + [\v!subsubsubject] + [\c!coupling=\v!subsubsection, + \c!default=\v!subsubsection, + \c!incrementnumber=\v!no] + +\definehead + [\v!subsubsubsubject] + [\c!coupling=\v!subsubsubsection, + \c!default=\v!subsubsubsection, + \c!incrementnumber=\v!no] + +\definehead + [\v!subsubsubsubsubject] + [\c!coupling=\v!subsubsubsubsection, + \c!default=\v!subsubsubsubsection, + \c!incrementnumber=\v!no] + +\setupsection [\v!sectionlevel-2] - [\v!bijlage\c!conversie=\v!Letter, - \c!vorigenummer=\v!nee] - -\stelkopin - [\v!deel] - [\c!plaatskop=\v!nee] - -\stelkopin - [\v!hoofdstuk] - [\v!bijlage\c!label=\v!bijlage, - \v!hoofdtekst\c!label=\v!hoofdstuk] % bijlageconversie=\Character - -\stelkopin - [\v!paragraaf] - [\v!bijlage\c!label=\v!paragraaf, - \v!hoofdtekst\c!label=\v!paragraaf] % bijlageconversie=\Character - -\stelkopin - [\v!sub\v!paragraaf] - [\v!bijlage\c!label=\v!sub\v!paragraaf, - \v!hoofdtekst\c!label=\v!sub\v!paragraaf] % bijlageconversie=\Character - -\stelkopin - [\v!sub\v!sub\v!paragraaf] - [\v!bijlage\c!label=\v!sub\v!sub\v!paragraaf, - \v!hoofdtekst\c!label=\v!sub\v!sub\v!paragraaf] % bijlageconversie=\Character - -\stelkopin - [\v!deel,\v!hoofdstuk] - [%\c!uitlijnen=, - %\c!springvolgendein=\v!nee, - \c!doorgaan=\v!nee, - \c!pagina=\v!rechts, - \c!hoofd=, - \c!letter=\tfc, - \c!afstand=.75em, - \c!voor={\blanko[2*\v!groot]}, - \c!na={\blanko[2*\v!groot]}] - -\stelkopin - [\v!paragraaf] - [%\c!uitlijnen=, - %\c!springvolgendein=\v!nee, - \c!letter=\tfa, - \c!afstand=.75em, - \c!voor={\blanko[2*\v!groot]}, - \c!na=\blanko] - -\stelkopin % nieuw - [\v!sub\v!paragraaf] - [\c!pagina=] - -\definieersamengesteldelijst - [\v!inhoud] - [\v!deel, - \v!hoofdstuk, - \v!paragraaf, - \v!sub\v!paragraaf, - \v!sub\v!sub\v!paragraaf, - \v!sub\v!sub\v!sub\v!paragraaf, - \v!sub\v!sub\v!sub\v!sub\v!paragraaf] - [\c!niveau=\v!sub\v!sub\v!sub\v!sub\v!paragraaf, - \c!criterium=\v!lokaal] - -\stellijstin - [\v!deel] - [\c!voor={\blanko\pagina[\v!voorkeur]}, - \c!na=\blanko, - \c!label=\v!ja, - \c!scheider=:, - \c!afstand=1em] - -\stellijstin - [\v!hoofdstuk] - [\c!voor={\blanko\pagina[\v!voorkeur]}, - \c!na=] - -\stellijstin [\v!deel] [\c!breedte=0em] -\stellijstin [\v!hoofdstuk] [\c!breedte=2em] -\stellijstin [\v!paragraaf] [\c!breedte=3em] -\stellijstin [\v!sub\v!paragraaf] [\c!breedte=4em] -\stellijstin [\v!sub\v!sub\v!paragraaf] [\c!breedte=5em] -\stellijstin [\v!sub\v!sub\v!sub\v!paragraaf] [\c!breedte=6em] -\stellijstin [\v!sub\v!sub\v!sub\v!sub\v!paragraaf] [\c!breedte=7em] + [\v!appendix\c!conversion=\v!Character, + \c!previousnumber=\v!no] + +\setuphead + [\v!part] + [\c!placehead=\v!no] + +\setuphead + [\v!chapter] + [\v!appendix\c!label=\v!appendix, + \v!bodypart\c!label=\v!chapter] % bijlageconversie=\Character + +\setuphead + [\v!section] + [\v!appendix\c!label=\v!section, + \v!bodypart\c!label=\v!section] % bijlageconversie=\Character + +\setuphead + [\v!subsection] + [\v!appendix\c!label=\v!subsection, + \v!bodypart\c!label=\v!subsection] % bijlageconversie=\Character + +\setuphead + [\v!subsubsection] + [\v!appendix\c!label=\v!subsubsection, + \v!bodypart\c!label=\v!subsubsection] % bijlageconversie=\Character + +\setuphead + [\v!part,\v!chapter] + [%\c!align=, + %\c!indentnext=\v!no, + \c!continue=\v!no, + \c!page=\v!right, + \c!header=, + \c!style=\tfc, + \c!distance=.75em, + \c!before={\blank[2*\v!big]}, + \c!after={\blank[2*\v!big]}] + +\setuphead + [\v!section] + [%\c!align=, + %\c!indentnext=\v!no, + \c!style=\tfa, + \c!distance=.75em, + \c!before={\blank[2*\v!big]}, + \c!after=\blank] + +\setuphead % nieuw + [\v!subsection] + [\c!page=] + +\definecombinedlist + [\v!content] + [\v!part, + \v!chapter, + \v!section, + \v!subsection, + \v!subsubsection, + \v!subsubsubsection, + \v!subsubsubsubsection] + [\c!level=\v!subsubsubsubsection, + \c!criterium=\v!local] + +\setuplist + [\v!part] + [\c!before={\blank\page[\v!preference]}, + \c!after=\blank, + \c!label=\v!yes, + \c!separator=:, + \c!distance=1em] + +\setuplist + [\v!chapter] + [\c!before={\blank\page[\v!preference]}, + \c!after=] + +\setuplist [\v!part] [\c!width=0em] +\setuplist [\v!chapter] [\c!width=2em] +\setuplist [\v!section] [\c!width=3em] +\setuplist [\v!subsection] [\c!width=4em] +\setuplist [\v!subsubsection] [\c!width=5em] +\setuplist [\v!subsubsubsection] [\c!width=6em] +\setuplist [\v!subsubsubsubsection] [\c!width=7em] % hm \setuppagenumbering % na instellen hoofdteksten ! - [\c!variant=\v!enkelzijdig, - \c!plaats={\v!hoofd,\v!midden}, - \c!conversie=\v!cijfers, - \c!breedte=, % in geval van \v!kantlijn - \c!links=, - \c!rechts=, - \c!wijze=\v!per\v!deel, - \c!tekst=, - \v!hoofdstuk\v!nummer=\v!nee, % v - \v!deel\v!nummer=\v!ja, % v - \c!nummerscheider=--, - \c!tekstscheider=\tfskip, - \c!status=\v!start, - \c!commando=, - \c!strut=\v!ja, % nieuw - \c!letter=, % \v!normaal, % empty, otherwise conflict - \c!kleur=] - -\protect \endinput \ No newline at end of file + [\c!alternative=\v!singlesided, + \c!location={\v!header,\v!middle}, + \c!conversion=\v!numbers, + \c!width=, % in geval van \v!marginedge + \c!left=, + \c!right=, + \c!way=\v!by\v!part, + \c!text=, + \v!chapter\v!number=\v!no, % v + \v!part\v!number=\v!yes, % v + \c!numberseparator=--, + \c!textseparator=\tfskip, + \c!state=\v!start, + \c!command=, + \c!strut=\v!yes, % nieuw + \c!style=, % \v!normal, % empty, otherwise conflict + \c!color=] + +\protect \endinput diff --git a/tex/context/base/core-snc.tex b/tex/context/base/core-snc.tex index e80fd1613..55c6e15df 100644 --- a/tex/context/base/core-snc.tex +++ b/tex/context/base/core-snc.tex @@ -112,24 +112,19 @@ \def\dodoresyncposition #1#2{\dodosyncposition{#1}{#2}\s!reset} \def\dodopresyncposition#1#2{\dodosyncposition{#1}{#2}\s!preset} -\def\doresyncposition [#1][#2]{\setxvalue{\s!reset:\s!syncpos:#1}{\noexpand\dodoresyncposition{#1}{#2}}} +\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 +\def\flushsyncpositions % this order ! + {\the\presetsyncpositions + \the\resetsyncpositions} -\appendtoks \the \presetsyncpositions \to \everypar -\appendtoks \the \resetsyncpositions \to \everypar +% \appendtoks \flushsyncpositions \to \everypar +% \appendtoks \flushsyncpositions \to \everyheadstart % \explicitneverypar -> in grid snapper, eerst testen % -% \appendtoks \the\resetsyncpositions \to \neverypar -% \appendtoks \the\presetsyncpositions \to \neverypar - -\appendtoks - \the\presetsyncpositions - \the\resetsyncpositions -\to \everyheadstart +% \appendtoks \flushsyncpositions \to \neverypar \def\flushsyncxxsets#1#2% {\setbox\scratchbox\hbox{\the#1}% @@ -178,4 +173,4 @@ \syncposition[1][3] \input ward \endgraf \syncposition[1][4] \input ward \endgraf -\stoptext \ No newline at end of file +\stoptext diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex index 3de3a24db..416071374 100644 --- a/tex/context/base/core-spa.tex +++ b/tex/context/base/core-spa.tex @@ -13,18 +13,21 @@ \writestatus{loading}{Context Spacing Macros} +% to be sorted out: dependencies, orderof initialization + \unprotect \newevery \everybodyfont \Everybodyfont % just to be sure \newevery \everyfontswitch \EveryFontSwitch % just to be sure \newevery \everydefinedfont \relax % just to be sure +\appendtoks \spacing 1\to \everybodyfont \appendtoks \presetnormallineheight \to \everybodyfont -\appendtoks \setnormalbaselines \to \everybodyfont -\appendtoks \setstrut \to \everybodyfont +\appendtoks \setnormalbaselines \to \everybodyfont % check if redundant +\appendtoks \setstrut \to \everybodyfont % check if redundant \appendtoks \settopskip \to \everybodyfont \appendtoks \setmaxdepth \to \everybodyfont -\appendtoks \spacing 1\to \everybodyfont +%appendtoks \spacing 1\to \everybodyfont \appendtoks \simplesetupindenting \to \everybodyfont \appendtoks \simplesetupblank \to \everybodyfont \appendtoks \simplesetupwhitespace \to \everybodyfont @@ -32,11 +35,11 @@ \appendtoks \simplesetupspacing \to \everybodyfont % nieuw \appendtoks \setdisplayskips \to \everybodyfont % nieuw -\appendtoks \updateraggedskips \to \everyfontswitch % under test +\appendtoks \updateraggedskips \to \everyfontswitch % under test -\prependtoks \let\par\endgraf \to \everypagebody % see \fillinline +\prependtoks \let\par\endgraf \to \everypagebody % see \fillinline -\appendtoks \simplesetupspacing \to \everydefinedfont +\appendtoks \simplesetupspacing \to \everydefinedfont \def\stelfactorenin {\simplesetupwhitespace @@ -75,8 +78,8 @@ \global\let\carriedoverpar\relax \def\carryoverpar#1% - {\expanded - {\noexpand#1% + {\expanded % \scratchtoks{#1}% + {\noexpand#1% \the\scratchtoks \hangindent\the\hangindent \hangafter \the\hangafter \parskip \the\parskip @@ -86,9 +89,9 @@ %D A quick way to determine left|/|middle|/|right states %D (experimental). -\setvalue{\??as\v!links }{0} -\setvalue{\??as\v!midden}{1} -\setvalue{\??as\v!rechts}{2} +\setvalue{\??as\v!left }{0} +\setvalue{\??as\v!middle}{1} +\setvalue{\??as\v!right}{2} \def\setalignmentswitch#1% {\chardef\alignmentswitch0\csname\??as#1\endcsname\relax} @@ -100,23 +103,23 @@ %D %D For instance %D -%D \starttypen +%D \starttyping %D \setupinterlinespace[line=2.8ex] -%D \stoptypen +%D \stoptyping %D %D This setting adapts itself to the bodyfontsize, while for %D instance saying %D -%D \starttypen +%D \starttyping %D \setupinterlinespace[line=12pt] -%D \stoptypen +%D \stoptyping %D %D sets things fixed for all sizes, which is definitely not %D what we want. Therefore one can also say: %D -%D \starttypen +%D \starttyping %D \definebodyfontenvironment[9pt][interlinespace=11pt] -%D \stoptypen +%D \stoptyping %D %D One can still use \type{\setupinterlinespace} (without %D arguments) to set the interline space according to the @@ -134,7 +137,8 @@ \fi \def\presetnormallineheight - {\edef\normallineheight{\@@itregel}% + {\edef\normallineheight{\@@itline}% +% done elsewhere : \spacing\!!plusone % new per 10/08/2004, else problems in otr / !! needed \iflocalinterlinespace \else \doifdefined\bodyfontinterlinespecs {\doifsomething\bodyfontinterlinespace @@ -143,36 +147,37 @@ \def\setupspecifiedinterlinespace[#1]% {\getparameters[\??it][#1]% - \scratchdimen0\@@ithoogte\points - \advance\scratchdimen 0\@@itdiepte\points + \scratchdimen0\@@itheight\points + \advance\scratchdimen 0\@@itdepth\points \ifdim\scratchdimen>\onepoint - \showmessage\m!layouts{10}{\@@ithoogte,\@@itdiepte}% - \let\@@ithoogte\strutheightfactor - \let\@@itdiepte\strutdepthfactor + \showmessage\m!layouts{10}{\@@itheight,\@@itdepth}% + \let\@@itheight\strutheightfactor + \let\@@itdepth\strutdepthfactor \else - \let\strutheightfactor\@@ithoogte - \let\strutdepthfactor \@@itdiepte + \let\strutheightfactor\@@itheight + \let\strutdepthfactor \@@itdepth \fi - \let\minimallinedistance\@@itafstand - \let\normallineheight\@@itregel % let ! ! ! ! ! ivm ex - \let\topskipfactor\@@itboven - \let\maxdepthfactor\@@itonder - \let\baselinegluefactor\@@itrek + \let\minimumstrutheight \@@itminheight + \let\minimumstrutdepth \@@itmindepth + \let\minimallinedistance\@@itdistance + \let\normallineheight \@@itline % let ! ! ! ! ! ivm ex + \let\topskipfactor \@@ittop + \let\maxdepthfactor \@@itbottom + \let\baselinegluefactor \@@itstretch \setfontparameters % redundant, can be \setstrut, test first \updateraggedskips} % yes indeed \def\setuprelativeinterlinespace[#1]% {\processallactionsinset % \regelwit = dummy ! [#1] - [ \v!aan=>\oninterlineskip, - \v!uit=>\offinterlineskip, + [ \v!on=>\oninterlineskip, + \v!off=>\offinterlineskip, \v!reset=>\setfontparameters,% just \setstrut, test first \s!unknown=>\assignvalue{#1}\regelwit{1.00}{1.25}{1.50}% \spacing\regelwit]} \def\complexsetupinterlinespace[#1]% \commalistelement ipv #1 - {\doifassignmentelse{#1} - \setupspecifiedinterlinespace\setuprelativeinterlinespace[#1]} + {\doifassignmentelse{#1}\setupspecifiedinterlinespace\setuprelativeinterlinespace[#1]} \def\setuplocalinterlinespace[#1]% {\localinterlinespacetrue @@ -231,7 +236,7 @@ {\removelastskip} \def\currentblanko - {\v!groot} + {\v!big} \def\oldprevdepth {\prevdepth} \def\newprevdepth {-1001pt} @@ -243,8 +248,8 @@ %%%% pas op, wordt ook in core-pos gebruikt -\def\doassignsomeskip#1\to#2% ook nog \v!halveregel+fuzzysnap - {\doifelse{#1}\v!regel +\def\doassignsomeskip#1\to#2% ook nog \v!halfline+fuzzysnap + {\doifelse{#1}\v!line {#2\openlineheight} {\ifgridsnapping \assigndimension{#1}{#2}% @@ -262,7 +267,7 @@ % {\doassignsomeskip#1\to\blankoskipamount % \global\advance\blankoskip \blankoskipamount} % -% \def\doblanko#1% +% \def\doblank#1% % {\processallactionsinset % is maar een actie % [#1] % [ \v!groot=>\dosingleblanko\v!groot, % happens often @@ -282,7 +287,7 @@ % \global\advance\blankoskip .5\lineheight, % \s!unknown=>\doindirectblanko{#1}]} % -% \def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if +% \def\docomplexdoblank[#1]% pas op \relax's zijn nodig ivm volgende \if % {\global\blankoresetfalse % \global\blankoblokkeerfalse % \global\blankogeenwitfalse @@ -291,7 +296,7 @@ % \global\blankoskip\zeropoint % \global\blankoforceerfalse % \blankobuitenfalse -% \processcommalist[#1]\doblanko +% \processcommalist[#1]\doblank % \ifdim\blankoskip=\zeropoint\relax % \iflokaalblankoflexibel \dosingleblanko\currentblanko \fi % \iflokaalblankovast \dosingleblanko\currentblanko \fi @@ -372,32 +377,32 @@ % \global\fuzzyvskipfalse % \presetindentation} % -% \def\complexdodoblanko[#1]% +% \def\complexdodoblank[#1]% % {\flushnotes % \ifopelkaar % \ifinpagebody -% \expanded{\docomplexdoblanko[#1]}% \expanded=nieuw +% \expanded{\docomplexdoblank[#1]}% \expanded=nieuw % \else % \par % \fi % \else -% \expanded{\docomplexdoblanko[#1]}% \expanded = nieuw +% \expanded{\docomplexdoblank[#1]}% \expanded = nieuw % \fi} % % % old % % % % \def\doindirectblanko#1% % % {\ifundefined{\??bo#1}% <-etex \expandafter\ifx\csname\??bo#1\endcsname\relax -% % \expanded{\complexdodoblanko[#1]}% +% % \expanded{\complexdodoblank[#1]}% % % \else -% % \expandafter\complexdoblanko\expandafter[\csname\??bo#1\endcsname]% +% % \expandafter\complexdoblank\expandafter[\csname\??bo#1\endcsname]% % % \fi} % % -% % \def\complexdoblanko[#1]% enables [force,8\bodyfontsize] +% % \def\complexdoblank[#1]% enables [force,8\bodyfontsize] % % {\doifinstringelse{,}{#1} -% % {\expanded{\complexdodoblanko[#1]}} +% % {\expanded{\complexdodoblank[#1]}} % % {\doifnumberelse{#1} -% % {\expanded{\complexdodoblanko[#1]}} +% % {\expanded{\complexdodoblank[#1]}} % % {\doindirectblanko{#1}}}} % % % % new, more robust @@ -405,9 +410,9 @@ % % \def\doindirectblanko#1% % % {\edef\ascii{#1}\convertcommand\ascii\to\ascii % % \ifundefined{\??bo\ascii}% <-etex \expandafter\ifx\csname\??bo#1\endcsname\rel -% % \herhaalmetcommando[#1]\dosingleblanko +% % \dorepeatwithcommand[#1]\dosingleblanko % % \else -% % \expandafter\complexdoblanko\expandafter[\csname\??bo\ascii\endcsname]% +% % \expandafter\complexdoblank\expandafter[\csname\??bo\ascii\endcsname]% % % \fi} % % % % even more robust @@ -415,9 +420,9 @@ % \def\doindirectblanko#1% % {\edef\ascii{#1}\convertcommand\ascii\to\ascii % \ifundefined{\??bo\ascii}% <-etex \expandafter\ifx\csname\??bo#1\endcsname -% \expanded{\herhaalmetcommando[#1]\noexpand\dosingleblanko}% +% \expanded{\dorepeatwithcommand[#1]\noexpand\dosingleblanko}% % \else -% \expandafter\complexdoblanko\expandafter[\csname\??bo\ascii\endcsname]% +% \expandafter\complexdoblank\expandafter[\csname\??bo\ascii\endcsname]% % \fi} % \def\TestBlank[#1]% @@ -433,64 +438,66 @@ % \TestBlank[2*big,whatever] % \TestBlank[3\lineheight] -\def\addblankskip#1#2#3% - {\global\advance\blankoskip#1\ifgridsnapping#3\else#2\fi} +% this will be replaced/enhanced + +\def\addblankskip#1#2#3{\global\advance\blankoskip#1\ifgridsnapping#3\else#2\fi} \def\defineblankmethod[#1]#2{\setvalue{\??bo\??bo#1}{#2}} -\defineblankmethod [\v!groot]{\addblankskip+\bigskipamount \openlineheight} -\defineblankmethod [-\v!groot]{\addblankskip-\bigskipamount \openlineheight} -\defineblankmethod [\v!middel]{\addblankskip+\medskipamount {.5\openlineheight}} -\defineblankmethod [-\v!middel]{\addblankskip-\medskipamount {.5\openlineheight}} -\defineblankmethod [\v!klein]{\addblankskip+\smallskipamount{.25\openlineheight}} -\defineblankmethod [-\v!klein]{\addblankskip-\smallskipamount{.25\openlineheight}} -\defineblankmethod [\v!wit]{\addblankskip+\parskip\openlineheight} -\defineblankmethod [-\v!wit]{\addblankskip-\parskip\openlineheight} -\defineblankmethod [\v!regel]{\addblankskip+\openlineheight\openlineheight} -\defineblankmethod [-\v!regel]{\addblankskip-\openlineheight\openlineheight} - -\defineblankmethod [\v!formule ]{\global\advance\blankoskip\medskipamount} -\defineblankmethod [\v!geenwit ]{\global\blankogeenwittrue} -\defineblankmethod [\v!blokkeer ]{\global\blankoblokkeertrue} -\defineblankmethod [\v!forceer ]{\global\blankoforceertrue} -\defineblankmethod [\v!buiten ]{\ifvmode\ifinner\blankobuitentrue\fi\fi} -\defineblankmethod [\v!reset ]{\global\blankoresettrue} -\defineblankmethod [\v!flexibel ]{\global\lokaalblankoflexibeltrue} -\defineblankmethod [\v!vast ]{\global\lokaalblankovasttrue} -\defineblankmethod [\v!back ]{\global\blankogobacktrue} % {\geenblanko} -\defineblankmethod [\v!halveregel ]{\ifgridsnapping\global\fuzzyvskiptrue\fi - \global\advance\blankoskip .5\lineheight} - -\defineblankmethod [\v!geen ]{\global\blankoresettrue} -\defineblankmethod [\v!aansluitend]{\ifvmode\nointerlineskip\fi} - -% happens often - -\defineblankmethod [2*\v!groot]{\addblankskip+{2\bigskipamount}{2\openlineheight}} +\defineblankmethod [\v!big] {\addblankskip+\bigskipamount \openlineheight} +\defineblankmethod [-\v!big] {\addblankskip-\bigskipamount \openlineheight} +\defineblankmethod [\v!medium] {\addblankskip+\medskipamount {.5\openlineheight}} +\defineblankmethod [-\v!medium] {\addblankskip-\medskipamount {.5\openlineheight}} +\defineblankmethod [\v!small] {\addblankskip+\smallskipamount{.25\openlineheight}} +\defineblankmethod [-\v!small] {\addblankskip-\smallskipamount{.25\openlineheight}} +\defineblankmethod [\v!white] {\addblankskip+\parskip \openlineheight} +\defineblankmethod [-\v!white] {\addblankskip-\parskip \openlineheight} +\defineblankmethod [\v!line] {\addblankskip+\openlineheight \openlineheight} +\defineblankmethod [-\v!line] {\addblankskip-\openlineheight \openlineheight} + +\defineblankmethod [\v!formula] {\global\advance\blankoskip\medskipamount} +\defineblankmethod [\v!nowhite] {\global\blankogeenwittrue} +\defineblankmethod [\v!disable] {\global\blankoblokkeertrue} +\defineblankmethod [\v!force] {\global\blankoforceertrue} +\defineblankmethod [\v!outer] {\ifvmode\ifinner\blankobuitentrue\fi\fi} +\defineblankmethod [\v!reset] {\global\blankoresettrue} +\defineblankmethod [\v!flexible] {\global\lokaalblankoflexibeltrue} +\defineblankmethod [\v!fixed] {\global\lokaalblankovasttrue} +\defineblankmethod [\v!back] {\global\blankogobacktrue} % {\geenblanko} +\defineblankmethod [\v!halfline] {\ifgridsnapping\global\fuzzyvskiptrue\fi + \global\advance\blankoskip .5\lineheight} + +\defineblankmethod [\v!none] {\global\blankoresettrue} +\defineblankmethod [\v!joinedup] {\ifvmode\nointerlineskip\fi} + +% happens often, so we speed this up: + +\defineblankmethod [2*\v!line] {\addblankskip+{2\openlineheight}{2\openlineheight}} +\defineblankmethod [2*\v!big] {\addblankskip+{2\bigskipamount }{2\openlineheight}} % ETEX ! ! ! \beginETEX \ifcsname -\def\doblanko#1% +\def\doblank#1% {\edef\ascii{#1}\convertcommand\ascii\to\ascii \ifx\ascii\empty\else \ifcsname\??bo\??bo\ascii\endcsname % internal def \csname\??bo\??bo\ascii\endcsname \else\ifcsname\??bo\ascii\endcsname % user def / slow - \@EA\rawprocesscommalist\@EA[\csname\??bo\ascii\endcsname]\doblanko\relax + \@EA\rawprocesscommalist\@EA[\csname\??bo\ascii\endcsname]\doblank\relax \else - \dorepeatwithcommand[#1]\redoblanko + \dorepeatwithcommand[#1]\redoblank \fi\fi \fi} -\def\redoblanko#1% +\def\redoblank#1% {\edef\ascii{#1}\convertcommand\ascii\to\ascii \ifx\ascii\empty\else \ifcsname\??bo\??bo\ascii\endcsname % internal def \csname\??bo\??bo\ascii\endcsname \else\ifcsname\??bo\ascii\endcsname % user def / slow - \@EA\rawprocesscommalist\@EA[\csname\??bo\ascii\endcsname]\doblanko\relax + \@EA\rawprocesscommalist\@EA[\csname\??bo\ascii\endcsname]\doblank\relax \else \global\advance\blankoskip#1\relax \fi\fi @@ -500,28 +507,28 @@ \beginTEX -\def\doblanko#1% +\def\doblank#1% {\edef\ascii{#1}\convertcommand\ascii\to\ascii \ifx\ascii\empty\else \@EA\ifx\csname\??bo\??bo\ascii\endcsname\relax \@EA\ifx\csname\??bo\ascii\endcsname\relax - \dorepeatwithcommand[#1]\redoblanko + \dorepeatwithcommand[#1]\redoblank \else - \@EA\rawprocesscommalist\@EA[\csname\??bo\ascii\endcsname]\doblanko\relax + \@EA\rawprocesscommalist\@EA[\csname\??bo\ascii\endcsname]\doblank\relax \fi \else \csname\??bo\??bo\ascii\endcsname \fi \fi} -\def\redoblanko#1% +\def\redoblank#1% {\edef\ascii{#1}\convertcommand\ascii\to\ascii \ifx\ascii\empty\else \@EA\ifx\csname\??bo\??bo\ascii\endcsname\relax \@EA\ifx\csname\??bo\ascii\endcsname\relax \global\advance\blankoskip#1\relax \else - \@EA\rawprocesscommalist\@EA[\csname\??bo\ascii\endcsname]\doblanko\relax + \@EA\rawprocesscommalist\@EA[\csname\??bo\ascii\endcsname]\doblank\relax \fi \else \csname\??bo\??bo\ascii\endcsname @@ -530,45 +537,45 @@ \endTEX -\unexpanded\def\blanko % the \relax is definitely needed due to the many \if's - {\relax\complexorsimple\doblanko} +\unexpanded\def\blank % the \relax is definitely needed due to the many \if's + {\relax\complexorsimple\doblank} -% \def\complexdoblanko +% \def\complexdoblank % {\flushnotes % \ifmmode -% \let\next\nocomplexdoblanko +% \let\next\nocomplexdoblank % \else % \ifopelkaar % \ifinpagebody -% \let\next\docomplexdoblanko +% \let\next\docomplexdoblank % \else -% \let\next\nocomplexdoblanko +% \let\next\nocomplexdoblank % \fi % \else -% \let\next\docomplexdoblanko +% \let\next\docomplexdoblank % \fi % \fi % \next} % % with \next removed -\def\complexdoblanko +\def\complexdoblank {\flushnotes \ifmmode - \@EA\nocomplexdoblanko + \@EA\nocomplexdoblank \else \ifopelkaar \ifinpagebody - \@EA\@EAEAEA\@EA\docomplexdoblanko + \@EA\@EAEAEA\@EA\docomplexdoblank \else - \@EA\@EAEAEA\@EA\nocomplexdoblanko + \@EA\@EAEAEA\@EA\nocomplexdoblank \fi \else - \@EAEAEA\docomplexdoblanko + \@EAEAEA\docomplexdoblank \fi \fi} -\def\nocomplexdoblanko[#1]% +\def\nocomplexdoblank[#1]% {% evt blokkeerfalse \ifmmode\else\par\fi} @@ -582,7 +589,7 @@ % \def\inhibitblank% the fast, local way % {\endgraf\ifvmode\prevdepth\newprevdepth\fi} -% \def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if +% \def\docomplexdoblank[#1]% pas op \relax's zijn nodig ivm volgende \if % {\global\blankoresetfalse % \global\blankoblokkeerfalse % \global\blankogeenwitfalse @@ -592,7 +599,7 @@ % \global\blankoforceerfalse % \global\blankogobackfalse % \blankobuitenfalse -% \expanded{\rawprocesscommalist[#1]}\doblanko +% \expanded{\rawprocesscommalist[#1]}\doblank % \ifdim\blankoskip=\zeropoint\relax % \iflokaalblankoflexibel % \doglobal\advance\blankoskip \currentblanko @@ -790,7 +797,7 @@ \ifx\undefined\savedlastskip \newskip \savedlastskip \fi \ifx\undefined\savedlastpenalty \newcount\savedlastpenalty \fi -\def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if +\def\docomplexdoblank[#1]% pas op \relax's zijn nodig ivm volgende \if {\global\blankoresetfalse \global\blankoblokkeerfalse \global\blankogeenwitfalse @@ -800,7 +807,7 @@ \global\blankoforceerfalse \global\blankogobackfalse \blankobuitenfalse - \expanded{\rawprocesscommalist[#1]}\doblanko + \expanded{\rawprocesscommalist[#1]}\doblank \ifdim\blankoskip=\zeropoint\relax \iflokaalblankoflexibel \doglobal\advance\blankoskip \currentblanko @@ -877,7 +884,7 @@ \fi \ifdoeblanko \ifdim1\savedlastskip<1\blankoskip\relax - % else when \blanko[2*groot] + \blanko[3*groot] with parskip + % else when \blank[2*groot] + \blank[3*groot] with parskip % equaling 1*groot, gives a groot=\parskip so adding a small % value makes it distinguishable; can also be done at parskip % setting time (better) @@ -946,7 +953,7 @@ % also new \ifdim\blankoskip=\zeropoint \ifblankogeenwit - \geenwitruimte + \nowhitespace \fi \fi \fi @@ -960,27 +967,27 @@ %D For a long time we had: %D -%D \starttypen -%D \def\simpledoblanko% -%D {\doifelse{\currentwitruimte}{\v!geen} -%D {\blanko[\currentblanko]} -%D {\blanko[\currentwitruimte]}} -%D \stoptypen +%D \starttyping +%D \def\simpledoblank% +%D {\doifelse{\currentwhitespace}{\v!geen} +%D {\blank[\currentblanko]} +%D {\blank[\currentwhitespace]}} +%D \stoptyping %D %D But Berend de Boer wanted more control, so now we have: -\def\simpledoblanko % ... - {\doifelse\currentwitruimte\v!geen - {\blanko[\currentblanko]} - {\blanko[\s!default]}} +\def\simpledoblank % ... + {\doifelse\currentwhitespace\v!none + {\blank[\currentblanko]} + {\blank[\s!default]}} %D Another useful definition would be: %D -%D \starttypen -%D \definieerblanko +%D \starttyping +%D \defineblank %D [\s!default] %D [\v!groot] -%D \stoptypen +%D \stoptyping \def\dosetupblank#1% amount are an plain inheritance {\bigskipamount#1\relax @@ -996,40 +1003,40 @@ \else \ExpandFirstAfter\processallactionsinset [#1] - [ \v!flexibel=>\blankoflexibeltrue, - \v!vast=>\blankoflexibelfalse]% + [ \v!flexible=>\blankoflexibeltrue, + \v!fixed=>\blankoflexibelfalse]% \fi \ExpandFirstAfter\processallactionsinset [#1] - [ \v!flexibel=>\dosetupblank\deblankoskip, - \v!vast=>\dosetupblank\deblankoskip, - \v!regel=>\edef\deblankoskip{\regelafstand}% + [ \v!flexible=>\dosetupblank\deblankoskip, + \v!fixed=>\dosetupblank\deblankoskip, + \v!line=>\edef\deblankoskip{\regelafstand}% \dosetupblank\deblankoskip - \let\deblanko\v!groot, - \v!halveregel=>\scratchskip.5\regelafstand + \let\deblanko\v!big, + \v!halfline=>\scratchskip.5\regelafstand \edef\deblankoskip{\the\scratchskip}% \dosetupblank\deblankoskip - \let\deblanko\v!middel, - \v!groot=>\ifgridsnapping + \let\deblanko\v!medium, + \v!big=>\ifgridsnapping \edef\deblankoskip{\regelafstand}% \dosetupblank\deblankoskip \fi - \let\currentblanko\v!groot % was \def, why ? - \let\deblanko\v!groot, - \v!middel=>\let\currentblanko\v!middel % was \def, why ? - \let\deblanko\v!middel, - \v!klein=>\let\currentblanko\v!klein % was \def, why ? - \let\deblanko\v!klein, - \v!normaal=>\dosetupblank\deblankoskip - \let\deblanko\v!groot, - \v!standaard=>\edef\deblankoskip{\skipfactor\regelafstand}% + \let\currentblanko\v!big % was \def, why ? + \let\deblanko\v!big, + \v!medium=>\let\currentblanko\v!medium % was \def, why ? + \let\deblanko\v!medium, + \v!small=>\let\currentblanko\v!small % was \def, why ? + \let\deblanko\v!small, + \v!normal=>\dosetupblank\deblankoskip + \let\deblanko\v!big, + \v!standard=>\edef\deblankoskip{\skipfactor\regelafstand}% \dosetupblank\deblankoskip - \let\deblanko\v!groot, + \let\deblanko\v!big, \s!default=>\dosetupblank\deblankoskip - \let\deblanko\v!groot, + \let\deblanko\v!big, \s!unknown=>\let\deblankoskip\commalistelement \dosetupblank\deblankoskip - \let\deblanko\v!groot]% + \let\deblanko\v!big]% \simplesetupwhitespace} % \definecomplexorsimpleempty\setupblank @@ -1043,23 +1050,23 @@ \blankoflexibelfalse \fi \dosetupblank\deblankoskip - \let\deblanko\v!groot + \let\deblanko\v!big \simplesetupwhitespace} -\def\restorestandardblank% \v!standaard +\def\restorestandardblank% \v!standard {\edef\deblankoskip{\skipfactor\regelafstand}% \dosetupblank\deblankoskip - \let\deblanko\v!groot} + \let\deblanko\v!big} -\def\dodefinieerblanko[#1][#2]% +\def\dodefineblank[#1][#2]% {\def\docommando##1{\setvalue{\??bo##1}{#2}}% \processcommalist[#1]\docommando} -\def\definieerblanko% - {\dodoubleargument\dodefinieerblanko} +\def\defineblank + {\dodoubleargument\dodefineblank} -\def\savecurrentblanko% - {\edef\restorecurrentblanko% +\def\savecurrentblanko + {\edef\restorecurrentblanko {\bigskipamount\the\bigskipamount \medskipamount\the\medskipamount \smallskipamount\the\smallskipamount @@ -1072,13 +1079,13 @@ %D Now. -\definieerblanko [\s!default] [\v!wit] -\definieerblanko [\v!hoogte] [\strutheight] -\definieerblanko [\v!diepte] [\strutdepth] +\defineblank [\s!default] [\v!white] +\defineblank [\v!height] [\strutheight] +\defineblank [\v!depth] [\strutdepth] -\let\currentvoorwit=\empty +\let\currentindentation=\empty -\newdimen\voorwit +\newdimen\ctxparindent \newif\ifindentfirstparagraph % \indentfirstparagraphtrue @@ -1090,40 +1097,46 @@ \def\complexsetupindenting[#1]% {\processallactionsinset [#1] - [ \v!eerste=>\indentfirstparagraphtrue, - \v!volgende=>\indentfirstparagraphfalse, + [ \v!first=>\indentfirstparagraphtrue, + \v!next=>\indentfirstparagraphfalse, \s!default=>\simplesetupindenting, - \s!unknown=>\edef\currentvoorwit{\commalistelement}% + \s!unknown=>\edef\currentindentation{\commalistelement}% \simplesetupindenting]} \def\simplesetupindenting - {\assigndimension\currentvoorwit\voorwit{1em}{1.5em}{2em}% - \parindent\voorwit\relax} + {\assigndimension\currentindentation\ctxparindent{1em}{1.5em}{2em}% + \parindent\ctxparindent\relax} -\def\doinspringen[#1]% too many relaxes - {\processallactionsinset - [#1] - [ \v!nee=>\parindent\voorwit\relax\noindent, - \v!niet=>\parindent\voorwit\relax\noindent, - \v!ja=>\parindent\voorwit\relax, % geen \indent ! - \v!eerste=>\indentfirstparagraphtrue, - \v!volgende=>\indentfirstparagraphfalse, - \v!altijd=>\parindent\voorwit\relax, % geen \indent ! - \v!nooit=>\parindent\zeropoint\relax]} +\def\indenting % watch out: \dodo and no \do + {\dosingleargument\dodoindenting} + +\def\dodoindenting[#1]% + {\executeifdefined{\??in:#1}\donothing} -\def\inspringen - {\dosingleargument\doinspringen} +\def\defineindentingmethod[#1]#2% + {\setvalue{\??in:#1}{#2}} -\def\nietinspringen{\inspringen[\v!nee,\v!volgende]} -\def\welinspringen {\inspringen[\v!ja,\v!eerste]} +\defineindentingmethod [\v!no] {\parindent\ctxparindent\noindent} +\defineindentingmethod [\v!not] {\parindent\ctxparindent\noindent} + +\defineindentingmethod [\v!first] {\indentfirstparagraphtrue} +\defineindentingmethod [\v!next] {\indentfirstparagraphfalse} + +\defineindentingmethod [\v!yes] {\parindent\ctxparindent\relax} % no \indent ! +\defineindentingmethod [\v!always] {\parindent\ctxparindent\relax} % no \indent ! + +\defineindentingmethod [\v!never] {\parindent\zeropoint\relax} % no \indent ! + +\def\noindenting{\indenting[\v!no,\v!next]} % was \nietinspringen +\def\doindenting{\indenting[\v!yes,\v!first]} % was \welinspringen \def\dochecknextindentation#1% internal one - {\checknextindentation[\getvalue{#1\c!springvolgendein}]} + {\checknextindentation[\getvalue{#1\c!indentnext}]} \def\checknextindentation[#1]% - {\processaction[#1][%\v!handhaaf=>, - \v!ja=>\doindentation, - \v!nee=>\noindentation, + {\processaction[#1][%\v!keep=>, + \v!yes=>\doindentation, + \v!no=>\noindentation, \v!auto=>\autoindentation]} \def\doindentation% too simple @@ -1151,8 +1164,8 @@ \def\definespacingmethod[#1]#2{\setvalue{\??sg\??sg#1}{#2}} -\definespacingmethod[\v!opelkaar]{\newfrenchspacing} -\definespacingmethod[\v!ruim ]{\nonfrenchspacing} +\definespacingmethod[\v!packed]{\newfrenchspacing} +\definespacingmethod[\v!broad ]{\nonfrenchspacing} \def\complexsetupspacing[#1]% {\executeifdefined{\??sg\??sg#1}\relax @@ -1178,7 +1191,7 @@ % but, since not all fonts have .5em digits: \def\fixedspace - {\setbox\scratchbox\hbox\ifmmode{$0$}\else{0}\fi + {\setbox\scratchbox\normalhbox\ifmmode{$0$}\else{0}\fi \hskip\wd\scratchbox\relax} \def\fixedspaces @@ -1201,7 +1214,7 @@ % % due to backward compability -\let\spatie \space +\let\space \space \let\hardespatie\fixedspace \let\geenspatie \nospace @@ -1227,10 +1240,10 @@ % \setupbodyfont[cmr] \getbuffer % \setupbodyfont[lbr] \getbuffer -\def\opelkaar +\def\packed {\nointerlineskip} -\def\omlaag[#1]% nog eens mooier, relateren aan blanko +\def\godown[#1]% nog eens mooier, relateren aan blanko {\nointerlineskip \vskip#1 } @@ -1359,17 +1372,17 @@ \fi -\newskip\tussenwit \tussenwit\zeropoint +\newskip\ctxparskip \ctxparskip\zeropoint \newif\ifwitruimteflexibel \witruimteflexibeltrue \def\blankokleinmaat {\smallskipamount} \def\blankomiddelmaat {\medskipamount} \def\blankogrootmaat {\bigskipamount} -\def\currentwitruimte {\zeropoint} +\def\currentwhitespace {\zeropoint} % \def\stelwitruimteopnieuwin -% {\expanded{\setupwhitespace[\currentwitruimte]}} +% {\expanded{\setupwhitespace[\currentwhitespace]}} % % \newif\ifwitruimteflexibel \witruimteflexibeltrue % @@ -1385,81 +1398,81 @@ % [\v!herstel=>, % \v!vast=>\witruimteflexibelfalse, % \v!flexibel=>\witruimteflexibeltrue, -% \v!regel=>\tussenwit\baselineskip, -% \v!halveregel=>\tussenwit.5\baselineskip, -% \s!default=>\doifnot\currentwitruimte\v!geen\stelwitruimteopnieuwin, +% \v!regel=>\ctxparskip\baselineskip, +% \v!halveregel=>\ctxparskip.5\baselineskip, +% \s!default=>\doifnot\currentwhitespace\v!geen\stelwitruimteopnieuwin, % \s!unknown=>\@EA\assigndimension\@EA{\commalistelement} % \@EA is nodig -% \tussenwit\blankokleinmaat\blankomiddelmaat\blankogrootmaat]} % te vangen +% \ctxparskip\blankokleinmaat\blankomiddelmaat\blankogrootmaat]} % te vangen % % \def\dodosetupwhitespace -% {\edef\currentwitruimte -% {\ifdim\tussenwit=\zeropoint +% {\edef\currentwhitespace +% {\ifdim\ctxparskip=\zeropoint % \v!geen % \else -% \ifgridsnapping\the\baselineskip\else\the\tussenwit\fi +% \ifgridsnapping\the\baselineskip\else\the\ctxparskip\fi % \fi}% % \ifgridsnapping % \witruimteflexibelfalse -% \tussenwit1\tussenwit -% \ifdim\tussenwit>\zeropoint -% \tussenwit\baselineskip +% \ctxparskip1\ctxparskip +% \ifdim\ctxparskip>\zeropoint +% \ctxparskip\baselineskip % \fi % \else -% \ifwitruimteflexibel \else \tussenwit1\tussenwit \fi +% \ifwitruimteflexibel \else \ctxparskip1\ctxparskip \fi % \fi -% \parskip\tussenwit} +% \parskip\ctxparskip} % % \def\simplesetupwhitespace% == snelle \setupwhitespace[\s!default] -% {\doifnot\currentwitruimte\v!geen\stelwitruimteopnieuwin +% {\doifnot\currentwhitespace\v!geen\stelwitruimteopnieuwin % \dodosetupwhitespace} \definecomplexorsimple\setupwhitespace \def\simplesetupwhitespace - {\doifnot\currentwitruimte\v!geen\dosetupwhitespace} + {\doifnot\currentwhitespace\v!none\dosetupwhitespace} \def\complexsetupwhitespace[#1]% {\doifelsenothing{#1} {\simplesetupwhitespace} - {\edef\currentwitruimte{#1}% + {\edef\currentwhitespace{#1}% \dosetupwhitespace}} \def\dosetupwhitespace - {\processcommacommand[\currentwitruimte]\dowhitespacemethod + {\processcommacommand[\currentwhitespace]\dowhitespacemethod \dodosetupwhitespace} \def\dodosetupwhitespace {\ifgridsnapping \witruimteflexibelfalse - \tussenwit1\tussenwit - \ifdim\tussenwit>\zeropoint - \tussenwit\baselineskip + \ctxparskip1\ctxparskip + \ifdim\ctxparskip>\zeropoint + \ctxparskip\baselineskip \fi \else - \ifwitruimteflexibel \else \tussenwit1\tussenwit \fi + \ifwitruimteflexibel \else \ctxparskip1\ctxparskip \fi \fi - \parskip\tussenwit} + \parskip\ctxparskip} \definesystemvariable {ws} % whitespace \def\definewhitespacemethod[#1]#2{\setvalue{\??ws\??ws#1}{#2}} -\definewhitespacemethod [\v!herstel] {} -\definewhitespacemethod [\v!vast] {\witruimteflexibelfalse} -\definewhitespacemethod [\v!flexibel] {\witruimteflexibeltrue} -\definewhitespacemethod [\v!regel] {\tussenwit \baselineskip} -\definewhitespacemethod [\v!halveregel] {\tussenwit.5\baselineskip} -\definewhitespacemethod [\v!geen] {\tussenwit \zeropoint} -\definewhitespacemethod [\v!groot] {\tussenwit \blankogrootmaat} -\definewhitespacemethod [\v!middel] {\tussenwit \blankomiddelmaat} -\definewhitespacemethod [\v!klein] {\tussenwit \blankokleinmaat} +\definewhitespacemethod [\v!fix] {} +\definewhitespacemethod [\v!fixed] {\witruimteflexibelfalse} +\definewhitespacemethod [\v!flexible] {\witruimteflexibeltrue} +\definewhitespacemethod [\v!line] {\ctxparskip \baselineskip} +\definewhitespacemethod [\v!halfline] {\ctxparskip.5\baselineskip} +\definewhitespacemethod [\v!none] {\ctxparskip \zeropoint} +\definewhitespacemethod [\v!big] {\ctxparskip \blankogrootmaat} +\definewhitespacemethod [\v!medium] {\ctxparskip \blankomiddelmaat} +\definewhitespacemethod [\v!small] {\ctxparskip \blankokleinmaat} \definewhitespacemethod [\s!default] {\stelwitruimteopnieuwin} \def\dowhitespacemethod#1% - {\executeifdefined{\??ws\??ws#1}{\tussenwit#1}\relax} + {\executeifdefined{\??ws\??ws#1}{\ctxparskip#1}\relax} -\def\geenwitruimte +\def\nowhitespace {\ifdim\parskip>\zeropoint\relax \ifdim\lastskip=-\parskip \else @@ -1467,11 +1480,11 @@ \fi \fi} -\def\savecurrentwitruimte - {\edef\restorecurrentwitruimte - {\tussenwit\the\tussenwit +\def\savecurrentwhitespace + {\edef\restorecurrentwhitespace + {\ctxparskip\the\ctxparskip \parskip\the\parskip - \noexpand\def\noexpand\currentwitruimte{\currentwitruimte}% + \noexpand\def\noexpand\currentwhitespace{\currentwhitespace}% \ifwitruimteflexibel \noexpand\witruimteflexibeltrue \else @@ -1488,7 +1501,7 @@ % % met/zonder witruimte -\def\witruimte% +\def\whitespace {\par \ifdim\parskip>\zeropoint\relax %\ifdim\lastskip>\parskip \else @@ -1500,7 +1513,7 @@ \def\nonoblanko[#1]% {\par} -\def\noblanko% +\def\noblanko {\dosingleempty\nonoblanko} % De onderstaande macro handelt ook de situatie dat er geen @@ -1513,49 +1526,49 @@ \newsignal \noparskipsignal % \def\noparskipsignal {0.00001pt} \def\lastdoneparskip {0pt} -\def\startopelkaar - {\dosingleempty\dostartopelkaar} +\def\startpacked + {\dosingleempty\dostartpacked} -\def\dostartopelkaar[#1]% nesting afvangen +\def\dostartpacked[#1]% nesting afvangen {\par \ifvmode \edef\lastdoneparskip {\the\lastskip}% \edef\lastdoneprevdepth{\the\prevdepth}% zeer recent toegevoegd \ifdim\prevdepth=-\thousandpoint % toegevoegd omdat binnen \else % een vbox een extra skip - \witruimte % ongewenst is; dit kan - \baselinecorrection %% zie in \plaatsregister[n=1] + \whitespace % ongewenst is; dit kan + \baselinecorrection %% zie in \placeregister[n=1] \vskip\noparskipsignal % waarschijnlijk ook in \fi % blanko blokkeer \bgroup - \doifelse{#1}\v!blanko + \doifelse{#1}\v!blank \opelkaarfalse \opelkaartrue - \blanko[\v!blokkeer] % dit is nog niet ok, gaat fout - \setupwhitespace[\v!geen] % bovenin vtop (dwz, baseline) + \blank[\v!disable] % dit is nog niet ok, gaat fout + \setupwhitespace[\v!none] % bovenin vtop (dwz, baseline) \fi} -\def\stopopelkaar +\def\stoppacked {\par \ifvmode \egroup \ifdim\lastskip=\noparskipsignal\relax \removelastskip - \geenwitruimte + \nowhitespace \vskip-\lastdoneparskip \vskip+\lastdoneparskip - \prevdepth-\lastdoneprevdepth % zeer recent toegevoegd + \prevdepth-\lastdoneprevdepth % zeer recent toegevoegd \fi \fi} -\def\startvanelkaar - {\blanko +\def\startunpacked + {\blank \leavevmode \bgroup} -\def\stopvanelkaar +\def\stopunpacked {\egroup - \blanko} + \blank} % De onderstaande macro's moeten nog eens nader worden uitgewerkt. % Ze spelen een rol bij de spatiering rond omkaderde teksten @@ -1569,27 +1582,27 @@ \let\dorondomregelcorrectie=\relax -\def\startregelcorrectie - {\dodoubleempty\dostartregelcorrectie} +\def\startlinecorrection + {\dodoubleempty\dostartlinecorrection} -\def\dostartregelcorrectie[#1][#2]% #2 gobbles spaces +\def\dostartlinecorrection[#1][#2]% #2 gobbles spaces {\bgroup \processaction [#1] - [ \v!blanko=>\let\dorondomregelcorrectie\blanko, + [ \v!blank=>\let\dorondomregelcorrectie\blank, \s!default=>\let\dorondomregelcorrectie\relax, - \s!unknown=>{\def\dorondomregelcorrectie{\blanko[#1]}}]% + \s!unknown=>{\def\dorondomregelcorrectie{\blank[#1]}}]% \dorondomregelcorrectie \startbaselinecorrection \offbaselinecorrection \ignorespaces} -\def\stopregelcorrectie +\def\stoplinecorrection {\stopbaselinecorrection \dorondomregelcorrectie \egroup} -\def\corrigeerwitruimte +\def\correctwhitespace {\dowithnextbox {\startbaselinecorrection \flushnextbox @@ -1651,6 +1664,9 @@ \def\baselinefactor {2.8} \def\baselinegluefactor {0} +\def\minimumstrutheight {0pt} +\def\minimumstrutdepth {0pt} + \def\normallineheight {\baselinefactor ex} \def\minimallinedistance {\lineskip} @@ -1702,6 +1718,18 @@ \vskip-\openstrutheight \fi} +% \def\settopskip % the extra test is needed for the lbr family +% {\topskip\systemtopskipfactor\globalbodyfontsize +% \ifgridsnapping \else +% \ifr@ggedbottom\!!plus5\globalbodyfontsize\fi +% \fi +% \relax % the skip +% \topskipgap\topskip +% \advance\topskipgap -\openstrutheight\relax +% \ifdim\topskip<\strutheightfactor\openlineheight +% \topskip\strutheightfactor\openlineheight\relax +% \fi} + \def\settopskip % the extra test is needed for the lbr family {\topskip\systemtopskipfactor\globalbodyfontsize \ifgridsnapping \else @@ -1710,9 +1738,15 @@ \relax % the skip \topskipgap\topskip \advance\topskipgap -\openstrutheight\relax +\ifdim\minimumstrutheight>\zeropoint + \ifdim\topskip<\minimumstrutheight + \topskip\minimumstrutheight\relax + \fi +\else \ifdim\topskip<\strutheightfactor\openlineheight \topskip\strutheightfactor\openlineheight\relax - \fi} + \fi +\fi} \def\setmaxdepth {\maxdepth\systemmaxdepthfactor\globalbodyfontsize} @@ -1722,13 +1756,45 @@ \lineskip\normallineskip \lineskiplimit\normallineskiplimit} +% \def\setnormalbaselines +% {\ifdim\normallineheight>\zeropoint +% \lineheight\normallineheight +% \fi +% \openlineheight\spacingfactor\lineheight +% \openstrutheight\strutheightfactor\openlineheight +% \openstrutdepth \strutdepthfactor \openlineheight +% \normalbaselineskip\openlineheight +% \!!plus\baselinegluefactor\openlineheight +% \!!minus\baselinegluefactor\openlineheight +% \normallineskip\minimallinedistance\relax % \onepoint\relax +% \normallineskiplimit\zeropoint\relax +% \normalbaselines} + \def\setnormalbaselines {\ifdim\normallineheight>\zeropoint \lineheight\normallineheight \fi \openlineheight\spacingfactor\lineheight - \openstrutheight\strutheightfactor\openlineheight - \openstrutdepth \strutdepthfactor \openlineheight + \openstrutheight \ifdim\minimumstrutheight>\zeropoint + \minimumstrutheight % new + \else + \strutheightfactor\openlineheight + \fi + \openstrutdepth \ifdim\minimumstrutdepth>\zeropoint + \minimumstrutdepth % new + \else + \strutdepthfactor \openlineheight + \fi + \begingroup % avoid interference + \scratchdimen\minimumstrutdepth + \advance\scratchdimen\minimumstrutheight + \ifdim\scratchdimen>\zeropoint + \endgroup + \openlineheight\openstrutheight % new + \advance\openlineheight\openstrutdepth % new + \else + \endgroup + \fi \normalbaselineskip\openlineheight \!!plus\baselinegluefactor\openlineheight \!!minus\baselinegluefactor\openlineheight @@ -1749,8 +1815,8 @@ \else \edef\spacingfactor{#1}% \fi - \setspacingfactor\systemtopskipfactor \to\topskipfactor \by#1\\% - \setspacingfactor\systemmaxdepthfactor\to\maxdepthfactor\by#1\\% + \setspacingfactor\systemtopskipfactor \to\topskipfactor \by#1\\% why no \spacingfactor ? + \setspacingfactor\systemmaxdepthfactor\to\maxdepthfactor\by#1\\% why no \spacingfactor ? \setnormalbaselines \setstrut} @@ -1772,7 +1838,7 @@ \newbox\strutbox - \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@} + \setbox\strutbox=\normalhbox{\vrule height8.5pt depth3.5pt width\z@} %\def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi} \def\strut{\relax\ifmmode\copy\else\unhcopy\fi\strutbox} @@ -1801,29 +1867,64 @@ % \setstrutdimen\strutdepth \strutdepthfactor \spacingfactor % \dosetstrut} +% \def\setstrut +% {\strutdimen\normallineheight +% \strutdimen\strutheightfactor\strutdimen +% \strutdimen\spacingfactor\strutdimen +% \edef\strutheight{\the\strutdimen}% +% \strutdimen\normallineheight +% \ifgridsnapping +% \advance\strutdimen-\strutheight +% \else +% \strutdimen\strutdepthfactor\strutdimen +% \strutdimen\spacingfactor\strutdimen +% \fi +% \edef\strutdepth{\the\strutdimen}% +% \dosetstrut} + \def\setstrut - {\strutdimen\normallineheight + {% height + \strutdimen\normallineheight +\ifdim\minimumstrutheight>\zeropoint + \strutdimen\minimumstrutheight +\else \strutdimen\strutheightfactor\strutdimen +\fi \strutdimen\spacingfactor\strutdimen \edef\strutheight{\the\strutdimen}% + % depth \strutdimen\normallineheight \ifgridsnapping +\ifdim\minimumstrutdepth>\zeropoint + \strutdimen\minimumstrutdepth +\else \advance\strutdimen-\strutheight +\fi \else +\ifdim\minimumstrutdepth>\zeropoint + \strutdimen\minimumstrutdepth +\else \strutdimen\strutdepthfactor\strutdimen +\fi \strutdimen\spacingfactor\strutdimen \fi \edef\strutdepth{\the\strutdimen}% + % finish \dosetstrut} \def\setcharstrut#1% - {\setbox\strutbox\hbox{#1}% + {\setbox\strutbox\normalhbox{#1}% \edef\strutheight{\the\strutht}% \edef\strutdepth {\the\strutdp}% \dosetstrut} +% \def\setfontstrut +% {\setcharstrut{(}} +% +% better, since some fonts have small (but descending Q etc) + \def\setfontstrut - {\setcharstrut{(}} + {\setcharstrut{(gplQT}} \def\setcapstrut% could be M, but Q has descender {\setcharstrut{Q}} @@ -1849,13 +1950,13 @@ %D Sometimes a capstrut comes in handy %D -%D \starttabulatie[|Tl|l|l|] -%D \NC yes \NC normal strut \NC {\showstruts\setupstrut[ja]\strut} \NC \NR -%D \NC no \NC no strut \NC {\showstruts\setupstrut[nee]\strut} \NC \NR -%D \NC kap \NC a capital strut (i.e. Q) \NC {\showstruts\setupstrut[kap]\strut} \NC \NR +%D \starttabulate[|Tl|l|l|] +%D \NC yes \NC normal strut \NC {\showstruts\setupstrut[yes]\strut} \NC \NR +%D \NC no \NC no strut \NC {\showstruts\setupstrut[no]\strut} \NC \NR +%D \NC kap \NC a capital strut (i.e. Q) \NC {\showstruts\setupstrut[cap]\strut} \NC \NR %D \NC A B \unknown \NC a character strut (e.g. A) \NC {\showstruts\setupstrut[A]\strut} \NC \NR %D \NC \NC a normal strut \NC {\showstruts\setupstrut\strut} \NC \NR -%D \stoptabulatie +%D \stoptabulate \def\setupstrut {\dosingleempty\dosetupstrut} @@ -1863,11 +1964,11 @@ \def\dosetupstrut[#1]% yet undocumented, todo: fontstrut {\processaction [#1] - [ \v!ja=>\setstrut, - \v!nee=>\setnostrut, - \v!kap=>\setcapstrut, - \v!passend=>\setfontstrut, - \v!regel=>\setstrut, + [ \v!yes=>\setstrut, + \v!no=>\setnostrut, + \v!cap=>\setcapstrut, + \v!fit=>\setfontstrut, + \v!line=>\setstrut, \s!default=>\setstrut, \s!unknown=>\setcharstrut\commalistelement]} @@ -2031,18 +2132,30 @@ % % expands to \widowpenalty \maxdimen \maxdimen \zeropoint -\def\resetpenalties#1% - {\ifx#1\undefined\else - #1\minusone - \fi} +\beginTEX -\def\setpenalties#1#2#3% - {\ifx#1\undefined\else - #1\numexpr(#2+1)\space\doexpandedrecurse{\numexpr(#2)}{#3}\zerocount\relax - \fi} + \let\resetpenalties \gobbleoneargument + \let\setpenalties \gobblethreearguments + \let\doexpandedrecurse\gobbletwoarguments -\def\doexpandedrecurse#1#2% - {\ifnum#1>\zerocount#2\@EA\doexpandedrecurse\@EA{\the\numexpr(#1-1)}{#2}\fi} +\endTEX + +\beginETEX \numexpr + + \def\resetpenalties#1% + {\ifx#1\undefined\else + #1\minusone + \fi} + + \def\setpenalties#1#2#3% + {\ifx#1\undefined\else % space before #3 prevents lookahead problems, needed when #3=text + #1\numexpr(#2+1)\space\doexpandedrecurse{\the\numexpr(#2)}{ #3}\zerocount\relax + \fi} + + \def\doexpandedrecurse#1#2% + {\ifnum#1>\zerocount#2\@EA\doexpandedrecurse\@EA{\the\numexpr(#1-1)}{#2}\fi} + +\endETEX \newif\ifgridsnapping % to be sure @@ -2067,6 +2180,14 @@ % to be documented +\def\nopenalties + {\widowpenalty \zerocount + \clubpenalty \zerocount + \brokenpenalty \zerocount + \doublehyphendemerits\zerocount + \finalhyphendemerits \zerocount + \adjdemerits \zerocount} + \def\setdefaultpenalties {\setups[\systemsetupsprefix\s!default]} @@ -2096,7 +2217,7 @@ % as an illustration: -\startsetups [\systemsetupsprefix\v!streng] +\startsetups [\systemsetupsprefix\v!strict] \setups[\v!reset] @@ -2129,47 +2250,47 @@ \def\dotfskip#1{{\tf\hskip#1}} \def\dotfkern#1{{\tf\kern #1}} -\newskip\linkssmaller -\newskip\rechtssmaller -\newskip\middensmaller +\newskip\ctxleftskip +\newskip\ctxrightskip +\newskip\ctxmidskip -\def\dosinglesmaller#1% +\def\dosinglenarrower#1% {\processaction [#1] - [ \v!links=>\global\advance\linkssmaller \@@sllinks, - \v!midden=>\global\advance\middensmaller \@@slmidden, - \v!rechts=>\global\advance\rechtssmaller \@@slrechts, - \v!geen=>, - \s!unknown=>\global\advance\middensmaller \commalistelement]} + [ \v!left=>\global\advance\ctxleftskip \@@slleft, + \v!middle=>\global\advance\ctxmidskip \@@slmiddle, + \v!right=>\global\advance\ctxrightskip \@@slright, + \v!none=>, + \s!unknown=>\global\advance\ctxmidskip \commalistelement]} -\def\dosmaller[#1]% +\def\donarrower[#1]% {\processaction [#1] - [ \v!links=>\global\advance\linkssmaller \@@sllinks, - \v!midden=>\global\advance\middensmaller \@@slmidden, - \v!rechts=>\global\advance\rechtssmaller \@@slrechts, - \v!geen=>,% handy for delimitedtexts - \s!unknown=>{\herhaalmetcommando[#1]\dosinglesmaller}]} + [ \v!left=>\global\advance\ctxleftskip \@@slleft, + \v!middle=>\global\advance\ctxmidskip \@@slmiddle, + \v!right=>\global\advance\ctxrightskip \@@slright, + \v!none=>,% handy for delimitedtexts + \s!unknown=>{\dorepeatwithcommand[#1]\dosinglenarrower}]} -\def\complexstartsmaller[#1]% +\def\complexstartnarrower[#1]% {\par \bgroup - \global\linkssmaller \zeropoint - \global\rechtssmaller\zeropoint - \global\middensmaller\zeropoint - \processcommalistwithparameters[#1]\dosmaller - \advance\leftskip \linkssmaller - \advance\rightskip \rechtssmaller - \advance\leftskip \middensmaller - \advance\rightskip \middensmaller + \global\ctxleftskip \zeropoint + \global\ctxrightskip\zeropoint + \global\ctxmidskip\zeropoint + \processcommalistwithparameters[#1]\donarrower + \advance\leftskip \ctxleftskip + \advance\rightskip \ctxrightskip + \advance\leftskip \ctxmidskip + \advance\rightskip \ctxmidskip \seteffectivehsize} -\def\simplestartsmaller - {\startsmaller[\v!midden]} +\def\simplestartnarrower + {\startnarrower[\v!middle]} -\definecomplexorsimple\startsmaller +\definecomplexorsimple\startnarrower -\def\stopsmaller +\def\stopnarrower {\par % else skips forgotten \egroup} @@ -2189,21 +2310,12 @@ \let\effectiveleftskip \@@effectiveleftskip \let\effectiverightskip\@@effectiverightskip} -\def\dodefinieerhbox[#1][#2]% +\def\dodefinehbox[#1][#2]% {\setvalue{hbox#1}##1% {\hbox to #2{\begstrut##1\endstrut\hss}}} -\def\definieerhbox% - {\dodoubleargument\dodefinieerhbox} - -\def\lrcbox#1#2#% - {\vbox#2\bgroup - \let\\=\endgraf - \forgetall#1\let\next=} - -\def\lbox{\lrcbox\raggedleft} -\def\rbox{\lrcbox\raggedright} -\def\cbox{\lrcbox\raggedcenter} +\def\definehbox% + {\dodoubleargument\dodefinehbox} \def\iobox#1#2#3#% here #3# is not really needed {\vbox\bgroup % we want to return a vbox like the others @@ -2220,86 +2332,44 @@ \def\dosetraggedvbox#1% {\processaction [#1] - [ \v!links=>\let\raggedbox\lbox, - \v!rechts=>\let\raggedbox\rbox, - \v!midden=>\let\raggedbox\cbox, - \v!binnen=>\let\raggedbox\ibox, - \v!buiten=>\let\raggedbox\obox, - \v!nee=>\def\raggedbox{\vbox\bgroup\raggedright\let\next=}, + [ \v!left=>\let\raggedbox\lbox, + \v!right=>\let\raggedbox\rbox, + \v!middle=>\let\raggedbox\cbox, + \v!inner=>\let\raggedbox\ibox, + \v!outer=>\let\raggedbox\obox, + \v!flushleft=>\let\raggedbox\rbox, + \v!flushright=>\let\raggedbox\lbox, + \v!center=>\let\raggedbox\cbox, + \v!no=>\def\raggedbox{\vbox\bgroup\raggedright\let\next=}, \s!default=>\let\raggedbox\vbox, \s!unknown=>\let\raggedbox\vbox]} \def\dosetraggedhbox#1% {\processaction % slow [#1] - [ \v!links=>\def\raggedbox{\doregelplaats\v!links }, - \v!rechts=>\def\raggedbox{\doregelplaats\v!rechts}, - \v!midden=>\def\raggedbox{\doregelplaats\v!midden}, - \v!binnen=>\def\raggedbox{\doregelplaats\v!binnen}, - \v!buiten=>\def\raggedbox{\doregelplaats\v!buiten}, - \v!normaal=>\let\raggedbox\hbox, + [ \v!left=>\def\raggedbox{\doalignedline\v!left }, + \v!right=>\def\raggedbox{\doalignedline\v!right }, + \v!middle=>\def\raggedbox{\doalignedline\v!middle}, + \v!inner=>\def\raggedbox{\doalignedline\v!inner }, + \v!outer=>\def\raggedbox{\doalignedline\v!outer }, + \v!flushleft=>\def\raggedbox{\doalignedline\v!right }, + \v!flushright=>\def\raggedbox{\doalignedline\v!left }, + \v!center=>\def\raggedbox{\doalignedline\v!middle}, + \v!normal=>\let\raggedbox\hbox, \s!default=>\let\raggedbox\hbox, \s!unknown=>\let\raggedbox\hbox]} -% \def\dosetraggedcommand#1% ook ruim,rechts en zo -% {\processaction -% [#1] -% [ \v!links=>\def\raggedcommand{\raggedleft}, -% \v!rechts=>\def\raggedcommand{\raggedright}, -% \v!midden=>\def\raggedcommand{\raggedcenter}, -% \v!nee=>\def\raggedcommand{\raggedright}, -% \v!normaal=>\let\raggedcommand\relax, -% \s!default=>\def\raggedcommand{\raggedcenter}, -% \s!unknown=>\let\raggedcommand\relax]} - \def\dosetraggedcommand#1% {\expanded{\dodosetraggedcommand{#1}}} -% \def\dodosetraggedcommand#1% -% {\doifinsetelse{\v!ruim} {#1}{\!!doneatrue}{\!!doneafalse}% -% \doifinsetelse{\v!breed}{#1}{\!!donebtrue}{\!!donebfalse}% -% \let\raggedcommand\relax -% \let\raggedtopcommand\empty -% \let\raggedbottomcommand\empty -% \!!donectrue -% \ExpandFirstAfter\processallactionsinset -% [#1] -% [ \v!links=>\if!!donea \def\raggedcommand{\veryraggedleft}% -% \else \def\raggedcommand{\raggedleft}% -% \fi -% \!!donecfalse, % {\v!links,\v!midden} -% \v!rechts=>\if!!donea \def\raggedcommand{\veryraggedright}% -% \else \def\raggedcommand{\raggedright}% -% \fi -% \!!donecfalse, % {\v!rechts,\v!midden} -% \v!midden=>\if!!donec -% \if!!doneb \def\raggedcommand{\raggedwidecenter}% -% \else\if!!donea \def\raggedcommand{\veryraggedcenter}% -% \else \def\raggedcommand{\raggedcenter}% -% \fi\fi -% \!!donecfalse % {\v!midden,\v!midden} -% \else -% \let\raggedbottomcommand\vfilll % bonus, pretty strong -% \let\raggedtopcommand \vfilll % used with \framed for -% \fi, % instance in tables -% \v!hoog=>\let\raggedbottomcommand\vfilll, % and since we lack a -% \v!laag=>\let\raggedtopcommand \vfilll, % proper keyword, but -% \v!laho=>\let\raggedbottomcommand\vfilll % we do support the -% \let\raggedtopcommand \vfilll, % ugly laho (lohi) -% \v!nee=>\def\raggedcommand{\raggedright}, -% \v!ja=>\let\raggedcommand\notragged, % was \relax -% \v!normaal=>\let\raggedcommand\notragged]} % was \relax -% -% much faster and important since TABLE uses them a lot: - \def\dodosetraggedcommand#1% beware: #1=empty is ignored, keep that! - {\let\raggedcommand\relax - \let\raggedtopcommand\empty + {\let\raggedcommand \relax + \let\raggedtopcommand \empty \let\raggedbottomcommand\empty \chardef\raggedoneliner\zerocount \doifsomething{#1} - {\doifinsetelse\v!ruim {#1}\!!doneatrue\!!doneafalse - \doifinsetelse\v!breed{#1}\!!donebtrue\!!donebfalse + {\doifinsetelse\v!broad{#1}\!!doneatrue\!!doneafalse + \doifinsetelse\v!wide {#1}\!!donebtrue\!!donebfalse \!!donectrue \rawprocesscommalist[#1]\dododosetraggedcommand}} @@ -2308,19 +2378,19 @@ \def\@@ragged@@command{@@raggedcommand} -\setvalue{\@@ragged@@command\v!links}% +\setvalue{\@@ragged@@command\v!left}% {\if!!donea \def\raggedcommand{\veryraggedleft}% \else \def\raggedcommand{\raggedleft}% \fi \!!donecfalse} -\setvalue{\@@ragged@@command\v!rechts}% +\setvalue{\@@ragged@@command\v!right}% {\if!!donea \def\raggedcommand{\veryraggedright}% \else \def\raggedcommand{\raggedright}% \fi \!!donecfalse} -\setvalue{\@@ragged@@command\v!midden}% +\setvalue{\@@ragged@@command\v!middle}% {\if!!donec \if!!doneb \def\raggedcommand{\raggedwidecenter}% \else\if!!donea \def\raggedcommand{\veryraggedcenter}% @@ -2332,40 +2402,44 @@ \let\raggedtopcommand \vfilll % used with \framed for \fi} % instance in tables -\setvalue{\@@ragged@@command\v!hoog}% +\setvalue{\@@ragged@@command\v!flushleft }{\getvalue{\@@ragged@@command\v!right }} +\setvalue{\@@ragged@@command\v!flushright}{\getvalue{\@@ragged@@command\v!left }} +\setvalue{\@@ragged@@command\v!center }{\getvalue{\@@ragged@@command\v!middle}} + +\setvalue{\@@ragged@@command\v!high}% {\let\raggedbottomcommand\vfilll} % and since we lack a -\setvalue{\@@ragged@@command\v!laag}% +\setvalue{\@@ragged@@command\v!low}% {\let\raggedtopcommand\vfilll} % proper keyword, but -\setvalue{\@@ragged@@command\v!laho}% +\setvalue{\@@ragged@@command\v!lohi}% {\let\raggedbottomcommand\vfilll % we do support the \let\raggedtopcommand\vfilll} % ugly laho (lohi) -\setvalue{\@@ragged@@command\v!nee}% +\setvalue{\@@ragged@@command\v!no}% {\def\raggedcommand{\raggedright}} -\setvalue{\@@ragged@@command\v!ja}% +\setvalue{\@@ragged@@command\v!yes}% {\let\raggedcommand\notragged} -\setvalue{\@@ragged@@command\v!normaal}% +\setvalue{\@@ragged@@command\v!normal}% {\let\raggedcommand\notragged} -\setvalue{\@@ragged@@command\v!binnen}% not yet perfect +\setvalue{\@@ragged@@command\v!inner}% not yet perfect {\signalrightpage % may interfere \doifrightpageelse - {\getvalue{\@@ragged@@command\v!rechts}} - {\getvalue{\@@ragged@@command\v!links}}} + {\getvalue{\@@ragged@@command\v!right}} + {\getvalue{\@@ragged@@command\v!left}}} -\setvalue{\@@ragged@@command\v!buiten}% not yet perfect +\setvalue{\@@ragged@@command\v!outer}% not yet perfect {\signalrightpage % may interfere \doifrightpageelse - {\getvalue{\@@ragged@@command\v!links}} - {\getvalue{\@@ragged@@command\v!rechts}}} + {\getvalue{\@@ragged@@command\v!left}} + {\getvalue{\@@ragged@@command\v!right}}} \chardef\raggedoneliner\zerocount -\setvalue{\@@ragged@@command\v!regel}% +\setvalue{\@@ragged@@command\v!line}% {\chardef\raggedoneliner\plusone} \def\@@startraggedoneliner @@ -2395,10 +2469,6 @@ \def\explicithmode{\unhbox\voidb@x} -% Nodig voor gebruikers - -\def\geentest{\donottest} - % Nog doen: % % \goodbreak -> \allowbreak en \dosomebreak{..} in koppen @@ -2412,7 +2482,7 @@ % Om ongewenste witruimte te voorkomen kan met \dosomebreak{\break} % een \penalty v¢¢r witruimte worden geplaatst. -\def\removelastskip% a redefinition of plain +\def\removelastskip % a redefinition of plain {\ifvmode\ifdim\lastskip=\zeropoint\else\vskip-\lastskip\fi\fi} % first version: @@ -2521,13 +2591,13 @@ \def\forgetparindent {\forgeteverypar \indentfirstparagraphtrue % recently added - \let\currentvoorwit\v!geen - \voorwit\zeropoint + \let\currentindentation\v!none + \ctxparindent\zeropoint \parindent\zeropoint\relax} \def\forgetparskip - {\let\currentwitruimte\v!geen - \tussenwit\zeropoint + {\let\currentwhitespace\v!none + \ctxparskip\zeropoint \parskip\zeropoint\relax} \def\forgetbothskips @@ -2674,7 +2744,6 @@ \@EA\doconvertfont\csname#1#2\@EA\endcsname \fi} - \unexpanded\def\@@dostopattributes {\doglobalstopcolor \endgroup} @@ -2749,19 +2818,19 @@ \def\dosetleftskipadaption#1% {\leftskipadaption\zeropoint \processaction[#1] - [\v!standaard=>\leftskipadaption - \ifdim\voorwit=\zeropoint\@@sllinks\else\voorwit\fi, - \v!ja=>\leftskipadaption - \ifdim\voorwit=\zeropoint\@@sllinks\else\voorwit\fi, - \v!nee=>, + [\v!standard=>\leftskipadaption + \ifdim\ctxparindent=\zeropoint\@@slleft\else\ctxparindent\fi, + \v!yes=>\leftskipadaption + \ifdim\ctxparindent=\zeropoint\@@slleft\else\ctxparindent\fi, + \v!no=>, \s!unknown=>\leftskipadaption#1]} \def\dosetrightskipadaption#1% {\rightskipadaption\zeropoint \processaction[#1] - [\v!standaard=>\rightskipadaption\@@slrechts, - \v!ja=>\rightskipadaption\@@slrechts, - \v!nee=>, + [\v!standard=>\rightskipadaption\@@slright, + \v!yes=>\rightskipadaption\@@slright, + \v!no=>, \s!unknown=>\rightskipadaption#1]} \endTEX @@ -2770,18 +2839,18 @@ % installation -\setvalue{@lsa@\v!standaard}% - {\ifdim\voorwit=\zeropoint\@@sllinks\else\voorwit\fi} +\setvalue{@lsa@\v!standard}% + {\ifdim\ctxparindent=\zeropoint\@@slleft\else\ctxparindent\fi} -\setvalue{@lsa@\v!ja}% - {\ifdim\voorwit=\zeropoint\@@sllinks\else\voorwit\fi} +\setvalue{@lsa@\v!yes}% + {\ifdim\ctxparindent=\zeropoint\@@slleft\else\ctxparindent\fi} -\letvalue{@lsa@\v!nee }\zeropoint +\letvalue{@lsa@\v!no }\zeropoint \letvalue{@lsa@\empty }\zeropoint -\setvalue{@rsa@\v!standaard}{\@@slrechts} -\setvalue{@rsa@\v!ja }{\@@slrechts} -\letvalue{@rsa@\v!nee }\zeropoint +\setvalue{@rsa@\v!standard}{\@@slright} +\setvalue{@rsa@\v!yes }{\@@slright} +\letvalue{@rsa@\v!no }\zeropoint \letvalue{@rsa@\empty }\zeropoint % not safe for 2\parindent @@ -2819,33 +2888,34 @@ \endETEX -% Dit hoort eigenlijk thuis onder het kopje boodschappen cq, -% meldingen. - -\let\mindermeldingen\dontcomplain - -\definetwopasslist\s!paragraph - -\newcounter\nofraggedparagraphs - -\def\doparagraphreference% looks very much like domarginreference - {\doglobal\increment\nofraggedparagraphs\relax - \edef\writeparref% - {\writeutilitycommand% - {\twopassentry% - {\s!paragraph}% - {\nofraggedparagraphs}% - {\noexpand\realfolio}}}% - \writeparref} - -% \def\setraggedparagraphmode#1#2% -% {\ifinner +% \definetwopasslist\s!paragraph +% +% \newcounter\nofraggedparagraphs +% +% \def\doparagraphreference% looks very much like domarginreference +% {\doglobal\increment\nofraggedparagraphs +% \edef\writeparref% +% {\writeutilitycommand% +% {\twopassentry% +% {\s!paragraph}% +% {\nofraggedparagraphs}% +% {\noexpand\realfolio}}}% +% \writeparref} +% +% \def\setraggedparagraphmode#1#2% combineren met \ifrightpage +% {\ifinpagebody % \ifdubbelzijdig -% \gettwopassdata{\s!paragraph}% +% \ifodd\realpageno\relax#1\else#2\fi +% \else +% #2\relax +% \fi +% \else\ifinner +% \ifdubbelzijdig +% \gettwopassdata\s!paragraph % \iftwopassdatafound -% \ifodd\twopassdata#1\else#2\fi +% \ifodd\twopassdata\relax#1\else#2\fi % \else -% \ifodd\realfolio#1\else#2\fi +% \ifodd\realpageno\relax#1\else#2\fi % \fi % \doparagraphreference % \else @@ -2853,62 +2923,87 @@ % \fi % \else % #2\relax -% \fi} - -\def\setraggedparagraphmode#1#2% combineren met \ifrightpage - {\ifinpagebody - \ifdubbelzijdig - \ifodd\realpageno\relax#1\else#2\fi - \else - #2\relax - \fi - \else\ifinner - \ifdubbelzijdig - \gettwopassdata\s!paragraph - \iftwopassdatafound - \ifodd\twopassdata\relax#1\else#2\fi - \else - \ifodd\realpageno\relax#1\else#2\fi - \fi - \doparagraphreference - \else - #2\relax - \fi - \else - #2\relax - \fi\fi} - -% \let\doifrightpageelse\setraggedparagraphmode - -% in both (otr) modules ! - -% \def\doifrightpageelse#1#2% -% {\ifdubbelzijdig -% \gettwopassdata\s!paragraph -% \iftwopassdatafound -% \ifodd\twopassdata#1\else#2\fi +% \fi\fi} +% +% \def\doifrightpageelse % watch out: other default ! ! ! +% {\ifinpagebody +% % optimalisation ? +% \ifdubbelzijdig +% \ifodd\realpageno\relax +% \twopassdatafoundtrue \else \twopassdatafoundfalse +% \fi +% \else +% \twopassdatafoundtrue +% \fi +% \else +% \ifdubbelzijdig +% \gettwopassdata\s!paragraph +% \iftwopassdatafound +% \ifodd\twopassdata\relax +% \twopassdatafoundtrue \else \twopassdatafoundfalse +% \fi +% \else +% \ifodd\realpageno\relax +% \twopassdatafoundtrue \else \twopassdatafoundfalse +% \fi +% \fi % \else -% \ifodd\realfolio#1\else#2\fi +% \twopassdatafoundtrue % \fi +% \fi +% \iftwopassdatafound +% \@EA\firstoftwoarguments % \else -% #1% was #2 +% \@EA\secondoftwoarguments % \fi} % -% better : +% \def\signalrightpage +% {\ifdubbelzijdig \ifinpagebody \else +% \doparagraphreference +% \fi \fi} -\def\doifrightpageelse % watch out: other default ! ! ! - {\ifinpagebody - \ifdubbelzijdig - \ifodd\twopassdata\relax - \twopassdatafoundtrue \else \twopassdatafoundfalse +% slightly adapted implementation + +\newcounter \noftrackedpagestates +\newif \ifpagestatemismatch +\let \realpagestateno \realfolio +\chardef \frozenpagestate \zerocount + +\def\dotrackpagestate#1#2% + {\ifdubbelzijdig \ifinpagebody \else + \doforcedtrackpagestate{#1}{#2}% + \fi \fi} + +\def\doforcedtrackpagestate#1#2% + {\ifcase\frozenpagestate + \doglobal\increment\noftrackedpagestates + \doglobal\increment#2% + \edef\dodotrackpagestate + {\writeutilitycommand + {\twopassentry{#1}{\noftrackedpagestates}{#2:\noexpand\realfolio}}}% + %\llap{\infofont\noftrackedpagestates/#2}% tracing + \dodotrackpagestate + \fi} + +\def\doifrightpagestateelse#1#2% + {\ifcase\frozenpagestate + \pagestatemismatchfalse + \let\realpagestateno\realfolio + \ifinpagebody + \ifdubbelzijdig + \ifodd\realpageno\relax + \twopassdatafoundtrue \else \twopassdatafoundfalse + \fi + \else + \twopassdatafoundtrue \fi - \else - \twopassdatafoundtrue - \fi - \else - \ifdubbelzijdig - \gettwopassdata\s!paragraph + \else\ifdubbelzijdig + \findtwopassdata{#1}{#2:}% \iftwopassdatafound + \let\realpagestateno\twopassdata + \ifnum\twopassdata=\realpageno \else + \pagestatemismatchtrue + \fi \ifodd\twopassdata\relax \twopassdatafoundtrue \else \twopassdatafoundfalse \fi @@ -2919,6 +3014,39 @@ \fi \else \twopassdatafoundtrue + \fi\fi + \else + \ifodd\realpagestateno\relax + \twopassdatafoundtrue \else \twopassdatafoundfalse + \fi + \fi + \iftwopassdatafound + \@EA\firstoftwoarguments + \else + \@EA\secondoftwoarguments + \fi} + +\def\doifforcedrightpagestateelse#1#2% + {\ifcase\frozenpagestate + \pagestatemismatchfalse + \let\realpagestateno\realfolio + \findtwopassdata{#1}{#2:}% + \iftwopassdatafound + \let\realpagestateno\twopassdata + \ifnum\twopassdata=\realpageno \else + \pagestatemismatchtrue + \fi + \ifodd\twopassdata\relax + \twopassdatafoundtrue \else \twopassdatafoundfalse + \fi + \else + \ifodd\realpageno\relax + \twopassdatafoundtrue \else \twopassdatafoundfalse + \fi + \fi + \else + \ifodd\realpagestateno\relax + \twopassdatafoundtrue \else \twopassdatafoundfalse \fi \fi \iftwopassdatafound @@ -2927,11 +3055,93 @@ \@EA\secondoftwoarguments \fi} -\def\signalrightpage - {\ifdubbelzijdig - \doparagraphreference +\def\freezepagestate {\chardef\frozenpagestate\plusone } +\def\defrostpagestate{\chardef\frozenpagestate\zerocount} + +% we can make more of these on top, but how to deal with mixed frozen states + +\definetwopasslist\s!paragraph \newcounter\nofraggedparagraphs + +\def\signalrightpage {\dotrackpagestate \s!paragraph\nofraggedparagraphs} +\def\doifrightpageelse{\doifrightpagestateelse\s!paragraph\nofraggedparagraphs} + +\newcounter\pagesignallevel + +\def\startsignalrightpage % one may do a \postsignalrightplace + {\increment\pagesignallevel + \presignalrightpage + \let\signalrightpage\relax + \let\presignalrightpage\relax + \let\startsignalrightpage\relax + \doifrightpageelse\donothing\donothing + \freezepagestate} + +\def\stopsignalrightpage + {\ifcase\pagesignallevel\or\postsignalrightpage\fi + \decrement\pagesignallevel} + +\def\setraggedparagraphmode{\signalrightpage\doifrightpageelse} % move it there + +\def\doifswappedrightpageelse#1#2% alleen in box construction ! + {\doifrightpageelse + {#1} + {\scratchcounter\realpageno + \realpageno\realpagestateno\relax + \swapmargins + \realpageno\scratchcounter + #2}} + +\newbox\signaledrightpage % this way we can avoid interference, i.e. postpone placement + +\def\presignalrightpage {\global\setbox\signaledrightpage\hbox{\signalrightpage}} +\def\postsignalrightpage{\ifvoid\signaledrightpage\else\box\signaledrightpage\fi} + +% The next feature is is used in: +% +% \definenumber[test][way=bypage] +% +% \def\Test +% {\incrementnumber[test]\rawnumber[test]/% +% \incrementnumber[test]\rawnumber[test]/% +% \incrementnumber[test]\rawnumber[test]\space +% \checkpagechange{oeps}\changedpage{oeps}\space +% \ifpagechanged TRUE\else FALSE\fi} +% +% \Test\page \Test\par \Test\page \Test\par \Test\page \Test\page +% +% (adapted from cont-new.tex:) + +\newif\ifpagechanged \let\lastchangedpage\empty + +\def\docheckpagestatechange#1#2#3% + {\pagechangedfalse + \doforcedtrackpagestate{#2}{#3}% + \findtwopassdata{#2}{#3:}% + \iftwopassdatafound + \ifnum\twopassdata>0\getvalue{#2:p:#1}\relax + \pagechangedtrue + \fi + \fi + \ifpagechanged + \letgvalue{#2:p:#1}\twopassdata + \globallet\lastchangedpage\twopassdata + \else + \globallet\lastchangedpage\realfolio \fi} +\def\changedpagestate#1#2% + {\executeifdefined{#2:p:#1}{0}} + +\def\checkpagechange#1{\docheckpagestatechange{#1}\s!paragraph\nofraggedparagraphs} +\def\changedpage #1{\changedpagestate{#1}\s!paragraph} + +% saved struts + +\ifx\savedstrutbox\undefined \newbox\savedstrutbox \fi + +\def\savestrut {\setbox\savedstrutbox\copy\strutbox} +\def\savedstrut{\copy \savedstrutbox} + % De onderstaande macro's zijn opgenomen in Plain TeX. % % \def\raggedright% @@ -2961,26 +3171,26 @@ \newif\ifr@ggedbottom \newif\ifb@selinebottom -\def\normalbottom% +\def\normalbottom {% \topskip 10pt \r@ggedbottomfalse} \def\raggedbottom - {\chardef\bottomraggedness0 + {\chardef\bottomraggedness\zerocount \n@rmalbottomfalse \r@ggedbottomtrue \b@selinebottomfalse \settopskip} \def\alignbottom - {\chardef\bottomraggedness1 + {\chardef\bottomraggedness\plusone \n@rmalbottomtrue \r@ggedbottomfalse \b@selinebottomfalse \settopskip} \def\baselinebottom - {\chardef\bottomraggedness2 + {\chardef\bottomraggedness\plustwo \n@rmalbottomfalse \r@ggedbottomfalse \b@selinebottomtrue @@ -3041,13 +3251,12 @@ \let\updateraggedskips\relax \def\setraggedskips#1#2#3#4#5#6#7% never change this name - {\def\updateraggedskips% - {\dosetraggedskips{#1}{#2}{#3}{#4}{#5}{#6}{#7}}% + {\def\updateraggedskips{\dosetraggedskips{#1}{#2}{#3}{#4}{#5}{#6}{#7}}% \updateraggedskips} \def\dosetraggedskips#1#2#3#4#5#6#7% {\chardef \raggedstatus#1\relax - \leftskip 1\leftskip\!!plus#2\relax % zie: Tex By Topic 8.1.3 + \leftskip 1\leftskip \!!plus#2\relax % zie: Tex By Topic 8.1.3 \rightskip 1\rightskip\!!plus#3\relax % zie: Tex By Topic 8.1.3 \spaceskip #4\relax \xspaceskip #5\relax @@ -3087,11 +3296,11 @@ %D We used to have: %D -%D \starttypen +%D \starttyping %D \def\raggedright %D {\setraggedness\rightraggedness %D \setraggedskips{3}{0em}{\rightraggedness}{.3333em}{.5em}{0em}{\parindent}} -%D \stoptypen +%D \stoptyping %D %D However, the next alternative, suggested by Taco, is better. @@ -3106,10 +3315,10 @@ %D When we want the last line to have a natural width: %D -%D \starttypen +%D \starttyping %D \def\veryraggedleft% %D {\setraggedskips{1}{1fil}{0em}{.3333em}{.5em}{0em}{-1fil}} -%D \stoptypen +%D \stoptyping %D %D but this one is not accepted by the macros. @@ -3124,7 +3333,7 @@ \def\ttraggedright {\tttf \setraggedskips3\zeropoint\rightraggedness - \zeropoint\zeropoint\zeropoint\parindent} % \voorwit + \zeropoint\zeropoint\zeropoint\parindent} % \ctxparindent %D A bonus one: @@ -3135,7 +3344,6 @@ \newif\if@@asragged \@@asraggedtrue % old method - % todo % % \setuplayout[grid=yes,lines=44] \showgrid @@ -3143,46 +3351,114 @@ % test \vfill test \endgraf \strut \endgraf \vskip-\lineheight \removedepth \pagina test % \stoptext -\def\dodosetupalign[#1]% - {\doifinsetelse\v!ruim {#1}\!!doneatrue\!!doneafalse - \doifinsetelse\v!breed{#1}\!!donebtrue\!!donebfalse - \ExpandFirstAfter\processallactionsinset - [#1] - [ \v!regel=>\baselinebottom, - \v!onder=>\raggedbottom, - \v!hoogte=>\normalbottom, - \v!breedte=>\notragged, - \v!normaal=>\notragged, - \v!ja=>\notragged, - \v!nee=>\raggedright, -\if@@asragged\v!binnen\else\v!buiten\fi - =>\setraggedparagraphmode\raggedleft\raggedright, -\if@@asragged\v!buiten\else\v!binnen\fi - =>\setraggedparagraphmode\raggedright\raggedleft, -\if@@asragged\v!links\else\v!rechts\fi - =>\if!!donea\veryraggedleft \else\raggedleft \fi, -\if@@asragged\v!rechts\else\v!links\fi - =>\if!!donea\veryraggedright \else\raggedright \fi, - \v!midden=>\if!!doneb\raggedwidecenter\else - \if!!donea\veryraggedcenter\else\raggedcenter\fi\fi, - \v!hangend=>\enableprotruding, - \v!niethangend=>\disableprotruding, - \v!afgebroken=>\dohyphens, -\v!nietafgebroken=>\nohyphens, - \v!nieuw=>\@@asraggedfalse, % so new will give you consistency - \v!reset=>\notragged\normalbottom]} - -\def\dosetupalign[#1]% - {\expanded{\dodosetupalign[#1]}} +% Keep this one: +% +% \def\setupalign +% {\dosingleargument\dosetupalign} +% +% \def\dosetupalign[#1]% +% {\expanded{\dodosetupalign[#1]}} +% +% \def\dodosetupalign[#1]% +% {\doifinsetelse\v!broad {#1}\!!doneatrue\!!doneafalse +% \doifinsetelse\v!wide{#1}\!!donebtrue\!!donebfalse +% \ExpandFirstAfter\processallactionsinset % expansion redundant +% [#1] +% [ \v!line=>\baselinebottom, +% \v!bottom=>\raggedbottom, +% \v!height=>\normalbottom, +% \v!width=>\notragged, +% \v!normal=>\notragged, +% \v!yes=>\notragged, +% \v!no=>\raggedright, +% \if@@asragged\v!inner\else\v!outer\fi=>\setraggedparagraphmode\raggedleft\raggedright, +% \if@@asragged\v!outer\else\v!inner\fi=>\setraggedparagraphmode\raggedright\raggedleft, +% \if@@asragged\v!left \else\v!right\fi=>\if!!donea\veryraggedleft \else\raggedleft \fi, +% \if@@asragged\v!right\else\v!left \fi=>\if!!donea\veryraggedright \else\raggedright \fi, +% \v!middle=>\if!!doneb\raggedwidecenter\else\if!!donea\veryraggedcenter\else\raggedcenter\fi\fi, +% \v!flushleft=>\if!!donea\veryraggedright \else\raggedright \fi, +% \v!flushright=>\if!!donea\veryraggedleft \else\raggedleft \fi, +% \v!center=>\if!!doneb\raggedwidecenter\else\if!!donea\veryraggedcenter\else\raggedcenter\fi\fi, +% \v!hanging=>\enableprotruding, +% \v!nothanging=>\disableprotruding, +% \v!hz=>\enableadjusting, +% \v!nohz=>\disableadjusting, +% \v!hyphenated=>\dohyphens, +% \v!nothyphenated=>\nohyphens, +% \v!new=>\@@asraggedfalse, % so new will give you consistency +% \v!reset=>\notragged\normalbottom]} +% +% The next one is more than three times faster: + +\setvalue{@@align@@\v!line }{\baselinebottom} +\setvalue{@@align@@\v!bottom }{\raggedbottom} +\setvalue{@@align@@\v!height }{\normalbottom} +\setvalue{@@align@@\v!width }{\notragged} +\setvalue{@@align@@\v!normal }{\notragged} +\setvalue{@@align@@\v!yes }{\notragged} +\setvalue{@@align@@\v!no }{\raggedright} +\setvalue{@@align@@\v!inner }{\if@@asragged + \setraggedparagraphmode\raggedleft\raggedright + \else + \setraggedparagraphmode\raggedright\raggedleft + \fi} +\setvalue{@@align@@\v!outer }{\if@@asragged + \setraggedparagraphmode\raggedright\raggedleft + \else + \setraggedparagraphmode\raggedleft\raggedright + \fi} +\setvalue{@@align@@\v!left }{\if@@asragged + \if!!donea\veryraggedleft\else\raggedleft\fi + \else + \if!!donea\veryraggedright\else\raggedright\fi + \fi} +\setvalue{@@align@@\v!right }{\if@@asragged + \if!!donea\veryraggedright\else\raggedright\fi + \else + \if!!donea\veryraggedleft\else\raggedleft\fi + \fi} +\setvalue{@@align@@\v!middle }{\if!!doneb\raggedwidecenter\else\if!!donea\veryraggedcenter\else\raggedcenter\fi\fi} +\setvalue{@@align@@\v!flushleft }{\if!!donea\veryraggedright \else\raggedright \fi} +\setvalue{@@align@@\v!flushright }{\if!!donea\veryraggedleft \else\raggedleft \fi} +\setvalue{@@align@@\v!center }{\if!!doneb\raggedwidecenter\else\if!!donea\veryraggedcenter\else\raggedcenter\fi\fi} +\setvalue{@@align@@\v!hanging }{\enableprotruding} +\setvalue{@@align@@\v!nothanging }{\disableprotruding} +\setvalue{@@align@@\v!hz }{\enableadjusting} +\setvalue{@@align@@\v!nohz }{\disableadjusting} +\setvalue{@@align@@\v!hyphenated }{\dohyphens} +\setvalue{@@align@@\v!nothyphenated}{\nohyphens} +\setvalue{@@align@@\v!new }{\@@asraggedfalse} % so new will give you consistency +\setvalue{@@align@@\v!reset }{\notragged\normalbottom} + +\setvalue{@@ngila@@\v!broad }{\!!doneatrue} +\setvalue{@@ngila@@\v!wide }{\!!donebtrue} + +\def\dodosetupalign#1{\getvalue{@@align@@#1}} +\def\dodosetupngila#1{\getvalue{@@ngila@@#1}} \def\setupalign {\dosingleargument\dosetupalign} -\def\startuitlijnen +\def\dosetupalign[#1]% + {\!!doneafalse + \!!donebfalse + \processcommacommand[#1]\dodosetupngila + \processcommacommand[#1]\dodosetupalign} + +% \setupalign[flushleft] \input ward \par % lijnlinks +% \setupalign[right] \input ward \par + +% \setupalign[flushright] \input ward \par % lijnrechts +% \setupalign[left] \input ward \par + +% \setupalign[middle] \input ward \par % centreer +% \setupalign[center] \input ward \par + +\def\startalignment {\bgroup \setupalign} -\def\stopuitlijnen +\def\stopalignment {\par \egroup} @@ -3203,19 +3479,23 @@ % directe commando's -\def\regellinks {\doalignline \relax \hss } -\def\regelmidden{\doalignline \hss \hss } -\def\regelrechts{\doalignline \hss \relax} +\def\leftaligned {\doalignline \relax \hss } +\def\midaligned {\doalignline \hss \hss } +\def\rightaligned{\doalignline \hss \relax} -\def\regelbegrensd#1{\limitatetext{#1}{\hsize}{\unknown}} +\def\regelbegrensd#1{\limitatetext{#1}{\hsize}{\unknown}} % to be translated % indirecte commando's -\setvalue{\s!do\v!regel\v!links }{\doalignline \relax \hss } -\setvalue{\s!do\v!regel\v!rechts}{\doalignline \hss \relax} -\setvalue{\s!do\v!regel\v!midden}{\doalignline \hss \hss } +\letvalue{\s!do\v!line\v!left }\leftaligned +\letvalue{\s!do\v!line\v!right }\rightaligned +\letvalue{\s!do\v!line\v!middle}\midaligned -\def\doregelplaats#1{\csname\s!do\v!regel#1\endcsname} +\letvalue{\s!do\v!line\v!flushleft }\rightaligned +\letvalue{\s!do\v!line\v!flushright}\leftaligned +\letvalue{\s!do\v!line\v!center }\midaligned + +\def\doalignedline#1{\csname\s!do\v!line#1\endcsname} %D Experimental: @@ -3256,19 +3536,19 @@ \def\doxcheckline {\signalrightpage\doifrightpageelse\donetrue\donefalse} -\setvalue{\s!do\v!regel\v!binnen }{\doxalignline\doxcheckline++\zeropoint \relax\hss } -\setvalue{\s!do\v!regel\v!buiten }{\doxalignline\doxcheckline++\zeropoint \hss \relax} -\setvalue{\s!do\v!regel\v!binnenmarge }{\doxalignline\doxcheckline-+\innermargintotal\relax\hss } -\setvalue{\s!do\v!regel\v!buitenmarge }{\doxalignline\doxcheckline+-\outermargintotal\hss \relax} -\setvalue{\s!do\v!regel\v!binnenrand }{\doxalignline\doxcheckline-+\inneredgetotal \relax\hss } -\setvalue{\s!do\v!regel\v!buitenrand }{\doxalignline\doxcheckline+-\outeredgetotal \hss \relax} -\setvalue{\s!do\v!regel\v!rugwit }{\doxalignline\doxcheckline-+\rugwit \relax\hss } -\setvalue{\s!do\v!regel\v!snijwit }{\doxalignline\doxcheckline+-\snijwit \hss \relax} +\setvalue{\s!do\v!line\v!inner }{\doxalignline\doxcheckline++\zeropoint \relax\hss } +\setvalue{\s!do\v!line\v!outer }{\doxalignline\doxcheckline++\zeropoint \hss \relax} +\setvalue{\s!do\v!line\v!innermargin}{\doxalignline\doxcheckline-+\innermargintotal\relax\hss } +\setvalue{\s!do\v!line\v!outermargin}{\doxalignline\doxcheckline+-\outermargintotal\hss \relax} +\setvalue{\s!do\v!line\v!inneredge }{\doxalignline\doxcheckline-+\inneredgetotal \relax\hss } +\setvalue{\s!do\v!line\v!outeredge }{\doxalignline\doxcheckline+-\outeredgetotal \hss \relax} +\setvalue{\s!do\v!line\v!backspace }{\doxalignline\doxcheckline-+\backspace \relax\hss } +\setvalue{\s!do\v!line\v!cutspace }{\doxalignline\doxcheckline+-\cutspace \hss \relax} -\setvalue{\s!do\v!regel\v!linkermarge }{\doxalignline\donefalse --\leftmargintotal \hss \relax} -\setvalue{\s!do\v!regel\v!rechtermarge}{\doxalignline\donefalse ++\rightmargintotal\relax\hss } -\setvalue{\s!do\v!regel\v!linkerrand }{\doxalignline\donefalse --\leftedgetotal \hss \relax} -\setvalue{\s!do\v!regel\v!rechterrand }{\doxalignline\donefalse ++\rightedgetotal \relax\hss } +\setvalue{\s!do\v!line\v!leftmargin }{\doxalignline\donefalse --\leftmargintotal \hss \relax} +\setvalue{\s!do\v!line\v!rightmargin}{\doxalignline\donefalse ++\rightmargintotal\relax\hss } +\setvalue{\s!do\v!line\v!leftedge }{\doxalignline\donefalse --\leftedgetotal \hss \relax} +\setvalue{\s!do\v!line\v!rightedge }{\doxalignline\donefalse ++\rightedgetotal \relax\hss } % ! ! ! beware, redefining \doalignline gives the wrong results ! ! ! % @@ -3276,35 +3556,35 @@ %D Better: -\def\doregelplaats#1{\csname\s!do\v!regel#1\endcsname} +\def\doalignedline#1{\csname\s!do\v!line#1\endcsname} \def\alignedline#1#2% setting default {\csname - \s!do\v!regel - \ifundefined{\s!do\v!regel#1}#2\else#1\fi + \s!do\v!line + \ifundefined{\s!do\v!line#1}#2\else#1\fi \endcsname} -% \def\doregelplaats#1% +% \def\doalignedline#1% % {\alignedline{#1}\v!links} %D ... \def\dosetuptolerance[#1]% - {\doifinsetelse\v!vertikaal{#1}% + {\doifinsetelse\v!vertical{#1}% {\ExpandFirstAfter\processallactionsinset [#1] - [\v!zeerstreng=>\def\bottomtolerance{}, - \v!streng=>\def\bottomtolerance{.050}, - \v!soepel=>\def\bottomtolerance{.075}, - \v!zeersoepel=>\def\bottomtolerance{.100}]}% + [ \v!verystrict=>\def\bottomtolerance{}, + \v!strict=>\def\bottomtolerance{.050}, + \v!tolerant=>\def\bottomtolerance{.075}, + \v!verytolerant=>\def\bottomtolerance{.100}]}% {\ExpandFirstAfter\processallactionsinset [#1] - [ \v!rek=>\emergencystretch\bodyfontsize, - \v!spatie=>\spaceskip.5em\!!plus.25em\!!minus.25em\relax, - \v!zeerstreng=>\tolerance 200, - \v!streng=>\tolerance1500, - \v!soepel=>\tolerance3000, - \v!zeersoepel=>\tolerance4500]}} + [ \v!stretch=>\emergencystretch\bodyfontsize, + \v!space=>\spaceskip.5em\!!plus.25em\!!minus.25em\relax, + \v!verystrict=>\tolerance 200, + \v!strict=>\tolerance1500, + \v!tolerant=>\tolerance3000, + \v!verytolerant=>\tolerance4500]}} \def\setuptolerance {\dosingleargument\dosetuptolerance} @@ -3312,7 +3592,7 @@ % \def\woordrechts % {\groupedcommand{\hfill\hbox}{\parfillskip\zeropoint}} -\def\woordrechts % zie naw +\def\wordright % zie naw {\groupedcommand {\removeunwantedspaces \hfill @@ -3354,10 +3634,10 @@ %D The only complication lays in \type{\strut}. In \PLAIN\ %D \TEX\ a \type{\strut} is defined as: %D -%D \starttypen +%D \starttyping %D \def\strut% %D {\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi} -%D \stoptypen +%D \stoptyping %D %D But what is a \type{\strut}? Normally it's a rule of width %D zero, but when made visual, it's a rule and a negative skip. @@ -3370,21 +3650,21 @@ %D To serve our purpose a bit better, the macro \type{\strut} %D can be redefined as: %D -%D \starttypen +%D \starttyping %D \def\strut %D {\relax\ifmmode\else\hskip0pt\fi\copy\strutbox} -%D \stoptypen +%D \stoptyping %D %D Or more compatible: %D -%D \starttypen +%D \starttyping %D \def\strut %D {\relax\ifmmode %D \copy\strutbox %D \else %D \bgroup\setbox\strutbox=\normalhbox{\box\strutbox}\unhcopy\strutbox\egroup %D \fi} -%D \stoptypen +%D \stoptyping %D %D In \CONTEXT\ however we save some processing time by putting %D an extra \type{\hbox} around the \type{\strutbox}. @@ -3415,7 +3695,7 @@ {\strut{\infofont\kern.25em}\lohi{\infofont CR}{\infofont LF}\hss}}} %D \starttyping -%D % \setuplayout[grid=yes] \showgrid +%D % \setuplayout[gridgrid=yes] \showgrid %D %D \startbuffer %D test 1\crlf @@ -3496,10 +3776,10 @@ \def\emspaceamount{\fontdimen6\font} \def\spaceamount {\fontdimen2\font} -\definehspace [\v!klein] [.25\emspaceamount] -\definehspace [\v!middel] [.5\emspaceamount] -\definehspace [\v!groot] [1\emspaceamount] -\definehspace [\v!normaal] [1\spaceamount] +\definehspace [\v!small] [.25\emspaceamount] +\definehspace [\v!medium] [.5\emspaceamount] +\definehspace [\v!big] [1\emspaceamount] +\definehspace [\v!normal] [1\spaceamount] \definehspace [\v!default] [\spaceamount] %D Taken from Taco's math module (cq. \AMS\ macros), but @@ -3524,6 +3804,261 @@ \definehspace[2][.2222em] \definehspace[3][.2777em] +% this will become an alternative bunch of \blank settings +% +% \startlines +% \scratchskip=.23pt plus 10pt minus 4pt \relax \number\scratchskip \space \the\scratchskip +% \setsimplifiedskip\scratchskip1 \number\scratchskip \space \the\scratchskip +% \setsimplifiedskip\scratchskip2 \number\scratchskip \space \the\scratchskip +% \getsimplifiedskip\scratchskip\scratchcounter \number\scratchcounter +% \stoplines +% +% \hrule width10cm \endgraf +% \discardedskip{10pt} +% \retainedskip {4pt} +% \discardedskip {5pt} +% \hrule width10cm \endgraf +% \blockedskip{0pt} +% \discardedskip{10pt} +% \retainedskip {4pt} +% \discardedskip {5pt} +% \hrule width10cm \endgraf +% \frozenskip {4cm} +% \hrule width10cm \endgraf +% \vskip10pt +% \hrule width10cm \endgraf + +% etex only, evt splitskip macro gebruiken (syst-new) + +\newskip\simplifiedskip +\newskip\simplifiedcounter + +\chardef\@@discardedskip1 +\chardef\@@retainedskip 2 +\chardef\@@forcedskip 3 +\chardef\@@blockedskip 4 +\chardef\@@frozenskip 5 % after heads, no break + +\def\setsimplifiedskip#1#2% + {#1\dimexpr(10\dimexpr(#1/10)) plus \gluestretch#1 minus \glueshrink#1\relax + \advance#1\numexpr(#2)sp\relax} + +\def\getsimplifiedskip#1#2% + {\simplifiedskip#1\relax + \ifdim\simplifiedskip=\zeropoint + #2\zerocount + \else + \simplifiedcounter\dimexpr(10\dimexpr(#1/10))\relax + \advance\simplifiedskip-\simplifiedcounter + #2\number\simplifiedskip\relax + \fi} + +\def\conditionalskip#1#2% + {\scratchskip#1\relax + \setsimplifiedskip\scratchskip#2\relax + \vskip\scratchskip\relax} + +\def\defrostskip + {\scratchskip\lastskip\penalty50000\normalvskip-\scratchskip\penalty50000\relax} + +\def\frozenskip#1% + {\endgraf + \ifvmode + \getsimplifiedskip\lastskip\scratchcounter + \ifdim\lastskip>#1\else + \defrostskip + \conditionalskip{#1}\@@frozenskip + \fi + \fi} + +\def\discardedskip#1% + {\endgraf + \ifvmode + \getsimplifiedskip\lastskip\scratchcounter + \ifcase\scratchcounter + \conditionalskip{#1}\@@discardedskip + \or % discard + \ifdim\lastskip>#1\else + \normalvskip-\lastskip + \conditionalskip{#1}\@@discardedskip + \fi + \or % retain + \ifdim\lastskip>#1\else + \normalvskip-\lastskip + \conditionalskip{#1}\@@discardedskip + \fi + \or % forced + \conditionalskip{#1}\@@discardedskip + \or % ignored + \or % frozen + \ifdim\lastskip>#1\else + \defrostskip + \conditionalskip{#1}\@@frozenskip + \fi + \else\ifdim#1=\zeropoint\else + \vskip#1\relax + \fi\fi + \fi} + +\def\retainedskip#1% + {\endgraf + \ifvmode + \getsimplifiedskip\lastskip\scratchcounter + \ifcase\scratchcounter + \conditionalskip{#1}\@@retainedskip + \or % discard + \normalvskip-\lastskip + \conditionalskip{#1}\@@retainedskip + \or % retain + \ifdim\lastskip>#1\else + \normalvskip-\lastskip + \conditionalskip{#1}\@@retainedskip + \fi + \or % forced + \conditionalskip{#1}\@@retainedskip + \or % ignored + \or % frozen + \ifdim\lastskip>#1\else + \defrostskip + \conditionalskip{#1}\@@frozenskip + \fi + \else\ifdim#1=\zeropoint\else + \vskip#1\relax + \fi\fi + \fi} + +\def\forcedskip#1% + {\endgraf + \ifvmode + \conditionalskip{#1}\@@forcedskip + \fi} + +\def\blockedskip#1% + {\endgraf + \ifvmode + \getsimplifiedskip\lastskip\scratchcounter + \ifcase\scratchcounter + \conditionalskip{#1}\@@blockedskip + \or % discard + \conditionalskip{#1}\@@blockedskip + \or % retain + \conditionalskip{#1}\@@blockedskip + \or % forced + \conditionalskip{#1}\@@blockedskip + \or % ignored + \or % frozen + \ifdim\lastskip>#1\else + \defrostskip + \conditionalskip{#1}\@@frozenskip + \fi + \else\ifdim#1=\zeropoint\else + \vskip#1\relax + \fi\fi + \fi} + +% beware, changing this will break some code (like pos/backgrounds) + +\newtoks\everyfirstparagraphintro +\newtoks\everynextparagraphintro +\newtoks\@@everyparagraphtoks + +\chardef\everyparagraphintro\zerocount + +\def\setupparagraphintro + {\dodoubleempty\dosetupparagraphintro} + +\def\dosetupparagraphintro[#1][#2]% + {\processallactionsinset + [#1] + [ \v!reset=>\global\chardef\everyparagraphintro\zerocount + \global\everyfirstparagraphintro\emptytoks + \global\everynextparagraphintro \emptytoks, + \v!first=>\global\chardef\everyparagraphintro\plusone + \doglobal\appendtoks#2\to\everyfirstparagraphintro, + \v!next=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plusone\fi + \doglobal\appendtoks#2\to\everynextparagraphintro, + \v!each=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plustwo\fi + \doglobal\appendtoks#2\to\everyfirstparagraphintro + \doglobal\appendtoks#2\to\everynextparagraphintro]} + +% \def\doinsertparagraphintro +% {\ifcase\everyparagraphintro\relax +% % no data +% \@@everyparagraphtoks\emptytoks +% \or +% % first data +% \global\chardef\everyparagraphintro\plustwo +% \@@everyparagraphtoks\everyfirstparagraphintro +% \global\everyfirstparagraphintro\emptytoks +% \or +% % next data +% \@@everyparagraphtoks\everynextparagraphintro +% \fi +% \the\@@everyparagraphtoks} + +\def\doinsertparagraphintro + {\begingroup + \everypar\emptytoks + \ifcase\everyparagraphintro\relax + % no data + \@@everyparagraphtoks\emptytoks + \or + % first data + \global\chardef\everyparagraphintro\plustwo + \@@everyparagraphtoks\everyfirstparagraphintro + \global\everyfirstparagraphintro\emptytoks + \or + % next data + \@@everyparagraphtoks\everynextparagraphintro + \fi + \the\@@everyparagraphtoks + \endgroup} + +\def\insertparagraphintro + {\ifcase\everyparagraphintro\else\@EA\doinsertparagraphintro\fi} + +% \appendtoksonce\insertparagraphintro\to\everypar % should come last + +%D \starttyping +%D \setupparagraphintro[first][\hbox to 3.5em{\tt FIRST \hss}] +%D \setupparagraphintro[first][\hbox to 3.5em{\tt TSRIF \hss}] +%D \setupparagraphintro[next] [\hbox to 3.5em{\tt NEXT \hss}] +%D \setupparagraphintro[next] [\hbox to 3.5em{\tt TXEN \hss}] +%D \setupparagraphintro[each] [\hbox to 3.0em{\tt EACH \hss}] +%D \setupparagraphintro[each] [\hbox to 3.0em{\tt HCEA \hss}] +%D +%D some paragraph \par +%D some paragraph \par +%D some paragraph \par +%D +%D \definelabel[parnumber] +%D +%D \setupparagraphintro[reset,each][\inleft{\slxx\parnumber}] +%D +%D some paragraph \par +%D some paragraph \par +%D some paragraph \par +%D \stoptyping + +%D \macros +%D {flushatnextpar} +%D +%D This macro collects data that will be flushed at the next paragraph. +%D By using this macro you can avoid interfering nodes (writes, etc). + +\newbox \postponednodedata + +\def\flushatnextpar + {\bgroup + \dowithnextbox + {\global\setbox\postponednodedata\hbox{\box\postponednodedata\box\nextbox}\egroup}% + \hbox} + +\def\flushpostponednodedata + {\ifvoid\postponednodedata\else + \hbox{\smashedbox\postponednodedata}% + \fi} + % Very nasty but needed for margin stuff inside colored % paragraphs. @@ -3550,10 +4085,10 @@ {\dowithnextboxcontent {\forgetall} {\ifcase\graphicvadjustmode \@EA \fakedvadjust \else \@EA\normalvadjust \fi - {\dostartgraphicgroup + {\dostartgraphicgroup % don't ask \localstarttextcolor \unvbox\nextbox - \localstoptextcolor + \localstoptextcolor % don't ask \dostopgraphicgroup \ifcase\graphicvadjustmode \or \or % corrects for one line paragraphs @@ -3582,54 +4117,50 @@ {#1\fontdimen2\font} \setupwhitespace - [\v!geen] + [\v!none] -\inspringen - [\v!nooit] +\indenting + [\v!never] \setupindenting - [\v!geen] + [\v!none] \setupblank - [\v!standaard, - \v!groot] - -\definieerblanko[\v!default] [\currentblanko] -\definieerblanko[\v!voor] [\v!default] -\definieerblanko[\v!tussen] [\v!default] -\definieerblanko[\v!na] [\v!voor] - -% doen? + [\v!standard, + \v!big] -\def\@@blankovoor {\blanko[\v!voor]} % -\def\@@blankotussen{\blanko[\v!tussen]} % scheelt 5 tokens == >20 bytes -\def\@@blankona {\blanko[\v!na]} % +\defineblank[\v!default] [\currentblanko] +\defineblank[\v!before] [\v!default] +\defineblank[\v!inbetween][\v!default] +\defineblank[\v!after] [\v!before] \setupinterlinespace - [\c!hoogte=.72, - \c!diepte=.28, - \c!boven=1.0, - \c!onder=0.4, - \c!afstand=1pt, - \c!regel=2.8ex, - \c!rek=0] + [\c!minheight=0pt, % only special purpose + \c!mindepth=0pt, % only special purpose + \c!height=.72, + \c!depth=.28, + \c!top=1.0, + \c!bottom=0.4, + \c!distance=1pt, + \c!line=2.8ex, + \c!stretch=0] \setupnarrower - [\c!links=1.5em, - \c!rechts=1.5em, - \c!midden=1.5em] + [\c!left=1.5em, + \c!right=1.5em, + \c!middle=1.5em] \setuptolerance - [\v!horizontaal,\v!zeerstreng] + [\v!horizontal,\v!verystrict] \setuptolerance - [\v!vertikaal,\v!streng] + [\v!vertical,\v!strict] \setupalign - [\v!onder, - \v!breedte] + [\v!bottom, + \v!width] \setupspacing - [\v!opelkaar] + [\v!packed] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-syn.tex b/tex/context/base/core-syn.tex index 2481f8a2f..e32e55f0a 100644 --- a/tex/context/base/core-syn.tex +++ b/tex/context/base/core-syn.tex @@ -28,11 +28,11 @@ \newif\ifsynonymmeaning -\def\dostelsynoniemenin[#1][#2]% +\def\dosetupsynonyms[#1][#2]% {\getparameters[\??sm#1][#2]} -\def\stelsynoniemenin - {\dodoubleargument\dostelsynoniemenin} +\def\setupsynonyms + {\dodoubleargument\dosetupsynonyms} \def\doresetsynonym#1% {\letvalue{#1\s!entry}\gobblethreearguments} @@ -41,7 +41,7 @@ {\bgroup \global\utilitydonetrue \syndef - {\doattributes{\??sm#1}\c!tekstletter\c!tekstkleur{#3}} + {\doattributes{\??sm#1}\c!textstyle\c!textcolor{#3}} \ConvertToConstant\doifelse{#4}{}{\unknown}{#4}\par \egroup} @@ -49,37 +49,33 @@ {\executeifdefined{#1\s!entry}\gobblethreearguments} \def\dosetsynonym#1% - {\doifdefinedelse{\??sm#1\c!commando} - {\setvalue{#1\s!entry}{\getvalue{\??sm#1\c!commando}}} % 3 argumenten + {\doifdefinedelse{\??sm#1\c!command} + {\setvalue{#1\s!entry}{\getvalue{\??sm#1\c!command}}} % 3 argumenten {\setvalue{#1\s!entry}{\dohandlesynonymentry{#1}}}} \def\doplaatslijstmetsynoniemen#1#2% - {\witruimte + {\whitespace \begingroup \def\currentsynonym{#1}% -% \def\synplaats{\getvalue{\??sm#1\c!plaats}}% -% \def\synbreedte{\getvalue{\??sm#1\c!breedte}}% -% \def\synmonster{\getvalue{\??sm#1\c!monster}}% -% - \doordefinieren % nog eens een class van maken, net als framed + \definedescription % nog eens een class van maken, net als framed [syndef] - [\c!plaats=\getvalue{\??sm#1\c!plaats}, - \c!breedte=\getvalue{\??sm#1\c!breedte}, - \c!afstand=\getvalue{\??sm#1\c!afstand}, - \c!monster=\getvalue{\??sm#1\c!monster}, + [\c!location=\getvalue{\??sm#1\c!location}, + \c!width=\getvalue{\??sm#1\c!width}, + \c!distance=\getvalue{\??sm#1\c!distance}, + \c!sample=\getvalue{\??sm#1\c!sample}, \c!hang=\getvalue{\??sm#1\c!hang}, - \c!uitlijnen=\getvalue{\??sm#1\c!uitlijnen}, - \c!voor=\getvalue{\??sm#1\c!voor}, - \c!tussen=\getvalue{\??sm#1\c!tussen}, - \c!na=\getvalue{\??sm#1\c!na}, - \c!springvolgendein=\getvalue{\??sm#1\c!springvolgendein}, - \c!kopletter=, - \c!letter=]% + \c!align=\getvalue{\??sm#1\c!align}, + \c!before=\getvalue{\??sm#1\c!before}, + \c!inbetween=\getvalue{\??sm#1\c!inbetween}, + \c!after=\getvalue{\??sm#1\c!after}, + \c!indentnext=\getvalue{\??sm#1\c!indentnext}, + \c!headstyle=, + \c!style=]% % - \setupwhitespace[\v!geen]% + \setupwhitespace[\v!none]% \doutilities{#1}\jobname{#2}\relax\par \endgroup - \ifutilitydone\else\geenwitruimte\fi} + \ifutilitydone\else\nowhitespace\fi} \def\dovolledigelijstmetsynoniemen#1#2% expansion needed to avoid v! (due to french active !) {\expanded @@ -93,10 +89,10 @@ {\begingroup % anders in mathmode lege \hbox, zie eenheden \ifsynonymmeaning \synonymmeaningfalse - \doattributes{\??sm#1}\c!synoniemletter\c!synoniemkleur{#3}% + \doattributes{\??sm#1}\c!synonymstyle\c!synonymcolor{#3}% \else \explicithmode - \doattributes{\??sm#1}\c!tekstletter\c!tekstkleur{#2}% + \doattributes{\??sm#1}\c!textstyle\c!textcolor{#2}% \fi \endgroup} @@ -156,10 +152,10 @@ \def\dodocomplexsynonym[#1][#2]#3#4% {\doifsomething{#2} {\getvalue{\s!check#1}{#2}% - \doifelsevalue{\??sm#1\c!conversie}\v!ja + \doifelsevalue{\??sm#1\c!conversion}\v!yes {\unexpanded\setgvalue{#2}{\expandsynonym{#1}{#2}{#3}{#4}}} - {\doifelsevalue{\??sm#1\c!status}\v!start - {\doifelsevalue{\??sm#1\c!criterium}\v!alles + {\doifelsevalue{\??sm#1\c!state}\v!start + {\doifelsevalue{\??sm#1\c!criterium}\v!all {\preexecutesynonym{#1}{#2}{#3}{#4}} {\unexpanded\setgvalue{#2}{\executesynonym{#1}{#2}{#3}{#4}}}} {\unexpanded\setgvalue{#2}{\processsynonym{#1}{#3}{#4}}}}}} @@ -171,61 +167,48 @@ \dodocomplexsynonym[#2][#1#4]{#4}{#5}% \fi} -\def\dodefinieersynoniemen[#1][#2][#3][#4]% - {\setvalue{\e!stel#2\e!in}% - {\dodoubleargument\getparameters[\??sm#1]}% - \iffourthargument - \unexpanded\def#4##1% - {\getsynonymmeaning{#1}{\??sm:#1:}{##1}}% +\def\dodefinesynonyms[#1][#2][#3][#4]% + {\iffourthargument + \unexpanded\def#4##1{\getsynonymmeaning{#1}{\??sm:#1:}{##1}}% \ifthirdargument - \unexpanded\def#3##1% - {\getvalue{\??sm:#1:##1}}% + \unexpanded\def#3##1{\getvalue{\??sm:#1:##1}}% \fi - \setvalue{#1}% - {\dotripleempty\docomplexsynonym[\??sm:#1:][#1]}% + \setvalue{#1}{\dotripleempty\docomplexsynonym[\??sm:#1:][#1]}% \else \ifthirdargument - \unexpanded\def#3##1% - {\getsynonymmeaning{#1}{}{##1}}% + \unexpanded\def#3##1{\getsynonymmeaning{#1}{}{##1}}% \fi - \setvalue{#1}% - {\dotripleempty\docomplexsynonym[][#1]}% + \setvalue{#1}{\dotripleempty\docomplexsynonym[][#1]}% \fi - \dostelsynoniemenin + \dosetupsynonyms [#1]% - [\c!synoniemletter=, - \c!tekstletter=, - \c!status=\v!start, + [\c!synonymstyle=, + \c!textstyle=, + \c!state=\v!start, \c!criterium=, - \c!plaats=\v!links, - \c!breedte=5em, - \c!afstand=0pt, - \c!monster=, + \c!location=\v!left, + \c!width=5em, + \c!distance=0pt, + \c!sample=, \c!hang=, - \c!uitlijnen=, - \c!voor=, - \c!tussen=, - \c!na=, - \c!springvolgendein=\v!nee, - \c!expansie=]% - \presetheadtext % changes the \if...argument - [#2=\Word{#2}]% - \setvalue{\s!set#1}% - {\dosetsynonym{#1}}% - \setvalue{\s!reset#1}% - {\doresetsynonym{#1}}% - \setvalue{\s!check#1}##1% - {\checkdefined{synoniemen}{#1}{##1}}% + \c!align=, + \c!before=, + \c!inbetween=, + \c!after=, + \c!indentnext=\v!no, + \c!expansion=]% + \presetheadtext[#2=\Word{#2}]% changes the \if...argument \addutilityreset{#1}% - \setvalue{\e!laad#2}% - {\dolaadsynoniemen{#1}{#2}}% - \setvalue{\e!plaats\e!lijstmet#2}% - {\doplaatslijstmetsynoniemen{#1}{#2}}% - \setvalue{\e!volledige\e!lijstmet#2}% - {\dovolledigelijstmetsynoniemen{#1}{#2}}} - -\def\definieersynoniemen - {\doquadrupleempty\dodefinieersynoniemen} + \setvalue{\e!setup#2\e!endsetup}{\dodoubleargument\getparameters[\??sm#1]}% to be obsolete + \setvalue{\s!set#1}{\dosetsynonym{#1}}% + \setvalue{\s!reset#1}{\doresetsynonym{#1}}% + \setvalue{\s!check#1}##1{\checkdefined{synoniemen}{#1}{##1}}% + \setvalue{\e!load#2}{\dolaadsynoniemen{#1}{#2}}% + \setvalue{\e!place\e!listof#2}{\doplaatslijstmetsynoniemen{#1}{#2}}% + \setvalue{\e!complete\e!listof#2}{\dovolledigelijstmetsynoniemen{#1}{#2}}} + +\def\definesynonyms + {\doquadrupleempty\dodefinesynonyms} % Formaat tex-utility-input-file : % @@ -236,11 +219,11 @@ % % \synonymentry {tag} {pure} {text} {} -\def\dostelsorterenin[#1][#2]% +\def\dosetupsorting[#1][#2]% {\getparameters[\??so#1][#2]} -\def\stelsorterenin - {\dodoubleargument\dostelsorterenin} +\def\setupsorting + {\dodoubleargument\dosetupsorting} \def\doresetsorteren#1% {\letvalue{#1\s!entry}\gobblethreearguments} @@ -250,20 +233,20 @@ {\def\dowritesort####1####2####3{}% \global\utilitydonetrue \bgroup - \doifdefinedelse{\??so#1\c!commando} - {\getvalue{\??so#1\c!commando}{##2}} % 1 argument - {\getvalue{\??so#1\c!voor}% - \doattributes{\??so#1}\c!letter\c!kleur{##2}% - \getvalue{\??so#1\c!na}}% + \doifdefinedelse{\??so#1\c!command} + {\getvalue{\??so#1\c!command}{##2}} % 1 argument + {\getvalue{\??so#1\c!before}% + \doattributes{\??so#1}\c!style\c!color{##2}% + \getvalue{\??so#1\c!after}}% \egroup}} \def\doplaatslijstmetsorteren#1% NOG EEN RUWE VERSIE MAKEN - {\witruimte % ZONDER WITRUIMTE ETC ETC + {\whitespace % ZONDER WITRUIMTE ETC ETC \begingroup - \setupwhitespace[\v!geen]% + \setupwhitespace[\v!none]% \doutilities{#1}\jobname{#1}\relax\par \endgroup - \ifutilitydone\else\geenwitruimte\fi} + \ifutilitydone\else\nowhitespace\fi} \def\dovolledigelijstmetsorteren#1#2% {\plaatsvolledig @@ -273,7 +256,7 @@ \def\processsort#1#2#3% {\explicithmode \bgroup - \doattributes{\??so#1}\c!letter\c!kleur{#2}% + \doattributes{\??so#1}\c!style\c!color{#2}% \egroup} \def\dowritesort#1#2#3% @@ -320,8 +303,8 @@ \def\dodocomplexsort[#1][#2]#3% {\doifsomething{#2} {\getvalue{\s!check#1}{#2}% - \doifelsevalue{\??so#1\c!status}\v!start - {\doifelsevalue{\??so#1\c!criterium}\v!alles + \doifelsevalue{\??so#1\c!state}\v!start + {\doifelsevalue{\??so#1\c!criterium}\v!all {\preexecutesort{#1}{#2}{#3}} {\unexpanded\setgvalue{#2}{\executesort{#1}{#2}{#3}}}} {\unexpanded\setgvalue{#2}{\processsort{#1}{#3}{#2}}}}} @@ -335,72 +318,64 @@ % if #3=\relax or \v!geen, then no command but still protected -\def\dodefinieersorteren[#1][#2][#3]% +\def\dodefinesorting[#1][#2][#3]% {\getparameters[\??so#1] - [%\c!commando=, % we test for defined ! - \c!status=\v!start, + [%\c!command=, % we test for defined ! + \c!state=\v!start, \c!criterium=, - \c!letter=, - \c!voor=, - \c!na=\endgraf, - \c!expansie=]% - \presetheadtext[#2=\Word{#2}]% - \setvalue{\e!stel#2\e!in}[##1]% vervalt tzt, soort oo-mode - {\getparameters[\??so#1][##1]}% + \c!style=, + \c!before=, + \c!after=\endgraf, + \c!expansion=]% \ifthirdargument - \ConvertConstantAfter\doifnot{#3}\v!geen + \ConvertConstantAfter\doifnot{#3}\v!none {\ifx#3\relax \else \def#3##1{\getvalue{\??so:#1:##1}} \fi}% - \setvalue{#1}% - {\dotripleempty\docomplexsort[\??so:#1:][#1]}% + \setvalue{#1}{\dotripleempty\docomplexsort[\??so:#1:][#1]}% \else - \setvalue{#1}% - {\dotripleempty\docomplexsort[][#1]}% + \setvalue{#1}{\dotripleempty\docomplexsort[][#1]}% \fi - \setvalue{\s!set#1}% - {\dosetsorteren{#1}}% - \setvalue{\s!reset#1}% - {\doresetsorteren{#1}}% \addutilityreset{#1}% - \setvalue{\e!laad#2}% - {\dolaadsorteren{#1}{#2}}% - \setvalue{\s!check#1}##1% - {\checkdefined{sorteren}{#1}{##1}}% - \setvalue{\e!plaats\e!lijstmet#2}% - {\doplaatslijstmetsorteren{#1}}% - \setvalue{\e!volledige\e!lijstmet#2}% - {\dovolledigelijstmetsorteren{#1}{#2}}} - -\def\definieersorteren% - {\dotripleempty\dodefinieersorteren} + \presetheadtext[#2=\Word{#2}]% after \ifthirdargument -) + \setvalue{\e!setup#2\e!endsetup}[##1]{\getparameters[\??so#1][##1]}% to be obsolete + \setvalue{\s!set#1}{\dosetsorteren{#1}}% + \setvalue{\s!reset#1}{\doresetsorteren{#1}}% + \setvalue{\e!load#2}{\dolaadsorteren{#1}{#2}}% + \setvalue{\s!check#1}##1{\checkdefined{sorteren}{#1}{##1}}% + \setvalue{\e!place\e!listof#2}{\doplaatslijstmetsorteren{#1}}% + \setvalue{\e!complete\e!listof#2}{\dovolledigelijstmetsorteren{#1}{#2}}} + +\def\definesorting + {\dotripleempty\dodefinesorting} -\definieersynoniemen - [\v!afkorting] - [\v!afkortingen] - [\voluit] - -\stelsynoniemenin - [\v!afkorting] - [\c!tekstletter=\v!kapitaal, - \c!synoniemletter=, - \c!tekstkleur=, - \c!synoniemkleur=, - \c!plaats=\v!links, - \c!breedte=5em, - \c!status=\v!start] - -\definieersorteren +\definesynonyms + [\v!abbreviation] + [\v!abbreviations] + [\infull] + +\setupsynonyms + [\v!abbreviation] + [\c!textstyle=\v!capital, + \c!synonymstyle=, + \c!textcolor=, + \c!synonymcolor=, + \c!location=\v!left, + \c!width=5em, + \c!state=\v!start] + +\definesorting [\v!logo] [\v!logos] +% no [\logogram] -\definieersynoniemen - [\v!eenheid] - [\v!eenheden] - [\betekenis] +\definesynonyms + [\v!unit] + [\v!units] + [\unitmeaning] -\stelsynoniemenin - [\v!eenheid] - [\c!tekstletter=\dimension] +\setupsynonyms + [\v!unit] + [\c!textstyle=\dimension] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-sys.tex b/tex/context/base/core-sys.tex index 5c1b12638..9fc3f034b 100644 --- a/tex/context/base/core-sys.tex +++ b/tex/context/base/core-sys.tex @@ -47,19 +47,19 @@ \def\dosetupsystem[#1]% {\getparameters[\??sv][#1]% - \setuprandomize[\@@svwillekeur]% - \beforesplitstring\@@svresolutie\at dpi\to\@@svresolutie - \let\outputresolution\@@svresolutie + \setuprandomize[\@@svrandom]% + \beforesplitstring\@@svresolution\at dpi\to\@@svresolution + \let\outputresolution\@@svresolution \ifcase\@@svn % % 0 : unknown \or - \setsystemmode\v!eerste % 1 : first run + \setsystemmode\v!first % 1 : first run \or % % 2 : successive run \or - \setsystemmode\v!eerste % 3 : first and only run + \setsystemmode\v!first % 3 : first and only run \or - \setsystemmode\v!laatste % 4 : extra last run + \setsystemmode\v!last % 4 : extra last run \fi \splitjobfilename} @@ -69,7 +69,7 @@ %D The system modes set by the setup command can be used in %D situations like: %D -%D \starttypen +%D \starttyping %D \startmode[*first] %D \executesystemcommand{cleanupxml text.xml clean-text.xml} %D \stopmode @@ -77,7 +77,7 @@ %D \starttext %D \typefile{clean-text.xml} %D \stoptext -%D \stoptypen +%D \stoptyping \def\setuprandomize[#1]% {\doifsomething{#1} @@ -86,23 +86,23 @@ % tex's time is in minutes \processaction [#1] - [ \v!klein=>\divide\normaltime 15, % 900, - \v!middel=>\divide\normaltime 30, % 1800, - \v!groot=>\divide\normaltime 60, % 3600, - \v!normaal=>, + [ \v!small=>\divide\normaltime 15, % 900, + \v!medium=>\divide\normaltime 30, % 1800, + \v!big=>\divide\normaltime 60, % 3600, + \v!normal=>, \s!default=>, \s!unknown=>\normaltime=#1]% \nextrandom \egroup}} \setupsystem - [\c!gebied=, + [\c!directory=, \c!n=0, % 0:unknown 1: one run 2: first 3: successive 4: final run - \c!resolutie=600dpi, - \c!willekeur=, + \c!resolution=600dpi, + \c!random=, \c!file=\jobname, \c!inputfile=\outputfilename, - \c!korps=\normalizedlocalbodyfontsize] % of iets anders + \c!bodyfont=\normalizedlocalbodyfontsize] % of iets anders %D @@ -136,27 +136,27 @@ \def\dododefinestartstop[#1][#2]% todo: use indirect commands {\getparameters [\??be#1] - [\c!voor=, - \c!na=, - \c!tussen=, - \c!commandos=, - \c!letter=, + [\c!before=, + \c!after=, + \c!inbetween=, + \c!commands=, + \c!style=, #2]% \unexpanded\setvalue{#1}% {\groupedcommand - {\getvalue{\??be#1\c!commandos}% - \dostartattributes{\??be#1}\c!letter\c!kleur} + {\getvalue{\??be#1\c!commands}% + \dostartattributes{\??be#1}\c!style\c!color} {\dostopattributes - \getvalue{\??be#1\c!tussen}}}% + \getvalue{\??be#1\c!inbetween}}}% \setvalue{\e!start#1}% - {\getvalue{\??be#1\c!voor}% + {\getvalue{\??be#1\c!before}% \bgroup - \getvalue{\??be#1\c!commandos}% - \dostartattributes{\??be#1}\c!letter\c!kleur\empty}% + \getvalue{\??be#1\c!commands}% + \dostartattributes{\??be#1}\c!style\c!color\empty}% \setvalue{\e!stop#1}% {\dostopattributes \egroup - \getvalue{\??be#1\c!na}}} + \getvalue{\??be#1\c!after}}} \def\dodefinestartstop[#1][#2]% {\def\docommando##1{\dododefinestartstop[##1][#2]}% @@ -203,7 +203,7 @@ % % \unexpanded\ziezo -\def\complexdefinieer[#1]#2#3% +\def\complexdefine[#1]#2#3% {\ifx#2\undefined \else \showmessage\m!systems4{\string#2}% @@ -221,12 +221,12 @@ \else\def#2{#3}% \fi} -\definecomplexorsimpleempty\definieer +\definecomplexorsimpleempty\define -\unexpanded\def\naam#1% brrr - {\getvalue{#1}} +\unexpanded\def\macroname#1% brrr + {\executeifdefined{#1}\empty} -\def\gebruikcommandos#1% +\def\usecommands#1% {\bgroup \def\docommando##1{\setbox0\hbox{\getvalue{\string##1}##1}}% \processcommalist[#1]\docommando @@ -251,26 +251,26 @@ %D XML processing, it made sense to support this faster %D alternative. -\def\installexpander#1{\setvalue{\s!do\c!expansie#1}} +\def\installexpander#1{\setvalue{\s!do\c!expansion#1}} \long\def\convertexpanded#1#2#3% hm, first we need to make sure {\csname % that we assign all exp a value - \s!do\c!expansie + \s!do\c!expansion \ifforcefileexpansion - \v!ja - \else\@EA\ifx\csname\s!do\c!expansie\csname#1\c!expansie\endcsname\endcsname\relax + \v!yes + \else\@EA\ifx\csname\s!do\c!expansion\csname#1\c!expansion\endcsname\endcsname\relax \s!default \else - \csname#1\c!expansie\endcsname + \csname#1\c!expansion\endcsname \fi\fi \endcsname#2\to#3} -\installexpander\v!ja {\convertmeaning } -\installexpander\v!ja {\convertmeaning } -\installexpander\v!commando{\convertcommand } +\installexpander\v!yes {\convertmeaning } +\installexpander\v!yes {\convertmeaning } +\installexpander\v!command{\convertcommand } \installexpander\s!default {\convertargument} \installexpander\empty {\convertargument} -\installexpander\v!nee {\convertargument} +\installexpander\v!no {\convertargument} \def\convertmeaning#1\to % watch the double expansion ! {\bgroup @@ -288,12 +288,15 @@ % \setvalue{statevalue\v!geen }{4} % % \def\setcurrentstate#1% -% {\chardef\currentstate=0\getvalue{statevalue\getvalue{#1\c!status}\relax} +% {\chardef\currentstate=0\getvalue{statevalue\getvalue{#1\c!state}\relax} % % \ifcase\currentstate ... -\def\herhaal {\dorepeat} -\def\herhaler {\repeater} -\def\herhaalmetcommando {\dorepeatwithcommand} +\def\redo{\dorepeat} % [n*10], kind of obsolete + +% obsolete, use \dorecurse instead +% +% \def\herhaler {\repeater} +% \def\herhaalmetcommando {\dorepeatwithcommand} \protect \endinput diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex index 2558e7d6b..e614293fe 100644 --- a/tex/context/base/core-tab.tex +++ b/tex/context/base/core-tab.tex @@ -13,6 +13,12 @@ \writestatus{loading}{Context Core Macros / TaBlE Embedding} +% Don't change the splitter: +% +% ... \NR +% \TABLEnoalign{\page}\TABLEhead +% \NC ... + % e-tex: reverse rows or vadjust or ... in tables % \ifalign % \xhrule : calls for 'special' with width @@ -113,10 +119,10 @@ %D \stoptable %D \stopbuffer %D -%D \startcombinatie -%D {\tracetablesfalse\haalbuffer} {\type{\tracetablesfalse}} -%D {\tracetablestrue\haalbuffer} {\type{\tracetablestrue}} -%D \stopcombinatie +%D \startcombination +%D {\tracetablesfalse\getbuffer} {\type{\tracetablesfalse}} +%D {\tracetablestrue\getbuffer} {\type{\tracetablestrue}} +%D \stopcombination %D %D This table is specified as: %D @@ -143,7 +149,7 @@ %D When we use the split table feature, we get a bit more %D information. %D -%D {\tracetablesfalse\haalbuffer} +%D {\tracetablesfalse\getbuffer} %D %D Sometimes in tables information shows up that is not typed %D in by the user. These messages give a cue in what aspect a @@ -168,7 +174,7 @@ %D therefore can result in two or more succesive messages, like %D in the last row. %D -%D \haalbuffer +%D \getbuffer %D Bringing color into tables is complicated by the mere fact %D that color is not part of \TEX. The main complication is @@ -189,7 +195,7 @@ %D \gdef\ShowExample% %D {\startfiguurtekst %D {geen} -%D {\haalbuffer} +%D {\getbuffer} %D \typebuffer %D \stopfiguurtekst} %D @@ -409,9 +415,9 @@ %D tables. If for some reason one wants to use the \TABLE\ %D primitives, one can say: %D -%D \starttypen +%D \starttyping %D \ObeyTableBarAndQuote -%D \stoptypen +%D \stoptyping %D %D To keep things verbose, as well as to show what \TABLE\ %D commands we affect, we show some meanings. @@ -435,10 +441,10 @@ %D The first attemp to solve this problem was: %D -%D \starttypen +%D \starttyping %D \def\normalTABLEquote% %D {\unskip\TABLEhack\!ttRightGlue&\omit&\TABLEhack} -%D \stoptypen +%D \stoptyping %D %D But, as usual, this interfered with \type {\omit}. %D @@ -446,7 +452,7 @@ %D This works ok, but breaks for instance the~\type{b} %D key handling. %D -%D \starttypen +%D \starttyping %D \def\!tfAdjoinPriorColumn% %D {\ifnum\!taColumnNumber=0 %D \!taPreamble=\!taRuleColumnTemplate @@ -459,7 +465,7 @@ %D \fi %D ... %D \ReadFormatKeys} -%D \stoptypen +%D \stoptyping \newdimen\TABLEparheight @@ -469,14 +475,14 @@ \normalbaselines \let~\!ttTie \let\-\!ttDH - \blanko[\v!blokkeer]% % added + \blank[\v!disable]% % added \the\EveryTableParBox} \def\EndTableParBox {\removelastskip % itemize or so \par \ifnum\prevgraf>\zerocount % we want at least - \verticalstrut \geenwitruimte \vskip-\struttotal% one line of text + \verticalstrut \nowhitespace \vskip-\struttotal% one line of text \egroup \ifdim\dp\scratchbox>\lineheight % see (*) for an \getnoflines{\dp\scratchbox}% % example of where @@ -493,6 +499,63 @@ \fi % i.e. vtop \box\scratchbox} +% We also need to patch away the interfering math switch: + +% \mathpunctuationtrue + +% test, test +% \starttable[|c|] +% \NC1,,10\NC\AR +% \stoptable +% test, test + +\def\!ttBeginTableA[#1]{% + \if #1u% % "unboxed" table + \ifmmode + \def\!ttEndTable{% % user had better be in display math mode + \relax}% % and have only one table at the outer level + \else % user had better be in vertical mode + \bgroup + \def\!ttEndTable{% + \egroup}% + \fi + \else + %\hbox\bgroup $ + %\def\!ttEndTable{% + % \egroup % for the \vtop, \vbox, or \vcenter, yet to come + % $% for math mode + % \egroup}% for the \hbox + %\if #1t% + % \vtop + %\else + % \if #1b% + % \vbox + % \else + % \vcenter % math mode was essential for this + % \fi + %\fi + % + \hbox\bgroup + \def\!ttEndTable{\egroup\egroup}% + \if#1t% + \vtop + \else\if#1b% + \vbox + \else + \def\!ttEndTable{\egroup$\egroup}% + %$\vcenter + \scratchtoks\everymath\everymath\emptytoks$\everymath\scratchtoks\vcenter + \fi\fi + % + \bgroup % for the \vtop, \vbox, or \vcenter + \fi + \advance\!taRecursionLevel 1 % RecursionLevel governs initialization + \let\!ttRightGlue=\relax % This may be changed by \JustCenter, etc + \everycr\emptytoks % ={} + \ifnum \!taRecursionLevel=1 + \!ttInitializeTable + \fi} + % (*) Try this one with \type {direction} and {girection}; % the \PPCHTEX\ manual is a nice testcase. % @@ -532,9 +595,9 @@ %D the numeric keys. The quantity keys (\type{q} and \type{Q}) %D support the more european way of writing numbers: %D -%D \startsmaller +%D \startnarrower %D 100.000.000,00 instead of 100,000,000.00 -%D \stopsmaller +%D \stopnarrower %D %D The next table shows how to use these keys. We use braces %D instead of brackets because we need brackets to specify the @@ -626,9 +689,9 @@ %D \em Get argument: %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping \def\!tqGetArgument[#1]% {\!tqMakeQuantityTemplate\!tqStyle#1,,!} @@ -662,12 +725,12 @@ %D Here ends the Q||extension. Did you watch the clever use %D of aftergroup in \type{\!tqConvertCode}. -% %D We also (have to) define a key for \type{\kap}: +% %D We also (have to) define a key for \type{\cap}: % % \letvalue{!tk<\string K>}=\undefined % % \NewFormatKey K% -% {\ReadFormatKeys b\kap} +% {\ReadFormatKeys b\smallcapped} %D A few pages back we saw backgrounds, further on we will see %D colored rules, and here we provide a means to color the @@ -884,7 +947,7 @@ %D All commands that are executed between rows are to be put in %D \type {\noalign}. We can however not verify if we (that is %D \TABLE) does or did not enter this mode. A moderate dirty -%D but useful trick is using our own alternative:\voetnoot{Once +%D but useful trick is using our own alternative:\footnote{Once %D one has entered the stage of redefining \TEX\ primitives, %D such hacks become a second nature. However, redefining \type %D {\omit} and \type{\span} is not that easy.} @@ -898,17 +961,17 @@ %D The rest of this module is not easy to comprehend, mainly %D because we have to take care of: %D -%D \startopsomming[opelkaar] -%D \som \type{\startopsomming[template]} -%D \som \type{\startopsomming{template}} -%D \som \type{\startopsomming[predefined]} -%D \stopopsomming +%D \startitemize[packed] +%D \item \type{\startitemize[template]} +%D \item \type{\startitemize{template}} +%D \item \type{\startitemize[predefined]} +%D \stopitemize %D %D as well as: %D -%D \startopsomming[verder] -%D \som restart after table break -%D \stopopsomming +%D \startitemize[continue] +%D \item restart after table break +%D \stopitemize %D %D The official specification of the start command is: %D @@ -916,9 +979,9 @@ \def\starttable {\bgroup - \doifelsenothing\@@tikader + \doifelsenothing\@@tiframe {\ifinsidefloat\else\startbaselinecorrection\fi} - {\startframedcontent[\@@tikader]}% + {\startframedcontent[\@@tiframe]}% \postponefootnotes \firststagestartTABLE} @@ -927,7 +990,7 @@ \globalletempty\@@TABLEhead \globalletempty\@@TABLEtail \finishTABLE - \doifelsenothing\@@tikader + \doifelsenothing\@@tiframe {\ifinsidefloat\else \stopbaselinecorrection \goodbreak % compensates all the nobreaks @@ -954,7 +1017,7 @@ %D The complex (and main) start macro first takes care of the %D predefined case. Such a predefined setup looks like: %D -%D \starttypen +%D \starttyping %D \definetabletemplate[test][|||] %D %D \starttable[test] @@ -962,7 +1025,7 @@ %D \VL test \VL test \VL\AR %D \VL test \VL test \VL\AR %D \stoptable -%D \stoptypen +%D \stoptyping %D %D The implementation of the definition macro is not that %D complicated: @@ -976,6 +1039,9 @@ % \catcode`\|=\@@other % \dodoubleargument\dodefinetabletemplate} + +% \TABLEnoalign{\page}\TABLEhead is valid + \def\douseTABLEtemplate#1#2#3% {\gdef\TABLEhead{\getvalue{@@TABLEhead#2}}% \gdef\TABLEtail{\getvalue{@@TABLEtail#3}}% @@ -995,18 +1061,18 @@ %D The optional third and fourth arguments define which table %D head and tail to use. %D -%D \starttypen +%D \starttyping %D \definetabletemplate[test][|||][before][after] -%D \stoptypen +%D \stoptyping %D %D This also means that one can define table heads and tails %D by name! %D -%D \starttypen +%D \starttyping %D \starttablehead[before] %D \HL \VL first \VL second \VL \SR \HL %D \stoptablehead -%D \stoptypen +%D \stoptyping %D %D Templates defined this way get protected names, that cannot %D conflict with existing commands. @@ -1145,7 +1211,7 @@ %D %D For example: %D -%D \starttypen +%D \starttyping %D \starttables[|||] %D \HL %D \VL element \VL atom weight \VL\AR @@ -1154,7 +1220,7 @@ %D \VL ....... \VL ........... \VL\AR %D \HL %D \stoptables -%D \stoptypen +%D \stoptyping \def\starttables {\bgroup @@ -1182,7 +1248,7 @@ %D pages, only the first gets a head. We could have said %D something like: %D -%D \starttypen +%D \starttyping %D \starttablekop %D \HL %D \VL element \VL atom weight \VL\AR @@ -1197,7 +1263,7 @@ %D \VL ....... \VL ........... \VL\AR %D \VL ....... \VL ........... \VL\AR %D \stoptables -%D \stoptypen +%D \stoptyping %D %D This time each split table gets a head line and ends with %D a rule. Keep in mind that such heads also apply to the @@ -1240,7 +1306,7 @@ %D and will probably be improved bit by bit. \def\docalculatemaxTABLEheight - {\ifbinnenkolommen + {\ifinsidecolumns \getcolumnstatus\column\scratchcounter\total\dimen0\goal\dimen2\\% \else \ifdim\pagegoal<\maxdimen @@ -1248,7 +1314,7 @@ \dimen2\pagegoal \else \dimen0\zeropoint - \dimen2\teksthoogte + \dimen2\textheight \fi \fi \advance\dimen2 -\dimen0 @@ -1260,11 +1326,11 @@ \fi\fi} \def\nocalculatemaxTABLEheight - {\ifbinnenkolommen + {\ifinsidecolumns \getcolumnstatus\column\scratchcounter\total\dimen0\goal\dimen2\\% \else \dimen0\zeropoint - \dimen2\teksthoogte + \dimen2\textheight \fi \advance\dimen2 -\dimen0 \global\TABLEmaxheight\dimen2 @@ -1274,12 +1340,12 @@ {\ifsplittables #1\relax \ifdim\TABLEmaxheight<3\baselineskip \relax % instelbaar maken - \ifbinnenkolommen + \ifinsidecolumns \nobreak \kern\dimen2 \goodbreak \else - \goodbreak % \pagina + \goodbreak % \page \fi \removeTABLEtopskip \nocalculatemaxTABLEheight @@ -1387,24 +1453,24 @@ %D switching. I won't go into much detail from now on, but just %D mention the general principles. %D -%D \startopsomming[3*ruim] +%D \startitemize[3*ruim] %D \sym{\type{\SR}} end a separate row (between rules) %D \sym{\type{\FR}} end a first row (after a rule) %D \sym{\type{\MR}} end a mid row (between text lines) %D \sym{\type{\LR}} end a last row (before a rule) -%D \stopopsomming +%D \stopitemize %D %D and best of all: %D -%D \startopsomming[verder] +%D \startitemize[continue] %D \sym{\type{\AR}} end a row with automatic spacing -%D \stopopsomming +%D \stopitemize %D %D As far as possible, we report confusing situations. In %D most cases one can use \type{\AR}, which transfigurates %D itself into one of the other types. %D -%D \starttypen +%D \starttyping %D \starttable[||] %D \HL %D \VL a separate row \VL\SR @@ -1414,7 +1480,7 @@ %D \VL a last row \VL\LR %D \HL %D \stoptable -%D \stoptypen +%D \stoptyping %D %D In this example we could have used \type{\AR} without %D problems. @@ -1684,7 +1750,7 @@ %D While defining this macro we change the \CATCODE\ of %D \type{|}. When counting the bars, we use a non active %D representation of the bar, simply because we cannot be sure -%D if the bar is active or not.\voetnoot{Normally it is, but +%D if the bar is active or not.\footnote{Normally it is, but %D \TABLE\ changes the catcode when needed.} \bgroup @@ -1713,12 +1779,12 @@ \span\the\!taPreamble \ifx \!tfRowOfWidths \empty \else \!tfRowOfWidths \cr \fi} -%D \startopsomming[3*ruim] +%D \startitemize[3*ruim] %D \sym{\type{\VL}} a vertical line %D \sym{\type{\VC}} a vertical colored line %D \sym{\type{\HL}} a horizontal line %D \sym{\type{\HC}} a horizontal colored line -%D \stopopsomming +%D \stopitemize % \def\defineTABLErules % {\let\VL\TableVL @@ -1880,14 +1946,14 @@ \globallet\stopHLcommand \stopHCcommand}% \HL} -%D \startopsomming[3*ruim] +%D \startitemize[3*ruim] %D \sym{\type{\NL}} a vertical skip %D \sym{\type{\NR}} goto the next row %D \sym{\type{\NC}} goto the next column %D \sym{\type{\FC}} a first column %D \sym{\type{\MC}} a mid column %D \sym{\type{\LC}} a last column -%D \stopopsomming +%D \stopitemize % n+1 uitleggen @@ -1910,7 +1976,7 @@ \def\simpleTableNL {\TABLEnoalign {\nobreak - \setbox0\vbox{\blanko[\@@tiNL]}% + \setbox0\vbox{\blank[\@@tiNL]}% \global\advance\TABLEheight \ht0 \vskip\ht0 \nobreak}} @@ -1947,12 +2013,12 @@ \def"{\NC}} % \normalTABLEquote \egroup -%D \startopsomming[3*ruim] +%D \startitemize[3*ruim] %D \sym{\type{\DL}} %D \sym{\type{\DV}} (\type{\VD}) %D \sym{\type{\DC}} %D \sym{\type{\DR}} -%D \stopopsomming +%D \stopitemize \newif\ifTABLEdivision @@ -2054,7 +2120,7 @@ {\scratchdimen\LineThicknessUnit \global\advance\TABLEheight \@@tiHLheight\scratchdimen} -%D \startopsomming[3*ruim] +%D \startitemize[3*ruim] %D \sym{\type{\BC}} %D \sym{\type{\BR}} %D \sym{\type{\BACKGROUND}} @@ -2063,7 +2129,7 @@ %D \sym{\type{\BL}} %D \sym{\type{\RASTER}} %D \sym{\type{\COLOR}} -%D \stopopsomming +%D \stopitemize % definieer: \BC \BL % herhaal: \BR @@ -2079,9 +2145,9 @@ \let\RL \TableRL \let\COLOR \TableCOLOR \let\RASTER \TableRASTER - \globallet\lastTABLEc\@@tiachtergrondkleur - \globallet\lastTABLEr\@@tiachtergrondraster - \doifinsetelse\@@tiachtergrond{c,color} % \v!kleur + \globallet\lastTABLEc\@@tibackgroundcolor + \globallet\lastTABLEr\@@tibackgroundscreen + \doifinsetelse\@@tibackground{c,color} % \v!color {\global\chardef\TABLEcr\plusone} {\global\chardef\TABLEcr\plustwo}} @@ -2382,12 +2448,12 @@ \def\defineTABLEunits {\processaction - [\@@tiafstand] - [ \v!geen=>\OpenUp00\def\LOW{\Lower6 }, - \v!klein=>\OpenUp00\def\LOW{\Lower6 }, % == baseline - \v!middel=>\OpenUp11\def\LOW{\Lower7 }, - \v!groot=>\OpenUp22\def\LOW{\Lower8 }]% - \doifelse\@@tiafstand\v!geen + [\@@tidistance] + [ \v!none=>\OpenUp00\def\LOW{\Lower6 }, + \v!small=>\OpenUp00\def\LOW{\Lower6 }, % == baseline + \v!medium=>\OpenUp11\def\LOW{\Lower7 }, + \v!big=>\OpenUp22\def\LOW{\Lower8 }]% + \doifelse\@@tidistance\v!none {\chardef\TABLErowfactor\zerocount} {\chardef\TABLErowfactor\plustwo }} @@ -2408,18 +2474,18 @@ \def\dosetuptables[#1]% {\getparameters[\??ti][#1]% \processaction - [\@@tiuitlijnen] - [ \v!rechts=>\def\TABLEparalignment{\raggedright}, - \v!links=>\def\TABLEparalignment{\raggedleft}, - \v!midden=>\def\TABLEparalignment{\raggedcenter}, + [\@@tialign] + [ \v!right=>\def\TABLEparalignment{\raggedright}, + \v!left=>\def\TABLEparalignment{\raggedleft}, + \v!middle=>\def\TABLEparalignment{\raggedcenter}, \s!default=>\def\TABLEparalignment{\notragged}, \s!unknown=>\def\TABLEparalignment{\notragged}]% \assignalfadimension\@@tiVL\@@tiVLwidth 246% \assignalfadimension\@@tiHL\@@tiHLheight246} \def\localTABLEsetup - {\@@ticommandos\relax - \expanded{\switchtobodyfont[\@@tikorps]}% + {\@@ticommands\relax + \expanded{\switchtobodyfont[\@@tibodyfont]}% \StrutHeightFactor 8 \StrutDepthFactor 4 \LineThicknessFactor4 @@ -2435,25 +2501,25 @@ \let\stopglobalTABLEcolor \empty \def\localTABLEsetup - {\@@ticommandos\relax + {\@@ticommands\relax % bodyfont - \expanded{\switchtobodyfont[\@@tikorps]}% + \expanded{\switchtobodyfont[\@@tibodyfont]}% % linecolor - \doifsomething\@@tilijnkleur - {\def\startglobalTABLEcolor{\localstartcolor[\@@tilijnkleur]}% + \doifsomething\@@tirulecolor + {\def\startglobalTABLEcolor{\localstartcolor[\@@tirulecolor]}% \def\stopglobalTABLEcolor {\localstopcolor}}% % linethickness \LineThicknessFactor4 - \scratchdimen\@@tilijndikte + \scratchdimen\@@tirulethickness \divide\scratchdimen \LineThicknessFactor \expanded{\NormalTLTU{\the\scratchdimen}}% % spacing, was depth=4 height=8 (counters, sigh, now macros) - \doifelse\@@tihoogte\v!strut - {\let\StrutHeightFactor\@@ithoogte} - {\let\StrutHeightFactor\@@tihoogte}% - \doifelse\@@tidiepte\v!strut - {\let\StrutDepthFactor\@@itdiepte} - {\let\StrutDepthFactor\@@tidiepte}% + \doifelse\@@tiheight\v!strut + {\let\StrutHeightFactor\@@itheight} + {\let\StrutHeightFactor\@@tiheight}% + \doifelse\@@tidepth\v!strut + {\let\StrutDepthFactor\@@itdepth} + {\let\StrutDepthFactor\@@tidepth}% \scratchdimen\StrutHeightFactor\points \multiply\scratchdimen 10% \edef\StrutHeightFactor{\withoutpt\the\scratchdimen}% \scratchdimen\StrutDepthFactor \points \multiply\scratchdimen 10% @@ -2483,14 +2549,14 @@ %D \stopbuffer %D %D \startbuffer[b] -%D \starttabulatie[|c|] +%D \starttabulate[|c|] %D \HL %D \NC test \NC \NR %D \NC test \NC \NR %D \NC test \NC \NR %D \NC test \NC \NR %D \HL -%D \stoptabulatie +%D \stoptabulate %D \stopbuffer %D %D In the next example, the first table is defined as: @@ -2507,34 +2573,34 @@ %D happens when we set the values to zero. The rightmost table %D is typeset using the tabulate environment. %D -%D \startcombinatie[4*1] -%D {$\vcenter{\haalbuffer[a]}$} +%D \startcombination[4*1] +%D {$\vcenter{\getbuffer[a]}$} %D {\hbox{h=.8 d=.4}} -%D {\setuptables[hoogte=strut,diepte=strut]$\vcenter{\haalbuffer[a]}$} +%D {\setuptables[height=strut,depth=strut]$\vcenter{\getbuffer[a]}$} %D {\hbox{h=d=\type{strut}}} -%D {\setuptables[hoogte=0,diepte=0]$\vcenter{\haalbuffer[a]}$} +%D {\setuptables[height=0,depth=0]$\vcenter{\getbuffer[a]}$} %D {\hbox{h=d=0}} -%D {$\vcenter{\haalbuffer[b]}$} +%D {$\vcenter{\getbuffer[b]}$} %D {\hbox{tabulate}} -%D \stopcombinatie +%D \stopcombination \setuptables - [HL=\v!middel, - VL=\v!middel, - NL=\v!klein, - \c!kader=, - \c!uitlijnen=\v!rechts, - \c!diepte=.40, % \v!strut - \c!hoogte=.80, % \v!strut - \c!lijndikte=\linewidth, - \c!lijnkleur=, - \c!afstand=\v!middel, - \c!korps=\the\bodyfontsize, - \c!commandos=, - \c!achtergrond=\v!raster, - \c!achtergrondraster=\@@rsraster, - \c!achtergrondkleur=] + [HL=\v!medium, + VL=\v!medium, + NL=\v!small, + \c!frame=, + \c!align=\v!right, + \c!depth=.40, % \v!strut + \c!height=.80, % \v!strut + \c!rulethickness=\linewidth, + \c!rulecolor=, + \c!distance=\v!medium, + \c!bodyfont=\the\bodyfontsize, + \c!commands=, + \c!background=\v!screen, + \c!backgroundscreen=\@@rsscreen, + \c!backgroundcolor=] \def\ifintabel{\ifintable} % upward compatible -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex index 22ce37474..09523a362 100644 --- a/tex/context/base/core-tbl.tex +++ b/tex/context/base/core-tbl.tex @@ -1,5 +1,4 @@ %D \module -%D \module %D [ file=core-tbl, %D version=1998.11.03, %D title=\CONTEXT\ Core Macros, @@ -509,8 +508,8 @@ \def\dogettabulatewidth(#1)% {\processallactionsinset [#1]% - [\v!passend=>\chardef\tabulatemodus\plusthree, - \v!vast=>\chardef\tabulatemodus\plusthree + [\v!fit=>\chardef\tabulatemodus\plusthree, + \v!fixed=>\chardef\tabulatemodus\plusthree \tabulatenopbreaktrue, \s!unknown=>\tabulatewidth#1\relax]% \ifnum\tabulatedimen=\plusone @@ -573,7 +572,7 @@ {\dontcomplain \global\setbox\tabulatebox % % % global ? % % % \vsplit\tablebox\tabulatecolumn to \lineheight - \setbox\tabulatebox\vbox + \setbox\tabulatebox\normalvbox {\unvbox\tabulatebox}% \setbox\tabulatebox\hbox to \wd\tabulatebox {\hss\dotabulatehook{\box\tabulatebox}\hss}% @@ -613,7 +612,7 @@ \fi}} %D \startbuffer -%D \starttabulatie[|c|p|p|] +%D \starttabulate[|c|p|p|] %D \NC \bf Alpha \NC \bf Beta \NC \bf Gamma \NC\NR %D \NC 1 \NC right indeed \NC definitely wrong \NC\NR %D \NC 2 \NC \thinrules[n=3] \NC \thinrules[n=3] \NC\NR @@ -621,22 +620,22 @@ %D \NC 4 \NC very true \NC as false as can be \NC\NR %D \NC 5 \NC \thinrules[n=5] \NC \thinrules[n=5] \NC\NR %D \NC 6 \NC \thinrules[n=3] \NC \thinrules[n=4] \NC\NR -%D \stoptabulatie +%D \stoptabulate %D \stopbuffer %D -%D \typebuffer {\tracetabulatetrue\haalbuffer} +%D \typebuffer {\tracetabulatetrue\getbuffer} %D %D \startbuffer -%D \starttabulatie[|c|p|p|] +%D \starttabulate[|c|p|p|] %D \NC \bf Alpha \NC \bf Beta \NC \bf Gamma \NC\NR %D \NC 1 \NC right indeed \NC definitely wrong \NC\NR %D \NC 2 \NC oh yes \NC simply no \NC\NR %D \NC 3 \NC very true \NC as false as can be \NC\NR %D \NC 4 \NC the whole truth \NC but the truth \NC\NR -%D \stoptabulatie +%D \stoptabulate %D \stopbuffer %D -%D \typebuffer {\tracetabulatetrue\haalbuffer} +%D \typebuffer {\tracetabulatetrue\getbuffer} % \definetabulate % \redefinetabulate @@ -648,21 +647,21 @@ \def\dodefinetabulate[#1][#2][#3]% {\ifthirdargument - \doifundefined{\??tt#1::\c!eenheid} + \doifundefined{\??tt#1::\c!unit} {\copyparameters [\??tt#1::][\??tt\v!tabulate::]% - [\c!kader,\c!afstand,\c!eenheid,\c!voor,\c!korps,\c!na, - \c!binnen,\c!inspringen,\c!marge,\c!uitlijnen,\c!hoofd,\c!titel, - \c!lijnkleur,\c!lijndikte,\c!splitsen,EQ]}% + [\c!frame,\c!distance,\c!unit,\c!before,\c!bodyfont,\c!after, + \c!inner,\c!indenting,\c!margin,\c!align,\c!header,\c!title, + \c!rulecolor,\c!rulethickness,\c!split,EQ]}% \copyparameters [\??tt#1::#2][\??tt#1::]% - [\c!eenheid,\c!afstand,\c!voor,\c!korps,\c!na, - \c!binnen,\c!inspringen,\c!kader,\c!splitsen,\c!hoofd,\c!titel, - \c!marge,\c!uitlijnen,\c!lijnkleur,\c!lijndikte,EQ]% + [\c!unit,\c!distance,\c!before,\c!bodyfont,\c!after, + \c!inner,\c!indenting,\c!frame,\c!split,\c!header,\c!title, + \c!margin,\c!align,\c!rulecolor,\c!rulethickness,EQ]% \setvalue{\e!start#1::#2}{\dofinalstarttabulate[#1][#2][#3]}% \setvalue{\e!start#1}{\bgroup\dosubstarttabulate[#1]}% - \letvalue{\??tt#1-\v!hoofd}\empty - \letvalue{\??tt#1-\v!voet }\empty + \letvalue{\??tt#1-\v!header}\empty + \letvalue{\??tt#1-\v!footer }\empty \else\ifsecondargument \definetabulate[#1][][#2]% \else @@ -674,21 +673,21 @@ \newconditional\tabulatesomeamble -\def\checkfulltabulatecontent % - needed, else confusion with \c!hoofd - {\ifundefined{\??tt\currenttabulate-\v!hoofd}% +\def\checkfulltabulatecontent % - needed, else confusion with \c!header + {\ifundefined{\??tt\currenttabulate-\v!header}% \let\tabulateheadcontent\empty \else \def\tabulateheadcontent {\TABLEnoalign{\global\settrue\tabulatesomeamble}% - \csname\??tt\currenttabulate-\v!hoofd\endcsname + \csname\??tt\currenttabulate-\v!header\endcsname \TABLEnoalign{\global\setfalse\tabulatesomeamble}}% \fi - \ifundefined{\??tt\currenttabulate-\v!voet}% + \ifundefined{\??tt\currenttabulate-\v!footer}% \let\tabulatetailcontent\empty \else \def\tabulatetailcontent {\TABLEnoalign{\global\settrue\tabulatesomeamble}% - \csname\??tt\currenttabulate-\v!voet\endcsname + \csname\??tt\currenttabulate-\v!footer\endcsname \TABLEnoalign{\global\setfalse\tabulatesomeamble}}% \fi} @@ -714,14 +713,14 @@ \def\dostartstarttabulatehead[#1]% {\processcontent{\e!stop\v!tabulatehead}\next - {\letvalue{\??tt\iffirstargument#1\else\v!tabulate\fi::-\v!hoofd}\next}} + {\letvalue{\??tt\iffirstargument#1\else\v!tabulate\fi::-\v!header}\next}} \setvalue{\e!start\v!tabulatetail}% {\dosingleempty\dostartstarttabulatetail} \def\dostartstarttabulatetail[#1]% {\processcontent{\e!stop\v!tabulatetail}\next - {\letvalue{\??tt\iffirstargument#1\else\v!tabulate\fi::-\v!voet}\next}} + {\letvalue{\??tt\iffirstargument#1\else\v!tabulate\fi::-\v!footer}\next}} \def\dosubstarttabulate {\dodoubleempty\dodosubstarttabulate} @@ -758,28 +757,28 @@ \def\dofinalstarttabulate[#1][#2][#3]% identifier sub preamble {\edef\currenttabulate{#1::#2}% \ifinsidefloat \else - \witruimte - \getvalue{\??tt\currenttabulate\c!voor}% + \whitespace + \getvalue{\??tt\currenttabulate\c!before}% \fi \bgroup \resetcharacteralign % todo: spacing around tabulate when bodyfont is set % expansion en test needed ? - \doifelsevalue{\??tt\currenttabulate\c!splitsen}\v!ja + \doifelsevalue{\??tt\currenttabulate\c!split}\v!yes \splittabulatetrue\splittabulatefalse - \doifvaluesomething{\??tt\currenttabulate\c!korps} + \doifvaluesomething{\??tt\currenttabulate\c!bodyfont} {\expanded{\switchtobodyfont - [\getvalue{\??tt\currenttabulate\c!korps}]}}% + [\getvalue{\??tt\currenttabulate\c!bodyfont}]}}% \postponefootnotes % new, to be tested \chardef\tabulatepass\plusone \widowpenalty\zerocount % otherwise lines are not broken \clubpenalty \zerocount % but overlap in funny ways \the\everytabulate - \getvalue{\??tt\currenttabulate\c!binnen}% + \getvalue{\??tt\currenttabulate\c!inner}% \scratchdimen\leftskip \advance\scratchdimen \hangindent - \doifvalue{\??tt\currenttabulate\c!inspringen}\v!ja - {\advance\scratchdimen \parindent}% \voorwit + \doifvalue{\??tt\currenttabulate\c!indenting}\v!yes + {\advance\scratchdimen \parindent}% \ctxparindent \edef\tabulateindent{\the\scratchdimen}% \!!toksb\emptytoks \def\dorepeat*##1##2% @@ -856,13 +855,13 @@ \let\factor\!!plusone \scratchskip\strutdp \ExpandFirstAfter\processallactionsinset - [\getvalue{\??tt\currenttabulate\c!afstand}] - [ \v!blanko=>\scratchskip\bigskipamount, - \v!diepte=>\scratchskip\strutdp, - \v!klein=>\def\factor{.25}, - \v!middel=>\def\factor{.5}, - \v!groot=>, - \v!geen=>\scratchskip\zeropoint\def\factor{0}, + [\getvalue{\??tt\currenttabulate\c!distance}] + [ \v!blank=>\scratchskip\bigskipamount, + \v!depth=>\scratchskip\strutdp, + \v!small=>\def\factor{.25}, + \v!medium=>\def\factor{.5}, + \v!big=>, + \v!none=>\scratchskip\zeropoint\def\factor{0}, \v!grid=>\scratchskip\zeropoint\def\factor{0}, \s!unknown=>\scratchskip\commalistelement]% \scratchdimen\factor\scratchskip @@ -879,19 +878,19 @@ \def\dodotabulaterule#1% {\color - [\getvalue{\??tt\currenttabulate\c!lijnkleur}] - {\scratchdimen\getvalue{\??tt\currenttabulate\c!lijndikte}#1}} + [\getvalue{\??tt\currenttabulate\c!rulecolor}] + {\scratchdimen\getvalue{\??tt\currenttabulate\c!rulethickness}#1}} \def\dotabulaterule {\dodotabulaterule {\hrule\!!height.5\scratchdimen\!!depth.5\scratchdimen\relax - \doifvalue{\??tt\currenttabulate\c!afstand}\v!grid + \doifvalue{\??tt\currenttabulate\c!distance}\v!grid {\kern-\scratchdimen}}} % experimental tm-prikkels \def\dotabulatelinerule {\multispan\totaltabulatecolumns % \multispan is a plain macro % for the moment this one - \strut\hskip\getvalue{\??tt\currenttabulate\c!marge}% + \strut\hskip\getvalue{\??tt\currenttabulate\c!margin}% % neg values are ok ! \hskip\tabulateindent % new august 2003 \dodotabulaterule @@ -952,300 +951,19 @@ %D cum suis, since \TEX's hard coded noalign lookahead fails %D on it! I mistakenly added this for a while. -% \def\processtabulate[|#1|]% in the process of optimizing -% {\tabulateunit\getvalue{\??tt\currenttabulate\c!eenheid}% -% \checkfulltabulatecontent -% \ExpandFirstAfter\processaction % use \setalignmentswitch instead -% [\getvalue{\??tt\currenttabulate\c!uitlijnen}] -% [\v!normaal=>\def\@@tabulatealign{0},% = default value -% \v!rechts=>\def\@@tabulatealign{1},% chardefs gebruiken -% \v!links=>\def\@@tabulatealign{2},% -% \v!midden=>\def\@@tabulatealign{3},% -% \s!default=>\def\@@tabulatealign{0},% -% \s!unknown=>\def\@@tabulatealign{0}]% -% \let\pretabskip\!!zeropoint -% \def\postabskip{.5\tabulateunit}% -% \global\tabulatecolumns\zerocount -% \global\nofautotabulate\zerocount -% \doglobal\newcounter\noftabulatelines -% \let\totalnoftabulatelines\noftabulatelines -% \let\minusnoftabulatelines\noftabulatelines -% \global\tabulatepwidth\zeropoint -% \global\tabulateequalfalse -% \resettabulatepheight -% \unexpanded \def\NC{\tabulatenormalcolumn0}% -% \unexpanded \def\RC{\tabulatenormalcolumn1}% -% \unexpanded \def\HC{\tabulatenormalcolumn2}% -% \unexpanded \def\EQ{\tabulateequalcolumn 0}% -% \unexpanded \def\RQ{\tabulateequalcolumn 1}% -% \unexpanded \def\HQ{\tabulateequalcolumn 2}% -% \unexpanded \def\NG{\NC\handletabulatecharalign}% -% \unexpanded \def\NN{\NC\handletabulatedigits}% new, undocumented, test first -% \unexpanded \def\ND{\NC\handletabulatedigits}% same, for old times sake -% \def\tabulaterule{\HR}% a rule with lineheight -% \def\tabulateline{\HL}% just a spaced rule -% \def\tabulateautorule{\doHR\plusone}% -% \def\tabulateautoline{\doHL\plusone}% -% \def\HR{\doHR\zerocount} -% \def\HL{\doHL\zerocount} -% \unexpanded \def\NR % next row -% {\doglobal\increment\noftabulatelines -% \global\tabulatefirstflushedfalse -% \global\tabulateequalfalse -% \globallet\tabulatecolumn\!!zerocount -% \resettabulatepheight -% \unskip\unskip\crcr\flushtabulated -% \TABLEnoalign -% {\iftolerantTABLEbreak\else -% \ifnum\noftabulatelines=\plusone -% \dotabulatenobreak -% \else\ifnum\noftabulatelines=\minusnoftabulatelines -% \ifnum\tabulatemaxplines<\plustwo -% \dotabulatenobreak -% \else -% \allowbreak % needed with pbreak prevention -% \fi -% \else -% \allowbreak % needed with pbreak prevention -% \fi\fi -% \fi -% \global\tabulatefirstflushedfalse}}% -% \let\HL\empty % not needed -% \let\SR\NR \let\AR\NR -% \let\FL\empty \let\FR\NR -% \let\ML\empty \let\MR\NR -% \let\LL\empty \let\LR\NR -% \let\doHR\gobbleoneargument -% \let\doHL\gobbleoneargument -% \global\let\flushtabulated\empty -% \let\savedbar|\let|\nexttabulate -% \tabskip\zeropoint -% \ifdim\getvalue{\??tt\currenttabulate\c!marge}>\zeropoint -% \!!toksa{&\flushtabulateindent\strut##% -% \tabskip\getvalue{\??tt\currenttabulate\c!marge}\strut -% &##\tabskip\zeropoint}% -% \else -% \!!toksa{&\flushtabulateindent\strut##% -% &##\tabskip\zeropoint}% -% \fi -% \tabulatewidth\zeropoint -% |#1X|\relax -% \scratchcounter\tabulatecolumns -% \multiply\scratchcounter3% -% \advance\scratchcounter4% -% \edef\totaltabulatecolumns{\the\scratchcounter}% -% \tabulatewidth\zeropoint -% % \dorecurse\tabulatecolumns % can be made faster -% % {\doifundefinedelse{\@@tabbox@@\recurselevel} -% % {\expandafter\newbox\csname\@@tabbox@@\recurselevel\endcsname}% -% % {\global\setbox\csname\@@tabbox@@\recurselevel\endcsname\box\voidb@x}}% -% \initializetableboxes\tabulatecolumns -% \appendtoks&##\to\!!toksa -% \appendtoks\doglobal\increment\tabulatecolumn\to\!!toksa -% \appendtoks\NC\unskip\unskip\crcr\flushtabulated\to\tabulatedummy % no count -% \globallet\tabulatecolumn\!!zerocount -% \resettabulatepheight -% \def\bskip -% {\setbox\tabulatebox\vbox\bgroup -% \global\let\tabulatehook\notabulatehook}% -% \def\eskip -% {\par\egroup -% \global\let\tabulatehook\dotabulatehook}% -% \def\xbskip -% {\hbox\bgroup\vbox\bgroup -% \global\let\tabulatehook\notabulatehook}% -% \def\xeskip -% {\par\egroup\egroup -% \global\let\tabulatehook\dotabulatehook}% -% \let|\savedbar -% \global\let\tabulatehook\dotabulatehook -% \doifvalue{\??tt\currenttabulate\c!inspringen}\v!nee\forgetparindent -% \ifinsidefloat -% \let\tabulateindent\!!zeropoint -% \else -% \setlocalhsize \hsize\localhsize -% \fi -% \dontcomplain -% \forgetall -% \setbox0\vbox % outside \if because of line counting -% {\notesenabledfalse -% \let\tabulateindent\!!zeropoint -% \trialtypesettingtrue % very important -% \@EA\halign\@EA{\the\!!toksa\crcr\fulltabulatecontent\crcr}}% -% \ifnum\nofautotabulate>\zerocount -% % so, even if the natural size is larger, in the final -% % run, we force the calculated width -% \tabulatewidth\hsize -% \advance\tabulatewidth -\wd0 -% \advance\tabulatewidth -\tabulatepwidth -% \ifnum\nofautotabulate>\zerocount -% \divide\tabulatewidth \nofautotabulate\relax -% \fi -% \fi -% \def\xbskip{\bskip}% -% \def\xeskip{\eskip}% -% \ifsplittabulate -% \splittopskip\strutht -% \global\let\flushtabulatedindeed\empty -% \long\def\bbskip -% {\ifvoid\tablebox\tabulatecolumn -% \ifx\flushtabulatedindeed\empty\else -% \setbox0\hbox -% \fi -% \fi}% -% \def\bskip -% {\ifvoid\tablebox\tabulatecolumn -% \global\setbox\tablebox\tabulatecolumn\vbox -% \bgroup -% \global\let\tabulatehook\notabulatehook -% \ifautotabulate\hsize\tabulatewidth\fi -% % \begstrut % interferes with pre-\pars -% % evt: \appendtoks\begstrut\to\everypar -% \ignorespaces -% \def\eskip -% {\par\egroup -% \settabulatepheight -% \global\let\tabulatehook\dotabulatehook -% \splitofftabulatebox}% -% \else -% \let\eskip\empty -% \dontcomplain -% \global\let\tabulatehook\dotabulatehook -% \expandafter\splitofftabulatebox -% \fi}% -% \gdef\flushtabulated -% {\TABLEnoalign % noalign % no interference ! -% {\global\let\flushtabulatedindeed\empty -% \globallet\tabulatecolumn\!!zerocount -% \handletabulatepbreak -% \dorecurse\tabulatecolumns % was: \noftabcolumns -% {\ifvoid\tablebox\recurselevel\else -% \gdef\flushtabulatedindeed{\the\tabulatedummy}% -% \fi}% -% \global\tabulatefirstflushedtrue}% -% \flushtabulatedindeed}% -% \else -% % tabhook op alles ? -% \def\bskip -% {\vtop\bgroup -% \ifautotabulate\hsize\tabulatewidth\fi -% % \begstrut % interferes with pre-\pars -% % evt: \appendtoks\begstrut\to\everypar -% \ignorespaces}% -% \def\eskip % vertical strut added august 2003 -% {\par\verticalstrut\vskip-\struttotal\egroup}% -% \fi -% \let\totalnoftabulatelines\noftabulatelines -% \let\minusnoftabulatelines\noftabulatelines -% \decrement\minusnoftabulatelines -% \doglobal\newcounter\noftabulatelines -% \def\doHL##1% -% {\TABLEnoalign -% {\ifnum\noftabulatelines=\zerocount -% \ifcase##1\or -% \@EAEAEA\FL -% \fi -% \else\ifnum\noftabulatelines=\totalnoftabulatelines -% \ifcase##1\or -% \@EA\@EAEAEA\@EA\LL -% \fi -% \else -% \@EAEAEA\ML -% \fi\fi}}% -% \def\doHR##1% horizontal rule line (break untested) -% {\TABLEnoalign -% {\globallet\TABLEautoline\dotabulatelinerule -% \ifcase##1\or -% \ifnum\noftabulatelines=\zerocount -% \gdef\TABLEautoline{\TABLEnoalign{}}% -% \else\ifnum\noftabulatelines=\totalnoftabulatelines -% \gdef\TABLEautoline{\TABLEnoalign{}}% -% \fi\fi -% \fi -% \dotabulatenobreak}% -% \TABLEautoline -% \TABLEnoalign -% {\nobreak -% \ifx\TABLEautoline\dotabulatelinerule\kern-\lineheight\fi -% \ifnum\noftabulatelines=\totalnoftabulatelines -% \@EA\dotabulatenobreak -% \else -% \@EA\allowbreak -% \fi}% -% \TABLEautoline -% \TABLEnoalign -% {\dotabulatenobreak}}% -% \doifelsevalue{\??tt\currenttabulate\c!lijn}\v!regel -% {\let\HL \HR -% \let\tabulateautoline\tabulateautorule -% \let\tabulateline \tabulaterule}% -% {\def\HL{\doHL\zerocount}}% -% \def\tablebaselinecorrection -% {\def\dobaselinecorrection -% {\vskip-\prevdepth -% \vskip\strutdp -% \vskip\strutdp}% -% \baselinecorrection}% -% \def\FL{\TABLEnoalign -% {\ifinsidefloat\else -% \doifemptyvalue{\??tt\currenttabulate\c!voor} % no expansion -% {\tablebaselinecorrection}% -% \fi -% \dotabulaterule -% \dotabulatenobreak -% \dotabulateruleseperator -% \prevdepth\strutdp -% \dotabulatenobreak}}% -% \def\ML{\TABLEnoalign -% {\dotabulateruleseperator -% \dotabulaterule -% \ifnum\noftabulatelines>\plusone -% \ifnum\noftabulatelines<\minusnoftabulatelines -% \vskip\topskip\allowbreak\vskip-\topskip -% \vskip-\getvalue{\??tt\currenttabulate\c!lijndikte}% -% \dotabulaterule -% \fi -% \fi -% \dotabulateruleseperator}}% -% \def\LL{\TABLEnoalign -% {\dotabulatenobreak -% \dotabulateruleseperator -% \dotabulatenobreak -% \dotabulaterule -% \ifinsidefloat\else -% \doifemptyvalue{\??tt\currenttabulate\c!na} % no expansion -% {\vskip\strutdp -% \verticalstrut -% \vskip-\struttotal}% -% \fi}}% -% \chardef\tabulatepass\plustwo -% % -% \startflushtabulate -% \@EA\halign\@EA{\the\!!toksa\crcr\fulltabulatecontent\crcr}% -% \prevdepth\strutdp % nog eens beter, temporary hack -% \doifvalue{\??tt\currenttabulate\c!afstand}\v!grid -% {\vskip-\strutdp}% experimental tm-prikkels -% \stopflushtabulate -% % -% \egroup -% \ifinsidefloat \else -% \getvalue{\??tt\currenttabulate\c!na}% -% \fi -% \egroup} - \chardef\tabulaterepeathead\zerocount \def\processtabulate[|#1|]% in the process of optimizing - {\tabulateunit\getvalue{\??tt\currenttabulate\c!eenheid}% + {\tabulateunit\getvalue{\??tt\currenttabulate\c!unit}% \checkfulltabulatecontent \globallet\tabulateruledepth \!!zeropoint \globallet\tabulateruleheight\!!zeropoint \ExpandFirstAfter\processaction % use \setalignmentswitch instead - [\getvalue{\??tt\currenttabulate\c!uitlijnen}] - [\v!normaal=>\def\@@tabulatealign{0},% = default value - \v!rechts=>\def\@@tabulatealign{1},% chardefs gebruiken - \v!links=>\def\@@tabulatealign{2},% - \v!midden=>\def\@@tabulatealign{3},% + [\getvalue{\??tt\currenttabulate\c!align}] + [\v!normal=>\def\@@tabulatealign{0},% = default value + \v!right=>\def\@@tabulatealign{1},% chardefs gebruiken + \v!left=>\def\@@tabulatealign{2},% + \v!middle=>\def\@@tabulatealign{3},% \s!default=>\def\@@tabulatealign{0},% \s!unknown=>\def\@@tabulatealign{0}]% \let\pretabskip\!!zeropoint @@ -1260,9 +978,9 @@ \resettabulatepheight \ifinsidefloat \else \processaction - [\getvalue{\??tt\currenttabulate\c!hoofd}] - [\v!herhaal=>\chardef\tabulaterepeathead\plusone, - \v!tekst=>\chardef\tabulaterepeathead\plustwo]% + [\getvalue{\??tt\currenttabulate\c!header}] + [\v!repeat=>\chardef\tabulaterepeathead\plusone, + \v!text=>\chardef\tabulaterepeathead\plustwo]% \fi \unexpanded \def\NC{\tabulatenormalcolumn0}% \unexpanded \def\RC{\tabulatenormalcolumn1}% @@ -1314,9 +1032,9 @@ \global\let\flushtabulated\empty \let\savedbar|\let|\nexttabulate \tabskip\zeropoint - \ifdim\getvalue{\??tt\currenttabulate\c!marge}>\zeropoint + \ifdim\getvalue{\??tt\currenttabulate\c!margin}>\zeropoint \!!toksa{&\flushtabulateindent\strut##% - \tabskip\getvalue{\??tt\currenttabulate\c!marge}\strut + \tabskip\getvalue{\??tt\currenttabulate\c!margin}\strut &##\tabskip\zeropoint}% \else \!!toksa{&\flushtabulateindent\strut##% @@ -1353,7 +1071,7 @@ \global\let\tabulatehook\dotabulatehook}% \let|\savedbar \global\let\tabulatehook\dotabulatehook - \doifvalue{\??tt\currenttabulate\c!inspringen}\v!nee\forgetparindent + \doifvalue{\??tt\currenttabulate\c!indenting}\v!no\forgetparindent \ifinsidefloat \let\tabulateindent\!!zeropoint \else @@ -1502,7 +1220,7 @@ \TABLEautoline \TABLEnoalign {\dotabulatenobreak}}% - \doifelsevalue{\??tt\currenttabulate\c!lijn}\v!regel + \doifelsevalue{\??tt\currenttabulate\c!rule}\v!line {\let\HL \HR \let\tabulateautoline\tabulateautorule \let\tabulateline \tabulaterule}% @@ -1515,7 +1233,7 @@ \baselinecorrection}% \def\FL{\TABLEnoalign {\ifinsidefloat\else - \doifemptyvalue{\??tt\currenttabulate\c!voor} % no expansion + \doifemptyvalue{\??tt\currenttabulate\c!before} % no expansion {\tablebaselinecorrection}% \fi \dotabulaterule @@ -1529,7 +1247,7 @@ \ifnum\noftabulatelines>\plusone \ifnum\noftabulatelines<\minusnoftabulatelines \vskip\topskip\allowbreak\vskip-\topskip - \vskip-\getvalue{\??tt\currenttabulate\c!lijndikte}% + \vskip-\getvalue{\??tt\currenttabulate\c!rulethickness}% \dotabulaterule \fi \fi @@ -1540,7 +1258,7 @@ \dotabulatenobreak \dotabulaterule \ifinsidefloat\else - \doifemptyvalue{\??tt\currenttabulate\c!na} % no expansion + \doifemptyvalue{\??tt\currenttabulate\c!after} % no expansion {\vskip\strutdp \verticalstrut \vskip-\struttotal}% @@ -1548,14 +1266,14 @@ \chardef\tabulatepass\plustwo % \ifcase\tabulaterepeathead - \startframedcontent[\getvalue{\??tt\currenttabulate\c!kader}]% + \startframedcontent[\getvalue{\??tt\currenttabulate\c!frame}]% \else \setbox\tabulatebox\vbox \bgroup \fi % \@EA\halign\@EA{\the\!!toksa\crcr\fulltabulatecontent\crcr}% \prevdepth\strutdp % nog eens beter, temporary hack - \doifvalue{\??tt\currenttabulate\c!afstand}\v!grid + \doifvalue{\??tt\currenttabulate\c!distance}\v!grid {\vskip-\strutdp}% experimental tm-prikkels % \ifcase\tabulaterepeathead @@ -1566,7 +1284,7 @@ % \egroup \ifinsidefloat \else - \getvalue{\??tt\currenttabulate\c!na}% + \getvalue{\??tt\currenttabulate\c!after}% \fi \egroup} @@ -1609,16 +1327,16 @@ \advance\dimen0\dp0 \advance\dimen0\ht0 \ifdim\dimen0>\pagegoal - \bgroup \pagina \egroup % make sure that local vars are kept + \bgroup \page \egroup % make sure that local vars are kept \ifcase\tabulaterepeathead\or \unvcopy2 \or - \hbox{\strut\getvalue{\??tt\currenttabulate\c!titel}}% + \hbox{\strut\getvalue{\??tt\currenttabulate\c!title}}% \fi \fi \fi % test this on icare checklists / quite hacky ! ! ! - \ifdim\ht0>\getvalue{\??tt\currenttabulate\c!lijndikte}\else + \ifdim\ht0>\getvalue{\??tt\currenttabulate\c!rulethickness}\else \kern-2\ht0 % brrrr \fi % @@ -1627,7 +1345,7 @@ \ifvoid#1 \exitloop \fi}% \fi} -%D \startypen +%D \starttyping %D \setuptabulate[split=no,rule=line] %D %D \starttabulate @@ -1638,7 +1356,7 @@ %D \NC tufte \NC \input tufte \NC \NR \tabulateautorule %D \NC tufte \NC \input tufte \NC \NR \tabulateautorule %D \stoptabulate -%D \stoptypen +%D \stoptyping % \starttabulatie[|mc|] % \NC \digits{100.000,00} \NC\NR @@ -1693,22 +1411,22 @@ \fi\fi} \setuptabulate - [\c!eenheid=1em, + [\c!unit=1em, EQ={:}, - \c!kader=\v!uit, - \c!korps=, - \c!lijn=\v!normaal, - \c!lijnkleur=, - \c!lijndikte=\linewidth, - \c!binnen=, - \c!voor=\blanko, - \c!na=\blanko, - \c!afstand={\v!diepte,\v!middel}, - \c!uitlijnen=\v!normaal, - \c!marge=\!!zeropoint, - \c!splitsen=\v!ja, - \c!hoofd=\v!ja, - \c!titel=, - \c!inspringen=\v!nee] - -\protect \endinput \ No newline at end of file + \c!frame=\v!off, + \c!bodyfont=, + \c!rule=\v!normal, + \c!rulecolor=, + \c!rulethickness=\linewidth, + \c!inner=, + \c!before=\blank, + \c!after=\blank, + \c!distance={\v!depth,\v!medium}, + \c!align=\v!normal, + \c!margin=\!!zeropoint, + \c!split=\v!yes, + \c!header=\v!yes, + \c!title=, + \c!indenting=\v!no] + +\protect \endinput diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex index 71099c790..a32b670d8 100644 --- a/tex/context/base/core-uti.tex +++ b/tex/context/base/core-uti.tex @@ -17,6 +17,7 @@ % todo : safe lan etc too % todo : load all commands at once (tok) +% todo : merge status info patch into tui file (language, encoding, etc), % Utility-file % @@ -55,14 +56,18 @@ {\checksectionseparator} {\@@utilityerrormessage\resetutilities\endinput}} -\def\checksectionseparator % catches backward compatibility conflict - {\doifnot\sectionseparator:\endinput} +\def\checksectionseparator % catches backward compatibility conflict + {\doifnot\sectionseparator:\endinput} % this dependency may go in a few years + +\def\dosplitofffoliopart[#1::#2::#3]{#3} \def\thisissectionseparator#1% {\bgroup \globallet\checksectionseparator\relax \convertcommand \sectionseparator\to\asciiA \convertargument #1\to\asciiB + \expanded{\gdef\noexpand\dosplitofffoliopart[####1\sectionseparator + \sectionseparator####2\sectionseparator\sectionseparator####3]{####3}}% \ifx\asciiA\asciiB \egroup \else @@ -107,6 +112,18 @@ \let\checkedutility\docheckedutility \to \everybeforeshipout +\edef\testbytesequence{\rawcharacter{7}\rawcharacter{27}\rawcharacter{227}} + +\def\thisisbytesequence#1% + {\ifx\testbytesequence\empty\else + \convertcommand\testbytesequence\to\testbytesequence + \convertargument#1\to\ascii + \ifx\testbytesequence\ascii \else + \writestatus\m!systems{possible problem with 8 bit output}% + \fi + \fi + \global\let\thisisbytesequence\gobbleoneargument} + % Better use marks. \def\checkutilities @@ -119,9 +136,10 @@ % this trickery is used in s-pre-50 \def\openutilities - {\immediate\openout\uti=\jobname.\f!inputextension - \immediatewriteutilitycommand{\thisissectionseparator{\sectionseparator}}% - \immediatewriteutilitycommand{\thisisutilityversion {\utilityversion}}} + {\immediate\openout\uti\jobname.\f!inputextension + \immediatewriteutilitycommand{\thisissectionseparator{\sectionseparator}}% for the moment + \immediatewriteutilitycommand{\thisisutilityversion {\utilityversion }}% in this order + \immediatewriteutilitycommand{\thisisbytesequence {\testbytesequence}}} \def\closeutilities {\immediate\closeout\uti % niet echt nodig @@ -205,8 +223,8 @@ % no longer needed, since texutil is now multi platform % -% \def\utilitycheckmessage% -% {\showmessage{\m!systems}{12}{}% +% \def\utilitycheckmessage +% {\showmessage\m!systems{12}{}% % \globallet\utilitycheckmessage=\relax} % % \def\saveutilityline#1 #2\txen% tricky maar ok, want achter \command @@ -218,12 +236,12 @@ % \utilitycheckmessage % \fi\fi\fi} % -% \def\checkutilityfile% +% \def\checkutilityfile % {\doiflocfileelse{\jobname.\f!outputextension} % {} % {\doiflocfileelse{\jobname.\f!inputextension} % {\bgroup -% \showmessage{\m!systems}{11}{}% +% \showmessage\m!systems{11}{}% % \openout\scratchwrite=\jobname.\f!outputextension % \openlocin\scratchread{\jobname.\f!inputextension}% % \def\doprocessline% @@ -245,10 +263,10 @@ \long\def\doutilities#1#2#3#4#5% % introduceren in utility file {\restorecatcodes \resetutilities - %\message{#1}% - \def\docommando##1% % more than one utility thing - {\csname\s!set##1\endcsname}% % can be handled in one pass, - \processcommacommand[#1]\docommando % for instance lists + % more than one utility thing can be handled in one pass, + % for instance lists, so we process ##1 as list + \def\douticommand##1{\csname\s!set##1\endcsname}% + \processcommacommand[#1]\douticommand \begingroup \def\currentutilityfilename{#2}% \notesenabledfalse @@ -282,9 +300,9 @@ \doifsomething{#3} {\showmessage\m!systems9{{#3}}% \ifvoorlopig - \blanko + \blank \type{[\currentmessagetext]}% - \blanko + \blank \fi}% \fi \disableinitializevariables @@ -330,8 +348,18 @@ \newif\iftwopassdatafound -\def\twopassentry#1% - {\executeifdefined{@@#1\s!pass}\gobbletwoarguments} +\def\settwopassentries + {\def\twopassentry##1{\executeifdefined{@@##1\s!pass}\gobbletwoarguments}} + +\def\resettwopassentries + {\let\twopassentry\gobblethreearguments} + +\addutilityreset{twopassentries} + +\resettwopassentries + +% \def\twopassentry#1% +% {\executeifdefined{@@#1\s!pass}\gobbletwoarguments} %\def\appendtwopasselement#1#2#3% % {%\debuggerinfo{\m!systems}{twopass data #1 - #2 = #3}% @@ -375,7 +403,7 @@ {\startnointerference \letgvalueempty{#1:\s!list}% \protectlabels - \doutilities{#1\s!pass}\jobname\empty\relax\relax + \doutilities{twopassentries,#1\s!pass}\jobname\empty\relax\relax \ifx\twopassdata\empty\else \appendtwopasselement{#1}{0}\twopassdata \fi @@ -551,7 +579,7 @@ % left over \def\plaatsvolledig#1#2#3#4% kop, ref, tit, do - {#1[#2]{#3}#4\pagina[\v!ja]} + {#1[#2]{#3}#4\page[\v!yes]} % Experiment % @@ -613,4 +641,4 @@ \long\setvalue{\s!reset#1}{#2}% \long\setvalue{\s!set #1}{#3}} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex index 7f8c44030..7e67be23a 100644 --- a/tex/context/base/core-var.tex +++ b/tex/context/base/core-var.tex @@ -44,11 +44,36 @@ \newevery \everybeginofpar \relax \newevery \everyendofpar \relax +%D For shared \type {\everymath} and \type {\everydisplay}: + +\newevery \everymathematics \relax + +\prependtoks \the\everymathematics \to \everymath +\prependtoks \the\everymathematics \to \everydisplay + +% \newevery \everyparflush \relax % collected nodes + %D Experimental (used in xml

..

\def\bpar{\the\everybeginofpar\ignorespaces} % may interfere with \everypar \def\epar{\ifhmode\removeunwantedspaces\the\everyendofpar\fi} % test prevents problems with \bpar\epar +%D More generic (used to be pushcolor etc) + +\newtoks\everypushproperties +\newtoks\everypopproperties +\newtoks\everypopsplitproperties + +\newtoks\everystarttextproperties +\newtoks\everystoptextproperties + +\def\pushproperties {\the\everypushproperties} +\def\popproperties {\the\everypopproperties} +\def\popsplitproperties {\the\everypopsplitproperties} + +\def\starttextproperties{\the\everystarttextproperties} +\def\stoptextproperties {\the\everystoptextproperties} + %D \macros %D {defineinputmode,setinputmode} %D @@ -69,12 +94,13 @@ %D We disable trial typesetting in the output routine, %D just to be sure. -\prependtoks - \trialtypesettingfalse -\to \everybeforepagebody +\prependtoks \trialtypesettingfalse \to \everybeforepagebody %D \macros %D {starttextdata} +%D +%D This is a user macro (appending to every last shipout is not +%D really user friendly. \newtoks \collectedtextdata @@ -82,10 +108,12 @@ {\doglobal\appendtoks#1\to\collectedtextdata} \def\flushtextdata - {\vsmash{\the\collectedtextdata}% + {\vsmashed{\the\collectedtextdata}% all dimensions zero \global\collectedtextdata\emptytoks \globallet\flushtextdata\donothing} +\prependtoks \flushtextdata \to \everylastshipout + %D \macros %D {ifprocessingXML} %D @@ -124,6 +152,8 @@ %D The command \type {\fastmode} disables some time consuming %D typesetting. +\let\normalwritestatus\writestatus + \newevery \everyfastmode \relax \newif\iffastmode @@ -158,12 +188,12 @@ %D {setvariables,getvariable,getvariabledefault} %D %D \starttyping -%D \setvariables[xx][titel=] -%D \setvariables[xx][titel=test test] -%D \setvariables[xx][titel=test $x=1$ test] % fatal error reported -%D \setvariables[xx][titel=test {$x=1$} test] -%D \setvariables[xx][titel] % fatal error reported -%D \setvariables[xx][titel=e] +%D \setvariables[xx][title=] +%D \setvariables[xx][title=test test] +%D \setvariables[xx][title=test $x=1$ test] % fatal error reported +%D \setvariables[xx][title=test {$x=1$} test] +%D \setvariables[xx][title] % fatal error reported +%D \setvariables[xx][titletitel=e] %D \stoptyping \def\??vars{@@vars} @@ -254,10 +284,15 @@ %D We store some original meanings, maybe in \type %D {math-ini}. +\let\normalat \at \let\normalin \in +\let\normalfrom \from \let\normalover \over +\let\normalabout \about + \let\normalabove \above \let\normalatop \atop + \let\normaloverwithdelims \overwithdelims \let\normalabovewithdelims\abovewithdelims \let\normalatopwithdelims \atopwithdelims @@ -267,4 +302,4 @@ \let\startlayoutcomponent\gobbletwoarguments \let\stoplayoutcomponent \relax -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex index ed77e9c3b..f61697605 100644 --- a/tex/context/base/core-ver.tex +++ b/tex/context/base/core-ver.tex @@ -133,40 +133,40 @@ % \def\prettyidentifier{TEX}% % - \doifelsevalue{#1\c!tekst}\v!ja + \doifelsevalue{#1\c!text}\v!yes \naturaltextexttrue \naturaltextextfalse - \def\prettyidentifierfont{\getvalue{#1\c!icommando}}% - \def\prettyvariablefont {\getvalue{#1\c!vcommando}}% - \def\prettynaturalfont {\getvalue{#1\c!ccommando}}% + \def\prettyidentifierfont{\getvalue{#1\c!icommand}}% + \def\prettyvariablefont {\getvalue{#1\c!vcommand}}% + \def\prettynaturalfont {\getvalue{#1\c!ccommand}}% % - \doifvalue{#1\c!spatie}\v!aan{\def\obeyspaces{\setcontrolspaces}}% - %doifvalue{#1\c!tab} \v!aan{\def\obeytabs {\settabskips}}% - \doifnotvalue{#1\c!tab}\v!uit{\def\obeytabs {\settabskips}}% - \doifvalue{#1\c!tab} \s!ascii{\chardef\tabskipmode2}% quit on >127 - \doifvalue{#1\c!pagina}\v!nee{\def\obeypages {\ignorepages}}% + \doifvalue{#1\c!space}\v!on{\def\obeyspaces{\setcontrolspaces}}% + %doifvalue{#1\c!tab} \v!on{\def\obeytabs {\settabskips}}% + \doifnotvalue{#1\c!tab}\v!off{\def\obeytabs {\settabskips}}% + \doifvalue{#1\c!tab} \s!ascii{\chardef\tabskipmode\plustwo}% quit on >127 + \doifvalue{#1\c!page}\v!no{\def\obeypages {\ignorepages}}% % \ignorehyphens % default \ExpandFirstAfter\processaction - [\getvalue{#1\c!regels}] - [ \v!ja=>\obeybreakpoints, - \v!afgebroken=>\obeyhyphens]% + [\getvalue{#1\c!lines}] + [ \v!yes=>\obeybreakpoints, + \v!hyphenated=>\obeyhyphens]% % \ExpandFirstAfter\processaction - [\getvalue{#1\c!optie}] - [ \v!geen=>\let\obeycharacters\relax, - \v!kleur=>\setupprettiesintype{TEX}% + [\getvalue{#1\c!option}] + [ \v!none=>\let\obeycharacters\relax, + \v!color=>\setupprettiesintype{TEX}% \let\obeycharacters\setupprettytype \let\obeytabs\ignoretabs, - \v!normaal=>\let\obeycharacters\setupgroupedtype, - \v!commandos=>\def\obeycharacters{\setupcommandsintype{#1}}% + \v!normal=>\let\obeycharacters\setupgroupedtype, + \v!commands=>\def\obeycharacters{\setupcommandsintype{#1}}% \let\obeytabs\ignoretabs, - \v!schuin=>\let\obeycharacters\setupslantedtype + \v!slanted=>\let\obeycharacters\setupslantedtype \let\obeytabs\ignoretabs, - \s!unknown=>\setupprettiesintype{\getvalue{#1\c!optie}}% + \s!unknown=>\setupprettiesintype{\getvalue{#1\c!option}}% \let\obeycharacters\setupprettytype \let\obeytabs\ignoretabs]% - \def\verbatimfont{\getvalue{#1\c!letter}}% + \def\verbatimfont{\getvalue{#1\c!style}}% \setupverbatimcolor{#1}} %D The verbatim commands have a rather long and turbulent @@ -185,7 +185,7 @@ %D Typesetting inline verbatim can be accomplished by %D \type{\type}, which in this sentence was typeset by saying %D just \type{\type{\type}}, which in turn was typeset by -%D \onbekend. Using the normal grouping characters \type{{}} is +%D \unknown. Using the normal grouping characters \type{{}} is %D the most natural way of using this command. %D %D A second, more or less redundant, alternative is delimiting @@ -219,7 +219,7 @@ % \catcode`\>=\@@other % \futurelet\next\dotype} -\unexpanded\def\type% +\unexpanded\def\type {\dotype\empty} \def\dotype#1% @@ -318,7 +318,7 @@ {\ifx\next\bgroup \@EA\dodotypeA \else\if\next<% - \doifelsevalue{\??ty\@@currenttype\c!optie}\v!geen + \doifelsevalue{\??ty\@@currenttype\c!option}\v!none {\@EAEAEA\dodotypeB}{\@EAEAEA\dodotypeC}% \else \@EAEAEA\dodotypeD @@ -364,7 +364,7 @@ %D because we think it's shows a bit better what we are %D doing. %D -%D \starttypen +%D \starttyping %D \bgroup %D \catcode`\<=\@@active %D \catcode`\>=\@@active @@ -390,7 +390,7 @@ %D \next}% %D \futurelet\next\do}} %D \egroup -%D \stoptypen +%D \stoptyping %D %D The final implementation looks a bit further and treats the %D lone \type{<<} and \type{>>} a bit different. The \type @@ -548,13 +548,13 @@ %D The setups for inline verbatim default to: \setuptype - [\c!spatie=\v!uit, - \c!kleur=, - \c!letter=\tt\tf, % \tttf gives problems with {\tx \type...} - \c!pagina=\v!nee, - \c!tab=\v!nee, + [\c!space=\v!off, + \c!color=, + \c!style=\tt\tf, % \tttf gives problems with {\tx \type...} + \c!page=\v!no, + \c!tab=\v!no, \c!palet=colorpretty, - \c!optie=\v!normaal] + \c!option=\v!normal] %D \macros %D {typ,obeyhyphens,obeybreakpoints} @@ -605,7 +605,7 @@ \unexpanded\def\typ {\bgroup - \let\@@tyregels\v!afgebroken + \let\@@tylines\v!hyphenated \futurelet\next\dodotype} %D \macros @@ -622,7 +622,7 @@ %D The next implementation is more clear but less versatile, %D so we treated it for a beter one. %D -%D \starttypen +%D \starttyping %D \def\dospecialtype#1#2% %D {\bgroup %D \initializetype @@ -640,12 +640,12 @@ %D \unexpanded\def\arg{\dospecialtype\leftargument\rightargument} %D \unexpanded\def\mat{\dospecialtype\$\$} %D \unexpanded\def\dis{\dospecialtype{\$\$}{\$\$}} -%D \stoptypen +%D \stoptyping %D % %D For sometime we used the better but less readable is % %D alternative % %D -% %D \starttypen +% %D \starttyping % %D \def\doprocessgroup#1#2#3% % %D {\bgroup % %D #1% @@ -666,7 +666,7 @@ % %D \unexpanded\def\arg{\doprocessgroup\setgroupedtype\leftargument\rightargument} % %D \unexpanded\def\mat{\doprocessgroup\setgroupedtype\$\$} % %D \unexpanded\def\dis{\doprocessgroup\setgroupedtype{\$\$}{\$\$}} -% %D \stoptypen +% %D \stoptyping % %D %D %D But since \type{\groupedcommand} became available, we use @@ -693,35 +693,35 @@ \def\initializetyping#1% {%\donefalse - \switchtobodyfont[\getvalue{\??tp#1\c!korps}]% + \switchtobodyfont[\getvalue{\??tp#1\c!bodyfont}]% \donefalse - \scratchskip\getvalue{\??tp#1\c!onevenmarge}\relax + \scratchskip\getvalue{\??tp#1\c!oddmargin}\relax \ifzeropt\scratchskip\else\donetrue\fi - \scratchskip\getvalue{\??tp#1\c!evenmarge}\relax + \scratchskip\getvalue{\??tp#1\c!evenmargin}\relax \ifzeropt\scratchskip\else\donetrue\fi \ifdone \def\doopenupverbatimline {\getpagestatus \ifrightpage - \hskip\getvalue{\??tp#1\c!onevenmarge}\relax + \hskip\getvalue{\??tp#1\c!oddmargin}\relax \else - \hskip\getvalue{\??tp#1\c!evenmarge}\relax + \hskip\getvalue{\??tp#1\c!evenmargin}\relax \fi}% \else - \doadaptleftskip{\getvalue{\??tp#1\c!marge}}% + \doadaptleftskip{\getvalue{\??tp#1\c!margin}}% \fi - \doifdefinedelse{\??bo\getvalue{\??tp#1\c!blanko}} - {\edef\!!stringa{\csname\??bo\csname\??tp#1\c!blanko\endcsname\endcsname}} - {\edef\!!stringa{\csname\??tp#1\c!blanko\endcsname}}% + \doifdefinedelse{\??bo\getvalue{\??tp#1\c!blank}} + {\edef\!!stringa{\csname\??bo\csname\??tp#1\c!blank\endcsname\endcsname}} + {\edef\!!stringa{\csname\??tp#1\c!blank\endcsname}}% \processaction [\!!stringa] - [\v!standaard=>\scratchskip\tussenwit, - \v!klein=>\scratchskip\blankokleinmaat, - \v!middel=>\scratchskip\blankomiddelmaat, - \v!groot=>\scratchskip\blankogrootmaat, - \v!halveregel=>\scratchskip.5\baselineskip, - \v!regel=>\scratchskip\baselineskip, - \v!geen=>\scratchskip\zeropoint, + [\v!standard=>\scratchskip\ctxparskip, + \v!small=>\scratchskip\blankokleinmaat, + \v!medium=>\scratchskip\blankomiddelmaat, + \v!big=>\scratchskip\blankogrootmaat, + \v!halfline=>\scratchskip.5\baselineskip, + \v!line=>\scratchskip\baselineskip, + \v!none=>\scratchskip\zeropoint, \s!unknown=>\scratchskip\commalistelement]% \ifgridsnapping \ifdim\scratchskip=.5\baselineskip\relax @@ -739,16 +739,16 @@ %D more general mechanism. \def\dostarttyping#1% - {\getvalue{\??tp#1\c!voor}% - \startopelkaar % includes \bgroup + {\getvalue{\??tp#1\c!before}% + \startpacked % includes \bgroup \initializetyping{#1}% \startverbatimcolor \expandafter\processdisplayverbatim\expandafter{\s!stop#1}} \def\dostoptyping#1% {\stopverbatimcolor - \stopopelkaar % includes \egroup - \getvalue{\??tp#1\c!na}% + \stoppacked % includes \egroup + \getvalue{\??tp#1\c!after}% \dochecknextindentation{\??tp#1}} %D \macros @@ -789,28 +789,28 @@ %D alternative escape character. \setuptyping - [ \c!voor=\blanko, - \c!na=\blanko, - \c!korps=, - \c!kleur=, - \c!spatie=\v!uit, - \c!pagina=\v!nee, + [ \c!before=\blank, + \c!after=\blank, + \c!bodyfont=, + \c!color=, + \c!space=\v!off, + \c!page=\v!no, \c!tab=\s!ascii, - \c!optie=\v!geen, + \c!option=\v!none, \c!palet=colorpretty, - \c!tekst=\v!nee, - \c!letter=\tttf, - \c!icommando=\ttsl, - \c!vcommando=, - \c!ccommando=\tttf, - \c!springvolgendein=\v!ja, - \c!marge=\!!zeropoint, - \c!evenmarge=\!!zeropoint, - \c!onevenmarge=\!!zeropoint, - \c!blanko=\v!regel, + \c!text=\v!no, + \c!style=\tttf, + \c!icommand=\ttsl, + \c!vcommand=, + \c!ccommand=\tttf, + \c!indentnext=\v!yes, + \c!margin=\!!zeropoint, + \c!evenmargin=\!!zeropoint, + \c!oddmargin=\!!zeropoint, + \c!blank=\v!line, \c!escape=/, % beware \string\ , should also be accepted - \c!nummeren=\v!nee, - \c!regels=] + \c!numbering=\v!no, + \c!lines=] %D \macros %D {definetype} @@ -825,7 +825,7 @@ {\unexpanded\setvalue{#1}{\dotype{#1}}% \copyparameters [\??ty#1][\??ty] - [\c!spatie,\c!palet,\c!kleur,\c!letter,\c!pagina,\c!tab,\c!optie]% + [\c!space,\c!palet,\c!color,\c!style,\c!page,\c!tab,\c!option]% \getparameters[\??ty#1][#2]} %D \macros @@ -835,23 +835,23 @@ %D will suffice, but for documentation purposes the next %D definition command can be of use: %D -%D \starttypen +%D \starttyping %D \definetyping[extratyping][margin=3em] %D %D \startextratyping %D these extra ones are indented by 1 em %D \stopextratyping -%D \stoptypen +%D \stoptyping %D %D The definitions default to the standard typing values. \def\presettyping[#1][#2]% {\copyparameters [\??tp#1][\??tp] - [\c!voor,\c!na,\c!spatie,\c!pagina,\c!tab,\c!kleur,\c!letter, - \c!tekst,\c!icommando,\c!vcommando,\c!ccommando,\c!korps, - \c!optie,\c!palet,\c!marge,\c!evenmarge,\c!onevenmarge, - \c!springvolgendein,\c!blanko,\c!escape,\c!regels,\c!nummeren]% + [\c!before,\c!after,\c!space,\c!page,\c!tab,\c!color,\c!style, + \c!text,\c!icommand,\c!vcommand,\c!ccommand,\c!bodyfont, + \c!option,\c!palet,\c!margin,\c!evenmargin,\c!oddmargin, + \c!indentnext,\c!blank,\c!escape,\c!lines,\c!numbering]% \getparameters [\??tp#1] [#2]} @@ -864,23 +864,23 @@ \def\definetyping {\dodoubleempty\dodefinetyping} -\definetyping[\v!typen] - -\definetyping[RAW] [\c!optie=RAW] -\definetyping[MP] [\c!optie=MP] -\definetyping[PL] [\c!optie=PL] -\definetyping[PM] [\c!optie=PL] -\definetyping[JS] [\c!optie=JS] -\definetyping[JV] [\c!optie=JV] -\definetyping[SQL] [\c!optie=SQL] -\definetyping[TEX] [\c!optie=TEX] -\definetyping[PAS] [\c!optie=PAS] -\definetyping[PASCAL][\c!optie=PAS] -\definetyping[MOD] [\c!optie=PAS] -\definetyping[MODULA][\c!optie=PAS] -\definetyping[DELPHI][\c!optie=PAS] -\definetyping[EIFFEL][\c!optie=EIF] -\definetyping[XML] [\c!optie=XML] +\definetyping[\v!typing] + +\definetyping[RAW] [\c!option=RAW] +\definetyping[MP] [\c!option=MP] +\definetyping[PL] [\c!option=PL] +\definetyping[PM] [\c!option=PL] +\definetyping[JS] [\c!option=JS] +\definetyping[JV] [\c!option=JV] +\definetyping[SQL] [\c!option=SQL] +\definetyping[TEX] [\c!option=TEX] +\definetyping[PAS] [\c!option=PAS] +\definetyping[PASCAL][\c!option=PAS] +\definetyping[MOD] [\c!option=PAS] +\definetyping[MODULA][\c!option=PAS] +\definetyping[DELPHI][\c!option=PAS] +\definetyping[EIFFEL][\c!option=EIF] +\definetyping[XML] [\c!option=XML] %D We use the \CONTEXT\ color system for switching to and from %D color mode. We can always redefine these colors afterwards. @@ -938,18 +938,18 @@ %D the standard color switching ones and work ok on a line by %D line basis. %D -%D \starttypen +%D \starttyping %D \def\setupverbatimcolor#1% %D {\edef\prettypalet{\prettyidentifier\getvalue{#1\c!palet}}% %D \def\beginofpretty[##1]{\startcolormode{\prettypalet:##1}}% %D \def\endofpretty {\stopcolormode}} -%D \stoptypen +%D \stoptyping %D %D Since we support a global color too, the folowing %D definition is better: \def\setupverbatimcolor#1% fast and local versus slow and global - {\doifelsevaluenothing{#1\c!kleur} + {\doifelsevaluenothing{#1\c!color} {\def\beginofpretty[##1]{\startcolormode{\prettypalet:##1}}% \let\endofpretty \restorecolormode % \stopcolormode \let\startverbatimcolor \relax @@ -957,9 +957,9 @@ \let\verbatimcolor \relax} {\def\beginofpretty[##1]{\startcolor[\prettypalet:##1]}% \let\endofpretty \stopcolor - \def\startverbatimcolor{\startcolor[\getvalue{#1\c!kleur}]}% + \def\startverbatimcolor{\startcolor[\getvalue{#1\c!color}]}% \let\stopverbatimcolor \stopcolor - \def\verbatimcolor {\getvalue{\getvalue{#1\c!kleur}}}}% + \def\verbatimcolor {\getvalue{\getvalue{#1\c!color}}}}% \doifelsevaluenothing{#1\c!palet} {\let\prettypalet\empty \let\endofpretty\relax @@ -985,7 +985,7 @@ %D %D This gives, as can be expected: %D -%D \haalbuffer +%D \getbuffer %D %D When we want to see some typeset \TEX\ too, we can say: %D @@ -1000,7 +1000,7 @@ %D %D or: %D -%D \haalbuffer +%D \getbuffer %D %D In a similar way: %D @@ -1016,7 +1016,7 @@ %D %D gives: %D -%D \haalbuffer +%D \getbuffer %D %D The next examples sow how we can directly call for natural %D \TEX\ comments: @@ -1024,7 +1024,7 @@ %D \startbuffer %D \setuptyping %D [TEX] -%D [tekst=ja] +%D [text=yes] %D %D \startTEX %D \def\mathematics#1% % usage: \type {\mathematics{x^2}} @@ -1033,7 +1033,7 @@ %D %D \setuptyping %D [SQL] -%D [tekst=ja,palet=,icommando=\bf,vcommando=,ccommando=\it] +%D [text=yes,palet=,icommand=\bf,vcommand=,ccommand=\it] %D %D \startSQL %D select * -- indeed, here we {\em do} select @@ -1043,7 +1043,7 @@ %D %D \setuptyping %D [SQL] -%D [ccommando=\tf\underbar] +%D [ccommand=\tf\underbar] %D %D \startSQL %D select * -- indeed, here we {\em do} select @@ -1056,7 +1056,7 @@ %D %D Now watch: %D -%D \haalbuffer +%D \getbuffer %D %D The natural \TEX\ typesetting was introduced when Tobias %D and Berend started using verbatim \JAVASCRIPT\ and \SQL. @@ -1107,80 +1107,87 @@ \dodotypefile[\v!file][]{#3}% \fi\fi} -\def\dosetuptypelinenumbering#1#2% - {\setuptyping[#1][\c!start=,\c!stop=,\c!stap=,\c!nregels=,#2]% - \doifelsevalue{\??tp#1\c!nummeren}\v!file - {\stelregelnummerenin[\c!methode=\v!file]% +\unprotected \def\dosetuptypelinenumbering#1#2% + {\doifundefined{\??tp#1\c!start}{\setuptyping[#1][\c!start=1,\c!stop=,\c!step=1,\c!nlines=,#2]}% + \doifelsevalue{\??tp#1\c!numbering}\v!file + {\setuplinenumbering[\c!method=\v!file]% \donetrue} - {\doifelsevalue{\??tp#1\c!nummeren}\v!regel - {% \stelregelnummerenin defaults start/step to 1/1, so we need + {\doifelsevalue{\??tp#1\c!numbering}\v!line + {% \setuplinenumbering defaults start/step to 1/1, so we need \doifvaluenothing{\??tp#1\c!start}{\setvalue{\??tp#1\c!start}{1}}% - \doifvaluenothing{\??tp#1\c!stap }{\setvalue{\??tp#1\c!stap }{1}}% - \stelregelnummerenin - [\c!methode=\v!type, + \doifvaluenothing{\??tp#1\c!step }{\setvalue{\??tp#1\c!step }{1}}% + \setuplinenumbering + [\c!method=\v!type, \c!start=\getvalue{\??tp#1\c!start}, - \c!stap=\getvalue{\??tp#1\c!stap}]% + \c!step=\getvalue{\??tp#1\c!step}]% \donetrue} {\donefalse}}% \ifdone - \def\beginofverbatimlines{\startregelnummeren}% - \def\endofverbatimlines {\stopregelnummeren }% + \def\beginofverbatimlines{\startlinenumbering}% + \def\endofverbatimlines {\stoplinenumbering }% \fi} +\setuptyping + [\v!file] + [\c!start=1, + \c!stop=, + \c!step=1, + \c!nlines=] + \def\dodotypefile[#1][#2]#3% - {\getvalue{\??tp#1\c!voor}% + {\getvalue{\??tp#1\c!before}% \doiflocfileelse{#3} - {\startopelkaar % includes \bgroup + {\startpacked % includes \bgroup \dosetuptypelinenumbering{#1}{#2}% - \doifinset{\getvalue{\??tp#1\c!optie}}{\v!commandos,\v!schuin,\v!normaal} - {\setuptyping[#1][\c!optie=\v!geen]}% - \doifvalue{\??tp#1\c!optie}\v!kleur + \doifinset{\getvalue{\??tp#1\c!option}}{\v!commands,\v!slanted,\v!normal} + {\setuptyping[#1][\c!option=\v!none]}% + \doifvalue{\??tp#1\c!option}\v!color {\expandafter\aftersplitstring#3\at.\to\prettyidentifier - \letvalue{\??tp#1\c!optie}\prettyidentifier}% + \letvalue{\??tp#1\c!option}\prettyidentifier}% \initializetyping{#1}% \startverbatimcolor \makelocreadfilename{#3}% - \doifundefinedelse{\??tp#3\v!globaal\c!start} + \doifundefinedelse{\??tp#3\v!global\c!start} {\scratchcounter\zerocount} - {\scratchcounter\getvalue{\??tp#3\v!globaal\c!start}}% + {\scratchcounter\getvalue{\??tp#3\v!global\c!start}}% \advance\scratchcounter\plusone - \setxvalue{\??tp#3\v!globaal\c!start}{\the\scratchcounter}% + \setxvalue{\??tp#3\v!global\c!start}{\the\scratchcounter}% \doifelsevaluenothing{\??tp#1\c!start} {\processfileverbatim\readfilename} - {\doifvalue{\??tp#1\c!start}\v!verder + {\doifvalue{\??tp#1\c!start}\v!continue {\setevalue{\??tp#1\c!start}% - {\getvalue{\??tp#3\v!globaal\c!start}}}% + {\getvalue{\??tp#3\v!global\c!start}}}% \doifelsevaluenothing{\??tp#1\c!stop} - {\doifelsevaluenothing{\??tp#1\c!nregels} + {\doifelsevaluenothing{\??tp#1\c!nlines} {\processfileverbatim\readfilename} {\scratchcounter\getvalue{\??tp#1\c!start}% - \advance\scratchcounter\getvalue{\??tp#1\c!nregels}% + \advance\scratchcounter\getvalue{\??tp#1\c!nlines}% \advance\scratchcounter\minusone - \setxvalue{\??tp#3\v!globaal\c!start}% + \setxvalue{\??tp#3\v!global\c!start}% {\the\scratchcounter}% \processfilelinesverbatim\readfilename {\getvalue{\??tp#1\c!start}} - {\getvalue{\??tp#3\v!globaal\c!start}}}}% + {\getvalue{\??tp#3\v!global\c!start}}}}% {\processfilelinesverbatim\readfilename {\getvalue{\??tp#1\c!start}} {\getvalue{\??tp#1\c!stop }}}}% \stopverbatimcolor - \stopopelkaar} % includes \egroup + \stoppacked} % includes \egroup {\bgroup \expanded{\convertargument#3}\to\ascii \tttf[\makemessage\m!verbatims1\ascii]% \showmessage\m!verbatims1\ascii \egroup}% - \getvalue{\??tp#1\c!na}} + \getvalue{\??tp#1\c!after}} %D \macros %D {filename} %D %D Typesetting filenames in monospaced fonts is possible with %D -%D \starttypen +%D \starttyping %D \filename{here/there/filename.suffix} -%D \stoptypen +%D \stoptyping %D %D The definition is not that spectacular. @@ -1195,4 +1202,4 @@ \def\verbatim#1{\convertargument#1\to\ascii\ascii} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/core-vis.tex b/tex/context/base/core-vis.tex index 81299a8b7..44a3eb37a 100644 --- a/tex/context/base/core-vis.tex +++ b/tex/context/base/core-vis.tex @@ -61,13 +61,13 @@ \dontcomplain \boxrulewidth5\testrulewidth #3#4\relax - \setbox0\normalhbox to \scratchdimen + \setbox\scratchbox\normalhbox to \scratchdimen {#2{\ruledhbox to \scratchdimen {\vrule #5 20\testrulewidth \!!width \zeropoint \normalhss}}}% - \smashbox0 + \smashbox\scratchbox \normalpenalty\!!tenthousand - \box0 + \box\scratchbox \egroup} \def\ruledhanging @@ -75,7 +75,7 @@ \ifnum\hangafter<\zerocount \normalhbox {\boxrulewidth5\testrulewidth - \setbox0\ruledhbox to \hangindent + \setbox\scratchbox\ruledhbox to \hangindent {\scratchdimen\strutht \advance\scratchdimen \strutdp \vrule @@ -83,8 +83,8 @@ \!!height \zeropoint \!!depth -\hangafter\scratchdimen}% \normalhskip-\hangindent - \smashbox0 - \raise\strutht\box0}% + \smashbox\scratchbox + \raise\strutht\box\scratchbox}% \fi \fi} @@ -178,11 +178,11 @@ %D \voorbeeld \noindent %D \voorbeeld \leavevmode %D -%D \startsmaller +%D \startnarrower %D \voorbeeld \indent %D \voorbeeld \noindent %D \voorbeeld \leavevmode -%D \stopsmaller +%D \stopnarrower %D \egroup %D %D These examples also demonstrate the visualization of @@ -214,14 +214,14 @@ \vrule \!!height \testrulewidth \!!depth \testrulewidth - \!!width 120pt} + \!!width 120\points} \normalvfill}% \smashbox\scratchbox \advance\scratchdimen \strutheightfactor\baselineskip \setbox\scratchbox\normalhbox - {\normalhskip -48pt - \normalhbox to 24pt - {\normalhss\debuggertext\ruledbaselines\normalhskip6pt}% + {\normalhskip -48\points + \normalhbox to 24\points + {\normalhss\debuggertext\ruledbaselines\normalhskip6\points}% \raise\scratchdimen\box\scratchbox}% \smashbox\scratchbox \box\scratchbox @@ -260,9 +260,9 @@ %D %D This marked \type{\vbox} shows up as: %D -%D \startregelcorrectie -%D \haalbuffer -%D \stopregelcorrectie +%D \startlinecorrection +%D \getbuffer +%D \stoplinecorrection %D %D The alternative macros are used as: %D @@ -274,9 +274,9 @@ %D %D This is typeset as: %D -%D \startregelcorrectie -%D \haalbuffer -%D \stopregelcorrectie +%D \startlinecorrection +%D \getbuffer +%D \stoplinecorrection %D %D By setting the next macros one can influence the length of %D the marks as well as the horizontal and vertical divisions. @@ -414,7 +414,7 @@ \boxmaxdepth\maxdimen \offinterlineskip \scratchdimen\cutmarklength - \divide\scratchdimen 2 + \divide\scratchdimen \plustwo \hsize\ruledwidth \setbox\scratchbox\normalvbox {\setbox\scratchbox\normalhbox{\horizontalcuts}% @@ -479,9 +479,9 @@ %D This macro is used in the pagebody routine. No other use %D is advocated here. %D -%D \starttypen +%D \starttyping %D \colormarkbox0 -%D \stoptypen +%D \stoptyping \def\colormarkoffset{\cutmarkoffset} \def\colormarklength{\cutmarklength} @@ -514,7 +514,7 @@ {\vss \hbox to 3em {\hss - \localstartcolor[white]% + \localstartcolor[\s!white]% \ifdim##1\points=\zeropoint#1\else##1\fi \localstopcolor \hss}% @@ -526,7 +526,7 @@ \def\colorrangeB {\hbox {\scratchdimen-\colormarklength - \multiply\scratchdimen 2 + \multiply\scratchdimen \plustwo \advance\scratchdimen \ruledwidth \divide\scratchdimen 11 \def\docommando ##1 ##2 ##3##4##5##6% @@ -548,7 +548,7 @@ {\vss \hbox to \scratchdimen {\hss - \localstartcolor[white]% + \localstartcolor[\s!white]% \ifdim##2\points=.5\points##2~\fi##1% \localstopcolor \hss} @@ -585,14 +585,12 @@ \hskip-\scratchdimen \vbox to \colormarklength {\vss - \localstartcolor[white]% + \localstartcolor[\s!white]% \hbox to \scratchdimen{\hss##1\hss} \localstopcolor \vss}% \fi}% - \processcommalist - [1.00,0.95,0.90,0.85,0.80,0.75,0.70,% - 0.60,0.50,0.40,0.30,0.20,0.10,0.00]\docommando}} + \processcommalist[1,.95,.9,.85,.8,.75,.7,.6,.5,.4,.3,.2,.1,0]\docommando}} \def\docolormarkbox#1#2% {\edef\ruledheight{\the\ht#2}% @@ -600,7 +598,7 @@ \edef\ruledwidth {\the\wd#2}% \setbox#2\hbox {\scratchdimen\colormarklength - \divide\scratchdimen 2 + \divide\scratchdimen \plustwo \forgetall \ssxx \setbox\scratchbox\vbox @@ -660,10 +658,10 @@ %D especially \type {\write} is often used in conjunction with %D \type {\edef}, we can only savely support that one in \ETEX. %D -%D \bgroup \showwhatsits \stelkleurenin[status=start] +%D \bgroup \showwhatsits \setupcolors[state=start] %D %D Whatsits show up \color[blue]{in color} and are -%D characterized bij their first character.\voetnoot [some note] +%D characterized bij their first character.\footnote [some note] %D {So we may encounter \type {w}, \type {m} and \type{s}.} %D They are \writestatus{dummy}{demo}\color[yellow]{stacked}. %D @@ -673,7 +671,7 @@ \ifx\eTeXversion\undefined - \let\showwhatsits\relax + \let\showwhatsits \relax \let\dontshowwhatsits\relax \else @@ -722,13 +720,8 @@ \vrule\!!width\wd\scratchbox\dostopcolormode \hskip-\wd\scratchbox\box\scratchbox}% \scratchdimen1ex - \ifdone - \setbox\scratchbox\hbox - {\hskip#4\scratchdimen\box\scratchbox}% - \else - \setbox\scratchbox\hbox - {\raise#4\scratchdimen\box\scratchbox}% - \fi + \setbox\scratchbox\hbox + {\ifdone\hskip\else\raise#4\fi\scratchdimen\box\scratchbox}% \smashbox\scratchbox \ifdone\nointerlineskip\fi \box\scratchbox @@ -753,7 +746,7 @@ \ifhmode \edef\popwhatsit{\kern\the\lastkern}\unkern \else - \edef\popwhatsit{\kern\the\lastkern\prevdepth\the\prevdepth} + \edef\popwhatsit{\kern\the\lastkern\prevdepth\the\prevdepth}% \kern-\lastkern \fi \fi @@ -770,7 +763,7 @@ \ifhmode \edef\popwhatsit{\hskip\the\lastskip}\unskip \else - \edef\popwhatsit{\vskip\the\lastskip\prevdepth\the\prevdepth} + \edef\popwhatsit{\vskip\the\lastskip\prevdepth\the\prevdepth}% \vskip-\lastskip \fi \fi} @@ -809,7 +802,7 @@ \startoverlay {\copy\scratchbox} {\dodotagbox{#1}\scratchbox{\framed - [\c!achtergrond=\v!raster,\c!achtergrondraster=1]{#2}}} + [\c!background=\v!screen,\c!backgroundscreen=1]{#2}}} \stopoverlay \egroup \nextboxwd\the\wd\scratchbox @@ -834,9 +827,9 @@ \def\coloredbox#1% {\dowithnextbox{#1{\hbox - {\blackrule[\c!breedte=\nextboxwd,\c!hoogte=\nextboxht,\c!diepte=\zeropoint,\c!kleur=boxcolor:ht]% + {\blackrule[\c!width=\nextboxwd,\c!height=\nextboxht,\c!depth=\zeropoint,\c!color=boxcolor:ht]% \hskip-\nextboxwd - \blackrule[\c!breedte=\nextboxwd,\c!hoogte=\zeropoint,\c!diepte=\nextboxdp,\c!kleur=boxcolor:dp]% + \blackrule[\c!width=\nextboxwd,\c!height=\zeropoint,\c!depth=\nextboxdp,\c!color=boxcolor:dp]% \hskip-\nextboxwd \box\nextbox}}}#1} @@ -845,6 +838,6 @@ \def\coloredvtop{\coloredbox\vtop} \def\coloredstrut - {\color[strutcolor]{\def\strutwidth{2pt}\setstrut\strut}} + {\color[strutcolor]{\def\strutwidth{2\points}\setstrut\strut}} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/enco-acc.tex b/tex/context/base/enco-acc.tex index 1082b4501..b8b0ff40a 100644 --- a/tex/context/base/enco-acc.tex +++ b/tex/context/base/enco-acc.tex @@ -130,4 +130,4 @@ \stopencoding -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/enco-cyr.tex b/tex/context/base/enco-cyr.tex index 8a91f0380..731d31b8c 100644 --- a/tex/context/base/enco-cyr.tex +++ b/tex/context/base/enco-cyr.tex @@ -240,14 +240,14 @@ \definecharacter sectionmark 159 \definecharacter quotedbl 34 -\definecharacter quoteleft 96 +\definecharacter quoteleft 96 \definecharacter upperleftsingleninequote 39 -\definecharacter quotedblleft 16 -\definecharacter quotedblright 17 +\definecharacter quotedblleft 16 +\definecharacter quotedblright 17 \definecharacter lowerleftdoubleninequote 189 -\definecharacter upperrightdoublesixquote 16 -\definecharacter upperrightdoubleninequote 17 -\definecharacter quotedblbase 189 +\definecharacter upperrightdoublesixquote 16 +\definecharacter upperrightdoubleninequote 17 +\definecharacter quotedblbase 189 \definecharacter cyrillicpalochka 13 \definecharacter cyrilliclangle 14 @@ -633,7 +633,7 @@ \definecharacter textogonek 12 \definecharacter textcyrillicflex 18 -\definecharacter textdblgrave 19 +\definecharacter textdblgrave 19 \definecharacter textcyrillicbreve 20 \definecharacter endash 21 @@ -648,16 +648,16 @@ \definecharacter textasciitilde 126 \definecharacter textnumero 157 \definecharacter textcurrency 158 -\definecharacter sectionmark 159 -\definecharacter quotedbl 34 -\definecharacter quoteleft 96 +\definecharacter sectionmark 159 +\definecharacter quotedbl 34 +\definecharacter quoteleft 96 \definecharacter upperleftsingleninequote 39 -\definecharacter quotedblleft 16 -\definecharacter quotedblright 17 +\definecharacter quotedblleft 16 +\definecharacter quotedblright 17 \definecharacter lowerleftdoubleninequote 189 -\definecharacter upperrightdoublesixquote 16 -\definecharacter upperrightdoubleninequote 17 -\definecharacter quotedblbase 189 +\definecharacter upperrightdoublesixquote 16 +\definecharacter upperrightdoubleninequote 17 +\definecharacter quotedblbase 189 \definecharacter cyrillicpalochka 13 \definecharacter cyrilliclangle 14 @@ -823,19 +823,19 @@ \startcoding[x2] -\definecharacter textgrave 0 -\definecharacter textacute 1 -\definecharacter textcircumflex 2 -\definecharacter texttilde 3 -\definecharacter textdiaeresis 4 -\definecharacter texthungarumlaut 5 -\definecharacter textring 6 -\definecharacter textcaron 7 -\definecharacter textbreve 8 -\definecharacter textmacron 9 -\definecharacter textdotaccent 10 -\definecharacter textcedilla 11 -\definecharacter textogonek 12 +\definecharacter textgrave 0 +\definecharacter textacute 1 +\definecharacter textcircumflex 2 +\definecharacter texttilde 3 +\definecharacter textdiaeresis 4 +\definecharacter texthungarumlaut 5 +\definecharacter textring 6 +\definecharacter textcaron 7 +\definecharacter textbreve 8 +\definecharacter textmacron 9 +\definecharacter textdotaccent 10 +\definecharacter textcedilla 11 +\definecharacter textogonek 12 \definecharacter endash 21 \definecharacter emdash 22 @@ -855,7 +855,7 @@ \definecharacter textnumero 157 \definecharacter textcurrency 158 \definecharacter textsection 159 -\definecharacter sectionmark 159 +\definecharacter sectionmark 159 \definecharacter textquotedbl 34 \definecharacter cyrillicpalochka 13 @@ -867,13 +867,13 @@ \definecharacter upperleftsinglesixquote 96 \definecharacter upperleftsingleninequote 39 -\definecharacter upperleftdoublesixquote 16 +\definecharacter upperleftdoublesixquote 16 \definecharacter upperleftdoubleninequote 17 \definecharacter lowerleftdoubleninequote 189 \definecharacter upperrightsinglesixquote 96 \definecharacter upperrightsingleninequote 39 -\definecharacter upperrightdoublesixquote 16 +\definecharacter upperrightdoublesixquote 16 \definecharacter upperrightdoubleninequote 17 \definecharacter lowerrightdoubleninequote 189 @@ -1163,7 +1163,7 @@ \definecharacter textnumero 252 \definecharacter leftguillemot 253 \definecharacter rightguillemot 254 -\definecharacter quotedblbase 255 +\definecharacter quotedblbase 255 \stopcoding diff --git a/tex/context/base/enco-def.tex b/tex/context/base/enco-def.tex index a0d56c674..422c52826 100644 --- a/tex/context/base/enco-def.tex +++ b/tex/context/base/enco-def.tex @@ -458,4 +458,12 @@ \stopencoding -\endinput \ No newline at end of file +% \startencoding [default] + +% \definecommand prime {\mathematics{'}} +% \definecommand doubleprime {\mathematics{''}} +% \definecommand tripleprime {\mathematics{'''}} + +% \stopencoding + +\endinput diff --git a/tex/context/base/enco-ec.tex b/tex/context/base/enco-ec.tex index a31fb6fe1..329558f57 100644 --- a/tex/context/base/enco-ec.tex +++ b/tex/context/base/enco-ec.tex @@ -45,19 +45,19 @@ %D that is, they are normally not part of fonts, unless %D explicitly constructed. %D -%D \startopsomming[columns,two] -%D \som \type{\dotlessj} -%D \som \type{\IJligature} -%D \som \type{\ijligature} -%D \som \type{\Ssharp} -%D \som \type{\perthousand} -%D \som \type{\compoundwordmark} -% %D \som \type{\textvisiblespace} -% %D \som \type{\tcaron} -% %D \som \type{\tcedilla } -% %D \som \type{\Tcedilla} -% %D \som \type{\ydiaeresis} -%D \stopopsomming +%D \startitemize[columns,two] +%D \item \type{\dotlessj} +%D \item \type{\IJligature} +%D \item \type{\ijligature} +%D \item \type{\Ssharp} +%D \item \type{\perthousand} +%D \item \type{\compoundwordmark} +% %D \item \type{\textvisiblespace} +% %D \item \type{\tcaron} +% %D \item \type{\tcedilla } +% %D \item \type{\Tcedilla} +% %D \item \type{\ydiaeresis} +%D \stopitemize %D So, for the moment we nil them; we can always create %D another vector if needed. diff --git a/tex/context/base/enco-ecm.tex b/tex/context/base/enco-ecm.tex index 5fbbe1c8c..b74473960 100644 --- a/tex/context/base/enco-ecm.tex +++ b/tex/context/base/enco-ecm.tex @@ -14,9 +14,9 @@ %D The next typescript removes a few problematic characters %D from the ec encoding vector. So, in case of troubles, say %D -%D \starttypen +%D \starttyping %D \useencoding[ecm] % ec minus -%D \stoptypen +%D \stoptyping \startencoding[ec][ec] diff --git a/tex/context/base/enco-fde.tex b/tex/context/base/enco-fde.tex index 93c395f0f..7a3e533cb 100644 --- a/tex/context/base/enco-fde.tex +++ b/tex/context/base/enco-fde.tex @@ -120,4 +120,4 @@ \stoplanguagespecifics \stopencoding -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/enco-ffr.tex b/tex/context/base/enco-ffr.tex index a18e3c94e..012d572ee 100644 --- a/tex/context/base/enco-ffr.tex +++ b/tex/context/base/enco-ffr.tex @@ -11,6 +11,11 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% \definehspace[fr][:][.25em] +% \definehspace[fr][;][.25em] +% \definehspace[fr][!][.25em] +% \definehspace[fr][?][.25em] + \enablemode[activecolon] \usemodule[tryout] % for the moment \unprotect @@ -33,4 +38,4 @@ % \def\iere {\highordinalstr{re}} % \def\ieres{\highordinalstr{res}} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex index be9cea913..ef07c418f 100644 --- a/tex/context/base/enco-ini.tex +++ b/tex/context/base/enco-ini.tex @@ -37,26 +37,26 @@ %D While dealing with input (the text source) and output (the %D glyphs), encoding comes into view. To summarize a few: %D -%D \startopsomming -%D \som Bytes in the input file are mapped to an internal +%D \startitemize +%D \item Bytes in the input file are mapped to an internal %D representation. An~\type {a} often stays an~\type {a}, %D but~\type {\"e} can become either one code or become %D two codes (ending in overlapping glyphs). -%D \som Characters can be made active and mapped onto another +%D \item Characters can be made active and mapped onto another %D character. -%D \som When changing case, characters are mapped onto +%D \item When changing case, characters are mapped onto %D themselves, their case||counterpart or a reasonable %D alternative, like~\"e onto~e. -%D \som Single character representations in a \DVI\ file can +%D \item Single character representations in a \DVI\ file can %D be mapped onto one or more characters, either of not %D in more than one font file (virtual fonts). -%D \som In the final format, fonts collections can be +%D \item In the final format, fonts collections can be %D partially embedded, thereby losing the one||to||one %D relation between several instances of one font. -%D \som For special purposes, individual characters should be +%D \item For special purposes, individual characters should be %D mapped onto a dedicated encoding vector, for instance %D \PDF\ document encoding. -%D \stopopsomming +%D \stopitemize %D %D These and other kind of mappings are to be dealt with, and %D the exact way of dealing often depends on the language to be @@ -195,13 +195,13 @@ %D the decimal number of the character is passed as first %D argument. %D -%D \starttypen +%D \starttyping %D \def\decimalcharacter#1{\message{#1 is now active}} %D %D \defineactivedecimal 122 {\decimalcharacter} %D %D \defineactivedecimals 128 to 255 as {\decimalcharacter} -%D \stoptypen +%D \stoptyping %D %D This command is typically used in coding definitions, %D like the \UNICODE\ one. @@ -322,7 +322,7 @@ %D mechanism to define mappings. The first real application %D of this command was: %D -%D \starttypen +%D \starttyping %D \startmapping [something] %D \definecasemap 165 181 165 %D \definecasemap 171 187 171 @@ -332,7 +332,7 @@ %D \definelowercasecom \AE \ae %D ... %D \stopmapping -%D \stoptypen +%D \stoptyping %D %D So, character 165 becomes 181 in uppercase and 165 in %D lowercase. A mapping is activated with \type {\enablemapping}. @@ -369,11 +369,11 @@ %D This can be used like: %D -%D \starttypen +%D \starttyping %D \definecasemaps 128 to 156 lc 32 uc 0 %D \definecasemaps 160 to 188 lc -32 uc 0 %D \definecasemaps 192 to 255 lc 32 uc 0 -%D \stoptypen +%D \stoptyping %D %D and saves a lot of typing (copying). @@ -502,17 +502,17 @@ %D called for by sequences like \type{\"e}. Here the \type{\"} %D is defined as: %D -%D \starttypen +%D \starttyping %D \def\"#1{{\accent"7F #1}} -%D \stoptypen +%D \stoptyping %D %D This macro places the accent \accent"7F {} on top of an~e %D gives \"e. Some fonts however can have prebuild accents and %D use a more direct approach like %D -%D \starttypen +%D \starttyping %D \def\"#1{\if#1e\char 235\else ... \fi} -%D \stoptypen +%D \stoptyping %D %D The latter approach is not used in \CONTEXT, because we %D store relevant combinations of accents and characters in @@ -521,7 +521,7 @@ %D We define character substitutes and commands with definition %D commands like: %D -%D \starttypen +%D \starttyping %D \startcoding[texnansi] %D %D \defineaccent " a 228 @@ -535,7 +535,7 @@ %D \definecommand c \texnansiencodedc %D %D \stopcoding -%D \stoptypen +%D \stoptyping %D %D The last argument of \type{\defineaccent} and %D \type{\definecharacter} tells \TEX\ the position of the @@ -656,9 +656,9 @@ %D Yet another definition concerns sorting of indexes and %D lists. %D -%D \starttypen +%D \starttyping %D \definesortkey {\'e} {e} {a} {\'e} -%D \stoptypen +%D \stoptyping %D %D The first argument denotes the string to be treated. The %D second argument is the raw replacement, while the third @@ -814,14 +814,28 @@ %\redefinecommand #1 % just to be sure \setvalue{\commandprefix\characterencoding\string#1}{#2}} +% %D This one is needed in order to prevent problems with math (see \type +% %D {\over} in dutch interface). This became a problem one when going +% %D low level english. + +% \def\doifdefinedascommandelse#1% +% {\bgroup +% \convertargument\dohandlecommand{#1}\to\asciiA +% \@EAEAEA\convertargument\csname#1\endcsname\to\asciiB +% \ifx\asciiA\asciiB +% \egroup\expandafter\firstoftwoarguments +% \else +% \egroup\expandafter\secondoftwoarguments +% \fi} + %D Here we see that redefining accents is characters is more %D or less the same as redefining commands. We also could have %D said: %D -%D \starttypen +%D \starttyping %D \def\defineaccent#1 #2 {\definecommand#1\string#2 \char} %D \def\definecharacter#1 {\definecommand#1 \char} -%D \stoptypen +%D \stoptyping % obsolete % @@ -837,12 +851,12 @@ % %D % %D Accents or accent generating commands are redefined by: % %D -% %D \starttypen +% %D \starttyping % %D \redefineaccent ' % grave % %D \redefineaccent " % diaeresis % %D \redefineaccent ^ % circumflex % %D \redefineaccent v % caron -% %D \stoptypen +% %D \stoptyping % %D % %D The original \PLAIN\ \TEX\ meaning of each accent generating % %D command is saved first. Next these commands are redefined to @@ -871,7 +885,7 @@ %D When needed, one can overload the default positions of the %D accents. The \PLAIN\ \TEX\ defaults are: %D -%D \starttypen +%D \starttyping %D \defineaccentcommand ` 18 %D \defineaccentcommand ' 19 %D \defineaccentcommand v 20 @@ -882,7 +896,7 @@ %D \defineaccentcommand H 125 % "7D %D \defineaccentcommand ~ 126 % "7E %D \defineaccentcommand " 127 % "7F -%D \stoptypen +%D \stoptyping \def\defineaccentcommand {\protectfontcharacters @@ -961,10 +975,10 @@ %D Redefinition of encoding dependant commands like \type{\b} %D and \type{\c} can be triggered by: %D -%D \starttypen +%D \starttyping %D \redefinecommand b % something math %D \redefinecommand c % something math -%D \stoptypen +%D \stoptyping %D %D Handling of characters is easier than handling accents %D because here we don't have to take care of arguments. We @@ -1013,10 +1027,10 @@ % %D in that they are to be presented as they are, are redefined % %D by % %D -% %D \starttypen +% %D \starttyping % %D \redefinecharacter ae % ae % %D \redefinecharacter cc % ccedilla -% %D \stoptypen +% %D \stoptyping % %D % %D To keep things simple, we just copy this command: % @@ -1042,19 +1056,19 @@ %D a few macros that show most of the characters involved. The %D next two tables show the result of \type {\showaccents}. %D -%D \plaatstabel +%D \placetable %D {The special glyphs in default encoding.} %D {\showaccents} %D -%D \plaatstabel +%D \placetable %D {The special glyphs in texnansi encoding.} %D {\switchtobodyfont[lbr]\showaccents} %D %D The command %D -%D \starttypen +%D \starttyping %D \showhyphenations{doordefini\"eren} -%D \stoptypen +%D \stoptyping %D %D can be used to check the correct loading of hyphenation %D patterns. @@ -1091,8 +1105,9 @@ \appendtoks\let\remapcase\remaplowercase\the\everyULmap\to\everylowercase \let\remapcase\gobbletwoarguments -\def\remapuppercase#1#2{\let#2#1} -\def\remaplowercase#1#2{\let#1#2} + +\def\remapuppercase#1#2{\let#2#1} % more efficient: +\def\remaplowercase#1#2{\let#1#2} \let\remaplowercase\let \def\defineLCcharacter #1 #2 % {\appendtoks\let\to\everylowercase @@ -1109,7 +1124,7 @@ \@EA\appendtoks\csname#1\endcsname\to\everyULmap \@EA\appendtoks\csname#2\endcsname\to\everyULmap} -% slightly faster with \kap's but far more hash and stringspace +% slightly faster with \smallcapped's but far more hash and stringspace % % \newif\ifuppercase \appendtoks\uppercasetrue\to\everyuppercase % \newif\iflowercase \appendtoks\lowercasetrue\to\everylowercase @@ -1138,20 +1153,20 @@ \ifx\obeylccodes\undefined -\def\obeylccodes - {\scratchcounter32 - \loop - \ifnum\scratchcounter<127 - \lccode\scratchcounter\scratchcounter - \advance\scratchcounter \plusone - \repeat - \ifeightbitcharacters - \scratchcounter128 + \def\obeylccodes + {\scratchcounter32 \loop - \ifnum\scratchcounter<255 - \lccode\scratchcounter`. + \ifnum\scratchcounter<127 + \lccode\scratchcounter\scratchcounter \advance\scratchcounter \plusone \repeat + \ifeightbitcharacters + \scratchcounter128 + \loop + \ifnum\scratchcounter<255 + \lccode\scratchcounter`. + \advance\scratchcounter \plusone + \repeat \fi} \fi @@ -1488,4 +1503,4 @@ \setupencoding[\s!default=ec] % was: [\s!default=\s!default] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/enco-pdf.tex b/tex/context/base/enco-pdf.tex index 6b153351b..f6d5b2265 100644 --- a/tex/context/base/enco-pdf.tex +++ b/tex/context/base/enco-pdf.tex @@ -93,4 +93,4 @@ \stopencoding -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/enco-pfr.tex b/tex/context/base/enco-pfr.tex index ab6d961e8..ee9857a0e 100644 --- a/tex/context/base/enco-pfr.tex +++ b/tex/context/base/enco-pfr.tex @@ -21,7 +21,7 @@ %D load the encoding and then the font; previous font %D definitions are left untouched.) %D -%D \starttypen +%D \starttyping %D % output=pdftex interface=en %D %D \useencoding[pfr] @@ -31,7 +31,7 @@ %D test \`z \'z \bf test \sl test \bs quite funny \`z \page %D test \`z \'z \bf test \sl test \bs quite funny \`z \page %D \stoptext -%D \stoptypen +%D \stoptyping %D %D We do our best to include a (often large) font resources %D only once. The current implementation is not that @@ -57,11 +57,11 @@ %D macro defined with \type {\pdffontfileresource} can have %D three states: %D -%D \startopsomming[opelkaar] -%D \som undefined: not yet loaded, and not yet included -%D \som some value: loaded, but not yet included -%D \som empty: loaded, and already included -%D \stopopsomming +%D \startitemize[packed] +%D \item undefined: not yet loaded, and not yet included +%D \item some value: loaded, but not yet included +%D \item empty: loaded, and already included +%D \stopitemize \def\pdffontresource {pdfr:\currentencoding} \def\pdffontfileresource{pdff:\pdffontresource} @@ -70,7 +70,7 @@ %D The following \PDF\ code is composed by Ondrej Koala Vacha (I %D probably mispelled this name). %D -%D \starttypen +%D \starttyping %D \startpdffontresource[il2] %D /CIDInit /ProcSet findresource begin %D 12 dict begin @@ -95,17 +95,17 @@ %D CMapName currentdict /CMap defineresource pop end %D end %D \stoppdffontresource -%D \stoptypen +%D \stoptyping %D %D We don't preload such huge definitions, and process them %D run||time to save memory. Therefore, in the encoding %D vector, we only add an entry like: %D -%D \starttypen +%D \starttyping %D \startencoding [il2] %D \usepdffontresource il2 %D \stopencoding -%D \stoptypen +%D \stoptyping %D %D This macro is defined as follows. diff --git a/tex/context/base/enco-pol.tex b/tex/context/base/enco-pol.tex index 353b5ef7b..f3b2e0e25 100644 --- a/tex/context/base/enco-pol.tex +++ b/tex/context/base/enco-pol.tex @@ -252,4 +252,4 @@ \stopencoding -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/enco-qx.tex b/tex/context/base/enco-qx.tex index f9b125ad8..7baa6269a 100644 --- a/tex/context/base/enco-qx.tex +++ b/tex/context/base/enco-qx.tex @@ -11,6 +11,21 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% to be done + +% 35 numbersign +% 95 dotaccent +% 132 greaterequal +% 133 approxequal +% 137 lessequal +% 142 ell +% 156 IJ +% 173 infinity +% 182 threequartersemdash +% 188 ij +% 247 anglearc +% 248 diameter + \startmapping[qx] % to be done \definecasemaps 160 to 188 lc +32 uc 0 @@ -41,8 +56,8 @@ \definecharacter emdash 124 \definecharacter aeligature 26 -\definecharacter AEligature 27 -\definecharacter oeligature 29 +\definecharacter AEligature 29 +\definecharacter oeligature 27 \definecharacter OEligature 30 \definecharacter ssharp 25 @@ -204,4 +219,4 @@ \stopencoding -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/enco-run.tex b/tex/context/base/enco-run.tex index b88c4111a..976980aaf 100644 --- a/tex/context/base/enco-run.tex +++ b/tex/context/base/enco-run.tex @@ -34,9 +34,9 @@ \gdef\showaccents {\bgroup \savefont - \setuptextrules[\c!korps=,\c!letter=] + \setuptextrules[\c!bodyfont=,\c!style=] \starttextrule{\visualizecharacterslegend} - \witruimte + \whitespace \restorefont\setupinterlinespace \visualizecharacters \def\do##1% @@ -62,9 +62,9 @@ \gdef\showcharacters {\bgroup \savefont - \setuptextrules[\c!korps=,\c!letter=] + \setuptextrules[\c!bodyfont=,\c!style=] \starttextrule{\visualizecharacterslegend} - \witruimte + \whitespace \dontcomplain \forgetall \def\startencoding[##1]{} @@ -84,7 +84,7 @@ \divide \dimen0 by \dimen2 \advance\dimen0 1sp \edef\enccols{\number\dimen0} \visualizecharacters - \startcolumns[\c!n=\enccols,\c!afstand=2em] + \startcolumns[\c!n=\enccols,\c!distance=2em] \restorefont\setupinterlinespace \def\definecharacter ##1 ##2 % {\setbox0=\hbox to \hsize{\localcolortrue\hbox to \encwidth{\getvalue{##1}\hss}\tttf##1}% diff --git a/tex/context/base/filt-ini.tex b/tex/context/base/filt-ini.tex index fbc46a518..ec4fa257b 100644 --- a/tex/context/base/filt-ini.tex +++ b/tex/context/base/filt-ini.tex @@ -8,72 +8,72 @@ %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 Filter Macros (ini)} -\ifx\OmegaVersion\undefined +% \ifx\OmegaVersion\undefined - \let\definefiltersynonym \gobbledoubleempty - \let\definefiltersequence \gobbledoubleempty -\unexpanded\def\usefiltersequence {\gobblesingleempty} - \let\usefilter \gobblesingleempty - \let\truefiltername \gobbleoneargument +% \let\definefiltersynonym \gobbledoubleempty +% \let\definefiltersequence \gobbledoubleempty +% \unexpanded\def\usefiltersequence {\gobblesingleempty} +% \let\usefilter \gobblesingleempty +% \let\truefiltername \gobbleoneargument - \expandafter \endinput -\fi +% \expandafter \endinput +% \fi \unprotect -%D The real work starts here. +%D The real work starts here. -\startmessages dutch library: filters +\startmessages dutch library: filters title: filter 1: filter -- wordt geladen 2: onbekend filter -- \stopmessages -\startmessages english library: filters +\startmessages english library: filters title: filter 1: filter -- is loaded 2: unknown filter -- \stopmessages -\startmessages german library: filters +\startmessages german library: filters title: filter 1: filter -- is loaded 2: unknown filter -- \stopmessages -\startmessages czech library: filters +\startmessages czech library: filters title: filter 1: filter -- is loaded 2: unknown filter -- \stopmessages -\startmessages italian library: filters +\startmessages italian library: filters title: filtri 1: filtro -- caricato 2: filtro sconosciuto -- \stopmessages -%D \macros +%D \macros %D {definefiltersynonym} -\def\definefiltersynonym% +\def\definefiltersynonym {\dodoubleargument\dodefinefiltersynonym} \def\dodefinefiltersynonym[#1][#2]% {\setvalue{\??or#1}{#2}} -%D \macros +%D \macros %D {truefiltername} \def\truefiltername#1% {\ifundefined{\??or#1}#1\else\truefiltername{\getvalue{\??or#1}}\fi} -%D \macros +%D \macros %D {definefiltersequence} \def\definefiltersequence% @@ -82,38 +82,61 @@ \def\dodefinefiltersequence[#1][#2]% {\setvalue{\??ot#1}{#2}} -%D \macros +%D \macros %D {usefiltersequence} +%D \def\magicocpnumber{1} +% \def\dodousefiltersequence#1% +% {\expandafter\ocp\csname\??or:#1\endcsname=\truefiltername{#1}\relax +% \@EA \appendtoks +% \@EA \addbeforeocplist \@EA \magicocpnumber \csname\??or:#1\endcsname +% \to \scratchtoks} + +% one can do: +% +% \definefiltersequence +% [farsi] +% [utf8 to unicode16=>5, +% persian fix, +% arabic analysis=>3, +% arabic glyphs] +% +% so, => is used to signal a priority + \def\dodousefiltersequence#1% {\expandafter\ocp\csname\??or:#1\endcsname=\truefiltername{#1}\relax - \@EA \appendtoks - \@EA \addbeforeocplist \@EA \magicocpnumber \csname\??or:#1\endcsname - \to {\toks0}} + \splitstring#1\at=>\to\!!stringa\and\!!stringb + \edef\!!stringb{\number\ifx\!!stringb\empty\magicocpnumber\else\!!stringb\fi}% + \appendetoks + \noexpand\addbeforeocplist + \!!stringb\space + \expandafter\noexpand\csname\??or:\!!stringa\endcsname + \to \scratchtoks} \unexpanded\def\usefiltersequence[#1]% {\edef\currentfiltersequence{\getvalue{\??ot#1}}% - \toks0=\emptytoks + \scratchtoks\emptytoks \processcommacommand[\currentfiltersequence]\dodousefiltersequence - \expanded{\ocplist\csname\??ot:#1\endcsname=\the\toks0}\nullocplist + % \showthe\scratchtoks + \expanded{\ocplist\csname\??ot:#1\endcsname=\the\scratchtoks}\nullocplist \expanded{\pushocplist\csname\??ot:#1\endcsname}\relax} -%D \macros +%D \macros %D {usefilter} \def\dousefilter#1% {\doifundefined{\c!file\f!filterprefix#1}% - {\setvalue{\c!file\f!filterprefix#1}{}% + {\letvalue{\c!file\f!filterprefix#1}\empty \makeshortfilename[\f!filterprefix#1]% \startreadingfile - \readsysfile{\shortfilename} - {\showmessage{\m!filters}{1}{#1}} - {\showmessage{\m!filters}{2}{#1}}% + \readsysfile\shortfilename + {\showmessage\m!filters1{#1}} + {\showmessage\m!filters2{#1}}% \stopreadingfile}} \def\usefilter[#1]% {\processcommalist[#1]\dousefilter} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/font-arb.tex b/tex/context/base/font-arb.tex index d468f6c28..59b7d6ca5 100644 --- a/tex/context/base/font-arb.tex +++ b/tex/context/base/font-arb.tex @@ -1,15 +1,3 @@ -% NOT YET ADAPTED TO THE NEW FONT MACROS - -% I still need to hook in some features into the setup -% macro. I also have to (re)define farsi etc. in ways -% similar to arab, so that we have dedicated environments. -% -% keywords needed: vocalize transscribe -% -% \startarabic[option=vocalize] % or vocalize=yes -% ...... -% \stoparabic - %D \module %D [ file=font-arb, %D version=1999.11.06, @@ -20,12 +8,25 @@ %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. + +% NOT YET ADAPTED TO THE NEW FONT MACROS + +% I still need to hook in some features into the setup +% macro. I also have to (re)define farsi etc. in ways +% similar to arab, so that we have dedicated environments. +% +% keywords needed: vocalize transscribe +% +% \startarabic[option=vocalize] % or vocalize=yes +% ...... +% \stoparabic + \writestatus{loading}{Context Font Macros / ArabTeX support} -%D At the \NTG\ 10\hoog{th} anniversary meeting Klaus Lagally +%D At the \NTG\ 10\high{th} anniversary meeting Klaus Lagally %D introduced the audience to arabic typesetting, and after %D that I knew that some day I really had to look into his %D generic package. And then, sort of simultaniously Maarten @@ -35,40 +36,40 @@ %D Having implemented support for chinese a few weeks before, %D I could not resist to build in support for arab and hebrew %D too. Writing support for languages that don't give me any -%D cue on how to pronounce their script, is kind of special. +%D cue on how to pronounce their script, is kind of special. -%D This is a beta version, since I still have to take care of some -%D macros that conflict with existing stuff. +%D This is a beta version, since I still have to take care of some +%D macros that conflict with existing stuff. -\unprotect +\unprotect \definesystemvariable{ARABTEX} %D A few (maybe too) simple hooks into the font mechanism. The -%D hook into the language module is not yet done. +%D hook into the language module is not yet done. \unexpanded\def\setarabicfont#1% {\scratchdimen=1.2\bodyfontsize \font\arbfont=\truefontname{Arabic#1} at \currentfontscale\scratchdimen -\setx@skels -\newfonttrue + \setx@skels + \newfonttrue \arbfont} -%D Just to be compatible with Arab\TEX\ we define: +%D Just to be compatible with Arab\TEX\ we define: \unexpanded\def\nash {\setarabicfont\s!Regular} -\unexpanded\def\nashbf {\setarabicfont\s!Bold } +\unexpanded\def\nashbf {\setarabicfont\s!Bold } \unexpanded\def\pnash {\setarabicfont\s!Regular} -\unexpanded\def\pnashbf {\setarabicfont\s!Bold } +\unexpanded\def\pnashbf {\setarabicfont\s!Bold } \unexpanded\def\xnash {\setarabicfont\s!Regular} -\unexpanded\def\xnashbf {\setarabicfont\s!Bold } +\unexpanded\def\xnashbf {\setarabicfont\s!Bold } -%D The display arabic environment (will be an installable -%D object) uses a few conditionals. Let's do it the +%D The display arabic environment (will be an installable +%D object) uses a few conditionals. Let's do it the %D \CONTEXT\ way and define an anvironment that we later can -%D adapt. +%D adapt. -\newif\if@ignore +\newif\if@ignore \newif\if@endpe \def\setupARABTEXalternative[#1]% @@ -81,24 +82,24 @@ {\iffirstargument % \startarab is defined but used already \getparameters [\??ARABTEX#1] - [\c!voor=,\c!na=,\c!binnen=\setarab, - \c!letter=\setarabfont{Arabic\fontstylesuffix}, % evt ArabicRegular + [\c!before=,\c!after=,\c!inner=\setarab, + \c!style=\setarabfont{Arabic\fontstylesuffix}, % evt ArabicRegular #2]% \expandafter\all@wcmd\csname\e!stop#1\endcsname \setvalue{\e!start#1}% {\dodoubleempty\dostartARABTEXalternative[#1]}% \unexpanded\setvalue{#1}##1% - {{\initializeARABTEXinternals{#1}\a@RL{##1}}}% + {{\initializeARABTEXinternals{#1}\a@RL{##1}}}% \unexpanded\def\RL{\getvalue{#1}}% \unexpanded\def\LR{\a@LR}% - \let\R=\RL + \let\R=\RL \let\L=\LR \else \defineARABTEXalternative[arabic]% \fi} \def\initializeARABTEXinternals#1% - {\getvalue{\??ARABTEX#1\c!binnen}% + {\getvalue{\??ARABTEX#1\c!inner}% \let \\=\ARABTEXbreakA \let \|=\ARABTEXbreakB \let \cap=\ARABTEXcap @@ -107,17 +108,17 @@ \let \d=\ARABTEXd \let |=\ARABTEXbar \let \,=\ARABTEXcomma - \let\protect=\ARABTEXprotect + \let\protect=\ARABTEXprotect \let\normaltx \tx \def\tx {\normaltx \setarabicfont\fontstylesuffix}% \let\normaltxx\txx\def\txx{\normaltxx\setarabicfont\fontstylesuffix}} -\def\dostartARABTEXalternative[#1][#2]% +\def\dostartARABTEXalternative[#1][#2]% {\begingroup \getparameters[\??ARABTEX#1][#2]% \ifnum1<0\getvalue{\??ARABTEX#1\c!n}\relax - \startkolommen + \startcolumns \else - \getvalue{\??ARABTEX#1\c!voor}% + \getvalue{\??ARABTEX#1\c!before}% \fi \initializeARABTEXinternals{#1}% \initializeARABTEXend{#1}% @@ -125,44 +126,44 @@ \initializeARABTEXalternative{#1}} \def\initializeARABTEXalternative#1% - {\getvalue{\??ARABTEX#1\c!letter}} + {\getvalue{\??ARABTEX#1\c!style}} -\def\initializeARABTEXend#1% \CONTEXT\ does use \end quite differently +\def\initializeARABTEXend#1% \CONTEXT\ does use \end quite differently {\long\def\end##1% {\endarabtext \ifnum1<0\getvalue{\??ARABTEX#1\c!n}\relax - \stopkolommen + \stopcolumns \else - \getvalue{\??ARABTEX#1\c!na}% + \getvalue{\??ARABTEX#1\c!after}% \fi \endgroup}% - \let\a@l@end\end + \let\a@l@end\end \letvalue{\e!stop#1}=\end \long\def\end##1% {\endarabtext \endgroup \if@ignore\global\@ignorefalse\expandafter\ignorespaces\fi}} -%D Arabic verbatim. +%D Arabic verbatim. -\def\typearab{\a@@verb} +\def\typearab{\a@@verb} %D Some \LATEX\ macros. \def \makeatletter {\unprotect} -\def \makeatother {\protect} +\def \makeatother {\protect} \def \typeout #1{\writestatus{arabtex}{#1}} %D We have to save some macros. \let\ARABTEXversion=\empty -\def\startloadingARABTEX% ugly hacks - {\catcode`!=12 - \catcode`?=12 +\def\startloadingARABTEX% ugly hacks + {\catcode`!=12 + \catcode`?=12 \pushmacro\output \let \output \scratchtokens - \pushmacro\LaTeX \let \LaTeX \undefined - \pushmacro\CJK \let \CJK \undefined + \pushmacro\LaTeX \let \LaTeX \undefined + \pushmacro\CJK \let \CJK \undefined \pushmacro\year \let \year \normalyear \pushmacro\month \let \month \normalmonth \pushmacro\day \let \day \normalday @@ -175,11 +176,11 @@ \pushmacro\cap} \def\stoploadingARABTEX% - {\catcode`!=11 - \catcode`?=11 + {\catcode`!=11 + \catcode`?=11 \popmacro\cap \popmacro\emphasize - \popmacro\theversion + \popmacro\theversion \popmacro\version \popmacro\datum \popmacro\linewidth @@ -187,25 +188,25 @@ \popmacro\day \popmacro\month \popmacro\year - \popmacro\CJK + \popmacro\CJK \popmacro\LaTeX - \popmacro\output} + \popmacro\output} -%D We save some macros: +%D We save some macros: \startloadingARABTEX -%D When loading \ARABTEX\ we have to set back the~! and~?. +%D When loading \ARABTEX\ we have to set back the~! and~?. -\input arabtex.sty +\input arabtex.sty -%D Since \ARABTEX\ has its own \type {\cap}, we save the -%D new meaning. We also redefine some \PLAIN\ macros, which -%D happen to have a different meaning in \LATEX. +%D Since \ARABTEX\ has its own \type {\cap}, we save the +%D new meaning. We also redefine some \PLAIN\ macros, which +%D happen to have a different meaning in \LATEX. -\let\ARABTEXversion=\theversion +\let\ARABTEXversion=\theversion -\let\ARABTEXcap=\cap +\let\ARABTEXcap=\cap \def\ARABTEXsh@ft#1% {\dimen@.00#1ex @@ -220,7 +221,7 @@ {{\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}% \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}} -%D A few internals: +%D A few internals: \def \ARABTEXcomma {\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi} \def \ARABTEXbreakA {\hfill\break} @@ -228,62 +229,62 @@ \edef\ARABTEXbar {\string|} \let \ARABTEXprotect \relax -%D Now we can pop the saved macros. +%D Now we can pop the saved macros. \stoploadingARABTEX %D Ah, we have to get rid of some \type {\protect} stuff but -%D to permit testing we add it in the \CONTEXT\ way. +%D to permit testing we add it in the \CONTEXT\ way. \bgroup -\catcode`\<=\@other +\catcode`\<=\@other \unexpanded\gdef\a@ins% - {\ifmmode + {\ifmmode \expandafter<% - \else - \leavevmode \bgroup + \else + \leavevmode \bgroup \arab@codes \set@arabfont \@waslafalse \@wasfalse - \expandafter\arab@insert + \expandafter\arab@insert \fi} -\unexpanded\gdef\<{\a@ins} +\unexpanded\gdef\<{\a@ins} \catcode`\<=\active \global\let<=\a@ins \egroup -%D We also need to register a few macros: +%D We also need to register a few macros: \all@w@ne\initializeARABTEXalternative % one argument, internal command -\all@wcmd\tx % no argument, small font -\all@wcmd\txx % no argument, smaller font +\all@wcmd\tx % no argument, small font +\all@wcmd\txx % no argument, smaller font -%D The main definitions are: +%D The main definitions are: -\definefontsynonym [ArabicRegular] [xnsh14] -\definefontsynonym [ArabicBold] [xnsh14bf] +\definefontsynonym [ArabicRegular] [xnsh14] +\definefontsynonym [ArabicBold] [xnsh14bf] \defineARABTEXalternative [arabic] - [\c!binnen=\setarab, - \c!letter=\setarabfont\fontstylesuffix] + [\c!inner=\setarab, + \c!style=\setarabfont\fontstylesuffix] \defineARABTEXalternative [farsi] - [\c!binnen=\setfarsi, - \c!letter=\setarabfont\fontstylesuffix] + [\c!inner=\setfarsi, + \c!style=\setarabfont\fontstylesuffix] \defineARABTEXalternative [urdu] - [\c!binnen=\seturdu, - \c!letter=\setarabfont\fontstylesuffix] + [\c!inner=\seturdu, + \c!style=\setarabfont\fontstylesuffix] \defineARABTEXalternative [maghribi] - [\c!binnen=\setmaghribi, - \c!letter=\setarabfont\fontstylesuffix] + [\c!inner=\setmaghribi, + \c!style=\setarabfont\fontstylesuffix] -%D Apart from such definitions, one can adapt the settings -%D using \type {\setupARABTEXalternative}. -%D +%D Apart from such definitions, one can adapt the settings +%D using \type {\setupARABTEXalternative}. +%D %D A few years ago at the Holland Festivities, I attended {\em %D The Cave}, one of the most impressive combinations of music %D and video I know. This composition of Steve Reich (music) @@ -294,25 +295,25 @@ %D interviews, music, and |<|believe it or not|>| rhythmic %D typography are the cornerstones. Remembering those big %D screens, it strikes me that like music, \TEX\ too is a -%D perfect instrument to cross cultural and linguistic -%D borders. So, let's: +%D perfect instrument to cross cultural and linguistic +%D borders. So, let's: -\protect +\protect %D those macros, -\endinput +\endinput %D and use them! % \defineconversion [abjad] [\abj@d] % % voetnoten verbatim lijsten indexen tabellen uitlijnen -% +% % \v!hoofdstuk=al-fa.slu % \v!inhoud=al-mu.htawayAtu % \v!figuren=qA'imaTu al-.suwaru % \v!tabellen=qA'imaTu al-^gadAwilu % \v!grafieken=qA'imaTu al-rusUmu -% \v!index=al-fihrisu +% \v!index=al-fihrisu % \v!bijlage=al-mul.haqu diff --git a/tex/context/base/font-bfm.tex b/tex/context/base/font-bfm.tex index 848f5728f..e7f510aad 100644 --- a/tex/context/base/font-bfm.tex +++ b/tex/context/base/font-bfm.tex @@ -169,15 +169,15 @@ \def\boldfacemath {\ifcase\boldfacemathmethod\else\the\everyboldfacemath\fi} \def\bfm {\boldfacemath} % no \let, so that we can redefine -\def\autoboldfacemath{\appendtoks\ifcase\boldfacemathmethod\else\let\bf\boldfacemath\fi\to\everymath} +\def\autoboldfacemath{\appendtoks\ifcase\boldfacemathmethod\else\let\bf\boldfacemath\fi\to\everymathematics} %D We hook this feature into the formula mechanism. \setupformulas - [\c!methode=\v!normaal] + [\c!method=\v!normal] \appendtoks - \doifelse{\formulaparameter\c!methode}\v!vet + \doifelse{\formulaparameter\c!method}\v!bold {\chardef\boldfacemathmethod\plusone} {\chardef\boldfacemathmethod\zerocount}% \to \everysetupformulas @@ -190,4 +190,4 @@ %D [method=bold] %D \stoptyping -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/font-chi.tex b/tex/context/base/font-chi.tex index c72f464c7..1dc4cbfa8 100644 --- a/tex/context/base/font-chi.tex +++ b/tex/context/base/font-chi.tex @@ -1,5 +1,3 @@ -% NOT YET ADAPTED TO THE NEW FONT MACROS - %D \module %D [ file=font-chi, %D version=1999.10.10, @@ -14,27 +12,28 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% NOT YET ADAPTED TO THE NEW FONT MACROS + \writestatus{loading}{Context Font Macros / Chinese} % much will to typo-chi.tex %D Still to be implemented: %D -%D \startopsomming -%D \som columns left right touch -%D \som distance = (hsize-n*bodyfontsize)/(n-1) -%D \som char grids -%D \som char tables -%D \som all kind of rotated combinations -%D \som hanging puctuation -%D \som a few more encodings -%D \som rotation list -%D \stopopsomming - -%M \stelkorpsin[chi] +%D \startitemize +%D \item columns left right touch +%D \item distance = (hsize-n*bodyfontsize)/(n-1) +%D \item char grids +%D \item char tables +%D \item all kind of rotated combinations +%D \item hanging puctuation +%D \item a few more encodings +%D \item rotation list +%D \stopitemize + +%M \setupbodyfont[chi] %M -%M \def\WangLei% -%M {\purechinese{\uchar{205}{245}\uchar{192}{218}}} +%M \def\WangLei{\purechinese{\uchar{205}{245}\uchar{192}{218}}} \useencoding[chi] @@ -90,9 +89,9 @@ %D Before and after the glyph we have to deal with Chinese %D spacing. Special attention is given to punctuation. %D -%D \starttypen +%D \starttyping %D [some short nice chinese text with () and english] -%D \stoptypen +%D \stoptyping %D %D We insert a bit of stretch and introduce a signal to %D keep track of previous characters. We use a similar @@ -354,7 +353,7 @@ \insertchineseglyph \else % left / right \setbox\scratchbox\hbox{\insertchineseglyph}% - \rotate[\c!rotatie=270]{\box\scratchbox}% + \rotate[\c!rotation=270]{\box\scratchbox}% \fi \hss}% \ht\scratchbox\unicodeheight\strutht @@ -393,29 +392,29 @@ \verticalchinesetrue \global\chardef\prevchineseSstatus=0 \let\nochinese\nochineseinvertical - \doif\@@vtn\v!passend + \doif\@@vtn\v!fit {\dimen0=\textwidth - \advance\dimen0 \@@vtafstand + \advance\dimen0 \@@vtdistance \dimen2=\bodyfontsize - \advance\dimen2 \@@vtafstand + \advance\dimen2 \@@vtdistance \divide\dimen0 \number\dimen2 \edef\@@vtn{\number\dimen0}}% - \startkolommen - [\c!richting=\@@vtrichting, - \c!balanceren=\@@vtbalanceren, - \c!afstand=\@@vtafstand, + \startcolumns + [\c!direction=\@@vtdirection, + \c!balance=\@@vtbalance, + \c!distance=\@@vtdistance, \c!n=\@@vtn, #1]} \def\stopvertical - {\stopkolommen + {\stopcolumns \egroup} \setupchinese - [\c!richting=\v!links, - \c!balanceren=\v!nee, - \c!n=\v!passend, - \c!afstand=1.5\bodyfontsize] + [\c!direction=\v!left, + \c!balance=\v!no, + \c!n=\v!fit, + \c!distance=1.5\bodyfontsize] %D We can set up vertical typesetting with \type %D {\setupchinese}. @@ -434,7 +433,7 @@ \hbox to \hsize {\hss \rotate - [\c!rotatie=270] + [\c!rotation=270] {\vbox to \ht\scratchbox{\vss\box\scratchbox\vss}}% \hss} \par} @@ -445,9 +444,9 @@ %D Careful reading of the previous macro learns that we %D treat left and right glyphs differently. When we say %D -%D \starttypen +%D \starttyping %D \correctchineseboundarycharstrue -%D \stoptypen +%D \stoptyping %D %D For the moment correction in on by default. @@ -492,22 +491,22 @@ %D \def\DoIt #1 #2 % %D {\hbox{\hbox to 2em{\uchar{#1}{#2}\hss}#1 #2}\par} %D -%D \startkolommen[n=5] +%D \startcolumns[n=5] %D \DoIt 161 162 \DoIt 161 163 \DoIt 161 164 \DoIt 161 167 \DoIt 161 173 %D \DoIt 161 175 \DoIt 161 177 \DoIt 161 179 \DoIt 161 181 \DoIt 161 183 %D \DoIt 161 185 \DoIt 161 187 \DoIt 161 189 \DoIt 161 191 \DoIt 161 227 %D \DoIt 161 228 \DoIt 161 229 \DoIt 163 161 \DoIt 163 162 \DoIt 163 167 %D \DoIt 163 169 \DoIt 163 172 \DoIt 163 174 \DoIt 163 186 \DoIt 163 187 %D \DoIt 163 190 \DoIt 163 191 \DoIt 163 221 \DoIt 163 253 -%D \stopkolommen +%D \stopcolumns %D %D A linebreak is not permitted after the following glyphs: %D -%D \startkolommen[n=5] +%D \startcolumns[n=5] %D \DoIt 161 174 \DoIt 161 176 \DoIt 161 178 \DoIt 161 180 \DoIt 161 182 %D \DoIt 161 184 \DoIt 161 186 \DoIt 161 188 \DoIt 161 190 \DoIt 163 168 %D \DoIt 163 219 \DoIt 163 224 \DoIt 163 251 -%D \stopkolommen +%D \stopcolumns %D \macros %D {tracechinesetrue, showchinesetracelegend} @@ -543,17 +542,14 @@ \hskip-\wd\scratchbox \hbox to \wd\scratchbox {\hss - \color[green] - {\ifcase\chineseSstatus\relax u\or l\or r\fi}% + \color[green]{\ifcase\chineseSstatus\relax u\or l\or r\fi}% \hss}% \hskip-\wd\scratchbox \lower\dp\scratchbox\hbox to \wd\scratchbox {\hss - \color[red] - {\ifcase\chineseBstatus\relax u\or l\or r\or c\or n\fi}% + \color[red]{\ifcase\chineseBstatus\relax u\or l\or r\or c\or n\fi}% \hss - \color[blue] - {\ifcase\chineseAstatus\relax u\or l\or r\or s\fi}% + \color[blue]{\ifcase\chineseAstatus\relax u\or l\or r\or s\fi}% \hss}}}} %D The following example shows how tracing works. @@ -583,23 +579,23 @@ %D The chinese numbering systems rather straightforward. First %D there are the digits: %D -%D \starttabulatie[|c|c|c|c|c|c|c|c|c|c|] +%D \starttabulate[|c|c|c|c|c|c|c|c|c|c|] %D \NC 0 \NC 1 \NC 2 \NC 3 \NC 4 \NC 5 \NC 6 \NC 7 \NC 8 \NC 9 \NC\NR %D \NC \chinesenumber{0} \NC \chinesenumber{1} \NC \chinesenumber{2} %D \NC \chinesenumber{3} \NC \chinesenumber{4} \NC \chinesenumber{5} %D \NC \chinesenumber{6} \NC \chinesenumber{7} \NC \chinesenumber{8} %D \NC \chinesenumber{9} \NC\NR -%D \stoptabulatie +%D \stoptabulate %D %D Apart from these numbers, we have dedicated representations %D of some powers of~$10$. %D -%D \starttabulatie[|c|c|c|c|c|] +%D \starttabulate[|c|c|c|c|c|] %D \NC 10 \NC 100 \NC 1000 \NC 10000 \NC 100000000 \NC\NR %D \NC \chinesenumber{10} \NC \chinesenumber{100} %D \NC \chinesenumber{1000} \NC \chinesenumber{10000} %D \NC \chinesenumber{100000000} \NC\NR -%D \stoptabulatie +%D \stoptabulate %D %D The number~12 is a combination of $1\times10+2$, or: %D \chinesenumber {12}, while~22 becomes \chinesenumber {22}. @@ -609,7 +605,7 @@ %D case the~$1$ is redundant. The same is true for the powers %D of~10. %D -%D \starttabulatie[|r|r|r|r|r|r|] +%D \starttabulate[|r|r|r|r|r|r|] %D \NC 1 \NC \chinesenumber {1} \NC %D 9 \NC \chinesenumber {9} \NC %D 4 \NC \chinesenumber {4} \NC\NR @@ -622,7 +618,7 @@ %D \NC 1111 \NC \chinesenumber {1111} \NC %D 9999 \NC \chinesenumber {9999} \NC %D 65536 \NC \chinesenumber {65536} \NC\NR -%D \stoptabulatie +%D \stoptabulate %D %D The implementation is rather simple. For internal purposes, %D we let zero expand to~0. The digits $0-9$ and numbers $10$, @@ -657,7 +653,7 @@ %D a derived one with capitalized characters, an extended %D version of the first method, and a rather Arabic method. %D -%D \starttabulatie[|l|l|] +%D \starttabulate[|l|l|] %D \HL %D \NC \bf command \NC \bf number 39 \NC\NR %D \HL @@ -666,7 +662,7 @@ %D \NC \type{\arabicchinesenumber} \NC \arabicchinesenumber {39} \NC\NR %D \NC \type{\extendedchinesenumber} \NC \extendedchinesenumber {39} \NC\NR %D \HL -%D \stoptabulatie +%D \stoptabulate %D %D We use a dirty trick to enable Chinese Capital Digits. In %D the encoding vectors, we define these by appending a suffix @@ -809,7 +805,7 @@ %D conversion macro. %D %D \startbuffer -%D \starttabel[|l|l|l|l|l|l|] +%D \starttable[|l|l|l|l|l|l|] %D \HL %D \NC number \NC converter \NC hard coded \NC %D number \NC converter \NC hard coded\NC \SR @@ -842,10 +838,10 @@ %D \NC 1111111111 \NC \chinesenumber{1111111111} \NC ʮһÒÚһǧһ°ÙһʮһÍòһǧһ°Ùһʮһ \NC %D 1000000000 \NC \chinesenumber{1000000000} \NC Ê®ÒÚ \NC\LR %D \HL -%D \stoptabel +%D \stoptable %D \stopbuffer %D -%D \plaatstabel{Some Chinese number examples.}{\haalbuffer} +%D \placetable{Some Chinese number examples.}{\getbuffer} %D Although the conversion can be hooked into most commands %D that deal with numbers |<|those familiar with \TEX\ macro @@ -854,12 +850,12 @@ %D digits. So, in practice, the change that the next example %D shows up, is minimal. %D -%D \starttabulatie[|r|r|c|] +%D \starttabulate[|r|r|c|] %D \NC 2546 \NC \chinesenumber {2546} \NC \NC\NR %D \NC 9258 \NC \chinesenumber {9258} \NC $+$ \NC\NR %D \HL %D \NC 11804 \NC \chinesenumber {11804} \NC \NC\NR -%D \stoptabulatie +%D \stoptabulate %D %D While in arabic arithmics addition leads to more digits, in %D Chinese the number of glyphs can (temporary) decrease. @@ -881,9 +877,9 @@ %D Date conversion: -\defineconversion [cn] [\v!dag] [\chinesenumber] -\defineconversion [cn] [\v!maand] [\chinesenumber] -\defineconversion [cn] [\v!jaar] [\chinesenumber] +\defineconversion [cn] [\v!day] [\chinesenumber] +\defineconversion [cn] [\v!month] [\chinesenumber] +\defineconversion [cn] [\v!year] [\chinesenumber] %D \macros %D {SimChi, TraChi} @@ -893,12 +889,12 @@ \setupunicodefont [chinese] - [ \c!schaal=\chineseunicodescale, - \c!hoogte=\chineseunicodeheight, - \c!diepte=\chineseunicodedepth, - \c!conversie=\chinesenumber, - \c!commandos=\setchineseencoding, % needed for digits - \c!commando=\handlechineseunicodeglyph] + [ \c!scale=\chineseunicodescale, + \c!height=\chineseunicodeheight, + \c!depth=\chineseunicodedepth, + \c!conversion=\chinesenumber, + \c!commands=\setchineseencoding, % needed for digits + \c!command=\handlechineseunicodeglyph] %D For the moment, this encoding is implemented rather ugly. The %D trick is to move the encoding value from the current font @@ -914,17 +910,17 @@ %D We could have said: %D -%D \starttypen +%D \starttyping %D \defineunicodefont %D [SimChi] %D [SimplifiedChinese] -%D [ \c!schaal=\chineseunicodescale, -%D \c!hoogte=\chineseunicodeheight, -%D \c!diepte=\chineseunicodedepth, -%D \c!conversie=\chinesenumber, -%D \c!commandos=\setchineseencoding, % needed for digits -%D \c!commando=\handlechineseunicodeglyph] -%D \stoptypen +%D [ \c!scale=\chineseunicodescale, +%D \c!height=\chineseunicodeheight, +%D \c!depth=\chineseunicodedepth, +%D \c!conversion=\chinesenumber, +%D \c!commands=\setchineseencoding, % needed for digits +%D \c!command=\handlechineseunicodeglyph] +%D \stoptyping %D %D However, the former definitions is more general. Next we %D map a few fonts: @@ -1085,7 +1081,7 @@ %D %D The full range of sizes is: %D -%D \starttabulatie[|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|] +%D \starttabulate[|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|] %D \NC 8 \NC 7 \NC -6 \NC 6 \NC %D -5 \NC 5 \NC -4 \NC 4 \NC %D -3 \NC 3 \NC -2 \NC 2 \NC @@ -1094,43 +1090,43 @@ %D \chisize{-5}\NC\chisize{5}\NC\chisize{-4}\NC\chisize{4}\NC %D \chisize{-3}\NC\chisize{3}\NC\chisize{-2}\NC\chisize{2}\NC %D \chisize{-1}\NC\chisize{1}\NC\chisize{-0}\NC\chisize{0}\NC\NR -%D \stoptabulatie +%D \stoptabulate %D Now it's time for some real Chinese. This example %D also shows that font switching is supported. %D -%D \startsmaller -%D \regelmidden{\tfd Ë®µ÷¸èÍ·} -%D \blanko -%D \regelmidden{\tfb ±û³½ÖÐÇ»¶Òû´ïµ©£¬´ó×í×÷´Ëƪ£¬¼æ»³×ÓÓÉ¡£} -%D \blanko -%D \regelmidden{\tfb ËÕéø} -%D \blanko +%D \startnarrower +%D \midaligned{\tfd Ë®µ÷¸èÍ·} +%D \blank +%D \midaligned{\tfb ±û³½ÖÐÇ»¶Òû´ïµ©£¬´ó×í×÷´Ëƪ£¬¼æ»³×ÓÓÉ¡£} +%D \blank +%D \midaligned{\tfb ËÕéø} +%D \blank %D Ã÷Ô¼¸Ê±ÓУ¿°Ñ¾ÆÎÊÇàÌì¡£²»ÖªÌìÉϹ¬ãÚ£¬½ñϦÊǺÎÄꣿÎÒÓû³Ë·ç¹éÈ¥ %D £¬ÓÖ¿ÖÇíÂ¥ÓñÓ¸ß´¦²»Ê¤º®¡£ÆðÎèŪÇåÓ°£¬ºÎËÆÔÚÈ˼䣿 -%D \blanko +%D \blank %D תÖì¸ó£¬µÍ»§£¬ÕÕÎÞÃß¡£²»Ó¦Óкޣ¬ºÎÊÂÆ«Ïò±ðʱԲ£¿ÈËÓб¯»¶ÀëºÏ£¬ %D ÔÂÓÐÒõÇçԲȱ£¬´ËʹÅÄÑÈ«¡£µ«Ô¸È˳¤¾Ã£¬Ç§Àﹲ濾ꡣ -%D \stopsmaller +%D \stopnarrower %D %D The english translation is: %D -%D \startsmaller -%D \regelmidden{\tfd Tune: Prelude to the Melody of Water} -%D \blanko -%D \regelmidden{\tfb On the night of the Mid||Autumn Festival of +%D \startnarrower +%D \midaligned{\tfd Tune: Prelude to the Melody of Water} +%D \blank +%D \midaligned{\tfb On the night of the Mid||Autumn Festival of %D 1076, I drank happily till dawn and wrote this in my cups %D while thinking of Zi||you.} -%D \blanko -%D \regelmidden{\tfb Su Shi} -%D \blanko +%D \blank +%D \midaligned{\tfb Su Shi} +%D \blank %D How long will the bright moon appear? Wine||cup in hand, I %D ask the sky. I do not know waht time of year it would be %D tonight in the palace on high. Riding the wind, there I %D would fly, yet I fear the crystal palace would be far too %D high and cold for me. I rise and dance, with my shadow I %D play. On high as on earth, would it be as gay? -%D \blanko +%D \blank %D The moon goes round the mansion red though gauze||draped %D windows soft to shed her light upon the sleepless bed. %D Against man she should have no spite. Why then when people @@ -1140,7 +1136,7 @@ %D olden days. So let us wish that man will live long as he %D can! Though miles apart, we'll share the beauty she %D displays. -%D \stopsmaller +%D \stopnarrower %D This package is written in the city of Hasselt, a pretty %D small town in the |<|compare to China real small|>| @@ -1154,6 +1150,6 @@ %D To make our lives more easy, we put it here (too): -\setuptyping[\c!tab=\v!nee] +\setuptyping[\c!tab=\v!no] \protect \endinput diff --git a/tex/context/base/font-heb.tex b/tex/context/base/font-heb.tex index 2982b3dfc..1a77d23ea 100644 --- a/tex/context/base/font-heb.tex +++ b/tex/context/base/font-heb.tex @@ -1,28 +1,41 @@ -% NOT YET ADAPTED TO THE NEW FONT MACROS +%D \module +%D [ file=font-heb, +%D version=1999.11.06, +%D title=\CONTEXT\ Font Macros, +%D subtitle=Hebrew, +%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. \input font-arb.tex \writestatus{loading}{Context Font Macros / Hebrew (ArabTeX) support} -%D This module is build on top of \ARABTEX\ and arabic -%D support. I dedicate this module to my father Hein Hagen, -%D who did not live long enough to become a user. His huge -%D library contains math, science, history, english literature, -%D philisophy and theology books, but his most favoured ones -%D were those traditional hebrew printings. I must admit -%D that some of those make clear that traditonal typesetting -%D can still beat \TEX. Those nested multicolumn documents with -%D complicated can give even the experienced macro writer a +% NOT YET ADAPTED TO THE NEW FONT MACROS + +%D This module is build on top of \ARABTEX\ and arabic +%D support. I dedicate this module to my father Hein Hagen, +%D who did not live long enough to become a user. His huge +%D library contains math, science, history, english literature, +%D philisophy and theology books, but his most favoured ones +%D were those traditional hebrew printings. I must admit +%D that some of those make clear that traditonal typesetting +%D can still beat \TEX. Those nested multicolumn documents with +%D complicated can give even the experienced macro writer a %D rather persistent headache. -\unprotect +\unprotect %D A few fonts. \unexpanded\def\sethebrewfont#1% strange font dimensions / scale {\scratchdimen=10\bodyfontsize \font\hebfont=\truefontname{Hebrew#1} at \currentfontscale\scratchdimen - \fontdimen5\hebfont=.8\fontdimen2\hebfont + \fontdimen5\hebfont=.8\fontdimen2\hebfont \fontdimen6\hebfont=3\fontdimen5\hebfont \hebfont} @@ -33,20 +46,20 @@ \startloadingARABTEX -\input hebtex.sty -\input apatch.sty +\input hebtex.sty +\input apatch.sty \input hepatch.sty \stoploadingARABTEX -%D The main definition is: +%D The main definition is: \definefontsynonym [HebrewRegular] [hclassic] \definefontsynonym [HebrewBold] [hcaption] \defineARABTEXalternative [hebrew] - [\c!binnen=\sethebrew, - \c!letter=\sethebrewfont{\fontstylesuffix}] + [\c!inner=\sethebrew, + \c!style=\sethebrewfont{\fontstylesuffix}] \protect \endinput diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex index 1c12964dc..adf08b12f 100644 --- a/tex/context/base/font-ini.tex +++ b/tex/context/base/font-ini.tex @@ -255,7 +255,7 @@ %D means one doesn't have to take care of all kind of relations %D between fonts. %D -%D \pagina[grotevoorkeur] +%D \page[bigpreference] %D \macros %D {rm,ss,tt,hw,cg} @@ -264,73 +264,73 @@ %D we distinguish between several styles. In most cases we will %D use: %D -%D \startregelcorrectie -%D \starttabel[|l||] +%D \startlinecorrection +%D \starttable[|l||] %D \HL %D \NC roman regular serif \NC \type{\rm} \NC\FR %D \NC sansserif sans support \NC \type{\ss} \NC\MR %D \NC type teletype mono \NC \type{\tt} \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D The number of styles is not limited to these three. When %D using Lucida Bright we can for instance also define: %D -%D \startregelcorrectie -%D \starttabel[|l||] +%D \startlinecorrection +%D \starttable[|l||] %D \HL %D \NC handwritten \NC \type{\hw} \NC\FR %D \NC calligraphic \NC \type{\cg} \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D Anyone who feels the need, can define additional ones, like %D -%D \startregelcorrectie -%D \starttabel[|l||] +%D \startlinecorrection +%D \starttable[|l||] %D \HL %D \NC faxfont \NC \type{\ff} \NC\FR %D \NC blackboard \NC \type{\bb} \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D Or even %D -%D \startregelcorrectie -%D \starttabel[|l||] +%D \startlinecorrection +%D \starttable[|l||] %D \HL %D \NC hebrew \NC \type{\hb} \NC\SR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D Styles are grouped in font sets. At the moment there are %D three main sets defined: %D -%D \startregelcorrectie -%D \starttabel[|l|l||] +%D \startlinecorrection +%D \starttable[|l|l||] %D \HL %D \NC Computer Modern Roman \NC Knuth \NC \type{cmr} \NC\FR %D \NC Lucida Bright \NC Bigelow \& Holmes \NC \type{lbr} \NC\MR %D \NC Standard Postscript Fonts \NC Adobe \NC \type{pos} \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D There are also some Computer Modern Roman alternatives: %D -%D \startregelcorrectie -%D \starttabel[|l|l||] +%D \startlinecorrection +%D \starttable[|l|l||] %D \HL %D \NC Computer Modern Roman \NC Knuth \& Sauter \NC \type{sau} \NC\FR %D \NC Euler fonts \NC Zapf \NC \type{eul} \NC\MR %D \NC Computer Modern Concrete \NC Knuth \& Zapf \NC \type{con} \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D All these definitions are ordered in files with names like %D \type{font-cmr} and \type{font-pos}, where the last three @@ -339,8 +339,8 @@ %D Within such a font set (\type{cmr}) and style (\type{\rm}) %D we can define a number of text font alternatives: %D -%D \startregelcorrectie -%D \starttabel[|l||] +%D \startlinecorrection +%D \starttable[|l||] %D \HL %D \NC typeface \NC \type{\tf} \NC\FR %D \NC boldface \NC \type{\bf} \NC\MR @@ -350,18 +350,18 @@ %D \NC bolditalic \NC \type{\bi} \NC\MR %D \NC smallcaps \NC \type{\sc} \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D For old stylish Frans Goddijn we have: %D -%D \startregelcorrectie -%D \starttabel[|l||] +%D \startlinecorrection +%D \starttable[|l||] %D \HL %D \NC oldstyle \NC \type{\os} \NC\SR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D The availability of these alternatives depends on the %D completeness of a font family and of course the definitions @@ -370,8 +370,8 @@ %D But let's not forget math. In addition to the previous \TEX\ %D families (the mysterious \type{\fam}'s) we've got some more: %D -%D \startregelcorrectie -%D \starttabel[|l||] +%D \startlinecorrection +%D \starttable[|l||] %D \HL %D \NC Math Roman \NC \type{\mr} \NC\FR %D \NC Math Italic \NC \type{\mi} \NC\MR @@ -381,8 +381,8 @@ %D \NC Math B \NC \type{\mb} \NC\MR %D \NC Math C \NC \type{\mc} \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D Users can call for specific fonts in many ways. Switches to %D other typefaces, like the switch from normal to bold, are as @@ -398,20 +398,20 @@ %D During the definition of a bodyfont one can also declare the %D available larger alternatives: %D -%D \starttypen +%D \starttyping %D \tf \tfa \tfb \tfc ... %D \bf \bfa \bfb \bfc ... %D \sl \sla \slb \slc ... -%D \stoptypen +%D \stoptyping %D %D The smaller ones are automatically supplied and derived from %D the the bodyfont environment. %D -%D \starttypen +%D \starttyping %D \tfx \tfxx %D \bfx \bfxx %D \slx \slxx -%D \stoptypen +%D \stoptyping %D %D There are only two smaller alternatives per style. The %D larger alternatives on the other hand have no limitations. @@ -425,14 +425,14 @@ %D \tfd Hi \bf there\sl, here \tfb I \bf am %D \stopbuffer %D -%S \startsmaller +%S \startnarrower %D \typebuffer -%S \stopsmaller +%S \stopnarrower %D %D therefore becomes: %D %D \startvoorbeeld -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D Maybe this mechanism isn't always as logic, but as said @@ -440,9 +440,9 @@ %D %D So a specific kind of glyph can be characterized by: %D -%D \startsmaller +%D \startnarrower %D family (cmr) + bodyfont (12pt) + style (rm) + alternative (bf) + size (a) -%D \stopsmaller +%D \stopnarrower %D %D The last component (the size) is optional. %D @@ -454,9 +454,9 @@ %D workaround for this: we can call fonts directly by means of %D commands like: %D -%D \starttypen +%D \starttyping %D \rmtf \sssl \tttf \rmbsa -%D \stoptypen +%D \stoptyping %D %D One should realize that this fast calls have limitations, %D they lack for instance automatic super- and subscript @@ -476,16 +476,16 @@ %D lays in the fact that we often want a bit bigger characters %D than in math mode. In \CONTEXT\ for instance the \type{\tx} %D and \type{\txx} commands are used for surrogate -%D \kap{smallcaps} which support both nesting and alternatives, -%D like in {\bf\kap{a \kap{small} world}}, which was typeset by +%D \cap{smallcaps} which support both nesting and alternatives, +%D like in {\bf\cap{a \cap{small} world}}, which was typeset by %D -%D \starttypen -%D \bf\kap{a \kap{small} world} -%D \stoptypen +%D \starttyping +%D \bf\cap{a \cap{small} world} +%D \stoptyping %D %D And compare $\rm \scriptstyle THIS$ with the slightly larger -%D \kap{THIS}: \ruledhbox{$\rm \scriptstyle scriptstyle: THIS$} -%D or \ruledhbox{\kap{x style: THIS}} makes a big difference. +%D \cap{THIS}: \ruledhbox{$\rm \scriptstyle scriptstyle: THIS$} +%D or \ruledhbox{\cap{x style: THIS}} makes a big difference. %D The \type{x..d} sizes should be used grouped. If you %D don't group them, i.e. call them in a row, \CONTEXT\ will @@ -495,7 +495,7 @@ %D %D \def\FontState{\setstrut\ruledhbox{\strut Hello}} %D -%D \starttabulatie[|||||] +%D \starttabulate[|||||] %D \HL %D \NC \rlap{\quad\bf grouped} \NC \NC \type {\tx} \NC \type {\txx} \NC \NR %D \HL @@ -509,11 +509,11 @@ %D \NC \type{\tfx} \NC \tfx \FontState \NC \tfx \tx \FontState \NC \tfx \txx \FontState \NC \NR %D \NC \type{\tfxx} \NC \tfxx \FontState \NC \tfxx\tx \FontState \NC \tfxx\txx \FontState \NC \NR %D \HL -%D \stoptabulatie +%D \stoptabulate %D -%D \blanko +%D \blank %D -%D \starttabulatie[|||||] +%D \starttabulate[|||||] %D \HL %D \NC \rlap{\quad\bf stacked} \NC \NC \type {\tx} \NC \type {\txx} \NC \NR %D \HL @@ -563,7 +563,7 @@ %D \NC \tfx\tfxx\tf\tfa\tfb\tfc\tfx\tfxx \txx \FontState %D \NC \NR %D \HL -%D \stoptabulatie +%D \stoptabulate %D \macros %D {mf} @@ -589,9 +589,9 @@ %D Gives both an expected and unexpected result: %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D We see here that the character shapes change accordingly to @@ -608,9 +608,9 @@ %D \stopbuffer %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D In this example we see a new command \type{\mf} surface @@ -656,14 +656,14 @@ %D It won't! %D %D \startvoorbeeld -%D \let\mathop=\normalmathop \haalbuffer +%D \let\mathop=\normalmathop \getbuffer %D \stopvoorbeeld %D %D The reason for this is that \type{\sin} is defined as: %D -%D \starttypen +%D \starttyping %D \def\sin{\mathop{\rm sin}\nolimits} -%D \stoptypen +%D \stoptyping %D %D We can fix this by defining @@ -678,27 +678,27 @@ %D We can fix arbitrary horizontal boxes by redefining the %D \TEX\ primitive \type{\hbox}: %D -%D \starttypen +%D \starttyping %D \let\normalhbox=\hbox %D %D \def\hbox{\ifmmode\mbox\else\normalhbox\fi} -%D \stoptypen +%D \stoptyping %D %D with %D -%D \starttypen +%D \starttyping %D \def\mbox#1#% %D {\normalhbox#1\bgroup\mf\let\next=} -%D \stoptypen +%D \stoptyping %D %D or more robust, that is, also accepting \type{\hbox\bgroup}: %D -%D \starttypen +%D \starttyping %D \def\mbox% %D {\normalhbox\bgroup\mf %D \dowithnextbox{\flushnextbox\egroup}% %D \normalhbox} -%D \stoptypen +%D \stoptyping %D %D And now: %D @@ -711,7 +711,7 @@ %D Indeed gives: %D %D \startvoorbeeld -%D \enablembox\haalbuffer +%D \enablembox\getbuffer %D \stopvoorbeeld %D %D But, do we want this kind of trickery to be activated? No, @@ -737,7 +737,7 @@ {\appendtoks \ifx\normalhbox\undefined\let\normalhbox\hbox\fi \let\hbox\mbox - \to\everymath} + \to\everymathematics} %D So in fact one can enable this feature if needed. I would say: %D go along, but use grouping if needed! @@ -1162,12 +1162,12 @@ %D There are several ways to specify a font. Three of them are %D pure \TeX\ ones, the fourth one is new: %D -%D \starttypen +%D \starttyping %D \font\name=cmr12 %D \font\name=cmr12 at 10pt %D \font\name=cmr12 scaled \magstep2 %D \font\name=cmr12 sa 1.440 -%D \stoptypen +%D \stoptyping %D %D The non||\TEX\ alternative \type{sa} stands for {\em scaled %D at}. This means as much as: scale the bodyfontsize with this @@ -1176,9 +1176,9 @@ %D \in{table}[tab:magstep]. We therefore introduce %D \type{\magfactor} as an alternative for \type{\magstep}. %D -%D \plaatstabel[hier][tab:magstep] +%D \placetable[here][tab:magstep] %D {Factors to be used with \type{sa.}} -%D \starttabel[|c|c|c|] +%D \starttable[|c|c|c|] %D \HL %D \NC \bf magstep \NC \bf equivalent \NC \bf factor \NC\SR %D \HL @@ -1188,7 +1188,7 @@ %D \NC 4 \NC \type{\magfactor4} \NC 2.074 \NC\MR %D \NC 5 \NC \type{\magfactor5} \NC 2.488 \NC\LR %D \HL -%D \stoptabel +%D \stoptable \def\magstep#1% \relax removed, otherwise space after it sticks, else added {\ifcase#1 \@m\or1200\or1440\or1728\or2074\or2488\or\@m\fi} @@ -1395,9 +1395,9 @@ %D An additional the second \type {\font} definition can %D prevent fuzzy font refs %D -%D \starttypen +%D \starttyping %D \expandafter\font\csname\dummyfontname\endcsname\lastfontname -%D \stoptypen +%D \stoptyping %D %D but somehow they changed \TEX\ so that it does not matter %D any more. @@ -1421,7 +1421,7 @@ % \errorstopmode % \edef\lastfontname{\fontname\lastloadedfont}% % \ifx\lastfontname\nullfontname -% \showmessage{\m!fonts}{10}{\fontfile}% +% \showmessage\m!fonts{10}{\fontfile}% % \expandafter\font\csname#1\endcsname=\defaultfontfile\somefontspec\relax % \else % \expandafter\let\csname#1\endcsname\lastloadedfont @@ -1456,22 +1456,23 @@ %D for helping me sort this out. %D \macros -%D {definefontsynonym} +%D {definefontsynonym, doifelsefontsynonym, +%D expandfontsynonym, truefontname, truefontdata} %D %D While looking for fonts, fontsynonyms are used for accessing %D the files! %D -%D \starttypen +%D \starttyping %D \definefontsynonym[Serif][Lucida-Bright] %D \definefontsynonym[Lucida-Bright][lbr][encoding=texnansi] -%D \stoptypen +%D \stoptyping %D %D The definitions can be accessed by: %D -%D \startregels +%D \startlines %D name: \type {\truefontname{Lucida-Bright}} %D data: \type {\truefontdata{\truefontname{Lucida-Bright}}} -%D \stopregels +%D \stoplines \def\definefontsynonym {\dotripleempty\dodefinefontsynonym} @@ -1541,6 +1542,18 @@ \@EA\truefontname\csname\??ff\fontclass#1\endcsname \fi} +\def\expandfontsynonym#1#2% #2 := onelevelexpansion(#1) + {\@EA\ifx\csname\??ff\fontclass#2\endcsname\relax\else + \expandafter\def\expandafter#1\expandafter{\csname\??ff\fontclass#2\endcsname}% + \fi} + +\def\doifelsefontsynonym#1% + {\@EA\ifx\csname\??ff\fontclass#1\endcsname\relax + \expandafter\secondoftwoarguments + \else + \expandafter\firstoftwoarguments + \fi} + \endTEX \beginETEX \ifcsname @@ -1569,7 +1582,20 @@ #1% \fi\fi} +\def\expandfontsynonym#1#2% #2 := onelevelexpansion(#1) + {\ifcsname\??ff\fontclass#2\endcsname + \expandafter\def\expandafter#1\expandafter{\csname\??ff\fontclass#2\endcsname}% + \fi} + +\def\doifelsefontsynonym#1% + {\ifcsname\??ff\fontclass#1\endcsname + \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments + \fi} + \endETEX + %D \macros %D {tracedfontname} @@ -1624,15 +1650,15 @@ %D For special purposes, one can use the next macro to %D access font file characteristics, for instance: %D -%D \starttypen +%D \starttyping %D \getfontfileparameters{Regular} -%D \stoptypen +%D \stoptyping %D %D can result in: %D -%D \starttypen +%D \starttyping %D \def\currentfontfileencoding{texnansi} -%D \stoptypen +%D \stoptyping % \def\@@currentfontfile{currentfontfile} % @@ -1652,12 +1678,12 @@ %D Before we implement the main definition macro, we first show %D one for local use: %D -%D \starttypen +%D \starttyping %D \definefont[Some][LucidaBright at 100pt] \Some some %D \definefont[More][LucidaBright scaled 3000] \More more %D \definefont[Nice][LucidaBright mp 2] \Nice nice %D \definefont[Text][LucidaBright sa 5.4] \Text last -%D \stoptypen +%D \stoptyping %D %D The implementation one looks familiar: @@ -1801,9 +1827,9 @@ %D %D \typebuffer %D -%D \startopelkaar -%D \haalbuffer -%D \stopopelkaar +%D \startpacked +%D \getbuffer +%D \stoppacked \def\mapfontsize {\dodoubleargument\domapfontsize} @@ -1927,20 +1953,20 @@ %D A typical use of this command is in commands that switch %D to another font bypassing the font mechanism: %D -%D \starttypen +%D \starttyping %D \font\myfont=\truefontname{MyFont} at \currentfontscale\bodyfontsize -%D \stoptypen +%D \stoptyping %D Now we enter the area of font switching. The switching %D mechanism has to take care of several situations, like: %D -%D \startopsomming[opelkaar] -%D \som changing the overal document fonts (including margins, +%D \startitemize[packed] +%D \item changing the overal document fonts (including margins, %D headers and footers) -%D \som changing local fonts (only the running text) -%D \som smaller and even more smaller alternatives (super- +%D \item changing local fonts (only the running text) +%D \item smaller and even more smaller alternatives (super- %D and subscripts) -%D \stopopsomming +%D \stopitemize %D %D \TEX\ offers a powerfull family mechanism for super- and %D subscripts in math mode. In text mode however, we don't use @@ -1958,7 +1984,7 @@ %D Later on we will see how these parameters are used, so for %D the moment we stick with an example: %D -%D \starttypen +%D \starttyping %D \definebodyfontenvironment %D [12pt] %D [ text=12pt, @@ -1968,7 +1994,7 @@ %D xx=8pt, %D big=12pt, %D small=10pt] -%D \stoptypen +%D \stoptyping %D %D The first argument specifies the bodyfont size to which the %D settings apply. All second parameters are specified in @@ -2035,11 +2061,11 @@ \normalizebodyfontsize\scratchdimen\to\tempbodyfontsize \setevalue{\??ft#2#1##1}{\tempbodyfontsize}}% \processcommalist - [\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!groot,\c!klein] + [\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!big,\c!small] \docommando \copyparameters [\??ft#2#1][\??ft\s!default] - [\c!interlinie,\c!em]}% + [\c!interlinespace,\c!em]}% \getparameters[\??ft#2#1][#3]% \@@endfontdef % new code, see remark @@ -2054,7 +2080,7 @@ %D {\bf Remark:} We need to cover the following cases, %D otherwise users can get confused: %D -%D \starttypen +%D \starttyping %D \setupbodyfont[23pt] %D %D \definebodyfontenvironment[23pt] @@ -2063,7 +2089,7 @@ %D \definebodyfontenvironment[23pt] %D \definebodyfont[23pt][rm,ss,tt][default] %D \setupbodyfont[23pt] -%D \stoptypen +%D \stoptyping %D Beware: while some font defs can be global, the bodyfont %D environment checks local. This means that multiple local @@ -2074,17 +2100,40 @@ \def\checkbodyfontenvironment[#1]% {\definebodyfontenvironment[\fontclass][#1][]} -\def\setupbodyfontenvironment% - {\dotripleempty\dosetupbodyfontenvironment} +% original +% +% \def\setupbodyfontenvironment +% {\dotripleempty\dosetupbodyfontenvironment} +% +% \def\dosetupbodyfontenvironment[#1][#2][#3]% class size settings +% {\@@beginfontdef +% \ifthirdargument +% \getparameters[\??ft#1#2][#3]% +% \else +% \getparameters[\??ft#1][#2]% +% \fi +% \@@endfontdef} +% +% this one already catches both define/setup -\def\dosetupbodyfontenvironment[#1][#2][#3]% class size settings - {\@@beginfontdef - \ifthirdargument - \getparameters[\??ft#1#2][#3]% - \else - \getparameters[\??ft#1][#2]% - \fi - \@@endfontdef} +\def\setupbodyfontenvironment{\definebodyfontenvironment} + +% officially, but not needed (yet): +% +% \def\dosetupbodyfontenvironment[#1][#2][#3]% class size settings +% {\ifthirdargument +% \localbodyfontsize#2\relax +% \normalizebodyfontsize\localbodyfontsize\to\normalizedbodyfontsize +% \doifundefinedelse{\??ft#1\normalizedbodyfontsize\c!em} +% {\definebodyfontenvironment[#1][#2][#3]}% +% {\getparameters[\??ft#1\normalizedbodyfontsize][#3]}% +% \else +% \localbodyfontsize#1\relax +% \normalizebodyfontsize\localbodyfontsize\to\normalizedbodyfontsize +% \doifundefinedelse{\??ft\normalizedbodyfontsize\c!em} +% {\definebodyfontenvironment[#1][#2]}% +% {\getparameters[\??ft\normalizedbodyfontsize][#2]}% +% \fi} %D Just a couple of interface macros: @@ -2106,7 +2155,7 @@ {\csname\bodyfontvariable} \def\bodyfontinterlinespecs - {\bodyfontvariable{\normalizedbodyfontsize\c!interlinie}} + {\bodyfontvariable{\normalizedbodyfontsize\c!interlinespace}} \def\bodyfontinterlinespace {\csname\bodyfontinterlinespecs\endcsname} @@ -2114,9 +2163,9 @@ %D We default all parameters to the main bodyfont size (begin %D \type{#1}), so the next setup is valid too: %D -%D \starttypen +%D \starttyping %D \definebodyfontenvironment[24pt] -%D \stoptypen +%D \stoptyping %D %D All parameters can be redefined when needed, so one does %D not have to stick to the default ones. @@ -2141,7 +2190,7 @@ %D extended with \type{\bfa}, \type{\slb}, etc. or even %D \type{e} and higher alternatives. %D -%D \starttypen +%D \starttyping %D \definebodyfont [12pt] [rm] %D [tf=cmr12, %D bf=cmbx12, @@ -2167,7 +2216,7 @@ %D tfc=lbr sa 1.728, %D tfd=lbr sa 2.074, %D sc=lbr sa 0.833] -%D \stoptypen +%D \stoptyping %D %D The second example shows that we can define more sizes at %D once. The main difference between these examples is that the @@ -2321,7 +2370,7 @@ \normalizebodyfontsize\scratchdimen\to\!!stringa \letvalue{\??ft#1##1}\!!stringa}}% \processcommalist - [\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!groot,\c!klein] + [\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!big,\c!small] \docommando \let\c!text\c!savedtext \ifdone @@ -2342,7 +2391,7 @@ {\doifundefined{\@size@\getvalue{\??ft#1##1}} {\defineunknownfont{\getvalue{\??ft#1##1}}}}% \processcommalist - [\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!groot,\c!klein] + [\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!big,\c!small] \defineunknownsubfont \definingunknownfontfalse \fi @@ -2363,15 +2412,15 @@ %D A previous implementation used: %D -%D \starttypen +%D \starttyping %D \type {\setvalue{name}{\donottest...}} -%D \stoptypen +%D \stoptyping %D %D instead of the more memory hungry: %D -%D \starttypen +%D \starttyping %D \unexpanded\setvalue{name}{...} -%D \stoptypen +%D \stoptyping %D %D The first alternative saves about 500 hash entries (about %D 2.5\% of the total number of entries used. The second @@ -2392,15 +2441,15 @@ %D At the system level one can initialize thing like: %D -%D \starttypen +%D \starttyping %D \appendtoks \setupspacing \to \everybodyfont -%D \stoptypen +%D \stoptyping %D %D While users can add their own non standard commands like: %D -%D \starttypen +%D \starttyping %D \Everybodyfont{\message{changing to bodyfont \the\bodyfontsize}} -%D \stoptypen +%D \stoptyping %D %D Personnaly I never felt the need for such extensions, but %D at least its possible. @@ -2572,9 +2621,9 @@ %D loaded, but not accessible yet by name. This is accomplished %D by saying: %D -%D \starttypen +%D \starttyping %D \font\preloaded=cmr10 at 11pt -%D \stoptypen +%D \stoptyping %D %D and using the name \type{\preloaded} again and again, so %D fonts are indeed loaded, but unnamed, and therefore @@ -2630,7 +2679,7 @@ %D bodyfont size. \def\dosetfont#1#2% #1 = set/switch state - {\doifelse{#2}\v!globaal + {\doifelse{#2}\v!global {\restoreglobalbodyfont} {\processcommacommand[#2]{\dodosetfont{#1}}% ##1 get also passed \ifloadingfonts\else @@ -2718,7 +2767,7 @@ % 0=never 1=everymath 2=always -\chardef\synchronizebigmathflag =1 +\chardef\synchronizebigmathflag=1 \appendtoks \ifcase\synchronizebigmathflag @@ -2728,7 +2777,7 @@ \or % always \fi -\to \everymath +\to \everymathematics \def\nobigmath{\chardef\synchronizebigmathflag 0 } \def\bigmath {\chardef\synchronizebigmathflag 2 \synchronizebigmath} @@ -3008,9 +3057,9 @@ %D result in: %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D Setting the main size involves the style list and therefore @@ -3031,10 +3080,10 @@ %D also use more verbose names like roman or sansserif. Such %D names are defined by: %D -%D \starttypen -%D \definefontstyle [serif, rm] [rm] -%D \definefontstyle [sansserif, ss] [ss] -%D \stoptypen +%D \starttyping +%D \definefontstyle [serif,rm] [rm] +%D \definefontstyle [sansserif,ss] [ss] +%D \stoptyping \def\dodefinefontstyle[#1][#2]% {\rawdoifinsetelse{#2}{\stylelist} @@ -3066,7 +3115,7 @@ %D neccessary to define the whole bunch of fonts, take for %D instance the sequence: %D -%D \starttypen +%D \starttyping %D \setupbodyfont %D [ams] %D @@ -3078,7 +3127,7 @@ %D [24pt] %D %D This is a 24pt $\blacktriangleleft$ -%D \stoptypen +%D \stoptyping %D %D Here we didn't define the 24 point bodyfont environment, so %D it's defined automatically. Of course one can always use the @@ -3114,16 +3163,16 @@ %D one can set the document bodyfont size, font family, style %D and/or options defined in files, for example: %D -%D \starttypen +%D \starttyping %D \setupbodyfont[cmr,ams,12pt,roman] -%D \stoptypen +%D \stoptyping %D %D This command affects the document as a whole: text, headers %D and footers. The second macro however affects only the text: %D -%D \starttypen +%D \starttyping %D \switchtobodyfont[10pt] -%D \stoptypen +%D \stoptyping %D %D So we've got: %D @@ -3268,11 +3317,11 @@ %D For switching a style but keeping the alternative, there %D is: %D -%D \starttypen +%D \starttyping %D {\bf text \switchstyleonly\ss text} %D {\bf text \switchstyleonly[ss]text} %D {\sl text \switchstyleonly[sansserif]text} -%D \stoptypen +%D \stoptyping \definecomplexorsimple\switchstyleonly @@ -3335,9 +3384,9 @@ %D to switch to a specific bodyfontsize. Just for the sake of %D compatibility we can define them like: %D -%D \starttypen +%D \starttyping %D \definebodyfontswitch [twelvepoint] [12pt] -%D \stoptypen +%D \stoptyping %D %D We don't support language specific synonyms here, mainly %D because \PLAIN\ \TEX\ is english anyway. @@ -3366,8 +3415,8 @@ \doswitchpoints[\fontstep]% \doswitchstyle[\fontstyle]} -\unexpanded\def\setsmallbodyfont{\setbodyfontstep\v!klein\the\everybodyfont} -\unexpanded\def\setbigbodyfont {\setbodyfontstep\v!groot\the\everybodyfont} +\unexpanded\def\setsmallbodyfont{\setbodyfontstep\v!small\the\everybodyfont} +\unexpanded\def\setbigbodyfont {\setbodyfontstep\v!big\the\everybodyfont} \unexpanded\def\setmainbodyfont {\doswitchpoints[\normalizedbodyfontsize]% @@ -3460,32 +3509,31 @@ %D here implement a mechanism for defining the keywords that %D present a particular style or alternative. %D -%D \starttypen +%D \starttyping %D \definealternativestyle [keywords] [\style] [\nostyle] -%D \stoptypen +%D \stoptyping %D %D The first command is used in the normal textflow, while the %D second command takes care of headings and alike. Consider %D the next two definitions: %D -%D \starttypen +%D \starttyping %D \definealternativestyle [bold] [\bf] [] -%D \definealternativestyle [cap] [\kap] [\kap] -%D \stoptypen +%D \definealternativestyle [cap] [\cap] [\cap] +%D \stoptyping %D %D A change \type{\bf} in a heading which is to be set in %D \type{\tfd} does not look that well, so therefore we leave %D the second argument of \type{\definealternativestyle} empty. %D When we capatalize characters using the pseudo small cap -%D command \type{\kap}, we want this to take effect in both +%D command \type{\cap}, we want this to take effect in both %D text and headings, which is accomplished by assigning both %D arguments. \def\dodefinealternativestyle[#1][#2][#3]% {\def\docommando##1% - {\doifundefined{##1} - {\setvalue{##1}{\groupedcommand{#2}{}}}% - \setvalue{\@letter@##1}{#2}% + {\doifundefined{##1}{\setvalue{##1}{\groupedcommand{#2}{}}}% + \setvalue{\@letter@ ##1}{#2}% \setvalue{\@noletter@##1}{#3}}% \processcommalist[#1]\docommando} @@ -3507,10 +3555,10 @@ %D or %D %D \startvoorbeeld -%D \definealternativestyle[bold][\bf][]\haalbuffer +%D \definealternativestyle[bold][\bf][]\getbuffer %D \stopvoorbeeld %D -%D Such definitions are of course unwanted for \type{\kap} +%D Such definitions are of course unwanted for \type{\cap} %D because this would result in an endless recursive call. %D Therefore we check on the existance of both the command and %D the substitution. The latter is needed because for instance @@ -3526,13 +3574,13 @@ %D After having defined such keywords, we can call for them by %D using %D -%D \starttypen +%D \starttyping %D \doconvertfont{keyword}{text} -%D \stoptypen +%D \stoptyping %D %D We deliberately pass an argument. This enables us to %D assign converters that handle one agrument, like -%D \type{\kap}. +%D \type{\cap}. %D %D By default the first specification is used to set the style, %D exept when we say \type{\dontconvertfont}, after which the @@ -3553,8 +3601,7 @@ \def\noconvertfont#1% #2% {\doifdefinedelse{\@noletter@#1} - {\doifelsenothing{#1}\gobbleoneargument\@@donoconvertfont} - {\firstofoneargument}% + {\doifelsenothing{#1}\gobbleoneargument\@@donoconvertfont}\gobbleoneargument {#1}} % {#2}} %D Extras: @@ -3580,10 +3627,10 @@ %D {\sl slanted} type over {\it italic}, we made the emphasis %D adaptable, for instance: %D -%D \starttypen +%D \starttyping %D \def\emphasistypeface {\it} %D \def\emphasisboldface {\bi} -%D \stoptypen +%D \stoptyping %D %D But we prefer: @@ -3593,9 +3640,9 @@ %D or even better: \def\doemphasistypeface#1#2% - {\doifelsevalue{\??ft\fontclass\normalizedbodyfontsize\c!em}\v!schuin#1% + {\doifelsevalue{\??ft\fontclass\normalizedbodyfontsize\c!em}\v!slanted#1% {\doifelsevalue{\??ft\fontclass\normalizedbodyfontsize\c!em}\v!italic#2% - {\doifelsevalue{\??ft \normalizedbodyfontsize\c!em}\v!schuin#1% + {\doifelsevalue{\??ft \normalizedbodyfontsize\c!em}\v!slanted#1% {\doifvalue {\??ft \normalizedbodyfontsize\c!em}\v!italic#2}}}} \def\emphasistypeface{\doemphasistypeface\sl\it} @@ -3719,9 +3766,9 @@ %D We get: %D %D \startvoorbeeld -%D \startopelkaar -%D \haalbuffer -%D \stopopelkaar +%D \startpacked +%D \getbuffer +%D \stoppacked %D \stopvoorbeeld %D \macros @@ -3741,9 +3788,9 @@ %D \stopbuffer %D %D \typebuffer -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \macros %D {setfont} @@ -3758,9 +3805,9 @@ %D One can call this macro as: %D -%D \starttypen +%D \starttyping %D \setfont cmr10 at 60pt -%D \stoptypen +%D \stoptyping %D %D After which the font is active and the baselines and %D struts are set. @@ -3789,7 +3836,7 @@ %D different fonts into a collection (typeface) and %D determining optimal baseline distances. %D -%D \showfontstrip \blanko \showminimalbaseline +%D \showfontstrip \blank \showminimalbaseline \fetchruntimecommand \showfontstrip {\f!fontprefix\s!run} \fetchruntimecommand \testminimalbaseline {\f!fontprefix\s!run} @@ -3832,7 +3879,7 @@ %D shown. Special characters like the \type {\skewchar} and %D \type {\hyphenchar} als marked. %D -%D \haalbuffer +%D \getbuffer % to be internationalized @@ -3847,9 +3894,9 @@ %D %D Individual glyphs can be accessed by using %D -%D \starttypen +%D \starttyping %D \getglyph{fontname}{character} -%D \stoptypen +%D \stoptyping %D %D This macro is used in for instance the symbol modules and %D as one can see, it does obey the small and even smaller @@ -3923,10 +3970,10 @@ %D For an example of usage of the following command, %D see \type {cont-log.tex}. %D -%D \starttypen +%D \starttyping %D \def\symbolicfont#1% %D {\definedfont[\glyphfontfile{#1} sa *]} -%D \stoptypen +%D \stoptyping %D %D Since we know what scaling it to be applied, we can %D implement a much faster alternative: @@ -3959,7 +4006,7 @@ %D The last implementation of \type {\getglyph} permits %D definitions like: %D -%D \starttypen +%D \starttyping %D \definefontsynonym [EuroSans] [eurose] %D \definefontsynonym [EuroSansBold] [euroseb] %D \definefontsynonym [EuroSansItalic] [eurosei] @@ -3970,13 +4017,13 @@ %D \definesymbol [euro] [\getglyph{Euro}{\char160}] %D %D \def\euro{\symbol[euro]} -%D \stoptypen +%D \stoptyping %D %D These definitions guarantee that the next calls work okay: %D -%D \starttypen +%D \starttyping %D \ss \tf\euro \bf\euro \sla\euro \itd\euro \bs\euro \bic\euro -%D \stoptypen +%D \stoptyping %D %D The shape as well as the size is adapted to the current %D environment. @@ -4068,9 +4115,9 @@ %D For instance we can say: %D -%D \starttypen +%D \starttyping %D \smashaccent{\"Uberhaupt} -%D \stoptypen +%D \stoptyping %D %D But normally one will use it as a prefix in definitions. %D The difference is in the height: @@ -4078,16 +4125,16 @@ %D \leavevmode\ruledhbox %D {\ruledhbox{\smashaccent{\"U}berhaupt}\quad %D oder\quad -%D \ruledhbox{\"Uberhaupt} +%D \ruledhbox{\"Uberhaupt}} %D \macros %D {moveaccent} %D %D Exact positioning of accents can be realized by saying: %D -%D \starttypen +%D \starttyping %D \moveaccent{-.1ex}{\"u}berhaupt -%D \stoptypen +%D \stoptyping %D %D Again, this one will mostly used as a prefix in definitions. %D Here the difference is in the position: @@ -4111,15 +4158,15 @@ %D also deal with different naming schemes. Confronted with %D this problem, I decided to change the definitions into: %D -%D \starttypen +%D \starttyping %D \definebodyfont [12pt] [rm] [tf=Times-Roman at 12pt] -%D \stoptypen +%D \stoptyping %D %D combined with for instance: %D -%D \starttypen +%D \starttyping %D \definefontsynonym [Times-Roman] [tir] -%D \stoptypen +%D \stoptyping %D Now we're up to some definitions. @@ -4135,10 +4182,10 @@ *=\currentfontscale, % wildcard \c!x=0.8, \c!xx=0.6, - \c!groot=1.2, - \c!klein=0.8, - \c!interlinie=, - \c!em=\v!schuin] + \c!big=1.2, + \c!small=0.8, + \c!interlinespace=, + \c!em=\v!slanted] \definebodyfontenvironment [20.7pt] @@ -4147,8 +4194,8 @@ \s!scriptscript=\!!twelvepoint, \c!x=17.3pt, \c!xx=\!!fourteenpointfour, - \c!groot=20.7pt, % !!!! - \c!klein=17.3pt] + \c!big=20.7pt, % !!!! + \c!small=17.3pt] \definebodyfontenvironment [17.3pt] @@ -4157,8 +4204,8 @@ \s!scriptscript=\!!tenpoint, \c!x=\!!fourteenpointfour, \c!xx=\!!twelvepoint, - \c!groot=20.7pt, - \c!klein=\!!fourteenpointfour] + \c!big=20.7pt, + \c!small=\!!fourteenpointfour] \definebodyfontenvironment [\!!fourteenpointfour] @@ -4167,8 +4214,8 @@ \s!scriptscript=\!!ninepoint, \c!x=\!!twelvepoint, \c!xx=\!!tenpoint, - \c!groot=17.3pt, - \c!klein=\!!twelvepoint] + \c!big=17.3pt, + \c!small=\!!twelvepoint] \definebodyfontenvironment [\!!twelvepoint] @@ -4177,8 +4224,8 @@ \s!scriptscript=\!!sevenpoint, \c!x=\!!tenpoint, \c!xx=\!!eightpoint, - \c!groot=\!!fourteenpointfour, - \c!klein=\!!tenpoint] + \c!big=\!!fourteenpointfour, + \c!small=\!!tenpoint] \definebodyfontenvironment [\!!elevenpoint] @@ -4187,8 +4234,8 @@ \s!scriptscript=\!!sixpoint, \c!x=\!!ninepoint, \c!xx=\!!sevenpoint, - \c!groot=\!!twelvepoint, - \c!klein=\!!ninepoint] + \c!big=\!!twelvepoint, + \c!small=\!!ninepoint] \definebodyfontenvironment [\!!tenpoint] @@ -4197,8 +4244,8 @@ \s!scriptscript=\!!fivepoint, \c!x=\!!eightpoint, \c!xx=\!!sixpoint, - \c!groot=\!!twelvepoint, - \c!klein=\!!eightpoint] + \c!big=\!!twelvepoint, + \c!small=\!!eightpoint] \definebodyfontenvironment [\!!ninepoint] @@ -4207,8 +4254,8 @@ \s!scriptscript=\!!fivepoint, \c!x=\!!sevenpoint, \c!xx=\!!fivepoint, - \c!groot=\!!elevenpoint, - \c!klein=\!!sevenpoint] + \c!big=\!!elevenpoint, + \c!small=\!!sevenpoint] \definebodyfontenvironment [\!!eightpoint] @@ -4217,8 +4264,8 @@ \s!scriptscript=\!!fivepoint, \c!x=\!!sixpoint, \c!xx=\!!fivepoint, - \c!groot=\!!tenpoint, - \c!klein=\!!sixpoint] + \c!big=\!!tenpoint, + \c!small=\!!sixpoint] \definebodyfontenvironment [\!!sevenpoint] @@ -4227,8 +4274,8 @@ \s!scriptscript=\!!fivepoint, \c!x=\!!sixpoint, \c!xx=\!!fivepoint, - \c!groot=\!!ninepoint, - \c!klein=\!!fivepoint] + \c!big=\!!ninepoint, + \c!small=\!!fivepoint] \definebodyfontenvironment [\!!sixpoint] @@ -4237,8 +4284,8 @@ \s!scriptscript=\!!fivepoint, \c!x=\!!fivepoint, \c!xx=\!!fivepoint, - \c!groot=\!!eightpoint, - \c!klein=\!!fivepoint] + \c!big=\!!eightpoint, + \c!small=\!!fivepoint] \definebodyfontenvironment [\!!fivepoint] @@ -4247,8 +4294,8 @@ \s!scriptscript=\!!fivepoint, \c!x=\!!fivepoint, \c!xx=\!!fivepoint, - \c!groot=\!!sevenpoint, - \c!klein=\!!fivepoint] + \c!big=\!!sevenpoint, + \c!small=\!!fivepoint] \definebodyfontenvironment [\!!fourpoint] @@ -4257,8 +4304,8 @@ \s!scriptscript=\!!fourpoint, \c!x=\!!fourpoint, \c!xx=\!!fourpoint, - \c!groot=\!!sixpoint, - \c!klein=\!!fourpoint] + \c!big=\!!sixpoint, + \c!small=\!!fourpoint] \definebodyfontswitch [fourteenpointfour] [\!!fourteenpointfour] \definebodyfontswitch [twelvepoint] [\!!twelvepoint] @@ -4291,29 +4338,31 @@ \definefontsize[\c!c] \definefontsize[\c!d] \definealternativestyle [\v!mediaeval] [\os] [] -\definealternativestyle [\v!normaal] [\tf] [] -\definealternativestyle [\v!vet] [\bf] [] +\definealternativestyle [\v!normal] [\tf] [] +\definealternativestyle [\v!bold] [\bf] [] \definealternativestyle [\v!type] [\tt] [] -\definealternativestyle [\v!schuin] [\sl] [] +\definealternativestyle [\v!slanted] [\sl] [] \definealternativestyle [\v!italic] [\it] [] -\definealternativestyle [\v!vetschuin,\v!schuinvet] [\bs] [] -\definealternativestyle [\v!vetitalic,\v!italicvet] [\bi] [] -\definealternativestyle [\v!klein,\v!kleinnormaal] [\tfx] [] -\definealternativestyle [\v!kleinvet] [\bfx] [] -\definealternativestyle [\v!kleintype] [\ttx] [] -\definealternativestyle [\v!kleinschuin] [\slx] [] -\definealternativestyle [\v!kleinvetschuin,\v!kleinschuinvet] [\bsx] [] -\definealternativestyle [\v!kleinvetitalic,\v!kleinitalicvet] [\bix] [] +\definealternativestyle [\v!boldslanted,\v!slantedbold] [\bs] [] +\definealternativestyle [\v!bolditalic,\v!italicbold] [\bi] [] +\definealternativestyle [\v!small,\v!smallnormal] [\tfx] [] +\definealternativestyle [\v!smallbold] [\bfx] [] +\definealternativestyle [\v!smalltype] [\ttx] [] +\definealternativestyle [\v!smallslanted] [\slx] [] +\definealternativestyle [\v!smallboldslanted,\v!smallslantedbold] [\bsx] [] +\definealternativestyle [\v!smallbolditalic,\v!smallitalicbold] [\bix] [] + +%D Slow but handy: -\definealternativestyle [\v!kleinkorps] [\setsmallbodyfont] [] -\definealternativestyle [\v!grootkorps] [\setbigbodyfont] [] +\definealternativestyle [\v!smallbodyfont] [\setsmallbodyfont] [] +\definealternativestyle [\v!bigbodyfont] [\setbigbodyfont] [] -%D We treat {\sc Small Caps} and \kap {Pseudo Caps} a bit -%D different. We also provide an \WOORD {uppercase} style. +%D We treat {\sc Small Caps} and \cap {Pseudo Caps} a bit +%D different. We also provide an \WORD {uppercase} style. -\definealternativestyle [\v!kap,\v!kapitaal] [\normalkap] [\normalkap] -\definealternativestyle [\v!smallcaps] [\sc] [\sc] -\definealternativestyle [\v!WOORD] [\WORD] [\WORD] +\definealternativestyle [\v!cap,\v!capital] [\smallcapped] [\smallcapped] +\definealternativestyle [\v!smallcaps] [\sc] [\sc] +\definealternativestyle [\v!WORD] [\WORD] [\WORD] %D \macros %D {...math} @@ -4379,7 +4428,7 @@ %D Some unused left||overs: %D -%D \starttypen +%D \starttyping %D \def\doiffontpresentelse#1#2#3% %D {\bgroup %D \batchmode\font\dummy=\truefontname{#1}\errorstopmode @@ -4387,5 +4436,5 @@ %D \ifx\lastfontname\nullfontname\egroup#3\else\egroup#2\fi} %D %D \def\abortiffontnotfound#1% -%D {\doiffontpresentelse{#1}{}{\showmessage{\m!fonts}{10}{\truefontname{#1}}\endinput}} -%D \stoptypen \ No newline at end of file +%D {\doiffontpresentelse{#1}{}{\showmessage\m!fonts{10}{\truefontname{#1}}\endinput}} +%D \stoptyping diff --git a/tex/context/base/font-map.tex b/tex/context/base/font-map.tex index 4d4362009..33e7fd7dd 100644 --- a/tex/context/base/font-map.tex +++ b/tex/context/base/font-map.tex @@ -1,5 +1,3 @@ -% NOT YET ADAPTED TO THE NEW FONT MACROS - %D \module %D [ file=font-map, %D version=1998.03.13, @@ -10,8 +8,10 @@ %D copyright=NTG Maps] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See licen-en.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See licen-en.pdf for +%C details. + +% NOT YET ADAPTED TO THE NEW FONT MACROS \startnotmode[localfonts] @@ -28,7 +28,7 @@ \definefontsynonym [SerifBoldItalic] [ftbi] [encoding=texnansi] \definefontsynonym [SerifBoldSlanted] [ftbi] [encoding=texnansi] \definefontsynonym [SerifCaps] [ptmrc9t] [encoding=texnansi] - + \definefontsynonym [Sans] [ftl] [encoding=texnansi] \definefontsynonym [SansBold] [ftb] [encoding=texnansi] \definefontsynonym [SansItalic] [ftli] [encoding=texnansi] @@ -36,7 +36,7 @@ \definefontsynonym [SansBoldItalic] [ftbi] [encoding=texnansi] \definefontsynonym [SansBoldSlanted] [ftbi] [encoding=texnansi] \definefontsynonym [SansCaps] [ftr] [encoding=texnansi] - + \definefontsynonym [BigSerif] [ptmr7t] [encoding=texnansi] \definefontsynonym [BigSerifSlanted] [ptmro7t] [encoding=texnansi] @@ -50,16 +50,16 @@ \stopmode \definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [rm] - [tf=Serif sa 1.06, - bf=SerifBold sa 1, - it=SerifItalic sa 1.06, - sl=SerifSlanted sa 1.06, - bi=SerifBoldItalic sa 1, - bs=SerifBoldSlanted sa 1, + [tf=Serif sa 1.06, + bf=SerifBold sa 1, + it=SerifItalic sa 1.06, + sl=SerifSlanted sa 1.06, + bi=SerifBoldItalic sa 1, + bs=SerifBoldSlanted sa 1, sc=SerifCaps sa 1.06] \definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm] - [tfa=BigSerif sa 1.200, + [tfa=BigSerif sa 1.200, tfb=BigSerif sa 1.440, tfc=BigSerif sa 1.728, tfd=BigSerif sa 2.074, diff --git a/tex/context/base/font-run.tex b/tex/context/base/font-run.tex index 1b2471a59..a30776cb8 100644 --- a/tex/context/base/font-run.tex +++ b/tex/context/base/font-run.tex @@ -58,11 +58,11 @@ \tabskip=\!!zeropoint\cr \noalign{\hrule} &\multispan{29}{\vrule\hfil\tttf\strut\title\hfil - \llap{\string\mr\hbox to 1em{\hss:\hss}$\mr \languageparameter\c!tekst$\quad}\vrule}\cr + \llap{\string\mr\hbox to 1em{\hss:\hss}$\mr \languageparameter\c!text$\quad}\vrule}\cr \noalign{\hrule}\next{}{\tt\string}{} - \noalign{\hrule}\next{\tt\string\rm}\rm{\languageparameter\c!tekst} - \noalign{\hrule}\next{\tt\string\ss}\ss{\languageparameter\c!tekst} - \noalign{\hrule}\next{\tt\string\tt}\tt{\languageparameter\c!tekst} + \noalign{\hrule}\next{\tt\string\rm}\rm{\languageparameter\c!text} + \noalign{\hrule}\next{\tt\string\ss}\ss{\languageparameter\c!text} + \noalign{\hrule}\next{\tt\string\tt}\tt{\languageparameter\c!text} \noalign{\hrule}}} \ifinsidefloat\else\stopbaselinecorrection\fi} @@ -79,9 +79,9 @@ &&\getvalue{\bodyfontvariable{##1\s!scriptscript}}% &&\getvalue{\bodyfontvariable{##1\c!x}}% &&\getvalue{\bodyfontvariable{##1\c!xx}}% - &&\getvalue{\bodyfontvariable{##1\interfaced\v!klein}}% - &&\getvalue{\bodyfontvariable{##1\interfaced\v!groot}}% - &&\getvalue{\bodyfontvariable{##1\c!interlinie}}&\cr + &&\getvalue{\bodyfontvariable{##1\interfaced\v!small}}% + &&\getvalue{\bodyfontvariable{##1\interfaced\v!big}}% + &&\getvalue{\bodyfontvariable{##1\c!interlinespace}}&\cr \noalign{\hrule}} \halign to \localhsize {##&\vrule##\strut @@ -94,8 +94,8 @@ &\multispan{17}{\vrule\hfil\tttf\strut\title\hfil}\vrule\cr \noalign{\hrule} &&\tttf\tx\s!text&&\tttf\tx\s!script&&\tttf\tx\s!scriptscript - &&\tttf\tx\c!x&&\tttf\tx\c!xx&&\tttf\tx\v!klein&&\tttf\tx\v!groot - &&\tttf\tx\c!interlinie&\cr + &&\tttf\tx\c!x&&\tttf\tx\c!xx&&\tttf\tx\v!small&&\tttf\tx\v!big + &&\tttf\tx\c!interlinespace&\cr \noalign{\hrule} \@EA\globalprocesscommalist\@EA[\bodyfontenvironmentlist]\next}} \ifinsidefloat\else\stopbaselinecorrection\fi} @@ -111,7 +111,7 @@ \gdef\doshowfont[#1]% {\bgroup - \setupcolors[\c!status=\v!lokaal]% + \setupcolors[\c!state=\v!local]% \iffirstargument \definefont[\s!dummy][#1]\dummy \else\ifdim2.5em>.05\hsize \tx @@ -175,7 +175,7 @@ \fi}} \stopoverlay}}} \par}} - {\tf\basegrid[\c!nx=16,\c!ny=16,\c!dx=2.5,\c!dy=2.5,\c!eenheid=em]} + {\tf\basegrid[\c!nx=16,\c!ny=16,\c!dx=2.5,\c!dy=2.5,\c!unit=em]} \stopoverlay \nointerlineskip \vskip2pt @@ -224,10 +224,10 @@ \gdef\showligatures[#1]% {\ifx\starttabulate\undefined - \blanko{\tttf \type {\showligatures} is only available in thr english interface}\blanko + \blank{\tttf \type {\showligatures} is only available in thr english interface}\blank \else \bgroup - \setupcolors[\c!status=\v!lokaal]% + \setupcolors[\c!state=\v!local]% \def\show##1{\hbox{\red\ruledhbox{\black##1}}}% \definefont[\s!dummy][#1]\dummy \starttabulate[|*{9}{c|}] @@ -244,7 +244,7 @@ \gdef\doshowfontstrip[#1]% {\ifx\starttabulate\undefined - \blanko{\tttf \type {\showfontstrip} is only available in thr english interface}\blanko + \blank{\tttf \type {\showfontstrip} is only available in thr english interface}\blank \else \bgroup \def\dofontstripa##1##2% @@ -300,7 +300,7 @@ \gdef\showminimalbaseline {\ifx\starttabulate\undefined - \blanko{\tttf \type {\showminimalbaseline} is only available in thr english interface}\blanko + \blank{\tttf \type {\showminimalbaseline} is only available in thr english interface}\blank \else \starttabulate[||T|T|T|T|T|T|T|T|T|] \testminimalbaseline{\hbox to 1em{\hss\showstruts\strut\hss}}% @@ -323,4 +323,4 @@ \expanded{\withoutpt\the\nextboxdp})}% \hbox} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/font-uni.tex b/tex/context/base/font-uni.tex index a9f87e28c..381fa2fdf 100644 --- a/tex/context/base/font-uni.tex +++ b/tex/context/base/font-uni.tex @@ -13,7 +13,7 @@ \writestatus{loading}{Context Font Macros / UNICODE Support} -%D I wrote this module when \WangLei\ asked me how to use +%D I wrote this module when Wang Lei asked me how to use %D Chinese in \CONTEXT. From the samples he sent me, I deduced %D that some mixture of one and two byte encoding was used, %D which he confirmed. Since \TEX\ normally does not use the @@ -71,10 +71,10 @@ %D %D There are two commands to handle unicode characters: %D -%D \starttypen +%D \starttyping %D \handleunicodeflowglyph{number}{character} %D \uchar{number}{number} -%D \stoptypen +%D \stoptyping %D %D The first one can be assigned to an active character, the %D second one can be used to directly access a glyph. Both @@ -252,9 +252,9 @@ %D access the glyph in that font. This means that a particular %D font is split up in subfonts with names in the range: %D -%D \starttypen +%D \starttyping %D 80 ... ff -%D \stoptypen +%D \stoptyping %D %D The \type {} as well as the composed name are %D mapped ones. The next macros take care of this mapping. @@ -325,7 +325,7 @@ %D An example of a remapping is the following: %D -%D \starttypen +%D \starttyping %D \defineucharmapping{GBK}#1#2% %D {\unicodeposition=#1 %D \advance\unicodeposition -129 @@ -333,7 +333,7 @@ %D \advance\unicodeposition #2 %D \advance\unicodeposition-\ifnum#2>127 65\else64\fi %D \dorepositionunicode} -%D \stoptypen +%D \stoptyping %D %D This maps the GBK vector onto a compact GBK one. The %D auxiliary macro is defined here as a goody. @@ -354,14 +354,14 @@ %D A careful analysis of the previous macros, learns that the %D process of mapping comes down to: %D -%D \startopsomming[opelkaar,n] -%D \som taking care of preceding material (and spacing) -%D \som defining the font at \type {\currentfontscale} $\times$ +%D \startitemize[packed,n] +%D \item taking care of preceding material (and spacing) +%D \item defining the font at \type {\currentfontscale} $\times$ %D \type {\unicodescale} $\times$ \type {\bodyfontsize} -%D \som inserting a \type {\unicodestrut} -%D \som inserting the character (glyph) -%D \som executing some actions afterwards -%D \stopopsomming +%D \item inserting a \type {\unicodestrut} +%D \item inserting the character (glyph) +%D \item executing some actions afterwards +%D \stopitemize %D %D The actions before and after placing the glyph, is up to %D the user supplied handler. This handler (\type @@ -405,30 +405,30 @@ %D provide a more user friendly alternative. Given that one %D has defined: %D -%D \starttypen +%D \starttyping %D \defineunicodefont %D [SimChi] [SimplifiedChinese] -%D [ \c!schaal=0.85, -%D \c!hoogte=1.25, -%D \c!diepte=1.00, -%D \c!interlinie=yes, -%D \c!conversie=\chinesenumber, -%D \c!commando=\handlechineseunicodeglyph] -%D \stoptypen +%D [ \c!scale=0.85, +%D \c!height=1.25, +%D \c!depth=1.00, +%D \c!interlinespaceinterlinie=yes, +%D \c!conversion=\chinesenumber, +%D \c!command=\handlechineseunicodeglyph] +%D \stoptyping %D %D Together with: %D -%D \starttypen +%D \starttyping %D \definefontsynonym [SimplifiedChineseRegular] [gbsong] %D \definefontsynonym [SimplifiedChineseSlanted] [gbsongsl] -%D \stoptypen +%D \stoptyping %D %D we can now switch to Simplified Chinese by saying \type %D {SimChi}. Some values can be changed afterwards with %D -%D \starttypen +%D \starttyping %D \setupunicodefont[SimChi][...=...] -%D \stoptypen +%D \stoptyping %D %D Specific initializations can be assigned to \type %D {commands}. @@ -459,8 +459,8 @@ {\setupunicodefont[#1][#3]} {\copyparameters [\??uc#1][\??uc#3] - [\c!hoogte,\c!diepte,\c!schaal,\c!commandos, - \c!interlinie,\c!commando,\c!conversie]}}% + [\c!height,\c!depth,\c!scale,\c!commands, + \c!interlinespace,\c!command,\c!conversion]}}% \doifelsenothing{#2} {\setvalue{#1}{[uc font #1 undefined]}} {\setvalue{\??uc#1\c!file}{#2}% @@ -476,23 +476,23 @@ {\dodoubleempty\dosetupunicodefont} \def\dosetupunicodefont[#1][#2]% also predefines - {\doifundefined{\??uc#1\c!commando} + {\doifundefined{\??uc#1\c!command} {\copyparameters [\??uc#1][\??uc\s!default] - [\c!hoogte,\c!diepte,\c!schaal,\c!commandos, - \c!interlinie,\c!commando,\c!conversie]}% + [\c!height,\c!depth,\c!scale,\c!commands, + \c!interlinespace,\c!command,\c!conversion]}% \getparameters[\??uc#1][#2]} \def\enableunicodefont#1% {\definefontsynonym[\s!Unicode][\getvalue{\??uc#1\c!file}]% - \def\unicodescale {\getvalue{\??uc#1\c!schaal}}% - \def\unicodeheight {\getvalue{\??uc#1\c!hoogte}}% - \def\unicodedepth {\getvalue{\??uc#1\c!diepte}}% - \def\unicodedigits {\getvalue{\??uc#1\c!conversie}}% - \def\handleunicodeglyph {\getvalue{\??uc#1\c!commando}}% + \def\unicodescale {\getvalue{\??uc#1\c!scale}}% + \def\unicodeheight {\getvalue{\??uc#1\c!height}}% + \def\unicodedepth {\getvalue{\??uc#1\c!depth}}% + \def\unicodedigits {\getvalue{\??uc#1\c!conversion}}% + \def\handleunicodeglyph {\getvalue{\??uc#1\c!command}}% \enableregime[unicode]% the following \relax's are realy needed - \doifvalue{\??uc#1\c!interlinie}\v!ja\setupinterlinespace\relax - \getvalue{\??uc#1\c!commandos}\relax} + \doifvalue{\??uc#1\c!interlinespace}\v!yes\setupinterlinespace\relax + \getvalue{\??uc#1\c!commands}\relax} %D \macros %D {unicodedigits} @@ -513,11 +513,11 @@ \setupunicodefont [\s!default] - [\c!hoogte=1, - \c!diepte=1, - \c!schaal=1, - \c!interlinie=\v!ja, - \c!commando=\insertunicodeglyph, - \c!conversie=\number] + [\c!height=1, + \c!depth=1, + \c!scale=1, + \c!interlinespace=\v!yes, + \c!command=\insertunicodeglyph, + \c!conversion=\number] \protect \endinput diff --git a/tex/context/base/font-unk.tex b/tex/context/base/font-unk.tex index 66c5b92c5..dc17772f4 100644 --- a/tex/context/base/font-unk.tex +++ b/tex/context/base/font-unk.tex @@ -160,4 +160,4 @@ %D mapped onto real file names (or names that themselves are %D mapped). -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/font-vnr.tex b/tex/context/base/font-vnr.tex index d9e4a3b67..c3d7f190b 100644 --- a/tex/context/base/font-vnr.tex +++ b/tex/context/base/font-vnr.tex @@ -1,5 +1,3 @@ -% NOT YET ADAPTED TO THE NEW FONT MACROS - %D \module %D [ file=font-vnr, %D version=1999.12.12, @@ -10,10 +8,12 @@ %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. + +% NOT YET ADAPTED TO THE NEW FONT MACROS -% to do +% to do \definefontsynonym [Serif] [vnb10] [encoding=x5] \definefontsynonym [SerifBold] [vnb10] [encoding=x5] @@ -44,11 +44,11 @@ \definefontsynonym [MathItalic] [cmmi10] \definefontsynonym [MathSymbol] [cmsy10] -\definefontsynonym [OldStyle] [MathItalic] +\definefontsynonym [OldStyle] [MathItalic] -\definebodyfont - [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] - [rm,ss,tt,mm] +\definebodyfont + [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] + [rm,ss,tt,mm] [default] \endinput diff --git a/tex/context/base/hand-def.tex b/tex/context/base/hand-def.tex index 5c6593e0e..ece8bb13e 100644 --- a/tex/context/base/hand-def.tex +++ b/tex/context/base/hand-def.tex @@ -2,7 +2,7 @@ %D [ file=hand-def, % was enco-pro %D version=2000.29.09, %D title=\CONTEXT\ Handling Macros, -%D subtitle=Default Protruding Factors, +%D subtitle=Default Protruding Factors, %D author=Hans Hagen, %D date=\currentdate, %D copyright=Hans Hagen] @@ -11,8 +11,8 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D This is an experimental definition file. The protruding -%D values we use here are those found from \THANH's thesis. +%D This is an experimental definition file. The protruding +%D values we use here are those found from \THANH's thesis. \startfonthandling [pure] @@ -23,8 +23,8 @@ \defineprotrudefactor - 0 1 \defineprotrudefactor hyphen 0 1 - \defineprotrudefactor endash 0 .5 - \defineprotrudefactor emdash 0 .33 % .5 + \defineprotrudefactor endash 0 .5 + \defineprotrudefactor emdash 0 .33 % .5 \stopfonthandling @@ -33,9 +33,9 @@ \defineprotrudefactor ! 0 .2 \defineprotrudefactor ' 0 .7 \defineprotrudefactor ` .7 0 - \defineprotrudefactor ( .05 0 + \defineprotrudefactor ( .05 0 \defineprotrudefactor ) 0 .05 - \defineprotrudefactor [ .05 0 + \defineprotrudefactor [ .05 0 \defineprotrudefactor ] 0 .05 \defineprotrudefactor , 0 .7 \defineprotrudefactor - 0 .7 @@ -44,9 +44,9 @@ \defineprotrudefactor ; 0 .5 \defineprotrudefactor rightupperninequote 0 .5 - \defineprotrudefactor leftupperninequote .5 0 - \defineprotrudefactor endash 0 .3 - \defineprotrudefactor emdash 0 .2 + \defineprotrudefactor leftupperninequote .5 0 + \defineprotrudefactor endash 0 .3 + \defineprotrudefactor emdash 0 .2 \defineprotrudefactor hyphen 0 .7 @@ -57,17 +57,17 @@ \defineprotrudefactor A .05 .05 \defineprotrudefactor F 0 .05 \defineprotrudefactor J .05 0 - \defineprotrudefactor K 0 .05 + \defineprotrudefactor K 0 .05 \defineprotrudefactor L 0 .05 \defineprotrudefactor T .05 .05 \defineprotrudefactor V .05 .05 \defineprotrudefactor W .05 .05 \defineprotrudefactor X .05 .05 \defineprotrudefactor Y .05 .05 - - \defineprotrudefactor k 0 .05 + + \defineprotrudefactor k 0 .05 \defineprotrudefactor r 0 .05 - \defineprotrudefactor t 0 .05 + \defineprotrudefactor t 0 .05 \defineprotrudefactor v .05 .05 \defineprotrudefactor w .05 .05 \defineprotrudefactor x .05 .05 @@ -77,247 +77,310 @@ \startfonthandling [extended] - \inheritprotrudefactor Acircumflex A - \inheritprotrudefactor acircumflex a - \inheritprotrudefactor Ccircumflex C - \inheritprotrudefactor ccircumflex c - \inheritprotrudefactor Ecircumflex E - \inheritprotrudefactor ecircumflex e - \inheritprotrudefactor Gcircumflex G - \inheritprotrudefactor gcircumflex g - \inheritprotrudefactor Hcircumflex H - \inheritprotrudefactor hcircumflex h - \inheritprotrudefactor Icircumflex I - \inheritprotrudefactor icircumflex i - \inheritprotrudefactor Jcircumflex J - \inheritprotrudefactor jcircumflex j - \inheritprotrudefactor Ocircumflex O - \inheritprotrudefactor ocircumflex o - \inheritprotrudefactor Scircumflex S - \inheritprotrudefactor scircumflex s - \inheritprotrudefactor Ucircumflex U - \inheritprotrudefactor ucircumflex u - \inheritprotrudefactor Wcircumflex W - \inheritprotrudefactor wcircumflex w - \inheritprotrudefactor Ycircumflex Y - \inheritprotrudefactor ycircumflex y - - \inheritprotrudefactor Agrave A - \inheritprotrudefactor agrave a - \inheritprotrudefactor Egrave E - \inheritprotrudefactor egrave e - \inheritprotrudefactor Igrave I - \inheritprotrudefactor igrave i - \inheritprotrudefactor Ograve O - \inheritprotrudefactor ograve o - \inheritprotrudefactor Ugrave U - \inheritprotrudefactor ugrave u - \inheritprotrudefactor Ygrave Y - \inheritprotrudefactor ygrave y - - \inheritprotrudefactor Atilde A - \inheritprotrudefactor atilde a - \inheritprotrudefactor Itilde I - \inheritprotrudefactor itilde i - \inheritprotrudefactor Ntilde N - \inheritprotrudefactor ntilde n - \inheritprotrudefactor Otilde O - \inheritprotrudefactor otilde o - \inheritprotrudefactor Utilde U - \inheritprotrudefactor utilde u - - \inheritprotrudefactor Adiaeresis A - \inheritprotrudefactor adiaeresis a - \inheritprotrudefactor Ediaeresis E - \inheritprotrudefactor ediaeresis e - \inheritprotrudefactor Idiaeresis I - \inheritprotrudefactor idiaeresis i - \inheritprotrudefactor Odiaeresis O - \inheritprotrudefactor odiaeresis o - \inheritprotrudefactor Udiaeresis U - \inheritprotrudefactor udiaeresis u - \inheritprotrudefactor Ydiaeresis Y - \inheritprotrudefactor ydiaeresis y - - \inheritprotrudefactor Aacute A - \inheritprotrudefactor aacute a - \inheritprotrudefactor Cacute C - \inheritprotrudefactor cacute c - \inheritprotrudefactor Eacute E - \inheritprotrudefactor eacute e - \inheritprotrudefactor Iacute I - \inheritprotrudefactor iacute i - \inheritprotrudefactor Lacute L - \inheritprotrudefactor lacute l - \inheritprotrudefactor Nacute N - \inheritprotrudefactor nacute n - \inheritprotrudefactor Oacute O - \inheritprotrudefactor oacute o - \inheritprotrudefactor Racute R - \inheritprotrudefactor racute r - \inheritprotrudefactor Sacute s - \inheritprotrudefactor sacute s - \inheritprotrudefactor Uacute U - \inheritprotrudefactor uacute u - \inheritprotrudefactor Yacute Y - \inheritprotrudefactor yacute y - \inheritprotrudefactor Zacute Z - \inheritprotrudefactor zacute z - - \inheritprotrudefactor Dstroke D - \inheritprotrudefactor dstroke d - \inheritprotrudefactor Hstroke H - \inheritprotrudefactor hstroke h - \inheritprotrudefactor Tstroke T - \inheritprotrudefactor tstroke t - - \inheritprotrudefactor Cdotaccent C - \inheritprotrudefactor cdotaccent c - \inheritprotrudefactor Edotaccent E - \inheritprotrudefactor edotaccent e - \inheritprotrudefactor Gdotaccent G - \inheritprotrudefactor gdotaccent g - \inheritprotrudefactor Idotaccent I - \inheritprotrudefactor idotaccent i - \inheritprotrudefactor Zdotaccent Z - \inheritprotrudefactor zdotaccent z - - \inheritprotrudefactor Amacron A - \inheritprotrudefactor amacron a - \inheritprotrudefactor Emacron E - \inheritprotrudefactor emacron e - \inheritprotrudefactor Imacron I - \inheritprotrudefactor imacron i - \inheritprotrudefactor Omacron O - \inheritprotrudefactor omacron o - \inheritprotrudefactor Umacron U - \inheritprotrudefactor umacron u - - \inheritprotrudefactor Ccedilla C - \inheritprotrudefactor ccedilla c - \inheritprotrudefactor Kcedilla K - \inheritprotrudefactor kcedilla k - \inheritprotrudefactor Lcedilla L - \inheritprotrudefactor lcedilla l - \inheritprotrudefactor Ncedilla N - \inheritprotrudefactor ncedilla n - \inheritprotrudefactor Rcedilla R - \inheritprotrudefactor rcedilla r - \inheritprotrudefactor Scedilla S - \inheritprotrudefactor scedilla s - \inheritprotrudefactor Tcedilla T - \inheritprotrudefactor tcedilla t - - \inheritprotrudefactor Ohungarumlaut O - \inheritprotrudefactor ohungarumlaut o - \inheritprotrudefactor Uhungarumlaut U - \inheritprotrudefactor uhungarumlaut u - - \inheritprotrudefactor Aogonek A - \inheritprotrudefactor aogonek a - \inheritprotrudefactor Eogonek E - \inheritprotrudefactor eogonek e - \inheritprotrudefactor Iogonek I - \inheritprotrudefactor iogonek i - \inheritprotrudefactor Uogonek U - \inheritprotrudefactor uogonek u - - \inheritprotrudefactor Aring A - \inheritprotrudefactor aring a - \inheritprotrudefactor Uring U - \inheritprotrudefactor uring u - - \inheritprotrudefactor Abreve A - \inheritprotrudefactor abreve a - \inheritprotrudefactor Ebreve E - \inheritprotrudefactor ebreve e - \inheritprotrudefactor Gbreve G - \inheritprotrudefactor gbreve g - \inheritprotrudefactor Ibreve I - \inheritprotrudefactor ibreve i - \inheritprotrudefactor Obreve O - \inheritprotrudefactor obreve o - \inheritprotrudefactor Ubreve U - \inheritprotrudefactor ubreve u - - \inheritprotrudefactor Ccaron C - \inheritprotrudefactor ccaron c - \inheritprotrudefactor Dcaron D - \inheritprotrudefactor dcaron d - \inheritprotrudefactor Ecaron E - \inheritprotrudefactor ecaron e - \inheritprotrudefactor Lcaron L - \inheritprotrudefactor lcaron l - \inheritprotrudefactor Ncaron N - \inheritprotrudefactor ncaron n - \inheritprotrudefactor Rcaron R - \inheritprotrudefactor rcaron r - \inheritprotrudefactor Scaron S - \inheritprotrudefactor scaron s - \inheritprotrudefactor Tcaron T - \inheritprotrudefactor tcaron t - \inheritprotrudefactor Ycaron Y - \inheritprotrudefactor ycaron y - \inheritprotrudefactor Zcaron Z - \inheritprotrudefactor zcaron z - - \inheritprotrudefactor AEligature E - \inheritprotrudefactor aeligature e - \inheritprotrudefactor Lstroke I - \inheritprotrudefactor lstroke o - \inheritprotrudefactor Ostroke O - \inheritprotrudefactor ostroke o - \inheritprotrudefactor OEligature O - \inheritprotrudefactor oeligature o - - \inheritprotrudefactor Ssharp S - \inheritprotrudefactor ssharp s - \inheritprotrudefactor IJligature J - \inheritprotrudefactor ijligature j - - \inheritprotrudefactor aumlaut a - \inheritprotrudefactor eumlaut e - \inheritprotrudefactor iumlaut i - \inheritprotrudefactor oumlaut o - \inheritprotrudefactor uumlaut u - - \inheritprotrudefactor Aumlaut A - \inheritprotrudefactor Eumlaut E - \inheritprotrudefactor Iumlaut I - \inheritprotrudefactor Oumlaut O - \inheritprotrudefactor Uumlaut U - - \inheritprotrudefactor Lslash L - \inheritprotrudefactor lslash l - \inheritprotrudefactor Dslash D - \inheritprotrudefactor dslash d - \inheritprotrudefactor Oslash O - \inheritprotrudefactor oslash o - - \inheritprotrudefactor Eszett S - \inheritprotrudefactor eszett s - - \inheritprotrudefactor Thorn P - \inheritprotrudefactor thorn p + \inherithandling Acircumflex A + \inherithandling acircumflex a + \inherithandling Ccircumflex C + \inherithandling ccircumflex c + \inherithandling Ecircumflex E + \inherithandling ecircumflex e + \inherithandling Gcircumflex G + \inherithandling gcircumflex g + \inherithandling Hcircumflex H + \inherithandling hcircumflex h + \inherithandling Icircumflex I + \inherithandling icircumflex i + \inherithandling Jcircumflex J + \inherithandling jcircumflex j + \inherithandling Ocircumflex O + \inherithandling ocircumflex o + \inherithandling Scircumflex S + \inherithandling scircumflex s + \inherithandling Ucircumflex U + \inherithandling ucircumflex u + \inherithandling Wcircumflex W + \inherithandling wcircumflex w + \inherithandling Ycircumflex Y + \inherithandling ycircumflex y + + \inherithandling Agrave A + \inherithandling agrave a + \inherithandling Egrave E + \inherithandling egrave e + \inherithandling Igrave I + \inherithandling igrave i + \inherithandling Ograve O + \inherithandling ograve o + \inherithandling Ugrave U + \inherithandling ugrave u + \inherithandling Ygrave Y + \inherithandling ygrave y + + \inherithandling Atilde A + \inherithandling atilde a + \inherithandling Itilde I + \inherithandling itilde i + \inherithandling Ntilde N + \inherithandling ntilde n + \inherithandling Otilde O + \inherithandling otilde o + \inherithandling Utilde U + \inherithandling utilde u + + \inherithandling Adiaeresis A + \inherithandling adiaeresis a + \inherithandling Ediaeresis E + \inherithandling ediaeresis e + \inherithandling Idiaeresis I + \inherithandling idiaeresis i + \inherithandling Odiaeresis O + \inherithandling odiaeresis o + \inherithandling Udiaeresis U + \inherithandling udiaeresis u + \inherithandling Ydiaeresis Y + \inherithandling ydiaeresis y + + \inherithandling Aacute A + \inherithandling aacute a + \inherithandling Cacute C + \inherithandling cacute c + \inherithandling Eacute E + \inherithandling eacute e + \inherithandling Iacute I + \inherithandling iacute i + \inherithandling Lacute L + \inherithandling lacute l + \inherithandling Nacute N + \inherithandling nacute n + \inherithandling Oacute O + \inherithandling oacute o + \inherithandling Racute R + \inherithandling racute r + \inherithandling Sacute s + \inherithandling sacute s + \inherithandling Uacute U + \inherithandling uacute u + \inherithandling Yacute Y + \inherithandling yacute y + \inherithandling Zacute Z + \inherithandling zacute z + + \inherithandling Dstroke D + \inherithandling dstroke d + \inherithandling Hstroke H + \inherithandling hstroke h + \inherithandling Tstroke T + \inherithandling tstroke t + + \inherithandling Cdotaccent C + \inherithandling cdotaccent c + \inherithandling Edotaccent E + \inherithandling edotaccent e + \inherithandling Gdotaccent G + \inherithandling gdotaccent g + \inherithandling Idotaccent I + \inherithandling idotaccent i + \inherithandling Zdotaccent Z + \inherithandling zdotaccent z + + \inherithandling Amacron A + \inherithandling amacron a + \inherithandling Emacron E + \inherithandling emacron e + \inherithandling Imacron I + \inherithandling imacron i + \inherithandling Omacron O + \inherithandling omacron o + \inherithandling Umacron U + \inherithandling umacron u + + \inherithandling Ccedilla C + \inherithandling ccedilla c + \inherithandling Kcedilla K + \inherithandling kcedilla k + \inherithandling Lcedilla L + \inherithandling lcedilla l + \inherithandling Ncedilla N + \inherithandling ncedilla n + \inherithandling Rcedilla R + \inherithandling rcedilla r + \inherithandling Scedilla S + \inherithandling scedilla s + \inherithandling Tcedilla T + \inherithandling tcedilla t + + \inherithandling Ohungarumlaut O + \inherithandling ohungarumlaut o + \inherithandling Uhungarumlaut U + \inherithandling uhungarumlaut u + + \inherithandling Aogonek A + \inherithandling aogonek a + \inherithandling Eogonek E + \inherithandling eogonek e + \inherithandling Iogonek I + \inherithandling iogonek i + \inherithandling Uogonek U + \inherithandling uogonek u + + \inherithandling Aring A + \inherithandling aring a + \inherithandling Uring U + \inherithandling uring u + + \inherithandling Abreve A + \inherithandling abreve a + \inherithandling Ebreve E + \inherithandling ebreve e + \inherithandling Gbreve G + \inherithandling gbreve g + \inherithandling Ibreve I + \inherithandling ibreve i + \inherithandling Obreve O + \inherithandling obreve o + \inherithandling Ubreve U + \inherithandling ubreve u + + \inherithandling Ccaron C + \inherithandling ccaron c + \inherithandling Dcaron D + \inherithandling dcaron d + \inherithandling Ecaron E + \inherithandling ecaron e + \inherithandling Lcaron L + \inherithandling lcaron l + \inherithandling Ncaron N + \inherithandling ncaron n + \inherithandling Rcaron R + \inherithandling rcaron r + \inherithandling Scaron S + \inherithandling scaron s + \inherithandling Tcaron T + \inherithandling tcaron t + \inherithandling Ycaron Y + \inherithandling ycaron y + \inherithandling Zcaron Z + \inherithandling zcaron z + + \inherithandling AEligature E + \inherithandling aeligature e + \inherithandling Lstroke I + \inherithandling lstroke o + \inherithandling Ostroke O + \inherithandling ostroke o + \inherithandling OEligature O + \inherithandling oeligature o + + \inherithandling Ssharp S + \inherithandling ssharp s + \inherithandling IJligature J + \inherithandling ijligature j + + \inherithandling aumlaut a + \inherithandling eumlaut e + \inherithandling iumlaut i + \inherithandling oumlaut o + \inherithandling uumlaut u + + \inherithandling Aumlaut A + \inherithandling Eumlaut E + \inherithandling Iumlaut I + \inherithandling Oumlaut O + \inherithandling Uumlaut U + + \inherithandling Lslash L + \inherithandling lslash l + \inherithandling Dslash D + \inherithandling dslash d + \inherithandling Oslash O + \inherithandling oslash o + + \inherithandling Eszett S + \inherithandling eszett s + + \inherithandling Thorn P + \inherithandling thorn p \stopfonthandling -\unprotect +\startfonthandling [hz] + + \defineadjustfactor A .5 + \defineadjustfactor B .7 + \defineadjustfactor C .7 + \defineadjustfactor D .5 + \defineadjustfactor E .7 + \defineadjustfactor F .7 + \defineadjustfactor G .5 + \defineadjustfactor H .7 + \defineadjustfactor K .7 + \defineadjustfactor M .7 + \defineadjustfactor N .7 + \defineadjustfactor O .5 + \defineadjustfactor P .7 + \defineadjustfactor Q .5 + \defineadjustfactor R .7 + \defineadjustfactor S .7 + \defineadjustfactor U .7 + \defineadjustfactor W .7 + \defineadjustfactor Z .7 -\definefonthandling [pure] [pure] + \defineadjustfactor a .7 + \defineadjustfactor b .7 + \defineadjustfactor c .7 + \defineadjustfactor d .7 + \defineadjustfactor e .7 + \defineadjustfactor g .7 + \defineadjustfactor h .7 + \defineadjustfactor k .7 + \defineadjustfactor m .7 + \defineadjustfactor n .7 + \defineadjustfactor o .7 + \defineadjustfactor p .7 + \defineadjustfactor q .7 + \defineadjustfactor s .7 + \defineadjustfactor u .7 + \defineadjustfactor w .7 + \defineadjustfactor z .7 + + \defineadjustfactor 2 .7 + \defineadjustfactor 3 .7 + \defineadjustfactor 6 .7 + \defineadjustfactor 8 .7 + \defineadjustfactor 9 .7 + +% \defineadjustfactor hyphen ? +% \defineadjustfactor endash ? +% \defineadjustfactor emdash ? + +\stopfonthandling -% slanted/italic is yet incomplete +\unprotect -\definefonthandling [normal] [punctuation,alpha,extended] -\definefonthandling [bold] [punctuation,alpha,extended] -\definefonthandling [slanted] [punctuation] [\c!rechts=1.5] -\definefonthandling [italic] [punctuation] [\c!rechts=1.5] -\definefonthandling [boldslanted] [punctuation] [\c!rechts=1.5] -\definefonthandling [bolditalic] [punctuation] [\c!rechts=1.5] +% beware: extended extends the preceding vector (both protruding and +% adjusting) but as long as the normal ascii characters are not set +% beforehand, they default to normal -% A special case of guillemots, beware: when used ungriuped, -% it overloads all successive (current) encoding vector -% instances! +% protruding variants -- slanted/italic is yet incomplete + +\definefonthandling [pure] [pure] [\c!type=\v!hanging] +\definefonthandling [normal] [punctuation,alpha,extended] [\c!type=\v!hanging] +\definefonthandling [bold] [punctuation,alpha,extended] [\c!type=\v!hanging] +\definefonthandling [slanted] [punctuation] [\c!type=\v!hanging,\c!right=1.5] +\definefonthandling [italic] [punctuation] [\c!type=\v!hanging,\c!right=1.5] +\definefonthandling [boldslanted] [punctuation] [\c!type=\v!hanging,\c!right=1.5] +\definefonthandling [bolditalic] [punctuation] [\c!type=\v!hanging,\c!right=1.5] + +% hz variants + +\definefonthandling [hz] [hz,extended] [\c!type=\v!hz] + +% combined variants + +\definefonthandling [quality] [hz,pure] + +% A special case of guillemots, beware: when used ungrouped, +% it overloads all successive (current) encoding vector +% instances! Will be obsolete soon. \startfonthandling [glm] @@ -326,6 +389,8 @@ \overloadcharacter leftguillemot {\defaultcharacter\leftguillemot } \overloadcharacter rightguillemot {\defaultcharacter\rightguillemot } -\stopfonthandling +\stopfonthandling + +\definefonthandling [glm] [glm] -\protect \endinput +\protect \endinput diff --git a/tex/context/base/hand-ini.tex b/tex/context/base/hand-ini.tex index e79a71145..305c38a1a 100644 --- a/tex/context/base/hand-ini.tex +++ b/tex/context/base/hand-ini.tex @@ -8,92 +8,193 @@ %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 Handling Macros (ini)} -%D {\em This module is experimental and implements font +%D {\em This module is experimental and implements font %D specific features, like hanging punctuation.} -\unprotect +\unprotect -\startmessages dutch library: handlings - title: handling +\startmessages dutch library: handlings + title: handling 1: font afhandeling -- 2: font afhandeling -- wordt geladen 3: onbekende font afhandeling -- \stopmessages \startmessages english library: handlings - title: handling + title: handling 1: font handling -- 2: font handling -- is loaded 3: unknown font handling -- \stopmessages -\startmessages german library: handlings % to do - title: handling +\startmessages german library: handlings % to do + title: handling 1: font handling -- 2: font handling -- is loaded 3: unknown font handling -- \stopmessages -\startmessages czech library: handlings % to do - title: handling +\startmessages czech library: handlings % to do + title: handling 1: font handling -- 2: font handling -- is loaded 3: unknown font handling -- \stopmessages -\startmessages italian library: handlings % to do - title: handling +\startmessages italian library: handlings % to do + title: handling 1: font handling -- 2: font handling -- is loaded 3: unknown font handling -- \stopmessages -\startmessages norwegian library: handlings % to do - title: handling +\startmessages norwegian library: handlings % to do + title: handling 1: font handling -- 2: font handling -- is loaded 3: unknown font handling -- \stopmessages -\startmessages romanian library: handlings % to do - title: handling +\startmessages romanian library: handlings % to do + title: handling 1: font handling -- 2: font handling -- is loaded 3: unknown font handling -- \stopmessages +\newif\iftracefonthandling % \tracefonthandlingtrue + +\newif\ifskiphandlingdef \skiphandlingdeffalse + +\newdimen\adjustdimen \let\handledfont\font + +\ifx\undefined\pdfadjustspacing % we don't use pdftex + + \let\enableadjusting \relax + \let\disableadjusting \relax + \let\setadjusting \gobbletwoarguments + + \def\defineadjustfactor #1 #2 {} + \def\inheritadjustfactor #1 #2 {} + + \let\setfontadjusting \gobbleoneargument + +\else + + \def\enableadjusting {\pdfadjustspacing\plustwo} + \def\disableadjusting {\pdfadjustspacing\zerocount} + + \appendtoks \disableadjusting \to \everyforgetall % Here or not here? + + \def\dodefineadjustfactor#1#2 #3 % + {\ifskiphandlingdef \else + \doifelsenothing{#2} + {\doifnumberelse{\string#1} + {\dododefineadjustfactor {#1}{#3}} + {\dododefineadjustfactor{`#1}{#3}}} + {\pushmacro\char \let\char\empty + \doifnumberelse{\csname#1#2\endcsname} + {\dododefineadjustfactor{\csname#1#2\endcsname}{#3}} + \donothing + \popmacro\char}% + \fi} + + \def\doinheritadjustfactor#1 #2 % + {\ifskiphandlingdef \else + \pushmacro\char \let\char\empty + \doifnumberelse{\csname#1\endcsname} + {\dodoinheritadjustfactor{\csname#1\endcsname}{`#2}} + \donothing + \popmacro\char + \fi} + + \def\dododefineadjustfactor#1#2% + {\adjustdimen#2pt\multiply\adjustdimen\plusthousand\divide\adjustdimen\maxcard\relax + \efcode\handledfont#1\adjustdimen} + + \def\dodoinheritadjustfactor#1#2% + {\efcode\handledfont#1\efcode\handledfont#2\relax} + + \def\defineadjustfactor#1 #2 % + {\setfonttoks + \let\inherithandling\inheritadjustfactor + \appendtoks\dodefineadjustfactor#1 #2 \to\fonttoks} + + \def\inheritadjustfactor#1 #2 % + {\setfonttoks + \appendtoks\doinheritadjustfactor#1 #2 \to\fonttoks} + + \ifnum\pdftexversion<120 + \let\@@pdfexpandbonus\plusthousand + \else + \def\@@pdfexpandbonus{autoexpand}% + \fi + + \def\setfontadjusting#1% + {\doifvalue{\@fha@\@fha@#1\c!type}\v!hz{\dosetfontadjusting{#1}}} + + \def\dosetfontadjusting#1% + {\iftracefonthandling\showfontadjusting{#1}\fi + \pdffontexpand\handledfont + \csname\@fha@\@fha@#1\c!min \endcsname\space + \csname\@fha@\@fha@#1\c!max \endcsname\space + \csname\@fha@\@fha@#1\c!step\endcsname\space + \@@pdfexpandbonus\relax} + + \def\showfontadjusting#1% + {\writestatus\m!handlings{[adjust]\space#1\space + \csname\@fha@\@fha@#1\c!min \endcsname/% + \csname\@fha@\@fha@#1\c!max \endcsname/% + \csname\@fha@\@fha@#1\c!step\endcsname\space + \fontname\handledfont}} +\fi + \newif\ifembasedprotruding \embasedprotrudingfalse -\newif\ifskipprotrudingdef \skipprotrudingdeffalse -\newdimen\lproddimen \newdimen\rproddimen \let\prodfont\font +\newdimen\lproddimen \newdimen\rproddimen \let\handledfont\font -\ifx\undefined\pdfprotrudechars % we don't use pdftex +\ifx\undefined\pdfprotrudechars % we don't use pdftex - \let\enableprotruding \relax - \let\disableprotruding \relax - \let\setprotrudingfactor \gobbletwoarguments + \let\enableprotruding \relax + \let\disableprotruding \relax + \let\setprotrudingfactor \gobbleoneargument - \def\defineprotrudefactor #1 #2 #3 {} - \def\inheritprotrudefactor #1 #2 {} + \def\defineprotrudefactor #1 #2 #3 {} + \def\inheritprotrudefactor #1 #2 {} \else - \def\enableprotruding {\pdfprotrudechars2\relax} - \def\disableprotruding{\pdfprotrudechars0\relax} + \def\enableprotruding {\pdfprotrudechars\plustwo} + \def\disableprotruding{\pdfprotrudechars\zerocount} + + \appendtoks \disableprotruding \to \everyforgetall % Here or not here? + + \lproddimen1000\onepoint \divide\lproddimen\maxcard + \rproddimen1000\onepoint \divide\rproddimen\maxcard - \appendtoks \disableprotruding \to \everyforgetall % Here or not here? + \def\setprotrudingfactor#1% + {\doifvalue{\@fha@\@fha@#1\c!type}\v!hanging{\dosetprotrudingfactor{#1}}} - \def\setprotrudingfactor#1#2% - {\lproddimen=#1pt\multiply\lproddimen\plusthousand\divide\lproddimen \!!maxcard\relax - \rproddimen=#2pt\multiply\rproddimen\plusthousand\divide\rproddimen \!!maxcard\relax} + \def\dosetprotrudingfactor#1% mo \onepoint instead of pt + {\lproddimen\csname\@fha@\@fha@#1\c!left\endcsname\s!pt + \multiply\lproddimen\plusthousand\divide\lproddimen\maxcard\relax + \rproddimen\csname\@fha@\@fha@#1\c!right\endcsname\s!pt + \multiply\rproddimen\plusthousand\divide\rproddimen\maxcard\relax + \iftracefonthandling\showprotrudingfactor{#1}\fi} + + \def\showprotrudingfactor#1% + {\writestatus\m!handlings{[protrude]\space#1\space + \csname\@fha@\@fha@#1\c!left \endcsname\space + \csname\@fha@\@fha@#1\c!right\endcsname\space + \fontname\handledfont}} \def\dodefineprotrudefactor#1#2 #3 #4 % - {\ifskipprotrudingdef \else + {\ifskiphandlingdef \else \doifelsenothing{#2} {\doifnumberelse{\string#1} {\dododefineprotrudefactor {#1}{#3}{#4}} @@ -101,16 +202,16 @@ {\pushmacro\char \let\char\empty \doifnumberelse{\csname#1#2\endcsname} {\dododefineprotrudefactor{\csname#1#2\endcsname}{#3}{#4}} - {}% + \donothing \popmacro\char}% \fi} \def\doinheritprotrudefactor#1 #2 % - {\ifskipprotrudingdef \else + {\ifskiphandlingdef \else \pushmacro\char \let\char\empty \doifnumberelse{\csname#1\endcsname} {\dodoinheritprotrudefactor{\csname#1\endcsname}{`#2}} - {}% + \donothing \popmacro\char \fi} @@ -118,14 +219,14 @@ % division before multiplication, else overflow with "sa>5" - \newdimen\protrudethreshhold \protrudethreshhold=36pt + \newdimen\protrudethreshold \protrudethreshold=36pt \def\redodefineprotrudefactor#1% - {\ifdim\fontdimen6\font>\protrudethreshhold + {\ifdim\fontdimen6\font>\protrudethreshold \divide\scratchdimen\fontdimen6\font - \multiply\scratchdimen\fontcharwd\prodfont#1\relax + \multiply\scratchdimen\fontcharwd\handledfont#1\relax \else - \multiply\scratchdimen\fontcharwd\prodfont#1\relax + \multiply\scratchdimen\fontcharwd\handledfont#1\relax \divide\scratchdimen\fontdimen6\font \fi} @@ -134,21 +235,23 @@ \ifembasedprotruding \else \redodefineprotrudefactor{#1}% \fi - \lpcode\prodfont#1\scratchdimen + \lpcode\handledfont#1\scratchdimen \scratchdimen#3\rproddimen \ifembasedprotruding \else \redodefineprotrudefactor{#1}% \fi - \rpcode\prodfont#1\scratchdimen} + \rpcode\handledfont#1\scratchdimen} \endETEX \beginTEX - \ifx\undefined\charbox \newbox\charbox \fi + \ifx\undefined\charbox \newbox\charbox \fi + + \def\protrudethreshold{36\onepoint} - \def\redodefineprotrudefactor - {\ifdim\fontdimen6\font>36pt + \def\redodefineprotrudefactor#1% + {\ifdim\fontdimen6\font>\protrudethreshold \divide\scratchdimen\fontdimen6\font \multiply\scratchdimen\wd\charbox \else @@ -157,110 +260,159 @@ \fi} \def\dododefineprotrudefactor#1#2#3% - {\setbox\charbox{\prodfont\char#1}% ! yet untested ! + {\setbox\charbox{\handledfont\char#1}% ! yet untested ! \scratchdimen#2\lproddimen \ifembasedprotruding \else \redodefineprotrudefactor \fi - \lpcode\prodfont#1\scratchdimen + \lpcode\handledfont#1\scratchdimen \scratchdimen#3\rproddimen \ifembasedprotruding \else \redodefineprotrudefactor \fi - \rpcode\prodfont#1\scratchdimen} - + \rpcode\handledfont#1\scratchdimen} + \endTEX \def\dodoinheritprotrudefactor#1#2% - {\lpcode\prodfont#1\lpcode\prodfont#2\relax - \rpcode\prodfont#1\rpcode\prodfont#2\relax} - -% \def\dodefinefonthandling[#1][#2][#3]% -% {\setvalue{\@fha@\@fha@#1}{#2}% -% \getparameters[\@fha@\@fha@#1][\c!links=1,\c!rechts=1,#3]} - + {\lpcode\handledfont#1\lpcode\handledfont#2\relax + \rpcode\handledfont#1\rpcode\handledfont#2\relax} + \def\defineprotrudefactor#1 #2 #3 % {\setfonttoks - \appendtoks\dodefineprotrudefactor#1 #2 #3 \to\fonttoks} + \let\inherithandling\inheritprotrudefactor + \appendtoks\dodefineprotrudefactor#1 #2 #3 \to\fonttoks} \def\inheritprotrudefactor#1 #2 % {\setfonttoks - \appendtoks\doinheritprotrudefactor#1 #2 \to\fonttoks} + \appendtoks\doinheritprotrudefactor#1 #2 \to\fonttoks} \fi -\setprotrudingfactor{1}{1} - \let\fonthandling\empty -\def\startfonthandling[#1]% - {\def\fonthandling{#1}% - \doifundefined{\@fha@\fonthandling} - {\getparameters[\@fha@\@fha@#1][\c!links=1,\c!rechts=1]% new - \expanded{\newtoks\csname\@fha@\fonthandling\endcsname}}} +\beginTEX + + \def\startfonthandling[#1]% + {\def\fonthandling{#1}% + \expandafter\ifx\csname\@fha@\fonthandling\endcsname\relax + \expandafter\newtoks\csname\@fha@\fonthandling\endcsname + \fi + \setfonttoks} -\def\stopfonthandling% +\endTEX + +\beginETEX + + \def\startfonthandling[#1]% + {\def\fonthandling{#1}% + \ifcsname\@fha@\fonthandling\endcsname\else + \expandafter\newtoks\csname\@fha@\fonthandling\endcsname + \fi + \setfonttoks} + +\endETEX + +\def\stopfonthandling {\let\fonthandling\empty} -\def\setfonttoks% +\def\setfonttoks {\@EA\let\@EA\fonttoks\csname\@fha@\fonthandling\endcsname} -\def\definefonthandling% +\def\definefonthandling {\dotripleempty\dodefinefonthandling} \def\dodefinefonthandling[#1][#2][#3]% - {\setvalue{\@fha@\@fha@#1}{#2}% - \getparameters[\@fha@\@fha@#1][\c!links=1,\c!rechts=1,#3]} + {\ifthirdargument + \setvalue{\@fha@\@fha@#1}{#2}% + \getparameters[\@fha@\@fha@#1][\c!type=\v!hanging,\c!left=1,\c!right=1,\c!min=20,\c!max=20,\c!step=5,#3]% + \else + \setvalue{\@fha@\@fha@\@fha@#1}{#2}% + \fi} -\def\setupfonthandling% +\def\setupfonthandling {\dodoubleempty\dosetupfonthandling} \def\dosetupfonthandling[#1][#2]% - {\getparameters[\@fha@\@fha@#1][#2]} + {\getparameters[\@fha@\@fha@#1][#2]} -\def\enablehandling% +\def\enablehandling {\dodoubleempty\doenablehandling} -\def\doenablehandling[#1][#2]% handling / symbolic fontname +\def\doenablehandling[#1][#2]% handling / symbolic fontname {\fastenablehandling{#1}{#2}} % for the moment the same as: - + \beginTEX -\def\fastenablehandling#1% +\def\fastenablehandling#1#2% + {\edef\askedfonthandling{#1}% + \edef\filoffonthandling{#2}% + \@EA\ifx\csname\@fha@\@fha@\@fha@\askedfonthandling\endcsname\relax + \@EA\ifx\csname\@fha@\@fha@\askedfonthandling\endcsname\relax + \@EAEAEA\nofastenablehandling + \else + \@EAEAEA\dofastenablehandling + \fi + \else + \@EA\redofastenablehandling + \fi} + +\def\xfastenablehandling#1% {\edef\askedfonthandling{#1}% - \@EA\ifx\csname\@fha@\@fha@\askedfonthandling\endcsname\relax - \expandafter\nofastenablehandling + \@EA\ifx\csname\@fha@\@fha@\askedfonthandling\endcsname + \@EA\nofastenablehandling \else - \expandafter\dofastenablehandling + \@EA\dofastenablehandling \fi} \endTEX \beginETEX \ifcsname -\def\fastenablehandling#1% also gets #2 passed +\def\fastenablehandling#1#2% also gets #2 passed + {\edef\askedfonthandling{#1}% + \edef\filoffonthandling{#2}% + \ifcsname\@fha@\@fha@\@fha@\askedfonthandling\endcsname + \@EA\redofastenablehandling + \else\ifcsname\@fha@\@fha@\askedfonthandling\endcsname + \@EAEAEA\dofastenablehandling + \else + \@EAEAEA\nofastenablehandling + \fi\fi} + +\def\xfastenablehandling#1% {\edef\askedfonthandling{#1}% \ifcsname\@fha@\@fha@\askedfonthandling\endcsname - \expandafter\dofastenablehandling + \@EA\dofastenablehandling \else - \expandafter\nofastenablehandling + \@EA\nofastenablehandling \fi} \endETEX -\def\dofastenablehandling#1% - {\setprotrudingfactor - {\csname\@fha@\@fha@\askedfonthandling\c!links \endcsname} - {\csname\@fha@\@fha@\askedfonthandling\c!rechts\endcsname}% +\newtoks\everyenablefonthandling + +\appendtoks + \setprotrudingfactor\askedfonthandling +\to \everyenablefonthandling + +\appendtoks + \setfontadjusting\askedfonthandling +\to \everyenablefonthandling + +\def\redofastenablehandling + {\edef\fonthandling{\csname\@fha@\@fha@\@fha@\askedfonthandling\endcsname}% + \rawprocesscommacommand[\fonthandling]\xfastenablehandling} + +\def\dofastenablehandling + {\the\everyenablefonthandling \edef\fonthandling{\csname\@fha@\@fha@\askedfonthandling\endcsname}% - \checkfonthandling{#1}% - \@EA\rawprocesscommalist\@EA[\fonthandling]\dodoenablehandling - \registerfonthandling{#1}} - -\def\nofastenablehandling#1% - {\setprotrudingfactor - {\csname\@fha@\@fha@\askedfonthandling\c!links \endcsname} - {\csname\@fha@\@fha@\askedfonthandling\c!rechts\endcsname}% + \checkfonthandling\filoffonthandling + \rawprocesscommacommand[\fonthandling]\dodoenablehandling + \registerfonthandling\filoffonthandling} + +\def\nofastenablehandling + {\the\everyenablefonthandling \let\fonthandling\askedfonthandling \dodoenablehandling\fonthandling} @@ -284,36 +436,46 @@ %D We must not use \type {\purefontname} here (was a bug)! -\def\checkfonthandling#1% we need a fast compare - {\doifelsevalue{#1\s!handling\c!file}{\fontname\font} - \skipprotrudingdeftrue\skipprotrudingdeffalse} +% not robust as long as tex reuses definitions internally +% +% \def\checkfonthandling#1% we need a fast compare +% {\doifelsevalue{#1\s!handling\c!file}{\fontname\font} +% \skiphandlingdeftrue\skiphandlingdeffalse} +% +% \def\registerfonthandling#1% +% {\@EA\xdef\csname#1\s!handling\c!file\endcsname{\fontname\font}} + +\def\checkfonthandling #1{\skiphandlingdeffalse} +\let\registerfonthandling \gobbleoneargument + +%D This one makes live easier (less definitions): -\def\registerfonthandling#1% - {%\ifskipprotrudingdef\else\message{#1->#2->\fontname\font}\wait\fi - \@EA\xdef\csname#1\s!handling\c!file\endcsname{\fontname\font}} +\def\inherithandling #1 #2 % + {\inheritprotrudefactor #1 #2 % + \inheritadjustfactor #1 #2 } -%D \macros +%D \macros %D {usehandling} %D %D Handling definitions are collected in dedicated files and -%D loaded only once: +%D loaded only once: %D %D % \showsetup{\y!usehandling} -\def\dousehandling#1% is the same as encoding +\def\dousehandling#1% is the same as encoding {\doifundefined{\c!file\f!handlingprefix#1}% - {\setvalue{\c!file\f!handlingprefix#1}{}% + {\letvalueempty{\c!file\f!handlingprefix#1}% \makeshortfilename[\f!handlingprefix#1]% \startreadingfile - \readsysfile{\shortfilename} - {\showmessage{\m!handlings}{2}{#1}} - {\showmessage{\m!handlings}{3}{#1}}% + \readsysfile\shortfilename + {\showmessage\m!handlings2{#1}} + {\showmessage\m!handlings3{#1}}% \stopreadingfile}} \def\usehandling[#1]% {\processcommalist[#1]\dousehandling} -%D New: +%D New: \def\overloadcharacter#1 #2 % {\setfonttoks @@ -324,10 +486,12 @@ \def\dooverloadcharacter#1% {\setvalue{\characterencoding\string#1}} -%D Let's now see if this macro works: +%D Let's now see if this macro works: -\setupfonthandling[\s!default][\c!links=1,\c!rechts=1] +% \setupfonthandling +% [\s!default] +% [\c!links=1,\c!rechts=1,\c!min=20,\c!max=20,\c!stap=5] \usehandling [def] -\protect \endinput +\protect \endinput diff --git a/tex/context/base/java-exa.tex b/tex/context/base/java-exa.tex index a28b5aeae..47ea96f23 100644 --- a/tex/context/base/java-exa.tex +++ b/tex/context/base/java-exa.tex @@ -11,25 +11,191 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\startJSpreamble request_0 used now +% XFDF versus HTML +% localhost versus remote versus set - exa_command = "" ; - exa_option = "" ; - exa_filename = "" ; - exa_filelist = "" ; - exa_registered = "" ; +% filename | filename-nr => name +% fakename | fakename-nr => file upload, unless localhost +% +% we erase the list because otherwise we end up in browser remembering +% problems; also, it is not possible to set upload fields 'manually' + +\startJSpreamble request_1 used now + + var example_method = "HTML" ; + var example_host = "" ; + var example_port = "" ; + var example_url = "" ; + var example_file = "" ; + + var example_log = true ; % false + + function stripped_exa_value( name ) { + f = this.getField(name) ; + if (f) { + str = f.value ; + if (str.indexOf(name+'-')==0) { + str = str.substr(name.length+1) ; + } + return str ; + } else { + return "" ; + } + } + + function identify_example_url ( ) { + if (example_log) { + console.clear ; + console.println("base url: "+this.baseURL) ; + console.println("this url: "+this.URL) ; + } + if (this.baseURL != "") { + example_url = this.baseURL ; + } else { + if (this.URL != "") { + example_url = this.URL + } + } + if (example_url.indexOf("file://")>=0) { + example_url = "" ; + } + str = stripped_exa_value("examplehost") ; + if (str != "auto") { + example_host = str ; + if (str == "localhost") { + example_port = "8061" + } + } + str = stripped_exa_value("exampleport") ; + if (str != "auto") { + example_port = str ; + } + if (example_log) { + console.println("example_url: "+example_url) ; + console.println("example_host: "+example_host) ; + console.println("example_port: "+example_port) ; + } + } + + function check_example_url ( url ) { + if (url.indexOf("file://")>=0) { + url = "http://localhost:8061" ; + console.println("file url replaced by: "+url) ; + } else { + if (url.indexOf("://")<0) { + url = "http://" + url ; + } + if (example_log) { + console.println("url before check: "+url) ; + } +% url = url.replace(/(http:\\\/\\\/.+)(\\\/.*$)/, "$1") ; + url = url.replace(/(http:\\\/\\\/.+?)(\\\/.*$)/, "$1") ; + if (example_log) { + console.println("url after check: "+url) ; + } + } + return url ; + } + + function set_example_xfdf ( method ) { + example_method = method ; + } + + function set_example_file ( file ) { + example_method = file ; + } + + function set_example_host ( host ) { + example_host = host ; + } + + function set_example_port ( port ) { + example_host = host ; + } + + function do_erase_example_file(tag) { + f = this.getField(tag) ; + if (f) { + f.value = "" ; + } + } + + function do_erase_example_list(tag) { + for (i=1;i<=100;i++) { + f = this.getField(tag+"-"+i) ; + if (f) { + f.value = "" ; + } else { + return + } + } + } + + function do_submit_example_url ( url ) { + if ((example_method == "XFDF" ) || (url.indexOf("localhost")>=0)) { + do_erase_example_file("fakename") ; + do_erase_example_list("fakename") ; + } + url = check_example_url(url) ; + if (example_log) { + console.println("submitting form to "+url+" using method "+example_method) ; + } + if (example_file != "") { + url = url + "/" + example_file ; + } + % we need the bFDF for acrobat 5 + this.submitForm({cURL : url, bFDF : false, cSubmitAs : example_method}) ; + } + + function submit_example_form ( ) { + identify_example_url() ; + if (example_host != "") { + if (example_port != "") { + do_submit_example_url(example_host+":"+example_port) ; + } else { + do_submit_example_url(example_host) ; + } + } else { + if (example_url != "") { + do_submit_example_url(example_url) ; + } else { + if (example_port != "") { + do_submit_example_url("localhost"+":"+example_port) ; + } else { + do_submit_example_url("localhost:8061") ; % local exampler + } + } + } + resetfilename () ; + } + + function submit_form ( host, port) { + set_example_host(host) ; + set_example_post(post) ; + submit_example_form ; + } \stopJSpreamble -\startJSpreamble request_1 used now +\startJSpreamble request_2 used now + + var exa_command = "" ; + var exa_option = "" ; + var exa_filename = "" ; + var exa_filelist = "" ; + var exa_registered = "" ; function set_request (command,option) { exa_command = command ; - if (option.indexOf("--")<0) { + if (exa_command == "") { + exa_option = option ; + } else { if (option == "") { + exa_option = "" ; + } else { if (option.indexOf("--")<0) { exa_option = "--action=" + option ; } else { exa_option = option ; - } + } } } } function assemble_request ( ) { @@ -41,49 +207,85 @@ if (v) { exa_filelist = v.value ; } - % exa_filename = exa_filename.replace(/\\\\/g,'/') ; - % exa_filelist = exa_filelist.replace(/\\\\/g,'/') ; +% exa_filename = exa_filename.replace(/\\\\/g,'/') ; +% exa_filelist = exa_filelist.replace(/\\\\/g,'/') ; str = "" ; - if (exa_filelist == '') { + if (exa_filelist == "") { exa_filelist = exa_registered ; - } else { - if (exa_registered != '') { - exa_filelist = exa_filelist + "\\n" + exa_registered ; - } - } - if (exa_command != '') { + } else { if (exa_registered != "") { + exa_filelist = exa_filelist + "\\n" + exa_registered ; + } } + if (exa_command != "") { str = str+""+exa_command+"" ; } - if (exa_option != '') { + if (exa_option != "") { str = str+""+exa_option+"" ; } - if (exa_filename != '') { + if (exa_filename != "") { str = str+""+exa_filename+"" ; } - if (exa_filelist != '') { + var fls = "" ; + if (exa_filelist != "") { + % old method, soon obsolete lst = exa_filelist.split(/\\s/) ; - str = str+"" ; for (i=0;i"+lst[i]+"" ; + fls = fls+""+lst[i]+"" ; } - str = str+"" ; + } else { if (exa_multiple) { + for (i=1;i<=100;i++) { + % console.println("file field "+i) ; + f = this.getField("filename-"+ i) ; +% if (f) { if (f.value != "") { +% if (g) { if (g.value == "") { +% fls = fls+""+f.value+"" ; +% } else { +% fls = fls+""+f.value+"" ; +% } } else { +% fls = fls+""+f.value+"" ; +% } +% } } + if (f) { if (f.value != "") { + fls = fls + "" ; + } else { + % console.println("b") ; + fls = fls + " label='" + g.value + "'>" ; + } } else { + % console.println("c") ; + fls = fls + ">" ; + } + fls = fls + f.value + "" ; + } } + } + } } + if (fls != "") { + str = str + "" + fls + "" ; } str = str + "" ; v = this.getField('exa:request') ; if (v) { - % console.println(str) ; v.value = str ; } } \stopJSpreamble -\startJSpreamble request_2 used now +\startJSpreamble request_3 used now - multiplefiles = false ; + var exa_multiple = false ; function setfilename ( suffixes ) { - f = this.getField("fakename") ; + if (event.targetName) { + var name = event.targetName ; + var fake = name.replace(/filename/,"fakename") ; + } else { + var name = 'filename' ; + var fake = 'fakename' ; + } + f = this.getField(fake) ; if (f) { f.browseForFileToSubmit() ; if (suffixes != "") { @@ -91,52 +293,60 @@ r = new RegExp() ; s = "\\\\.(" + s + ")$" ; r.compile(s, "i") ; - if (f.value.search(r)<=0) { + if ((f.value != "")&&(f.value.search(r)<=0)) { f.value = "" ; app.alert('This filetype is not permitted.') ; } } - g = this.getField("filename") ; + g = this.getField(name) ; if (g) { g.value = f.value ; } - % we need to set the value of the selector to empty else - % we get some funny preloading of multimeg files in spite - % of the specs that say that xml fields will not get sent - f.value = '' } +% we need to set the value of the selector to empty else +% we get some funny preloading of multimeg files in spite +% of the specs that say that xml fields will not get sent +% if (example_method == "XFDF" ) { +% f.value = "" ; +% } else { +% identify_example_url ; +% if (example_url.indexOf("localhost")>=0) { +% f.value = "" ; +% } +% } + } this.dirty = false ; } function addfilename () { - if (multiplefiles) { + if (exa_multiple) { h = this.getField("filelist") ; g = this.getField("filename") ; if ((g) && (h)) { str = g.value ; - if (h.value == '') { + if (h.value == "") { h.value = str ; } else { h.value = h.value + "\\n" + str ; } - g.value = '' ; - this.value = '' ; + g.value = "" ; + this.value = "" ; } } this.dirty = false ; } - % not needed (why is it in here then) + % this only works with client that assembles request function registerfilename (str) { - if (str!='') { + if (str!="") { h = this.getField("filelist") ; if (h) { - if (h.value != '') { + if (h.value != "") { h.value = h.value + "\\n" ; } h.value = h.value + str ; } else { - if (exa_registered != '') { + if (exa_registered != "") { exa_registered = exa_registered + "\\n" ; } exa_registered = exa_registered + str ; @@ -159,74 +369,13 @@ } function resetfilename () { - f = this.getField("filename") ; - if (f) { - f.value = '' ; - } - f = this.getField("fakename") ; - if (f) { - f.value = '' ; - } - f = this.getField("filelist") ; - if (f) { - f.value = '' ; - } - } - -\stopJSpreamble - -\startJSpreamble request_3 used now - - function set_example_host ( host ) { - if (host.indexOf("://")<0) { - global.examplehost = "http://" + host ; - } else { - global.examplehost = host ; - } - } - - function set_example_port ( port ) { - global.exampleport = port ; - } - - function show_example_url ( ) { - console.println("example url: " + global.examplehost + ":" + global.exampleport) ; - } - - function report_example_url ( ) { - app.alert("Requests will be submitted to port " + global.exampleport + " on " + global.examplehost + '.') ; - } - - function submit_form (host, port) { - console.println("form: submit") ; - console.println("host: "+host) ; - console.println("port: "+port) ; - % example_url = "http://" + host + ":" + port ; - example_url = host + ":" + port ; - this.submitForm({cURL : example_url, bXML : true}) ; - } - - function submit_example_form ( ) { - console.println("example form: submit") ; - console.println("example host: "+global.examplehost) ; - console.println("example port: "+global.exampleport) ; - % example_url = "http://" + global.examplehost + ":" + global.exampleport ; - example_url = global.examplehost + ":" + global.exampleport ; - this.submitForm({cURL : example_url, bXML : true}) ; - } - - if (typeof global.examplehost == "undefined" ) { - if (this.baseURL == "") { - set_example_host("http://localhost") ; - } else { - set_example_host(this.baseURL) ; - } - } - - if (typeof global.exampleport == "undefined" ) { - set_example_port("8061") ; + do_erase_example_file("fakename") ; + do_erase_example_file("filename") ; + do_erase_example_file("filelist") ; + do_erase_example_list("filename") ; + do_erase_example_list("fakename") ; } \stopJSpreamble -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/java-fil.tex b/tex/context/base/java-fil.tex index 02f32dffc..4d79a2ace 100644 --- a/tex/context/base/java-fil.tex +++ b/tex/context/base/java-fil.tex @@ -45,4 +45,4 @@ [PrintThisPage] [JS(Print_This_Page)] -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/java-fld.tex b/tex/context/base/java-fld.tex index aa563c1a4..e6e5ee03a 100644 --- a/tex/context/base/java-fld.tex +++ b/tex/context/base/java-fld.tex @@ -301,4 +301,4 @@ function Walk_Field ( FieldSet ) \stopJSpreamble -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/java-ini.tex b/tex/context/base/java-ini.tex index 495b86a41..e3fd4a115 100644 --- a/tex/context/base/java-ini.tex +++ b/tex/context/base/java-ini.tex @@ -102,59 +102,59 @@ %D related to the referencing mechanism. Integration takes %D place by %D -%D \starttypen -%D \naar{calculate total}[Sum()] -%D \stoptypen +%D \starttyping +%D \goto{calculate total}[Sum()] +%D \stoptyping %D %D The \type{()} classify this as a script. If they are absent, %D the keyword is treated as a normal reference. %D %D One can pass arguments to such a script by saying: %D -%D \starttypen -%D \naar{calculate total}[Sum(1.5,2.3)] -%D \stoptypen +%D \starttyping +%D \goto{calculate total}[Sum(1.5,2.3)] +%D \stoptyping %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 \starttyping +%D \goto{calculate total}[Sum(1.5,2.3,R{overflow})] +%D \stoptyping %D %D The last call calls the script \type{Sum} and passes the %D next set of variables: %D -%D \starttypen +%D \starttyping %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 \stoptyping %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 \starttypen -%D \naar{calculate total}[JS(Sum{V{1.5},V{2.3},R{overflow}})] -%D \stoptypen +%D \starttyping +%D \goto{calculate total}[JS(Sum{V{1.5},V{2.3},R{overflow}})] +%D \stoptyping %D %D does a verbose passing: %D -%D \starttypen +%D \starttyping %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 \stoptyping % %D % %D Finally we have a counter that tells\JAVA\ how many % %D arguments were passed, % %D -% %D \starttypen +% %D \starttyping % %D JS_N -% %D \stoptypen +% %D \stoptyping %D We will also support direct function calls. In that case %D no intermediate variables are used. @@ -164,7 +164,7 @@ %D %D A piece of \JAVASCRIPT\ code is defined by saying: %D -%D \starttypen +%D \starttyping %D \startJScode{SomeScript} %D var Item=this.getField("item"); %D N=Item.getArray(); @@ -176,7 +176,7 @@ %D if ((JS_N>0) && (JS_R_1!="")) %D { gotoNamedDest(JS_R_1) }; %D \stopJScode -%D \stoptypen +%D \stoptyping %D %D Such a piece of code is closely related to the interpreter %D used. Watch the last two lines, here the script adapts @@ -184,21 +184,21 @@ %D %D While %D -%D \starttypen +%D \starttyping %D \startJScode{name} %D name = 4 ; %D \stopJScode -%D \stoptypen +%D \stoptyping %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 -%D \starttypen +%D \starttyping %D \startJScode{uses} uses {later} %D uses = 6 ; %D \stopJScode -%D \stoptypen +%D \stoptyping \long\def\startJScode#1 #2 {\doifelse{#2}{uses} @@ -218,9 +218,9 @@ %D %D The code can be retrieved by saying %D -%D \starttypen +%D \starttyping %D \presetJScode{SomeScript}{template} -%D \stoptypen +%D \stoptyping %D %D Such a template is a comma separated list, where %D individual entries can optionally be transformed by @@ -324,28 +324,28 @@ %D One can define insert \JAVASCRIPT\ code at the document level %D by using: %D -%D \starttypen +%D \starttyping %D \startJSpreamble{oeps} %D oeps = 1 ; %D \stopJSpreamble -%D \stoptypen +%D \stoptyping %D %D which is the same as: %D -%D \starttypen +%D \starttyping %D \startJSpreamble{now} used now %D now = 2 ; %D \stopJSpreamble -%D \stoptypen +%D \stoptyping %D %D while the next definition is only included when actually %D used. %D -%D \starttypen +%D \starttyping %D \startJSpreamble{later} used later %D later = 3 ; %D \stopJSpreamble -%D \stoptypen +%D \stoptyping %D %D This command may be used more that once, but always before %D the first page is shipped out. @@ -381,7 +381,7 @@ %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 set a preamble \quote {in||line} and add tokens to a %D preamble. \def\setJSpreamble#1#2% @@ -493,7 +493,7 @@ %D I started with: %D -%D \starttypen +%D \starttyping %D \def\dodoPSsanitizeJScode#1% %D {\aftergroup\string %D \if#1(% @@ -509,7 +509,7 @@ %D \ifnum\scratchcounter=500 %D \expandafter\dododoPSsanitizeJScode %D \fi} -%D \stoptypen +%D \stoptyping %D %D For pretty printing purposes, we need some way to signal %D \TEX\ macros. Therefore we introduce a special keyword @@ -653,9 +653,9 @@ %D collected in files with names like \type{java-...}. One can %D load these scripts with \type{\useJSscripts}, like: %D -%D \starttypen +%D \starttyping %D \useJSscripts[fld] -%D \stoptypen +%D \stoptyping %D %D The not so complicated implementation of this macro is: @@ -679,4 +679,4 @@ \def\useJSscripts {\dodoubleempty\douseJSscripts} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/java-stp.tex b/tex/context/base/java-stp.tex index 2417a61e0..fcb9d4f22 100644 --- a/tex/context/base/java-stp.tex +++ b/tex/context/base/java-stp.tex @@ -124,4 +124,4 @@ % \definereference [CheckStepper] [JS(CheckStepper{\StepCounter})] % \definereference [InvokeStepper] [JS(InvokeStepper)] -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/lang-alt.tex b/tex/context/base/lang-alt.tex index f2192936e..3dff97407 100644 --- a/tex/context/base/lang-alt.tex +++ b/tex/context/base/lang-alt.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Altaic Languages} @@ -17,7 +17,7 @@ %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. % Uigur, Uzbek % Azeri/Azerbaijani, Chuvash, Turkish, Turkmen @@ -28,7 +28,7 @@ \installlanguage [\s!tr] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -37,34 +37,34 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, - \c!status=\v!stop] + \c!date={\v!year,\ ,\v!month,\ ,\v!day}, + \c!state=\v!stop] \installlanguage [turkish] [\s!tr] -\setupheadtext [\s!tr] [\v!inhoud=Fihrist] -\setupheadtext [\s!tr] [\v!tabellen=Tablolar] -\setupheadtext [\s!tr] [\v!figuren=\Scedilla ekiller] -\setupheadtext [\s!tr] [\v!grafieken=Grafikler] -\setupheadtext [\s!tr] [\v!intermezzos=...] +\setupheadtext [\s!tr] [\v!content=Fihrist] +\setupheadtext [\s!tr] [\v!tables=Tablolar] +\setupheadtext [\s!tr] [\v!figures=\Scedilla ekiller] +\setupheadtext [\s!tr] [\v!graphics=Grafikler] +\setupheadtext [\s!tr] [\v!intermezzi=...] \setupheadtext [\s!tr] [\v!index=\Idotaccent ndex] -\setupheadtext [\s!tr] [\v!afkortingen=K\dotlessi saltmalar] +\setupheadtext [\s!tr] [\v!abbreviations=K\dotlessi saltmalar] \setupheadtext [\s!tr] [\v!logos=Logolar] -\setupheadtext [\s!tr] [\v!eenheden=Birimler] +\setupheadtext [\s!tr] [\v!units=Birimler] -\setuplabeltext [\s!tr] [\v!tabel=Tablo ] -\setuplabeltext [\s!tr] [\v!figuur=\Scedilla ekil ] +\setuplabeltext [\s!tr] [\v!table=Tablo ] +\setuplabeltext [\s!tr] [\v!figure=\Scedilla ekil ] \setuplabeltext [\s!tr] [\v!intermezzo=... ] -\setuplabeltext [\s!tr] [\v!grafiek=Grafik ] -\setuplabeltext [\s!tr] [\v!hoofdstuk=] % [\v!hoofdstuk=Konu ] -\setuplabeltext [\s!tr] [\v!paragraaf=] % [\v!paragraaf=Paragraf ] -\setuplabeltext [\s!tr] [\v!sub\v!paragraaf=] % [\c!sub\v!paragraaf=Altparagraf ] -\setuplabeltext [\s!tr] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!tr] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!tr] [\v!bijlage=] % [\v!bijlage=Ek ] -\setuplabeltext [\s!tr] [\v!deel=Cilt ] -\setuplabeltext [\s!tr] [\v!regel=sat\dotlessi r ] -\setuplabeltext [\s!tr] [\v!regels=sat\dotlessi rlar ] +\setuplabeltext [\s!tr] [\v!graphic=Grafik ] +\setuplabeltext [\s!tr] [\v!chapter=] +\setuplabeltext [\s!tr] [\v!section=] +\setuplabeltext [\s!tr] [\v!subsection=] +\setuplabeltext [\s!tr] [\v!subsubsection=] +\setuplabeltext [\s!tr] [\v!subsubsubsection=] +\setuplabeltext [\s!tr] [\v!appendix=] +\setuplabeltext [\s!tr] [\v!part=Cilt ] +\setuplabeltext [\s!tr] [\v!line=sat\dotlessi r ] +\setuplabeltext [\s!tr] [\v!lines=sat\dotlessi rlar ] \setuplabeltext [\s!tr] [\v!january=ocak] \setuplabeltext [\s!tr] [\v!february=\Scedilla ubat] diff --git a/tex/context/base/lang-ana.tex b/tex/context/base/lang-ana.tex index 8f14082c4..336be50f2 100644 --- a/tex/context/base/lang-ana.tex +++ b/tex/context/base/lang-ana.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Anatolian Languages} @@ -17,7 +17,7 @@ %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. \unprotect diff --git a/tex/context/base/lang-art.tex b/tex/context/base/lang-art.tex index 0c1c775b2..3f857e11e 100644 --- a/tex/context/base/lang-art.tex +++ b/tex/context/base/lang-art.tex @@ -1,5 +1,5 @@ %D \module -%D [ file=lang-art, +%D [ file=lang--art, %D version=1997.09.03, %D title=\CONTEXT\ Language Macros, %D subtitle=Artificial Languages, @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Artificial Languages} @@ -17,7 +17,7 @@ %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. % Esperanto diff --git a/tex/context/base/lang-bal.tex b/tex/context/base/lang-bal.tex index 4c5907320..c4e0f31f7 100644 --- a/tex/context/base/lang-bal.tex +++ b/tex/context/base/lang-bal.tex @@ -1,5 +1,5 @@ %D \module -%D [ file=lang-bal, +%D [ file=lang--bal, %D version=1997.09.03, %D title=\CONTEXT\ Language Macros, %D subtitle=Baltic Languages, @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Baltic Languages} @@ -17,7 +17,7 @@ %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. % Lettish/Latvian, Lithuanian diff --git a/tex/context/base/lang-cel.tex b/tex/context/base/lang-cel.tex index d22705804..abbeb10c6 100644 --- a/tex/context/base/lang-cel.tex +++ b/tex/context/base/lang-cel.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Celtic Languages} @@ -17,7 +17,7 @@ %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. % Breton, Welsh, Irish, Manx, Scottish Gaelic diff --git a/tex/context/base/lang-chi.tex b/tex/context/base/lang-chi.tex index 51a018e9b..b0ac6b1d5 100644 --- a/tex/context/base/lang-chi.tex +++ b/tex/context/base/lang-chi.tex @@ -31,33 +31,33 @@ \c!rightquote=\cnencoding\cnupperrightsinglequote, \c!leftquotation=\cnencoding\cnupperleftdoublequote, \c!rightquotation=\cnencoding\cnupperrightdoublequote, - \c!datum={\v!maand,\ ,\v!dag,{,\ },\v!jaar}, - \c!status=\v!start] - -\setupheadtext [\s!cn] [\v!inhoud={\cnencoding\cnencodedcontents}] -\setupheadtext [\s!cn] [\v!tabellen={\cnencoding\cnencodedtables}] -\setupheadtext [\s!cn] [\v!figuren={\cnencoding\cnencodedfigures}] -\setupheadtext [\s!cn] [\v!grafieken=Graphics] -\setupheadtext [\s!cn] [\v!intermezzos=Intermezzos] + \c!date={\v!month,\ ,\v!day,{,\ },\v!year}, + \c!state=\v!stop] + +\setupheadtext [\s!cn] [\v!content={\cnencoding\cnencodedcontents}] +\setupheadtext [\s!cn] [\v!tables={\cnencoding\cnencodedtables}] +\setupheadtext [\s!cn] [\v!figures={\cnencoding\cnencodedfigures}] +\setupheadtext [\s!cn] [\v!graphics=Graphics] +\setupheadtext [\s!cn] [\v!intermezzi=Intermezzos] \setupheadtext [\s!cn] [\v!index={\cnencoding\cnencodedindex}] -\setupheadtext [\s!cn] [\v!afkortingen={\cnencoding\cnencodedabbreviations}] +\setupheadtext [\s!cn] [\v!abbreviations={\cnencoding\cnencodedabbreviations}] \setupheadtext [\s!cn] [\v!logos={\cnencoding\cnencodedlogos}] -\setupheadtext [\s!cn] [\v!eenheden={\cnencoding\cnencodedunits}] +\setupheadtext [\s!cn] [\v!units={\cnencoding\cnencodedunits}] -\setuplabeltext [\s!cn] [\v!tabel={\cnencoding\cnencodedtable}] -\setuplabeltext [\s!cn] [\v!figuur={\cnencoding\cnencodedfigure}] +\setuplabeltext [\s!cn] [\v!table={\cnencoding\cnencodedtable}] +\setuplabeltext [\s!cn] [\v!figure={\cnencoding\cnencodedfigure}] \setuplabeltext [\s!cn] [\v!intermezzo=Intermezzo ] -\setuplabeltext [\s!cn] [\v!grafiek=Illustration ] -\setuplabeltext [\s!cn] [\v!bijlage=] -\setuplabeltext [\s!cn] [\v!deel={\cnencoding\cnencodedintro,\cnencoding\cnencodedpart}] -\setuplabeltext [\s!cn] [\v!hoofdstuk={\cnencoding\cnencodedintro,\cnencoding\cnencodedchapter}] -\setuplabeltext [\s!cn] [\v!paragraaf={\cnencoding\cnencodedintro,\cnencoding\cnencodedsection}] -\setuplabeltext [\s!cn] [\v!regel=line ] -\setuplabeltext [\s!cn] [\v!regels=lines ] - -\setuplabeltext [\s!cn] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!cn] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!cn] [\v!sub\v!sub\v!sub\v!paragraaf=] +\setuplabeltext [\s!cn] [\v!graphic=Illustration ] +\setuplabeltext [\s!cn] [\v!appendix=] +\setuplabeltext [\s!cn] [\v!part={\cnencoding\cnencodedintro,\cnencoding\cnencodedpart}] +\setuplabeltext [\s!cn] [\v!chapter={\cnencoding\cnencodedintro,\cnencoding\cnencodedchapter}] +\setuplabeltext [\s!cn] [\v!section={\cnencoding\cnencodedintro,\cnencoding\cnencodedsection}] +\setuplabeltext [\s!cn] [\v!line=line ] +\setuplabeltext [\s!cn] [\v!lines=lines ] + +\setuplabeltext [\s!cn] [\v!subsection=] +\setuplabeltext [\s!cn] [\v!subsubsection=] +\setuplabeltext [\s!cn] [\v!subsubsubsection=] %D From this definition one can deduce that language, input %D encoding, font encoding, and glyph meaning form a pretty diff --git a/tex/context/base/lang-cyr.tex b/tex/context/base/lang-cyr.tex index 20567e1e1..37156e706 100644 --- a/tex/context/base/lang-cyr.tex +++ b/tex/context/base/lang-cyr.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Cyrillic Languages} @@ -17,9 +17,9 @@ %D Therefore we define the labels using symbolic names. %D Support for cyrillic is initiated by Olga Briginets who %D also layed the base for the language, encoding and font -%D definition. Later Alexander Bokovoy and Victor Figurnov -%D improved things. I (Hans Hagen) mainly cleaned things up -%D a bit. +%D definition. Later Alexander Bokovoy and Victor Figurnov +%D improved things. I (Hans Hagen) mainly cleaned things up +%D a bit. \unprotect @@ -27,7 +27,7 @@ [\s!ru] [\s!lefthyphenmin=2, \s!righthyphenmin=2, - \c!spatiering=\v!opelkaar, + \c!spacing=\v!packed, \c!leftsentence=\leftguillemot, \c!rightsentence=\rightguillemot, \c!leftsubsentence=\lowerleftdoubleninequote, @@ -36,14 +36,14 @@ \c!rightquote=\upperrightdoubleninequote, \c!leftquotation=\leftguillemot, \c!rightquotation=\rightguillemot, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] \installlanguage [\s!ua] [\s!lefthyphenmin=2, \s!righthyphenmin=2, - \c!spatiering=\v!opelkaar, + \c!spacing=\v!packed, \c!leftsentence=\leftguillemot, \c!rightsentence=\rightguillemot, \c!leftsubsentence=\lowerleftdoubleninequote, @@ -52,8 +52,8 @@ \c!rightquote=\upperrightdoubleninequote, \c!leftquotation=\leftguillemot, \c!rightquotation=\rightguillemot, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] \installlanguage [russian] [\s!ru] \installlanguage [ukrainian] [\s!ua] @@ -61,55 +61,55 @@ %D Labels and header texts. -\setupheadtext [\s!ru] [ \v!inhoud=\cyrillicS \cyrillico \cyrillicd +\setupheadtext [\s!ru] [ \v!content=\cyrillicS \cyrillico \cyrillicd \cyrillice \cyrillicr \cyrilliczh \cyrillica \cyrillicn \cyrillici \cyrillice] -\setupheadtext [\s!ua] [\v!inhoud=\cyrillicZ \cyrillicm \cyrillicii +\setupheadtext [\s!ua] [\v!content=\cyrillicZ \cyrillicm \cyrillicii \cyrillics \cyrillict] -\setupheadtext [\s!ru] [\v!tabellen=\cyrillicS \cyrillicp \cyrillici +\setupheadtext [\s!ru] [\v!tables=\cyrillicS \cyrillicp \cyrillici \cyrillics \cyrillico \cyrillick \space \cyrillict \cyrillica \cyrillicb \cyrillicl \cyrillici \cyrillicc] -\setupheadtext [\s!ua] [\v!tabellen=\cyrillicP \cyrillice \cyrillicr +\setupheadtext [\s!ua] [\v!tables=\cyrillicP \cyrillice \cyrillicr \cyrillice \cyrillicl \cyrillicii \cyrillick \space \cyrillict \cyrillica \cyrillicb \cyrillicl \cyrillici \cyrillicc \cyrillicsftsn] -\setupheadtext [\s!ru] [\v!figuren=\cyrillicS \cyrillicp \cyrillici +\setupheadtext [\s!ru] [\v!figures=\cyrillicS \cyrillicp \cyrillici \cyrillics \cyrillico \cyrillick \space \cyrillici \cyrillicl \cyrillicl \cyrillicyu\cyrillics \cyrillict \cyrillicr \cyrillica \cyrillicc \cyrillici \cyrillicishrt] -\setupheadtext [\s!ua] [\v!figuren=\cyrillicP \cyrillice \cyrillicr +\setupheadtext [\s!ua] [\v!figures=\cyrillicP \cyrillice \cyrillicr \cyrillice \cyrillicl \cyrillicii \cyrillick \space \cyrillicii \cyrillicl \cyrillicyu\cyrillics \cyrillict \cyrillicr \cyrillica \cyrillicc \cyrillicii\cyrillicishrt] -\setupheadtext [\s!ru] [\v!grafieken=\cyrillicS \cyrillicp \cyrillici +\setupheadtext [\s!ru] [\v!graphics=\cyrillicS \cyrillicp \cyrillici \cyrillics \cyrillico \cyrillick \space \cyrillicg \cyrillicr \cyrillica \cyrillicf \cyrillici \cyrillick \cyrillico \cyrillicv] -\setupheadtext [\s!ua] [\v!grafieken=\cyrillicP \cyrillice \cyrillicr +\setupheadtext [\s!ua] [\v!graphics=\cyrillicP \cyrillice \cyrillicr \cyrillice \cyrillicl \cyrillicii \cyrillick \space \cyrillicg \cyrillicr \cyrillica \cyrillicf \cyrillicii\cyrillick \cyrillico \cyrillicv] -\setupheadtext [\s!ru] [\v!intermezzos=\cyrillicS \cyrillicp \cyrillici +\setupheadtext [\s!ru] [\v!intermezzi=\cyrillicS \cyrillicp \cyrillici \cyrillics \cyrillico \cyrillick \space \cyrillicv \cyrillics \cyrillict \cyrillica \cyrillicv \cyrillico \cyrillick] -\setupheadtext [\s!ua] [\v!intermezzos=\cyrillicP \cyrillice \cyrillicr +\setupheadtext [\s!ua] [\v!intermezzi=\cyrillicP \cyrillice \cyrillicr \cyrillice \cyrillicl \cyrillicii \cyrillick \space \cyrillicv \cyrillics \cyrillict \cyrillica @@ -126,14 +126,14 @@ \cyrillica \cyrilliczh\cyrillicch \cyrillici \cyrillick] -\setupheadtext [\s!ru] [\v!afkortingen=\cyrillicS \cyrillicp \cyrillici +\setupheadtext [\s!ru] [\v!abbreviations=\cyrillicS \cyrillicp \cyrillici \cyrillics \cyrillico \cyrillick \space \cyrillics \cyrillico \cyrillick \cyrillicr \cyrillica \cyrillicshch \cyrillice \cyrillicn \cyrillici \cyrillicishrt] -\setupheadtext [\s!ua] [\v!afkortingen=\cyrillicP \cyrillice \cyrillicr +\setupheadtext [\s!ua] [\v!abbreviations=\cyrillicP \cyrillice \cyrillicr \cyrillice \cyrillicl \cyrillicii \cyrillick \space \cyrillics \cyrillick \cyrillico \cyrillicr @@ -147,29 +147,29 @@ \cyrillico \cyrillict \cyrillici \cyrillicp \cyrillici] -\setupheadtext [\s!ru] [\v!eenheden=\cyrillicE \cyrillicd \cyrillici +\setupheadtext [\s!ru] [\v!units=\cyrillicE \cyrillicd \cyrillici \cyrillicn \cyrillici \cyrillicc \cyrillicery \space \cyrillici \cyrillicz \cyrillicm \cyrillice \cyrillicr \cyrillice \cyrillicn \cyrillici \cyrillicya] -\setupheadtext [\s!ua] [\v!eenheden=\cyrillicO \cyrillicd \cyrillici +\setupheadtext [\s!ua] [\v!units=\cyrillicO \cyrillicd \cyrillici \cyrillicn \cyrillici \cyrillicc \cyrillicii\space \cyrillicv \cyrillici \cyrillicm \cyrillicii \cyrillicr \cyrillicu] -\setuplabeltext [\s!ru] [\v!tabel=\cyrillicT \cyrillica \cyrillicb +\setuplabeltext [\s!ru] [\v!table=\cyrillicT \cyrillica \cyrillicb \cyrillicl \cyrillici \cyrillicc \cyrillica \space] -\setuplabeltext [\s!ua] [\v!tabel=\cyrillicT \cyrillica \cyrillicb +\setuplabeltext [\s!ua] [\v!table=\cyrillicT \cyrillica \cyrillicb \cyrillicl \cyrillici \cyrillicc \cyrillicya\space] -\setuplabeltext [\s!ru] [\v!figuur=\cyrillicR \cyrillici \cyrillics +\setuplabeltext [\s!ru] [\v!figure=\cyrillicR \cyrillici \cyrillics \cyrillicu \cyrillicn \cyrillico \cyrillick \space] -\setuplabeltext [\s!ua] [\v!figuur=\cyrillicM \cyrillica \cyrillicl +\setuplabeltext [\s!ua] [\v!figure=\cyrillicM \cyrillica \cyrillicl \cyrillicyu\cyrillicn \cyrillico \cyrillick \space] @@ -180,88 +180,88 @@ \cyrillica \cyrillicv \cyrillick \cyrillica \space] -\setuplabeltext [\s!ru] [\v!grafiek=\cyrillicG \cyrillicr \cyrillica +\setuplabeltext [\s!ru] [\v!graphic=\cyrillicG \cyrillicr \cyrillica \cyrillicf \cyrillici \cyrillick \space] -\setuplabeltext [\s!ua] [\v!grafiek=\cyrillicG \cyrillicr \cyrillica +\setuplabeltext [\s!ua] [\v!graphic=\cyrillicG \cyrillicr \cyrillica \cyrillicf \cyrillici \cyrillick \space] -\setuplabeltext [\s!ru] [\v!hoofdstuk=] -\setuplabeltext [\s!ua] [\v!hoofdstuk=] +\setuplabeltext [\s!ru] [\v!chapter=] +\setuplabeltext [\s!ua] [\v!chapter=] -\setuplabeltext [\s!ru] [\v!paragraaf=] -\setuplabeltext [\s!ua] [\v!paragraaf=] +\setuplabeltext [\s!ru] [\v!section=] +\setuplabeltext [\s!ua] [\v!section=] -\setuplabeltext [\s!ru] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!ua] [\v!sub\v!paragraaf=] +\setuplabeltext [\s!ru] [\v!subsection=] +\setuplabeltext [\s!ua] [\v!subsection=] -\setuplabeltext [\s!ru] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!ua] [\v!sub\v!sub\v!paragraaf=] +\setuplabeltext [\s!ru] [\v!subsubsection=] +\setuplabeltext [\s!ua] [\v!subsubsection=] -\setuplabeltext [\s!ru] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!ua] [\v!sub\v!sub\v!sub\v!paragraaf=] +\setuplabeltext [\s!ru] [\v!subsubsubsection=] +\setuplabeltext [\s!ua] [\v!subsubsubsection=] -\setuplabeltext [\s!ru] [\v!bijlage=] -\setuplabeltext [\s!ua] [\v!bijlage=] +\setuplabeltext [\s!ru] [\v!appendix=] +\setuplabeltext [\s!ua] [\v!appendix=] -\setuplabeltext [\s!ru] [\v!deel=\cyrillicCH\cyrillica \cyrillics +\setuplabeltext [\s!ru] [\v!part=\cyrillicCH\cyrillica \cyrillics \cyrillict \cyrillicsftsn \space] -\setuplabeltext [\s!ua] [\v!deel=\cyrillicCH\cyrillica \cyrillics +\setuplabeltext [\s!ua] [\v!part=\cyrillicCH\cyrillica \cyrillics \cyrillict \cyrillici \cyrillicn \cyrillica \space] -\setuplabeltext [\s!ru] [\v!regel=\cyrillics \cyrillict \cyrillicr +\setuplabeltext [\s!ru] [\v!line=\cyrillics \cyrillict \cyrillicr \cyrillico \cyrillick \cyrillica \space] -\setuplabeltext [\s!ua] [\v!regel=\cyrillicr \cyrillicya\cyrillicd +\setuplabeltext [\s!ua] [\v!line=\cyrillicr \cyrillicya\cyrillicd \cyrillico \cyrillick \space] -\setuplabeltext [\s!ru] [\v!regels=\cyrillics \cyrillict \cyrillicr +\setuplabeltext [\s!ru] [\v!lines=\cyrillics \cyrillict \cyrillicr \cyrillico \cyrillick \cyrillici \space] -\setuplabeltext [\s!ua] [\v!regels=\cyrillicr \cyrillicya\cyrillicd +\setuplabeltext [\s!ua] [\v!lines=\cyrillicr \cyrillicya\cyrillicd \cyrillick \cyrillici \space] -\setuplabeltext [\s!ru] [\v!pagina=\cyrillics \cyrillict \cyrillicr +\setuplabeltext [\s!ru] [\v!page=\cyrillics \cyrillict \cyrillicr \cyrillica \cyrillicn \cyrillici \cyrillicc \cyrillica \space] -\setuplabeltext [\s!ua] [\v!pagina=\cyrillics \cyrillict \cyrillico +\setuplabeltext [\s!ua] [\v!page=\cyrillics \cyrillict \cyrillico \cyrillicr \cyrillicii\cyrillicn \cyrillick \cyrillica \space ] -\setuplabeltext [\s!ru] [\v!oppagina=\cyrillicn \cyrillica \space +\setuplabeltext [\s!ru] [\v!atpage=\cyrillicn \cyrillica \space \cyrillics \cyrillict \cyrillicr \cyrillica \cyrillicn \cyrillici \cyrillicc \cyrillice \space] -\setuplabeltext [\s!ua] [\v!oppagina=\cyrillicn \cyrillica \space +\setuplabeltext [\s!ua] [\v!atpage=\cyrillicn \cyrillica \space \cyrillics \cyrillict \cyrillico \cyrillicr \cyrillicii\cyrillicn \cyrillicc \cyrillicii\space ] -\setuplabeltext [\s!ru] [\v!hierboven=\cyrillics \cyrillicm.\space +\setuplabeltext [\s!ru] [\v!hencefore=\cyrillics \cyrillicm.\space \cyrillicv \cyrillicery \cyrillicsh \cyrillice] -\setuplabeltext [\s!ua] [\v!hierboven=\cyrillicya\cyrillick \space +\setuplabeltext [\s!ua] [\v!hencefore=\cyrillicya\cyrillick \space \cyrillicp \cyrillico \cyrillick \cyrillica \cyrillicz \cyrillica \cyrillicn \cyrillico \space \cyrillicv \cyrillici \cyrillicshch \cyrillice] -\setuplabeltext [\s!ru] [\v!hieronder=\cyrillics \cyrillicm.\space +\setuplabeltext [\s!ru] [\v!hereafter=\cyrillics \cyrillicm.\space \cyrillicn \cyrillici \cyrilliczh \cyrillice] -\setuplabeltext [\s!ua] [\v!hieronder=\cyrillicya\cyrillick \space +\setuplabeltext [\s!ua] [\v!hereafter=\cyrillicya\cyrillick \space \cyrillicp \cyrillico \cyrillick \cyrillica \cyrillicz \cyrillica \cyrillicn \cyrillico \space \cyrillicn \cyrillici \cyrilliczh \cyrillicch\cyrillice] -\setuplabeltext [\s!ru] [\v!zie=\cyrillics \cyrillicm.\space] -\setuplabeltext [\s!ua] [\v!zie=\cyrillicd \cyrillici +\setuplabeltext [\s!ru] [\v!see=\cyrillics \cyrillicm.\space] +\setuplabeltext [\s!ua] [\v!see=\cyrillicd \cyrillici \cyrillicv.\space ] \setuplabeltext [\s!ru] [\v!january=\cyrillicya\cyrillicn \cyrillicv diff --git a/tex/context/base/lang-frd.tex b/tex/context/base/lang-frd.tex index e5b42f481..6cc27080b 100644 --- a/tex/context/base/lang-frd.tex +++ b/tex/context/base/lang-frd.tex @@ -137,4 +137,4 @@ \charfreq z 1.14 \stopcharactertable -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/lang-frq.tex b/tex/context/base/lang-frq.tex index 5240f9370..82441f9c0 100644 --- a/tex/context/base/lang-frq.tex +++ b/tex/context/base/lang-frq.tex @@ -18,7 +18,7 @@ \ifx\s!en\undefined \def\v!en{en} \fi \ifx\??lg\undefined \def\??lg{@@lg} \fi -%M \usemodule[frqlay] +%M \usemodule[layout] %D \macros %D {charwidthmethod} @@ -31,7 +31,7 @@ %D {\chardef\charwidthmethod#1\relax %D \mainlanguage[#2#3]\the\dimexpr(\averagecharwidth)} %D -%D \starttabulatie[|c|c|c|c|c|c|] +%D \starttabulate[|c|c|c|c|c|c|] %D \HL %D \NC \NC\bf0=amount\NC\bf1=.5em\NC2=ex\NC\bf3=frequency\NC\bf4=list\NC\NR %D \HL @@ -39,7 +39,7 @@ %D \NC\bf nl\NC\ShwChrWd0nl\NC\ShwChrWd1nl\NC\ShwChrWd2nl\NC\ShwChrWd3nl\NC\ShwChrWd4nl\NC\NR %D \NC\bf de\NC\ShwChrWd0de\NC\ShwChrWd1de\NC\ShwChrWd2de\NC\ShwChrWd3de\NC\ShwChrWd4de\NC\NR %D \HL -%D \stoptabulatie +%D \stoptabulate %D %D Method~1 ignores the widths and assumes that each character has a %D width of .5em, which is true for most monospaced fonts. Method~2 @@ -107,9 +107,9 @@ %D Although it is of hardly any use, you can inherit a character table: %D -%D \starttypen +%D \starttyping %D \startcharactertable[cz] \charactertable{en} \stopcharactertable -%D \stoptypen +%D \stoptyping %D %D We define a default vector with 100\% x's. @@ -184,7 +184,7 @@ %D \MPdrawingdonetrue \getMPdrawing \resetMPdrawing %D \stopbuffer %D -%D \plaatsfiguur +%D \placefigure %D [here] %D [fig:charfreq] %D {The character distributions for English, Dutch and German.} @@ -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 \blanko} -%D {\mainlanguage[nl]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blanko} -%D {\mainlanguage[de]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blanko} +%D {\mainlanguage[en]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blank} +%D {\mainlanguage[nl]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blank} +%D {\mainlanguage[de]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blank} %D \stopbuffer %D %D \typebuffer \getbuffer @@ -214,4 +214,4 @@ \def\freezeaveragecharacterwidth % global {\xdef\averagecharacterwidth{\dimexpr(\the\normalaveragecharacterwidth)}} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex index 7e95f5936..03ff0c123 100644 --- a/tex/context/base/lang-ger.tex +++ b/tex/context/base/lang-ger.tex @@ -32,7 +32,7 @@ \installlanguage [\s!nl] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -41,12 +41,12 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\lowerleftdoubleninequote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] \installlanguage [\s!en] - [\c!spatiering=\v!ruim, + [\c!spacing=\v!broad, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -55,12 +55,12 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!maand,\ ,\v!dag,{,\ },\v!jaar}, - \c!status=\v!stop] % elders always preloaded! + \c!date={\v!month,\ ,\v!day,{,\ },\v!year}, + \c!state=\v!stop] % elders always preloaded! \installlanguage [\s!de] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence={\hbox{--~}}, \c!rightsentence={\hbox{~--}}, \c!leftsubsentence={--}, @@ -69,12 +69,12 @@ \c!rightquote=\upperrightsinglesixquote, \c!leftquotation=\lowerleftdoubleninequote, \c!rightquotation=\upperrightdoublesixquote, - \c!datum={\v!dag,{.},\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] \installlanguage [\s!da] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence={\hbox{--\hskip.5em}}, \c!rightsentence={\hbox{\hskip.5em--}}, \c!leftsubsentence={--}, @@ -83,12 +83,12 @@ \c!rightquote=\upperrightsinglesixquote, \c!leftquotation=\lowerleftdoubleninequote, \c!rightquotation=\upperrightdoublesixquote, - \c!datum={\v!dag,{.},\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] \installlanguage [\s!sv] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence={\hbox{--~}}, \c!rightsentence={\hbox{~--}}, \c!leftsubsentence={--}, @@ -97,12 +97,12 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperrightdoubleninequote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] \installlanguage [\s!af] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -111,12 +111,12 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, - \c!status=\v!stop] + \c!date={\v!year,\ ,\v!month,\ ,\v!day}, + \c!state=\v!stop] \installlanguage [\s!no] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -125,34 +125,29 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!dag,{.},\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year}, + \c!default=\s!nl, % patterns + \c!state=\v!stop] -%D Hey look, some experiment: - -\installlanguage % eight bit dutch - [nlx] - [\c!spatiering=\v!opelkaar, - \c!default=\s!nl, - \c!status=\v!stop] +%D Extra: \installlanguage % old german [deo] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!default=\s!de, - \c!status=\v!stop] + \c!state=\v!stop] %D And some alternative (but very real) english patterns: \installlanguage [uk] [\c!default=\s!en, - \c!status=\v!stop] + \c!state=\v!stop] \installlanguage [us] [\c!default=\s!en, - \c!status=\v!stop] + \c!state=\v!stop] %D For compatibility reasons we also define: @@ -307,45 +302,45 @@ % \stoplanguagespecifics % \stopencoding -\setupheadtext [\s!en] [\v!inhoud=Contents] -\setupheadtext [\s!nl] [\v!inhoud=Inhoud] -\setupheadtext [\s!de] [\v!inhoud=Inhalt] -\setupheadtext [\s!da] [\v!inhoud=Indhold] -\setupheadtext [\s!sv] [\v!inhoud=Inneh\aring ll] -\setupheadtext [\s!af] [\v!inhoud=Inhoud] -\setupheadtext [\s!no] [\v!inhoud=Innhold] - -\setupheadtext [\s!en] [\v!tabellen=Tables] -\setupheadtext [\s!nl] [\v!tabellen=Tabellen] -\setupheadtext [\s!de] [\v!tabellen=Tabellen] -\setupheadtext [\s!da] [\v!tabellen=Tabeller] -\setupheadtext [\s!sv] [\v!tabellen=Tabeller] -\setupheadtext [\s!af] [\v!tabellen=Tabelle] -\setupheadtext [\s!no] [\v!tabellen=Tabeller] - -\setupheadtext [\s!en] [\v!figuren=Figures] -\setupheadtext [\s!nl] [\v!figuren=Figuren] -\setupheadtext [\s!de] [\v!figuren=Abbildungen] -\setupheadtext [\s!da] [\v!figuren=Figurer] -\setupheadtext [\s!sv] [\v!figuren=Figurer] -\setupheadtext [\s!af] [\v!figuren=Figure] -\setupheadtext [\s!no] [\v!figuren=Figurer] - -\setupheadtext [\s!en] [\v!grafieken=Graphics] -\setupheadtext [\s!nl] [\v!grafieken=Grafieken] -\setupheadtext [\s!de] [\v!grafieken=Graphiken] -\setupheadtext [\s!da] [\v!grafieken=Grafik] -\setupheadtext [\s!sv] [\v!grafieken=Grafik] -\setupheadtext [\s!af] [\v!grafieken=Grafieke] -\setupheadtext [\s!no] [\v!grafieken=Grafikk] - -\setupheadtext [\s!en] [\v!intermezzos=Intermezzos] -\setupheadtext [\s!nl] [\v!intermezzos=Intermezzo's] -\setupheadtext [\s!de] [\v!intermezzos=Intermezzi] -\setupheadtext [\s!da] [\v!intermezzos=Intermezzoer] -\setupheadtext [\s!sv] [\v!intermezzos=Intermezzon] -\setupheadtext [\s!af] [\v!intermezzos=Intermezzos] -\setupheadtext [\s!no] [\v!intermezzos=Intermesso] +\setupheadtext [\s!en] [\v!content=Contents] +\setupheadtext [\s!nl] [\v!content=Inhoud] +\setupheadtext [\s!de] [\v!content=Inhalt] +\setupheadtext [\s!da] [\v!content=Indhold] +\setupheadtext [\s!sv] [\v!content=Inneh\aring ll] +\setupheadtext [\s!af] [\v!content=Inhoud] +\setupheadtext [\s!no] [\v!content=Innhold] + +\setupheadtext [\s!en] [\v!tables=Tables] +\setupheadtext [\s!nl] [\v!tables=Tabellen] +\setupheadtext [\s!de] [\v!tables=Tabellen] +\setupheadtext [\s!da] [\v!tables=Tabeller] +\setupheadtext [\s!sv] [\v!tables=Tabeller] +\setupheadtext [\s!af] [\v!tables=Tabelle] +\setupheadtext [\s!no] [\v!tables=Tabeller] + +\setupheadtext [\s!en] [\v!figures=Figures] +\setupheadtext [\s!nl] [\v!figures=Figuren] +\setupheadtext [\s!de] [\v!figures=Abbildungen] +\setupheadtext [\s!da] [\v!figures=Figurer] +\setupheadtext [\s!sv] [\v!figures=Figurer] +\setupheadtext [\s!af] [\v!figures=Figure] +\setupheadtext [\s!no] [\v!figures=Figurer] + +\setupheadtext [\s!en] [\v!graphics=Graphics] +\setupheadtext [\s!nl] [\v!graphics=Grafieken] +\setupheadtext [\s!de] [\v!graphics=Graphiken] +\setupheadtext [\s!da] [\v!graphics=Grafik] +\setupheadtext [\s!sv] [\v!graphics=Grafik] +\setupheadtext [\s!af] [\v!graphics=Grafieke] +\setupheadtext [\s!no] [\v!graphics=Grafikk] + +\setupheadtext [\s!en] [\v!intermezzi=Intermezzos] +\setupheadtext [\s!nl] [\v!intermezzi=Intermezzo's] +\setupheadtext [\s!de] [\v!intermezzi=Intermezzi] +\setupheadtext [\s!da] [\v!intermezzi=Intermezzoer] +\setupheadtext [\s!sv] [\v!intermezzi=Intermezzon] +\setupheadtext [\s!af] [\v!intermezzi=Intermezzos] +\setupheadtext [\s!no] [\v!intermezzi=Intermesso] \setupheadtext [\s!en] [\v!index=Index] \setupheadtext [\s!nl] [\v!index=Index] @@ -355,13 +350,13 @@ \setupheadtext [\s!af] [\v!index=Indeks] \setupheadtext [\s!no] [\v!index=Indeks] -\setupheadtext [\s!en] [\v!afkortingen=Abbreviations] -\setupheadtext [\s!nl] [\v!afkortingen=Afkortingen] -\setupheadtext [\s!de] [\v!afkortingen=Abk\uumlaut rzungen] -\setupheadtext [\s!da] [\v!afkortingen=Forkortelser] -\setupheadtext [\s!sv] [\v!afkortingen=F\oumlaut rkortningar] -\setupheadtext [\s!af] [\v!afkortingen=Afkortings] -\setupheadtext [\s!no] [\v!afkortingen=Forkortelser] +\setupheadtext [\s!en] [\v!abbreviations=Abbreviations] +\setupheadtext [\s!nl] [\v!abbreviations=Afkortingen] +\setupheadtext [\s!de] [\v!abbreviations=Abk\uumlaut rzungen] +\setupheadtext [\s!da] [\v!abbreviations=Forkortelser] +\setupheadtext [\s!sv] [\v!abbreviations=F\oumlaut rkortningar] +\setupheadtext [\s!af] [\v!abbreviations=Afkortings] +\setupheadtext [\s!no] [\v!abbreviations=Forkortelser] \setupheadtext [\s!en] [\v!logos=Logos] \setupheadtext [\s!nl] [\v!logos=Logo's] @@ -371,29 +366,29 @@ \setupheadtext [\s!af] [\v!logos=Logos] \setupheadtext [\s!no] [\v!logos=Logoer] -\setupheadtext [\s!en] [\v!eenheden=Units] -\setupheadtext [\s!nl] [\v!eenheden=Eenheden] -\setupheadtext [\s!de] [\v!eenheden=Einheiten] -\setupheadtext [\s!da] [\v!eenheden=Enheder] -\setupheadtext [\s!sv] [\v!eenheden=Enheter] -\setupheadtext [\s!af] [\v!eenheden=Eenhede] -\setupheadtext [\s!no] [\v!eenheden=Enheter] - -\setuplabeltext [\s!en] [\v!tabel=Table ] -\setuplabeltext [\s!nl] [\v!tabel=Tabel ] -\setuplabeltext [\s!de] [\v!tabel=Tabelle ] -\setuplabeltext [\s!da] [\v!tabel=Tabel ] -\setuplabeltext [\s!sv] [\v!tabel=Tabell ] -\setuplabeltext [\s!af] [\v!tabel=Tabel] -\setuplabeltext [\s!no] [\v!tabel=Tabell ] - -\setuplabeltext [\s!en] [\v!figuur=Figure ] -\setuplabeltext [\s!nl] [\v!figuur=Figuur ] -\setuplabeltext [\s!de] [\v!figuur=Abbildung ] -\setuplabeltext [\s!da] [\v!figuur=Figur ] -\setuplabeltext [\s!sv] [\v!figuur=Figur ] -\setuplabeltext [\s!af] [\v!figuur=Figuur ] -\setuplabeltext [\s!no] [\v!figuur=Figur ] +\setupheadtext [\s!en] [\v!units=Units] +\setupheadtext [\s!nl] [\v!units=Eenheden] +\setupheadtext [\s!de] [\v!units=Einheiten] +\setupheadtext [\s!da] [\v!units=Enheder] +\setupheadtext [\s!sv] [\v!units=Enheter] +\setupheadtext [\s!af] [\v!units=Eenhede] +\setupheadtext [\s!no] [\v!units=Enheter] + +\setuplabeltext [\s!en] [\v!table=Table ] +\setuplabeltext [\s!nl] [\v!table=Tabel ] +\setuplabeltext [\s!de] [\v!table=Tabelle ] +\setuplabeltext [\s!da] [\v!table=Tabel ] +\setuplabeltext [\s!sv] [\v!table=Tabell ] +\setuplabeltext [\s!af] [\v!table=Tabel] +\setuplabeltext [\s!no] [\v!table=Tabell ] + +\setuplabeltext [\s!en] [\v!figure=Figure ] +\setuplabeltext [\s!nl] [\v!figure=Figuur ] +\setuplabeltext [\s!de] [\v!figure=Abbildung ] +\setuplabeltext [\s!da] [\v!figure=Figur ] +\setuplabeltext [\s!sv] [\v!figure=Figur ] +\setuplabeltext [\s!af] [\v!figure=Figuur ] +\setuplabeltext [\s!no] [\v!figure=Figur ] \setuplabeltext [\s!en] [\v!intermezzo=Intermezzo ] \setuplabeltext [\s!nl] [\v!intermezzo=Intermezzo ] @@ -403,85 +398,85 @@ \setuplabeltext [\s!af] [\v!intermezzo=Intermezzo ] \setuplabeltext [\s!no] [\v!intermezzo=Intermesso ] -\setuplabeltext [\s!en] [\v!grafiek=Graphic ] -\setuplabeltext [\s!nl] [\v!grafiek=Grafiek ] -\setuplabeltext [\s!de] [\v!grafiek=Graphik ] -\setuplabeltext [\s!da] [\v!grafiek=Grafik ] -\setuplabeltext [\s!sv] [\v!grafiek=Grafik ] -\setuplabeltext [\s!af] [\v!grafiek=Grafiek ] -\setuplabeltext [\s!no] [\v!grafiek=Grafikk ] - -\setuplabeltext [\s!en] [\v!hoofdstuk=] -\setuplabeltext [\s!nl] [\v!hoofdstuk=] -\setuplabeltext [\s!de] [\v!hoofdstuk=] -\setuplabeltext [\s!da] [\v!hoofdstuk=] -\setuplabeltext [\s!sv] [\v!hoofdstuk=] -\setuplabeltext [\s!af] [\v!hoofdstuk=] % [\v!hoofdstuk=hoofstuk] -\setuplabeltext [\s!no] [\v!hoofdstuk=] - -\setuplabeltext [\s!en] [\v!paragraaf=] -\setuplabeltext [\s!nl] [\v!paragraaf=] -\setuplabeltext [\s!de] [\v!paragraaf=] -\setuplabeltext [\s!da] [\v!paragraaf=] -\setuplabeltext [\s!sv] [\v!paragraaf=] -\setuplabeltext [\s!af] [\v!paragraaf=] % [\v!paragraaf=paragraaf] -\setuplabeltext [\s!no] [\v!paragraaf=] - -\setuplabeltext [\s!en] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!nl] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!de] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!da] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!sv] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!af] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!no] [\v!sub\v!paragraaf=] - -\setuplabeltext [\s!en] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!nl] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!de] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!da] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!sv] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!af] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!no] [\v!sub\v!sub\v!paragraaf=] - -\setuplabeltext [\s!en] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!nl] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!de] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!da] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!sv] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!af] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!no] [\v!sub\v!sub\v!sub\v!paragraaf=] - -\setuplabeltext [\s!en] [\v!bijlage=] -\setuplabeltext [\s!nl] [\v!bijlage=] -\setuplabeltext [\s!de] [\v!bijlage=] -\setuplabeltext [\s!da] [\v!bijlage=] % [\v!bijlage=bilag] -\setuplabeltext [\s!sv] [\v!bijlage=] -\setuplabeltext [\s!af] [\v!bijlage=] % [\v!bijlage=bylae] -\setuplabeltext [\s!no] [\v!bijlage=] - -\setuplabeltext [\s!en] [\v!deel=Part ] -\setuplabeltext [\s!nl] [\v!deel=Deel ] -\setuplabeltext [\s!de] [\v!deel=Teil ] -\setuplabeltext [\s!da] [\v!deel=Del ] -\setuplabeltext [\s!sv] [\v!deel=Del ] -\setuplabeltext [\s!af] [\v!deel=Deel ] -\setuplabeltext [\s!no] [\v!deel=Del ] - -\setuplabeltext [\s!en] [\v!regel=line ] -\setuplabeltext [\s!nl] [\v!regel=regel ] -\setuplabeltext [\s!de] [\v!regel=Zeile ] -\setuplabeltext [\s!da] [\v!regel=linie ] % or linje -\setuplabeltext [\s!sv] [\v!regel=rad ] -\setuplabeltext [\s!af] [\v!regel=re\ediaeresis l ] -\setuplabeltext [\s!no] [\v!regel=linje ] - -\setuplabeltext [\s!en] [\v!regels=lines ] -\setuplabeltext [\s!nl] [\v!regels=regels ] -\setuplabeltext [\s!de] [\v!regels=Zeilen ] -\setuplabeltext [\s!da] [\v!regels=linier ] % or linjer -\setuplabeltext [\s!sv] [\v!regels=rader ] -\setuplabeltext [\s!af] [\v!regels=re\ediaeresis ls ] -\setuplabeltext [\s!no] [\v!regels=linjer ] +\setuplabeltext [\s!en] [\v!graphic=Graphic ] +\setuplabeltext [\s!nl] [\v!graphic=Grafiek ] +\setuplabeltext [\s!de] [\v!graphic=Graphik ] +\setuplabeltext [\s!da] [\v!graphic=Grafik ] +\setuplabeltext [\s!sv] [\v!graphic=Grafik ] +\setuplabeltext [\s!af] [\v!graphic=Grafiek ] +\setuplabeltext [\s!no] [\v!graphic=Grafikk ] + +\setuplabeltext [\s!en] [\v!chapter=] +\setuplabeltext [\s!nl] [\v!chapter=] +\setuplabeltext [\s!de] [\v!chapter=] +\setuplabeltext [\s!da] [\v!chapter=] +\setuplabeltext [\s!sv] [\v!chapter=] +\setuplabeltext [\s!af] [\v!chapter=] % [\v!chapter=hoofstuk] +\setuplabeltext [\s!no] [\v!chapter=] + +\setuplabeltext [\s!en] [\v!section=] +\setuplabeltext [\s!nl] [\v!section=] +\setuplabeltext [\s!de] [\v!section=] +\setuplabeltext [\s!da] [\v!section=] +\setuplabeltext [\s!sv] [\v!section=] +\setuplabeltext [\s!af] [\v!section=] % [\v!section=paragraaf] +\setuplabeltext [\s!no] [\v!section=] + +\setuplabeltext [\s!en] [\v!subsection=] +\setuplabeltext [\s!nl] [\v!subsection=] +\setuplabeltext [\s!de] [\v!subsection=] +\setuplabeltext [\s!da] [\v!subsection=] +\setuplabeltext [\s!sv] [\v!subsection=] +\setuplabeltext [\s!af] [\v!subsection=] +\setuplabeltext [\s!no] [\v!subsection=] + +\setuplabeltext [\s!en] [\v!subsubsection=] +\setuplabeltext [\s!nl] [\v!subsubsection=] +\setuplabeltext [\s!de] [\v!subsubsection=] +\setuplabeltext [\s!da] [\v!subsubsection=] +\setuplabeltext [\s!sv] [\v!subsubsection=] +\setuplabeltext [\s!af] [\v!subsubsection=] +\setuplabeltext [\s!no] [\v!subsubsection=] + +\setuplabeltext [\s!en] [\v!subsubsubsection=] +\setuplabeltext [\s!nl] [\v!subsubsubsection=] +\setuplabeltext [\s!de] [\v!subsubsubsection=] +\setuplabeltext [\s!da] [\v!subsubsubsection=] +\setuplabeltext [\s!sv] [\v!subsubsubsection=] +\setuplabeltext [\s!af] [\v!subsubsubsection=] +\setuplabeltext [\s!no] [\v!subsubsubsection=] + +\setuplabeltext [\s!en] [\v!appendix=] +\setuplabeltext [\s!nl] [\v!appendix=] +\setuplabeltext [\s!de] [\v!appendix=] +\setuplabeltext [\s!da] [\v!appendix=] % [\v!appendix=bilag] +\setuplabeltext [\s!sv] [\v!appendix=] +\setuplabeltext [\s!af] [\v!appendix=] % [\v!appendix=bylae] +\setuplabeltext [\s!no] [\v!appendix=] + +\setuplabeltext [\s!en] [\v!part=Part ] +\setuplabeltext [\s!nl] [\v!part=Deel ] +\setuplabeltext [\s!de] [\v!part=Teil ] +\setuplabeltext [\s!da] [\v!part=Del ] +\setuplabeltext [\s!sv] [\v!part=Del ] +\setuplabeltext [\s!af] [\v!part=Deel ] +\setuplabeltext [\s!no] [\v!part=Del ] + +\setuplabeltext [\s!en] [\v!line=line ] +\setuplabeltext [\s!nl] [\v!line=regel ] +\setuplabeltext [\s!de] [\v!line=Zeile ] +\setuplabeltext [\s!da] [\v!line=linie ] % or linje +\setuplabeltext [\s!sv] [\v!line=rad ] +\setuplabeltext [\s!af] [\v!line=re\ediaeresis l ] +\setuplabeltext [\s!no] [\v!line=linje ] + +\setuplabeltext [\s!en] [\v!lines=lines ] +\setuplabeltext [\s!nl] [\v!lines=regels ] +\setuplabeltext [\s!de] [\v!lines=Zeilen ] +\setuplabeltext [\s!da] [\v!lines=linier ] % or linjer +\setuplabeltext [\s!sv] [\v!lines=rader ] +\setuplabeltext [\s!af] [\v!lines=re\ediaeresis ls ] +\setuplabeltext [\s!no] [\v!lines=linjer ] \setuplabeltext [\s!en] [\v!january=January] \setuplabeltext [\s!en] [\v!february=February] @@ -632,41 +627,41 @@ %D Rather new ... -\setuplabeltext [\s!nl] [\v!pagina=pagina ] -\setuplabeltext [\s!nl] [\v!oppagina=op pagina ] -\setuplabeltext [\s!nl] [\v!hierboven=hierboven] -\setuplabeltext [\s!nl] [\v!hieronder=hieronder] -\setuplabeltext [\s!nl] [\v!zie=zie ] - -\setuplabeltext [\s!en] [\v!pagina=page ] -\setuplabeltext [\s!en] [\v!oppagina=at page ] -\setuplabeltext [\s!en] [\v!hierboven=as we show above] -\setuplabeltext [\s!en] [\v!hieronder=as we show below] -\setuplabeltext [\s!en] [\v!zie=see ] - -\setuplabeltext [\s!de] [\v!pagina=Seite ] -\setuplabeltext [\s!de] [\v!oppagina=auf Seite ] -\setuplabeltext [\s!de] [\v!hierboven=siehe oben] -\setuplabeltext [\s!de] [\v!hieronder=siehe unten] -\setuplabeltext [\s!de] [\v!zie=siehe ] - -\setuplabeltext [\s!da] [\v!pagina=Side ] -\setuplabeltext [\s!da] [\v!oppagina=p\aring\ side ] -\setuplabeltext [\s!da] [\v!hierboven=se foroven] -\setuplabeltext [\s!da] [\v!hieronder=se forneden] -\setuplabeltext [\s!da] [\v!zie=se ] - -\setuplabeltext [\s!sv] [\v!pagina=Sida ] -\setuplabeltext [\s!sv] [\v!oppagina=p\aring\ sida ] -\setuplabeltext [\s!sv] [\v!hierboven=se ovan] -\setuplabeltext [\s!sv] [\v!hieronder=se nedan] -\setuplabeltext [\s!sv] [\v!zie=se ] - -\setuplabeltext [\s!no] [\v!pagina=Side ] -\setuplabeltext [\s!no] [\v!oppagina=p\aring\ side ] -\setuplabeltext [\s!no] [\v!hierboven=se foroven] -\setuplabeltext [\s!no] [\v!hieronder=se forneden] -\setuplabeltext [\s!no] [\v!zie=se ] +\setuplabeltext [\s!nl] [\v!page=pagina ] +\setuplabeltext [\s!nl] [\v!atpage=op pagina ] +\setuplabeltext [\s!nl] [\v!hencefore=hierboven] +\setuplabeltext [\s!nl] [\v!hereafter=hieronder] +\setuplabeltext [\s!nl] [\v!see=zie ] + +\setuplabeltext [\s!en] [\v!page=page ] +\setuplabeltext [\s!en] [\v!atpage=at page ] +\setuplabeltext [\s!en] [\v!hencefore=as we show above] +\setuplabeltext [\s!en] [\v!hereafter=as we show below] +\setuplabeltext [\s!en] [\v!see=see ] + +\setuplabeltext [\s!de] [\v!page=Seite ] +\setuplabeltext [\s!de] [\v!atpage=auf Seite ] +\setuplabeltext [\s!de] [\v!hencefore=siehe oben] +\setuplabeltext [\s!de] [\v!hereafter=siehe unten] +\setuplabeltext [\s!de] [\v!see=siehe ] + +\setuplabeltext [\s!da] [\v!page=Side ] +\setuplabeltext [\s!da] [\v!atpage=p\aring\ side ] +\setuplabeltext [\s!da] [\v!hencefore=se foroven] +\setuplabeltext [\s!da] [\v!hereafter=se forneden] +\setuplabeltext [\s!da] [\v!see=se ] + +\setuplabeltext [\s!sv] [\v!page=Sida ] +\setuplabeltext [\s!sv] [\v!atpage=p\aring\ sida ] +\setuplabeltext [\s!sv] [\v!hencefore=se ovan] +\setuplabeltext [\s!sv] [\v!hereafter=se nedan] +\setuplabeltext [\s!sv] [\v!see=se ] + +\setuplabeltext [\s!no] [\v!page=Side ] +\setuplabeltext [\s!no] [\v!atpage=p\aring\ side ] +\setuplabeltext [\s!no] [\v!hencefore=se foroven] +\setuplabeltext [\s!no] [\v!hereafter=se forneden] +\setuplabeltext [\s!no] [\v!see=se ] %D ... and to be completed! @@ -698,4 +693,4 @@ %D \ShowAllLanguageValues [\s!af] [afrikaans] afrikaanse gasvryheid %D \ShowAllLanguageValues [\s!no] [norwegian] noorse ... -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/lang-grk.tex b/tex/context/base/lang-grk.tex index 0b000e8a1..b0b0e0b15 100644 --- a/tex/context/base/lang-grk.tex +++ b/tex/context/base/lang-grk.tex @@ -8,9 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Greek Language} @@ -21,7 +20,7 @@ \installlanguage [\s!gr] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -30,35 +29,35 @@ \c!rightquote=\Greekrightquot, \c!leftquotation=\Greekleftquot, \c!rightquotation=\Greekrightquot, - \c!datum={\v!dag\ \v!maand\ \v!jaar}, - \c!status=\v!stop] + \c!date={\v!day\ \v!month\ \v!year}, + \c!state=\v!stop] \installlanguage [greek] [\s!gr] -\setupheadtext [\s!fi] [\v!inhoud=\GreekPi\Greekepsilon\Greekrho\Greekiota\Greekepsilon\Greekchi\Greekomicrontonos\Greekmu\Greekepsilon\Greeknu\Greekalpha] -\setupheadtext [\s!fi] [\v!tabellen=\GreekPi\Greekiotatonos\Greeknu\Greekalpha\Greekkappa\Greekepsilon\Greekfinalsigma] -\setupheadtext [\s!fi] [\v!figuren=\GreekSigma\Greekchi\Greeketatonos\Greekmu\Greekalpha\Greektau\Greekalpha] -\setupheadtext [\s!fi] [\v!grafieken=\GreekGamma\Greekrho\Greekalpha\Greekphi\Greekiota\Greekkappa\Greekalphatonos] -\setupheadtext [\s!fi] [\v!intermezzos=\GreekPi\Greekalpha\Greekupsilontonos\Greeksigma\Greekepsilon\Greekiota\Greekfinalsigma] +\setupheadtext [\s!fi] [\v!content=\GreekPi\Greekepsilon\Greekrho\Greekiota\Greekepsilon\Greekchi\Greekomicrontonos\Greekmu\Greekepsilon\Greeknu\Greekalpha] +\setupheadtext [\s!fi] [\v!tables=\GreekPi\Greekiotatonos\Greeknu\Greekalpha\Greekkappa\Greekepsilon\Greekfinalsigma] +\setupheadtext [\s!fi] [\v!figures=\GreekSigma\Greekchi\Greeketatonos\Greekmu\Greekalpha\Greektau\Greekalpha] +\setupheadtext [\s!fi] [\v!graphics=\GreekGamma\Greekrho\Greekalpha\Greekphi\Greekiota\Greekkappa\Greekalphatonos] +\setupheadtext [\s!fi] [\v!intermezzi=\GreekPi\Greekalpha\Greekupsilontonos\Greeksigma\Greekepsilon\Greekiota\Greekfinalsigma] \setupheadtext [\s!fi] [\v!index=\GreekEpsilon\Greekupsilon\Greekrho\Greekepsilon\Greektau\Greeketatonos\Greekrho\Greekiota\Greekomicron] -\setupheadtext [\s!fi] [\v!afkortingen=\GreekSigma\Greekupsilon\Greeknu\Greektau\Greekomicron\Greekmu\Greekomicron\Greekgamma\Greekrho\Greekalpha\Greekphi\Greekiotatonos\Greekepsilon\Greekfinalsigma] +\setupheadtext [\s!fi] [\v!abbreviations=\GreekSigma\Greekupsilon\Greeknu\Greektau\Greekomicron\Greekmu\Greekomicron\Greekgamma\Greekrho\Greekalpha\Greekphi\Greekiotatonos\Greekepsilon\Greekfinalsigma] \setupheadtext [\s!fi] [\v!logos=\GreekLamda\Greekomicron\Greekgamma\Greekomicrontonos\Greektau\Greekupsilon\Greekpi\Greekalpha] -\setupheadtext [\s!fi] [\v!eenheden=\GreekMu\Greekomicron\Greeknu\Greekalphatonos\Greekdelta\Greekepsilon\Greekfinalsigma] +\setupheadtext [\s!fi] [\v!units=\GreekMu\Greekomicron\Greeknu\Greekalphatonos\Greekdelta\Greekepsilon\Greekfinalsigma] -\setuplabeltext [\s!fi] [\v!tabel=\GreekPi\Greekiotatonos\Greeknu\Greekalpha\Greekkappa\Greekalpha\Greekfinalsigma] -\setuplabeltext [\s!fi] [\v!figuur=\GreekSigma\Greekchi\Greeketatonos\Greekmu\Greekalpha] +\setuplabeltext [\s!fi] [\v!table=\GreekPi\Greekiotatonos\Greeknu\Greekalpha\Greekkappa\Greekalpha\Greekfinalsigma] +\setuplabeltext [\s!fi] [\v!figure=\GreekSigma\Greekchi\Greeketatonos\Greekmu\Greekalpha] \setuplabeltext [\s!fi] [\v!intermezzo=\GreekPi\Greekalpha\Greekupsilontonos\Greeksigma\Greeketa] -\setuplabeltext [\s!fi] [\v!grafiek=\GreekGamma\Greekrho\Greekalpha\Greekphi\Greekiota\Greekkappa\Greekomicrontonos] -\setuplabeltext [\s!fi] [\v!hoofdstuk=\GreekKappa\Greekepsilon\Greekphi\Greekalphatonos\Greeklamda\Greekalpha\Greekiota\Greekomicron] -\setuplabeltext [\s!fi] [\v!paragraaf=\GreekEpsilon\Greeknu\Greekomicrontonos\Greektau\Greeketa\Greektau\Greekalpha] -\setuplabeltext [\s!fi] [\v!sub\v!paragraaf=\GreekUpsilon\Greekpi\Greekomicrontonos\Greekepsilon\Greeknu\Greekomicrontonos\Greektau\Greeketa\Greektau\Greekalpha] -\setuplabeltext [\s!fi] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!fi] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!fi] [\v!bijlage=\GreekPi\Greekalpha\Greekrho\Greekalphatonos\Greekrho\Greektau\Greeketa\Greekmu\Greekalpha] -\setuplabeltext [\s!fi] [\v!deel=\GreekMu\Greekepsilontonos\Greekrho\Greekomicron\Greekfinalsigma] -\setuplabeltext [\s!fi] [\v!regel=\GreekGamma\Greekrho\Greekalpha\Greekmu\Greekmu\Greeketatonos] -\setuplabeltext [\s!fi] [\v!regels=\GreekGamma\Greekrho\Greekalpha\Greekmu\Greekmu\Greekepsilontonos\Greekfinalsigma] +\setuplabeltext [\s!fi] [\v!graphic=\GreekGamma\Greekrho\Greekalpha\Greekphi\Greekiota\Greekkappa\Greekomicrontonos] +\setuplabeltext [\s!fi] [\v!chapter=\GreekKappa\Greekepsilon\Greekphi\Greekalphatonos\Greeklamda\Greekalpha\Greekiota\Greekomicron] +\setuplabeltext [\s!fi] [\v!section=\GreekEpsilon\Greeknu\Greekomicrontonos\Greektau\Greeketa\Greektau\Greekalpha] +\setuplabeltext [\s!fi] [\v!subsection=\GreekUpsilon\Greekpi\Greekomicrontonos\Greekepsilon\Greeknu\Greekomicrontonos\Greektau\Greeketa\Greektau\Greekalpha] +\setuplabeltext [\s!fi] [\v!subsubsection=] +\setuplabeltext [\s!fi] [\v!subsubsubsection=] +\setuplabeltext [\s!fi] [\v!appendix=\GreekPi\Greekalpha\Greekrho\Greekalphatonos\Greekrho\Greektau\Greeketa\Greekmu\Greekalpha] +\setuplabeltext [\s!fi] [\v!part=\GreekMu\Greekepsilontonos\Greekrho\Greekomicron\Greekfinalsigma] +\setuplabeltext [\s!fi] [\v!line=\GreekGamma\Greekrho\Greekalpha\Greekmu\Greekmu\Greeketatonos] +\setuplabeltext [\s!fi] [\v!lines=\GreekGamma\Greekrho\Greekalpha\Greekmu\Greekmu\Greekepsilontonos\Greekfinalsigma] \setuplabeltext [\s!fi] [\v!january=\GreekIota\Greekalpha\Greeknu\Greekomicron\Greekupsilon\Greekalphatonos\Greekrho\Greekiota\Greekomicron\Greekfinalsigma] \setuplabeltext [\s!fi] [\v!february=\GreekPhi\Greekepsilon\Greekbeta\Greekrho\Greekomicron\Greekupsilon\Greekalphatonos\Greekrho\Greekiota\Greekomicron\Greekfinalsigma] @@ -82,8 +81,6 @@ \setuplabeltext [\s!fi] [\v!friday=\GreekPi\Greekalpha\Greekrho\Greekalpha\Greeksigma\Greekkappa\Greekepsilon\Greekupsilon\Greeketatonos] \setuplabeltext [\s!fi] [\v!saturday=\GreekSigma\Greekalphatonos\Greekbeta\Greekbeta\Greekalpha\Greektau\Greekomicron] -%D \ShowAllLanguageValues [\s!gr] [\GreekEpsilon\Greeklamda\Greeklamda\Greeketa\Greeknu\Greekiota\Greekkappa\Greekalphatonos] - -\protect +%D % \ShowAllLanguageValues [\s!gr] [\GreekEpsilon\Greeklamda\Greeklamda\Greeketa\Greeknu\Greekiota\Greekkappa\Greekalphatonos] Greek ... -\endinput +\protect \endinput diff --git a/tex/context/base/lang-ind.tex b/tex/context/base/lang-ind.tex index 1a92b355e..7796bcb2a 100644 --- a/tex/context/base/lang-ind.tex +++ b/tex/context/base/lang-ind.tex @@ -1,5 +1,5 @@ %D \module -%D [ file=lang-ind, +%D [ file=lang--ind, %D version=1997.09.03, %D title=\CONTEXT\ Language Macros, %D subtitle=Indo||Iranian Languages, @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Indo-Iranian Languages} @@ -17,9 +17,9 @@ %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. -% 34 languages +% 34 languages \unprotect diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex index 223531299..4a906a46d 100644 --- a/tex/context/base/lang-ini.tex +++ b/tex/context/base/lang-ini.tex @@ -25,7 +25,7 @@ \startmessages dutch library: linguals title: taal 1: afbreekpatronen -- voor -- geladen (n=--) - 2: geen afbreekpatronen -- voor -- (n=--) + 2: geen afbreekpatronen -- voor -- (n=--) (--,--) 3: afbreekdefinities -- voor -- geladen (n=--) 4: geen afbreekdefinities -- voor -- (n=--) 5: afbreekpatronen voor -- niet geladen @@ -39,7 +39,7 @@ \startmessages english library: linguals title: language 1: patterns -- for -- loaded (n=--) - 2: no patterns -- for -- (n=--) + 2: no patterns -- for -- (n=--) (--,--) 3: hyphenations -- for -- loaded (n=--) 4: no hyphenations -- for -- (n=--) 5: patterns for -- not loaded @@ -53,7 +53,7 @@ \startmessages german library: linguals title: Sprache 1: Trennmuster -- fuer -- geladen (n=--) - 2: Keine Trennmuster -- fuer -- (n=--) + 2: Keine Trennmuster -- fuer -- (n=--) (--,--) 3: Trenndefinitionen -- fuer -- geladen (n=--) 4: Keine Trenndefinitionen -- fuer -- (n=--) 5: Trennmuster fuer -- nicht geladen @@ -69,7 +69,7 @@ \startmessages czech library: linguals title: jazyky 1: vzory -- pro -- nacteny (n=--) - 2: zadne vzory -- pro -- (n=--) + 2: zadne vzory -- pro -- (n=--) (--,--) 3: deleni slov -- pro -- nacteno (n=--) 4: zadne deleni slov -- pro -- (n=--) 5: vzory pro -- nenacteny @@ -83,7 +83,7 @@ \startmessages italian library: linguals title: lingua 1: schemi -- per -- caricati (n=--) - 2: niente schemi -- per -- (n=--) + 2: niente schemi -- per -- (n=--) (--,--) 3: sillabazione -- per -- caricata (n=--) 4: niente sillabazione -- per -- (n=--) 5: schemi per -- non caricati @@ -97,7 +97,7 @@ \startmessages norwegian library: linguals title: språk 1: orddelingsmønster -- for -- er lest inn (n=--) - 2: ingen orddelingsmønster -- for -- (n=--) + 2: ingen orddelingsmønster -- for -- (n=--) (--,--) 3: orddelingsdefinisjon -- for -- er lest inn (n=--) 4: ingen orddelingsdefinisjon -- for -- (n=--) 5: orddelingsmønster for -- er ikke lest inn @@ -111,7 +111,7 @@ \startmessages romanian library: linguals title: limbi 1: sablonul -- pentru -- s-a incarcat (n=--) - 2: nu exista sabloane -- pentru -- (n=--) + 2: nu exista sabloane -- pentru -- (n=--) (--,--) 3: despartirea in silabe -- pentru -- s-a incarcat (n=--) 4: nu exista despartire in silabe -- pentru -- (n=--) 5: sabloanele pentru -- nu sunt incarcate @@ -134,15 +134,40 @@ %D We keep track of the last loaded patterns by means of a %D pseudo \COUNTER. This just one of those situations in which -%D we don't want to spent a real one. +%D we don't want to spent a real one. Language zero has no +%D patterns, first of all because I like to start numbering +%D at one. It may come in handy for special purposes as well. -\newcounter\loadedlanguage +\normallanguage\zerocount + +\beginETEX + + \begingroup + \obeylccodes + \patterns{} + \endgroup + +\endETEX + +\def\loadedlanguage{1} %D Let's start with setting the lowercase code of quotes, so %D that we get proper hyphenation in languages like Dutch, %D French and Czech. -\lccode`\'=`\' +% elsewhere: \lccode`\'=`\' + +% \def\showlccodes +% {\currentlanguage:\space +% \dostepwiserecurse{0}{255}{1} +% {\ifnum\lccode\recurselevel>0 +% \char\recurselevel:\the\lccode\recurselevel\relax\space +% \fi} +% \endgraf} + +% \de \hyphenatedword{Works''} \showlccodes +% \nl \hyphenatedword{Works''} \showlccodes +% \uk \hyphenatedword{Works''} \showlccodes %D \macros %D {currentlanguage, setupcurrentlanguage} @@ -168,24 +193,24 @@ %D %D \showsetup{\y!installlanguage} %D -%D When \type{\c!status} equals \type{\v!start}, both patterns +%D When \type {state} equals \type {start}, both patterns %D and additional hyphenation specifications are loaded. These %D files are seached for on the system path and are to be %D named: %D -%D \starttypen +%D \starttyping %D \f!languageprefix-identifier.\f!patternsextension %D \f!languageprefix-identifier.\f!hyhensextension -%D \stoptypen +%D \stoptyping %D -%D The \type{\c!spatiering} specifies how the spaces after +%D The \type{spacing} variable specifies how the spaces after %D punctuation has to be handled. English is by tradition more %D tolerant to inter||sentence spacing than other languages. %D -%D This macro also defines \type{\identifier} as a shortcut +%D This macro also defines \type {\identifier} as a shortcut %D switch to the language. Furthermore the command defined as %D being language specific, are executed. With -%D \type{\c!default} we can default to another language +%D \type {default} we can default to another language %D (patterns) at format generation time. This default language %D is overruled when the appropriate patterns are loaded (some %D implementations support run time addition of patterns to a @@ -208,21 +233,18 @@ \let\preloadedpatterns\empty \let\preloadedpmessage\empty -\def\showpatterns#1% - {\getvalue{\??la#1\s!lefthyphenmin}% - -#1-% - \getvalue{\??la#1\s!righthyphenmin} } +\def\showpatterns#1#2#3#4% language number encoding mapping + {#1->#3:#4->#2->\getvalue{\??la#1\s!lefthyphenmin}:\getvalue{\??la#1\s!righthyphenmin}\space} \def\preloadlanguages - {\doifsomething\preloadedpmessage - {\showmessage\m!linguals{10}\preloadedpmessage}} + {\doifsomething\preloadedpmessage{\showmessage\m!linguals{10}\preloadedpmessage}} \let\installedlanguages\empty \def\doinstalllanguage[#1][#2]% {%\ConvertConstantAfter\doifinstringelse{=}{#2} \doifassignmentelse{#2} - {\doifdefinedelse{\??la#1\c!status} + {\doifdefinedelse{\??la#1\c!state} {\getparameters[\??la#1][#2]} {\setvalue{\l!prefix!#1}{#1}% \addtocommalist{#1}\installedlanguages @@ -231,7 +253,7 @@ [\??la#1] [\s!lefthyphenmin=2, \s!righthyphenmin=2, - \c!spatiering=\v!opelkaar, + \c!spacing=\v!packed, \c!midsentence=---, \c!leftsentence=---, \c!rightsentence=---, @@ -245,13 +267,13 @@ \c!middlespeech=, \c!rightspeech=\getvalue{\??la#1\c!rightquotation}, \c!limittext=\unknown, - \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, - \c!status=\v!stop, + \c!date={\v!year,\ ,\v!month,\ ,\v!day}, + \c!state=\v!stop, \c!default=, \s!patterns=, \s!mapping=, \s!encoding=, - \c!tekst=Ag, + \c!text=Ag, #2]% \doifvaluesomething{\??la#1\c!default} {\doifnotvalue{\??la#1\c!default}{#1} @@ -259,7 +281,7 @@ [\??la#1] [\s!lefthyphenmin=\languagedefault{#1}\s!lefthyphenmin, \s!righthyphenmin=\languagedefault{#1}\s!righthyphenmin, - \c!spatiering=\languagedefault{#1}\c!spatiering, + \c!spacing=\languagedefault{#1}\c!spacing, \c!leftsentence=\languagedefault{#1}\c!leftsentence, \c!rightsentence=\languagedefault{#1}\c!rightsentence, \c!leftsubsentence=\languagedefault{#1}\c!leftsubsentence, @@ -271,21 +293,21 @@ \c!leftspeech=\languagedefault{#1}\c!leftspeech, \c!middlespeech=\languagedefault{#1}\c!middlespeech, \c!rightspeech=\languagedefault{#1}\c!rightspeech, - \c!datum=\languagedefault{#1}\c!datum, + \c!date=\languagedefault{#1}\c!date, \s!mapping=\languagedefault{#1}\s!mapping, \s!encoding=\languagedefault{#1}\s!encoding, - \c!tekst=\languagedefault{#1}\c!tekst, + \c!text=\languagedefault{#1}\c!text, #2]}}}% \doifvalue{\??la#1\c!default}{#1}{\letvalue{\??la#1\c!default}\empty}% % loop in deo % \doifvalue{\??la#1\s!patterns}{#1}{\letvalue{\??la#1\c!default}\empty}% % - \doifelsevalue{\??la#1\c!status}\v!start + \doifelsevalue{\??la#1\c!state}\v!start {\doifelsevaluenothing{\??la#1\s!patterns} {\edef\languagesuffix{#1}} {\edef\languagesuffix{\getvalue{\??la#1\s!patterns}}}% \doifundefinedelse{\??la\??la:\currentencoding:\currentmapping:\languagesuffix} - {\doloadpatterns{#1}{\languagesuffix}} + {\doloadpatterns{#1}\languagesuffix} {\bgroup \edef\loadedlanguage{\getvalue{\??la\??la:\currentencoding:\currentmapping:\languagesuffix}}% \showmessage\m!linguals1{\languagesuffix,#1,\loadedlanguage}% @@ -303,8 +325,7 @@ %D Handy \def\preloadallpatterns - {\gdef\preloadallpatterns##1% - {\installlanguage[##1][\c!status=\v!start]}% + {\gdef\preloadallpatterns##1{\installlanguage[##1][\c!state=\v!start]}% \processcommacommand[\installedlanguages]\preloadallpatterns \global\let\preloadallpatterns\relax} @@ -336,42 +357,56 @@ \def\dodoloadpatterns#1#2#3#4% beware, loaded language also incr {\normallanguage\loadedlanguage % when not really needed - %\letvalue{\??la\??la#2}\loadedlanguage \bgroup - \scratchtoks\everyjob % we don't want additional junk put there - \let\showpatterns\relax \startencoding[#3]% \enablemapping[#4]% \doifnothing\currentencoding{\let\currentencoding\s!default}% \doifnothing\currentmapping {\let\currentmapping \s!default}% - \letgvalue{\??la\??la:\currentencoding:\currentmapping:#2}\loadedlanguage - \startreadingfile - \startpatternaccents - %\def\patterns##1{\message{#1/#2/#3/#4/##1}\normalpatterns{##1}}% - \readsysfile{\truefilename{\f!languageprefix#2.\f!patternsextension}} - {\setxvalue{\??la#1\s!patterns}{#2}% - \xdef\preloadedpmessage - {\preloadedpmessage - \number\normallanguage:\showpatterns{#2}}% - \doglobal\addtocommalist{#2}\preloadedpatterns - \showmessage\m!linguals1{#2,#1,\loadedlanguage}} - {\readsysfile{\f!languageprefix#2.\f!patternsextension} - {\setxvalue{\??la#1\s!patterns}{#2}% - \xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}}% - \doglobal\addtocommalist{#2}\preloadedpatterns - \showmessage\m!linguals1{#2,#1,\loadedlanguage}} - {\showmessage\m!linguals2{#2,#1,\loadedlanguage}}}% - \readsysfile{\truefilename{\f!languageprefix#2.\f!hyphensextension}} - {\showmessage\m!linguals3{#2,#1,\loadedlanguage}} - {\readsysfile{\f!languageprefix#2.\f!hyphensextension} - {\showmessage\m!linguals3{#2,#1,\loadedlanguage}} - {\showmessage\m!linguals4{#2,#1,\loadedlanguage}}}% - \stoppatternaccents - \stopreadingfile - \stopencoding - \global\everyjob\scratchtoks - \egroup - \increment\loadedlanguage} + \ifundefined{\??la\??la:\currentencoding:\currentmapping:#2}% + \let\showpatterns\relax + \scratchtoks\everyjob % we don't want additional junk put there, is saving needed? + \edef\alreadyloadedlanguage + {\executeifdefined{\??la\??la:\currentencoding:\currentmapping:\truefilename{\f!languageprefix#2.\f!patternsextension}}\empty}% + \edef\alreadyloadedlanguage + {\executeifdefined{\??la\??la:\currentencoding:\currentmapping:\f!languageprefix#2.\f!patternsextension}\alreadyloadedlanguage}% + \ifx\alreadyloadedlanguage\empty + \letgvalue{\??la\??la:\currentencoding:\currentmapping:#2}\loadedlanguage + \doifundefined{\??la\??la:\s!default:\s!default:#2}{\letgvalue{\??la\??la:\s!default:\s!default:#2}\loadedlanguage}% fall back + \startreadingfile + \startpatternaccents + \readsysfile{\truefilename{\f!languageprefix#2.\f!patternsextension}} + {\setxvalue{\??la#1\s!patterns}{#2}% + \setxvalue{\??la\??la:\currentencoding:\currentmapping:\truefilename{\f!languageprefix#2.\f!patternsextension}}{\number\loadedlanguage}% + \xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}{\number\normallanguage}{\currentencoding}{\currentmapping}}% + \doglobal\addtocommalist{#2}\preloadedpatterns + \showmessage\m!linguals1{#2,#1,\loadedlanguage}} + {\readsysfile{\f!languageprefix#2.\f!patternsextension} + {\setxvalue{\??la#1\s!patterns}{#2}% + \setxvalue{\??la\??la:\currentencoding:\currentmapping:\f!languageprefix#2.\f!patternsextension}{\number\loadedlanguage}% + \xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}{\number\normallanguage}{\currentencoding}{\currentmapping}}% + \doglobal\addtocommalist{#2}\preloadedpatterns + \showmessage\m!linguals1{#2,#1,\loadedlanguage}} + {\showmessage\m!linguals2{#2,#1,\loadedlanguage,\f!languageprefix#2.\f!patternsextension,\truefilename{\f!languageprefix#2.\f!patternsextension}}}}% + \readsysfile{\truefilename{\f!languageprefix#2.\f!hyphensextension}} + {\showmessage\m!linguals3{#2,#1,\loadedlanguage}} + {\readsysfile{\f!languageprefix#2.\f!hyphensextension} + {\showmessage\m!linguals3{#2,#1,\loadedlanguage}} + {\showmessage\m!linguals4{#2,#1,\loadedlanguage}}}% + \doglobal\increment\loadedlanguage + \stoppatternaccents + \stopreadingfile + \stopencoding + \else % optimization, introduced 2004.08.24, while sorting out changes in tl + \letgvalue{\??la\??la:\currentencoding:\currentmapping:#2}\alreadyloadedlanguage + \doifundefined{\??la\??la:\s!default:\s!default:#2}{\letgvalue{\??la\??la:\s!default:\s!default:#2}\loadedlanguage}% fall back + \setxvalue{\??la#1\s!patterns}{#2}% + \xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}{[\number\alreadyloadedlanguage]}{\currentencoding}{\currentmapping}}% + \doglobal\addtocommalist{#2}\preloadedpatterns + \showmessage\m!linguals1{#2,#1,[\alreadyloadedlanguage]}% + \fi + \global\everyjob\scratchtoks + \fi + \egroup} \def\doifpatternselse#1% {\expanded{\doifinsetelse{#1}{\preloadedpatterns}}} @@ -381,7 +416,7 @@ %D strangely enough not in the format). \appendtoks - \gdef\doloadpatterns{\increment\loadedlanguage\gobbletwoarguments}% + \gdef\doloadpatterns{\doglobal\increment\loadedlanguage\gobbletwoarguments}% \globallet\dodoloadpatterns\gobblefourarguments \to \everydump @@ -411,13 +446,13 @@ \docomplexlanguage \fi} -%D The values \type {\c!leftsentence} and \type -%D {\c!rightsentence} can be (and are) used to implement +%D The values \type {leftsentence} and \type +%D {rightsentence} can be (and are) used to implement %D automatic subsentence boundary glyphs, like in {\fr %D |<|french guillemots|>|} or {\de |<|german guillemots|>|} or %D {\nl |<|dutch dashes|>|} like situations. Furthermore \type -%D {\c!leftquotation} and \type {\c!leftquote} come into view -%D \citaat {when we quote} or \citeer {quote} something. +%D {leftquotation} and \type {leftquote} come into view +%D \quotation {when we quote} or \quote {quote} something. %D \macros %D {currentdatespecification} @@ -426,16 +461,16 @@ %D specification by saying: \def\currentdatespecification - {\csname\??la\currentlanguage\c!datum\endcsname} + {\csname\??la\currentlanguage\c!date\endcsname} %D This command is not meant for users. %D Carefull reading of these macros shows that it's legal to %D say %D -%D \starttypen +%D \starttyping %D \installlanguage [du] [de] -%D \stoptypen +%D \stoptyping %D \macros %D {language,mainlanguage} @@ -443,16 +478,16 @@ %D Switching to another language (actually another hyphenation %D pattern) is done with: %D -%D \starttypen +%D \starttyping %D \language[identifier] -%D \stoptypen +%D \stoptyping %D %D or with \type{\identifier}. Just to be compatible with %D \PLAIN\ \TEX, we still support the original meaning, so %D -%D \starttypen +%D \starttyping %D \language=1 -%D \stoptypen +%D \stoptyping %D %D is a valid operation, where the relation between number %D and language depends on the order in installing languages. @@ -514,16 +549,28 @@ \def\disablelanguagespecifics {\ignorecompoundcharacter} +% \def\setnormallanguage#1% +% {\dosetnormallanguage{:\currentencoding:\currentmapping:}{#1}{% +% \dosetnormallanguage{:\currentencoding:\s!default :}{#1}{% +% \dosetnormallanguage{:\s!default :\currentmapping:}{#1}{% +% \dosetnormallanguage{:\s!default :\s!default :}{#1}\empty}}}} +% +% assume #1 = \cs + \def\setnormallanguage#1% - {\dosetnormallanguage{:\currentencoding:\currentmapping:}{#1}{% - \dosetnormallanguage{:\currentencoding:\s!default :}{#1}{% - \dosetnormallanguage{:\s!default :\currentmapping:}{#1}{% - \dosetnormallanguage{:\s!default :\s!default :}{#1}{}}}}} + {\dosetnormallanguage{:\currentencoding:\currentmapping:}#1{% + \dosetnormallanguage{:\currentencoding:\s!default :}#1{% + \dosetnormallanguage{:\s!default :\currentmapping:}#1{% + \dosetnormallanguage{:\s!default :\s!default :}#1\empty}}}} \def\docomplexlanguage% assumes that \currentlanguage is set {\edef\currentdefaultlanguage{\defaultlanguage\currentlanguage}% - \def\synchronizepatterns{\setnormallanguage - {\csname\??la\currentlanguage\s!patterns\endcsname}}% called often + % called quite often, so we use \csname + % \def\synchronizepatterns{\setnormallanguage + % {\csname\??la\currentlanguage\s!patterns\endcsname}}% called often + % of even better pre-expand in an ugly way: + \@EA\def\@EA\synchronizepatterns\@EA{\@EA\setnormallanguage + \csname\??la\currentlanguage\s!patterns\endcsname}% \donefalse \synchronizepatterns \ifdone\else @@ -531,8 +578,10 @@ \synchronizepatterns \ifdone\else \ifx\currentdefaultlanguage\empty\else - \def\synchronizepatterns{\setnormallanguage - {\csname\??la\currentdefaultlanguage\s!patterns\endcsname}}% + % \def\synchronizepatterns{\setnormallanguage + % {\csname\??la\currentdefaultlanguage\s!patterns\endcsname}}% + \@EA\def\@EA\synchronizepatterns\@EA{\@EA\setnormallanguage + \csname\??la\currentdefaultlanguage\s!patterns\endcsname}% \synchronizepatterns \ifdone\else \setnormallanguage\currentdefaultlanguage @@ -543,15 +592,15 @@ \fi \the\everylanguage \enablelanguagespecifics[\currentlanguage]% -% strange, what is this doing here, dangerous for {il2,ec} -% \edef\languagemapping{\csname\??la\currentlanguage\s!mapping\endcsname}% -% \ifx\languagemapping\empty\else -% \fastenablemapping\languagemapping -% \fi + % strange, what is this doing here, dangerous for {il2,ec} + % \edef\languagemapping{\csname\??la\currentlanguage\s!mapping\endcsname}% + % \ifx\languagemapping\empty\else + % \fastenablemapping\languagemapping + % \fi \lefthyphenmin 0\csname\??la\currentlanguage\s!lefthyphenmin \endcsname \righthyphenmin0\csname\??la\currentlanguage\s!righthyphenmin\endcsname\relax - % will be definable - \doifelsevalue{\??la\currentlanguage\c!spatiering}\v!ruim + % will be definable and move to core-spa ! + \doifelsevalue{\??la\currentlanguage\c!spacing}\v!broad \nonfrenchspacing\frenchspacing} \ifx\enablelanguagespecifics\undefined @@ -674,7 +723,7 @@ % %D When using Computer Modern Roman, the next definitions % %D looks a bit better than the default ligatures. % %D -% %D \starttypen +% %D \starttyping % %D \def\lowerleftsingleninequote {,} % %D \def\lowerleftdoubleninequote {,\kern-.1em,} % %D \def\upperleftsingleninequote {'} @@ -688,7 +737,7 @@ % %D \def\upperrightdoubleninequote {''} % %D \def\upperrightsinglesixquote {`} % %D \def\upperrightdoublesixquote {\kern-.125em``} -% %D \stoptypen +% %D \stoptyping % %D % %D But in other fonts, these definitions can give problems, so % %D we just say: @@ -724,8 +773,7 @@ %D New (see nomarking and nolist): \def\splitsequence#1#2% - {\doifelse{#1}\v!nee - {#2}{\doifelse{#1}\v!ja{\languageparameter\c!limittext}{#1}}} + {\doifelse{#1}\v!no{#2}{\doifelse{#1}\v!yes{\languageparameter\c!limittext}{#1}}} \def\splitsymbol#1% {\splitsequence{#1}{\languageparameter\c!limittext}} @@ -735,8 +783,8 @@ %D the defaults here. %D %D \def\ShowLanguageValues [#1] [#2] #3 #4 -%D {\blanko -%D \startregelcorrectie +%D {\blank +%D \startlinecorrection %D \vbox\bgroup %D \language[#1]% %D \setbox0=\hbox to \hsize{\hss\bf#2 subsentence symbol and quotes\hss} @@ -747,15 +795,16 @@ %D \vskip.5em %D \let\normalbar=| %D \hbox to \hsize -%D {\hfil\citaat{#3 #4}\hfil\citeer{#2}\hfil +%D {\hfil\quotation{#3 #4}\hfil\quote{#2}\hfil %D \let|=\normalbar\strut|<||<|#3|>|#4|>|\hfil} %D \vskip.5em %D \hrule %D \egroup -%D \stopregelcorrectie -%D \blanko} +%D \stoplinecorrection +%D \blank} %D %D \ShowLanguageValues [af] [afrikaans] afrikaanse ... +%D \ShowLanguageValues [ca] [catalan] catalan ... %D \ShowLanguageValues [cz] [czech] tjechisch tex %D \ShowLanguageValues [cz] [slovak] slowaakse ... %D \ShowLanguageValues [da] [danish] deense ... @@ -779,8 +828,8 @@ %D language. %D %D \unprotect -%D \plaatstabel{The germanic languages (\type{lang-ger})} -%D \starttabel[||||] +%D \placetable{The germanic languages (\type{lang-ger})} +%D \starttable[||||] %D \HL %D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR %D \HL @@ -792,27 +841,28 @@ %D \NC \s!af \NC afrikaans \NC germanic \NC\MR %D \NC \s!no \NC norwegian \NC germanic \NC\LR %D \HL -%D \stoptabel +%D \stoptable %D \protect %D %D \unprotect -%D \plaatstabel{The italic languages (\type{lang-ita})} -%D \starttabel[||||] +%D \placetable{The italic languages (\type{lang-ita})} +%D \starttable[||||] %D \HL %D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR %D \HL %D \NC \s!fr \NC french \NC italic \NC\FR +%D \NC \s!ca \NC catalan \NC italic \NC\MR %D \NC \s!es \NC spanish \NC italic \NC\MR %D \NC \s!it \NC italian \NC italic \NC\MR %D \NC \s!la \NC latin \NC italic \NC\MR %D \NC \s!pt \NC portuguese \NC italic \NC\LR %D \HL -%D \stoptabel +%D \stoptable %D \protect %D %D \unprotect -%D \plaatstabel{The slavic languages (\type{lang-sla})} -%D \starttabel[||||] +%D \placetable{The slavic languages (\type{lang-sla})} +%D \starttable[||||] %D \HL %D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR %D \HL @@ -820,27 +870,27 @@ %D \NC \s!cz \NC czech \NC slavic \NC\MR %D \NC \s!sk \NC slavik \NC slavic \NC\LR %D \HL -%D \stoptabel +%D \stoptable %D \protect %D \unprotect %D -%D \plaatstabel{The altaic languages (\type{lang-alt})} -%D \starttabel[||||] +%D \placetable{The altaic languages (\type{lang-alt})} +%D \starttable[||||] %D \HL %D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR %D \HL %D \NC \s!tr \NC turkish \NC altaic \NC\SR %D \HL -%D \stoptabel +%D \stoptable %D -%D \plaatstabel{The uralic languages (\type{lang-ura})} -%D \starttabel[||||] +%D \placetable{The uralic languages (\type{lang-ura})} +%D \starttable[||||] %D \HL %D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR %D \HL %D \NC \s!fi \NC finnish \NC uralic \NC\SR %D \HL -%D \stoptabel +%D \stoptable %D \protect % \bgroup \normallanguage255 \patterns{} \egroup @@ -863,4 +913,4 @@ \appendtoks\showmessage\m!linguals9\currentlanguage\to\everyjob -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex index 5f59024f3..6bfe6c742 100644 --- a/tex/context/base/lang-ita.tex +++ b/tex/context/base/lang-ita.tex @@ -3,15 +3,15 @@ %D version=1997.09.03, %D title=\CONTEXT\ Language Macros, %D subtitle=Italic Languages, -%D author=Hans Hagen / Tobias Burnus, +%D author=Hans Hagen / Tobias Burnus, %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 Todo: replace \'.. by \namedglyph +% Todo: replace \'.. by \namedglyph \writestatus{loading}{Italic Languages} @@ -19,11 +19,12 @@ %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. %D %D \starttabulate[|lB|l|] -%D \NC Italian \NC Giuseppe Bilotta \NC \NR -%D \NC Rumanian \NC Dan Seracu \NC \NR +%D \NC Italian \NC Giuseppe Bilotta \NC \NR +%D \NC Rumanian \NC Dan Seracu \NC \NR +%D \NC Portuguese \NC Pedro F. M. Mendon\c a \NC \NR %D \stoptabulate % Latin, Italian, Rhaeto-Romanic, Rumanian, Sardian @@ -36,7 +37,7 @@ \installlanguage [\s!fr] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=\emdash, \c!rightsentence=\emdash, \c!leftsubsentence=\emdash, @@ -45,12 +46,12 @@ \c!rightquote=\rightguillemot, \c!leftquotation=\leftguillemot, \c!rightquotation=\rightguillemot, - \c!datum={\v!dag+,\v!spatie,\v!maand,\v!spatie,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day+,\v!space,\v!month,\v!space,\v!year}, + \c!state=\v!stop] \installlanguage [\s!es] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -59,16 +60,30 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] -\installlanguage [sp] [\s!es] % old times context +\installlanguage [sp] [\s!es] % old times context + +\installlanguage + [\s!ca] + [\c!spacing=\v!packed, + \c!leftsentence=---, + \c!rightsentence=---, + \c!leftsubsentence=---, + \c!rightsubsentence=---, + \c!leftquote=\upperleftsinglesixquote, + \c!rightquote=\upperrightsingleninequote, + \c!leftquotation=\upperleftdoublesixquote, + \c!rightquotation=\upperrightdoubleninequote, + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] % Note GB left|/|right (sub)sentences are for \quote {incisi}. \installlanguage [\s!it] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=--, @@ -80,12 +95,12 @@ \c!leftspeech=\leftguillemot, \c!middlespeech=\leftguillemot, \c!rightspeech=\rightguillemot, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] -\installlanguage % the same as italian +\installlanguage % the same as italian [\s!la] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -94,12 +109,12 @@ \c!rightquote=\lowerrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\lowerrightdoubleninequote, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] \installlanguage [\s!pt] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -108,12 +123,12 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, - \c!status=\v!stop] + \c!date={\v!year,\ ,\v!month,\ ,\v!day}, + \c!state=\v!stop] \installlanguage [\s!ro] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -122,8 +137,8 @@ \c!rightquote=\rightguillemot, \c!leftquotation=\lowerrightdoubleninequote, \c!rightquotation=\upperleftdoublesixquote, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] %D For compatibility reasons we also define: @@ -131,166 +146,189 @@ \installlanguage [french] [\s!fr] \installlanguage [spanish] [\s!es] +\installlanguage [catalan] [\s!ca] \installlanguage [italian] [\s!it] \installlanguage [latin] [\s!la] \installlanguage [portuguese] [\s!pt] \installlanguage [romanian] [\s!ro] -%D Labels and header texts. - -\setupheadtext [\s!fr] [\v!inhoud=Table des mati\`eres] -\setupheadtext [\s!es] [\v!inhoud=\'Indice] -\setupheadtext [\s!it] [\v!inhoud=Indice] -\setupheadtext [\s!la] [\v!inhoud=Quod in libro continetur] %Argumentum -\setupheadtext [\s!pt] [\v!inhoud=Conte\'ud] -\setupheadtext [\s!ro] [\v!inhoud=Cuprins] - -\setupheadtext [\s!fr] [\v!tabellen=Tables] -\setupheadtext [\s!es] [\v!tabellen=Tablas] -\setupheadtext [\s!it] [\v!tabellen=Tabelle] -\setupheadtext [\s!la] [\v!tabellen=Tabulae] -\setupheadtext [\s!pt] [\v!tabellen=Tabelas] -\setupheadtext [\s!ro] [\v!tabellen=Tabele] - -\setupheadtext [\s!fr] [\v!figuren=Figures] -\setupheadtext [\s!es] [\v!figuren=Ilustraci\'ons] -\setupheadtext [\s!it] [\v!figuren=Figure] -\setupheadtext [\s!la] [\v!figuren=Imagines] -\setupheadtext [\s!pt] [\v!figuren=Figuras] -\setupheadtext [\s!ro] [\v!figuren=Figuri] - -\setupheadtext [\s!fr] [\v!grafieken=Graphiques] -\setupheadtext [\s!es] [\v!grafieken=Gr\'aficos] -\setupheadtext [\s!it] [\v!grafieken=Grafici] -\setupheadtext [\s!la] [\v!grafieken=Typi] -\setupheadtext [\s!pt] [\v!grafieken=Gr\'aficos] -\setupheadtext [\s!ro] [\v!grafieken=Grafice] - -\setupheadtext [\s!fr] [\v!intermezzos=Interm\`edes] -\setupheadtext [\s!es] [\v!intermezzos=intermedios] -\setupheadtext [\s!it] [\v!intermezzos=Intermezzi] -\setupheadtext [\s!la] [\v!intermezzos=Intermissa] -\setupheadtext [\s!pt] [\v!intermezzos=Intermezzi] -\setupheadtext [\s!ro] [\v!intermezzos=Intermzzo] +%D Labels and header texts. + +\setupheadtext [\s!fr] [\v!content=Table des mati\`eres] +\setupheadtext [\s!es] [\v!content=\'Indice] +\setupheadtext [\s!ca] [\v!content=\'Index de continguts] +\setupheadtext [\s!it] [\v!content=Indice] +\setupheadtext [\s!la] [\v!content=Quod in libro continetur] %Argumentum +\setupheadtext [\s!pt] [\v!content=Conte\'udo] +\setupheadtext [\s!ro] [\v!content=Cuprins] + +\setupheadtext [\s!fr] [\v!tables=Tables] +\setupheadtext [\s!es] [\v!tables=Tablas] +\setupheadtext [\s!ca] [\v!tables=Taules] +\setupheadtext [\s!it] [\v!tables=Tabelle] +\setupheadtext [\s!la] [\v!tables=Tabulae] +\setupheadtext [\s!pt] [\v!tables=Tabelas] +\setupheadtext [\s!ro] [\v!tables=Tabele] + +\setupheadtext [\s!fr] [\v!figures=Figures] +\setupheadtext [\s!es] [\v!figures=Ilustraci\'ons] +\setupheadtext [\s!ca] [\v!figures=Figures] +\setupheadtext [\s!it] [\v!figures=Figure] +\setupheadtext [\s!la] [\v!figures=Imagines] +\setupheadtext [\s!pt] [\v!figures=Figuras] +\setupheadtext [\s!ro] [\v!figures=Figuri] + +\setupheadtext [\s!fr] [\v!graphics=Graphiques] +\setupheadtext [\s!es] [\v!graphics=Gr\'aficos] +\setupheadtext [\s!it] [\v!graphics=Grafici] +\setupheadtext [\s!ca] [\v!graphics=Gr\`afiques] +\setupheadtext [\s!la] [\v!graphics=Typi] +\setupheadtext [\s!pt] [\v!graphics=Gr\'aficos] +\setupheadtext [\s!ro] [\v!graphics=Grafice] + +\setupheadtext [\s!fr] [\v!intermezzi=Interm\`edes] +\setupheadtext [\s!es] [\v!intermezzi=intermedios] +\setupheadtext [\s!ca] [\v!intermezzi=intermedis] +\setupheadtext [\s!it] [\v!intermezzi=Intermezzi] +\setupheadtext [\s!la] [\v!intermezzi=Intermissa] +\setupheadtext [\s!pt] [\v!intermezzi=Interm\'edios] +\setupheadtext [\s!ro] [\v!intermezzi=Intermzzo] \setupheadtext [\s!fr] [\v!index=Index] \setupheadtext [\s!es] [\v!index=\'Indice] +\setupheadtext [\s!ca] [\v!index=\'Index alfab\`etic] \setupheadtext [\s!it] [\v!index=Indice] \setupheadtext [\s!la] [\v!index=Indices] \setupheadtext [\s!pt] [\v!index=\'Indice] \setupheadtext [\s!ro] [\v!index=Index] -\setupheadtext [\s!fr] [\v!afkortingen=Abr\'eviations] -\setupheadtext [\s!es] [\v!afkortingen=Abreviaci\'ons] -\setupheadtext [\s!it] [\v!afkortingen=Abbreviazioni] -\setupheadtext [\s!la] [\v!afkortingen=Notae] -\setupheadtext [\s!pt] [\v!afkortingen=Abreviaturas] -\setupheadtext [\s!ro] [\v!afkortingen=Abrevieri] +\setupheadtext [\s!fr] [\v!abbreviations=Abr\'eviations] +\setupheadtext [\s!es] [\v!abbreviations=Abreviaci\'ons] +\setupheadtext [\s!ca] [\v!abbreviations=Abreviacions] +\setupheadtext [\s!it] [\v!abbreviations=Abbreviazioni] +\setupheadtext [\s!la] [\v!abbreviations=Notae] +\setupheadtext [\s!pt] [\v!abbreviations=Abreviaturas] +\setupheadtext [\s!ro] [\v!abbreviations=Abrevieri] \setupheadtext [\s!fr] [\v!logos=Logos] \setupheadtext [\s!es] [\v!logos=Logotipos] +\setupheadtext [\s!ca] [\v!logos=Logotips] \setupheadtext [\s!it] [\v!logos=Logotipi] \setupheadtext [\s!la] [\v!logos=Typi negotiales] \setupheadtext [\s!pt] [\v!logos=Logotipos] \setupheadtext [\s!ro] [\v!logos=Logo-uri] -\setupheadtext [\s!fr] [\v!eenheden=Unit\'es] -\setupheadtext [\s!es] [\v!eenheden=Unidads] -\setupheadtext [\s!it] [\v!eenheden=Unit\`a] -\setupheadtext [\s!la] [\v!eenheden=Modi] -\setupheadtext [\s!pt] [\v!eenheden=Unidades] -\setupheadtext [\s!ro] [\v!eenheden=Unit\u{a}\c{t}i] - -\setuplabeltext [\s!fr] [\v!tabel=Table ] -\setuplabeltext [\s!es] [\v!tabel=Tablas ] -\setuplabeltext [\s!it] [\v!tabel=Tabella ] -\setuplabeltext [\s!la] [\v!tabel=Tabula ] -\setuplabeltext [\s!pt] [\v!tabel=Tabela ] -\setuplabeltext [\s!ro] [\v!tabel=Tabelul ] - -\setuplabeltext [\s!fr] [\v!figuur=Figure ] -\setuplabeltext [\s!es] [\v!figuur=Ilustraci\'on ] -\setuplabeltext [\s!it] [\v!figuur=Fig. ] -\setuplabeltext [\s!la] [\v!figuur=Imago ] -\setuplabeltext [\s!pt] [\v!figuur=Figura ] -\setuplabeltext [\s!ro] [\v!figuur=Figura ] +\setupheadtext [\s!fr] [\v!units=Unit\'es] +\setupheadtext [\s!es] [\v!units=Unidads] +\setupheadtext [\s!ca] [\v!units=Unitats] +\setupheadtext [\s!it] [\v!units=Unit\`a] +\setupheadtext [\s!la] [\v!units=Modi] +\setupheadtext [\s!pt] [\v!units=Unidades] +\setupheadtext [\s!ro] [\v!units=Unit\u{a}\c{t}i] + +\setuplabeltext [\s!fr] [\v!table=Table ] +\setuplabeltext [\s!es] [\v!table=Tablas ] +\setuplabeltext [\s!ca] [\v!table=Taules ] +\setuplabeltext [\s!it] [\v!table=Tabella ] +\setuplabeltext [\s!la] [\v!table=Tabula ] +\setuplabeltext [\s!pt] [\v!table=Tabela ] +\setuplabeltext [\s!ro] [\v!table=Tabelul ] + +\setuplabeltext [\s!fr] [\v!figure=Figure ] +\setuplabeltext [\s!es] [\v!figure=Ilustraci\'on ] +\setuplabeltext [\s!ca] [\v!figure=Figura ] +\setuplabeltext [\s!it] [\v!figure=Fig. ] +\setuplabeltext [\s!la] [\v!figure=Imago ] +\setuplabeltext [\s!pt] [\v!figure=Figura ] +\setuplabeltext [\s!ro] [\v!figure=Figura ] \setuplabeltext [\s!fr] [\v!intermezzo=Interm\`ede ] \setuplabeltext [\s!es] [\v!intermezzo=intermedio ] +\setuplabeltext [\s!ca] [\v!intermezzo=Intermedi ] \setuplabeltext [\s!it] [\v!intermezzo=Intermezzo ] \setuplabeltext [\s!la] [\v!intermezzo=Intermissum ] -\setuplabeltext [\s!pt] [\v!intermezzo=Intermezzo ] +\setuplabeltext [\s!pt] [\v!intermezzo=Interm\'edio ] \setuplabeltext [\s!ro] [\v!intermezzo=Intermezzo ] -\setuplabeltext [\s!fr] [\v!grafiek=Illustration ] -\setuplabeltext [\s!es] [\v!grafiek=Gr\'afico ] -\setuplabeltext [\s!it] [\v!grafiek=Grafico ] -\setuplabeltext [\s!la] [\v!grafiek=Typus ] -\setuplabeltext [\s!pt] [\v!grafiek=Gr\'afico ] -\setuplabeltext [\s!ro] [\v!grafiek=Graficul ] - -\setuplabeltext [\s!fr] [\v!hoofdstuk=] -\setuplabeltext [\s!es] [\v!hoofdstuk=] -\setuplabeltext [\s!it] [\v!hoofdstuk=] -\setuplabeltext [\s!la] [\v!hoofdstuk=] -\setuplabeltext [\s!pt] [\v!hoofdstuk=] -\setuplabeltext [\s!ro] [\v!hoofdstuk=] - -\setuplabeltext [\s!fr] [\v!paragraaf=] -\setuplabeltext [\s!es] [\v!paragraaf=] -\setuplabeltext [\s!it] [\v!paragraaf=] -\setuplabeltext [\s!la] [\v!paragraaf=] -\setuplabeltext [\s!pt] [\v!paragraaf=] -\setuplabeltext [\s!ro] [\v!paragraaf=] - -\setuplabeltext [\s!fr] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!es] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!it] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!la] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!pt] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!ro] [\v!sub\v!paragraaf=] - -\setuplabeltext [\s!fr] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!es] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!it] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!la] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!pt] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!ro] [\v!sub\v!sub\v!paragraaf=] - -\setuplabeltext [\s!fr] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!es] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!it] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!la] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!pt] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!ro] [\v!sub\v!sub\v!sub\v!paragraaf=] - -\setuplabeltext [\s!fr] [\v!bijlage=] -\setuplabeltext [\s!es] [\v!bijlage=] -\setuplabeltext [\s!it] [\v!bijlage=] -\setuplabeltext [\s!la] [\v!bijlage=] -\setuplabeltext [\s!pt] [\v!bijlage=] -\setuplabeltext [\s!ro] [\v!bijlage=] - -\setuplabeltext [\s!fr] [\v!deel=Partie ] -\setuplabeltext [\s!es] [\v!deel=Parte ] -\setuplabeltext [\s!it] [\v!deel=Parte ] -\setuplabeltext [\s!la] [\v!deel=Pars ] -\setuplabeltext [\s!pt] [\v!deel=Parte ] -\setuplabeltext [\s!ro] [\v!deel=Partea ] - -\setuplabeltext [\s!fr] [\v!regel=ligne ] -\setuplabeltext [\s!es] [\v!regel=l\'\i nea ] -\setuplabeltext [\s!it] [\v!regel=riga ] -\setuplabeltext [\s!la] [\v!regel=versus ] -\setuplabeltext [\s!pt] [\v!regel=linha ] -\setuplabeltext [\s!ro] [\v!regel=linia ] - -\setuplabeltext [\s!fr] [\v!regels=lignes ] -\setuplabeltext [\s!es] [\v!regels=l\'\i neas ] -\setuplabeltext [\s!it] [\v!regels=righe ] -\setuplabeltext [\s!la] [\v!regels=versus ] -\setuplabeltext [\s!pt] [\v!regels=linhas ] -\setuplabeltext [\s!ro] [\v!regels=liniile ] +\setuplabeltext [\s!fr] [\v!graphic=Illustration ] +\setuplabeltext [\s!es] [\v!graphic=Gr\'afico ] +\setuplabeltext [\s!ca] [\v!graphic=Gr\'afica ] +\setuplabeltext [\s!it] [\v!graphic=Grafico ] +\setuplabeltext [\s!la] [\v!graphic=Typus ] +\setuplabeltext [\s!pt] [\v!graphic=Gr\'afico ] +\setuplabeltext [\s!ro] [\v!graphic=Graficul ] + +\setuplabeltext [\s!fr] [\v!chapter=] +\setuplabeltext [\s!es] [\v!chapter=] +\setuplabeltext [\s!ca] [\v!chapter=] +\setuplabeltext [\s!it] [\v!chapter=] +\setuplabeltext [\s!la] [\v!chapter=] +\setuplabeltext [\s!pt] [\v!chapter=] +\setuplabeltext [\s!ro] [\v!chapter=] + +\setuplabeltext [\s!fr] [\v!section=] +\setuplabeltext [\s!es] [\v!section=] +\setuplabeltext [\s!ca] [\v!section=] +\setuplabeltext [\s!it] [\v!section=] +\setuplabeltext [\s!la] [\v!section=] +\setuplabeltext [\s!pt] [\v!section=] +\setuplabeltext [\s!ro] [\v!section=] + +\setuplabeltext [\s!fr] [\v!subsection=] +\setuplabeltext [\s!es] [\v!subsection=] +\setuplabeltext [\s!ca] [\v!subsection=] +\setuplabeltext [\s!it] [\v!subsection=] +\setuplabeltext [\s!la] [\v!subsection=] +\setuplabeltext [\s!pt] [\v!subsection=] +\setuplabeltext [\s!ro] [\v!subsection=] + +\setuplabeltext [\s!fr] [\v!subsubsection=] +\setuplabeltext [\s!es] [\v!subsubsection=] +\setuplabeltext [\s!ca] [\v!subsubsection=] +\setuplabeltext [\s!it] [\v!subsubsection=] +\setuplabeltext [\s!la] [\v!subsubsection=] +\setuplabeltext [\s!pt] [\v!subsubsection=] +\setuplabeltext [\s!ro] [\v!subsubsection=] + +\setuplabeltext [\s!fr] [\v!subsubsubsection=] +\setuplabeltext [\s!es] [\v!subsubsubsection=] +\setuplabeltext [\s!ca] [\v!subsubsubsection=] +\setuplabeltext [\s!it] [\v!subsubsubsection=] +\setuplabeltext [\s!la] [\v!subsubsubsection=] +\setuplabeltext [\s!pt] [\v!subsubsubsection=] +\setuplabeltext [\s!ro] [\v!subsubsubsection=] + +\setuplabeltext [\s!fr] [\v!appendix=] +\setuplabeltext [\s!es] [\v!appendix=] +\setuplabeltext [\s!ca] [\v!appendix=] +\setuplabeltext [\s!it] [\v!appendix=] +\setuplabeltext [\s!la] [\v!appendix=] +\setuplabeltext [\s!pt] [\v!appendix=] +\setuplabeltext [\s!ro] [\v!appendix=] + +\setuplabeltext [\s!fr] [\v!part=Partie ] +\setuplabeltext [\s!es] [\v!part=Parte ] +\setuplabeltext [\s!ca] [\v!part=Part ] +\setuplabeltext [\s!it] [\v!part=Parte ] +\setuplabeltext [\s!la] [\v!part=Pars ] +\setuplabeltext [\s!pt] [\v!part=Parte ] +\setuplabeltext [\s!ro] [\v!part=Partea ] + +\setuplabeltext [\s!fr] [\v!line=ligne ] +\setuplabeltext [\s!es] [\v!line=l\'\i nea ] +\setuplabeltext [\s!ca] [\v!line=l\'\i nia ] +\setuplabeltext [\s!it] [\v!line=riga ] +\setuplabeltext [\s!la] [\v!line=versus ] +\setuplabeltext [\s!pt] [\v!line=linha ] +\setuplabeltext [\s!ro] [\v!line=linia ] + +\setuplabeltext [\s!fr] [\v!lines=lignes ] +\setuplabeltext [\s!es] [\v!lines=l\'\i neas ] +\setuplabeltext [\s!ca] [\v!lines=l\'\i nies ] +\setuplabeltext [\s!it] [\v!lines=righe ] +\setuplabeltext [\s!la] [\v!lines=versus ] +\setuplabeltext [\s!pt] [\v!lines=linhas ] +\setuplabeltext [\s!ro] [\v!lines=liniile ] \setuplabeltext [\s!fr] [\v!january=janvier] \setuplabeltext [\s!fr] [\v!february=f\'evrier] @@ -318,6 +356,19 @@ \setuplabeltext [\s!es] [\v!november=noviembre] \setuplabeltext [\s!es] [\v!december=deciembre] +\setuplabeltext [\s!ca] [\v!january=gener] +\setuplabeltext [\s!ca] [\v!february=febrer] +\setuplabeltext [\s!ca] [\v!march=mar\,c] +\setuplabeltext [\s!ca] [\v!april=abril] +\setuplabeltext [\s!ca] [\v!may=maig] +\setuplabeltext [\s!ca] [\v!june=juny] +\setuplabeltext [\s!ca] [\v!july=juliol] +\setuplabeltext [\s!ca] [\v!august=agost] +\setuplabeltext [\s!ca] [\v!september=septembre] +\setuplabeltext [\s!ca] [\v!october=octubre] +\setuplabeltext [\s!ca] [\v!november=novembre] +\setuplabeltext [\s!ca] [\v!december=decembre] + \setuplabeltext [\s!it] [\v!january=gennaio] \setuplabeltext [\s!it] [\v!february=febbraio] \setuplabeltext [\s!it] [\v!march=marzo] @@ -386,6 +437,14 @@ \setuplabeltext [\s!es] [\v!friday=viernes] \setuplabeltext [\s!es] [\v!saturday=s\'abado] +\setuplabeltext [\s!ca] [\v!sunday=diumenge] +\setuplabeltext [\s!ca] [\v!monday=dilluns] +\setuplabeltext [\s!ca] [\v!tuesday=dimarts] +\setuplabeltext [\s!ca] [\v!wednesday=dimecres] +\setuplabeltext [\s!ca] [\v!thursday=dijous] +\setuplabeltext [\s!ca] [\v!friday=divendres] +\setuplabeltext [\s!ca] [\v!saturday=dissabte] + \setuplabeltext [\s!it] [\v!sunday=domenica] \setuplabeltext [\s!it] [\v!monday=luned\`\i] \setuplabeltext [\s!it] [\v!tuesday=marted\`\i] @@ -419,7 +478,7 @@ \setuplabeltext [\s!ro] [\v!saturday=s\^{a}mb\u{a}t\u{a}] % \startlanguagespecifics[\s!ro] -% +% % \installcompoundcharacter "a {\u{a}} % \installcompoundcharacter "i {\^{\i}} % \installcompoundcharacter "s {\c{s}} @@ -428,18 +487,18 @@ % \installcompoundcharacter "I {\^{I}} % \installcompoundcharacter "S {\c{S}} % \installcompoundcharacter "T {\c{T}} -% \installcompoundcharacter "` {\handlequotation\c!leftquotation} +% \installcompoundcharacter "` {\handlequotation\c!leftquotation} % \installcompoundcharacter "' {\handlequotation\c!rightquotation} -% +% % \stoplanguagespecifics %D Rather new \unknown -\setuplabeltext [\s!it] [\v!pagina=pagina ] -\setuplabeltext [\s!it] [\v!oppagina=a pagina ] -\setuplabeltext [\s!it] [\v!hierboven=come mostrato sopra] -\setuplabeltext [\s!it] [\v!hieronder=come mostrato sotto] -\setuplabeltext [\s!it] [\v!zie=cf. ] +\setuplabeltext [\s!it] [\v!page=pagina ] +\setuplabeltext [\s!it] [\v!atpage=a pagina ] +\setuplabeltext [\s!it] [\v!hencefore=come mostrato sopra] +\setuplabeltext [\s!it] [\v!hereafter=come mostrato sotto] +\setuplabeltext [\s!it] [\v!see=cf. ] %D Ordinal converters: @@ -448,12 +507,13 @@ \highordinalstr{er}% \fi} -\defineconversion [\s!fr] [\v!dag+] [\frordinaldaynumber] +\defineconversion [\s!fr] [\v!day+] [\frordinaldaynumber] %D \ShowAllLanguageValues [\s!fr] [french] franse slag %D \ShowAllLanguageValues [\s!es] [spanish] spaans benauwd +%D \ShowAllLanguageValues [\s!ca] [catalan] catalaans ... %D \ShowAllLanguageValues [\s!it] [italian] italiaanse ... -%D \ShowAllLanguageValues [\s!la] [latin] latijnse missen +%D \ShowAllLanguageValues [\s!la] [latin] latijnse missen %D \ShowAllLanguageValues [\s!pt] [portuguese] portugese ... %D \ShowAllLanguageValues [\s!ro] [romanian] romanian ... diff --git a/tex/context/base/lang-lab.tex b/tex/context/base/lang-lab.tex index 47913874c..0cf6c75ff 100644 --- a/tex/context/base/lang-lab.tex +++ b/tex/context/base/lang-lab.tex @@ -44,7 +44,7 @@ \let\handletextprefix\relax -\def\setupheadtext {\dosetupsometextprefix[\c!titel]} +\def\setupheadtext {\dosetupsometextprefix[\c!title]} \def\setuplabeltext{\dosetupsometextprefix[\c!label]} \def\dosetupsometextprefix @@ -72,12 +72,12 @@ %D %D These commands accept all kind of inputs: %D -%D \starttypen -%D \setuplabeltext [language] [label=text] -%D \setuplabeltext [language] [label=text,label=text,...] -%D \setuplabeltext [label=text] -%D \setuplabeltext [label=text,label=text,...] -%D \stoptypen +%D \starttyping +%D \setuplabeltext [language] [labellabel=text] +%D \setuplabeltext [language] [labellabel=text,labellabel=text,...] +%D \setuplabeltext [labellabel=text] +%D \setuplabeltext [labellabel=text,labellabel=text,...] +%D \stoptyping %D %D The last two cases concern the current language. @@ -103,7 +103,7 @@ {\let\handletextprefix\firstoftwoarguments \let\reporttextprefixerror\doreporttextprefixerror \global\labeltextdonetrue - \dogetupsometextprefix\headlanguage\c!titel} + \dogetupsometextprefix\headlanguage\c!title} \unexpanded\def\leftlabeltext {\let\handletextprefix\firstoftwoarguments @@ -153,7 +153,7 @@ {\egroup\noexpand\def\noexpand#2% watch out, no \edef {\dogetupsometextprefix{\headlanguage}{#1}{#3}}}} -\def\setexpandedheadtext {\dosetexpandedheadlabeltext\c!titel} +\def\setexpandedheadtext {\dosetexpandedheadlabeltext\c!title} \def\setexpandedlabeltext{\dosetexpandedheadlabeltext\c!label} \beginETEX \ifcsname @@ -219,7 +219,7 @@ {\let\dodocommando\xdopresetsometextprefix \dotripleempty\dodosetupsometextprefix} -\def\presetheadtext {\dopresetsometextprefix[\c!titel]} +\def\presetheadtext {\dopresetsometextprefix[\c!title]} \def\presetlabeltext{\dopresetsometextprefix[\c!label]} %D \macros @@ -233,9 +233,9 @@ %D %D like for instance: %D -%D \starttypen +%D \starttyping %D \translate[en=something,nl=iets] -%D \stoptypen +%D \stoptyping %D %D which expands to {\em something} or {\em iets}, depending on %D de current language. @@ -256,9 +256,9 @@ %D When used without argument, the last defined values are %D used. This enables repetitive use like %D -%D \starttypen +%D \starttyping %D \en \translate\ means \nl \translate -%D \stoptypen +%D \stoptyping %D \macros %D {assigntranslation} @@ -266,12 +266,12 @@ %D This macro is a system macro, and can be used to assign a %D translation to a macro. Its form is: %D -%D \starttypen +%D \starttyping %D \assigntranslation[en=something,nl=iets]\to\command -%D \stoptypen +%D \stoptyping \def\assigntranslation[#1]\to#2% {\getparameters[\??lg][#1]% \edef#2{\csname\??lg\currentlanguage\endcsname}} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/lang-sla.tex b/tex/context/base/lang-sla.tex index fa9eb9605..c61d36fae 100644 --- a/tex/context/base/lang-sla.tex +++ b/tex/context/base/lang-sla.tex @@ -8,26 +8,27 @@ %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 Todo: replace \'.. by \namedglyph +% Todo: replace \'.. by \namedglyph %D The framework of this module is set up by Hans Hagen while %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. %D %D \starttabulate[|lB|l|] -%D \NC Czech \NC Tom Hidec, Petr Sojka \NC \NR -%D \NC Polish \NC Grzegorz Sapijaszko \NC \NR -%D \NC Croatian \NC Zeljko Vrba \NC \NR +%D \NC Czech \NC Tom Hidec, Petr Sojka \NC \NR +%D \NC Polish \NC Grzegorz Sapijaszko \NC \NR +%D \NC Croatian \NC Zeljko Vrba \NC \NR +%D \NC Slovenian \NC Mojca Miklavec \NC \NR %D \stoptabulate - -% Belarussian, Russian, Ukrainian, Bulgarian, Macedonian, -% Serbo-Croatian, Slovenian, Czech, Kushubian, -% Lusatian/Sorbian/Wendish, Polish, Slovak, Albanian, + +% Belarussian, Russian, Ukrainian, Bulgarian, Macedonian, +% Serbo-Croatian, Slovenian, Czech, Kushubian, +% Lusatian/Sorbian/Wendish, Polish, Slovak, Albanian, % Illyrian, Armenian \writestatus{loading}{Slavic Languages} @@ -36,7 +37,7 @@ \installlanguage [\s!pl] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -45,26 +46,26 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\lowerleftdoubleninequote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!dag,{.},\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] \installlanguage [\s!cz] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, \c!rightsubsentence=---, \c!leftquote=\lowerleftsingleninequote, - \c!rightquote=\upperrightsinglesixquote, + \c!rightquote=\upperrightsinglesixquote, \c!leftquotation=\lowerleftdoubleninequote, \c!rightquotation=\upperrightdoublesixquote, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] -\installlanguage +\installlanguage [\s!sk] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -73,14 +74,12 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, - \c!status=\v!stop, - \s!encoding=il2, - \s!mapping=il2] + \c!date={\v!year,\ ,\v!month,\ ,\v!day}, + \c!state=\v!stop] \installlanguage [\s!hr] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -89,18 +88,34 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, - \c!status=\v!stop] + \c!date={\v!day,\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] + +\installlanguage + [\s!sl] + [\c!spacing=\v!packed, % ? copied from german - don't know what this means + \c!leftsentence={\hbox{--~}}, % ? + \c!rightsentence={\hbox{~--}}, % ? + \c!leftsubsentence={--}, % ? + \c!rightsubsentence={--}, % ? + \c!leftquote=\lowerleftsingleninequote, + \c!rightquote=\upperrightsinglesixquote, + \c!leftquotation=\lowerleftdoubleninequote, + \c!rightquotation=\upperrightdoublesixquote, + \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year}, + \c!state=\v!stop] -\installlanguage [polish] [\s!pl] -\installlanguage [czech] [\s!cz] -\installlanguage [slovak] [\s!sk] -\installlanguage [croatian] [\s!hr] +\installlanguage [polish] [\s!pl] +\installlanguage [czech] [\s!cz] +\installlanguage [slovak] [\s!sk] +\installlanguage [croatian] [\s!hr] +\installlanguage [slovenian] [\s!sl] +\installlanguage [slovene] [\s!sl] % both possible % specifics -% -% \startlanguagespecifics[\s!pl] -% +% +% \startlanguagespecifics[\s!pl] +% % \installcompoundcharacter /a {\k a} % \installcompoundcharacter /c {\'c} % \installcompoundcharacter /e {\k e} @@ -119,14 +134,14 @@ % \installcompoundcharacter /S {\'S} % \installcompoundcharacter /X {\'Z} % \installcompoundcharacter /Z {\.Z} -% +% % \stoplanguagespecifics -% -% \startlanguagespecifics[\s!pl] -% +% +% \startlanguagespecifics[\s!pl] +% % \installcompoundcharacter /, {\handlequotation\c!leftquotation} % \installcompoundcharacter /' {\handlequotation\c!rightquotation} -% +% % \def\setupPLlanguage% % {\setuplanguage % [\s!pl] @@ -134,16 +149,16 @@ % \c!rightsentence=\rightguillemot, % \c!leftsubsentence=\leftsubguillemot, % \c!rightsubsentence=\rightsubguillemot]} -% +% % \installcompoundcharacter /< {{\setupPLlanguage|<|}} % \installcompoundcharacter /> {{\setupPLlanguage|>|}} -% -% \installcompoundcharacter /- {|-|} -% +% +% \installcompoundcharacter /- {|-|} +% % \stoplanguagespecifics -% -% \startlanguagespecifics[\s!pl] -% +% +% \startlanguagespecifics[\s!pl] +% % \definesortkey {/a}{a}{a}{\k a} % \definesortkey {/A}{a}{a}{\k a} % \definesortkey {/c}{c}{a}{\'c} @@ -162,22 +177,22 @@ % \definesortkey {/X}{z}{a}{\'x} % \definesortkey {/z}{z}{b}{\.z} % \definesortkey {/Z}{z}{b}{\.z} -% +% % \stoplanguagespecifics -% +% % \startencoding[pdfdoc] -% \startlanguagespecifics[pl]% hm +% \startlanguagespecifics[pl]% hm % \defineactivecharacter / {\simplifiedcompoundcharacter/} % \stoplanguagespecifics % \stopencoding -% -% this can best be handled by \quotation and || -% -% \startlanguagespecifics[\s!hr] -% +% +% this can best be handled by \quotation and || +% +% \startlanguagespecifics[\s!hr] +% % %\installcompoundcharacter /, {\handlequotation\c!leftquotation} % %\installcompoundcharacter /' {\handlequotation\c!rightquotation} -% +% % \def\setupHRlanguage% % {\setuplanguage % [\s!hr] @@ -185,126 +200,148 @@ % \c!rightsentence=\rightguillemot, % \c!leftsubsentence=\leftsubguillemot, % \c!rightsubsentence=\rightsubguillemot]} -% +% % \installcompoundcharacter /< {{\setupHRlanguage|<|}} % \installcompoundcharacter /> {{\setupHRlanguage|>|}} -% -% \installcompoundcharacter /- {|-|} -% +% +% \installcompoundcharacter /- {|-|} +% % \stoplanguagespecifics -% labels - -\setupheadtext [\s!pl] [\v!inhoud=Spis tre\'sci] -\setupheadtext [\s!cz] [\v!inhoud=Obsah] -\setupheadtext [\s!sk] [\v!inhoud=Obsah] -\setupheadtext [\s!hr] [\v!inhoud=Sadr\v{z}aj] - -\setupheadtext [\s!pl] [\v!tabellen=Tabele] -\setupheadtext [\s!cz] [\v!tabellen=Tabulek] -\setupheadtext [\s!sk] [\v!tabellen=Tabuliek] -\setupheadtext [\s!hr] [\v!tabellen=Tablice] - -\setupheadtext [\s!pl] [\v!figuren=Ilustracje] -\setupheadtext [\s!cz] [\v!figuren=Obr\'azk\r{u}] -\setupheadtext [\s!sk] [\v!figuren=Obr\'azkov] -\setupheadtext [\s!hr] [\v!figuren=Slike] - -\setupheadtext [\s!pl] [\v!grafieken=Grafika] -\setupheadtext [\s!cz] [\v!grafieken=...] -\setupheadtext [\s!sk] [\v!grafieken=...] -\setupheadtext [\s!hr] [\v!grafieken=Slike] - -\setupheadtext [\s!pl] [\v!intermezzos=Intermezza] -\setupheadtext [\s!cz] [\v!intermezzos=...] -\setupheadtext [\s!sk] [\v!intermezzos=...] -\setupheadtext [\s!hr] [\v!intermezzos=Intermezza] +% labels + +\setupheadtext [\s!pl] [\v!content=Spis tre\'sci] +\setupheadtext [\s!cz] [\v!content=Obsah] +\setupheadtext [\s!sk] [\v!content=Obsah] +\setupheadtext [\s!hr] [\v!content=Sadr\v{z}aj] +\setupheadtext [\s!sl] [\v!content=Vsebina] + +\setupheadtext [\s!pl] [\v!tables=Tabele] +\setupheadtext [\s!cz] [\v!tables=Tabulek] +\setupheadtext [\s!sk] [\v!tables=Tabuliek] +\setupheadtext [\s!hr] [\v!tables=Tablice] +\setupheadtext [\s!sl] [\v!tables=Tabele] + +\setupheadtext [\s!pl] [\v!figures=Ilustracje] +\setupheadtext [\s!cz] [\v!figures=Obr\'azk\r{u}] +\setupheadtext [\s!sk] [\v!figures=Obr\'azkov] +\setupheadtext [\s!hr] [\v!figures=Slike] +\setupheadtext [\s!sl] [\v!figures=Slike] + +\setupheadtext [\s!pl] [\v!graphics=Grafika] +\setupheadtext [\s!cz] [\v!graphics=...] +\setupheadtext [\s!sk] [\v!graphics=...] +\setupheadtext [\s!hr] [\v!graphics=Slike] +\setupheadtext [\s!sl] [\v!graphics=Slike] + +\setupheadtext [\s!pl] [\v!intermezzi=Intermezza] +\setupheadtext [\s!cz] [\v!intermezzi=...] +\setupheadtext [\s!sk] [\v!intermezzi=...] +\setupheadtext [\s!hr] [\v!intermezzi=Intermezza] +\setupheadtext [\s!sl] [\v!intermezzi=Intermezzi] \setupheadtext [\s!pl] [\v!index=Indeks] \setupheadtext [\s!cz] [\v!index=Rejst\v{r}\'{\i}k] \setupheadtext [\s!sk] [\v!index=Zoznam] \setupheadtext [\s!hr] [\v!index=Indeks] +\setupheadtext [\s!sl] [\v!index=Kazalo] -\setupheadtext [\s!pl] [\v!afkortingen=Skr\'ocenie] -\setupheadtext [\s!cz] [\v!afkortingen=...] -\setupheadtext [\s!sk] [\v!afkortingen=...] -\setupheadtext [\s!hr] [\v!afkortingen=Kratice] +\setupheadtext [\s!pl] [\v!abbreviations=Skr\'ocenie] +\setupheadtext [\s!cz] [\v!abbreviations=...] +\setupheadtext [\s!sk] [\v!abbreviations=...] +\setupheadtext [\s!hr] [\v!abbreviations=Kratice] +\setupheadtext [\s!sl] [\v!abbreviations=Kratice] \setupheadtext [\s!pl] [\v!logos=Znaki] \setupheadtext [\s!cz] [\v!logos=...] \setupheadtext [\s!sk] [\v!logos=...] \setupheadtext [\s!hr] [\v!logos=Znakovi] - -\setupheadtext [\s!pl] [\v!eenheden=Jednostki] -\setupheadtext [\s!cz] [\v!eenheden=...] -\setupheadtext [\s!sk] [\v!eenheden=...] -\setupheadtext [\s!hr] [\v!eenheden=Jednostki] - -\setuplabeltext [\s!pl] [\v!tabel=Tabela ] -\setuplabeltext [\s!cz] [\v!tabel=Tabulka ] -\setuplabeltext [\s!sk] [\v!tabel=Tabu\v{l}ka ] -\setuplabeltext [\s!hr] [\v!tabel=T\'abl\'azat ] % [\v!tabel=Tablica ] - -\setuplabeltext [\s!pl] [\v!figuur=Ilustracja ] -\setuplabeltext [\s!cz] [\v!figuur=Obr\'azek ] -\setuplabeltext [\s!sk] [\v!figuur=... ] -\setuplabeltext [\s!hr] [\v!figuur=Slika ] +\setupheadtext [\s!sl] [\v!logos=Logotipi] + +\setupheadtext [\s!pl] [\v!units=Jednostki] +\setupheadtext [\s!cz] [\v!units=...] +\setupheadtext [\s!sk] [\v!units=...] +\setupheadtext [\s!hr] [\v!units=Jednostki] +\setupheadtext [\s!sl] [\v!units=Enote] + +\setuplabeltext [\s!pl] [\v!table=Tabela ] +\setuplabeltext [\s!cz] [\v!table=Tabulka ] +\setuplabeltext [\s!sk] [\v!table=Tabu\v{l}ka ] +\setuplabeltext [\s!hr] [\v!table=T\'abl\'azat ] % [\v!table=Tablica ] +\setuplabeltext [\s!sl] [\v!table=Tabela ] + +\setuplabeltext [\s!pl] [\v!figure=Ilustracja ] +\setuplabeltext [\s!cz] [\v!figure=Obr\'azek ] +\setuplabeltext [\s!sk] [\v!figure=... ] +\setuplabeltext [\s!hr] [\v!figure=Slika ] +\setuplabeltext [\s!sl] [\v!figure=Slika ] \setuplabeltext [\s!pl] [\v!intermezzo=Intermezzo ] \setuplabeltext [\s!cz] [\v!intermezzo=... ] \setuplabeltext [\s!sk] [\v!intermezzo=... ] \setuplabeltext [\s!hr] [\v!intermezzo=Intermezzo ] +\setuplabeltext [\s!sl] [\v!intermezzo=Intermezzo ] + +\setuplabeltext [\s!pl] [\v!graphic=Grafika ] +\setuplabeltext [\s!cz] [\v!graphic=... ] +\setuplabeltext [\s!sk] [\v!graphic=... ] +\setuplabeltext [\s!hr] [\v!graphic=Slika ] +\setuplabeltext [\s!sl] [\v!graphic=Slika ] + +\setuplabeltext [\s!pl] [\v!chapter=] % Rozdzia\l +\setuplabeltext [\s!cz] [\v!chapter=] % Kapitola +\setuplabeltext [\s!sk] [\v!chapter=] % Kapitola +\setuplabeltext [\s!hr] [\v!chapter=] % Rozdzia\l +\setuplabeltext [\s!sl] [\v!chapter=] + +\setuplabeltext [\s!pl] [\v!section=] % Podrozdzia\l +\setuplabeltext [\s!cz] [\v!section=] +\setuplabeltext [\s!sk] [\v!section=] +\setuplabeltext [\s!hr] [\v!section=] % Podrozdzia\l +\setuplabeltext [\s!sl] [\v!section=] % Odstavek + +\setuplabeltext [\s!pl] [\v!subsection=] +\setuplabeltext [\s!cz] [\v!subsection=] +\setuplabeltext [\s!sk] [\v!subsection=] +\setuplabeltext [\s!hr] [\v!subsection=] +\setuplabeltext [\s!sl] [\v!subsection=] + +\setuplabeltext [\s!pl] [\v!subsubsection=] +\setuplabeltext [\s!cz] [\v!subsubsection=] +\setuplabeltext [\s!sk] [\v!subsubsection=] +\setuplabeltext [\s!hr] [\v!subsubsection=] +\setuplabeltext [\s!sl] [\v!subsubsection=] + +\setuplabeltext [\s!pl] [\v!subsubsubsection=] +\setuplabeltext [\s!cz] [\v!subsubsubsection=] +\setuplabeltext [\s!sk] [\v!subsubsubsection=] +\setuplabeltext [\s!hr] [\v!subsubsubsection=] +\setuplabeltext [\s!sl] [\v!subsubsubsection=] + +\setuplabeltext [\s!pl] [\v!appendix=] % Dodatek +\setuplabeltext [\s!cz] [\v!appendix=] +\setuplabeltext [\s!sk] [\v!appendix=] +\setuplabeltext [\s!hr] [\v!appendix=Dodatak ] +\setuplabeltext [\s!sl] [\v!appendix=Dodatek ] + +\setuplabeltext [\s!pl] [\v!part=Ust\c{e}p] +\setuplabeltext [\s!cz] [\v!part=\v{C}\'ast] +\setuplabeltext [\s!sk] [\v!part=\v{C}as\v{t}] +\setuplabeltext [\s!hr] [\v!part=Dio] +\setuplabeltext [\s!sl] [\v!part=Del ] + +\setuplabeltext [\s!pl] [\v!line=wiersz ] +\setuplabeltext [\s!cz] [\v!line=... ] +\setuplabeltext [\s!sk] [\v!line=... ] +\setuplabeltext [\s!hr] [\v!line=red ] +\setuplabeltext [\s!sl] [\v!line=vrstica ] + +\setuplabeltext [\s!pl] [\v!lines=wiersze ] +\setuplabeltext [\s!cz] [\v!lines=... ] +\setuplabeltext [\s!sk] [\v!lines=... ] +\setuplabeltext [\s!hr] [\v!lines=redovi ] +\setuplabeltext [\s!sl] [\v!lines=vrstice ] -\setuplabeltext [\s!pl] [\v!grafiek=Grafika ] -\setuplabeltext [\s!cz] [\v!grafiek=... ] -\setuplabeltext [\s!sk] [\v!grafiek=... ] -\setuplabeltext [\s!hr] [\v!grafiek=Slika ] - -\setuplabeltext [\s!pl] [\v!hoofdstuk=] % Rozdzia\l -\setuplabeltext [\s!cz] [\v!hoofdstuk=] % Kapitola -\setuplabeltext [\s!sk] [\v!hoofdstuk=] % Kapitola -\setuplabeltext [\s!hr] [\v!hoofdstuk=] % Rozdzia\l - -\setuplabeltext [\s!pl] [\v!paragraaf=] % Podrozdzia\l -\setuplabeltext [\s!cz] [\v!paragraaf=] -\setuplabeltext [\s!sk] [\v!paragraaf=] -\setuplabeltext [\s!hr] [\v!paragraaf=] % Podrozdzia\l - -\setuplabeltext [\s!pl] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!cz] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!sk] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!hr] [\v!sub\v!paragraaf=] - -\setuplabeltext [\s!pl] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!cz] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!sk] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!hr] [\v!sub\v!sub\v!paragraaf=] - -\setuplabeltext [\s!pl] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!cz] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!sk] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!hr] [\v!sub\v!sub\v!sub\v!paragraaf=] - -\setuplabeltext [\s!pl] [\v!bijlage=] % Dodatek -\setuplabeltext [\s!cz] [\v!bijlage=] -\setuplabeltext [\s!sk] [\v!bijlage=] -\setuplabeltext [\s!hr] [\v!bijlage=Dodatak ] - -\setuplabeltext [\s!pl] [\v!deel=Ust\c{e}p] -\setuplabeltext [\s!cz] [\v!deel=\v{C}\'ast] -\setuplabeltext [\s!sk] [\v!deel=\v{C}as\v{t}] -\setuplabeltext [\s!hr] [\v!deel=Dio] - -\setuplabeltext [\s!pl] [\v!regel=wiersz ] -\setuplabeltext [\s!cz] [\v!regel=... ] -\setuplabeltext [\s!sk] [\v!regel=... ] -\setuplabeltext [\s!hr] [\v!regel=red ] - -\setuplabeltext [\s!pl] [\v!regels=wiersze ] -\setuplabeltext [\s!cz] [\v!regels=... ] -\setuplabeltext [\s!sk] [\v!regels=... ] -\setuplabeltext [\s!hr] [\v!regels=redovi ] - \setuplabeltext [\s!pl] [\v!january=stycznia] \setuplabeltext [\s!pl] [\v!february=lutego] \setuplabeltext [\s!pl] [\v!march=marca] @@ -325,7 +362,7 @@ \setuplabeltext [\s!cz] [\v!may=kv\v{e}tna] \setuplabeltext [\s!cz] [\v!june=\v{c}ervna] \setuplabeltext [\s!cz] [\v!july=\v{c}ervence] -\setuplabeltext [\s!cz] [\v!august=srpna] +\setuplabeltext [\s!cz] [\v!august=srpna] \setuplabeltext [\s!cz] [\v!september=z\'a\v{r}\'\i] \setuplabeltext [\s!cz] [\v!october=\v{r}\'{\i}jna] \setuplabeltext [\s!cz] [\v!november=listopadu] @@ -337,11 +374,11 @@ \setuplabeltext [\s!sk] [\v!april=apr\'{\i}la] \setuplabeltext [\s!sk] [\v!may=m\'aja] \setuplabeltext [\s!sk] [\v!june=j\'una] -\setuplabeltext [\s!sk] [\v!july=j\'ula] -\setuplabeltext [\s!sk] [\v!august=augusta] -\setuplabeltext [\s!sk] [\v!september=septembra] +\setuplabeltext [\s!sk] [\v!july=j\'ula] +\setuplabeltext [\s!sk] [\v!august=augusta] +\setuplabeltext [\s!sk] [\v!september=septembra] \setuplabeltext [\s!sk] [\v!october=okt\'obra] -\setuplabeltext [\s!sk] [\v!november=novembra] +\setuplabeltext [\s!sk] [\v!november=novembra] \setuplabeltext [\s!sk] [\v!december=decembra] \setuplabeltext [\s!hr] [\v!january=sije\v{c}anj] @@ -357,12 +394,25 @@ \setuplabeltext [\s!hr] [\v!november=studeni] \setuplabeltext [\s!hr] [\v!december=prosinac] +\setuplabeltext [\s!sl] [\v!january=januar] +\setuplabeltext [\s!sl] [\v!february=februar] +\setuplabeltext [\s!sl] [\v!march=marec] +\setuplabeltext [\s!sl] [\v!april=april] +\setuplabeltext [\s!sl] [\v!may=maj] +\setuplabeltext [\s!sl] [\v!june=junij] +\setuplabeltext [\s!sl] [\v!july=julij] +\setuplabeltext [\s!sl] [\v!august=avgust] +\setuplabeltext [\s!sl] [\v!september=september] +\setuplabeltext [\s!sl] [\v!october=oktober] +\setuplabeltext [\s!sl] [\v!november=november] +\setuplabeltext [\s!sl] [\v!december=december] + \setuplabeltext [\s!pl] [\v!sunday=niedziela] \setuplabeltext [\s!pl] [\v!monday=poniedzia\l ek] \setuplabeltext [\s!pl] [\v!tuesday=wtorek] \setuplabeltext [\s!pl] [\v!wednesday=\'sroda] \setuplabeltext [\s!pl] [\v!thursday=czwartek] -\setuplabeltext [\s!pl] [\v!friday=pi\k{a}tek] +\setuplabeltext [\s!pl] [\v!friday=pi\k{a}tek] \setuplabeltext [\s!pl] [\v!saturday=sobota] \setuplabeltext [\s!hr] [\v!sunday=nedjelja] @@ -370,14 +420,29 @@ \setuplabeltext [\s!hr] [\v!tuesday=utorak] \setuplabeltext [\s!hr] [\v!wednesday=srijeda] \setuplabeltext [\s!hr] [\v!thursday=\v{c}etvrtak] -\setuplabeltext [\s!hr] [\v!friday=petak] +\setuplabeltext [\s!hr] [\v!friday=petak] \setuplabeltext [\s!hr] [\v!saturday=subota] +\setuplabeltext [\s!sl] [\v!sunday=nedelja] +\setuplabeltext [\s!sl] [\v!monday=ponedeljek] +\setuplabeltext [\s!sl] [\v!tuesday=torek] +\setuplabeltext [\s!sl] [\v!wednesday=sreda] +\setuplabeltext [\s!sl] [\v!thursday=\v{c}etrtek] +\setuplabeltext [\s!sl] [\v!friday=petek] +\setuplabeltext [\s!sl] [\v!saturday=sobota] + +%D Rather new ... + +\setuplabeltext [\s!sl] [\v!page=stran ] +\setuplabeltext [\s!sl] [\v!atpage=na strani ] +\setuplabeltext [\s!sl] [\v!hencefore=glej zgoraj] +\setuplabeltext [\s!sl] [\v!hereafter=glej spodaj] +\setuplabeltext [\s!sl] [\v!see=glej ] + %D \ShowAllLanguageValues [\s!pl] [polish] poolse ... %D \ShowAllLanguageValues [\s!cz] [czech] tsjechische ... %D \ShowAllLanguageValues [\s!sk] [slovak] slovaakse ... %D \ShowAllLanguageValues [\s!hr] [croatian] croatian ... +%D \ShowAllLanguageValues [\s!sl] [slovenian] slovenian ... -\protect - -\endinput +\protect \endinput diff --git a/tex/context/base/lang-spa.tex b/tex/context/base/lang-spa.tex index f2ec7916e..83a4d52ab 100644 --- a/tex/context/base/lang-spa.tex +++ b/tex/context/base/lang-spa.tex @@ -13,10 +13,10 @@ \writestatus{loading}{Context Language Macros / Spacing} -%D This module was created in the process of enhancing +%D This module was created in the process of enhancing %D support for French (with the help of Daniel Flipo). -\unprotect +\unprotect \definehspace [\s!fr] [quotation] [\flexiblespaceamount{.8}{.3}{.8}] \definehspace [\s!fr] [sentence] [\fixedspaceamount{1}] @@ -37,9 +37,9 @@ \definehspace [\s!fr] [\string !] [.16667em] \definehspace [\s!fr] [\string ?] [.16667em] -\protect +\protect -%D Alternative discretionary handlers: +%D Alternative discretionary handlers: \definetextmodediscretionary : {\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentlanguage{:}:} @@ -57,15 +57,15 @@ %D \mainlanguage[en] \quotation{test \quotation{test} test}\par %D \mainlanguage[nl] \quotation{test \quotation{test} test}\par %D \mainlanguage[fr] \quotation{test \quotation{test} test}\par -%D +%D %D \mainlanguage[en] \quotation{\quotation{test} test}\par %D \mainlanguage[nl] \quotation{\quotation{test} test}\par %D \mainlanguage[fr] \quotation{\quotation{test} test}\par -%D +%D %D \mainlanguage[en] |<|test |<|test|>| test|>| \par %D \mainlanguage[nl] |<|test |<|test|>| test|>| \par %D \mainlanguage[fr] |<|test |<|test|>| test|>| \par -%D +%D %D \mainlanguage[en] |<||<|test|>| test|>| \par %D \mainlanguage[nl] |<||<|test|>| test|>| \par %D \mainlanguage[fr] |<||<|test|>| test|>| \par diff --git a/tex/context/base/lang-spe.tex b/tex/context/base/lang-spe.tex index 30180e671..306d4369c 100644 --- a/tex/context/base/lang-spe.tex +++ b/tex/context/base/lang-spe.tex @@ -11,24 +11,40 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D This code was originally placed in the language -%D initialization module, but isolating it is clearer. +%D This code was originally placed in the language +%D initialization module, but isolating it is clearer. Language +%D specifics evolved out of user demands for special features, +%D like the german active quote. After a while I decided to +%D associate them to languages in a more general way so that we +%D could associate all kind of things with language switching. +%D +%D This is a typical example of functionality that occasionally +%D gets improved based on user input and experience. Much of the +%D code is pretty old and could probabbly be done in better ways. +%D It's probably also the kind of code that has been and will be +%D written over and over again by \TEX\ users around the world, +%D so there are probably better implementations of similar +%D functionality around. Therefore, users are invited to pop in +%D their own handling as long as it does not interfere with +%D existing code. Writing the more obscure macros that deal with +%D this is a good learning experience (catcodes, lccodes, token +%D lists, expansion, \unknown). \writestatus{loading}{Context Language Macros / Specifics} \unprotect -%D \macros +%D \macros %D {everyresetlanguagespecifics,resetlanguagespecifics} -%D -%D Cleanup macros. +%D +%D Cleanup macros. \newevery \everyresetlanguagespecifics \relax \def\resetlanguagespecifics {\ifcase\protectionlevel \the\everyresetlanguagespecifics - \else % to be translated + \else % to be translated \writestatus\m!systems{don't change language in unprotected mode!}% \fi} @@ -47,13 +63,13 @@ %D macro in return calls for the setup of language specific %D macros. Such specifics are defined as: %D -%D \starttypen +%D \starttyping %D \startlanguagespecifics[de] %D \installcompoundcharacter "a {\"a} %D \installcompoundcharacter "e {\"e} %D \installcompoundcharacter "s {\SS} %D \stoplanguagespecifics -%D \stoptypen +%D \stoptyping %D %D Instead of \type{[du]} we can pass a comma separated %D list, like \type{[du,nl]}. Next calls to this macro add the @@ -76,7 +92,7 @@ %D be sure, we check on spurious spaces. The second dummy %D argument gobbles spaces. -\def\languageencoding% +\def\languageencoding {\ifx\characterencoding\nocharacterencoding \else \characterencoding-% \fi} @@ -90,11 +106,11 @@ % \getvalue{\??la\languageencoding##1\??la}{#3}} % {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{#3}}}% % \bgroup -% \setbox0=\hbox{\enablelanguagespecifics[##1]}% -% \ifdim\wd0>\!!zeropoint -% \showmessage{\m!linguals}{7}{\currentencoding-##1,\the\wd0\space}\wait +% \setbox0\hbox{\enablelanguagespecifics[##1]}% +% \ifdim\wd0>\zeropoint +% \showmessage\m!linguals7{\currentencoding-##1,\the\wd0\space}\wait % \else -% \showmessage{\m!linguals}{8}{\currentencoding-##1}% +% \showmessage\m!linguals8{\currentencoding-##1}% % \fi % \egroup % \doif{##1}{\currentmainlanguage} @@ -103,26 +119,45 @@ % This saves 3K in the fmt file. -\long\def\dostartlanguagespecifics[#1][#2]#3\stoplanguagespecifics% +% This should be a token register, but alas, we run out of them and +% \ETEX\ has a bug. + +\long\def\dostartlanguagespecifics[#1][#2]#3\stoplanguagespecifics {\egroup \processcommalist[#1]{\dosetlanguagespecifics{#3}}} +% \long\def\dosetlanguagespecifics#1#2% +% {\doifdefinedelse{\??la\languageencoding#2\??la} +% {\long\def\do##1##2##3{\setvalue{\??la\languageencoding##1\??la}{\do{##1}{##2##3}}}% +% \getvalue{\??la\languageencoding#2\??la}{#1}} +% {\setvalue{\??la\languageencoding#2\??la}{\do{#2}{#1}}}% +% \bgroup +% \setbox\scratchbox\hbox{\enablelanguagespecifics[#2]}% +% \ifdim\wd\scratchbox>\zeropoint +% \showmessage\m!linguals7{\currentencoding-#2,\the\wd\scratchbox\space}\wait +% \else +% \showmessage\m!linguals8{\currentencoding-#2}% +% \fi +% \egroup +% \doif{#2}\currentmainlanguage +% {\enablelanguagespecifics[#2]}} + \long\def\dosetlanguagespecifics#1#2% - {\doifdefinedelse{\??la\languageencoding#2\??la} - {\long\def\do##1##2##3% - {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{##2##3}}}% - \getvalue{\??la\languageencoding#2\??la}{#1}} - {\setvalue{\??la\languageencoding#2\??la}{\do{#2}{#1}}}% + {%ifundefined{\??la\languageencoding#2\??la}\letvalue{\??la\languageencoding#2\??la}\empty\fi + \ifundefined{\??la\languageencoding#2\??la}\forgetlanguagespecifics[#2]\fi + \appendvalue{\??la\languageencoding#2\??la}{#1}% \bgroup - \setbox0=\hbox{\enablelanguagespecifics[#2]}% - \ifdim\wd0>\zeropoint - \showmessage{\m!linguals}{7}{\currentencoding-#2,\the\wd0\space}\wait + \setbox\scratchbox\hbox{\enablelanguagespecifics[#2]}% + \ifdim\wd\scratchbox>\zeropoint + \showmessage\m!linguals7{\currentencoding-#2,\the\wd\scratchbox\space}\wait \else - \showmessage{\m!linguals}{8}{\currentencoding-#2}% + \showmessage\m!linguals8{\currentencoding-#2}% \fi \egroup - \doif{#2}{\currentmainlanguage} - {\enablelanguagespecifics[#2]}} + \doif{#2}\currentmainlanguage{\enablelanguagespecifics[#2]}} + +\def\forgetlanguagespecifics[#1]% + {\letvalue{\??la\languageencoding#1\??la}\empty} %D Enabling them is rather straightforward. We only have to %D define \type{\do} in such a way that \type{{ }} is removed @@ -139,7 +174,7 @@ % sped up since used often: \def\enablelanguagespecifics[#1]% - {\let\do\secondoftwoarguments + {%\let\do\secondoftwoarguments \csname \??la \@EA\ifx\csname\??la#1\c!default\endcsname\relax @@ -152,14 +187,14 @@ \csname\??la#1\??la\endcsname \csname\??la\languageencoding#1\??la\endcsname} % dup ? -%D \macros +%D \macros %D {deactivatelanguagespecific} -%D +%D %D The next code makes it possible to disable the specifics. \def\deactivatelanguagespecific#1% {\ifundefined{l g s \string#1}% - \letgvalueempty{l g s \string#1}% signal to prevent dup def + \letgvalueempty{l g s \string#1}% signal to prevent dup def \bgroup \catcode`#1=\@@active \uccode`~=`#1 @@ -171,18 +206,18 @@ % \def\dodeactivatetoken#1#2#3% % {\def#1{#2}\catcode`#2=#3\relax} -\def\dodeactivatetoken#1#2#3% tets needed to avoid clash with \unprotect +\def\dodeactivatetoken#1#2#3% test needed to avoid clash with \unprotect {\def#1{#2}\ifnum\catcode`#2=\@@active\catcode`#2=#3\relax\fi} -%D We cannot hook this into the installer since language -%D specifics can be anything. So far, we have the following -%D potentially active characters. +%D We cannot hook this into the installer since language +%D specifics can be anything. So far, we have the following +%D potentially active characters. -%D Beware, this should happen under an unprotected regime; -%D thanks to Giuseppe Oblomov Bilotta, who first noticed -%D that something was wrong. +%D Beware, this should happen under an unprotected regime; +%D thanks to Giuseppe Oblomov Bilotta, who first noticed +%D that something was wrong. -\protect +\protect \deactivatelanguagespecific " \deactivatelanguagespecific / @@ -191,13 +226,19 @@ \deactivatelanguagespecific ? \deactivatelanguagespecific ! -\unprotect +\unprotect + +% yes or no (taco wins: no) + +% \startlanguagespecifics[nl,cz,sk,fr] +% \lccode`\'=`\' +% \stoplanguagespecifics -%D \macros -%D {ordinaldaynumber, highordinalstr, ordinalstr} -%D -%D Efficient general ordinal number converters are sometimes -%D difficult to implement. Fortunately dates never exceed the +%D \macros +%D {ordinaldaynumber, highordinalstr, ordinalstr} +%D +%D Efficient general ordinal number converters are sometimes +%D difficult to implement. Fortunately dates never exceed the %D number~31. \def\highordinalstr#1{\high{\nocap{#1}}} @@ -208,17 +249,17 @@ \noexpand\firstofoneargument{\number#1}}} %D Language specific converters have definitions like: -%D -%D \starttypen -%D \def\enordinaldaynumber#1{...} -%D \stoptypen -%D +%D +%D \starttyping +%D \def\enordinaldaynumber#1{...} +%D \stoptyping +%D %D Examples can be found in the other \type {lang} modules. -% \ifprocessingXML is a nasty dependency +% \ifprocessingXML is a nasty dependency \appendtoks \ifprocessingXML \else \resetlanguagespecifics \fi \to \everylanguage -\protect \endinput +\protect \endinput diff --git a/tex/context/base/lang-ura.tex b/tex/context/base/lang-ura.tex index 6c7f84960..1686a2e41 100644 --- a/tex/context/base/lang-ura.tex +++ b/tex/context/base/lang-ura.tex @@ -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. -%D Todo: replace \'.. by \namedglyph +% Todo: replace \'.. by \namedglyph \writestatus{loading}{Uralic Languages} @@ -19,21 +19,21 @@ %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. %D %D \starttabulate[|lB|l|] %D \NC Finnish \NC \NC \NR %D \NC Hungarian \NC Balazs Nagy \NC \NR %D \stoptabulate -% Cheremiss, Estonian, Finnish, Karelian, Laap, Mordvinian, +% Cheremiss, Estonian, Finnish, Karelian, Laap, Mordvinian, % Permian tongues, Hungarian, Ostyak, Vogul, Samoyed \unprotect \installlanguage [\s!fi] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -42,12 +42,12 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, - \c!status=\v!stop] + \c!date={\v!year,\ ,\v!month,\ ,\v!day}, + \c!state=\v!stop] \installlanguage [\s!hu] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -56,61 +56,61 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\lowerleftdoubleninequote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!jaar,.,\ ,\v!maand,\ ,\v!dag,.}, - \c!status=\v!stop, + \c!date={\v!year,.,\ ,\v!month,\ ,\v!day,.}, + \c!state=\v!stop, \s!mapping=ec, \s!encoding=ec] \installlanguage [finish] [\s!fi] \installlanguage [hungarian] [\s!hu] -\setupheadtext [\s!fi] [\v!inhoud=Sis\"allys] -\setupheadtext [\s!fi] [\v!tabellen=Taulukkoj] -\setupheadtext [\s!fi] [\v!figuren=Kuvi] -\setupheadtext [\s!fi] [\v!grafieken=Grafiikkaoi] -\setupheadtext [\s!fi] [\v!intermezzos=Intermezzos] +\setupheadtext [\s!fi] [\v!content=Sis\"allys] +\setupheadtext [\s!fi] [\v!tables=Taulukkoj] +\setupheadtext [\s!fi] [\v!figures=Kuvi] +\setupheadtext [\s!fi] [\v!graphics=Grafiikkaoi] +\setupheadtext [\s!fi] [\v!intermezzi=Intermezzos] \setupheadtext [\s!fi] [\v!index=Indeksiluku] -\setupheadtext [\s!fi] [\v!afkortingen=Lyhennyksi] +\setupheadtext [\s!fi] [\v!abbreviations=Lyhennyksi] \setupheadtext [\s!fi] [\v!logos=Vertauskuva] -\setupheadtext [\s!fi] [\v!eenheden=Yksik\"ot] +\setupheadtext [\s!fi] [\v!units=Yksik\"ot] -\setupheadtext [\s!hu] [\v!inhoud=Tartalom] -\setupheadtext [\s!hu] [\v!tabellen=T\'abl\'azatok] -\setupheadtext [\s!hu] [\v!figuren=\'Abr\'ak] -\setupheadtext [\s!hu] [\v!grafieken=Grafik\'ak] -\setupheadtext [\s!hu] [\v!intermezzos=Intermezzok] +\setupheadtext [\s!hu] [\v!content=Tartalom] +\setupheadtext [\s!hu] [\v!tables=T\'abl\'azatok] +\setupheadtext [\s!hu] [\v!figures=\'Abr\'ak] +\setupheadtext [\s!hu] [\v!graphics=Grafik\'ak] +\setupheadtext [\s!hu] [\v!intermezzi=Intermezzok] \setupheadtext [\s!hu] [\v!index=Index] -\setupheadtext [\s!hu] [\v!afkortingen=R\"ovid\'\it\'esek] +\setupheadtext [\s!hu] [\v!abbreviations=R\"ovid\'\it\'esek] \setupheadtext [\s!hu] [\v!logos=Fejl\'ecek] -\setupheadtext [\s!hu] [\v!eenheden=M\'ert\'ekegys\'egek] +\setupheadtext [\s!hu] [\v!units=M\'ert\'ekegys\'egek] -\setuplabeltext [\s!fi] [\v!tabel=Taulukko ] -\setuplabeltext [\s!fi] [\v!figuur=Kuva ] +\setuplabeltext [\s!fi] [\v!table=Taulukko ] +\setuplabeltext [\s!fi] [\v!figure=Kuva ] \setuplabeltext [\s!fi] [\v!intermezzo=Intermezzo ] -\setuplabeltext [\s!fi] [\v!grafiek=Grafiikka ] -\setuplabeltext [\s!fi] [\v!hoofdstuk=] -\setuplabeltext [\s!fi] [\v!paragraaf=] -\setuplabeltext [\s!fi] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!fi] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!fi] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!fi] [\v!bijlage=] -\setuplabeltext [\s!fi] [\v!deel=Osa ] -\setuplabeltext [\s!fi] [\v!regel=rivi ] -\setuplabeltext [\s!fi] [\v!regels=rivie ] - -\setuplabeltext [\s!hu] [\v!tabel={,.~t\'abl\'azat:}] -\setuplabeltext [\s!hu] [\v!figuur={,.~\'abra:}] +\setuplabeltext [\s!fi] [\v!graphic=Grafiikka ] +\setuplabeltext [\s!fi] [\v!chapter=] +\setuplabeltext [\s!fi] [\v!section=] +\setuplabeltext [\s!fi] [\v!subsection=] +\setuplabeltext [\s!fi] [\v!subsubsection=] +\setuplabeltext [\s!fi] [\v!subsubsubsection=] +\setuplabeltext [\s!fi] [\v!appendix=] +\setuplabeltext [\s!fi] [\v!part=Osa ] +\setuplabeltext [\s!fi] [\v!line=rivi ] +\setuplabeltext [\s!fi] [\v!lines=rivie ] + +\setuplabeltext [\s!hu] [\v!table={,.~t\'abl\'azat:}] +\setuplabeltext [\s!hu] [\v!figure={,.~\'abra:}] \setuplabeltext [\s!hu] [\v!intermezzo={,.~intermezzo:}] -\setuplabeltext [\s!hu] [\v!grafiek={,.~k\'ep:}] -\setuplabeltext [\s!hu] [\v!hoofdstuk={,.~fejezet:}] -\setuplabeltext [\s!hu] [\v!paragraaf={,.}] -\setuplabeltext [\s!hu] [\v!sub\v!paragraaf={,.}] -\setuplabeltext [\s!hu] [\v!sub\v!sub\v!paragraaf={,.}] -\setuplabeltext [\s!hu] [\v!sub\v!sub\v!sub\v!paragraaf={,.}] -\setuplabeltext [\s!hu] [\v!bijlage=] -\setuplabeltext [\s!hu] [\v!deel={,.~r\'esz:}] -\setuplabeltext [\s!hu] [\v!regel={,.~sor:}] -\setuplabeltext [\s!hu] [\v!regels=sorok] +\setuplabeltext [\s!hu] [\v!graphic={,.~k\'ep:}] +\setuplabeltext [\s!hu] [\v!chapter={,.~fejezet:}] +\setuplabeltext [\s!hu] [\v!section={,.}] +\setuplabeltext [\s!hu] [\v!subsection={,.}] +\setuplabeltext [\s!hu] [\v!subsubsection={,.}] +\setuplabeltext [\s!hu] [\v!subsubsubsection={,.}] +\setuplabeltext [\s!hu] [\v!appendix=] +\setuplabeltext [\s!hu] [\v!part={,.~r\'esz:}] +\setuplabeltext [\s!hu] [\v!line={,.~sor:}] +\setuplabeltext [\s!hu] [\v!lines=sorok] \setuplabeltext [\s!fi] [\v!january=tammikuu] \setuplabeltext [\s!fi] [\v!february=helmikuu] @@ -155,8 +155,6 @@ \setuplabeltext [\s!hu] [\v!saturday=szombat] %D \ShowAllLanguageValues [\s!fi] [finnish] finse ... -%D \ShowAllLanguageValues [\s!hu] [hungarian] magyar. +%D \ShowAllLanguageValues [\s!hu] [hungarian] magyar ... -\protect - -\endinput +\protect \endinput diff --git a/tex/context/base/lang-vn.tex b/tex/context/base/lang-vn.tex index d249bfff9..1d20f838a 100644 --- a/tex/context/base/lang-vn.tex +++ b/tex/context/base/lang-vn.tex @@ -1,6 +1,6 @@ %D \module %D [ file=lang-vn, -%D version=1999.12.12, +%D version=1999.12.12, %D title=\CONTEXT\ Language Macros, %D subtitle=Vietnamese, %D author={Hans Hagen \& Han The Thanh}, @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Vietnamese Language} @@ -17,19 +17,19 @@ %D many of the first translations were done by Tobias. Later %D on, corrections were made by users. If you have suggestions, %D or feel that your name missing here, don't hesitate to send -%D us an email. +%D us an email. %D %D \starttabulate[|lB|l|] %D \NC Vietnamese \NC \THANH\ \NC \NR %D \stoptabulate -\unprotect +\unprotect \definesystemconstant {vietnamese} \definesystemconstant {vn} \installlanguage [\s!vn] - [\c!spatiering=\v!opelkaar, + [\c!spacing=\v!packed, \c!leftsentence=---, \c!rightsentence=---, \c!leftsubsentence=---, @@ -38,36 +38,34 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\lowerleftdoubleninequote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={{Ng\`ay },dd,{ th\'ang },\v!maand,{ n\u a m },yy}, - \c!status=\v!stop] + \c!date={{Ng\`ay },dd,{ th\'ang },\v!month,{ n\u a m },yy}, + \c!state=\v!stop] \installlanguage [vietnamese] [\s!vn] -\installlanguage [\s!vn] [\c!status=\v!start] - -\setupheadtext [\s!vn] [\v!inhoud=M\d{u}c l\d{u}c] -\setupheadtext [\s!vn] [\v!tabellen=Danh s\'ach b\h{a}ng] -\setupheadtext [\s!vn] [\v!figuren=Danh s\'ach h\`inh v\~e] -\setupheadtext [\s!vn] [\v!grafieken=Graphics] -\setupheadtext [\s!vn] [\v!intermezzos=Intermezzos] +\setupheadtext [\s!vn] [\v!content=M\d{u}c l\d{u}c] +\setupheadtext [\s!vn] [\v!tables=Danh s\'ach b\h{a}ng] +\setupheadtext [\s!vn] [\v!figures=Danh s\'ach h\`inh v\~e] +\setupheadtext [\s!vn] [\v!graphics=Graphics] +\setupheadtext [\s!vn] [\v!intermezzi=Intermezzos] \setupheadtext [\s!vn] [\v!index=Ch\h{i} s\'{^o}] -\setupheadtext [\s!vn] [\v!afkortingen=Abbreviations] +\setupheadtext [\s!vn] [\v!abbreviations=Abbreviations] \setupheadtext [\s!vn] [\v!logos=Logos] -\setupheadtext [\s!vn] [\v!eenheden=Units] +\setupheadtext [\s!vn] [\v!units=Units] -\setuplabeltext [\s!vn] [\v!tabel=B\h{a}ng] -\setuplabeltext [\s!vn] [\v!figuur=H\`inh] +\setuplabeltext [\s!vn] [\v!table=B\h{a}ng] +\setuplabeltext [\s!vn] [\v!figure=H\`inh] \setuplabeltext [\s!vn] [\v!intermezzo=intermezzo] -\setuplabeltext [\s!vn] [\v!grafiek=graphic] -\setuplabeltext [\s!vn] [\v!hoofdstuk=chapter] -\setuplabeltext [\s!vn] [\v!paragraaf=] % not set -\setuplabeltext [\s!vn] [\v!sub\v!paragraaf=] % not set -\setuplabeltext [\s!vn] [\v!sub\v!sub\v!paragraaf=] % not set -\setuplabeltext [\s!vn] [\v!sub\v!sub\v!sub\v!paragraaf=] % not set -\setuplabeltext [\s!vn] [\v!bijlage=] % not set -\setuplabeltext [\s!vn] [\v!deel=Ph\`{^a} n ] -\setuplabeltext [\s!vn] [\v!regel=line ] -\setuplabeltext [\s!vn] [\v!regels=lines ] +\setuplabeltext [\s!vn] [\v!graphic=graphic] +\setuplabeltext [\s!vn] [\v!chapter=chapter] +\setuplabeltext [\s!vn] [\v!section=] % not set +\setuplabeltext [\s!vn] [\v!subsection=] % not set +\setuplabeltext [\s!vn] [\v!subsubsection=] % not set +\setuplabeltext [\s!vn] [\v!subsubsubsection=] % not set +\setuplabeltext [\s!vn] [\v!appendix=] % not set +\setuplabeltext [\s!vn] [\v!part=Ph\`{^a} n ] +\setuplabeltext [\s!vn] [\v!line=line ] +\setuplabeltext [\s!vn] [\v!lines=lines ] \setuplabeltext [\s!vn] [\v!sunday=Sunday] \setuplabeltext [\s!vn] [\v!monday=Monday] @@ -85,11 +83,11 @@ \setuplabeltext [\s!vn] [\v!june=s\'au] \setuplabeltext [\s!vn] [\v!july=b\h{a}y] \setuplabeltext [\s!vn] [\v!august=t\'am] -\setuplabeltext [\s!vn] [\v!september=ch\'in] +\setuplabeltext [\s!vn] [\v!september=ch\'in] \setuplabeltext [\s!vn] [\v!october=m\h{u}\`{ho}i] \setuplabeltext [\s!vn] [\v!november=m\h{u}\`{ho}im\d{^o}t] \setuplabeltext [\s!vn] [\v!december=m\h{u}\`{ho}ihai] -\protect +\protect -\endinput +\endinput diff --git a/tex/context/base/m-chart.tex b/tex/context/base/m-chart.tex index 23aea538b..b5defdc8f 100644 --- a/tex/context/base/m-chart.tex +++ b/tex/context/base/m-chart.tex @@ -60,8 +60,8 @@ \unprotect -\definieersorteren [flowchart] [flowcharts] [\v!geen] % no access -\stelsorterenin [flowchart] [\c!status=\v!stop] % off by default +\definesorting [flowchart] [flowcharts] [\v!none] % no access +\setupsorting [flowchart] [\c!state=\v!stop] % off by default \def\@FLOW@{@FLOW@} \def\@FLOC@{@FLOC@} @@ -79,7 +79,7 @@ \def\FLOWbufferprefix{flw-} -\def\processFLOWbuffer#1{\haalbuffer[\FLOWbufferprefix#1]} +\def\processFLOWbuffer#1{\getbuffer[\FLOWbufferprefix#1]} \def\typeFLOWbuffer #1{\typebuffer[\FLOWbufferprefix#1]} \def\setFLOWname#1#2% funny hack that makes sure that we get @@ -134,6 +134,13 @@ \let\locate \doFLOWlocate \let\connect \doFLOWconnect} +\let\FLOWcell \s!unknown +\let\FLOWshape \s!unknown +\let\FLOWdestination\s!unknown +\let\FLOWfocus \s!unknown +\let\FLOWoverlay \empty +\let\FLOWtext \empty + \def\doFLOWname#1% {\def\FLOWcell{#1}\setFLOWname\FLOWname{name_#1}\ignorespaces} @@ -157,8 +164,8 @@ [\s!dummy] [{\externalfigure [#1] - [\c!breedte=\overlaywidth, - \c!hoogte=\overlayheight]}]% + [\c!width=\overlaywidth, + \c!height=\overlayheight]}]% \overlay{\s!dummy}} \def\doFLOWtext @@ -221,14 +228,14 @@ \def\setupFLOWsets {\dodoubleargument\getparameters[\@@FLOX]} \setupFLOWcharts - [\c!optie=, - \c!korps=, - \c!punt=, % private option - \c!breedte=12\bodyfontsize, - \c!hoogte=7\bodyfontsize, - \c!maxbreedte=, - \c!maxhoogte=, - \c!offset=\v!standaard, % == auto offset + [\c!option=, + \c!bodyfont=, + \c!dot=, % private option + \c!width=12\bodyfontsize, + \c!height=7\bodyfontsize, + \c!maxwidth=, + \c!maxheight=, + \c!offset=\v!standard, % == auto offset \c!dx=2\bodyfontsize, \c!dy=2\bodyfontsize, \c!nx=0, % 1, @@ -237,36 +244,36 @@ \c!y=1, \c!autofocus=, \c!focus=, - \c!achtergrond=, % \v!kleur, - \c!achtergrondkleur=white, - \c!lijndikte=\linewidth, - \c!kader=\v!uit, - \c!kaderkleur=] + \c!background=, % \v!color, + \c!backgroundcolor=\s!white, + \c!rulethickness=\linewidth, + \c!frame=\v!off, + \c!framecolor=] \setupFLOWlines - [\c!hoek=\v!rond, - \c!pijl=\v!ja, - \c!streep=\v!nee, - \c!straal=.375\bodyfontsize, % 2.5\c!lijndikte - \c!kleur=FLOWlinecolor, - \c!lijndikte=.15\bodyfontsize, % 2pt, - \c!offset=\v!geen] + [\c!corner=\v!round, + \c!arrow=\v!yes, + \c!dash=\v!no, + \c!radius=.375\bodyfontsize, % 2.5\c!rulethickness + \c!color=FLOWlinecolor, + \c!rulethickness=.15\bodyfontsize, % 2pt, + \c!offset=\v!none] \setupFLOWshapes [\c!default=action, - \c!kaderkleur=FLOWframecolor, - \c!achtergrond=\v!kleur, - \c!achtergrondkleur=FLOWbackgroundcolor, - \c!achtergrondraster=\@@rsraster, - \c!lijndikte=.15\bodyfontsize, % 2pt, + \c!framecolor=FLOWframecolor, + \c!background=\v!color, + \c!backgroundcolor=FLOWbackgroundcolor, + \c!backgroundscreen=\@@rsscreen, + \c!rulethickness=.15\bodyfontsize, % 2pt, \c!offset=.5\bodyfontsize] \setupFLOWfocus - [\c!kaderkleur=FLOWfocuscolor, - \c!achtergrond=\@@FLOSachtergrond, - \c!achtergrondkleur=\@@FLOSachtergrondkleur, - \c!achtergrondraster=\@@FLOSachtergrondraster, - \c!lijndikte=\@@FLOSlijndikte, + [\c!framecolor=FLOWfocuscolor, + \c!background=\@@FLOSbackground, + \c!backgroundcolor=\@@FLOSbackgroundcolor, + \c!backgroundscreen=\@@FLOSbackgroundscreen, + \c!rulethickness=\@@FLOSrulethickness, \c!offset=\@@FLOSoffset] \definecolor [FLOWfocuscolor] [s=.2] @@ -288,9 +295,9 @@ \increment(\includeFLOWy,0\FLOWiy)\decrement\includeFLOWy \def\dodoincludeFLOWchart##1% {\doifdefined{\@FLOW@-##1} - {\pushmacro\dohandleflowchart + {\globalpushmacro\dohandleflowchart % was local \gdef\dohandleflowchart[####1][####2]% - {\popmacro\dohandleflowchart + {\globalpopmacro\dohandleflowchart % was local \resetFLOWlocation \processFLOWbuffer{####1}}% \getvalue{\@FLOW@-##1}}}% @@ -373,7 +380,7 @@ {\doifundefinedelse{\@FLOW@-#1} {\writestatus{FLOW}{unknown chart #1}% \framed - [\c!breedte=12\bodyfontsize,\c!hoogte=8\bodyfontsize] + [\c!width=12\bodyfontsize,\c!height=8\bodyfontsize] {\tttf [chart #1]}} {\dodogetFLOWchart[#1][#2]}} @@ -382,7 +389,7 @@ \insidefloattrue \forgetall \dontcomplain - \offinterlineskip + % \offinterlineskip % we now explicitly use \nointerlineskip later on \def\dohandleflowchart[##1][##2]% {\def\currentFLOWnumber{##1}% \getparameters[\@@FLOW][##2]}% @@ -398,16 +405,16 @@ \processFLOWbuffer\currentFLOWnumber \ifcase\@@FLOWnx\relax \let\@@FLOWnx\FLOWwidth \fi \ifcase\@@FLOWny\relax \let\@@FLOWny\FLOWheight \fi - \doifnothing{\@@FLOWmaxbreedte\@@FLOWmaxhoogte}{\FLOWscalingfalse}% + \doifnothing{\@@FLOWmaxwidth\@@FLOWmaxheight}{\FLOWscalingfalse}% \ifFLOWscaling - \doifnothing{\@@FLOWmaxbreedte}{\let\@@FLOWmaxbreedte\maxdimen}% - \doifnothing{\@@FLOWmaxhoogte} {\let\@@FLOWmaxhoogte \maxdimen}% + \doifnothing{\@@FLOWmaxwidth }{\let\@@FLOWmaxwidth \maxdimen}% + \doifnothing{\@@FLOWmaxheight}{\let\@@FLOWmaxheight\maxdimen}% \scratchcounter=\bodyfontpoints \doloop % NOG FONTSWITCH OM EX EN EM TE LATEN WERKEN {\ifnum\scratchcounter>1 % NU DIMENSIONS IN TERMS OF BODYFONTSIZE \bodyfontsize=\the\scratchcounter pt - \dimen0=\@@FLOWmaxbreedte - \dimen2=\@@FLOWbreedte + \dimen0=\@@FLOWmaxwidth + \dimen2=\@@FLOWwidth \dimen4=\@@FLOWdx \advance\dimen2 2\dimen4 \dimen2=\@@FLOWnx\dimen2 @@ -415,8 +422,8 @@ \ifdim\dimen2>\dimen0 \advance\scratchcounter \minusone \else - \dimen0=\@@FLOWmaxhoogte - \dimen2=\@@FLOWhoogte + \dimen0=\@@FLOWmaxheight + \dimen2=\@@FLOWheight \dimen4=\@@FLOWdy \advance\dimen2 2\dimen4 \dimen2=\@@FLOWny\dimen2 @@ -432,47 +439,47 @@ \fi}% \expanded{\switchtobodyfont[\the\scratchcounter pt]}% \forgetall - \offinterlineskip - \else\ifx\@@FLOWkorps\empty\else - \expanded{\switchtobodyfont[\@@FLOWkorps]}% \expanded ? + % \offinterlineskip % needed ? + \else\ifx\@@FLOWbodyfont\empty\else + \expanded{\switchtobodyfont[\@@FLOWbodyfont]}% \expanded ? \fi\fi \global\let\FLOWcells\empty - \dimen0=\@@FLOWbreedte + \dimen0=\@@FLOWwidth \edef\FLOWshapewidth{\the\dimen0}% \dimen2=\@@FLOWdx \advance\dimen0 2\dimen2 \edef\FLOWgridwidth{\the\dimen0}% - \dimen0=\@@FLOWhoogte + \dimen0=\@@FLOWheight \edef\FLOWshapeheight{\the\dimen0}% \dimen2=\@@FLOWdy \advance\dimen0 2\dimen2 \edef\FLOWgridheight{\the\dimen0}% - \scratchdimen=\@@FLOSlijndikte - \edef\@@FLOSlijndikte{\the\scratchdimen}% - \scratchdimen=\@@FLOFlijndikte - \edef\@@FLOFlijndikte{\the\scratchdimen}% - \scratchdimen=\@@FLOLlijndikte - \edef\@@FLOLlijndikte{\the\scratchdimen}% - \ifdim\@@FLOLstraal<2.5\scratchdimen + \scratchdimen=\@@FLOSrulethickness + \edef\@@FLOSrulethickness{\the\scratchdimen}% + \scratchdimen=\@@FLOFrulethickness + \edef\@@FLOFrulethickness{\the\scratchdimen}% + \scratchdimen=\@@FLOLrulethickness + \edef\@@FLOLrulethickness{\the\scratchdimen}% + \ifdim\@@FLOLradius<2.5\scratchdimen \scratchdimen=2.5\scratchdimen - \edef\@@FLOLstraal{\the\scratchdimen}% - \ifdim\@@FLOLstraal>\@@FLOWdx + \edef\@@FLOLradius{\the\scratchdimen}% + \ifdim\@@FLOLradius>\@@FLOWdx \scratchdimen=\@@FLOWdx - \edef\@@FLOLstraal{\the\scratchdimen}% + \edef\@@FLOLradius{\the\scratchdimen}% \fi - \ifdim\@@FLOLstraal>\@@FLOWdy + \ifdim\@@FLOLradius>\@@FLOWdy \scratchdimen=\@@FLOWdy - \edef\@@FLOLstraal{\the\scratchdimen}% + \edef\@@FLOLradius{\the\scratchdimen}% \fi \else - \scratchdimen=\@@FLOLstraal - \edef\@@FLOLstraal{\the\scratchdimen}% + \scratchdimen=\@@FLOLradius + \edef\@@FLOLradius{\the\scratchdimen}% \fi \processaction % magic 2.5 [\@@FLOWoffset] - [ \v!geen=>\scratchdimen=-2.5\scratchdimen, + [ \v!none=>\scratchdimen=-2.5\scratchdimen, \v!overlay=>\scratchdimen=-2.5\scratchdimen, - \v!standaard=>\scratchdimen=\scratchdimen, + \v!standard=>\scratchdimen=\scratchdimen, \s!unknown=>\scratchdimen=\@@FLOWoffset, \s!default=>\scratchdimen=-2.5\scratchdimen]% \edef\@@FLOW@@offset{\the\scratchdimen}% @@ -486,10 +493,10 @@ grid_height := \FLOWgridheight ; shape_width := \FLOWshapewidth ; shape_height := \FLOWshapeheight ; - connection_line_width := \@@FLOLlijndikte ; - connection_smooth_size := \@@FLOLstraal ; - connection_arrow_size := \@@FLOLstraal ; - connection_dash_size := \@@FLOLstraal ; + connection_line_width := \@@FLOLrulethickness ; + connection_smooth_size := \@@FLOLradius ; + connection_arrow_size := \@@FLOLradius ; + connection_dash_size := \@@FLOLradius ; % \stopMPdrawing % \def\getFLOWlocationX##1,##2\end% % {\ifnum0##1>\FLOWwidth \xdef\FLOWwidth {##1}\fi @@ -511,28 +518,28 @@ reverse_y := true ; chart_offset := \@@FLOW@@offset ; \stopMPdrawing - \doifelsenothing\@@FLOWachtergrondkleur + \doifelsenothing\@@FLOWbackgroundcolor {\startMPdrawing chart_background_color := white ; \stopMPdrawing} {\startMPdrawing - chart_background_color := \MPcolor{\@@FLOWachtergrondkleur} ; + chart_background_color := \MPcolor{\@@FLOWbackgroundcolor} ; \stopMPdrawing}% - \doif\@@FLOWoptie\v!test + \doif\@@FLOWoption\v!test {\startMPdrawing show_con_points := true ; show_mid_points := true ; show_all_points := true ; \stopMPdrawing}% \processaction % private - [\@@FLOWpunt] - [ \v!ja=>\startMPdrawing + [\@@FLOWdot] + [ \v!yes=>\startMPdrawing show_con_points := true ; show_mid_points := true ; show_all_points := true ; \stopMPdrawing, \s!unknown=>\startMPdrawing - show_\@@FLOWpunt_points := true ; + show_\@@FLOWdot_points := true ; \stopMPdrawing]% \let\startFLOWcell\startFLOWcellB \resetFLOWlocation @@ -577,7 +584,7 @@ \setbox4\hbox {\hskip\@@FLOW@@offset\lower\@@FLOW@@offset\box4}% \wd4\wd0\ht4\ht0\dp4\dp0 - \doifelse\@@FLOWoptie\v!test + \doifelse\@@FLOWoption\v!test {\setbox6\vbox {\forgetall \vskip\@@FLOW@@offset @@ -585,11 +592,12 @@ \basegrid [\c!x=\@@FLOWx,\c!nx=\@@FLOWnx,\c!dx=\withoutpt\FLOWgridwidth, \c!y=\@@FLOWy,\c!ny=\@@FLOWny,\c!dy=\withoutpt\FLOWgridheight, - \c!xstap=1,\c!ystap=1, - \c!eenheid=pt,\c!plaats=\v!midden]}% + \c!xstep=1,\c!ystep=1, + \c!unit=pt,\c!location=\v!middle]}% \wd6\wd0\ht6\ht0\dp6\dp0 \setbox8\vbox - {\forgetall\offinterlineskip + {\forgetall + \offinterlineskip \vskip\@@FLOW@@offset \dostepwiserecurse\@@FLOWy\@@FLOWny\plusone {\vbox to \FLOWgridheight @@ -600,23 +608,23 @@ {\hbox to \FLOWgridwidth {\hfill \framed - [\c!kaderkleur=red, - \c!breedte=\FLOWshapewidth, - \c!hoogte=\FLOWshapeheight] + [\c!framecolor=red, + \c!width=\FLOWshapewidth, + \c!height=\FLOWshapeheight] {}% \hfill}}} \vfill}}}% \wd8\wd0\ht8\ht0\dp8\dp0 \framed - [\c!offset=\v!overlay,\c!kaderkleur=green] + [\c!offset=\v!overlay,\c!framecolor=green] {\hbox{\box4\hskip-\wd0\box0\hskip-\wd2\box2\hskip-\wd6\box6\hskip-\wd8\box8}}} {\framed [\c!offset=\v!overlay, - \c!kader=\@@FLOWkader, - \c!lijndikte=\@@FLOWlijndikte, - \c!kaderkleur=\@@FLOWkaderkleur, - \c!achtergrond=\@@FLOWachtergrond, - \c!achtergrondkleur=\@@FLOWachtergrondkleur] + \c!frame=\@@FLOWframe, + \c!rulethickness=\@@FLOWrulethickness, + \c!framecolor=\@@FLOWframecolor, + \c!background=\@@FLOWbackground, + \c!backgroundcolor=\@@FLOWbackgroundcolor] {\hbox{\box4\hskip-\wd0\box0\hskip-\wd2\box2}}}% %\message{[\FLOWcells]}\wait \egroup} @@ -645,7 +653,7 @@ \ifx\FLOWshape\empty \global\let\FLOWshape\@@FLOSdefault \fi - \doifnot\FLOWshape{none} % {\v!geen} + \doifnot\FLOWshape{none} % {\v!none} {\ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWshapes} {\edef\FLOWshapetag{shape_\FLOWshape}% beter \expanded \@EA\setFLOWname\@EA\FLOWshapetag\@EA{\FLOWshapetag}} @@ -661,17 +669,17 @@ \startMPdrawing begin_sub_chart ; \ifcase\FLOWstate - shape_line_color := \MPcolor{\@@FLOLkleur} ; - shape_fill_color := \MPcolor{\@@FLOLkleur} ; - shape_line_width := \@@FLOLlijndikte ; + shape_line_color := \MPcolor{\@@FLOLcolor} ; + shape_fill_color := \MPcolor{\@@FLOLcolor} ; + shape_line_width := \@@FLOLrulethickness ; \or - shape_line_color := \MPcolor{\@@FLOFkaderkleur} ; - shape_fill_color := \MPcolor{\@@FLOFachtergrondkleur} ; - shape_line_width := \@@FLOFlijndikte ; + shape_line_color := \MPcolor{\@@FLOFframecolor} ; + shape_fill_color := \MPcolor{\@@FLOFbackgroundcolor} ; + shape_line_width := \@@FLOFrulethickness ; \or - shape_line_color := \MPcolor{\@@FLOSkaderkleur} ; - shape_fill_color := \MPcolor{\@@FLOSachtergrondkleur} ; - shape_line_width := \@@FLOSlijndikte ; + shape_line_color := \MPcolor{\@@FLOSframecolor} ; + shape_fill_color := \MPcolor{\@@FLOSbackgroundcolor} ; + shape_line_width := \@@FLOSrulethickness ; \fi %\ifx\FLOWoverlay\empty % peepshape := false ; @@ -718,16 +726,16 @@ \ifx\FLOWto\FLOWorigin \else \FLOWsetconnect{#1}% \ifx\cFLOWfrom\empty \else - \doifelse\@@FLOLhoek\v!rond + \doifelse\@@FLOLcorner\v!round {\startMPdrawing smooth := true ; \stopMPdrawing} {\startMPdrawing smooth := false ; \stopMPdrawing}% - \doifelse\@@FLOLstreep\v!ja + \doifelse\@@FLOLdash\v!yes {\startMPdrawing dashline := true ; \stopMPdrawing} {\startMPdrawing dashline := false ; \stopMPdrawing}% - \doifelse\@@FLOLpijl\v!ja + \doifelse\@@FLOLarrow\v!yes {\startMPdrawing arrowtip := true ; \stopMPdrawing} {\startMPdrawing arrowtip := false ; \stopMPdrawing}% - \doifelse\@@FLOLoffset\v!geen + \doifelse\@@FLOLoffset\v!none {\startMPdrawing touchshape := true ; \stopMPdrawing} {\startMPdrawing touchshape := false ; \stopMPdrawing}% %\doifsomething{#2} @@ -736,8 +744,8 @@ % \stopMPdrawing}% \startMPdrawing \doFLOWdisplace[0#2,0,0]% - connection_line_color := \MPcolor{\@@FLOLkleur} ; - connection_line_width := \@@FLOLlijndikte ; + connection_line_color := \MPcolor{\@@FLOLcolor} ; + connection_line_width := \@@FLOLrulethickness ; connect_\cFLOWfrom_\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ; \doFLOWdisplace[0,0,0]% \stopMPdrawing @@ -812,82 +820,104 @@ \egroup \ignorespaces} -\def\doprocessFLOWcellD#1,#2\end % kan ook met area - {\!!counta=#1\relax - \!!countb=#2\relax - \!!countc=\@@FLOWx - \!!countd=\@@FLOWy +% pass D + +\def\dophaseoneFLOWcellX#1#2% + {\!!counta#1\relax + \!!countb#2\relax + \!!countc\@@FLOWx + \!!countd\@@FLOWy \advance\!!countc \@@FLOWnx \advance\!!countd \@@FLOWny - \advance\!!countc -1 - \advance\!!countd -1 + \advance\!!countc \minusone + \advance\!!countd \minusone \ifnum\!!counta<\@@FLOWx\relax \donefalse \else\ifnum\!!counta>\!!countc \donefalse \else\ifnum\!!countb<\@@FLOWy\relax \donefalse \else\ifnum\!!countb>\!!countd \donefalse \else \donetrue + \fi\fi\fi\fi} + +\def\dophasetwoFLOWcellX + {\advance\!!counta -\@@FLOWx + \advance\!!counta \plusone + \advance\!!countb -\@@FLOWy + \advance\!!countb \plusone + \dimen0=\FLOWgridwidth + \dimen0=\!!counta\dimen0 + \advance\dimen0 -\FLOWgridwidth + \dimen4=\FLOWgridwidth + \advance\dimen4 -\FLOWshapewidth + \advance\dimen0 .5\dimen4 + \dimen2=\FLOWgridheight + \dimen2=\!!countb\dimen2 + \dimen4=\FLOWgridheight + \advance\dimen4 -\FLOWshapeheight + \advance\dimen2 -.5\dimen4 + \edef\FLOWdx{\the\dimen0}% + \edef\FLOWdy{\the\dimen2}} + +\def\positionFLOWzero% assumes \FLOWdx and \FLOWdy are set + {\setbox0\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}% + \smashbox0\box0 + \nointerlineskip} % new, needed since we somehow reset that + +\def\doFLOWtlabel#1#2#3% + {\scratchdimen\ifcase#2 \zeropoint\else\@@FLOWdy\fi + \setbox0\hbox{\hskip\dimen2\raise\scratchdimen + \hbox{\raise\dimen4\hbox{#1{\strut#3}}}}% + \positionFLOWzero}% + +\def\doFLOWblabel#1#2#3% + {\scratchdimen\ifcase#2 \zeropoint\else\@@FLOWdy\fi + \setbox0\hbox{\hskip\dimen2\raise-\scratchdimen + \hbox{#1{\strut#3}}}% + \positionFLOWzero}% + +\def\doFLOWllabel#1#2#3% + {\scratchdimen\ifcase#2 \zeropoint\else\@@FLOWdx\fi + \setbox0\hbox{\hskip-\scratchdimen\raise\dimen6 + \hbox{#1{\strut#3}}}% + \positionFLOWzero}% + +\def\doFLOWrlabel#1#2#3% + {\scratchdimen\ifcase#2 \zeropoint\else\@@FLOWdx\fi + \setbox0\hbox{\hskip\dimen0\hskip\scratchdimen + \hbox{\raise\dimen6\hbox{#1{\strut#3}}}}% + \positionFLOWzero} + +\def\doprocessFLOWcellD#1,#2\end + {\dophaseoneFLOWcellX{#1}{#2}% + \ifdone + \dophasetwoFLOWcellX \doglobal\addtocommalist\FLOWcell\FLOWcells - \advance\!!counta -\@@FLOWx\advance\!!counta \plusone - \advance\!!countb -\@@FLOWy\advance\!!countb \plusone - \dimen0=\FLOWgridwidth\dimen0=\!!counta\dimen0 - \advance\dimen0 -\FLOWgridwidth - \dimen4=\FLOWgridwidth\advance\dimen4 -\FLOWshapewidth - \advance\dimen0 .5\dimen4 - \dimen2=\FLOWgridheight\dimen2=\!!countb\dimen2 - \dimen4=\FLOWgridheight\advance\dimen4 -\FLOWshapeheight - \advance\dimen2 -.5\dimen4 - \setbox0=\hbox + \setbox0\hbox {\ifx\FLOWalign\empty\else \setupframed - [\c!uitlijnen=\v!normaal,\c!onder=\vfill,\c!boven=\vfill]% + [\c!align=\v!normal,\c!bottom=\vfill,\c!top=\vfill]% \@EA\processallactionsinset\@EA [\FLOWalign] - [t=>{\setupframed[\c!onder=\vfill,\c!boven=]}, - b=>{\setupframed[\c!onder=,\c!boven=\vfill]}, - l=>{\setupframed[\c!uitlijnen=\v!rechts]}, - r=>{\setupframed[\c!uitlijnen=\v!links]}, - m=>{\setupframed[\c!uitlijnen=\v!midden]}, - c=>{\setupframed[\c!uitlijnen=\v!midden]}]% + [t=>{\setupframed[\c!bottom=\vfill,\c!top=]}, + b=>{\setupframed[\c!bottom=,\c!top=\vfill]}, + l=>{\setupframed[\c!align=\v!right]}, + r=>{\setupframed[\c!align=\v!left]}, + m=>{\setupframed[\c!align=\v!middle]}, + c=>{\setupframed[\c!align=\v!middle]}]% \fi - \doifelse\FLOWshape{none} % {\v!geen} + \doifelse\FLOWshape{none} % {\v!none} {\setupframed[\c!offset=\v!overlay]} %{\setupframed[\c!offset=.5\bodyfontsize]}% {\setupframed[\c!offset=\@@FLOSoffset]}% \framed - [\c!kader=\v!uit, - \c!breedte=\FLOWshapewidth,\c!hoogte=\FLOWshapeheight] + [\c!frame=\v!off, + \c!width=\FLOWshapewidth,\c!height=\FLOWshapeheight] {\FLOWtext}}% - \showFLOWhelp0 - \ifx\FLOWdestination\empty\else - \setbox0=\hbox - {\setupinteraction[\c!kleur=,\c!contrastkleur=]% - \naarbox{\box0}[\FLOWdestination]}% - \fi - \edef\FLOWdx{\the\dimen0}% - \edef\FLOWdy{\the\dimen2}% - \def\positionFLOWzero% assumes \FLOWdx and \FLOWdy are set - {\setbox0=\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}% - \smashbox0\box0}% - \def\doFLOWtlabel##1##2##3% - {\scratchdimen=\ifcase##2 \!!zeropoint\else\@@FLOWdy\fi - \setbox0=\hbox{\hskip\dimen2\raise\scratchdimen - \hbox{\raise\dimen4\hbox{##1{\strut##3}}}}% - \positionFLOWzero}% - \def\doFLOWblabel##1##2##3% - {\scratchdimen=\ifcase##2 \zeropoint\else\@@FLOWdy\fi - \setbox0=\hbox{\hskip\dimen2\raise-\scratchdimen - \hbox{##1{\strut##3}}}% - \positionFLOWzero}% - \def\doFLOWllabel##1##2##3% - {\scratchdimen=\ifcase##2 \zeropoint\else\@@FLOWdx\fi - \setbox0=\hbox{\hskip-\scratchdimen\raise\dimen6 - \hbox{##1{\strut##3}}}% - \positionFLOWzero}% - \def\doFLOWrlabel##1##2##3% - {\scratchdimen=\ifcase##2 \zeropoint\else\@@FLOWdx\fi - \setbox0=\hbox{\hskip\dimen0\hskip\scratchdimen - \hbox{\raise\dimen6\hbox{##1{\strut##3}}}}% - \positionFLOWzero}% + \showFLOWhelp0 + \ifx\FLOWdestination\empty\else + \setbox0\hbox + {\setupinteraction[\c!color=,\c!contrastcolor=]% + \gotobox{\box0}[\FLOWdestination]}% + \fi \positionFLOWzero \dimen0=\FLOWshapewidth \dimen2=.5\dimen0 \dimen4=\FLOWshapeheight\dimen6=.5\dimen4 @@ -904,7 +934,7 @@ \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} + \fi} % Pass E @@ -914,55 +944,141 @@ \let\doprocessFLOWcell\doprocessFLOWcellE \expandafter\doprocessFLOWcell\FLOWlocation\end} -\def\doprocessFLOWcellE#1,#2\end % redundant - {\ifx\FLOWoverlay\empty \else - \!!counta=#1\relax - \!!countb=#2\relax - \!!countc=\@@FLOWx - \!!countd=\@@FLOWy +\def\dophaseoneFLOWcellX#1#2% + {\!!counta#1\relax + \!!countb#2\relax + \!!countc\@@FLOWx + \!!countd\@@FLOWy \advance\!!countc \@@FLOWnx \advance\!!countd \@@FLOWny \advance\!!countc \minusone \advance\!!countd \minusone - \ifnum\!!counta<\@@FLOWx\relax - \donefalse - \else\ifnum\!!counta>\!!countc - \donefalse - \else\ifnum\!!countb<\@@FLOWy\relax - \donefalse - \else\ifnum\!!countb>\!!countd - \donefalse - \else - \donetrue - \fi\fi\fi\fi + \ifnum\!!counta<\@@FLOWx\relax \donefalse + \else\ifnum\!!counta>\!!countc \donefalse + \else\ifnum\!!countb<\@@FLOWy\relax \donefalse + \else\ifnum\!!countb>\!!countd \donefalse + \else \donetrue + \fi\fi\fi\fi} + +\def\dophasetwoFLOWcellX + {\advance\!!counta -\@@FLOWx + \advance\!!counta \plusone + \advance\!!countb -\@@FLOWy + \advance\!!countb \plusone + \dimen0=\FLOWgridwidth + \dimen0=\!!counta\dimen0 + \advance\dimen0 -\FLOWgridwidth + \dimen4=\FLOWgridwidth + \advance\dimen4 -\FLOWshapewidth + \advance\dimen0 .5\dimen4 + \dimen2=\FLOWgridheight + \dimen2=\!!countb\dimen2 + \dimen4=\FLOWgridheight + \advance\dimen4 -\FLOWshapeheight + \advance\dimen2 -.5\dimen4 + \edef\FLOWdx{\the\dimen0}% + \edef\FLOWdy{\the\dimen2}} + +\def\positionFLOWzero% assumes \FLOWdx and \FLOWdy are set + {\setbox0\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}% + \smashbox0\box0 + \nointerlineskip}% + +\def\doFLOWtlabel#1#2#3% + {\scratchdimen\ifcase#2 \zeropoint\else\@@FLOWdy\fi + \setbox0\hbox{\hskip\dimen2\raise\scratchdimen + \hbox{\raise\dimen4\hbox{#1{\strut#3}}}}% + \positionFLOWzero}% + +\def\doFLOWblabel#1#2#3% + {\scratchdimen\ifcase#2 \zeropoint\else\@@FLOWdy\fi + \setbox0\hbox{\hskip\dimen2\raise-\scratchdimen + \hbox{#1{\strut#3}}}% + \positionFLOWzero}% + +\def\doFLOWllabel#1#2#3% + {\scratchdimen\ifcase#2 \zeropoint\else\@@FLOWdx\fi + \setbox0\hbox{\hskip-\scratchdimen\raise\dimen6 + \hbox{#1{\strut#3}}}% + \positionFLOWzero}% + +\def\doFLOWrlabel#1#2#3% + {\scratchdimen\ifcase#2 \zeropoint\else\@@FLOWdx\fi + \setbox0\hbox{\hskip\dimen0\hskip\scratchdimen + \hbox{\raise\dimen6\hbox{#1{\strut#3}}}}% + \positionFLOWzero} + +\def\doprocessFLOWcellD#1,#2\end + {\dophaseoneFLOWcellX{#1}{#2}% \ifdone - \advance\!!counta -\@@FLOWx\advance\!!counta \plusone - \advance\!!countb -\@@FLOWy\advance\!!countb \plusone - \dimen0=\FLOWgridwidth\dimen0=\!!counta\dimen0 - \advance\dimen0 -\FLOWgridwidth - \dimen4=\FLOWgridwidth\advance\dimen4 -\FLOWshapewidth - \advance\dimen0 .5\dimen4 - \dimen2=\FLOWgridheight\dimen2=\!!countb\dimen2 - \dimen4=\FLOWgridheight\advance\dimen4 -\FLOWshapeheight - \advance\dimen2 -.5\dimen4 - \edef\FLOWdx{\the\dimen0}% - \edef\FLOWdy{\the\dimen2}% - \setbox0=\hbox - {\framed - [\c!kader=\v!uit, - \c!achtergrond={\@@FLOWachtergrond,\FLOWoverlay}, - \c!achtergrondkleur=\@@FLOSachtergrondkleur, - \c!breedte=\FLOWshapewidth,\c!hoogte=\FLOWshapeheight] - {}}% - \setbox0=\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}% - \smashbox0 - \box0 - \fi - \fi} + \dophasetwoFLOWcellX + \doglobal\addtocommalist\FLOWcell\FLOWcells + \setbox0\hbox + {\ifx\FLOWalign\empty\else + \setupframed + [\c!align=\v!normal,\c!bottom=\vfill,\c!top=\vfill]% + \@EA\processallactionsinset\@EA + [\FLOWalign] + [t=>{\setupframed[\c!bottom=\vfill,\c!top=]}, + b=>{\setupframed[\c!bottom=,\c!top=\vfill]}, + l=>{\setupframed[\c!align=\v!right]}, + r=>{\setupframed[\c!align=\v!left]}, + m=>{\setupframed[\c!align=\v!middle]}, + c=>{\setupframed[\c!align=\v!middle]}]% + \fi + \doifelse\FLOWshape{none} % {\v!none} + {\setupframed[\c!offset=\v!overlay]} + %{\setupframed[\c!offset=.5\bodyfontsize]}% + {\setupframed[\c!offset=\@@FLOSoffset]}% + \framed + [\c!frame=\v!off, + \c!width=\FLOWshapewidth,\c!height=\FLOWshapeheight] + {\FLOWtext}}% + \showFLOWhelp0 + \ifx\FLOWdestination\empty\else + \setbox0\hbox + {\setupinteraction[\c!color=,\c!contrastcolor=]% + \gotobox{\box0}[\FLOWdestination]}% + \fi + \positionFLOWzero + \dimen0=\FLOWshapewidth \dimen2=.5\dimen0 + \dimen4=\FLOWshapeheight\dimen6=.5\dimen4 + \boxoffset=.5\bodyfontsize + \doFLOWtlabel \righttopbox0\tFLOWlabel + \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 + \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} + +\def\doprocessFLOWcellE#1,#2\end % redundant + {\ifx\FLOWoverlay\empty \else + \dophaseoneFLOWcellX{#1}{#2}% + \ifdone + \dophasetwoFLOWcellX + \edef\FLOWdx{\the\dimen0}% + \edef\FLOWdy{\the\dimen2}% + \setbox0\hbox + {\framed + [%\c!frame=\v!off, + \c!background={\@@FLOWbackground,\FLOWoverlay}, + \c!backgroundcolor=\@@FLOSbackgroundcolor, + \c!width=\FLOWshapewidth,\c!height=\FLOWshapeheight] + {}}% + \positionFLOWzero + \fi + \fi} % Pass F -\def\checkFLOWautofocus% +\def\checkFLOWautofocus {\def\@@FLOWminx{100}\let\@@FLOWminy\@@FLOWminx \def\@@FLOWmaxx {0}\let\@@FLOWmaxy\@@FLOWmaxx \def\@@FLOWabsx {0}\let\@@FLOWabsy\@@FLOWabsx @@ -1055,7 +1171,7 @@ {\setbox#1=\hbox {\setbox\scratchbox=\hbox{\lower\@@FLOWdy\hbox {\helpbutton - [\c!breedte=\wd0,\c!kleur=,\c!hoogte=\@@FLOWdy,\c!kader=\v!nee]% + [\c!width=\wd0,\c!color=,\c!height=\@@FLOWdy,\c!frame=\v!no]% [\FLOWhelp]}}% \smashbox\scratchbox \setbox#1=\vbox @@ -1088,9 +1204,9 @@ \setupFLOWsplit% [\c!nx=3,\c!ny=3, \c!dx=1,\c!dy=1, - \c!commando=, - \c!markering=\v!aan, - \c!voor=,\c!na=] + \c!command=, + \c!marking=\v!on, + \c!before=,\c!after=] \def\FLOWsplitx {1} \def\FLOWsplity {1} @@ -1102,9 +1218,9 @@ %D While splitting, the following variables are available: %D -%D \starttypen +%D \starttyping %D \FLOWsplitnx \FLOWsplitny \FLOWsplitx \FLOWsplity -%D \stoptypen +%D \stoptyping \def\doFLOWcharts[#1][#2]% {\bgroup @@ -1150,35 +1266,35 @@ \def\dododoFLOWcharts[#1][#2]% {\bgroup - \@@FLOTvoor - \doifnot\@@FLOTmarkering\v!aan{\let\cuthbox\hbox}% + \@@FLOTbefore + \doifnot\@@FLOTmarking\v!on{\let\cuthbox\hbox}% \cuthbox - {\@@FLOTcommando + {\@@FLOTcommand {\FLOWchart[#1][#2, \c!x=\@@FLOTx,\c!nx=\@@FLOTnx, \c!y=\@@FLOTy,\c!ny=\@@FLOTny]}}% - \@@FLOTna + \@@FLOTafter \egroup} %D An example of splitting is given below: %D -%D \starttypen +%D \starttyping %D \setupFLOWsplit %D [nx=5,ny=10, %D dx=0,dy=0, %D before=, -%D after=\pagina] +%D after=\page] %D %D \FLOWcharts[mybigflow] -%D \stoptypen +%D \stoptyping %D %D Or, one can say: %D -%D \starttypen -%D \splitsplaatsblok -%D {\plaatsfiguur{What a big flowchart this is!}} +%D \starttyping +%D \splitfloat +%D {\placefigure{What a big flowchart this is!}} %D {\FLOWcharts[mybigflow]} -%D \stoptypen +%D \stoptyping %D \macros %D {typeFLOWchart} @@ -1198,7 +1314,7 @@ %D New: %D -%D \starttypen +%D \starttyping %D \setupFLOWcharts[command=\Whow] %D %D \startFLOWset[convert-en] % [tag][convert-en] @@ -1213,13 +1329,13 @@ %D \FLOWset[convert-en] % [tag] %D %D \def\Whow#1% -%D {\setuphead[status=hoog] +%D {\setuphead[state=high] %D \startstandardmakeup %D \centerbox{#1} %D \stopstandardmakeup} %D %D \FLOWset[convert-en] % [tag] -%D \stoptypen +%D \stoptyping \def\startFLOWset {\dodoubleempty\dostartFLOWset} @@ -1247,7 +1363,7 @@ \def\dodohandleFLOWset#1#2#3#4% tag subtag name settings {\increment\currentFLOWset \bgroup - \@@FLOXcommando + \@@FLOXcommand {\ifnum\currentFLOWset=1 \pagereference[#1]\fi \doifsomething{#2} {\setupreferencing[\c!prefix=]% @@ -1265,7 +1381,7 @@ \newcounter\currentFLOWset \setupFLOWsets - [\c!commando=] + [\c!command=] %D This will be an option: diff --git a/tex/context/base/m-cweb.tex b/tex/context/base/m-cweb.tex index 57b1ab8b9..65184ddae 100644 --- a/tex/context/base/m-cweb.tex +++ b/tex/context/base/m-cweb.tex @@ -71,10 +71,10 @@ %D Instead of using \type{\def} and \type{\let} for defining %D macros, we use: %D -%D \starttypen +%D \starttyping %D \defCEBmacro arguments {meaning} %D \letCEBmacro arguments {meaning} -%D \stoptypen +%D \stoptyping %D %D \CWEB files contain implicit calls to macros that generate %D the table of contents, the lists of sections and the index. @@ -83,9 +83,9 @@ %D ones. The next macro is used for defining these obsolete %D \CWEB\ macros. The dummies take care of arguments. %D -%D \starttypen +%D \starttyping %D \defCEBdummy arguments {meaning} -%D \stoptypen +%D \stoptyping %D %D The list of \CWEB\ specific macro names is saved in a %D \TOKENLIST. This serves two purposes. First it enables us to @@ -98,10 +98,10 @@ %D Activating and deactivating is done by means of: %D -%D \starttypen +%D \starttyping %D \activateCWEB %D \deactivateCWEB -%D \stoptypen +%D \stoptyping %D %D Which are implemented as: @@ -300,7 +300,7 @@ %D \CWEBquote at sign for control text (not needed in versions %D $>=$ 2.9). -\defCWEBmacro\AT{@} +\defCWEBmacro\AT{@} %D \macros{ATL,postATL,NOATL}{} %D @@ -638,10 +638,10 @@ \unprotect -\def\theCWEByskip {\blanko[\v!klein]} -\def\theCWEBvskip {\blanko[\v!groot]} +\def\theCWEByskip {\blank[\v!small]} +\def\theCWEBvskip {\blank[\v!big]} -\protect +\protect \defCWEBmacro\Y% {\par @@ -1043,7 +1043,7 @@ \def\[####1]{####1}% \xdef\CWEBreference{##1}% \egroup - \CWEBcomma{\localcolortrue\naar{\donottest{##1}}[web:\CWEBreference]}}% + \CWEBcomma{\localcolortrue\goto{\donottest{##1}}[web:\CWEBreference]}}% \processlist{(}{)}{,}\docommando(#1) \egroup} @@ -1056,13 +1056,13 @@ \def\next##1\ET##2##3.% {\processCWEBsectionnumbers[##1]% \if##2s% - {, and~\naar{##3}[web:##3]}% + {, and~\goto{##3}[web:##3]}% \else - { and~\naar{##2##3}[web:##2##3]}% + { and~\goto{##2##3}[web:##2##3]}% \fi}% \next#1.% \else - \naar{#1}[web:#1]% + \goto{#1}[web:#1]% \fi \afterCWEBnote % inside group! \egroup} @@ -1101,10 +1101,10 @@ \defCWEBmacro\X#1:#2\X% {\newCWEBmacroX#1:#2\X} -\definieermarkering[CWEBfilename] -\definieermarkering[CWEBsectiontitle] -\definieermarkering[CWEBsectionnumber] -\definieermarkering[CWEBsectiondepth] +\definemarking[CWEBfilename] +\definemarking[CWEBsectiontitle] +\definemarking[CWEBsectionnumber] +\definemarking[CWEBsectiondepth] \defCWEBmacro\M#1% {\MN{#1}% @@ -1167,21 +1167,21 @@ {\linktoCWEBfiletrue \def\otherCWEBfile{#1}} -\unprotect +\unprotect \def\gotoCWEBsection#1[#2]% {\iflinktoCWEBfile \bgroup - \setupinteraction[\c!kleur=,\c!letter=]% + \setupinteraction[\c!color=,\c!style=]% \let\savedreferenceprefix=\referenceprefix \localcolortrue - \naar{#1}[\otherCWEBfile::\savedreferenceprefix web:#2]% + \goto{#1}[\otherCWEBfile::\savedreferenceprefix web:#2]% \egroup \else #1% \fi} -\protect +\protect \defCWEBmacro\startsection% {\rightskip=0pt % get out of C mode (cf. \B) @@ -1259,8 +1259,8 @@ \showCWEBindexentry{\currentCWEBindexentry}}}% \egroup} -\def\theCWEBbeforeindex {\startkolommen} -\def\theCWEBafterindex {\stopkolommen} +\def\theCWEBbeforeindex {\startcolumns} +\def\theCWEBafterindex {\stopcolumns} \def\processCWEBindex #1 % {\bgroup @@ -1355,11 +1355,11 @@ \line{\consetup{#2}#1 \rm \leaders\hbox to .5em{.\hfil}\hfil\ - {\localcolortrue\naar{#3}[web:#3]}% below: \gotorealpage ? should be changed + {\localcolortrue\goto{#3}[web:#3]}% below: \gotorealpage ? should be changed \hbox to3em{\localcolortrue\hss\gotorealpage{}{}{#5}{\translatednumber[#4]\presetgoto}}}} %D A last hack, needed because a file can overload of the -%D above. (Some day: a check like \ifx#1\CWEBdefined.) +%D above. (Some day: a check like \type{\ifx#1\CWEBdefined}.) \def\outer#1#2% {\ifx#2\undefined diff --git a/tex/context/base/m-edtsnc.tex b/tex/context/base/m-edtsnc.tex new file mode 100644 index 000000000..d3a697b25 --- /dev/null +++ b/tex/context/base/m-edtsnc.tex @@ -0,0 +1,207 @@ +%D \module +%D [ file=m-editsnc, +%D version=2003.12.23, +%D title=\CONTEXT\ Modules, +%D subtitle=Editor Synchronization +%D author={Hans Hagen \& Ton Otten}, +%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.edit for +%C details. + +% \enablemode[demo] + +% This file is a variation of the file m-pdfsync. This time we do it +% in a more abstract way and prepare ourselves for support in dvi +% output. + +% \enableeditsync +% \disableeditsync +% \editsync +% \editsynctext {string} +% \editsyncnode {char} +% \editsynctracemode [chardef: 0-4] + +\writestatus{editsync}{loading and enabling editor synchronization support} + +\unprotect % not really needed + +\ifx\pdfoutput\undefined + \donefalse +\else\ifcase\pdfoutput + \donefalse +\else\ifx\pdfsavepos\undefined + \donefalse +\else + \donetrue +\fi\fi\fi + +\chardef \editsyncstate \zerocount +\chardef \editsynctracemode \zerocount +\newcount \editsynccounter +\newwrite \editsyncwrite + +\def\enableeditsync {\chardef\editsyncstate\plusone} +\def\disableeditsync{\chardef\editsyncstate\zerocount} + +% The following definitions can go into the special drivers, but +% for the moment we do it this way. + +\ifdone + + \def\dostarteditsync + {\immediate\openout\editsyncwrite\jobname.pdfsync + \immediate\write\editsyncwrite{\jobname}% + \immediate\write\editsyncwrite{version 0}} + + \def\dostopeditsync + {\closeout\editsyncwrite} + + \def\doeditsyncregisterpage#1{\immediate\write\editsyncwrite{s\space\number#1}} + \def\doeditsyncopenfile #1{\immediate\write\editsyncwrite{(\space#1}} + \def\doeditsyncclosefile #1{\immediate\write\editsyncwrite{)}} + + \def\doregistereditsyncnode#1#2#3% tag counter linenumber + {\pdfsavepos + \immediate\write\editsyncwrite{l\space\number#2\space\number#3}% + \expanded{\write\editsyncwrite{p\ifnum#1=\plusone*\fi\space\number#2\space\noexpand\the\pdflastxpos\space\noexpand\the\pdflastypos}}} + +\else + + \let\dostarteditsync \relax + \let\dostopeditsync \relax + + \let\doeditsyncregisterpage\gobbleoneargument + \let\doeditsyncopenfile \gobbleoneargument + \let\doeditsyncclosefile \gobbleoneargument + \let\doregistereditsyncnode\gobblethreearguments + + % These specials could be filtered by a dvitopdf backend and + % written to a jobname.pdfsync file. In that case, the x and + % y coordinates have to be to be resolved by driver. + + % \def\doeditsyncregisterpage#1{\special{pdfsync: s\space\number#1}} + % \def\doeditsyncopenfile #1{\special{pdfsync: ( #1}} + % \def\doeditsyncclosefile #1{\special{pdfsync: )}} + + % \def\doregistereditsyncnode#1#2#3% + % {\special{pdfsync: l the\editsynccounter\space\number#3}% + % \special{pdfsync: p\ifnum#1=\plusone*\fi\space\number#2}} + +\fi + +\let\editsynctracer\gobbleoneargument + +\editsynccounter\minusone % counting starts at zero and we increment beforehand + +\def\registereditsyncnode#1% we assume #1 is one token + {\ifcase\editsyncstate + \expandafter\gobbleoneargument + \else + \global\advance\editsynccounter\plusone + \doregistereditsyncnode#1\editsynccounter\inputlineno + \expandafter\editsynctracer + \fi} + +\def\editsync {\registereditsyncnode\plusone *} +\def\editsyncnode{\registereditsyncnode\zerocount} +\def\editsynctext{\registereditsyncnode\plusone } + +\appendtoks \dostarteditsync \to \everystarttext +%appendtoks \dostopeditsync \to \everystoptext +\appendtoks \doeditsyncregisterpage\realfolio \to \everyshipout +\appendtoks \doeditsyncopenfile\readfilename \to \everybeforereadfile +\appendtoks \doeditsyncclosefile\readfilename \to \everyafterreadfile + +\appendtoks \enableeditsync \to \everystarttext +\appendtoks \disableeditsync \to \everypagebody + +\def\editsynctracer#1% + {\ifcase\editsynctracemode\else + \begingroup + \forgetall + \disableeditsync + \ifcase\editsynctracemode\or % could be done more efficient, box around ifcase + \setbox\scratchbox\hbox to \zeropoint{\hss\infofont#1\hss}% 1 + \else + \setbox\scratchbox\hbox to \zeropoint{\hss\traceboxplacementtrue\boxcursor\hss}% 2/3/4 + \fi + \smashbox\scratchbox\box\scratchbox + \ifcase\editsynctracemode\or\or\or + \setbox\scratchbox\hbox to \zeropoint{\hss\raise1.25ex\hbox{\infofont#1}\hss}% 3 + \smashbox\scratchbox\box\scratchbox + \or + \setbox\scratchbox\hbox to \zeropoint{\hss\lower1.25ex\hbox{\infofont#1}\hss}% 4 + \smashbox\scratchbox\box\scratchbox + \fi + \endgroup + \fi} + +% \def\editsynctracer#1% more efficient but unreadable +% {\ifcase\editsynctracemode\else +% \ifcase\editsyncstate\else +% \begingroup +% \forgetall +% \disableeditsync +% \setbox\scratchbox\hbox to \zeropoint +% {\hss +% \ifcase\editsynctracemode\or +% \infofont#1% 1 +% \else +% \traceboxplacementtrue\boxcursor% 2/3/4 +% \fi +% \hss}% +% \smashbox\scratchbox\box\scratchbox +% \setbox\scratchbox\hbox to \zeropoint +% {\hss +% \ifcase\editsynctracemode\or\or\or +% \raise1.25ex\hbox{\infofont#1}% 3 +% \or +% \lower1.25ex\hbox{\infofont#1}% 4 +% \fi +% \hss}% +% \smashbox\scratchbox\box\scratchbox +% \endgroup +% \fi +% \fi} + +% beware, adding nodes this way will interfere with the typesetting + +\appendtoks \editsyncnode p\to \everypar +\appendtoks \editsyncnode m\to \everymath +\appendtoks \editsyncnode d\to \everydisplay +\appendtoks \editsyncnode h\to \everyhbox + +% For compatibility with 'pdfsync4context' we provide: + +\let\pdfsyncstart\enableeditsync +\let\pdfsyncstop \disablepdfsync +\let\pdfsync \editsync + +\protect + +\doifnotmode{demo}{\endinput} + +\chardef\editsynctracemode=3 + +\starttext + +\chapter{Test} + +\processfile{tufte} + +\startitemize +\item first +\item second +\stopitemize + +\processfile{tufte} + +\startlines +some local \editsync sync and \editsynctext{here}a marked point +some local \editsync sync and \editsyncnode{here}a marked point +\stoplines + +\stoptext diff --git a/tex/context/base/m-educat.tex b/tex/context/base/m-educat.tex index 0951ee055..38567bf4e 100644 --- a/tex/context/base/m-educat.tex +++ b/tex/context/base/m-educat.tex @@ -58,14 +58,14 @@ \definetextbackground [\v!answerarea] - [\c!plaats=\v!tekst, + [\c!location=\v!text, \c!n=0, - \c!kader=\v!uit, - \c!kaderkleur=answerlinecolor, - \c!lijndikte=2pt, - \c!achtergrond=\v!kleur, - \c!achtergrondkleur=answerareacolor, - \c!variant=2] % betweenline + \c!frame=\v!off, + \c!framecolor=answerlinecolor, + \c!rulethickness=2pt, + \c!background=\v!color, + \c!backgroundcolor=answerareacolor, + \c!alternative=2] % betweenline % n=gedwongen % m=extra auto @@ -80,7 +80,7 @@ {\begingroup \dontcomplain \setupanswerarea - [\c!n=0,\c!m=,#1,\c!plaats=\v!tekst]% + [\c!n=0,\c!m=,#1,\c!location=\v!text]% \doifelsenothing{\backgroundvariable\c!m} {\expandafter\donoanswerspace} {\expandafter\dodoanswerspace}% @@ -88,11 +88,11 @@ \def\donoanswerspace[#1]#2% {\setupthinrules - [\c!variant=\backgroundvariable\c!variant, - \c!kleur=\backgroundvariable\c!kaderkleur, - \c!achtergrond=\backgroundvariable\c!achtergrond, - \c!achtergrondkleur=\backgroundvariable\c!achtergrondkleur, - \c!lijndikte=\backgroundvariable\c!lijndikte]% + [\c!alternative=\backgroundvariable\c!alternative, + \c!color=\backgroundvariable\c!framecolor, + \c!background=\backgroundvariable\c!background, + \c!backgroundcolor=\backgroundvariable\c!backgroundcolor, + \c!rulethickness=\backgroundvariable\c!rulethickness]% \doifelse{\backgroundvariable\c!n}{*} {\thinrule \par} @@ -142,8 +142,8 @@ {\begingroup \dontcomplain \setupanswerarea - [\c!n=0,\c!m=,#1,\c!plaats=\v!tekst]% - \doifnot{\backgroundvariable\c!optie}\v!aansluitend\softbreak + [\c!n=0,\c!m=,#1,\c!location=\v!text]% + \doifnot{\backgroundvariable\c!option}\v!joinedup\softbreak \doifelsenothing{\backgroundvariable\c!m} {\expandafter\donostartanswerlines} {\expandafter\dodostartanswerlines}% @@ -151,11 +151,11 @@ \def\donostartanswerlines[#1]% {\setupthinrules - [\c!variant=\backgroundvariable\c!variant, - \c!kleur=\backgroundvariable\c!kaderkleur, - \c!achtergrond=\backgroundvariable\c!achtergrond, - \c!achtergrondkleur=\backgroundvariable\c!achtergrondkleur, - \c!lijndikte=\backgroundvariable\c!lijndikte]% + [\c!alternative=\backgroundvariable\c!alternative, + \c!color=\backgroundvariable\c!framecolor, + \c!background=\backgroundvariable\c!background, + \c!backgroundcolor=\backgroundvariable\c!backgroundcolor, + \c!rulethickness=\backgroundvariable\c!rulethickness]% \thinrules[\c!n=\backgroundvariable\c!n]\par \endgroup \grabuntil{\e!stop\e!answerlines}} diff --git a/tex/context/base/m-graph.tex b/tex/context/base/m-graph.tex index 0be24eee2..5e45f255b 100644 --- a/tex/context/base/m-graph.tex +++ b/tex/context/base/m-graph.tex @@ -41,22 +41,22 @@ %D If you run into troubles, try: %D -%D \starttypen +%D \starttyping %D \forceMPTEXgraphictrue -%D \stoptypen +%D \stoptyping %D %D A demo can be run with: %D -%D \starttypen +%D \starttyping %D texexec --mode=demo --pdf m-graph -%D \stoptypen +%D \stoptyping % No longer needed, since John will fix it. % % %D For the moment we need the following patch. Adam T. Lindsay % %D found out that the following code produced an error: % %D -% %D \starttypen +% %D \starttyping % %D \startMPcode % %D draw begingraph(130mm,35mm); % %D setrange(0,0,10,22000); @@ -80,15 +80,15 @@ % %D autogrid(itick.bot,grid.lft) withcolor .75white ; % %D endgraph; % %D \stopMPcode -% %D \stoptypen +% %D \stoptyping % %D % %D The bug is a rather nasty one and needs some tweaking in % %D the low level graph code. John Hobby suggested for the % %D moment to initialize \type {setrange} as follows: % %D -% %D \starttypen +% %D \starttyping % %D setrange(0,0,"22000","22000") -% %D \stoptypen +% %D \stoptyping % %D % %D Folowing this suggesion, I provide the following % %D extension: diff --git a/tex/context/base/m-layout.tex b/tex/context/base/m-layout.tex index 6bc5c8c55..b896d5226 100644 --- a/tex/context/base/m-layout.tex +++ b/tex/context/base/m-layout.tex @@ -28,12 +28,12 @@ {\withoutpt\the\dimexpr(2\paperheight/(\paperwidth/32768))} \def\layouthfheight - {\dimexpr(\layoutparameter\c!hoofd+\layoutparameter\c!hoofdafstand+ - \layoutparameter\c!voet +\layoutparameter\c!voetafstand )} + {\dimexpr(\layoutparameter\c!header+\layoutparameter\c!headerdistance+ + \layoutparameter\c!footer +\layoutparameter\c!footerdistance )} \startsetups[preset-1] - \xdef\layoutwidth {\dimexpr(\layoutparameter\c!breedte)} + \xdef\layoutwidth {\dimexpr(\layoutparameter\c!width)} \gdef\layoutheight{\dimexpr(\layouthwratio\dimexpr(\layoutwidth)+\layouthfheight)} \stopsetups @@ -41,56 +41,56 @@ \definelayout [preset-1-1] [\c!preset=preset-1, - \c!rugwit=\dimexpr((\paperwidth-\layoutwidth)/2), - \c!breedte=\dimexpr(2\paperwidth/3), - \c!snijwit=\dimexpr((\paperwidth-\layoutwidth)/2), - \c!marge=\dimexpr((\paperwidth-\layoutwidth)/3), - \c!hoofd=2\lineheight, - \c!hoofdafstand=\lineheight, - \c!hoogte=\v!midden, % \layoutheight - \c!voetafstand=\layoutparameter\c!hoofdafstand, % \lineheight, - \c!voet=\layoutparameter\c!hoofd, % 2\lineheight, - \c!kopwit=\dimexpr(1\dimexpr(\paperheight-(\layoutheight+\layouthfheight))/3), - \c!bodemwit=\dimexpr(2\dimexpr(\paperheight-(\layoutheight+\layouthfheight))/3)] + \c!backspace=\dimexpr((\paperwidth-\layoutwidth)/2), + \c!width=\dimexpr(2\paperwidth/3), + \c!cutspace=\dimexpr((\paperwidth-\layoutwidth)/2), + \c!margin=\dimexpr((\paperwidth-\layoutwidth)/3), + \c!header=2\lineheight, + \c!headerdistance=\lineheight, + \c!height=\v!middle, % \layoutheight + \c!footerdistance=\layoutparameter\c!headerdistance, % \lineheight, + \c!footer=\layoutparameter\c!header, % 2\lineheight, + \c!topspace=\dimexpr(1\dimexpr(\paperheight-(\layoutheight+\layouthfheight))/3), + \c!bottomspace=\dimexpr(2\dimexpr(\paperheight-(\layoutheight+\layouthfheight))/3)] \startsetups[preset-2] - \gdef\layouthstep{\dimexpr(\paperwidth /\layoutparameter\c!kolommen)} - \gdef\layoutvstep{\dimexpr(\paperheight/\layoutparameter\c!kolommen)} + \gdef\layouthstep{\dimexpr(\paperwidth /\layoutparameter\c!columns)} + \gdef\layoutvstep{\dimexpr(\paperheight/\layoutparameter\c!columns)} \stopsetups \definelayout [preset-2-1] [\c!preset=preset-2, - \c!kolommen=12, - \c!rugwit=\layouthstep, - \c!breedte=\v!midden, - \c!snijwit=2\layouthstep, - \c!marge=\layouthstep, - \c!hoofd=2\lineheight, - \c!hoofdafstand=\lineheight, - \c!hoogte=\v!midden, % \layoutheight - \c!voetafstand=\layoutparameter\c!hoofdafstand, - \c!voet=\layoutparameter\c!hoofd, - \c!kopwit=\dimexpr(\layoutvstep-\layoutparameter\c!hoofd-\layoutparameter\c!hoofdafstand), - \c!bodemwit=\dimexpr(2\layoutvstep-\layoutparameter\c!hoofd-\layoutparameter\c!hoofdafstand)] + \c!columns=12, + \c!backspace=\layouthstep, + \c!width=\v!middle, + \c!cutspace=2\layouthstep, + \c!margin=\layouthstep, + \c!header=2\lineheight, + \c!headerdistance=\lineheight, + \c!height=\v!middle, % \layoutheight + \c!footerdistance=\layoutparameter\c!headerdistance, + \c!footer=\layoutparameter\c!header, + \c!topspace=\dimexpr(\layoutvstep-\layoutparameter\c!header-\layoutparameter\c!headerdistance), + \c!bottomspace=\dimexpr(2\layoutvstep-\layoutparameter\c!header-\layoutparameter\c!headerdistance)] \definelayout [preset-2-2] [\c!preset=preset-2, - \c!kolommen=12, - \c!rugwit=\layouthstep, - \c!breedte=\v!midden, - \c!snijwit=2\layouthstep, - \c!marge=\layouthstep, - \c!hoofd=2\lineheight, - \c!hoofdafstand=\lineheight, - \c!hoogte=\v!midden, % \layoutheight - \c!voetafstand=\layoutparameter\c!hoofdafstand, - \c!voet=\layoutparameter\c!hoofd, - \c!kopwit=\layoutvstep, - \c!bodemwit=\layoutvstep] % maybe 1.5 + \c!columns=12, + \c!backspace=\layouthstep, + \c!width=\v!middle, + \c!cutspace=2\layouthstep, + \c!margin=\layouthstep, + \c!header=2\lineheight, + \c!headerdistance=\lineheight, + \c!height=\v!middle, % \layoutheight + \c!footerdistance=\layoutparameter\c!headerdistance, + \c!footer=\layoutparameter\c!header, + \c!topspace=\layoutvstep, + \c!bottomspace=\layoutvstep] % maybe 1.5 % \setuplayout[preset-1-1] test \showframe \page % \setuplayout[preset-1-1][width=65\averagecharwidth] \setuplayout[preset-1-1] test \showframe \page @@ -99,4 +99,4 @@ % \setuplayout[preset-2-2] test \showframe \page % \setuplayout[preset-2-2][columns=10] \setuplayout[preset-2-2] test \showframe \page -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/m-newmat.tex b/tex/context/base/m-newmat.tex index 8179af432..6f5f3586a 100644 --- a/tex/context/base/m-newmat.tex +++ b/tex/context/base/m-newmat.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Taco Hoekwater}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See licen-en.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See licen-en.pdf for +%C details. %D This module collects macros that \TEX\ users kind of expect %D to be available when typesetting math. Most of them @@ -17,73 +17,73 @@ %D freedom to adapt them to \CONTEXT. This module is derived %D from the \type {m-math} module by Taco Hoekwater (partially %D derived from AMS math modules) and adapted|/|extended by -%D Hans Hagen. +%D Hans Hagen. %D Here we will add code on demand. So, just let us know what -%D should go in here. +%D should go in here. %M \usemodule[newmat] -\unprotect +\unprotect -%D \macros +%D \macros %D {qedsymbol} -%D +%D %D [HH] The general Quod Erat Domonstrandum symbol is defined %D in such a way that we can configure it. Because this symbol %D is also used in text mode, we make it a normal text symbol -%D with special behavior. +%D with special behavior. \def\qedsymbol#1% - {\ifhmode + {\ifhmode \unskip~\hfill#1\par - \else\ifmmode + \else\ifmmode \eqno#1\relax % Do we really need the \eqno here? \else \leavevmode\hbox{}\hfill#1\par \fi\fi} -\definesymbol [qed] [\qedsymbol{\mathematics{\square}}] +\definesymbol [qed] [\qedsymbol{\mathematics{\square}}] %D \macros %D {QED} -%D +%D %D [HH] For compatbility reasons we also provide the \type %D {\QED} command. In case this command is overloaded, we still -%D have the symbol available. \symbol[qed] +%D have the symbol available. \symbol[qed] \def\QED{\symbol[qed]} %D \macros %D {genfrac} -%D +%D %D [TH] The definition of \type {\genfrac} \& co. is not %D trivial, because it allows some flexibility. This is %D supposed to be a user||level command, but will fail quite %D desparately if called outside math mode (\CONTEXT\ redefines -%D \type {\over}) -%D -%D [HH] We clean up this macro a bit and (try) to make it -%D understandable. The expansion is needed for generating -%D the second argument to \type {\dogenfrac}, which is to -%D be a control sequence like \type {\over}. +%D \type {\over}) +%D +%D [HH] We clean up this macro a bit and (try) to make it +%D understandable. The expansion is needed for generating +%D the second argument to \type {\dogenfrac}, which is to +%D be a control sequence like \type {\over}. \unexpanded\def\genfrac#1#2#3#4% {\edef\!!stringa {#1#2}% \expanded - {\dogenfrac{#4}% + {\dogenfrac{#4}% \csname \ifx @#3@% - \ifx\!!stringa\empty + \ifx\!!stringa\empty \strippedcsname\normalover - \else + \else \strippedcsname\normaloverwithdelims \fi - \else - \ifx\!!stringa\empty + \else + \ifx\!!stringa\empty \strippedcsname\normalabove - \else + \else \strippedcsname\normalabovewithdelims \fi \fi @@ -115,84 +115,84 @@ %D Better: -\def\frac#1#2{\mathematics{\genfrac{}{}{}\donothing{#1}{#2}}} +\unexpanded\def\frac#1#2{\mathematics{\genfrac{}{}{}\donothing{#1}{#2}}} -%D [HH] This shows up as: +%D [HH] This shows up as: %D %D \startbuffer %D $\dfrac {1}{2} \tfrac {1}{2} \frac {1}{2}$ %D $\dbinom{1}{2} \tbinom{1}{2} \binom{1}{2}$ %D \stopbuffer -%D +%D %D \typebuffer -%D +%D %D \getbuffer %D \macros %D {text} -%D +%D %D [TH] \type {\text} is a command to typeset more or less %D ordinary text inside of super- and sub|-|scripts. It has to %D do a full font switch to get the sides right, so it will be %D quite slow. \type {\text} kind of replaces \CONTEXT's \type -%D {\mathstyle} command. +%D {\mathstyle} command. -%D [HH] This macro is now also moved to the core, but we -%D keep it here as well for completeness. -%D -%D \startypen +%D [HH] This macro is now also moved to the core, but we +%D keep it here as well for completeness. +%D +%D \starttyping %D \unexpanded\def\mathtext %D {\mathortext\domathtext\hbox} % {\ifmmode\@EA\dotext\else\@EA\hbox\fi} -%D +%D %D \def\domathtext#1% %D {\mathchoice %D {\dodomathtext\displaystyle\textface {#1}}% %D {\dodomathtext\textstyle \textface {#1}}% %D {\dodomathtext\textstyle \scriptface {#1}}% %D {\dodomathtext\textstyle \scriptscriptface{#1}}} -%D +%D %D \def\dodomathtext#1#2#3% no \everymath ! %D %{\hbox{\everymath{#1}\switchtobodyfont [#2]#3}} % 15 sec %D {\hbox{\everymath{#1}\setcurrentfontbody{#2}#3}} % 3 sec (no math) -%D \stoptypen +%D \stoptyping -%D [HH] We use the following indirectness because \type {\text} -%D is a natural candidate for user macros (actually, it is -%D used in some modules). +%D [HH] We use the following indirectness because \type {\text} +%D is a natural candidate for user macros (actually, it is +%D used in some modules). %D -%D \starttypen -%D \let\text\mathtext -%D \stoptypen +%D \starttyping +%D \let\text\mathtext +%D \stoptyping -%D [HH] Actually, the font switch is not that slow when -%D typefaces are used. If needed this macro can be sped up. -%D +%D [HH] Actually, the font switch is not that slow when +%D typefaces are used. If needed this macro can be sped up. +%D %D \startbuffer %D ordinary text $x^{\text{extra ordinary text}}$ %D \stopbuffer %D %D \typebuffer -%D +%D %D \getbuffer %D \macros %D {mathhexbox} -%D +%D %D [TH] \type {\mathhexbox} is also user||level (already %D defined in Plain \TEX). It allows to get a math character -%D inserted as if it was a text character. +%D inserted as if it was a text character. \gdef\mathhexbox#1#2#3{\mathtext{$\m@th\mathchar"#1#2#3$}} -%D \macros +%D \macros %D {boxed} %D -%D [HH] Another macro that users expect (slightly adapted): +%D [HH] Another macro that users expect (slightly adapted): \def\boxed% {\ifmmode\expandafter\mframed\else\expandafter\framed\fi} -%D \macros +%D \macros %D {cfrac} %D %D [HH] Now let us see what this one does: @@ -201,9 +201,9 @@ %D $\cfrac{12}{3} \cfrac[l]{12}{3} \cfrac[c]{12}{3} \cfrac[r]{12}{3}$ %D $\cfrac{1}{23} \cfrac[l]{1}{23} \cfrac[c]{1}{23} \cfrac[r]{1}{23}$ %D \stopbuffer -%D -%D \typebuffer -%D +%D +%D \typebuffer +%D %D \getbuffer \definecomplexorsimple\cfrac @@ -218,7 +218,7 @@ {#3}}% \kern-\nulldelimiterspace} -%D [HH] The next alternative is nicer: +%D [HH] The next alternative is nicer: \def\simplecfrac {\docfrac[cc]} \def\complexcfrac[#1]{\docfrac[#1cc]} @@ -231,7 +231,7 @@ {\ifx r#2\hfill\fi#5\ifx l#2\hfill\fi}% \kern-\nulldelimiterspace}} -%D [HH] Now we can align every combination we want: +%D [HH] Now we can align every combination we want: %D %D \startbuffer %D $\cfrac{12}{3} \cfrac[l]{12}{3} \cfrac[c]{12}{3} \cfrac[r]{12}{3}$ @@ -239,19 +239,19 @@ %D $\cfrac[cl]{12}{3} \cfrac[cc]{12}{3} \cfrac[cr]{12}{3}$ %D $\cfrac[lc]{1}{23} \cfrac[cc]{1}{23} \cfrac[rc]{1}{23}$ %D \stopbuffer -%D -%D \typebuffer -%D +%D +%D \typebuffer +%D %D \getbuffer -\protect \endinput +\protect \endinput %D \macros %D {startsubarray,substack,startsmallmatrix} %D -%D [HH] I wonder what these are supposed to do. An example -%D will be inserted later. Contrary to the original we -%D support an optional argument between either \type {{}} or +%D [HH] I wonder what these are supposed to do. An example +%D will be inserted later. Contrary to the original we +%D support an optional argument between either \type {{}} or %D \type {[]}. \def\startsubarray @@ -287,8 +287,8 @@ {\null \,% \vcenter\bgroup - \baselineskip6\ex@ - \lineskip1.5\ex@ + \baselineskip6\ex@ + \lineskip1.5\ex@ \lineskiplimit\lineskip \ialign\bgroup\hfil$\m@th\scriptstyle##$\hfil&&\thickspace\hfil $\m@th\scriptstyle##$\hfil\crcr} @@ -298,4 +298,4 @@ \egroup \,} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/m-pdfsnc.tex b/tex/context/base/m-pdfsnc.tex new file mode 100644 index 000000000..812218427 --- /dev/null +++ b/tex/context/base/m-pdfsnc.tex @@ -0,0 +1,200 @@ +%D \module +%D [ file=m-pdfsnc, +%D version=2003.12.23, +%D title=\CONTEXT\ Modules, +%D subtitle=Editor Synchronization +%D author={Hans Hagen \& Ton Otten}, +%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. + +% \enablemode[demo] + +% This file is a variation of the file pdfsync4context.tex that ships +% with the pdfsync package (used by iTeXMac and TeXShop) by Piero +% D'Ancona and Jérôme Laurens. I made the macros a bit more efficient +% and added some basic tracing options as well as a few more options. +% I made this one while playing a bit with the Mac and TeX). Maybe I'll +% add a bit of support to the kernel in in order to get rid of redundant +% markers. Also, this had better be rewritten in a bit less \pdf +% dependent way so that it can also be supported by dvipdfmx. I could +% write a generic file as well, but since there is already support for +% other packages I'll not do that (now). + +% compatible commands: +% +% \pdfsyncstart \pdfsyncstop \pdfsync +% +% extra commands: +% +% \enablepdfsync \disablepdfsync \pdfsynctext \pdfsyncnode \pdfsynctracemode + +\ifx\pdfoutput\undefined + \donefalse +\else\ifcase\pdfoutput + \donefalse +\else\ifx\pdfsavepos\undefined + \donefalse +\else + \donetrue +\fi\fi\fi + +\chardef \pdfsyncstate \zerocount +\chardef \pdfsynctracemode \zerocount + +\ifdone + + \writestatus{pdfsync}{loading and enabling synchronization support} + +\else + + \writestatus{pdfsync}{synchronization is only available with pdftex} + + \let \pdfsyncstart \relax % brr, not per se symmetrically used, so + \let \pdfsyncstop \relax % enable and disable are better names + \let \pdfsync \relax + + \let \pdfsynctext \gobbleoneargument + \let \pdfsyncnode \gobbleoneargument + + \let \enablepdfsync \pdfsyncstart + \let \disablepdfsync \pdfsyncstop + + \expandafter\endinput +\fi + +\unprotect % not really needed + +\newcount \pdfsynccounter +\newwrite \pdfsyncwrite + +\def\pdfsyncstart{\chardef\pdfsyncstate\plusone} \let\enablepdfsync \pdfsyncstart +\def\pdfsyncstop {\chardef\pdfsyncstate\zerocount} \let\disablepdfsync\pdfsyncstop + +\def\dostartpdfsync + {\immediate\openout\pdfsyncwrite\jobname.pdfsync + \immediate\write\pdfsyncwrite{\jobname}% + \immediate\write\pdfsyncwrite{version 0}} + +\def\dostoppdfsync + {\immediate\closeout\pdfsyncwrite} + +\def\doregisterpdfsyncpage + {\immediate\write\pdfsyncwrite{s\space\realfolio}} + +\def\dopdfsyncopenfile + {\immediate\write\pdfsyncwrite{(\space\readfilename}} + +\def\dopdfsyncclosefile + {\immediate\write\pdfsyncwrite{)}} + +\def\doregisterpdfsyncnode#1% + {\ifcase\pdfsyncstate\else + \pdfsavepos + \immediate\write\pdfsyncwrite{l\space\the\pdfsynccounter\space\the\inputlineno}% + \expanded{\write\pdfsyncwrite{p\ifnum#1=\plusone*\fi\space\the\pdfsynccounter\space\noexpand\the\pdflastxpos\space\noexpand\the\pdflastypos}}% + \global\advance\pdfsynccounter\plusone + \fi} + +\let\pdfsynctracer\gobbleoneargument + +\def\pdfsync {\doregisterpdfsyncnode\plusone \pdfsynctracer*} +\def\pdfsyncnode{\doregisterpdfsyncnode\zerocount\pdfsynctracer} +\def\pdfsynctext{\doregisterpdfsyncnode\plusone \pdfsynctracer} + +\appendtoks \dostartpdfsync \to \everystarttext +%appendtoks \dostoppdfsync \to \everystoptext +\appendtoks \doregisterpdfsyncpage \to \everyshipout +\appendtoks \dopdfsyncopenfile \to \everybeforereadfile +\appendtoks \dopdfsyncclosefile \to \everyafterreadfile + +\appendtoks \enablepdfsync \to \everystarttext +\appendtoks \disablepdfsync \to \everypagebody + +% beware, adding nodes this way will interfere with the typesetting + +\appendtoks \pdfsyncnode p\to \everypar +\appendtoks \pdfsyncnode m\to \everymath +\appendtoks \pdfsyncnode h\to \everyhbox + +% just for fun + +\def\pdfsynctracer#1% + {\ifcase\pdfsynctracemode\else + \ifcase\pdfsyncstate\else + \begingroup + \forgetall + \disablepdfsync + \ifcase\pdfsynctracemode\or % could be done more efficient, box around ifcase + \setbox\scratchbox\hbox to \zeropoint{\hss\infofont#1\hss}% 1 + \else + \setbox\scratchbox\hbox to \zeropoint{\hss\traceboxplacementtrue\boxcursor\hss}% 2/3/4 + \fi + \smashbox\scratchbox\box\scratchbox + \ifcase\pdfsynctracemode\or\or\or + \setbox\scratchbox\hbox to \zeropoint{\hss\raise1.25ex\hbox{\infofont#1}\hss}% 3 + \smashbox\scratchbox\box\scratchbox + \or + \setbox\scratchbox\hbox to \zeropoint{\hss\lower1.25ex\hbox{\infofont#1}\hss}% 4 + \smashbox\scratchbox\box\scratchbox + \fi + \endgroup + \fi + \fi} + +% \def\pdfsynctracer#1% more efficient but unreadable +% {\ifcase\pdfsynctracemode\else +% \ifcase\pdfsyncstate\else +% \begingroup +% \forgetall +% \disablepdfsync +% \setbox\scratchbox\hbox to \zeropoint +% {\hss +% \ifcase\pdfsynctracemode\or +% \infofont#1% 1 +% \else +% \traceboxplacementtrue\boxcursor% 2/3/4 +% \fi +% \hss}% +% \smashbox\scratchbox\box\scratchbox +% \setbox\scratchbox\hbox to \zeropoint +% {\hss +% \ifcase\pdfsynctracemode\or\or\or +% \raise1.25ex\hbox{\infofont#1}% 3 +% \or +% \lower1.25ex\hbox{\infofont#1}% 4 +% \fi +% \hss}% +% \smashbox\scratchbox\box\scratchbox +% \endgroup +% \fi +% \fi} + +\protect + +\doifnotmode{demo}{\endinput} + +\chardef\pdfsynctracemode=3 + +\starttext + +\chapter{Test} + +\processfile{tufte} + +\startitemize +\item first +\item second +\stopitemize + +\processfile{tufte} + +\startlines +some local \pdfsync sync and \pdfsynctext{here}a marked point +some local \pdfsync sync and \pdfsyncnode{here}a marked point +\stoplines + +\stoptext diff --git a/tex/context/base/m-pictex.tex b/tex/context/base/m-pictex.tex index 85ae90118..98c5ddbcd 100644 --- a/tex/context/base/m-pictex.tex +++ b/tex/context/base/m-pictex.tex @@ -70,9 +70,9 @@ %D Therefore we can use \SKIPS\ as \DIMENSIONS. However, some %D incompatibility can result from assignments that look like: %D -%D \starttypen +%D \starttyping %D \somedimen=\someskip -%D \stoptypen +%D \stoptyping %D %D In such cases the \DIMENSION\ equals the fixed part of the %D \SKIP\ or in other words: this assignment strips off the @@ -101,7 +101,7 @@ %D and 71 \SKIPS\ are allocated. Indeed, \PICTEX\ needs 110 %D \DIMENSIONS ! %D -%D \starttypen +%D \starttyping %D \def\newdimen %D {\ifnum\count11>\count12 %D \let\next\temporarynewskip @@ -109,7 +109,7 @@ %D \let\next\temporarynewdimen %D \fi %D \next} -%D \stoptypen +%D \stoptyping %D %D When I was testing a new version of \PPCHTEX\ in \PLAIN\ %D \TEX\ I had to find out that this exchange of registers @@ -117,23 +117,23 @@ %D to find out that the source of errors originated in %D constructions like: %D -%D \starttypen +%D \starttyping %D \ifdim\DimenOne<\DimenTwo whatever you want \else or not \fi -%D \stoptypen +%D \stoptyping %D %D When \type{\DimenOne} is a \SKIP\ and \type{\DimenTwo} is a %D \DIMENSION, \TEX\ scans for some optional glue component, %D like in: %D -%D \starttypen +%D \starttyping %D \skip0=\dimen0 plus 10pt minus 5pt -%D \stoptypen +%D \stoptyping %D %D The most robust solution to this problem is: %D -%D \starttypen +%D \starttyping %D \ifdim\DimenOne<\DimenTwo\relax right \else wrong \fi -%D \stoptypen +%D \stoptyping %D %D Some close reading of the \PICTEX\ source however learned me %D that this problem could be solved best by just honoring the diff --git a/tex/context/base/m-plus.tex b/tex/context/base/m-plus.tex index 93e2521cb..a38c73129 100644 --- a/tex/context/base/m-plus.tex +++ b/tex/context/base/m-plus.tex @@ -2,28 +2,28 @@ %D [ file=m-plus, %D version=2003.03.16, %D title=\CONTEXT\ Extra Modules, -%D subtitle=Loading extra features, +%D subtitle=Loading extra features, %D author=Hans Hagen, %D date=\currentdate, %D copyright=PRAGMA-ADE] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. -%D Somewhere in 2001 I started collecting new functionality -%D in a module \type {m-yesno}. As the name suggests, I was -%D not entirely sure if this functionality belonged in the -%D kernel. When (again) on the \CONTEXT\ list a request for -%D side bars was posted, I decided to move such code to plus +%D Somewhere in 2001 I started collecting new functionality +%D in a module \type {m-yesno}. As the name suggests, I was +%D not entirely sure if this functionality belonged in the +%D kernel. When (again) on the \CONTEXT\ list a request for +%D side bars was posted, I decided to move such code to plus %D modules. Users who want this additional functionality can -%D put the following call in their \type {cont-sys.tex} file: -%D +%D put the following call in their \type {cont-sys.tex} file: +%D %D \starttyping %D \usemodule[plus] -%D \stoptyping +%D \stoptyping -\readfile {plus-rul} \donothing \donothing -\readfile {plus-pag} \donothing \donothing +\readfile {plus-rul} \donothing \donothing +\readfile {plus-pag} \donothing \donothing -\endinput +\endinput diff --git a/tex/context/base/m-pstric.tex b/tex/context/base/m-pstric.tex index bd87e9f13..707984d28 100644 --- a/tex/context/base/m-pstric.tex +++ b/tex/context/base/m-pstric.tex @@ -11,6 +11,8 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +%M \usemodule[pstric] + \chardef\oldbarcode\the\catcode`\| \catcode`\|=12 \def\loadpstrickscolors#1% @@ -92,7 +94,7 @@ % Since the graphic is put on a page (sigh) by dvips/gs % we need to shift it around a bit. \setbox\scratchbox\hbox - {\externalfigure[\bufferprefix pstricks.pdf][\c!object=\v!nee]}% + {\externalfigure[\bufferprefix pstricks.pdf][\c!object=\v!no]}% \setbox\scratchbox\hbox {\lower\ht\scratchbox\hbox{\raise\dimen2\box\scratchbox}}% \wd\scratchbox\dimen0 diff --git a/tex/context/base/m-quest.tex b/tex/context/base/m-quest.tex index 5ea34164b..7627a1bc3 100644 --- a/tex/context/base/m-quest.tex +++ b/tex/context/base/m-quest.tex @@ -153,10 +153,10 @@ \def\dostelinvullenin[#1]% {\getparameters[\??iv][#1]% - \doif\@@ivstatus\v!reset + \doif\@@ivstate\v!reset {\global\invulput\zerocount \global\invulget\zerocount - \let\@@ivstatus\empty}} + \let\@@ivstate\empty}} \def\definieerinvulwoord {\dosingleempty\dodefinieerinvulwoord} @@ -175,21 +175,21 @@ \fi \fi} \def\dosimpleinvulwoord#1% - {\ifnum\@@ivnummer>0 \advance\invulteller \plusone \fi - \ifnum\invulteller=\@@ivnummer\relax + {\ifnum\@@ivnumber>0 \advance\invulteller \plusone \fi + \ifnum\invulteller=\@@ivnumber\relax \bgroup - \doconvertfont\@@ivletter - {\@@ivlinks - \doifelse\@@ivstatus\v!leeg - {\doifelse\@@ivlijn\v!aan\leeginvulwoord\geeninvulwoord} - {\doifelse\@@ivlijn\v!aan\underbar \firstofoneargument}% + \doconvertfont\@@ivstyle + {\@@ivleft + \doifelse\@@ivstate\v!empty + {\doifelse\@@ivrule\v!on\leeginvulwoord\geeninvulwoord} + {\doifelse\@@ivrule\v!on\underbar \firstofoneargument}% {#1}% - \@@ivrechts}% + \@@ivright}% \egroup \fi}% \def\simpleinvulwoord#1% - {\ifnum\@@ivnummer>0 + {\ifnum\@@ivnumber>0 \invulteller\zerocount \processcommalist[#1]\dosimpleinvulwoord \else @@ -200,10 +200,10 @@ {\bgroup \doifsomething{#1} {\global\advance\invulget \plusone - \doconvertfont\@@ivletter - {\@@ivlinks\getvalue{\r!fillin\the\invulget}\@@ivrechts}} - {\doconvertfont\@@ivletter - {\@@ivlinks\getvalue{\r!fillin #1}\@@ivrechts}}% + \doconvertfont\@@ivstyle + {\@@ivleft\getvalue{\r!fillin\the\invulget}\@@ivright}} + {\doconvertfont\@@ivstyle + {\@@ivleft\getvalue{\r!fillin #1}\@@ivright}}% \egroup} \definecomplexorsimple\invulwoord @@ -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!lijn=\v!aan, - \c!links=, - \c!rechts=, - \c!status=] - -\protect \endinput \ No newline at end of file + [\c!number=0, + \c!style=\v!bold, + \c!rule=\v!on, + \c!left=, + \c!right=, + \c!state=] + +\protect \endinput diff --git a/tex/context/base/m-steps.tex b/tex/context/base/m-steps.tex index b69aa7ecc..deda373ee 100644 --- a/tex/context/base/m-steps.tex +++ b/tex/context/base/m-steps.tex @@ -39,49 +39,49 @@ \def\setupSTEPlines {\dodoubleargument\getparameters[\@@STEL]} \setupSTEPcharts - [\c!voor=\blanko, - \c!na=\blanko, - %\c!afstand=.25em, % nvt + [\c!before=\blank, + \c!after=\blank, + %\c!distance=.25em, % nvt \c!hoffset=1em, \c!voffset=1ex, - \c!methode=1, - \c!hoogte=2ex, + \c!method=1, + \c!height=2ex, \c!offset=.15\bodyfontsize] \setupSTEPtables - [\c!voor=\blanko, - \c!na=\blanko, - \c!afstand=.25em, + [\c!before=\blank, + \c!after=\blank, + \c!distance=.25em, %\c!hoffset=1em, % nvt \c!voffset=1ex, - \c!methode=1, - \c!breedte=4em, + \c!method=1, + \c!width=4em, \c!offset=.15\bodyfontsize] \setupSTEPcells - [\c!variant=24, - \c!achtergrond=\v!kleur, - \c!achtergrondkleur=STEPbackgroundcolor, - \c!lijndikte=.1\bodyfontsize, - \c!kaderkleur=STEPframecolor, + [\c!alternative=24, + \c!background=\v!color, + \c!backgroundcolor=STEPbackgroundcolor, + \c!rulethickness=.1\bodyfontsize, + \c!framecolor=STEPframecolor, \c!offset=.25\bodyfontsize, - \c!letter=, - \c!kleur=] + \c!style=, + \c!color=] \setupSTEPtexts - [\c!variant=24, - \c!achtergrond=\v!kleur, - \c!achtergrondkleur=STEPbackgroundcolor, - \c!lijndikte=.1\bodyfontsize, - \c!kaderkleur=STEPframecolor, + [\c!alternative=24, + \c!background=\v!color, + \c!backgroundcolor=STEPbackgroundcolor, + \c!rulethickness=.1\bodyfontsize, + \c!framecolor=STEPframecolor, \c!offset=.25\bodyfontsize, - \c!letter=\v!kleinkorps, - \c!kleur=] + \c!style=\v!smallbodyfont, + \c!color=] \setupSTEPlines - [\c!variant=1, - \c!lijndikte=.15\bodyfontsize, - \c!kleur=STEPlinecolor] + [\c!alternative=1, + \c!rulethickness=.15\bodyfontsize, + \c!color=STEPlinecolor] \def\initializeSTEP {\initializeSTET \initializeSTEC \initializeSTEL} @@ -90,26 +90,26 @@ {\freezedimenmacro\@@STPCoffset \startMPdrawing line_v_offset := \@@STPCoffset ; - line_method := \@@STPCmethode ; % only charts + line_method := \@@STPCmethod ; % only charts \stopMPdrawing} \def\initializeSTPT {\freezedimenmacro\@@STPToffset \startMPdrawing line_h_offset := \@@STPToffset ; - line_method := \@@STPTmethode ; % only charts + line_method := \@@STPTmethod ; % only charts \stopMPdrawing} \def\initializeSTET - {\freezedimenmacro\@@STETlijndikte + {\freezedimenmacro\@@STETrulethickness \freezedimenmacro\@@STEToffset} \def\initializeSTEC - {\freezedimenmacro\@@STEClijndikte + {\freezedimenmacro\@@STECrulethickness \freezedimenmacro\@@STECoffset} \def\initializeSTEL - {\freezedimenmacro\@@STELlijndikte} + {\freezedimenmacro\@@STELrulethickness} %D ... @@ -128,19 +128,19 @@ \presetlocalframed[\@@STPF] \def\@@stepcell#1% - {\doattributes\@@STEC\c!letter\c!kleur + {\doattributes\@@STEC\c!style\c!color {\localframed - [\@@STPF][\c!offset=\@@STECoffset,\c!kader=\v!uit] + [\@@STPF][\c!offset=\@@STECoffset,\c!frame=\v!off] {\ignorespaces#1\unskip}}} \def\@@stepfake#1% - {\doattributes\@@STEC\c!letter\c!kleur + {\doattributes\@@STEC\c!style\c!color {\ignorespaces#1\unskip}} \def\@@steptext#1% - {\doattributes\@@STET\c!letter\c!kleur + {\doattributes\@@STET\c!style\c!color {\localframed - [\@@STPF][\c!offset=\@@STEToffset,\c!kader=\v!uit] + [\@@STPF][\c!offset=\@@STEToffset,\c!frame=\v!off] {\ignorespaces#1\unskip}}} %D The first attempt was purely \METAPOST\ based and spawned @@ -151,7 +151,7 @@ %D dependent definitions in the cells. The implementation %D roughly looks as follows: %D -%D \starttypen +%D \starttyping %D \def\startSTEPchart% %D {\bgroup %D \startMPdrawing @@ -183,7 +183,7 @@ %D \getMPdrawing %D \resetMPdrawing %D \egroup} -%D \stoptypen +%D \stoptyping %D %D This method has the advantage that it does the job in %D (virtually) one pass, while the next methods need multiple @@ -203,15 +203,15 @@ %D typesetting. We show this alternative too because it %D demonstrates how to apply backgrounds to table cells. %D -%D \starttypen +%D \starttyping %D \newtoks\stepsonetop \newtoks\stepstwotop %D \newtoks\stepsonebot \newtoks\stepstwobot -%D \stoptypen +%D \stoptyping %D %D During the collecting phase, we temporarily have to %D increment the name space counter. %D -%D \starttypen +%D \starttyping %D \def\startSTEPchart% %D {\bgroup %D \resetMPdrawing @@ -228,7 +228,7 @@ %D \stepstwobot\emptytoks \chardef\somesteptwobot=1 %D \let\cells\stepchartcells \def\cell{\cells{}}% %D \let\texts\stepcharttexts \def\text{\texts{}}} -%D \stoptypen +%D \stoptyping %D %D Now we collect the steps and texts, and in the process the %D graphic is built. Then we continue with building the table. @@ -239,7 +239,7 @@ %D digest, even with the right tools (anchors) already in %D place. %D -%D \starttypen +%D \starttyping %D \def\stopSTEPchart %D {\splittabulatefalse %D \insidefloattrue @@ -270,13 +270,13 @@ %D \hskip-\scratchdimen %D \hpos{\tbPOSprefix origin}{\box2}} %D \egroup} -%D \stoptypen +%D \stoptyping %D %D The steps and texts fill the (at most 4) lines that make up %D the table. We also feed the (automatically registerd) cell %D dimensions to the graphic backend. %D -%D \starttypen +%D \starttyping %D \newcounter\cellcounter %D \newcounter\textcounter %D @@ -343,15 +343,15 @@ %D texts[b][\cellcounter][\textcounter] := pxy ; %D \stopMPdrawing %D \@EA\appendtoks\@EA\NC\@EA\textcellposition\@EA{\stepidentifier}#2\to\stepstwobot}} -%D \stoptypen +%D \stoptyping %D %D Here are the hooks that take care of calculating the cell %D dimensions. %D -%D \starttypen +%D \starttyping %D \def\textcellposition#1{\GSC[#1:text]} %D \def\stepidentifierposition#1{\GSC[#1:step]} -%D \stoptypen +%D \stoptyping %D %D We abandoned this method after some testing and went for %D a third one. It was this third method that evolved into the @@ -360,7 +360,7 @@ %D Since this method was not that efficient, a third one was %D implemented, which used one position per cell. So, %D -%D \blanko {\bf Here starts the real implementation!} \blanko +%D \blank {\bf Here starts the real implementation!} \blank %D %D Because we want to build one graphic only we need to store %D the graphic directives. We also need to collect the cells, @@ -397,8 +397,8 @@ \long\def\dostartSTEPchart[#1]#2\stopSTEPchart {\ifinsidefloat \else - \witruimte - \@@STPCvoor + \whitespace + \@@STPCbefore \startbaselinecorrection \setlocalhsize \noindent @@ -450,13 +450,13 @@ anchor_box(\MPpos{\stepchartprefix origin}) ; \stopMPdrawing \MPdrawingdonetrue - \doifelse\@@STPCmethode{0} + \doifelse\@@STPCmethod{0} {\setbox0\null} {\setbox0\vbox{\MPstaticgraphictrue\getMPdrawing}}% \resetMPdrawing \setbox2\vbox {\offinterlineskip - \scratchdimen\@@STPChoogte + \scratchdimen\@@STPCheight \advance\scratchdimen\@@STPCoffset \advance\scratchdimen\@@STPCoffset \ifcase\sometextboxone \box\textboxone \vskip\scratchdimen \fi @@ -475,7 +475,7 @@ \hpos{\stepchartprefix origin}{\box2}}% \popMPdrawing \egroup - \ifinsidefloat \else \stopbaselinecorrection \@@STPCna \fi} + \ifinsidefloat \else \stopbaselinecorrection \@@STPCafter \fi} %D The next macro looks more complicated than it is. We collect %D the cells in boxes. Before adding a new step cell, we padd @@ -556,9 +556,9 @@ \def\MPcellsgraphic {image ( drawshape ( - \@@STECvariant, pxy enlarged (-.5*\@@STECoffset), - \@@STEClijndikte, \MPcolor{\@@STECkaderkleur}, - \MPcolor{\@@STECachtergrondkleur} ) )} + \@@STECalternative, pxy enlarged (-.5*\@@STECoffset), + \@@STECrulethickness, \MPcolor{\@@STECframecolor}, + \MPcolor{\@@STECbackgroundcolor} ) )} %D Although each step can have only one associated text, the %D place where the text is defined determines the starting @@ -647,19 +647,19 @@ \def\MPtextsgraphic {image(drawshape( - \@@STETvariant, pxy enlarged (-.5*\@@STEToffset), - \@@STETlijndikte, \MPcolor{\@@STETkaderkleur}, - \MPcolor{\@@STETachtergrondkleur} ) )} + \@@STETalternative, pxy enlarged (-.5*\@@STEToffset), + \@@STETrulethickness, \MPcolor{\@@STETframecolor}, + \MPcolor{\@@STETbackgroundcolor} ) )} \def\MPcharttoplinesgraphic#1#2% {image(drawline( - \@@STELvariant, get_step_chart_top_line(#1,#2), - \@@STELlijndikte, \MPcolor{\@@STELkleur} ) )} + \@@STELalternative, get_step_chart_top_line(#1,#2), + \@@STELrulethickness, \MPcolor{\@@STELcolor} ) )} \def\MPchartbotlinesgraphic#1#2% {image(drawline( - \@@STELvariant, get_step_chart_bot_line(#1,#2), - \@@STELlijndikte, \MPcolor{\@@STELkleur} ) )} + \@@STELalternative, get_step_chart_bot_line(#1,#2), + \@@STELrulethickness, \MPcolor{\@@STELcolor} ) )} %D \XML\ coupling. @@ -704,8 +704,8 @@ \def\dostartSTEPaligntable[#1][#2]#3\stopSTEPaligntable % flag settings data {\ifinsidefloat \else - \witruimte - \@@STPTvoor + \whitespace + \@@STPTbefore \startbaselinecorrection \setlocalhsize \noindent @@ -779,12 +779,12 @@ anchor_box(\MPpos{\steptableprefix origin}) ; \stopMPdrawing \MPdrawingdonetrue - \doifelse\@@STPTmethode{0} + \doifelse\@@STPTmethod{0} {\setbox0\null} {\setbox0\vbox{\MPstaticgraphictrue\getMPdrawing}}% \resetMPdrawing % typesetting pass - \dimen6=\@@STPTafstand \dimen6=2\dimen6 + \dimen6=\@@STPTdistance \dimen6=2\dimen6 % cell width \dimen8=\dimen1 \advance\dimen8\dimen3 @@ -792,7 +792,7 @@ % offset width \ifcase#1\else \advance\dimen8 \dimen6 \fi % arrow width - \advance\dimen8 \@@STPTbreedte + \advance\dimen8 \@@STPTwidth \advance\dimen8 \@@STPToffset \advance\dimen8 \@@STPToffset \def\docells[##1]##2##3##4% @@ -801,8 +801,8 @@ {\hbox to \dimen####1{####2\@@stepfake{####3}\strut####4}}% \setbox8\hbox {\ifcase#1\else - \do1\hss{##2}\relax \hskip\@@STPTafstand - \do3\hss{##3}\hss \hskip\@@STPTafstand + \do1\hss{##2}\relax \hskip\@@STPTdistance + \do3\hss{##3}\hss \hskip\@@STPTdistance \fi \do5\relax{##4}\hss}% \hpos{\steptableprefix\cellcounter-c}{\@@stepcell{\box8}} @@ -836,12 +836,12 @@ \hpos{\steptableprefix origin}{\box2}} \popMPdrawing \egroup - \ifinsidefloat \else \stopbaselinecorrection \@@STPTna \fi} + \ifinsidefloat \else \stopbaselinecorrection \@@STPTafter \fi} \def\MPtablelinesgraphic {image ( drawline ( - \@@STELvariant, get_step_table_line(\cellcounter), - \@@STELlijndikte, \MPcolor{\@@STELkleur} ) )} + \@@STELalternative, get_step_table_line(\cellcounter), + \@@STELrulethickness, \MPcolor{\@@STELcolor} ) )} \defineXMLpickup[steptable][@@STPT] {\bgroup diff --git a/tex/context/base/m-tex4ht.tex b/tex/context/base/m-tex4ht.tex new file mode 100644 index 000000000..8a3dc9dbb --- /dev/null +++ b/tex/context/base/m-tex4ht.tex @@ -0,0 +1,9 @@ +%D Preliminaty module + +\input tex4ht.sty + +\appendtoks + \Preamble{\env{ht-1},\env{ht-2},html}\EndPreamble +\to \everystarttext + +\endinput \ No newline at end of file diff --git a/tex/context/base/m-tryout.tex b/tex/context/base/m-tryout.tex index 23fc56c8c..ef6c502ba 100644 --- a/tex/context/base/m-tryout.tex +++ b/tex/context/base/m-tryout.tex @@ -16,9 +16,9 @@ %D The following macros make sure that active colons work well %D in French, a feature enabled with: %D -%D \starttypen +%D \starttyping %D \useencoding[ffr] \mainlanguage[fr] -%D \stoptypen +%D \stoptyping %D %D This trick will disappear when proved robust. @@ -48,4 +48,4 @@ \stopmode -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/m-units.tex b/tex/context/base/m-units.tex index c0b0222d8..35f870bbf 100644 --- a/tex/context/base/m-units.tex +++ b/tex/context/base/m-units.tex @@ -17,9 +17,9 @@ %D wanted. Therefore this module presents a more natural way of %D doing things, like: %D -%D \starttypen +%D \starttyping %D 1.23 \Cubic \Meter \Per \Second -%D \stoptypen +%D \stoptyping %D %D This example shows that we use the order in which we say %D things, instead of typeset things. There is a separate @@ -70,7 +70,7 @@ %D some 10 \Square \Meter \Per \Second or more %D \stopbuffer %D -%D \haalbuffer +%D \getbuffer %D %D as: %D @@ -78,10 +78,10 @@ %D %D The units itself are implemented as synonyms. %D -%D \starttypen +%D \starttyping %D \definesynonyms [unit] [units] [\unitmeaning] -%D \stelsynoniemenin [unit] [textstyle=\dimension] -%D \stoptypen +%D \setupsynonyms [unit] [textstyle=\dimension] +%D \stoptyping %D %D This definition means that we can ask for the meaning of a %D unit using \type {\unitmeaning} and get a list of used @@ -119,7 +119,7 @@ %D %D Becomes: %D -%D \haalbuffer +%D \getbuffer %D \macros %D {mathematicstypeface, dimensiontypeface, @@ -165,19 +165,19 @@ \newif\ifspaceddimensions \spaceddimensionsfalse % user switch \newif\iftextdimensions \textdimensionsfalse % user switch -%D You can see the consequence of forcing text dimensions -%D when you compare the following code: +%D You can see the consequence of forcing text dimensions +%D when you compare the following code: %D %D \starttyping -%D {\rm test \Square \Meter \Per \Second\ ziezo\Degrees} \par -%D {\ss test \Square \Meter \Per \Second\ ziezo} \par -%D {\tt test \Square \Meter \Per \Second\ ziezo} -%D +%D {\rm test \Square \Meter \Per \Second\ ziezo\Degrees} \par +%D {\ss test \Square \Meter \Per \Second\ ziezo} \par +%D {\tt test \Square \Meter \Per \Second\ ziezo} +%D %D \textdimensionstrue -%D -%D {\rm test \Square \Meter \Per \Second\ ziezo} \par -%D {\ss test \Square \Meter \Per \Second\ ziezo} \par -%D {\tt test \Square \Meter \Per \Second\ ziezo} +%D +%D {\rm test \Square \Meter \Per \Second\ ziezo} \par +%D {\ss test \Square \Meter \Per \Second\ ziezo} \par +%D {\tt test \Square \Meter \Per \Second\ ziezo} %D \stoptyping \newif\ifnesteddimension \nesteddimensionfalse % local switch @@ -194,8 +194,8 @@ \def\udimensionhalfspace {\dodimensionspace\dimensionhalfspace} \def\udimensionbackspace {\dodimensionspace\dimensionbackspace} -\def\dodimensionspace - {\iftextdimensions +\def\dodimensionspace + {\iftextdimensions \begingroup \setbox0=\hbox{i}% \setbox2=\hbox{m}% @@ -263,7 +263,7 @@ \global\let\thedimensionprefix\empty \global\let\thedimensionpower\empty} -%D \macro +%D \macros %D {dontbreakdimension, %D dimensionprefix, dimensionaddfix, %D dimensionnopfix, dimensionmidfix, @@ -319,7 +319,7 @@ \def\dimensionpower#1% {\gdef\thedimensionpower{#1}} -%D \macro +%D \macros %D {SIunits, noSI, doSI} %D %D Some low level unit switching macros: @@ -336,7 +336,7 @@ \def\Degrees{\dimensionaddfix{\mathematics{^\circ}}} -%D \macro +%D \macros %D {Unit, NoUnit} %D %D When a dimension has no leading number, we can use \type @@ -362,7 +362,7 @@ \def\Kilo {\dimensionprefix{k}} \def\Mega {\dimensionprefix{M}} \def\Giga {\dimensionprefix{G}} -\def\Terra {\dimensionprefix{T}} % for old times sake +\def\Terra {\dimensionprefix{T}} % for old times sake \def\Tera {\dimensionprefix{T}} \def\Peta {\dimensionprefix{P}} \def\Exa {\dimensionprefix{E}} @@ -389,39 +389,39 @@ %D defined using the synonym mechanism. First we define some %D length and volume related units. -\getvalue{\v!eenheid} [Meter] {m} {meter} -\getvalue{\v!eenheid} [pMeter] {\Pico \Meter} {picometer} -\getvalue{\v!eenheid} [nMeter] {\Nano \Meter} {nanometer} -\getvalue{\v!eenheid} [uMeter] {\Micro \Meter} {micrometer} -\getvalue{\v!eenheid} [mMeter] {\Milli \Meter} {millimeter} -\getvalue{\v!eenheid} [cMeter] {\Centi \Meter} {centimeter} -\getvalue{\v!eenheid} [dMeter] {\Deci \Meter} {decimeter} -\getvalue{\v!eenheid} [hMeter] {\Hecto \Meter} {hectometer} -\getvalue{\v!eenheid} [kMeter] {\Kilo \Meter} {kilometer} +\getvalue{\v!unit} [Meter] {m} {meter} +\getvalue{\v!unit} [pMeter] {\Pico \Meter} {picometer} +\getvalue{\v!unit} [nMeter] {\Nano \Meter} {nanometer} +\getvalue{\v!unit} [uMeter] {\Micro \Meter} {micrometer} +\getvalue{\v!unit} [mMeter] {\Milli \Meter} {millimeter} +\getvalue{\v!unit} [cMeter] {\Centi \Meter} {centimeter} +\getvalue{\v!unit} [dMeter] {\Deci \Meter} {decimeter} +\getvalue{\v!unit} [hMeter] {\Hecto \Meter} {hectometer} +\getvalue{\v!unit} [kMeter] {\Kilo \Meter} {kilometer} %D After some discussion on the \CONTEXT\ mailing list in %D february 2002 it was decided to go from L to l for liters %D (Karel Wesselings alternative: \mathematics{\ell}). -\getvalue{\v!eenheid} [Liter] {l} {liter} -\getvalue{\v!eenheid} [mLiter] {\Milli \Liter} {milliliter} -\getvalue{\v!eenheid} [cLiter] {\Centi \Liter} {centiliter} -\getvalue{\v!eenheid} [dLiter] {\Deci \Liter} {deciliter} +\getvalue{\v!unit} [Liter] {l} {liter} +\getvalue{\v!unit} [mLiter] {\Milli \Liter} {milliliter} +\getvalue{\v!unit} [cLiter] {\Centi \Liter} {centiliter} +\getvalue{\v!unit} [dLiter] {\Deci \Liter} {deciliter} %D Next we define time related units (\type {\ifSI} still dutch only). -\getvalue{\v!eenheid} [Sec] {s} {\labeltext{u:sec}} -\getvalue{\v!eenheid} [fSec] {\Femto \Sec} {\labeltext{u:fsec}} -\getvalue{\v!eenheid} [pSec] {\Pico \Sec} {\labeltext{u:psec}} -\getvalue{\v!eenheid} [nSec] {\Nano \Sec} {\labeltext{u:nsec}} -\getvalue{\v!eenheid} [uSec] {\Micro \Sec} {\labeltext{u:usec}} -\getvalue{\v!eenheid} [mSec] {\Milli \Sec} {\labeltext{u:msec}} -\getvalue{\v!eenheid} [Year] {\ifSIunits a \else j\fi} {\labeltext{u:year}} -\getvalue{\v!eenheid} [Month] {m} {\labeltext{u:month}} -\getvalue{\v!eenheid} [Week] {w} {\labeltext{u:week}} -\getvalue{\v!eenheid} [Day] {d} {\labeltext{u:day}} -\getvalue{\v!eenheid} [Hour] {\ifSIunits h \else u\fi} {\labeltext{u:hour}} -\getvalue{\v!eenheid} [Min] {min} {\labeltext{u:min}} +\getvalue{\v!unit} [Sec] {s} {\labeltext{u:sec}} +\getvalue{\v!unit} [fSec] {\Femto \Sec} {\labeltext{u:fsec}} +\getvalue{\v!unit} [pSec] {\Pico \Sec} {\labeltext{u:psec}} +\getvalue{\v!unit} [nSec] {\Nano \Sec} {\labeltext{u:nsec}} +\getvalue{\v!unit} [uSec] {\Micro \Sec} {\labeltext{u:usec}} +\getvalue{\v!unit} [mSec] {\Milli \Sec} {\labeltext{u:msec}} +\getvalue{\v!unit} [Year] {\ifSIunits a \else j\fi} {\labeltext{u:year}} +\getvalue{\v!unit} [Month] {m} {\labeltext{u:month}} +\getvalue{\v!unit} [Week] {w} {\labeltext{u:week}} +\getvalue{\v!unit} [Day] {d} {\labeltext{u:day}} +\getvalue{\v!unit} [Hour] {\ifSIunits h \else u\fi} {\labeltext{u:hour}} +\getvalue{\v!unit} [Min] {min} {\labeltext{u:min}} \setuplabeltext [\s!nl] @@ -485,8 +485,8 @@ %D Then we define some angles. -\getvalue{\v!eenheid} [Rad] {rad} {\labeltext{u:rad}} -\getvalue{\v!eenheid} [Deg] {{\mathematics{^\circ}}} {\labeltext{u:deg}} +\getvalue{\v!unit} [Rad] {rad} {\labeltext{u:rad}} +\getvalue{\v!unit} [Deg] {{\mathematics{^\circ}}} {\labeltext{u:deg}} \setuplabeltext [\s!nl] @@ -510,15 +510,15 @@ %D Rotation and frequency related units are defined by: -\getvalue{\v!eenheid} [Hertz] {Hz} {Hertz} -\getvalue{\v!eenheid} [kHertz] {\Kilo \Hertz} {kilo Hertz} -\getvalue{\v!eenheid} [MHertz] {\Mega \Hertz} {mega Hertz} -\getvalue{\v!eenheid} [GHertz] {\Giga \Hertz} {giga Hertz} -\getvalue{\v!eenheid} [THertz] {\Tera \Hertz} {tera Hertz} -\getvalue{\v!eenheid} [mHertz] {\Milli \Hertz} {milli Hertz} +\getvalue{\v!unit} [Hertz] {Hz} {Hertz} +\getvalue{\v!unit} [kHertz] {\Kilo \Hertz} {kilo Hertz} +\getvalue{\v!unit} [MHertz] {\Mega \Hertz} {mega Hertz} +\getvalue{\v!unit} [GHertz] {\Giga \Hertz} {giga Hertz} +\getvalue{\v!unit} [THertz] {\Tera \Hertz} {tera Hertz} +\getvalue{\v!unit} [mHertz] {\Milli \Hertz} {milli Hertz} -\getvalue{\v!eenheid} [RevPerSec] {RPS} {\labeltext{u:rps}} -\getvalue{\v!eenheid} [RevPerMin] {RPM} {\labeltext{u:rpm}} +\getvalue{\v!unit} [RevPerSec] {RPS} {\labeltext{u:rps}} +\getvalue{\v!unit} [RevPerMin] {RPM} {\labeltext{u:rpm}} \setuplabeltext [\s!nl] @@ -542,18 +542,18 @@ %D Mass and force: -\getvalue{\v!eenheid} [Gram] {g} {gram} -\getvalue{\v!eenheid} [uGram] {\Micro \Gram} {microgram} -\getvalue{\v!eenheid} [mGram] {\Milli \Gram} {milligram} -\getvalue{\v!eenheid} [kGram] {\Kilo \Gram} {kilogram} -\getvalue{\v!eenheid} [Atom] {u} {\labeltext{u:u}} +\getvalue{\v!unit} [Gram] {g} {gram} +\getvalue{\v!unit} [uGram] {\Micro \Gram} {microgram} +\getvalue{\v!unit} [mGram] {\Milli \Gram} {milligram} +\getvalue{\v!unit} [kGram] {\Kilo \Gram} {kilogram} +\getvalue{\v!unit} [Atom] {u} {\labeltext{u:u}} -\getvalue{\v!eenheid} [Newton] {N} {Newton} -\getvalue{\v!eenheid} [kNewton] {\Kilo \Newton} {kilo Newton} +\getvalue{\v!unit} [Newton] {N} {Newton} +\getvalue{\v!unit} [kNewton] {\Kilo \Newton} {kilo Newton} -\getvalue{\v!eenheid} [Pascal] {Pa} {Pascal} -\getvalue{\v!eenheid} [mPascal] {\Milli \Pascal} {milli Pascal} -\getvalue{\v!eenheid} [kPascal] {\Kilo \Pascal} {kilo Pascal} +\getvalue{\v!unit} [Pascal] {Pa} {Pascal} +\getvalue{\v!unit} [mPascal] {\Milli \Pascal} {milli Pascal} +\getvalue{\v!unit} [kPascal] {\Kilo \Pascal} {kilo Pascal} \setuplabeltext [\s!nl] @@ -573,65 +573,65 @@ %D Energy units comes in two alternatives: -\getvalue{\v!eenheid} [Joule] {J} {Joule} -\getvalue{\v!eenheid} [mJoule] {\Milli \Joule} {milli Joule} -\getvalue{\v!eenheid} [kJoule] {\Kilo \Joule} {kilo Joule} -\getvalue{\v!eenheid} [MJoule] {\Mega \Joule} {mega Joule} -\getvalue{\v!eenheid} [GJoule] {\Giga \Joule} {giga Joule} +\getvalue{\v!unit} [Joule] {J} {Joule} +\getvalue{\v!unit} [mJoule] {\Milli \Joule} {milli Joule} +\getvalue{\v!unit} [kJoule] {\Kilo \Joule} {kilo Joule} +\getvalue{\v!unit} [MJoule] {\Mega \Joule} {mega Joule} +\getvalue{\v!unit} [GJoule] {\Giga \Joule} {giga Joule} -\getvalue{\v!eenheid} [Watt] {W} {Watt} -\getvalue{\v!eenheid} [mWatt] {\Milli \Watt} {milli Watt} -\getvalue{\v!eenheid} [kWatt] {\Kilo \Watt} {kilo Watt} -\getvalue{\v!eenheid} [MWatt] {\Mega \Watt} {mega Watt} -\getvalue{\v!eenheid} [GWatt] {\Giga \Watt} {giga Watt} -\getvalue{\v!eenheid} [TWatt] {\Tera \Watt} {tera Watt} +\getvalue{\v!unit} [Watt] {W} {Watt} +\getvalue{\v!unit} [mWatt] {\Milli \Watt} {milli Watt} +\getvalue{\v!unit} [kWatt] {\Kilo \Watt} {kilo Watt} +\getvalue{\v!unit} [MWatt] {\Mega \Watt} {mega Watt} +\getvalue{\v!unit} [GWatt] {\Giga \Watt} {giga Watt} +\getvalue{\v!unit} [TWatt] {\Tera \Watt} {tera Watt} %D Although Celsius is no longer permitted, we define it by %D saying: -\getvalue{\v!eenheid} [Celsius] {C} {Celsius} -\getvalue{\v!eenheid} [Kelvin] {K} {Kelvin} -\getvalue{\v!eenheid} [Fahrenheit] {F} {Fahrenheit} +\getvalue{\v!unit} [Celsius] {C} {Celsius} +\getvalue{\v!unit} [Kelvin] {K} {Kelvin} +\getvalue{\v!unit} [Fahrenheit] {F} {Fahrenheit} %D Some chemic related units are: -\getvalue{\v!eenheid} [Mol] {mol} {mol} -\getvalue{\v!eenheid} [mMol] {\Milli \Mol} {millimol} -\getvalue{\v!eenheid} [kMol] {\Kilo \Mol} {kilomol} -\getvalue{\v!eenheid} [Molair] {M} {molair (\Mol \Per \Liter)} -\getvalue{\v!eenheid} [Equivalent] {eq} {equivalent} -\getvalue{\v!eenheid} [mEquivalent] {\Milli \Equivalent} {milli equivalent} +\getvalue{\v!unit} [Mol] {mol} {mol} +\getvalue{\v!unit} [mMol] {\Milli \Mol} {millimol} +\getvalue{\v!unit} [kMol] {\Kilo \Mol} {kilomol} +\getvalue{\v!unit} [Molair] {M} {molair (\Mol \Per \Liter)} +\getvalue{\v!unit} [Equivalent] {eq} {equivalent} +\getvalue{\v!unit} [mEquivalent] {\Milli \Equivalent} {milli equivalent} %D There are quite a lot units related to electricity and %D magnetism: -\getvalue{\v!eenheid} [Farad] {F} {Farad} -\getvalue{\v!eenheid} [pFarad] {\Pico \Farad} {pico Farad} -\getvalue{\v!eenheid} [nFarad] {\Nano \Farad} {nano Farad} -\getvalue{\v!eenheid} [uFarad] {\Micro \Farad} {micro Farad} -\getvalue{\v!eenheid} [mFarad] {\Milli \Farad} {milli Farad} +\getvalue{\v!unit} [Farad] {F} {Farad} +\getvalue{\v!unit} [pFarad] {\Pico \Farad} {pico Farad} +\getvalue{\v!unit} [nFarad] {\Nano \Farad} {nano Farad} +\getvalue{\v!unit} [uFarad] {\Micro \Farad} {micro Farad} +\getvalue{\v!unit} [mFarad] {\Milli \Farad} {milli Farad} -\getvalue{\v!eenheid} [Ohm] {\Omega} {Ohm} -\getvalue{\v!eenheid} [kOhm] {\Kilo \Ohm} {kilo Ohm} +\getvalue{\v!unit} [Ohm] {\Omega} {Ohm} +\getvalue{\v!unit} [kOhm] {\Kilo \Ohm} {kilo Ohm} -\getvalue{\v!eenheid} [Siemens] {S} {Siemens} +\getvalue{\v!unit} [Siemens] {S} {Siemens} -\getvalue{\v!eenheid} [Ampere] {A} {Amp\`ere} -\getvalue{\v!eenheid} [mAmpere] {\Milli \Ampere} {milli Amp\`ere} +\getvalue{\v!unit} [Ampere] {A} {Amp\`ere} +\getvalue{\v!unit} [mAmpere] {\Milli \Ampere} {milli Amp\`ere} -\getvalue{\v!eenheid} [Coulomb] {C} {Coulomb} +\getvalue{\v!unit} [Coulomb] {C} {Coulomb} -\getvalue{\v!eenheid} [Volt] {V} {Volt} -\getvalue{\v!eenheid} [mVolt] {\Milli \Volt} {milli Volt} -\getvalue{\v!eenheid} [kVolt] {\Kilo \Volt} {kilo Volt} -\getvalue{\v!eenheid} [eVolt] {eV} {electronvolt} -\getvalue{\v!eenheid} [keVolt] {\Kilo \eVolt} {kilo electronvolt} -\getvalue{\v!eenheid} [MeVolt] {\Mega \eVolt} {mega electronvolt} +\getvalue{\v!unit} [Volt] {V} {Volt} +\getvalue{\v!unit} [mVolt] {\Milli \Volt} {milli Volt} +\getvalue{\v!unit} [kVolt] {\Kilo \Volt} {kilo Volt} +\getvalue{\v!unit} [eVolt] {eV} {electronvolt} +\getvalue{\v!unit} [keVolt] {\Kilo \eVolt} {kilo electronvolt} +\getvalue{\v!unit} [MeVolt] {\Mega \eVolt} {mega electronvolt} -\getvalue{\v!eenheid} [Tesla] {T} {Tesla} +\getvalue{\v!unit} [Tesla] {T} {Tesla} -\getvalue{\v!eenheid} [VoltAC] {V_{\xbox{ac}}} {\labeltext{u:vac}} -\getvalue{\v!eenheid} [VoltDC] {V_{\xbox{dc}}} {\labeltext{u:vdc}} +\getvalue{\v!unit} [VoltAC] {V_{\xbox{ac}}} {\labeltext{u:vac}} +\getvalue{\v!unit} [VoltDC] {V_{\xbox{dc}}} {\labeltext{u:vdc}} \setuplabeltext [\s!nl] @@ -655,61 +655,61 @@ %D Computer memory is specified in Bytes: -\getvalue{\v!eenheid} [Baud] {Baud} {Baud (Bit/s)} -\getvalue{\v!eenheid} [Bit] {Bit} {Bit} +\getvalue{\v!unit} [Baud] {Baud} {Baud (Bit/s)} +\getvalue{\v!unit} [Bit] {Bit} {Bit} -\getvalue{\v!eenheid} [Byte] {Byte} {Byte} -\getvalue{\v!eenheid} [kByte] {\Kilo \Byte} {kilo Byte} -\getvalue{\v!eenheid} [MByte] {\Mega \Byte} {mega Byte} -\getvalue{\v!eenheid} [GByte] {\Giga \Byte} {giga Byte} -\getvalue{\v!eenheid} [TByte] {\Tera \Byte} {tera Byte} +\getvalue{\v!unit} [Byte] {Byte} {Byte} +\getvalue{\v!unit} [kByte] {\Kilo \Byte} {kilo Byte} +\getvalue{\v!unit} [MByte] {\Mega \Byte} {mega Byte} +\getvalue{\v!unit} [GByte] {\Giga \Byte} {giga Byte} +\getvalue{\v!unit} [TByte] {\Tera \Byte} {tera Byte} %D Some radiation related units: -\getvalue{\v!eenheid} [Bequerel] {Bq} {Bequerel} -\getvalue{\v!eenheid} [MBequerel] {\Mega \Bequerel} {Bequerel} -\getvalue{\v!eenheid} [Sievert] {Sv} {Sievert} -\getvalue{\v!eenheid} [mSievert] {\Milli \Sievert} {milli Sievert} +\getvalue{\v!unit} [Bequerel] {Bq} {Bequerel} +\getvalue{\v!unit} [MBequerel] {\Mega \Bequerel} {Bequerel} +\getvalue{\v!unit} [Sievert] {Sv} {Sievert} +\getvalue{\v!unit} [mSievert] {\Milli \Sievert} {milli Sievert} %D Light: -\getvalue{\v!eenheid} [Candela] {cd} {Candela} +\getvalue{\v!unit} [Candela] {cd} {Candela} %D and some sound ones: -\getvalue{\v!eenheid} [Bell] {B} {Bell} -\getvalue{\v!eenheid} [dBell] {\Deci \Bell} {decibel} +\getvalue{\v!unit} [Bell] {B} {Bell} +\getvalue{\v!unit} [dBell] {\Deci \Bell} {decibel} %D We also define some non||regular, sometimes even forbidden, %D units: -\getvalue{\v!eenheid} [At] {at} {\labeltext{u:at}} -\getvalue{\v!eenheid} [Atm] {atm} {\labeltext{u:atm}} -\getvalue{\v!eenheid} [Bar] {bar} {bar (100 \Kilo \Pascal)} -\getvalue{\v!eenheid} [EVolt] {eV} {electronvolt} -\getvalue{\v!eenheid} [Foot] {ft} {\labeltext{u:ft}} -\getvalue{\v!eenheid} [Inch] {inch} {inch} -\getvalue{\v!eenheid} [Cal] {cal} {\labeltext{u:cal}} -\getvalue{\v!eenheid} [Force] {f} {\labeltext{u:f}} -\getvalue{\v!eenheid} [kCal] {\Kilo \Cal} {\labeltext{u:kcal}} -\getvalue{\v!eenheid} [Lux] {lux} {lux} +\getvalue{\v!unit} [At] {at} {\labeltext{u:at}} +\getvalue{\v!unit} [Atm] {atm} {\labeltext{u:atm}} +\getvalue{\v!unit} [Bar] {bar} {bar (100 \Kilo \Pascal)} +\getvalue{\v!unit} [EVolt] {eV} {electronvolt} +\getvalue{\v!unit} [Foot] {ft} {\labeltext{u:ft}} +\getvalue{\v!unit} [Inch] {inch} {inch} +\getvalue{\v!unit} [Cal] {cal} {\labeltext{u:cal}} +\getvalue{\v!unit} [Force] {f} {\labeltext{u:f}} +\getvalue{\v!unit} [kCal] {\Kilo \Cal} {\labeltext{u:kcal}} +\getvalue{\v!unit} [Lux] {lux} {lux} \def\xPercent {\dimensionaddfix{\percent }} \def\xPromille{\dimensionaddfix{\promille}} -\getvalue{\v!eenheid} [Percent] {\xPercent } {percent} -\getvalue{\v!eenheid} [Permille] {\xPromille} {promille} -\getvalue{\v!eenheid} [Promille] {\xPromille} {promille} +\getvalue{\v!unit} [Percent] {\xPercent } {percent} +\getvalue{\v!unit} [Permille] {\xPromille} {promille} +\getvalue{\v!unit} [Promille] {\xPromille} {promille} %D Some more, thanks to Tobias: -\getvalue{\v!eenheid} [Gray] {Gr} {Gray} -\getvalue{\v!eenheid} [Weber] {Wb} {Weber} -\getvalue{\v!eenheid} [Henry] {H} {Henry} -\getvalue{\v!eenheid} [Sterant] {sr} {Sterant} -\getvalue{\v!eenheid} [Angstrom] {\hbox{\Aring}} {\Aring ngstr\"om} -\getvalue{\v!eenheid} [Gauss] {G} {Gauss} +\getvalue{\v!unit} [Gray] {Gr} {Gray} +\getvalue{\v!unit} [Weber] {Wb} {Weber} +\getvalue{\v!unit} [Henry] {H} {Henry} +\getvalue{\v!unit} [Sterant] {sr} {Sterant} +\getvalue{\v!unit} [Angstrom] {\hbox{\Aring}} {\Aring ngstr\"om} +\getvalue{\v!unit} [Gauss] {G} {Gauss} \setuplabeltext [\s!nl] @@ -771,20 +771,20 @@ \startinterface dutch - \getvalue{\v!eenheid} [PaardenKracht] {pk} {paardenkracht} - \getvalue{\v!eenheid} [Duits] {D} {duits} - \getvalue{\v!eenheid} [Kwik] {Hg} {kwikkolom} - \getvalue{\v!eenheid} [Hectare] {ha} {hectare} - \getvalue{\v!eenheid} [kGramForce] {\Kilo \Gram \Force} {kilogramforce} - \getvalue{\v!eenheid} [kWattUur] {\Kilo \Watt \Uur} {kilowattuur} - \getvalue{\v!eenheid} [MeterKwik] {\Meter \Kwik} {meter kwikkolom} - \getvalue{\v!eenheid} [Waterkolom] {WK} {waterkolom} - \getvalue{\v!eenheid} [MeterWater] {\Meter \Waterkolom} {meter waterkolom} - \getvalue{\v!eenheid} [DrogeStof] {ds} {droge stof} - \getvalue{\v!eenheid} [Normaal] {N} {normaal} - - \getvalue{\v!eenheid} [Ton] {t} {ton} - \getvalue{\v!eenheid} [kTon] {\Kilo \Ton} {kiloton} + \getvalue{\v!unit} [PaardenKracht] {pk} {paardenkracht} + \getvalue{\v!unit} [Duits] {D} {duits} + \getvalue{\v!unit} [Kwik] {Hg} {kwikkolom} + \getvalue{\v!unit} [Hectare] {ha} {hectare} + \getvalue{\v!unit} [kGramForce] {\Kilo \Gram \Force} {kilogramforce} + \getvalue{\v!unit} [kWattUur] {\Kilo \Watt \Uur} {kilowattuur} + \getvalue{\v!unit} [MeterKwik] {\Meter \Kwik} {meter kwikkolom} + \getvalue{\v!unit} [Waterkolom] {WK} {waterkolom} + \getvalue{\v!unit} [MeterWater] {\Meter \Waterkolom} {meter waterkolom} + \getvalue{\v!unit} [DrogeStof] {ds} {droge stof} + \getvalue{\v!unit} [Normaal] {N} {normaal} + + \getvalue{\v!unit} [Ton] {t} {ton} + \getvalue{\v!unit} [kTon] {\Kilo \Ton} {kiloton} \let \OmwPerSec \RevPerSec \let \OmwPerMin \RevPerMin @@ -807,7 +807,7 @@ \let \Kubic \Cubic \let \IKubic \ICubic -%D Option: +%D Option: % \def\Micro{\dimensionprefix{\iftextdimensions\mathematics\mu \else\mu \fi}} % \def\Times{\dimensionnopfix{\iftextdimensions\mathematics\cdot\else\cdot\fi}} diff --git a/tex/context/base/m-visual.tex b/tex/context/base/m-visual.tex new file mode 100644 index 000000000..8e992b855 --- /dev/null +++ b/tex/context/base/m-visual.tex @@ -0,0 +1,287 @@ +%D \module +%D [ file=m-visual, +%D version=2000.01.10, +%D title=\CONTEXT\ Extra Modules, +%D subtitle=Visualization and Faking, +%D author={Hans Hagen \& Ton Otten}, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +%D This module collect a few more visual debugger features. I +%D needed them for manuals and styles. The macros are documented +%D in a my way document. + +\definecolor[fakerulecolor] [black] +\definecolor[fakebaselinecolor] [green] +\definecolor[fakeparindentcolor][blue] + +\newif\iffakebaseline \fakebaselinetrue + +\def\fakerule#1% + {\strut +% \startcolor[fakerulecolor]% + \iffakebaseline + \vrule\!!height1.25ex\!!depth-.05ex\!!width#1% + \kern-#1% + \vrule\!!height-.05ex\!!depth .25ex\!!width#1% + \else + \vrule\!!height1.25ex\!!depth .25ex\!!width#1% + \fi + \stopcolor + \allowbreak} + +% can be used in hbox, so %'s are really needed + +\unexpanded\def\fakelines#1#2% min max / 3 10 + {\fakeparindent + \scratchdimen\hsize + \ifindentation + \advance\scratchdimen -\parindent + \fi + \fakerule\scratchdimen\break + \getrandomcount\scratchcounter{\ifcase0#1 3\else#1\fi}{\ifcase0#2 10\else#2\fi}% + \dorecurse\scratchcounter{\fakerule\hsize}% + \getrandomdimen\scratchdimen{.25\hsize}\hsize + \fakerule\scratchdimen + \par} % indeed + +\unexpanded\def\fakewords + {\ifvmode\fakeparindent\fi\onlyfakewords} + +\definepalet + [fakerule] + [fr1c=darkred, + fr2c=darkgreen, + fr3c=darkblue, + fr4c=darkyellow, + fr5c=darkgray] + +\unexpanded\def\onlyfakewords#1#2% min max / 10 40 + {\getrandomcount\scratchcounter{\ifcase0#1 10\else#1\fi}{\ifcase0#2 40\else#2\fi}% + \dofakewords\scratchcounter + } % no \par + +\unexpanded\def\fakenwords#1#2% words seed + {\fakeparindent + \getrandomseed\fakedwordseed + \setrandomseed{\ifcase0#2 #1\else#2\fi}% + \dofakewords{#1}% + \setrandomseed\fakedwordseed + } % no \par + +\def\dofakewords#1% + {\bgroup + \dorecurse{#1} + {\getrandomcount\scratchcounter{1}{5}% + \dorecurse\scratchcounter + {\getrandomdimen\scratchdimen{.5em}{1.25em}% + \fakerule\scratchdimen}% + \space}% + \removeunwantedspaces + \egroup} + +\def\doshowfakewords#1% + {\bgroup + \setuppalet[fakerule]% + \definecolor[fakerulecolor]% + \dorecurse{#1} + {\getrandomcount\scratchcounter{1}{5}% + \dorecurse\scratchcounter + {\getrandomdimen\scratchdimen{.5em}{1.25em}% + \color[fr\recurselevel c]{\fakerule\scratchdimen}}% + \space}% + \removeunwantedspaces + \egroup} + +\def\showfakewords{\let\dofakewords\doshowfakewords} + +\def\fakeword + {\fakewords{1}{1}} % no \plusone + +\def\fakeparindent + {\noindent + \ifindentation + \ifx\dofakedroppedcaps\relax + {\fakeparindentcolor + \vrule + \!!height \strutheight % not longer .5ex + \!!depth \strutdepth % not longer 0pt + \!!width \parindent}% + \else + \dofakedroppedcaps \let\dofakedroppedcaps\relax + \fi +% \else +% \dontleavehmode + \fi} + +\let\dofakedroppedcaps\relax + +\unexpanded\def\fakedroppedcaps#1% + {\ifnum#1>0 + \def\dofakedroppedcaps + {\setbox\scratchbox\hbox + {\setbox\scratchbox\hbox{W}% + \scratchdimen#1\lineheight + \advance\scratchdimen -\lineheight + \advance\scratchdimen \dp\strutbox + \vrule + \!!width#1\wd\scratchbox + \!!height\ht\scratchbox + \!!depth\scratchdimen}% + \ht\scratchbox\ht\strutbox + \dp\scratchbox\dp\strutbox + \hangindent\wd\scratchbox + \advance\hangindent .5em + \wd\scratchbox\hangindent + \hangafter-#1\noindent + \llap{\fakeparindentcolor\box\scratchbox}}% + \fi} + +\newcounter\noffakedfigures + +\unexpanded\def\showfakefigure + {\donetrue\dodoubleempty\dofakefigure} + +\unexpanded\def\fakefigure + {\donefalse\dodoubleempty\dofakefigure} + +\def\dofakefigure[#1][#2]#3#4#5#6% [] [] minwidth maxwidth minheight maxheight + {\doglobal\increment\noffakedfigures + \ifdone + \endgraf + \hbox to \hsize + {\hss\fakeparindentcolor + \strut\bf Figure \noffakedfigures + \doifsomething{#1}{\space(#1)}% + \hss} + \endgraf + \fi + \getvalue{\e!place\v!figure} + [#1][#2]% + {\freezerandomseed + \let\endstrut\relax + \let\begstrut\relax + \doifinsetelse{#1}{\v!left,\v!right} + {\fakewords{2}{4}} + {\fakewords{4}{10}}}% + {\getrandomdimen{\dimen0}{#3}{#4}% + \getrandomdimen{\dimen2}{#5}{#6}% + \doifinset{#1}{\v!left,\v!right} + {\dimen0=.75\dimen0 + \ifdim\dimen0>.6\hsize \dimen0=.5\hsize\fi + \ifdim\dimen0<.3\hsize \dimen0=.3\hsize\fi}% + \framed + [\c!width=\dimen0, + \c!height=\dimen2, + \c!frame=\ifincolor\v!off\else\v!on\fi, + \c!background=\v!color, + \c!backgroundcolor=fakeparindentcolor] + {\bf\white#1}}% + \defrostrandomseed} + +\def\fakeformula + {\dimen0\zeropoint + \getrandomcount\scratchcounter{3}{6}% + \dorecurse\scratchcounter + {\getrandomdimen\scratchdimen{1em}{3em}% + \mathinner{\red\fakerule\scratchdimen}% + \ifnum\recurselevel<\scratchcounter+\fi + \advance\scratchdimen\dimen0}% + =\mathinner{\red\fakerule\scratchdimen}} + +\def\fakespacingformula + {\color[fakebaselinecolor]{\ruledbaseline}\fakeformula} + +%D test \bodyfontgrid\space test +%D test \emexgrid \space test + +\def\smashedgrid + {\dosingleempty\dosmashedgrid} + +\def\dosmashedgrid[#1]% + {\hsmashed + {\setbox\scratchbox=\hbox + {\basegrid + [\c!nx=10,\c!ny=10,\c!dx=1,\c!dy=1, + \c!unit=\bodyfontsize,#1]}% + \hbox to \zeropoint + {\hss\lower.5\ht\scratchbox\box\scratchbox\hss}% + \hbox to \zeropoint + {\hss + \black\vrule\!!width6\linewidth\!!height3\linewidth\!!depth3\linewidth + \hss}}} + +\def\bodyfontgrid + {\hbox + {{\linewidth.1pt\yellow\smashedgrid[\c!nx=30,\c!ny=30,\c!scale=.3333]}% + {\linewidth.2pt\green \smashedgrid[\c!nx=20,\c!ny=20,\c!scale=.5]}% + {\linewidth.3pt\red \smashedgrid[\c!nx=10,\c!ny=10,\c!scale=1]}}} + +\def\emexgrid + {\hbox + {{\linewidth.15pt\green\smashedgrid[\c!nx=20,\c!ny=20,\c!unit=ex]}% + {\linewidth.15pt\red \smashedgrid[\c!nx=10,\c!ny=10,\c!unit=em]}}} + +%D The next few macros are not really public and kind of low +%D level. They are obscure and a bit perverse. + +\definecolor[llblack][s=0.01] + +\def\lowlevelstream#1#2#3% + {\ifinotr \else + \dontleavehmode + \prewordbreak + \bgroup\bgroup % make sure aftergroup stuff is handled + %\let#1#2\optimizetransparencyfalse\black + \infofont\clap{\vl}\ignorespaces#3\unskip\clap{\vl}% + \egroup\egroup + \prewordbreak + \fi + #2{#3}} + +\let\normalPDFcode\PDFcode +\let\normalspecial\special + +\def\showlowlevelstream + {\def\PDFcode{\lowlevelstream\PDFcode\normalPDFcode}% + \def\special{\lowlevelstream\special\normalspecial}} + +\def\showlowlevelstreamonly + {\def\PDFcode{\lowlevelstream\PDFcode\gobbleoneargument}% + \def\special{\lowlevelstream\special\gobbleoneargument}} + +\let\normaldostartgraymode \dostartgraymode +\let\normaldostartgraycolormode\dostartgraycolormode +\let\normaldostartrgbcolormode \dostartrgbcolormode +\let\normaldostartcmykcolormode\dostartcmykcolormode +\let\normaldostartspotcolormode\dostartspotcolormode + +\def\traceddostartgraymode#1% + {#1\normaldostartgraymode{#1}} + +\def\traceddostartgraycolormode#1% + {#1\normaldostartgraycolormode{#1}} + +\def\traceddostartrgbcolormode#1#2#3% + {#1 #2 #3\normaldostartrgbcolormode{#1}{#2}{#3}} + +\def\traceddostartcmykcolormode#1#2#3#4% + {#1 #2 #3 #4\normaldostartcmykcolormode{#1}{#2}{#3}{#4}} + +\def\traceddostartspotcolormode#1#2% + {#1 #2\normaldostartspotcolormode{#1}{#2}} + +\def\showcolormodes + {\let\dostartgraymode \traceddostartgraymode + \let\dostartgraycolormode\traceddostartgraycolormode + \let\dostartrgbcolormode \traceddostartrgbcolormode + \let\dostartcmykcolormode\traceddostartcmykcolormode + \let\dostartspotcolormode\traceddostartspotcolormode} + +\protect \endinput diff --git a/tex/context/base/math-ams.tex b/tex/context/base/math-ams.tex index ebcef5678..866228324 100644 --- a/tex/context/base/math-ams.tex +++ b/tex/context/base/math-ams.tex @@ -126,6 +126,7 @@ \definemathsymbol [blacktriangleright] [rel] [ma] ["49] \definemathsymbol [blacktriangleleft] [rel] [ma] ["4A] \definemathsymbol [vartriangle] [rel] [ma] ["4D] +\definemathsymbol [triangleup] [ord] [ma] ["4D] % vartriangle \definemathsymbol [blacktriangle] [ord] [ma] ["4E] \definemathsymbol [triangledown] [ord] [ma] ["4F] \definemathsymbol [eqcirc] [rel] [ma] ["50] @@ -327,4 +328,4 @@ \stopmathcollection -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/math-fou.tex b/tex/context/base/math-fou.tex index 9d4fed216..8a72f1288 100644 --- a/tex/context/base/math-fou.tex +++ b/tex/context/base/math-fou.tex @@ -133,6 +133,32 @@ \stopmathcollection +\startmathcollection [fou] + + \definemathsymbol [acute] [accent] [mr] ["1] + \definemathsymbol [grave] [accent] [mr] ["0] + \definemathsymbol [ddot] [accent] [mr] ["4] + \definemathsymbol [tilde] [accent] [mr] ["3] + \definemathsymbol [bar] [accent] [mr] ["9] + \definemathsymbol [breve] [accent] [mr] ["8] + \definemathsymbol [check] [accent] [mr] ["7] + \definemathsymbol [hat] [accent] [mr] ["2] + \definemathsymbol [dot] [accent] [mr] ["A] + \definemathsymbol [mathring] [accent] [mr] ["6] + +\stopmathcollection + +\startmathcollection [fou] + + \definemathsymbol [otheralpha] [ord] [mi] ["0B] + \definemathsymbol [otherbeta] [ord] [mi] ["0C] + \definemathsymbol [othergamma] [ord] [mi] ["0D] + \definemathsymbol [otherdelta] [ord] [mi] ["0E] + \definemathsymbol [otherepsilon] [ord] [mi] ["0F] + \definemathsymbol [otherzeta] [ord] [mi] ["10] + +\stopmathcollection + \protect \endinput % from a mail of Michel B / todo @@ -167,4 +193,4 @@ % \definemathsymbol [othergamma] [ord] [otherletters] ["0D] % \definemathsymbol [otherdelta] [ord] [otherletters] ["0E] % \definemathsymbol [otherepsilon] [ord] [otherletters] ["0F] -% \definemathsymbol [otherzeta] [ord] [otherletters] ["10] \ No newline at end of file +% \definemathsymbol [otherzeta] [ord] [otherletters] ["10] diff --git a/tex/context/base/math-ini.tex b/tex/context/base/math-ini.tex index a18309c74..8f3960f16 100644 --- a/tex/context/base/math-ini.tex +++ b/tex/context/base/math-ini.tex @@ -281,7 +281,7 @@ \endgraf}% \fi} -\def\definemathcommand% +\def\definemathcommand {\dotripleempty\dodefinemathcommand} \def\dodefinemathcommand[#1][#2][#3]#4% command class args meaning @@ -317,10 +317,10 @@ \def\stopmathcollection {\popmacro\mathcollection} -\def\startrawmathcollection% +\def\startrawmathcollection {\startmathcollection} -\def\stoprawmathcollection% +\def\stoprawmathcollection {\stopmathcollection} \newtoks\mathtoks @@ -367,10 +367,10 @@ %D {ifmathpunctuation, enablemathpunctuation, %D definemathpunctuation} %D -%D \starttypen +%D \starttyping %D \definemathpunctuation . mathperiod textperiod %D \definemathpunctuation , mathcomma textcomma -%D \stoptypen +%D \stoptyping \newif\ifmathpunctuation @@ -392,12 +392,12 @@ \futurelet\nexttoken\next} %D \startbuffer -%D \enablemathpunctuationtrue$(1,2) (1, 2) (1{,}2) \hbox{foo, not bar}$ +%D \enablemathpunctuation$(1,2) (1, 2) (1{,}2) \hbox{foo, not bar}$ %D \stopbuffer %D %D \typebuffer %D -%D \blanko{\getbuffer}\blanko +%D \blank{\getbuffer}\blank %D needed for sin, cos etc @@ -435,7 +435,7 @@ %D Bold math: %D -%D \starttypen +%D \starttyping %D \usetypescript [lucida] [texnansi] %D %D \definetypeface [boldmath] [rm] [serif] @@ -454,7 +454,7 @@ %D \switchtobodyfont[boldmath,10pt] %D %D \showmathtoken{Gamma} $\Gamma \Delta \alpha \delta \zeta$ -%D \stoptypen +%D \stoptyping \protect \endinput @@ -465,10 +465,11 @@ \setupbodyfont[lbr] \enablemathcollection[lbr] \input math-lbr \page \setupbodyfont[eul] \enablemathcollection[eul] \input math-eul \stoptext -% to be checked +% to be checked, overloads supp-lan ! \def\defineactivecharacter #1 #2% - {\scratchcounter=\the\uccode`~ +% {\scratchcounter=\the\uccode`~ + {\scratchcounter\uccode`~\relax \expandafter\doifnumberelse\expandafter{\string#1} {\catcode #1=\@@active \uccode`~= #1\relax} {\catcode`#1=\@@active \uccode`~=`#1\relax}% @@ -481,19 +482,25 @@ \expandafter\def\next{\dohandleactivecharacter{#1}{#2}}% new \uccode`~=\scratchcounter} -\def\dohandleactivecharacter% +\def\dohandleactivecharacter {\ifmmode \expandafter\dohandleactivemathcharacter \else \expandafter\secondoftwoarguments \fi} -\let\dohandleactivemathcharacter\secondoftwoarguments - -\def\dohandleactivemathcharacter#1#2% - {\ifundefined{@ma@\string#1} +\def\dohandleactivemathcharacter#1#2#3% + {\ifundefined{@ma@\string#2}% \expandafter\firstofoneargument \else - \getvalue{@ma@\string#1}% + \getvalue{@ma@\string#2}% \expandafter\gobbleoneargument - \fi{#2}} + \fi{#3}} + +% \def\dohandleactivemathcharacter#1#2% +% {\ifcsname @ma@\string#1\endcsname +% \csname @ma@\string#1\expandafter\endcsname +% \expandafter\gobbleoneargument +% \else +% \expandafter\firstofoneargument +% \fi{#2}} diff --git a/tex/context/base/math-run.tex b/tex/context/base/math-run.tex index e24acb4d5..c2a5852a0 100644 --- a/tex/context/base/math-run.tex +++ b/tex/context/base/math-run.tex @@ -16,9 +16,9 @@ \gdef\showmathcharacters% nearly \showcharacters {\par \bgroup - \setuptextrules[\c!korps=,\c!letter=] + \setuptextrules[\c!bodyfont=,\c!style=] \starttextrule{math characters} - \witruimte + \whitespace \dontcomplain \forgetall \def\startmathcollection[##1]{} @@ -48,7 +48,7 @@ \advance\dimen2 2em \divide \dimen0 by \dimen2 \advance\dimen0 1sp \edef\enccols{\number\dimen0} - \startcolumns[\c!n=\enccols,\c!afstand=2em] + \startcolumns[\c!n=\enccols,\c!distance=2em] \def\dodefinemathsymbol[##1][##2][##3][##4][##5][##6]% {%\localcolortrue %\color diff --git a/tex/context/base/math-tex.tex b/tex/context/base/math-tex.tex index 5112cdf0b..0e474a892 100644 --- a/tex/context/base/math-tex.tex +++ b/tex/context/base/math-tex.tex @@ -532,4 +532,4 @@ \definemathpunctuation . mathperiod textperiod \definemathpunctuation , mathcomma textcomma -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/math-tim.tex b/tex/context/base/math-tim.tex index 9069b2f89..de6561ba7 100644 --- a/tex/context/base/math-tim.tex +++ b/tex/context/base/math-tim.tex @@ -64,12 +64,12 @@ %D surprise that the Math Times fonts have different specs %D than the Computer Modern Roman fonts. %D -%D \starttabulatie[|Bl|c|c|c|c|c|c|c|c|c|c|] +%D \starttabulate[|Bl|c|c|c|c|c|c|c|c|c|c|] %D \NC Computer Modern\NC %D 5 \NC6 \NC7 \NC8 \NC9 \NC10 \NC11 \NC12 \NC14 \NC18\NC\NR %D \NC Math Times \NC %D 6.0\NC6.8\NC7.6\NC8.4\NC9.2\NC10.0\NC10.8\NC11.6\NC13.2\NC--\NC\NR -%D \stoptabulatie +%D \stoptabulate %D %D The following definitions presume the existence of \type %D {tio} and \type {tibio} font alternatives. Definitions for @@ -106,11 +106,11 @@ %D The following definitions are mostly copied from the file %D \type {mtmacs.tex}, which banner said: %D -%D \starttypen +%D \starttyping %D MTMACS.TEX VERSION 1.1.1 (1996 Dec 8) %D COPYRIGHT (C) 1992, 1993, 1996 BY THE TEXPLORATORS CORPORATION %D ALL RIGHTS RESERVED -%D \stoptypen +%D \stoptyping %D %D We reformatted the macros and changed a few bits and %D pieces. A further cleanup with regards to the scratch diff --git a/tex/context/base/meta-clp.tex b/tex/context/base/meta-clp.tex index a160e7661..be2506b19 100644 --- a/tex/context/base/meta-clp.tex +++ b/tex/context/base/meta-clp.tex @@ -127,14 +127,14 @@ %D predefined. When applied to a whole picture, their usage %D is: %D -%D \starttypen +%D \starttyping %D \clip[nx=1,ny=1,mp=ellipse]{some clippable content} -%D \stoptypen +%D \stoptyping %D %D \startbuffer %D \setupclipping [nx=1,ny=1,x=1,y=1] %D \setupblackrules[width=2cm,height=1cm] -%D \startcombinatie[6*3] % \startcombination[6*3] +%D \startcombination[6*3] % \startcombination[6*3] %D {\clip[mp=urellipse] {\blackrule}} {urellipse} %D {\clip[mp=ulellipse] {\blackrule}} {ulellipse} %D {\clip[mp=llellipse] {\blackrule}} {llellipse} @@ -153,12 +153,12 @@ %D {\clip[mp=lrtriangle]{\blackrule}} {lrtriangle} %D {\clip[mp=diamond] {\blackrule}} {diamond} %D {\clip[mp=negdiamond]{\blackrule}} {negdiamond} -%D \stopcombinatie % \stopcombination +%D \stopcombination % \stopcombination %D \stopbuffer %D -%D \plaatsfiguur % \placefigure +%D \placefigure % \placefigure %D [here][fig:clipping paths] %D {The predefined clipping paths.} -%D {\haalbuffer} % {\getbuffer} +%D {\getbuffer} % {\getbuffer} -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/meta-dum.tex b/tex/context/base/meta-dum.tex index fafd56d8a..47c550477 100644 --- a/tex/context/base/meta-dum.tex +++ b/tex/context/base/meta-dum.tex @@ -20,14 +20,6 @@ %D \useMPlibrary[dum] %D %D \startlinecorrection -%D \useMPgraphic{placeholder}{width=3cm,height=4cm,color=red} -%D \stoplinecorrection -%D -%D \startlinecorrection -%D \useMPgraphic{placeholder}{width=8cm,height=10cm,color=green} -%D \stoplinecorrection -%D -%D \startlinecorrection %D \externalfigure[unknown-a][width=3cm,height=1cm] %D \stoplinecorrection %D @@ -75,8 +67,8 @@ \let\figurereplacementcycle\relax \setupexternalfigures - [\c!reductie=0, - \c!tekst=\v!ja] + [\c!reduction=0, + \c!text=\v!yes] \def\externalfigurereplacement#1#2#3% {\getpaletsize[placeholder]% @@ -96,17 +88,17 @@ {placeholder}% {width=\figurewidth, height=\figureheight, - reduction=\@@efreductie, + reduction=\@@efreduction, color=placeholder:\figurereplacementcycle}]% \expanded{\localframed [\??ef] - [\c!breedte=\figurewidth, - \c!hoogte=\figureheight, - \c!kader=\v!uit, - \c!strut=\v!nee, - \c!achtergrond=\s!dummy, - \c!voorgrondkleur=white]}% - {\doif\@@eftekst\v!ja + [\c!width=\figurewidth, + \c!height=\figureheight, + \c!frame=\v!off, + \c!strut=\v!no, + \c!background=\s!dummy, + \c!foregroundcolor=\s!white]}% + {\doif\@@eftext\v!yes {\infofont \setupinterlinespace \dohyphens % \nohyphens \doifelse{#1}\s!dummy \!!doneafalse\!!doneatrue \doifelse{#2}\s!dummy \!!donebfalse\!!donebtrue @@ -124,4 +116,4 @@ \def\dummyfigure{\externalfigure[placeholder]} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/meta-fig.tex b/tex/context/base/meta-fig.tex index 6094e4ca1..9a46b80d4 100644 --- a/tex/context/base/meta-fig.tex +++ b/tex/context/base/meta-fig.tex @@ -22,7 +22,7 @@ %D whole \CONTEXT\ machinery is available, you can also add %D page backgrounds. %D -%D \starttypen +%D \starttyping %D \setupMPpage %D [offset=1pt, %D background=color, @@ -35,7 +35,7 @@ %D \startMPpage %D fill fullsquare rotated 45 scaled 8cm withcolor blue ; %D \stopMPpage -%D \stoptypen +%D \stoptyping %D %D Although this is hardly of any use, you can mix these %D definitions with the text flow, since all settings are @@ -55,13 +55,13 @@ \dostopfittingpage} \setupMPpage - [\c!schaal=1000, - \c!strut=\v!nee, - \c!uitlijnen=, + [\c!scale=1000, + \c!strut=\v!no, + \c!align=, \c!offset=\v!overlay, - \c!breedte=\v!passend, - \c!hoogte=\v!passend, - \c!kader=\v!uit] + \c!width=\v!fit, + \c!height=\v!fit, + \c!frame=\v!off] %D \macros %D {MPfigure} @@ -70,7 +70,7 @@ \def\MPfigure#1#2% test for dup figure {\bgroup - \getfiguredimensionsonly[#1]% [\c!object=\v!nee] already set + \getfiguredimensionsonly[#1]% [\c!object=\v!no] already set \freezedimenmacro\naturalfigurewidth \freezedimenmacro\naturalfigureheight \startMPcode diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex index 22360919f..058fa0bc8 100644 --- a/tex/context/base/meta-ini.tex +++ b/tex/context/base/meta-ini.tex @@ -1,5 +1,4 @@ %D \module -%D \module %D [ file=meta-ini, %D version=1999.07.10, %D title=\METAPOST\ Graphics, @@ -66,32 +65,37 @@ \maxnofMPgraphics = 4000 % metafun disables the 4K boundary \appendtoks - if unknown context_tool : input mp-tool ; fi ; - if unknown context_spec : input mp-spec ; fi ; - if unknown context_grph : input mp-grph ; fi ; -\to \MPinitializations + if unknown context_tool: input mp-tool; fi; + if unknown context_spec: input mp-spec; fi; + if unknown context_grph: input mp-grph; fi; +\to \MPextensions %D Since we want lables to follow the document settings, we %D also set the font related variables. -\appendtoks - defaultfont := "\truefontname{Regular}" ; - defaultscale := \the\bodyfontsize/10pt ; % not good yet +\appendtoks % scale is not yet ok + defaultfont:="\truefontname{Regular}"; + defaultscale:=\the\bodyfontsize/10pt; \to \MPinitializations %D In order to support fancy text features (like outline %D fonts), we set: \appendtoks - graphictextformat := "context" ; - graphictextdirective "\the\everyMPTEXgraphic" ; -\to \MPinitializations + graphictextformat:="context"; + graphictextdirective "\the\everyMPTEXgraphic"; +\to \MPextensions + +% \appendtoks +% textextdirective "\the\everyMPTEXgraphic"; +% \to \MPextensions %D A signal that we're in combines \CONTEXT||\METAFUN mode: \appendtoks - string contextversion ; contextversion := "\contextversion" ; -\to \MPinitializations + string contextversion; + contextversion:="\contextversion"; +\to \MPextensions %D Some safeguards: @@ -122,9 +126,9 @@ %D backgrounds. To prevent conflicts, we will use the \type %D {-} in \METAPOST\ specific variables, like: %D -%D \starttypen +%D \starttyping %D \setupMPvariables[meta:button][size=20pt] -%D \stoptypen +%D \stoptyping \def\@@meta{meta:} @@ -174,19 +178,19 @@ %D to use graphics that adapt themselves. The next \METAPOST\ %D kind of graphic is both unique and reused when possible. %D -%D \starttypen +%D \starttyping %D \defineoverlay[example][\uniqueMPgraphic{test}] %D %D \startuniqueMPgraphic {test} %D draw unitsquare xscaled \overlaywidth yscaled \overlayheight ; %D \stopuniqueMPgraphic -%D \stoptypen +%D \stoptyping %D For educational purposes, we show the original version %D first. This one used a rather simple method for determining %D the uniqueness. %D -%D \starttypen +%D \starttyping %D \long\def\startuniqueMPgraphic#1#2\stopuniqueMPgraphic% %D {\setvalue{\@@MPG#1}% %D {\startreusableMPgraphic{\overlaystamp:#1}#2\stopreusableMPgraphic @@ -194,7 +198,7 @@ %D %D \def\uniqueMPgraphic#1% %D {\getvalue{\@@MPG#1}} -%D \stoptypen +%D \stoptyping %\def\overlaystamp % watch the \MPcolor, since colors can be redefined % {\overlaywidth:\overlayheight:\overlaydepth @@ -210,17 +214,17 @@ %D uniqueness, as well as prepare variables for passing them to %D \METAPOST. %D -%D \starttypen +%D \starttyping %D \startuniqueMPgraphic{meta:hash}{gap,angle,...} -%D \stoptypen +%D \stoptyping %D %D The calling macro also accepts a second argument. For %D convenient use in overlay definitions, we use \type {{}} %D instead of \type {[]}. %D -%D \starttypen +%D \starttyping %D \uniqueMPgraphic{meta:hash}{gap=10pt,angle=30} -%D \stoptypen +%D \stoptyping \long\def\handleuniqueMPgraphic#1#2#3% {\blabelgroup @@ -369,12 +373,12 @@ %D One way of defining a stamp is: %D -%D \starttypen +%D \starttyping %D \def\extendMPoverlaystamp#1% %D {\def\docommando##1% %D {\edef\overlaystamp{\overlaystamp:\MPvariable{##1}}}% %D \processcommalist[#1]\docommando} -%D \stoptypen +%D \stoptyping %D Since we need to feed \METAPOST\ with expanded dimensions, %D we introduce a dedicated expansion engine. @@ -400,7 +404,7 @@ \doifelsenothing\theMPvariable {\setevalue{#1}{\MPcolor{black}}} {\convertcommand\theMPvariable\to\ascii % otherwise problems - \doifcolorelse \ascii % with 2\bodyfontsize + \doifcolorelse \ascii % with 2\bodyfontsize {\setevalue{#1}{\MPcolor\theMPvariable}} {% can be aux macro \setbox\scratchbox\hbox{\scratchdimen\theMPvariable sp}% @@ -447,12 +451,12 @@ %D We also have to make sure that \METAPOST\ knows this: \appendtoks - if not known _data_prefix_ : - string _data_prefix_ , _data_suffix_ ; - fi ; - _data_prefix_ := "\bufferprefix mpd-" ; - _data_suffix_ := ".mpd" ; -\to \MPinitializations + if not known _data_prefix_: + string _data_prefix_,_data_suffix_; + fi; + _data_prefix_:="\bufferprefix mpd-"; + _data_suffix_:=".mpd"; +\to \MPextensions %D \macros %D {getMPdata} @@ -479,9 +483,9 @@ %D We have to enable this mechanism with: \appendtoks - boolean collapse_data ; collapse_data := true ; - _data_suffix_ := ".mpd" ; % overloads previous one -\to \MPinitializations + boolean collapse_data; collapse_data:=true; + _data_suffix_:=".mpd"; % overloads previous one +\to \MPextensions %D For the moment, the next one is a private macro: @@ -540,7 +544,7 @@ \long\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment {\egroup \doif{#1}\s!reset\resetMPenvironment % reset mp toks - \doif{#1}\v!globaal{#3}% % use in main doc too + \doif{#1}\v!global{#3}% % use in main doc too \doif{#1}+{#3}% % use in main doc too \convertargument#3\to\ascii \expandafter\appendtoks\ascii\to\everyMPTEXgraphic} @@ -556,7 +560,7 @@ %D This command takes \type {[reset]} as optional %D argument. %D -%D \starttypen +%D \starttyping %D \startMPenvironment %D \setupbodyfont[pos,14.4pt] %D \stopMPenvironment @@ -564,7 +568,7 @@ %D \startMPcode %D draw btex \sl Hans Hagen etex scaled 5 ; %D \stopMPcode -%D \stoptypen +%D \stoptyping %D %D The \type {\resetMPenvironment} is a quick way to erase %D the token list. @@ -610,13 +614,14 @@ %D accomplished by: \def\douseMPlibrary#1% - {\doifundefined{\c!file\f!javascriptprefix#1} - {\letvalueempty{\c!file\f!javascriptprefix#1}% - \makeshortfilename[\f!metapostprefix#1] - \showmessage\m!metapost1{#1} - \startreadingfile - \readsysfile\shortfilename\donothing\donothing - \stopreadingfile}} + {\ifundefined{\c!file\f!javascriptprefix#1}% + \letvalueempty{\c!file\f!javascriptprefix#1}% + \makeshortfilename[\f!metapostprefix#1] + \showmessage\m!metapost1{#1} + \startreadingfile + \readsysfile\shortfilename\donothing\donothing + \stopreadingfile + \fi} \def\useMPlibrary[#1]% {\processcommalist[#1]\douseMPlibrary} @@ -656,8 +661,8 @@ \newif\ifMPspotcolors \MPspotcolorstrue \appendtoks - cmykcolors := \ifMPcmykcolors true \else false \fi ; - spotcolors := \ifMPspotcolors true \else false \fi ; + cmykcolors:=\ifMPcmykcolors true\else false\fi; + spotcolors:=\ifMPspotcolors true\else false\fi; \to \MPinitializations %D In order to communicate conveniently with the \TEX\ @@ -665,37 +670,35 @@ % todo : backgroundoffsets -\startuseMPgraphic{init data} - color OverlayColor, OverlayLineColor ; - % - OverlayWidth := \overlaywidth ; - OverlayHeight := \overlayheight ; - OverlayDepth := \overlayheight ; - OverlayColor := \MPcolor{\overlaycolor} ; - OverlayLineWidth := \overlaylinewidth ; - OverlayLineColor := \MPcolor{\overlaylinecolor} ; +\appendtoks + color OverlayColor,OverlayLineColor; +\to \MPextensions + +\appendtoks + OverlayWidth:=\overlaywidth; + OverlayHeight:=\overlayheight; + OverlayDepth:=\overlayheight; + OverlayColor:=\MPcolor{\overlaycolor}; + OverlayLineWidth:=\overlaylinewidth; + OverlayLineColor:=\MPcolor{\overlaylinecolor}; % - BaseLineSkip := \the\baselineskip ; - LineHeight := \the\baselineskip ; - BodyFontSize := \the\bodyfontsize ; + BaseLineSkip:=\the\baselineskip; + LineHeight:=\the\baselineskip; + BodyFontSize:=\the\bodyfontsize; % - TopSkip := \the\topskip ; - StrutHeight := \strutheight ; - StrutDepth := \strutdepth ; + TopSkip:=\the\topskip; + StrutHeight:=\strutheight; + StrutDepth:=\strutdepth; % - CurrentWidth := \the\hsize ; - CurrentHeight := \the\vsize ; + CurrentWidth:=\the\hsize; + CurrentHeight:=\the\vsize; % - EmWidth := \the\fontdimen6\font ; - ExHeight := \the\fontdimen5\font ; + EmWidth:=\the\fontdimen6\font; + ExHeight:=\the\fontdimen5\font; % - PageNumber := \the\pageno ; - RealPageNumber := \the\realpageno ; - LastPageNumber := \lastpage ; -\stopuseMPgraphic - -\appendtoks - \includeMPgraphic{init data} + PageNumber:=\the\pageno; + RealPageNumber:=\the\realpageno; + LastPageNumber:= lastpage; \to \MPinitializations \appendtoks @@ -737,7 +740,7 @@ \ifx\undefined\MPprologues \def\MPprologues{0} \fi \appendtoks - prologues := \MPprologues ; + prologues:=\MPprologues; \to \MPinitializations \appendtoks @@ -768,7 +771,7 @@ %D First we present the reasonable fast alternative that we %D happily used for some time. %D -%D \starttypen +%D \starttyping %D \def\insertMPfile#1#2% %D {\ifx\undefined\externalfigure %D \message{[insert file #1 here]}% @@ -777,24 +780,19 @@ %D \the\everyinsertMPfile %D \externalfigure %D [#1] -%D [\c!type=\c!mps,\c!object=\v!nee,% -%D \c!symbool=\v!ja,\c!reset=\v!ja,% -%D \c!maxbreedte=,\c!maxhoogte=,% -%D \c!kader=\v!uit,\c!achtergrond=,% +%D [\c!type=\c!mps,\c!object=\v!no,% +%D \c!symbol=\v!yes,\c!reset=\v!yes,% +%D \c!maxwidth=,\c!maxheight=,% +%D \c!frame=\v!off,\c!background=,% %D #2]% %D \egroup %D \fi} -%D \stoptypen +%D \stoptyping %D %D However, on a 1 Gig Pentium, the next alternative saves %D us 20 seconds run time for the 300 page \METAFUN\ manual: -\def\insertMPfile#1#2% - {\doiffileelse{./#1} - {\ifcase\pdfoutput - \@EA\includeMPasEPS\else\@EA\includeMPasPDF - \fi{./#1}} - {\message{[MP #1]}}} +\def\insertMPfile#1#2{\doinsertMPfile{#1}} \def\includeMPasEPS#1% {\bgroup @@ -804,8 +802,8 @@ \setbox\scratchbox\vbox to \!!heightb {\vfill \doinsertfile - {\c!mps,\c!mps}{#1,\empty}{100}{100} - \!!widtha\!!heighta\!!widthb\!!heightb{0}}% + {\c!mps,\c!mps}{#1,\empty}{100}{100}% + \!!widtha\!!heighta\!!widthb\!!heightb\zerocount}% \wd\scratchbox\!!widthb \dp\scratchbox\zeropoint \box\scratchbox @@ -814,8 +812,8 @@ \def\includeMPasPDF#1% {\bgroup \the\everyinsertMPfile - \ifinobject \else \chardef\makeMPintoPDFobject=2 \fi % when needed - \convertMPtoPDF{#1}{1}{1}% + \ifinobject \else \chardef\makeMPintoPDFobject\plustwo \fi % when needed + \convertMPtoPDF{#1}{1}{1}% no \plusone ! \egroup} %D So, using a low level approach (thereby avoiding the slower @@ -838,20 +836,23 @@ \appendtoks def initialize_form_numbers = - do_initialize_numbers ; - enddef ; + do_initialize_numbers; + enddef; +\to \MPextensions + +\appendtoks + HSize:=\the\hsize ; + VSize:=\the\vsize ; \to \MPinitializations \appendtoks - HSize := \the\hsize ; - VSize := \the\vsize ; vardef ForegroundBox = unitsquare xysized(HSize,VSize) enddef ; vardef PageFraction = - if \lastpage>1 : (\realfolio-1)/(\lastpage-1) else : 1 fi + if \lastpage>1: (\realfolio-1)/(\lastpage-1) else: 1 fi enddef ; -\to \MPinitializations +\to \MPextensions %D And some more. These are not really needed since we %D don't use the normal figure inclusion macros any longer. @@ -911,7 +912,7 @@ [mp] [\c!y=-\MPury bp, \c!x=\MPllx bp, - \c!methode=\v!passend] + \c!method=\v!fit] \definelayer [mp] @@ -919,7 +920,7 @@ %D Usage: %D -%D \starttypen +%D \starttyping %D \defineproperty[one][layer][state=start] %D \defineproperty[two][layer][state=stop] %D @@ -934,8 +935,8 @@ %D \setlayer[mp]{\property[one]{\useMPgraphic{step-1}}} %D \setlayer[mp]{\property[two]{\useMPgraphic{step-2}}} %D -%D \ruledhbox{\tightlayer[mp]} -%D \stoptypen +%D \ruledhbox{\flushlayer[mp]} +%D \stoptyping %D New: @@ -947,4 +948,4 @@ % % linecap := rounded ; % linejoin := rounded ; -% drawoptions () ; \ No newline at end of file +% drawoptions () ; diff --git a/tex/context/base/meta-nav.tex b/tex/context/base/meta-nav.tex index bb409f7fc..9c1cbb4db 100644 --- a/tex/context/base/meta-nav.tex +++ b/tex/context/base/meta-nav.tex @@ -59,7 +59,7 @@ \unprotect -\setupcomment [\c!symbool={comment-normal,comment-down}] -\setupattachments[\c!symbool={attach-normal,attach-down}] +\setupcomment [\c!symbol={comment-normal,comment-down}] +\setupattachments[\c!symbol={attach-normal,attach-down}] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/meta-pag.tex b/tex/context/base/meta-pag.tex index 65a62f3dc..32473cb74 100644 --- a/tex/context/base/meta-pag.tex +++ b/tex/context/base/meta-pag.tex @@ -20,65 +20,72 @@ \unprotect \appendtoks - if unknown context_page : input mp-page ; fi ; -\to \MPinitializations + if unknown context_page: input mp-page; fi; +\to \MPextensions %D The next few macros tell \METAPOST\ how the \CONTEXT\ %D pagebody looks. -\startuseMPgraphic{page data} - boolean PageStateAvailable, OnRightPage, InPageBody ; - PageStateAvailable := OnRightPage := true ; - InPageBody := \ifinpagebody true \else false \fi ; +\appendtoks + boolean PageStateAvailable,OnRightPage,InPageBody; + PageStateAvailable:=true; +\to \MPextensions + +\appendtoks + OnRightPage:=true; + InPageBody:=\ifinpagebody true \else false \fi; +\to \MPinitializations + +\appendtoks def LoadPageState = - OnRightPage := \MPonrightpage ; - OnOddPage := \MPonoddpage ; - RealPageNumber := \the\realpageno ; - PageNumber := \the\pageno ; - NOfPages := \lastpage ; - PaperHeight := \the\papierhoogte ; - PaperWidth := \the\papierbreedte ; - PrintPaperHeight := \the\printpapierhoogte ; - PrintPaperWidth := \the\printpapierbreedte ; - TopSpace := \the\kopwit ; - BottomSpace := \the\bodemwit ; - BackSpace := \the\rugwit ; - CutSpace := \the\snijwit ; - MakeupHeight := \the\zethoogte ; - MakeupWidth := \the\zetbreedte ; - TopHeight := \the\bovenhoogte ; - TopDistance := \@the\bovenafstand ; - HeaderHeight := \the\hoofdhoogte ; - HeaderDistance := \@the\hoofdafstand ; - TextHeight := \the\teksthoogte ; - FooterDistance := \@the\voetafstand ; - FooterHeight := \the\voethoogte ; - BottomDistance := \@the\onderafstand ; - BottomHeight := \the\onderhoogte ; - LeftEdgeWidth := \the\linkerrandbreedte ; - LeftEdgeDistance := \@the\linkerrandafstand ; - LeftMarginWidth := \the\linkermargebreedte ; - LeftMarginDistance := \@the\linkermargeafstand ; - TextWidth := \the\tekstbreedte ; - RightMarginDistance := \@the\rechtermargeafstand ; - RightMarginWidth := \the\rechtermargebreedte ; - RightEdgeDistance := \@the\rechterrandafstand ; - RightEdgeWidth := \the\rechterrandbreedte ; - InnerMarginDistance := \@the\innermargindistance ; - InnerMarginWidth := \the\innermarginwidth ; - OuterMarginDistance := \@the\outermargindistance ; - OuterMarginWidth := \the\outermarginwidth ; - InnerEdgeDistance := \@the\inneredgedistance ; - InnerEdgeWidth := \the\inneredgewidth ; - OuterEdgeDistance := \@the\outeredgedistance ; - OuterEdgeWidth := \the\outeredgewidth ; - PageOffset := \the\pageoffset ; - PageDepth := \the\pagedepth ; - LayoutColumns := \the\layoutcolumns ; - LayoutColumnDistance:= \the\layoutcolumndistance ; - LayoutColumnWidth := \the\layoutcolumnwidth ; - enddef ; -\stopuseMPgraphic + OnRightPage:=\MPonrightpage; + OnOddPage:=\MPonoddpage; + RealPageNumber:=\the\realpageno; + PageNumber:=\the\pageno; + NOfPages:=\lastpage; + PaperHeight:=\the\paperheight; + PaperWidth:=\the\paperwidth; + PrintPaperHeight:=\the\printpaperheight; + PrintPaperWidth:=\the\printpaperwidth; + TopSpace:=\the\topspace; + BottomSpace:=\the\bottomspace; + BackSpace:=\the\backspace; + CutSpace:=\the\cutspace; + MakeupHeight:=\the\makeupheight; + MakeupWidth:=\the\makeupwidth; + TopHeight:=\the\topheight; + TopDistance:=\the\topdistance; + HeaderHeight:=\the\headerheight; + HeaderDistance:=\the\headerdistance; + TextHeight:=\the\textheight; + FooterDistance:=\the\footerdistance; + FooterHeight:=\the\footerheight; + BottomDistance:=\the\bottomdistance; + BottomHeight:=\the\bottomheight; + LeftEdgeWidth:=\the\leftedgewidth; + LeftEdgeDistance:=\the\leftedgedistance; + LeftMarginWidth:=\the\leftmarginwidth; + LeftMarginDistance:=\the\leftmargindistance; + TextWidth:=\the\textwidth ; + RightMarginDistance:=\the\rightmargindistance; + RightMarginWidth:=\the\rightmarginwidth; + RightEdgeDistance:=\the\rightedgedistance; + RightEdgeWidth:=\the\rightedgewidth; + InnerMarginDistance:=\the\innermargindistance; + InnerMarginWidth:=\the\innermarginwidth; + OuterMarginDistance:=\the\outermargindistance; + OuterMarginWidth:=\the\outermarginwidth; + InnerEdgeDistance:=\the\inneredgedistance; + InnerEdgeWidth:=\the\inneredgewidth; + OuterEdgeDistance:=\the\outeredgedistance; + OuterEdgeWidth:=\the\outeredgewidth; + PageOffset:=\the\pageoffset; + PageDepth:=\the\pagedepth; + LayoutColumns:=\the\layoutcolumns; + LayoutColumnDistance:=\the\layoutcolumndistance; + LayoutColumnWidth:=\the\layoutcolumnwidth; + enddef; +\to \MPinitializations \def\MPonrightpage{true} \def\MPonoddpage {true} @@ -93,23 +100,7 @@ \od \edef\MPonoddpage{\doifoddpageelse{true}{false}}} -\iffixedlayoutdimensions - - \let\freezeMPlayout\relax - -\else - - \def\freezeMPlayout% must be done more efficient - {\freezedimenmacro\bovenafstand - \freezedimenmacro\hoofdafstand - \freezedimenmacro\voetafstand - \freezedimenmacro\onderafstand - \freezedimenmacro\linkerrandafstand - \freezedimenmacro\linkermargeafstand - \freezedimenmacro\rechtermargeafstand - \freezedimenmacro\rechterrandafstand} - -\fi +\let\freezeMPlayout\relax % obsolete %D We need to freeze the pagelayout before the backgrounds %D are build, because the overlay will temporarily become @@ -129,10 +120,6 @@ \freezeMPlayout % to be used grouped \to \everyMPgraphic -\appendtoks - \includeMPgraphic{page data} -\to \MPinitializations - %D The next feature provides information about for instance %D column positions. This is an experimental feature, %D introduced when we needed backgrounds in columns (fill||in @@ -140,14 +127,14 @@ %D %D See \type {mp-page.mp} for the definition of the macros: %D -%D \startabulatie[|tl|l|p|] +%D \starttabulate[|tl|l|p|] %D \NC ResetTextAreas \NC no arguments \NC %D reset areas on page \NC \NR %D \NC RegisterTextArea \NC x, y, w, h \NC %D adds area to the list \NC \NR %D \NC TextAreaX,Y,W,H,XY,WH \NC x and/or y \NC %D reports offsets and dimensions \NC \NR -%D \stoptabulatie +%D \stoptabulate %D %D The \type {TextArea*} macros can be used to determine %D overlap. @@ -198,20 +185,19 @@ {\global\MPlocaltextareadata\emptytoks} \appendtoks - \includeMPgraphic{area data}% -\to \MPinitializations + path PlainTextArea; +\to \MPextensions -\startuseMPgraphic{area data} - ResetTextAreas ; - \the\MPsavedtextareadata - SaveTextAreas ; - ResetTextAreas ; - \the\MPtextareadata - \the\MPlocaltextareadata - % maybe tzt somewhere else - path PlainTextArea ; PlainTextArea := - boundingbox(\MPxy{text:\realfolio}--\MPxy{text:\realfolio} shifted (\MPw{text:\realfolio},\MPh{text:\realfolio})) ; -\stopuseMPgraphic +\appendtoks + ResetTextAreas; + \the\MPsavedtextareadata; + SaveTextAreas; + ResetTextAreas; + \the\MPtextareadata; + \the\MPlocaltextareadata; + PlainTextArea:=boundingbox(\MPxy{text:\realfolio}--\MPxy{text:\realfolio} + shifted (\MPw{text:\realfolio},\MPh{text:\realfolio})); +\to \MPinitializations \appendtoks \global\MPsavedtextareadata\MPtextareadata diff --git a/tex/context/base/meta-txt.tex b/tex/context/base/meta-txt.tex index 58ebb399c..6f8be2e67 100644 --- a/tex/context/base/meta-txt.tex +++ b/tex/context/base/meta-txt.tex @@ -1,34 +1,36 @@ %D \module %D [ file=meta-txt, %D version=2000.07.06, -%D title=\METAPOST\ Graphics, -%D subtitle=Text Tricks, +%D title=\METAPOST\ Graphics, +%D subtitle=Text Tricks, %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 In this library some handy text manipulations are -%D defined. Some can and will be improved as soon as the -%D \TEX||\METAPOST\ interface is stable. Some of the -%D solutions may look weird, which is entirely my fault, -%D since I implemented them in the process of getting grip -%D on this kind of manipulations. Undoubtly better +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D In this library some handy text manipulations are +%D defined. Some can and will be improved as soon as the +%D \TEX||\METAPOST\ interface is stable. Some of the +%D solutions may look weird, which is entirely my fault, +%D since I implemented them in the process of getting grip +%D on this kind of manipulations. Undoubtly better %D \METAPOST\ code is possible, but my way of learning -%D this kind of trickery happens to be by \quote {trial -%D and error} and \quote {look and feel} (as well as -%D identifying tricks in Hobby's code). +%D this kind of trickery happens to be by \quote {trial +%D and error} and \quote {look and feel} (as well as +%D identifying tricks in Hobby's code). + +% textext ipv btex ... etex \unprotect \appendtoks - if unknown context_text : input mp-text ; fi ; -\to \MPinitializations + if unknown context_text: input mp-text; fi; +\to \MPextensions -%%%%%%% +%%%%%%% % \def\newchar#1{\chardef#1=0 } @@ -36,7 +38,7 @@ \newdimen\parheight \newdimen\parvoffset \newdimen\parhoffset -\newcount\parlines +\newcount\parlines \newtoks \partoks \newbox \shapetextbox \newif \ifparseries @@ -45,14 +47,14 @@ \def\startshapetext[#1]% {\global\newcounter\currentshapetext \global\setbox\shapetextbox=\vbox\bgroup - \expanded{\switchtobodyfont[\@@shkorps]}% + \expanded{\switchtobodyfont[\@@shbodyfont]}% \dontcomplain \hsize\parwidth - \setuptolerance[\v!zeersoepel,\v!rek]% + \setuptolerance[\v!verytolerant,\v!stretch]% \!!counta=0 \!!toksa=\emptytoks \def\docommando##1% - {\setbox\scratchbox=\hbox{\useMPgraphic{##1}}% + {\setbox\scratchbox=\hbox{\useMPgraphic{##1}}% \global\chardef\parfirst=0 \getMPdata % \readlocfile{\MPdatafile}{}{}% \setshapecharacteristics @@ -62,10 +64,10 @@ \global\parseriestrue \xdef\totalparlines{\the\!!counta}% \global\partoks\!!toksa - %\ifx\partoks\emptytoks\else % safeguard + %\ifx\partoks\emptytoks\else % safeguard \expanded{\parshape \the\!!counta \the\!!toksa}% %\fi - \setshapecharacteristics % extra dummy + \setshapecharacteristics % extra dummy \ifparseries\def\par{\endgraf\adaptparshape}\fi \EveryPar{\begstrut}} @@ -81,18 +83,18 @@ {\ifcase\!!counta \expandafter\appendtoks\space##1 \to\!!toksa \else - \advance\!!counta by -1 + \advance\!!counta \minusone \fi}% - \!!counta\prevgraf + \!!counta\prevgraf \doglobal\decrement(\totalparlines,\!!counta)% - \multiply\!!counta by 2 + \multiply\!!counta \plustwo \!!toksa\emptytoks \expanded{\processseparatedlist[\the\partoks][\space]}\docommando \global\partoks\!!toksa - %\ifx\partoks\emptytoks\else % safeguard + %\ifx\partoks\emptytoks\else % safeguard \expanded{\parshape\totalparlines\the\partoks}% }%\fi} - + \def\getshapecharacteristics% {\doglobal\increment\currentshapetext \doifdefinedelse{parlines:\currentshapetext} @@ -118,12 +120,12 @@ \setxvalue{parwidth:\currentshapetext }{\the\parwidth}% \setxvalue{parheight:\currentshapetext }{\the\parheight}} -\def\getshapetext% option: unvbox +\def\getshapetext% option: unvbox {\vbox\bgroup \forgetall - \setbox\scratchbox\vbox to \parheight - {\expanded{\switchtobodyfont[\@@shkorps]}% evt strutheight en - \splittopskip\strutheight % lineheight opslaan + \setbox\scratchbox\vbox to \parheight + {\expanded{\switchtobodyfont[\@@shbodyfont]}% evt strutheight en + \splittopskip\strutheight % lineheight opslaan \vskip\parvoffset % scheelt switch en \ifcase\parfirst\or\vskip\lineheight\fi % is ook veiliger \hskip\parhoffset @@ -139,24 +141,25 @@ {\dodoubleempty\getparameters[\??sh]} \setupshapetexts% - [\c!korps=] + [\c!bodyfont=] -%%%%%%% rotfont nog definieren +%%%%%%% rotfont nog definieren -\doifundefined{RotFont}{\definefont[RotFont][RegularBold]} +\doifundefined{RotFont}{\definefont[RotFont][RegularBold]} -\def\processfollowingtoken#1% strut toegevoegd +\def\processfollowingtoken#1% strut toegevoegd {\appendtoks#1\to\MPtoks \setbox\MPbox=\hbox{\RotFont\setstrut\strut\the\MPtoks}% \startMPdrawing n := n + 1 ; len[n] := \the\wd\MPbox ; \stopMPdrawing \startMPdrawing[-] + % pic[n] := textext{\RotFont\setstrut\strut#1} ; % btex \RotFont\setstrut\strut#1 etex ; pic[n] := btex \RotFont\setstrut\strut#1 etex ; \stopMPdrawing} -\startuseMPgraphic{followtokens} - % we default to nothing +\startuseMPgraphic{followtokens} + % we default to nothing \stopuseMPgraphic \def\followtokens#1% @@ -164,7 +167,7 @@ \forgetall \dontcomplain \startMPenvironment - \doifundefined{RotFont}{\definefont[RotFont][RegularBold]} + \doifundefined{RotFont}{\definefont[RotFont][RegularBold]} \stopMPenvironment \MPtoks\emptytoks \resetMPdrawing @@ -178,35 +181,35 @@ if unknown RotColor : color RotColor ; RotColor := black ; fi ; if unknown TraceRot : boolean TraceRot ; TraceRot := false ; fi ; if unknown ExtraRot : numeric ExtraRot ; ExtraRot := 0 ; fi ; - numeric al, at, pl, wid, pos ; pair ap, ad ; + numeric al, at, pl, wid, pos ; pair ap, ad ; al := arclength RotPath ; if al=0 : - al := len[n] + ExtraRot ; + al := len[n] + ExtraRot ; RotPath := origin -- (al,0) ; fi ; if al1 : (n-1) else : 1 fi) ; - if TraceRot : + if TraceRot : draw RotPath withpen pencircle scaled 1pt withcolor blue ; - fi ; + fi ; for i=1 upto n : wid := abs(xpart lrcorner pic[i] - xpart llcorner pic[i]) ; pos := len[i]-wid/2 + (i-1)*pl ; at := arctime pos of RotPath ; ap := point at of RotPath ; ad := direction at of RotPath ; - draw pic[i] shifted (-wid/2,0) rotated(angle(ad)) shifted ap + draw pic[i] shifted (-wid/2,0) rotated(angle(ad)) shifted ap withcolor RotColor ; - if TraceRot : + if TraceRot : draw boundingbox pic[i] shifted (-wid/2,0) rotated(angle(ad)) shifted ap withpen pencircle scaled .25pt withcolor red ; draw ap withpen pencircle scaled .50pt withcolor green ; - fi ; + fi ; endfor ; \stopMPdrawing \MPdrawingdonetrue @@ -222,12 +225,12 @@ % P}{\setMFPfont O}{\setMFPfont S}{\setMFPfont T}.\quad} \startuseMPgraphic{fuzzycount} - begingroup - save height, span, drift, d, cp ; - height := 3/ 5 * \baselinedistance ; - span := 1/ 3 * height ; + begingroup + save height, span, drift, d, cp ; + height := 3/ 5 * \baselinedistance ; + span := 1/ 3 * height ; drift := 1/10 * height ; - pickup pencircle scaled (1/12 * height) ; + pickup pencircle scaled (1/12 * height) ; def d = (uniformdeviate drift) enddef ; for i := 1 upto \MPvar{n} : draw @@ -236,7 +239,7 @@ shifted (span*i,d-drift) ; endfor; picture cp ; cp := currentpicture ; % for readability - setbounds currentpicture to + setbounds currentpicture to (llcorner cp shifted (0,-ypart llcorner cp) -- lrcorner cp shifted (0,-ypart lrcorner cp) -- urcorner cp -- ulcorner cp -- cycle) ; @@ -260,13 +263,13 @@ width=\the\localhsize, % without \the, problems in non e-tex color=darkgray] -\definieerblanko +\defineblank [EnglishRule] [medium] \startuniqueMPgraphic{EnglishRule}{height,width,color} height = \MPvar{height} ; - x1 = 0 ; x3 = \MPvar{width} ; x2 = x4 = .5x3 ; + x1 = 0 ; x3 = \MPvar{width} ; x2 = x4 = .5x3 ; y1 = y3 = 0 ; y2 = -y4 = height/2 ; fill z1..z2..z3 & z3..z4..z1 & cycle withcolor \MPvar{color} ; \stopuniqueMPgraphic @@ -276,18 +279,20 @@ \setlocalhsize \noindent \reuseMPgraphic{EnglishRule} \stoplinecorrection} -%D The following macro returns a tight bound character -%D sequence. +%D The following macro returns a tight bound character +%D sequence. +%D +%D \useMPlibrary[txt] %D %D \startlinecorrection %D \TightText{\ss\bf 123}{0cm}{3cm}{red} %D \stoplinecorrection \def\TightText#1#2#3#4% - {\hbox % \ruledhbox + {\hbox % \ruledhbox {\startMPcode picture p ; p := image (graphictext "#1" withfillcolor red) ; draw p xsized #2 ysized #3 withcolor \MPcolor{#4} ; \stopMPcode}} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/meta-xml.tex b/tex/context/base/meta-xml.tex index 5024165d7..2138111f8 100644 --- a/tex/context/base/meta-xml.tex +++ b/tex/context/base/meta-xml.tex @@ -1,30 +1,29 @@ %D \module %D [ file=meta-xml, %D version=2002.11.27, -%D title=\METAPOST\ Graphics, -%D subtitle=XML Hacks, +%D title=\METAPOST\ Graphics, +%D subtitle=XML Hacks, %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. \writestatus{loading}{MetaPost Graphics / XML Hacks} %D When we are dealing with XML, we need to make sure that %D \METAPOST\ knows about it. The next macro expands its %D argument (think of widget XFDF) into \type {\getXMLentity} -%D calls. +%D calls. -\unprotect +\unprotect \def\setMPtextXML#1#2% {\bgroup - \enableXML + \enableXML \expanded{\convertcommand#2}\to\ascii - \expanded{\egroup - \noexpand\dodoglobal\noexpand\setvalue{\@@MPT#1}{\ascii}}} + \expanded{\egroup\noexpand\dodoglobal\noexpand\setvalue{\@@MPT#1}{\ascii}}} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex index b89489942..975c8ed18 100644 --- a/tex/context/base/mult-com.tex +++ b/tex/context/base/mult-com.tex @@ -24,7 +24,7 @@ %D the Czech ones by Tom Hudec, and the Italian ones %D by Giuseppe Bilotta. Here we include their comments. -%D Giuseppe Bilotta: \citaat {Having to choose between a +%D Giuseppe Bilotta: \quotation {Having to choose between a %D full|-|length name and a shortcut, I decided to resort to the %D latter, especially in the case of commonly used commands, or %D when shortened commands become too short. This led to one @@ -253,19 +253,19 @@ setupcapitals: stelkapitalenin setupcapitals stelleversalienein nastavkapitalky impostamaiuscole seteazamajuscule - kap: kap kap + smallcapped: kap cap kap kap cap kap - KAP: KAP CAP - KAP KAP - CAP KAP - nokap: nokap nocap + notsmallcapped: nokap nocap nokap nokap nocap nokap - Kap: Kap Cap + CAPPED: KAP CAP + KAP KAP + CAP KAP + SmallCapped: Kap Cap Kap Kap Cap Kap - Kaps: Kaps Caps + SmallCaps: Kaps Caps Kaps Kaps Caps Kaps WORD: WOORD WORD @@ -451,46 +451,55 @@ usemodules: gebruikmodules usemodules verwendemodule uzijmoduly usamoduli folosestemodule - starttekst: starttekst starttext + starttext: starttekst starttext starttext starttext iniziatesto starttext - stoptekst: stoptekst stoptext + stoptext: stoptekst stoptext stoptext stoptext terminatesto stoptext - margetitel: margetitel margintitle + margintitle: margetitel margintitle marginaltitel marginalninadpis titoloinmargine titlumarginal - margewoord: margewoord marginword + marginword: margewoord marginword marginalwort marginalnislovo parolainmargine cuvantmarginal - margetekst: margetekst margintext + margintext: margetekst margintext marginaltext marginalnitext testoinmargine textmarginal - inlinker: inlinker inleft + inleft: inlinker inleft imlinken vlevo insinistra instanga - inmarge: inmarge inmargin + inmargin: inmarge inmargin inmarginalie naokraj inmargine marginal - inanderemarge: inanderemarge inothermargin + inothermargin: inanderemarge inothermargin inanderermarginale nadruhyokraj inaltromargine inaltamargine - inrechter: inrechter inright + inright: inrechter inright imrechten vpravo indestra indreapta - startmargeblok: startmargeblok startmarginblock +ininner: inbinnen ininner + ininner ininner + ininner ininner +inouter: inbuiten inouter + inouter inouter + inouter inouter + startmarginblock: startmargeblok startmarginblock startmarginalblock startmarginalniblok iniziabloccomargine startblocmarginal - stopmargeblok: stopmargeblok stopmarginblock + stopmarginblock: stopmargeblok stopmarginblock stopmarginalblock stopmarginalniblok terminabloccomargine stopblocmarginal - stelinmargein: stelinmargein setupinmargin +defineinmargin: definieerinmarge defineinmargin + defineinmargin defineinmargin + defineinmargin defineinmargin + setupinmargin: stelinmargein setupinmargin stelleinmarginalieein nastavmarginalie impostainmargine seteazamarginal - stelmargeblokkenin: stelmargeblokkenin setupmarginblocks + setupmarginblocks: stelmargeblokkenin setupmarginblocks stellemarginalblockein nastavmarginalniblok impostablocchimargine seteazablocurimarginale - inleftside: inlinkerrand inleftside + inleftedge: inlinkerrand inleftedge imlinkenrand nalevo inlatosinistro inparteastanga inleftmargin: inlinkermarge inleftmargin @@ -499,7 +508,7 @@ inrightmargin: inrechtermarge inrightmargin inrechtermarginale napravyokraj inmarginedestro inmargineadreapta - inrightside: inrechterrand inrightside + inrightedge: inrechterrand inrightedge imrechtenrand napravo inlatodestro inparteadreapta atleftmargin: oplinkermarge atleftmargin @@ -509,19 +518,19 @@ atrightmargin: oprechtermarge atrightmargin atrightmargin atrightmargin atrightmargin atrightmargin - woordrechts: woordrechts wordright + wordright: woordrechts wordright wortrechts slovovpravo paroladestra cuvantdreapta - definieerblanko: definieerblanko defineblank + defineblank: definieerblanko defineblank definiereblanko definujpreskok definiscirigovuoto definesteblanc - blanko: blanko blank + blank: blanko blank blanko preskoc rigovuoto blanc setupblank: stelblankoin setupblank stelleblankoein nastavpreskok impostarigovuoto seteazablanc - corrigeerwitruimte: corrigeerwitruimte correctwhitespace + correctwhitespace: corrigeerwitruimte correctwhitespace korrigierezwischenraum korekcebilehomista correggispaziobianco corecteazaspatiualb fixedspaces: vastespaties fixedspaces @@ -536,79 +545,79 @@ atrightmargin: oprechtermarge atrightmargin space: spatie space spatium mezera spazio spatiu - geenwitruimte: geenwitruimte nowhitespace + nowhitespace: geenwitruimte nowhitespace keinzwischenraum zadnebilemisto nientespaziobianco faraspatiualb - opelkaar: opelkaar packed + packed: opelkaar packed kleinerdurchschuss zhustene impaccato impachetat - startopelkaar: startopelkaar startpacked + startpacked: startopelkaar startpacked startkleinerdurchschuss startzhustene iniziaimpaccato startimpachetat - stopopelkaar: stopopelkaar stoppacked + stoppacked: stopopelkaar stoppacked stopkleinerdurchschuss stopzhustene terminaimpaccato stopimpachetat - startvanelkaar: startvanelkaar startunpacked + startunpacked: startvanelkaar startunpacked startgrosserdurchschuss startnezhustene iniziaunpacked startneimpachetat - stopvanelkaar: stopvanelkaar stopunpacked + stopunpacked: stopvanelkaar stopunpacked stopgrosserdurchschuss stopnezhustene terminaunpacked stopneimpachetat - startregelcorrectie: startregelcorrectie startlinecorrection + startlinecorrection: startregelcorrectie startlinecorrection startzeilenkorrektur startkorekceradku iniziacorrezioneriga startcorectielinie - stopregelcorrectie: stopregelcorrectie stoplinecorrection + stoplinecorrection: stopregelcorrectie stoplinecorrection stopzeilenkorrektur stopkorekceradku terminacorrezioneriga stopcorectielinie - omlaag: omlaag godown + godown: omlaag godown nachunten jdidolu vaigiu injos - witruimte: witruimte whitespace + whitespace: witruimte whitespace zwischenraum bilemisto spaziobianco spatiualb - nietinspringen: nietinspringen noindenting + noindenting: nietinspringen noindenting nichteinziehen zadneodsazovani nienterientro faraaliniat - inspringen: inspringen indenting + indenting: inspringen indenting einziehen odsazovani rientro aliniat setupindenting: stelinspringenin setupindenting stelleeinziehenein nastavodsazovani impostarientro seteazaaliniat - startuitlijnen: startuitlijnen startalignment + startalignment: startuitlijnen startalignment startausrichtung startzarovnavani iniziaallineamento startaliniere - stopuitlijnen: stopuitlijnen stopalignment + stopalignment: stopuitlijnen stopalignment stopausrichtung stopzarovnavani terminaallineamento stopaliniere - startregels: startregels startlines + startlines: startregels startlines startzeilen startradky iniziarighe startlinii - stopregels: stopregels stoplines + stoplines: stopregels stoplines stopzeilen stopradky terminarighe stoplinii - stelparagraafnummerenin: stelparagraafnummerenin setupparagraphnumbering + setupparagraphnumbering: stelparagraafnummerenin setupparagraphnumbering stelleabsatznummerierungein nastavcislovaniodstavcu impostanumerazionecapoversi seteazanumerotareparagrafe - stelregelnummerenin: stelregelnummerenin setuplinenumbering + setuplinenumbering: stelregelnummerenin setuplinenumbering stellezeilennumerierungein nastavcislovaniradku impostanumerazionerighe seteazanumerotarelinii - startregelnummeren: startregelnummeren startlinenumbering + startlinenumbering: startregelnummeren startlinenumbering startzeilennumerierung startcislovaniradku inizianumerazionerighe startnumerotarelinii - stopregelnummeren: stopregelnummeren stoplinenumbering + stoplinenumbering: stopregelnummeren stoplinenumbering stopzeilennumerierung stopcislovaniradku terminanumerazionerighe stopnumerotarelinii - startregel: startregel startline + startline: startregel startline startzeile startradek iniziariga startlinie - stopregel: stopregel stopline + stopline: stopregel stopline stopzeile stopradek terminariga stoplinie - eenregel: eenregel someline + someline: eenregel someline einezeile nejakyradek qualcheriga olinie - inregel: inregel inline + inline: inregel inline inzeile vradku inriga inlinie crlf: crlf crlf @@ -617,13 +626,13 @@ atrightmargin: oprechtermarge atrightmargin emptylines: legeregels emptylines emptylines emptylines emptylines emptylines - stelregelsin: stelregelsin setuplines + setuplines: stelregelsin setuplines stellezeilenein nastavradky impostarighe seteazalinii - startsmaller: startsmaller startnarrower + startnarrower: startsmaller startnarrower startenger startzuzeni iniziapiustretto startingust - stopsmaller: stopsmaller stopnarrower + stopnarrower: stopsmaller stopnarrower stopenger stopzuzeni terminapiustretto stopingust setupnarrower: stelsmallerin setupnarrower @@ -662,34 +671,34 @@ emptylines: legeregels emptylines testpage: testpagina testpage testpage testpage testpage testpage - koppelpagina: koppelpagina couplepage + couplepage: koppelpagina couplepage doppelseite parovastrana accoppiapagina paginadubla - soortpagina: soortpagina pagetype + pagetype: soortpagina pagetype seitentyp typstrany tipopagina tippagina - verwerkpagina: verwerkpagina processpage + processpage: verwerkpagina processpage bearbeiteseite zpracujstranu elaborapagina proceseazapagina - koppelpapier: koppelpapier couplepaper + couplepaper: koppelpapier couplepaper doppelseitigespapier dvoustrannypapir accoppiacarta hartiedubla - selecteerpapier: selecteerpapier selectpaper + selectpaper: selecteerpapier selectpaper waehlepapieraus vyberpapir selezionacarta selecteazahartie - scherm: scherm screen + screen: scherm screen bildschirm obrazovka schermo ecran - definieersectie: definieersectie definesection + definesection: definieersectie definesection definiereabschnitt definujsekci definiscisezione definestesectiune - definieersectieblok: definieersectieblok definesectionblock + definesectionblock: definieersectieblok definesectionblock definiereabschnittsblock definujbloksekce definiscibloccosezione definesteblocsectiune - stelsectieblokin: stelsectieblokin setupsectionblock + setupsectionblock: stelsectieblokin setupsectionblock stelleabschnittsblockein nastavbloksekce impostabloccosezione seteazablocsectiune - stelsectiein: stelsectiein setupsection + setupsection: stelsectiein setupsection stelleabschnittein nastavsekci impostasezione seteazasectiune notopandbottomlines: geenbovenenonderregels notopandbottomlines @@ -713,15 +722,24 @@ emptylines: legeregels emptylines setuppagenumbering: stelpaginanummeringin setuppagenumbering stelleseitennummeriernungein nastavcislovanistran impostanumerazionepagina seteazanumerotarepagina - resetnumber: resetnummer resetnumber - resetnumber resetnumber - resetnumber resetnumber - setnumber: setnummer setnumber - setnumber setnumber - setnumber setnumber -stelnummerin: stelnummerin setupnumber - setupnumber setupnumber - impostanumerazione setupnumber + getnumber: haalnummer getnumber + getnumber getnumber + getnumber getnumber +incrementnumber: verhoognummer incrementnumber + nummererhoehen zvysujicicislo + incrementanumero numarincrement +decrementnumber: verlaagnummer decrementnumber + decrementnumber decrementnumber + decrementnumber decrementnumber + resetnumber: resetnummer resetnumber + resetnumber resetnumber + resetnumber resetnumber + setnumber: setnummer setnumber + setnumber setnumber + setnumber setnumber + setupnumber: stelnummerin setupnumber + setupnumber setupnumber + impostanumerazione setupnumber setupbottom: stelonderin setupbottom stelleuntenein nastavspodek impostafondo seteazajos @@ -734,12 +752,15 @@ stelnummerin: stelnummerin setupnumber setupfootertexts: stelvoettekstenin setupfootertexts stellefusszeilentextein nastavtextyupati impostatestipdp seteazatextesubsol - stelpaginanummerin: stelpaginanummerin setuppagenumber + setuppagenumber: stelpaginanummerin setuppagenumber stelleseitennummerein nastavcislostrany impostanumeropagina seteazanumarpagina - stelsubpaginanummerin: stelsubpaginanummerin setupsubpagenumber + setupsubpagenumber: stelsubpaginanummerin setupsubpagenumber stelleunterseitennummerein nastavpodcislostrany impostanumerosottopagina seteazanumarsubpagina +subpagenumber: subpaginanummer subpagenumber + subpagenumber subpagenumber + subpagenumber subpagenumber setuptext: steltekstin setuptext stelletextein nastavtext impostatesto seteazatext @@ -761,25 +782,25 @@ stelnummerin: stelnummerin setupnumber items: items items posten polozky elementi element - stelitemsin: stelitemsin setupitems + setupitems: stelitemsin setupitems stellepostenein nastavpolozky impostaelementi seteazaelemente - regellinks: regellinks leftaligned + leftaligned: regellinks leftaligned linksbuendig zarovnanovlevo allineasinistra aliniatstanga - regelmidden: regelmidden midaligned + midaligned: regelmidden midaligned zentriert zarovnanonastred allineacentro aliniatcentru - regelrechts: regelrechts rightaligned + rightaligned: regelrechts rightaligned rechtsbuendig zarovnanovpravo allineadestra aliniatdreapta - startkolommen: startkolommen startcolumns + startcolumns: startkolommen startcolumns startspalten startsloupce iniziacolonne startcoloane - stopkolommen: stopkolommen stopcolumns + stopcolumns: stopkolommen stopcolumns stopspalten stopsloupce terminacolonne stopcoloane - stelkolommenin: stelkolommenin setupcolumns + setupcolumns: stelkolommenin setupcolumns stellespaltenein nastavsloupce impostacolonne seteazacoloane column: kolom column @@ -836,49 +857,49 @@ stelnummerin: stelnummerin setupnumber % so far - definieerkop: definieerkop definehead + definehead: definieerkop definehead definiereueberschrift definujnadpis definiscitesta definesteantet - stelkopin: stelkopin setuphead + setuphead: stelkopin setuphead stelleueberschriftein nastavnadpis impostatesta seteazatitlu - stelkoppenin: stelkoppenin setupheads + setupheads: stelkoppenin setupheads stelleueberschriftenein nastavnadpisy impostateste seteazatitluri - stelkopnummerin: stelkopnummerin setupheadnumber + setupheadnumber: stelkopnummerin setupheadnumber stellekopfzahlein nastavcislonadpisu impostanumerotesta seteazanumartitlu - kopnummer: kopnummer headnumber + headnumber: kopnummer headnumber kopfnummer cislonadpisu numerotesta numartitlu - huidigekopnummer: huidigekopnummer currentheadnumber + currentheadnumber: huidigekopnummer currentheadnumber heutigeskopfnummer aktualnicislonadpisu numerotestacorrente numartitlucurent - bepaalkopnummer: bepaalkopnummer determineheadnumber + determineheadnumber: bepaalkopnummer determineheadnumber bestimmekopfnummer stanovcislonadpisu determinanumerotesta determinanumartitlu - resetmarkering: resetmarkering resetmarking + resetmarking: resetmarkering resetmarking ruecksetztenbeschriftung resetznaceni reimpostamarcatura reseteazamarcaje - stelmarkeringin: stelmarkeringin setupmarking + setupmarking: stelmarkeringin setupmarking stellebeschriftungein nastavznaceni impostamarcatura seteazamarcaje - definieermarkering: definieermarkering definemarking + definemarking: definieermarkering definemarking definierebeschriftung definujznaceni definiscimarcatura definestemarcaje - geenmarkering: geenmarkering nomarking + nomarking: geenmarkering nomarking keinebeschriftung zadneznaceni nientemarcatura faramarcaje marking: markeer marking beschriftung znaceni marcatura marcaje - ontkoppelmarkering: ontkoppelmarkering decouplemarking + decouplemarking: ontkoppelmarkering decouplemarking entknuepfebeschriftung rozpojeneznaceni separamarcatura decupleazamarcaje % GB - koppelmarkering: koppelmarkering couplemarking + couplemarking: koppelmarkering couplemarking verknuepfebeschriftung propojeneznaceni accoppiamarcatura cupleazamarcaje % GB - haalmarkering: haalmarkering getmarking + getmarking: haalmarkering getmarking holebeschriftung ziskejznaceni prendimarcatura adumarcaje % GB definelayout: definieerlayout definelayout @@ -887,16 +908,13 @@ stelnummerin: stelnummerin setupnumber setuplayout: stellayoutin setuplayout stellelayoutein nastavvzhled impostalayout seteazaaspect - paslayoutaan: paslayoutaan adaptlayout + adaptlayout: paslayoutaan adaptlayout passelayoutan prizpusobvzhled adattalayout adapteazaaspect - steloffsetin: steloffsetin setupoffset - stelleoffsetein nastavoffset - impostaoffest seteazaoffset - plaatsopgrid: plaatsopgrid placeongrid + placeongrid: plaatsopgrid placeongrid amgitterausrichten umistinamrizku mettiingriglia plaseazapegrid - verplaatsopgrid: verplaatsopgrid moveongrid + moveongrid: verplaatsopgrid moveongrid amgitterneuausrichten premistinamrizku spostaagriglia mutapegrid showsetups: tooninstellingen showsetups @@ -932,7 +950,7 @@ setuppaper: stelpapierin setuppaper setuparranging: stelarrangerenin setuparranging stelleanordnenein nastavusporadani impostaparranging seteazaaranjareapag - versie: versie version + version: versie version version verze versione versiune setupbackgrounds: stelachtergrondenin setupbackgrounds @@ -947,28 +965,28 @@ setuppaper: stelpapierin setuppaper setupinteraction: stelinteractiein setupinteraction stelleinteraktionein nastavinterakci impostainterazione seteazainteractiunea - stelinteractiemenuin: stelinteractiemenuin setupinteractionmenu + setupinteractionmenu: stelinteractiemenuin setupinteractionmenu stelleinteraktionsmenueein nastavinterakcnimenu impostamenuinterazione seteazameniuinteractiune - definieerinteractiemenu: definieerinteractiemenu defineinteractionmenu + defineinteractionmenu: definieerinteractiemenu defineinteractionmenu definiereinteraktionsmenue definujinterakcnimenu definiscimenuinterazione definestemeniuinteractiune - blokkeerinteractiemenu: blokkeerinteractiemenu disableinteractionmenu + disableinteractionmenu: blokkeerinteractiemenu disableinteractionmenu inaktiviereinteraktionsmenue zablokujinterakcnimenu disabilitamenuinterazione dezactiveazameniuinteractiune - interactiemenu: interactiemenu interactionmenu + interactionmenu: interactiemenu interactionmenu interaktionsmenue interaktivnimenu menuinterattivo meniuinteractiune - interactiebuttons: interactiebuttons interactionbuttons + interactionbuttons: interactiebuttons interactionbuttons interaktionsknopfe interakcnitlacitka pulsantinterazione butoaneinteractiune - interactiebalk: interactiebalk interactionbar + interactionbar: interactiebalk interactionbar interaktionsbalken interakcnilista barrainterazione barainteractiune - stelinteractiebalkin: stelinteractiebalkin setupinteractionbar + setupinteractionbar: stelinteractiebalkin setupinteractionbar stelleinteraktionsbalkenein nastavinterakcnilistu impostabarrainterazione seteazabarainteractiune - stelinteractieschermin: stelinteractieschermin setupinteractionscreen + setupinteractionscreen: stelinteractieschermin setupinteractionscreen stelleinteraktionsbildschirmein nastavinterakcniobrazovku impostaschermointerazione seteazaecraninteractiune placebookmarks: plaatsbookmarks placebookmarks @@ -1043,58 +1061,58 @@ setuppaper: stelpapierin setuppaper stopraster: stopraster stopraster stopraster stoprastr terminaraster stopraster - definieerblok: definieerblok defineblock + defineblock: definieerblok defineblock definiereblock definujblok definisciblocco definestebloc - stelblokin: stelblokin setupblock + setupblock: stelblokin setupblock stelleblockein nastavblok impostablocco seteazabloc - gebruikblokken: gebruikblokken useblocks + useblocks: gebruikblokken useblocks verwendebloecke uzijbloky usablocco folosestebloc - verwerkblokken: verwerkblokken processblocks + processblocks: verwerkblokken processblocks bearbeitebloecke zpracujbloky elaborablocchi proceseazabloc - handhaafblokken: handhaafblokken keepblocks + keepblocks: handhaafblokken keepblocks behaltebloecke zachovejbloky tieniblocchi pastreazablocuri - selecteerblokken: selecteerblokken selectblocks + selectblocks: selecteerblokken selectblocks waehlebloeckeaus vyberbloky selezionablocchi selecteazablocuri - verbergblokken: verbergblokken hideblocks + hideblocks: verbergblokken hideblocks verbergebloecke schovejbloky nascondiblocchi ascundeblocuri - passeerblokken: passeerblokken bypassblocks + bypassblocks: passeerblokken bypassblocks bypassblocks bypassblocks saltablocchi saripesteblocuri - forceerblokken: forceerblokken forceblocks + forceblocks: forceerblokken forceblocks forceblocks forceblocks forzablocchi forteazablocuri - geenblokkenmeer: geenblokkenmeer nomoreblocks + nomoreblocks: geenblokkenmeer nomoreblocks keinebloeckemehr zadnedalsibloky bastablocchi gatablocuri - definieerlijst: definieerlijst definelist + definelist: definieerlijst definelist definiereliste definujseznam definiscielenco definestelista - definieersamengesteldelijst: definieersamengesteldelijst definecombinedlist + definecombinedlist: definieersamengesteldelijst definecombinedlist definierezusammengestellteliste definujkombinovanyseznam definiscielencocombinato definestelistacombinata listsymbol: lijstsymbool listsymbol listsymbol listsymbol listsymbol listsymbol - plaatslijst: plaatslijst placelist + placelist: plaatslijst placelist platziereliste umistiseznam mettielenco punelista plaatsruwelijst: plaatslruweijst placerawlist placerawlist placerawlist placerawlist placerawlist - plaatssamengesteldelijst: plaatssamengesteldelijst placecombinedlist + placecombinedlist: plaatssamengesteldelijst placecombinedlist platzierezusammengestellteliste umistikombinovanyseznam mettielencocombinato punelistacombinata - schrijfnaarlijst: schrijfnaarlijst writetolist + writetolist: schrijfnaarlijst writetolist schreibezurliste zapisdoseznamu scriviinelenco scrieinlista - schrijftussenlijst: schrijftussenlijst writebetweenlist + writebetweenlist: schrijftussenlijst writebetweenlist schreibezwischenliste zapismeziseznam scrividentroelenco scrieintreliste @@ -1108,52 +1126,52 @@ listsymbol: lijstsymbool listsymbol immediatebetweenlist immediatebetweenlist immediatebetweenlist immediatebetweenlist - stellijstin: stellijstin setuplist + setuplist: stellijstin setuplist stellelisteein nastavseznam impostaelenco seteazalista - stelsamengesteldelijstin: stelsamengesteldelijstin setupcombinedlist + setupcombinedlist: stelsamengesteldelijstin setupcombinedlist stellezusammengestelltelisteein nastavkombinovanyseznam impostaelencocombinato seteazalistacombinata - bepaallijstkenmerken: bepaallijstkenmerken determinelistcharacteristics + determinelistcharacteristics: bepaallijstkenmerken determinelistcharacteristics bestimmelistencharakeristika stanovcharakteristickuseznamu determinacarattersticheelenco determinacaracteristicilelistei - lijstlengte: lijstlengte listlength + listlength: lijstlengte listlength listenlaenge delkaseznamu lunghezzaelenco lungimelista - lijstbreedte: lijstbreedte listwidth + listwidth: lijstbreedte listwidth listenbreite sirkaseznamu ampiezzaelenco latimelista - lijsthoogte: lijsthoogte listheight + listheight: lijsthoogte listheight listenhoehe vyskaseznamu altezzaelenco inaltimelista - geenlijst: geenlijst nolist + nolist: geenlijst nolist keineliste zadnyseznam nienteelenco faralista - definieerreferentielijst: definieerreferentielijst definereferencelist + definereferencelist: definieerreferentielijst definereferencelist definierereferenzliste definujseznamodkazu definiscilistariferimenti definestelistareferinte - plaatsreferentielijst: plaatsreferentielijst placereferencelist + placereferencelist: plaatsreferentielijst placereferencelist platzierereferenzliste umistiseznamodkazu mettilistariferimenti punelistareferinte - schrijfnaarreferentielijst: schrijfnaarreferentielijst writetoreferencelist + writetoreferencelist: schrijfnaarreferentielijst writetoreferencelist schreibezurreferenzliste zapisdoseznamuodkazu scriviinlistariferimenti scrieinlistareferinte - stelreferentielijstin: stelreferentielijstin setupreferencelist + setupreferencelist: stelreferentielijstin setupreferencelist stellereferenzlisteein nastavseznamodkazu impostalistariferimenti seteazalistareferinte - definieerplaatsblok: definieerplaatsblok definefloat + definefloat: definieerplaatsblok definefloat definieregleitobjekt definujplvouciobjekt definiscioggettomobile definestefloat - stelplaatsblokin: stelplaatsblokin setupfloat + setupfloat: stelplaatsblokin setupfloat stellegleitobjektein nastavplvouciobjekt impostaoggettomobile seteazafloat - stelplaatsblokkenin: stelplaatsblokkenin setupfloats + setupfloats: stelplaatsblokkenin setupfloats stellegleitobjekteein nastavplvouciobjekty impostaoggettimobili seteazafloats - splitsplaatsblok: splitsplaatsblok splitfloat + splitfloat: splitsplaatsblok splitfloat teilegleitobjekt rozdelplvouciobjekt spezzaoggettomobile impartefloat - stelplaatsblokkensplitsenin: stelplaatsblokkensplitsenin setupfloatsplitting + setupfloatsplitting: stelplaatsbloksplitsenin setupfloatsplitting stelleplatziegeteiltegleitobjekt nastavdeleniplvoucichobjektu impostaspezzamentooggettomobile seteazaimpartireafloat placefloat: plaatsplaatsblok placefloat @@ -1183,10 +1201,10 @@ defineplacement: definieerplaats defineplacement placeontopofeachother: plaatsonderelkaar placeontopofeachother platziereuntereinander umistinadsebe mettiunosullaltro punedeasuprafiecareia - stelblokkopjein: stelblokkopjein setupcaption + setupcaption: stelblokkopjein setupcaption stellebildunterschriftein nastavpopisek impostacaption seteazalegenda % GB - stelblokkopjesin: stelblokkopjesin setupcaptions + setupcaptions: stelblokkopjesin setupcaptions stellebilderunterschriftein nastavpopisky impostacaptions seteazalegendele % GB setupcombinations: stelcombinatiesin setupcombinations @@ -1198,61 +1216,64 @@ defineplacement: definieerplaats defineplacement stopoverlay: stopoverlay stopoverlay stopoverlay stopprekryv terminasovrapposizione stopoverlay - definieerregister: definieerregister defineregister + defineregister: definieerregister defineregister definiereregister definujrejstrik definisciregistro definesteregistru - koppelregister: koppelregister coupleregister + coupleregister: koppelregister coupleregister verknuepfregister propojenyrejstrik accoppiaregistro cupleazaregistru - stelregisterin: stelregisterin setupregister + setupregister: stelregisterin setupregister stelleregisterein nastavrejstrik impostaregistro seteazaregistru - schrijfnaarregister: schrijfnaarregister writetoregister + writetoregister: schrijfnaarregister writetoregister schreibezumregister zapisdorejstriku scriviinregistro scrieinregistru - plaatsregister: plaatsregister placeregister +completeregister: volledigregister completeregister + completeregister completeregister + completeregister completeregister + placeregister: plaatsregister placeregister platziereregister umistirejstrik mettiregistro puneregistru - bepaalregisterkenmerken: bepaalregisterkenmerken determineregistercharacteristics +determineregistercharacteristics: bepaalregisterkenmerken determineregistercharacteristics bestimmeregistercharakteristika urcicharakteristikurejstriku determinacaratteristicheregistro determinacaracteristiciregistru - definieersorteren: definieersorteren definesorting + definesorting: definieersorteren definesorting definieresortieren definujtrideni definisciordinamento definestesortare - definieersynoniemen: definieersynoniemen definesynonyms + definesynonyms: definieersynoniemen definesynonyms definieresynonyme definujsynonyma definiscisinonimi definestesinonim - stelsorterenin: stelsorterenin setupsorting + setupsorting: stelsorterenin setupsorting stellesortierenein nastavtrideni impostaordinamento seteazasortare - stelsynoniemenin: stelsynoniemenin setupsynonyms + setupsynonyms: stelsynoniemenin setupsynonyms stellesynonymein nastavsynonyma impostasinonimi seteazasinonime - startsynchronisatie: startsynchronisatie startsynchronization + startsynchronization: startsynchronisatie startsynchronization startsynchronisation startsynchronizace iniziasincronizzazione startsincronizare - stopsynchronisatie: stopsynchronisatie stopsynchronization + stopsynchronization: stopsynchronisatie stopsynchronization stopsynchronisation stopsynchronizace terminasincronizzazione stopsincronizare - stelsynchronisatiebalkin: stelsynchronisatiebalkin setupsynchronizationbar + setupsynchronizationbar: stelsynchronisatiebalkin setupsynchronizationbar stellesynchronisationsbalkenein nastavsynchronizacnilistu impostabarrasincronizzazione setarebarasincronizare - stelsynchronisatiein: stelsynchronisatiein setupsynchronization + setupsynchronization: stelsynchronisatiein setupsynchronization stellesynchronisationein nastavsynchronizaci impostasincronizzazione setaresincronizare - synchronisatiebalk: synchronisatiebalk synchronizationbar + synchronizationbar: synchronisatiebalk synchronizationbar synchronisationsbalken synchronizacnilista barrasincronizzazione barasincronizare - synchroniseer: synchroniseer synchronize + synchronize: synchroniseer synchronize synchronisieren synchronizovat sincronizza sincronizeaza - gebruikexterndocument: gebruikexterndocument useexternaldocument + useexternaldocument: gebruikexterndocument useexternaldocument verwendeexteresdokument uzijexternidokument usadocumentoesterno folosestedocumentextern - gebruikURL: gebruikURL useURL + useURL: gebruikURL useURL verwendeURL uzijURL usaURL folosesteURL - gebruikurl: gebruikurl useurl + useurl: gebruikurl useurl verwendeurl uzijurl usaurl folosesteurl setupurl: stelurlin setupurl @@ -1261,79 +1282,79 @@ defineplacement: definieerplaats defineplacement coupledocument: koppeldocument coupledocument verknuepfedokument propojenydokument accoppiadocumento cupleazadocument - stelprogrammasin: stelprogrammasin setupprograms + setupprograms: stelprogrammasin setupprograms stelleprogrammein nastavprogramy impostaprogrammi seteazaprograme - definieerprogramma: definieerprogramma defineprogram + defineprogram: definieerprogramma defineprogram definiereprogramme definujprogram definisciprogramma definesteprogram - programma: programma program + program: programma program programm program programma program - stelpaginaovergangenin: stelpaginaovergangenin setuppagetransitions + setuppagetransitions: stelpaginaovergangenin setuppagetransitions stelleseitenuebergangein nastavprechodstrany impostatransizionepagina seteazatranzitiepagina - definieerprofiel: definieerprofiel defineprofile + defineprofile: definieerprofiel defineprofile definiereprofil definujprofil definisciprofilo definesteprofil - definieerversie: definieerversie defineversion + defineversion: definieerversie defineversion definiereversion definujverzi definisciversion definesteversiune - markeerversie: markeerversie markversion + markversion: markeerversie markversion beschrifteversion oznacverzi marcaversione marcheazaversiune % GB - selecteerversie: selecteerversie selectversion + selectversion: selecteerversie selectversion waehleversionaus vyberverzi selezionaversione selecteazaversiune % GB - startprofiel: startprofiel startprofile + startprofile: startprofiel startprofile startprofil startprofil iniziaprofilo startprofil - startversie: startversie startversion + startversion: startversie startversion startversion startverze iniziaversione startversiune - stelprofielenin: stelprofielenin setupprofiles + setupprofiles: stelprofielenin setupprofiles stelleprofilein nastavprofily impostaprofili seteazaprofile - stelversiesin: stelversiesin setupversions + setupversions: stelversiesin setupversions stelleversionein nastavverze impostaversioni seteazaversiuni - stopprofiel: stopprofiel stopprofile + stopprofile: stopprofiel stopprofile stopprofil stopprofil terminaprofili stopprofil - stopversie: stopversie stopversion + stopversion: stopversie stopversion stopversion stopverze terminaversioni stopversiune - volgprofiel: volgprofiel followprofile + followprofile: volgprofiel followprofile folgeprofil dodrzujprofil seguiprofilo urmeazaprofil - volgprofielversie: volgprofielversie followprofileversion + followprofileversion: volgprofielversie followprofileversion folgeprofilversion dodrzujverziprofilu seguiversioneprofilo urmeazaversiuneprofil - volgversie: volgversie followversion + followversion: volgversie followversion folgeversion dodrzujverzi seguiversione urmeazaversiune - doordefinieren: doordefinieren definedescription + definedescription: doordefinieren definedescription definierebeschreibung definujpopis definiscidescrizione definestedescriere - doorlabelen: doorlabelen definelabel + definelabel: doorlabelen definelabel definierelabel definujpopisek definiscietichetta definesteeticheta - doornummeren: doornummeren defineenumeration + defineenumeration: doornummeren defineenumeration definierenummerierung definujvycet definiscienumerazione definesteenumerare - doorspringen: doorspringen defineindenting + defineindenting: doorspringen defineindenting definiereeinzug definujodsazovani definiscirientro definestealiat - steldoordefinierenin: steldoordefinierenin setupdescriptions + setupdescriptions: steldoordefinierenin setupdescriptions definierebeschreibungen nastavpopisy impostadescrizioni seteazadescriere - steldoornummerenin: steldoornummerenin setupenumerations + setupenumerations: steldoornummerenin setupenumerations stellebeschreibungein nastavvycty impostaenumerazioni seteazaenumerare - steldoorspringenin: steldoorspringenin setupindentations + setupindentations: steldoorspringenin setupindentations stelleeinzuegein nastavodsazovani impostarientri seteazaaliniate - steltabin: steltabin setuptab + setuptab: steltabin setuptab stelletabein nastavtab impostatab seteazatab tab: tab tab @@ -1372,7 +1393,7 @@ defineplacement: definieerplaats defineplacement menubutton: menubutton menubutton menueknopf tlacitkomenu pulsantemenu butonmeniu - stelbuttonsin: stelbuttonsin setupbuttons + setupbuttons: stelbuttonsin setupbuttons stelleknopfein nastavtlacitka impostapulsanti seteazabutoane usereferences: gebruikreferenties usereferences @@ -1405,19 +1426,19 @@ defineplacement: definieerplaats defineplacement useJSscripts: gebruikJSscripts useJSscripts verwendeJSscript uzijJSscripts usaJSscripts folosestescriptJS - uit: uit from + from: uit from von zref da din in: in in in tref in in - op: op at + at: op at bei pref al la % GB - over: over about + about: - about ueber oref intorno despre - naar: naar goto + goto: naar goto zu jdina vaia dute atpage: oppagina atpage @@ -1432,16 +1453,16 @@ navigating: navigerend navigating ref: ref ref ref ref rif ref - naarbox: naarbox gotobox + gotobox: naarbox gotobox zurbox jdinabox vaiabox dutebox % GB - naarpagina: naarpagina gotopage + gotopage: naarpagina gotopage zurseite jdinastranu vaiapagina dutepagina - plaatsformule: plaatsformule placeformula + placeformula: plaatsformule placeformula platziereformel umistirovnici mettiformula puneformula - plaatssubformule: plaatssubformule placesubformula + placesubformula: plaatssubformule placesubformula platziereunterformel umistipodrovnici mettisottoformula punesubformula moveformula: verplaatsformule moveformula @@ -1450,16 +1471,16 @@ moveformula: verplaatsformule moveformula setupformulas: stelformulesin setupformulae stelleformelnein nastavrovnice impostaformule seteazaformule - formulenummer: formulenummer formulanumber + formulanumber: formulenummer formulanumber formelnummer cislorovnice numeroformula numarformula - subformulenummer: subformulenummer subformulanumber + subformulanumber: subformulenummer subformulanumber unterformelnummer cislopodrovnice numerosottoformula numarsubformula leg: leg leg leg leg leg leg - geg: geg fact + fact: geg fact geg fakt fatto fact mathematics: wiskunde mathematics @@ -1471,28 +1492,22 @@ moveformula: verplaatsformule moveformula nodimension: geendimensie nodimension keindimension zadnyrozmer nientedimensioni faradimensiune - startomgeving: startomgeving startenvironment + startenvironment: startomgeving startenvironment startumgebung startprostredi iniziaambiente startmediu - stopomgeving: stopomgeving stopenvironment + stopenvironment: stopomgeving stopenvironment stopumgebung stopprostredi terminaambiente stopmediu - startdeelomgeving: startdeelomgeving startlocalenvironment - startlokaleumgebung startlokalnihoprostredi - iniziaambientelocale startmediulocal - deelomgeving: deelomgeving localenvironment - lokaleumgebung lokalnihoprostredi - ambientelocale mediulocal - startonderdeel: startonderdeel startcomponent + startcomponent: startonderdeel startcomponent startkomponente startkomponenta iniziacomponente startcomponenta - stoponderdeel: stoponderdeel stopcomponent + stopcomponent: stoponderdeel stopcomponent stopkomponente stopkomponenta terminacomponente stopcomponenta - startprodukt: startprodukt startproduct + startproduct: startprodukt startproduct startprodukt startprodukt iniziaprodotto startprodus - stopprodukt: stopprodukt stopproduct + stopproduct: stopprodukt stopproduct stopprodukt stopprodukt terminaprodotto stopprodus startproject: startproject startproject @@ -1507,58 +1522,58 @@ moveformula: verplaatsformule moveformula project: project project projekt projekt progetto proiect - onderdeel: onderdeel component + component: onderdeel component komponente komponenta componenet componenta - produkt: produkt product + produxt: produkt product produkt produkt prodotto produs - omgeving: omgeving environment + environment: omgeving environment umgebung prostredi ambiente mediu - geenfilesmeer: geenfilesmeer nomorefiles + nomorefiles: geenfilesmeer nomorefiles keinedateienmehr zadnedalsisoubory bastafile farafisiere - haalbuffer: haalbuffer getbuffer + getbuffer: haalbuffer getbuffer holepuffer ziskejbuffer prendibuffer adubuffer - stelbufferin: stelbufferin setupbuffer + setupbuffer: stelbufferin setupbuffer stellepufferein nastavbuffer impostabuffer seteazabuffer typebuffer: typebuffer typebuffer tippepuffer typebuffer typebuffer scriebuffer % GB - definieerbuffer: definieerbuffer definebuffer + definebuffer: definieerbuffer definebuffer definierepuffer definujbuffer definiscibuffer definestebuffer - betekenis: betekenis unitmeaning + unitmeaning: betekenis unitmeaning bedeutung vyznam nomeunita numeunitate % GB - voluit: voluit infull + infull: voluit infull volleswort plnezneni perlungo pelung - citaat: citaat quotation + quotation: citaat quotation zitat citace citazione citat - citeer: citeer quote + quote: citeer quote zitieren citovat menzione minicitat - startcitaat: startcitaat startquotation + startquotation: startcitaat startquotation startzitat startcitace iniziacitazione startcitat - stopcitaat: stopcitaat stopquotation + stopquotation: stopcitaat stopquotation stopzitat stopcitace terminacitazione stopcitat - stelciterenin: stelciterenin setupquote + setupquote: stelciterenin setupquote stellezitierenein nastavcitaci impostamenzione seteazaminicitat - definieer: definieer define + define: definieer define definieren definuj definisci defineste - herhaal: herhaal redo + redo: herhaal redo wiederholen opakovat rifai refa - gebruikcommandos: gebruikcommandos usecommands + usecommands: gebruikcommandos usecommands verwendebefehl uzijprikazy usacomandi folosestecomenzi definestartstop: definieerstartstop definestartstop @@ -1579,7 +1594,7 @@ moveformula: verplaatsformule moveformula stopglobal: stopglobaal stopglobal stopglobal stopglobalni terminaglobale stopblobal - naam: naam name + macroname: naam name name jmeno nome nume definemakeup: definieeropmaak definemakeup @@ -1597,16 +1612,16 @@ moveformula: verplaatsformule moveformula useexternalsoundtrack: gebruikexterngeluidsfragment useexternalsoundtrack verwendeexternestonstueck uzijexternizvuk usacolonnasonoraesterna folosestemuzicaexterna - gebruikexternefile: gebruikexternefile useexternalfile + useexternalfile: gebruikexternefile useexternalfile verwendeexternedatei uzijexternisoubor usafileesterno folosestefisierextern - gebruikexternefiles: gebruikexternefiles useexternalfiles + useexternalfiles: gebruikexternefiles useexternalfiles verwendeexternedateien uzijexternisoubory usafileesterni folosestefisiereexterne - kenmerk: kenmerk referral + referral: kenmerk referral verweis odkaz referral referit % GB - kenmerkdatum: kenmerkdatum referraldate + referraldate: kenmerkdatum referraldate verweisdatum odkaznadatum datareferral datareferit high: hoog high @@ -1618,19 +1633,19 @@ moveformula: verplaatsformule moveformula low: laag low tief nizky ped jos - breuk: breuk fraction + fraction: breuk fraction bruch zlomek frazione fractie chem: chem chem chem chem chim chem - startnaast: startnaast startopposite + startopposite: startnaast startopposite startgegenueber startprotejsek iniziaopposto startopozit - stopnaast: stopnaast stopopposite + stopopposite: stopnaast stopopposite stopgegenueber stopprotejsek terminaopposto stopopozit - stelnaastplaatsenin: stelnaastplaatsenin setupoppositeplacing + setupoppositeplacing: stelnaastplaatsenin setupoppositeplacing stellegegenueberplatzierenein nastavumisteniprotejsku impostaposizionamentoopposti seteazaplasareaopozita startpositioning: startpositioneren startpositioning @@ -1651,34 +1666,34 @@ moveformula: verplaatsformule moveformula setuprotate: stelroterenin setuprotate stelledrehenein nastavotoceni impostarotazione seteazarotare - spiegel: spiegel mirror + mirror: spiegel mirror spiegeln zrcadlit riflessione reflexie - schaal: schaal scale + scale: schaal scale format meritko scala scala % GB - stelnummerenin: stelnummerenin setupnumbering + setupnumbering: stelnummerenin setupnumbering stellenummerierungein nastavcislovani impostanumerazione seteazanumerotare reset: reset reset ruecksetzten reset reimposta reset - stelpublicatiesin: stelpublicatiesin setuppublications + setuppublications: stelpublicatiesin setuppublications stellepublikationein nastavpublikace impostapubblicazioni seteazapublicatii - publicatie: publicatie publication + publication: publicatie publication publikation publikace pubblicazione publicatie - definieerhbox: definieerhbox definehbox + definehbox: definieerhbox definehbox definierehbox definujhbox definiscihbox definestehbox - toevoegen: toevoegen adding + adding: toevoegen adding zusatz scitani adding adauga % GB - punten: punten periods + periods: punten periods punkt tecky punti puncte - stelkoppeltekenin: stelkoppeltekenin setuphyphenmark + setuphyphenmark: stelkoppeltekenin setuphyphenmark stellebindestrichein nastavdelitko impostasegnosillabazione seteazaliniesilabe % GB setupinterlinespace: stelinterliniein setupinterlinespace @@ -1696,19 +1711,19 @@ moveformula: verplaatsformule moveformula usepath: gebruikgebied usedirectory benutzeverzeichnis uzijadresar % TOBIAS usacartella folosestedirector % GB - definieeralineas: definieeralineas defineparagraphs + defineparagraphs: definieeralineas defineparagraphs definiereabsaetze definujodstavce definiscicapoversi definesteparagraf - stelalineasin: stelalineasin setupparagraphs + setupparagraphs: stelalineasin setupparagraphs stelleabsaetzeein nastavodstavce impostacapoversi seteazaparagrafe - geentest: geentest donttest + donttest: geentest donttest keintest zadnytest notest nutesta setupcomment: stelcommentaarin setupcomment stellekommentarein nastavkomentar impostacommento seteazacomentariu - commentaar: commentaar comment + comment: commentaar comment kommentar komentar commento comentariu definefield: definieerveld definefield @@ -1861,67 +1876,67 @@ definecolumnbreak: definieerkolomovergang definecolumnbreak german czech italian romanian - bovenhoogte: bovenhoogte topheight + topheight: bovenhoogte topheight hoeheoben vyskahorejsku altezzacima inaltimesus - bovenafstand: bovenafstand topdistance + topdistance: bovenafstand topdistance abstandoben vzdalenosthorejsku distanzacima distantasus - hoofdhoogte: hoofdhoogte headerheight + headerheight: hoofdhoogte headerheight kopfzeilenhoehe vyskazahlavi altezzaintestazione inaltimeantet - hoofdafstand: hoofdafstand headerdistance + headerdistance: hoofdafstand headerdistance kopfzeilenabstand vzdalenostzahlavi distanzaintestazione distantaantet - teksthoogte: teksthoogte textheight + textheight: teksthoogte textheight texthoehe vyskatextu altezzatesto inaltimetext - voetafstand: voetafstand footerdistance + footerdistance: voetafstand footerdistance fusszeileabstand vzdalenostupati distanzapdp distantasubsol - voethoogte: voethoogte footerheight + footerheight: voethoogte footerheight fusszeilenhoehe vyskaupati altezzapdp inaltimesubsol - onderafstand: onderafstand bottomdistance + bottomdistance: onderafstand bottomdistance abstandunten vzdalenostspodku distanzafondo distantajos - onderhoogte: onderhoogte bottomheight + bottomheight: onderhoogte bottomheight hoeheunten vyskaspodku altezzafondo inaltimejos - margebreedte: margebreedte marginwidth + marginwidth: margebreedte marginwidth marginalbreite sirkamarginalie ampiezzamargine latimemargine % GB - linkermargebreedte: linkermargebreedte leftmarginwidth + leftmarginwidth: linkermargebreedte leftmarginwidth linkemarginalbreite sirkalevemarginalie ampiezzamarginesinistro latimemarginestanga - rechtermargebreedte: rechtermargebreedte rightmarginwidth + rightmarginwidth: rechtermargebreedte rightmarginwidth rechtemarginalbreite sirkapravemarginalie ampiezzamarginedestro latimemarginedreapta - margeafstand: margeafstand margindistance + margindistance: margeafstand margindistance marginalafstand vzdalenostmarginalie distanzamargine distantamargine - linkermargeafstand: linkermargeafstand leftmargindistance + leftmargindistance: linkermargeafstand leftmargindistance linkemarginalafstand vzdalenostlevemarginalie distanzamarginesinistro distantamarginestanga - rechtermargeafstand: rechtermargeafstand rightmargindistance + rightmargindistance: rechtermargeafstand rightmargindistance rechtemarginalafstand vzdalenostpravemarginalie distanzamarginedestro distantamarginedreapta - randbreedte: randbreedte edgewidth + edgewidth: randbreedte edgewidth randbreite sirkaokraje ampiezzabordo latimecolturi - linkerrandbreedte: linkerrandbreedte leftedgewidth + leftedgewidth: linkerrandbreedte leftedgewidth breitelinkerrand sirkalevehookraje ampiezzabordosinistro latimecoltstanga - rechterrandbreedte: rechterrandbreedte rightedgewidth + rightedgewidth: rechterrandbreedte rightedgewidth breiterechterrand sirkapravehookraje ampiezzabordodestro latimecoltdreapta - randafstand: randafstand edgedistance + edgedistance: randafstand edgedistance randabstand vzdalenostokraje distanzabordo distantacolt - linkerrandafstand: linkerrandafstand leftedgedistance + leftedgedistance: linkerrandafstand leftedgedistance abstandlinkerrand vzdalenostlevehookraje distanzabordosinistro distantacoltstanga - rechterrandafstand: rechterrandafstand rightedgedistance + rightedgedistance: rechterrandafstand rightedgedistance abstandrechterrand vzdalenostpravehookraje distanzabordodestro distantacoltdreapta innermarginwidth: binnenmargebreedte innermarginwidth @@ -1948,37 +1963,37 @@ outermargindistance: buitenmargeafstand outermargindistance outeredgedistance: buitenrandafstand outeredgedistance outeredgedistance outeredgedistance outeredgedistance outeredgedistance - tekstbreedte: tekstbreedte textwidth + textwidth: tekstbreedte textwidth textbreite sirkatextu ampiezzatesto latimetext - zetbreedte: zetbreedte makeupwidth + makeupwidth: zetbreedte makeupwidth satzbreite sirkasazby ampiezzamakeup latimemakeup % GB - zethoogte: zethoogte makeupheight + makeupheight: zethoogte makeupheight satzhoehe vyskasazby altezzamakeup inaltimemakeup - kopwit: kopwit topspace + topspace: kopwit topspace kopfweite odsazenishora spaziocima spatiusus - bodemwit: bodemwit bottomspace + bottomspace: bodemwit bottomspace bottomspace bottomspace spaziofondo spatiujos - rugwit: rugwit backspace + backspace: rugwit backspace rumpfweite odsazenizleva spaziodietro spatiuspate % GB - snijwit: snijwit cutspace + cutspace: snijwit cutspace cutspace cutspace cutspace cutspace % GB - papierbreedte: papierbreedte paperwidth + paperwidth: papierbreedte paperwidth papierbreite sirkapapiru ampiezzacarta latimehartie - papierhoogte: papierhoogte paperheight + paperheight: papierhoogte paperheight papierhoehe vyskapapiru altezzacarta inaltimehartie - printpapierbreedte: printpapierbreedte printpaperwidth + printpaperwidth: printpapierbreedte printpaperwidth printpapierbreite sirkatiskpapiru ampiezzacartastampa latimehartieimprimanta % GB - printpapierhoogte: printpapierhoogte printpaperheight + printpaperheight: printpapierhoogte printpaperheight printpapierhoehe vyskatiskpapiru altezzacartastampa inaltimehartieimprimanta % GB pageoffset: paginaoffset pageoffset @@ -1987,16 +2002,18 @@ outermargindistance: buitenmargeafstand outermargindistance pagedepth: paginadiepte pagedepth pagedepth pagedepth pagedepth pagedepth - kopniveau: kopniveau headlevel + headlevel: kopniveau headlevel kopfniveau hlavniuroven livellotesta niveltitlu % GB linewidth: lijndikte linethickness liniendicke tloustkacary spessoreriga grosimelinie - totaalaantalpaginas: totaalaantalpaginas totalnumberofpages + totalnumberofpages: totaalaantalpaginas totalnumberofpages gesamtseitenanzahl celkovypocetstran numerototaledipagine numartotalpagini - +numberofsubpages: aantalsubpaginas numberofsubpages + numberofsubpages numberofsubpages + numberofsubpages numberofsubpages useXMLfilter: gebruikXMLfilter useXMLfilter useXMLfilter useXMLfilter useXMLfilter useXMLfilter @@ -2059,31 +2076,35 @@ startcolumnmakeup: startkolomopmaak startcolumnmakeup stopoverzicht: stopoverzicht stopoverview stopueberblick stopprehled terminaoverview stopoverview - stelbrievenin: stelbrievenin setupcorrespondence - stellekorrespondenzein nastavkorespondenci - impostacorrispondenza seteazacorespondenta - brieven: brieven letters - briefe dopisy - lettere litere - brief: brief letter - brief dopis - lettera litera label: label label label poppisek etichetta eticheta - sheet: sheet sheet - blatt list - foglio sheet - stelstickersin: stelstickersin setupstickers - stellestickerein nastavetikety - impostafrancobolli seteazastickers % GB - stelsheetsin: stelsheetsin setupsheets - stelleblattein nastavlisty - impostafogli seteazasheets +% +% obsolete +% +% stelbrievenin: stelbrievenin setupcorrespondence +% stellekorrespondenzein nastavkorespondenci +% impostacorrispondenza seteazacorespondenta +% brieven: brieven letters +% briefe dopisy +% lettere litere +% brief: brief letter +% brief dopis +% lettera litera +% sheet: sheet sheet +% blatt list +% foglio sheet +% stelstickersin: stelstickersin setupstickers +% stellestickerein nastavetikety +% impostafrancobolli seteazastickers % GB +% stelsheetsin: stelsheetsin setupsheets +% stelleblattein nastavlisty +% impostafogli seteazasheets +% labels: labels labels labels popisky etichette etichete - woonplaats: woonplaats domicile + domicile: woonplaats domicile wohnort bydliste domicilio domiciliu diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex index a4b56f4bf..5054a5bb0 100644 --- a/tex/context/base/mult-con.tex +++ b/tex/context/base/mult-con.tex @@ -33,19 +33,19 @@ german czech italian romanian - een: een one + one: een one eins jedna uno unu - twee: twee two + two: twee two zwei dve due doi - drie: drie three + three: drie three drei tri tre trei - vier: vier four + four: vier four vier ctyri quattro patru - vijf: vijf five + five: vijf five fuenf pet cinque cinci \stopvariables @@ -131,13 +131,13 @@ german czech italian romanian - oppagina: oppagina atpage + atpage: oppagina atpage aufseite nastrance apagina lapagina - hierboven: hierboven hencefore + hencefore: hierboven hencefore vorher vyse precedente precedent - hieronder: hieronder hereafter + hereafter: hieronder hereafter nachher nize seguente urmator @@ -158,68 +158,134 @@ sectionlevel: sectie section abschnitt oddil paragrafo sectiune - deel: deel part + part: deel part teil cast parte parte - hoofdstuk: hoofdstuk chapter + chapter: hoofdstuk chapter kapitel kapitola capitolo capitol - onderwerp: onderwerp subject + subject: onderwerp subject thema tema argomento subiect - paragraaf: paragraaf section + section: paragraaf section absatz sekce capoverso sectiune - titel: titel title + title: titel title titel titul titolo titlu - margetitel: margetitel margintitle + margintitle: margetitel margintitle marginaltitel titulmarginalie titoloinmargine titlumarginal - inhoud: inhoud content + content: inhoud content inhalt obsah indice cuprins - inhouden: inhouden contents + contents: inhouden contents inhalte obsah indici cuprinsuri - bijlage: bijlage appendix + appendix: bijlage appendix anhang dodatek appendice apendix - bijlagen: bijlagen appendices + appendices: bijlagen appendices anhaenge dodatky appendici apendixuri - hoofdtekst: hoofdtekst bodypart + bodypart: hoofdtekst bodypart haupttext hlavnicast testoprincipale principal % GB - hoofdteksten: hoofdteksten bodymatter + bodymatter: hoofdteksten bodymatter haupttexte hlavnicasti testiprincipali principalul % GB - inleiding: inleiding frontpart + frontpart: inleiding frontpart einleitung prednicast prefazione prolog - inleidingen: inleidingen frontmatter + frontmatter: inleidingen frontmatter einleitungen prednicasti preambolo prologul - uitleiding: uitleiding backpart + backpart: uitleiding backpart epilog epilog postfazione epilog % GB - uitleidingen: uitleidingen backmatter + backmatter: uitleidingen backmatter epiloge epilogy postambolo epilogul % GB - voetnoot: voetnoot footnote + footnote: voetnoot footnote fussnote poznamkapodcarou notapdp notasubsol - systeem: systeem system + system: systeem system systeme system sistema sistem \stopvariables +%D For Taco: + +\startvariables dutch english + german czech + italian romanian + + subsection: subparagraaf subsection + unterabsatz podsekce + sottocapoverso subsectiune + + subsubsection: subsubparagraaf subsubsection + unterunterabsatz podpodsekce + sottosottocapoverso subsubsectiune + + subsubsubsection: subsubsubparagraaf subsubsubsection + unterunterunterabsatz podpodpodsekce + sottosottosottocapoverso subsubsubsectiune + + subsubsubsubsection: subsubsubsubparagraaf subsubsubsubsection + unterunterunterunterabsatz podpodpodpodsekce + sottosottosottosottocapoverso subsubsubsubsectiune + +subsubsubsubsubsection: subsubsubsubsubparagraaf subsubsubsubsubsection + unterunterunterunterunterabsatz podpodpodpodpodsekce + sottosottosottosottosottocapoverso subsubsubsubsubsectiune + + subsubject: subonderwerp subsubject + unterthema podtema + sottoargomento subsubiect + + subsubsubject: subsubonderwerp subsubsubject + unterunterthema podpodtema + sottosottoargomento subsubsubiect + + subsubsubsubject: subsubsubonderwerp subsubsubsubject + unterunterunterthema podpodpodtema + sottosottosottoargomento subsubsubsubiect + + subsubsubsubsubject: subsubsubsubonderwerp subsubsubsubsubject + unterunterunterunterthema podpodpodpodtema + sottosottosottosottoargomento subsubsubsubsubiect + +subsubsubsubsubsubject: subsubsubsubsubonderwerp subsubsubsubsubsubject + unterunterunterunterunterthema podpodpodpodpodtema + sottosottosottosottosottoargomento subsubsubsubsubsubiect + +\stopvariables + +%D For the confused (to be translated): + \startvariables dutch english german czech italian romanian - typen: typen typing + flushleft: lijnlinks flushleft + flushleft flushleft + flushleft flushleft + flushright: lijnrechts flushright + flushright flushright + flushright flushright + center: centreer center + center center + center center + +\stopvariables + +\startvariables dutch english + german czech + italian romanian + + typing: typen typing tippen typing typing typing % GB file: file file @@ -240,34 +306,34 @@ german czech italian romanian - formule: formule formula + formula: formule formula formel rovnice formula formula - formules: formules formulae + formulae: formules formulae formeln rovnice formule formule - figuur: figuur figure + figure: figuur figure abbildung obrazek figura figura - figuren: figuren figures + figures: figuren figures abbildungen obrazky figure figure - tabel: tabel table + table: tabel table tabelle tabulka tabella tabelul - tabellen: tabellen tables + tables: tabellen tables tabellen tabulky tabelle tabelele - grafiek: grafiek graphic + graphic: grafiek graphic grafik graf grafico graficul - grafieken: grafieken graphics + graphics: grafieken graphics grafiken grafy grafici graficele intermezzo: intermezzo intermezzo intermezzo intermezzo intermezzo intermezzo - intermezzos: intermezzos intermezzi + intermezzi: intermezzos intermezzi intermezzi intermezzi intermezzi intermezzi index: index index @@ -276,10 +342,10 @@ indices: indices indices indizies rejstriky indicianalitici indexuri - afkorting: afkorting abbreviation + abbreviation: afkorting abbreviation abkuerzung zkratka abbreviazione abreviere - afkortingen: afkortingen abbreviations + abbreviations: afkortingen abbreviations abkuerzungen zkratky abbreviazioni abrevieri logo: logo logo @@ -288,31 +354,28 @@ logos: logos logos logos loga loghi logos - eenheid: eenheid unit + unit: eenheid unit einheit jednotka unita unitate - eenheden: eenheden units + units: eenheden units einheiten jednotky unita unitati - regel: regel line + line: regel line zeile radek riga linia - regels: regels lines + lines: regels lines zeilen radky righe linii framedtext: kadertekst framedtext umrahmtertext oramovanytext testoincorniciato textinconjurat - - citaat: citaat quotation + quotation: citaat quotation zitat citace citazione citat - - citeer: citeer quote + quote: citeer quote zitieren citovat menzione minicitat - - spraak: spraak speech + speech: spraak speech speech speech speech speech itemize: opsomming itemize @@ -376,79 +439,79 @@ midsentence: middenzin midsentence limittext limittext limittext limittext - datum: datum date + date: datum date datum datum data data - voorwit: voorwit spacebefore + spacebefore: voorwit spacebefore vorspatium mezerapred spazioprima spatiuinainte - tussenwit: tussenwit spaceinbetween + spaceinbetween: tussenwit spaceinbetween spaceinbetween spaceinbetween spaceinbetween spaceinbetween - nawit: nawit spaceafter + spaceafter: nawit spaceafter nachspatium mezeraza spaziodopo spatiudupa - zijvoorwit: zijvoorwit sidespacebefore + sidespacebefore: zijvoorwit sidespacebefore nebenvorspatium bocnimezerapred spaziolateraleprima spatiulateralinainte - zijnawit: zijnawit sidespaceafter + sidespaceafter: zijnawit sidespaceafter nebennachspatium bocnimezeraza spaziolateraledopo spatiulateraldupa - aan: aan to + to: aan to zu na verso catre - aanduiding: aanduiding indicator + indicator: aanduiding indicator indikator indikator indicatore indicator - achtergrond: achtergrond background + background: achtergrond background hintergrund pozadi sfondo fundal - achtergronddiepte: achtergronddiepte backgrounddepth + backgrounddepth: achtergronddiepte backgrounddepth hintergrundtiefe hloubkapozadi profonditasfondo adancimefundal - achtergrondhoek: achtergrondhoek backgroundcorner + backgroundcorner: achtergrondhoek backgroundcorner hintergrundwinkel rohpozadi angolosfondo coltfundal -splitskleur: splitskleur splitcolor + splitcolor: splitskleur splitcolor splitcolor splitcolor splitcolor splitcolor - achtergrondkleur: achtergrondkleur backgroundcolor + backgroundcolor: achtergrondkleur backgroundcolor hintergrundfarbe barvapozadi coloresfondo culoarefundal - voorgrondkleur: voorgrondkleur foregroundcolor + foregroundcolor: voorgrondkleur foregroundcolor foregroundcolor foregroundcolor coloreprimopiano foregroundcolor - voorgrondletter: voorgrondletter foregroundstyle + foregroundstyle: voorgrondletter foregroundstyle foregroundstyle foregroundstyle foregroundstyle foregroundstyle clipoffset: clipoffset clipoffset clipoffset clipoffset clipoffset clipoffset - achtergrondoffset: achtergrondoffset backgroundoffset + backgroundoffset: achtergrondoffset backgroundoffset hintergrundoffset offsetpozadi offsetsfondo offsetfundal - achtergrondraster: achtergrondraster backgroundscreen + backgroundscreen: achtergrondraster backgroundscreen hintergrundraster rastrpozadi schermosfondo ecranfundal - achtergrondstraal: achtergrondstraal backgroundradius + backgroundradius: achtergrondstraal backgroundradius hintergrundradius polomerpozadi raggiosfondo razafundal - adres: adres address + address: adres address adresse adresa indirizzo adresa - afsluiter: afsluiter stopper + stopper: afsluiter stopper abschnitttrenner predel stopper stopper - afstand: afstand distance + distance: afstand distance abstand vzdalenost distanza distanta - alinea: alinea paragraph + paragraph: alinea paragraph absatz odstavec capoverso paragraf - assenstelsel: assenstelsel axis + axis: assenstelsel axis achsen osa asse axa - auteur: auteur author + author: auteur author autor autor autore autor auto: auto auto @@ -457,122 +520,122 @@ clipoffset: clipoffset clipoffset autofile: autofile autofile autofile autofile autofile autofile % TB TH - balanceren: balanceren balance + balance: balanceren balance ausgleichen rovnovaha bilanciamento balanta - bfactor: bfactor wfactor + wfactor: bfactor wfactor bfaktor sfaktor wfactor factorw % GB - binnen: binnen inner + inner: binnen inner innen vnitrni interno intern - blanko: blanko blank + blank: blanko blank blanko prazdny rigovuoto blanc - blokkade: blokkade obstruction + obstruction: blokkade obstruction gesperrt prekazka ostruzione obstructie - blokwijze: blokwijze blockway + blockway: blokwijze blockway blockauf dobloku blockway blockway % GB - bodemwit: bodemwit bottomspace + bottomspace: bodemwit bottomspace bottomspace bottomspace spaziofondo spatiujos - boven: boven top + top: boven top oben vrsek cima sus - bovenafstand: bovenafstand topdistance + topdistance: bovenafstand topdistance obenabstand vzdalenostvrsku distanzacima distantasus - bovenkader: bovenkader topframe + topframe: bovenkader topframe obenrahmen rameceknahore cornicecima framesus - bovenoffset: bovenoffset topoffset + topoffset: bovenoffset topoffset obenoffset offsetvrsku offsetcima offsetsus - bovenstatus: bovenstatus topstate + topstate: bovenstatus topstate statusoben statusvrsku statocima staresus - breedte: breedte width + width: breedte width breite sirka ampiezza latime - maxbreedte: maxbreedte maxwidth + maxwidth: maxbreedte maxwidth maxbreite maxsirka ampiezzamax latimemaxima - minbreedte: minbreedte minwidth + minwidth: minbreedte minwidth minbreite minsirka ampiezzamin latimeminima % TB TH - bron: bron source + source: bron source quelle zdroj origine sursa - commando: commando command + command: commando command befehl prikaz comando comanda - commandos: commandos commands + commands: commandos commands befehle prikazy comandi comenzi component: component component component component component component - contrastkleur: contrastkleur contrastcolor + contrastcolor: contrastkleur contrastcolor kontrastfarbe kontrastnibarva colorecontrasto culoarecontrast - conversie: conversie conversion + conversion: conversie conversion konversion konverze conversione conversie - kopconversie: kopconversie headconversion + headconversion: kopconversie headconversion headconversion konverzehlavicky conversionetesta conversietitlu % TB - koplabel: koplabel headlabel + headlabel: koplabel headlabel headlabel popisekhlavicky etichettatesta etichetatitlu % TB criterium: criterium criterium kriterium kriterium criterio criteriu - datum: datum date + date: datum date datum datum data data default: default default default implicitni implicito implicit - diepte: diepte depth + depth: diepte depth tiefe hloubka profondita inaltime - dieptecorrectie: dieptecorrectie depthcorrection + depthcorrection: dieptecorrectie depthcorrection tiefekorrektur korekcehloubky correzioneprofondita corectieadancime % dikte: dikte thickness % dicke tloustka % spessore grosime - doorgaan: doorgaan continue + continue: doorgaan continue fortsetzen pokracovat continua continua - dubbelzijdig: dubbelzijdig doublesided + doublesided: dubbelzijdig doublesided doppelseitig oboustranne doppiafaccia douafete dummy: dummy dummy dummy dummy dummy dummy - eenheid: eenheid unit + unit: eenheid unit einheit jednotka unita unitate - eigennummer: eigennummer ownnumber + ownnumber: eigennummer ownnumber eigenenummer vlastnicislo numeroproprio numarpropriu % new % eigenschap: eigenschap property % property property % property property - evenmarge: evenmarge evenmargin + evenmargin: evenmarge evenmargin geraderand sudamarginalie marginepari marginepara - expansie: expansie expansion + expansion: expansie expansion expansion expanzen espansione expansiune factor: factor factor faktor faktor fattore factor - converteerfile: converteerfile convertfile + convertfile: converteerfile convertfile konvertieredatei konverzesouboru convertifile convertestefisier file: file file @@ -581,7 +644,7 @@ component: component component inputfile: inputfile inputfile inputfile inputfile inputfile inputfile % !! - formaat: formaat size + size: formaat size groesse velikost dimensione dimensiune autofocus: autofocus autofocus @@ -590,196 +653,205 @@ component: component component focus: focus focus focus zaostreni focus focus % GB - gebied: gebied directory + directory: gebied directory verzeichnis adresar directory director grid: grid grid gritter mrizka griglia grid - groot: groot big + big: groot big gross velky grande mare - haal: haal get + get: haal get hole ziskat prendi adu hang: hang hang haengend zaveseni sospendi suspenda - herhaal: herhaal repeat + repeat: herhaal repeat wiederholen opakovat ripeti repeta hfactor: hfactor hfactor hfaktor vfaktor hfactor hfactor % GB - hoek: hoek corner + corner: hoek corner winkel roh angolo colt hoffset: hoffset hoffset hoffset hoffset hoffset hoffset % GB - hokjes: hokjes frames + frames: hokjes frames umrahmen ramecky cornici frames - hoofd: hoofd header + header: hoofd header kopfzeile zahlavi intestazione antet - hoofdafstand: hoofdafstand headerdistance + headerdistance: hoofdafstand headerdistance kopfzeilenabstand vzdalenostzahlavi distanzaintestazione distantaantet - hoofdstatus: hoofdstatus headerstate + headerstate: hoofdstatus headerstate kopfzeilenstatus statuszahlavi statointestazione stareantet - hoogte: hoogte height + height: hoogte height hoehe vyska altezza inaltime - maxhoogte: maxhoogte maxheight + maxheight: maxhoogte maxheight maxhoehe maxvyska altezzamax inaltimemaxima - huidige: huidige current + minheight: minhoogte minheight + minhoehe minvyska + altezzamin inaltimeminima + mindepth: mindiepte mindepth + mindepth mindepth + mindeoth mindepth % new GB + current: huidige current aktuell aktualni corrente curent in: in in in v in in - inspringen: inspringen indenting + indenting: inspringen indenting einziehen odsazovani rientro aliniat - interactie: interactie interaction + interaction: interactie interaction interaktion interakce interazione interactiune - interlinie: interlinie interlinespace + interlinespace: interlinie interlinespace zeilenabstande meziradkovamezera interlinea spatiereinterliniara items: items items posten polozky elementi elemente - kader: kader frame + frame: kader frame rahmen ramecek cornice frame - kaderdiepte: kaderdiepte framedepth + framedepth: kaderdiepte framedepth rahmentiefe hloubkaramecku profonditacornice adancimeframe - kaderhoek: kaderhoek framecorner + framecorner: kaderhoek framecorner rahmenwinkel rohramecku angolocornice coltframe - kaderkleur: kaderkleur framecolor + framecolor: kaderkleur framecolor rahmenfarbe barvaramecku colorecornice culoareframe - kaderoffset: kaderoffset frameoffset + frameoffset: kaderoffset frameoffset rahmenoffset offsetramecku offsetcornice offsetframe - kaderstraal: kaderstraal frameradius + frameradius: kaderstraal frameradius rahmenradius polomerramecku raggiocornice razaframe - kantlijn: kantlijn marginedge + marginedge: kantlijn marginedge marginalkante textovahrana bordomargine coltbordura - kantlijntekst: kantlijntekst marginedgetext + marginedgetext: kantlijntekst marginedgetext marginalkantetext textmarginalnihookraje testobordomargine textcoltbordura - karakteruitlijnen: karakteruitlijnen aligncharacter + aligncharacter: karakteruitlijnen aligncharacter aligncharacter aligncharacter allineacarattere aliniazacaracter % TB TH - uitlijnkarakter: uitlijnkarakter alignmentcharacter + alignmentcharacter: uitlijnkarakter alignmentcharacter alignmentcharacter alignmentcharacter carattereallineamento alierecaracter % TB TH - klein: klein small + small: klein small klein male piccolo mic - kleur: kleur color + color: kleur color farbe barva colore culoare - kolom: kolom column + column: kolom column spalte sloupec colonna coloana - kolommen: kolommen columns + columns: kolommen columns spalten sloupce colonne coloane - kolomafstand: kolomafstand columndistance + columndistance: kolomafstand columndistance spaltenabstand vzdalenostsloupcu distanzacolonne distantacoloane - kopkleur: kopkleur headcolor + headcommand: kopcommando headcommand + headcommand headcommand + headcommand headcommand + headcolor: kopkleur headcolor kopffarbe barvahlavicky coloretesta culoaretitlu - kopletter: kopletter headstyle + headstyle: kopletter headstyle kopfstil stylhlavicky stiletesta stiltitlu - kopna: kopna afterhead + afterhead: kopna afterhead nachkopf pohlavicce dopotesta dupatitlu - kopoffset: kopoffset veroffset + veroffset: kopoffset veroffset kopfoffset offsethlavicky veroffset veroffset % GB - koppeling: koppeling coupling + coupling: koppeling coupling verknuepfung propojeni accoppiamento cuplare - koppelwijze: koppelwijze couplingway + couplingway: koppelwijze couplingway verkopplungsart zpusobpropojeni modoaccoppiamento modcuplare - kopvoor: kopvoor beforehead + beforehead: kopvoor beforehead vorkopf predhlavickou primaditesta inaintetitlu - kopwit: kopwit topspace + topspace: kopwit topspace kopfspatium svrchnimezera spaziocima spatiusus - korps: korps bodyfont + bodyfont: korps bodyfont fliesstext zakladnifont fonttesto fonttext label: label label label popisek etichetta eticheta - leeg: leeg empty + empty: leeg empty leer prazdne vuoto gol - letter: letter style + style: letter style stil pismeno stile stil - lijn: lijn rule + rule: lijn rule linie linka linea rigla - lijndikte: lijndikte rulethickness + rulethickness: lijndikte rulethickness liniendicke tloustkalinky spessorelinea grosimerigla - lijnkleur: lijnkleur rulecolor + rulecolor: lijnkleur rulecolor linienfarbe barvalinky colorelinea culoarerigla - lijst: lijst list + list: lijst list liste seznam elenco lista - linkerbreedte: linkerbreedte leftwidth + leftwidth: linkerbreedte leftwidth linkerbreite sirkavlevo ampiezzasinistra latimestanga - linkerkader: linkerkader leftframe + leftframe: linkerkader leftframe linkerrahmen ramecekvlevo cornicesinistra framestanga - linkerkleur: linkerkleur leftcolor + leftcolor: linkerkleur leftcolor linkerfarbe barvavlevo coloresinistra culoarestanga - linkerletter: linkerletter leftstyle + leftstyle: linkerletter leftstyle linkerstil stylvlevo stilesinistra stilstanga - linkermarge: linkermarge leftmargin + leftmargin: linkermarge leftmargin linkerrand levyokraj marginesinistro marginestanga - linkermargeafstand: linkermargeafstand leftmargindistance + leftmargindistance: linkermargeafstand leftmargindistance linkerrandabstand vzdalenostlevehookraje distanzamarginesinistro distantamarginestanga - linkeroffset: linkeroffset leftoffset + leftoffset: linkeroffset leftoffset linkeroffset levyoffset offsetsinistro offsetstanga - linkerrand: linkerrand leftedge + leftedge: linkerrand leftedge linkekante levahrana bordosinistro bordurastanga - linkerrandafstand: linkerrandafstand leftedgedistance + leftedgedistance: linkerrandafstand leftedgedistance linkerkantenabstand vzdalenostlevehrany distanzabordosinistro distantabordurastanga - linkertekst: linkertekst lefttext + lefttext: linkertekst lefttext linkertext textvlevo testosinistro textstanga % GB - links: links left + left: links left links vlevo sinistra stanga - nlinks: nlinks nleft + nleft: nlinks nleft nlinks nvlevo nsinistra nstanga logo: logo logo @@ -788,97 +860,100 @@ component: component component logos: logos logos logos loga loghi logos - lokaal: lokaal local + local: lokaal local lokal lokalne locale local - marge: marge margin + margin: marge margin marginalie marginalie margine margine - margeafstand: margeafstand margindistance + margindistance: margeafstand margindistance marginalabstand vzdalenostokraje distanzamargine distantamargine - margetekst: margetekst margintext + margintext: margetekst margintext marginaltext textmarginalie testomargine textmargine - markering: markering marking + marking: markering marking beschriftung znaceni marcatura marcaje - markleur: markleur marcolor + marcolor: markleur marcolor beschrfarbe barvaznacky coloremarcatura culoaremarcaj - marletter: marletter marstyle + marstyle: marletter marstyle beschrstil stylsnacky stilemarcatura stilmarcaj menu: menu menu menue menu menu meniu - splitsmethode: splitsmethode splitmethod + splitmethod: splitsmethode splitmethod splitmethod splitmethod splitmethod splitmethod - tekstmethode: tekstmethode textmethod + textmethod: tekstmethode textmethod textmethod textmethod textmethod textmethod - zijmethode: zijmethode sidemethod + sidemethod: zijmethode sidemethod sidemethod sidemethod sidemethod sidemethod - methode: methode method + method: methode method methode metoda metodo metoda - midden: midden middle + middle: midden middle mittig stredni centro mijloc % GB - middentekst: middentekst middletext + middletext: middentekst middletext mittigertext strednitext testocentro textmijloc % GB + max: max max + max max + max max min: min min min min min min - monster: monster sample + sample: monster sample muster vzor campione exemplu - na: na after + after: na after nach po dopo dupa - naam: naam name + name: naam name name jmeno nome nume - nacommando: nacommando commandafter + commandafter: nacommando commandafter zumbefehl prikazpo comdandodopo comandadupa - nboven: nboven ntop + ntop: nboven ntop noben nvrsek ncima nsus - niveau: niveau level + level: niveau level niveau uroven livello nivel - niveaus: niveaus levels + levels: niveaus levels niveaus urovne livelli nivele - nonder: nonder nbottom + nbottom: nonder nbottom nunten nspodek nfondo njos norm: norm norm norm norm norma norm - nregels: nregels nlines + nlines: nregels nlines zzeile nradky nrighe nlinii - nummer: nummer number + number: nummer number nummer cislo numero numar - nummercommando: nummercommando numbercommand + numbercommand: nummercommando numbercommand nummerbefehl ciselnyprikaz comandonumero comandanumar - nummeren: nummeren numbering + numbering: nummeren numbering nummerierung cislovani numerazione numerotare - nummerkleur: nummerkleur numbercolor + numbercolor: nummerkleur numbercolor nummernfarbe barvacisla colorenumero culoarenumar - nummerletter: nummerletter numberstyle + numberstyle: nummerletter numberstyle nummernstil stylcisla stilenumero stilnumar - nummerscheider: nummerscheider numberseparator + numberseparator: nummerscheider numberseparator nummernseperator oddelovaccisla separatorenumero separatornumar object: object object @@ -887,70 +962,70 @@ component: component component offset: offset offset offset offset offset offset - onder: onder bottom + bottom: onder bottom unten spodek fondo jos - onderafstand: onderafstand bottomdistance + bottomdistance: onderafstand bottomdistance abstandunten vzdalenostspodku distanzafondo distantajos - onderkader: onderkader bottomframe + bottomframe: onderkader bottomframe untenrahmen ramecekdole cornicefondo framejos - onderoffset: onderoffset bottomoffset + bottomoffset: onderoffset bottomoffset untenoffset offsetspodku offsetfondo offsetjos - onderstatus: onderstatus bottomstate + bottomstate: onderstatus bottomstate untenstatus statusspodku statofondo starejos - onevenmarge: onevenmarge oddmargin + oddmargin: onevenmarge oddmargin ungeraderand lichyokraj marginedispari margineimpara - op: op at + at: op at bei u ad la - optie: optie option + option: optie option option volba opzione optiune - pagina: pagina page + page: pagina page seite stranka pagina pagina - paginacommando: paginacommando pagecommand + pagecommand: paginacommando pagecommand seitenbefehl strankovyprikaz comandopagina comandapagina - paginakleur: paginakleur pagecolor + pagecolor: paginakleur pagecolor seitenfarbe barvastranky colorepagina culoarepagina - paginaletter: paginaletter pagestyle + pagestyle: paginaletter pagestyle seitenstil stylstranky stilepagina stilpagina - paginanummer: paginanummer pagenumber + pagenumber: paginanummer pagenumber seitennummer cislostranky numeropagina numarpagina - paginaovergangen: paginaovergangen pageboundaries + pageboundaries: paginaovergangen pageboundaries seitenbegrenzung hranicestranky limitipagina marginipagina - paginastatus: paginastatus pagestate + pagestate: paginastatus pagestate pagestate pagestate statopagina pagestate % TODO palet: palet palet palette paleta tavolozza paleta - papier: papier paper + paper: papier paper papier papir carta hartie - plaats: plaats location + location: plaats location platz misto luogo locatie - plaatsafsluiter: plaatsafsluiter placestopper + placestopper: plaatsafsluiter placestopper setzetrenner predelmista mettistopper punestopper % GB - plaatsen: plaatsen place + place: plaatsen place platziere umistit metti pune % GB - plaatskop: plaatskop placehead + placehead: plaatskop placehead setzekopf umistihlavicku mettitesta punetitlu % GB - positie: positie position + position: positie position position position posizione pozitie % TB TH prefix: prefix prefix @@ -962,295 +1037,303 @@ component: component component preview: preview preview vorschau nahled anteprima previzualizare -proces: proces process - process process - process process - spot: spot spot - spot spot - spot spot - punt: punt dot +process: proces process + process process + process process + spot: spot spot + spot spot + spot spot + dot: punt dot punkt tecka punto punct - pijl: pijl arrow + arrow: pijl arrow pfeil sipka freccia sageata - rand: rand edge + edge: rand edge kante hrana bordo bordura - randafstand: randafstand edgedistance + edgedistance: randafstand edgedistance kantenabstand vzdalenosthrany distanzabordo distantabordura - raster: raster screen + screen: raster screen raster rastr schermo ecran - rechterbreedte: rechterbreedte rightwidth + rightwidth: rechterbreedte rightwidth rechterbreite sirkavpravo ampiezzadestra marginedreapta - rechterkader: rechterkader rightframe + rightframe: rechterkader rightframe rechterrahmen ramecekvpravo cornicedestra framedreapta - rechterkleur: rechterkleur rightcolor + rightcolor: rechterkleur rightcolor rechterfarbe barvavpravo coloredestra culoaredreapta - rechterletter: rechterletter rightstyle + rightstyle: rechterletter rightstyle rechterstil stylvpravo stiledestra stildreapta - rechtermarge: rechtermarge rightmargin + rightmargin: rechtermarge rightmargin rechterrand pravyokraj marginedestro marginedreapta - rechtermargeafstand: rechtermargeafstand rightmargindistance + rightmargindistance: rechtermargeafstand rightmargindistance rechterrandabstand vzdalenostpravehookraje distanzamarginedestro distantamarginedreapta - rechteroffset: rechteroffset rightoffset + rightoffset: rechteroffset rightoffset rechterabstand pravyoffset offsetdestro offsetdreapta - rechterrand: rechterrand rightedge + rightedge: rechterrand rightedge rechtekante pravahrana bordodestro borduradreapta - rechterrandafstand: rechterrandafstand rightedgedistance + rightedgedistance: rechterrandafstand rightedgedistance rechterkantenabstand vzdalenostpravehrany distanzabordodestro distantacoltdreapta - rechtertekst: rechtertekst righttext + righttext: rechtertekst righttext rechtertext textvpravo testodestro textdreapta % GB - rechts: rechts right + right: rechts right rechts vpravo destra dreapta - nrechts: nrechts nright + nright: nrechts nright nrechts nvpravo ndestra ndreapta - reductie: reductie reduction + reduction: reductie reduction reduktion redukce riduzione reducere - refereren: refereren referencing + referencing: refereren referencing referieren odkazujici referencing referinta % GB - regel: regel line + line: regel line zeile radek riga linie - regelcorrectie: regelcorrectie linecorrection + linecorrection: regelcorrectie linecorrection zeilekorrektur korekceradku correzioneriga corectielinie - regels: regels lines + lines: regels lines zeilen radky righe linii - rek: rek stretch + stretch: rek stretch strecken natahnout dilata dilatat % CHECK - resolutie: resolutie resolution + resolution: resolutie resolution aufloesung rozliseni risoluzione rezolutie - rotatie: rotatie rotation + rotation: rotatie rotation rotation rotace rotazione rotatie - rugoffset: rugoffset horoffset +% new + orientation: orientatie orientation + orientation orientation + orientation orientation + + horoffset: rugoffset horoffset rumpfabstand horoffset horoffset offsetoriz % GB - rugwit: rugwit backspace + backspace: rugwit backspace rumpfspatium zpetnamezera backspace spatiuspate % GB - richting: richting direction + direction: richting direction richtung smer direzione directie - schaal: schaal scale + scale: schaal scale format meritko scala scala - scheider: scheider separator + separator: scheider separator seperator oddelovac separatore separator - scherm: scherm display + display: scherm display bildschirm obrazovka display display % GB scope: scope scope bereich rozsah scope scop % GB - sectie: sectie section + section: sectie section abschnitt oddil sezione sectiune - sectienummer: sectienummer sectionnumber + sectionnumber: sectienummer sectionnumber abschnittsnummer cislooddilu numerosezione numarsectiune setups: setups setups setups setups setups setups - snijwit: snijwit cutspace + cutspace: snijwit cutspace cutspace cutspace cutspace cutspace % GB - soort: soort family + family: soort family familie rodina famiglia familie - spatie: spatie space + space: spatie space spatium mezera spazio spatiu - spatiering: spatiering spacing + spacing: spatiering spacing spatiumausgleich mezerovani spaziatura spatiere - splitsen: splitsen split + split: splitsen split split split separa split % TB TH - springvolgendein: springvolgendein indentnext +splitoffset: splitsoffset splitoffset + splitoffset splitoffset + splitoffset splitoffset % TB TH + indentnext: springvolgendein indentnext ziehefolgendeein odsadpristi rientrasuccessivo aliniaturmator - stap: stap step + step: stap step schritt krok passo pas - stapel: stapel stack + stack: stapel stack stack stack stack stack % TB GB start: start start start start inizia start - status: status state + state: status state status status stato stare stop: stop stop stop stop termina stop - straal: straal radius + radius: straal radius radius polomer raggio raza - streep: streep dash + dash: streep dash strich pomlcka dash dash % GB sub: sub sub unter pod sotto sub - subtitel: subtitel subtitle + subtitle: subtitel subtitle untertitel podtitulek sottotitolo subtitlu - symbool: symbool symbol + symbol: symbool symbol symbol symbol simbolo simbol - symboolset: symboolset symbolset + symbolset: symboolset symbolset symbolset sadasymbolu setsimboli setsimbol - symkleur: symkleur symcolor + symcolor: symkleur symcolor symfarbe barvasymbolu coloresimbolo culoaresimbol - symletter: symletter symstyle + symstyle: symletter symstyle symstil stylsymboly stilesimbolo stilsimbol - synoniem: synoniem synonym + synonym: synoniem synonym synonym synonymum sinonimo sinonim - synoniemkleur: synoniemkleur synonymcolor + synonymcolor: synoniemkleur synonymcolor synonymfarbe barvasynonyma coloresinonimi culoaresinonim - synoniemletter: synoniemletter synonymstyle + synonymstyle: synoniemletter synonymstyle synonymstil stylsynonyma stilesinonimi stilsinonim tab: tab tab tab tab tab tab - teken: teken sign + sign: teken sign zeichen znak segno semn - tekst: tekst text + text: tekst text text text testo text - tekstbreedte: tekstbreedte textwidth + textwidth: tekstbreedte textwidth textbreite sirkatextu ampiezzatesto latimetext - tekstcommando: tekstcommando textcommand + textcommand: tekstcommando textcommand textbefehl textovyprikaz comandotesto comandatext - tekstformaat: tekstformaat textsize + textsize: tekstformaat textsize textgroesse velikosttextu dimensionetesto dimensiunetext - tekstkleur: tekstkleur textcolor + textcolor: tekstkleur textcolor textfarbe barvatextu coloretesto culoaretext - tekstletter: tekstletter textstyle + textstyle: tekstletter textstyle textstil styltextu stiletesto stiltext - tekstscheider: tekstscheider textseparator + textseparator: tekstscheider textseparator textseparator oddelovactextu separatoretesto separatortext - tekststatus: tekststatus textstate + textstate: tekststatus textstate textstatus statustextu statotesto staretext - titel: titel title + title: titel title titel titul titolo titlu - titeluitlijnen: titeluitlijnen aligntitle + aligntitle: titeluitlijnen aligntitle titelausrichten zarovnejtitul allineatitolo alinieretitlu - tolerantie: tolerantie tolerance + tolerance: tolerantie tolerance toleranz tolerance tolleranza toleranta - tussen: tussen inbetween + inbetween: tussen inbetween zwischen mezi tra intre type: type type typ typ type type % GB - uitlijnen: uitlijnen align + align: uitlijnen align ausrichtung zarovnani allinea aliniere - urlspatie: urlspatie urlspace + urlspace: urlspatie urlspace urlspatium prostorurl spaziourl spatiuurl - urlvariant: urlvariant urlalternative + urlalternative: urlvariant urlalternative urlalternative urlalternativa alternativaurl urlalternativ - van: van from + from: van from von z da dela - variant: variant alternative + alternative: variant alternative alternative alternativa alternativa alternativ - verhoog: verhoog increment + increment: verhoog increment erhoehen zvysit incremento increment % GB - verhoognummer: verhoognummer incrementnumber + incrementnumber: verhoognummer incrementnumber nummererhoehen zvysujicicislo incrementanumero numarincrement -resetnummer: resetnummer resetnumber +resetnumber: resetnummer resetnumber resetnumber resetnumber resetnumber resetnumber - verwijzing: verwijzing reference + reference: verwijzing reference referenz odkaz riferimento referinta - onbekendeverwijzing: onbekendeverwijzing unknownreference + unknownreference: onbekendeverwijzing unknownreference unbekantereferenz neznamyodkaz riferimentoingoto referintanecunoscuta - voet: voet footer + footer: voet footer fusszeile upati piedipagina subsol - voetafstand: voetafstand footerdistance + footerdistance: voetafstand footerdistance fusszeilenabstand vzdalenostupati distanzapdp distantasubsol - voetstatus: voetstatus footerstate + footerstate: voetstatus footerstate fusszeilenstatus statusupati statopdp staresubsol voffset: voffset voffset voffset voffset voffset voffset - volgende: volgende next + next: volgende next folgende dalsi successivo urmatorul - voor: voor before + before: voor before vor pred prima inainte - voorcommando: voorcommando commandbefore + commandbefore: voorcommando commandbefore vorbefehl predchoziprikaz comandoprima comandainainte - vorige: vorige previous + previous: vorige previous vorige predchozi precedente precendent - vorigenummer: vorigenummer previousnumber + previousnumber: vorigenummer previousnumber vorigenummer predchozicislo numeroprecedente numarprecedent - wachttijd: wachttijd delay + delay: wachttijd delay wartezeit prodleva attesa intarziere - wijze: wijze way + way: wijze way art zpusob modo mod - willekeur: willekeur random + random: willekeur random zufaellig nahodne casuale aleator - wit: wit white + white: wit white weiss bily bianco alb xfactor: xfactor xfactor @@ -1262,10 +1345,10 @@ resetnummer: resetnummer resetnumber xoffset: xoffset xoffset xoffset xoffset xoffset xoffset % GB - xschaal: xschaal xscale + xscale: xschaal xscale xformat xmeritko xscale xscala % GB - xstap: xstap xstep + xstep: xstap xstep xschritt xkrok xstep xstep % GB yfactor: yfactor yfactor @@ -1277,102 +1360,103 @@ resetnummer: resetnummer resetnumber yoffset: yoffset yoffset yoffset yoffset yoffset yoffset % GB - yschaal: yschaal yscale + yscale: yschaal yscale yformat ymeritko yscale yscala % GB - ystap: ystap ystep + ystep: ystap ystep yschritt ykrok ystep ystep % GB - zelfdepagina: zelfdepagina samepage + samepage: zelfdepagina samepage selbeseite stejnastranka stessapagina aceeasipagina -zijuitlijnen: zijuitlijnen sidealign + sidealign: zijuitlijnen sidealign sidealign sidealign sidealign sidealign - zij: zij side + side: zij side objektabstand pocitat lato parte % new -veldlaag: veldlaag fieldlayer - fieldlayer fieldlayer - fieldlayer fieldlayer - veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor + fieldlayer: veldlaag fieldlayer + fieldlayer fieldlayer + fieldlayer fieldlayer +textlayer: tekstlaag textlayer + textlayer textlayer + textlayer textlayer + fieldbackgroundcolor: veldachtergrondkleur fieldbackgroundcolor feldhintergrundfarbe barvapozadipole coloresfondocampo culoarefundalcamp - veldkaderkleur: veldkaderkleur fieldframecolor + fieldframecolor: veldkaderkleur fieldframecolor feldrahmenfarbe barvarameckupole colorecornicecampo culoareframecamp - veldoffset: veldoffset fieldoffset + fieldoffset: veldoffset fieldoffset feldoffset offsetpole offsetcampo offsetcamp - openactie: openactie openaction + openaction: openactie openaction oeffenaktion otevriakci azioneapri actiunedeschidere - sluitactie: sluitactie closeaction + closeaction: sluitactie closeaction schliessenaktion zavriakci azionechiudi actiuneinchidere - openpaginaactie: openpaginaactie openpageaction + openpageaction: openpaginaactie openpageaction openpageaction akceotevrenistranky azioneapripagina actiunedeschiderepagina % TB - sluitpaginaactie: sluitpaginaactie closepageaction + closepageaction: sluitpaginaactie closepageaction closepageaction akcezavrenistranky azionechiudipagina actiuneinchiderepagina % TB - klikin: klikin clickin + clickin: klikin clickin klickin klikuvnitr clickdentro clickintru - klikuit: klikuit clickout + clickout: klikuit clickout klickaus klikvne clickfuori clickies - gebiedin: gebiedin regionin + regionin: gebiedin regionin regionin oblastuvnitr entraregione regiuneintrare - gebieduit: gebieduit regionout + regionout: gebieduit regionout regionaus oblastvne esciregione regiuneiesire focusin: focusin focusin focusin focusin focusin focusin - focusuit: focusuit focusout + focusout: focusuit focusout focusout focusout focusout focusout - natoets: natoets afterkey + afterkey: natoets afterkey nachtaste klavesapo dopotasto dupatasta - formatteer: formatteer format + format: formatteer format formatieren formatovat format format % GB - valideer: valideer validate + validate: valideer validate validieren validovat verifica verifica - bereken: bereken calculate + calculate: bereken calculate berechnen pocitat calcola calculeaza - klik: klik click + click: klik click klick klik click click - vcommando: vcommando vcommand + vcommand: vcommando vcommand vbefehl vprikaz vcomando comandav - icommando: icommando icommand + icommand: icommando icommand ibefehl iprikaz icomando comandai - ccommando: ccommando ccommand + ccommand: ccommando ccommand cbefehl cprikaz ccomando comandac - tekstafstand: tekstafstand textdistance + textdistance: tekstafstand textdistance textdistance textdistance distanzatesto textdistance % TB TH - tekstmarge: tekstmarge textmargin + textmargin: tekstmarge textmargin textmargin textmargin textmargin textmargin % TB TH -trefwoord: trefwoord keyword + keyword: trefwoord keyword keyword keyword parolachiave keyword - - \stopconstants %D \stopcompressdefinitions @@ -1387,37 +1471,40 @@ trefwoord: trefwoord keyword german czech italian romanian - aan: aan on + on: aan on an zap attivo on - aanelkaar: aanelkaar serried + serried: aanelkaar serried kleinerabstand semknuto vicino serried - aansluitend: aansluitend joinedup + joinedup: aansluitend joinedup keinabstand spojeno unito unit - absoluut: absoluut absolute + absolute: absoluut absolute absolut absolutni assoluto absolut - achtergrond: achtergrond background + background: achtergrond background hintergrund pozadi sfondo fundal - achteruit: achteruit backward + backward: achteruit backward rueckwaerts zpet indietro inapoi - actie: actie action + subbackward: subachteruit subbackward + unterrueckwaerts podzpet + sottoindietro subinapoi + action: actie action aktion akce azione actiune - afsluiter: afsluiter stopper + stopper: afsluiter stopper trenner predel stopper stopper - alinea: alinea paragraph + paragraph: alinea paragraph absatz odstavec capoverso paragraf - alles: alles all + all: alles all alles vse tutti tot - altijd: altijd always + always: altijd always immer vzdy sempre totdeauna auto: auto auto @@ -1426,184 +1513,190 @@ trefwoord: trefwoord keyword autointro: autointro autointro autointro autouvod autointro autointro - beide: beide both + both: beide both beide obe entrambi ambele - binnen: binnen inner + inner: binnen inner innen uvnitr interno intern - blanko: blanko blank + blank: blanko blank blanko prazdny rigovuoto blank - blokkeer: blokkeer disable + disable: blokkeer disable sperren zablokovat disattiva dezactivat - boven: boven top + top: boven top oben vrsek cima sus - breed: breed wide + wide: breed wide breit siroce ampio larg - breedte: breedte width + width: breedte width breite sirka ampiezza latime - buiten: buiten outer + outer: buiten outer aussen vnejsi esterno extern - cijfers: cijfers numbers + numbers: cijfers numbers ziffern cisla numeri numere - Cijfers: Cijfers Numbers + Numbers: Cijfers Numbers Ziffern Cisla Numeri Numere - commando: commando command + command: commando command befehl prikaz comando comanda - commandos: commandos commands + commands: commandos commands befehle prikazy comandi comenzi concept: concept concept konzept koncept concetto concept - dag: dag day + day: dag day tag den giorno zi - datum: datum date + date: datum date datum datum data data default: default default default implicitni implicito implicit - definitief: definitief final + final: definitief final endfassung finalni finale final - diepte: diepte depth + depth: diepte depth tiefe podlehloubky profondita adancime - dubbelzijdig: dubbelzijdig doublesided + doublesided: dubbelzijdig doublesided doppelseitig dvoustranny doppiafaccia douafete - eerste: eerste first + first: eerste first erste prvni primo primul - elk: elk each + each: elk each jede kazdy ogni fiecare - enkelzijdig: enkelzijdig singlesided + singlesided: enkelzijdig singlesided einzelseitig jednostranne facciasingola ofata - ergens: ergens somewhere + somewhere: ergens somewhere irgendwo nekde daqualcheparte undeva - nergens: nergens nowhere + nowhere: nergens nowhere nirgens nikde danessunaparte niciunde even: even even gerade sude pari par - extern: extern external + external: extern external extern externi esterno extern file: file file datei soubor file fisier - flexibel: flexibel flexible + flexible: flexibel flexible flexibel prizpusobive flessibile flexibil - forceer: forceer force + force: forceer force zwinge sila forza fortat - gebruikt: gebruikt used + used: gebruikt used verwende uzito usato folosit - geen: geen none + none: geen none kein zadny nessuno niciunul - geenmarkering: geenmarkering nomarking + nomarking: geenmarkering nomarking keinebeschriftung zadneznaceni nomarcature faramarcare - geennummer: geennummer nonumber + nonumber: geennummer nonumber nonumber nonumber nonumber nonumber % GB ETC NEW -% geentekst: geentekst notext -% notext notext -% notext notext % GB ETC NEW - geenwit: geenwit nowhite +% geentekst: geentekst notext +% notext notext +% notext notext % GB ETC NEW + nowhite: geenwit nowhite keinweiss zadnabila nobianco faraalb - geroteerd: geroteerd rotated + rotated: geroteerd rotated gedreht otoceno ruotato rotat - gespiegeld: gespiegeld mirrored + mirrored: gespiegeld mirrored gespiegelt zrcadleno riflesso oglindit - globaal: globaal global + global: globaal global global globalne globale global grid: grid grid gritter mrizka griglia grila - groot: groot big + big: groot big gross velke grande mare - grootkorps: grootkorps bigbodyfont + bigbodyfont: grootkorps bigbodyfont bigbodyfont bigbodyfont grossofontdeltesto bigbodyfont %% - grotevoorkeur: grotevoorkeur bigpreference + bigpreference: grotevoorkeur bigpreference grosszuegig vysokapriorita grandepreferenza preferintamare - grijs: grijs gray + gray: grijs gray grau seda grigio gri - halveregel: halveregel halfline + halfline: halveregel halfline halbezeile pulradku mezzariga jumatatelinie - handhaaf: handhaaf keep + keep: handhaaf keep behalte drzet mantieni mentine - hangend: hangend hanging + hanging: hangend hanging haengend visici sospeso suspendat - herhaal: herhaal repeat + repeat: herhaal repeat wiederholen opakovat ripeti repetat - herstel: herstel fix + fix: herstel fix stellewiederher fixuj fisso fix - hier: hier here + here: hier here hier zde qui aici - hoofd: hoofd header + header: hoofd header kopfzeile zahlavi intestazione antet - hoog: hoog high + high: hoog high hoch vysoko alto inalt - hoogte: hoogte height + height: hoogte height hoehe vyska altezza inaltime - horizontaal: horizontaal horizontal + horizontal: horizontaal horizontal horizontal horizontalne orizzontale orizontal - huidige: huidige current + current: huidige current aktuell aktualni corrente curent + hz: hz hz + hz hz + hz hz + nohz: geenhz nohz + nohz nohz + nohz nohz italic: italic italic italic kurziva corsivo italic - inlinker: inlinker inleft + inleft: inlinker inleft imlinken vlevo insinistra instanga - inmarge: inmarge inmargin + inmargin: inmarge inmargin imrand naokraji inmargine inmargine - inrechter: inrechter inright + inright: inrechter inright imrechten vpravo indestra indreapta - interactie: interactie interaction + interaction: interactie interaction interaktion interakce interazione interactiune - intekst: intekst intext + intext: intekst intext imtext dotextu intesto intext intro: intro intro @@ -1612,139 +1705,139 @@ trefwoord: trefwoord keyword its: its its its pol its propriu % GB - ja: ja yes + yes: ja yes ja ano si da - jaar: jaar year + year: jaar year jahr rok anno an - kader: kader frame + frame: kader frame rahmen ramecek cornice incadrat - kantlijn: kantlijn marginedge + marginedge: kantlijn marginedge marginalkante textovahrana bordomargine marginebordura - kap: kap cap + cap: kap cap kap kap cap cap - kapitaal: kapitaal capital + capital: kapitaal capital versalien kapitalky maiuscolo majuscula - kenmerk: kenmerk referral + referral: kenmerk referral merkmal znacka referral referinta - klein: klein small + small: klein small klein male piccolo mic - kleinnormaal: kleinnormaal smallnormal + smallnormal: kleinnormaal smallnormal kleinnormal malenormalni piccolonormale micnormal - kleinschuin: kleinschuin smallslanted + smallslanted: kleinschuin smallslanted kleingeneigt malesklonene piccoloinclinato micinclinat - kleinschuinvet: kleinschuinvet smallslantedbold + smallslantedbold: kleinschuinvet smallslantedbold kleingeneigtfett malesklonenetucne piccoloinclinatograssetto micinclinataldin - kleinitalic: kleinitalic smallitalic + smallitalic: kleinitalic smallitalic kleinitalic malekurzivni piccolocorsivo micitalic - kleinitalicvet: kleinitalicvet smallitalicbold + smallitalicbold: kleinitalicvet smallitalicbold kleinitalicfett malekurzivnitucne piccolocorsivograssetto micitalicaldin - kleintype: kleintype smalltype + smalltype: kleintype smalltype kleintippen maletype piccolotype mictype - kleinvet: kleinvet smallbold + smallbold: kleinvet smallbold kleinfett maletucne piccolograssetto micaldin - kleinvetschuin: kleinvetschuin smallboldslanted + smallboldslanted: kleinvetschuin smallboldslanted kleinfettgeneigt maletucnesklonene piccolograssettoinclinato micaldininclinat - kleinvetitalic: kleinvetitalic smallbolditalic + smallbolditalic: kleinvetitalic smallbolditalic kleinfettitalic maletucnekurzivni piccolograssettocorsivo micaldininclinat - kleinkorps: kleinkorps smallbodyfont + smallbodyfont: kleinkorps smallbodyfont smallbodyfont smallbodyfont piccolofontdelcorpo smallbodyfont %% - kleur: kleur color + color: kleur color farbe barevne colore culoare - kolom: kolom column + column: kolom column column column colonna coloana % TB TH - kolommen: kolommen columns + columns: kolommen columns spalten sloupce colonne coloane - kop: kop head + head: kop head kopf hlavicka testa antet % GB - laag: laag low + low: laag low tief nizko basso jos - laatste: laatste last + last: laatste last letzte posledni ultimo ultim label: label label label popisek etichetta eticheta - laho: laho lohi + lohi: laho lohi hoti nivy pedap lohi % TB TH - lang: lang tall + tall: lang tall lang vysoko alto inalt % GB - leeg: leeg empty + empty: leeg empty leer prazdne vuoto gol - Letter: Letter Character + Character: Letter Character Buchstabe Pismeno Lettera Caracter - letter: letter character + character: letter character buchstabe pismeno lettera caracter - Letters: Letters Characters + Characters: Letters Characters Buchstaben Pismena Lettere Caractere - letters: letters characters + characters: letters characters buchstaben pismena lettere caractere - liggend: liggend landscape + landscape: liggend landscape querformat nasirku orizzontale vedere - lijn: lijn rule + rule: lijn rule linie linka linea rigla - lijst: lijst list + list: lijst list liste seznam elenco lista - linkermarge: linkermarge leftmargin + leftmargin: linkermarge leftmargin linkerrand levyokraj marginesinistro marginestanga - linkerpagina: linkerpagina leftpage + leftpage: linkerpagina leftpage linkerseite levastranka paginasinistra paginastanga - linkerrand: linkerrand leftedge + leftedge: linkerrand leftedge linkekante levahrana bordosinistro bordurastanga - links: links left + left: links left links vlevo sinistra stanga - lokaal: lokaal local + local: lokaal local lokal lokalne locale local - nieuw: nieuw new + new: nieuw new neu novy nuovo nou - MAAND: MAAND MONTH + MONTH: MAAND MONTH MONAT MESIC MESE LUNA - maand: maand month + month: maand month monat mesic mese luna mar: mar mar mar mar mar mar - marge: marge margin + margin: marge margin marginalie marginalie margine margine max: max max @@ -1756,82 +1849,85 @@ trefwoord: trefwoord keyword mediaeval: mediaeval mediaeval mittelalterlich stredoveky medievale medieval - middel: middel medium + medium: middel medium mittel stredni medio mediu - midden: midden middle + middle: midden middle mittig nastred centro centru - na: na after + after: na after nach po dopo dupa - naam: naam name + name: naam name name jmeno nome nume - naast: naast opposite + opposite: naast opposite gegenueber naproti opposto opus - nee: nee no + no: nee no nein ne no nu - negatief: negatief negative + negative: negatief negative negativ negativ negativo negativ - niet: niet not + positive: positief positive + positiv positiv + positivo positiv + not: niet not nicht ne non nu - nooit: nooit never + never: nooit never nie nikdy mai niciodata - normaal: normaal normal + normal: normaal normal normal normalni normale normal - nummer: nummer number + number: nummer number nummer cislo numero numar offset: offset offset offset offset offset offset - onbekend: onbekend unknown + unknown: onbekend unknown unbekannt neznamy ignoto necunoscut - onder: onder bottom + bottom: onder bottom unten spodek fondo subsol - oneven: oneven odd + odd: oneven odd ungerade liche dispari impar - opelkaar: opelkaar packed + packed: opelkaar packed gepackt zhustene impaccato impachetat - vanelkaar: vanelkaar unpacked + unpacked: vanelkaar unpacked ungepackt rozbalene unpacked despachetat - opmaak: opmaak makeup + makeup: opmaak makeup umbruch zlom makeup marcaj - opmarge: opmarge atmargin + atmargin: opmarge atmargin amrand naokraji almargine lamargine overlay: overlay overlay overlay prekryv sovrapponi overlay - pagina: pagina page + page: pagina page seite stranka pagina pagina - paginanummer: paginanummer pagenumber + pagenumber: paginanummer pagenumber seitennummer cislostranky numeropagina numarpagina - papier: papier paper + paper: papier paper papier papir carta foaie - scherm: scherm display + display: scherm display bildschirm obrazovka schermo display % new - omgekeerd: omgekeerd reverse + reverse: omgekeerd reverse reverse reverse invertito reverse % new - passend: passend fit + fit: passend fit passend prizpusobive adatta ajustat postscript: postscript postscript @@ -1840,112 +1936,112 @@ trefwoord: trefwoord keyword preview: preview preview vorschau nahled anteprima previzualizare - programma: programma program + program: programma program programm program programma program -proces: proces process - process process - process process - spot: spot spot - spot spot - spot spot - punt: punt dot +process: proces process + process process + process process + spot: spot spot + spot spot + spot spot + dot: punt dot punkt tecka punto punct ran: ran ran ran rozsah corse rulat - rand: rand edge + edge: rand edge kante hrana bordo bordura - raster: raster screen + screen: raster screen raster rastr schermo ecran - recht: recht rectangular + rectangular: recht rectangular rechteckig pravouhly rettangolare rectangular - rechtermarge: rechtermarge rightmargin + rightmargin: rechtermarge rightmargin rechterrand pravyokraj marginedestro marginedreapta - rechterpagina: rechterpagina rightpage + rightpage: rechterpagina rightpage rechterseite pravastranka paginadestra paginadreapta - rechterrand: rechterrand rightedge + rightedge: rechterrand rightedge rechterkante pravahrana bordodestro borduradreapta - rechts: rechts right + right: rechts right rechts vpravo destra dreapta - regel: regel line + line: regel line zeile radek riga linie register: register register register rejstrik registro registru - relatief: relatief relative + relative: relatief relative relativ relativni relativo relativ reset: reset reset zuruecksetzten reset reimposta reset - Romeins: Romeins Romannumerals + Romannumerals: Romeins Romannumerals Roemischezahlen Rimskecislice Numeriromani Numereromane - romeins: romeins romannumerals + romannumerals: romeins romannumerals roemischezahlen rimskecislice numeriromani numereromane - grieks: grieks greek + greek: grieks greek griechisch recky greco grec - Grieks: Grieks Greek + Greek: Grieks Greek Griechisch Recky Greco Grec - rond: rond round + round: rond round rund zaobleny rotondo rotund - roteer: roteer rotate + rotate: roteer rotate drehe otoc ruota rotit - rek: rek stretch + stretch: rek stretch strecken natahnout dilata dilatat - rugwit: rugwit backspace + backspace: rugwit backspace rumpfspatium zpetnamezera backspace spatiuspate % GB - ruim: ruim broad + broad: ruim broad breit siroky ampio broad - rij: rij row + row: rij row row row row rand - schuin: schuin slanted + slanted: schuin slanted geneigt sklonene inclinato inclinat - schuinvet: schuinvet slantedbold + slantedbold: schuinvet slantedbold geneigtfett sklonenetucne inclinatograssetto inclinataldin - synchroniseer: synchroniseer synchronize + synchronize: synchroniseer synchronize synchronize synchronize synchronize synchronize - italicvet: italicvet italicbold + italicbold: italicvet italicbold italicfett kurzivnitucne corsivograssetto italicaldin - sectienummer: sectienummer sectionnumber + sectionnumber: sectienummer sectionnumber abschnittsnummer cislooddilu numerosezione numarsetiune - smal: smal narrow + narrow: smal narrow schmall uzky stretto ingust - snijwit: snijwit cutspace + cutspace: snijwit cutspace cutspace cutspace cutspace cutspace % GB - soepel: soepel tolerant + tolerant: soepel tolerant tolerant tolerantni tollerante tolerant - spatie: spatie space + space: spatie space spatium mezera spazio spatiu %% check - standaard: standaard standard + standard: standaard standard standard standardni standard standard start: start start @@ -1954,7 +2050,7 @@ proces: proces process stop: stop stop stop stop termina stop - streng: streng strict + strict: streng strict streng striktni rigido strict strut: strut strut @@ -1966,10 +2062,10 @@ proces: proces process sym: sym sym sym sym sim sym - symbool: symbool symbol + symbol: symbool symbol symbol symbol simbolo simbol - tekst: tekst text + text: tekst text text text testo text back: terug back @@ -1978,13 +2074,13 @@ proces: proces process test: test test test test test text - tussen: tussen inbetween + inbetween: tussen inbetween zwischen mezi tra intre type: type type tippen type type type % GB - uit: uit off + off: uit off aus vyp disattivo dezactivat url: url url @@ -1993,200 +2089,223 @@ proces: proces process URL: URL URL URL URL URL URL - vast: vast fixed + fixed: vast fixed fest fixne fisso fixat - los: los loose + loose: los loose lose uvolnene lento larg - verder: verder continue + continue: verder continue fortsetzten pokracovat continua continuu - vertikaal: vertikaal vertical + vertical: vertikaal vertical vertikal vertikalne verticale vertical - vet: vet bold + bold: vet bold fett tucne grassetto aldin - vetschuin: vetschuin boldslanted + boldslanted: vetschuin boldslanted fettgeneigt tucnesklonene grassettoinclinato aldininclinat - vetitalic: vetitalic bolditalic + bolditalic: vetitalic bolditalic fettitalic tucnekurzivni grassettocorsivo aldinitalic - viertal: viertal quadruple + quadruple: viertal quadruple viertel ctyrnasobny quadruplo cvadrupul - voet: voet footer + footer: voet footer fusszeile upati piedipagina subsol - volgende: volgende next + next: volgende next folgende dalsi successivo urmatorul - voor: voor before + before: voor before vor pred prima inainte - voorgrond: voorgrond foreground + foreground: voorgrond foreground vordergrund popredi foreground primplan - voorkeur: voorkeur preference + preference: voorkeur preference einstellung nastaveni preferenza preferinta - voorlopig: voorlopig temporary + temporary: voorlopig temporary temporaer docasne temporaneo temporar - vooruit: vooruit forward + forward: vooruit forward vorwaerts vpred avanti avans - vorige: vorige previous + subforward: subvooruit subforward + untervorwaerts podvpred + sottoavanti subavans + previous: vorige previous vorig predchozi precedente precedent - waarde: waarde value + value: waarde value wert hodnota valore valoare week: week week woche tyden settimana saptamana - weekdag: weekdag weekday + weekday: weekdag weekday wochentag vsedniden giornosettimana zisaptamana - WEEKDAG: WEEKDAG WEEKDAY + WEEKDAY: WEEKDAG WEEKDAY WOCHENTAG VSEDNIDEN GIORNOSETTIMANA ZISAPTAMANA - willekeurig: willekeurig random + random: willekeurig random zufaellig nahodny casuale aleator - wit: wit white + white: wit white weiss bily bianco alb - zeer: zeer very + very: zeer very sehr velmi molto foarte - zeersoepel: zeersoepel verytolerant + verytolerant: zeersoepel verytolerant sehrtolerant velmitolerantni moltotollerante foartetolerant - zeerstreng: zeerstreng verystrict + verystrict: zeerstreng verystrict sehrstreng velmistriktni moltorigido foartestrict % GB - zie: zie see + see: zie see sieh viz vedi vezi smallcaps: smallcaps smallcaps smallcaps kapitalky maiuscoletto majusculemici - WOORD: WOORD WORD + WORD: WOORD WORD WORT SLOVO PAROLA CUVANT - eerstepagina: eerstepagina firstpage + firstpage: eerstepagina firstpage ersteseite prvnistranka primapagina primapagina - vorigepagina: vorigepagina previouspage + firstcolumn: eerstekolom firstcolumn + firstcolumn firstcolumn + firstcolumn firstcolumn + previouspage: vorigepagina previouspage vorigeseite predchozistranka paginaprecedente paginaanterioara - volgendepagina: volgendepagina nextpage + nextpage: volgendepagina nextpage folgendeseite dalsistranka paginasuccessiva paginaurmatoare - laatstepagina: laatstepagina lastpage + lastpage: laatstepagina lastpage letzteseite poslednistrana ultimapagina ultimapagina + lastcolumn: laatstekolom lastcolumn + lastcolumn lastcolumn + lastcolumn lastcolumn lastpagenumber: laatstepaginanummer lastpagenumber lastpagenumber lastpagenumber lastpagenumber lastpagenumber - eerstesubpagina: eerstesubpagina firstsubpage + subpage: subpagina subpage + unterseite podstranka + sottopagina subpagina + firstsubpage: eerstesubpagina firstsubpage ersteunterseite prvnipodstranka primasottopagina primasubpagina - vorigesubpagina: vorigesubpagina previoussubpage + previoussubpage: vorigesubpagina previoussubpage vorigeunterseite predchozipodstranka sottopaginaprecedente subpaginaanterioara - volgendesubpagina: volgendesubpagina nextsubpage + nextsubpage: volgendesubpagina nextsubpage folgendeunterseite dalsipodstranka sottopaginasuccessiva urmatoareasubpagina - laatstesubpagina: laatstesubpagina lastsubpage + lastsubpage: laatstesubpagina lastsubpage letzteunterseite poslaednipodstranka ultimasottopagina ultimasubpagina - volgendeevenpagina: volgendeevenpagina nextevenpage + nextevenpage: volgendeevenpagina nextevenpage naechstegeradeseite dalsisudastranka paginaparisuccessiva paginaparaurmatoarea - volgendeonevenpagina: volgendeonevenpagina nextoddpage + nextoddpage: volgendeonevenpagina nextoddpage naechsteungeradeseite dalsilichastranka paginadisparisuccessiva paginaimparaurmatoarea - vorigeevenpagina: vorigeevenpagina previousevenpage + previousevenpage: vorigeevenpagina previousevenpage vorigegeradeseite predchozisudastranka paginapariprecedente paginaparaprecedenta - vorigeonevenpagina: vorigeonevenpagina previousoddpage + previousoddpage: vorigeonevenpagina previousoddpage vorigeungeradeseite predchozilichastranka paginadispariprecedente paginaimparaprecedenta - - alleenleesbaar: alleenleesbaar readonly + readonly: alleenleesbaar readonly nurlesbar pouzeprocteni solalettura readonly - verplicht: verplicht required + required: verplicht required obligatorisch pozadovane richiestp obligatoriu - beschermd: beschermd protected + protected: beschermd protected geschuetzt chranene protetto protejat - gesorteerd: gesorteerd sorted + sorted: gesorteerd sorted sortiert tridene ordinato sortat - nietbeschikbaar: nietbeschikbaar unavailable + unavailable: nietbeschikbaar unavailable nichtverfuegbar nedostupne nondisponibile nedisponibil - verborgen: verborgen hidden + hidden: verborgen hidden versteckt skryte nascosto ascuns - printbaar: printbaar printable + printable: printbaar printable druckbar tisknutelne stampabile tiparibil bookmark: bookmark bookmark bookmark zalozka segnalibro semncarte -geencontrole: geencontrole nocheck + nocheck: geencontrole nocheck nocheck nocheck nocheck nocheck % GB TB TH : - binnenmarge: binnenmarge innermargin + innermargin: binnenmarge innermargin innermargin innermargin margineinterno innermargin - buitenmarge: buitenmarge outermargin + outermargin: buitenmarge outermargin outermargin outermargin margineesterno outermargin - binnenrand: binnenrand inneredge + inneredge: binnenrand inneredge inneredge inneredge bordointerno inneredge - buitenrand: buitenrand outeredge + outeredge: buitenrand outeredge outeredge outeredge bordoesterno outeredge - sturing: sturing controls + controls: sturing controls controls controls controlli controale - niethangend: niethangend nothanging + nothanging: niethangend nothanging nothanging nothanging nonsospeso nothanging - afgebroken: afgebroken hyphenated + hyphenated: afgebroken hyphenated hyphenate hyphenated sillabato despsilabe - nietafgebroken: nietafgebroken nothyphenated + nothyphenated: nietafgebroken nothyphenated nothyphenated nothyphenated nonsillabato nedespsilabe + overprint: overprint overprint + overprint overprint + overprint overprint % new + knockout: knockout knockout + knockout knockout + knockout knockout % new + \stopvariables \startconstants dutch english german czech italian romanian - sturing: sturing controls + controls: sturing controls controls controls - controlli controale - globaal: globaal global + controlli controale + global: globaal global global globalne globale global + overprint: overprint overprint + overprint overprint + overprint overprint % new + + \stopconstants % so far @@ -2202,10 +2321,10 @@ geencontrole: geencontrole nocheck german czech italian romanian - conversie: conversie conversion + conversion: conversie conversion konversion konverze coversione conversie - per: per by + by: per by pro skrz da de @@ -2301,52 +2420,52 @@ geencontrole: geencontrole nocheck german czech italian romanian - doornummering: doornummering enumeration + enumeration: doornummering enumeration nummerierung vycet enumerazione enumerare - doordefinitie: doordefinitie description + description: doordefinitie description beschreibung popis descrizione descriere - doorsprong: doorsprong indentation + indentation: doorsprong indentation einzug odsazovani rientro indentare - doorlabel: doorlabel labeling + labeling: doorlabel labeling beschriften oznacovani etichettatura etichetare - samengesteldelijst: samengesteldelijst combinedlist + combinedlist: samengesteldelijst combinedlist kombiniereliste kombinovanyseznam elencocombinato listacombinata - sectie: sectie section + section: sectie section abschnitt oddil sezione sectiune register: register register register rejstrik registro registru - interactie: interactie interaction + interaction: interactie interaction interaktion interakce interazione interactiune - synoniem: synoniem synonym + synonym: synoniem synonym synonym synonymum sinonimo sinonim - synoniemen: synoniemen synonyms + synonyms: synoniemen synonyms synonyme synonyma sinonimi sinonime - sorteer: sorteer sort + sort: sorteer sort sortiere trid sort sortare % GB - sorteren: sorteren sorts + sorts: sorteren sorts sortieren tridit sorts sortari % GB - naam: naam name + name: naam name name jmeno nome nume - blok: blok float + float: blok float gleitobjekt plvouciobjekt oggettomobile obiectmobil - blokken: blokken floats + floats: blokken floats gleitobjekte plvouciobjekty oggettimobili obiectemobile - alinea: alinea paragraph + paragraph: alinea paragraph absatz odstavec capoverso paragraf framedtext: kadertekst framedtext @@ -2355,15 +2474,18 @@ geencontrole: geencontrole nocheck itemgroup: itemgroup itemgroup itemgroup itemgroup itemgroup itemgroup - typen: typen typing + typing: typen typing tippen typing typing typing % GB buffer: buffer buffer puffer buffer buffer buffer - formule: formule formula + formula: formule formula formel rovnice formula formula + subformula: subformule subformula + unterformel podrovnice + sottoformula subformula tabulate: tabulatie tabulate tabulator tabelator tabulato tabulate @@ -2382,82 +2504,82 @@ geencontrole: geencontrole nocheck german czech italian romanian - beginvan: beginvan begin + begin: beginvan begin anfang zacatek inizio inceput - eindvan: eindvan end + end: eindvan end ende konec fine sfarsit - gekoppelde: gekoppelde coupled + coupled: gekoppelde coupled verknuepft propojene accoppiato cuplat - haal: haal get + get: haal get get ziskat prendi get - huidigelokale: huidigelokale currentlocal + currentlocal: huidigelokale currentlocal aktuelllokal aktualnelokalni correntelocale localcurent - in: in - + endsetup: in - ein - - - - laad: laad load + load: laad load laden nacist carica incarca - leeg: leeg empty + emptyone: leeg empty vuoto leer prazdne gol - lege: lege empty + emptytwo: lege empty leer prazdne vuoti gol - lijst: lijst list + list: lijst list auflisten seznam elenco lista - lijstmet: lijstmet listof + listof: lijstmet listof auflistenvon seznam elencodi listade - lokale: lokale local + local: lokale local lokal lokalne locale local - plaats: plaats place + place: plaats place platziere umisti metti pune - reserveer: reserveer reserve + reserve: reserveer reserve reservieren rezervovat riserva rezervat start: start start start start inizia start - stel: stel setup + setup: stel setup stelle nastaveni imposta setare stop: stop stop stop stop termina stop - verhoog: verhoog increment + increment: verhoog increment erhoehen zvysit incrementa increment - volgende: volgende next + next: volgende next folgende dalsi successivo urmatorul - volledige: volledige complete + complete: volledige complete vollende uplny completo complet - vorige: vorige previous + previous: vorige previous vorige predchozi precedente precedent - vorigelokale: vorigelokale previouslocal + previouslocal: vorigelokale previouslocal voriglokal predchozilokalni precedentelocale precedentlocal - zie: zie see + see: zie see sieh viz vedi vezi type: type type type opis type type % GB - opmaak: opmaak makeup + makeup: opmaak makeup umbruch zlom makeup makeup % GB - tekst: tekst text + text: tekst text text text testo text @@ -2478,13 +2600,13 @@ geencontrole: geencontrole nocheck comment: commentaar comment kommentar komentar commento comentariu - interactiemenu: interactiemenu interactionmenu + interactionmenu: interactiemenu interactionmenu interaktionsmenue interaktivnimenu menuinterattivo meniuinteractiune - uitstellen: uitstellen postponing + postponing: uitstellen postponing verschieben odlozit posporre postponing % GB - verbergen: verbergen hiding + hiding: verbergen hiding verbergen skryt nascondere ascundere tabulate: tabulatie tabulate @@ -2496,13 +2618,13 @@ geencontrole: geencontrole nocheck tabulatetail: tabulatiestaart tabulatetail tabulatetail tabulatetail codatabulato tabulatetail % - gegeven: gegeven fact + fact: gegeven fact gegeben fakt fatto fapt - legenda: legenda legend + legend: legenda legend legende legenda legenda legenda - formule: formule formula + formula: formule formula formel rovnice formula formula tablehead: tabelkop tablehead @@ -2511,16 +2633,16 @@ geencontrole: geencontrole nocheck tabletail: tabelstaart tabletail tabellenende konectabulky codatabella subsoltabel - instellingen: instellingen setups + setups: instellingen setups impostazioni einstellungen nastaveni setari helptext: helptekst helptext hilfetext textnapovedy testoaiuto textajutator - deelomgeving: deelomgeving localenvironment + localenvironment: deelomgeving localenvironment lokaleumgebung lokalnihoprostredi ambientelocale mediulocal - sectieblokomgeving: sectieblokomgeving sectionblockenvironment + sectionblockenvironment: sectieblokomgeving sectionblockenvironment sectionblockenvironment sectionblockenvironment ambientebloccosezione blocsectiuneambient % TB TH pagecomment: paginacommentaar pagecomment diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex index 154c604bd..5e0b68e36 100644 --- a/tex/context/base/mult-ini.tex +++ b/tex/context/base/mult-ini.tex @@ -16,7 +16,7 @@ %D parameters. Currently the following interfaces are %D supported: %D -%D \starttabulatie[|l|l|c|c|] +%D \starttabulate[|l|l|c|c|] %D \NC\bf language\NC\bf translator \NC\bf messages\NC\bf interface\NC\NR %D \NC dutch \NC Hans Hagen \NC yes \NC yes \NC\NR %D \NC english \NC Hans Hagen \NC yes \NC yes \NC\NR @@ -24,14 +24,14 @@ %D \NC czech \NC Tom Hudec \NC yes \NC yes \NC\NR %D \NC italian \NC Giuseppe Bilotta \NC yes \NC yes \NC\NR %D \NC norwegian \NC Hans Fredrik Nordhaug\NC yes \NC no \NC\NR -%D \stoptabulatie +%D \stoptabulate \writestatus{loading}{Context Multilingual Macros / Initialization} \unprotect %D \macros -%D [constanten,variabelen,commandos] +%D [constanten,variabelen,commands] %D {v!,c!,k!,s!,e!,m!,l!,r!,f!,p!,x!,y!} %D %D In the system modules we introduced some prefixed constants, @@ -43,8 +43,8 @@ %D multi||lingual user interface. Redefining these next set of %D prefixes therefore can have desastrous results. %D -%D \startregelcorrectie -%D \starttabel[|c|c|c|] +%D \startlinecorrection +%D \starttable[|c|c|c|] %D \HL %D \NC \bf prefix \NC \bf meaning \NC \bf application \NC\SR %D \HL @@ -61,8 +61,8 @@ %D \NC \type{\x!prefix!} \NC x! \NC setup constant \NC\MR %D \NC \type{\y!prefix!} \NC y! \NC setup variable \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D In the single||lingual version we used \type{!}, \type{!!}, %D \type{!!!} and \type{!!!!}. @@ -125,19 +125,19 @@ %D \type{!}. To force consistency, we provide a few commands %D for defining such constants. %D -%D \starttypen +%D \starttyping %D \defineinterfaceconstant {name} {meaning} %D \defineinterfacevariable {name} {meaning} %D \defineinterfaceelement {name} {meaning} -%D \stoptypen +%D \stoptyping %D %D Which is the same as: %D -%D \starttypen +%D \starttyping %D \def\c!name{meaning} %D \def\v!name{meaning} %D \def\e!name{meaning} -%D \stoptypen +%D \stoptyping \def\defineinterfaceconstant #1#2{\setvalue{\c!prefix!#1}{#2}} \def\defineinterfacevariable #1#2{\setvalue{\v!prefix!#1}{#2}} @@ -145,20 +145,20 @@ %D Next come some interface independant constants: %D -%D \starttypen +%D \starttyping %D \definereferenceconstant {name} {meaning} %D \definefileconstant {name} {meaning} -%D \stoptypen +%D \stoptyping \def\definereferenceconstant #1#2{\setvalue{\r!prefix!#1}{#2}} \def\definefileconstant #1#2{\setvalue{\f!prefix!#1}{#2}} %D And finaly we have the one argument, space saving constants %D -%D \starttypen +%D \starttyping %D \definesystemconstant {name} %D \definemessageconstant {name} -%D \stoptypen +%D \stoptyping \def\definesystemconstant #1{\setvalue{\s!prefix!#1}{#1}} \def\definemessageconstant #1{\setvalue{\m!prefix!#1}{#1}} @@ -168,9 +168,9 @@ %D parameters by a unique prefix. Such a prefix is defined %D with: %D -%D \starttypen +%D \starttyping %D \definesystemvariable {name} -%D \stoptypen +%D \stoptyping \def\definesystemvariable#1{\setevalue{\??prefix#1}{\@@prefix#1}} @@ -206,7 +206,7 @@ \def\defaultinterface{english} - \def\selectinterface% + \def\selectinterface {\def\docommando##1##2% {\bgroup \endlinechar\minusone @@ -224,7 +224,7 @@ \else - \def\selectinterface% + \def\selectinterface {\writestatus{interface}{defining \currentinterface\space interface}% \writeline \writestatus{interface}{using \currentresponses\space messages}% @@ -243,13 +243,13 @@ %D interface languages. This can be done by means of the %D selector: %D -%D \starttypen +%D \starttyping %D \startinterface language %D %D language specific definitions & commands %D %D \stopinterface -%D \stoptypen +%D \stoptyping %\def\startinterface #1 % {\doifinsetelse{\currentinterface}{#1} @@ -280,11 +280,11 @@ %D in libraries. We can extract a message from such a library %D in three ways: %D -%D \starttypen +%D \starttyping %D \getmessage {library} {tag} %D \showmessage {library} {tag} {data} %D \makemessage {library} {tag} {data} -%D \stoptypen +%D \stoptyping %D %D The first command gets the message \type{tag} from the %D \type{library} specified. The other commands take an extra @@ -294,31 +294,31 @@ %D Before we explain the \type{data} argument, we give an %D example of a library. %D -%D \starttypen +%D \starttyping %D \startmessages english library: alfa %D title: something %D 1: first message %D 2: second (--) message -- %D \stopmessages -%D \stoptypen +%D \stoptyping %D %D The first message is a simple one and can be shown with: %D -%D \starttypen +%D \starttyping %D \showmessage {alfa} {1} {} -%D \stoptypen +%D \stoptyping %D %D The second message on the other hand needs some extra data: %D -%D \starttypen +%D \starttyping %D \showmessage {alfa} {2} {and last,to you} -%D \stoptypen +%D \stoptyping %D %D This message is shown as: %D -%D \starttypen +%D \starttyping %D something : second (and last) message to you -%D \stoptypen +%D \stoptyping %D %D As we can see, the title entry is shown with the message. %D The data fields are comma separated and are specified in the @@ -327,11 +327,11 @@ %D It is not required to define all messages in a library at %D once. We can add messages to a library in the following way: %D -%D \starttypen +%D \starttyping %D \startmessages english library: alfa %D 10: tenth message %D \stopmessages -%D \stoptypen +%D \stoptyping %D %D Because such definitions can take place in different %D modules, the system gives a warning when a tag occurs more @@ -465,10 +465,10 @@ %D considerably. We therefore introduce warnings. Users can %D turn of warnings and messages by saying: %D -%D \starttypen +%D \starttyping %D \showwarningstrue %D \showmessagestrue -%D \stoptypen +%D \stoptyping %D %D Turning off messages also turns off warnings, which is %D quote logical because they are less important. @@ -501,7 +501,7 @@ %D %D First we show a well||defined (simplified) alternative: %D -%D \starttypen +%D \starttyping %D \def\dosetvalue#1#2#3% %D {\doifdefinedelse{\c!prefix!#2} %D {\setvalue{#1\getvalue{\c!prefix!#2}}{#3}} @@ -513,12 +513,12 @@ %D {\getvalue{#2\getvalue{\c!prefix!#3}}}} %D {\setvalue{#1#3}% %D {\getvalue{#2#3}}}} -%D \stoptypen +%D \stoptyping %D %D These macros are called upon quite often and so we optimized %D them a bit. %D -%D \starttypen +%D \starttyping %D \def\dosetvalue#1#2#3% %D {\let\c!internal!\c!internal!n %D \p!doifundefined{\k!prefix!#2}% @@ -568,7 +568,7 @@ %D \@EA\def\csname#1\csname\k!prefix!#3\endcsname\endcsname% %D {\csname#2\csname\k!prefix!#3\endcsname\endcsname}% %D \fi} -%D \stoptypen +%D \stoptyping \def\doresetvalue#1#2% {\dosetvalue{#1}{#2}{}} @@ -584,7 +584,7 @@ %D the embedded \type {\csname} we can reduce the format file %D by about 5\% (60~KB out of 1.9~MB). %D -%D \starttypen +%D \starttyping %D \def\docopyvalue#1#2#3% c -> k %D {\p!doifundefined{\k!prefix!#3}% %D \let\donottest\doprocesstest @@ -597,7 +597,7 @@ %D \csname\@EA#1\@EA\csname\@EA\k!prefix!\@EA#3\@EA\endcsname\@EA %D \endcsname\@EA{\csname#2\csname\k!prefix!#3\endcsname\endcsname}% %D \fi} -%D \stoptypen +%D \stoptyping %D %D The next alternatives are slightly faster. @@ -861,15 +861,15 @@ %D users instruct the system by means of variables, values and %D keywords. These instructions take the form: %D -%D \starttypen +%D \starttyping %D \setupsomething[some variable=some value, another one=a keyword] -%D \stoptypen +%D \stoptyping %D %D or by keyword only: %D -%D \starttypen -%D \dosomething[this way, that way, no way] -%D \stoptypen +%D \starttyping +%D \dosomething[this way,that way,no way] +%D \stoptyping %D %D Because the same variables can occur in more than one setup %D command, we have to be able to distinguish them. This is @@ -879,34 +879,34 @@ %D specify the height and width of the box. Behide the scenes %D the command %D -%D \starttypen +%D \starttyping %D \setupbox [width=12cm, height=3cm] -%D \stoptypen +%D \stoptyping %D %D results in something like %D -%D \starttypen +%D \starttyping %D \ {12cm} %D \ {3cm} -%D \stoptypen +%D \stoptyping %D %D while a similar command for specifying the page dimensions -%D of an \kap{A4} page results in: +%D of an \cap{A4} page results in: %D -%D \starttypen +%D \starttyping %D \ {21.0cm} %D \ {27.9cm} -%D \stoptypen +%D \stoptyping %D %D The prefixes \type{} and \type{} are hidden from %D users and can therefore be language independant. Variables %D on the other hand, differ for each language: %D -%D \starttypen +%D \starttyping %D \ {} %D \ {} %D \ {} -%D \stoptypen +%D \stoptyping %D %D In this example we can see that the assigned values or %D keywords are language dependant too. This will be a @@ -915,10 +915,10 @@ %D A third phenomena is that variables and values can have a %D similar meaning. %D -%D \starttypen +%D \starttyping %D \ {} %D \ {12cm} -%D \stoptypen +%D \stoptyping %D %D A (minor) complication is that where in english we use %D \type{}, in dutch we find both \type{} and @@ -931,17 +931,17 @@ %D user supplied and/or language specific elements. In english %D we can use: %D -%D \starttypen +%D \starttyping %D \
%D \ -%D \stoptypen +%D \stoptyping %D %D But in dutch we have the following: %D -%D \starttypen +%D \starttyping %D \ %D \ -%D \stoptypen +%D \stoptyping %D %D These subtle differences automatically lead to a solution %D where variables, values, elements and other components have @@ -952,28 +952,28 @@ %D in terms of identifiers with language specific meanings. In %D such an implementation, each fixed variable is available as: %D -%D \starttypen +%D \starttyping %D \ -%D \stoptypen +%D \stoptyping %D %D This means that for instance: %D -%D \starttypen +%D \starttyping %D \setupbox[width=12cm] -%D \stoptypen +%D \stoptyping %D %D expands to something like: %D -%D \starttypen +%D \starttyping %D \def\boxwidth{12cm} -%D \stoptypen +%D \stoptyping %D %D because we don't want to recode the source, a setup command %D in another language has to expand to this variable, so: %D -%D \starttypen -%D \stelblokin[breedte=12cm] -%D \stoptypen +%D \starttyping +%D \setupblock[width=12cm] +%D \stoptyping %D %D has to result in the definition of \type{\boxwidth} too. %D This method enables us to build compact, fast and readable @@ -983,18 +983,18 @@ %D more indirect way. In this case, both calls generate a %D different variable: %D -%D \starttypen +%D \starttyping %D \def\boxwidth {12cm} %D \def\boxbreedte {12cm} -%D \stoptypen +%D \stoptyping %D %D And because we don't want to recode those megabytes of %D already developed code, this variable has to be called with %D something like: %D -%D \starttypen +%D \starttyping %D \valueof\box\width -%D \stoptypen +%D \stoptyping %D %D where \type{\valueof} takes care of the translation of %D \type{width} or \type{breedte} to \type{width} and @@ -1016,21 +1016,21 @@ %D because in the source we only encounter \type{width}. Such %D system constants are presented as %D -%D \starttypen +%D \starttyping %D \c!width -%D \stoptypen +%D \stoptyping %D %D This constant is always equivalent to \type{width}. As we %D can see, we use \type{c!} to mark this one as constant. Its %D dutch counterpart is: %D -%D \starttypen -%D \c!breedte -%D \stoptypen +%D \starttyping +%D breedte +%D \stoptyping %D %D When we interpret a setup command each variable is %D translated to it's \type{c!} counterpart. This means that -%D \type{breedte} and \type{width} expand to \type{\c!breedte} +%D \type{breedte} and \type{width} expand to \type{breedte} %D and \type{\c!width} which both expand to \type{width}. That %D way user variables become system constants. %D @@ -1038,16 +1038,16 @@ %D command \type{\getparameters} that we introduced in the %D system module. Let us define some simple setup command: %D -%D \starttypen +%D \starttyping %D \def\setupbox[#1]% %D {\getparameters[\??bx][#1]} -%D \stoptypen +%D \stoptyping %D %D This command can be used as: %D -%D \starttypen +%D \starttyping %D \setupbox [width=3cm, height=1cm] -%D \stoptypen +%D \stoptyping %D %D Afterwards we have two variables \type{\@@bxwidth} and %D \type{\@@bxheight} which have the values \type{3cm} and @@ -1057,9 +1057,9 @@ %D \type{height} or \type{breedte} and \type{hoogte}, %D depending on the actual language. In dutch we just say: %D -%D \starttypen -%D \stelblokin [breedte=3cm, hoogte=1cm] -%D \stoptypen +%D \starttyping +%D \setupblock [width=3cm, height=1cm] +%D \stoptyping %D %D and get ourselves \type{\@@bxwidth} and \type{\@@bxheight} %D too. In the source of \CONTEXT, we can recognize constants @@ -1071,19 +1071,19 @@ %D keyword, but instead use in the source a variable which %D meaning depends on the interface language. %D -%D \starttypen +%D \starttyping %D \v!left -%D \stoptypen +%D \stoptyping %D %D Which can be used in macro's like: %D -%D \starttypen +%D \starttyping %D \processaction %D [\@@bxlocation] %D [ \v!left=>\dosomethingontheleft, %D \v!middle=>\dosomthinginthemiddle, %D \v!right=>\dosomethingontheright] -%D \stoptypen +%D \stoptyping %D %D Because variables like \type{\@@bxlocation} can have a lot %D of meanings, including tricky expandable tokens, we cannot @@ -1096,15 +1096,15 @@ %D Although we know it sounds confusing we want to state two %D important characteristics of the interface as described: %D -%D \startsmaller \em +%D \startnarrower \em %D user variables become system constants -%D \stopsmaller +%D \stopnarrower %D %D and %D -%D \startsmaller \em +%D \startnarrower \em %D user constants (keywords) become system variables -%D \stopsmaller +%D \stopnarrower %D %D \macros @@ -1115,26 +1115,26 @@ %D and variables are defined. We only show two languages and %D a few words. %D -%D \starttypen +%D \starttyping %D \startconstants english dutch %D %D width: width breedte %D height: height hoogte %D %D \stopconstants -%D \stoptypen +%D \stoptyping %D %D Keep in mind that what users see as variables, are constants %D for the system. %D -%D \starttypen +%D \starttyping %D \startvariables english dutch %D %D location: left links %D text: text tekst %D %D \stopvariables -%D \stoptypen +%D \stoptyping %D %D The macro's responsible for interpreting these setups are %D shared. They take care of empty lines and permit a more or @@ -1302,12 +1302,12 @@ %D following, more efficient approach does not work here, %D because it sometimes generates spaces. %D -%D \starttypen +%D \starttyping %D \def\setinterfacesetupconstant %D {\ifinterfacetranslation %D \expandafter\setinterfaceconstant %D \fi} -%D \stoptypen +%D \stoptyping %D %D We therefore use the more redundant but robust method: @@ -1327,7 +1327,7 @@ %D Due to the object oriented nature of \CONTEXT, we also need %D to define the elements that are used to build commands: %D -%D \starttypen +%D \starttyping %D \startelements english dutch %D %D beginvan: begin beginvan @@ -1336,7 +1336,7 @@ %D stop: stop stop %D %D \stopelements -%D \stoptypen +%D \stoptyping %D %D Such elements sometimes are the same in diferent %D languages, but mostly they differ. Things can get even @@ -1346,14 +1346,14 @@ %D problem, because we just define two elements. When no second %D part is needed, we use a \type{-}: %D -%D \starttypen +%D \starttyping %D \startelements english dutch %D %D setupa: setup stel %D setupb: - in %D %D \stopelements -%D \stoptypen +%D \stoptyping %D %D Element translation is realized by means of: @@ -1377,7 +1377,7 @@ %D The last setup has to do with the commands themselve. %D Commands are defined as: %D -%D \starttypen +%D \starttyping %D \startcommands english dutch %D %D starttekst: starttext starttekst @@ -1386,11 +1386,17 @@ %D margewoord: marginword margewoord %D %D \stopcommands -%D \stoptypen +%D \stoptyping %D %D Here we also have to take care of the optional translation %D needed for reference cards. +% \ifx\doifdefinedascommandelse\undefined +% \let\doifdefinedascommandelse\thirdofthreearguments +% \else +% % this one will be defined in the encoding modules +% \fi + \def\setinterfacecommand#1#2% {\doifelse{#2}\nointerfaceobject {\debuggerinfo{command}{no link to #1}% @@ -1400,10 +1406,8 @@ {\doifdefinedelse{#2} {\debuggerinfo{command}{core command #2 redefined as #1}}% {\debuggerinfo{command}{#2 defined as #1}}% - %\@EAEAEA\def\@EA\csname\@EA#2\@EA\endcsname - % \@EA{\csname#1\endcsname}}% - \@EA\def\csname#2\@EA\endcsname % ugly but faster - \@EA{\csname#1\endcsname}}% + %\@EAEAEA\def\@EA\csname\@EA#2\@EA\endcsname\@EA{\csname#1\endcsname}}% + \@EA\def\csname#2\@EA\endcsname\@EA{\csname#1\endcsname}}% ugly but faster \setinterfacesetupvariable{#1}{#2}}} \def\startcommands @@ -1415,9 +1419,9 @@ %D Generating the interface translation macro's that are used %D in the reference lists, is enabled by setting the boolean: %D -%D \starttypen +%D \starttyping %D \interfacetranslationtrue -%D \stoptypen +%D \stoptyping %D %D Keep in mind that enabling interfacetranslation costs a %D bit of hash space. @@ -1464,11 +1468,11 @@ %D generate a new format. Just reloading the relevant %D definition files suits: %D -%D \starttypen +%D \starttyping %D \interfacetranslationtrue %D \input mult-con %D \input mult-com -%D \stoptypen +%D \stoptyping %D \macros %D {interfaced} @@ -1477,9 +1481,9 @@ %D When we want to translate 'by hand' we can use the simple %D but effective command: %D -%D \starttypen +%D \starttyping %D \interfaced {something} -%D \stoptypen +%D \stoptyping %D %D Giving \type{\interfaced{breedte}} results in \type{width} %D or, when not defined, in \type{breedte} itself. This @@ -1528,7 +1532,13 @@ \ifx\normalmonth\undefined\the\month\else\the\normalmonth\fi.% \ifx\normalday \undefined\the\day \else\the\normalday \fi} -\ifx\contextversion\undefined \def\contextversion{unknown} \fi +\ifx\contextversion\undefined + \def\contextversion{unknown} + \def\contextversionnumber{0} +\else + \def\contextversionnumber#1.#2.#3\relax{#1\ifnum#2<10 0\fi#2\ifnum#3<10 0\fi#3} + \edef\contextversionnumber{\expandafter\contextversionnumber\contextversion\relax} +\fi \ifx\undefined\normaldump \newtoks\everydump diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex index dcf414bce..92a405672 100644 --- a/tex/context/base/mult-sys.tex +++ b/tex/context/base/mult-sys.tex @@ -22,10 +22,10 @@ %D The constants are grouped in such a way that there is a %D minimal change of conflicts. %D -%D \starttypen +%D \starttyping %D \definesystemconstants {word} %D \definemessageconstant {word} -%D \stoptypen +%D \stoptyping %D %D This commands generate \type{\s!word} and \type{\m!word}. @@ -33,6 +33,7 @@ %D multi||lingual interface and multi||linguag typesetting. \definesystemconstant {afrikaans} \definesystemconstant {af} +\definesystemconstant {catalan} \definesystemconstant {ca} \definesystemconstant {chinese} \definesystemconstant {cn} \definesystemconstant {croation} \definesystemconstant {hr} \definesystemconstant {czech} \definesystemconstant {cz} @@ -51,6 +52,8 @@ \definesystemconstant {romanian} \definesystemconstant {ro} \definesystemconstant {russian} \definesystemconstant {ru} \definesystemconstant {slovak} \definesystemconstant {sk} +\definesystemconstant {slovenian} \definesystemconstant {sl} +\definesystemconstant {slovene} \definesystemconstant {spanish} \definesystemconstant {es} \definesystemconstant {swedish} \definesystemconstant {sv} \definesystemconstant {turkish} \definesystemconstant {tr} @@ -107,10 +110,10 @@ %D Where in the \ASCII\ file the second lines takes nine extra %D characters, \TEX\ saves us 13~tokens. %D -%D \starttypen +%D \starttyping %D \hrule width 10pt height 2pt depth 1pt %D \hrule \!!width 10pt \!!height 2pt \!!depth 1pt -%D \stoptypen +%D \stoptyping %D %D One condition is that we have defined \type{\!!height}, %D \type{\!!width} and \type{\!!depth} as respectively @@ -181,6 +184,15 @@ \definesystemconstant {handling} \definesystemconstant {ucmap} +\definesystemconstant {property} +\definesystemconstant {overprint} +\definesystemconstant {layer} +\definesystemconstant {effect} +\definesystemconstant {negative} + +\definesystemconstant {black} +\definesystemconstant {white} + %D Just to be complete we define the standard \TEX\ units. \definesystemconstant {cm} @@ -328,9 +340,12 @@ \def\!!twelvepoint {12pt} \def\!!fourteenpointfour {14.4pt} -\newdimen \zeropoint \zeropoint = 0pt -\newdimen \onepoint \onepoint = 1pt -\chardef \scaledpoint = 1 +\newdimen \zeropoint \zeropoint = 0pt +\newdimen \onepoint \onepoint = 1pt +\newdimen \onebasepoint \onebasepoint = 1bp +\chardef \scaledpoint = 1 + +\let\onerealpoint\onepoint % needed for latex \newcount\medcard \medcard\!!medcard % used in font module \newcount\maxcard \maxcard\!!maxcard % used in font module @@ -345,7 +360,7 @@ %D A rough test is: %D -%D \starttypen +%D \starttyping %D \def\TestMe % 7.75 sec on a P4/2G %D {\dimen0=10\points\dimen0=10\points\dimen0=10\points\dimen0=10\points\dimen0=10\points %D \dimen0=10\points\dimen0=10\points\dimen0=10\points\dimen0=10\points\dimen0=10\points} @@ -359,7 +374,7 @@ %D \dimen0=10\s!pt\dimen0=10\s!pt\dimen0=10\s!pt\dimen0=10\s!pt\dimen0=10\s!pt} %D %D \testfeatureonce {500000}{\TestMe} -%D \stoptypen +%D \stoptyping %D Variables are composed of a command specific tag and a user %D supplied variable (system constant). The first tag \type{ag} @@ -416,6 +431,7 @@ \definesystemvariable {ht} % HiddenText \definesystemvariable {fc} % FramedContent \definesystemvariable {fd} % FielD +\definesystemvariable {fe} % FoxetExtensions \definesystemvariable {ff} % FontFile \definesystemvariable {fg} % FiGuurmaten \definesystemvariable {fi} % FIle @@ -425,6 +441,7 @@ \definesystemvariable {fr} % ForM \definesystemvariable {fs} % FileSynonym \definesystemvariable {ft} % FonTs +\definesystemvariable {fx} % FoXet \definesystemvariable {ha} % HAng \definesystemvariable {hs} % HSpace \definesystemvariable {ia} % Interactie diff --git a/tex/context/base/page-app.tex b/tex/context/base/page-app.tex index d3f7a1e94..6a9a10d33 100644 --- a/tex/context/base/page-app.tex +++ b/tex/context/base/page-app.tex @@ -18,35 +18,49 @@ \unprotect +\definepapersize + [\??fp\s!dummy] + [\c!width=\fittingwd, + \c!height=\fittinght] + +\definelayout + [\??fp\s!dummy] + [\c!width=\fittingwd,\c!height=\fittinght,\c!location=\v!middle, + \c!topspace=\!!zeropoint,\c!backspace=\!!zeropoint, + \c!cutspace=\!!zeropoint,\c!bottomspace=\!!zeropoint, + \c!textdistance=\!!zeropoint,\c!lines=0,\c!grid=\v!no, + \c!top=\!!zeropoint,\c!bottom=\!!zeropoint, + \c!margin=\!!zeropoint,\c!edge=\!!zeropoint, + \c!leftmargin=\!!zeropoint,\c!leftedge=\!!zeropoint, + \c!rightmargin=\!!zeropoint,\c!rightedge=\!!zeropoint, + \c!header=\!!zeropoint,\c!footer=\!!zeropoint] + \def\dostartfittingpage[#1][#2]% - {\pagina % this is kind of tricky! there can be preceding page refs + {\page % this is kind of tricky! there can be preceding page refs \bgroup % resulting in a zero height page; test fig-make ! + \def\currentfittingpage{#1}% \dontcomplain % runs under current page regime, i.e. page variables passed to mp + \getparameters[\currentfittingpage][\c!paper=,#2]% auto or size or nothing \setbox\scratchbox\hbox \bgroup - \getparameters[#1][#2]% - \schaal[\c!schaal=\getvalue{#1\c!schaal}]\bgroup\localframed[#1]\bgroup} - -\definepapersize - [\??fp\s!dummy] - [\c!breedte=\fittingwd, - \c!hoogte=\fittinght] - -\definelayout - [\??fp\s!dummy] - [\c!breedte=\fittingwd,\c!hoogte=\fittinght,\c!plaats=\v!midden, - \c!kopwit=\!!zeropoint,\c!rugwit=\!!zeropoint, - \c!snijwit=\!!zeropoint,\c!bodemwit=\!!zeropoint, - \c!tekstafstand=\!!zeropoint,\c!regels=0,\c!grid=\v!nee, - \c!boven=\!!zeropoint,\c!onder=\!!zeropoint, - \c!marge=\!!zeropoint,\c!rand=\!!zeropoint, - \c!linkermarge=\!!zeropoint,\c!linkerrand=\!!zeropoint, - \c!rechtermarge=\!!zeropoint,\c!rechterrand=\!!zeropoint, - \c!hoofd=\!!zeropoint,\c!voet=\!!zeropoint] + % needed later \getparameters[\currentfittingpage][\c!paper=,#2]% auto or size or nothing + \doifvalue{\currentfittingpage\c!margin}\v!page % undocumented + {\offsetbox + [\c!leftoffset=\backspace, + \c!rightoffset=\cutspace, + \c!topoffset=\topspace, + \c!bottomoffset=\bottomspace]\hbox}% + \bgroup + \scale[\c!scale=\getvalue{\currentfittingpage\c!scale}]% + \bgroup\localframed[\currentfittingpage]% + \bgroup} \def\dostopfittingpage - {\egroup\egroup\egroup + {\egroup % localframed + \egroup % scale + \egroup % offsetbox + \egroup % scratchbox \edef\fittingwd{\the\wd\scratchbox}% \edef\fittinght{\the\ht\scratchbox}% \startlocallayout @@ -56,16 +70,20 @@ \edef\fittinght{\the\lineheight}% \fi \let\checkcurrentlayout\relax % else interference with odd/even layout - \setuppapersize - [\??fp\s!dummy][\??fp\s!dummy]% + \processaction + [\getvalue{\currentfittingpage\c!paper}] + [ \v!auto=>\let\fittingpapersize\printpapersize, + \s!unknown=>\let\fittingpapersize\commalistelement, + \s!default=>\def\fittingpapersize{\??fp\s!dummy}]% + \expanded{\setuppapersize[\??fp\s!dummy][\fittingpapersize]}% \definelayout - [\v!pagina]% - [\c!plaats=\v!midden, - \c!breedte=\fittingwd, - \c!hoogte=\fittinght]% + [\v!page]% + [\c!location=\v!middle, + \c!width=\fittingwd, + \c!height=\fittinght]% \setuplayout - [\v!pagina]% - \startmakeup[\v!standaard][\c!tekststatus=\v!leeg,\c!dubbelzijdig=\v!nee,\c!pagina=]% + [\v!page]% + \startmakeup[\v!standard][\c!textstate=\v!empty,\c!doublesided=\v!no,\c!page=]% \centerbox{\box\scratchbox}% \stopmakeup \stoplocallayout @@ -89,13 +107,13 @@ \dostopfittingpage} \setupTEXpage - [\c!schaal=1000, - \c!strut=\v!nee, - \c!uitlijnen=\v!normaal, % needed, else problems ! + [\c!scale=1000, + \c!strut=\v!no, + \c!align=\v!normal, % needed, else problems ! \c!offset=\v!overlay, - \c!breedte=\v!passend, - \c!hoogte=\v!passend, - \c!kader=\v!uit] + \c!width=\v!fit, + \c!height=\v!fit, + \c!frame=\v!off] %D Application pages (for an example, see \type {m-pstric}): @@ -142,7 +160,7 @@ \setbox\scratchbox\hbox {\expanded{\externalfigure [\bufferprefix\@@texapp.\ifdone eps\else pdf\fi] - [\c!object=\v!nee]}}% + [\c!object=\v!no]}}% \setbox\scratchbox\hbox {\lower\ht\scratchbox\hbox{\raise\dimen2\box\scratchbox}}% \wd\scratchbox\dimen0 @@ -151,4 +169,4 @@ \box\scratchbox \egroup} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-bck.tex b/tex/context/base/page-bck.tex index 967679216..165bbafaf 100644 --- a/tex/context/base/page-bck.tex +++ b/tex/context/base/page-bck.tex @@ -50,9 +50,9 @@ %D amount of background calculations. The main switch is set %D by the recalculate directive. %D -%D \starttypen +%D \starttyping %D \recalculatebackgrounds -%D \stoptypen +%D \stoptyping %D %D Other modules may not directly set the switches %D themselves. @@ -64,12 +64,12 @@ %D {*background} mode. This mode is only available when %D typesetting the pagebody. %D -%D \starttypen +%D \starttyping %D \startmode[*background] ... -%D \stoptypen +%D \stoptyping \appendtoks - \ifsomebackground \ifnewbackground \setsystemmode\v!achtergrond \fi \fi + \ifsomebackground \ifnewbackground \setsystemmode\v!background \fi \fi \to \everybeforepagebody %D \macros @@ -81,12 +81,12 @@ %D is made up by four macros that add background to parts of %D the layout. %D -%D \starttypen +%D \starttyping %D \addmainbackground %D \addtextbackground %D \addpagebackground %D \addprintbackground -%D \stoptypen +%D \stoptyping %D To minimize calculations, we keep track of the state of the %D background of each area. A previous implementation did @@ -96,31 +96,15 @@ %D (On the 824 pages maps bibliography runtime went down from %D 309 to 299 seconds.) -% \def\checkbackground#1% -% {\edef\!!stringe{\??ma#1}% -% \doifelsevaluenothing{\!!stringe\c!achtergrond } -% {\doifelsevaluenothing{\!!stringe\c!voorgrondkleur} -% {\doifelsevalue{\!!stringe\c!kader }\v!aan\!!doneatrue -% {\doifelsevalue{\!!stringe\c!linkerkader }\v!aan\!!doneatrue -% {\doifelsevalue{\!!stringe\c!rechterkader}\v!aan\!!doneatrue -% {\doifelsevalue{\!!stringe\c!bovenkader }\v!aan\!!doneatrue -% {\doifelsevalue{\!!stringe\c!onderkader }\v!aan\!!doneatrue -% \!!doneafalse}}}}} -% \!!doneatrue} -% \!!doneatrue -% \if!!donea -% \expandafter\setusage\else\expandafter\resetusage -% \fi{\??ma#1}} - \def\checkbackground#1% {\edef\!!stringe{\??ma#1}% - \doifelsevaluenothing{\!!stringe\c!achtergrond } - {\doifelsevaluenothing{\!!stringe\c!voorgrondkleur} - {\doifelsevalue{\!!stringe\c!kader }\v!aan\!!doneatrue - {\doifelsevalue{\!!stringe\c!linkerkader }\v!aan\!!doneatrue - {\doifelsevalue{\!!stringe\c!rechterkader}\v!aan\!!doneatrue - {\doifelsevalue{\!!stringe\c!bovenkader }\v!aan\!!doneatrue - {\doifelsevalue{\!!stringe\c!onderkader }\v!aan\!!doneatrue + \doifelsevaluenothing{\!!stringe\c!background } + {\doifelsevaluenothing{\!!stringe\c!foregroundcolor} + {\doifelsevalue{\!!stringe\c!frame }\v!on\!!doneatrue + {\doifelsevalue{\!!stringe\c!leftframe }\v!on\!!doneatrue + {\doifelsevalue{\!!stringe\c!rightframe}\v!on\!!doneatrue + {\doifelsevalue{\!!stringe\c!topframe }\v!on\!!doneatrue + {\doifelsevalue{\!!stringe\c!bottomframe }\v!on\!!doneatrue \!!doneafalse}}}}} \!!doneatrue} \!!doneatrue @@ -149,10 +133,11 @@ \def\addsomebackground#1#2#3#4% area box width height / zero test added {\ifsomebackgroundfound#1\ifdim#3>\zeropoint\ifdim#4>\zeropoint + \doifvaluesomething{\??ma#1\c!setups}{\setups[\getvalue{\??ma#1\c!setups}]}% should not produce funny spaces ! \setbox#2\vbox\fastlocalframed [\??ma#1] - [\c!component=#1,\c!strut=\v!nee,\c!offset=\v!overlay,% - \c!breedte=#3,\c!hoogte=#4] + [\c!component=#1,\c!strut=\v!no,\c!offset=\v!overlay,\c!setups=,% + \c!width=#3,\c!height=#4] {\dp#2\zeropoint\box#2}% \fi\fi\fi} @@ -162,7 +147,7 @@ \def\addprintbackground#1% {\addsomebackground - \v!papier#1\printpapierbreedte\printpapierhoogte} + \v!paper#1\printpaperwidth\printpaperheight} %D The page backgrounds can be put behind the {\em left %D page}, the {\em right page} or {\em each page}. As with @@ -170,13 +155,13 @@ \def\addpagebackground#1% {\doifbothsidesoverruled - \addsomebackground\v!rechterpagina#1\papierbreedte\papierhoogte + \addsomebackground\v!rightpage#1\paperwidth\paperheight \orsideone - \addsomebackground\v!rechterpagina#1\papierbreedte\papierhoogte + \addsomebackground\v!rightpage#1\paperwidth\paperheight \orsidetwo - \addsomebackground\v!linkerpagina #1\papierbreedte\papierhoogte + \addsomebackground\v!leftpage #1\paperwidth\paperheight \od - \addsomebackground\v!pagina #1\papierbreedte\papierhoogte} + \addsomebackground\v!page #1\paperwidth\paperheight} %D Then there are the 25 areas that make up the layout: {\em %D top, header, text, footer, bottom} times {\em left edge, @@ -205,9 +190,9 @@ \def\addtextbackground#1% {\ifconditional\hiddenbackgroundenabled - \addsomebackground\v!verborgen#1\zetbreedte\teksthoogte % mine ! + \addsomebackground\v!hidden#1\makeupwidth\textheight % mine ! \fi - \addsomebackground\v!tekst#1\zetbreedte\teksthoogte} + \addsomebackground\v!text#1\makeupwidth\textheight} % \def\addtextbackground#1% % {\ifconditional\hiddenbackgroundenabled @@ -280,7 +265,7 @@ \global\chardef\newrightbackground\zerocount \fi \od - \ifx\@@mastatus\v!herhaal\else\global\newbackgroundfalse\fi} + \ifx\@@mastate\v!repeat\else\global\newbackgroundfalse\fi} \def\addmainbackground#1% todo: dimension spec {\ifsomebackground @@ -298,18 +283,18 @@ \global\let\pagebackgroundhoffset\!!zeropoint \global\let\pagebackgroundvoffset\!!zeropoint \global\let\pagebackgrounddepth \!!zeropoint - \doifsomebackgroundelse{\v!tekst\v!tekst}\donetrue\donefalse - \ifdone\else\doifsomebackgroundelse\v!tekst\donetrue\donothing\fi + \doifsomebackgroundelse{\v!text\v!text}\donetrue\donefalse + \ifdone\else\doifsomebackgroundelse\v!text\donetrue\donothing\fi \ifdone \bgroup - \scratchdimen\getvalue{\??ma\v!pagina\c!offset}% - \doifsomebackgroundelse{\v!boven\v!tekst}\donothing - {\doifsomebackgroundelse{\v!onder\v!tekst}\donothing + \scratchdimen\getvalue{\??ma\v!page\c!offset}% + \doifsomebackgroundelse{\v!top\v!text}\donothing + {\doifsomebackgroundelse{\v!bottom\v!text}\donothing {\xdef\pagebackgroundhoffset{\the\scratchdimen}}}% - \doifsomebackgroundelse{\v!tekst\v!rechterrand}\donothing - {\doifsomebackgroundelse{\v!tekst\v!linkerrand}\donothing + \doifsomebackgroundelse{\v!text\v!rightedge}\donothing + {\doifsomebackgroundelse{\v!text\v!leftedge}\donothing {\xdef\pagebackgroundvoffset{\the\scratchdimen}% - \scratchdimen\getvalue{\??ma\v!pagina\c!diepte}% + \scratchdimen\getvalue{\??ma\v!page\c!depth}% \xdef\pagebackgrounddepth{\the\scratchdimen}}}% \egroup \fi @@ -317,26 +302,6 @@ \appendtoks \setbackgroundoffsets \to \everybeforepagebody -% \def\setbackgroundbox#1#2% -% {\global\setbox#1\vbox -% {\dontcomplain -% \calculatereducedvsizes -% \offinterlineskip -% #2\relax -% \vskip-\bovenhoogte -% \vskip-\bovenafstand -% \dodopagebodybackground\v!boven\bovenhoogte -% \vskip\bovenafstand -% \dodopagebodybackground\v!hoofd\hoofdhoogte -% \vskip\hoofdafstand -% \dodopagebodybackground\v!tekst\teksthoogte -% \vskip\voetafstand -% \dodopagebodybackground\v!voet\voethoogte -% \vskip\onderafstand -% \dodopagebodybackground\v!onder\onderhoogte -% \vfilll}% -% \smashbox#1} - \newconditional\swapbackgroundmargins \settrue\swapbackgroundmargins \def\setbackgroundbox#1#2% @@ -345,61 +310,41 @@ \swapmargins \ifconditional\swapbackgroundmargins \doifmarginswapelse \donothing - {\swapmacros\v!rechtermarge\v!linkermarge - \swapmacros\v!rechterrand \v!linkerrand}% + {\swapmacros\v!rightmargin\v!leftmargin + \swapmacros\v!rightedge \v!leftedge}% \fi \calculatereducedvsizes \offinterlineskip #2\relax - \vskip-\bovenhoogte - \vskip-\bovenafstand - \dodopagebodybackground\v!boven\bovenhoogte - \vskip\bovenafstand - \dodopagebodybackground\v!hoofd\hoofdhoogte - \vskip\hoofdafstand - \dodopagebodybackground\v!tekst\teksthoogte - \vskip\voetafstand - \dodopagebodybackground\v!voet\voethoogte - \vskip\onderafstand - \dodopagebodybackground\v!onder\onderhoogte + \vskip-\topheight + \vskip-\topdistance + \dodopagebodybackground\v!top\topheight + \vskip\topdistance + \dodopagebodybackground\v!header\headerheight + \vskip\headerdistance + \dodopagebodybackground\v!text\textheight + \vskip\footerdistance + \dodopagebodybackground\v!footer\footerheight + \vskip\bottomdistance + \dodopagebodybackground\v!bottom\bottomheight \vfilll}% \smashbox#1} -% \def\dodopagebodybackground#1#2% -% {\ifdim#2>\zeropoint % added, faster -% \setbox\scratchbox\vbox to #2 -% \bgroup\hbox\bgroup -% \swapmargins -% \goleftonpage -% \dododopagebodybackground\linkerrandbreedte #2#1\v!linkerrand -% \hskip\linkerrandafstand -% \dododopagebodybackground\linkermargebreedte #2#1\v!linkermarge -% \hskip\linkermargeafstand -% \dododopagebodybackground\zetbreedte #2#1\v!tekst -% \hskip\rechtermargeafstand -% \dododopagebodybackground\rechtermargebreedte#2#1\v!rechtermarge -% \hskip\rechterrandafstand -% \dododopagebodybackground\rechterrandbreedte #2#1\v!rechterrand -% \egroup\egroup -% \wd\scratchbox\zeropoint -% \box\scratchbox\relax -% \fi} - \def\dodopagebodybackground#1#2% {\ifdim#2>\zeropoint % added, faster \setbox\scratchbox\vbox to #2 \bgroup\hbox\bgroup % \swapmargins \goleftonpage - \dododopagebodybackground\linkerrandbreedte #2#1\v!linkerrand - \hskip\linkerrandafstand - \dododopagebodybackground\linkermargebreedte #2#1\v!linkermarge - \hskip\linkermargeafstand - \dododopagebodybackground\zetbreedte #2#1\v!tekst - \hskip\rechtermargeafstand - \dododopagebodybackground\rechtermargebreedte#2#1\v!rechtermarge - \hskip\rechterrandafstand - \dododopagebodybackground\rechterrandbreedte #2#1\v!rechterrand + \dododopagebodybackground\leftedgewidth #2#1\v!leftedge + \hskip\leftedgedistance + \dododopagebodybackground\leftmarginwidth #2#1\v!leftmargin + \hskip\leftmargindistance + \dododopagebodybackground\makeupwidth #2#1\v!text + \hskip\rightmargindistance + \dododopagebodybackground\rightmarginwidth#2#1\v!rightmargin + \hskip\rightedgedistance + \dododopagebodybackground\rightedgewidth #2#1\v!rightedge \egroup\egroup \wd\scratchbox\zeropoint \box\scratchbox\relax @@ -409,10 +354,11 @@ {\ifsomebackgroundfound{#3#4}% \ifdim#2>\zeropoint\relax \ifdim#1>\zeropoint\relax + \doifvaluesomething{\??ma#3#4\c!setups}{\setups[\getvalue{\??ma#3#4\c!setups}]}% should not produce funny spaces ! \fastlocalframed [\??ma#3#4] - [\c!component=#3-#4,\c!breedte=#1,\c!hoogte=#2,\c!offset=\v!overlay] - {\getvalue{\??ma#3#4\c!commando}}% {\hsize=#1\vsize=#2....} + [\c!component=#3-#4,\c!width=#1,\c!height=#2,\c!offset=\v!overlay,\c!setups=] + {\getvalue{\??ma#3#4\c!command}}% {\hsize=#1\vsize=#2....} \else \hskip#1% \fi @@ -428,11 +374,11 @@ %D usage, but since today's \TEX's are large, we now do the %D work on forehand. %D -%D \starttypen +%D \starttyping %D \setupbackgrounds [settings] %D \setupbackgrounds [paper,page,text,..] [settings] %D \setupbackgrounds [top,...] [leftedge,...] [settings] -%D \stoptypen +%D \stoptyping %D %D \showsetup{\y!setupbackgrounds} %D @@ -446,7 +392,7 @@ {\ifthirdargument \global\somebackgroundtrue \def\docommando##1% - {\doifinsetelse{##1}{\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina} + {\doifinsetelse{##1}{\v!paper,\v!page,\v!leftpage,\v!rightpage} {\getparameters[\??ma##1][#3]\checkbackground{##1}} {\def\dodocommando####1% {\getparameters[\??ma##1####1][#3]\checkbackground{##1####1}}% @@ -454,26 +400,26 @@ \processcommalist[#1]\docommando \else\ifsecondargument \global\somebackgroundtrue - \doifcommonelse{#1}{\v!tekst,\v!verborgen,% + \doifcommonelse{#1}{\v!text,\v!hidden,% %\v!linkertekst,\v!rechtertekst,% - \v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina} + \v!paper,\v!page,\v!leftpage,\v!rightpage} {\def\docommando##1% {\getparameters[\??ma##1][#2]\checkbackground{##1}}% \processcommalist[#1]\docommando}% {\setupbackgrounds [#1]% - [\v!linkerrand,\v!linkermarge,\v!tekst,\v!rechtermarge,\v!rechterrand]% + [\v!leftedge,\v!leftmargin,\v!text,\v!rightmargin,\v!rightedge]% [#2]}% \else\iffirstargument \getparameters[\??ma][#1]% \fi\fi\fi - \doifelsevalue{\??ma\v!pagina\c!offset}\v!overlay + \doifelsevalue{\??ma\v!page\c!offset}\v!overlay {\global\pageoffset\zeropoint} - {\global\pageoffset\getvalue{\??ma\v!pagina\c!offset}}% - \global\pagedepth\getvalue{\??ma\v!pagina\c!diepte}% + {\global\pageoffset\getvalue{\??ma\v!page\c!offset}}% + \global\pagedepth\getvalue{\??ma\v!page\c!depth}% \xdef\pagebackgroundoffset{\the\pageoffset}% \xdef\pagebackgrounddepth {\the\pagedepth }% - \doifelse\@@mastatus\v!stop + \doifelse\@@mastate\v!stop {\global\newbackgroundfalse} {\global\newbackgroundtrue }} @@ -485,42 +431,42 @@ %D Each areas (currently there are $1+3+25+1=30$ of them) %D has its own low level framed object associated. -\presetlocalframed [\??ma\v!papier] -\presetlocalframed [\??ma\v!pagina] -\presetlocalframed [\??ma\v!linkerpagina] -\presetlocalframed [\??ma\v!rechterpagina] +\presetlocalframed [\??ma\v!paper] +\presetlocalframed [\??ma\v!page] +\presetlocalframed [\??ma\v!leftpage] +\presetlocalframed [\??ma\v!rightpage] \copyparameters - [\??ma\v!papier\c!kader][\??ma\v!pagina] - [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster] + [\??ma\v!paper\c!frame][\??ma\v!page] + [\c!offset,\c!depth,\c!radius,\c!corner,\c!color,\c!screen] \copyparameters - [\??ma\v!papier\c!achtergrond][\??ma\v!pagina] - [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster] + [\??ma\v!paper\c!background][\??ma\v!page] + [\c!offset,\c!depth,\c!radius,\c!corner,\c!color,\c!screen] \copyparameters - [\??ma\v!pagina\c!kader][\??ma\v!pagina] - [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster] + [\??ma\v!page\c!frame][\??ma\v!page] + [\c!offset,\c!depth,\c!radius,\c!corner,\c!color,\c!screen] \copyparameters - [\??ma\v!pagina\c!achtergrond][\??ma\v!pagina] - [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster] + [\??ma\v!page\c!background][\??ma\v!page] + [\c!offset,\c!depth,\c!radius,\c!corner,\c!color,\c!screen] \copyparameters - [\??ma\v!linkerpagina\c!kader][\??ma\v!linkerpagina] - [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster] + [\??ma\v!leftpage\c!frame][\??ma\v!leftpage] + [\c!offset,\c!depth,\c!radius,\c!corner,\c!color,\c!screen] \copyparameters - [\??ma\v!linkerpagina\c!achtergrond][\??ma\v!linkerpagina] - [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster] + [\??ma\v!leftpage\c!background][\??ma\v!leftpage] + [\c!offset,\c!depth,\c!radius,\c!corner,\c!color,\c!screen] \copyparameters - [\??ma\v!rechterpagina\c!kader][\??ma\v!rechterpagina] - [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster] + [\??ma\v!rightpage\c!frame][\??ma\v!rightpage] + [\c!offset,\c!depth,\c!radius,\c!corner,\c!color,\c!screen] \copyparameters - [\??ma\v!rechterpagina\c!achtergrond][\??ma\v!rechterpagina] - [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster] + [\??ma\v!rightpage\c!background][\??ma\v!rightpage] + [\c!offset,\c!depth,\c!radius,\c!corner,\c!color,\c!screen] %D We save some keying by defining the areas using %D intermediate commands. The inheritance macro makes sure @@ -528,38 +474,38 @@ \def\dodocommando#1#2% {\copylocalframed - [\??ma#1#2][\??ma\v!pagina]% + [\??ma#1#2][\??ma\v!page]% \getparameters [\??ma#1#2] - [\c!achtergrond=,\c!kader=,\c!kleur=,\c!raster=\@@rsraster, - \c!onderkader=,\c!bovenkader=,\c!linkerkader=,\c!rechterkader=]% - \inheritparameter[\??ma][#1#2\c!kleur][\v!pagina\c!kleur]% - \inheritparameter[\??ma][#1#2\c!raster][\v!pagina\c!raster]% - \inheritparameter[\??ma][#1#2\c!kaderkleur][\v!pagina\c!kaderkleur]% - \inheritparameter[\??ma][#1#2\c!achtergrondkleur][\v!pagina\c!achtergrondkleur]% - \inheritparameter[\??ma][#1#2\c!achtergrondraster][\v!pagina\c!achtergrondraster]} + [\c!background=,\c!frame=,\c!color=,\c!screen=\@@rsscreen, + \c!bottomframe=,\c!topframe=,\c!leftframe=,\c!rightframe=]% + \inheritparameter[\??ma][#1#2\c!color][\v!page\c!color]% + \inheritparameter[\??ma][#1#2\c!screen][\v!page\c!screen]% + \inheritparameter[\??ma][#1#2\c!framecolor][\v!page\c!framecolor]% + \inheritparameter[\??ma][#1#2\c!backgroundcolor][\v!page\c!backgroundcolor]% + \inheritparameter[\??ma][#1#2\c!backgroundscreen][\v!page\c!backgroundscreen]} %D The stand alone text area inherits from the page too. -\dodocommando\v!tekst \empty +\dodocommando\v!text \empty %dodocommando\v!linkertekst \empty %dodocommando\v!rechtertekst\empty -\dodocommando\v!verborgen \empty +\dodocommando\v!hidden \empty %D We now define all 25 main areas in a row. \def\docommando#1% - {\dodocommando#1\v!linkerrand - \dodocommando#1\v!linkermarge - \dodocommando#1\v!tekst - \dodocommando#1\v!rechtermarge - \dodocommando#1\v!rechterrand} - -\docommando\v!boven -\docommando\v!hoofd -\docommando\v!tekst -\docommando\v!voet -\docommando\v!onder + {\dodocommando#1\v!leftedge + \dodocommando#1\v!leftmargin + \dodocommando#1\v!text + \dodocommando#1\v!rightmargin + \dodocommando#1\v!rightedge} + +\docommando\v!top +\docommando\v!header +\docommando\v!text +\docommando\v!footer +\docommando\v!bottom %D We need some cleanup now. @@ -569,29 +515,29 @@ %D defaults. \setupbackgrounds - [\c!status=\c!start] + [\c!state=\c!start] \setupbackgrounds - [\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina] - [\c!kader=\v!uit, - \c!straal=.5\korpsgrootte, - \c!hoek=\v!recht, - \c!achtergrond=, - \c!raster=\@@rsraster, - \c!kleur=, - %\c!kaderoffset=\getvalue{\??ma\v!pagina\c!offset}, - %\c!achtergrondoffset=\getvalue{\??ma\v!pagina\c!offset}, + [\v!paper,\v!page,\v!leftpage,\v!rightpage] + [\c!frame=\v!off, + \c!radius=.5\korpsgrootte, + \c!corner=\v!rectangular, + \c!background=, + \c!screen=\@@rsscreen, + \c!color=, + %\c!frameoffset=\getvalue{\??ma\v!page\c!offset}, + %\c!backgroundoffset=\getvalue{\??ma\v!page\c!offset}, \c!offset=\!!zeropoint, % later set to \v!overlay, watch out ! - \c!diepte=\!!zeropoint] + \c!depth=\!!zeropoint] \def\docommando#1% - {\inheritparameter[\??ma][#1\c!kaderoffset][\v!pagina\c!offset]% - \inheritparameter[\??ma][#1\c!achtergrondoffset][\v!pagina\c!offset]} + {\inheritparameter[\??ma][#1\c!frameoffset][\v!page\c!offset]% + \inheritparameter[\??ma][#1\c!backgroundoffset][\v!page\c!offset]} -\docommando\v!papier -\docommando\v!pagina -\docommando\v!linkerpagina -\docommando\v!rechterpagina +\docommando\v!paper +\docommando\v!page +\docommando\v!leftpage +\docommando\v!rightpage %D Again we clean up temporary macros. @@ -613,25 +559,25 @@ {\global\setfalse\hiddenbackgroundenabled} \def\hiddenbackground - {\v!tekst-2,\v!tekst-1,\v!voorgrond,\v!tekst+1,\v!tekst+2} + {\v!text-2,\v!text-1,\v!foreground,\v!text+1,\v!text+2} \setupbackgrounds - [\v!verborgen] - [\c!achtergrond=\hiddenbackground] + [\v!hidden] + [\c!background=\hiddenbackground] % The next series is used in local (for instance floating) % backgrounds. \presetlocalframed - [\??ma\v!lokaal] + [\??ma\v!local] \def\localbackground - {\v!lokaal-2,\v!lokaal-1,\v!voorgrond,\v!lokaal+1,\v!lokaal+2} + {\v!local-2,\v!local-1,\v!foreground,\v!local+1,\v!local+2} -\defineoverlay[\v!lokaal-2][\positionoverlay{\v!lokaal-2}] -\defineoverlay[\v!lokaal-1][\positionoverlay{\v!lokaal-1}] -\defineoverlay[\v!lokaal+1][\positionoverlay{\v!lokaal+1}] -\defineoverlay[\v!lokaal+2][\positionoverlay{\v!lokaal+2}] +\defineoverlay[\v!local-2][\positionoverlay{\v!local-2}] +\defineoverlay[\v!local-1][\positionoverlay{\v!local-1}] +\defineoverlay[\v!local+1][\positionoverlay{\v!local+1}] +\defineoverlay[\v!local+2][\positionoverlay{\v!local+2}] \def\addlocalbackgroundtobox {\ifconditional\hiddenbackgroundenabled @@ -640,26 +586,6 @@ \resetglobal \expandafter\gobbleoneargument \fi} -% \def\doaddlocalbackground#1% -% {\scratchdimen\dp#1% -% \edef\next -% {\noexpand\redoglobal\wd#1\the\wd#1% -% \noexpand\redoglobal\ht#1\the\ht#1% -% \noexpand\dodoglobal\dp#1\the\dp#1}% -% \dp#1\zeropoint -% \redoglobal\setbox#1\hbox -% {\fastlocalframed -% [\??ma\v!lokaal] -% [\c!kader=\v!uit, -% \c!offset=\v!overlay, -% \c!achtergrond=\localbackground]% -% {\registerMPlocaltextarea{\box#1}}}% -% \ifdim\naturalfloatdepth>\zeropoint % maybe take difference -% \redoglobal\setbox#1\hbox{\lower\scratchdimen\box#1}% -% \fi -% \doglobal\increment\localpositionnumber % afterwards ! -% \next} - \def\doaddlocalbackground#1% {\edef\next {\noexpand\redoglobal\wd#1\the\wd#1% @@ -667,29 +593,14 @@ \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!achtergrond=\localbackground]% + [\??ma\v!local] + [\c!component=local,\c!frame=\v!off,\c!offset=\v!overlay,\c!setups=,% + \c!width=\wd#1,hoogte=\ht#1,% no diepte=\dp#1 in cont-exp.tex, to be checked ! + \c!background=\localbackground]% {\registerMPlocaltextarea{\box#1}}}% \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 @@ -707,19 +618,19 @@ \protect \endinput -%D Removed \citeer {features}: +%D Removed \quote {features}: %D -%D \starttypen -%D \startinteractie +%D \starttyping +%D \startinteraction %D \doifmarginswapelse %D {\copy\leftbackground} %D {\copy\rightbackground}% -%D \stopinteractie -%D \stoptypen +%D \stopinteraction +%D \stoptyping %D -%D \starttypen +%D \starttyping %D \edef\setpagebackgrounddepth% %D {\dp#2=\the\dp#2}% %D \setbox#2=\vbox\localframed[\??ma#1]{...} %D \setpagebackgrounddepth -%D \stoptypen +%D \stoptyping diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex index ca4ef35ae..fcca715d6 100644 --- a/tex/context/base/page-flt.tex +++ b/tex/context/base/page-flt.tex @@ -160,29 +160,29 @@ 12: nedefinit \stopmessages -\def\stelplaatsblokkenin +\def\setupfloats {\dodoubleargument\getparameters[\??bk]} -\def\stelblokkopjesin +\def\setupcaptions {\dodoubleargument\getparameters[\??kj]} -\def\dostelplaatsblokin[#1][#2]% +\def\dosetupfloat[#1][#2]% {\def\docommando##1{\getparameters[\??fl##1][#2]}% \processcommalist[#1]\docommando} -\def\stelplaatsblokin - {\dodoubleargument\dostelplaatsblokin} +\def\setupfloat + {\dodoubleargument\dosetupfloat} -\def\dostelblokkopjein[#1][#2]% +\def\dosetupcaption[#1][#2]% {\def\docommando##1{\getparameters[\??kj##1][#2]}% \processcommalist[#1]\docommando} -\def\stelblokkopjein - {\dodoubleargument\dostelblokkopjein} +\def\setupcaption + {\dodoubleargument\dosetupcaption} -\def\doleegblok#1% +\def\doemptyblock#1% {\localframed - [\??fl#1][\c!kader=\v!aan]% + [\??fl#1][\c!frame=\v!on]% {\getmessage\m!floatblocks{12}}} % A complication is that we may have to handle a pagebreak @@ -194,8 +194,8 @@ \def\docomplexplaatsblok[#1][#2]% [#3]#4% {\edef\floattype{#1}% \doifelsenothing\floattype - {\let\floattype\v!figuur} - {\doifundefined{\??fl#1\c!default}{\let\floattype\v!figuur}}% + {\let\floattype\v!figure} + {\doifundefined{\??fl#1\c!default}{\let\floattype\v!figure}}% \doifelsenothing{#2} {\edef\floatlocation{\getvalue{\??fl\floattype\c!default}}} {\edef\floatlocation{#2}}% @@ -206,25 +206,25 @@ \flushsidefloats % here ! \ifsomefloatwaiting % this was \checkwaitingfloats spread all over - \doifinsetelse\v!altijd{#2} + \doifinsetelse\v!always{#2} {\showmessage\m!floatblocks5\empty} {\doifcommonelse {#2} - {\v!links,\v!rechts,\v!binnen,\v!buiten,% - \v!rugwit,\v!snijwit,% - \v!inlinker,\v!inrechter,\v!inmarge,% - \v!linkermarge,\v!rechtermarge,\v!linkerrand,\v!rechterrand,% - \v!binnenmarge,\v!buitenmarge,\v!binnenrand,\v!buitenrand,% - \v!tekst,\v!naast}% \v!pagina + {\v!left,\v!right,\v!inner,\v!outer,% + \v!backspace,\v!cutspace,% + \v!inleft,\v!inright,\v!inmargin,% + \v!leftmargin,\v!rightmargin,\v!leftedge,\v!rightedge,% + \v!innermargin,\v!outermargin,\v!inneredge,\v!outeredge,% + \v!text,\v!opposite}% \v!page {\doflushfloats} {}}% % but which should be done before using box \floatbox \fi \ifmargeblokken % waarschijnlijk gebroken ! ! ! ! - \doifinset\v!marge{#2} + \doifinset\v!margin{#2} {\endgraf \bgroup\everypar{\egroup\the\everypar}% - \hsize\@@mbbreedte}% + \hsize\@@mbwidth}% \fi \global\insidefloattrue \begingroup % ** @@ -233,12 +233,12 @@ \presetmorefloatvariables{#2}% \dowithnextboxcontent % better a \the\everyfloattoks {\setlocalfloathsize - \getvalue{\??fl#1\c!binnen}% + \getvalue{\??fl#1\c!inner}% \fuzzysnappingfalse \postponefootnotes} % new {\xdocompletefloat{#1}{#3}{#1}{#2}{#1}{#4}% ** not yet done % we need to carry over the par because of side floats - \doifnotinset\v!tekst{#2}{\carryoverpar\endgroup}% + \doifnotinset\v!text{#2}{\carryoverpar\endgroup}% \global\sidefloatdownshift \zeropoint \global\sidefloatextrashift\zeropoint \ifparfloat @@ -258,42 +258,42 @@ \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} + {\v!left,\v!right,\v!inner,\v!outer,% + \v!inleft,\v!inright,\v!inmargin,% + \v!backspace,\v!cutspace,% + \v!innermargin,\v!outermargin,\v!inneredge,\v!outeredge,% + \v!leftmargin,\v!leftedge,\v!rightmargin,\v!rightedge} {\global\parfloattrue} {\global\parfloatfalse}% - \ifbinnenkolommen + \ifinsidecolumns \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\sidefloatmethod\getvalue{\??fl#1\c!sidemethod}% + \global\chardef\textfloatmethod\getvalue{\??fl#1\c!textmethod}% \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,% + [\getvalue{\??fl#1\c!sidealign}] + [\v!height=>\global\chardef\sidefloatalign\plusone,% + \v!line=>\global\chardef\sidefloatalign\plustwo,% (***) + \v!depth=>\global\chardef\sidefloatalign\plusthree,% \v!grid=>\global\chardef\sidefloatalign4,% - \v!halveregel=>\global\chardef\sidefloatalign5]% + \v!halfline=>\global\chardef\sidefloatalign5]% % todo (test first): \doifinset\v!lokaal{#2}{\chardef\sidefloatalign\zerocount}% \ifcase\sidefloatalign\relax % todo: optie v!lokaal => \else - \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!height {#2}{\global\chardef\sidefloatalign\plusone}% + \doifinset\v!line {#2}{\global\chardef\sidefloatalign\plustwo}% + \doifinset\v!depth {#2}{\global\chardef\sidefloatalign\plusthree}% \doifinset\v!grid {#2}{\global\chardef\sidefloatalign4}% - \doifinset\v!halveregel{#2}{\global\chardef\sidefloatalign5}% meant for 'none' + \doifinset\v!halfline{#2}{\global\chardef\sidefloatalign5}% meant for 'none' \fi - \doifinset\v!hoog{#2}{\global\sidefloattopskip \zeropoint}% - \doifinset\v!laag{#2}{\global\sidefloatbottomskip\zeropoint}% - \doifinset\v!passend{#2} + \doifinset\v!high{#2}{\global\sidefloattopskip \zeropoint}% + \doifinset\v!low{#2}{\global\sidefloatbottomskip\zeropoint}% + \doifinset\v!fit{#2} {\global\sidefloattopskip \zeropoint \global\sidefloatbottomskip\zeropoint \global\floatsideskip \zeropoint}% @@ -304,17 +304,17 @@ 180=>\globallet\floatrotation\commalistelement,% 270=>\globallet\floatrotation\commalistelement]% \fi - \doifinsetelse\v!geennummer{#2} + \doifinsetelse\v!nonumber{#2} {\global\nofloatnumbertrue} - {\doifelsevalue{\??kj#1\c!nummer}\v!ja + {\doifelsevalue{\??kj#1\c!number}\v!yes {\global\nofloatnumberfalse} {\global\nofloatnumbertrue}}% \ConvertToConstant\doifelse{#4}{} {\global\emptyfloatcaptiontrue} {\global\emptyfloatcaptionfalse}% - \doifinsetelse\v!geen{#2} + \doifinsetelse\v!none{#2} {\global\nofloatcaptiontrue} - {\ConvertToConstant\doifelse{#4}\v!geen + {\ConvertToConstant\doifelse{#4}\v!none {\global\nofloatcaptiontrue} {\global\nofloatcaptionfalse}}% \ifemptyfloatcaption \ifnofloatnumber @@ -324,17 +324,17 @@ % documenteren in details \def\presetmorefloatvariables#1% - {\doifelse\@@bklokaal\v!ja % fout keyword + {\doifelse\@@bklocal\v!yes % fout keyword \globalcenterfloatboxtrue \globalcenterfloatboxfalse \ifglobalcenterfloatbox \localcenterfloatboxtrue \else - \doifinsetelse\v!lokaal{#1} + \doifinsetelse\v!local{#1} \localcenterfloatboxtrue \localcenterfloatboxfalse \fi - \doifnotcommon{\v!altijd,\v!hier,\v!forceer}{#1} % ! ! ! ! ! ! + \doifnotcommon{\v!always,\v!here,\v!force}{#1} % ! ! ! ! ! ! {\globalcenterfloatboxfalse \localcenterfloatboxfalse}} @@ -420,9 +420,9 @@ \def\movedownsidefloat##1% {\processaction [##1]% - [ \v!regel=>\docommando+,% - +\v!regel=>\docommando+,% - -\v!regel=>\docommando-]}% + [ \v!line=>\docommando+,% + +\v!line=>\docommando+,% + -\v!line=>\docommando-]}% \def\docommando##1% {\ifdone\else\global\sidefloatdownshift\zeropoint\donetrue\fi \global\advance\sidefloatdownshift##1\lineheight}% @@ -434,7 +434,7 @@ \def\xdocompletefloat#1#2#3#4#5#6% {\ifextrafloatactions - \doifinsetelse\v!tekst{#4} + \doifinsetelse\v!text{#4} {% fuzzy, text overloads left, since then it's a directive \docompletefloat{#1}{#2}{#3}{#4}{#5}{#6}\nextbox} {\let\@@extrafloat\empty @@ -442,17 +442,17 @@ % already be set at this point \processallactionsinset [#4] % ininner/inouter : for old times sake - [ \v!binnen=>\xxdocompletefloat\v!links \v!rechts, - \v!buiten=>\xxdocompletefloat\v!rechts \v!links, - \v!binnenmarge=>\xxdocompletefloat\v!linkermarge \v!rechtermarge, - \v!buitenmarge=>\xxdocompletefloat\v!rechtermarge\v!linkermarge, - \v!binnenrand=>\xxdocompletefloat\v!linkerrand \v!rechterrand, - \v!buitenrand=>\xxdocompletefloat\v!rechterrand \v!linkerrand, - \v!rugwit=>\xxdocompletefloat\v!rugwit \v!snijwit, - \v!snijwit=>\xxdocompletefloat\v!snijwit \v!rugwit, - \v!links=>\xxdocompletefloat\v!links \v!links, - \v!rechts=>\xxdocompletefloat\v!rechts \v!rechts, - \v!regel=>, % only -n*line is handled (see ***) + [ \v!inner=>\xxdocompletefloat\v!left \v!right, + \v!outer=>\xxdocompletefloat\v!right \v!left, + \v!innermargin=>\xxdocompletefloat\v!leftmargin \v!rightmargin, + \v!outermargin=>\xxdocompletefloat\v!rightmargin\v!leftmargin, + \v!inneredge=>\xxdocompletefloat\v!leftedge \v!rightedge, + \v!outeredge=>\xxdocompletefloat\v!rightedge \v!leftedge, + \v!backspace=>\xxdocompletefloat\v!backspace \v!cutspace, + \v!cutspace=>\xxdocompletefloat\v!cutspace \v!backspace, + \v!left=>\xxdocompletefloat\v!left \v!left, + \v!right=>\xxdocompletefloat\v!right \v!right, + \v!line=>, % only -n*line is handled (see ***) \s!unknown=>{\movedownsidefloat[\commalistelement]}]% \ifx\@@extrafloat\empty \docompletefloat{#1}{#2}{#3}{#4}{#5}{#6}\nextbox @@ -473,142 +473,142 @@ #4\setbox#3\vbox {\vskip\sidefloatdownshift\nointerlineskip\box#3}% \fi - \doifvaluesomething{\??fl#1\c!minbreedte} - {\scratchdimen\getvalue{\??fl#1\c!minbreedte}\relax + \doifvaluesomething{\??fl#1\c!minwidth} + {\scratchdimen\getvalue{\??fl#1\c!minwidth}\relax \ifdim\wd#3<\scratchdimen #4\setbox#3\hbox to \scratchdimen - {\doifnotvalue{\??fl#1\c!plaats}\v!links \hss + {\doifnotvalue{\??fl#1\c!location}\v!left \hss \box#3% - \doifnotvalue{\??fl#1\c!plaats}\v!rechts\hss}% + \doifnotvalue{\??fl#1\c!location}\v!right\hss}% \fi}% % todo: rand / rug - \doifinset\v!hangend{#2} - {\doifcommonelse{\v!inlinker,\v!linkermarge}{#2} - {\letvalue{\??fl#1\c!maxbreedte}\linkermargebreedte}% - {\doifcommon{\v!inrechter,\v!rechtermarge}{#2} - {\letvalue{\??fl#1\c!maxbreedte}\rechtermargebreedte}}}% - \doifvaluesomething{\??fl#1\c!maxbreedte} - {\scratchdimen\getvalue{\??fl#1\c!maxbreedte}\relax + \doifinset\v!hanging{#2} + {\doifcommonelse{\v!inleft,\v!leftmargin}{#2} + {\letvalue{\??fl#1\c!maxwidth}\leftmarginwidth}% + {\doifcommon{\v!inright,\v!rightmargin}{#2} + {\letvalue{\??fl#1\c!maxwidth}\rightmarginwidth}}}% + \doifvaluesomething{\??fl#1\c!maxwidth} + {\scratchdimen\getvalue{\??fl#1\c!maxwidth}\relax \ifdim\wd#3>\scratchdimen - \doifcommonelse{\v!inrechter,\v!rechtermarge,\v!rechterrand - \v!inlinker,\v!linkermarge,\v!linkerrand}{#2} + \doifcommonelse{\v!inright,\v!rightmargin,\v!rightedge + \v!inleft,\v!leftmargin,\v!leftedge}{#2} {\global\sidefloatmaximum\scratchdimen} {#4\setbox#3\hbox to \scratchdimen - {\doifcommonelse{\v!rechts,\v!links}{#2} - {\doifnotinset\v!rechts{#2}\hss + {\doifcommonelse{\v!right,\v!left}{#2} + {\doifnotinset\v!right{#2}\hss \box#3% - \doifnotinset\v!links{#2}\hss}% - {\doifnotvalue{\??fl#1\c!plaats}\v!links\hss + \doifnotinset\v!left{#2}\hss}% + {\doifnotvalue{\??fl#1\c!location}\v!left\hss \box#3% - \doifnotvalue{\??fl#1\c!plaats}\v!rechts\hss}}}% + \doifnotvalue{\??fl#1\c!location}\v!right\hss}}}% \fi}% \fi} -\def\docomplexstarttekstblok[#1][#2][#3]% +\def\docomplexstarttextblock[#1][#2][#3]% {\flushnotes \flushsidefloats % hoort eigenlijk niet hier - \docomplexplaatsblok[#1][\v!tekst,#2,\v!links][#3]} + \docomplexplaatsblok[#1][\v!text,#2,\v!left][#3]} -\def\docomplexreserveerblok[#1][#2][#3][#4]#5% - {\getvalue{\e!plaats#1}[#3][#4]{#5}{\localframed[\??fl#1][#2]{#1}}} +\def\docomplexreserveblock[#1][#2][#3][#4]#5% + {\getvalue{\e!place#1}[#3][#4]{#5}{\localframed[\??fl#1][#2]{#1}}} -\def\docomplexstartreserveertekstblok[#1][#2][#3][#4]% +\def\docomplexstartreservetextblock[#1][#2][#3][#4]% {\flushsidefloats % hoort eigenlijk niet hier - \docomplexreserveerblok[#1][#2][\v!tekst,#3,\v!links][#4]} + \docomplexreserveblock[#1][#2][\v!text,#3,\v!left][#4]} -\def\definieerplaatsblok - {\dotripleempty\dodefinieerplaatsblok} +\def\definefloat + {\dotripleempty\dodefinefloat} -\def\dodefinieerplaatsblok[#1][#2][#3]% #1=naam #2=meervoud #3=parent +\def\dodefinefloat[#1][#2][#3]% #1=naam #2=meervoud #3=parent {\ifthirdargument \redodefinieerplaatsblok[#1][#2][#3]% \else\ifsecondargument - \dododefinieerplaatsblok[#1][#2]% + \dododefinefloat[#1][#2]% \else - \dododefinieerplaatsblok[#1][#1]% + \dododefinefloat[#1][#1]% \fi\fi} -\def\dododefinieerplaatsblok[#1][#2]% +\def\dododefinefloat[#1][#2]% {\presetlocalframed[\??fl#1]% - \stelplaatsblokin + \setupfloat [#1] - [\c!breedte=8\lineheight, % 15\korpsgrootte, - \c!hoogte=6\lineheight, % 10\korpsgrootte, - \c!minbreedte=, - \c!maxbreedte=, - \c!maxhoogte=, + [\c!width=8\lineheight, % 15\korpsgrootte, + \c!height=6\lineheight, % 10\korpsgrootte, + \c!minwidth=, + \c!maxwidth=, + \c!maxheight=, \c!criterium=, - \c!zijvoorwit=\@@bkzijvoorwit, - \c!zijnawit=\@@bkzijnawit, - \c!zijuitlijnen=\@@bkzijuitlijnen, % \v!regel - \c!marge=\@@bkmarge, - \c!linkermargeafstand=\@@bklinkermargeafstand, - \c!rechtermargeafstand=\@@bkrechtermargeafstand, - \c!kader=\@@bkkader, - \c!straal=\@@bkstraal, - \c!hoek=\@@bkhoek, - \c!plaats=\@@bkplaats, - \c!achtergrond=\@@bkachtergrond, - \c!achtergrondraster=\@@bkachtergrondraster, - \c!achtergrondkleur=\@@bkachtergrondkleur, - \c!achtergrondoffset=\@@bkachtergrondoffset, - \c!bovenkader=\@@bkbovenkader, - \c!onderkader=\@@bkonderkader, - \c!linkerkader=\@@bklinkerkader, - \c!rechterkader=\@@bkrechterkader, - \c!kaderoffset=\@@bkkaderoffset, - %\c!lokaal=\@@bklokaal, - \c!paginaovergangen=, - \c!tekstmethode=\@@bktekstmethode, - \c!zijmethode=\@@bkzijmethode, + \c!sidespacebefore=\@@bksidespacebefore, + \c!sidespaceafter=\@@bksidespaceafter, + \c!sidealign=\@@bksidealign, % \v!line + \c!margin=\@@bkmargin, + \c!leftmargindistance=\@@bkleftmargindistance, + \c!rightmargindistance=\@@bkrightmargindistance, + \c!frame=\@@bkframe, + \c!radius=\@@bkradius, + \c!corner=\@@bkcorner, + \c!location=\@@bklocation, + \c!background=\@@bkbackground, + \c!backgroundscreen=\@@bkbackgroundscreen, + \c!backgroundcolor=\@@bkbackgroundcolor, + \c!backgroundoffset=\@@bkbackgroundoffset, + \c!topframe=\@@bktopframe, + \c!bottomframe=\@@bkbottomframe, + \c!leftframe=\@@bkleftframe, + \c!rightframe=\@@bkrightframe, + \c!frameoffset=\@@bkframeoffset, + %\c!local=\@@bklocal, + \c!pageboundaries=, + \c!textmethod=\@@bktextmethod, + \c!sidemethod=\@@bksidemethod, \c!default=]% - \stelblokkopjein + \setupcaption [#1] - [\c!plaats=\@@kjplaats, - %\c!voor=\@@kjvoor, - \c!tussen=\@@kjtussen, - %\c!na=\@@kjna, - \c!breedte=\@@kjbreedte, - \c!minbreedte=\@@kjminbreedte, - \c!kopletter=\@@kjkopletter, - \c!kopkleur=\@@kjkopkleur, - \c!tekstletter=\@@kjtekstletter, - \c!tekstkleur=\@@kjtekstkleur, - \c!letter=\@@kjletter, - \c!kleur=\@@kjkleur, - \c!uitlijnen=\@@kjuitlijnen, - \c!nummer=\@@kjnummer, - \c!wijze=\@@kjwijze, - \c!blokwijze=\@@kjblokwijze, - \c!sectienummer=\@@kjsectienummer, - \c!afstand=\@@kjafstand, - \c!scheider=\@@kjscheider, - \c!commando=\@@kjcommando, - \c!conversie=\@@kjconversie]% - \definieernummer % \doorlabelen + [\c!location=\@@kjlocation, + %\c!before=\@@kjbefore, + \c!inbetween=\@@kjinbetween, + %\c!after=\@@kjafter, + \c!width=\@@kjwidth, + \c!minwidth=\@@kjminwidth, + \c!headstyle=\@@kjheadstyle, + \c!headcolor=\@@kjheadcolor, + \c!textstyle=\@@kjtextstyle, + \c!textcolor=\@@kjtextcolor, + \c!style=\@@kjstyle, + \c!color=\@@kjcolor, + \c!align=\@@kjalign, + \c!number=\@@kjnumber, + \c!way=\@@kjway, + \c!blockway=\@@kjblockway, + \c!sectionnumber=\@@kjsectionnumber, + \c!distance=\@@kjdistance, + \c!separator=\@@kjseparator, + \c!command=\@@kjcommand, + \c!conversion=\@@kjconversion]% + \definenumber % \definelabel [#1] - [\c!tekst=#1, - \c!plaats=\v!intekst, - \c!wijze=\getvalue{\??kj#1\c!wijze}, - \c!blokwijze=\getvalue{\??kj#1\c!blokwijze}, - \c!sectienummer=\getvalue{\??kj#1\c!sectienummer}, - \c!conversie=\getvalue{\??kj#1\c!conversie}]% + [\c!text=#1, + \c!location=\v!intext, + \c!way=\getvalue{\??kj#1\c!way}, + \c!blockway=\getvalue{\??kj#1\c!blockway}, + \c!sectionnumber=\getvalue{\??kj#1\c!sectionnumber}, + \c!conversion=\getvalue{\??kj#1\c!conversion}]% \presetlabeltext[#1=\Word{#1}~]% \dodefinefloatcommands[#1][#2]} \def\dodefinefloatcommands[#1][#2]% - {\definieerlijst[#1]% + {\definelist[#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!place\e!listof#2}{\dodoubleempty\doplacelist[#1]}% + \setvalue {\e!complete\e!listof#2}{\dotripleempty\dodocompletelist[#1][#2]}% + \setvalue {\e!place#1}{\dotripleempty\docomplexplaatsblok[#1]}% + \setvalue {\e!reserve#1}{\doquadrupleempty\docomplexreserveblock[#1]}% + \setvalue {\e!start#1\e!text}{\dotripleempty\docomplexstarttextblock[#1]}% + \setvalue {\e!stop#1\e!text}{\dostoptextfloat}% + \setvalue{\e!start\e!reserve#1\e!text}{\doquadrupleempty\docomplexstartreservetextblock[#1]}% + \setvalue {\e!stop\e!reserve#1\e!text}{\dostoptextfloat}% + \setvalue {\e!emptyone#1}{\doemptyblock{#1}}% + \setvalue {\e!emptytwo#1}{\doemptyblock{#1}}} % \setupfloat[...][leftmargindistance=1cm,default={left,none}] @@ -616,22 +616,22 @@ {\presetlocalframed[\??fl#1]% \copylocalframed[\??fl#1][\??fl#3]% \copyparameters[\??fl#1][\??fl#3] - [\c!breedte,\c!hoogte,%\c!lokaal, - \c!maxbreedte,\c!maxhoogte,\c!minbreedte, - \c!marge,\c!zijvoorwit,\c!zijnawit,\c!zijuitlijnen, - \c!linkermargeafstand,\c!rechtermargeafstand,\c!criterium, - \c!kader,\c!straal,\c!hoek,\c!plaats,\c!achtergrond,\c!kaderkleur, - \c!achtergrondraster,\c!achtergrondkleur,\c!achtergrondoffset, - \c!bovenkader,\c!onderkader,\c!linkerkader,\c!rechterkader, - \c!kaderoffset,\c!paginaovergangen,\c!default, - \c!tekstmethode,\c!zijmethode]% + [\c!width,\c!height,%\c!local, + \c!maxwidth,\c!maxheight,\c!minwidth, + \c!margin,\c!sidespacebefore,\c!sidespaceafter,\c!sidealign, + \c!leftmargindistance,\c!rightmargindistance,\c!criterium, + \c!frame,\c!radius,\c!corner,\c!location,\c!background,\c!framecolor, + \c!backgroundscreen,\c!backgroundcolor,\c!backgroundoffset, + \c!topframe,\c!bottomframe,\c!leftframe,\c!rightframe, + \c!frameoffset,\c!pageboundaries,\c!default, + \c!textmethod,\c!sidemethod]% \copyparameters[\??kj#1][\??kj#3] - [\c!plaats,\c!voor,\c!tussen,\c!na, - \c!breedte,\c!kopletter,\c!kopkleur,\c!letter,\c!kleur, - \c!tekstletter,\c!tekstkleur,\c!minbreedte, - \c!uitlijnen,\c!nummer,\c!wijze,\c!blokwijze, - \c!sectienummer,\c!scheider,\c!afstand,\c!conversie]% - \definieernummer[#1][#3]% + [\c!location,\c!before,\c!inbetween,\c!after, + \c!width,\c!headstyle,\c!headcolor,\c!style,\c!color, + \c!textstyle,\c!textcolor,\c!minwidth, + \c!align,\c!number,\c!way,\c!blockway, + \c!sectionnumber,\c!separator,\c!distance,\c!conversion]% + \definenumber[#1][#3]% \presetlabeltext[#1=\labeltext{#3}]% \dodefinefloatcommands[#1][#2]} @@ -828,13 +828,6 @@ \let\dorestorefloatstatus\relax -%\def\checkwaitingfloats#1% -% {\ifsomefloatwaiting -% \doifinsetelse{\v!altijd}{#1} -% {\showmessage{\m!floatblocks}{5}{}} -% {\doflushfloats}% -% \fi} - \ifx\doflushfloats\undefined \let\doflushfloats\relax \fi \ifx\flushfloatbox\undefined \let\flushfloatbox\relax \fi @@ -847,21 +840,21 @@ % beter de laatste skip buiten de \insert uitvoeren, % bovendien bij volle flush onder baseline. -\def\betweenfloatblanko% assumes that \@@bknawit is present +\def\betweenfloatblanko% assumes that \@@bkspaceafter is present {\bgroup - \setbox0\vbox{\strut\blanko[\@@bkvoorwit]\strut}% - \setbox2\vbox{\strut\blanko[\@@bknawit ]\strut}% + \setbox0\vbox{\strut\blank[\@@bkspacebefore]\strut}% + \setbox2\vbox{\strut\blank[\@@bkspaceafter ]\strut}% \ifdim\ht0>\ht2 - \blanko[-\@@bknawit,\@@bkvoorwit] + \blank[-\@@bkspaceafter,\@@bkspacebefore] \fi \egroup} \def\doplacefloatbox {%\forgetall % NJET! - \witruimte - \blanko[\@@bkvoorwit] + \whitespace + \blank[\@@bkspacebefore] \flushfloatbox - \blanko[\@@bknawit]} + \blank[\@@bkspaceafter]} \ifx\someherefloat\undefined \let\someherefloat\doplacefloatbox \fi \ifx\somefixdfloat\undefined \let\somefixdfloat\doplacefloatbox \fi @@ -879,10 +872,10 @@ {%\checkwaitingfloats{#1}% \global\setbox\collectedpagefloats\vbox {\unvbox\collectedpagefloats - \vbox to \teksthoogte - {\doifnotinset\v!hoog{#1}\vfill + \vbox to \textheight + {\doifnotinset\v!high{#1}\vfill \box\floatbox - \doifnotinset\v!laag{#1}\vfill}% + \doifnotinset\v!low{#1}\vfill}% \goodbreak}% \doinsertfloatinfo} @@ -893,13 +886,13 @@ \global\floatwidth\wd\floatbox \global\floatheight\ht\floatbox % forget about the depth \global\advance\floattextwidth -\floatwidth - \global\advance\floattextwidth -\@@bkmarge\relax % was \tfskipsize - \doifinsetelse\v!lang{#1} + \global\advance\floattextwidth -\@@bkmargin\relax % was \tfskipsize + \doifinsetelse\v!tall{#1} {\floattextheight\pagegoal \advance\floattextheight -\pagetotal \advance\floattextheight -\bigskipamount % lelijk - \ifdim\floattextheight>\teksthoogte - \floattextheight\teksthoogte + \ifdim\floattextheight>\textheight + \floattextheight\textheight \fi \boxmaxdepth\zeropoint \relax % toegevoegd \ifdim\floattextheight<\floatheight @@ -909,13 +902,13 @@ {\setbox\floattext\vbox}% \bgroup \forgetall \setupblank \setupwhitespace % new, also needed for footnotes - \blanko[\v!blokkeer] + \blank[\v!disable] \hsize\floattextwidth \ignorespaces} \def\dodostoptextfloat[#1]% % de tekst kan beter in een soort {\egroup % kadertekst zonder kader, is flexibeler - \doifnotinset\v!lang{#1}% en beter + \doifnotinset\v!tall{#1}% en beter {\ifdim\ht\floattext<\floatheight \floattextheight\floatheight \else @@ -923,27 +916,27 @@ \fi}% \setbox\floatbox\vbox to \floattextheight {\hsize\floatwidth - \doifinsetelse\v!beide{#1}% - {\doifinsetelse\v!laag{#1} + \doifinsetelse\v!both{#1}% + {\doifinsetelse\v!low{#1} {\vfill\box\floatbox} - {\doifinsetelse\v!midden{#1} + {\doifinsetelse\v!middle{#1} {\vfill\box\floatbox\vfill} {\box\floatbox\vfill}}} {\box\floatbox\vfill}}% \setbox\floattext\vbox to \floattextheight {\hsize\floattextwidth - \doifinsetelse\v!laag{#1} + \doifinsetelse\v!low{#1} {\vfill \box\floattext - \doifinset\c!offset{#1}{\witruimte\blanko}} - {\doifinsetelse\v!midden{#1} + \doifinset\c!offset{#1}{\whitespace\blank}} + {\doifinsetelse\v!middle{#1} {\vfill \box\floattext \vfill} - {\doifinset\v!offset{#1}{\witruimte\blanko}% + {\doifinset\v!offset{#1}{\whitespace\blank}% \box\floattext \vfill}}}% - \doifinsetelse\v!rechts{#1}% + \doifinsetelse\v!right{#1}% {\setbox\floatbox\hbox to \hsize {\box\floattext \hfill @@ -953,24 +946,24 @@ \hfill \box\floattext}}% \baselinecorrection - \witruimte - \blanko[\@@bkvoorwit]% - \doifnotinset\v!lang{#1}% + \whitespace + \blank[\@@bkspacebefore]% + \doifnotinset\v!tall{#1}% {\dp\floatbox\openstrutdepth}% dp\strutbox}% % toegevoegd \box\floatbox - \blanko[\@@bknawit]% + \blank[\@@bkspaceafter]% \endgroup % ** \doinsertfloatinfo} \def\somefacefloat[#1]% links, rechts, midden, hoog, midden, laag {%\checkwaitingfloats{#1}% - \startnaast\box\floatbox\stopnaast + \startopposite\box\floatbox\stopopposite \doinsertfloatinfo} \def\someelsefloat[#1]% - {\doifinsetelse\v!hier{#1} - {\doifinsetelse\v!altijd{#1} - {\pagina[\v!voorkeur]% + {\doifinsetelse\v!here{#1} + {\doifinsetelse\v!always{#1} + {\page[\v!preference]% \docheckiffloatfits \ifroomforfloat \placesomeherefloat[#1]% @@ -981,7 +974,7 @@ {\ifsomefloatwaiting \dosavefloat \else - \pagina[\v!voorkeur]% + \page[\v!preference]% \docheckiffloatfits \ifroomforfloat \placesomeherefloat[#1]% @@ -989,18 +982,18 @@ \dosavefloat \fi \fi}} - {\doifinsetelse\v!altijd{#1} + {\doifinsetelse\v!always{#1} {\docheckiffloatfits \ifroomforfloat - \doifinsetelse\v!boven{#1} + \doifinsetelse\v!top{#1} {\placesometopsfloat[#1]} - {\doifinsetelse\v!onder{#1} + {\doifinsetelse\v!bottom{#1} {\placesomebotsfloat[#1]} {\placesomeherefloat[#1]}}% % more compact and efficient, but quite ugly - % \doifinsetelse\v!boven{#1} + % \doifinsetelse\v!top{#1} % \placesometopsfloat - % {\doifinsetelse\v!onder{#1} + % {\doifinsetelse\v!bottom{#1} % \placesomebotsfloat % \placesomeherefloat}[#1]% \else @@ -1009,9 +1002,9 @@ \fi} {\docheckiffloatfits \ifroomforfloat - \doifinsetelse\v!boven{#1} + \doifinsetelse\v!top{#1} {\placesometopsfloat[#1]} - {\doifinsetelse\v!onder{#1} + {\doifinsetelse\v!bottom{#1} {\placesomebotsfloat[#1]} {\placesomeherefloat[#1]}}% \else @@ -1058,22 +1051,22 @@ \def\docalculatefloatskip#1#2% {\doifelsenothing{#2} {\global#1\zeropoint} - {\doifelse{#2}\v!geen + {\doifelse{#2}\v!none {\global#1\zeropoint} - {\setbox0\vbox{\witruimte\@EA\blanko\@EA[#2]}% + {\setbox0\vbox{\whitespace\@EA\blank\@EA[#2]}% \global#1\ht0}}} \def\calculatefloatskips#1% - {{\docalculatefloatskip\floattopskip \@@bkvoorwit - \docalculatefloatskip\floatbottomskip \@@bknawit - \docalculatefloatskip\sidefloattopskip {\getvalue{\??fl#1\c!zijvoorwit}}% \@@bkzijvoorwit - \docalculatefloatskip\sidefloatbottomskip{\getvalue{\??fl#1\c!zijnawit}}% \@@bkzijnawit + {{\docalculatefloatskip\floattopskip \@@bkspacebefore + \docalculatefloatskip\floatbottomskip \@@bkspaceafter + \docalculatefloatskip\sidefloattopskip {\getvalue{\??fl#1\c!sidespacebefore}}% \@@bksidespacebefore + \docalculatefloatskip\sidefloatbottomskip{\getvalue{\??fl#1\c!sidespaceafter}}% \@@bksidespaceafter \gdef\sidefloattopoffset{\openstrutdepth}% was \def - \global\floatsideskip\getvalue{\??fl#1\c!marge}% - \global\sidefloatleftshift \getvalue{\??fl#1\c!linkermargeafstand}% - \global\sidefloatrightshift\getvalue{\??fl#1\c!rechtermargeafstand}% - \global\noftopfloats \@@bknboven\relax - \global\nofbotfloats \@@bknonder\relax}} + \global\floatsideskip\getvalue{\??fl#1\c!margin}% + \global\sidefloatleftshift \getvalue{\??fl#1\c!leftmargindistance}% + \global\sidefloatrightshift\getvalue{\??fl#1\c!rightmargindistance}% + \global\noftopfloats \@@bkntop\relax + \global\nofbotfloats \@@bknbottom\relax}} \newif\ifinsidefloat @@ -1084,11 +1077,11 @@ % % \def\dosetfloatcaption#1#2#3% name will change % {\def\dofloattekst% -% {{\doattributes{\??kj#1}\c!letter\c!kleur{#3}}}% -% \doifelsevalue{\??kj#1\c!nummer}{\v!ja} +% {{\doattributes{\??kj#1}\c!sttle\c!color{#3}}}% +% \doifelsevalue{\??kj#1\c!number}\v!yes % {\def\dofloatnummer% % {{\xdef\floatcaptionnumber{#1}% -% \hbox{\doattributes{\??kj#1}\c!kopletter\c!kopkleur +% \hbox{\doattributes{\??kj#1}\c!headstyle\c!headcolor % {\strut#2\floatcaptionsuffix}}}% % \ConvertToConstant\doifnot{#3}{} % {\tfskip\emergencystretch=.5em}}} @@ -1119,7 +1112,7 @@ \letgvalue{@fl@r@#1}\relax \letgvalue{@fl@t@#1}\relax \else - \verhoognummer[#1]% + \incrementnumber[#1]% \maakhetnummer[#1]% % \globallet\flhetnummer\hetnummer % beware, not unique should be done on a per class base \letgvalue{@fl@n@#1}\hetnummer @@ -1127,8 +1120,8 @@ \setgvalue{@fl@r@#1}% {\dofloatreference \redofloatorder{#1}% - % \doschrijfnaarlijst{#1}{\flhetnummer}{#3}{#1}% - \doschrijfnaarlijst{#1}{\getvalue{@fl@n@#1}}{#3}{#1}% + % \dowritetolist{#1}{\flhetnummer}{#3}{#1}% + \dowritetolist{#1}{\getvalue{@fl@n@#1}}{#3}{#1}% \doglobal\convertargument#3\to\flasciititle % \asciititle is global % \doifsomething{#2}{\rawreference\s!flt{#2}{{\flhetnummer}{\flasciititle}}}% \doifsomething{#2}{\rawreference\s!flt{#2}{{\getvalue{@fl@n@#1}}{\flasciititle}}}% @@ -1136,11 +1129,11 @@ \setgvalue{@fl@t@#1}% % {\preparethenumber{\??kj#1}\flhetnummer\preparednumber {\preparethenumber{\??kj#1}{\getvalue{@fl@n@#1}}\preparednumber - \doattributes{\??kj#1}\c!letter\c!kleur - {\doattributes{\??kj#1}\c!kopletter\c!kopkleur + \doattributes{\??kj#1}\c!style\c!color + {\doattributes{\??kj#1}\c!headstyle\c!headcolor {\labeltexts{#1}{\preparednumber}}% - \doattributes{\??kj#1}\c!tekstletter\c!tekstkleur - {\dotfskip{\getvalue{\??kj#1\c!afstand}}#3}}}% + \doattributes{\??kj#1}\c!textstyle\c!textcolor + {\dotfskip{\getvalue{\??kj#1\c!distance}}#3}}}% \fi} \def\placefloatcaptiontext [#1]{\getvalue{@fl@t@#1}} @@ -1155,9 +1148,9 @@ \def\borderedfloatbox#1% {\localframed [\??fl#1] - [\c!breedte=\@@bkbreedte, - \c!hoogte=\@@bkhoogte, - \c!plaats=\v!normaal, + [\c!width=\@@bkwidth, + \c!height=\@@bkheight, + \c!location=\v!normal, \c!offset=\@@bkoffset]% {\box\floatbox}} @@ -1167,11 +1160,12 @@ \def\putcompletecaption#1#2#3#4% {\noindent + \xdef\lastcaptiontag{\strut#2\floatcaptionsuffix}% \xdef\floatcaptionnumber{#1}% - \dostartattributes{\??kj#1}\c!letter\c!kleur\empty + \dostartattributes{\??kj#1}\c!style\c!color\empty \ifnofloatnumber \else - \hbox{\doattributes{\??kj#1}\c!kopletter\c!kopkleur{\strut#2\floatcaptionsuffix}}% + \hbox{\doattributes{\??kj#1}\c!headstyle\c!headcolor{\strut#2\floatcaptionsuffix}}% \ifnofloatcaption \else \ifemptyfloatcaption \else \ifcase#4\relax \scratchskip\@@kjkjafstand\relax @@ -1182,7 +1176,7 @@ \fi \fi \fi \ifnofloatcaption \else - \doattributes{\??kj#1}\c!tekstletter\c!tekstkleur + \doattributes{\??kj#1}\c!textstyle\c!textcolor {\begstrut#3\endstrut\endgraf}% \fi \dostopattributes} @@ -1192,9 +1186,9 @@ \newbox\tempfloatbox \newbox\tempcaptionbox -%\stelblokkopjesin[\c!breedte=5cm] -%\stelblokkopjesin[\c!uitlijnen=\v!links] -%\stelblokkopjesin[\c!uitlijnen=\v!rechts] +%\stelblokkopjesin[\c!width=5cm] +%\stelblokkopjesin[\c!align=\v!left] +%\stelblokkopjesin[\c!align=\v!right] \def\docheckcaptioncontent#1#2#3#4% {\ifnofloatcaption \else @@ -1219,11 +1213,11 @@ \fi \forgetall \postponefootnotes - \mindermeldingen + \dontcomplain \setbox\tempfloatbox\vbox{\borderedfloatbox{#4}}% \def\locatefloat {\chardef\alignstrutmode\zerocount - \alignedline\@@flflplaats\v!midden}% + \alignedline\@@flflplaats\v!middle}% \docheckcaptioncontent{#1}{#2}{#3}{#4}% \ifnofloatcaption \dopreparenocaption{#1}{#2}{#3}{#4}% @@ -1231,13 +1225,13 @@ \doglobal\addlocalbackgroundtobox\floatbox \else % todo: installable maken, variant/method=auto vs macro - \doifinsetelse\@@kjkjplaats{\v!hoog,\v!midden,\v!laag} + \doifinsetelse\@@kjkjplaats{\v!high,\v!middle,\v!low} {\dopreparesidecaption{#1}{#2}{#3}{#4}} - {\doifelse\@@kjkjminbreedte\v!passend + {\doifelse\@@kjkjminbreedte\v!fit {\doifelse\@@kjkjbreedte\v!max {\dopreparestackcaptionmax{#1}{#2}{#3}{#4}} {\ifdim\wd\tempcaptionbox>\wd\tempfloatbox % wider caption - \doifelse\@@kjkjbreedte\v!passend + \doifelse\@@kjkjbreedte\v!fit {\dopreparestackcaptionaut{#1}{#2}{#3}{#4}} {\dopreparestackcaptionwid{#1}{#2}{#3}{#4}}% \else @@ -1252,7 +1246,7 @@ \fi \ifnum\floatrotation>0 \global\setbox\floatbox\vbox - {\rotate[\c!rotatie=\floatrotation]{\box\floatbox}}% + {\rotate[\c!rotation=\floatrotation]{\box\floatbox}}% \edef\width{\the\wd\tempfloatbox}% \else \postcenterfloatbox\width @@ -1268,7 +1262,7 @@ \def\dopreparenocaption#1#2#3#4% {\global\setbox\floatbox\vbox % pas op als wd groter dan hsize - {\ifbinnenkolommen\ifdim\wd\tempfloatbox>\hsize + {\ifinsidecolumns\ifdim\wd\tempfloatbox>\hsize \let\locatefloat\relax \fi\fi \locatefloat{\copy\tempfloatbox}}} @@ -1300,7 +1294,7 @@ % \def\dopreparestackcaptionaut#1#2#3#4% % {\doifsomething\@@kjkjuitlijnen -% {\ExpandBothAfter\doifnotinset\v!midden\@@kjkjuitlijnen +% {\ExpandBothAfter\doifnotinset\v!middle\@@kjkjuitlijnen % {\let\captionovershoot\!!zeropoint}}% % \ifdim\wd\tempfloatbox>\hsize % % float is wider than \hsize @@ -1345,11 +1339,12 @@ % \putcompletecaption{#4}{#2}{#3}{0}}% % \else % % just over a line, don't use an overshoot -% \doifinsetelse\@@kjkjuitlijnen{\v!links,\v!rechts} +% % \doifinsetelse\@@kjkjuitlijnen{\v!left,\v!right} +% \expanded{\doifcommonelse{\@@kjkjuitlijnen}}{\v!left,\v!right,\v!flushleft,\v!flushright} % {\dosetraggedvbox\@@kjkjuitlijnen % \setbox\tempcaptionbox\raggedbox % {\hsize\scratchdimen -% \raggedcenter +% % strange : \raggedcenter % \putcompletecaption{#4}{#2}{#3}{0}}} % {% nicer % \setbox\tempcaptionbox\cbox @@ -1360,38 +1355,39 @@ \def\dopreparestackcaptionaut#1#2#3#4% {\doifsomething\@@kjkjuitlijnen - {\ExpandBothAfter\doifnotinset\v!midden\@@kjkjuitlijnen + {\ExpandBothAfter\doifnotinset\v!middle\@@kjkjuitlijnen {\let\captionovershoot\!!zeropoint}}% - \ifdim\wd\tempfloatbox>\hsize + \edef\captionhsize{\the\wd\tempfloatbox}% + \ifdim\captionhsize>\hsize % float is wider than \hsize \dosetraggedvbox\@@kjkjuitlijnen \setbox\scratchbox\raggedbox % trial run - {\hsize\wd\tempfloatbox + {\hsize\captionhsize \notesenabledfalse \putcompletecaption{#4}{#2}{#3}{0}}% \ifdim\ht\scratchbox>\lineheight % more lines \dosetraggedvbox\@@kjkjuitlijnen \setbox\tempcaptionbox\raggedbox - {\hsize\wd\tempfloatbox + {\hsize\captionhsize \advance\hsize -\captionovershoot\relax \ifdim\hsize<\captionminwidth\relax - \hsize\wd\tempfloatbox + \hsize\captionhsize \fi \putcompletecaption{#4}{#2}{#3}{0}}% \else \setbox\tempcaptionbox\raggedbox - {\hsize\wd\tempfloatbox + {\hsize\captionhsize \putcompletecaption{#4}{#2}{#3}{0}}% \fi \else % float is smaller of equal to \hsize - \ifdim\wd\tempfloatbox<\captionminwidth\relax + \ifdim\captionhsize<\captionminwidth\relax \scratchdimen\captionminwidth % float smaller than min width - \else - \scratchdimen\wd\tempfloatbox % float width + \edef\captionhsize{\the\scratchdimen}% \fi \setbox\scratchbox\vbox % test with overshoot - {\advance\scratchdimen \captionovershoot + {\scratchdimen\captionhsize + \advance\scratchdimen \captionovershoot \advance\scratchdimen 3em % an average word length \ifdim\scratchdimen<\hsize \hsize\scratchdimen \fi \notesenabledfalse @@ -1400,20 +1396,21 @@ % at least an average word longer than a line \dosetraggedvbox\@@kjkjuitlijnen \setbox\tempcaptionbox\raggedbox - {\advance\scratchdimen \captionovershoot + {\scratchdimen\captionhsize + \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} + \expanded{\doifcommonelse{\@@kjkjuitlijnen}}{\v!left,\v!right,\v!flushleft,\v!flushright} {\dosetraggedvbox\@@kjkjuitlijnen \setbox\tempcaptionbox\raggedbox - {\hsize\scratchdimen -% strange : \raggedcenter + {\hsize\captionhsize + % strange : \raggedcenter \putcompletecaption{#4}{#2}{#3}{0}}} {% nicer \setbox\tempcaptionbox\cbox - {\hsize\scratchdimen + {\hsize\captionhsize \putcompletecaption{#4}{#2}{#3}{0}}}% \fi \fi} @@ -1421,7 +1418,7 @@ \def\dopreparesidecaption#1#2#3#4% {\dimen0\hsize \advance\dimen0 -\wd\tempfloatbox - \advance\dimen0 -\@@bkmarge\relax % was \tfskipsize\relax + \advance\dimen0 -\@@bkmargin\relax % was \tfskipsize\relax \ifdim\wd\tempcaptionbox>\dimen0 \dimen2=1.3\dimen0 \ifdim\wd\tempcaptionbox<\dimen2 @@ -1439,22 +1436,22 @@ \forgetall \processaction [\@@kjkjplaats] - [ \v!boven=>\locatefloat{\box\tempcaptionbox}% + [ \v!top=>\locatefloat{\box\tempcaptionbox}% \endgraf\nointerlineskip\@@kjkjtussen \locatefloat{\box\tempfloatbox}, - \v!onder=>\locatefloat{\box\tempfloatbox}% + \v!bottom=>\locatefloat{\box\tempfloatbox}% \endgraf\nointerlineskip\@@kjkjtussen \locatefloat{\box\tempcaptionbox}, - \v!hoog=>\locatefloat - {\doifelse\@@flflplaats\v!links + \v!high=>\locatefloat + {\doifelse\@@flflplaats\v!left {\box\tempfloatbox \dotfskip\@@kjkjafstand \vbox to\ht\tempfloatbox{\@@kjkjtussen\box\tempcaptionbox\vfill}} {\vbox to\ht\tempfloatbox{\@@kjkjtussen\box\tempcaptionbox\vfill}% \tfskip \box\tempfloatbox}}, - \v!laag=>\locatefloat - {\doifelse\@@flflplaats\v!links + \v!low=>\locatefloat + {\doifelse\@@flflplaats\v!left {\box\tempfloatbox \dotfskip\@@kjkjafstand \vbox to\ht\tempfloatbox @@ -1463,8 +1460,8 @@ {\vfill\box\tempcaptionbox\@@kjkjtussen}% \dotfskip\@@kjkjafstand \box\tempfloatbox}}, - \v!midden=>\locatefloat - {\doifelse\@@flflplaats\v!links + \v!middle=>\locatefloat + {\doifelse\@@flflplaats\v!left {\box\tempfloatbox \dotfskip\@@kjkjafstand \vbox to\ht\tempfloatbox{\vfill\box\tempcaptionbox\vfill}} @@ -1472,12 +1469,12 @@ \dotfskip\@@kjkjafstand \box\tempfloatbox}}, \s!unknown=>\locatefloat{\box\tempfloatbox}, - \v!geen=>\locatefloat{\box\tempfloatbox}]}} + \v!none=>\locatefloat{\box\tempfloatbox}]}} \newif\ifpostponecolumnfloats \postponecolumnfloatsfalse % don't change %\def\postcenterfloatbox#1% -% {\ifbinnenkolommen +% {\ifinsidecolumns % \ifpostponecolumnfloats % \scratchdimen=\zetbreedte % \else @@ -1514,7 +1511,7 @@ % \global\floatwidth\wd\floatbox} %\def\postcenterfloatbox#1% -% {\ifbinnenkolommen +% {\ifinsidecolumns % \ifpostponecolumnfloats % \scratchdimen\zetbreedte % \else @@ -1530,9 +1527,9 @@ % {\hss \box\floatbox\hss }} % wel \hss, anders mis in colset \def\postcenterfloatbox#1% - {\ifbinnenkolommen + {\ifinsidecolumns \ifpostponecolumnfloats - \scratchdimen\zetbreedte + \scratchdimen\makeupwidth \else \scratchdimen#1\relax \fi @@ -1562,7 +1559,7 @@ {\bgroup \forgetall \postponefootnotes - \mindermeldingen + \dontcomplain %\showcomposition \setbox\tempfloatbox\vbox{\borderedfloatbox{#4}}% \addlocalbackgroundtobox\tempfloatbox % no \doglobal @@ -1574,7 +1571,7 @@ {\dosetraggedvbox\@@kjkjuitlijnen \setbox\tempcaptionbox\raggedbox {\hsize\wd\tempfloatbox\putcompletecaption{#4}{#2}{#3}{0}}}% - {\doifelse\@@kjkjbreedte\v!passend + {\doifelse\@@kjkjbreedte\v!fit {\ifdim\wd\tempcaptionbox>\wd\tempfloatbox\relax \setbox\tempcaptionbox\vbox {\forgetall\hsize\wd\tempfloatbox\putcompletecaption{#4}{#2}{#3}{0}}% @@ -1590,13 +1587,13 @@ \global\setbox\floatbox\vbox {\processaction [\@@kjkjplaats] - [ \v!boven=>\box\tempcaptionbox + [ \v!top=>\box\tempcaptionbox \endgraf\nointerlineskip\@@kjkjtussen \box\tempfloatbox, - \v!onder=>\box\tempfloatbox + \v!bottom=>\box\tempfloatbox \endgraf\nointerlineskip\@@kjkjtussen \box\tempcaptionbox, - \v!geen=>\box\tempfloatbox, + \v!none=>\box\tempfloatbox, \s!unknown=>\box\tempfloatbox \endgraf\nointerlineskip\@@kjkjtussen \box\tempcaptionbox]}% @@ -1609,14 +1606,14 @@ \long\def\dosetfloatbox#1#2#3#4% todo : \global\setbox {\ifvisible \par - \edef\@@kjkjplaats {\getvalue{\??kj#4\c!plaats }}% - \def\@@kjkjtussen {\getvalue{\??kj#4\c!tussen }}% no \edef - \def\@@kjkjcommando {\getvalue{\??kj#4\c!commando }}% no \edef - \edef\@@kjkjbreedte {\getvalue{\??kj#4\c!breedte }}% - \edef\@@kjkjminbreedte{\getvalue{\??kj#4\c!minbreedte}}% in geval van automatisch - \edef\@@kjkjafstand {\getvalue{\??kj#4\c!afstand }}% - \edef\@@kjkjuitlijnen {\getvalue{\??kj#4\c!uitlijnen }}% - \edef\@@flflplaats {\getvalue{\??fl#4\c!plaats }}% + \edef\@@kjkjplaats {\getvalue{\??kj#4\c!location }}% + \def\@@kjkjtussen {\getvalue{\??kj#4\c!inbetween }}% no \edef + \def\@@kjkjcommando {\getvalue{\??kj#4\c!command }}% no \edef + \edef\@@kjkjbreedte {\getvalue{\??kj#4\c!width }}% + \edef\@@kjkjminbreedte{\getvalue{\??kj#4\c!minwidth}}% in geval van automatisch + \edef\@@kjkjafstand {\getvalue{\??kj#4\c!distance }}% + \edef\@@kjkjuitlijnen {\getvalue{\??kj#4\c!align }}% + \edef\@@flflplaats {\getvalue{\??fl#4\c!location }}% \ifparfloat \@EA\dosetparfloat % {#1}{#2}{#3}{#4}% \else @@ -1629,7 +1626,7 @@ \global\advance\floatheight \dp\floatbox \global\floatwidth\wd\floatbox \global\advance\totalnoffloats \plusone - \doifnotinset\v!marge{#1} % gaat namelijk nog fout + \doifnotinset\v!margin{#1} % gaat namelijk nog fout {\setbox\floatbox\vbox {\parindent\zeropoint \ifvoorlopig @@ -1639,9 +1636,9 @@ \wd\floatbox\floatwidth \dimen0=\floatheight \advance\dimen0 \lineheight - \ifdim\dimen0<\teksthoogte + \ifdim\dimen0<\textheight \else - \global\floatheight\teksthoogte + \global\floatheight\textheight \global\advance\floatheight -\lineheight \ht\floatbox\floatheight \dp\floatbox\zeropoint @@ -1657,7 +1654,7 @@ {\dogetfloatbox{#1}\empty} {\ifdim\wd\floatbox>\getvalue{\??fl#4\c!criterium}\relax \postcenterfloatbox{\wd\floatbox}% else we get left aligned - \dogetfloatbox{#1}\v!hier % see details/pascal + \dogetfloatbox{#1}\v!here % see details/pascal \else \dogetfloatbox{#1}\empty \fi}} @@ -1666,53 +1663,6 @@ \let\naturalfloatwidth \!!zeropoint \let\naturalfloatdepth \!!zeropoint -% \long\def\docompletefloat#1#2#3#4#5#6#7% #7 = box number -% {\flushsidefloats -% \presetfloatvariables{#1}{#4}{#2}{#6}% -% \bgroup -% %\setlocalfloatdimensions{#1}{#4}{#7}\relax -% \global\setbox\floatbox\vbox{\box#7}% -% \xdef\naturalfloatheight{\the\ht\floatbox}% -% \xdef\naturalfloatwidth {\the\wd\floatbox}% -% \xdef\naturalfloatdepth {\the\dp\floatbox}% -% \dimen0 \ht\floatbox -% \advance\dimen0 \dp\floatbox -% \ifdim\dimen0=\zeropoint -% \showmessage\m!floatblocks{11}\empty -% \global\setbox\floatbox\vbox{\getvalue{\e!lege#3}}% -% \fi -% \ifnofloatcaption -% \global\setbox\floatbox\vbox -% {\unvbox\floatbox -% \vss % gets rid of the depth (unless tabulate) -% \rawpagereference\s!flt{#2}}% -% \egroup -% \dofloat{#4}{}{#6}{#1}% -% \else -% \doglobal\convertargument#6\to\asciititle % \asciititle is global -% % \doifelsevalue{\??kj#1\c!nummer}\v!ja -% \ifnofloatnumber -% \global\setbox\floatbox\vbox -% {\unvbox\floatbox % no \vss, keep the depth -% \rawreference\s!flt{#2}{{}{\asciititle}}}% -% \egroup -% \dofloat{#4}{}{#6}{#1}% -% \else -% \verhoognummer[#1]% -% \maakhetnummer[#1]% -% \global\setbox\floatbox\vbox -% {\unvbox\floatbox % no \vss, keep the depth -% \dofloatreference -% \redofloatorder{#1}% -% \rawreference\s!flt{#2}{{\hetnummer}{\asciititle}}% -% \doschrijfnaarlijst{#3}{\hetnummer}{#6}{#3}}% -% \egroup -% \preparethenumber{\??kj#1}\hetnummer\preparednumber -% \dofloat{#4}{\labeltexts{#5}{\preparednumber}}{#6}{#1}% -% \fi -% \fi -% \global\insidefloatfalse} - \def\setnaturalfloatdimensions#1% {\xdef\naturalfloatheight{\the\ht#1}% \xdef\naturalfloatwidth {\the\wd#1}% @@ -1724,13 +1674,13 @@ \bgroup \setnaturalfloatdimensions#7% \global\setbox\floatbox\vbox - {\executeifdefined{\??fl#1\c!commando}\firstofoneargument{\box#7}}% + {\executeifdefined{\??fl#1\c!command}\firstofoneargument{\box#7}}% \setnaturalfloatdimensions\floatbox \dimen0 \ht\floatbox \advance\dimen0 \dp\floatbox \ifdim\dimen0=\zeropoint \showmessage\m!floatblocks{11}\empty - \global\setbox\floatbox\vbox{\getvalue{\e!lege#3}}% + \global\setbox\floatbox\vbox{\doemptyblock{#3}}% \fi \ifnofloatcaption \global\setbox\floatbox\vbox @@ -1748,14 +1698,14 @@ \egroup \dofloat{#4}{}{#6}{#1}% \else - \verhoognummer[#1]% + \incrementnumber[#1]% \maakhetnummer[#1]% \global\setbox\floatbox\vbox {\unvbox\floatbox % no \vss, keep the depth \dofloatreference \redofloatorder{#1}% \rawreference\s!flt{#2}{{\hetnummer}{\asciititle}}% - \doschrijfnaarlijst{#3}{\hetnummer}{#6}{#3}}% + \dowritetolist{#3}{\hetnummer}{#6}{#3}}% \egroup \preparethenumber{\??kj#1}\hetnummer\preparednumber \dofloat{#4}{\labeltexts{#5}{\preparednumber}}{#6}{#1}% @@ -1765,33 +1715,33 @@ \newif\ifmargeblokken -\def\dostelmargeblokkenin[#1]% +\def\dosetupmarginblocks[#1]% {\getparameters[\??mb][#1]% - \doifelse\@@mbstatus\v!start + \doifelse\@@mbstate\v!start {\showmessage\m!layouts4\empty \margeblokkentrue \let\somenextfloat\dosomenextfloat - \let\startmargeblok\dostartmargeblok - \let\stopmargeblok\dostopmargeblok}% + \let\startmarginblock\dostartmarginblock + \let\stopmarginblock\dostopmarginblock}% {\showmessage\m!layouts5\empty \margeblokkenfalse \def\somenextfloat[##1]% - {\someelsefloat[##1,\v!hier]}% - \let\startmargeblok\dontstartmargeblok - \let\stopmargeblok\dontstopmargeblok}} + {\someelsefloat[##1,\v!here]}% + \let\startmarginblock\dontstartmargeblok + \let\stopmarginblock\dontstopmargeblok}} -\def\stelmargeblokkenin - {\dosingleargument\dostelmargeblokkenin} +\def\setupmarginblocks + {\dosingleargument\dosetupmarginblocks} \newbox\marginbox \def\dosomenextfloat[#1]% {\global\setbox\marginbox\vbox - {\hsize\@@mbbreedte + {\hsize\@@mbwidth \unvcopy\marginbox - \ifvoid\marginbox\else\expandafter\@@mbtussen\fi + \ifvoid\marginbox\else\expandafter\@@mbinbetween\fi \box\floatbox\filbreak}% - \ifdim\ht\marginbox>\teksthoogte + \ifdim\ht\marginbox>\textheight \dosavefloatinfo \else \doinsertfloatinfo @@ -1806,17 +1756,17 @@ \endofshapebox \reshapebox {\box\shapebox}% - \setbox\preparedmarginbox\vbox to \teksthoogte - {\@@mbboven + \setbox\preparedmarginbox\vbox to \textheight + {\@@mbtop \flushshapebox - \@@mbonder}% + \@@mbbottom}% \fi} \def\plaatsrechtermargeblok - {\hskip\rechtermargebreedte} + {\hskip\rightmarginwidth} \def\plaatslinkermargeblok - {\hskip\linkermargebreedte} + {\hskip\leftmarginwidth} \def\checkmargeblokken {\ifvoid\marginbox\else\docheckmargeblokken\fi} @@ -1826,73 +1776,73 @@ {\forgetall \splittopskip\topskip \ifvoid\marginbox\else - \ifdim\ht\marginbox>\teksthoogte - \vsplit\marginbox to \teksthoogte + \ifdim\ht\marginbox>\textheight + \vsplit\marginbox to \textheight \else \unvbox\marginbox \fi \fi}% \reshapemargin \setbox\preparedmarginbox\vbox - {\@@mbvoor\box\preparedmarginbox\@@mbna}% + {\@@mbbefore\box\preparedmarginbox\@@mbafter}% \def\rightmarginbox {\def\plaatsrechtermargeblok - {\setbox\preparedmarginbox\hbox to \rechtermargebreedte - {\@@mblinks\box\preparedmarginbox\@@mbrechts}% + {\setbox\preparedmarginbox\hbox to \rightmarginwidth + {\@@mbleft\box\preparedmarginbox\@@mbright}% \vsmashbox\preparedmarginbox \box\preparedmarginbox}}% \def\leftmarginbox {\def\plaatslinkermargeblok - {\setbox\preparedmarginbox\hbox to \linkermargebreedte - {\@@mbrechts\box\preparedmarginbox\@@mblinks}% + {\setbox\preparedmarginbox\hbox to \leftmarginwidth + {\@@mbright\box\preparedmarginbox\@@mbleft}% \vsmashbox\preparedmarginbox \box\preparedmarginbox}}% \processaction % traag - [\@@mbplaats] - [ \v!inmarge=>\doifbothsidesoverruled + [\@@mblocation] + [ \v!inmargin=>\doifbothsidesoverruled \rightmarginbox \orsideone \rightmarginbox \orsidetwo \leftmarginbox \od, - \v!midden=>\doifbothsidesoverruled + \v!middle=>\doifbothsidesoverruled \rightmarginbox \orsideone \leftmarginbox \orsidetwo \rightmarginbox \od, - \v!links=>\leftmarginbox, - \v!rechts=>\rightmarginbox, + \v!left=>\leftmarginbox, + \v!right=>\rightmarginbox, \s!unknown=>\setbox\preparedmarginbox\hbox{}]} -\def\dostartmargeblok % 2 maal \vbox ivm \unvbox elders +\def\dostartmarginblock % 2 maal \vbox ivm \unvbox elders {\global\setbox\marginbox\vtop\bgroup\vbox\bgroup - \hsize\@@mbbreedte + \hsize\@@mbwidth \ifvoid\marginbox\else \unvbox\marginbox - \@@mbtussen + \@@mbinbetween \fi - \setupalign[\@@mbuitlijnen]% - \dostartattributes\??mb\c!letter\c!kleur{}% + \setupalign[\@@mbalign]% + \dostartattributes\??mb\c!style\c!color{}% \begstrut\ignorespaces} -\def\dostopmargeblok +\def\dostopmarginblock {\unskip\endstrut \dostopattributes \egroup \egroup} \def\dontstartmargeblok - {\@@mbvoor + {\@@mbbefore \bgroup - \dostartattributes\??mb\c!letter\c!kleur\empty} + \dostartattributes\??mb\c!style\c!color\empty} \def\dontstopmargeblok {\dostopattributes \egroup - \@@mbna} + \@@mbafter} \newcounter\nofpostponedblocks @@ -1903,35 +1853,6 @@ \appendtoks\the\everytopofpage \to\everystarttext \appendtoks\global\everytopofpage{}\to\everystoptext -% \def\douitstellen -% {\the\everytopofpage -% \ifvoid\collectedpagefloats\else -% % message -% \unvbox\collectedpagefloats -% \fi -% \ifinuitstellen\else\ifcase\nofpostponedblocks\else % The \nof-test is -% \bgroup % we need the color/font switch, else problems inside split verbatim -% \setnormalcatcodes % uitstellen in verbatim -% \edef\savedtopofpagecolor{\topofpagecolor}% -% \doifsomething\savedtopofpagecolor\restorecolormode % \stopcolormode -% \restoreglobalbodyfont -% \global\pagetotal\zeropoint % recently added and -% \global\inuitstellentrue % definitely needed else -% \dorecurse\nofpostponedblocks % we can loose or disorder -% {\haalbuffer[buf-\recurselevel]} % floats; anyhow, this -% \doflushfloats % new but potential dangerous % mechanism is still -% \doglobal\newcounter\nofpostponedblocks % suboptimal and needs a -% \global\inuitstellenfalse % proper analysis -% \doifsomething\savedtopofpagecolor\startcolormode\savedtopofpagecolor -% \egroup -% \fi\fi} -% -% \setvalue{\e!start\v!uitstellen}% -% {\doglobal\increment\nofpostponedblocks -% \showmessage\m!layouts3\nofpostponedblocks -% \dostartbuffer[buf-\nofpostponedblocks] -% [\e!start\v!uitstellen][\e!stop\v!uitstellen]} - % \startpostponing [pagenumber] [+pageoffset] % % \startpostponing[2] @@ -1951,8 +1872,12 @@ \newtoks \postponedpageblocks \newcounter\nofpostponedpageblocks -\def\douitstellen - {\the\everytopofpage +% \ifinuitstellen: handhaven, want gebruikt in stijlen ! ! ! ! ! + +\def\dopostponeblock + {\bgroup % new may 2004 + \setsystemmode\v!postponing % new may 2004 + \the\everytopofpage \ifvoid\collectedpagefloats\else % message \unvbox\collectedpagefloats @@ -1972,20 +1897,21 @@ \global\inuitstellentrue % definitely needed else \the\postponedpageblocks % we can loose or disorder \dorecurse\nofpostponedblocks % floats; anyhow, this - {\haalbuffer[pbuf-\recurselevel]} % mechanism is still + {\getbuffer[pbuf-\recurselevel]} % mechanism is still \doflushfloats % new but potential dangerous % suboptimal and needs a \doglobal\newcounter\nofpostponedblocks % proper analysis \global\inuitstellenfalse \doifsomething\savedtopofpagecolor\startcolormode\savedtopofpagecolor \egroup - \fi} + \fi + \egroup} % new may 2004 \def\getpostponedblock#1#2% - {\doif{#1}\realfolio{\haalbuffer[rbuf-#2]}} % no \ifnum, avoid \fi + {\doif{#1}\realfolio{\getbuffer[rbuf-#2]}} % no \ifnum, avoid \fi % beware, \dosingleempty conflicts with buffers (feeds back the \par) -\setvalue{\e!start\v!uitstellen}% +\setvalue{\e!start\v!postponing}% {\bgroup \obeylines \doifnextcharelse[% @@ -2000,52 +1926,52 @@ \egroup \showmessage\m!layouts3\nofpostponedpageblocks \dostartbuffer[rbuf-\nofpostponedpageblocks]% - [\e!start\v!uitstellen][\e!stop\v!uitstellen]} + [\e!start\v!postponing][\e!stop\v!postponing]} \def\dodostartpostponing {\doglobal\increment\nofpostponedblocks \showmessage\m!layouts3\nofpostponedblocks \dostartbuffer[pbuf-\nofpostponedblocks]% - [\e!start\v!uitstellen][\e!stop\v!uitstellen]} + [\e!start\v!postponing][\e!stop\v!postponing]} -\definieernummer +\definenumber [\??si] - [\c!wijze=\v!per\v!tekst, - \c!conversie=\@@siconversie] + [\c!way=\v!by\v!text, + \c!conversion=\@@siconversion] -\def\stelplaatsbloksplitsenin +\def\setupfloatsplitting {\dodoubleargument\getparameters[\??si]} % ook (continued) -\def\dosplitsplaatsblok[#1]#2% nog dubbele refs - {\ifbinnenkolommen % tzt ook nog figuren splitten +\def\dosplitfloat[#1]#2% nog dubbele refs + {\ifinsidecolumns % tzt ook nog figuren splitten % not yet supported \else \bgroup \insidefloattrue \getparameters[\??si][#1]% \resetnumber[\??si]% - \def\floatcaptionsuffix{\nummer[\??si]}% - \TABLEcaptionheight=\@@siregels\lineheight % brrr + \def\floatcaptionsuffix{\convertednumber[\??si]}% + \TABLEcaptionheight=\@@silines\lineheight % brrr \simplifypagebreak % \page becomes \goodbreak \dowithnextbox {\forgetall - \mindermeldingen + \dontcomplain \doloop {\setbox2\vsplit\nextbox to \lineheight \setbox2\vbox{\unvbox2} \ifdim\ht2>\lineheight - \verhoognummer[\??si]% - \ifnum\ruwenummer[\??si]=1 \ifdim\nextboxht=\zeropoint + \incrementnumber[\??si]% + \ifnum\rawnumber[\??si]=1 \ifdim\nextboxht=\zeropoint \let\floatcaptionsuffix\empty \fi \fi \bgroup #2{\unvbox2} \egroup \ifdim\nextboxht>\zeropoint - \pagina - \verlaagnummer[\floatcaptionnumber]% + \page + \decrementnumber[\floatcaptionnumber]% \fi \fi \ifdim\nextboxht>\zeropoint\else @@ -2055,108 +1981,108 @@ \vbox \fi} -\def\splitsplaatsblok% - {\dosingleempty\dosplitsplaatsblok} +\def\splitfloat% + {\dosingleempty\dosplitfloat} \def\dooutput{\sidefloatoutput} % redefinition of \dooutput -\stelmargeblokkenin - [\c!status=\v!start, - \c!plaats=\v!inmarge, - \c!breedte=\rechtermargebreedte, - \c!letter=, - \c!kleur=, - \c!uitlijnen=, - \c!links=, - \c!rechts=, - \c!boven=, - \c!tussen=\blanko, - \c!onder=\vfill, - \c!voor=, - \c!na=] - -\definieerplaatsblok - [\v!figuur] - [\v!figuren] - -\definieerplaatsblok - [\v!tabel] - [\v!tabellen] - -\stelplaatsblokin - [\v!tabel] - [\c!kader=\v!uit] - -\definieerplaatsblok +\setupmarginblocks + [\c!state=\v!start, + \c!location=\v!inmargin, + \c!width=\rightmarginwidth, + \c!style=, + \c!color=, + \c!align=, + \c!left=, + \c!right=, + \c!top=, + \c!inbetween=\blank, + \c!bottom=\vfill, + \c!before=, + \c!after=] + +\definefloat + [\v!figure] + [\v!figures] + +\definefloat + [\v!table] + [\v!tables] + +\setupfloat + [\v!table] + [\c!frame=\v!off] + +\definefloat [\v!intermezzo] - [\v!intermezzos] - -\definieerplaatsblok - [\v!grafiek] - [\v!grafieken] - -\stelblokkopjesin - [\c!plaats=\v!onder, - \c!voor=\blanko, - \c!tussen={\blanko[\v!middel]}, - \c!na=\blanko, - \c!breedte=\v!passend, - \c!minbreedte=\v!passend, % id est: the width of the floatbox in some cases - \c!kopletter=\v!vet, - \c!kopkleur=, - \c!letter=\v!normaal, - \c!kleur=, - \c!tekstletter=, - \c!tekstkleur=, - \c!uitlijnen=, - \c!nummer=\v!ja, - \c!wijze=\@@nrwijze, - \c!blokwijze=\@@nrblokwijze, - \c!sectienummer=\@@nrsectienummer, - \c!scheider=\@@koscheider, - \c!afstand=1em, - \c!commando=, - \c!conversie=\v!cijfers] - -\stelplaatsblokkenin - [\c!plaats=\v!midden, - \c!breedte=\v!passend, - \c!hoogte=\v!passend, + [\v!intermezzi] + +\definefloat + [\v!graphic] + [\v!graphics] + +\setupcaptions + [\c!location=\v!bottom, + \c!before=\blank, + \c!inbetween={\blank[\v!medium]}, + \c!after=\blank, + \c!width=\v!fit, + \c!minwidth=\v!fit, % id est: the width of the floatbox in some cases + \c!headstyle=\v!bold, + \c!headcolor=, + \c!style=\v!normal, + \c!color=, + \c!textstyle=, + \c!textcolor=, + \c!align=, + \c!number=\v!yes, + \c!way=\@@nrway, + \c!blockway=\@@nrblockway, + \c!sectionnumber=\@@nrsectionnumber, + \c!separator=\@@koseparator, + \c!distance=1em, + \c!command=, + \c!conversion=\v!numbers] + +\setupfloats + [\c!location=\v!middle, + \c!width=\v!fit, + \c!height=\v!fit, \c!offset=\v!overlay, - \c!kader=\v!uit, - \c!straal=.5\korpsgrootte, - \c!hoek=\v!recht, - \c!achtergrond=, - \c!achtergrondraster=\@@rsraster, - \c!achtergrondkleur=, - \c!achtergrondoffset=\!!zeropoint, - \c!bovenkader=, - \c!onderkader=, - \c!linkerkader=, - \c!rechterkader=, - \c!kaderoffset=\!!zeropoint, - \c!voor=, - \c!na=, - \c!voorwit=\v!groot, - \c!nawit=\v!groot, - \c!zijvoorwit=\@@bkvoorwit, - \c!zijnawit=\@@bknawit, - \c!zijuitlijnen=\v!normaal, - \c!tekstmethode=\ifgridsnapping2\else0\fi, % 0=raw 1=safe (.99pg) 2=tight (-1pt) - \c!zijmethode=\ifgridsnapping2\else1\fi, % 0=raw 1=safe (.99pg) 2=tight (-1pt) - \c!springvolgendein=\v!nee, - \c!marge=1em, - \c!linkermargeafstand=\zeropoint, - \c!rechtermargeafstand=\@@bklinkermargeafstand, - \c!nboven=2, - \c!nonder=0, - \c!nregels=4, - \c!lokaal=, - \c!default=\v!figuur] - -\stelplaatsbloksplitsenin - [\c!conversie=\v!letter, % \v!romeins - \c!regels=3] + \c!frame=\v!off, + \c!radius=.5\korpsgrootte, + \c!corner=\v!rectangular, + \c!background=, + \c!backgroundscreen=\@@rsscreen, + \c!backgroundcolor=, + \c!backgroundoffset=\!!zeropoint, + \c!topframe=, + \c!bottomframe=, + \c!leftframe=, + \c!rightframe=, + \c!frameoffset=\!!zeropoint, + \c!before=, + \c!after=, + \c!spacebefore=\v!big, + \c!spaceafter=\v!big, + \c!sidespacebefore=\@@bkspacebefore, + \c!sidespaceafter=\@@bkspaceafter, + \c!sidealign=\v!normal, + \c!textmethod=\ifgridsnapping2\else0\fi, % 0=raw 1=safe (.99pg) 2=tight (-1pt) + \c!sidemethod=\ifgridsnapping2\else1\fi, % 0=raw 1=safe (.99pg) 2=tight (-1pt) + \c!indentnext=\v!no, + \c!margin=1em, + \c!leftmargindistance=\zeropoint, + \c!rightmargindistance=\@@bkleftmargindistance, + \c!ntop=2, + \c!nbottom=0, + \c!nlines=4, + \c!local=, + \c!default=\v!figure] + +\setupfloatsplitting + [\c!conversion=\v!character, % \v!romannumerals + \c!lines=3] % float strategy, replaces some of the above macros @@ -2180,33 +2106,33 @@ \let\floatrow\empty \edef\floatmethod{#2}}% \doifundefined{\string\floatmethod\floatmethod} - {\let\floatmethod\v!hier}% + {\let\floatmethod\v!here}% \getvalue{\string\floatmethod\floatmethod}[#1]% \fi} \def\installfloathandler#1#2% #1=keyword #2=handler {\setvalue{\string\floatmethod#1}{#2}} -\installfloathandler \v!hier \someherefloat -\installfloathandler \v!forceer \somefixdfloat -\installfloathandler \v!links \someleftsidefloat -\installfloathandler \v!rechts \somerightsidefloat -\installfloathandler \v!tekst \sometextfloat -\installfloathandler \v!boven \sometopfloat -\installfloathandler \v!onder \somebottomfloat -\installfloathandler \v!marge \somemarginfloat -\installfloathandler \v!naast \somefacefloat -\installfloathandler \v!pagina \somepagefloat -\installfloathandler \v!inmarge \someinmarginfloat -\installfloathandler \v!inlinker \someinleftmarginfloat -\installfloathandler \v!inrechter \someinrightmarginfloat -\installfloathandler \v!linkermarge \someinleftmarginfloat -\installfloathandler \v!rechtermarge \someinrightmarginfloat -\installfloathandler \v!linkerrand \someinleftedgefloat -\installfloathandler \v!rechterrand \someinrightedgefloat - -\installfloathandler \v!rugwit \somebackspacefloat -\installfloathandler \v!snijwit \somecutspacefloat +\installfloathandler \v!here \someherefloat +\installfloathandler \v!force \somefixdfloat +\installfloathandler \v!left \someleftsidefloat +\installfloathandler \v!right \somerightsidefloat +\installfloathandler \v!text \sometextfloat +\installfloathandler \v!top \sometopfloat +\installfloathandler \v!bottom \somebottomfloat +\installfloathandler \v!margin \somemarginfloat +\installfloathandler \v!opposite \somefacefloat +\installfloathandler \v!page \somepagefloat +\installfloathandler \v!inmargin \someinmarginfloat +\installfloathandler \v!inleft \someinleftmarginfloat +\installfloathandler \v!inright \someinrightmarginfloat +\installfloathandler \v!leftmargin \someinleftmarginfloat +\installfloathandler \v!rightmargin \someinrightmarginfloat +\installfloathandler \v!leftedge \someinleftedgefloat +\installfloathandler \v!rightedge \someinrightedgefloat + +\installfloathandler \v!backspace \somebackspacefloat +\installfloathandler \v!cutspace \somecutspacefloat \installfloathandler {tblr} \someslotfloat \installfloathandler {lrtb} \someslotfloat @@ -2238,7 +2164,7 @@ \def\someinleftedgefloat [#1]{\somesidefloat[#1]} \def\someinrightedgefloat [#1]{\somesidefloat[#1]} \def\someinmarginfloat [#1]{\somesidefloat[#1]} -\def\someherefloat [#1]{\someelsefloat[\v!hier,#1]} +\def\someherefloat [#1]{\someelsefloat[\v!here,#1]} \def\somebackspacefloat [#1]{\somesidefloat[#1]} \def\somecutspacefloat [#1]{\somesidefloat[#1]} diff --git a/tex/context/base/page-flw.tex b/tex/context/base/page-flw.tex index 8d69b5d53..1a8ffd3c4 100644 --- a/tex/context/base/page-flw.tex +++ b/tex/context/base/page-flw.tex @@ -27,7 +27,7 @@ {\setbox\textflowcollector{#1}\emptybox} {\@EA\newbox\csname\??tx:c:#1\endcsname}% \getparameters[\??tx:p:#1] - [\c!breedte=\hsize,\c!letter=,#2]% + [\c!width=\hsize,\c!style=,#2]% \fi} \def\textflowparameter#1#2{\csname\??tx:p:#1#2\endcsname} @@ -52,9 +52,9 @@ {\global\setbox\textflowcollector{#1}\vbox \bgroup \unvbox\textflowcollector{#1}% - \hsize\textflowparameter{#1}\c!breedte - \doifsomething{\textflowparameter{#1}\c!letter}% - {\doconvertfont{\textflowparameter{#1}\c!letter}}% + \hsize\textflowparameter{#1}\c!width + \doifsomething{\textflowparameter{#1}\c!style}% + {\doconvertfont{\textflowparameter{#1}\c!style}}% \def\stoptextflow{\endgraf\egroup}} {\let\stoptextflow\relax}} @@ -104,4 +104,4 @@ % \else {\bf MATERIE}\quad \input materie \par % \fi} % -% \stoptekst \ No newline at end of file +% \stoptekst diff --git a/tex/context/base/page-imp.tex b/tex/context/base/page-imp.tex index ac2d2b0c5..d4d201f06 100644 --- a/tex/context/base/page-imp.tex +++ b/tex/context/base/page-imp.tex @@ -31,19 +31,19 @@ \def\clippedprintbox#1#2% can be made more efficient, see other clipper {\ifclipprintbox \!!widthc\pagebackgroundoffset - \!!widtha \papierbreedte + \!!widtha \paperwidth \advance\!!widtha \!!widthc - \!!heighta\papierhoogte + \!!heighta\paperheight \advance\!!heighta\!!widthc \advance\!!heighta\!!widthc - \setbox#2\vbox to \papierhoogte{\vfill\box#2}% - \ht#2\papierhoogte - \wd#2\papierbreedte + \setbox#2\vbox to \paperheight{\vfill\box#2}% + \ht#2\paperheight + \wd#2\paperwidth \setbox#2\vbox {\framed - [\c!offset=\!!widthc,\c!strut=\v!nee,\c!kader=\v!uit] + [\c!offset=\!!widthc,\c!strut=\v!no,\c!frame=\v!off] {\box#2}}% - \setbox#2\hbox to \papierbreedte + \setbox#2\hbox to \paperwidth {\ifcase#1\relax \!!widthb\zeropoint \hskip-\!!widthc @@ -52,11 +52,11 @@ \fi \lower\!!widthc\hbox {\clip - [\c!breedte=\!!widtha,\c!hoogte=\!!heighta, + [\c!width=\!!widtha,\c!height=\!!heighta, \c!hoffset=\!!widthb,\c!voffset=\zeropoint] {\box#2}}}% - \wd#2\papierbreedte - \ht#2\papierhoogte + \wd#2\paperwidth + \ht#2\paperheight \fi \box#2\relax} @@ -97,8 +97,8 @@ {\clip [\c!hoffset=\!!widthc, \c!voffset=-\!!widthb, - \c!breedte=\!!widtha, - \c!hoogte=\!!heighta]% + \c!width=\!!widtha, + \c!height=\!!heighta]% {\box#1}}}% \wd#1\!!widtha \ht#1\!!heighta @@ -138,6 +138,7 @@ \def\actualshipout#1% {\global\advance\shippedoutpages\plusone + % this is not resource safe! \ifx\pagestoshipout\empty \ifcase\whichpagetoshipout\relax \donetrue @@ -156,22 +157,22 @@ \shipout\vbox {\forgetall \offinterlineskip - \mindermeldingen + \dontcomplain \scratchdimen-1in \vskip\scratchdimen \hskip\scratchdimen \hbox % \setbox0=\box.. is nicer {\setbox0\hbox{#1}% just in case there are objects there \setbox\scratchbox\hbox - {\the\everyshipout\relax - % so, these two come *after* the main one + {% before the main one ! \ifcase\realfolio \or \the\everyfirstshipout \global\everyfirstshipout\emptytoks \fi - % one page document can do both + % the main one + \the\everyshipout\relax + % always last (and after the main one) \ifnum\realpageno=\lastpage\relax - \flushtextdata \the\everylastshipout \global\everylastshipout\emptytoks \fi}% @@ -223,14 +224,14 @@ \def\calculatepaperoffsets#1% {\scratchdimen\getvalue{\??pp#1\c!offset}% \divide\scratchdimen \arrangedpageX - \global\advance\papierbreedte -2\scratchdimen + \global\advance\paperwidth -2\scratchdimen \scratchdimen\getvalue{\??pp#1\c!offset}% \divide\scratchdimen \arrangedpageY - \global\advance\papierhoogte -2\scratchdimen} + \global\advance\paperheight -2\scratchdimen} \def\setuparranging[#1]% {\ifarrangingdisabled \else - \doifelse{#1}\v!blokkeer + \doifelse{#1}\v!disable {\global\arrangingdisabledtrue} {\global\arrangingdisabledfalse}% \global\arrangingpagestrue @@ -241,10 +242,10 @@ \gdef\arrangedrotationE{180}% \processallactionsinset [#1] - [ \v!gespiegeld=>\global\mirrorarrangedtrue, - \v!dubbelzijdig=>\global\doublearrangedtrue, - \v!negatief=>\global\negatearrangedtrue, - \v!geroteerd=>\gdef\arrangedrotationO {90}\gdef\arrangedrotationE{270}, + [ \v!mirrored=>\global\mirrorarrangedtrue, + \v!doublesided=>\global\doublearrangedtrue, + \v!negative=>\global\negatearrangedtrue, + \v!rotated=>\gdef\arrangedrotationO {90}\gdef\arrangedrotationE{270}, 90=>\gdef\arrangedrotationO {90}\gdef\arrangedrotationE{270}, 180=>\gdef\arrangedrotationO{180}\gdef\arrangedrotationE{0}, 270=>\gdef\arrangedrotationO{270}\gdef\arrangedrotationE{90}, @@ -254,7 +255,7 @@ \ifx\handlearrangedpage\undefined \global\arrangingpagesfalse \fi - \doifcommonelse{#1}{90,270,\v!geroteerd} + \doifcommonelse{#1}{90,270,\v!rotated} {\swapmacros\horizontalcutmarks\verticalcutmarks}{}% ugly solution \setuppapersize \ifarrangingpages @@ -278,7 +279,7 @@ \global\let \poparrangedpages #7% \global\let \handlearrangedpage#8} -\installpagearrangement {\v!normaal} +\installpagearrangement {\v!normal} {\global\arrangingpagesfalse} \installpagearrangement 2*16 @@ -352,13 +353,13 @@ \fi} \def\handlearrangedpageXandY#1#2#3#4#5% - {\global\setbox#5\hbox to \arrangedpageX\papierbreedte - {\setbox\scratchbox\vbox to \arrangedpageY\papierhoogte + {\global\setbox#5\hbox to \arrangedpageX\paperwidth + {\setbox\scratchbox\vbox to \arrangedpageY\paperheight {\forgetall \offinterlineskip - \mindermeldingen - \vskip#4\papierhoogte - \hskip#3\papierbreedte + \dontcomplain + \vskip#4\paperheight + \hskip#3\paperwidth \dorotatebox{\ifcase#2 0\else180\fi}\hbox{\box#1}% \vfill}% \wd\scratchbox\zeropoint @@ -402,9 +403,9 @@ \def\poparrangedpagesAB {\ifnum\arrangedpageN>\zerocount - \mindermeldingen - \papierbreedte\arrangedpageX\papierbreedte - \papierhoogte\arrangedpageY\papierhoogte + \dontcomplain + \paperwidth\arrangedpageX\paperwidth + \paperheight\arrangedpageY\paperheight \outputarrangedbox\arrangedpageA \outputarrangedbox\arrangedpageB \doglobal\newcounter\arrangedpageN @@ -511,18 +512,18 @@ \fi} \def\handlearrangedpageSIDE - {\global\wd\arrangedpageA\papierbreedte - \global\wd\arrangedpageB\papierbreedte + {\global\wd\arrangedpageA\paperwidth + \global\wd\arrangedpageB\paperwidth \global\setbox\arrangedpageA\hbox {\box\arrangedpageA\box\arrangedpageB}% - \global\ht\arrangedpageA\papierhoogte + \global\ht\arrangedpageA\paperheight \global\setbox\arrangedpageB\box\scratchbox} % ? \def\handlearrangedpageTOP - {\global\ht\arrangedpageA\papierhoogte - \global\ht\arrangedpageB\papierhoogte + {\global\ht\arrangedpageA\paperheight + \global\ht\arrangedpageB\paperheight \global\setbox\arrangedpageA\vbox - {\forgetall\offinterlineskip\vskip\papierhoogte + {\forgetall\offinterlineskip\vskip\paperheight \box\arrangedpageA\box\arrangedpageB}% \global\setbox\arrangedpageB\box\scratchbox} % ? @@ -537,20 +538,6 @@ \setbox\scratchbox\vsplit\arrangedpageB to \scratchdimen \fi} -% \def\handlearrangedpageTWOUP -% {\splitoffarrangedpagesTWO -% \ifswaparranged -% \global\setbox\arrangedpageA\hbox -% {\box\arrangedpageA\box\arrangedpageB}% -% \swaparrangedfalse -% \else -% \global\setbox\arrangedpageA\hbox -% {\box\arrangedpageB\box\arrangedpageA}% -% \swaparrangedtrue -% \fi -% \global\ht\arrangedpageA\papierhoogte -% \global\setbox\arrangedpageB\box\scratchbox} - \def\handlearrangedpageTWOUP {\splitoffarrangedpagesTWO \ifswaparranged @@ -564,21 +551,21 @@ \clippedprintbox1\arrangedpageA}% \swaparrangedtrue \fi - \global\ht\arrangedpageA\papierhoogte + \global\ht\arrangedpageA\paperheight \global\setbox\arrangedpageB\box\scratchbox} \def\handlearrangedpageTWODOWN {\splitoffarrangedpagesTWO - \global\ht\arrangedpageA\papierhoogte - \global\ht\arrangedpageB\papierhoogte + \global\ht\arrangedpageA\paperheight + \global\ht\arrangedpageB\paperheight \ifswaparranged \global\setbox\arrangedpageA\vbox - {\forgetall\offinterlineskip\vskip\papierhoogte + {\forgetall\offinterlineskip\vskip\paperheight \box\arrangedpageA\box\arrangedpageB}% \swaparrangedfalse \else \global\setbox\arrangedpageA\vbox - {\forgetall\offinterlineskip\vskip\papierhoogte + {\forgetall\offinterlineskip\vskip\paperheight \box\arrangedpageB\box\arrangedpageA}% \swaparrangedtrue \fi @@ -586,15 +573,15 @@ \def\poparrangedpagesTWO {\ifnum\arrangedpageN>\zerocount - \mindermeldingen + \dontcomplain \swaparrangedfalse \doloop {\handlearrangedpage \bgroup - \papierbreedte\arrangedpageX\papierbreedte - \papierhoogte\arrangedpageY\papierhoogte - \ht\arrangedpageA\papierhoogte - \wd\arrangedpageA\papierbreedte + \paperwidth\arrangedpageX\paperwidth + \paperheight\arrangedpageY\paperheight + \ht\arrangedpageA\paperheight + \wd\arrangedpageA\paperwidth \outputarrangedbox\arrangedpageA \egroup \ifdim\ht\arrangedpageB=\zeropoint @@ -641,9 +628,9 @@ \def\poparrangedpagesAtoH {\ifnum\arrangedpageN>\zerocount - \mindermeldingen - \papierbreedte\arrangedpageX\papierbreedte - \papierhoogte\arrangedpageY\papierhoogte + \dontcomplain + \paperwidth\arrangedpageX\paperwidth + \paperheight\arrangedpageY\paperheight \outputarrangedbox\arrangedpageA \outputarrangedbox\arrangedpageB \outputarrangedbox\arrangedpageC @@ -659,9 +646,9 @@ \def\poparrangedpagesAtoD {\ifnum\arrangedpageN>\zerocount - \mindermeldingen - \papierbreedte\arrangedpageX\papierbreedte - \papierhoogte\arrangedpageY\papierhoogte + \dontcomplain + \paperwidth\arrangedpageX\paperwidth + \paperheight\arrangedpageY\paperheight \outputarrangedbox\arrangedpageA \outputarrangedbox\arrangedpageB \outputarrangedbox\arrangedpageC @@ -736,14 +723,14 @@ \reportarrangedpage\arrangedpageN \doglobal\increment\arrangedpageM \global\setbox\arrangedpageB\hbox - \ifdim\@@ppbreedte>\zeropoint to \@@ppbreedte \fi + \ifdim\@@ppwidth>\zeropoint to \@@ppwidth \fi {\ifvoid\arrangedpageB\else \unhbox\arrangedpageB\hss\hskip\@@ppdx\hss \fi \box#1}% \ifnum\arrangedpageM<\arrangedpageX\else \global\setbox\arrangedpageA\vbox - \ifdim\@@pphoogte>\zeropoint to \@@pphoogte \fi + \ifdim\@@ppheight>\zeropoint to \@@ppheight \fi {\offinterlineskip \ifvoid\arrangedpageA\else \unvbox\arrangedpageA\vss\vskip\@@ppdy\vss @@ -757,9 +744,9 @@ \def\poparrangedpagesXY {\ifnum\arrangedpageN>\zerocount - \mindermeldingen - \papierbreedte\arrangedpageX\papierbreedte - \papierhoogte \arrangedpageY\papierhoogte + \dontcomplain + \paperwidth\arrangedpageX\paperwidth + \paperheight \arrangedpageY\paperheight \outputarrangedbox\arrangedpageA \doglobal\newcounter\arrangedpageN \doglobal\newcounter\arrangedpageM @@ -773,12 +760,12 @@ \definepapersize [XY] - [\c!breedte=\dimexpr(\dimexpr(\@@ppbreedte-\numexpr(\@@ppnx-1)\dimexpr(\@@ppdx))/\@@ppnx), - \c!hoogte =\dimexpr(\dimexpr(\@@pphoogte -\numexpr(\@@ppny-1)\dimexpr(\@@ppdy))/\@@ppny)] + [\c!width=\dimexpr(\dimexpr(\@@ppwidth-\numexpr(\@@ppnx-1)\dimexpr(\@@ppdx))/\@@ppnx), + \c!height =\dimexpr(\dimexpr(\@@ppheight -\numexpr(\@@ppny-1)\dimexpr(\@@ppdy))/\@@ppny)] \setuppaper - [\c!breedte=\dimexpr(\printpapierbreedte-2\dimexpr(\@@pprugwit)), - \c!hoogte =\dimexpr(\printpapierhoogte -2\dimexpr(\@@ppkopwit))] + [\c!width=\dimexpr(\printpaperwidth-2\dimexpr(\@@ppbackspace)), + \c!height =\dimexpr(\printpaperheight -2\dimexpr(\@@pptopspace))] \endETEX @@ -847,26 +834,26 @@ \let\vpageshifts\empty \let\shiftprintpagebox\gobbleoneargument \let\shiftpaperpagebox\gobbleoneargument - \doifdefined{\??pt\v!horizontaal:#2} - {\edef\hpageshifts{\getvalue{\??pt\v!horizontaal:#2}}}% - \doifdefined{\??pt\v!vertikaal :#3} - {\edef\vpageshifts{\getvalue{\??pt\v!vertikaal :#3}}}% - \doif{#1}\v!pagina{\let\shiftprintpagebox\shiftpagebox}% - \doif{#1}\v!papier{\let\shiftpaperpagebox\shiftpagebox}% + \doifdefined{\??pt\v!horizontal:#2} + {\edef\hpageshifts{\getvalue{\??pt\v!horizontal:#2}}}% + \doifdefined{\??pt\v!vertical :#3} + {\edef\vpageshifts{\getvalue{\??pt\v!vertical :#3}}}% + \doif{#1}\v!page{\let\shiftprintpagebox\shiftpagebox}% + \doif{#1}\v!paper{\let\shiftpaperpagebox\shiftpagebox}% \else\ifsecondargument - \doifinsetelse{#1}{\v!pagina,\v!papier} + \doifinsetelse{#1}{\v!page,\v!paper} {\setuppageshift[#1][#2][#2]} - {\setuppageshift[\v!pagina][#1][#2]}% + {\setuppageshift[\v!page][#1][#2]}% \else\iffirstargument - \setuppageshift[\v!pagina][#1][#1]% + \setuppageshift[\v!page][#1][#1]% \fi\fi} %D One can (mis)use this mechanism, in close cooperation %D with \PDFTEX\ to arrange pages of already produced files. %D -%D \starttypen +%D \starttyping %D \insertpages[file.pdf][1,3][n=30,width=18cm] -%D \stoptypen +%D \stoptyping %D %D The pages are inserted in the text area, and even pages %D are repositioned according to the width. In this example @@ -874,16 +861,16 @@ %D %D Selecting pages can be accomplished by: %D -%D \starttypen +%D \starttyping %D \filterpages[file.pdf][1,3,5][n=30,width=18cm] -%D \stoptypen +%D \stoptyping %D %D One may pass \type {odd} or \type {even} instead of a %D comma separated list. A third alternative is: %D -%D \starttypen +%D \starttyping %D \copypages[file.pdf][n=30,scale=950] -%D \stoptypen +%D \stoptyping %D %D This macros inserts the page, according to the settings %D provided. @@ -898,13 +885,13 @@ \def\dodoinsertpages[#1][#2][#3]% {\bgroup - \mindermeldingen + \dontcomplain \getfiguredimensions[#1]% - \getparameters[\??ip][\c!n=\noffigurepages,\c!breedte=\!!zeropoint,#3]% - \doifinset0{#2}{\null\pagina}% + \getparameters[\??ip][\c!n=\noffigurepages,\c!width=\!!zeropoint,#3]% + \doifinset0{#2}{\null\page}% \dorecurse\@@ipn {\dofilterpage{#1}\recurselevel - \doifinset\recurselevel{#2}{\null\pagina}}% + \doifinset\recurselevel{#2}{\null\page}}% \egroup} \def\filterpages @@ -912,13 +899,13 @@ \def\dofilterpages[#1][#2][#3]% % \noffigurepages not yet supported {\bgroup - \mindermeldingen + \dontcomplain \getfiguredimensions[#1]% - \getparameters[\??ip][\c!n=\noffigurepages,\c!breedte=\!!zeropoint,#3]% + \getparameters[\??ip][\c!n=\noffigurepages,\c!width=\!!zeropoint,#3]% \doifelse{#2}\v!even {\dorecurse\@@ipn {\ifodd\recurselevel\relax\else\dofilterpage{#1}\recurselevel\fi}} - {\doifelse{#2}\v!oneven + {\doifelse{#2}\v!odd {\dorecurse\@@ipn {\ifodd\recurselevel\relax\dofilterpage{#1}\recurselevel\fi}} {\def\dodocommando##1% @@ -935,16 +922,16 @@ \dostepwiserecurse\fromrange\torange1{#2{\recurselevel}}} \def\dofilterpage#1#2% - {\hbox to \tekstbreedte - {\ifdubbelzijdig\ifdim\@@ipbreedte>\zeropoint\relax\ifodd\realpageno\else + {\hbox to \textwidth + {\ifdubbelzijdig\ifdim\@@ipwidth>\zeropoint\relax\ifodd\realpageno\else \hfill - \def\dowithfigure{\hskip-\@@ipbreedte}% + \def\dowithfigure{\hskip-\@@ipwidth}% \fi\fi\fi \setbox0\hbox - {\externalfigure[#1][\c!pagina=#2,\c!hoogte=\teksthoogte]}% + {\externalfigure[#1][\c!page=#2,\c!height=\textheight]}% \wd0\zeropoint \box0} - \pagina} + \page} \def\copypages {\dodoubleempty\docopypages} @@ -954,24 +941,24 @@ \getfiguredimensions[#1]% \getparameters[\??ip] [\c!n=\noffigurepages, - \c!markering=\v!uit, - \c!schaal=\!!thousand, + \c!marking=\v!off, + \c!scale=\!!thousand, \c!offset=\!!zeropoint, #2]% \dorecurse\@@ipn - {\vbox to \teksthoogte - {\hsize\tekstbreedte + {\vbox to \textheight + {\hsize\textwidth \scratchdimen\@@ipoffset \centeredbox - {\doifelse\@@ipmarkering\v!aan\cuthbox\hbox + {\doifelse\@@ipmarking\v!on\cuthbox\hbox {\ifdim\scratchdimen>\zeropoint\relax \advance\vsize -2\scratchdimen \advance\hsize -2\scratchdimen - \externalfigure[#1][\c!pagina=\recurselevel,#2,\c!schaal=,\c!factor=\v!max,\c!offset=\v!overlay]% + \externalfigure[#1][\c!page=\recurselevel,#2,\c!scale=,\c!factor=\v!max,\c!offset=\v!overlay]% \else - \externalfigure[#1][\c!pagina=\recurselevel,#2,\c!offset=\v!overlay]% + \externalfigure[#1][\c!page=\recurselevel,#2,\c!offset=\v!overlay]% \fi}}} - \pagina} + \page} \egroup} %D \macros @@ -981,7 +968,7 @@ %D {\combinepages}. This macro builds a matrix of pages from a %D file, for example: %D -%D \starttypen +%D \starttyping %D \setuppapersize %D [A4][A4] % or [A4,landscape][A4,landscape] %D @@ -996,7 +983,7 @@ %D \starttext %D \combinepages[slides][nx=2,ny=3,frame=on] %D \stoptext -%D \starttypen +%D \starttyping %D %D One can influence the way the pages are combined. (This %D will be explained some time.) @@ -1006,27 +993,27 @@ \def\docombinepages[#1][#2]% a=perpag b=free {\bgroup - \mindermeldingen + \dontcomplain \getfiguredimensions[#1]% \getparameters [\??ip] - [\c!variant=\v!a, + [\c!alternative=\v!a, \c!n=\noffigurepages,\c!nx=2,\c!ny=2,\c!start=1,\c!stop=\!!maxcard, - \c!afstand=\bodyfontsize, - \c!onder=\vfill,\c!boven=\vss, - \c!links=\hss,\c!rechts=\hss, - \c!voor=\pagina,\c!na=\pagina,\c!tussen=\blanko, - \c!kader=,\c!achtergrond=,\c!achtergrondkleur=, + \c!distance=\bodyfontsize, + \c!bottom=\vfill,\c!top=\vss, + \c!left=\hss,\c!right=\hss, + \c!before=\page,\c!after=\page,\c!inbetween=\blank, + \c!frame=,\c!background=,\c!backgroundcolor=, #2]% - \@@ipvoor + \@@ipbefore %\doglobal\newcounter\combinedpagescounter \globallet\combinedpagescounter\@@ipstart - \doifelse\@@ipvariant\v!b\!!doneafalse\!!doneatrue + \doifelse\@@ipalternative\v!b\!!doneafalse\!!doneatrue \if!!donea \doloop - {\vbox to \teksthoogte - {\hsize\tekstbreedte % ? ? - \scratchdimen\@@ipafstand + {\vbox to \textheight + {\hsize\textwidth % ? ? + \scratchdimen\@@ipdistance \!!widtha\hsize \advance\!!widtha -\@@ipnx\scratchdimen \advance\!!widtha \scratchdimen @@ -1041,35 +1028,33 @@ {\vbox to \!!heighta {\hsize\!!widtha \vsize\!!heighta - \@@ipboven + \@@iptop \hbox to \hsize - {\@@iplinks -\ifnum\combinedpagescounter>\@@ipstop\relax - \globallet\@@ipn\!!zerocount -\else - \ifnum\combinedpagescounter>\@@ipn \else + {\@@ipleft + \ifnum\combinedpagescounter>\@@ipstop\relax + \globallet\@@ipn\!!zerocount + \else\ifnum\combinedpagescounter>\@@ipn \else \externalfigure[#1] - [\c!object=\v!nee, - \c!pagina=\combinedpagescounter, + [\c!object=\v!no, + \c!page=\combinedpagescounter, \c!factor=\v!max, - \c!achtergrond=\@@ipachtergrond, - \c!achtergrondkleur=\@@ipachtergrondkleur, - \c!kader=\@@ipkader]% - \fi -\fi - \@@iprechts} - \@@iponder}% + \c!background=\@@ipbackground, + \c!backgroundcolor=\@@ipbackgroundcolor, + \c!frame=\@@ipframe]% + \fi\fi + \@@ipright} + \@@ipbottom}% \doglobal\increment\combinedpagescounter \hfil}% \hfilneg} \vfil}% \vfilneg}% - \pagina + \page \ifnum\combinedpagescounter>\@@ipn \exitloop\fi} \else \doloop {\startbaselinecorrection - \scratchdimen\@@ipafstand + \scratchdimen\@@ipdistance \!!widtha\hsize \advance\!!widtha -\@@ipnx\scratchdimen \advance\!!widtha \scratchdimen @@ -1078,21 +1063,22 @@ {\dorecurse\@@ipnx {\doglobal\increment\combinedpagescounter \ifnum\combinedpagescounter>\@@ipn \else - \externalfigure[#1] - [\c!pagina=\combinedpagescounter, - \c!breedte=\!!widtha, - \c!achtergrond=\@@ipachtergrond, - \c!achtergrondkleur=\@@ipachtergrondkleur, - \c!kader=\@@ipkader]% - \fi}}% + \expanded{\externalfigure[#1] + [\c!page=\combinedpagescounter, + \c!width=\the\!!widtha,% todo \freezedimenmacro + \c!background=\@@ipbackground, + \c!backgroundcolor=\@@ipbackgroundcolor, + \c!frame=\@@ipframe]}% + \hfill + \fi}\hfillneg}% \stopbaselinecorrection \ifnum\combinedpagescounter<\@@ipn\relax - \@@iptussen + \@@ipinbetween \else \exitloop \fi} \fi - \@@ipna + \@@ipafter \egroup} %D \macros @@ -1100,81 +1086,81 @@ %D %D This command is not yet documented. Usage: %D -%D \starttypen +%D \starttyping %D \setuppagecomment[state=start,location=right] %D %D \startpagecomment %D \input knuth %D \stoppagecomment -%D \stoptypen +%D \stoptyping \def\setuppagecomment {\dosingleempty\dosetuppagecomment} \def\dosetuppagecomment[#1]% {\getparameters[\??pc][#1]% - \doifelse\@@pcstatus\v!start - {\doifinsetelse\@@pcplaats{\v!onder,\v!boven} - {\setuppapersize[\c!links=\hskip\@@pcoffset]% - \adddimenmacro\papierhoogte\@@pcoffset\@@pcoffset\@@pcafstand\@@pchoogte\to\@@pcpaperheight - \adddimenmacro\papierbreedte\@@pcoffset\@@pcoffset\to\@@pcpaperwidth + \doifelse\@@pcstate\v!start + {\doifinsetelse\@@pclocation{\v!bottom,\v!top} + {\setuppapersize[\c!left=\hskip\@@pcoffset]% + \adddimenmacro\paperheight\@@pcoffset\@@pcoffset\@@pcdistance\@@pcheight\to\@@pcpaperheight + \adddimenmacro\paperwidth\@@pcoffset\@@pcoffset\to\@@pcpaperwidth \defineoverlay[\v!pagecomment][\placepagecommentTB]} - {\setuppapersize[\c!boven=\vskip\@@pcoffset]% - \adddimenmacro\papierhoogte\@@pcoffset\@@pcoffset\to\@@pcpaperheight - \adddimenmacro\papierbreedte\@@pcoffset\@@pcoffset\@@pcafstand\@@pcbreedte\to\@@pcpaperwidth + {\setuppapersize[\c!top=\vskip\@@pcoffset]% + \adddimenmacro\paperheight\@@pcoffset\@@pcoffset\to\@@pcpaperheight + \adddimenmacro\paperwidth\@@pcoffset\@@pcoffset\@@pcdistance\@@pcwidth\to\@@pcpaperwidth \defineoverlay[\v!pagecomment][\placepagecommentLR]}% \processaction - [\@@pcplaats] - [ \v!onder=>{\setuppapersize[\c!onder =\vss,\c!boven =\vskip\@@pcoffset]}, - \v!boven=>{\setuppapersize[\c!boven =\vss,\c!onder =\vskip\@@pcoffset]}, - \v!links=>{\setuppapersize[\c!links =\hss,\c!rechts=\hskip\@@pcoffset]}, - \v!rechts=>{\setuppapersize[\c!rechts=\hss,\c!links =\hskip\@@pcoffset]}]% + [\@@pclocation] + [ \v!bottom=>{\setuppapersize[\c!bottom =\vss,\c!top =\vskip\@@pcoffset]}, + \v!top=>{\setuppapersize[\c!top =\vss,\c!bottom =\vskip\@@pcoffset]}, + \v!left=>{\setuppapersize[\c!left =\hss,\c!right=\hskip\@@pcoffset]}, + \v!right=>{\setuppapersize[\c!right=\hss,\c!left =\hskip\@@pcoffset]}]% \definepapersize [\v!pagecomment] - [\c!hoogte=\@@pcpaperheight, - \c!breedte=\@@pcpaperwidth]% + [\c!height=\@@pcpaperheight, + \c!width=\@@pcpaperwidth]% \let\@@pcprintpapersize\printpapersize \setuppapersize[\papersize][\v!pagecomment]% - \setupbackgrounds[\v!papier][\c!achtergrond=\v!pagecomment]} - {\doif\@@pcstatus\v!stop % else initialization invokes backgrounds + \setupbackgrounds[\v!paper][\c!background=\v!pagecomment]} + {\doif\@@pcstate\v!stop % else initialization invokes backgrounds {% this should be tested first % \expanded{\setuppapersize[\papersize][\@@pcprintpapersize]}% - \setupbackgrounds[\v!papier][\c!achtergrond=]}}} + \setupbackgrounds[\v!paper][\c!background=]}}} \def\@@pcprintpapersize{\printpapersize} \def\placepagecommentTB - {\vbox to \printpapierhoogte + {\vbox to \printpaperheight {\forgetall - \hsize\printpapierbreedte + \hsize\printpaperwidth \vskip\@@pcoffset - \doifelse\@@pcplaats\v!onder{\vskip\papierhoogte\vskip\@@pcafstand}\vss + \doifelse\@@pclocation\v!bottom{\vskip\paperheight\vskip\@@pcdistance}\vss \hskip\@@pcoffset - \vbox to \@@pchoogte + \vbox to \@@pcheight {\forgetall - \hsize\papierbreedte + \hsize\paperwidth \ifpagecomment \getbuffer[\v!pagecomment]% \global\pagecommentfalse \fi}% \hfill - \doifelse\@@pcplaats\v!onder\vss{\vskip\papierhoogte\vskip\@@pcafstand} + \doifelse\@@pclocation\v!bottom\vss{\vskip\paperheight\vskip\@@pcdistance} \vskip\@@pcoffset}} \def\placepagecommentLR - {\hbox to \printpapierbreedte + {\hbox to \printpaperwidth {\hskip\@@pcoffset - \doifelse\@@pcplaats\v!rechts{\hskip\papierbreedte\hskip\@@pcafstand}\hss - \vbox to \printpapierhoogte + \doifelse\@@pclocation\v!right{\hskip\paperwidth\hskip\@@pcdistance}\hss + \vbox to \printpaperheight {\forgetall \vskip\@@pcoffset - \hsize\@@pcbreedte + \hsize\@@pcwidth \ifpagecomment \getbuffer[\v!pagecomment]% \global\pagecommentfalse \fi \vss}% - \doifelse\@@pcplaats\v!rechts\hss{\hskip\papierbreedte\hskip\@@pcafstand}% + \doifelse\@@pclocation\v!right\hss{\hskip\paperwidth\hskip\@@pcdistance}% \hskip\@@pcoffset}} \newif\ifpagecomment @@ -1184,12 +1170,12 @@ \dostartbuffer[\v!pagecomment][\e!start\v!pagecomment][\e!stop\v!pagecomment]} \setuppagecomment - [\c!status=, % \v!stop would invoke background calculation - \c!plaats=\v!onder, + [\c!state=, % \v!stop would invoke background calculation + \c!location=\v!bottom, \c!offset=.5cm, - \c!afstand=.5cm, - \c!hoogte=5cm, - \c!breedte=10cm] + \c!distance=.5cm, + \c!height=5cm, + \c!width=10cm] % This macro cuts a page into n parts that can be pasted % together. @@ -1216,17 +1202,17 @@ [\c!n=1, \c!offset=\!!zeropoint, \c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint, - \c!breedte=\figurewidth,\c!hoogte=\figureheight,#2] + \c!width=\figurewidth,\c!height=\figureheight,#2] \ifnum\@@ipn>\zerocount \definepapersize - [\s!dummy][\c!hoogte=\@@iphoogte,\c!breedte=\@@ipbreedte] + [\s!dummy][\c!height=\@@ipheight,\c!width=\@@ipwidth] \setuppapersize [\s!dummy][\s!dummy] \setuplayout - [\c!rugwit=\!!zeropoint,\c!kopwit=\!!zeropoint, - \c!hoogte=\v!midden,\c!breedte=\v!midden, - \c!tekstafstand=\!!zeropoint, - \c!hoofd=\!!zeropoint,\c!voet=\!!zeropoint] + [\c!backspace=\!!zeropoint,\c!topspace=\!!zeropoint, + \c!height=\v!middle,\c!width=\v!middle, + \c!textdistance=\!!zeropoint, + \c!header=\!!zeropoint,\c!footer=\!!zeropoint] \fi \dorecurse\noffigurepages {\global\let\slicedpagenumber\recurselevel @@ -1237,10 +1223,10 @@ {\let\yslice\recurselevel \clip [\c!nx=\@@ipn,\c!ny=\@@ipn,\c!x=\xslice,\c!y=\yslice] - {\schaal - [\c!schaal=\@@ipn000] - {\externalfigure[#1][\c!pagina=\slicedpagenumber]}} - \pagina}} + {\scale + [\c!scale=\@@ipn000] + {\externalfigure[#1][\c!page=\slicedpagenumber]}} + \page}} \else \ifodd\slicedpagenumber\relax \getparameters[\??ip][#2] @@ -1250,12 +1236,12 @@ \hskip\@@ipoffset \clip [\c!hoffset=\@@iphoffset,\c!voffset=\@@ipvoffset, - \c!hoogte=\@@iphoogte,\c!breedte=\@@ipbreedte] - {\externalfigure[#1][\c!pagina=\slicedpagenumber]} - \pagina + \c!height=\@@ipheight,\c!width=\@@ipwidth] + {\externalfigure[#1][\c!page=\slicedpagenumber]} + \page \fi} \egroup} % \starttext \slicepages[slice1.pdf][n=3] \stoptext -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-ini.tex b/tex/context/base/page-ini.tex index 07ca4dea2..530102cca 100644 --- a/tex/context/base/page-ini.tex +++ b/tex/context/base/page-ini.tex @@ -664,19 +664,6 @@ \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? @@ -934,25 +921,39 @@ \ifnum\outputpenalty>-\@MM \else % better use a proper otr signal \dosupereject \fi - % but does not hurt either - \inpagebodytrue % needed for enabling \blanko ! + % but does not hurt either (we're still in the otr!) + \inpagebodytrue % needed for enabling \blank ! \flushsavedfloats % was \dosetbothinserts; only otr one ! \setvsize % this is needed for interacting components, like floats and multicolumns \adaptfuzzypagegoal} % watch this hack! -\def\dofinaloutput#1#2% +% \def\dofinaloutput#1#2% +% {\beforefinaloutput +% \the\everybeforeshipout +% \ifspecialbasedsettings +% \myshipout{\hbox{\hbox to \zeropoint{\the\pageboundsettings}% +% \hbox{\dopagebody#1#2\setpagecounters}}}% +% \else +% \the\pageboundsettings +% \myshipout{\hbox{\dopagebody#1#2\setpagecounters}}% +% \fi +% \the\everyaftershipout +% \afterfinaloutput +% \popproperties} % ... and here ... + +\def\dofinaloutput#1#2% \vbox: prevents spurious spaces in every..pagebody {\beforefinaloutput \the\everybeforeshipout \ifspecialbasedsettings \myshipout{\hbox{\hbox to \zeropoint{\the\pageboundsettings}% - \hbox{\dopagebody#1#2\setpagecounters}}}% + \hbox{\vbox{\dopagebody#1#2\setpagecounters}}}}% \else \the\pageboundsettings - \myshipout{\hbox{\dopagebody#1#2\setpagecounters}}% + \myshipout{\hbox{\vbox{\dopagebody#1#2\setpagecounters}}}% \fi \the\everyaftershipout \afterfinaloutput - \popcolor} % ... and here ... + \popproperties} % ... and here ... \def\donofinaloutput#1#2% {\beforefinaloutput @@ -966,7 +967,7 @@ \gotonextrealpage \the\everyaftershipout \afterfinaloutput - \popcolor} % ... and here + \popproperties} % ... and here \def\finaloutput#1#2% {\checkpageversion @@ -990,7 +991,7 @@ \dosupereject \fi \doflushspread - \douitstellen} + \dopostponeblock} \ifx\doflushspread\undefined \let\doflushspread\relax \fi @@ -1017,14 +1018,14 @@ \or % simple \vskip\!!sixpoint - \hbox to \zetbreedte + \hbox to \makeupwidth {\infofont Concept: \currentdate \hss\reportpagedimensions}% \or % extensive \vskip\!!sixpoint - \hbox to \zetbreedte + \hbox to \makeupwidth {\infofont \getmessage\m!systems{27}: \currentdate\ \doplaatsversieaanduiding{Project}\currentproject @@ -1036,19 +1037,19 @@ % tot hier -\def\doversie[#1]% +\def\doversion[#1]% {\voorlopigfalse \chardef\conceptmode\zerocount \overfullrule\zeropoint - \processaction % \v!definitief=> + \processaction % \v!final=> [#1] [ \v!concept=>\chardef\conceptmode\plusone,% simple banner \v!file=>\chardef\conceptmode\plustwo,% full banner - \v!voorlopig=>\chardef\conceptmode\plustwo % full banner plus + \v!temporary=>\chardef\conceptmode\plustwo % full banner plus \overfullrule5\points]} % info in the margin -\def\versie - {\dosingleargument\doversie} +\def\version + {\dosingleargument\doversion} %\def\addstatusinfo % {\ifvoorlopig @@ -1067,11 +1068,11 @@ \fi} \def\doaddstatusinfo#1% - {\setbox#1\vbox to \papierhoogte + {\setbox#1\vbox to \paperheight {\vsmashbox#1\box#1% \offinterlineskip - \vskip\kopwit - \hsize\papierbreedte + \vskip\topspace + \hsize\paperwidth \hfill\hbox{\plaatstestinfo\hskip.5cm}\vss \settexthoffset\hskip\texthoffset % brrrr %\tlap{\plaatsversieaanduiding}\vskip.5cm}} @@ -1116,7 +1117,7 @@ \def\plaatstestinfo {\ifvoorlopig - \vbox to \zethoogte + \vbox to \makeupheight {\forgetall \infofont \hsize10em @@ -1140,21 +1141,10 @@ \vss} \fi} -\versie[\v!definitief] - -% De volgende macro's worden gedefinieerd in de module -% colo-ini. Om resetten bij twee maal laden te voorkomen -% checken we wel even. Anders krijgen we een mark-build-up. +\version[\v!final] \newif\ifinpagebody -\ifx\pushcolor\undefined - \let \pushcolor \relax - \let \popcolor \relax - \let \startcolorpage \relax - \let \stopcolorpage \relax -\fi - % bewaren tvb documentatie % % \hbox to \hsize @@ -1199,21 +1189,21 @@ \processaction [#1]% [\v!reset=>\chardef\showgridstate\zerocount, - %\v!onder=>\chardef\showgridstate\plusone, - \v!boven=>\chardef\showgridstate\plustwo]} + %\v!bottom=>\chardef\showgridstate\plusone, + \v!top=>\chardef\showgridstate\plustwo]} \def\buildpagebox#1% - {\setbox#1\vbox to \papierhoogte - {\hsize\papierbreedte - \vskip\kopwit + {\setbox#1\vbox to \paperheight + {\hsize\paperwidth + \vskip\topspace \doifbothsides - \hskip\rugwit + \hskip\backspace \orsideone - \hskip\rugwit + \hskip\backspace \orsidetwo - \hskip\papierbreedte - \hskip-\rugwit - \hskip-\zetbreedte + \hskip\paperwidth + \hskip-\backspace + \hskip-\makeupwidth \od \box#1}% \dp#1\zeropoint} @@ -1257,7 +1247,7 @@ % beware, \??ly is used before defined, i.e. bad module design -\setuplayout[\c!methode=\v!normaal] +\setuplayout[\c!method=\v!normal] \def\buildpagebody#1#2% {\ifsavepagebody\global\setbox\savedpagebody\fi @@ -1265,18 +1255,18 @@ {\beginrestorecatcodes \forgetall % igv problemen, check: \boxmaxdepth\maxdimen \boxmaxdepth\maxdimen % new - \mindermeldingen + \dontcomplain % the following plugin uses and sets pagebox; beware: this % will change and is for my (hh) personal experiments - \executeifdefined{\??ly\c!methode\@@lymethode}% - {\getvalue{\??ly\c!methode\v!normaal}}#1#2% + \executeifdefined{\??ly\c!method\@@lymethod}% + {\getvalue{\??ly\c!method\v!normal}}#1#2% % the finishing touch \ifcase\pageornamentstate \addpagebackground \pagebox \fi \registerpageposition\pagebox \ifarrangingpages - \shiftpaperpagebox \pagebox % \v!papier + \shiftpaperpagebox \pagebox % \v!paper \else \clippagebox \pagebox \addpagecutmarks \pagebox @@ -1289,7 +1279,7 @@ \addprintbackground\pagebox \mirrorprintbox \pagebox \rotateprintbox \pagebox - \shiftprintpagebox \pagebox % \v!pagina + \shiftprintpagebox \pagebox % \v!page \offsetprintbox \pagebox \negateprintbox \pagebox \fi @@ -1297,12 +1287,12 @@ \endrestorecatcodes}% \ifsavepagebody\copy\savedpagebody\fi} -\setvalue{\??ly\c!methode\v!normaal}#1#2% +\setvalue{\??ly\c!method\v!normal}#1#2% {\setbox\pagebox\vbox {\offinterlineskip \ifcase\pageornamentstate \bgroup % else footnotes get inconsistent font/baseline - \dostartattributes\??ly\c!letter\c!kleur\empty + \dostartattributes\??ly\c!style\c!color\empty \offinterlineskip \gettextboxes \dostopattributes @@ -1337,10 +1327,10 @@ \def\dopagebody#1#2% {%\getallmarks % now in following token register \the\everybeforepagebody - \startcolorpage + \starttextproperties \gotonextsubpage % nog eens: als in pagina (tbv standaard opmaak) \dontshowboxes % dan hier blokkeren en verderop resetten - \naastpagina +% \shipoutfacingpage \checkreferences \checkmargeblokken \dotoks\beforeeverypage @@ -1351,7 +1341,7 @@ \resetpagebreak \updatelistreferences \resetlayouttextlines % will go to \aftereverypage - \stopcolorpage + \stoptextproperties \the\everyafterpagebody} \newtoks\pageboundsettings @@ -1364,46 +1354,58 @@ \newif\ifpaginageblokkeerd \paginageblokkeerdfalse -\chardef\testpagemethod=0 +\def\testpage {\dotripleempty\dotestpage[\plusone]} +\def\testpageonly {\dotripleempty\dotestpage[\plustwo]} -\def\testpage - {\dodoubleempty\dotestpage} +\chardef\testpagemethod=0 % todo: \testnewpage[method=,lines=,voffset=] -\def\dotestpage[#1][#2]% +\def\dotestpage[#1][#2][#3]% {%\relax % needed before \if \endgraf - \ifpaginageblokkeerd \else \ifdim\pagegoal<\maxdimen - \ifdim\pagetotal<\pagegoal % \relax - \scratchdimen\lineheight - \multiply\scratchdimen#1\relax - \advance\scratchdimen \pagetotal - \ifdim\lastskip<\parskip - \advance\scratchdimen \parskip - \fi - \ifsecondargument - \advance\scratchdimen#2\relax - \fi - % quite inaccurate, better pagegoal 1pt or so - \ifcase\testpagemethod - \ifdim\scratchdimen>.99\pagegoal - \penalty-\!!tenthousand\relax + \ifpaginageblokkeerd + % do nothing + \else +% \ifnum#1=\plusone\synchronizeoutput\fi + \ifdim\pagegoal<\maxdimen \relax + \ifdim\pagetotal<\pagegoal \relax + \scratchdimen\lineheight + \multiply\scratchdimen#2\relax + \advance\scratchdimen \pagetotal + \ifdim\lastskip<\parskip + \advance\scratchdimen \parskip \fi - \or - \advance\scratchdimen-\pagegoal - \ifdim\scratchdimen>-\lineheight - \penalty-\!!tenthousand\relax + \ifthirdargument + \advance\scratchdimen#3\relax \fi - \or - \getnoflines\pagegoal - \advance\scratchdimen-\noflines\lineheight \relax - \ifdim\scratchdimen>-\lineheight - \penalty-\!!tenthousand\relax + \ifcase\testpagemethod + \ifdim\scratchdimen>.99\pagegoal + \vfill\eject % \penalty-\!!tenthousand\relax + \fi + \or + \advance\scratchdimen-\pagegoal + \ifdim\scratchdimen>-\lineheight + \vfill\eject % \penalty-\!!tenthousand\relax + \fi + \or + \getnoflines\pagegoal + \advance\scratchdimen-\noflines\lineheight \relax + \ifdim\scratchdimen>-\lineheight + \vfill\eject % \penalty-\!!tenthousand\relax + \fi + \or % same as 0 but more accurate + \advance\scratchdimen-10\s!sp\relax + \ifdim\scratchdimen>\pagegoal + \vfill\eject % \penalty-\!!tenthousand\relax + \fi \fi + \else + % force page break / new + % \vfill\eject % \penalty-\!!tenthousand\relax \fi + \else + \ifnum#1=\plusone\goodbreak\fi \fi - \else - \goodbreak - \fi \fi} + \fi} \def\testcolumn {\dodoubleempty\dotestcolumn} @@ -1434,7 +1436,7 @@ % was: \resetsectionmarks\firstsection, zie \handelpaginaaf \def\page {\pagebreak} % the short form of \pagebreak (mult-com one) -\def\pagina{\pagebreak} % for the moment, keep this one +\def\page{\pagebreak} % for the moment, keep this one \def\resetpagebreak {\global\paginageblokkeerdfalse} @@ -1475,7 +1477,7 @@ \iffirstargument % or if empty i.e. [] \flushnotes\executepagebreakhandlers{#1}% \else % so, no pagebreak when \pagebreak[] ! ! ! - \flushnotes\executepagebreakhandler\v!ja + \flushnotes\executepagebreakhandler\v!yes \fi \ifnum\prevrealpageno<\realpageno \global\chardef\pageornamentstate\zerocount @@ -1490,8 +1492,8 @@ \gotonextpage \ejectdummypage} -\installpagebreakhandler \v!kader - {\page\bgroup\showframe\page[\v!leeg]\egroup} +\installpagebreakhandler \v!frame + {\page\bgroup\showframe\page[\v!empty]\egroup} \installpagebreakhandler \s!unknown {\doifinstringelse{+}\@@pagespecification @@ -1512,63 +1514,63 @@ \installpagebreakhandler \s!default {} % do nothing if empty -\installpagebreakhandler \v!reset +\installpagebreakhandler \v!reset {% better not: \global\chardef\pageornamentstate\zerocount \resetpagebreak} -\installpagebreakhandler \v!blokkeer +\installpagebreakhandler \v!disable {\global\paginageblokkeerdtrue} -\installpagebreakhandler \v!ja +\installpagebreakhandler \v!yes {\ifpaginageblokkeerd\else \ejectinsert \gotonextpage - \ifbinnenkolommen % this will move to MUL + \ifinsidecolumns % this will move to MUL \ejectpage % anders soms geen overgang \fi \fi} -\installpagebreakhandler \v!opmaak % ?? +\installpagebreakhandler \v!makeup % ?? {\ifpaginageblokkeerd\else \eject \fi} -\installpagebreakhandler \v!blanko +\installpagebreakhandler \v!blank {\ifcase\pageornamentstate \global\chardef\pageornamentstate\plusone \fi} -\installpagebreakhandler \v!nee +\installpagebreakhandler \v!no {\ifpaginageblokkeerd\else \dosomebreak\nobreak \fi} -\installpagebreakhandler \v!voorkeur +\installpagebreakhandler \v!preference {\ifpaginageblokkeerd\else - \ifbinnenkolommen % this will move to MUL + \ifinsidecolumns % this will move to MUL \dosomebreak\goodbreak \else \testpage[3][\zeropoint]% \fi \fi} -\installpagebreakhandler \v!grotevoorkeur +\installpagebreakhandler \v!bigpreference {\ifpaginageblokkeerd\else - \ifbinnenkolommen % this will move to MUL + \ifinsidecolumns % this will move to MUL \dosomebreak\goodbreak \else \testpage[5][\zeropoint]% \fi \fi} -\installpagebreakhandler \v!leeg +\installpagebreakhandler \v!empty {\ejectinsert \gotonextpage - \doifnotvalue{\??tk\v!hoofd\c!status}\v!stop{\setupheader[\c!status=\v!leeg]}% - \doifnotvalue{\??tk\v!voet \c!status}\v!stop{\setupfooter[\c!status=\v!leeg]}% + \doifnotvalue{\??tk\v!header\c!state}\v!stop{\setupheader[\c!state=\v!empty]}% + \doifnotvalue{\??tk\v!footer \c!state}\v!stop{\setupfooter[\c!state=\v!empty]}% \ejectdummypage} -\installpagebreakhandler \v!links +\installpagebreakhandler \v!left {\ejectinsert \gotonextpageX % will become \gotonextpage \doifbothsidesoverruled @@ -1578,7 +1580,7 @@ \orsidetwo \od} -\installpagebreakhandler \v!rechts +\installpagebreakhandler \v!right {\ejectinsert \gotonextpageX % will become \gotonextpage \doifbothsidesoverruled @@ -1589,14 +1591,14 @@ \od} \installpagebreakhandler \v!even - {\pagina + {\page \doifoddpageelse{\resetcurrentsectionmarks\ejectdummypage}\donothing} -\installpagebreakhandler \v!oneven - {\pagina +\installpagebreakhandler \v!odd + {\page \doifoddpageelse\donothing{\resetcurrentsectionmarks\ejectdummypage}} -\installpagebreakhandler \v!viertal % not yet ok inside columnsets +\installpagebreakhandler \v!quadruple % not yet ok inside columnsets {\ifdubbelzijdig \!!counta\realpageno \!!countb\realpageno @@ -1604,18 +1606,18 @@ \divide\!!countb 2 \ifnum\!!counta=\!!countb \else - \executepagebreakhandler\v!ja - \executepagebreakhandler\v!leeg - \executepagebreakhandler\v!leeg + \executepagebreakhandler\v!yes + \executepagebreakhandler\v!empty + \executepagebreakhandler\v!empty \fi \fi} -\installpagebreakhandler \v!laatste +\installpagebreakhandler \v!last {\ejectinsert \gotonextpageX % will become \gotonextpage \relax \doifbothsidesoverruled - \naastpagina + \shipoutfacingpage \orsideone \orsidetwo \noheaderandfooterlines @@ -1631,11 +1633,11 @@ % nb: \executepagebreakhandler\v!hoofd in other ones -\installpagebreakhandler \v!hoofd - {\doifnotvalue{\??tk\v!hoofd\c!status}\v!stop{\setupheader[\c!status=\v!leeg]}} +\installpagebreakhandler \v!header + {\doifnotvalue{\??tk\v!header\c!state}\v!stop{\setupheader[\c!state=\v!empty]}} -\installpagebreakhandler \v!voet - {\doifnotvalue{\??tk\v!voet \c!status}\v!stop{\setupfooter[\c!status=\v!leeg]}} +\installpagebreakhandler \v!footer + {\doifnotvalue{\??tk\v!footer \c!state}\v!stop{\setupfooter[\c!state=\v!empty]}} % \definepagebreak % [chapter] @@ -1686,7 +1688,7 @@ \definecomplexorsimple\columnbreak \def\simplecolumnbreak - {\executecolumnbreakhandler\v!ja} + {\executecolumnbreakhandler\v!yes} \def\complexcolumnbreak[#1]% if empty, do nothing and avoid processing {\doifsomething{#1}{\executecolumnbreakhandlers{#1}}} @@ -1707,14 +1709,16 @@ % We don't want spurious last pages (due to left over marks): +\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 - \gdef\shipout - {\writestatus\m!systems{ignoring further shipouts}% - \dowithnextbox{\deadcycles\zerocount}}% - \fi - \fi} + {\ifarrangingpages \else \ifnum\textlevel>\zerocount \else + \globallet\shipout\noshipout + \fi \fi} \let\ignorerestoftext\donothing @@ -1722,9 +1726,9 @@ \globallet\ignorerestoftext\doignorerestoftext \to \everystarttext -\appendtoks - \ignorerestoftext -\to \everylastshipout +% \appendtoks +% \ignorerestoftext +% \to \everylastshipout \newif\ifgeselecteerd \geselecteerdtrue \newif\ifselecteren \selecterenfalse @@ -1732,13 +1736,12 @@ \let\selectie \empty \let\paginasoort\empty -\let\naastpagina\relax \let\napagina \relax \let\voorpagina \relax \def\dodovoorpagina#1% {\global\let\voorpagina\relax - \getvalue{\??pg#1\c!voor}} + \getvalue{\??pg#1\c!before}} \def\dovoorpagina {\doifsomething\paginasoort @@ -1747,10 +1750,10 @@ \def\dododonapagina#1% {\global\let\napagina\relax \global\let\paginasoort\empty - \getvalue{\??pg#1\c!na}} + \getvalue{\??pg#1\c!after}} \def\dodonapagina#1% - {\doifelsevalue{\??pg#1\c!optie}\v!dubbelzijdig + {\doifelsevalue{\??pg#1\c!option}\v!doublesided {\doifbothsidesoverruled \dododonapagina{#1}% \orsideone @@ -1766,7 +1769,7 @@ % Dit wordt eigenlijk nooit en moet worden vervangen door % het meer algemene mechanisme. -\def\dosoortpagina[#1]% +\def\dopagetype[#1]% {\edef\desoortpagina{#1}% \ifx\desoortpagina\empty \else \@EA\doglobal\@EA\addtocommalist\@EA{\desoortpagina}\paginasoort @@ -1778,38 +1781,38 @@ \gdef\napagina {\donapagina }% \fi} -\def\soortpagina - {\dosingleargument\dosoortpagina} +\def\pagetype + {\dosingleargument\dopagetype} -\def\dokoppelpagina[#1][#2]% +\def\docouplepage[#1][#2]% {\getparameters [\??pg] - [\c!voor=, - \c!na=, - \c!optie=, + [\c!before=, + \c!after=, + \c!option=, #2]% \def\docommando##1% {\getparameters [\??pg##1] - [\c!voor=\@@pgvoor, - \c!na=\@@pgna, - \c!optie=\@@pgoptie]}% + [\c!before=\@@pgbefore, + \c!after=\@@pgafter, + \c!option=\@@pgoption]}% \processcommalist[#1]\docommando}% -\def\koppelpagina - {\dodoubleargument\dokoppelpagina} +\def\couplepage + {\dodoubleargument\docouplepage} -\def\doverwerkpagina[#1][#2]% +\def\doprocesspage[#1][#2]% {\processaction [#2] - [ \v!ja=>\global\verwerkentrue, - \v!nee=>\global\verwerkenfalse]% + [ \v!yes=>\global\verwerkentrue, + \v!no=>\global\verwerkenfalse]% \gdef\selectie{#1}% \global\selecterentrue \global\geselecteerdfalse} -\def\verwerkpagina - {\dodoubleargument\doverwerkpagina} +\def\processpage + {\dodoubleargument\doprocesspage} \def\resetselectiepagina {\ifselecteren @@ -1857,4 +1860,66 @@ \box#3% \egroup} -\protect \endinput \ No newline at end of file +%D \macros +%D {setupoppositeplacing,startopposite} +%D +%D \starttyping +%D \starttext +%D test \startopposite \blackrule[width=3cm,height=4cm] \stopopposite test +%D test \startopposite \blackrule[width=3cm,height=4cm] \stopopposite test +%D \stoptext +%D \stoptyping + +% Moved from page-mar.tex, made english, cleaned up, but still to be +% redesigned + +\newbox\facingpage + +\def\setupoppositeplacing + {\dodoubleargument\getparameters[\??np]} + +\def\startopposite + {\dowithnextboxcontent + {\hsize\makeupwidth}% + {\global\setbox\facingpage\vbox + {\ifvoid\facingpage + \@@npbefore + \else + \@@npinbetween + \unvbox\facingpage + \fi + \box\nextbox}}% + \vbox\bgroup} + +\def\stopopposite + {\egroup} + +\def\finishfacingpage + {\ifvoid\facingpage\else + \global\setbox\facingpage\vbox to \makeupheight + {\unvbox\facingpage + \@@npafter + \vss}% + \fi} + +\def\shipoutfacingpage + {\doif\@@npstate\v!start + {\ifvoid\facingpage\else + \ifnum\realpageno>\plusone + \bgroup + \chardef\pageornamentstate\plusone + \finishfacingpage + \myshipout{\buildpagebody\box\facingpage}% + \egroup + \else + \global\setbox\facingpage\emptybox + \fi + \fi}} + +\setupoppositeplacing + [\c!state=\v!start, + \c!before=, + \c!inbetween=\blank, + \c!after=] + +\protect \endinput diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex index c35d293f6..d8dfeaca1 100644 --- a/tex/context/base/page-lay.tex +++ b/tex/context/base/page-lay.tex @@ -13,8 +13,6 @@ \writestatus{loading}{Context Page Macros / Layout Specification} -% swapmargins will disappear, and be replaced by inner/outer - % to be translated into english % hoofdhoogte wordt bij status=hoog niet aangepast op outer @@ -40,42 +38,42 @@ %D The dimensions related to layout areas are represented by %D real dimensions. -\newdimen\papierhoogte \papierhoogte = 297mm -\newdimen\papierbreedte \papierbreedte = 210mm +\newdimen\paperheight \paperheight = 297mm +\newdimen\paperwidth \paperwidth = 210mm -\newdimen\printpapierhoogte \printpapierhoogte = \papierhoogte -\newdimen\printpapierbreedte \printpapierbreedte = \papierbreedte +\newdimen\printpaperheight \printpaperheight = \paperheight +\newdimen\printpaperwidth \printpaperwidth = \paperwidth -\newdimen\zethoogte % calculated -\newdimen\zetbreedte % calculated +\newdimen\makeupheight % calculated +\newdimen\makeupwidth % calculated -\newdimen\teksthoogte % calculated -\newdimen\tekstbreedte % calculated +\newdimen\textheight % calculated +\newdimen\textwidth % calculated -\newdimen\kopwit \kopwit = 2cm -\newdimen\rugwit \rugwit = \kopwit -\newdimen\snijwit \snijwit = 0pt -\newdimen\bodemwit \bodemwit = 0pt +\newdimen\topspace \topspace = 2cm +\newdimen\backspace \backspace = \topspace +\newdimen\cutspace \cutspace = 0pt +\newdimen\bottomspace \bottomspace = 0pt -\newdimen\hoofdhoogte \hoofdhoogte = 2cm -\newdimen\voethoogte \voethoogte = \hoofdhoogte +\newdimen\headerheight \headerheight = 2cm +\newdimen\footerheight \footerheight = \headerheight -\newdimen\kopoffset \kopoffset = 0pt -\newdimen\rugoffset \rugoffset = \kopoffset +\newdimen\kopoffset \kopoffset = 0pt +\newdimen\rugoffset \rugoffset = \kopoffset -\newdimen\linkermargebreedte \linkermargebreedte = 3cm -\newdimen\rechtermargebreedte \rechtermargebreedte = \linkermargebreedte +\newdimen\leftmarginwidth \leftmarginwidth = 3cm +\newdimen\rightmarginwidth \rightmarginwidth = \leftmarginwidth -\newdimen\linkerrandbreedte \linkerrandbreedte = 3cm -\newdimen\rechterrandbreedte \rechterrandbreedte = \linkerrandbreedte +\newdimen\leftedgewidth \leftedgewidth = 3cm +\newdimen\rightedgewidth \rightedgewidth = \leftedgewidth -\newdimen\bovenhoogte \bovenhoogte = 0cm -\newdimen\onderhoogte \onderhoogte = \bovenhoogte +\newdimen\topheight \topheight = 0cm +\newdimen\bottomheight \bottomheight = \topheight -\newcount\layoutlines \layoutlines = 0 -\newcount\layoutcolumns \layoutcolumns = 0 -\newdimen\layoutcolumndistance\layoutcolumndistance= 0pt -\newdimen\layoutcolumnwidth \layoutcolumnwidth = 0pt +\newcount\layoutlines \layoutlines = 0 +\newcount\layoutcolumns \layoutcolumns = 0 +\newdimen\layoutcolumndistance \layoutcolumndistance = 0pt +\newdimen\layoutcolumnwidth \layoutcolumnwidth = 0pt %D We can save some tokens and fuzzy parameters by using a %D symbolic name for the current set of layout parameters. @@ -148,121 +146,109 @@ %D couple of backgrounds only (which is far less than one %D percent on a normal document). -\newif\iffixedlayoutdimensions \fixedlayoutdimensionstrue - -\iffixedlayoutdimensions - \let\@the\the -\else - \let\@the\empty -\fi - %D The next series of dimensions are complemented by left %D and rights ones. -\iffixedlayoutdimensions - - \newdimen \margeafstand - \newdimen \randafstand - \newdimen \margebreedte - \newdimen \randbreedte - -\else - - \def\margeafstand{\layoutparameter\c!margeafstand} - \def\randafstand {\layoutparameter\c!randafstand} - \def\margebreedte{\layoutparameter\c!marge} - \def\randbreedte {\layoutparameter\c!rand} - -\fi +\newdimen \margindistance +\newdimen \edgedistance +\newdimen \marginwidth +\newdimen \edgewidth %D Because a distance does not really makes sense when there %D is no area, we use a zero distance in case there is no %D area. -\iffixedlayoutdimensions - - \def\layoutdistance#1#2% - {\ifdim\zeropoint<#1\layoutparameter#2\else\zeropoint \fi} - -\else - - \def\layoutdistance#1#2% - {\ifdim\zeropoint<#1\layoutparameter#2\else\!!zeropoint\fi} - -\fi +\def\layoutdistance#1#2% + {\ifdim\zeropoint<#1\layoutparameter#2\else\zeropoint\fi} %D The horizontal distances are: -\iffixedlayoutdimensions - - \newdimen \linkerrandafstand - \newdimen \rechterrandafstand - \newdimen \linkermargeafstand - \newdimen \rechtermargeafstand - -\else - - \def\linkerrandafstand - {\layoutdistance\linkerrandbreedte\c!linkerrandafstand} - - \def\rechterrandafstand - {\layoutdistance\rechterrandbreedte\c!rechterrandafstand} - - \def\linkermargeafstand - {\layoutdistance\linkermargebreedte\c!linkermargeafstand} - - \def\rechtermargeafstand - {\layoutdistance\rechtermargebreedte\c!rechtermargeafstand} - -\fi +\newdimen \leftedgedistance +\newdimen \rightedgedistance +\newdimen \leftmargindistance +\newdimen \rightmargindistance %D The vertical distances are: -\iffixedlayoutdimensions - - \newdimen \bovenafstand - \newdimen \hoofdafstand - \newdimen \voetafstand - \newdimen \onderafstand - -\else - - \def\bovenafstand{\layoutdistance\bovenhoogte\c!bovenafstand} - \def\hoofdafstand{\layoutdistance\hoofdhoogte\c!hoofdafstand} - \def\voetafstand {\layoutdistance\voethoogte \c!voetafstand } - \def\onderafstand{\layoutdistance\onderhoogte\c!onderafstand} - -\fi - -%D When fixed dimensions are used, we need to calculate the -%D distances: - -\iffixedlayoutdimensions - - \def\setlayoutdimensions - {\global\margebreedte \layoutparameter\c!marge - \global\randbreedte \layoutparameter\c!rand - \global\margeafstand \layoutparameter\c!margeafstand - \global\randafstand \layoutparameter\c!randafstand - \global\linkerrandafstand \layoutdistance \linkerrandbreedte \c!linkerrandafstand - \global\rechterrandafstand \layoutdistance \rechterrandbreedte \c!rechterrandafstand - \global\linkermargeafstand \layoutdistance \linkermargebreedte \c!linkermargeafstand - \global\rechtermargeafstand\layoutdistance \rechtermargebreedte\c!rechtermargeafstand - \global\bovenafstand \layoutdistance \bovenhoogte \c!bovenafstand - \global\hoofdafstand \layoutdistance \hoofdhoogte \c!hoofdafstand - \global\voetafstand \layoutdistance \voethoogte \c!voetafstand - \global\onderafstand \layoutdistance \onderhoogte \c!onderafstand} - - \def\setlayoutdistances % local in \setreducedvsize - {\hoofdafstand\layoutdistance\hoofdhoogte\c!hoofdafstand - \voetafstand \layoutdistance\voethoogte \c!voetafstand} - -\else - - \let\setlayoutdimensions\relax - \let\setlayoutdistance \relax - -\fi +\newdimen \topdistance +\newdimen \headerdistance +\newdimen \footerdistance +\newdimen \bottomdistance + +%D We need to calculate the extra distances: + +\def\setlayoutdimensions + {\global\marginwidth \layoutparameter\c!margin + \global\edgewidth \layoutparameter\c!edge + \global\margindistance \layoutparameter\c!margindistance + \global\edgedistance \layoutparameter\c!edgedistance + \global\leftedgedistance \layoutdistance \leftedgewidth \c!leftedgedistance + \global\rightedgedistance \layoutdistance \rightedgewidth \c!rightedgedistance + \global\leftmargindistance \layoutdistance \leftmarginwidth \c!leftmargindistance + \global\rightmargindistance\layoutdistance \rightmarginwidth \c!rightmargindistance + \global\topdistance \layoutdistance \topheight \c!topdistance + \global\headerdistance \layoutdistance \headerheight \c!headerdistance + \global\footerdistance \layoutdistance \footerheight \c!footerdistance + \global\bottomdistance \layoutdistance \bottomheight \c!bottomdistance} + +\def\setlayoutdistances % local in \setreducedvsize + {\headerdistance\layoutdistance\headerheight\c!headerdistance + \footerdistance \layoutdistance\footerheight \c!footerdistance} + +\def\outermarginwidth {\rightorleftpageaction\rightmarginwidth \leftmarginwidth } +\def\innermarginwidth {\rightorleftpageaction\leftmarginwidth \rightmarginwidth} +\def\outermargindistance{\rightorleftpageaction\rightmargindistance\leftmargindistance } +\def\innermargindistance{\rightorleftpageaction\leftmargindistance \rightmargindistance} + +\def\outeredgewidth {\rightorleftpageaction\rightedgewidth \leftedgewidth } +\def\inneredgewidth {\rightorleftpageaction\leftedgewidth \rightedgewidth} +\def\outeredgedistance {\rightorleftpageaction\rightedgedistance\leftedgedistance } +\def\inneredgedistance {\rightorleftpageaction\leftedgedistance \rightedgedistance} + +\def\outerspacewidth {\rightorleftpageaction\cutspace\backspace} +\def\innerspacewidth {\rightorleftpageaction\backspace\cutspace} + +\newtoks\extralayoutcalculations \def\calculatelayoutextras{\the\extralayoutcalculations} + +\appendtoks + \scratchdimen\leftmarginwidth \advance\scratchdimen\leftmargindistance \xdef\leftmargintotal {\the\scratchdimen}% + \scratchdimen\rightmarginwidth \advance\scratchdimen\rightmargindistance \xdef\rightmargintotal{\the\scratchdimen}% + \scratchdimen\leftedgewidth \advance\scratchdimen\leftedgedistance \xdef\leftedgetotal {\the\scratchdimen}% + \scratchdimen\rightedgewidth \advance\scratchdimen\rightedgedistance \xdef\rightedgetotal {\the\scratchdimen}% + \scratchdimen\leftmarginwidth \advance\scratchdimen\leftedgetotal \xdef\leftsidetotal {\the\scratchdimen}% + \scratchdimen\rightmarginwidth \advance\scratchdimen\rightedgetotal \xdef\rightsidetotal {\the\scratchdimen}% + \scratchdimen\leftmargintotal \advance\scratchdimen\leftedgetotal \xdef\leftcombitotal {\the\scratchdimen}% + \scratchdimen\rightmargintotal \advance\scratchdimen\rightedgetotal \xdef\rightcombitotal {\the\scratchdimen}% + % + \scratchdimen\innermarginwidth \advance\scratchdimen\innermargindistance \xdef\innermargintotal{\the\scratchdimen}% + \scratchdimen\outermarginwidth \advance\scratchdimen\outermargindistance \xdef\outermargintotal{\the\scratchdimen}% + \scratchdimen\inneredgewidth \advance\scratchdimen\inneredgedistance \xdef\inneredgetotal {\the\scratchdimen}% + \scratchdimen\outeredgewidth \advance\scratchdimen\outeredgedistance \xdef\outeredgetotal {\the\scratchdimen}% + \scratchdimen\innermargintotal \advance\scratchdimen\inneredgetotal \xdef\innercombitotal {\the\scratchdimen}% + \scratchdimen\outermargintotal \advance\scratchdimen\outeredgetotal \xdef\outercombitotal {\the\scratchdimen}% + \scratchdimen\innermarginwidth \advance\scratchdimen\inneredgetotal \xdef\innersidetotal {\the\scratchdimen}% + \scratchdimen\outermarginwidth \advance\scratchdimen\outeredgetotal \xdef\outersidetotal {\the\scratchdimen}% +\to \extralayoutcalculations + +\newtoks\everyswapmargins % watch the order ! + +\appendtoks + \swapdimens\leftmargindistance\rightmargindistance + \swapdimens\leftedgedistance \rightedgedistance + \swapdimens\leftmarginwidth \rightmarginwidth + \swapdimens\leftedgewidth \rightedgewidth +\to \everyswapmargins + +\appendtoks + \swapmacros\leftmargintotal \rightmargintotal + \swapmacros\leftedgetotal \rightedgetotal + \swapmacros\leftsidetotal \rightsidetotal + \swapmacros\leftcombitotal \rightcombitotal + \swapmacros\innermargintotal\outermargintotal + \swapmacros\inneredgetotal \outeredgetotal + \swapmacros\innercombitotal \outercombitotal + \swapmacros\innersidetotal \outersidetotal +\to \everyswapmargins %D \macros %D {definepapersize} @@ -279,9 +265,10 @@ \def\dodefinepapersize[#1][#2]% {\ifsecondargument - \getparameters - [\??pp#1] % geen \c!schaal, scheelt hash ruimte - [\c!breedte=\@@ppbreedte,\c!hoogte=\@@pphoogte,\c!offset=\@@ppoffset,#2]% + \doifsomething{#1} % to be sure + {\getparameters + [\??pp#1] % geen \c!scale, scheelt hash ruimte + [\c!width=\@@ppwidth,\c!height=\@@ppheight,\c!offset=\@@ppoffset,#2]}% \else \getparameters[\??pp][#1]% \setuppapersize @@ -297,7 +284,7 @@ %D paper. \definepapersize - [\c!breedte=210mm,\c!hoogte=297mm,\c!offset=\!!zeropoint] + [\c!width=210mm,\c!height=297mm,\c!offset=\!!zeropoint] %D \macros %D {setuppaper,setuppapersize} @@ -331,16 +318,16 @@ % which is handy in 'example' when we use setups \def\setuppaper[#1]% - {\getparameters[\??pp][\c!papier=,\c!pagina=,#1]% + {\getparameters[\??pp][\c!paper=,\c!page=,#1]% \scratchcounter\@@ppnx \multiply\scratchcounter\@@ppny \edef\@@ppxy{\the\scratchcounter}% - \doifelsenothing\@@pppagina - {\doifsomething\@@pppapier - {\dodosetuppapersize[\papersize][\@@pppapier]}} - {\doifelsenothing\@@pppapier - {\dodosetuppapersize[\@@pppagina][\printpapersize]} - {\dodosetuppapersize[\@@pppagina][\@@pppapier]}}} + \doifelsenothing\@@pppage + {\doifsomething\@@pppaper + {\dodosetuppapersize[\papersize][\@@pppaper]}} + {\doifelsenothing\@@pppaper + {\dodosetuppapersize[\@@pppage][\printpapersize]} + {\dodosetuppapersize[\@@pppage][\@@pppaper]}}} \def\setuppapersize {\dodoubleempty\dosetuppapersize} @@ -352,109 +339,9 @@ {\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 - {\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, 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}% - % + \dododosetuppapersize[#1][#2]% \calculatehsizes \calculatevsizes \recalculatelogos @@ -466,6 +353,54 @@ \restorepapersize \fi\fi\fi} +\def\dododosetuppapersize[#1][#2]% + {\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!width} + {\global\paperwidth\getvalue{\??pp##1\c!width}% + \global\paperheight\getvalue{\??pp##1\c!height}% + \calculatepaperoffsets{##1}% + \xdef\papersize{##1}}}}% + \processcommacommand[#1]\docommando + \doifdefinedelse{\??pp#1\c!scale} + {\edef\paperscale{\getvalue{\??pp#1\c!scale}}} + {\edef\paperscale{1}}% + \def\docommando##1% + {\doifsomething{##1}{\doifdefined{\??pp##1\c!width} + {\global\printpaperwidth\getvalue{\??pp##1\c!width}% + \global\printpaperheight\getvalue{\??pp##1\c!height}% + \xdef\printpapersize{##1}}}}% + \processcommacommand[#2]\docommando + \global\setdimentoatleast\paperwidth \onepoint + \global\setdimentoatleast\paperheight \onepoint + \global\setdimentoatleast\printpaperwidth\onepoint + \global\setdimentoatleast\printpaperheight \onepoint + \ifcase\paperlandscape\else + \doglobal\swapdimens\paperwidth\paperheight + \fi + \ifcase\printlandscape\else + \doglobal\swapdimens\printpaperwidth\printpaperheight + \fi + % this check can be confusing, so we've added the possibility + % to bypass this test: \setuppapersize[option=fit] + \doif\@@ppoption\v!max % \v!fit is + {\bgroup + % we need to pre-swap else we get the wrong paper size + \doifinset\paperrotation{90,270}{\swapdimens\paperwidth\paperheight}% + \doifinset\printrotation{90,270}{\swapdimens\printpaperwidth\printpaperheight}% + \ifdim\paperheight>\printpaperheight + \global\printpaperheight\paperheight + \writestatus\m!systems{print height forced to paper height}% + \fi + \ifdim\paperwidth>\printpaperwidth + \global\printpaperwidth\paperwidth + \writestatus\m!systems{print width forced to paper width}% + \fi + \egroup}} + \def\dostelpapierrichtingin#1#2#3#4#5% {\global\chardef#2\zerocount \global\chardef#5\zerocount @@ -474,10 +409,10 @@ \global\negateprintboxfalse \processallactionsinset [#1] - [ \v!liggend=>\global\chardef#2\plusone, - \v!gespiegeld=>\global\chardef#5\plusone, - \v!geroteerd=>\gdef#3{90}\gdef#4{270}, - \v!negatief=>\global\negateprintboxtrue, + [ \v!landscape=>\global\chardef#2\plusone, + \v!mirrored=>\global\chardef#5\plusone, + \v!rotated=>\gdef#3{90}\gdef#4{270}, + \v!negative=>\global\negateprintboxtrue, 90=>\gdef#3{90}\gdef#4{270}, 180=>\gdef#3{180}\gdef#4{0}, 270=>\gdef#3{270}\gdef#4{90}]} @@ -486,8 +421,8 @@ \def\calculatepaperoffsets#1% {\scratchdimen\getvalue{\??pp#1\c!offset}% - \global\advance\papierbreedte -2\scratchdimen - \global\advance\papierhoogte -2\scratchdimen} + \global\advance\paperwidth -2\scratchdimen + \global\advance\paperheight-2\scratchdimen} \fi @@ -507,122 +442,134 @@ % \newtoks \everybeforelayout \relax % \newtoks \everyafterlayout \relax + \def\recalculatelayout + {\doifsomething{\layoutparameter\c!page\layoutparameter\c!paper} + {\dododosetuppapersize[\layoutparameter\c!page][\layoutparameter\c!paper]}% + \dorecalculatelayout} + +\def\dorecalculatelayout {%\the\everybeforelayout \setups[\layoutparameter\c!preset]% - \global\linkermargebreedte \layoutparameter\c!linkermarge - \global\rechtermargebreedte\layoutparameter\c!rechtermarge - \global\linkerrandbreedte \layoutparameter\c!linkerrand - \global\rechterrandbreedte \layoutparameter\c!rechterrand - \global\hoofdhoogte \layoutparameter\c!hoofd - \global\voethoogte \layoutparameter\c!voet - \global\onderhoogte \layoutparameter\c!onder - \global\bovenhoogte \layoutparameter\c!boven - \global\rugwit \layoutparameter\c!rugwit - \global\kopwit \layoutparameter\c!kopwit + \global\leftmarginwidth \layoutparameter\c!leftmargin + \global\rightmarginwidth\layoutparameter\c!rightmargin + \global\leftedgewidth \layoutparameter\c!leftedge + \global\rightedgewidth \layoutparameter\c!rightedge + \global\headerheight \layoutparameter\c!header + \global\footerheight \layoutparameter\c!footer + \global\bottomheight \layoutparameter\c!bottom + \global\topheight \layoutparameter\c!top + \global\backspace \layoutparameter\c!backspace + \global\topspace \layoutparameter\c!topspace \setlayoutdimensions % the rest of the `dimensions' - \doifelse\@@lygrid\v!ja\gridsnappingtrue\gridsnappingfalse + \doifelse\@@lygrid\v!yes\gridsnappingtrue\gridsnappingfalse + \ifgridsnapping + \setsystemmode\v!grid + \else + \resetsystemmode\v!grid + \fi \setups[\layoutparameter\c!setups]% depends on gridsnapping ! \simplesetupwhitespace \simplesetupblank - \global\snijwit\layoutparameter\c!snijwit + \global\cutspace\layoutparameter\c!cutspace \relax - \doifelse{\layoutparameter\c!breedte}\v!midden - {\ifdim\snijwit=\zeropoint - \global\snijwit\rugwit + \doifelse{\layoutparameter\c!width}\v!middle + {\ifdim\cutspace=\zeropoint + \global\cutspace\backspace \fi - \global\zetbreedte\papierbreedte - \global\advance\zetbreedte -\rugwit - \global\advance\zetbreedte -\snijwit} - {\doifelse{\layoutparameter\c!breedte}\v!passend - {\ifdim\snijwit=\zeropoint - \global\snijwit\rugwit + \global\makeupwidth\paperwidth + \global\advance\makeupwidth -\backspace + \global\advance\makeupwidth -\cutspace} + {\doifelse{\layoutparameter\c!width}\v!fit + {\ifdim\cutspace=\zeropoint + \global\cutspace\backspace \fi - \global\zetbreedte\papierbreedte - \global\advance\zetbreedte -\snijwit - \scratchdimen\rugwit - \advance\scratchdimen -\linkerrandbreedte - \advance\scratchdimen -\linkerrandafstand - \advance\scratchdimen -\linkermargebreedte - \advance\scratchdimen -\linkermargeafstand\relax + \global\makeupwidth\paperwidth + \global\advance\makeupwidth -\cutspace + \scratchdimen\backspace + \advance\scratchdimen -\leftedgewidth + \advance\scratchdimen -\leftedgedistance + \advance\scratchdimen -\leftmarginwidth + \advance\scratchdimen -\leftmargindistance\relax \ifdim\scratchdimen<\zeropoint \scratchdimen\zeropoint \fi - \global\advance\zetbreedte -\rechtermargeafstand - \global\advance\zetbreedte -\rechtermargebreedte - \global\advance\zetbreedte -\rechterrandafstand - \global\advance\zetbreedte -\rechterrandbreedte - \global\advance\zetbreedte -\scratchdimen} - {\global\zetbreedte\layoutparameter\c!breedte\relax - \ifdim\snijwit=\zeropoint - \global\snijwit\papierbreedte - \global\advance\snijwit-\zetbreedte - \global\advance\snijwit-\rugwit + \global\advance\makeupwidth -\rightmargindistance + \global\advance\makeupwidth -\rightmarginwidth + \global\advance\makeupwidth -\rightedgedistance + \global\advance\makeupwidth -\rightedgewidth + \global\advance\makeupwidth -\scratchdimen} + {\global\makeupwidth\layoutparameter\c!width\relax + \ifdim\cutspace=\zeropoint + \global\cutspace\paperwidth + \global\advance\cutspace-\makeupwidth + \global\advance\cutspace-\backspace % \else % A kind of inconsistent specification, but used % in for instance s-pre-19.tex; the cutspace is % used only for determining some kind of right % margin; don't use this in doublesided mode \fi}}% - \scratchdimen\layoutparameter\c!bodemwit\relax + \scratchdimen\layoutparameter\c!bottomspace\relax %\ifdim\scratchdimen=\zeropoint - % \scratchdimen\kopwit + % \scratchdimen\topspace %\fi - \global\bodemwit\layoutparameter\c!bodemwit\relax - \global\layoutlines0\number\layoutparameter\c!regels\relax % may be empty + \global\bottomspace\layoutparameter\c!bottomspace\relax + \global\layoutlines0\number\layoutparameter\c!lines\relax % may be empty \ifcase\layoutlines - \doifelse{\layoutparameter\c!hoogte}\v!midden - {\ifdim\bodemwit=\zeropoint - \global\bodemwit\kopwit + \doifelse{\layoutparameter\c!height}\v!middle + {\ifdim\bottomspace=\zeropoint + \global\bottomspace\topspace \fi - \global\zethoogte\papierhoogte - \global\advance\zethoogte -\kopwit - \global\advance\zethoogte -\bodemwit} - {\doifelse{\layoutparameter\c!hoogte}\v!passend - {\ifdim\bodemwit=\zeropoint - \global\bodemwit\kopwit + \global\makeupheight\paperheight + \global\advance\makeupheight -\topspace + \global\advance\makeupheight -\bottomspace} + {\doifelse{\layoutparameter\c!height}\v!fit + {\ifdim\bottomspace=\zeropoint + \global\bottomspace\topspace \fi - \global\zethoogte\papierhoogte - \global\advance\zethoogte -\bodemwit - \scratchdimen\kopwit - \advance\scratchdimen -\bovenhoogte - \advance\scratchdimen -\bovenafstand\relax + \global\makeupheight\paperheight + \global\advance\makeupheight -\bottomspace + \scratchdimen\topspace + \advance\scratchdimen -\topheight + \advance\scratchdimen -\topdistance\relax \ifdim\scratchdimen<\zeropoint \scratchdimen\zeropoint \fi - \global\advance\zethoogte -\onderafstand - \global\advance\zethoogte -\onderhoogte - \global\advance\zethoogte -\scratchdimen} - {\global\zethoogte\layoutparameter\c!hoogte\relax - \ifdim\bodemwit=\zeropoint - \global\bodemwit\papierhoogte - \global\advance\bodemwit-\zethoogte - \global\advance\bodemwit-\kopwit + \global\advance\makeupheight -\bottomdistance + \global\advance\makeupheight -\bottomheight + \global\advance\makeupheight -\scratchdimen} + {\global\makeupheight\layoutparameter\c!height\relax + \ifdim\bottomspace=\zeropoint + \global\bottomspace\paperheight + \global\advance\bottomspace-\makeupheight + \global\advance\bottomspace-\topspace \else % inconsistent specification \fi}}% \else - % beware, when the bodyfont changes (switched) this wil lchange as well; implementing - % a global lineheight is tricky: should we take the bodyfont ils or the one set + % beware, when the bodyfont changes (switched) this will change as well; implementing + % a global lineheight is tricky: should we take the bodyfont interlinespace or the one set % independent of the bodyfont (before or after a layout spec); way too fuzzy, so we % stick to the current method (after a night of experimenting ...2003/10/13) - \global\zethoogte\layoutparameter\c!regels\lineheight + \global\makeupheight\layoutparameter\c!lines\lineheight % new, cleaner - \global\advance\zethoogte-\strutheight - \global\advance\zethoogte \topskip + \global\advance\makeupheight-\strutheight + \global\advance\makeupheight \topskip % new, was a bug - \global\advance\zethoogte \hoofdafstand - \global\advance\zethoogte \voetafstand + \global\advance\makeupheight \headerdistance + \global\advance\makeupheight \footerdistance % so far - \global\advance\zethoogte \hoofdhoogte - \global\advance\zethoogte \voethoogte + \global\advance\makeupheight \headerheight + \global\advance\makeupheight \footerheight \fi - \rugoffset\layoutparameter\c!rugoffset - \kopoffset\layoutparameter\c!kopoffset - \global\setdimentoatleast\zetbreedte\onepoint - \global\setdimentoatleast\zethoogte \onepoint + \rugoffset\layoutparameter\c!horoffset + \kopoffset\layoutparameter\c!veroffset + \global\setdimentoatleast\makeupwidth\onepoint + \global\setdimentoatleast\makeupheight \onepoint % \checkcurrentlayout % here ? % \the\everyafterlayout + \calculatelayoutextras \calculatehsizes \calculatevsizes \calculatepseudocolumns @@ -631,11 +578,11 @@ \recalculatebackgrounds} \def\calculatepseudocolumns - {\global\layoutcolumns\layoutparameter\c!kolommen - \global\layoutcolumndistance\layoutparameter\c!kolomafstand + {\global\layoutcolumns\layoutparameter\c!columns + \global\layoutcolumndistance\layoutparameter\c!columndistance \global\layoutcolumnwidth-\layoutcolumns\layoutcolumndistance \global\advance\layoutcolumnwidth\layoutcolumndistance - \global\advance\layoutcolumnwidth\zetbreedte + \global\advance\layoutcolumnwidth\makeupwidth \global\divide\layoutcolumnwidth\layoutcolumns \dorecurse\layoutcolumns {\scratchdimen\layoutcolumnwidth @@ -653,30 +600,10 @@ {\executeifdefined{\??ly:c:#1}\!!zeropoint} \def\checklayout - {\ifdim\zethoogte=\layoutlines\lineheight \else \recalculatelayout \fi} + {\ifdim\makeupheight=\layoutlines\lineheight \else \recalculatelayout \fi} \appendtoks \checklayout \to \everystarttext -% \def\checkcurrentlayout % public and used in naw, so keep this name -% {\ifundefined{\??ly\realfolio\c!status}% -% \doifoddpageelse\checkcurrentoddlayout\checkcurrentevenlayout -% \else -% \doifvalue{\??ly\realfolio\c!status}\v!start -% {\edef\currentlayout{\realfolio}\recalculatelayout}% -% \fi} - -% \def\checkcurrentoddlayout -% {\ifundefined{\??ly\v!oneven\c!status}\else -% \doifvalue{\??ly\v!oneven\c!status}\v!start -% {\let\currentlayout\v!oneven\recalculatelayout}% -% \fi} - -% \def\checkcurrentevenlayout -% {\ifundefined{\??ly\v!even\c!status}\else -% \doifvalue{\??ly\v!even\c!status}\v!start -% {\let\currentlayout\v!even\recalculatelayout}% -% \fi} - % document: % % \setuplayout[odd][state=stop] \setuplayout[even][state=stop] \setuplayout[page] @@ -684,22 +611,22 @@ % \startstandardmakeup[page=blank] ... \stopstandardmakeup \def\checkcurrentlayout % public and used in naw, so keep this name - {\ifundefined{\??ly\realfolio\c!status}% + {\ifundefined{\??ly\realfolio\c!state}% \doifoddpageelse\checkcurrentoddlayout\checkcurrentevenlayout \else - \doifvalue{\??ly\realfolio\c!status}\v!start + \doifvalue{\??ly\realfolio\c!state}\v!start {\xdef\currentlayout{\realfolio}\recalculatelayout}% new, global \fi} \def\checkcurrentoddlayout - {\ifundefined{\??ly\v!oneven\c!status}\else - \doifvalue{\??ly\v!oneven\c!status}\v!start - {\globallet\currentlayout\v!oneven\recalculatelayout}% new, global + {\ifundefined{\??ly\v!odd\c!state}\else + \doifvalue{\??ly\v!odd\c!state}\v!start + {\globallet\currentlayout\v!odd\recalculatelayout}% new, global \fi} \def\checkcurrentevenlayout - {\ifundefined{\??ly\v!even\c!status}\else - \doifvalue{\??ly\v!even\c!status}\v!start + {\ifundefined{\??ly\v!even\c!state}\else + \doifvalue{\??ly\v!even\c!state}\v!start {\globallet\currentlayout\v!even\recalculatelayout}% new, global \fi} @@ -710,20 +637,20 @@ \def\presetcenterpagebox % in \setuplayout !!!!!!!!!!!!!!!! {\doublesidedprintfalse \ExpandFirstAfter\processallactionsinset - [\@@lyplaats] - [ \v!midden=>{\setuppapersize[\c!links=\hss,\c!rechts=\hss,\c!boven=\vss,\c!onder=\vss]}, - \v!links=>{\setuppapersize[\c!links=,\c!rechts=\hss]}, - \v!rechts=>{\setuppapersize[\c!links=\hss,\c!rechts=]}, - \v!onder=>{\setuppapersize[\c!boven=\vss,\c!onder=]}, - \v!boven=>{\setuppapersize[\c!boven=,\c!onder=\vss]},% - \v!dubbelzijdig=>\doublesidedprinttrue, - \v!enkelzijdig=>\doublesidedprintfalse]} + [\@@lylocation] + [ \v!middle=>{\setuppapersize[\c!left=\hss,\c!right=\hss,\c!top=\vss,\c!bottom=\vss]}, + \v!left=>{\setuppapersize[\c!left=,\c!right=\hss]}, + \v!right=>{\setuppapersize[\c!left=\hss,\c!right=]}, + \v!bottom=>{\setuppapersize[\c!top=\vss,\c!bottom=]}, + \v!top=>{\setuppapersize[\c!top=,\c!bottom=\vss]},% + \v!doublesided=>\doublesidedprinttrue, + \v!singlesided=>\doublesidedprintfalse]} \def\definelayout {\dodoubleargument\dodefinelayout} \def\dodefinelayout[#1][#2]% - {\getparameters[\??ly#1][\c!status=\v!start,#2]} + {\getparameters[\??ly#1][\c!state=\v!start,#2]} \def\dodosetuplayout[#1][#2]% {\ConvertToConstant\doifnot{#2}\v!reset % #2 ? @@ -761,16 +688,16 @@ \def\setuplayout {\dodoubleempty\dosetuplayout} -\let\@@zahoogte=\!!zeropoint +\let\@@zaheight=\!!zeropoint \def\dopushpagedimensions - {\xdef\oldteksthoogte{\the\teksthoogte}% - \xdef\oldvoethoogte {\the\voethoogte}% - \global\let\@@zahoogte\@@zahoogte} + {\xdef\oldtextheight {\the\textheight }% + \xdef\oldfooterheight{\the\footerheight}% + \global\let\@@zaheight\@@zaheight} \def\dopoppagedimensions - {\global\teksthoogte\oldteksthoogte - \global\voethoogte\oldvoethoogte + {\global\textheight \oldtextheight + \global\footerheight\oldfooterheight \recalculatelayout \global\let\pushpagedimensions\dopushpagedimensions \global\let\poppagedimensions\relax} @@ -799,26 +726,26 @@ \def\reportpagedimensions {\ifx\poppagedimensions\relax \else - \spatie\@@zahoogte\space-\space + \space\@@zaheight\space-\space \fi \realfolio} -\def\dodopaslayoutaan[#1]% - {\getparameters[\??za][\c!hoogte=,\c!regels=0,#1]% +\def\dodoadaptlayout[#1]% + {\getparameters[\??za][\c!height=,\c!lines=0,#1]% \pushpagedimensions - \ifcase\@@zaregels\relax - \showmessage\m!layouts1{\@@zahoogte,\realfolio}% + \ifcase\@@zalines\relax + \showmessage\m!layouts1{\@@zaheight,\realfolio}% \else - \showmessage\m!layouts1{\@@zaregels\space\v!regels,\realfolio}% - \def\@@zahoogte{\@@zaregels\openlineheight}% + \showmessage\m!layouts1{\@@zalines\space\v!lines,\realfolio}% + \def\@@zaheight{\@@zalines\openlineheight}% \fi - \doifelse\@@zahoogte\v!max - {\balancedimensions\teksthoogte\voethoogte\voethoogte} - {\balancedimensions\teksthoogte\voethoogte\@@zahoogte}% - \ifdim\voethoogte<\zeropoint - \global\advance\teksthoogte \voethoogte - \global\voethoogte\zeropoint - \global\xdef\@@zahoogte{\layoutparameter\c!voet\spatie(\v!max)}% + \doifelse\@@zaheight\v!max + {\balancedimensions\textheight\footerheight\footerheight} + {\balancedimensions\textheight\footerheight\@@zaheight}% + \ifdim\footerheight<\zeropoint + \global\advance\textheight \footerheight + \global\footerheight\zeropoint + \global\xdef\@@zaheight{\layoutparameter\c!footer\space(\v!max)}% \fi \setvsize \global\pagegoal\vsize % nog corrigeren voor insertions ? @@ -827,17 +754,17 @@ \global\let\pushpagedimensions\relax \global\let\poppagedimensions\dopoppagedimensions} -\def\dopaslayoutaan[#1][#2]% +\def\doadaptlayout[#1][#2]% {\doifelsenothing{#2} - {\dodopaslayoutaan[#1]} + {\dodoadaptlayout[#1]} {\def\docommando##1% {\addtocommalist{##1}\adaptedpages - \setgvalue{\??za##1}{\dodopaslayoutaan[#2]}}% + \setgvalue{\??za##1}{\dodoadaptlayout[#2]}}% \processcommalist[#1]\docommando \adaptpagedimensions}} -\def\paslayoutaan% - {\dodoubleempty\dopaslayoutaan} +\def\adaptlayout + {\dodoubleempty\doadaptlayout} % describe interface @@ -846,19 +773,19 @@ %D {right} parameters. \def\centerpagebox#1% - {\printpapierbreedte\paperscale\printpapierbreedte - \printpapierhoogte \paperscale\printpapierhoogte - \setbox#1\vbox to \printpapierhoogte - {\@@ppboven - \hbox to \printpapierbreedte + {\printpaperwidth\paperscale\printpaperwidth + \printpaperheight \paperscale\printpaperheight + \setbox#1\vbox to \printpaperheight + {\@@pptop + \hbox to \printpaperwidth {\ifdoublesidedprint - \doifbothsides \@@pplinks \box#1\@@pprechts - \orsideone \@@pplinks \box#1\@@pprechts - \orsidetwo \@@pprechts\box#1\@@pplinks - \od \else \@@pplinks \box#1\@@pprechts + \doifbothsides \@@ppleft \box#1\@@ppright + \orsideone \@@ppleft \box#1\@@ppright + \orsidetwo \@@ppright\box#1\@@ppleft + \od \else \@@ppleft \box#1\@@ppright \fi}% \par - \@@pponder}} + \@@ppbottom}} \def\offsetprintbox#1% {\ifdim\kopoffset=\zeropoint % \relax @@ -945,11 +872,11 @@ {\mirrorpagebodybox{#1}\printmirror} \def\scalepagebox#1% - {\ifdim\@@lyschaal\points=\onepoint \else + {\ifdim\@@lyscale\points=\onepoint \else \setbox#1\vbox - {\schaal[\c!sx=\@@lyschaal,\c!sy=\@@lyschaal]{\box#1}}% - \papierbreedte\@@lyschaal\papierbreedte - \papierhoogte \@@lyschaal\papierhoogte + {\scale[\c!sx=\@@lyscale,\c!sy=\@@lyscale]{\box#1}}% + \paperwidth\@@lyscale\paperwidth + \paperheight \@@lyscale\paperheight \fi} \def\negateprintbox#1% @@ -962,27 +889,6 @@ \let\pagecutmarktoptext \empty \let\pagecutmarkbottomtext \empty -% \def\addpagecutmarks#1% -% {\doif\@@lymarkering\v!aan -% {\let\cutmarksymbol\pagecutmarksymbol -% \let\cutmarklength\pagecutmarklength -% \makecutbox{#1}}} - -% \def\addpagecolormarks % #1 -% {\doifelse\@@lymarkering\v!kleur -% {\doaddpagecolormarks\colormarkbox} -% {\doifelse\@@lymarkering\v!raster -% {\doaddpagecolormarks\rastermarkbox} -% {\gobbleoneargument}}} - -% \def\doaddpagecolormarks#1#2% -% {\let\cutmarksymbol\pagecutmarksymbol -% \let\cutmarklength\pagecutmarklength -% \makecutbox{#2}% -% \ifnum\horizontalcutmarks>2 \chardef\colormarkoffset4 \fi -% \ifnum\verticalcutmarks >2 \chardef\colormarkoffset4 \fi -% #1{#2}} - \def\extrapagecutmarkbottomtext {\rlap{\jobname}\hfill\currentdate\space-\space\currenttime\hfill\llap{\realfolio}} @@ -994,18 +900,18 @@ \makecutbox} \def\addpagecutmarks % #1 - {\doifelse\@@lymarkering\v!aan + {\doifelse\@@lymarking\v!on \makepagecutbox - {\doifelse\@@lymarkering\v!tekst + {\doifelse\@@lymarking\v!text {\let\pagecutmarksymbol\empty \let\pagecutmarkbottomtext\extrapagecutmarkbottomtext \makepagecutbox} \gobbleoneargument}} \def\addpagecolormarks % #1 - {\doifelse\@@lymarkering\v!kleur + {\doifelse\@@lymarking\v!color {\doaddpagecolormarks\colormarkbox} - {\doifelse\@@lymarkering\v!raster + {\doifelse\@@lymarking\v!screen {\doaddpagecolormarks\rastermarkbox} \gobbleoneargument}} @@ -1019,10 +925,10 @@ \newif\ifenkelzijdig \enkelzijdigtrue \def\doifsometextlineelse#1% - {\edef\!!stringa{\csname\??tk#1\c!status\endcsname}% - \ifx\!!stringa\v!geen + {\edef\!!stringa{\csname\??tk#1\c!state\endcsname}% + \ifx\!!stringa\v!none \@EA\secondoftwoarguments - \else\ifx\!!stringa\v!hoog + \else\ifx\!!stringa\v!high \@EAEAEA\secondoftwoarguments \else \@EAEAEA\firstoftwoarguments @@ -1031,48 +937,48 @@ % NOG EENS NAGAAN WANNEER NU GLOBAL EN WANNEER NIET \def\calculatevsizes % global needed in \recalculatelayoutregel - {\redoglobal\teksthoogte\zethoogte - \doifsometextlineelse \v!hoofd - {\redoglobal\advance\teksthoogte -\hoofdhoogte - \redoglobal\advance\teksthoogte -\hoofdafstand}% + {\redoglobal\textheight\makeupheight + \doifsometextlineelse \v!header + {\redoglobal\advance\textheight -\headerheight + \redoglobal\advance\textheight -\headerdistance}% \donothing - \doifsometextlineelse \v!voet - {\redoglobal\advance\teksthoogte -\voethoogte - \redoglobal\advance\teksthoogte -\voetafstand}% + \doifsometextlineelse \v!footer + {\redoglobal\advance\textheight -\footerheight + \redoglobal\advance\textheight -\footerdistance}% \donothing - \ifzeropt\hoofdhoogte - \resetsystemmode\v!hoofd + \ifzeropt\headerheight + \resetsystemmode\v!header \else - \setsystemmode\v!hoofd + \setsystemmode\v!header \fi - \ifzeropt\voethoogte - \resetsystemmode\v!voet + \ifzeropt\footerheight + \resetsystemmode\v!footer \else - \setsystemmode\v!voet + \setsystemmode\v!footer \fi \resetglobal \setvsize} \def\calculatereducedvsizes - {\teksthoogte\zethoogte - \doifsometextlineelse \v!hoofd - {\advance\teksthoogte -\hoofdhoogte - \advance\teksthoogte -\hoofdafstand}% - {\hoofdhoogte\zeropoint + {\textheight\makeupheight + \doifsometextlineelse \v!header + {\advance\textheight -\headerheight + \advance\textheight -\headerdistance}% + {\headerheight\zeropoint \setlayoutdistances}% - \doifsometextlineelse \v!voet - {\advance\teksthoogte -\voethoogte - \advance\teksthoogte -\voetafstand}% - {\voethoogte\zeropoint + \doifsometextlineelse \v!footer + {\advance\textheight -\footerheight + \advance\textheight -\footerdistance}% + {\footerheight\zeropoint \setlayoutdistances}} -\def\freezetextwidth % \zetbreedte may be set to \tekstbreedte - {\tekstbreedte\zetbreedte % which is a tricky but valid value - \doifsomething{\layoutparameter\c!tekstbreedte}% - {\tekstbreedte\layoutparameter\c!tekstbreedte}% % local - \doifsomething{\layoutparameter\c!tekstmarge}% - {\advance\tekstbreedte-\layoutparameter\c!tekstmarge % local - \advance\tekstbreedte-\layoutparameter\c!tekstmarge}} % local +\def\freezetextwidth % \makeupwidth may be set to \textwidth + {\textwidth\makeupwidth % which is a tricky but valid value + \doifsomething{\layoutparameter\c!textwidth}% + {\textwidth\layoutparameter\c!textwidth}% % local + \doifsomething{\layoutparameter\c!textmargin}% + {\advance\textwidth-\layoutparameter\c!textmargin % local + \advance\textwidth-\layoutparameter\c!textmargin}} % local \def\calculatehsizes {\freezetextwidth @@ -1138,52 +1044,31 @@ \def\settexthoffset {\doifbothsides - \texthoffset\rugwit + \texthoffset\backspace \orsideone - \texthoffset\rugwit + \texthoffset\backspace \orsidetwo - \texthoffset\papierbreedte - \advance\texthoffset-\rugwit - \advance\texthoffset-\zetbreedte + \texthoffset\paperwidth + \advance\texthoffset-\backspace + \advance\texthoffset-\makeupwidth \od} \def\goleftonpage - {\hskip-\linkermargeafstand - \hskip-\linkermargebreedte - \hskip-\linkerrandafstand - \hskip-\linkerrandbreedte} - -\iffixedlayoutdimensions - - \def\doswapmargins - {\let\doswapmargins\relax % to prevent local swapping - \swapdimens\linkermargeafstand\rechtermargeafstand - \swapdimens\linkerrandafstand \rechterrandafstand - \swapdimens\linkermargebreedte\rechtermargebreedte - \swapdimens\linkerrandbreedte \rechterrandbreedte} - -\else - - \def\dodoswapmargins#1#2% - {\edef\!!stringa{\layoutparameter#1}% - \edef\!!stringb{\layoutparameter#2}% - \letvalue{\??ly\currentlayout#1}\!!stringb - \letvalue{\??ly\currentlayout#2}\!!stringa} - - \def\doswapmargins - {\let\doswapmargins\relax % to prevent local swapping - \dodoswapmargins\c!linkermargeafstand\c!rechtermargeafstand - \dodoswapmargins\c!linkerrandafstand \c!rechterrandafstand - \swapdimens\linkermargebreedte\rechtermargebreedte - \swapdimens\linkerrandbreedte \rechterrandbreedte} - -\fi + {\hskip-\leftmargindistance + \hskip-\leftmarginwidth + \hskip-\leftedgedistance + \hskip-\leftedgewidth} \def\doifmarginswapelse#1#2% {\doifbothsides#1\orsideone#1\orsidetwo#2\od} \def\swapmargins {\doifmarginswapelse\relax\doswapmargins} + +\def\doswapmargins + {\let\swapmargins \relax % to prevent local swapping + \let\doswapmargins\relax % to prevent local swapping + \the\everyswapmargins} \def\rightorleftpageaction {\ifdubbelzijdig @@ -1196,38 +1081,28 @@ \@EA\firstoftwoarguments \fi} -\def\outermarginwidth - {\rightorleftpageaction\rechtermargebreedte\linkermargebreedte} -\def\innermarginwidth - {\rightorleftpageaction\linkermargebreedte \rechtermargebreedte} -\def\outermargindistance - {\rightorleftpageaction\rechtermargeafstand\linkermargeafstand} -\def\innermargindistance - {\rightorleftpageaction\linkermargeafstand \rechtermargeafstand} - -\def\outeredgewidth - {\rightorleftpageaction\rechterrandbreedte\linkerrandbreedte} -\def\inneredgewidth - {\rightorleftpageaction\linkerrandbreedte \rechterrandbreedte} -\def\outeredgedistance - {\rightorleftpageaction\rechterrandafstand\linkerrandafstand} -\def\inneredgedistance - {\rightorleftpageaction\linkerrandafstand \rechterrandafstand} - -\def\outerspacewidth - {\rightorleftpageaction\snijwit\rugwit} -\def\innerspacewidth - {\rightorleftpageaction\rugwit\snijwit} +\def\outermarginwidth {\rightorleftpageaction\rightmarginwidth\leftmarginwidth } +\def\innermarginwidth {\rightorleftpageaction\leftmarginwidth \rightmarginwidth} +\def\outermargindistance{\rightorleftpageaction\rightmargindistance\leftmargindistance } +\def\innermargindistance{\rightorleftpageaction\leftmargindistance \rightmargindistance} + +\def\outeredgewidth {\rightorleftpageaction\rightedgewidth\leftedgewidth } +\def\inneredgewidth {\rightorleftpageaction\leftedgewidth \rightedgewidth} +\def\outeredgedistance {\rightorleftpageaction\rightedgedistance\leftedgedistance } +\def\inneredgedistance {\rightorleftpageaction\leftedgedistance \rightedgedistance} + +\def\outerspacewidth {\rightorleftpageaction\cutspace\backspace } +\def\innerspacewidth {\rightorleftpageaction\backspace \cutspace} \beginETEX \dimexpr - \def\leftmargintotal {\dimexpr(\linkermargebreedte +\linkermargeafstand )} - \def\rightmargintotal{\dimexpr(\rechtermargebreedte+\rechtermargeafstand)} - \def\leftedgetotal {\dimexpr(\linkerrandbreedte +\linkerrandafstand )} - \def\rightedgetotal {\dimexpr(\rechterrandbreedte +\rechterrandafstand )} + \def\leftmargintotal {\dimexpr(\leftmarginwidth +\leftmargindistance )} + \def\rightmargintotal{\dimexpr(\rightmarginwidth+\rightmargindistance)} + \def\leftedgetotal {\dimexpr(\leftedgewidth +\leftedgedistance )} + \def\rightedgetotal {\dimexpr(\rightedgewidth +\rightedgedistance )} - \def\leftsidetotal {\dimexpr(\linkermargebreedte +\leftedgetotal )} - \def\rightsidetotal {\dimexpr(\rechtermargebreedte+\rightedgetotal)} + \def\leftsidetotal {\dimexpr(\leftmarginwidth +\leftedgetotal )} + \def\rightsidetotal {\dimexpr(\rightmarginwidth+\rightedgetotal)} \def\leftcombitotal {\dimexpr(\leftmargintotal +\leftedgetotal )} \def\rightcombitotal {\dimexpr(\rightmargintotal+\rightedgetotal)} @@ -1274,7 +1149,7 @@ %D \showsetup{\y!showframe} %D \showsetup{\y!showlayout} %D \showsetup{\y!showsetups} -%D \showsetup{\y!showmargins} +%D %showsetup{\y!showmargins} \fetchruntimecommand \showprint {page-run} \fetchruntimecommand \showframe {page-run} @@ -1297,53 +1172,55 @@ %D depending on the current font setting. \setuplayout - [ \c!kopwit=.08417508418\papierhoogte, % 2.5cm - \c!boven=\!!zeropoint, - \c!bovenafstand=\!!zeropoint, - \c!hoofd=.06734006734\papierhoogte, % 2.0cm - \c!hoofdafstand=\!!zeropoint, - \c!hoogte=.84175084175\papierhoogte, % 25.0cm - \c!voetafstand=\layoutparameter\c!hoofdafstand, - \c!voet=.06734006734\papierhoogte, % 2.0cm - \c!onderafstand=\layoutparameter\c!bovenafstand, - \c!onder=\!!zeropoint, - \c!rugwit=.11904761905\papierbreedte, % 2.5cm - \c!rand=\!!zeropoint, - \c!randafstand=\layoutparameter\c!margeafstand, - \c!marge=.12649983170\papierbreedte, % snijwit-2*afstand - \c!margeafstand=.02008341748\papierbreedte, % 12.0pt - \c!linkerrand=\layoutparameter\c!rand, - \c!linkerrandafstand=\layoutparameter\c!randafstand, - \c!linkermarge=\layoutparameter\c!marge, - \c!linkermargeafstand=\layoutparameter\c!margeafstand, - \c!breedte=.71428571429\papierbreedte, % 15.0cm - \c!rechtermargeafstand=\layoutparameter\c!margeafstand, - \c!rechtermarge=\layoutparameter\c!marge, - \c!rechterrandafstand=\layoutparameter\c!randafstand, - \c!rechterrand=\layoutparameter\c!rand, - \c!kopoffset=\!!zeropoint, - \c!rugoffset=\!!zeropoint, - \c!tekstbreedte=, % dangerous option -> centered / local - \c!tekstmarge=, % dangerous option -> both sides - \c!tekstafstand=\!!zeropoint, % shift down on grid - \c!letter=, - \c!kleur=, - \c!markering=\v!uit, - \c!plaats=, % \v!enkelzijdig, but empty is signal - \c!schaal=1, - \c!nx=1, - \c!ny=1, - \c!dx=\!!zeropoint, - \c!dy=\!!zeropoint, - \c!grid=\v!nee, - \c!preset=, - \c!setups=\systemsetupsprefix\s!default, - \c!clipoffset=\!!zeropoint, - \c!regels=0, - \c!kolommen=1, - \c!kolomafstand=\!!zeropoint, - \c!snijwit=\!!zeropoint, - \c!bodemwit=\!!zeropoint] + [ \c!topspace=.08417508418\paperheight, % 2.5cm + \c!top=\!!zeropoint, + \c!topdistance=\!!zeropoint, + \c!header=.06734006734\paperheight, % 2.0cm + \c!headerdistance=\!!zeropoint, + \c!height=.84175084175\paperheight, % 25.0cm + \c!footerdistance=\layoutparameter\c!headerdistance, + \c!footer=.06734006734\paperheight, % 2.0cm + \c!bottomdistance=\layoutparameter\c!topdistance, + \c!bottom=\!!zeropoint, + \c!backspace=.11904761905\paperwidth, % 2.5cm + \c!edge=\!!zeropoint, + \c!edgedistance=\layoutparameter\c!margindistance, + \c!margin=.12649983170\paperwidth, % snijwit-2*afstand + \c!margindistance=.02008341748\paperwidth, % 12.0pt + \c!leftedge=\layoutparameter\c!edge, + \c!leftedgedistance=\layoutparameter\c!edgedistance, + \c!leftmargin=\layoutparameter\c!margin, + \c!leftmargindistance=\layoutparameter\c!margindistance, + \c!width=.71428571429\paperwidth, % 15.0cm + \c!rightmargindistance=\layoutparameter\c!margindistance, + \c!rightmargin=\layoutparameter\c!margin, + \c!rightedgedistance=\layoutparameter\c!edgedistance, + \c!rightedge=\layoutparameter\c!edge, + \c!veroffset=\!!zeropoint, + \c!bottomspace=\!!zeropoint, + \c!horoffset=\!!zeropoint, + \c!cutspace=\!!zeropoint, + \c!textwidth=, % dangerous option -> centered / local + \c!textmargin=, % dangerous option -> both sides + \c!textdistance=\!!zeropoint, % shift down on grid + \c!style=, + \c!color=, + \c!marking=\v!off, + \c!location=, % \v!singlesided, but empty is signal + \c!scale=1, + \c!nx=1, + \c!ny=1, + \c!dx=\!!zeropoint, + \c!dy=\!!zeropoint, + \c!grid=\v!no, + \c!preset=, + \c!setups=\systemsetupsprefix\s!default, + \c!clipoffset=\!!zeropoint, + \c!lines=0, + \c!paper=, % for foxet + \c!page=, % for foxet + \c!columns=1, + \c!columndistance=\!!zeropoint] %D First we define a whole range of (DIN) papersizes, %D of which the A-series makes most sense. We enable checking. @@ -1352,106 +1229,119 @@ %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!width=\zeropoint, + \c!height=\zeropoint, + \c!topspace=\zeropoint, + \c!backspace=\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] -\definepapersize [A2] [\c!breedte=420mm,\c!hoogte=594mm] -\definepapersize [A3] [\c!breedte=297mm,\c!hoogte=420mm] -\definepapersize [A4] [\c!breedte=210mm,\c!hoogte=297mm] -\definepapersize [A5] [\c!breedte=148mm,\c!hoogte=210mm] -\definepapersize [A6] [\c!breedte=105mm,\c!hoogte=148mm] -\definepapersize [A7] [\c!breedte=74mm,\c!hoogte=105mm] -\definepapersize [A8] [\c!breedte=52mm,\c!hoogte=74mm] -\definepapersize [A9] [\c!breedte=37mm,\c!hoogte=52mm] - -\definepapersize [B0] [\c!breedte=1000mm,\c!hoogte=1414mm] -\definepapersize [B1] [\c!breedte=707mm,\c!hoogte=1000mm] -\definepapersize [B2] [\c!breedte=500mm,\c!hoogte=707mm] -\definepapersize [B3] [\c!breedte=354mm,\c!hoogte=500mm] -\definepapersize [B4] [\c!breedte=250mm,\c!hoogte=354mm] -\definepapersize [B5] [\c!breedte=177mm,\c!hoogte=250mm] -\definepapersize [B6] [\c!breedte=125mm,\c!hoogte=177mm] -\definepapersize [B7] [\c!breedte=88mm,\c!hoogte=125mm] -\definepapersize [B8] [\c!breedte=63mm,\c!hoogte=88mm] -\definepapersize [B9] [\c!breedte=44mm,\c!hoogte=63mm] - -\definepapersize [C0] [\c!breedte=917mm,\c!hoogte=1297mm] -\definepapersize [C1] [\c!breedte=649mm,\c!hoogte=917mm] -\definepapersize [C2] [\c!breedte=459mm,\c!hoogte=649mm] -\definepapersize [C3] [\c!breedte=324mm,\c!hoogte=459mm] -\definepapersize [C4] [\c!breedte=229mm,\c!hoogte=324mm] -\definepapersize [C5] [\c!breedte=162mm,\c!hoogte=229mm] -\definepapersize [C6] [\c!breedte=115mm,\c!hoogte=162mm] -\definepapersize [C7] [\c!breedte=81mm,\c!hoogte=115mm] -\definepapersize [C8] [\c!breedte=57mm,\c!hoogte=81mm] -\definepapersize [C9] [\c!breedte=40mm,\c!hoogte=57mm] + [\c!option=\v!max, + \c!top=, + \c!bottom=\vss, + \c!left=, + \c!right=\hss] + +\definepapersize [A0] [\c!width=841mm,\c!height=1189mm] +\definepapersize [A1] [\c!width=594mm,\c!height=841mm] +\definepapersize [A2] [\c!width=420mm,\c!height=594mm] +\definepapersize [A3] [\c!width=297mm,\c!height=420mm] +\definepapersize [A4] [\c!width=210mm,\c!height=297mm] +\definepapersize [A5] [\c!width=148mm,\c!height=210mm] +\definepapersize [A6] [\c!width=105mm,\c!height=148mm] +\definepapersize [A7] [\c!width=74mm,\c!height=105mm] +\definepapersize [A8] [\c!width=52mm,\c!height=74mm] +\definepapersize [A9] [\c!width=37mm,\c!height=52mm] +\definepapersize [A10] [\c!width=26mm,\c!height=37mm] + +\definepapersize [B0] [\c!width=1000mm,\c!height=1414mm] +\definepapersize [B1] [\c!width=707mm,\c!height=1000mm] +\definepapersize [B2] [\c!width=500mm,\c!height=707mm] +\definepapersize [B3] [\c!width=353mm,\c!height=500mm] % [\c!width=354mm,\c!height=500mm] +\definepapersize [B4] [\c!width=250mm,\c!height=353mm] % [\c!width=250mm,\c!height=354mm] +\definepapersize [B5] [\c!width=176mm,\c!height=250mm] % [\c!width=177mm,\c!height=250mm] +\definepapersize [B6] [\c!width=125mm,\c!height=176mm] % [\c!width=125mm,\c!height=177mm] +\definepapersize [B7] [\c!width=88mm,\c!height=125mm] +\definepapersize [B8] [\c!width=62mm,\c!height=88mm] % [\c!width=63mm,\c!height=88mm] +\definepapersize [B9] [\c!width=44mm,\c!height=62mm] % [\c!width=44mm,\c!height=63mm] +\definepapersize [B10] [\c!width=31mm,\c!height=44mm] + +\definepapersize [C0] [\c!width=917mm,\c!height=1297mm] +\definepapersize [C1] [\c!width=648mm,\c!height=917mm] % [\c!width=649mm,\c!height=917mm] +\definepapersize [C2] [\c!width=458mm,\c!height=648mm] % [\c!width=459mm,\c!height=649mm] +\definepapersize [C3] [\c!width=324mm,\c!height=458mm] % [\c!width=324mm,\c!height=459mm] +\definepapersize [C4] [\c!width=229mm,\c!height=324mm] +\definepapersize [C5] [\c!width=162mm,\c!height=229mm] +\definepapersize [C6] [\c!width=114mm,\c!height=162mm] % [\c!width=115mm,\c!height=162mm] +\definepapersize [C7] [\c!width=81mm,\c!height=114mm] % [\c!width=81mm,\c!height=115mm] +\definepapersize [C8] [\c!width=57mm,\c!height=81mm] +\definepapersize [C9] [\c!width=40mm,\c!height=57mm] +\definepapersize [C10] [\c!width=28mm,\c!height=40mm] + +%D Per August 2004 the rounding of some (seldom used) sizes +%D were corrected top the latest DIN specifications. Peter +%D Rolf came up with these and a few more missing sizes. +%D Watch out: spaces and slashes! + +\definepapersize [4 A0] [\c!width=1682mm,\c!height=2378mm] +\definepapersize [2 A0] [\c!width=1189mm,\c!height=1682mm] +\definepapersize [C6/C5] [\c!width=114mm,\c!height=229mm] %D Because there are no standardized screen sizes, we define %D a bunch of sizes with $4:3$ ratios. The \type {S6} size is %D nearly as wide as a sheet of \type {A4} paper. -\definepapersize [S3] [\c!breedte=300pt,\c!hoogte=225pt] -\definepapersize [S4] [\c!breedte=400pt,\c!hoogte=300pt] -\definepapersize [S5] [\c!breedte=500pt,\c!hoogte=375pt] -\definepapersize [S6] [\c!breedte=600pt,\c!hoogte=450pt] -\definepapersize [S8] [\c!breedte=800pt,\c!hoogte=600pt] -\definepapersize [SW] [\c!breedte=800pt,\c!hoogte=450pt] -\definepapersize [SM] [\c!breedte=720pt,\c!hoogte=450pt] +\definepapersize [S3] [\c!width=300pt,\c!height=225pt] +\definepapersize [S4] [\c!width=400pt,\c!height=300pt] +\definepapersize [S5] [\c!width=500pt,\c!height=375pt] +\definepapersize [S6] [\c!width=600pt,\c!height=450pt] +\definepapersize [S8] [\c!width=800pt,\c!height=600pt] +\definepapersize [SW] [\c!width=800pt,\c!height=450pt] +\definepapersize [SM] [\c!width=720pt,\c!height=450pt] %D These are handy too: -\definepapersize [S33] [\c!breedte=300pt,\c!hoogte=300pt] -\definepapersize [S44] [\c!breedte=400pt,\c!hoogte=400pt] -\definepapersize [S55] [\c!breedte=500pt,\c!hoogte=500pt] -\definepapersize [S66] [\c!breedte=600pt,\c!hoogte=600pt] +\definepapersize [S33] [\c!width=300pt,\c!height=300pt] +\definepapersize [S44] [\c!width=400pt,\c!height=400pt] +\definepapersize [S55] [\c!width=500pt,\c!height=500pt] +\definepapersize [S66] [\c!width=600pt,\c!height=600pt] %D One may wonder if \TEX\ should be used for typesetting %D \CDROM\ covers, but it does not hurt to have the paper size %D ready. -\definepapersize [CD] [\c!breedte=120mm,\c!hoogte=120mm] +\definepapersize [CD] [\c!width=120mm,\c!height=120mm] %D The next series is for our English speaking friends who %D decided to stick to non metric values. Thanks to Nelson %D Beebe for completing the inch based list. -\definepapersize [letter] [\c!breedte=8.5in,\c!hoogte=11in] -\definepapersize [ledger] [\c!breedte=11in,\c!hoogte=17in] -\definepapersize [tabloid] [\c!breedte=17in,\c!hoogte=11in] +\definepapersize [letter] [\c!width=8.5in,\c!height=11in] +\definepapersize [ledger] [\c!width=11in,\c!height=17in] +\definepapersize [tabloid] [\c!width=17in,\c!height=11in] -\definepapersize [legal] [\c!breedte=8.5in,\c!hoogte=14in] -\definepapersize [folio] [\c!breedte=8.5in,\c!hoogte=13in] -\definepapersize [executive] [\c!breedte=7.25in,\c!hoogte=10.5in] +\definepapersize [legal] [\c!width=8.5in,\c!height=14in] +\definepapersize [folio] [\c!width=8.5in,\c!height=13in] +\definepapersize [executive] [\c!width=7.25in,\c!height=10.5in] -\definepapersize [A] [\c!breedte=8.5in,\c!hoogte=11in] % 1 sheet -\definepapersize [B] [\c!breedte=11in,\c!hoogte=17in] % 2 sheets -\definepapersize [C] [\c!breedte=17in,\c!hoogte=22in] % 4 sheets +\definepapersize [A] [\c!width=8.5in,\c!height=11in] % 1 sheet +\definepapersize [B] [\c!width=11in,\c!height=17in] % 2 sheets +\definepapersize [C] [\c!width=17in,\c!height=22in] % 4 sheets %D The next set is for Tobias Burnus, who gave me the sizes. -\definepapersize [envelope 9] [\c!breedte=8.88in,\c!hoogte=3.88in] -\definepapersize [envelope 10] [\c!breedte=9.5in,\c!hoogte=4.13in] -\definepapersize [envelope 11] [\c!breedte=10.38in,\c!hoogte=4.5in] -\definepapersize [envelope 12] [\c!breedte=11.0in,\c!hoogte=4.75in] -\definepapersize [envelope 14] [\c!breedte=11.5in,\c!hoogte=5.0in] -\definepapersize [monarch] [\c!breedte=7.5in,\c!hoogte=3.88in] -\definepapersize [check] [\c!breedte=8.58in,\c!hoogte=3.88in] -\definepapersize [DL] [\c!breedte=220mm,\c!hoogte=110mm] +\definepapersize [envelope 9] [\c!width=8.88in,\c!height=3.88in] +\definepapersize [envelope 10] [\c!width=9.5in,\c!height=4.13in] +\definepapersize [envelope 11] [\c!width=10.38in,\c!height=4.5in] +\definepapersize [envelope 12] [\c!width=11.0in,\c!height=4.75in] +\definepapersize [envelope 14] [\c!width=11.5in,\c!height=5.0in] +\definepapersize [monarch] [\c!width=7.5in,\c!height=3.88in] +\definepapersize [check] [\c!width=8.58in,\c!height=3.88in] +\definepapersize [DL] [\c!width=110mm,\c!height=220mm] % [\c!width=220mm,\c!height=110mm] +\definepapersize [E4] [\c!width=280mm,\c!height=400mm] %D We can now default to a reasonable size. We match the print %D paper size with the typeset paper size. This setting should @@ -1466,46 +1356,46 @@ \definepapersize [oversized] - [\c!breedte=\dimexpr(\papierbreedte+1.5cm), - \c!hoogte=\dimexpr(\papierhoogte+1.5cm)] + [\c!width=\dimexpr(\paperwidth+1.5cm), + \c!height=\dimexpr(\paperheight+1.5cm)] \definepapersize [doublesized] - [\c!breedte=\dimexpr(\papierbreedte), - \c!hoogte=\dimexpr(2\papierhoogte)] + [\c!width=\dimexpr(\paperwidth), + \c!height=\dimexpr(2\paperheight)] \definepapersize [doubleoversized] - [\c!breedte=\dimexpr(\papierhoogte+1.5cm), - \c!hoogte=\dimexpr(2\papierbreedte+1.5cm)] + [\c!width=\dimexpr(\paperheight+1.5cm), + \c!height=\dimexpr(2\paperwidth+1.5cm)] \endETEX \definelayout - [\v!pagina] - [\c!rugwit=\zeropoint, - \c!snijwit=\zeropoint, - \c!kopwit=\zeropoint, - \c!bodemwit=\zeropoint, - \c!marge=\zeropoint, - \c!rand=\zeropoint, - \c!hoofd=\zeropoint, - \c!voet=\zeropoint, - \c!boven=\zeropoint, - \c!onder=\zeropoint, - \c!linkermarge=\zeropoint, - \c!rechtermarge=\zeropoint, - \c!linkerrand=\zeropoint, - \c!rechterrand=\zeropoint, - \c!tekstafstand=\zeropoint, - \c!breedte=\v!midden, - \c!hoogte=\v!midden, - \c!regels=0, - \c!grid=\v!nee] + [\v!page] + [\c!backspace=\zeropoint, + \c!cutspace=\zeropoint, + \c!topspace=\zeropoint, + \c!bottomspace=\zeropoint, + \c!margin=\zeropoint, + \c!edge=\zeropoint, + \c!header=\zeropoint, + \c!footer=\zeropoint, + \c!top=\zeropoint, + \c!bottom=\zeropoint, + \c!leftmargin=\zeropoint, + \c!rightmargin=\zeropoint, + \c!leftedge=\zeropoint, + \c!rightedge=\zeropoint, + \c!textdistance=\zeropoint, + \c!width=\v!middle, + \c!height=\v!middle, + \c!lines=0, + \c!grid=\v!no] \definelayout - [\v!midden] - [\c!breedte=\v!midden, - \c!hoogte=\v!midden] + [\v!middle] + [\c!width=\v!middle, + \c!height=\v!middle] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-lin.tex b/tex/context/base/page-lin.tex index 1d69d18e1..10f875fc0 100644 --- a/tex/context/base/page-lin.tex +++ b/tex/context/base/page-lin.tex @@ -15,35 +15,39 @@ \unprotect -\newif\ifinregels % \newif\ifregelnummersinmarge +\newif\ifnumberinglines +\newif\iftypesettinglines + +\newcount\linenumber +\newcount\linestepper \chardef\linenumberlocation=0 \newtoks\beforeeverylinenumbering \newtoks\aftereverylinenumbering -\def\stelregelsin +\def\setuplines {\dodoubleargument\getparameters[\??rg]} -\def\startregels - {\@@rgvoor - \witruimte - %\pagina[\v!voorkeur]} gaat mis na koppen, nieuw: later \nobreak +\def\startlines + {\@@rgbefore + \whitespace + %\page[\v!preference]} gaat mis na koppen, nieuw: later \nobreak \begingroup \def\@@rgstepyes{\parindent\zeropoint}% \def\@@rgstepno {\parindent\zeropoint}% \edef\@@rgparindent{\the\parindent}% \globallet\@@rglinesteptoggle\!!plusone \processaction - [\@@rginspringen] - [ \v!ja=>\def\@@rgstepyes{\parindent\@@rgparindent}% + [\@@rgindenting] + [ \v!yes=>\def\@@rgstepyes{\parindent\@@rgparindent}% \def\@@rgstepno {\parindent\@@rgparindent}, - \v!oneven=>\def\@@rgstepyes{\parindent\zeropoint }% + \v!odd=>\def\@@rgstepyes{\parindent\zeropoint }% \def\@@rgstepno {\parindent\@@rgparindent}, \v!even=>\def\@@rgstepno {\parindent\zeropoint }% \def\@@rgstepyes{\parindent\@@rgparindent}]% - \inregelstrue - \setupwhitespace[\v!geen]% + \typesettinglinestrue + \setupwhitespace[\v!none]% \obeylines \let\checkindentation\relax \@@rgstepno @@ -77,41 +81,37 @@ % \fi} % etex \def\dobetweenthelines - {\doifmeaningelse\next\obeyedline\@@rgtussen\donothing} + {\doifmeaningelse\next\obeyedline\@@rginbetween\donothing} -\def\stopregels +\def\stoplines {\endgroup - \@@rgna} - -\newcount\linenumber -\newcount\linestepper -\newif\ifinregelnummeren + \@@rgafter} % het gebruik van \setlocalreference scheelt een hash entry \def\dodoshowlinenumber % for use elsewhere, to be extended - {\doschrijfregelnummer + {\doplacelinenumber \global\advance\linenumber \plusone} -\def\regelweergave - {\@@rnlinks\convertnumber\@@rnconversie\linenumber\@@rnrechts} +\def\completelinenumber + {\@@rnleft\convertnumber\@@rnconversion\linenumber\@@rnright} -\def\dostelregelnummerenin[#1]% - {\getparameters[\??rn][\c!start=1,\c!stap=1,#1]% +\def\dosetuplinenumbering[#1]% + {\getparameters[\??rn][\c!start=1,\c!step=1,#1]% \global\linenumber\plusone} -\def\stelregelnummerenin - {\dosingleargument\dostelregelnummerenin} +\def\setuplinenumbering + {\dosingleargument\dosetuplinenumbering} \def\dostartnummerenLINE - {\EveryPar{\schrijfregelnummer}} + {\EveryPar{placelinenumber}} \def\dostopnummerenLINE {\the\aftereverylinenumbering \egroup} \def\dostartnummerenVERB - {\EveryLine{\schrijfregelnummer}} + {\EveryLine{\placelinenumber}} \def\dostopnummerenVERB {\the\aftereverylinenumbering @@ -119,31 +119,31 @@ \newevery \everylinenumber \relax -\def\dodoschrijfregelnummer +\def\dodoplacelinenumber {% beware of em's, the font is already switched ! \setbox\scratchbox\hbox - {\setbox0\hbox{\@@rncommando{\regelweergave}}\vsmashbox0% + {\setbox0\hbox{\@@rncommand{\completelinenumber}}\vsmashbox0% \ifcase\linenumberlocation - \rlap{\hbox to \@@rnbreedte{\box0\hss}}% was \llap, nog testen !! + \rlap{\hbox to \@@rnwidth{\box0\hss}}% was \llap, nog testen !! \or \inleftmargin {\forgetall - \doifelse\@@rnbreedte\v!marge - {\hsize\linkermargebreedte}{\hsize\@@rnbreedte}% - \alignedline\@@rnuitlijnen\v!rechts{\box0\hskip\@@rnafstand}}% + \doifelse\@@rnwidth\v!margin + {\hsize\leftmarginwidth}{\hsize\@@rnwidth}% + \alignedline\@@rnalign\v!right{\box0\hskip\@@rndistance}}% \else \inrightmargin {\forgetall - \doifelse\@@rnbreedte\v!marge - {\hsize\rechtermargebreedte}{\hsize\@@rnbreedte}% - \alignedline\@@rnuitlijnen\v!links{\hskip\@@rnafstand\box0}}% + \doifelse\@@rnwidth\v!margin + {\hsize\rightmarginwidth}{\hsize\@@rnwidth}% + \alignedline\@@rnalign\v!left{\hskip\@@rndistance\box0}}% \fi}% \vsmashbox\scratchbox \box\scratchbox \the\everylinenumber} -\def\complexstartregelnummeren[#1]% - {\doifnot{#1}\v!verder +\def\complexstartlinenumbering[#1]% + {\doifnot{#1}\v!continue {\doifnumberelse{#1} {\global\linenumber#1\relax} {\doifelsenothing\@@rnstart @@ -151,97 +151,85 @@ {\global\linenumber\@@rnstart}}}% \chardef\linenumberlocation\zerocount \processaction - [\@@rnplaats] - [ \v!inmarge=>\chardef\linenumberlocation1, - \v!inlinker=>\chardef\linenumberlocation1, - \v!inrechter=>\chardef\linenumberlocation2, - \v!marge=>\chardef\linenumberlocation1]% - % \v!tekst=>\chardef\linenumberlocation0, + [\@@rnlocation] + [ \v!inmargin=>\chardef\linenumberlocation1, + \v!inleft=>\chardef\linenumberlocation1, + \v!inright=>\chardef\linenumberlocation2, + \v!margin=>\chardef\linenumberlocation1]% + % \v!text=>\chardef\linenumberlocation0, %\s!unknown=>\chardef\linenumberlocation0, %\s!default=>\chardef\linenumberlocation0]% \ifcase\linenumberlocation % text - \advance\leftskip \@@rnbreedte\relax + \advance\leftskip \@@rnwidth\relax \fi \chardef\@@rn@@rnmethod - \ifprocessingverbatim0\else\ifinregels1\else2\fi\fi + \ifprocessingverbatim0\else\iftypesettinglines1\else2\fi\fi \processaction - [\@@rnmethode] + [\@@rnmethod] [ \v!type=>\chardef\@@rn@@rnmethod0, - \v!regel=>\chardef\@@rn@@rnmethod1, - \v!tekst=>\chardef\@@rn@@rnmethod2, + \v!line=>\chardef\@@rn@@rnmethod1, + \v!text=>\chardef\@@rn@@rnmethod2, \v!file=>\chardef\@@rn@@rnmethod3]% \ifcase\@@rn@@rnmethod % verbatim, line by line - \inregelstrue + \typesettinglinestrue \let\dostartnummeren\dostartnummerenVERB - \let\stopregelnummeren\dostopnummerenVERB - \def\schrijfregelnummer - {\doschrijfregelnummer + \let\stoplinenumbering\dostopnummerenVERB + \def\placelinenumber + {\doplacelinenumber \global\advance\linenumber \plusone}% \or % text, line by line \let\dostartnummeren\dostartnummerenLINE - \let\stopregelnummeren\dostopnummerenLINE - \def\schrijfregelnummer - {\doschrijfregelnummer + \let\stoplinenumbering\dostopnummerenLINE + \def\placelinenumber + {\doplacelinenumber \global\advance\linenumber \plusone}% \or % text, whole lot \let\dostartnummeren\dostartnummerenPAR - \let\stopregelnummeren\dostopnummerenPAR - \def\schrijfregelnummer + \let\stoplinenumbering\dostopnummerenPAR + \def\placelinenumber {\global\advance\linenumber \minusone - \doschrijfregelnummer}% + \doplacelinenumber}% \or % verbatim, selective line by line - \inregelstrue + \typesettinglinestrue \let\dostartnummeren\dostartnummerenVERB - \let\stopregelnummeren\dostopnummerenVERB - \def\schrijfregelnummer + \let\stoplinenumbering\dostopnummerenVERB + \def\placelinenumber {\global\linenumber\verbatimlinenumber - \doschrijfregelnummer}% + \doplacelinenumber}% \fi \dostartnummeren} -\def\startregelnummeren +\def\startlinenumbering {\bgroup \the\beforeeverylinenumbering - \inregelnummerentrue - \complexorsimpleempty\startregelnummeren} + \numberinglinestrue + \complexorsimpleempty\startlinenumbering} -\def\doschrijfregelnummer +\def\doplacelinenumber {\ifnum\linenumber<\@@rnstart\relax \else \!!counta\linenumber - \divide\!!counta \@@rnstap - \multiply\!!counta \@@rnstap\relax + \divide\!!counta \@@rnstep + \multiply\!!counta \@@rnstep\relax \ifnum\!!counta=\linenumber - \doattributes\??rn\c!letter\c!kleur\dodoschrijfregelnummer + \doattributes\??rn\c!style\c!color\dodoplacelinenumber \fi \fi} -\def\eenregel[#1]% - {\regelreferentie0[#1]\ignorespaces} - -\def\startregel[#1]% - {\regelreferentie1[#1]\ignorespaces} +\def\someline[#1]% + {\dolinereference0[#1]\ignorespaces} -\def\stopregel[#1]% - {\removelastspace\regelreferentie2[#1]} +\def\startline[#1]% + {\dolinereference1[#1]\ignorespaces} -% \def\inregellabel#1% -% {\doifinstringelse{--}{#1} -% {\labeltext{\v!regels}} -% {\labeltext{\v!regel}}} -% -% \def\inregel#1[#2]% -% {\doifelsenothing{#1} -% {\in{\inregellabel{\currenttextreference}}[\@@rnprefix#2]} -% {\in{#1}[\@@rnprefix#2]}} -% -% double labels: +\def\stopline[#1]% + {\removelastspace\dolinereference2[#1]} -\def\inregel#1[#2]% +\def\inline#1[#2]% {\doifelsenothing{#1} {\doifinstringelse{--}\currenttextreference - {\in{\leftlabeltext\v!regels}{\rightlabeltext\v!regels}[\@@rnprefix#2]} - {\in{\leftlabeltext\v!regel }{\rightlabeltext\v!regel }[\@@rnprefix#2]}} + {\in{\leftlabeltext\v!lines}{\rightlabeltext\v!lines}[\@@rnprefix#2]} + {\in{\leftlabeltext\v!line }{\rightlabeltext\v!line }[\@@rnprefix#2]}} {\in{#1}[\@@rnprefix#2]}} \def\dostartnummerenPAR @@ -267,26 +255,10 @@ % 4 yyy yyy yyy yyy yyy xxx xxx <= stop y % 5 xxx xxx xxx xxx xxx xxx xxx -%\def\regelreferentie#1[#2]% -% {\bgroup -% \dimen0\strutdp -% \doif{\@@rnrefereren}{\v!aan} -% {\doglobal\increment\linereference -% % start 1=>(n=y,l=0,p=1) -% % stop 2=>(n=y,l=0,p=2) -% \setxvalue{lrf:n:\linereference}{\@@rnprefix#2}% -% \setxvalue{lrf:l:\linereference}{0}% -% \setxvalue{lrf:p:\linereference}{#1}% -% \advance\dimen0 by \linereference sp}% -% \prewordbreak -% \vrule \!!width \!!zeropoint \!!depth \dimen0 \!!height \!!zeropoint -% \prewordbreak -% \egroup} - -\def\regelreferentie#1[#2]% +\def\dolinereference#1[#2]% {\bgroup \dimen0=\strutdp - \doif\@@rnrefereren\v!aan + \doif\@@rnreferencing\v!on {\doglobal\increment\linereference % start 1=>(n=y,l=0,p=1) % stop 2=>(n=y,l=0,p=2) @@ -303,7 +275,7 @@ \linestepper\zerocount \reshapebox{\global\advance\linestepper \plusone}% \global\advance\linenumber \linestepper - \doifelse\@@rnrefereren\v!aan + \doifelse\@@rnreferencing\v!on {\reshapebox % We are going back! {\global\advance\linenumber \minusone \dimen0=\dp\shapebox @@ -358,13 +330,13 @@ \ifdim\dimen0>\zeropoint \dp\shapebox\strutdp \fi - \schrijfregelnummer\box\shapebox}}% no \strut ! + \placelinenumber\box\shapebox}}% no \strut ! \else - \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}% no \strut ! + \reshapebox{\hbox{\placelinenumber\box\shapebox}}% no \strut ! \fi} {\reshapebox{\global\advance\linenumber \minusone}% \global\advance\linenumber \linestepper - \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}}% no \strut ! + \reshapebox{\hbox{\placelinenumber\box\shapebox}}}% no \strut ! \global\advance\linenumber \linestepper \flushshapebox \the\aftereverylinenumbering @@ -378,25 +350,25 @@ \newcount\internalparagraphnumber -\def\stelparagraafnummerenin% - {\dosingleempty\dostelparagraafnummerenin} +\def\setupparagraphnumbering% + {\dosingleempty\dosetupparagraphnumbering} -\def\dostelparagraafnummerenin[#1]% +\def\dosetupparagraphnumbering[#1]% {\getparameters [\??ph][#1]% \processaction - [\@@phstatus] + [\@@phstate] [\v!start=>\let\showparagraphnumber\doshowparagraphnumberA, \v!stop=>\let\showparagraphnumber\relax, - \v!regel=>\let\showparagraphnumber\doshowparagraphnumberB, + \v!line=>\let\showparagraphnumber\doshowparagraphnumberB, \v!reset=>\global\internalparagraphnumber\zerocount \let\showparagraphnumber\doshowparagraphnumberA]} \def\dodoshowparagraphnumber {\global\advance\internalparagraphnumber \plusone \inleftmargin % \tf normalizes em - {\tf{\doattributes\??ph\c!letter\c!kleur{\the\internalparagraphnumber}}% - \kern\@@phafstand}} + {\tf{\doattributes\??ph\c!style\c!color{\the\internalparagraphnumber}}% + \kern\@@phdistance}} \def\doshowparagraphnumberA {\ifprocessingverbatim @@ -406,42 +378,42 @@ \fi} \def\doshowparagraphnumberB - {\ifinregelnummeren + {\ifnumberinglines \doshowparagraphnumberA \fi} -\stelregelnummerenin - [\c!methode=, - \c!conversie=\v!cijfers, +\setuplinenumbering + [\c!method=, + \c!conversion=\v!numbers, \c!start=1, - \c!stap=1, - \c!plaats=\v!marge, - \c!letter=, - \c!kleur=, - \c!breedte=2em, + \c!step=1, + \c!location=\v!margin, + \c!style=, + \c!color=, + \c!width=2em, \c!prefix=, - \c!refereren=\v!aan] + \c!referencing=\v!on] % new -\stelregelnummerenin - [\c!breedte=\ifcase\linenumberlocation2em\else\v!marge\fi, - \c!links=, - \c!rechts=, - \c!commando=, - \c!afstand=\zeropoint, - \c!uitlijnen=\ifcase\linenumberlocation\v!rechts\or\v!rechts\or\v!links\fi] - -\stelparagraafnummerenin - [\c!status=\v!stop, - \c!letter=, - \c!kleur=, - \c!afstand=\ifcase\linenumberlocation2em\else\!!zeropoint\fi] - -\stelregelsin - [\c!voor=\blanko, - \c!na=\blanko, - \c!tussen=\blanko, - \c!inspringen=\v!nee] - -\protect \endinput \ No newline at end of file +\setuplinenumbering + [\c!width=\ifcase\linenumberlocation2em\else\v!margin\fi, + \c!left=, + \c!right=, + \c!command=, + \c!distance=\zeropoint, + \c!align=\ifcase\linenumberlocation\v!right\or\v!right\or\v!left\fi] + +\setupparagraphnumbering + [\c!state=\v!stop, + \c!style=, + \c!color=, + \c!distance=\ifcase\linenumberlocation2em\else\!!zeropoint\fi] + +\setuplines + [\c!before=\blank, + \c!after=\blank, + \c!inbetween=\blank, + \c!indenting=\v!no] + +\protect \endinput diff --git a/tex/context/base/page-log.tex b/tex/context/base/page-log.tex index 58cab81df..65dcd7713 100644 --- a/tex/context/base/page-log.tex +++ b/tex/context/base/page-log.tex @@ -58,15 +58,15 @@ %D is provided by a macro that signals changes in layout %D specifications: %D -%D \starttypen +%D \starttyping %D \recalculatelogos -%D \stoptypen +%D \stoptyping %D %D as well as a simple placement macro: %D -%D \starttypen +%D \starttyping %D \addlogobackground -%D \stoptypen +%D \stoptyping %D %D In no way the following boolean switch should be used %D directly. @@ -79,12 +79,12 @@ %D The current state of logos is registered in a status %D variable \type {\logostatus}. %D -%D \starttabulatie[|l|l|l|] +%D \starttabulate[|l|l|l|] %D \NC 0 \NC don't place \NC remains 0 \NC \NR %D \NC 1 \NC place now \NC remains 1 \NC \NR %D \NC 2 \NC calulate and place \NC becomes 1 \NC \NR %D \NC 3 \NC calculate and place once \NC becomes 2 \NC \NR -%D \stoptabulatie +%D \stoptabulate \chardef\logostatus=0 @@ -136,75 +136,75 @@ \fi} \def\dosetlogobox#1#2% - {\global\setbox#1\vbox to \papierhoogte + {\global\setbox#1\vbox to \paperheight {\dontcomplain % needed here ? \calculatereducedvsizes % needed here ? \offinterlineskip #2\relax - \vskip-\kopwit - \dodosetlogobox\v!boven\blap - \vskip\kopwit - \dodosetlogobox\v!hoofd\blap - \vskip\hoofdhoogte - \vskip\hoofdafstand - \dodosetlogobox\v!tekst\blap - \vskip\teksthoogte - \vskip\voetafstand - \vskip\voethoogte - \dodosetlogobox\v!voet \tlap + \vskip-\topspace + \dodosetlogobox\v!top\blap + \vskip\topspace + \dodosetlogobox\v!header\blap + \vskip\headerheight + \vskip\headerdistance + \dodosetlogobox\v!text\blap + \vskip\textheight + \vskip\footerdistance + \vskip\footerheight + \dodosetlogobox\v!footer \tlap \vfilll - \dodosetlogobox\v!onder\tlap - \vskip\kopwit} + \dodosetlogobox\v!bottom\tlap + \vskip\topspace} \smashbox#1} \def\dodosetlogobox#1#2% - {\hbox % width equals \zetbreedte + {\hbox % width equals \makeupwidth {\def\docommando##1% {\donefalse \ifnum\logostatus=3 \ExpandBothAfter \doifinset{\getvalue{\??lo#1##1}}\requestedlogos\donetrue \else - \doifvalue{\??lo#1##1\c!status}\v!start\donetrue + \doifvalue{\??lo#1##1\c!state}\v!start\donetrue \fi \ifdone - #2{\hbox{\getvalue{\??lo#1##1\c!commando}}}% + #2{\hbox{\getvalue{\??lo#1##1\c!command}}}% \fi}% \def\dodocommando##1##2##3##4##5##6% {\hsmash {\hskip-\texthoffset - \hbox to \papierbreedte + \hbox to \paperwidth {\rlap{\docommando##1}\hss\llap{\docommando##6}}% - \hskip-\papierbreedte - \hbox to \papierbreedte + \hskip-\paperwidth + \hbox to \paperwidth {\hskip\texthoffset - \hskip-\linkermargebreedte - \hskip-\linkermargeafstand - \hbox to \linkermargebreedte{\docommando##2\hss}% - \hskip\linkermargeafstand - \hbox to \zetbreedte{\docommando##3\hss\docommando##4}% - \hskip\rechtermargeafstand - \hbox to \rechtermargebreedte{\hss\docommando##5}% + \hskip-\leftmarginwidth + \hskip-\leftmargindistance + \hbox to \leftmarginwidth{\docommando##2\hss}% + \hskip\leftmargindistance + \hbox to \makeupwidth{\docommando##3\hss\docommando##4}% + \hskip\rightmargindistance + \hbox to \rightmarginwidth{\hss\docommando##5}% \hfill}}}% \normalbaselines \settexthoffset \hsmash - {\hbox to \zetbreedte{\hss\docommando\c!midden\hss}}% + {\hbox to \makeupwidth{\hss\docommando\c!middle\hss}}% \hsmash {\hskip-\texthoffset - \hbox to \papierbreedte{\docommando\v!pagina\hss}}% + \hbox to \paperwidth{\docommando\v!page\hss}}% \swapmargins \doifbothsidesoverruled \dodocommando - \v!linkerrand \v!linkermarge \v!links - \v!rechts \v!rechtermarge \v!rechterrand + \v!leftedge \v!leftmargin \v!left + \v!right \v!rightmargin \v!rightedge \orsideone \dodocommando - \v!linkerrand \v!linkermarge \v!links - \v!rechts \v!rechtermarge \v!rechterrand + \v!leftedge \v!leftmargin \v!left + \v!right \v!rightmargin \v!rightedge \orsidetwo \dodocommando - \v!rechterrand \v!rechtermarge \v!rechts - \v!links \v!linkermarge \v!linkerrand + \v!rightedge \v!rightmargin \v!right + \v!left \v!leftmargin \v!leftedge \od}} %D The user interface is relatively simple and provides @@ -233,4 +233,4 @@ {\xdef\requestedlogos{\iffirstargument#1\else\definedlogos\fi}% \global\chardef\logostatus3 } -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex index dca34845c..0e23d0554 100644 --- a/tex/context/base/page-lyr.tex +++ b/tex/context/base/page-lyr.tex @@ -74,19 +74,19 @@ \def\dodefinelayer[#1][#2]% {\setuplayer [#1] - [\c!dubbelzijdig=,\c!preset=, - \c!status=\v!start,\c!richting=\v!normaal,\c!optie=, - \c!x=\!!zeropoint,\c!y=\!!zeropoint,\c!positie=\v!nee, - \c!regel=0,\c!kolom=0, - \c!breedte=\nextboxwd,\c!hoogte=\nextboxht, - \c!offset=\!!zeropoint,\c!rotatie=, % geen 0 ! + [\c!doublesided=,\c!preset=, + \c!state=\v!start,\c!direction=\v!normal,\c!option=, + \c!x=\!!zeropoint,\c!y=\!!zeropoint,\c!position=\v!no, + \c!line=0,\c!column=0, + \c!width=\nextboxwd,\c!height=\nextboxht, + \c!offset=\!!zeropoint,\c!rotation=, % geen 0 ! \c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint, - \c!plaats=rb,\c!positie=\v!nee,\c!pagina=, - \c!methode=\v!overlay, - \c!sx=1,\c!sy=1,\c!hoek=,#2]% - \doifvalue{\??ll#1\c!dubbelzijdig}\v!ja - {\dopresetlayerbox{\v!links #1}% - \dopresetlayerbox{\v!rechts#1}}% + \c!location=rb,\c!position=\v!no,\c!page=, + \c!method=\v!overlay, + \c!sx=1,\c!sy=1,\c!corner=,#2]% + \doifvalue{\??ll#1\c!doublesided}\v!yes + {\dopresetlayerbox{\v!left #1}% + \dopresetlayerbox{\v!right#1}}% \dopresetlayerbox{#1}% \defineoverlay[#1][\composedlayer{#1}]} @@ -118,9 +118,9 @@ %D the current point as reference point. Otherwise the topleft %D corner is used as reference point. %D -%D \starttypen +%D \starttyping %D \setlayer [identifier] [optional parameters] {data} -%D \stoptypen +%D \stoptyping \def\currentlayerdata{0} @@ -128,7 +128,7 @@ {\dotripleempty\dosetlayer} \def\dosetlayer[#1][#2][#3]% #4 == box do \fi is ok - {\doifelsevalue{\??ll#1\c!status}\v!stop + {\doifelsevalue{\??ll#1\c!state}\v!stop {\dowithnextbox\donothing\hbox} {\ifthirdargument \dodosetlayer[#1][#2][#3]% @@ -143,7 +143,7 @@ \doglobal\increment\currentlayerdata \forgetall \dontcomplain - \doifvalue{\??ll#1\c!optie}\v!test\tracelayerstrue + \doifvalue{\??ll#1\c!option}\v!test\tracelayerstrue \iftracelayers\traceboxplacementtrue\fi \dowithnextbox % sneller als aparte macro {\ifundefined{\@@layerbox#1}% @@ -153,11 +153,11 @@ {\ifodd\realpageno % discard nextbox \else - \dododosetlayer[#1][\v!links][#3]% + \dododosetlayer[#1][\v!left][#3]% \fi}% - {\doifelse{#2}\v!oneven + {\doifelse{#2}\v!odd {\ifodd\realpageno - \dododosetlayer[#1][\v!rechts][#3]% + \dododosetlayer[#1][\v!right][#3]% %\else % discard nextbox \fi}% @@ -210,25 +210,25 @@ \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 + \@@layerxsiz\layerparameter\c!width + \@@layerysiz\layerparameter\c!height \layerwidth \@@layerxsiz \layerheight\@@layerysiz % preroll - \getparameters[\??ll#1][#3]% + \getparameters[\??ll\currentlayer][#3]% % presets and real roll - \executeifdefined{\??ll\??ll\layerparameter\c!preset}\gobbletwoarguments{#1}{#3}% + \executeifdefined{\??ll\??ll\layerparameter\c!preset}\gobbletwoarguments\currentlayer{#3}% % that was real slow - \doif{\layerparameter\c!positie}\v!overlay % slow - {\getparameters[\??ll\currentlayer][\c!breedte=\zeropoint,\c!hoogte=\zeropoint,\c!positie=\v!ja]}% - \doifsomething{\layerparameter\c!rotatie} + \doif{\layerparameter\c!position}\v!overlay % slow + {\getparameters[\??ll\currentlayer][\c!width=\zeropoint,\c!height=\zeropoint,\c!position=\v!yes]}% + \doifsomething{\layerparameter\c!rotation} {\setbox\nextbox\hbox {\rotate % to be checked with new rotation - [\c!plaats=\v!hoog,\c!rotatie=\layerparameter\c!rotatie] + [\c!location=\v!high,\c!rotation=\layerparameter\c!rotation] {\flushnextbox}}}% % no, not local - % \@@layerxsiz\layerparameter\c!breedte - % \@@layerysiz\layerparameter\c!hoogte + % \@@layerxsiz\layerparameter\c!width + % \@@layerysiz\layerparameter\c!height % never change that \@@layerxpos\layerparameter\c!x \@@layerypos\layerparameter\c!y @@ -242,65 +242,65 @@ \@@layerypos\layerparameter\c!sy\@@layerypos \@@layerxoff\layerparameter\c!sx\@@layerxoff \@@layeryoff\layerparameter\c!sy\@@layeryoff - \doifelse{\layerparameter\c!positie}\v!ja % combine ^ - {\setlastlayerpos{#2#1}% todo l/r %%%%%%%%%%%% + \doifelse{\layerparameter\c!position}\v!yes % combine ^ + {\setlastlayerpos{#2\currentlayer}% todo l/r %%%%%%%%%%%% \@@layerxpos\lastlayerxpos \@@layerypos\lastlayerypos - \letgvalue{\??ll#1\layerpage\c!positie}\v!ja - \letgvalue{\??ll#1\c!status}\v!start % needed ? + \letgvalue{\??ll\currentlayer\layerpage\c!position}\v!yes + \letgvalue{\??ll\currentlayer\c!state}\v!start % needed ? \setbox\layerbox\vbox to \@@layerysiz {\hbox to \@@layerxsiz{\xypos{lyr:\currentlayerdata}\hss}\vss}} {\setbox\layerbox\emptybox \globallet\lastlayerxpos\!!zeropoint \globallet\lastlayerypos\!!zeropoint - \ExpandBothAfter\doifinset\v!onder{\layerparameter\c!hoek} - {\ifnum\layerparameter\c!regel=\zerocount\else % can be < 0 - \scratchcounter\layerparameter\c!regel + \ExpandBothAfter\doifinset\v!bottom{\layerparameter\c!corner} + {\ifnum\layerparameter\c!line=\zerocount\else % can be < 0 + \scratchcounter\layerparameter\c!line \scratchcounter-\scratchcounter \advance\scratchcounter\layoutlines \advance\scratchcounter\plusone - \setevalue{\??ll#1\c!regel}{\the\scratchcounter}% + \setevalue{\??ll\currentlayer\c!line}{\the\scratchcounter}% \fi \ifdim\@@layerysiz>\zeropoint \advance\@@layerypos-\@@layerysiz \@@layerypos-\@@layerypos \@@layeryoff-\@@layeryoff \fi}% - \ExpandBothAfter\doifinset\v!rechts{\layerparameter\c!hoek} - {\ifnum\layerparameter\c!kolom=\zerocount\else % can be < 0 - \scratchcounter\layerparameter\c!kolom + \ExpandBothAfter\doifinset\v!right{\layerparameter\c!corner} + {\ifnum\layerparameter\c!column=\zerocount\else % can be < 0 + \scratchcounter\layerparameter\c!column \scratchcounter-\scratchcounter \advance\scratchcounter \layoutcolumns \advance\scratchcounter \plusone - \setevalue{\??ll#1\c!kolom}{\the\scratchcounter}% + \setevalue{\??ll\currentlayer\c!column}{\the\scratchcounter}% \fi \ifdim\@@layerxsiz>\zeropoint \advance\@@layerxpos-\@@layerxsiz \@@layerxpos-\@@layerxpos \@@layerxoff-\@@layerxoff \fi}% - \ExpandBothAfter\doif\v!midden{\layerparameter\c!hoek} + \ExpandBothAfter\doif\v!middle{\layerparameter\c!corner} {\ifdim\@@layerxsiz>\zeropoint \advance\@@layerxpos.5\@@layerxsiz \fi \ifdim\@@layerysiz>\zeropoint \advance\@@layerypos.5\@@layerysiz \fi}% - \edef\layerpage{\layerparameter\c!pagina}}% + \edef\layerpage{\layerparameter\c!page}}% \doifsomething\layerpage {\edef\layerpage{:\layerpage}% - \doifundefined{\@@layerbox#2#1\layerpage} - {\global\expandafter\newbox\csname\@@layerbox#2#1\layerpage\endcsname}}% + \doifundefined{\@@layerbox#2\currentlayer\layerpage} + {\global\expandafter\newbox\csname\@@layerbox#2\currentlayer\layerpage\endcsname}}% \dontcomplain % more comfortable - \chardef\layerpagebox\csname\@@layerbox#2#1\layerpage\endcsname + \chardef\layerpagebox\csname\@@layerbox#2\currentlayer\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 + \global\setbox\layerpagebox\vbox %to \layerparameter\c!height % new, otherwise no negative y possible {\offinterlineskip - %postpone, to after nextboxwd correction % \hsize\layerparameter\c!breedte % new, keep box small - %\ifvoid\csname\@@layerbox#1\layerpage\endcsname\else % why not #2#1 + %postpone, to after nextboxwd correction % \hsize\layerparameter\c!width % new, keep box small + %\ifvoid\csname\@@layerbox\currentlayer\layerpage\endcsname\else % why not #2#1 \ifvoid\layerpagebox \let\lastlayerwidth \zeropoint \let\lastlayerheight\zeropoint @@ -310,28 +310,28 @@ \ht\layerpagebox\zeropoint \dp\layerpagebox\zeropoint \wd\layerpagebox\zeropoint - \doifnotvalue{\layerparameter\c!richting}\v!omgekeerd{\box\layerpagebox}% + \doifnotvalue{\layerparameter\c!direction}\v!reverse{\box\layerpagebox}% \fi % don't move \xdef\lastlayerwd{\the\nextboxwd}% \xdef\lastlayerht{\the\nextboxht}% % not entirely ok when grid ! \xdef\lastlayerdp{\the\nextboxdp}% % not entirely ok when grid ! % this code - \doifelse{\layerparameter\c!plaats}\v!grid\donetrue\donefalse + \doifelse{\layerparameter\c!location}\v!grid\donetrue\donefalse \ifdone \nextboxht\strutheight \nextboxdp\strutdepth \else - \setbox\nextbox\hbox{\alignedbox[\layerparameter\c!plaats]\vbox{\flushnextbox}}% + \setbox\nextbox\hbox{\alignedbox[\layerparameter\c!location]\vbox{\flushnextbox}}% \fi - \ifnum\layerparameter\c!regel=\zerocount\else % no \ifcase, can be negative - \advance\@@layerypos \layerparameter\c!regel\lineheight + \ifnum\layerparameter\c!line=\zerocount\else % no \ifcase, can be negative + \advance\@@layerypos \layerparameter\c!line\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}% + \ifnum\layerparameter\c!column=\zerocount\else % no \ifcase, can be negative + \advance\@@layerxpos \layoutcolumnoffset{\layerparameter\c!column}% \fi \ifdone \setbox\nextbox\hbox{\alignedbox[rb]\vbox{\flushnextbox}}% @@ -342,25 +342,25 @@ \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 + \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 + \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 + \hsize\layerparameter\c!width % new, keep box small + \vbox to \layerparameter\c!height \bgroup \smashbox\nextbox \vskip\@@layerypos \vskip\@@layeryoff @@ -408,29 +408,29 @@ %D macro does not takes hash space. \unexpanded\def\flushlayer[#1]% - {\doifelsevalue{\??ll#1\c!status}\v!volgende - {\global\letvalue{\??ll#1\c!status}\v!start} % dangerous, stack-built-up - {\doifelsevalue{\??ll#1\c!dubbelzijdig}\v!ja + {\doifelsevalue{\??ll#1\c!state}\v!next + {\global\letvalue{\??ll#1\c!state}\v!start} % dangerous, stack-built-up + {\doifelsevalue{\??ll#1\c!doublesided}\v!yes {\doifundefinedelse{\@@layerbox#1}% {\dodoflushlayerA[#1]} {\doifbothsidesoverruled - \dodoflushlayerB\v!links [#1]% left + \dodoflushlayerB\v!left [#1]% left \orsideone - \dodoflushlayerB\v!rechts[#1]% right + \dodoflushlayerB\v!right[#1]% right \orsidetwo - \dodoflushlayerB\v!links [#1]% left + \dodoflushlayerB\v!left [#1]% left \od}} {\dodoflushlayerA[#1]}}} \def\dodoflushlayerA[#1]% - {\doifnotvalue{\??ll#1\c!status}\v!stop + {\doifnotvalue{\??ll#1\c!state}\v!stop {\startoverlay {\dodoflushlayer1{#1}{#1}} {\dodoflushlayer0{#1}{#1:\realfolio}} \stopoverlay}} \def\dodoflushlayerB#1[#2]% - {\doifnotvalue{\??ll#2\c!status}\v!stop + {\doifnotvalue{\??ll#2\c!state}\v!stop {\startoverlay {\dodoflushlayer1{#2}{#2}} {\dodoflushlayer0{#2}{#2:\realfolio}} @@ -438,58 +438,6 @@ {\dodoflushlayer0{#2}{#1#2:\realfolio}} \stopoverlay}} -% \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 -% \!!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}}% -% \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} - \def\dodoflushlayer#1#2#3% {\ifundefined{\@@layerbox#3}% \ifcase#1\else\writestatus{layer}{unknown layer #3}\fi @@ -498,19 +446,19 @@ \forgetall \offinterlineskip % needed because we need to handle method -\executeifdefined{\??ll\??ll\getvalue{\??ll#2\c!preset}}\gobbletwoarguments{#2}{}% + \executeifdefined{\??ll\??ll\getvalue{\??ll#2\c!preset}}\gobbletwoarguments{#2}{}% % - \doifvalue{\??ll#2\c!optie}\v!test\tracelayerstrue + \doifvalue{\??ll#2\c!option}\v!test\tracelayerstrue \iftracelayers\traceboxplacementtrue\fi \!!doneafalse \!!donebfalse - \doifvalue{\??ll#2\c!methode}\v!overlay\!!doneatrue - \doifvalue{\??ll#2\c!methode}\v!passend\!!donebtrue + \doifvalue{\??ll#2\c!method}\v!overlay\!!doneatrue + \doifvalue{\??ll#2\c!method}\v!fit\!!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}% + \doifnotvalue{\??ll#2\c!position}\v!yes + {\doifvalue{\??ll#2\c!repeat}\v!yes\!!donecfalse + \doifvalue{\??ll#2\c!state}\v!repeat\!!donecfalse}% \fi \chardef\layerbox\csname\@@layerbox#3\endcsname % we need to copy in order to retain the negative offsets for a next @@ -531,7 +479,7 @@ \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}}% + \doifvalue{\??ll#3\realfolio\c!position}\v!yes {\xypos{lyr:#3:\realfolio}}% \doifoverlayelse{#3} {\box\nextbox} {\startlayoutcomponent{l:#3}{layer #3}\box\nextbox\stoplayoutcomponent}% @@ -562,19 +510,12 @@ \let\placelayer\flushlayer -% \def\tightlayer[#1]% -% {\hbox -% {\def\currentlayer{#1}% todo: left/right -% \hsize\layerparameter\c!breedte -% \vsize\layerparameter\c!hoogte -% \composedlayer{#1}}} - \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 + \setbox\nextbox\emptybox % hoogte/breedte are \wd\nextbox/\ht\nextbox + \hsize\layerparameter\c!width % \overlaywidth = \hsize + \vsize\layerparameter\c!height % \overlaywheight = \vsize \composedlayer{#1}}} %D \macros @@ -590,9 +531,9 @@ \def\resetlayer[#1]% {\doresetlayer{#1}% - \doifvalue{\??ll#1\c!dubbelzijdig}\v!ja % kind of redundant test - {\doresetlayer{\v!links #1}% - \doresetlayer{\v!rechts#1}}% + \doifvalue{\??ll#1\c!doublesided}\v!yes % kind of redundant test + {\doresetlayer{\v!left #1}% + \doresetlayer{\v!right#1}}% \doresetlayer{#1:\realfolio}} %D \macros @@ -601,7 +542,7 @@ %D The following layer macro uses the positions that are %D registered by \METAPOST. %D -%D \starttypen +%D \starttyping %D \definelayer[test] %D %D \setMPlayer [test] [somepos-1] {Whatever we want here!} @@ -616,15 +557,15 @@ %D \stopuseMPgraphic %D %D \getMPlayer[test]{\useMPgraphic{oeps}} -%D \stoptypen +%D \stoptyping %D %D The last line is equivalent to %D -%D \starttypen +%D \starttyping %D \framed %D [background={foreground,test},offset=overlay] %D {\useMPgraphic{oeps}} -%D \stoptypen +%D \stoptyping \def\setMPlayer {\dotripleempty\dosetMPlayer} @@ -635,15 +576,15 @@ \def\dosetMPlayer[#1][#2][#3]% {\edef\MPlayerwidth {\MPw{#2}}% \edef\MPlayerheight{\MPh{#2}}% - \setlayer[#1][\c!x=\MPx{#2},\c!y=\MPy{#2},\c!positie=\v!nee,#3]} + \setlayer[#1][\c!x=\MPx{#2},\c!y=\MPy{#2},\c!position=\v!no,#3]} \def\getMPlayer {\dodoubleempty\dogetMPlayer} \def\dogetMPlayer[#1][#2]% {\framed - [\c!achtergrond={\v!voorgrond,#1}, - \c!kader=\v!uit, + [\c!background={\v!foreground,#1}, + \c!frame=\v!off, \c!offset=\v!overlay,#2]} % Some day this (old) mechanism will be combined/integrated @@ -660,11 +601,11 @@ \xposition \zeropoint \yposition \zeropoint \xdimension\zeropoint \ydimension\zeropoint \xoffset \zeropoint \yoffset \zeropoint - \hfuzz \papierbreedte \vfuzz \papierhoogte + \hfuzz \paperwidth \vfuzz \paperheight \setbox\positionbox\hbox\bgroup} \def\stoppositioning - {\doifnot\@@psoffset\v!ja + {\doifnot\@@psoffset\v!yes {\global\xoffset\zeropoint \global\yoffset\zeropoint}% \global\advance\xdimension \xoffset @@ -681,16 +622,16 @@ \def\resetpositioning {\getparameters[\??ps] - [\c!status=\v!start,% - \c!eenheid=\s!cm,% + [\c!state=\v!start,% + \c!unit=\s!cm,% \c!factor=1,% - \c!schaal=1,% + \c!scale=1,% \c!xfactor=\@@psfactor,% \c!yfactor=\@@psfactor,% - \c!xschaal=\@@psschaal,% - \c!yschaal=\@@psschaal,% - \c!xstap=\v!absoluut,% - \c!ystap=\v!absoluut,% + \c!xscale=\@@psscale,% + \c!yscale=\@@psscale,% + \c!xstep=\v!absolute,% + \c!ystep=\v!absolute,% \c!xoffset=\!!zeropoint,% \c!yoffset=\!!zeropoint]} @@ -699,15 +640,15 @@ \dodoubleargument\getparameters[\??ps]} \def\calculateposition#1#2#3#4#5#6#7#8#9% - {\setdimensionwithunit\scratchskip{#1}\@@pseenheid + {\setdimensionwithunit\scratchskip{#1}\@@psunit \scratchskip#8\scratchskip \scratchskip#9\scratchskip \advance\scratchskip #4\relax - \doif{#2}\v!relatief + \doif{#2}\v!relative {\advance\scratchskip #3% \let#4\!!zeropoint}% #3\scratchskip\relax - \doifnot\@@psstatus\v!overlay + \doifnot\@@psstate\v!overlay {\scratchskip#5\relax \advance\scratchskip #3\relax \ifdim#3<-#7\relax \global#7-#3\relax \fi @@ -721,13 +662,13 @@ {\bgroup \getparameters[\??ps][#1]% \dontcomplain - \calculateposition{#3}\@@psxstap\xposition + \calculateposition{#3}\@@psxstep\xposition \@@psxoffset{\nextboxwd}\xdimension\xoffset - \@@psxschaal\@@psxfactor + \@@psxscale\@@psxfactor \scratchdimen\nextboxht \advance\scratchdimen \nextboxdp - \calculateposition{#4}\@@psystap\yposition + \calculateposition{#4}\@@psystep\yposition \@@psyoffset\scratchdimen\ydimension\yoffset - \@@psyschaal\@@psyfactor + \@@psyscale\@@psyfactor \vbox to \zeropoint % kan beter. {\vskip\yposition \hbox to \zeropoint @@ -748,12 +689,12 @@ \resetpositioning \setuppositioning - [\c!eenheid=\s!cm, + [\c!unit=\s!cm, \c!factor=1, - \c!schaal=1, - \c!xstap=\v!absoluut, - \c!ystap=\v!absoluut, - \c!offset=\v!ja, + \c!scale=1, + \c!xstep=\v!absolute, + \c!ystep=\v!absolute, + \c!offset=\v!yes, \c!xoffset=\!!zeropoint, \c!yoffset=\!!zeropoint] @@ -761,13 +702,15 @@ \ifx\settextpagecontent\undefined \writestatus\m!systems{error in page-lyr.tex} \wait \fi -\definelayer[OTRTEXT] \setuplayer[OTRTEXT][\c!breedte=\zetbreedte,\c!hoogte=\teksthoogte] - \let\normalsettextpagecontent\settextpagecontent +\definelayer[OTRTEXT] \setuplayer[OTRTEXT][\c!width=\makeupwidth,\c!height=\textheight] + +% will be overloaded in page-spr + \def\settextpagecontent#1#2#3% #2 and #3 will disappear {\doifelselayerdata{OTRTEXT} - {\setbox#1\hbox to \zetbreedte + {\setbox#1\hbox to \makeupwidth {\startoverlay {\normalsettextpagecontent{#1}{#2}{#3}\box#1} {\tightlayer[OTRTEXT]} @@ -775,4 +718,4 @@ \dp#1\zeropoint}% {\normalsettextpagecontent{#1}{#2}{#3}}} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-mak.tex b/tex/context/base/page-mak.tex index 03caf2fba..87d8be7c2 100644 --- a/tex/context/base/page-mak.tex +++ b/tex/context/base/page-mak.tex @@ -22,11 +22,11 @@ %D There is one standard makeup page, but you can define more %D if needed. %D -%D \starttypen +%D \starttyping %D \startstandardmakeup %D My Fancy Title %D \stopstandardmakeup -%D \stoptypen +%D \stoptyping %D %D The associated commands are: %D @@ -40,29 +40,29 @@ \def\dodefinemakeup[#1][#2]% {\getparameters [\??do#1]% - [\c!breedte=\zetbreedte, % example in manual - \c!hoogte=\teksthoogte, % example in manual + [\c!width=\makeupwidth, % example in manual + \c!height=\textheight, % example in manual \c!voffset=\!!zeropoint, % example in manual \c!hoffset=\!!zeropoint, % example in manual - \c!commandos=, + \c!commands=, \c!setups=, - \c!pagina=\v!rechts, - \c!dubbelzijdig=\v!leeg, - \c!voor=, - \c!boven=\vss, - \c!onder=\vss, - \c!na=, - \c!onderstatus=\v!normaal, - \c!bovenstatus=\v!normaal, - \c!tekststatus=\v!normaal, - \c!hoofdstatus=\v!stop, - \c!voetstatus=\v!stop, - \c!paginastatus=\v!stop, % in manual ! ! ! - \c!kleur=, - \c!uitlijnen=, + \c!page=\v!right, + \c!doublesided=\v!empty, + \c!before=, + \c!top=\vss, + \c!bottom=\vss, + \c!after=, + \c!bottomstate=\v!normal, + \c!topstate=\v!normal, + \c!textstate=\v!normal, + \c!headerstate=\v!stop, + \c!footerstate=\v!stop, + \c!pagestate=\v!stop, % in manual ! ! ! + \c!color=, + \c!align=, #2]% - \setvalue{\e!start#1\e!opmaak}{\startmakeup[#1]}% - \setvalue{\e!stop #1\e!opmaak}{\stopmakeup}} + \setvalue{\e!start#1\e!makeup}{\startmakeup[#1]}% + \setvalue{\e!stop #1\e!makeup}{\stopmakeup}} \def\setupmakeup {\dodoubleargument\dosetupmakeup} @@ -103,16 +103,16 @@ %D The simple case: \def\donostartmakeup - {\pagina - \setupheader[\c!status=\v!leeg]% - \setupfooter[\c!status=\v!leeg]% - \setsystemmode\v!opmaak - \vbox to \teksthoogte\bgroup\hsize\tekstbreedte} + {\page + \setupheader[\c!state=\v!empty]% + \setupfooter[\c!state=\v!empty]% + \setsystemmode\v!makeup + \vbox to \textheight\bgroup\hsize\textwidth} \def\donostopmakeup {\egroup \flushmarks % new, here, else empty pages - \pagina + \page \egroup} %D The normal one: @@ -120,25 +120,25 @@ \newbox\makeupbox \def\dodostartmakeup - {\doifvaluesomething{\??do\currentmakeup\c!pagina} - {\ExpandFirstAfter\pagina[\makeupparameter\c!pagina]}% - \soortpagina[\currentmakeup]% - \setsystemmode\v!opmaak + {\doifvaluesomething{\??do\currentmakeup\c!page} + {\ExpandFirstAfter\page[\makeupparameter\c!page]}% + \pagetype[\currentmakeup]% + \setsystemmode\v!makeup \setupmakeuplayout - \makeupparameter\c!commandos % hm, what is this one doing here ? - \startregistercolor[\makeupparameter\c!kleur]% - \global\setbox\makeupbox\vbox to \makeupparameter\c!hoogte + \makeupparameter\c!commands % hm, what is this one doing here ? + \startregistercolor[\makeupparameter\c!color]% + \global\setbox\makeupbox\vbox to \makeupparameter\c!height \bgroup \forgetall \setups[\makeupparameter\c!setups]% - \hsize\makeupparameter\c!breedte - \doifsomething{\makeupparameter\c!uitlijnen} - {\setupalign[\makeupparameter\c!uitlijnen]}% - \makeupparameter\c!boven} + \hsize\makeupparameter\c!width + \doifsomething{\makeupparameter\c!align} + {\setupalign[\makeupparameter\c!align]}% + \makeupparameter\c!top} \def\dodostopmakeup {\endgraf - \makeupparameter\c!onder + \makeupparameter\c!bottom \egroup \flushmarks % new, here, else empty pages \stopregistercolor @@ -164,63 +164,63 @@ \fi} \def\doshipoutmakeup - {\globalpushmacro\@@pnstatus % new - \makeupparameter\c!voor - \vbox{\hbox{\color[\makeupparameter\c!kleur]{\box\makeupbox}}}% - \stelpaginanummerin[\c!status=\makeupparameter\c!paginastatus]% + {\globalpushmacro\@@pnstate % new + \makeupparameter\c!before + \vbox{\hbox{\color[\makeupparameter\c!color]{\box\makeupbox}}}% + \setuppagenumber[\c!state=\makeupparameter\c!pagestate]% \setupmakeuplayout - \pagina - \makeupparameter\c!na + \page + \makeupparameter\c!after \relax % voor fi \ifdubbelzijdig \ifodd\realpageno\else \processaction - [\makeupparameter\c!dubbelzijdig] - [ \v!ja=>\null - \pagina, + [\makeupparameter\c!doublesided] + [ \v!yes=>\null + \page, % \verlaagpaginanummer, % new - \v!leeg=>{\setupmakeuplayout - \pagina[\v!blanko]% + \v!empty=>{\setupmakeuplayout + \page[\v!blank]% \null - \pagina}]% + \page}]% % \verlaagpaginanummer]% % new \fi \fi % \verlaagpaginanummer % new - \globalpopmacro\@@pnstatus} % new + \globalpopmacro\@@pnstate} % new %D The text surrounding the main body text can be influenced %D by setting their associated status variables. The %D connection between them is made by the following macro \def\setupmakeuplayout - {\setupfooter[\c!status=\makeupparameter\c!voetstatus ]% - \setupheader[\c!status=\makeupparameter\c!hoofdstatus]% - \setuptext [\c!status=\makeupparameter\c!tekststatus]% - \setupbottom[\c!status=\makeupparameter\c!onderstatus]% - \setuptop [\c!status=\makeupparameter\c!bovenstatus]% + {\setupfooter[\c!state=\makeupparameter\c!footerstate ]% + \setupheader[\c!state=\makeupparameter\c!headerstate]% + \setuptext [\c!state=\makeupparameter\c!textstate]% + \setupbottom[\c!state=\makeupparameter\c!bottomstate]% + \setuptop [\c!state=\makeupparameter\c!topstate]% % this is needed, but no \setuplayout here; fails in texexec --fig=c \recalculatelayout} %D The standard page template is defined as follows: \definemakeup - [\v!standaard] - [\c!breedte=\zetbreedte, - \c!hoogte=\teksthoogte, + [\v!standard] + [\c!width=\makeupwidth, + \c!height=\textheight, \c!voffset=\!!zeropoint, \c!hoffset=\!!zeropoint, - \c!pagina=\v!rechts, - \c!dubbelzijdig=\v!leeg] + \c!page=\v!right, + \c!doublesided=\v!empty] \definemakeup - [\v!tekst] - [\c!bovenstatus=\v!start, - \c!hoofdstatus=\v!start, - \c!tekststatus=\v!start, - \c!voetstatus=\v!start, - \c!onderstatus=\v!start, - \c!dubbelzijdig=\v!nee, - \c!pagina=\v!ja, - \c!boven=\pseudostrut\ignorespaces, - \c!onder=\obeydepth\vss] - -\protect \endinput \ No newline at end of file + [\v!text] + [\c!topstate=\v!start, + \c!headerstate=\v!start, + \c!textstate=\v!start, + \c!footerstate=\v!start, + \c!bottomstate=\v!start, + \c!doublesided=\v!no, + \c!page=\v!yes, + \c!top=\pseudostrut\ignorespaces, + \c!bottom=\obeydepth\vss] + +\protect \endinput diff --git a/tex/context/base/page-mar.tex b/tex/context/base/page-mar.tex index 2c4428128..2cb6d8785 100644 --- a/tex/context/base/page-mar.tex +++ b/tex/context/base/page-mar.tex @@ -11,675 +11,764 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D This module is still to be split and documented. +%D Support for margin words is one of the reasons for writing +%D \CONTEXT. Over time support for marginal content has been +%D extended en enhanced. Therefore it's always good to watch +%D out for unexpected side effects. \writestatus{loading}{Context Core Macros / Maginal Things} +\unprotect + +%D There are three categories and their historically grown meaning is +%D as follows: +%D +%D marginlines: these are flushed relative to the start of a line and +%D need to be invoked there. +%D +%D marginwords: these can be issued in the text flow and will migrate +%D sidewards; in spite of the name, it can be a paragraph of text as +%D well, but normally it's words. +%D +%D margintexts: these can be set beforehand and are flushed at the +%D next paragraph of text (of header) +%D +%D While these mechanisms were rather separated, they now are slightly +%D more integrated. Instead of low level instances we now have a mechanism +%D for defining additional ones. + +%D \macros +%D {inleftedge,inleftmargin,inrightmargin,inrightedge} +%D +%D The fast and clean way of putting things in the margin is +%D using \type{\rlap} or \type{\llap}. Unfortunately these +%D macro's don't handle indentation, left and right skips. We +%D therefore embed them in some macro's that (force and) +%D remove the indentation and restore it afterwards. + +\def\definemarginline + {\dodoubleargument\dodefinemarginline} + +\def\dodefinemarginline[#1][#2]% + {\getparameters + [\??im\??im#1] + [\c!location=\v!left, + \c!distance=\zeropoint, + \c!width=\leftmarginwidth, + \c!hoffset=\leftmargindistance, + \c!command=, + #2]% + \setvalue{#1}{\domarginline{#1}}} + +\def\domarginline#1% #2 + {\getvalue{\s!do\??im\??im\executeifdefined{\??im\??im#1\c!location}\v!left}{#1}} % {#2} + +\def\doleftmarginline#1#2% + {\pushindentation + \llap + {\postsignalrightpage + \hsize\getvalue{\??im\??im#1\c!width}\relax + \executeifdefined{\??im\??im#1\c!command}\firstofoneargument{#2}\relax + \hskip\leftskip + \hskip\getvalue{\??im\??im#1\c!hoffset }\relax + \hskip\getvalue{\??im\??im#1\c!distance}}% + \popindentation + \ignorespaces} + +\def\dorightmarginline#1#2% + {\pushindentation + \rlap + {\postsignalrightpage + \hskip\hsize + \hskip-\rightskip + \hskip\getvalue{\??im\??im#1\c!hoffset }\relax + \hskip\getvalue{\??im\??im#1\c!distance}\relax + \hsize\getvalue{\??im\??im#1\c!width }\relax + \executeifdefined{\??im\??im#1\c!command}\firstofoneargument{#2}}% + \popindentation + \ignorespaces} + +\setvalue{\s!do\??im\??im\v!left }{\doleftmarginline} +\setvalue{\s!do\??im\??im\v!right}{\dorightmarginline} +\setvalue{\s!do\??im\??im\v!inner}{\presignalrightpage\doifrightpageelse\doleftmarginline \dorightmarginline} +\setvalue{\s!do\??im\??im\v!outer}{\presignalrightpage\doifrightpageelse\dorightmarginline\doleftmarginline } + +\definemarginline[inleftmargin] [\c!location=\v!left, \c!width=\leftmarginwidth, \c!distance=\leftmargindistance] +\definemarginline[inrightmargin][\c!location=\v!right,\c!width=\rightmarginwidth,\c!distance=\rightmargindistance] +\definemarginline[inleftedge] [\c!location=\v!left, \c!width=\leftedgewidth, \c!distance=\leftedgedistance, \c!hoffset=\leftmargintotal] +\definemarginline[inrightedge] [\c!location=\v!right,\c!width=\rightedgewidth, \c!distance=\rightedgedistance,\c!hoffset=\rightmargintotal] + +\definemarginline[inoutermargin][\c!location=\v!outer,\c!width=\outermarginwidth,\c!distance=\outermargindistance] +\definemarginline[ininnermargin][\c!location=\v!inner,\c!width=\innermarginwidth,\c!distance=\innermargindistance] +\definemarginline[inouteredge] [\c!location=\v!outer,\c!width=\outeredgewidth, \c!distance=\outeredgedistance,\c!hoffset=\outermargintotal] +\definemarginline[ininneredge] [\c!location=\v!inner,\c!width=\inneredgewidth, \c!distance=\inneredgedistance,\c!hoffset=\innermargintotal] + +\definemarginline[atleftmargin] [\c!location=\v!left, \c!command=\lrlap,\c!width=\zeropoint,\c!distance=\zeropoint,\c!hoffset=\zeropoint] +\definemarginline[atrightmargin][\c!location=\v!right,\c!command=\rllap,\c!width=\zeropoint,\c!distance=\zeropoint,\c!hoffset=\zeropoint] + +\ifx\lrlap\undefined \def\lrlap#1{\llap{\rlap{#1}\hskip\leftskip}} \fi +\ifx\rllap\undefined \def\rllap#1{\rlap{\hskip\hsize\hskip-\rightskip\llap{#1}}} \fi + +%D We want to keep things efficient and therefore only handle +%D situations like: +%D +%D \startbuffer +%D \inleftedge {fine} some text \par +%D \strut \inleftmargin {fine} some text \par +%D \noindent \inrightmargin {fine} some text \par +%D \noindent \strut \inrightedge {fine} some text \par +%D \stopbuffer +%D +%D \typebuffer +%D +%D which looks like: +%D +%D \bgroup +%D \getbuffer +%D \parindent 30pt +%D \getbuffer +%D \egroup +%D +%D A torture test: +%D +%D \starttyping +%D \def\TestLine#1#2{\backgroundline[#1]{\strut\white\tttf#2~\recurselevel}} +%D +%D \startbuffer +%D \inleftmargin {\TestLine{red} {lm}} test test test \par +%D \inrightmargin{\TestLine{green} {rm}} test test test \par +%D \inleftedge {\TestLine{red} {le}} test test test \par +%D \inrightedge {\TestLine{green} {re}} test test test \par +%D \inoutermargin{\TestLine{blue} {om}} test test test \par +%D \ininnermargin{\TestLine{yellow}{im}} test test test \par +%D \inouteredge {\TestLine{blue} {oe}} test test test \par +%D \ininneredge {\TestLine{yellow}{ie}} test test test \par +%D \atleftmargin {\TestLine{red} {alm}} \hfill test \par +%D \atrightmargin{\TestLine{green} {arm}} test \hfill \par +%D \stopbuffer +%D +%D \dorecurse{40}\getbuffer \page +%D \stoptyping + +%D New, yet undocumented: +%D +%D used for pascal: +%D +%D \starttyping +%D \index {test} test \index {west} west \index {rest} rest +%D +%D \startnarrower +%D \placeregister[index][alternative=b,command=\atleftmargin] +%D \stopnarrower +%D \stoptyping + % todo: compensate distance when setuplayout[textwidth=..] % todo: generalize margin/edge model, now too much duplication -\unprotect +%D The next bunch of macros looks messy which is due to its +%D multi-purpose character. + +\chardef\margincontentdisplacement \zerocount +\let \margincontentdistance \!!zeropoint +\let \margincontenthoffset \!!zeropoint +\def \margincontentlines {1} +\def \margincontenttag {0} +\let \margincontentseparator \empty +\def \margincontentstrutheight {\strutht} -\newif\iflowinmargin +\newcounter\margincontentlevel +\newdimen \margincontentheight -\def\stelinmargein - {\dodoubleempty\dostelinmargein} +\def\setupinmargin + {\dodoubleempty\dosetupinmargin} -\def\dostelinmargein[#1][#2]% +\def\dosetupinmargin[#1][#2]% {\ifsecondargument - \processcommalist[#1]{\dodostelinmargein[#2]}% becomes [#2]{##1} + \processcommalist[#1]{\dodosetupinmargin[#2]}% becomes [#2]{##1} \else \getparameters[\??im][#1]% \fi} -\def\dodostelinmargein[#1]#2% [settings]{class} - {\ifundefined{\??im#2\c!offset}% - \presetlocalframed - [\??im#2]% - \getparameters - [\??im#2] - [\c!kader=\v!uit, - \c!offset=\v!overlay, - \c!regel=1, - \c!scheider=, - \c!breedte=\v!ruim, - \c!afstand=\!!zeropoint, - \c!letter=\@@imletter, - \c!kleur=\@@imkleur, - \c!plaats=\@@implaats, - \c!uitlijnen=\@@imuitlijnen, - \c!voor=\@@imvoor, - \c!na=\@@imna, - #1]% - \else - \getparameters[\??im#2][#1]% - \fi} +\def\dodosetupinmargin[#1]#2% [settings]{class} + {\checkinmargin[#2]% + \getparameters[\??im#2][#1]} -\let\margetekstafstand = \!!zeropoint -\def\margetekstregels {1} -\def\margetekstnummer {0} -\let\margetekstscheider = \empty - -\def\margestrutheight{\strutht} +\def\checkinmargin[#1]% + {\ifundefined{\??im#1\c!offset}% this offset is related to framed ! + \addtocommalist{#1}\inmargintaglist + \presetmargintext[#1]% + \fi} -\def\maakmargetekstblok#1#2#3#4#5#6% - {#4\relax - \bgroup +\def\presetmargintext[#1]% + {\presetlocalframed + [\??im#1]% + \getparameters + [\??im#1] + [\c!frame=\v!off, + \c!offset=\v!overlay, + \c!line=1, + \c!separator=, + \c!width=\v!broad, + \c!distance=, % empty = signal + \c!hoffset=\zeropoint, + \c!style=\@@imstyle, + \c!color=\@@imcolor, + \c!location=\@@imlocation, + \c!align=\@@imalign, + \c!before=\@@imbefore, + \c!after=\@@imafter]} + +\newdimen\naturalmargincontentheight + +\def\makemargintextblock#1#2#3% width l r content + {\bgroup \forgetall % added, else problems with 'center' and nested itemize - \mindermeldingen - \hsize#1\relax - \doifnumberelse\margetekstnummer - {\ifcase\margetekstnummer\relax - \def\margetekstnummer{#2}% + \dontcomplain + \hsize\getvalue{\??im#1\c!width}\relax + \doifnumberelse\margincontenttag + {\ifcase\margincontenttag\relax + \let\margincontenttag#1% first one is setups id as well \fi} \donothing - \doifnumberelse\margetekstnummer - {\ifnum\margetekstnummer>25 % to be translated - \writestatus\m!systems{potential margin stack overflow (\margetekstnummer)}% + \doifnumberelse\margincontenttag + {\ifnum\margincontenttag>25 % to be translated + \writestatus\m!systems{potential margin stack overflow (\margincontenttag)}% \fi} \donothing - % todo + % we need to preserve {a,b,c} kind of settings + \let\margincontentalign#1% \processallactionsinset - [\getvalue{\??im\margetekstnummer\c!uitlijnen}] - [ \v!ja=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#2}, - \v!nee=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{\v!normaal}, - \v!binnen=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#2}, - \v!buiten=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#3}, - \v!links=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{\v!links}, - \v!midden=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{\v!midden}, - \v!rechts=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{\v!rechts}, - \s!default=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#2}]% - \setbox0\vbox\localframed - [\??im\margetekstnummer] - [\c!strut=\v!nee] - {\decrement\margetekstregels - \@@imvoor - \dostartattributes{\??im\margetekstnummer}\c!letter\c!kleur\empty - \dorecurse\margetekstregels{\strut\\}% - \xdef\margestrutheight{\the\strutht}% - \begstrut#6\endstrut\endgraf + [\getvalue{\??im\margincontenttag\c!align}] + [ \v!yes=>\let\margincontentalign#1, + \v!no=>\let\margincontentalign\v!normal, + \v!inner=>\let\margincontentalign#1, + \v!outer=>\let\margincontentalign#2, + \v!left=>\let\margincontentalign\v!left, + \v!middle=>\let\margincontentalign\v!middle, + \v!right=>\let\margincontentalign\v!right]% + \doifvaluesomething{\??im\margincontenttag\c!align} % watch {} around set + {\edef\margincontentalign{{\getvalue{\??im\margincontenttag\c!align},\margincontentalign}}}% + % + \expanded{\getparameters + [\??im\margincontenttag] + [\c!strut=\v!no,\c!offset=\v!overlay,\c!align=\margincontentalign]}% + % + \savestrut % + \setbox\scratchbox\vbox\localframed + [\??im\margincontenttag] + {\decrement\margincontentlines + \dorecurse\margincontentlines{\savedstrut\endgraf\nointerlineskip}% ! savedstrut + \@@imbefore + \dostartattributes{\??im\margincontenttag}\c!style\c!color\empty + \setstrut % yes or no + \begstrut#3\endstrut\endgraf + \xdef\margincontentstrutheight{\the\strutht}% so that it's known outside the framed \dostopattributes - \@@imna}% - \doif\@@imstapel\v!ja + \@@imafter}% + \global \naturalmargincontentheight\ht\scratchbox + \global\advance\naturalmargincontentheight\dp\scratchbox + \doif\@@imstack\v!yes {\def\overlappingmargin{-20\scaledpoint}% test value, maybe .25\strutboxdp, maybe configurable - \setbox0\vbox{\stackeddown\vbox{\box0}}}% new - \ht0\strutht - \box0 - \egroup - #5\relax} + \setbox\scratchbox\vbox{\stackeddown\vbox{\box\scratchbox}}}% new + \ht\scratchbox\strutht + \dp\scratchbox\strutdp % nieuw + \box\scratchbox + \egroup} %D The stacker permits constructs like: %D -%D \starttypen -%D \stelinmargein[stapel=ja] +%D \starttyping +%D \setupinmargin[stack=yes] %D -%D \inlinker{test 1}test\break -%D \inlinker{test 2}test\break -%D \inlinker{test 1} +%D \inleft{test 1}test\break +%D \inleft{test 2}test\break +%D \inleft{test 1} %D \input tufte -%D \inlinker{test 1} -%D \inlinker{test 2} -%D \inlinker{test 3} +%D \inleft{test 1} +%D \inleft{test 2} +%D \inleft{test 3} %D \input tufte -%D \inlinker{test 1} -%D \inlinker{test 2\endgraf test 3} -%D \inlinker{test 4} +%D \inleft{test 1} +%D \inleft{test 2\endgraf test 3} +%D \inleft{test 4} %D \input tufte -%D \inlinker{test 1} -%D \inlinker{test 2\endgraf test 3} -%D \inlinker{test 4\endgraf test 5\endgraf test 6} -%D \inlinker{test 7\endgraf test 8\endgraf test 9} +%D \inleft{test 1} +%D \inleft{test 2\endgraf test 3} +%D \inleft{test 4\endgraf test 5\endgraf test 6} +%D \inleft{test 7\endgraf test 8\endgraf test 9} %D \input tufte -%D \stoptypen - -\def\plaatsmargetekstscheider - {\ifnum\margincontent>\zerocount - \bgroup - \dimen0=\margetekstregels\lineheight - \advance\dimen0 -\lineheight - \lower\dimen0\hbox{\margetekstscheider}% - \egroup - \fi} - -\def\linkermargetekstblok#1% - {\maakmargetekstblok \leftmargintextwidth \v!links \v!rechts - {\llap{\plaatsmargetekstscheider}}{\hskip\margetekstafstand} - {#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\hskip\tekstbreedte\hskip-\hsize }{\rlap{\plaatsmargetekstscheider}} - {#1}} - -\def\doplacemargintext#1#2#3% - {\strut - \setbox0\hbox{#1}% - \dimen0\ht0 - \advance\dimen0 \dp0 - \ifdim\dimen0>\marginheight - \global\marginheight\dimen0 - \fi - \setbox0\hbox - {#2{\hskip#3\strut - \iflowinmargin\else - \dimen0\strutdp - \advance\dimen0 \margestrutheight - \advance\dimen0 -\strutht - \raise\dimen0 - \fi - \box0}}% - \ht0\zeropoint - \dp0\zeropoint - \gdef\margestrutheight{\the\strutht}% - %\graphicvadjust{\box0}} % fails in high math lines, let it be - %\hbox{\lower\strutdp\box0}} % alas, wrong lapping, therefore useless - \dopositionmarginbox0} +%D \stoptyping %D This approach permits us to implement a better mechanism %D later. We need the \type {\graphicvadjust} in order to %D handle: %D -%D \starttypen -%D \inlinker{test} {\red \dorecurse{40}{test }\par} -%D {\red \inlinker{test} \dorecurse{40}{test }\par} -%D \stoptypen +%D \starttyping +%D \inleft{test} {\red \dorecurse{40}{test }\par} +%D {\red \inleft{test} \dorecurse{40}{test }\par} +%D \stoptyping %D %D The outer margin color is either black or color set as %D main text color. +\newif\ifrightmargin % documenteren + \ifx\dopositionmarginbox\undefined \def\dopositionmarginbox#1{\graphicvadjust{\box#1}} \fi -\def\leftmargintextdistance {\getvalue{\??im\v!links \c!afstand}} -\def\rightmargintextdistance {\getvalue{\??im\v!rechts\c!afstand}} - -\def\leftmargintextwidth {\getvalue{\??im\v!links \c!breedte}} -\def\rightmargintextwidth {\getvalue{\??im\v!rechts\c!breedte}} - -\def\doinlinker#1% - {\doplacemargintext - {\linkermargetekstblok{#1}\hskip\leftmargintextdistance} - \llap\zeropoint} - -\def\doinrechter#1% - {\doplacemargintext - {\hskip\rightmargintextdistance\rechtermargetekstblok{#1}} - \rlap\hsize} - -\newcounter \nofmarginnotes -\newif \iftrackingmarginnotes -\newif \ifrightmargin % documenteren - -\definetwopasslist\s!margin - -\def\domarginreference % todo: use doonrightpage - {\doglobal\increment\nofmarginnotes\relax - \edef\writemarref - {\writeutilitycommand% - {\twopassentry% - {\s!margin}% - {\nofmarginnotes}% - {\noexpand\realfolio}}}% - \writemarref} - -\def\dodoinmargenormal#1#2#3#4% - {\iffirstsidefloatparagraph\geenwitruimte\fi % zo laat mogelijk - \ifodd#1\relax - \rightmargintrue - #3{#4}% - \else - \rightmarginfalse - #2{#4}% - \fi} +% watch out, margin dimensions are swapped locally (\swapmargins) -\def\doinmargenormal#1#2#3% - {\bgroup - \iftrackingmarginnotes - \gettwopassdata\s!margin - \iftwopassdatafound - \dodoinmargenormal\twopassdata#1#2{#3}% - \else - \dodoinmargenormal\realfolio#1#2{#3}% - \fi - \domarginreference - \else - \dodoinmargenormal\realfolio#1#2{#3}% +% with \margincontentmethod one can control pagebreaks +% +% 0 no break +% 1 each entry is one line +% 2 only natural height +% 3 also stack height + +\chardef\margincontentmethod \plusthree % beware: 1 = old method +\chardef\marginpagecheckmethod\plusone + +\def\margincontentextralines{1} % old method, play safe +\def\nofmargincontentlines {0} + +\def\doplacemargintext#1#2#3#4% + {\strut + \doifsomething{#1} + {\def\margincontenttag{#1}}% + \doifinsetelse{\margincontenttag}{\v!left,\v!right} % ugly hack + {\let \margincontentdistance \empty % signal + \let \margincontenthoffset \zeropoint} + {\edef\margincontentdistance{\executeifdefined{\??im\margincontenttag\c!distance }\empty }% signal + \edef\margincontenthoffset {\executeifdefined{\??im\margincontenttag\c!hoffset }\zeropoint}}% + \edef\margincontentlines {\executeifdefined{\??im\margincontenttag\c!line }\plusone }% + \edef\margincontentseparator {\executeifdefined{\??im\margincontenttag\c!separator}\donothing}% + \setbox\scratchbox\hbox{#4}% % todo: make sure that color stack works + \ifcase\margincontentmethod + \scratchdimen\zeropoint + \or % old method + \scratchdimen\ht\scratchbox + \advance\scratchdimen\dp\scratchbox + \or + \scratchdimen\naturalmargincontentheight + \or + \scratchdimen\naturalmargincontentheight + \ifx\laststackvmove\undefined\else\global\advance\scratchdimen\laststackvmove\fi \fi - \egroup} + \ifdim\scratchdimen>\margincontentheight + \global\margincontentheight\scratchdimen + \fi + \setbox\scratchbox\hbox + {#2{\hskip#3\strut + \ifcase\margincontentdisplacement + % normal, move strutheight up + \scratchdimen\strutdp + \advance\scratchdimen \margincontentstrutheight + \advance\scratchdimen -\strutht + \raise\scratchdimen + \or + % low, obey vadjust + \fi + \box\scratchbox}}% + \ht\scratchbox\zeropoint + \dp\scratchbox\zeropoint + \gdef\margincontentstrutheight{\the\strutht}% + %\graphicvadjust{\box\scratchbox}} % fails in high math lines, let it be + %\hbox{\lower\strutdp\box\scratchbox}} % alas, wrong lapping, therefore useless + \dopositionmarginbox\scratchbox} + +\def\domarginblockskip#1% + {\hskip\margincontenthoffset + \doifelsenothing\margincontentdistance + {\hskip\getvalue{\??im#1\c!distance}} + {\hskip\margincontentdistance}% + \relax} + +\def\doleftmarginblock#1#2% + {\doplacemargintext{#1}\llap\zeropoint + {\llap{\placemargincontentseparator}% + \makemargintextblock\v!left\v!right{#2}% + \domarginblockskip\v!left}} + +\def\dorightmarginblock#1#2% + {\doplacemargintext{#1}\rlap\hsize + {\hskip\textwidth\hskip-\hsize % new: hsize correction + \domarginblockskip\v!right + \makemargintextblock\v!right\v!left{#2}% + \rlap{\placemargincontentseparator}}} + +\def\placemargincontentseparator + {\ifnum\margincontentlevel>\zerocount + \ifx\margincontentseparator\empty\else + \bgroup + \scratchdimen\margincontentlines\lineheight + \advance\scratchdimen -\lineheight + \lower\scratchdimen\hbox{\margincontentseparator}% + \egroup + \fi + \fi} -\def\doinmargereverse#1#2#3% - {\dodoinmargenormal\realfolio#2#1{#3}} +\newbox\marginconstructbox + +\def\doinmarginswapped#1#2#3#4% + {\iffirstsidefloatparagraph\nowhitespace\fi % zo laat mogelijk + \setbox\marginconstructbox\hbox\bgroup % prevents page break in the middle of construction + \startsignalrightpage + \doifswappedrightpageelse + {\rightmargintrue #2} + {\rightmarginfalse#1} + {#3}% setups + {#4}% content + \stopsignalrightpage + \egroup + \unhbox\marginconstructbox} -\def\doinmarge[#1][#2][#3][#4][#5]#6% - {\doifcommonelse{+,-,\v!laag}{#4} - {\dodoinmarge[#1][#2][#3][#4][#5]{#6}} - {\dodoinmarge[#1][#2][#3][][#4]{#6}}% - \ignorespaces} +% history made this a bit complicated, the +/- was needed before +% we had enough mem/hash to do the page correction -\def\dodoinmarge[#1][#2][#3][#4][#5]#6% - {\ignorespaces - \bgroup\postponefootnotes % group is (somehow) needed - \doifinsetelse\v!laag{#4} - \lowinmargintrue - \lowinmarginfalse +\edef\inmargintaglist{+,-,\v!low,\v!left,\v!right,\v!inner,\v!outer} + +% the old one: +% +% \def\doinmargin[#1][#2][#3][#4][#5]% #6 #7 +% {\doifcommonelse{+,-,\v!laag}{#4} +% {\dodoinmargin[#1][#2][#3][#4][#5]} +% {\dodoinmargin[#1][#2][#3][][#4]}} +% +% an alternative: +% +% \letvalue{\??im\v!laag\c!offset}\empty +% \letvalue{\??im +\c!offset}\empty +% \letvalue{\??im -\c!offset}\empty +% +% \def\doinmargin[#1][#2][#3][#4][#5]% #6 #7 +% {\doifnumberelse{#4} +% {\dodoinmargin[#1][#2][#3][#4][#5]} +% {\doifdefinedelse{\??im#4\c!offset} +% {\dodoinmargin[#1][#2][#3][#4][#5]} +% {\dodoinmargin[#1][#2][#3][][#4]}}} +% +% the problem is that we need to keep downward compatibility +% with respect to the first argument thing a reference or a +% directive; the alternative is to force users to pass a +% directive along with a reference; anyhow, as long as one +% does not use references that have the same name as a +% directive we can use the (slow) alternative + +\def\doinmargin[#1][#2][#3][#4][#5]% #6 #7 + {\expanded{\doifinsetelse{#4}{\inmargintaglist}} + {\dodoinmargin[#1][#2][#3][#4][#5]} + {\dodoinmargin[#1][#2][#3][][#4]}} + +\def\defineinmargin + {\doquadrupleempty\dodefineinmargin} + +\def\dodefineinmargin[#1][#2][#3][#4]% + {\doifassignmentelse{#4} + {\setupinmargin[#1][#4]% + \setvalue{#1}{\indentation\doquintupleempty\doinmargin[#2][#3][#1]}} + {\setvalue{#1}{\indentation\doquintupleempty\doinmargin[#2][#3][#4]}}} + +\defineinmargin [inleft] [\v!left] [\v!normal] % takes left settings +\defineinmargin [inright] [\v!right] [\v!normal] % takes right settings +\defineinmargin [ininner] [\v!inner] [\v!normal] % takes left/right settings +\defineinmargin [inouter] [\v!outer] [\v!normal] % takes left/right settings +\defineinmargin [inmargin] [\@@imlocation] [\v!normal] % takes left/right settings +\defineinmargin [inother] [\@@imlocation] [\v!reverse] % takes left/right settings + +\def\inothermargin{\inother} + +%D This permits definitions like: +%D +%D \starttyping +%D \defineinmargins[SomePlace] [inner] [normal] [distance=1cm] +%D \defineinmargins[SomePlace] [inner] [normal] [SomePlace] \setupinmargin[SomePlace][distance=1cm] +%D \defineinmargins[MyPlace] [inner] [normal] [SomePlace] +%D \defineinmargins[YourPlace] [inner] [normal] [SomePlace] +%D \stoptyping +%D +%D A torture test: +%D +%D \starttyping +%D \startbuffer +%D \inleft {\TestLine{red} {l}} test test test \par +%D \inright {\TestLine{green} {r}} test test test \par +%D \inmargin {\TestLine{blue} {m}} test test test \par +%D \inothermargin{\TestLine{yellow} {x}} test test test \par +%D \ininner {\TestLine{cyan} {i}} test test test \par +%D \inouter {\TestLine{magenta}{o}} test test test \par +%D \stopbuffer +%D +%D \dorecurse{80}\getbuffer \page +%D stoptypen +%D +%D and +%D +%D \starttyping +%D \defineinmargin[InOuterA] [outer] [normal] [distance=0cm] +%D \defineinmargin[InOuterB] [outer] [normal] [distance=1cm] +%D \defineinmargin[InOuterC] [outer] [normal] [distance=2cm,line=2] +%D +%D \startbuffer +%D \InOuterA{\TestLine{red} {A}} test test test \par +%D \InOuterB{\TestLine{green}{B}} test test test \par +%D \InOuterC{\TestLine{blue} {C}} test test test \par +%D \stopbuffer +%D +%D \dorecurse{80}\getbuffer \page +%D +%D \dorecurse{10}{\inleft {one} test \inleft {two} test } \page +%D +%D \start +%D \margintext {one} \margintext {two} \input thuan \par +%D \setupinmargin[1][line=3,distance=1cm] +%D \margintext [1]{one} +%D \margintext [2]{two} +%D \input thuan \page +%D \stop +%D +%D \setupinmargin[3][location=inner,distance=1cm] +%D \setupinmargin[4][location=outer,distance=2cm] +%D +%D % \setupinmargin[left] [line=2] +%D % \setupinmargin[right][line=2] +%D +%D \dorecurse +%D {10} +%D {\margintext {\kern3cm\TestLine{blue}{none}} +%D \margintext[3] {\TestLine{darkgray}{3}} +%D \margintext[4] {\TestLine{darkgray}{4}} +%D \margintext[left] {\TestLine{red} {left}} +%D \margintext[right]{\TestLine{green} {right}} +%D \margintext[inner]{\TestLine{cyan} {inner}} +%D \margintext[outer]{\TestLine{magenta} {outer}} +%D \input thuan \endgraf} +%D +%D \dorecurse{10}{\margintext{test\\test\\test} \input thuan \endgraf} +%D \stoptyping + +\def\dodoinmargin[#1][#2][#3][#4][#5]#6% + {\bgroup + \postponefootnotes % group is (somehow) needed + \doifinsetelse\v!low{#4} + {\chardef\margincontentdisplacement\plusone} + {\chardef\margincontentdisplacement\zerocount}% + \doif\v!reverse{#2} + {\swapmacros\dorightmarginblock\doleftmarginblock}% \processaction [#1] - [ \v!links=>#2{#6}, - \v!rechts=>#3{#6}, + [ \v!left=>\let\next\doleftmarginblock, % no swapping + \v!right=>\let\next\dorightmarginblock, % no swapping + \v!inner=>\def\next{\doinmarginswapped\dorightmarginblock\doleftmarginblock }, + \v!outer=>\def\next{\doinmarginswapped\doleftmarginblock \dorightmarginblock}, \s!unknown=>\ifdubbelzijdig \doifcommonelse{+,-}{#4} - \doinmargereverse\doinmargenormal#2#3{#6}% + {\def\next{\doinmarginswapped\dorightmarginblock\doleftmarginblock }} + {\def\next{\doinmarginswapped\doleftmarginblock \dorightmarginblock}}% \else - #2{#6}% + \let\next\doleftmarginblock \fi]% - \rawpagereference\s!mar{#5}% - \flushnotes\egroup % don't forget the group + \next{#3}{#6}% + \rawpagereference\s!mar{#5}% naar binnen ! ! ! ! + \flushnotes + \egroup % don't forget the group \ignorespaces} -\def\inlinker - {\indentation\doquintupleempty\doinmarge - [\v!links][\doinlinker][\doinrechter]} +% dit zijn voorlopig lokale commando's / vervallen +% +% \def\woordinmarge {\indentation\doquintupleempty\doinmargin[\@@implaats][\inleftmargin][\inrightmarge]} +% +% \def\woordinlinker {\inleftmargin } % vervallen +% \def\woordinrechter{\inrechtermarge} % vervallen -\def\inrechter - {\indentation\doquintupleempty\doinmarge - [\v!rechts][\doinlinker][\doinrechter]} +% Some day: \definemarking[\v!margetitel] -\def\inmarge - { \doquintupleempty\doinmarge - [\@@implaats][\doinlinker][\doinrechter]} +%D Now come the margin text collectors. The collected content is +%D flushed at every paragraph by the following macro. Note for +%D myself: here the location (plaats) is no longer a tag (number). -\def\inanderemarge - {\doquintupleempty\doinmarge - [\@@implaats][\doinrechter][\doinlinker]} +% gone: \def\doflushmargincontent{\doinmargin[\@@implaats][\v!normaal][]} % + [#1][#2]{#3}} -\newcounter\margincontent +%D These are now all the same (long ago they had different +%D implementations, somewhere in Sork time if I remember +%D right). -\def\doflushmargincontent % [#1][#2]#3% hier plaats 'globaal' (geen 1,2 enz) - {\doinmarge[\@@implaats][\doinlinker][\doinrechter]} % [#1][#2]{#3}} +\def\margintext {\dodoubleempty\domargincontent} +\def\marginword {\margintext} +\def\margintitle{\margintext} % txt mark as well -\newdimen\marginheight +\newtoks\collectedmargintexts +\chardef\margintextcollected \zerocount -\let\restoreinterlinepenalty=\relax +\def\domargincontent[#1][#2]#3% we used to check for #2/#1 being number, no longer now + {\global\chardef\margintextcollected\plusone + \edef\margincontenttag{#1}% + \ifx\margincontenttag\empty + \doglobal\increment\margincontentlevel + \let\margincontenttag\margincontentlevel + \fi + \checkinmargin[\margincontenttag]% + \doglobal \appendetoks + \noexpand \checkinmargin[\margincontenttag]% + \noexpand \doinmargin[\executeifdefined{\??im\margincontenttag\c!location}\@@imlocation][\v!normal][\margincontenttag][\margincontenttag][#2]% + \to \collectedmargintexts + \doglobal \appendtoks + {#3}% + \to \collectedmargintexts} + +\let\restoreinterlinepenalty\relax \def\flushmargincontents % plural - {\restoreinterlinepenalty % here? - \ifcase\margincontent\else % called quite often, so we + {\restoreinterlinepenalty % here? + \ifcase\margintextcollected\else % called quite often, so we \expandafter\doflushmargincontents % speed up the \fi scan by \fi} % using a \do.. -% for a manual flush in for instance headers - -% \def\placemargintexts % to be documented and translated -% {\ifcase\margincontent\else -% \bgroup -% \let\normalvadjust\fakedvadjust -% \doflushmargincontents -% \egroup -% \fi} - -\def\placemargintexts % to be documented and translated - {\ifcase\margincontent\else - \bgroup - \chardef\graphicvadjustmode\zerocount - \doflushmargincontents - \egroup - \fi} - -% \def\doflushmargincontents% % links + rechts -% {\bgroup -% \forgetall -% \global\marginheight\!!zeropoint -% \dorecurse{\margincontent} -% {\bgroup -% \edef\margetekstafstand {\getvalue{\??im\recurselevel\c!afstand}}% -% \edef\margetekstregels {\getvalue{\??im\recurselevel\c!regel}}% -% \edef\margetekstscheider{\getvalue{\??im\recurselevel\c!scheider}}% -% \let\margetekstnummer=\recurselevel -% \getvalue{\??im\recurselevel}% -% \global\setvalue{\??im\recurselevel}{}% -% \egroup}% -% \ifdim\marginheight>\lineheight % This is something real dirty! -% \advance\marginheight by \pagetotal -% \advance\marginheight by \lineheight % a sort of bonus -% \ifdim\marginheight>\pagegoal -% \xdef\restoreinterlinepenalty% -% {\global\let\restoreinterlinepenalty\relax -% \global\interlinepenalty=\the\interlinepenalty}% -% \global\interlinepenalty=10000 -% \fi -% \else % We need the above because interlinepenalties overrule vadjusted \nobreaks. -% %\vadjust -% % {\forgetall -% % \global\advance\marginheight by \lineheight -% % \global\divide\marginheight by \lineheight -% % \dorecurse{\number\marginheight} -% % {\nobreak\vskip\lineheight}% -% % \kern-\number\marginheight\lineheight}% -% \vadjust{\nobreak}% -% \fi -% \doglobal\newcounter\margincontent -% \egroup} - \def\doflushmargincontents % links + rechts {\bgroup \forgetall - \global\marginheight\zeropoint - \dorecurse\margincontent - {\bgroup - \edef\margetekstafstand {\getvalue{\??im\recurselevel\c!afstand }}% - \edef\margetekstregels {\getvalue{\??im\recurselevel\c!regel }}% - \edef\margetekstscheider{\getvalue{\??im\recurselevel\c!scheider}}% - \let\margetekstnummer\recurselevel - \getvalue{\??im\recurselevel}% - \letgvalue{\??im\recurselevel}\empty - \egroup}% -\ifbinnenkolommen - \donetrue % how fuzzy -\else\ifdim\marginheight>\lineheight\relax - \donetrue % how dirty -\else - \donefalse % how needed -\fi\fi -\ifdone - \advance\marginheight \pagetotal - \advance\marginheight \lineheight % a sort of bonus - \ifdim\marginheight>\pagegoal - \xdef\restoreinterlinepenalty - {\global\let\restoreinterlinepenalty\relax - \global\interlinepenalty=\the\interlinepenalty}% keep = here - \global\interlinepenalty10000 + \global\margincontentheight\zeropoint + \startsignalrightpage + \the\collectedmargintexts + \signalrightpage + \stopsignalrightpage + \resetmargincontent + % dirty tricks + \ifcase\margincontentmethod + \donefalse + \else\ifinsidecolumns % brrrr + \donetrue % how fuzzy + \else\ifdim\margincontentheight>\lineheight\relax + \donetrue % how dirty + \else + \donefalse % how needed + \fi\fi\fi + \savemargincontentlines + \ifdone + \advance\margincontentheight \margincontentextralines\lineheight + \ifdim\pagegoal>\pagetotal + \bgroup % preserve \margincontentheight + \advance\margincontentheight \pagetotal + \ifdim\margincontentheight>\pagegoal + \egroup + \ifcase\marginpagecheckmethod + % disabled + \or + \setmargincontentpenalties + \or + % potentially dangerous, maybe better a \goodbreak; the problem is that + % there can be a penalty there, which we then overload and we also introduce + % nasty side effects, so, we drop this option + % \vadjust pre {\page}% + \fi + \else + \egroup + \fi \fi \else % We need the above because interlinepenalties overrule vadjusted \nobreaks. - %\vadjust - % {\forgetall - % \global\advance\marginheight by \lineheight - % \global\divide\marginheight by \lineheight - % \dorecurse{\number\marginheight} - % {\nobreak\vskip\lineheight}% - % \kern-\number\marginheight\lineheight}% + % a bit dangerous \vadjust{\nobreak}% \fi - \doglobal\newcounter\margincontent \egroup} -% Some day: \definieermarkering[\v!margetitel] - -\def\docomplexmargewoord#1#2#3% - {\@EA\setgvalue\@EA{\@EA\??im\@EA\margincontent\@EA}\@EA - {\@EA\stelinmargein\@EA[\margincontent][]% see next macro - \doflushmargincontent[#1][#2]{#3}}} - -\def\complexmargewoord[#1][#2]#3% - {\doglobal\increment\margincontent - \stelinmargein[\margincontent][]% see next macro - \ifsecondargument - \doifnumberelse{#1} % only one #3 (after test) - {\docomplexmargewoord{#2}{#1}{#3}} - {\docomplexmargewoord{#1}{#2}{#3}}% - \else - \doifnumberelse{#1} - {\docomplexmargewoord{}{#1}{#3}} - {\docomplexmargewoord{#1}{}{#3}}% - \fi} +\def\savemargincontentlines + {\bgroup + \advance\margincontentheight \margincontentextralines\lineheight % 1 by default + \getnoflines\margincontentheight + \xdef\nofmargincontentlines{\the\noflines}% + \egroup} -\def\margewoordpositie[#1]#2% - {\ifnum#1>\margincontent - \xdef\margincontent{#1}% +\def\fillupmargincontentlines + {\endgraf + \begingroup + \scratchcounter\numexpr(\nofmargincontentlines-\prevgraf)\relax + \ifnum\scratchcounter>\zerocount + \forgetall\dorecurse\scratchcounter{\nobreak\crlf}% \fi - \stelinmargein[#1][]% when at outer level, saves local settings - \setgvalue{\??im#1}% - {\stelinmargein[#1][]% needed when par start outside group - \doflushmargincontent[][]{#2}}} - -\def\margewoord - {\dodoubleempty\complexmargewoord} - -\def\margetitel{\margewoord} -\def\margetekst{\margewoord} - -\def\oplinker#1% - {\strut - \graphicvadjust - {\mindermeldingen - \setbox0\vtop{\forgetall\strut#1}% - \getboxheight\dimen0\of\box0 - \vskip-\dimen0 % waarom stond hier een \ ? - \box0}} - -\def\resetmargincontent % quick hack - {\doglobal\newcounter\margincontent} - -\def\resetmargetitels - {\resetmargincontent} - -%D \macros -%D {inleftside,inleftmargin,inrightmargin,inrightside} -%D -%D The fast and clean way of putting things in the margin is -%D using \type{\rlap} or \type{\llap}. Unfortunately these -%D macro's don't handle indentation, left and right skips. We -%D therefore embed them in some macro's that (force and) -%D remove the indentation and restore it afterwards. + \endgroup} -% beware: no \hsize is set (yet)! +\beginETEX -% \def\inleftmargin#1% -% {\pushindentation -% \llap{#1\hskip\leftskip\hskip\leftmargintextdistance}% -% \popindentation -% \ignorespaces} + \def\setmargincontentpenalties + {\xdef\restoreinterlinepenalty{\global\resetpenalties\interlinepenalties}% + \getnoflines\margincontentheight + \global\setpenalties\interlinepenalties\noflines\!!tenthousand} -% \def\inrightmargin#1% -% {\pushindentation -% \rlap{\hskip\hsize\hskip-\rightskip\hskip\rightmargintextdistance#1}% -% \popindentation -% \ignorespaces} +\endETEX -% \def\inleftedge#1% -% {\inleftmargin -% {#1\relax -% \hskip\linkermargebreedte -% \hskip\linkerrandafstand}} +\beginTEX -% \def\inrightedge#1% -% {\inrightmargin -% {\hskip\rechtermargebreedte -% \hskip\rechterrandafstand -% #1}} + \def\setmargincontentpenalties + {\xdef\restoreinterlinepenalty + {\global\let\restoreinterlinepenalty\relax + \global\interlinepenalty=\the\interlinepenalty}% keep = here + \global\interlinepenalty\!!tenthousand} -% \hsize added per August 2003: +\endTEX -\def\inleftmargin#1% - {\pushindentation - \llap - {\hsize\linkermargebreedte - #1\relax - \hskip\leftskip - \hskip\linkermargeafstand}% - \popindentation - \ignorespaces} - -% \def\inrightmargin#1% -% {\pushindentation -% \rlap -% {\hskip\hsize -% \hskip-\rightskip -% \hskip\rechtermargeafstand -% \hsize\rechtermargebreedte -% #1}% -% \popindentation -% \ignorespaces} +% Yet undocumented, for a manual flush in for instance headers. +\def\resetmargincontent + {\doglobal\newcounter\margincontentlevel + \global\chardef\margintextcollected\zerocount + \global\collectedmargintexts\emptytoks} -\def\inrightmargin#1% new: hsize correction - {\pushindentation - \rlap - {\hskip\tekstbreedte - %\hskip-\hsize - %\hskip\hsize - \hskip-\rightskip - \hskip\rechtermargeafstand - \hsize\rechtermargebreedte - #1}% - \popindentation - \ignorespaces} - -\def\inleftedge#1% - {\inleftmargin - {\hsize\linkermargebreedte - #1\relax - \hskip\linkermargebreedte - \hskip\linkerrandafstand}} - -\def\inrightedge#1% - {\inrightmargin - {\hskip\rechtermargebreedte - \hskip\rechterrandafstand - \hsize\rechtermargebreedte - #1}} - -\let\inleftside \inleftedge -\let\inrightside\inrightedge - -%D We want to keep things efficient and therefore only handle -%D situations like: -%D -%D \startbuffer -%D \inleftside {fine} some text \par -%D \strut \inleftmargin {fine} some text \par -%D \noindent \inrightmargin {fine} some text \par -%D \noindent \strut \inrightside {fine} some text \par -%D \stopbuffer -%D -%D \typebuffer -%D -%D which looks like: -%D -%D \bgroup -%D \haalbuffer -%D \parindent 30pt -%D \haalbuffer -%D \egroup - -%D New, yet undocumented: -%D -%D used for pascal: -%D -%D \starttypen -%D \index {test} test \index {west} west \index {rest} rest -%D -%D \startnarrower -%D \placeregister[index][alternative=b,command=\atleftmargin] -%D \stopnarrower -%D \stoptypen - -\def\atleftmargin#1% - {\pushindentation - \llap{\rlap{#1}\hskip\leftskip}% - \popindentation - \ignorespaces} - -\def\atrightmargin#1% - {\pushindentation - \rlap{\hskip\hsize\hskip-\rightskip\llap{#1}}% - \popindentation - \ignorespaces} +\def\placemargincontent + {\ifcase\margintextcollected\else + \bgroup + \chardef\graphicvadjustmode\zerocount + \doflushmargincontents + \egroup + \fi} -% dit zijn voorlopig lokale commando's +% For old times sake (i use it in project styles) we provide -\def\woordinlinker {\inleftmargin} % vervallen -\def\woordinrechter{\inrechtermarge} % vervallen +\def\placemargintexts {\placemargincontent} +\def\resetmargetitels {\resetmargincontent} +\def\margewoordpositie{\margewoord} % obsolete, now no longer range -\def\woordinmarge - {\doquintupleempty\doinmarge - [\@@implaats][\woordinlinker][\woordinrechter]} +% but never use them yourself since they may disappear. +\def\oplinker#1% + {\strut + \graphicvadjust + {\dontcomplain + \setbox\scratchbox\vtop{\forgetall\strut#1}% + \getboxheight\scratchdimen\of\box\scratchbox + \vskip-\scratchdimen % waarom stond hier een \ ? + \box\scratchbox}} + +\setupinmargin + [\c!style=\v!bold, + \c!color=, + \c!location=\v!both, + \c!align=\v!inner, + \c!stack=\v!no, + \c!before=, + \c!after=] + +\setupinmargin + [\v!left] + [\c!distance=\leftmargindistance, + \c!width=\leftmarginwidth, + %\c!align=\v!left, % no + \c!location=\v!left] + +\setupinmargin + [\v!right] + [\c!distance=\rightmargindistance, + \c!width=\rightmarginwidth, + %\c!align=\v!right, % no + \c!location=\v!right] + +% bonus needed when [inner/outer] is used as tag + +\setupinmargin[\v!inner][\c!location=\v!inner,\c!align=\v!inner] +\setupinmargin[\v!outer][\c!location=\v!outer,\c!align=\v!inner] + +% more efficient (5K less fotmat file) % - -\stelinmargein - [\c!letter=\v!vet, - \c!kleur=, - \c!plaats=\v!beide, - \c!uitlijnen=\v!binnen, - \c!stapel=\v!nee, - \c!voor=, - \c!na=] - -\stelinmargein - [\v!links] - [\c!afstand=\linkermargeafstand, - \c!breedte=\linkermargebreedte, - %\c!uitlijnen=\v!links, % njet - \c!plaats=\v!links] - -\stelinmargein - [\v!rechts] - [\c!afstand=\rechtermargeafstand, - \c!breedte=\rechtermargebreedte, - %\c!uitlijnen=\v!rechts, % njet - \c!plaats=\v!rechts] +% \letvalue{\??im\v!inner\c!location}\v!inner \letvalue{\??im\v!inner\c!align}\v!inner +% \letvalue{\??im\v!outer\c!location}\v!outer \letvalue{\??im\v!outer\c!align}\v!inner -\newbox\facingbox -\newbox\facingpage - -\newif\iffacingpages \facingpagesfalse - -\def\shipoutfacingpage - {\iffacingpages - \ifnum\realpageno>\plusone - \bgroup - \chardef\pageornamentstate\plusone - \setbox\facingpage\vbox to \zethoogte - {\unvbox\facingpage\vfil}% - \myshipout{\buildpagebody\box\facingpage}% - \egroup - \else - \global\setbox\facingpage\emptybox - \fi - \fi} - -\def\naastpagina - {\shipoutfacingpage} - -\def\facefloat % redefined - {\startnaast\box\floatbox\stopnaast} - -\def\startnaast % beter: \dowithnextbox - {\iffacingpages - \global\setbox\facingbox\vbox - \bgroup - \hsize\zetbreedte - \else - \@EA\gobbleuntil\@EA\stopnaast - \fi} - -\def\stopnaast - {\egroup - \global\setbox\facingpage\vbox - {\ifvoid\facingpage - \vskip\openstrutdepth % \strutdp - \else - \unvbox\facingpage - \fi - \box\facingbox - \blanko}} - -\def\dostelnaastplaatsenin[#1]% - {\getparameters[\??np][#1]% - \doifelse\@@npstatus\v!start - {\global\facingpagestrue} - {\global\facingpagesfalse}} - -\def\stelnaastplaatsenin - {\dosingleargument\dostelnaastplaatsenin} - -\stelnaastplaatsenin - [\c!status=\v!stop] - -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-mul.tex b/tex/context/base/page-mul.tex index 0aa377f81..8e5fb5888 100644 --- a/tex/context/base/page-mul.tex +++ b/tex/context/base/page-mul.tex @@ -68,16 +68,16 @@ %D perfect. While at the moment the routine doesn't support %D all kind of floats, it does support: %D -%D \startopsomming[opelkaar] -%D \som an unlimitted number of columns -%D \som ragged or not ragged bottoms -%D \som optional balancing without \type{\balancingerrors} -%D \som different \type{\baselineskips}, \type{\spacing}, +%D \startitemize[packed] +%D \item an unlimitted number of columns +%D \item ragged or not ragged bottoms +%D \item optional balancing without \type{\balancingerrors} +%D \item different \type{\baselineskips}, \type{\spacing}, %D \type{\topskip} and \type{\maxdepth} -%D \som left- and right indentation, e.g. within lists -%D \som moving columns floats to the next column or page -%D \som handling of floats that are to wide for a columns -%D \stopopsomming +%D \item left- and right indentation, e.g. within lists +%D \item moving columns floats to the next column or page +%D \item handling of floats that are to wide for a columns +%D \stopitemize %D %D One could wonder why single and multi||columns modes are %D still separated. One reason for this is that \TeX\ is not @@ -86,7 +86,7 @@ %D column as a special case of multi||columns is posible but at %D the cost of worse float handling, worse page breaking, %D worse etc. Complicated multi||column page handling should -%D be done in \kap{DTP}||systems anyway. +%D be done in \cap{DTP}||systems anyway. %D %D There are three commands provided for entering and leaving %D multi||column mode and for going to the next column: @@ -177,14 +177,14 @@ %D A lot of footnote stuff added! -\def\finalcolumntextwidth {\zetbreedte} -\def\finalcolumntextheight {\teksthoogte} -\def\columntextwidth {\zetbreedte} -\def\columntextheight {\teksthoogte} -\def\usercolumnwidth {\tekstbreedte} +\def\finalcolumntextwidth {\makeupwidth} +\def\finalcolumntextheight {\textheight} +\def\columntextwidth {\makeupwidth} +\def\columntextheight {\textheight} +\def\usercolumnwidth {\textwidth} \def\columntextoffset {\!!zeropoint} -\def\fixedcolumnheight {\teksthoogte} +\def\fixedcolumnheight {\textheight} \def\betweencolumns {\hskip\bodyfontsize} \let\setcolumnfloats \relax % in CONTEXT used for floats @@ -286,65 +286,65 @@ %D %D \startbuffer %D \startbuffer[b] -%D \startkolommen +%D \startcolumns %D \input tufte -%D \stopkolommen +%D \stopcolumns %D \stopbuffer -%D \typebuffer[b] \haalbuffer[b] +%D \typebuffer[b] \getbuffer[b] %D %D \startbuffer[b] -%D \startsmaller +%D \startnarrower %D \input tufte -%D \stopsmaller +%D \stopnarrower %D \stopbuffer -%D \typebuffer[b] \haalbuffer[b] +%D \typebuffer[b] \getbuffer[b] %D %D \startbuffer[b] -%D \startkolommen \startsmaller +%D \startcolumns \startnarrower %D \input tufte -%D \stopsmaller \stopkolommen +%D \stopnarrower \stopcolumns %D \stopbuffer -%D \typebuffer[b] \haalbuffer[b] +%D \typebuffer[b] \getbuffer[b] %D %D \startbuffer[b] -%D \startsmaller \startkolommen +%D \startnarrower \startcolumns %D \input tufte -%D \stopkolommen \stopsmaller +%D \stopcolumns \stopnarrower %D \stopbuffer -%D \typebuffer[b] \haalbuffer[b] +%D \typebuffer[b] \getbuffer[b] %D %D \startbuffer[b] -%D \startkolommen \startsmaller[left] +%D \startcolumns \startnarrower[left] %D \input tufte -%D \stopsmaller \stopkolommen +%D \stopnarrower \stopcolumns %D \stopbuffer -%D \typebuffer[b] \haalbuffer[b] +%D \typebuffer[b] \getbuffer[b] %D %D \startbuffer[b] -%D \startsmaller[left] \startkolommen +%D \startnarrower[left] \startcolumns %D \input tufte -%D \stopkolommen \stopsmaller +%D \stopcolumns \stopnarrower %D \stopbuffer -%D \typebuffer[b] \haalbuffer[b] +%D \typebuffer[b] \getbuffer[b] %D %D \startbuffer[b] -%D \startsmaller \startkolommen \startsmaller +%D \startnarrower \startcolumns \startnarrower %D \input tufte -%D \stopsmaller\stopkolommen \stopsmaller +%D \stopnarrower\stopcolumns \stopnarrower %D \stopbuffer -%D \typebuffer[b] \haalbuffer[b] +%D \typebuffer[b] \getbuffer[b] %D %D \startbuffer[b] -%D \startsmaller[left] \startkolommen \startsmaller +%D \startnarrower[left] \startcolumns \startnarrower %D \input tufte -%D \stopsmaller\stopkolommen \stopsmaller +%D \stopnarrower\stopcolumns \stopnarrower %D \stopbuffer -%D \typebuffer[b] \haalbuffer[b] +%D \typebuffer[b] \getbuffer[b] %D \stopbuffer %D %D \start %D \def\postprocesscolumnline#1{\ruledhbox{\strut\box#1}\hss} -%D \haalbuffer +%D \getbuffer %D \stop %D One should be aware that when font related dimensions are @@ -352,24 +352,46 @@ %D dimensions are influenced by bodyfont switches inside %D multi||column mode. -\def\setcolumnvsize - {%\global\vsize\columntextheight - \global\vsize-\columntextoffset - \global\multiply\vsize 2 - \global\advance\vsize \columntextheight +% \def\setcolumnvsize +% {%\global\vsize\columntextheight +% \global\vsize-\columntextoffset +% \global\multiply\vsize \plustwo +% \global\advance\vsize \columntextheight +% \ifdim\precolumnboxheight>\zeropoint +% \global\advance\vsize -\precolumnboxheight +% \fi +% %\getinsertionheights\to\dimen0\\% +% %\global\advance\vsize -\dimen0 +% \settotalinsertionheight +% \global\advance\vsize -\totalinsertionheight +% %%%\ifgridsnapping % evt altijd, nog testen, testing now, see columned tocs +% \getnoflines\vsize +% \vsize\noflines\openlineheight +% \advance\vsize .5\openlineheight % collect enough data +% %%%\fi +% \global\vsize\nofcolumns\vsize +% \global\pagegoal\vsize} % let's do it only here + +\newdimen\mcscratchdimen +\newcount\nofcolumnlines + +\def\getmulticolumnlines + {\mcscratchdimen-\columntextoffset + \multiply\mcscratchdimen \plustwo + \advance\mcscratchdimen \columntextheight \ifdim\precolumnboxheight>\zeropoint - \global\advance\vsize -\precolumnboxheight + \advance\mcscratchdimen -\precolumnboxheight \fi - %\getinsertionheights\to\dimen0\\% - %\global\advance\vsize -\dimen0 \settotalinsertionheight - \global\advance\vsize -\totalinsertionheight -%%%\ifgridsnapping % evt altijd, nog testen, testing now, see columned tocs - \getnoflines\vsize - \vsize\noflines\openlineheight - \advance\vsize .5\openlineheight % collect enough data -%%%\fi - \global\vsize\nofcolumns\vsize + \advance\mcscratchdimen -\totalinsertionheight + \getnoflines\mcscratchdimen + \nofcolumnlines\noflines} + +\def\setcolumnvsize + {\getmulticolumnlines + \mcscratchdimen\nofcolumnlines\openlineheight + \advance\mcscratchdimen .5\openlineheight % collect enough data + \global\vsize\nofcolumns\mcscratchdimen \global\pagegoal\vsize} % let's do it only here %D It really starts here. After some checks and initializations @@ -470,6 +492,36 @@ %D e.g. when there is no text given between \type{\begin..} %D and \type{\end..}. The \type{\par} is needed! +% \def\endmulticolumns +% {%\par +% \vskip\lineheight\vskip-\lineheight % take footnotes into account +% \dontshowcomposition +% \doflushcolumnfloat % added recently +% %\doflushcolumnfloats % no, since it results in wrong top floats +% \flushnotes % before start of columns +% \par +% \ifbalancecolumns +% \global\output{\continuousmulticolumnsout}% +% \goodbreak +% \global\output{\balancedmulticolumnsout}% +% \else +% \goodbreak +% \fi +% \eject % the prevdepth is important, try e.g. toclist in +% \prevdepth\zeropoint % columns before some noncolumned text text +% \global\output\singlecolumnout +% \global\output{\the\mainoutput}% % % % % todo +% \ifvoid\precolumnbox\else +% \unvbox\precolumnbox +% \fi +% \global\precolumnboxheight\zeropoint +% \endgroup % here +% \nofcolumns\plusone +% \setvsize % the outer one! +% \checkendcolumnfootnotes +% \dosomebreak\allowbreak +% \restoresavedfloats} + \def\endmulticolumns {%\par \vskip\lineheight\vskip-\lineheight % take footnotes into account @@ -485,10 +537,10 @@ \else \goodbreak \fi - \eject % the prevdepth is important, try e.g. toclist in + \eject % the prevdepth is important, try e.g. toclist in \prevdepth\zeropoint % columns before some noncolumned text text \global\output\singlecolumnout - \global\output{\the\mainoutput}% % % % % todo + \global\output{\the\mainoutput}% % % % % todo \ifvoid\precolumnbox\else \unvbox\precolumnbox \fi @@ -496,6 +548,7 @@ \endgroup % here \nofcolumns\plusone \setvsize % the outer one! + \synchronizeoutput % new may 2004 / we need to: \pagegoal\vsize \checkendcolumnfootnotes \dosomebreak\allowbreak \restoresavedfloats} @@ -648,16 +701,16 @@ %D \def\postprocesscolumnline#1% or \postprocesscolumnbox %D {\ruledhbox{\box#1}\hss} %D -%D \startkolommen[n=4] +%D \startcolumns[n=4] %D \dorecurse{25}{line: \recurselevel\par} -%D \stopkolommen +%D \stopcolumns %D \stopbuffer %D %D \typebuffer %D %D Here we show the natural width of the lines: %D -%D {\haalbuffer} +%D {\getbuffer} %D %D The next example does a bit more advanced manipulation: %D @@ -669,16 +722,16 @@ %D \relax\unhbox#1\hfill %D \fi} %D -%D \startkolommen[n=4] +%D \startcolumns[n=4] %D \dorecurse{25}{line \recurselevel\par} -%D \stopkolommen +%D \stopcolumns %D \stopbuffer %D %D \typebuffer %D %D Here we also see an application of \type{\currentcolumn}: %D -%D {\haalbuffer} +%D {\getbuffer} %D %D This feature is implemented using the reshape macros %D presented in \type{supp-box}. @@ -756,16 +809,16 @@ \fuzzysnappedbox\unvbox0 \fakecolumnfootnotes{#1}}% \else - \ifclevernotes + \ifcase\clevernotes + \global\setbox#1\vsplit#2 to \dimen#3% + \global\setbox#1\vbox + {\fuzzysnappedbox\unvbox{#1}}% % or \box ? + \else \columnfootnotecorrection{#1}{\dimen#3}% \setbox0\vsplit#2 to \dimen#3% \global\setbox#1\vbox to \dimen#3% {\fuzzysnappedbox\unvbox0 \fakecolumnfootnotes{#1}}% - \else - \global\setbox#1\vsplit#2 to \dimen#3% - \global\setbox#1\vbox - {\fuzzysnappedbox\unvbox{#1}}% % or \box ? \fi \fi \egroup} @@ -786,7 +839,7 @@ \def\fakecolumnfootnotes#1% {\relax - \ifclevernotes + \ifcase\clevernotes\else \ifnum#1=\lastcolumnbox \fakenotes \fi @@ -794,34 +847,91 @@ \def\columnfootnotecorrection#1#2% {\relax - \ifclevernotes + \ifcase\clevernotes + % page notes + \or + \ifnum#1=\firstcolumnbox\relax + \calculatetotalclevernoteheight + \advance#2 -\totalnoteheight + \fi + \else \ifnum#1=\lastcolumnbox\relax - \calculatetotalnoteheight + \calculatetotalclevernoteheight \advance#2 -\totalnoteheight \fi \fi} -\def\overlaycolumnfootnotes % VERVANGEN !!! +% \def\overlaycolumnfootnotes % VERVANGEN !!! +% {\relax +% \ifcase\clevernotes\else +% \checknotepresence +% \ifnotespresent +% % the note box has the depth of the notefont +% % because a column (i.e. first column has no depth, +% % we need to anchor top down) +% \bgroup +% \scratchdimen\ht\firstcolumnbox +% \advance\scratchdimen -\openstrutdepth % \strutdp +% \getnoflines\scratchdimen +% \advance\noflines -2 +% \scratchdimen\noflines\lineheight +% \advance\scratchdimen \topskip +% \setbox0\hbox +% {\lower\scratchdimen\vbox{\placenoteinserts}}% +% \ht0=\openstrutheight % \strutht +% \dp0=\openstrutdepth % \strutdp +% \scratchdimen\ht\lastcolumnbox +% \global\setbox\lastcolumnbox\vbox to \scratchdimen +% {\box\lastcolumnbox +% \vskip-\scratchdimen +% \restoretextcolor{\box0}}% +% \egroup +% \fi +% \fi} + +\def\overlaycolumnfootnotes {\relax - \ifclevernotes + \ifcase\clevernotes + % page notes + \else \checknotepresence \ifnotespresent + % the note box has the depth of the notefont + % because a column (i.e. first column has no depth, + % we need to anchor top down) \bgroup - \scratchdimen\ht\firstcolumnbox - \advance\scratchdimen -\openstrutdepth % \strutdp - \getnoflines\scratchdimen - \advance\noflines -2 - \scratchdimen\noflines\lineheight - \advance\scratchdimen \topskip - \setbox0\hbox - {\lower\scratchdimen\vbox{\placenoteinserts}}% - \ht0=\openstrutheight % \strutht - \dp0=\openstrutdepth % \strutdp - \scratchdimen\ht\lastcolumnbox - \global\setbox\lastcolumnbox\vbox to \scratchdimen - {\box\lastcolumnbox - \vskip-\scratchdimen - \restoretextcolor{\box0}}% + \ifcase\clevernotes\or + \getmulticolumnlines + \advance\nofcolumnlines -2 % ? + \scratchdimen\nofcolumnlines\lineheight + \advance\scratchdimen \topskip + \setbox0\hbox + {\lower\scratchdimen\vbox{\placenoteinserts}}% + \ht0=\openstrutheight % \strutht + \dp0=\openstrutdepth % \strutdp + \scratchdimen\ht\firstcolumnbox + \global\setbox\firstcolumnbox\vbox to \scratchdimen + {\box\firstcolumnbox + \vskip-\scratchdimen + \restoretextcolor{\box0}}% + \else + % maybe here also \getmulticolumnlines + \scratchdimen\ht\firstcolumnbox + \advance\scratchdimen -\openstrutdepth % \strutdp + \getnoflines\scratchdimen + \advance\noflines -2 + \scratchdimen\noflines\lineheight + \advance\scratchdimen \topskip + \setbox0\hbox + {\lower\scratchdimen\vbox{\placenoteinserts}}% + \ht0=\openstrutheight % \strutht + \dp0=\openstrutdepth % \strutdp + \scratchdimen\ht\lastcolumnbox + \global\setbox\lastcolumnbox\vbox to \scratchdimen + {\box\lastcolumnbox + \vskip-\scratchdimen + \restoretextcolor{\box0}}% + \fi \egroup \fi \fi} @@ -837,14 +947,16 @@ \forgetall \setmulticolumnsout \dontshowcomposition - \dimen0=\columntextheight - \advance\dimen0 -\precolumnboxheight - \settotalinsertionheight - \advance\dimen0 -\totalinsertionheight - \ifgridsnapping % evt altijd, nog testen - \getnoflines{\dimen0} - \dimen0=\noflines\openlineheight - \fi +% \dimen0=\columntextheight +% \advance\dimen0 -\precolumnboxheight +% \settotalinsertionheight +% \advance\dimen0 -\totalinsertionheight +% \ifgridsnapping % evt altijd, nog testen +% \getnoflines{\dimen0} +% \dimen0=\noflines\openlineheight +% \fi + \getmulticolumnlines + \dimen0=\nofcolumnlines\openlineheight \dohandleallcolumns {\splitcurrentcolumn from \box\normalpagebox to \dimen0} \setbox\restofpage\vbox{\unvbox\normalpagebox}% @@ -1043,20 +1155,20 @@ %D The multicolumn mechanism is incorporated in a \CONTEXT\ %D interface, which acts like: %D -%D \starttypen +%D \starttyping %D \startcolumns[n=4,balance=no] %D some text %D \stopcolumns -%D \stoptypen +%D \stoptyping %D %D The setup is optional. The default behaviour of columns %D can be set up with: %D -%D \starttypen +%D \starttyping %D \setupcolumns %D [n=2, %D balance=yes] -%D \stoptypen +%D \stoptyping %D %D In this case, stretching is according to the way it's %D done outside columns (\type{\inheritcolumnstrue}). Also @@ -1154,7 +1266,7 @@ #2=\dimen4 #3=\dimen6 } -\def\getinsertionheight% +\def\getinsertionheight {\ifdim\pagegoal<\maxdimen \bgroup \dimen0=\columntextheight @@ -1162,7 +1274,7 @@ \xdef\insertionheight{\the\dimen0}% \egroup \else - \global\let\insertionheight=\zeropoint + \global\let\insertionheight\zeropoint \fi} \def\docolumnroomfloat @@ -1180,7 +1292,7 @@ % \advance\dimen0 \insertionheight %\fi \setbox\scratchbox\vbox % tricky met objecten ? - {\blanko[\@@bkvoorwit] + {\blank[\@@bkspacebefore] \snaptogrid\vbox{\copy\floatbox}}% \advance\dimen0 \ht\scratchbox \advance\dimen0 .5\lineheight % needed because goal a bit higher @@ -1203,64 +1315,6 @@ \newif\ifflushingcolumnfloats \flushingcolumnfloatstrue -% \def\doflushcolumnfloat% -% {\ifpostponecolumnfloats\else\ifflushingcolumnfloats\ifprocessingverbatim\else\ifsomefloatwaiting -% \bgroup -% \forgetall -% \let\doflushcolumnfloat=\relax -% \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\% -% \ifdim\dimen0>\zeropoint -% \dogetfloat -% \ifdim\wd\floatbox>\hsize -% \doresavefloat -% \else -% %\setbox2=\vbox -% % {\blanko[\@@bkvoorwit] -% % \snaptogrid\vbox{\copy\floatbox}% -% % \blanko[\@@bknawit] -% \setbox2=\vbox -% {\blanko[\@@bkvoorwit] -% \snaptogrid\vbox{\copy\floatbox}}% -% \advance\dimen0 by \ht2 -% \ifdim\dimen0>\dimen2 -% \ifnum\count255<\nofcolumns -% \advance\count255 by 1 -% \edef\currenttopcolumnbox{\getvalue{\@@topcol\the\count255}}% -% \ifdim\ht\currenttopcolumnbox=\zeropoint -% \global\setbox\currenttopcolumnbox=\vbox -% {\snaptogrid\vbox{\copy\floatbox} -% \witruimte % nodig ? -% \blanko[\@@bknawit]}% -% \dimen4=\ht\currenttopcolumnbox -% \advance\dimen4 by \dp\currenttopcolumnbox -% \global\advance\vsize by -\dimen4 -% \advance\dimen4 by -\pagegoal -% \global\pagegoal=-\dimen4 -% \showmessage{\m!columns}{12}{a}% -% \else -% \showmessage{\m!columns}{12}{b}% -% \doresavefloat -% \fi -% \else -% \showmessage{\m!columns}{12}{c}% -% \doresavefloat -% \fi -% \else -% \ifhmode{\setbox0=\lastbox}\fi% waar is die er in geslopen -% \par -% \ifdim\prevdepth<\zeropoint \else % anders bovenaan kolom witruimte -% \nobreak -% \blanko[\@@bkvoorwit] -% \nobreak -% \fi -% \flushfloatbox -% \blanko[\@@bknawit] -% \fi -% \fi -% \fi -% \egroup -% \fi\fi\fi\fi} - \def\doflushcolumnfloat {\ifpostponecolumnfloats\else\ifflushingcolumnfloats\ifprocessingverbatim\else\ifsomefloatwaiting \bgroup @@ -1273,11 +1327,11 @@ \doresavefloat \else %\setbox2=\vbox - % {\blanko[\@@bkvoorwit] + % {\blank[\@@bkspacebefore] % \snaptogrid\vbox{\copy\floatbox}% - % \blanko[\@@bknawit] + % \blank[\@@bkspaceafter] \setbox2=\vbox - {\blanko[\@@bkvoorwit] + {\blank[\@@bkspacebefore] \snaptogrid\vbox{\copy\floatbox}}% \advance\dimen0 \ht2 \ifdim\dimen0>\dimen2 @@ -1287,8 +1341,8 @@ \ifdim\ht\currenttopcolumnbox=\zeropoint \global\setbox\currenttopcolumnbox\vbox {\snaptogrid\vbox{\copy\floatbox} - \witruimte % nodig ? - \blanko[\@@bknawit]}% + \whitespace % nodig ? + \blank[\@@bkspaceafter]}% \dimen4=\ht\currenttopcolumnbox \advance\dimen4 \dp\currenttopcolumnbox \global\advance\vsize -\dimen4 @@ -1308,11 +1362,11 @@ \par \ifdim\prevdepth<\zeropoint \else % anders bovenaan kolom witruimte \nobreak - \blanko[\@@bkvoorwit] + \blank[\@@bkspacebefore] \nobreak \fi \flushfloatbox - \blanko[\@@bknawit] + \blank[\@@bkspaceafter] \fi \fi \fi @@ -1323,12 +1377,12 @@ %D are placed, taking the width of a float into account. This %D routine can be improved on different ways: %D -%D \startopsomming[intro,opelkaar] -%D \som taking into account some imaginary baseline, just to +%D \startitemize[intro,packed] +%D \item taking into account some imaginary baseline, just to %D get the captions in line -%D \som multipass flushing until as many floats are displaced +%D \item multipass flushing until as many floats are displaced %D as possible -%D \stopopsomming +%D \stopitemize %D %D When handling lots of (small) floats spacing can get worse %D because of lining out the columns. @@ -1348,8 +1402,8 @@ {\snaptogrid\vbox {\copy\currenttopcolumnbox \hbox{\vphantom{\copy\floatbox}}} - \witruimte % nodig ? - \blanko[\@@bknawit]}% + \whitespace % nodig ? + \blank[\@@bkspaceafter]}% \else \dogetfloat \ifdim\wd\floatbox>\finalcolumntextwidth % better somewhere else too @@ -1374,9 +1428,9 @@ \advance\dimen0 -\intercolumnwidth \global\setbox\floatbox\hbox to \dimen0 %{\hss\hbox{\copy\floatbox}\hss}% - {\processaction[\@@bkplaats] % how easy to forget - [ \v!links=>\copy\floatbox\hss, - \v!rechts=>\hss\copy\floatbox, + {\processaction[\@@bklocation] % how easy to forget + [ \v!left=>\copy\floatbox\hss, + \v!right=>\hss\copy\floatbox, \s!default=>\hss\copy\floatbox\hss, \s!unknown=>\hss\copy\floatbox\hss]}% \fi @@ -1389,8 +1443,8 @@ {\snaptogrid\vbox {\copy\currenttopcolumnbox \copy\floatbox} - \witruimte % nodig ? - \blanko[\@@bknawit]}% + \whitespace % nodig ? + \blank[\@@bkspaceafter]}% \fi \dimen6\ht\currenttopcolumnbox \advance\dimen6 \dp\currenttopcolumnbox @@ -1416,44 +1470,44 @@ %D One inprovement can be to normalize the height of floats %D to $n\times$\type{\lineheight} with a macro like: %D -%D \starttypen +%D \starttyping %D \normalizevbox{...} -%D \stoptypen +%D \stoptyping % border case, should fit on one page % -% \startkolommen +% \startcolumns % % 1 \input tufte \par \plaatsfiguur{}{\omlijnd[breedte=\hsize,hoogte=3cm]{1}} % 2 \input tufte \par \plaatsfiguur{}{\omlijnd[breedte=\hsize,hoogte=3cm]{2}} % 3 \input tufte \par \plaatsfiguur{}{\omlijnd[breedte=\hsize,hoogte=3cm]{3}} % -% \stopkolommen +% \stopcolumns -\newif\ifbinnenkolommen +\newif\ifinsidecolumns \newif\if@@klbalanceren \newif\if@@kluitlijnen -\binnenkolommenfalse +\insidecolumnsfalse -\def\stelkolommenin - {\dodoubleargument\dostelkolommenin} +\def\setupcolumns + {\dosingleempty\dosetupcolumns} -\def\stelkolommenin[#1]% +\def\dosetupcolumns[#1]% {\getparameters[\??kl][#1]% \nofcolumns\@@kln\relax \processaction - [\@@kllijn] - [ \v!aan=>\let\betweencolumns\linebetweencolumns, - \v!uit=>\let\betweencolumns\spacebetweencolumns, + [\@@klrule] + [ \v!on=>\let\betweencolumns\linebetweencolumns, + \v!off=>\let\betweencolumns\spacebetweencolumns, \s!default=>\let\betweencolumns\spacebetweencolumns, - \s!unknown=>\let\betweencolumns\@@kllijn]} + \s!unknown=>\let\betweencolumns\@@klrule]} \def\linebetweencolumns {\bgroup - \startcolorpage - \ifdim\@@klafstand>\zeropoint - \dimen0=\@@klafstand + \starttextproperties + \ifdim\@@kldistance>\zeropoint + \dimen0=\@@kldistance \else \dimen0=\linewidth \fi @@ -1463,115 +1517,115 @@ \!!width\linewidth \ifb@selinebottom\!!depth\strutdepth\fi \hskip.5\dimen0\relax - \stopcolorpage + \stoptextproperties \egroup} \def\spacebetweencolumns - {\hskip\@@klafstand} + {\hskip\@@kldistance} \presetlocalframed[\??kl] \def\backgroundfinishcolumnbox - {\doifinsetelse\@@kloffset{\v!geen,\v!overlay} + {\doifinsetelse\@@kloffset{\v!none,\v!overlay} {\let\@@kloffset\!!zeropoint} {\scratchdimen\@@kloffset - \advance\scratchdimen -\@@kllijndikte + \advance\scratchdimen -\@@klrulethickness \edef\@@kloffset{\the\scratchdimen}}% \localframed [\??kl] - [\c!strut=\v!nee, - \c!breedte=\v!passend, - \c!hoogte=\v!passend, - \c!uitlijnen=]} + [\c!strut=\v!no, + \c!width=\v!fit, + \c!height=\v!fit, + \c!align=]} \let\restorecolumnsettings\relax -\definecomplexorsimpleempty\startkolommen +\definecomplexorsimpleempty\startcolumns -\def\complexstartkolommen[#1]% %% \startkolommen +\def\complexstartcolumns[#1]% %% \startcolumns {\bgroup - \let\stopkolommen\egroup - \ifbinnenkolommen + \let\stopcolumns\egroup + \ifinsidecolumns \else - \stelkolommenin[#1]% + \setupcolumns[#1]% \ifnum\@@kln>1\relax - \witruimte + \whitespace \begingroup - \doif\@@kloptie\v!achtergrond + \doif\@@kloption\v!background {\let\finishcolumnbox\backgroundfinishcolumnbox \let\columntextoffset\@@kloffset}% - \ifx\@@klcommando\empty\else - \let\postprocesscolumnline\@@klcommando + \ifx\@@klcommand\empty\else + \let\postprocesscolumnline\@@klcommand \fi - \doifelsenothing\@@klhoogte + \doifelsenothing\@@klheight \heightencolumnsfalse \heightencolumnstrue - \doifelse\@@klrichting\v!rechts + \doifelse\@@kldirection\v!right \reversecolumnsfalse \reversecolumnstrue - \doifelse\@@klbalanceren\v!ja + \doifelse\@@klbalance\v!yes \balancecolumnstrue \balancecolumnsfalse \processaction % ook nog: laatsteuitlijnen - [\@@kluitlijnen] - [ \v!ja=>\stretchcolumnstrue + [\@@klalign] + [ \v!yes=>\stretchcolumnstrue \inheritcolumnsfalse, - \v!nee=>\stretchcolumnsfalse + \v!no=>\stretchcolumnsfalse \inheritcolumnsfalse, - \v!tekst=>\stretchcolumnsfalse + \v!text=>\stretchcolumnsfalse \inheritcolumnstrue]% \nofcolumns=\@@kln % % probably more is needed, and how about nesting save's % \savecurrentblanko - \savecurrentwitruimte + \savecurrentwhitespace \def\restorecolumnsettings {\boxmaxdepth\maxdimen % done elsewhere \restorecurrentblanko - \restorecurrentwitruimte}% + \restorecurrentwhitespace}% % - \edef\fixedcolumnheight{\@@klhoogte}% - \edef\minbalancetoplines{\@@klnboven}% - \setuptolerance[\@@kltolerantie]% %% \startkolommen - \setupblank[\@@klblanko]% - \ifdim\tussenwit>\zeropoint\relax - \setupwhitespace[\@@klblanko]% + \edef\fixedcolumnheight{\@@klheight}% + \edef\minbalancetoplines{\@@klntop}% + \setuptolerance[\@@kltolerance]% %% \startcolumns + \setupblank[\@@klblank]% + \ifdim\ctxparskip>\zeropoint\relax + \setupwhitespace[\@@klblank]% \fi - \def\stopkolommen + \def\stopcolumns {\endmulticolumns - \global\binnenkolommenfalse + \global\insidecolumnsfalse \endgroup \egroup}% - \global\binnenkolommentrue + \global\insidecolumnstrue \beginmulticolumns \fi \fi} -\installcolumnbreakhandler {MUL} \v!voorkeur +\installcolumnbreakhandler {MUL} \v!preference {\goodbreak} -\installcolumnbreakhandler {MUL} \v!ja +\installcolumnbreakhandler {MUL} \v!yes {\par % todo: since - {\testrulewidth\zeropoint\ruledvskip\teksthoogte} % we misuse a + {\testrulewidth\zeropoint\ruledvskip\textheight} % we misuse a \penalty-200 % side effect - \vskip-\teksthoogte - \prevdepth-\thousandpoint} % signals top of column to \blanko + \vskip-\textheight + \prevdepth-\thousandpoint} % signals top of column to \blank -\stelkolommenin +\setupcolumns [\c!n=2, - \c!nboven=1, - \c!commando=, - \c!richting=\v!rechts, - \c!lijn=\v!uit, - \c!tolerantie=\v!soepel, - \c!afstand=1.5\korpsgrootte, % influenced by switching - \c!hoogte=, - \c!balanceren=\v!ja, - \c!uitlijnen=\v!tekst, - \c!blanko={\v!regel,\v!vast}, - \c!optie=, - \c!lijndikte=\linewidth, + \c!ntop=1, + \c!command=, + \c!direction=\v!right, + \c!rule=\v!off, + \c!tolerance=\v!tolerant, + \c!distance=1.5\korpsgrootte, % influenced by switching + \c!height=, + \c!balance=\v!yes, + \c!align=\v!text, + \c!blank={\v!line,\v!fixed}, + \c!option=, + \c!rulethickness=\linewidth, \c!offset=.5\korpsgrootte] %D Undocumented and still under development. @@ -1581,13 +1635,14 @@ \def\dostartsimplecolumns[#1]% {\bgroup + \nopenalties \getparameters[\??kl] - [\c!breedte=\hsize,\c!afstand=1.5\korpsgrootte,% - \c!n=2,\c!regels=0,#1]% - \let\rigidcolumnlines\@@klregels - \setrigidcolumnhsize\@@klbreedte\@@klafstand\@@kln + [\c!width=\hsize,\c!distance=1.5\korpsgrootte,% + \c!n=2,\c!lines=0,#1]% + \let\rigidcolumnlines\@@kllines + \setrigidcolumnhsize\@@klwidth\@@kldistance\@@kln \setbox\scratchbox\vbox\bgroup - \forgetall} % \blanko[\v!blokkeer] + \forgetall} % \blank[\v!disable] \def\stopsimplecolumns {\removebottomthings @@ -1595,4 +1650,4 @@ \rigidcolumnbalance\scratchbox \egroup} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-not.tex b/tex/context/base/page-not.tex index 23217781b..151f957f4 100644 --- a/tex/context/base/page-not.tex +++ b/tex/context/base/page-not.tex @@ -23,18 +23,18 @@ \unprotect \def\checkbegincolumnfootnotes % should happen inside otr - {\ifclevernotes + {\ifcase\clevernotes + \erasenotebackup + \else \doflushnotes \savenotecontent - \else - \erasenotebackup \fi \savenotedata \checknotes} \def\checkendcolumnfootnotes {\restorenotedata % maybe better just \checknotes - \ifclevernotes + \ifcase\clevernotes\else \restorenotecontent \fi} @@ -52,19 +52,21 @@ % hm \def\checkbegincolumnfootnotes % should happen inside otr - {\ifclevernotes + {\ifcase\clevernotes + \erasenotebackup + \else \doflushnotes \savenotecontent - \else - \erasenotebackup \fi \savenotedata \checknotes} \def\checkendcolumnfootnotes {\restorenotedata - \ifclevernotes - \restorenotecontent + \ifinsidecolumns + \ifcase\clevernotes\else + \restorenotecontent + \fi \fi} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-num.tex b/tex/context/base/page-num.tex index d25def347..5bab4251e 100644 --- a/tex/context/base/page-num.tex +++ b/tex/context/base/page-num.tex @@ -13,6 +13,8 @@ \writestatus{loading}{Context Core Macros / Numbering} +% todo: {}{}{} ipv ...--...-...-...--... in pag ref + \unprotect % \gotonextsubpage : voor de pagebody @@ -29,53 +31,53 @@ \newif\ifsubpaging \newif\ifshowingsubpage -\definieernummer +\definenumber [\s!subpage] -\stelnummerin +\setupnumber [\s!subpage] - [\c!wijze=\@@snwijze] + [\c!way=\@@snway] % hard to sync % -% \def\resetsubpaginanummer% -% {\resetnummer[\s!subpage]% -% \global\subpageno=\ruwenummer[\s!subpage]} +% \def\resetsubpagenumber% +% {\resetnumber[\s!subpage]% +% \global\subpageno=\rawnumber[\s!subpage]} % % better sync \newif\ifresettingsubpagenumber -\def\resetsubpaginanummer +\def\resetsubpagenumber {\global\resettingsubpagenumbertrue} % so far for sync, see \gotonext... -\def\dostelsubpaginanummerin[#1]% - {\doifelse{#1}{\v!reset} - {\resetsubpaginanummer} % \resetnummer[\s!subpage] +\def\dosetupsubpagenumber[#1]% + {\doifelse{#1}\v!reset + \resetsubpagenumber % \resetnumber[\s!subpage] {\getparameters[\??sn][#1]% \processaction - [\@@snstatus] + [\@@snstate] [ \v!stop=>\ifsubpaging - \resetsubpaginanummer % new, see sync + \resetsubpagenumber % new, see sync \else \subpagingfalse \fi \showingsubpagefalse, \v!start=>\subpagingtrue \showingsubpagetrue, - \v!geen=>\subpagingtrue + \v!none=>\subpagingtrue \showingsubpagefalse]}} -\def\aantalsubpaginas +\def\numberofsubpages {\ifshowingsubpage\nofsubpages\else0\fi} -\def\subpaginanummer +\def\subpagenumber {\ifshowingsubpage\the\subpageno\else0\fi} -\def\stelsubpaginanummerin - {\dosingleargument\dostelsubpaginanummerin} +\def\setupsubpagenumber + {\dosingleargument\dosetupsubpagenumber} \def\newnofsubpages{0} \def\nofsubpages {0} @@ -92,7 +94,7 @@ \def\savenofsubpages {\ifsubpaging \showmessage\m!layouts6{\newnofsubpages,\the\subpageno}% - \immediatewriteutilitycommand% + \immediatewriteutilitycommand {\twopassentry% {\s!subpage}% {\newnofsubpages}% @@ -115,13 +117,13 @@ \def\gotonextsubpage % overlapt behoorlijk met realpage macro {\global\let\checksubpages\relax \ifresettingsubpagenumber - \resetnummer[\s!subpage]% + \resetnumber[\s!subpage]% \global\resettingsubpagenumberfalse \fi \ifsubpaging \edef\oldsubpage{\the\subpageno}% - \verhoognummer[\s!subpage]% - \global\subpageno\ruwenummer[\s!subpage]\relax + \incrementnumber[\s!subpage]% + \global\subpageno\rawnumber[\s!subpage]\relax \ifnum\subpageno=\plusone \gettwopassdata\s!subpage \setsubpagenumbers @@ -137,27 +139,27 @@ \fi \doglobal\increment\newnofsubpages\relax \fi - \setglobalsystemreference\rt!page\v!eerstesubpagina\firstsubpage - \setglobalsystemreference\rt!page\v!laatstesubpagina\lastsubpage + \setglobalsystemreference\rt!page\v!firstsubpage\firstsubpage + \setglobalsystemreference\rt!page\v!lastsubpage\lastsubpage \bgroup \ifnum\realpageno=\firstsubpage\relax \global\let\prevsubpage\firstsubpage - \setglobalsystemreference\rt!page{\v!sub\v!achteruit}\lastsubpage + \setglobalsystemreference\rt!page\v!subbackward\lastsubpage \else \xdef\prevsubpage{\realfolio}% \doglobal\decrement\prevsubpage - \setglobalsystemreference\rt!page{\v!sub\v!achteruit}\prevsubpage + \setglobalsystemreference\rt!page\v!subbackward\prevsubpage \fi - \setglobalsystemreference\rt!page\v!vorigesubpagina\prevsubpage + \setglobalsystemreference\rt!page\v!previoussubpage\prevsubpage \ifnum\realpageno=\lastsubpage\relax \global\let\nextsubpage\lastsubpage - \setglobalsystemreference\rt!page{\v!sub\v!vooruit}\firstsubpage + \setglobalsystemreference\rt!page\v!subforward\firstsubpage \else \xdef\nextsubpage{\realfolio}% \doglobal\increment\nextsubpage - \setglobalsystemreference\rt!page{\v!sub\v!vooruit}\nextsubpage + \setglobalsystemreference\rt!page\v!subforward\nextsubpage \fi - \setglobalsystemreference\rt!page\v!volgendesubpagina\nextsubpage + \setglobalsystemreference\rt!page\v!nextsubpage\nextsubpage \egroup \fi} @@ -200,56 +202,56 @@ \ifnum\realpageno>\lastpage \xdef\lastpage{\realfolio}% \fi - \setglobalsystemreference\rt!page\v!eerstepagina \firstpage - \setglobalsystemreference\rt!page\v!laatstepagina\lastpage + \setglobalsystemreference\rt!page\v!firstpage \firstpage + \setglobalsystemreference\rt!page\v!lastpage\lastpage \bgroup \ifnum\realpageno>\plusone \advance\realpageno \minusone \xdef\prevpage{\realfolio}% - \setglobalsystemreference\rt!page\v!achteruit\prevpage + \setglobalsystemreference\rt!page\v!backward\prevpage \else \global\let\prevpage\firstpage - \setglobalsystemreference\rt!page\v!achteruit\lastpage + \setglobalsystemreference\rt!page\v!backward\lastpage \fi - \setglobalsystemreference\rt!page\v!vorigepagina\prevpage + \setglobalsystemreference\rt!page\v!previouspage\prevpage \egroup \bgroup \ifnum\realpageno<\lastpage\relax \advance\realpageno \plusone \xdef\nextpage{\realfolio}% - \setglobalsystemreference\rt!page\v!pagina\nextpage - \setglobalsystemreference\rt!page\v!vooruit\nextpage + \setglobalsystemreference\rt!page\v!page\nextpage + \setglobalsystemreference\rt!page\v!forward\nextpage \bgroup \xdef\nextnextpage{\realfolio}% \ifodd\realpageno - \setglobalsystemreference\rt!page\v!volgendeonevenpagina\nextnextpage + \setglobalsystemreference\rt!page\v!nextoddpage\nextnextpage \else - \setglobalsystemreference\rt!page\v!volgendeevenpagina\nextnextpage + \setglobalsystemreference\rt!page\v!nextevenpage\nextnextpage \fi \advance\realpageno \plusone \xdef\nextnextpage{\realfolio}% \ifnum\realpageno>\lastpage\relax %\ifodd\realpageno - % \setglobalsystemreference\rt!page\v!volgendeonevenpagina\lastpage + % \setglobalsystemreference\rt!page\v!nextoddpage\lastpage %\else - % \setglobalsystemreference\rt!page\v!volgendeevenpagina\lastpage + % \setglobalsystemreference\rt!page\v!nextevenpage\lastpage %\fi \else \ifodd\realpageno - \setglobalsystemreference\rt!page\v!volgendeonevenpagina\nextnextpage + \setglobalsystemreference\rt!page\v!nextoddpage\nextnextpage \else - \setglobalsystemreference\rt!page\v!volgendeevenpagina\nextnextpage + \setglobalsystemreference\rt!page\v!nextevenpage\nextnextpage \fi \fi \egroup \else \global\let\nextpage\lastpage - \setglobalsystemreference\rt!page\v!pagina\firstpage - \setglobalsystemreference\rt!page\v!vooruit\firstpage - \setglobalsystemreference\rt!page\v!volgendeonevenpagina\lastpage - \setglobalsystemreference\rt!page\v!volgendeevenpagina\lastpage + \setglobalsystemreference\rt!page\v!page\firstpage + \setglobalsystemreference\rt!page\v!forward\firstpage + \setglobalsystemreference\rt!page\v!nextoddpage\lastpage + \setglobalsystemreference\rt!page\v!nextevenpage\lastpage \fi - \setglobalsystemreference\rt!page\v!volgendepagina\realfolio + \setglobalsystemreference\rt!page\v!nextpage\realfolio \egroup} \def\checkrealpage @@ -265,55 +267,55 @@ \savecurrentvalue\lastpagenumber\folio \egroup} -\def\totaalaantalpaginas +\def\totalnumberofpages {\lastpage} \def\setpagecounters - {\setuserpageno{\ruwenummer[\s!page]}% - \doifelse\@@snstatus\v!stop + {\setuserpageno{\rawnumber[\s!page]}% + \doifelse\@@snstate\v!stop {\global\subpageno\zerocount} - {\global\subpageno\ruwenummer[\s!subpage]}\relax} + {\global\subpageno\rawnumber[\s!subpage]}\relax} % Standaard is \count0 in Plain TeX de paginateller. Omwille % van de afhandeling van lokaal nummeren, definieren we % echter een eigen nummer. -\definieernummer +\definenumber [\s!page] - [\c!conversie=\@@nmconversie, - \c!wijze=\@@nmwijze, - \c!status=\@@nmstatus, + [\c!conversion=\@@nmconversion, + \c!way=\@@nmway, + \c!state=\@@nmstate, \c!start=1] % \@@pnstatus global, but \@@nmstatus local and only start/stop -\global\let\@@pnstatus\@@pnstatus +\global\let\@@pnstate\@@pnstate -\def\dostelpaginanummerin[#1]% - {\getparameters[\??pn][\c!nummer=,#1]% - \global\let\@@pnstatus\@@pnstatus - \doifsomething\@@pnnummer - {\setnummer[\s!page]{\@@pnnummer}% - \setuserpageno{\ruwenummer[\s!page]}}% +\def\dosetuppagenumber[#1]% + {\getparameters[\??pn][\c!number=,#1]% + \global\let\@@pnstate\@@pnstate + \doifsomething\@@pnnumber + {\setnumber[\s!page]{\@@pnnumber}% + \setuserpageno{\rawnumber[\s!page]}}% % this makes starting at an even page possible \ifnum\realpageno=1 \ifodd\pageno \else \global\shiftedrealpagenotrue \fi \fi} -\def\stelpaginanummerin - {\dosingleargument\dostelpaginanummerin} +\def\setuppagenumber + {\dosingleargument\dosetuppagenumber} % long time used alternative % % \def\verlaagpaginanummer % {\doifinset{\@@pnstatus}{\v!start,\v!leeg,\v!geen} -% {\verlaagnummer[\s!page]% -% \setuserpageno{\ruwenummer[\s!page]}}} +% {\decrementnumber[\s!page]% +% \setuserpageno{\rawnumber[\s!page]}}} % % \def\verhoogpaginanummer % {\doifinset{\@@pnstatus}{\v!start,\v!leeg,\v!geen} -% {\verhoognummer[\s!page]% -% \setuserpageno{\ruwenummer[\s!page]}}% +% {\incrementnumber[\s!page]% +% \setuserpageno{\rawnumber[\s!page]}}% % \doifinset{\@@pnstatus}{\v!handhaaf,\v!leeg} % {\global\let\@@pnstatus\v!start}} % @@ -321,30 +323,30 @@ % (needed during a test / prelude to installable methods) \def\dodecrementpagenumber - {\verlaagnummer[\s!page]\setuserpageno{\ruwenummer[\s!page]}} + {\decrementnumber[\s!page]\setuserpageno{\rawnumber[\s!page]}} \def\doincrementpagenumber - {\verhoognummer[\s!page]\setuserpageno{\ruwenummer[\s!page]}} + {\incrementnumber[\s!page]\setuserpageno{\rawnumber[\s!page]}} \def\dosynchronizepagenumber - {\global\let\@@pnstatus\v!start} + {\global\let\@@pnstate\v!start} -\def\verlaagpaginanummer{\getvalue{\??pn-\@@pnstatus}} -\def\verhoogpaginanummer{\getvalue{\??pn+\@@pnstatus}} +\def\verlaagpaginanummer{\getvalue{\??pn-\@@pnstate}} +\def\verhoogpaginanummer{\getvalue{\??pn+\@@pnstate}} \letvalue{\??pn-\v!start }\dodecrementpagenumber -\letvalue{\??pn-\v!geen }\dodecrementpagenumber -\letvalue{\??pn-\v!leeg }\dodecrementpagenumber +\letvalue{\??pn-\v!none }\dodecrementpagenumber +\letvalue{\??pn-\v!empty }\dodecrementpagenumber \letvalue{\??pn+\v!start }\doincrementpagenumber -\letvalue{\??pn+\v!geen }\doincrementpagenumber -\setvalue{\??pn+\v!leeg }{\doincrementpagenumber +\letvalue{\??pn+\v!none }\doincrementpagenumber +\setvalue{\??pn+\v!empty }{\doincrementpagenumber \dosynchronizepagenumber} -\letvalue{\??pn+\v!handhaaf}\dosynchronizepagenumber +\letvalue{\??pn+\v!keep}\dosynchronizepagenumber % so far -\def\checkpagecounter% +\def\checkpagecounter {\checknummer{\s!page}} % \getpagestatus @@ -370,7 +372,7 @@ {\ifdubbelzijdig \gettwopassdata\s!page \iftwopassdatafound \else - \let\twopassdata=\realpageno + \let\twopassdata\realpageno \fi \ifodd\twopassdata \global\rightpagetrue @@ -383,7 +385,7 @@ \fi} \def\@@nmin {} % kan vervallen (upward compatibility) -\def\@@nmplaats {} % mag {plaats, in} zijn +\def\@@nmlocation {} % mag {plaats, in} zijn \newcounter\@@pagenumberlocation @@ -392,48 +394,49 @@ \def\dodosetpagenumberlocation#1% tricky because of ...texts {\increment\@@pagenumberlocation - \ifx\@@nmplaats\empty\else + \ifx\@@nmlocation\empty\else \def\dododosetpagenumberlocation##1% {\donetrue - \setevalue{\??tk#1##1}% - {\noexpand\do@@plaatspaginanummer{\@@pagenumberlocation}}}% + \setevalue{\??tk#1##1}{\noexpand\do@@plaatspaginanummer{\@@pagenumberlocation}}}% \donefalse \ExpandFirstAfter\processallactionsinset - [\@@nmplaats] - [ \v!midden=>\dododosetpagenumberlocation{\v!tekst\c!middentekst}, - \v!links=>\dododosetpagenumberlocation{\v!tekst\c!linkertekst}, - \v!rechts=>\dododosetpagenumberlocation{\v!tekst\c!rechtertekst}, - \v!inlinker=>\dododosetpagenumberlocation{\v!marge\c!linkertekst}, - \v!inrechter=>\dododosetpagenumberlocation{\v!marge\c!rechtertekst}, - \v!inmarge=>\dododosetpagenumberlocation{\v!marge\ifdubbelzijdig - \c!margetekst\else\c!rechtertekst\fi}, - \v!marge=>\dododosetpagenumberlocation{\v!marge\ifdubbelzijdig - \c!margetekst\else\c!rechtertekst\fi}, - \v!opmarge=>\dododosetpagenumberlocation{\v!tekst\c!kantlijntekst}, - \v!kantlijn=>\dododosetpagenumberlocation{\v!tekst\c!kantlijntekst}]% + [\@@nmlocation] + [ \v!middle=>\dododosetpagenumberlocation{\v!text\c!middletext}, + \v!left=>\dododosetpagenumberlocation{\v!text\c!lefttext}, + \v!right=>\dododosetpagenumberlocation{\v!text\c!righttext}, + \v!inleft=>\dododosetpagenumberlocation{\v!margin\c!lefttext}, + \v!inright=>\dododosetpagenumberlocation{\v!margin\c!righttext}, + \v!inmargin=>\dododosetpagenumberlocation{\v!margin\ifdubbelzijdig + \c!margintext\else\c!righttext\fi}, + \v!margin=>\dododosetpagenumberlocation{\v!margin\ifdubbelzijdig + \c!margintext\else\c!righttext\fi}, + \v!atmargin=>\dododosetpagenumberlocation{\v!text\c!marginedgetext}, + \v!marginedge=>\dododosetpagenumberlocation{\v!text\c!marginedgetext}]% \ifdone \else - \dododosetpagenumberlocation{\v!tekst\c!middentekst}% default + \dododosetpagenumberlocation{\v!text\c!middletext}% default \fi \fi} \def\dosetpagenumberlocation - {\ExpandBothAfter\doifinsetelse\v!hoofd{\@@nmplaats,\@@nmin} - {\dodosetpagenumberlocation\v!hoofd} - {\dodosetpagenumberlocation\v!voet}} + {\ExpandBothAfter\doifinsetelse\v!header{\@@nmlocation,\@@nmin} + {\dodosetpagenumberlocation\v!header} + {\dodosetpagenumberlocation\v!footer }} \def\dosetuppagenumbering[#1]% {\getparameters[\??nm][#1]% - \preparepaginaprefix\??nm + \preparepageprefix\??nm \enkelzijdigfalse \dubbelzijdigfalse \ExpandFirstAfter\processallactionsinset - [\@@nmvariant] - [ \v!enkelzijdig=>\enkelzijdigtrue, - \v!dubbelzijdig=>\dubbelzijdigtrue]% - \ifdubbelzijdig - \trackingmarginnotestrue - \else - \trackingmarginnotesfalse + [\@@nmalternative] + [ \v!singlesided=>\enkelzijdigtrue, + \v!doublesided=>\dubbelzijdigtrue]% + \ifx\trackingmarginnotestrue\undefined\else + \ifdubbelzijdig + \trackingmarginnotestrue + \else + \trackingmarginnotesfalse + \fi \fi \dosetpagenumberlocation \recalculatebackgrounds @@ -448,69 +451,55 @@ % erg fout % -% \def\preparepaginaprefix#1% -% {\def\dopreparepaginaprefix##1% +% \def\preparepageprefix#1% +% {\def\dopreparepageprefix##1% % {\doifvalue{#1##1\c!nummer}{\v!ja} % {\setvalue{#1\getvalue{\??by##1}\c!nummer}{\v!ja}}}% -% \processcommacommand[\@@kolijst]\dopreparepaginaprefix} +% \processcommacommand[\@@kolijst]\dopreparepageprefix} % % nog fouter % -% \def\preparepaginaprefix#1% -% {\def\dopreparepaginaprefix##1% +% \def\preparepageprefix#1% +% {\def\dopreparepageprefix##1% % {\doifelsevalue{#1##1\v!nummer}{\v!ja} % v % {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!ja}} % v % {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!nee}}}% % v -% \processcommacommand[\@@kolijst]\dopreparepaginaprefix} +% \processcommacommand[\@@kolijst]\dopreparepageprefix} % % best, beware, chapter (yes) can be followed by title (no) -\def\preparepaginaprefix#1% - {\def\dopreparepaginaprefix##1% - {\letvalue{#1\getvalue{\??by##1}\v!nummer}\v!nee}% %v - \rawprocesscommalist[\@@kolijst]\dopreparepaginaprefix - \def\dopreparepaginaprefix##1% - {\doifvalue{#1##1\v!nummer}\v!ja %v - {\letvalue{#1\getvalue{\??by##1}\v!nummer}\v!ja}}% - \rawprocesscommalist[\@@kolijst]\dopreparepaginaprefix} - -% \def\dodopaginaprefix#1% uti seperator -- -% {\let\normaluchar\uchar\let\uchar\relax % ugly but needed -% \doifelsevalue{\paginatype#1\v!nummer}\v!ja % \v! and no \c! -% {\@EA\beforesplitstring\@EA\postprefix\@EA\at\sectionseparator\to\preprefix -% \@EA\aftersplitstring \@EA\postprefix\@EA\at\sectionseparator\to\postprefix -% \let\uchar\normaluchar % ugly but needed -% \ifx\preprefix\empty \else -% \ifx\preprefix\zerocountervalue\else -% \preprefix\@@nmnummerscheider -% \fi -% \fi} -% {\@EA\aftersplitstring\@EA\postprefix\@EA\at\sectionseparator\to\postprefix -% \let\uchar\normaluchar}} % ugly but needed - -\def\dodopaginaprefix#1% uti seperator -- - {\let\normaluchar\uchar\let\uchar\relax % ugly but needed - \doifelsevalue{\paginatype#1\v!nummer}\v!ja % \v! and no \c! +\def\preparepageprefix#1% + {\def\dopreparepageprefix##1% + {\letvalue{#1\getvalue{\??by##1}\v!number}\v!no}% %v + \rawprocesscommalist[\@@kolist]\dopreparepageprefix + \def\dopreparepageprefix##1% + {\doifvalue{#1##1\v!number}\v!yes %v + {\letvalue{#1\getvalue{\??by##1}\v!number}\v!yes}}% + \rawprocesscommalist[\@@kolist]\dopreparepageprefix} + +\def\dodopageprefix#1% uti seperator -- + {\let\normaluchar\uchar \let\uchar\relax % ugly but needed + \doifelsevalue{\pageprefixtype#1\v!number}\v!yes % \v! and no \c! {\edef\preprefix {\@@filterheadpart[\postprefix]}% \edef\postprefix{\@@filtertailpart[\postprefix]}% \let\uchar\normaluchar % ugly but needed \ifx\preprefix\empty \else \ifx\preprefix\zerocountervalue\else - \preprefix\@@nmnummerscheider + \preprefix\@@nmnumberseparator \fi \fi} {\edef\postprefix{\@@filtertailpart[\postprefix]}% \let\uchar\normaluchar}} % ugly but needed -\def\dopaginaprefix#1% - {\dodopaginaprefix{#1}% +\def\dopageprefix#1% + {\dodopageprefix{#1}% \donexttracklevel{#1}} -\def\paginaprefix#1[#2]% +\def\pageprefix#1[#2]% {\bgroup - \edef\paginatype{#1}% + \edef\pageprefixtype{#1}% \edef\postprefix{\@@filternumberpart[#2]}% - \let\donexttrackcommando\dopaginaprefix + \let\donexttrackcommando\dopageprefix \donexttrackcommando\firstsection \egroup} @@ -520,39 +509,34 @@ %D interesting that it went unnoticed for so long. \unexpanded\def\@@plaatspaginanummer % called in empty tests - {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} - {{\doif\@@nmstrut\v!ja\strut - \@@nmcommando{\doattributes\??nm\c!letter\c!kleur - {\completepagenumber}}}}} + {\doif{\@@nmstate\@@pnstate}{\v!start\v!start} + {{\doif\@@nmstrut\v!yes\strut + \@@nmcommand{\doattributes\??nm\c!style\c!color{\completepagenumber}}}}} \def\@@plaatspaginascheider% still used ? - {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} - {\@@nmtekstscheider}} + {\doif{\@@nmstate\@@pnstate}{\v!start\v!start}\@@nmtextseparator} -\def\userfolio % naast realfolio - {\nummer[\s!page]} - -\def\pagenumber - {\userfolio} +\def\userfolio {\convertednumber[\s!page]} % naast realfolio +\def\pagenumber{\userfolio} \def\pageprefixes - {\def\donexttrackcommando##1% - {\doifvalue{\??nm##1\v!nummer}\v!ja % v - {\ifnum\countervalue{\??se##1}>\zerocount - \getvalue{##1\c!nummer}\@@nmnummerscheider - \fi}% - \doifsomething\@@nmtekst - {\@@nmtekst\@@nmnummerscheider}% - \donexttracklevel{##1}}% - \donexttrackcommando{\firstsection}} + {\let\donexttrackcommando\dopageprefixes + \donexttrackcommando\firstsection} + +\def\dopageprefixes#1% + {\doifvalue{\??nm#1\v!number}\v!yes % v + {\ifnum\countervalue{\??se#1}>\zerocount + \getvalue{#1\c!number}\@@nmnumberseparator + \fi}% + \doifsomething\@@nmtext{\@@nmtext\@@nmnumberseparator}\donexttracklevel{#1}} \unexpanded\def\completepagenumber - {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} - {\@@nmlinks\labeltexts\v!paginanummer{\pageprefixes\pagenumber}\@@nmrechts}} + {\doif{\@@nmstate\@@pnstate}{\v!start\v!start} + {\@@nmleft\labeltexts\v!pagenumber{\pageprefixes\pagenumber}\@@nmright}} \unexpanded\def\placepagenumber - {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} - {\labeltexts\v!paginanummer{\pagenumber}}} + {\doif{\@@nmstate\@@pnstate}{\v!start\v!start} + {\labeltexts\v!pagenumber{\pagenumber}}} % Nog een variant; wat is een goeie naam? @@ -563,19 +547,17 @@ \def\translatednumber{\@@filterpagepart} -% \unexpanded\def\referencepagenumber[#1]% -% {\doifelsenothing{#1}{?}{\paginaprefix\??rf[#1]\translatednumber[#1]}} - \unexpanded\def\referencepagenumber[#1]% - {\doifelsenothing{#1}{?}% \prepare had got lost - {\preparepaginaprefix\??rf\paginaprefix\??rf[#1]\translatednumber[#1]}} + {\doifelsenothing{#1}{?}% + {\preparepageprefix\??rf + \pageprefix\??rf[#1]\translatednumber[#1]}} -\stelpaginanummerin - [\c!status=\v!start, - \c!nummer=1] +\setuppagenumber + [\c!state=\v!start, + \c!number=1] -\stelsubpaginanummerin - [\c!wijze=\v!per\v!deel, - \c!status=\v!stop] +\setupsubpagenumber + [\c!way=\v!by\v!part, + \c!state=\v!stop] \protect \endinput diff --git a/tex/context/base/page-one.tex b/tex/context/base/page-one.tex index c5707a0e7..bdae19104 100644 --- a/tex/context/base/page-one.tex +++ b/tex/context/base/page-one.tex @@ -31,7 +31,7 @@ {\superejectpage} \def\OTRONEsethsize - {\global\hsize\tekstbreedte} + {\global\hsize\textwidth} % keep (original one) % @@ -93,13 +93,13 @@ \def\OTRONEsetvsize {\ifgridsnapping \ifcase\layoutlines - \getrawnoflines\teksthoogte + \getrawnoflines\textheight \else \noflines\layoutlines \fi \global\vsize\noflines\openlineheight \else - \global\vsize\teksthoogte + \global\vsize\textheight \fi \ifdim\pagegoal<\maxdimen \ifdim\oldvsize=\vsize @@ -120,7 +120,7 @@ % {\edef\currentpagedepth{\the\dp#2}% still to be derived from #1 % \dotopinsertions % #1#2% -% \pushcolor +% \everypushproperties % \ifgridsnapping % \vskip-\currentpagedepth % \vskip\openstrutdepth % \strutdp @@ -173,12 +173,12 @@ % #1#2#3% % \fi} -\chardef\kindofpagetextareas=2 % whole page +\chardef\kindofpagetextareas=2 % whole page (public variable! never change) \def\OTRONEregisteredtextarea#1% {\ifregistertextareas \setbox0\vbox{#1}% - \wd0\zetbreedte % somehow a space creeps in + \wd0\makeupwidth % somehow a space creeps in \vbox{\registeredtextarea000}% \else #1% @@ -195,37 +195,37 @@ \or % whole page \let\OTRONEregisteredtextareaB\OTRONEregisteredtextarea \fi - \setbox0\vbox \ifbottomnotes to \teksthoogte \fi + \setbox0\vbox \ifbottomnotes to \textheight \fi {\edef\currentpagedepth{\the\dp#2}% still to be derived from #1 \dotopinsertions \ifgridsnapping \OTRONEregisteredtextareaA{#1#2}% \vskip-\currentpagedepth\vskip\openstrutdepth - \pushcolor % moved from just after #1#2 + \pushproperties % moved from just after #1#2 \prevdepth\openstrutdepth \dobotinsertions \vfil \else\ifr@ggedbottom \OTRONEregisteredtextareaA{#1#2}% \vskip-\currentpagedepth\vskip\openstrutdepth - \pushcolor % moved from just after #1#2 + \pushproperties % moved from just after #1#2 \prevdepth\openstrutdepth \dobotinsertions \vfil \else\ifb@selinebottom \OTRONEregisteredtextareaA{#1#2}% \kern-\currentpagedepth\kern\maxdepth - \pushcolor % moved from just after #1#2 + \pushproperties % moved from just after #1#2 \dobotinsertions \else \OTRONEregisteredtextareaA{#1#2}% - \pushcolor % moved from just after #1#2 + \pushproperties % moved from just after #1#2 \dobotinsertions % added \fi\fi\fi - \fakenotes}% + \fakepagenotes}% was \fakenotes, but wrong! (check with \setupalign[height]) \ifbottomnotes \ifgridsnapping - \getnoflines\teksthoogte + \getnoflines\textheight \advance\noflines \minusone \scratchdimen\noflines\lineheight \advance\scratchdimen \topskip @@ -243,7 +243,7 @@ \ht0\zeropoint \fi \OTRONEregisteredtextareaB - {\vbox to \teksthoogte + {\vbox to \textheight {\box0\box2\ifbottomnotes\else\vfill\fi}}% \egroup} @@ -263,14 +263,14 @@ \noffloatinserts\zerocount \let\totaltopinserted\!!zeropoint \OTRONEdodosettopinserts - \ifnum\@@bknonder=\zerocount - \ifnum\@@bknregels>\zerocount + \ifnum\@@bknbottom=\zerocount + \ifnum\@@bknlines>\zerocount \ifdim\totaltopinserted>\zeropoint\relax \dimen0=\lineheight - \dimen0=\@@bknregels\dimen0 + \dimen0=\@@bknlines\dimen0 \advance\dimen0 \totaltopinserted\relax - \ifdim\dimen0>\teksthoogte - \showmessage\m!floatblocks8\@@bknregels + \ifdim\dimen0>\textheight + \showmessage\m!floatblocks8\@@bknlines \vfilll\eject \fi \fi @@ -332,7 +332,7 @@ \global\advance\topinserted \ht\floatbox \global\advance\topinserted \dp\floatbox \global\advance\topinserted \floatbottomskip\relax - \ifdim\topinserted<\teksthoogte\relax + \ifdim\topinserted<\textheight\relax \xdef\totaltopinserted{\the\topinserted}% \insert\topins {\forgetall @@ -341,11 +341,11 @@ \kern-\lineskip\par \prevdepth\maxdimen \else - %\blanko[-\@@bknawit,\@@bkvoorwit]% inserts can't look back + %\blank[-\@@bkspaceafter,\@@bkspacebefore]% inserts can't look back \betweenfloatblanko \fi \flushfloatbox - \blanko[\@@bknawit]}% + \blank[\@@bkspaceafter]}% \ifsomefloatwaiting \advance\noffloatinserts \plusone \else @@ -381,7 +381,7 @@ \ifdim\botinserted<\pagegoal\relax \insert\botins {\forgetall - \blanko[\@@bkvoorwit]% + \blank[\@@bkspacebefore]% \flushfloatbox}% \ifsomefloatwaiting \advance\noffloatinserts \plusone @@ -486,8 +486,8 @@ \ifpackflushedfloats \centerfloatboxfalse \dogetfloat - \ifdim\wd\floatbox>\zetbreedte - \global\setbox\floatbox\hbox to \zetbreedte{\hss\box\floatbox\hss}% + \ifdim\wd\floatbox>\makeupwidth + \global\setbox\floatbox\hbox to \makeupwidth{\hss\box\floatbox\hss}% \fi \OTRONEsetvsize \!!widtha\wd\floatbox @@ -553,10 +553,48 @@ % \fi % \fi} +% \def\OTRONEdocheckiffloatfits % vervangen ivm downward comp +% {\ifnofloatpermitted +% \global\roomforfloatfalse +% \else +% \dimen0 \pagetotal +% \advance\dimen0 \ht\floatbox +% \advance\dimen0 \dp\floatbox +% \advance\dimen0 \floattopskip +% \advance\dimen0 -\pageshrink % toegevoegd +% %\message{c:\the\mofcolumns,t:\the\pagetotal,g:\the\pagegoal}%\wait +% \dimen2\pagegoal +% \relax % needed +% \ifcase\textfloatmethod +% % method 0 : raw +% \or +% % method 1 : safe +% \dimen2 .99\pagegoal +% \or +% % method 2 : tight +% \advance\dimen0 -\onepoint +% \fi +% \relax % really needed ! ! ! ! +% \ifdim\dimen0>\dimen2 +% \global\roomforfloatfalse +% \else +% \global\roomforfloattrue +% \fi +% \fi} + \def\OTRONEdocheckiffloatfits % vervangen ivm downward comp {\ifnofloatpermitted \global\roomforfloatfalse \else + % new per 31/5/2004, should be an option, only one column mode + \begingroup + \scratchdimen\pagetotal + \advance\scratchdimen\lineheight % maybe strutheight + \ifdim\scratchdimen>\pagegoal + \goodbreak % hack ? needed in icare-az + \fi + % should be an option + \endgroup \dimen0 \pagetotal \advance\dimen0 \ht\floatbox \advance\dimen0 \dp\floatbox @@ -603,8 +641,8 @@ \someherefloat} % [#1] \def\OTRONEsomesidefloat[#1]% links, rechts NOG TESTEN EN AANPASSEN - {\ifbinnenkolommen - \someelsefloat[\v!hier]% + {\ifinsidecolumns + \someelsefloat[\v!here]% \else %\checkwaitingfloats{#1}% \def\logsidefloat @@ -613,29 +651,29 @@ \wd\floatbox\floatwidth \processfirstactioninset [#1] - [ \v!links=>\leftfloat {\box\floatbox}, - \v!rechts=>\rightfloat {\box\floatbox}, - \v!inlinker=>\leftmarginfloat {\box\floatbox}, - \v!inrechter=>\rightmarginfloat{\box\floatbox}, - \v!linkermarge=>\leftmarginfloat {\box\floatbox}, - \v!rechtermarge=>\rightmarginfloat{\box\floatbox}, - \v!linkerrand=>\leftedgefloat {\box\floatbox}, - \v!rechterrand=>\rightedgefloat {\box\floatbox}, - \v!rugwit=>\backspacefloat {\box\floatbox}, - \v!snijwit=>\cutspacefloat {\box\floatbox}, - \v!inmarge=>{\doinmargenormal\leftmarginfloat + [ \v!left=>\leftfloat {\box\floatbox}, + \v!right=>\rightfloat {\box\floatbox}, + \v!inleft=>\leftmarginfloat {\box\floatbox}, + \v!inright=>\rightmarginfloat{\box\floatbox}, + \v!leftmargin=>\leftmarginfloat {\box\floatbox}, + \v!rightmargin=>\rightmarginfloat{\box\floatbox}, + \v!leftedge=>\leftedgefloat {\box\floatbox}, + \v!rightedge=>\rightedgefloat {\box\floatbox}, + \v!backspace=>\backspacefloat {\box\floatbox}, + \v!cutspace=>\cutspacefloat {\box\floatbox}, + \v!inmargin=>{\doinmargenormal\leftmarginfloat \rightmarginfloat{\box\floatbox}}]% - \doifinset\v!lang{#1}\flushsidefloatsafterpar + \doifinset\v!tall{#1}\flushsidefloatsafterpar \fi} \def\OTRONEsomepagefloat[#1]% {%\checkwaitingfloats{#1}% \global\setbox\collectedpagefloats\vbox {\unvbox\collectedpagefloats - \vbox to \teksthoogte - {\doifnotinset\v!hoog{#1}\vfill + \vbox to \textheight + {\doifnotinset\v!high{#1}\vfill \box\floatbox - \doifnotinset\v!laag{#1}\vfill}% + \doifnotinset\v!low{#1}\vfill}% \goodbreak}% \doinsertfloatinfo} @@ -675,11 +713,11 @@ \topskipcorrection % [xx] new: see icare topbleed \kern-\lineskip\par\prevdepth\maxdimen \else - %\blanko[-\@@bknawit,\@@bkvoorwit]% inserts can't look back + %\blank[-\@@bkspaceafter,\@@bkspacebefore]% inserts can't look back \betweenfloatblanko \fi \flushfloatbox - \blanko[\@@bknawit]}% + \blank[\@@bkspaceafter]}% \doinsertfloatinfo} \def\OTRONEsomebotsfloat[#1]% @@ -688,11 +726,14 @@ \global\advance\botinserted \floattopskip \insert\botins {\forgetall - \blanko[\@@bkvoorwit]% + \blank[\@@bkspacebefore]% \flushfloatbox}% %\global\nofloatpermittedtrue \doinsertfloatinfo} +\def\OTRONEsomefacefloat[#1]% untested + {\startopposite\flushfloatbox\stopopposite} + \def\OTRONEnextcolumn[#1]% {} diff --git a/tex/context/base/page-run.tex b/tex/context/base/page-run.tex index 801ca4c6d..b9e280bcd 100644 --- a/tex/context/base/page-run.tex +++ b/tex/context/base/page-run.tex @@ -18,19 +18,19 @@ \gdef\doshowprint[#1][#2][#3]% {\framed [\c!offset=\v!overlay, - \c!strut=\v!nee] + \c!strut=\v!no] {\forgetall - \mindermeldingen + \dontcomplain \globaldefs\minusone \dimen0\pagegoal - \definepapersize[X][\c!breedte=4em, \c!hoogte=6em]% - \definepapersize[Y][\c!breedte=12em,\c!hoogte=14em]% + \definepapersize[X][\c!width=4em, \c!height=6em]% + \definepapersize[Y][\c!width=12em,\c!height=14em]% \setuppapersize[#1,X][#2,Y]% \setuplayout[#3]% \setbox0\vbox {\framed - [\c!offset=\v!overlay,\c!strut=\v!nee, - \c!breedte=\papierbreedte,\c!hoogte=\papierhoogte] + [\c!offset=\v!overlay,\c!strut=\v!no, + \c!width=\paperwidth,\c!height=\paperheight] {\ss ABC\par DEF}}% \dubbelzijdigfalse \def\cutmarklength{.5em}% @@ -92,33 +92,33 @@ \gdef\doshowframe[#1][#2]% {\ifsecondargument \setupbackgrounds - [\v!pagina] - [\c!kader=\v!aan, - \c!hoek=\v!recht, - \c!kaderoffset=\!!zeropoint, - \c!kaderdiepte=\!!zeropoint, - \c!kaderkleur=layout:page] + [\v!page] + [\c!frame=\v!on, + \c!corner=\v!rectangular, + \c!frameoffset=\!!zeropoint, + \c!framedepth=\!!zeropoint, + \c!framecolor=layout:page] \setupbackgrounds [#1][#2] - [\c!achtergrond=, - \c!kader=\v!aan, - \c!hoek=\v!recht, - \c!kaderoffset=\!!zeropoint, - \c!kaderdiepte=\!!zeropoint, - \c!kaderkleur=] + [\c!background=, + \c!frame=\v!on, + \c!corner=\v!rectangular, + \c!frameoffset=\!!zeropoint, + \c!framedepth=\!!zeropoint, + \c!framecolor=] \else\iffirstargument \showframe - [\v!hoofd,\v!tekst,\v!voet] + [\v!header,\v!text,\v!footer] [#1] \else \showframe - [\v!hoofd,\v!tekst,\v!voet] - [\v!linkerrand,\v!linkermarge, - \v!tekst, - \v!rechtermarge,\v!rechterrand] + [\v!header,\v!text,\v!footer] + [\v!leftedge,\v!leftmargin, + \v!text, + \v!rightmargin,\v!rightedge] \fi\fi \setupbackgrounds - [\c!status=\v!herhaal]} + [\c!state=\v!repeat]} \gdef\showframe{\dodoubleempty\doshowframe} @@ -128,26 +128,14 @@ \gdef\showsetupB#1#2#3% {#1&#3&\tttf\string#3\cr} -\iffixedlayoutdimensions - - \global\let\showsetupC=\showsetupA - -\else % we could have used \@the - - \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 \gdef\showsetups {\noindent \vbox {\forgetall - \mindermeldingen - \switchtobodyfont[\v!klein] + \dontcomplain + \switchtobodyfont[\v!small] \tabskip\zeropoint \halign {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr @@ -160,22 +148,22 @@ \showsetupA{height} \makeupheight \showsetupA{width} \makeupwidth \showsetupA{top} \topheight - \showsetupC{topdistance} \topdistance + \showsetupA{topdistance} \topdistance \showsetupA{header} \headerheight - \showsetupC{headerdistance} \headerdistance + \showsetupA{headerdistance} \headerdistance \showsetupA{textheight} \textheight - \showsetupC{footerdistance} \footerdistance + \showsetupA{footerdistance} \footerdistance \showsetupA{footer} \footerheight - \showsetupC{bottomdistance} \bottomdistance + \showsetupA{bottomdistance} \bottomdistance \showsetupA{bottom} \bottomheight \showsetupA{leftedge} \leftedgewidth - \showsetupC{leftedgedistance} \leftedgedistance + \showsetupA{leftedgedistance} \leftedgedistance \showsetupA{leftmargin} \leftmarginwidth - \showsetupC{leftmargindistance} \leftmargindistance + \showsetupA{leftmargindistance} \leftmargindistance \showsetupA{textwidth} \textwidth - \showsetupC{rightmargindistance}\rightmargindistance + \showsetupA{rightmargindistance}\rightmargindistance \showsetupA{rightmargin} \rightmarginwidth - \showsetupC{rightedgedistance} \rightedgedistance + \showsetupA{rightedgedistance} \rightedgedistance \showsetupA{rightedge} \rightedgewidth \showsetupB{bodyfontsize} \the \globalbodyfontsize \showsetupB{line} \relax \normallineheight @@ -192,8 +180,8 @@ {\noindent \vbox {\forgetall - \mindermeldingen - \switchtobodyfont[\v!klein] + \dontcomplain + \switchtobodyfont[\v!small] \tabskip\zeropoint \halign {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr @@ -207,22 +195,22 @@ \showsetupA{hoogte} \zethoogte \showsetupA{breedte} \zetbreedte \showsetupA{boven} \bovenhoogte - \showsetupC{bovenafstand} \bovenafstand + \showsetupA{bovenafstand} \bovenafstand \showsetupA{hoofd} \hoofdhoogte - \showsetupC{hoofdafstand} \hoofdafstand + \showsetupA{hoofdafstand} \hoofdafstand \showsetupA{teksthoogte} \teksthoogte - \showsetupC{voetafstand} \voetafstand + \showsetupA{voetafstand} \voetafstand \showsetupA{voet} \voethoogte - \showsetupC{onderafstand} \onderafstand + \showsetupA{onderafstand} \onderafstand \showsetupA{onder} \onderhoogte \showsetupA{linkerrand} \linkerrandbreedte - \showsetupC{linkerrandafstand} \linkerrandafstand + \showsetupA{linkerrandafstand} \linkerrandafstand \showsetupA{linkermarge} \linkermargebreedte - \showsetupC{linkermargeafstand} \linkermargeafstand + \showsetupA{linkermargeafstand} \linkermargeafstand \showsetupA{tekstbreedte} \tekstbreedte - \showsetupC{rechtermargeafstand}\rechtermargeafstand + \showsetupA{rechtermargeafstand}\rechtermargeafstand \showsetupA{rechtermarge} \rechtermargebreedte - \showsetupC{rechterrandafstand} \rechterrandafstand + \showsetupA{rechterrandafstand} \rechterrandafstand \showsetupA{rechterrand} \rechterrandbreedte \showsetupB{korps} \the \globalbodyfontsize \showsetupB{regel} \relax \normallineheight @@ -241,8 +229,8 @@ {\noindent \vbox {\forgetall - \mindermeldingen - \switchtobodyfont[\v!klein] + \dontcomplain + \switchtobodyfont[\v!small] \tabskip\zeropoint \halign {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr @@ -255,22 +243,22 @@ \showsetupA{hoehe} \satzhoehe \showsetupA{breite} \satzbreite \showsetupA{oben} \hoeheoben - \showsetupC{abstandoben} \abstandoben + \showsetupA{abstandoben} \abstandoben \showsetupA{kopfzeile} \kopfzeilenhoehe - \showsetupC{kopfzeilenabstand} \kopfzeilenabstand + \showsetupA{kopfzeilenabstand} \kopfzeilenabstand \showsetupA{texthoehe} \texthoehe - \showsetupC{fusszeileabstand} \fusszeileabstand + \showsetupA{fusszeileabstand} \fusszeileabstand \showsetupA{fusszeilen} \fusszeilenhoehe - \showsetupC{abstandunten} \abstandunten + \showsetupA{abstandunten} \abstandunten \showsetupA{hoeheunten} \hoeheunten \showsetupA{linkerrand} \breitelinkerrand - \showsetupC{abstandlinkerrand} \abstandlinkerrand + \showsetupA{abstandlinkerrand} \abstandlinkerrand \showsetupA{linkemarginal} \linkemarginalbreite - \showsetupC{linkemarginalafstand} \linkemarginalafstand + \showsetupA{linkemarginalafstand} \linkemarginalafstand \showsetupA{textbreite} \textbreite - \showsetupC{rechtemarginalafstand}\rechtemarginalafstand + \showsetupA{rechtemarginalafstand}\rechtemarginalafstand \showsetupA{rechtemarginal} \rechtemarginalbreite - \showsetupC{abstandrechterrand} \abstandrechterrand + \showsetupA{abstandrechterrand} \abstandrechterrand \showsetupA{rechterrand} \breiterechterrand \showsetupB{fliesstext} \the \globalbodyfontsize \showsetupB{linie} \relax \normallineheight @@ -287,8 +275,8 @@ {\noindent \vbox {\forgetall - \mindermeldingen - \switchtobodyfont[\v!klein] + \dontcomplain + \switchtobodyfont[\v!small] \tabskip\zeropoint \halign {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr @@ -303,20 +291,20 @@ \showsetupA{vyskatextu} \vyskatextu \showsetupA{sirkatextu} \sirkatextu \showsetupA{horejsek} \vyskahorejsku - \showsetupC{vzdalenosthorejsku} \vzdalenosthorejsku + \showsetupA{vzdalenosthorejsku} \vzdalenosthorejsku \showsetupA{zahlavi} \vyskazahlavi - \showsetupC{vzdalenostzahlavi} \vzdalenostzahlavi - \showsetupC{fusszeileabstand} \vzdalenostupati + \showsetupA{vzdalenostzahlavi} \vzdalenostzahlavi + \showsetupA{fusszeileabstand} \vzdalenostupati \showsetupA{upati} \vyskaupati - \showsetupC{vzdalenostspodku} \vzdalenostspodku + \showsetupA{vzdalenostspodku} \vzdalenostspodku \showsetupA{spodek} \vyakaspodku \showsetupA{levyokraj} \sirkalevehookraje - \showsetupC{vzdalenostlevehookraje} \vzdalenostlevehookraje + \showsetupA{vzdalenostlevehookraje} \vzdalenostlevehookraje \showsetupA{levamarginalie} \sirkalevemarginalie - \showsetupC{vzdalenostlevemarginalie} \vzdalenostlevemarginalie - \showsetupC{vzdalenostpravemarginalie}\vzdalenostpravemarginalie + \showsetupA{vzdalenostlevemarginalie} \vzdalenostlevemarginalie + \showsetupA{vzdalenostpravemarginalie}\vzdalenostpravemarginalie \showsetupA{pravamarginalie} \sirkapravemarginalie - \showsetupC{vzdalenostpravehookraje} \vzdalenostpravehookraje + \showsetupA{vzdalenostpravehookraje} \vzdalenostpravehookraje \showsetupA{pravyokraj} \sirkapravehookraje \showsetupB{zakladnivelikost} \the \globalbodyfontsize \showsetupB{linka} \relax \normallineheight @@ -333,8 +321,8 @@ {\noindent \vbox {\forgetall - \mindermeldingen - \switchtobodyfont[\v!klein] + \dontcomplain + \switchtobodyfont[\v!small] \tabskip\zeropoint \halign {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr @@ -347,22 +335,22 @@ \showsetupA{height} \makeupheight \showsetupA{width} \makeupwidth \showsetupA{top} \topheight - \showsetupC{topdistance} \topdistance + \showsetupA{topdistance} \topdistance \showsetupA{header} \headerheight - \showsetupC{headerdistance} \headerdistance + \showsetupA{headerdistance} \headerdistance \showsetupA{textheight} \textheight - \showsetupC{footerdistance} \footerdistance + \showsetupA{footerdistance} \footerdistance \showsetupA{footer} \footerheight - \showsetupC{bottomdistance} \bottomdistance + \showsetupA{bottomdistance} \bottomdistance \showsetupA{bottom} \bottomheight \showsetupA{leftedge} \leftedgewidth - \showsetupC{leftedgedistance} \leftedgedistance + \showsetupA{leftedgedistance} \leftedgedistance \showsetupA{leftmargin} \leftmarginwidth - \showsetupC{leftmargindistance} \leftmargindistance + \showsetupA{leftmargindistance} \leftmargindistance \showsetupA{textwidth} \textwidth - \showsetupC{rightmargindistance}\rightmargindistance + \showsetupA{rightmargindistance}\rightmargindistance \showsetupA{rightmargin} \rightmarginwidth - \showsetupC{rightedgedistance} \rightedgedistance + \showsetupA{rightedgedistance} \rightedgedistance \showsetupA{rightedge} \rightedgewidth \showsetupB{bodyfontsize} \the \globalbodyfontsize \showsetupB{line} \relax \normallineheight @@ -375,10 +363,10 @@ \gdef\showlayout % interfereert lelijk met een \typefile er na {\bgroup - \pagina + \page \showframe - \setuplayout[\c!markering=\v!aan] - \dorecurse{4}{\showsetups\pagina} + \setuplayout[\c!marking=\v!on] + \dorecurse{4}{\showsetups\page} \egroup} \gdef\showmargins diff --git a/tex/context/base/page-set.tex b/tex/context/base/page-set.tex index 954b7ec6b..1aeb05a96 100644 --- a/tex/context/base/page-set.tex +++ b/tex/context/base/page-set.tex @@ -382,7 +382,7 @@ \long\def\OTRSETrecurseRL#1% {\dostepwiserecurse\nofcolumns\plusone\minusone - {#1\hskip\OTRSETgetparameter\c!afstand\recurselevel}} + {#1\hskip\OTRSETgetparameter\c!distance\recurselevel}} \def\OTRSETmakegridbox {\ifcase\columndirection @@ -395,28 +395,28 @@ {\hbox\bgroup \dontcomplain \forgetall % can go once in \flush - \!!heighta \teksthoogte + \!!heighta \textheight % test first ! - \hbox to \zetbreedte + \hbox to \makeupwidth {\dostepwiserecurse{#1}{#2}{#3} {\mofcolumns\recurselevel \localcolumnwidth\OTRSETlocalwidth\mofcolumns \setbox\scratchbox\hbox\localframed [\??mc\OTRSETidentifier\number\mofcolumns]% - [\c!breedte=\localcolumnwidth,\c!hoogte=\!!heighta,\c!regels=]% + [\c!width=\localcolumnwidth,\c!height=\!!heighta,\c!lines=]% {}% \wd\scratchbox\localcolumnwidth \ht\scratchbox\!!heighta \ifcase\columndirection - \hskip\OTRSETgetparameter\c!afstand\recurselevel + \hskip\OTRSETgetparameter\c!distance\recurselevel \box\scratchbox \else \box\scratchbox - \hskip\OTRSETgetparameter\c!afstand\recurselevel + \hskip\OTRSETgetparameter\c!distance\recurselevel \fi}}% - \hskip-\zetbreedte + \hskip-\makeupwidth % main text - \hbox to \zetbreedte + \hbox to \makeupwidth {\dostepwiserecurse{#1}{#2}{#3} {\mofcolumns\recurselevel \localcolumnwidth\OTRSETlocalwidth\mofcolumns @@ -436,6 +436,10 @@ \fi \dorecurse\columnmaxcells {\setbox\scratchbox\hbox{\OTRSETgetgridcell\mofcolumns\recurselevel}% +% {\setbox\scratchbox\hbox +% {\localstarttextcolor +% \OTRSETgetgridcell\mofcolumns\recurselevel +% \localstoptextcolor}% \ht\scratchbox\strutht \dp\scratchbox\strutdp \ifcase\columndirection @@ -457,11 +461,11 @@ \kern\zeropoint \vss \fi}% - \wd\scratchbox\localcolumnwidth % \tekstbreedte + \wd\scratchbox\localcolumnwidth % \textwidth \ifcase\columndirection - \hskip\OTRSETgetparameter\c!afstand\recurselevel\box\scratchbox + \hskip\OTRSETgetparameter\c!distance\recurselevel\box\scratchbox \else - \box\scratchbox\hskip\OTRSETgetparameter\c!afstand\recurselevel + \box\scratchbox\hskip\OTRSETgetparameter\c!distance\recurselevel \fi}}% \egroup} @@ -556,7 +560,7 @@ % \fi} \def\OTRSETdofinaloutput - {\ifdim\ht\OTRfinalpagebox=\teksthoogte + {\ifdim\ht\OTRfinalpagebox=\textheight \bgroup % \let\OTRSETsetvsize\relax % prevents useless search for gap \ifcase\OTRSETbalancemethod \finaloutput\box\OTRfinalpagebox @@ -564,7 +568,7 @@ % catch a bordercase \scratchdimen\OTRSETbalht \advance\scratchdimen\lineheight\relax - \ifdim\scratchdimen>\teksthoogte + \ifdim\scratchdimen>\textheight % full page \finaloutput\box\OTRfinalpagebox \else @@ -613,18 +617,14 @@ \def\OTRSETsethsize % of course this does not migrate outside the otr {\localcolumnwidth\OTRSETlocalwidth\mofcolumns - \tekstbreedte\localcolumnwidth + \textwidth\localcolumnwidth \hsize\localcolumnwidth} -%\def\OTRSETsynchronizehsize -% {\doifnotvalue{\??mc\OTRSETidentifier\the\mofcolumns\c!breedte}\v!passend -% \OTRSETsethsize} - \def\OTRSETsynchronizehsize - {\ifcase0\getvalue{\??mc\??mc\c!breedte}\else % some width set + {\ifcase0\getvalue{\??mc\??mc\c!width}\else % some width set \bgroup \scratchdimen\OTRSETlocalwidth\mofcolumns - \ifdim\scratchdimen=\tekstbreedte + \ifdim\scratchdimen=\textwidth \egroup \else % only if change in width and \column/\break @@ -681,7 +681,7 @@ \egroup \fi} -\installcolumnbreakhandler {SET} \v!lokaal +\installcolumnbreakhandler {SET} \v!local {\OTRSETcolumnhbreak \ejectinsert \ejectpage % brrr @@ -695,7 +695,7 @@ % stay there (basically such a gap is a small empty page % then). -\installcolumnbreakhandler {SET} \v!ja +\installcolumnbreakhandler {SET} \v!yes {\OTRSETcolumnhbreak \edef\savedmofcolumns{\the\mofcolumns}% \edef\savedrealpageno{\the\realpageno}% @@ -716,7 +716,7 @@ \installcolumnbreakhandler {SET} \s!unknown {\expanded{\OTRSETgotocolumn[\@@columnspecification]}} -\installcolumnbreakhandler {SET} \v!pagina +\installcolumnbreakhandler {SET} \v!page {\vfill\eject % \doejectpage\eject \OTRSETgotonextpage} @@ -840,7 +840,7 @@ \def\OTRSEThandleflushedtext#1% {\getnoflines{\ht\scratchbox}% - %\wd\scratchbox\tekstbreedte % geen \hsize kan < zijn in bv split tabulate + %\wd\scratchbox\textwidth % geen \hsize kan < zijn in bv split tabulate \wd\scratchbox\OTRSETlocalwidth\mofcolumns \doOTRSETsetgridcells {\copy\placeholderboxf} @@ -1040,7 +1040,7 @@ \else \advance\columnhcells \plusone \advance\scratchcounter \plusone - \advance\totalcolumnspace \OTRSETgetparameter\c!afstand\scratchcounter + \advance\totalcolumnspace \OTRSETgetparameter\c!distance\scratchcounter \fi \else \exitloop @@ -1204,7 +1204,7 @@ \def\OTRSETstoreincolumnslotFIXD#1% fixed column {\OTRSETflushtextsofar - \ifdim\wd#1>\tekstbreedte + \ifdim\wd#1>\textwidth \OTRSETstoreincolumnslotSOMEWHERE2{#1}% \else % crappy test / needed for o-pbu-f / will be replaced @@ -1215,9 +1215,9 @@ \ifdim\scratchdimen<\pagegoal %OTRSETprepareforcolumnslot3{#1}% %ruledvskip\columnslotspacing\lineheight - \blanko[\columnslotspacing*\v!regel]% + \blank[\columnslotspacing*\v!line]% \snaptogrid\hbox to \hsize{\hss\box#1\hss}% strange, why the centering - \blanko[\columnslotspacing*\v!regel]% + \blank[\columnslotspacing*\v!line]% \else \OTRSETstoreincolumnslotSOMEWHERE2{#1}% \fi @@ -1448,7 +1448,7 @@ \totalcolumnspace\OTRSETlocalwidth\currenthcell \dostepwiserecurse\!!countc\!!countb\plusone {\advance\totalcolumnspace \OTRSETlocalwidth\recurselevel - \advance\totalcolumnspace \OTRSETgetparameter\c!afstand\recurselevel}% + \advance\totalcolumnspace \OTRSETgetparameter\c!distance\recurselevel}% \ifdim\totalcolumnspace>\wd\scratchbox \setbox\scratchbox\hbox to \totalcolumnspace{\hss\box\scratchbox\hss}% \fi @@ -1461,8 +1461,8 @@ \def\OTRSETinitializecolumns% once per page {\columnspreadtrue % todo \ifcolumnspread - \global\rofcolumns\getvalue{\??mc\OTRSETidentifier\c!nrechts}% - \global\lofcolumns\getvalue{\??mc\OTRSETidentifier\c!nlinks}% + \global\rofcolumns\getvalue{\??mc\OTRSETidentifier\c!nright}% + \global\lofcolumns\getvalue{\??mc\OTRSETidentifier\c!nleft}% \global\tofcolumns\rofcolumns \relax \ifodd\realpageno\relax \global\nofcolumns\rofcolumns @@ -1487,21 +1487,21 @@ \def\dodefinecolumnset[#1][#2]% {\getparameters[\??mc#1] - [\c!richting=\v!rechts, - \c!balanceren=\v!nee, - \c!afstand=1.5\bodyfontsize, % controleren + [\c!direction=\v!right, + \c!balance=\v!no, + \c!distance=1.5\bodyfontsize, % controleren \c!n=2, - \c!nlinks=\getvalue{\??mc#1\c!n}, - \c!nrechts=\getvalue{\??mc#1\c!n}, - \c!breedte=\v!passend, - \c!regels=0, + \c!nleft=\getvalue{\??mc#1\c!n}, + \c!nright=\getvalue{\??mc#1\c!n}, + \c!width=\v!fit, + \c!lines=0, #2]% - \dorecurse{\getvalue{\??mc#1\c!nlinks}} % todo + \dorecurse{\getvalue{\??mc#1\c!nleft}} % todo {\dododefinecolumnset[#1][\recurselevel]}% - \dorecurse{\getvalue{\??mc#1\c!nrechts}} % todo + \dorecurse{\getvalue{\??mc#1\c!nright}} % todo {\dododefinecolumnset[#1][\recurselevel]}% % redo framed settings - \setupcolumnset[#1][1][\c!afstand=\!!zeropoint]} + \setupcolumnset[#1][1][\c!distance=\!!zeropoint]} \def\dododefinecolumnset[#1][#2]% {\presetlocalframed @@ -1509,11 +1509,11 @@ \setupcolumnset [#1][#2] [\c!offset=\v!overlay, - \c!kader=\v!uit, - \c!uitlijnen=, - \c!regels=0,% really needed since c!regels is now part of framed - \c!breedte=\getvalue{\??mc#1\c!breedte}, - \c!afstand=\getvalue{\??mc#1\c!afstand}]} + \c!frame=\v!off, + \c!align=, + \c!lines=0,% really needed since c!regels is now part of framed + \c!width=\getvalue{\??mc#1\c!width}, + \c!distance=\getvalue{\??mc#1\c!distance}]} \def\setupcolumnset {\dotripleargument\dosetupcolumnset} @@ -1521,7 +1521,7 @@ \def\dosetupcolumnset[#1][#2][#3]% {\ifthirdargument \def\docommando##1% - {\doifelse{##1}\v!elk + {\doifelse{##1}\v!each {\dorecurse{\getvalue{\??mc#1\c!n}}{\docommando\recurselevel}} {\getparameters[\??mc#1##1][#3]}}% \processcommalist[#2]\docommando @@ -1534,9 +1534,9 @@ \def\OTRSETgotonextpage {\vfill\eject \relax\ifnum\mofcolumns>\plusone - \OTRSETgotocolumn[\v!laatste]% + \OTRSETgotocolumn[\v!last]% \ifnum\mofcolumns>\plusone - \OTRSETgotocolumn[\v!forceer]% + \OTRSETgotocolumn[\v!force]% \fi \fi} @@ -1618,11 +1618,11 @@ \def\doOTRSETgotocolumn[#1]% yes|force|first|last||* {\processallactionsinset [#1] - [ \v!ja=>\OTRSETdummycolumn, - \v!nee=>,% not supported - \v!forceer=>\OTRSETdummycolumn, - \v!eerste=>\expanded{\doOTRSETgotoCOLUMN{1}}, - \v!laatste=>\expanded{\doOTRSETgotoCOLUMN{\the\nofcolumns}}, + [ \v!yes=>\OTRSETdummycolumn, + \v!no=>,% not supported + \v!force=>\OTRSETdummycolumn, + \v!first=>\expanded{\doOTRSETgotoCOLUMN{1}}, + \v!last=>\expanded{\doOTRSETgotoCOLUMN{\the\nofcolumns}}, \s!default=>\OTRSETdummycolumn, \s!unknown=>\expanded{\doOTRSETgotoCOLROW{\commalistelement}}]} @@ -1689,7 +1689,7 @@ \bgroup \globallet\columnsetpage\!!plusone \def\currentcolumnset{#2}% - \binnenkolommentrue % will be different flag + \insidecolumnstrue % will be different flag \activateotr{SET}{ONE}% andere naam, activate or so \doifelsenothing{#1} {\globallet\OTRSETlist\s!default} @@ -1714,8 +1714,8 @@ \sethsize \ifvoid\OTRfinalpagebox\else % probably balanced - \ifdim\ht\OTRfinalpagebox<\teksthoogte - \snaptogrid[\v!pagina]\hbox{\box\OTRfinalpagebox}% + \ifdim\ht\OTRfinalpagebox<\textheight + \snaptogrid[\v!page]\hbox{\box\OTRfinalpagebox}% \else \box\OTRfinalpagebox \fi @@ -1899,18 +1899,18 @@ \def\OTRSETinitializefeatures {% number of lines % new: raw - \getrawnoflines\teksthoogte\xdef\columnmaxcells{\the\noflines}% + \getrawnoflines\textheight\xdef\columnmaxcells{\the\noflines}% % direction - \doifelsevalue{\??mc\OTRSETidentifier\c!richting}\v!rechts + \doifelsevalue{\??mc\OTRSETidentifier\c!direction}\v!right {\chardef\columndirection\zerocount} {\chardef\columndirection\plusone}% % balancing \chardef\OTRSETbalancemethod\zerocount \processaction - [\getvalue{\??mc\OTRSETidentifier\c!balanceren}] - [ \v!ja=>\chardef\OTRSETbalancemethod\plusone, - \v!boven=>\chardef\OTRSETbalancemethod\plustwo, - \v!onder=>\chardef\OTRSETbalancemethod\plusthree]} + [\getvalue{\??mc\OTRSETidentifier\c!balance}] + [ \v!yes=>\chardef\OTRSETbalancemethod\plusone, + \v!top=>\chardef\OTRSETbalancemethod\plustwo, + \v!bottom=>\chardef\OTRSETbalancemethod\plusthree]} % keep 'm for a while % @@ -2079,28 +2079,28 @@ % interface to footnotes \def\OTRSETassignwidths - {%\scratchdimen\zetbreedte - \freezetextwidth \scratchdimen\tekstbreedte + {%\scratchdimen\makeupwidth + \freezetextwidth \scratchdimen\textwidth % \scratchcounter\zerocount \dorecurse\nofcolumns - {\doifelsevalue{\??mc\OTRSETidentifier\recurselevel\c!breedte}\v!passend + {\doifelsevalue{\??mc\OTRSETidentifier\recurselevel\c!width}\v!fit {\advance\scratchcounter \plusone } - {\advance\scratchdimen -\getvalue{\??mc\OTRSETidentifier\recurselevel\c!breedte}}% - \advance\scratchdimen -\getvalue{\??mc\OTRSETidentifier\recurselevel\c!afstand}}% + {\advance\scratchdimen -\getvalue{\??mc\OTRSETidentifier\recurselevel\c!width}}% + \advance\scratchdimen -\getvalue{\??mc\OTRSETidentifier\recurselevel\c!distance}}% \ifcase\scratchcounter\else \divide\scratchdimen \scratchcounter \fi - \setgvalue{\??mc\??mc\c!breedte}{0}% + \setgvalue{\??mc\??mc\c!width}{0}% \dorecurse\nofcolumns - {\doifelsevalue{\??mc\OTRSETidentifier\recurselevel\c!breedte}\v!passend + {\doifelsevalue{\??mc\OTRSETidentifier\recurselevel\c!width}\v!fit {\dimen0=\scratchdimen} - {\setgvalue{\??mc\??mc\c!breedte}{1}% - \dimen0=\getvalue{\??mc\OTRSETidentifier\recurselevel\c!breedte}}% - \setxvalue{\??mc\recurselevel\??mc\c!breedte}{\the\dimen0}}} + {\setgvalue{\??mc\??mc\c!width}{1}% + \dimen0=\getvalue{\??mc\OTRSETidentifier\recurselevel\c!width}}% + \setxvalue{\??mc\recurselevel\??mc\c!width}{\the\dimen0}}} \def\OTRSETlocalwidth#1% - {\getvalue{\??mc\number#1\??mc\c!breedte}} + {\getvalue{\??mc\number#1\??mc\c!width}} \newbox\placeholderboxa \newbox\placeholderboxb @@ -2149,12 +2149,12 @@ \def\OTRSETshowstatus {\iftracecolumnset \doOTRSETshowstatus \fi} -\appendtoks \OTRSETshowstatus \to \everypar +% \appendtoks \OTRSETshowstatus \to \everypar % page contents \def\OTRSETdopagecontents#1#2% takes two args: \box \unvbox - {\vbox to \teksthoogte{\forgetall#1#2\pushcolor}} + {\vbox to \textheight{\forgetall#1#2\pushproperties}} \def\OTRSETsomepagefloat {\def\floatmethod{PAGE}\OTRSETsomeslotfloat} % check \def\OTRSETsomeherefloat {\def\floatmethod{HERE}\OTRSETsomeslotfloat} % check @@ -2181,14 +2181,14 @@ \noffloatinserts\zerocount \let\totaltopinserted\!!zeropoint \OTRSETdodosettopinserts - \ifnum\@@bknonder=\zerocount - \ifnum\@@bknregels>\zerocount + \ifnum\@@bknbottom=\zerocount + \ifnum\@@bknlines>\zerocount \ifdim\totaltopinserted>\zeropoint\relax \dimen0\lineheight - \dimen0=\@@bknregels\dimen0 + \dimen0=\@@bknlines\dimen0 \advance\dimen0 \totaltopinserted\relax - \ifdim\dimen0>\teksthoogte % \vsize %%%%%%%%% \teksthoogte - \showmessage\m!floatblocks8{\@@bknregels}% + \ifdim\dimen0>\textheight % \vsize %%%%%%%%% \textheight + \showmessage\m!floatblocks8{\@@bknlines}% \vfilll\eject \fi \fi @@ -2209,15 +2209,15 @@ {\forgetall \iftopofinsert \ifdim\OTRSETtopoffset=\zeropoint - \verplaatsopgrid[\v!boven] + \moveongrid[\v!top] \fi \else \betweenfloatblanko % inserts can't look back \fi \flushfloatbox - \blanko[\@@bknawit]}% + \blank[\@@bkspaceafter]}% \global\advance\topinserted \ht\scratchbox\relax - \ifdim\topinserted>\vsize % was \teksthoogte\relax + \ifdim\topinserted>\vsize % was \textheight\relax \OTRSETresavebox\floatbox \noffloatinserts\noftopfloats\relax \global\advance\topinserted -\ht\scratchbox @@ -2257,7 +2257,7 @@ \ifdim\botinserted<\pagegoal\relax \insert\botins {\forgetall - \blanko[\@@bkvoorwit]% + \blank[\@@bkspacebefore]% \flushfloatbox}% \ifsomefloatwaiting \advance\noffloatinserts \plusone @@ -2320,24 +2320,24 @@ \def\dodefinecolumntextarea[#1][#2][#3]% y=0 is mogelijke en handig ! {\ifthirdargument - \doifinsetelse{#2}{\v!beide,\v!vast} - {\definecolumntextarea[#1][\v!links ][\c!type=#2,#3]% - \definecolumntextarea[#1][\v!rechts][\c!type=#2,#3]} - {\doifelse{#2}\v!volgende + \doifinsetelse{#2}{\v!both,\v!fixed} + {\definecolumntextarea[#1][\v!left ][\c!type=#2,#3]% + \definecolumntextarea[#1][\v!right][\c!type=#2,#3]} + {\doifelse{#2}\v!next {\doifoddpageelse - {\definecolumntextarea[#1][\v!rechts][\c!type=#2,#3]} - {\definecolumntextarea[#1][\v!links ][\c!type=#2,#3]}} + {\definecolumntextarea[#1][\v!right][\c!type=#2,#3]} + {\definecolumntextarea[#1][\v!left ][\c!type=#2,#3]}} {\presetlocalframed [\??mt#1#2]% \processaction[#2] % \doglobal voorkomt stack build up - [ \v!links=>\doglobal\addtocommalist{#1}\columnleftareas, - \v!rechts=>\doglobal\addtocommalist{#1}\columnrightareas]% + [ \v!left=>\doglobal\addtocommalist{#1}\columnleftareas, + \v!right=>\doglobal\addtocommalist{#1}\columnrightareas]% \getparameters[\??mt#1#2] [\c!x=1,\c!y=1,\c!nx=1,\c!ny=1,\c!clipoffset=2\lineheight, - \c!offset=\v!overlay,\c!strut=\v!nee,\c!kader=\v!uit, - \c!type=#2,\c!pagina=1,\c!status=\v!stop,#3]}}% + \c!offset=\v!overlay,\c!strut=\v!no,\c!frame=\v!off, + \c!type=#2,\c!page=1,\c!state=\v!stop,#3]}}% \else - \definecolumntextarea[#1][\v!volgende][#2]% + \definecolumntextarea[#1][\v!next][#2]% \fi} \def\setupcolumntextarea @@ -2345,25 +2345,25 @@ \def\dosetupcolumntextarea[#1][#2][#3]% {\ifthirdargument - \doifelse{#2}\v!beide - {\setupcolumntextarea[#1][\v!links ][#3]% - \setupcolumntextarea[#1][\v!rechts][#3]} - {\doifelse{#2}\v!volgende + \doifelse{#2}\v!both + {\setupcolumntextarea[#1][\v!left ][#3]% + \setupcolumntextarea[#1][\v!right][#3]} + {\doifelse{#2}\v!next {\doifoddpageelse - {\setupcolumntextarea[#1][\v!rechts][#3]} - {\setupcolumntextarea[#1][\v!links][#3]}} + {\setupcolumntextarea[#1][\v!right][#3]} + {\setupcolumntextarea[#1][\v!left][#3]}} {\getparameters[\??mt#1#2][#3]}}% \else - \setupcolumntextarea[#1][\v!volgende][#2]% + \setupcolumntextarea[#1][\v!next][#2]% \fi} \def\docheckcolumnsetareapage#1#2% - {\ifnum\getvalue{\??mt#1\c!pagina}>\plusone - \doifelsevalue{\??mt#1\c!type}\v!vast - {\ifnum\columnsetpage=\getvalue{\??mt#1\c!pagina}\relax + {\ifnum\getvalue{\??mt#1\c!page}>\plusone + \doifelsevalue{\??mt#1\c!type}\v!fixed + {\ifnum\columnsetpage=\getvalue{\??mt#1\c!page}\relax \donetrue\else\donefalse \fi} - {\ifnum\columnsetpage<\getvalue{\??mt#1\c!pagina}\relax + {\ifnum\columnsetpage<\getvalue{\??mt#1\c!page}\relax \donefalse\else\donetrue \fi}% \else @@ -2372,28 +2372,20 @@ \def\initializecolumntextareas {\ifodd\realpageno - \doinitializecolumntextareas\columnrightareas\v!rechts + \doinitializecolumntextareas\columnrightareas\v!right \else - \doinitializecolumntextareas\columnleftareas\v!links + \doinitializecolumntextareas\columnleftareas\v!left \fi} -%\def\doinitializecolumntextareas#1#2% -% {\def\docommando##1% -% {\doifelsevalue{\??mt##1#2\c!status}\v!start -% {\dodoinitializecolumntextareas{##1}{#2}} -% {\doifvalue{\??mt##1#2\c!status}\v!herhaal -% {\dodoinitializecolumntextareas{##1}{#2}}}}% -% \processcommacommand[#1]\docommando} - \def\doinitializecolumntextareas#1#2% {\def\docommando##1% {\docheckcolumnsetareapage{##1#2}\plusone \ifdone \donefalse \processaction - [\getvalue{\??mt##1#2\c!status}] + [\getvalue{\??mt##1#2\c!state}] [ \v!start=>\donetrue, - \v!herhaal=>\donetrue, + \v!repeat=>\donetrue, \s!unknown=>\doperformtest\commalistelement\donetrue\donefalse]% \ifdone\dodoinitializecolumntextareas{##1}{#2}\fi \fi}% @@ -2408,9 +2400,9 @@ \def\placecolumntextareas {\ifodd\realpageno - \doplacecolumntextareas\columnrightareas\v!rechts + \doplacecolumntextareas\columnrightareas\v!right \else - \doplacecolumntextareas\columnleftareas\v!links + \doplacecolumntextareas\columnleftareas\v!left \fi} \def\doplacecolumntextareas#1#2% global ? @@ -2421,9 +2413,9 @@ \ifdone \donefalse \processaction - [\getvalue{\??mt##1#2\c!status}] + [\getvalue{\??mt##1#2\c!state}] [ \v!start=>\donetrue\doglobal\removefromcommalist{##1}#1, - \v!herhaal=>\donetrue, + \v!repeat=>\donetrue, \s!unknown=>\doperformtest\commalistelement\donetrue\donefalse]% \ifdone \dodoplacecolumntextareas{##1}{#2} @@ -2434,7 +2426,7 @@ \processcommacommand[#1]\docommando \egroup} -\def\columntextlastbackspace{\rugwit} +\def\columntextlastbackspace{\backspace} % beware, we have clipping offsets of 2\lineheight by default @@ -2461,15 +2453,15 @@ \setbox\scratchbox\vbox {\donetrue\localframed [\??mt\currentcolumntestarea] - [\c!plaats=,% new (*) - \c!breedte=\!!widtha,\c!hoogte=\!!heighta,\c!regels=] + [\c!location=,% new (*) + \c!width=\!!widtha,\c!height=\!!heighta,\c!lines=] {\columntextareaparameter\empty}}% \!!counta\columntextareaparameter\c!x \!!countb\columntextareaparameter\c!y \advance\!!countb \columntextareaparameter\c!ny \advance\!!countb \minusone % new (*) - \doif{\columntextareaparameter\c!plaats}\v!diepte + \doif{\columntextareaparameter\c!location}\v!depth {\setbox\scratchbox\hbox{\lower\strutdepth\box\scratchbox}% \dp\scratchbox\zeropoint \ht\scratchbox\!!heighta}% @@ -2479,13 +2471,13 @@ \copy\scratchbox % \box \else \clip - [%\c!bovenoffset=\columntextareaparameter\c!clipoffset,% - %\c!onderoffset=\columntextareaparameter\c!clipoffset,% - %\c!linkeroffset=\columntextareaparameter\c!clipoffset,% + [%\c!topoffset=\columntextareaparameter\c!clipoffset,% + %\c!bottomoffset=\columntextareaparameter\c!clipoffset,% + %\c!leftoffset=\columntextareaparameter\c!clipoffset,% \c!offset=\columntextareaparameter\c!clipoffset,% - \c!rechteroffset=\zeropoint,% - \c!breedte=\!!widthb,% - \c!hoogte=\!!heighta]% + \c!rightoffset=\zeropoint,% + \c!width=\!!widthb,% + \c!height=\!!heighta]% {\copy\scratchbox}% \fi}% \OTRSETsetgridcell\!!counta\!!countb\box0 @@ -2494,15 +2486,15 @@ \advance\!!counta -\!!countc \advance\!!widtha -\!!widthb \setbox0\hbox - {\hskip-\namedlayoutparameter\v!oneven\c!rugwit + {\hskip-\namedlayoutparameter\v!odd\c!backspace \clip - [%\c!bovenoffset=\columntextareaparameter\c!clipoffset,% - %\c!onderoffset=\columntextareaparameter\c!clipoffset,% - %\c!rechteroffset=\columntextareaparameter\c!clipoffset,% + [%\c!topoffset=\columntextareaparameter\c!clipoffset,% + %\c!bottomoffset=\columntextareaparameter\c!clipoffset,% + %\c!rightoffset=\columntextareaparameter\c!clipoffset,% \c!offset=\columntextareaparameter\c!clipoffset,% - \c!linkeroffset=\zeropoint,% - \c!breedte=\!!widtha,% - \c!hoogte=\!!heighta,% + \c!leftoffset=\zeropoint,% + \c!width=\!!widtha,% + \c!height=\!!heighta,% \c!hoffset=\!!widthb]% {\copy\scratchbox}}% \OTRSETsetgridcell\!!counta\!!countb\box0% @@ -2513,16 +2505,16 @@ \long\def\dosetupcolumntextareatext[#1][#2][#3]% {\ifthirdargument - \doifelse{#2}\v!beide - {\setvalue{\??mt#1\v!links }{#3}% - \setvalue{\??mt#1\v!rechts}{#3}} - {\doifelse{#2}\v!volgende + \doifelse{#2}\v!both + {\setvalue{\??mt#1\v!left }{#3}% + \setvalue{\??mt#1\v!right}{#3}} + {\doifelse{#2}\v!next {\doifoddpageelse - {\setvalue{\??mt#1\v!rechts}{#3}}% - {\setvalue{\??mt#1\v!links }{#3}}}% + {\setvalue{\??mt#1\v!right}{#3}}% + {\setvalue{\??mt#1\v!left }{#3}}}% {\setvalue{\??mt#1#2}{#3}}}% \else - \setupcolumntextareatext[#1][\v!volgende][{#2}]% + \setupcolumntextareatext[#1][\v!next][{#2}]% \fi} \def\docalculatecolumnsetspan @@ -2531,7 +2523,7 @@ % \!!widtha => total width % \!!widthb => left width % \!!countc => left cols - \!!widtha\!!countb\tekstbreedte % we assume equal widths + \!!widtha\!!countb\textwidth % we assume equal widths \advance\!!countb \!!counta \advance\!!countb \minusone \ifnum\!!countb>\nofcolumns @@ -2543,21 +2535,21 @@ \fi \advance\!!counta \plusone \dostepwiserecurse\!!counta\!!countb\plusone - {\advance\!!widtha\OTRSETgetparameter\c!afstand\recurselevel}% + {\advance\!!widtha\OTRSETgetparameter\c!distance\recurselevel}% \!!widthb\!!widtha - \advance\!!widthb -\!!countc\tekstbreedte + \advance\!!widthb -\!!countc\textwidth \ifodd\realpageno \else % tricky, assumes that we keep there \ifcase\!!countc\else % nog niet ok voor enkel/dubbelzijdig - \advance\!!widtha \namedlayoutparameter\v!even \c!rugwit - \advance\!!widtha \namedlayoutparameter\v!oneven\c!rugwit - \advance\!!widthb \namedlayoutparameter\v!even \c!rugwit + \advance\!!widtha \namedlayoutparameter\v!even \c!backspace + \advance\!!widtha \namedlayoutparameter\v!odd\c!backspace + \advance\!!widthb \namedlayoutparameter\v!even \c!backspace \dorecurse\!!countc - {\advance\!!widtha\OTRSETgetparameter\c!afstand\recurselevel}% + {\advance\!!widtha\OTRSETgetparameter\c!distance\recurselevel}% \fi \fi} -\def\columnsetspanhsize{\tekstbreedte} +\def\columnsetspanhsize{\textwidth} \def\setcolumnsetspanhsize#1#2% x nx / uses counta/b {\!!counta#1\!!countb#2\docalculatecolumnsetspan @@ -2570,18 +2562,18 @@ {%\ifsecondargument \defineframedtext [cs:#1] - [\c!kader=\v!uit, - \c!voor=, - \c!na=, + [\c!frame=\v!off, + \c!before=, + \c!after=, \c!offset=\v!overlay, - \c!plaats=\v!links, - \c!regelcorrectie=\v!uit, - \c!dieptecorrectie=\v!uit, + \c!location=\v!left, + \c!linecorrection=\v!off, + \c!depthcorrection=\v!off, \c!n=2, - \c!nregels=0, - \c!springvolgendein=\v!ja, + \c!nlines=0, + \c!indentnext=\v!yes, \c!default=HERE, - \c!variant=\v!a, + \c!alternative=\v!a, #2]% %\else % \definecolumnspan[][#1]% @@ -2616,9 +2608,9 @@ \mofcolumns\plusone \fi \setupframedtexts[cs:#1] - [\c!breedte=\columnsetspanhsize, - \c!regelcorrectie=\v!uit, - \c!dieptecorrectie=\v!uit, + [\c!width=\columnsetspanhsize, + \c!linecorrection=\v!off, + \c!depthcorrection=\v!off, #2]% % determine widths \!!countc\framedtextparameter{cs:#1}\c!n @@ -2629,16 +2621,16 @@ \advance\!!countd -\mofcolumns \advance\!!countd \plusone % n <= n of available columns (alternative a) - \doif{\framedtextparameter{cs:#1}\c!variant}\v!a + \doif{\framedtextparameter{cs:#1}\c!alternative}\v!a {\ifnum\!!countc>\!!countd \!!countc\!!countd \fi}% % here it all starts \setcolumnsetspanhsize\mofcolumns\!!countc % a/b used \hsize\columnsetspanhsize \setbox\scratchbox\vbox\bgroup - \dostartframedtext[cs:#1][\v!geen]% geen nils placement + \dostartframedtext[cs:#1][\v!none]% geen nils placement % spoils spacing : \vskip-\struttotal\par\verticalstrut\par \ifnum\columnsetlevel>\zerocount - \framedtextparameter{cs:#1}\c!voor + \framedtextparameter{cs:#1}\c!before \fi \def\stopcolumnsetspan{\dostopcolumnsetspan{#1}}} @@ -2648,8 +2640,8 @@ \kern-2\struttotal \verticalstrut \ifnum\columnsetlevel>\zerocount - \doifsomething{\framedtextparameter{cs:#1}\c!na} - {\framedtextparameter{cs:#1}\c!na + \doifsomething{\framedtextparameter{cs:#1}\c!after} + {\framedtextparameter{cs:#1}\c!after \kern\zeropoint}% otherwise blanks disappear, better be a switch \else \endgraf @@ -2659,7 +2651,7 @@ % frozen keeps grid snapping okay \setbox\scratchbox\frozenhbox to \hsize {\dontcomplain - \alignedline{\framedtextparameter{cs:#1}\c!plaats}\v!midden + \alignedline{\framedtextparameter{cs:#1}\c!location}\v!middle {\lower\strutdepth\box\scratchbox}}% \dp\scratchbox\zeropoint % else wrong snap insidefloat % @@ -2676,24 +2668,24 @@ \else\ifnum\columnsetlevel>\zerocount % we only set \columnsetspacing when asked for, else bottom problems % don't change this any more (test naw) - \chardef\columnslotspacing\framedtextparameter{cs:#1}\c!nregels\relax + \chardef\columnslotspacing\framedtextparameter{cs:#1}\c!nlines\relax % todo: nboven/onder & \chardef\columnslotlocation2 %\OTRSETstoreincolumnslotHERE\scratchbox \edef\floatmethod{\framedtextparameter{cs:#1}\c!default}% \@EA\uppercasestring\floatmethod\to\floatmethod - % todo : \v!hier -> here enzovoorts + % todo : \v!here -> here enzovoorts \OTRSETstoreincolumnslot\floatmethod\scratchbox % watch out: no \dochecknextindentation{tag} - \checknextindentation[\framedtextparameter{cs:#1}\c!springvolgendein] + \checknextindentation[\framedtextparameter{cs:#1}\c!indentnext] \else % of course we needed a one-column fall back for tm; brrr, the box has now too % much height (try \ruledvbox); don't change this without testing techniek \scratchdimen\ht\scratchbox \advance\scratchdimen-\strutdp \ht\scratchbox\scratchdimen - \framedtextparameter{cs:#1}\c!voor + \framedtextparameter{cs:#1}\c!before \snaptogrid\vbox{\box\scratchbox}% - \framedtextparameter{cs:#1}\c!na + \framedtextparameter{cs:#1}\c!after \fi\fi \egroup \endgraf} @@ -2708,4 +2700,4 @@ % \startcolumnsetspan[two] \input tufte \stopcolumnsetspan % \stopcolumnset -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-sid.tex b/tex/context/base/page-sid.tex index 0c2506eac..0ad5c787e 100644 --- a/tex/context/base/page-sid.tex +++ b/tex/context/base/page-sid.tex @@ -28,7 +28,7 @@ % \sidegap vervangen door \floatsideskip % \undergap vervangen door \floatsidebottomskip % -% \prskp vervangen door \tussenwit +% \prskp vervangen door \ctxparskip % toegevoegde macro's/aanroepen % @@ -50,6 +50,7 @@ \newdimen\sidefloatextrashift \newdimen\sidefloatvsize \def\nofloatvsize{-1pt } \newdimen\sidefloatprogress +\newdimen\sidefloatpagetotal \newbox\floatbottom @@ -94,24 +95,24 @@ % backspace \or \global\sidefloatshift-\sidefloatmaximum - \global\advance\sidefloatshift-\rightorleftpageaction \linkerrandafstand \rechterrandafstand - \global\advance\sidefloatshift-\rightorleftpageaction \linkermargebreedte \rechtermargebreedte - \global\advance\sidefloatshift-\rightorleftpageaction \linkermargeafstand \rechtermargeafstand + \global\advance\sidefloatshift-\rightorleftpageaction \leftedgedistance \rightedgedistance + \global\advance\sidefloatshift-\rightorleftpageaction \leftmarginwidth \rightmarginwidth + \global\advance\sidefloatshift-\rightorleftpageaction \leftmargindistance \rightmargindistance \or \global\sidefloatshift-\sidefloatmaximum - \global\advance\sidefloatshift-\rightorleftpageaction \linkermargeafstand \rechtermargeafstand + \global\advance\sidefloatshift-\rightorleftpageaction \leftmargindistance \rightmargindistance \or % left \or % right \or \global\sidefloatshift-\sidefloatmaximum - \global\advance\sidefloatshift-\rightorleftpageaction \linkermargeafstand \rechtermargeafstand + \global\advance\sidefloatshift-\rightorleftpageaction \leftmargindistance \rightmargindistance \or \global\sidefloatshift-\sidefloatmaximum - \global\advance\sidefloatshift-\rightorleftpageaction \linkerrandafstand \rechterrandafstand - \global\advance\sidefloatshift-\rightorleftpageaction \linkermargebreedte \rechtermargebreedte - \global\advance\sidefloatshift-\rightorleftpageaction \linkermargeafstand \rechtermargeafstand + \global\advance\sidefloatshift-\rightorleftpageaction \leftedgedistance \rightedgedistance + \global\advance\sidefloatshift-\rightorleftpageaction \leftmarginwidth \rightmarginwidth + \global\advance\sidefloatshift-\rightorleftpageaction \leftmargindistance \rightmargindistance \or % cutspace \fi @@ -122,23 +123,23 @@ \global\sidefloatleftskip \zeropoint \ifcase\sidefloattype \or % backspace - \global \sidefloatleftskip \rightorleftpageaction \rugwit \snijwit + \global \sidefloatleftskip \rightorleftpageaction \backspace \cutspace \or % leftedge - \global \sidefloatleftskip \rightorleftpageaction \linkermargeafstand\rechtermargeafstand - \global\advance\sidefloatleftskip \rightorleftpageaction \linkermargebreedte\rechtermargebreedte - \global\advance\sidefloatleftskip \rightorleftpageaction \linkerrandafstand\rechterrandafstand + \global \sidefloatleftskip \rightorleftpageaction \leftmargindistance\rightmargindistance + \global\advance\sidefloatleftskip \rightorleftpageaction \leftmarginwidth\rightmarginwidth + \global\advance\sidefloatleftskip \rightorleftpageaction \leftedgedistance\rightedgedistance \or % leftmargin - \global \sidefloatleftskip \rightorleftpageaction \linkermargeafstand\rechtermargeafstand + \global \sidefloatleftskip \rightorleftpageaction \leftmargindistance\rightmargindistance \or % leftside \or % rightside \or % rightmargin - \global \sidefloatrightskip\rightorleftpageaction \rechtermargeafstand\linkermargeafstand + \global \sidefloatrightskip\rightorleftpageaction \rightmargindistance\leftmargindistance \or % rightedge - \global \sidefloatrightskip\rightorleftpageaction \rechtermargeafstand\linkermargeafstand - \global\advance\sidefloatrightskip\rightorleftpageaction \rechtermargebreedte\linkermargebreedte - \global\advance\sidefloatrightskip\rightorleftpageaction \rechterrandafstand\linkerrandafstand + \global \sidefloatrightskip\rightorleftpageaction \rightmargindistance\leftmargindistance + \global\advance\sidefloatrightskip\rightorleftpageaction \rightmarginwidth\leftmarginwidth + \global\advance\sidefloatrightskip\rightorleftpageaction \rightedgedistance\leftedgedistance \or % cutspace - \global \sidefloatrightskip\rightorleftpageaction \snijwit\rugwit + \global \sidefloatrightskip\rightorleftpageaction \cutspace\backspace \fi \ifdim\sidefloatrightskip>\zeropoint \doglobal\advance\sidefloatrightskip\rightskip @@ -263,7 +264,7 @@ \egroup \ifdim\parskip>\zeropoint \ifdim\sidefloatbottomskip>\parskip - \geenwitruimte + \nowhitespace \vskip\sidefloatbottomskip \fi \fi @@ -271,10 +272,11 @@ \vskip\sidefloatbottomskip \fi\fi \fi - % == \forgetsidefloats + % not entirely the same as \forgetsidefloats \global\sidefloatvsize\nofloatvsize % \global\sidefloatsidelines\zerocount % no, we flush before a side float \global\floatshortfalse % so this will get lost + % also here if used at all \global\holdinginserts\zerocount \global\floatflagfalse} \def\flushsidefloatsafterpar @@ -290,12 +292,13 @@ \def\forgetsidefloats {\global\sidefloatvsize\nofloatvsize \global\sidefloatsidelines\zerocount + % also here if used at all \global\holdinginserts\zerocount \global\floatshortfalse \global\floatflagfalse} \let\logsidefloat=\relax -\def\pushpenalties +\def\pushpenalties % needed ? and right {\widowpenalty\plusone \clubpenalty\plustwo \brokenpenalty\plusone @@ -303,7 +306,8 @@ \edef\poppenalties {\widowpenalty \the\widowpenalty \clubpenalty \the\clubpenalty - \brokenpenalty\the\brokenpenalty}} + \brokenpenalty\the\brokenpenalty + \let\poppenalties\relax}} \let\poppenalties=\relax @@ -343,12 +347,13 @@ \restorepenalties \fi \fi - \global\holdinginserts\zerocount + % why was this \global\holdinginserts\zerocount \global\floatshortfalse \else \finalsidefloatoutput % new \global\sidefloatvsize\nofloatvsize \global\sidefloatsidelines\zerocount + % we can end up in fig lock, so \global\holdinginserts\zerocount here too ? \poppenalties \fi} @@ -499,7 +504,7 @@ \def\putsidefloat#1% grid (4) is rather experimental {\par - \witruimte + \whitespace % moved here dec 2001 {\everypar\emptytoks\forgetall\verticalstrut\vskip-\struttotal}% moved \checksidefloatshift @@ -624,8 +629,6 @@ \def\tosssidefloat {\vfill\eject} -\newdimen\sidefloatpagetotal - \def\measuresidefloat {\global\floatflagtrue \global\sidefloatpagetotal \pagetotal % global @@ -661,7 +664,7 @@ \fi \relax % really needed ! ! ! ! \ifdim\dimen0>\dimen2 - \roomforfloatfalse + \global\roomforfloatfalse \else \dimen0=\pagegoal \advance\dimen0 -\sidefloatvsize @@ -669,12 +672,12 @@ \global\advance\sidefloatvsize \dimen0 \global\floatshorttrue \pushpenalties - \global\holdinginserts\plusone + % why was this \global\holdinginserts\plusone \else \global\advance\sidefloatvsize \sidefloatbottomskip \global\floatshortfalse \fi - \roomforfloattrue + \global\roomforfloattrue \fi} \def\setsidefloat% nilling everypar saves time and redudant pos's @@ -732,7 +735,7 @@ % %\!!counta\sidefloatprogress % \scratchdimen\sidefloatprogress % \advance\scratchdimen \strutht -% \advance\scratchdimen -10sp % new, needed in prikkels, prevent rounding errors +% \advance\scratchdimen -\roundingeps % new, needed in prikkels, prevent rounding errors % \!!counta\scratchdimen % \divide\!!counta \baselineskip % \ifnum\!!counta>0 @@ -753,7 +756,7 @@ %\!!counta\sidefloatprogress \scratchdimen\sidefloatprogress \advance\scratchdimen \strutht - \advance\scratchdimen -10sp % new, needed in prikkels, prevent rounding errors + \advance\scratchdimen -\roundingeps % new, needed in prikkels, prevent rounding errors \!!counta\scratchdimen \divide\!!counta \baselineskip\relax \ifnum\!!counta>0 @@ -811,11 +814,14 @@ \else \resetsidefloatparagraph \fi - \parskip\tussenwit} + \parskip\ctxparskip} \def\checksidefloat {\dochecksidefloat} +\def\synchronizesidefloats + {\ifinner \else \checksidefloat \fi} + \def\doadjustsidefloatdisplaylines {\par \vskip-\parskip @@ -845,4 +851,4 @@ \kern-\!!counta\baselineskip \penalty\zerocount } -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/page-spr.tex b/tex/context/base/page-spr.tex index 315176a07..c90e9cf0f 100644 --- a/tex/context/base/page-spr.tex +++ b/tex/context/base/page-spr.tex @@ -22,17 +22,19 @@ \chardef\showspreadmode=1 -\def\settextpagecontent#1#2#3% #2 and #3 will disappear +% beware, ugly overload, to be redone + +\def\normalsettextpagecontent#1#2#3% #2 and #3 will disappear {\setbox#1\hbox - {\vbox to \teksthoogte + {\vbox to \textheight {\offinterlineskip \freezetextwidth - \hsize\tekstbreedte % local variant of \sethsize + \hsize\textwidth % local variant of \sethsize \boxmaxdepth\maxdepth \noindent % content can be < \hsize \dopagecontents#2#3}}% \dp#1\zeropoint - \setbox#1\hbox to \zetbreedte + \setbox#1\hbox to \makeupwidth {\ifinspread \ifvoid\spreadbox \global\setbox\spreadbox\box#1% @@ -41,8 +43,8 @@ % prevent duplicate writes in normal run \ifarrangingpages \else \ifcase\showspreadmode \global\setbox\spreadbox\null - \wd\spreadbox\zetbreedte - \ht\spreadbox\teksthoogte + \wd\spreadbox\makeupwidth + \ht\spreadbox\textheight \fi \fi \hss\box\spreadbox % right page \fi @@ -53,18 +55,18 @@ \def\doflushspread {\ifinspread \ifvoid\spreadbox\else % this page will be discarded later - \null \pagina + \null \page \fi \fi } \def\startspread {\bgroup \ifdubbelzijdig - \pagina[\v!links]% + \page[\v!left]% %\setsystemmode{spread}% \inspreadtrue - \scratchdimen2\tekstbreedte - \advance\scratchdimen2\rugwit - \expanded{\setuplayout[\c!tekstbreedte=\the\scratchdimen]}% + \scratchdimen2\textwidth + \advance\scratchdimen2\backspace + \expanded{\setuplayout[\c!textwidth=\the\scratchdimen]}% \def\startspread{\bgroup\let\stopspread\egroup}% \let\stopspread\dostopspread \else @@ -74,10 +76,10 @@ \let\stopspread\relax \def\dostopspread - {\kern\zeropoint\pagina + {\kern\zeropoint\page \inspreadfalse - \setuplayout[\c!tekstbreedte=\tekstbreedte] - \pagina[\v!links] + \setuplayout[\c!textwidth=\textwidth] + \page[\v!left] \egroup} \protect \endinput @@ -99,4 +101,4 @@ % % \dorecurse{3}{\input tufte } % -% \stoptext \ No newline at end of file +% \stoptext diff --git a/tex/context/base/page-txt.tex b/tex/context/base/page-txt.tex index 45ce40343..2c2e65363 100644 --- a/tex/context/base/page-txt.tex +++ b/tex/context/base/page-txt.tex @@ -23,21 +23,21 @@ %D the following macros. The current state of a text line %D (header, footer, etc.) is checked by: %D -%D \starttypen +%D \starttyping %D \resetlayouttextlines -%D \stoptypen +%D \stoptyping %D %D The main text box is finished by the following macro: %D -%D \starttypen +%D \starttyping %D \getmainbox <\vbox|\unvbox> -%D \stoptypen +%D \stoptyping %D %D The text lines are collected with: %D -%D \starttypen +%D \starttyping %D \gettextboxes -%D \stoptypen +%D \stoptyping %D %D It is possible to extens the default content of the text %D areas by appending content to the following token list @@ -64,24 +64,24 @@ %D \showsetup{\y!setupfooter} %D \showsetup{\y!setupbottom} -\def\setuplayouttext% +\def\setuplayouttext {\dotripleempty\dosetuplayouttext} \def\dosetuplayouttext[#1][#2][#3]% {\ifthirdargument \getparameters[\??tk#1#2][#3]% \else - %\getparameters[\??tk#1\v!tekst][#2]% + %\getparameters[\??tk#1\v!text][#2]% \getparameters[\??tk#1][#2]% \fi %\checkcurrentlayout % no \calculatevsizes} -\def\setuptop {\dotripleempty\dosetuplayouttext[\v!boven]} -\def\setupheader {\dotripleempty\dosetuplayouttext[\v!hoofd]} -\def\setuptext {\dotripleempty\dosetuplayouttext[\v!tekst]} -\def\setupfooter {\dotripleempty\dosetuplayouttext[\v!voet]} -\def\setupbottom {\dotripleempty\dosetuplayouttext[\v!onder]} +\def\setuptop {\dotripleempty\dosetuplayouttext[\v!top]} +\def\setupheader {\dotripleempty\dosetuplayouttext[\v!header]} +\def\setuptext {\dotripleempty\dosetuplayouttext[\v!text]} +\def\setupfooter {\dotripleempty\dosetuplayouttext[\v!footer]} +\def\setupbottom {\dotripleempty\dosetuplayouttext[\v!bottom]} %D \macros %D {noheaderandfooterlines,notopandbottomlines} @@ -93,12 +93,12 @@ %D \showsetup{\y!notopandbottomlines} \def\noheaderandfooterlines - {\setupheader[\c!status=\v!leeg]% - \setupfooter[\c!status=\v!leeg]} + {\setupheader[\c!state=\v!empty]% + \setupfooter[\c!state=\v!empty]} \def\notopandbottomlines - {\setuptop [\c!status=\v!leeg]% - \setupbottom[\c!status=\v!leeg]} + {\setuptop [\c!state=\v!empty]% + \setupbottom[\c!state=\v!empty]} %D \macros %D {setuptoptexts, setupheadertexts, setuptexttexts, @@ -116,61 +116,61 @@ %D \showsetup{\y!setupfootertexts} %D \showsetup{\y!setupbottomtexts} -\def\setuptoptexts {\dosixtupleempty\dosetuptexts[\v!boven]} -\def\setupheadertexts {\dosixtupleempty\dosetuptexts[\v!hoofd]} -\def\setuptexttexts {\dosixtupleempty\dosetuptexts[\v!tekst]} -\def\setupfootertexts {\dosixtupleempty\dosetuptexts[\v!voet ]} -\def\setupbottomtexts {\dosixtupleempty\dosetuptexts[\v!onder]} +\def\setuptoptexts {\dosixtupleempty\dosetuptexts[\v!top]} +\def\setupheadertexts {\dosixtupleempty\dosetuptexts[\v!header]} +\def\setuptexttexts {\dosixtupleempty\dosetuptexts[\v!text]} +\def\setupfootertexts {\dosixtupleempty\dosetuptexts[\v!footer ]} +\def\setupbottomtexts {\dosixtupleempty\dosetuptexts[\v!bottom]} %D The left, right and center variables can also be set %D directly using the previously discussed macros. \def\dosetuptexts[#1][#2][#3][#4][#5][#6]% {\ifsixthargument - \setvalue{\??tk#1#2\c!linkertekst}% + \setvalue{\??tk#1#2\c!lefttext}% {\dodoubletexts{\??tk#1}{#2}% - {\c!linkerletter \c!linkerkleur \c!linkerbreedte }{#3}% - {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#6}}% - \setvalue{\??tk#1#2\c!rechtertekst}% + {\c!leftstyle \c!leftcolor \c!leftwidth }{#3}% + {\c!rightstyle\c!rightcolor\c!rightwidth}{#6}}% + \setvalue{\??tk#1#2\c!righttext}% {\dodoubletexts{\??tk#1}{#2}% - {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#4}% - {\c!linkerletter \c!linkerkleur \c!linkerbreedte }{#5}}% + {\c!rightstyle\c!rightcolor\c!rightwidth}{#4}% + {\c!leftstyle \c!leftcolor \c!leftwidth }{#5}}% \else\iffifthargument - \setvalue{\??tk#1\v!tekst\c!linkertekst}% - {\dodoubletexts{\??tk#1}\v!tekst - {\c!linkerletter \c!linkerkleur \c!linkerbreedte }{#2}% - {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#5}}% - \setvalue{\??tk#1\v!tekst\c!rechtertekst}% - {\dodoubletexts{\??tk#1}\v!tekst - {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#3}% - {\c!linkerletter \c!linkerkleur \c!linkerbreedte }{#4}}% + \setvalue{\??tk#1\v!text\c!lefttext}% + {\dodoubletexts{\??tk#1}\v!text + {\c!leftstyle \c!leftcolor \c!leftwidth }{#2}% + {\c!rightstyle\c!rightcolor\c!rightwidth}{#5}}% + \setvalue{\??tk#1\v!text\c!righttext}% + {\dodoubletexts{\??tk#1}\v!text + {\c!rightstyle\c!rightcolor\c!rightwidth}{#3}% + {\c!leftstyle \c!leftcolor \c!leftwidth }{#4}}% \else\iffourthargument - \setvalue{\??tk#1#2\c!linkertekst}% + \setvalue{\??tk#1#2\c!lefttext}% {\dodoubletexts{\??tk#1}{#2} - {\c!linkerletter\c!linkerkleur\c!linkerbreedte}{#3}% - {\c!linkerletter\c!linkerkleur\c!linkerbreedte}{#3}}% - \setvalue{\??tk#1#2\c!rechtertekst}% + {\c!leftstyle\c!leftcolor\c!leftwidth}{#3}% + {\c!leftstyle\c!leftcolor\c!leftwidth}{#3}}% + \setvalue{\??tk#1#2\c!righttext}% {\dodoubletexts{\??tk#1}{#2} - {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#4}% - {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#4}}% + {\c!rightstyle\c!rightcolor\c!rightwidth}{#4}% + {\c!rightstyle\c!rightcolor\c!rightwidth}{#4}}% \else\ifthirdargument - \setvalue{\??tk#1\v!tekst\c!linkertekst}% - {\dodoubletexts{\??tk#1}\v!tekst - {\c!linkerletter\c!linkerkleur\c!linkerbreedte}{#2}% - {\c!linkerletter\c!linkerkleur\c!linkerbreedte}{#2}}% - \setvalue{\??tk#1\v!tekst\c!rechtertekst}% - {\dodoubletexts{\??tk#1}\v!tekst - {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#3}% - {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#3}}% + \setvalue{\??tk#1\v!text\c!lefttext}% + {\dodoubletexts{\??tk#1}\v!text + {\c!leftstyle\c!leftcolor\c!leftwidth}{#2}% + {\c!leftstyle\c!leftcolor\c!leftwidth}{#2}}% + \setvalue{\??tk#1\v!text\c!righttext}% + {\dodoubletexts{\??tk#1}\v!text + {\c!rightstyle\c!rightcolor\c!rightwidth}{#3}% + {\c!rightstyle\c!rightcolor\c!rightwidth}{#3}}% \else\ifsecondargument % new - \letvalue{\??tk#1\v!tekst\c!linkertekst }\empty - \letvalue{\??tk#1\v!tekst\c!rechtertekst}\empty - \setvalue{\??tk#1\v!tekst\c!middentekst }% - {\dosingletexts{\??tk#1}\v!tekst\c!letter\c!kleur\c!breedte{#2}}% + \letvalue{\??tk#1\v!text\c!lefttext }\empty + \letvalue{\??tk#1\v!text\c!righttext}\empty + \setvalue{\??tk#1\v!text\c!middletext }% + {\dosingletexts{\??tk#1}\v!text\c!style\c!color\c!width{#2}}% \else - \dosixtupleempty\dosetuptexts[#1][\v!tekst][][][][]% - \dosixtupleempty\dosetuptexts[#1][\v!marge][][][][]% - \dosixtupleempty\dosetuptexts[#1][\v!rand ][][][][]% + \dosixtupleempty\dosetuptexts[#1][\v!text][][][][]% + \dosixtupleempty\dosetuptexts[#1][\v!margin][][][][]% + \dosixtupleempty\dosetuptexts[#1][\v!edge ][][][][]% \fi\fi\fi\fi\fi} %D Left and right texts are swapped on odd and even pages, but @@ -185,25 +185,7 @@ %D dependent. \def\placetextlinestrut#1% - {\doifvalue{#1\c!strut}\v!ja{\setstrut\strut}} - -% \def\dosingletexts#1#2#3#4#5#6% -% {\bgroup -% \convertargument#6\to\ascii -% \doifsomething\ascii -% {\doattributes{#1#2}#3#4% -% {\placetextlinestrut{#1}% here ! -% %\doifdefinedelse{\??mk\ascii\c!koppeling} % brrr -% \doifelsemarking\ascii -% {\dolimitatetexts{#1#2#5}{\haalmarkering[\ascii][\v!eerste]}} -% {\ConvertConstantAfter\doifelse{\v!paginanummer}{#6} -% {\@@plaatspaginanummer} -% {\ConvertConstantAfter\doifelse{\v!datum}{#6} -% {\currentdate} -% {% #6{}{}{} -> {} needed for macros that look -% % ahead, like \uniqueMPgraphic -% \opeenregel\dolimitatetexts{#1#2#5}{#6{}{}{}}}}}}}% -% \egroup} + {\doifvalue{#1\c!strut}\v!yes{\setstrut\strut}} \def\dosingletexts#1#2#3#4#5#6% {\bgroup @@ -211,12 +193,12 @@ \doifsomething\ascii {\doattributes{#1#2}#3#4% {\placetextlinestrut{#1}% here ! - %\doifdefinedelse{\??mk\ascii\c!koppeling} % brrr + %\doifdefinedelse{\??mk\ascii\c!coupling} % brrr \doifelsemarking\ascii - {\dolimitatetexts{#1#2#5}{\haalmarkering[\ascii][\v!eerste]}} - {\ConvertConstantAfter\doifelse\v!paginanummer{#6} + {\dolimitatetexts{#1#2#5}{\getmarking[\ascii][\v!first]}} + {\ConvertConstantAfter\doifelse\v!pagenumber{#6} \@@plaatspaginanummer - {\ConvertConstantAfter\doifelse\v!datum{#6} + {\ConvertConstantAfter\doifelse\v!date{#6} {\currentdate} {% #6{}{}{} -> {} needed for macros that look % ahead, like \uniqueMPgraphic @@ -232,62 +214,18 @@ %D The placement of text is hooked into the token lists %D associated to the area at hand. -\appendtoks \placelayouttextline\v!boven\bovenhoogte \to \toptextcontent -\appendtoks \placelayouttextline\v!hoofd\hoofdhoogte \to \headertextcontent -\appendtoks \placelayouttextline\v!tekst\teksthoogte \to \texttextcontent -\appendtoks \placelayouttextline\v!voet \voethoogte \to \footertextcontent -\appendtoks \placelayouttextline\v!onder\onderhoogte \to \bottomtextcontent +\appendtoks \placelayouttextline\v!top \topheight \to \toptextcontent +\appendtoks \placelayouttextline\v!header\headerheight \to \headertextcontent +\appendtoks \placelayouttextline\v!text \textheight \to \texttextcontent +\appendtoks \placelayouttextline\v!footer\footerheight \to \footertextcontent +\appendtoks \placelayouttextline\v!bottom\bottomheight \to \bottomtextcontent %D Texts can be disables, moved up and ignored, depending in %D the \type {status} variable. This is handled by the next -%D couple of macros. They look less readable then the original -%D implementation, but because they are expanded quite often, -%D we will not use: -%D -%D \starttypen -%D \def\plaatslayoutregel#1#2% % handelt o.b.v. tekst -%D {\ExpandFirstAfter\processaction -%D [\getvalue{\??tk#1\v!tekst\c!status}] -%D [ \v!geen=>, -%D ...... -%D \v!start=>...]} -%D \stoptypen -%D -%D Instead we will map the values of status onto macro -%D expansions. - -%\def\settextlinestatus#1% -% {\edef\textlinestatus{\csname\??tk#1\v!tekst\c!status\endcsname}} - -\def\settextlinestatus#1% - {\edef\textlinestatus{\csname\??tk#1\c!status\endcsname}} - -%\def\resettextlinestatus#1% -% {\letgvalue{\??tk#1\v!tekst\c!status}\v!normaal} +%D couple of macros. -\def\resettextlinestatus#1% - {\letgvalue{\??tk#1\c!status}\v!normaal} - -%\def\placelayouttextline#1#2% % handelt o.b.v. tekst -% {\settextlinestatus{#1}% -% \doifdefinedelse{\string\placelayouttextline\textlinestatus} -% {\getvalue{\string\placelayouttextline\textlinestatus}{#1}{#2}} -% {\getvalue{\string\placelayouttextline\s!unknown}{#1}{#2}}} -% -%\def\placelayouttextline#1% #2 -% {\settextlinestatus{#1}% -% \doifundefined{\string\placelayouttextline\textlinestatus} -% {\let\textlinestatus\s!unknown}% -% \getvalue{\string\placelayouttextline\textlinestatus}{#1}} % {#2} - -% recently bugged -% -% \def\placelayouttextline#1% #2 -% {\settextlinestatus{#1}% -% \ifundefined{\string\placelayouttextline\textlinestatus}% -% \let\textlinestatus\s!unknown -% \fi -% \csname\string\placelayouttextline\textlinestatus\endcsname{#1}} % {#2} +\def\settextlinestatus #1{\edef\textlinestatus{\csname\??tk#1\c!state\endcsname}} +\def\resettextlinestatus#1{\letgvalue{\??tk#1\c!state}\v!normal} \def\placelayouttextline#1% #2 {\settextlinestatus{#1}% @@ -299,12 +237,12 @@ \fi \endcsname{#1}} % {#2} -\setvalue{\string\placelayouttextline\v!normaal}{\doplacelayouttextline} +\setvalue{\string\placelayouttextline\v!normal}{\doplacelayouttextline} \setvalue{\string\placelayouttextline }{\doplacelayouttextline} -\letvalue{\string\placelayouttextline\v!geen }\gobbletwoarguments -\letvalue{\string\placelayouttextline\v!hoog }\gobbletwoarguments +\letvalue{\string\placelayouttextline\v!none }\gobbletwoarguments +\letvalue{\string\placelayouttextline\v!high }\gobbletwoarguments -\setvalue{\string\placelayouttextline\v!leeg}#1#2% +\setvalue{\string\placelayouttextline\v!empty}#1#2% {\resettextlinestatus{#1}} \setvalue{\string\placelayouttextline\v!start}#1#2% @@ -314,10 +252,10 @@ \setvalue{\string\placelayouttextline\v!stop}#1#2% {} -\setvalue{\string\placelayouttextline\v!geenmarkering}#1#2% +\setvalue{\string\placelayouttextline\v!nomarking}#1#2% {\bgroup \resettextlinestatus{#1}% - \let\dohaalmarkering\nohaalmarkering + \let\dogetmarking\nogetmarking \doplacelayouttextline{#1}{#2}% \egroup} @@ -325,9 +263,9 @@ {\bgroup % new \resettextlinestatus{#1}% \getvalue{\??tk#1\textlinestatus}% - \getvalue{\??tk#1\v!tekst\textlinestatus}% - \getvalue{\??tk#1\v!marge\textlinestatus}% - \getvalue{\??tk#1\v!rand\textlinestatus}% + \getvalue{\??tk#1\v!text\textlinestatus}% + \getvalue{\??tk#1\v!margin\textlinestatus}% + \getvalue{\??tk#1\v!edge\textlinestatus}% \doplacelayouttextline{#1}{#2}% \egroup} @@ -335,17 +273,17 @@ %D is flushed. \def\resetlayouttextline#1% beware: global assignment - {\doifvalue{\??tk#1\c!status}\v!hoog + {\doifvalue{\??tk#1\c!state}\v!high {\resettextlinestatus{#1}% \donetrue}} \def\resetlayouttextlines {\donefalse - \resetlayouttextline\v!boven - \resetlayouttextline\v!hoofd - \resetlayouttextline\v!tekst - \resetlayouttextline\v!voet - \resetlayouttextline\v!onder + \resetlayouttextline\v!top + \resetlayouttextline\v!header + \resetlayouttextline\v!text + \resetlayouttextline\v!footer + \resetlayouttextline\v!bottom \ifdone \doglobal\calculatevsizes \recalculatebackgrounds @@ -361,36 +299,36 @@ \def\gettextboxes {\setbox\scratchpagebox\vbox - {\mindermeldingen + {\dontcomplain \calculatereducedvsizes \swapmargins \offinterlineskip - \vskip-\bovenhoogte - \vskip-\bovenafstand - \ifdim\bovenhoogte>\zeropoint + \vskip-\topheight + \vskip-\topdistance + \ifdim\topheight>\zeropoint \the\toptextcontent - \vskip\bovenhoogte + \vskip\topheight \fi - \vskip\bovenafstand - \ifdim\hoofdhoogte>\zeropoint + \vskip\topdistance + \ifdim\headerheight>\zeropoint \the\headertextcontent - \vskip\hoofdhoogte + \vskip\headerheight \fi - \vskip\hoofdafstand + \vskip\headerdistance \placepositionanchors - \vskip-\teksthoogte + \vskip-\textheight \the\texttextcontent - \vskip\teksthoogte + \vskip\textheight \the\everyendoftextbody - \vskip\voetafstand - \ifdim\voethoogte>\zeropoint + \vskip\footerdistance + \ifdim\footerheight>\zeropoint \the\footertextcontent - \vskip\voethoogte + \vskip\footerheight \fi - \vskip\onderafstand - \ifdim\onderhoogte>\zeropoint + \vskip\bottomdistance + \ifdim\bottomheight>\zeropoint \the\bottomtextcontent - \vskip\onderhoogte + \vskip\bottomheight \fi \vfilll}% \smashbox\scratchpagebox @@ -402,23 +340,23 @@ \calculatereducedvsizes \calculatehsizes \swapmargins - \vskip\hoofdhoogte - \vskip\hoofdafstand - \vskip\layoutparameter\c!tekstafstand - \hbox to \zetbreedte + \vskip\headerheight + \vskip\headerdistance + \vskip\layoutparameter\c!textdistance + \hbox to \makeupwidth {\bgroup \swapmargins \goleftonpage - \ifdim\linkerrandbreedte>\zeropoint + \ifdim\leftedgewidth>\zeropoint \the\leftedgetextcontent - \hskip\linkerrandbreedte + \hskip\leftedgewidth \fi - \hskip\linkerrandafstand - \ifdim\linkermargebreedte>\zeropoint + \hskip\leftedgedistance + \ifdim\leftmarginwidth>\zeropoint \the\leftmargintextcontent - \hskip\linkermargebreedte + \hskip\leftmarginwidth \fi - \hskip\linkermargeafstand + \hskip\leftmargindistance \egroup \settextpagecontent\scratchpagebox{#1}{#2}% \setbox\scratchpagebox\vbox @@ -431,15 +369,15 @@ \box\scratchpagebox \localstoptextcolor \bgroup - \hskip\rechtermargeafstand - \ifdim\rechtermargebreedte>\zeropoint + \hskip\rightmargindistance + \ifdim\rightmarginwidth>\zeropoint \the\rightmargintextcontent - \hskip\rechtermargebreedte + \hskip\rightmarginwidth \fi - \hskip\rechterrandafstand - \ifdim\rechterrandbreedte>\zeropoint + \hskip\rightedgedistance + \ifdim\rightedgewidth>\zeropoint \the\rightedgetextcontent - \hskip\rechterrandbreedte + \hskip\rightedgewidth \fi \egroup \hss}}% @@ -449,13 +387,15 @@ %D The main text area has to be combined with some additional %D (tracing) information. +% will be overloaded in page-lyr + \def\settextpagecontent#1#2#3% #2 and #3 will disappear - {\setbox#1\hbox to \zetbreedte + {\setbox#1\hbox to \makeupwidth {\hss % so don't change this - \vbox to \teksthoogte + \vbox to \textheight {\offinterlineskip \freezetextwidth - \hsize\tekstbreedte % local variant of \sethsize + \hsize\textwidth % local variant of \sethsize \boxmaxdepth\maxdepth \noindent % content can be < \hsize \dopagecontents#2#3}% @@ -469,15 +409,15 @@ \def\addtextgridlayer#1% tzt run time {\ifcase\showgridstate\else % 1=bottom 2=top - \setgridbox\scratchbox\zetbreedte\teksthoogte + \setgridbox\scratchbox\makeupwidth\textheight \setbox#1\hbox - {\ifcase\showgridstate\or\or\box#1\hskip-\zetbreedte\fi + {\ifcase\showgridstate\or\or\box#1\hskip-\makeupwidth\fi \bgroup % color \startlayoutcomponent{gridcolumns}{grid columns}% \incolortrue \ifcase\layoutcolumns\else \gray - \hbox to \zetbreedte + \hbox to \makeupwidth {\dorecurse\layoutcolumns {\hskip\layoutcolumnwidth \ifnum\recurselevel<\layoutcolumns @@ -486,14 +426,14 @@ \!!depth\dp\scratchbox \!!width\layoutcolumndistance \fi}}% - \hskip-\zetbreedte + \hskip-\makeupwidth \fi \stoplayoutcomponent \startlayoutcomponent{gridlines}{grid lines}% \startcolor[layout:grid]\box\scratchbox\stopcolor \stoplayoutcomponent \egroup - \ifcase\showgridstate\or\hskip-\zetbreedte\box#1\fi}% + \ifcase\showgridstate\or\hskip-\makeupwidth\box#1\fi}% \fi} %D The placement of a whole line is handled by the next two @@ -512,20 +452,20 @@ \normalbaselines \let\\\ignoredlinebreak \let\crlf\ignoredlinebreak - %\getvalue{\??tk#1\v!tekst\c!voor}% - \getvalue{\??tk#1\c!voor}% + %\getvalue{\??tk#1\v!text\c!before}% + \getvalue{\??tk#1\c!before}% \doifbothsidesoverruled - \dodoplacelayouttextline#1\c!linkertekst\c!middentekst\c!rechtertekst + \dodoplacelayouttextline#1\c!lefttext\c!middletext\c!righttext \gobbleoneargument\getvalue \orsideone - \dodoplacelayouttextline#1\c!linkertekst\c!middentekst\c!rechtertekst + \dodoplacelayouttextline#1\c!lefttext\c!middletext\c!righttext \gobbleoneargument\getvalue \orsidetwo - \dodoplacelayouttextline#1\c!rechtertekst\c!middentekst\c!linkertekst + \dodoplacelayouttextline#1\c!righttext\c!middletext\c!lefttext \getvalue\gobbleoneargument \od - %\getvalue{\??tk#1\v!tekst\c!na}% - \getvalue{\??tk#1\c!na}% + %\getvalue{\??tk#1\v!text\c!after}% + \getvalue{\??tk#1\c!after}% \kern\zeropoint}% keep the \dp, beware of \vtops, never change this! \dp\scratchpagebox\zeropoint \box\scratchpagebox}% @@ -534,46 +474,46 @@ \def\dodoplacelayouttextline#1#2#3#4#5#6% \hsize toegevoegd, \hss's niet meer wijzigen {\hbox - {\ifdim\linkerrandbreedte>\zeropoint - \dododoplacelayouttextline\linkerrandbreedte{#1}\v!rand - {\hss\getvalue{\??tk#1\v!rand#2}}% - \hskip\linkerrandafstand + {\ifdim\leftedgewidth>\zeropoint + \dododoplacelayouttextline\leftedgewidth{#1}\v!edge + {\hss\getvalue{\??tk#1\v!edge#2}}% + \hskip\leftedgedistance \fi - \ifdim\linkermargebreedte>\zeropoint - \dododoplacelayouttextline\linkermargebreedte{#1}\v!marge - {\hbox to \linkermargebreedte - {\hss\getvalue{\??tk#1\v!marge#2}}% - \hskip-\linkermargebreedte - \hbox to \linkermargebreedte - {\hss#5{\??tk#1\v!marge\c!margetekst}}}% - \hskip\linkermargeafstand + \ifdim\leftmarginwidth>\zeropoint + \dododoplacelayouttextline\leftmarginwidth{#1}\v!margin + {\hbox to \leftmarginwidth + {\hss\getvalue{\??tk#1\v!margin#2}}% + \hskip-\leftmarginwidth + \hbox to \leftmarginwidth + {\hss#5{\??tk#1\v!margin\c!margintext}}}% + \hskip\leftmargindistance \fi - \ifdim\zetbreedte>\zeropoint - \dododoplacelayouttextline\zetbreedte{#1}\v!tekst - {\hbox to \zetbreedte - {\@@nmpre{#5{\??tk#1\v!tekst\c!kantlijntekst}}% - \getvalue{\??tk#1\v!tekst#2}\hss}% - \hskip-\zetbreedte - \hbox to \zetbreedte - {\hss\getvalue{\??tk#1\v!tekst#3}\hss}% - \hskip-\zetbreedte - \hbox to \zetbreedte - {\hss\getvalue{\??tk#1\v!tekst#4}% - \@@nmpos{#6{\??tk#1\v!tekst\c!kantlijntekst}}}}% + \ifdim\makeupwidth>\zeropoint + \dododoplacelayouttextline\makeupwidth{#1}\v!text + {\hbox to \makeupwidth + {\@@nmpre{#5{\??tk#1\v!text\c!marginedgetext}}% + \getvalue{\??tk#1\v!text#2}\hss}% + \hskip-\makeupwidth + \hbox to \makeupwidth + {\hss\getvalue{\??tk#1\v!text#3}\hss}% + \hskip-\makeupwidth + \hbox to \makeupwidth + {\hss\getvalue{\??tk#1\v!text#4}% + \@@nmpos{#6{\??tk#1\v!text\c!marginedgetext}}}}% \fi - \ifdim\rechtermargebreedte>\zeropoint - \hskip\rechtermargeafstand - \dododoplacelayouttextline\rechtermargebreedte{#1}\v!marge - {\hbox to \rechtermargebreedte - {\getvalue{\??tk#1\v!marge#4}\hss}% - \hskip-\rechtermargebreedte - \hbox to \rechtermargebreedte - {#6{\??tk#1\v!marge\c!margetekst}\hss}}% + \ifdim\rightmarginwidth>\zeropoint + \hskip\rightmargindistance + \dododoplacelayouttextline\rightmarginwidth{#1}\v!margin + {\hbox to \rightmarginwidth + {\getvalue{\??tk#1\v!margin#4}\hss}% + \hskip-\rightmarginwidth + \hbox to \rightmarginwidth + {#6{\??tk#1\v!margin\c!margintext}\hss}}% \fi - \ifdim\rechterrandbreedte>\zeropoint - \hskip\rechterrandafstand - \dododoplacelayouttextline\rechterrandbreedte{#1}\v!rand - {\getvalue{\??tk#1\v!rand#4}\hss}% + \ifdim\rightedgewidth>\zeropoint + \hskip\rightedgedistance + \dododoplacelayouttextline\rightedgewidth{#1}\v!edge + {\getvalue{\??tk#1\v!edge#4}\hss}% \fi}} % \def\dododoplacelayouttextline#1#2#3#4% @@ -586,18 +526,18 @@ \def\dododoplacelayouttextline#1#2#3#4% {\vbox % to \vsize {\hsize#1\relax - \getvalue{\??tk#2#3\c!voor}% + \getvalue{\??tk#2#3\c!before}% \startlayoutcomponent{t:#2:#3}{area #2 #3}% \hbox to #1{#4}% \stoplayoutcomponent - \getvalue{\??tk#2#3\c!na}}} + \getvalue{\??tk#2#3\c!after}}} %D Although it is far better to use backgrounds for this %D purpose, one can add a rule in the following way. This %D method makes the rules disappear in case of an empty text %D line. Consider this a feature. %D -%D \starttypen +%D \starttyping %D \setupheadertexts[left][right] %D %D \setupheader[text][after=\hrule,style=bold] @@ -607,7 +547,7 @@ %D \setupheader[state=empty] %D \input tufte \page %D \stoptext -%D \stoptypen +%D \stoptyping %D The next twosome will be done differently (using an %D existing auxiliary macro). @@ -623,9 +563,9 @@ % newer \def\@@nmprepos#1#2#3#4#5% - {\doifelsenothing\@@nmbreedte + {\doifelsenothing\@@nmwidth {\doiftext{#5}{#1{#5}#2}} - {\doiftext{#5}{\hbox to \@@nmbreedte{#3{#5}#4}}}} + {\doiftext{#5}{\hbox to \@@nmwidth{#3{#5}#4}}}} \def\@@nmpre{\@@nmprepos\empty\tfskip\relax\hss} \def\@@nmpos{\@@nmprepos\tfskip\empty\hss\relax} @@ -633,11 +573,11 @@ %D This code will move to \type {page-flt.tex}. \appendtoks - \plaatsrechtermargeblok \hskip-\rechtermargebreedte + \plaatsrechtermargeblok \hskip-\rightmarginwidth \to \rightmargintextcontent \appendtoks - \plaatslinkermargeblok \hskip-\linkermargebreedte + \plaatslinkermargeblok \hskip-\leftmarginwidth \to \leftmargintextcontent %D The next hook will later be used for keeping track of @@ -645,7 +585,7 @@ %D dependent) reference point. \ifx\undefined\placepositionanchors - \def\placepositionanchors{\vskip\teksthoogte} + \def\placepositionanchors{\vskip\textheight} \fi %D \macros @@ -660,14 +600,14 @@ %D The next example demonstrates how we can use this %D mechanism to provide page (event) dependent text lines. %D -%D \starttypen -%D \definetext[hoofdstuk][voet][paginanummer] -%D \stelkopin[hoofdstuk][hoofd=hoog,voet=hoofdstuk] -%D \setupheadertexts[paginanummer] -%D \setupfootertexts[links][rechts] -%D \hoofdstuk{eerste} \dorecurse{20}{\input tufte \relax} -%D \hoofdstuk{tweede} \dorecurse{20}{\input tufte \relax} -%D \stoptypen +%D \starttyping +%D \definetext[chapter][footer][pagenumber] +%D \setuphead[chapter][header=high,footer=chapter] +%D \setupheadertexts[pagenumber] +%D \setupfootertexts[left][right] +%D \chapter{eerste} \dorecurse{20}{\input tufte \relax} +%D \chapter{tweede} \dorecurse{20}{\input tufte \relax} +%D \stoptyping \def\definetext {\doseventupleempty\dodefinetext} @@ -688,25 +628,25 @@ %D The rest of this file is dedicated to setting up the %D texts. This code is not that impressive. -\setupheadertexts [\v!tekst] [] [] -\setupheadertexts [\v!marge] [] [] -\setupheadertexts [\v!rand] [] [] +\setupheadertexts [\v!text] [] [] +\setupheadertexts [\v!margin] [] [] +\setupheadertexts [\v!edge] [] [] -\setupfootertexts [\v!tekst] [] [] -\setupfootertexts [\v!marge] [] [] -\setupfootertexts [\v!rand] [] [] +\setupfootertexts [\v!text] [] [] +\setupfootertexts [\v!margin] [] [] +\setupfootertexts [\v!edge] [] [] -\setuptexttexts [\v!tekst] [] [] -\setuptexttexts [\v!marge] [] [] -\setuptexttexts [\v!rand] [] [] +\setuptexttexts [\v!text] [] [] +\setuptexttexts [\v!margin] [] [] +\setuptexttexts [\v!edge] [] [] -\setupbottomtexts [\v!tekst] [] [] -\setupbottomtexts [\v!marge] [] [] -\setupbottomtexts [\v!rand] [] [] +\setupbottomtexts [\v!text] [] [] +\setupbottomtexts [\v!margin] [] [] +\setupbottomtexts [\v!edge] [] [] -\setuptoptexts [\v!tekst] [] [] -\setuptoptexts [\v!marge] [] [] -\setuptoptexts [\v!rand] [] [] +\setuptoptexts [\v!text] [] [] +\setuptoptexts [\v!margin] [] [] +\setuptoptexts [\v!edge] [] [] % alternative % @@ -734,35 +674,35 @@ \def\dodocommando[#1][#2]% {\getparameters [\??tk#1#2] - [%\c!status=\v!normaal, % moved - \c!voor=, % both global and local are used - \c!na=, % both global and local are used + [%\c!state=\v!normal, % moved + \c!before=, % both global and local are used + \c!after=, % both global and local are used \c!strut=, % the local one, not (yet) used - \c!letter=\getvalue{\??tk#1\c!letter},% hm, got lost - \c!kleur=\getvalue{\??tk#1\c!kleur}, % hm, got lost - \c!linkertekst=, - \c!middentekst=, - \c!rechtertekst=, - \c!kantlijntekst=, - \c!margetekst=, - \c!breedte=]% - \inheritparameter[\??tk#1#2][\c!linkerletter ][\c!letter ]% - \inheritparameter[\??tk#1#2][\c!rechterletter ][\c!letter ]% - \inheritparameter[\??tk#1#2][\c!linkerkleur ][\c!kleur ]% - \inheritparameter[\??tk#1#2][\c!rechterkleur ][\c!kleur ]% - \inheritparameter[\??tk#1#2][\c!linkerbreedte ][\c!breedte]% - \inheritparameter[\??tk#1#2][\c!rechterbreedte][\c!breedte]} + \c!style=\getvalue{\??tk#1\c!style},% hm, got lost + \c!color=\getvalue{\??tk#1\c!color}, % hm, got lost + \c!lefttext=, + \c!middletext=, + \c!righttext=, + \c!marginedgetext=, + \c!margintext=, + \c!width=]% + \inheritparameter[\??tk#1#2][\c!leftstyle ][\c!style ]% + \inheritparameter[\??tk#1#2][\c!rightstyle ][\c!style ]% + \inheritparameter[\??tk#1#2][\c!leftcolor ][\c!color ]% + \inheritparameter[\??tk#1#2][\c!rightcolor ][\c!color ]% + \inheritparameter[\??tk#1#2][\c!leftwidth ][\c!width]% + \inheritparameter[\??tk#1#2][\c!rightwidth][\c!width]} \def\docommando#1% - {\dodocommando[#1][\v!tekst]% - \dodocommando[#1][\v!marge]% - \dodocommando[#1][\v!rand]} + {\dodocommando[#1][\v!text]% + \dodocommando[#1][\v!margin]% + \dodocommando[#1][\v!edge]} -\docommando\v!boven -\docommando\v!hoofd -\docommando\v!voet -\docommando\v!tekst -\docommando\v!onder +\docommando\v!top +\docommando\v!header +\docommando\v!footer +\docommando\v!text +\docommando\v!bottom \let\docommando \relax \let\dodocommando\relax @@ -770,16 +710,16 @@ %D While the header and footer lines are moved away from the %D main text, the top and bottom lines are centered. -\setuptop [\c!status=\v!normaal,\c!voor=\vss,\c!na=\vss,\c!strut=] -\setupheader[\c!status=\v!normaal,\c!voor=, \c!na=\vss,\c!strut=\v!ja] -\setuptext [\c!status=\v!normaal,\c!voor=\vss,\c!na=\vss,\c!strut=] -\setupfooter[\c!status=\v!normaal,\c!voor=\vss,\c!na=, \c!strut=\v!ja] -\setupbottom[\c!status=\v!normaal,\c!voor=\vss,\c!na=\vss,\c!strut=] +\setuptop [\c!state=\v!normal,\c!before=\vss,\c!after=\vss,\c!strut=] +\setupheader[\c!state=\v!normal,\c!before=, \c!after=\vss,\c!strut=\v!yes] +\setuptext [\c!state=\v!normal,\c!before=\vss,\c!after=\vss,\c!strut=] +\setupfooter[\c!state=\v!normal,\c!before=\vss,\c!after=, \c!strut=\v!yes] +\setupbottom[\c!state=\v!normal,\c!before=\vss,\c!after=\vss,\c!strut=] -\setuptop [\c!letter=,\c!kleur=] -\setupheader[\c!letter=,\c!kleur=] -\setuptext [\c!letter=,\c!kleur=] -\setupfooter[\c!letter=,\c!kleur=] -\setupbottom[\c!letter=,\c!kleur=] +\setuptop [\c!style=,\c!color=] +\setupheader[\c!style=,\c!color=] +\setuptext [\c!style=,\c!color=] +\setupfooter[\c!style=,\c!color=] +\setupbottom[\c!style=,\c!color=] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/pdfr-il2.tex b/tex/context/base/pdfr-il2.tex index 615fcd7af..70bcb25da 100644 --- a/tex/context/base/pdfr-il2.tex +++ b/tex/context/base/pdfr-il2.tex @@ -2,8 +2,8 @@ %D [ file=pdfr-il2, %D version=2000.12.10, %D title=\CONTEXT\ PDF Font Resources, -%D subtitle=ISO Latin 2, -%D author={Ondrej Koala Vacha, Hans Hagen} +%D subtitle=ISO Latin 2, +%D author={Ondrej Koala Vacha, Hans Hagen}, %D date=\currentdate, %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C @@ -11,20 +11,20 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D This vector is derived (but reformatted a bit) from a -%D sample send to me by Petr Ferdus. There was some Czech -%D comment in which I could recognize the name of Ondrej -%D Koala Vacha. More information on setting up such a vector -%D can be found in the \PDF\ reference manual. +%D This vector is derived (but reformatted a bit) from a +%D sample send to me by Petr Ferdus. There was some Czech +%D comment in which I could recognize the name of Ondrej +%D Koala Vacha. More information on setting up such a vector +%D can be found in the \PDF\ reference manual. -\startpdffontresource[il2] +\startpdffontresource[il2] /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo - << /Registry (Adobe) - /Ordering (T1UV) - /Supplement 0 + << /Registry (Adobe) + /Ordering (T1UV) + /Supplement 0 >> def /CMapName /Adobe-Identity-UCS def /CMapType 1 def @@ -230,4 +230,4 @@ CMapName currentdict /CMap defineresource pop end end \stoppdffontresource -\endinput +\endinput diff --git a/tex/context/base/plus-rul.tex b/tex/context/base/plus-rul.tex index 15f919fcc..57d94cfb1 100644 --- a/tex/context/base/plus-rul.tex +++ b/tex/context/base/plus-rul.tex @@ -17,8 +17,6 @@ %D \definesidebar[whow][rulecolor=green,distance=] %D -%D \starttext -%D %D \input tufte \par %D \startsidebar %D \input tufte \par @@ -26,9 +24,11 @@ %D \startsidebar[whow] %D \input tufte \par %D \input tufte \par -%D \input tufte \stopsidebar \par +%D \input tufte +%D \stopsidebar \par %D \input tufte \par -%D \input tufte \stopsidebar \par +%D \input tufte +%D \stopsidebar \par %D \input tufte \par %D \input tufte \par %D \startsidebar @@ -36,7 +36,8 @@ %D \input tufte \par %D \input tufte \par %D \input tufte \par -%D \input tufte \stopsidebar \par +%D \input tufte +%D \stopsidebar \par %D \input tufte \par %D \input tufte \par %D \startsidebar @@ -69,9 +70,9 @@ % distance=5pt] \setupsidebars - [\c!lijndikte=2pt, - \c!lijnkleur=red, - \c!afstand=.5\bodyfontsize] + [\c!rulethickness=2pt, + \c!rulecolor=red, + \c!distance=.5\bodyfontsize] \def\definesidebar {\dodoubleempty\dodefinesidebar} @@ -79,7 +80,7 @@ \def\dodefinesidebar[#1][#2]% {\copyparameters [\??sr#1][\??sr] - [\c!lijndikte,\c!lijnkleur,\c!afstand]% + [\c!rulethickness,\c!rulecolor,\c!distance]% \getparameters [\??sr#1][#2]} @@ -92,18 +93,18 @@ \checktextbackgrounds \doglobal\increment\currentsidebar \doifelsenothing{#1} - {\advance\sidebardistance\@@srafstand} - {\doifelsevaluenothing{\??sr#1\c!afstand} - {\advance\sidebardistance\@@srafstand} - {\sidebardistance\getvalue{\??sr#1\c!afstand}}}% + {\advance\sidebardistance\@@srdistance} + {\doifelsevaluenothing{\??sr#1\c!distance} + {\advance\sidebardistance\@@srdistance} + {\sidebardistance\getvalue{\??sr#1\c!distance}}}% \startpositionoverlay{text-1}% \expanded{\setMPpositiongraphicrange {b:side:\currentsidebar}% {e:side:\currentsidebar}% {mpos:bar}% {self=side:\currentsidebar, - linewidth=\getvalue{\??sr#1\c!lijndikte}, - linecolor=\getvalue{\??sr#1\c!lijnkleur}, + linewidth=\getvalue{\??sr#1\c!rulethickness}, + linecolor=\getvalue{\??sr#1\c!rulecolor}, distance=\the\sidebardistance}}% \stoppositionoverlay \edef\stopsidebar{\noexpand\dostopsidebar{\currentsidebar}}% @@ -161,23 +162,23 @@ %D \stopmarginrule \definesidebar - [\v!marge] - [\c!lijnkleur=black, - \c!lijndikte=\@@kalijndikte, - \c!afstand=\dimexpr(\linkermargeafstand-\@@kalijndikte/2)] + [\v!margin] + [\c!rulecolor=\s!black, + \c!rulethickness=\@@karulethickness, + \c!distance=\dimexpr(\leftmargindistance-\@@karulethickness/2)] \def\complexstartmarginrule[#1]% {\bgroup - \ifnum#1<\@@kaniveau\relax + \ifnum#1<\@@kalevel\relax \let\stopmarginrule\egroup \else \def\@@kadefaultwidth{#1}% \let\stopmarginrule\dostopmarginrule - \@EA\startsidebar\@EA[\@EA\v!marge\@EA]% + \@EA\startsidebar\@EA[\@EA\v!margin\@EA]% \fi} \def\dostopmarginrule {\stopsidebar \egroup} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/ppchtex.tex b/tex/context/base/ppchtex.tex index 3a8a556f7..4e5ed3d25 100644 --- a/tex/context/base/ppchtex.tex +++ b/tex/context/base/ppchtex.tex @@ -1,12 +1,3 @@ -% option=test => boxes -% dummy => file -% final => file / local run -% -% constante van phantom in definitie ONE: \setchemicaltextwidth 300 -% -% it would be interesting to rewrite this module with todays -% experiences and new context functionality, mybe ... - %D \module %D [ file=ppchtex (m-chemie), %D version=1997.03.19, @@ -21,6 +12,15 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% option=test => boxes +% dummy => file +% final => file / local run +% +% constante van phantom in definitie ONE: \setchemicaltextwidth 300 +% +% it would be interesting to rewrite this module with todays +% experiences and new context functionality, mybe ... + % Deze module ondersteunt het zetten van chemische % (structuur)formules. Hoewel de macro' zijn afgestemd op % CONTEXT, zijn ze ook buiten deze zetomgeving te gebruiken. @@ -391,7 +391,7 @@ \def\dowithchemical% {} -\doifdefinedelse{@@iastatus} +\doifdefinedelse{@@iastate} {\def\localgotochemical#1#2{\naarbox{#2}[#1]}% \def\localthisischemical#1{\pagereference[#1]}} {\def\localgotochemical#1{}% @@ -417,23 +417,23 @@ \def\setupchemicalformat[#1]% {\processaction - [\getvalue{#1\c!formaat}] - [ \v!klein=>\def\@@localchemicalformat{\scriptscriptstyle}, - \v!middel=>\def\@@localchemicalformat{\ifsmallchemicaltext\scriptscriptstyle\else\scriptstyle\fi}, - \v!groot=>\def\@@localchemicalformat{\ifsmallchemicaltext\scriptstyle\else\textstyle\fi}, - \s!unknown=>\def\@@localchemicalformat{\getvalue{#1\c!formaat}}]% + [\getvalue{#1\c!size}] + [ \v!small=>\def\@@localchemicalformat{\scriptscriptstyle}, + \v!medium=>\def\@@localchemicalformat{\ifsmallchemicaltext\scriptscriptstyle\else\scriptstyle\fi}, + \v!big=>\def\@@localchemicalformat{\ifsmallchemicaltext\scriptstyle\else\textstyle\fi}, + \s!unknown=>\def\@@localchemicalformat{\getvalue{#1\c!size}}]% \processaction - [\getvalue{#1\c!tekstformaat}] - [ \v!klein=>\def\@@localchemicalstyle{\scriptscriptstyle}, - \v!middel=>\def\@@localchemicalstyle{\ifsmallchemicaltext\scriptscriptstyle\else\scriptstyle\fi}, - \v!groot=>\def\@@localchemicalstyle{\ifsmallchemicaltext\scriptstyle\else\textstyle\fi}, - \s!unknown=>\def\@@localchemicalstyle{\getvalue{#1\c!tekstformaat}}]% + [\getvalue{#1\c!textsize}] + [ \v!small=>\def\@@localchemicalstyle{\scriptscriptstyle}, + \v!medium=>\def\@@localchemicalstyle{\ifsmallchemicaltext\scriptscriptstyle\else\scriptstyle\fi}, + \v!big=>\def\@@localchemicalstyle{\ifsmallchemicaltext\scriptstyle\else\textstyle\fi}, + \s!unknown=>\def\@@localchemicalstyle{\getvalue{#1\c!textsize}}]% \processaction - [\getvalue{#1\c!schaal}] - [ \v!klein=>\def\@@localchemicalscale{500}, - \v!middel=>\def\@@localchemicalscale{625}, - \v!groot=>\def\@@localchemicalscale{750}, - \s!unknown=>\def\@@localchemicalscale{\getvalue{#1\c!schaal}}]} + [\getvalue{#1\c!scale}] + [ \v!small=>\def\@@localchemicalscale{500}, + \v!medium=>\def\@@localchemicalscale{625}, + \v!big=>\def\@@localchemicalscale{750}, + \s!unknown=>\def\@@localchemicalscale{\getvalue{#1\c!scale}}]} \def\@@currentchemicalformat {\ifinchemical @@ -454,15 +454,15 @@ {\dosingleargument\dosetupchemical} \def\@@dochemicalstyle% % default mapping - {\@@chemicalletter} + {\@@chemicalstyle} \def\@@dochemicalcolor% % no mapping yet {} -\def\@@chemicalletter % $inner-style$ % (overloaded) - {\@@chemicalchemicalletter} % $$outer-style$$ +\def\@@chemicalstyle % $inner-style$ % (overloaded) + {\@@chemicalchemicalstyle} % $$outer-style$$ -\def\@@writechemicalstatus#1#2% +\def\@@writechemicalstate#1#2% {} \def\@@beginchemicallocalpicture @@ -489,9 +489,10 @@ \endpspicture \or \resetchemicalcoordinates - \setbox2=\hbox - {\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}% - \wd2=\!!zeropoint\ht2=\!!zeropoint\dp2=\!!zeropoint + \setbox2\hbox{\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}% + \wd2=\!!zeropoint + \ht2=\!!zeropoint + \dp2=\!!zeropoint \put {\box2} at 0 0 \endpicture \popMPdrawing @@ -529,9 +530,10 @@ \put {\box\chemicalsymbols} at 0 0 % elders \ifMPdrawingdone \resetchemicalcoordinates - \setbox2=\hbox - {\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}% - \wd2=\!!zeropoint\ht2=\!!zeropoint\dp2=\!!zeropoint + \setbox2\hbox{\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}% + \wd2=\!!zeropoint + \ht2=\!!zeropoint + \dp2=\!!zeropoint \put {\box2} at 0 0 % \fi \endpicture @@ -583,7 +585,7 @@ \def\@@setsecondchemicalplotsymbol% {\ifcase\chemicaldrawingmode \!!widtha=50.8mm - \divide\!!widtha by \@@chemicalresolutie\relax + \divide\!!widtha by \@@chemicalresolution\relax \plotsymbolspacing=\!!widtha \setplotsymbol({\vrule\!!height\!!widtha\!!width\!!widtha})% \fi} @@ -657,10 +659,10 @@ \unexpanded\def\complexstartchemical[#1]% {\copyparameters [\??chemical][\??chemical\s!chemical] - [\c!breedte,\c!hoogte,\c!links,\c!rechts,\c!boven,\c!onder, - \c!korps,\c!formaat,\c!schaal,\c!status,\c!kader,\c!assenstelsel, - \c!plaats,\c!optie,\c!variant,\c!resolutie,\c!offset,\c!letter, - \c!kleur,\c!lijnkleur,\c!lijndikte]% + [\c!width,\c!height,\c!left,\c!right,\c!top,\c!bottom, + \c!bodyfont,\c!size,\c!scale,\c!state,\c!frame,\c!axis, + \c!location,\c!option,\c!alternative,\c!resolution,\c!offset,\c!style, + \c!color,\c!rulecolor,\c!rulethickness]% \getparameters [\??chemical] [#1]% @@ -671,15 +673,15 @@ \resetMPdrawing \fi % - \doif{\@@chemicalvariant}{2} + \doif{\@@chemicalalternative}{2} {\@@setsecondchemicalplotsymbol}% % - \doif{\@@chemicalassenstelsel}{\v!aan} + \doif{\@@chemicalaxis}\v!on {\let\chemicalframe\hbox}% % \!!counta=250000 \divide\!!counta by \@@localchemicalscale - \!!widtha=\@@chemicalkorps + \!!widtha=\@@chemicalbodyfont \divide\!!widtha by \!!counta \@@setchemicalcoordinatesystem{\the\!!widtha}% % @@ -714,30 +716,30 @@ \fi \fi}% \fixedchemicalfalse - \doif{\@@chemicalbreedte}{\v!passend} - {\edef\@@chemicalbreedte% + \doif\@@chemicalwidth\v!fit + {\edef\@@chemicalwidth {\ifnum\chemicaldrawingmode=1 2000 \else 1 \fi}% \fixedchemicaltrue}% - \doif{\@@chemicalhoogte}{\v!passend} - {\edef\@@chemicalhoogte% + \doif\@@chemicalheight\v!fit + {\edef\@@chemicalheight {\ifnum\chemicaldrawingmode=1 2000 \else 1 \fi}% \fixedchemicaltrue}% - \doifelse{\@@chemicalplaats}{\v!intekst} + \doifelse\@@chemicallocation\v!intext {\!!counta=0 \!!countb=0 \!!counta=0 \!!countd=0 } {\calculateaxis - {\!!counta}{\!!countb} - {\@@chemicallinks}{\@@chemicalrechts}{\@@chemicalbreedte}% + \!!counta\!!countb + \@@chemicalleft\@@chemicalright\@@chemicalwidth \calculateaxis - {\!!countc}{\!!countd} - {\@@chemicalonder}{\@@chemicalboven}{\@@chemicalhoogte}}% + \!!countc\!!countd + \@@chemicalbottom\@@chemicaltop\@@chemicalheight}% % \edef\@@chemheight {\the\!!countc}% \edef\@@chemdepth {\the\!!countd}% - \edef\@@chemicalboven{\the\!!countc}% - \edef\@@chemicalonder{\the\!!countd}% + \edef\@@chemicaltop{\the\!!countc}% + \edef\@@chemicalbottom{\the\!!countd}% % - \doifinsetelse{\v!aan}{\@@chemicalkader,\@@chemicalassenstelsel} + \doifinsetelse\v!on{\@@chemicalframe,\@@chemicalaxis} {\def\@@chemicalborder{\chemicalframe}} {\def\@@chemicalborder{\normalchemicalframe}}% % @@ -746,16 +748,16 @@ \@@beginchemicalpicture {-\the\!!counta}{\the\!!countb} {-\the\!!countc}{\the\!!countd}% - \doif{\@@chemicalstatus}{\v!start} - {\doif{\@@chemicalassenstelsel}{\v!aan} + \doif{\@@chemicalstate}\v!start + {\doif\@@chemicalaxis\v!on {\@@setchemicalaxis {-\the\!!counta}{\the\!!countb} {-\the\!!countc}{\the\!!countd}}}% - \doifelse{\@@chemicaloptie}{\v!test} - {\def\@@writechemicalstatus##1##2% + \doifelse\@@chemicaloption\v!test + {\def\@@writechemicalstate##1##2% {\convertargument##2\to\ascii \writestatus{##1}{\ascii}}} - {\def\@@writechemicalstatus##1##2{}}% + {\def\@@writechemicalstate##1##2{}}% \ignorespaces} \def\dostartchemical% @@ -1150,7 +1152,7 @@ \ifchemicalpicture \setchemicalpicture{#1}{#2}% \else - \doifelse\@@chemicaloptie\v!test + \doifelse\@@chemicaloption\v!test {\def\@@chemicalframe{\chemicalframe}} {\def\@@chemicalframe{}}% \dosetsubscripts @@ -1158,7 +1160,7 @@ \setbox4=\hbox{$\@@dochemicalstyle{\@@localchemicalformat C_2^2}$}% \setbox6=\hbox{$\@@dochemicalstyle{\@@localchemicalformat O}$}% or C \doresetsubscripts - \doifnot\@@chemicalplaats\v!intekst + \doifnot\@@chemicallocation\v!intext {\ht2=\ht4 \dp2=\dp4}% \setbox2=\hbox{\@@chemicalframe{\@@dochemicalcolor\box2}}% @@ -1250,10 +1252,10 @@ \def\processchemicaltextconstant#1#2#3#4% {\chemicaltextconstanttrue - \let\@@oldchemicalframe=\@@chemicalframe - \let\@@chemicalframe=\relax + \let\@@oldchemicalframe\@@chemicalframe + \let\@@chemicalframe\relax \processchemicaltextelement{#1}{#2}{#3}{#4}{}% - \let\@@chemicalframe=\@@oldchemicalframe + \let\@@chemicalframe\@@oldchemicalframe \chemicaltextconstantfalse} % \plotchemicalline{#1}{#2}{#3}{#4} @@ -1674,7 +1676,7 @@ \newif\ifinnerchemical \def\dosimplechemical#1#2#3% - {\doifdefinedelse{\??chemical\c!plaats} + {\doifdefinedelse{\??chemical\c!location} {\writestatus{ppchtex}{the {}{}-alternative is not permitted here}} {\ifinnerchemical \let\chemicalsign = \chemicalinnersign @@ -1776,7 +1778,7 @@ \drawchemical[#1][#2]% \ignorespaces \else - \startchemical[\c!plaats=\v!intekst]% + \startchemical[\c!location=\v!intext]% \drawchemical[#1][#2]% \expandafter\stopchemical \fi @@ -1784,16 +1786,16 @@ \def\dochemical[#1]% {\def\simpledochemical% - {\@@writechemicalstatus{ppchtex}{[#1][]}% + {\@@writechemicalstate{ppchtex}{[#1][]}% \dodochemical[#1][]}% % \def\complexdochemical[##1]% - {\@@writechemicalstatus{ppchtex}{[#1][##1]}% + {\@@writechemicalstate{ppchtex}{[#1][##1]}% \txtchemical=0% \dodochemical[#1][##1]}% % \def\complexdochemical[##1]% % experiment - {\@@writechemicalstatus{ppchtex}{[#1][##1]}% % experiment + {\@@writechemicalstate{ppchtex}{[#1][##1]}% % experiment \txtchemical=0% % experiment \dododochemical\dodochemical[#1][##1]}% % experiment % @@ -1815,15 +1817,15 @@ % #2: atomen enz. \def\localdodochemical[#1][#2]% - {\@@writechemicalstatus{ppchtex}{[#1][#2]}% + {\@@writechemicalstate{ppchtex}{[#1][#2]}% %\bgroup % koppelen en afmetingen gaat fout, vandaar: \advance\levchemical 1 \letvalue{\??chemical\s!unknown\the\levchemical}\unknownchemical - \setevalue{\??chemical\c!tekst\the\levchemical}{\the\txtchemical}% + \setevalue{\??chemical\c!text\the\levchemical}{\the\txtchemical}% \txtchemical=0 \dodochemical[#1][#2]% - % \@EA\txtchemical\@EA\csname\??chemical\c!tekst\the\levchemical\endcsname - \txtchemical\csname\??chemical\c!tekst\the\levchemical\endcsname + % \@EA\txtchemical\@EA\csname\??chemical\c!text\the\levchemical\endcsname + \txtchemical\csname\??chemical\c!text\the\levchemical\endcsname \@EA\let\@EA\unknownchemical\csname\??chemical\s!unknown\the\levchemical\endcsname \advance\levchemical -1 %\egroup @@ -1836,14 +1838,14 @@ \ignorespaces}% \def\dochemical[##1]% {\def\simpledochemical% - {\@@writechemicalstatus{ppchtex}{[##1][#2]}% + {\@@writechemicalstate{ppchtex}{[##1][#2]}% \dodochemical[##1][#2]% \ignorespaces}% \def\complexdochemical[####1]% {\dododochemical\localdodochemical[##1][####1,#2]}% \complexorsimple\dochemical}% - \doif{\@@chemicalstatus}{\v!start} - {\doifelse{\chemicalname}{\s!unknown} + \doif\@@chemicalstate\v!start + {\doifelse\chemicalname\s!unknown {\getvalue{\s!executechemical\defaultchemical}[#2]} {\getvalue{\s!executechemical\chemicalname}[#2]}% \def\unknownchemical##1% @@ -2182,7 +2184,7 @@ \buildrel \@@dochemicalstyle{\scriptstyle\quad#1\quad}% \over{\overrightarrow - {\hphantom{\@chemicalletter{\scriptstyle\quad#1\quad}}}}% + {\hphantom{\@chemicalstyle{\scriptstyle\quad#1\quad}}}}% \chemicalspace$}} \def\chemicaldoublepicturearrow#1% @@ -2202,7 +2204,7 @@ \def\somechemicalbond% {\hrule width \wd0 height .4pt} -\def\dochemicalbonds#1#2#3% todo: \@@chemicaltextletter +\def\dochemicalbonds#1#2#3% todo: \@@chemicaltextstyle {{\setbox0=\hbox {${\@@localchemicalstyle M}$}% \vbox to \ht0 @@ -3159,7 +3161,7 @@ RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{}, {\dosetsubscripts% $\@@dochemicalstyle{\@@localchemicalformat\strut##1}$% \doresetsubscripts}% - \doifelse\@@chemicalplaats\v!intekst + \doifelse\@@chemicallocation\v!intext {#1{\dochemicaltext\toptext}}% {\setbox\chemicalsymbols=\hbox {\box\chemicalsymbols @@ -3184,7 +3186,7 @@ RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{}, {$\leftarrow\hskip-1em$\rightarrowfill\cr}} \def\executechemicalsign#1[#2]% - {\doifelse\@@chemicalplaats\v!intekst + {\doifelse\@@chemicallocation\v!intext {\dosetsubscripts $\@@dochemicalstyle{\@@localchemicalformat#1}$% \doresetsubscripts} @@ -3204,19 +3206,19 @@ RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{}, {\executechemicalsign{=}} \def\executechemicalSPACE[#1]% - {\doifnot\@@chemicalplaats\v!intekst + {\doifnot\@@chemicallocation\v!intext {\setbox\chemicalsymbols\hbox {\box\chemicalsymbols \quad}}} \def\executechemicalCHEM[#1]% - {\doifnot\@@chemicalplaats\v!intekst + {\doifnot\@@chemicallocation\v!intext {\setbox\chemicalsymbols\hbox {\box\chemicalsymbols $\@@dochemicalstyle{\@@localchemicalformat#1}$}}} \def\executechemicalTEXT[#1]% - {\doifnot\@@chemicalplaats\v!intekst + {\doifnot\@@chemicallocation\v!intext {\setbox\chemicalsymbols\hbox {\box\chemicalsymbols#1}}} @@ -3248,9 +3250,9 @@ RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{}, \def\executechemicalcomplex#1% {\bgroup - \putchemicalrule {0} {-\@@chemicalonder} {0} {\@@chemicalboven}% - \putchemicalrule {0} {\@@chemicalboven} {#1150} {\@@chemicalboven}% - \putchemicalrule {0} {-\@@chemicalonder} {#1150} {-\@@chemicalonder}% + \putchemicalrule {0} {-\@@chemicalbottom} {0} {\@@chemicaltop}% + \putchemicalrule {0} {\@@chemicaltop} {#1150} {\@@chemicaltop}% + \putchemicalrule {0} {-\@@chemicalbottom} {#1150} {-\@@chemicalbottom}% \egroup} \def\executechemicalOPENCOMPLEX[#1]% @@ -3267,12 +3269,12 @@ RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{}, {\executechemicalTEXT [$\left#1\relax \dimen0=\@@chemicalunit - \scratchcounter=\@@chemicalboven - \advance\scratchcounter by \@@chemicalonder + \scratchcounter=\@@chemicaltop + \advance\scratchcounter by \@@chemicalbottom \dimen0=\scratchcounter\dimen0 \vcenter to \dimen0{} \dimen2=\@@chemicalunit - \dimen2=\@@chemicalrechts\dimen0 + \dimen2=\@@chemicalright\dimen0 \vcenter{\leftskip1em\hsize\dimen2\relax\strut#2\strut}% \right.$]}% @@ -3288,28 +3290,28 @@ RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{}, \let\setchemicalattributes\relax \setupchemical - [\c!breedte=0, - \c!hoogte=0, - \c!links=0, - \c!rechts=0, - \c!boven=0, - \c!onder=0, - \c!korps=\the\bodyfontsize, - \c!resolutie=\outputresolution, - \c!schaal=\v!middel, - \c!formaat=\v!middel, - \c!tekstformaat=\v!groot, - \c!kader=\v!uit, - \c!assenstelsel=\v!uit, - \c!status=\v!start, - \c!letter=\rm, - \c!plaats=, - \c!optie=, + [\c!width=0, + \c!height=0, + \c!left=0, + \c!right=0, + \c!top=0, + \c!bottom=0, + \c!bodyfont=\the\bodyfontsize, + \c!resolution=\outputresolution, + \c!scale=\v!medium, + \c!size=\v!medium, + \c!textsize=\v!big, + \c!frame=\v!off, + \c!axis=\v!off, + \c!state=\v!start, + \c!style=\rm, + \c!location=, + \c!option=, \c!offset=LOW, - \c!variant=1, - \c!kleur=, - \c!lijndikte=, - \c!lijnkleur=] + \c!alternative=1, + \c!color=, + \c!rulethickness=, + \c!rulecolor=] % Tijdelijk plaatsen we deze extra macro's hier. % @@ -3346,46 +3348,50 @@ RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{}, %D Here are a couple of \CONTEXT\ goodies: %D -%D \startopsomming -%D \som styles hooked into \CONTEXT\ style mechanism -%D \som support for color and rulethickness (mp mode only) -%D \som position tracking +%D \startitemize +%D \item styles hooked into \CONTEXT\ style mechanism +%D \item support for color and rulethickness (mp mode only) +%D \item position tracking %D \stopopsoming \ifCONTEXT \def\setchemicalattributes - {\scratchdimen\@@chemicalchemicallijndikte + {\scratchdimen\@@chemicalchemicalrulethickness \def\chemicalattributes {withpen pencircle scaled \the\scratchdimen\space withcolor }% - \doifelsenothing\@@chemicalchemicallijnkleur + \doifelsenothing\@@chemicalchemicalrulecolor {\edef\chemicalattributes{\chemicalattributes black}} {\edef\chemicalattributes - {\chemicalattributes \MPcolor{\@@chemicalchemicallijnkleur}}}% + {\chemicalattributes \MPcolor{\@@chemicalchemicalrulecolor}}}% \startMPdrawing drawoptions (\chemicalattributes) ; \stopMPdrawing} -\let\@@chemicalkleur\empty +\let\@@chemicalcolor\empty \def\@@dochemicalcolor - {\doifsomething\@@chemicalkleur{\color[\@@chemicalkleur]}} + {\doifsomething\@@chemicalcolor{\color[\@@chemicalcolor]}} \def\@@dochemicalstyle - {\doconvertfont\@@chemicalletter} + {\doconvertfont\@@chemicalstyle} \setupchemical - [\c!lijndikte=\linewidth, - \c!lijnkleur=, - \c!kleur=] + [\c!rulethickness=\linewidth, + \c!rulecolor=, + \c!color=] \def\cpos#1#2% - {\bgroup - \pushmacro\dowithchemical - \gdef\dowithchemical##1{\hpos{#1}{##1}\popmacro\dowithchemical}% - #2% - \egroup} + {\iftrialtypesetting + #2% + \else + \bgroup + \globalpushmacro\dowithchemical + \gdef\dowithchemical##1{\hpos{#1}{##1}\globalpopmacro\dowithchemical}% + #2% + \egroup + \fi} \fi diff --git a/tex/context/base/prop-ini.tex b/tex/context/base/prop-ini.tex index 19ad6b2b8..f77bb4633 100644 --- a/tex/context/base/prop-ini.tex +++ b/tex/context/base/prop-ini.tex @@ -13,162 +13,170 @@ \writestatus{loading}{Context Property Macros / initialization} -%D Experimental module. - -%D local or not? like colors? cross pages? needed? - -%D combine with newfont.tex +%D Welcome to the third alternative of this yet undocumented module, +%D which means that there is no public interface yet! \unprotect -\def\defineproperty - {\dotripleempty\dodefineproperty} - -% \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,\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} +\newcount\propertylevel -\def\dostartproperty#1% - {\checkproperty{#1}% - \csname\s!start\csname\??py#1\c!type\endcsname property\endcsname{#1}} +\def\currentpropertylevel {\csname\??py:l:\currentpropertytype\endcsname} % counter +\def\previouspropertylevel{\csname\??py:p:\currentpropertytype\endcsname} % counter -\def\dostopproperty#1% - {\csname\s!stop\csname\??py#1\c!type\endcsname property\endcsname} +\def\currentproperty {\csname\??py:c:\number\currentpropertylevel \endcsname} % string +\def\previousproperty {\csname\??py:c:\number\previouspropertylevel\endcsname} % string -\def\checkproperty#1% - {\csname\s!check#1\endcsname} +% more efficient: -\def\propertyparameter#1{\csname\??py\currentproperty #1\endcsname} -%def\currentpropertytype{\csname\??py\currentproperty\c!type\endcsname} +\def\currentproperty {\csname\??py:c:\number\propertylevel\endcsname} % string -%def\checkedpropertyparameter#1#2{\executeifdefined{\??py\currentproperty#1}{#2}} -\def\checkedpropertyparameter #1{\executeifdefined{\??py\currentproperty#1}} +% \def\previouspropertylevel{\numexpr(\csname\??py:p:\currentpropertytype\endcsname+1)} +% \letvalue{\??py:p:0}\empty -\let\currentproperty\s!unknown +\def\currentpropertytype {\csname\??py\currentproperty\c!type\endcsname} -\unexpanded\def\startproperty[#1]% - {\bgroup\edef\currentproperty{#1}% - \csname\e!start\currentproperty\endcsname} +\def\docheckproperty % watch the s instead of e + {\csname\s!check\currentpropertytype property\endcsname + \global\expandafter\let\csname\??py\s!check\currentproperty\endcsname\empty} -\unexpanded\def\stopproperty - {\csname\e!stop \currentproperty\endcsname +% \def\checkproperty[#1]% +% {\bgroup +% \def\currentproperty{#1}% +% \docheckproperty +% \egroup} +% +% oeps, was wrong, no reset + +\def\checkproperty[#1]% + {\bgroup + \def\currentproperty{#1}% + \csname\??py\s!check\currentproperty\endcsname \egroup} \unexpanded\def\property[#1]% - {\groupedcommand - {\edef\currentproperty{#1}% - \csname\e!start\currentproperty\endcsname} - {\csname\e!stop \currentproperty\endcsname}} - -% The next alternative provides optional non-grouping: - -\def\dodefineproperty[#1][#2][#3]% todo : global def - {\ifundefined{\??py#1\c!titel}% - \getgparameters[\??py#1][\c!globaal=\v!nee,\c!titel=#1,\c!type=#2,#3]% global ! ! ! ! - \doifelsevalue{\??py#1\c!globaal}\v!ja - {\setgvalue{\s!check#1}{\docheckproperty{#1}}% - \setgvalue{\e!start#1}{\dostartproperty{#1}}% - \setgvalue{\e!stop #1}{\dostopproperty {#1}}}% - {\setgvalue{\s!check#1}{\docheckproperty{#1}}% - \setgvalue{\e!start#1}{\begingroup\dostartproperty{#1}}% - \setgvalue{\e!stop #1}{\dostopproperty {#1}\endgroup}}% - \fi} + {\groupedcommand{\dostartproperty{#1}}\dostopproperty} \unexpanded\def\startproperty[#1]% - {\globalpushmacro\currentproperty - \edef\currentproperty{#1}% - \csname\e!start\currentproperty\endcsname} + {\dostartproperty{#1}} \unexpanded\def\stopproperty - {\csname\e!stop \currentproperty\endcsname - \globalpopmacro\currentproperty} - -% % % % % old % % % % % - -% grouped - -% \def\restartproperty#1% -% {\edef\currentproperty{#1}% -% \csname\e!start\currentproperty\endcsname} + {\dostopproperty} -% \def\restopproperty -% {\csname\e!stop \currentproperty\endcsname} +\def\dostartgproperty + {\begingroup\dostartproperty} -% \unexpanded\def\startproperty[#1]% -% {\bgroup\restartproperty{#1}} +\def\dostopgproperty + {\dostopproperty\endgroup} -% \unexpanded\def\stopproperty -% {\restopproperty\egroup} +\def\dostartproperty#1% evt pack: {current}{level}{ + {\global\advance\propertylevel\plusone + \@EAEAEA\xdef\currentproperty{#1}% + \global\advance\previouspropertylevel\plusone + \global\advance\currentpropertylevel\plusone + \csname\??py\s!check\currentproperty\endcsname + \csname\s!start\currentpropertytype\s!property\endcsname} -% \unexpanded\def\property[#1]% -% {\groupedcommand{\restartproperty{#1}}\restopproperty} +\def\dostopproperty + {\csname\s!stop\currentpropertytype\s!property\endcsname + \global\advance\currentpropertylevel\minusone + \global\advance\previouspropertylevel\minusone + \global\advance\propertylevel\minusone} -% \newtoks\nestedproperties +% \def\propertyparameter #1{\csname\??py\currentproperty#1\endcsname} +% \def\checkedpropertyparameter#1{\executeifdefined{\??py\currentproperty#1}} -% \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} +\def\defineproperty + {\dotripleempty\dodefineproperty} -% \unexpanded\def\startproperties[#1]% -% {\advance\pstackeddepth\plusone -% \getcommacommandsize[#1]% -% \setvalue{\??py:\number\pstackeddepth}{\number\commalistsize}% -% \rawprocesscommacomand[#1]\restartproperty} +% \def\dodefineproperty[#1][#2][#3]% global ! ! ! +% {\ifundefined{\??py#1\c!globaal}% +% ... actions ... +% \fi} +% +% since we may perform tests each time before a call, we prefer the faster: -% \unexpanded\def\stopproperties -% {\doxprecurse\currentpstacked\restopproperty -% \advance\pstackeddepth\minusone} +\def\defineproperty + {\dotripleempty\dodefineproperty} -% so far +\def\dodefineproperty[#1]% + {\ifundefined{\??py#1\c!global}% + \expandafter\dododefineproperty + \else + \expandafter\nododefineproperty + \fi[#1]} + +% due to initializations/counters, definitions are always global +% +% global : yes : ungrouped +% no : grouped +% method : command : define commands +% none : no commands + +\def\dododefineproperty[#1][#2][#3]% global ! ! ! + {\getgparameters[\??py#1][\c!global=\v!no,\c!type=#2,\c!method=\v!none,#3]% global ! ! ! ! + \expandafter\newcount\csname\??py:l:#2\endcsname % current level + \expandafter\newcount\csname\??py:p:#2\endcsname % previous level + \global\csname\??py:p:#2\endcsname\minusone + \global\expandafter\expandafter\let\csname\??py:c:0\endcsname\empty + \letgvalue{\??py\s!check#1}\docheckproperty + \doifelsevalue{\??py#1\c!method}\v!command + {\doifelsevalue{\??py#1\c!global}\v!yes + {\setgvalue{\e!start#1}{\dostartproperty{#1}}% + \letgvalue{\e!stop#1}\dostopproperty}% + {\setgvalue{\e!start#1}{\dostartgproperty{#1}}% + \letgvalue{\e!stop#1}\dostopgproperty}}% + {\doifelsevalue{\??py#1\c!global}\v!yes + {\setgvalue{\e!start#2}[##1]{\dostartproperty{##1}}% + \letgvalue{\e!stop#2}\dostopproperty}% + {\setgvalue{\e!start#2}[##1]{\dostartgproperty{##1}}% + \letgvalue{\e!stop#2}\dostopgproperty}}} + +\def\nododefineproperty[#1][#2][#3]% + {} + +\def\doifelseproperty#1{\doifdefinedelse{\??py#1\c!global}} + +\def\setupproperty + {\dodoubleempty\dosetupproperty} + +\def\dosetupproperty[#1][#2]% local + {\ifsecondargument + \getparameters[\??py#1][#2]% + \else + \getparameters[\??py][#1]% + \fi} -\protect \endinput \ No newline at end of file +% \def\propertyparameter#1% expands to #1 when not defined (see \define...) +% {\csname\??py +% \ifcsname\??py\currentproperty#1\endcsname +% \currentproperty#1% +% \else\ifcsname\??py\currentpropertytype#1\endcsname +% \currentpropertytype#1% +% \else +% :n:\currentproperty +% \fi\fi +% \endcsname} + +\letvalue{\??py\s!empty}\empty + +\def\propertyparameter#1#2% expands to #1 when not defined (see \define...) + {\csname\??py + \ifcsname\??py#1#2\endcsname + #1#2% + \else\ifcsname\??py\csname\??py#1\c!type\endcsname#2\endcsname + \csname\??py#1\c!type\endcsname#2% + \else + \s!empty + \fi\fi + \endcsname} + +\def\currentpropertyparameter % self and class + {\propertyparameter\currentproperty} + +\def\checkedpropertyparameter#1% only self + {\executeifdefined{\??py\currentproperty#1}} + +\def\definepropertyhandler#1{\setvalue{\??py*#1}} +\def\propertyhandler #1{\getvalue{\??py*#1}} + +\protect \endinput diff --git a/tex/context/base/prop-lay.tex b/tex/context/base/prop-lay.tex index f8e67e459..1e2726d29 100644 --- a/tex/context/base/prop-lay.tex +++ b/tex/context/base/prop-lay.tex @@ -17,26 +17,16 @@ \unprotect -% \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% +\def\checklayerproperty {\dodefineviewerlayer \currentproperty % tag - {\propertyparameter\c!titel}% title - {\checkedpropertyparameter\c!status\v!start}% visible + {\checkedpropertyparameter\c!title\currentproperty}% + {\checkedpropertyparameter\c!state\v!start}% visible or hidden {0}% type (1=frozen) {0}}% printable -\def\startlayerproperty#1% - {\dostartviewerlayer{#1}} +\def\startlayerproperty + {\dostartviewerlayer\currentproperty} \def\stoplayerproperty {\dostopviewerlayer} @@ -56,8 +46,8 @@ \expandafter\gobbleoneargument \fi} -% \defineproperty [debugging] [layer] [title=debugging] -% \defineproperty [navigation] [layer] [title=navigation] +% \defineproperty [debugging] [\s!layer] [title=debugging] +% \defineproperty [navigation] [\s!layer] [title=navigation] %D \starttext %D @@ -118,6 +108,6 @@ % % \def\startshowlayering#1#2% % {\ifshowlayering -% \defineproperty[\remappedlayering{#1}][layer][\c!titel=#2]% +% \defineproperty[\remappedlayering{#1}][\s!layer][\c!titel=#2]% % \startproperty[\remappedlayering{#1}]% -% \fi} \ No newline at end of file +% \fi} diff --git a/tex/context/base/prop-mis.tex b/tex/context/base/prop-mis.tex new file mode 100644 index 000000000..769fc33f4 --- /dev/null +++ b/tex/context/base/prop-mis.tex @@ -0,0 +1,224 @@ +%D \module +%D [ file=prop-mis, +%D version=2004.05.29, % some code moved from private modules +%D title=\CONTEXT\ Property Macros, +%D subtitle=Miscelaneous, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{Context Property Macros / initialization} + +%D This module contains some code that has been in use in some +%D private modules (p-*). These features depend on the fact +%D that pdftex writes the page content as one stream. + +%D EXPERIMENTAL + +\unprotect + +%D Stream based overprint and knockout: + +\defineproperty[\v!overprint][\s!overprint] [\c!method=\v!command] +\defineproperty[\v!knockout] [\s!overprint] [\c!method=\v!command] + +\definepropertyhandler \v!overprint {\dostartoverprint} +\definepropertyhandler \v!knockout {\dostopoverprint } + +\def\startoverprintproperty + {\ifincolor + \propertyhandler\currentproperty + \dooverprintmark\currentproperty + \fi} + +\def\stopoverprintproperty + {\ifincolor + \ifcase\currentpropertylevel\or + \dostopoverprint + \dooverprintmark\empty + \else + \propertyhandler\previousproperty + \dooverprintmark\previousproperty + \fi + \fi} + +\rawnewmark\overprintmark + +\def\dooverprintmark#1% + {\ifinpagebody \else \ifinframed \else + \expanded{\rawsetmark\noexpand\overprintmark{#1}}% + \fi \fi} + +\def\pushoverprintproperty + {\doifsomething{\rawgetbotmark\overprintmark}\dostopoverprint} + +\def\popoverprintproperty + {\doifsomething{\rawgetbotmark\overprintmark}% + {\propertyhandler{\rawgetbotmark\overprintmark}}} + +\def\popsplitoverprintproperty + {\getsplitmarks\overprintmark % hier wel + \doifsomething{\rawgetsplitbotmark\overprintmark}% + {\propertyhandler{\rawgetsplitbotmark\overprintmark}}} + +\appendtoks \pushoverprintproperty \to \everypushproperties +\appendtoks \popoverprintproperty \to \everypopproperties +\appendtoks \popsplitoverprintproperty \to \everypopsplitproperties + +%D Negation. + +\defineproperty [\v!negative] [\s!negative] [\c!method=\v!command] +\defineproperty [\v!positive] [\s!negative] [\c!method=\v!command] + +\definepropertyhandler \v!negative {\dostartnegative} +\definepropertyhandler \v!positive {\dostopnegative } + +\def\startnegativeproperty + {\ifincolor + \propertyhandler\currentproperty + \donegativemark\currentproperty + \fi} + +\def\stopnegativeproperty + {\ifincolor + \ifcase\currentpropertylevel\or + \dostopnegative + \donegativemark\empty + \else + \propertyhandler\previousproperty + \donegativemark\previousproperty + \fi + \fi} + +\rawnewmark\negativemark + +\def\donegativemark#1% + {\ifinpagebody \else \ifinframed \else + \expanded{\rawsetmark\noexpand\negativemark{#1}}% + \fi \fi} + +\def\pushnegativeproperty + {\doifsomething{\rawgetbotmark\negativemark}\dostopnegative} + +\def\popnegativeproperty + {\doifsomething{\rawgetbotmark\overprintmark}% + {\propertyhandler{\rawgetbotmark\negativemark}}} + +\def\popsplitnegativeproperty + {\getsplitmarks\negativemark % hier wel + \doifsomething{\rawgetsplitbotmark\negativemark}% + {\propertyhandler{\rawgetsplitbotmark\negativemark}}} + +\appendtoks \pushnegativeproperty \to \everypushproperties +\appendtoks \popnegativeproperty \to \everypopproperties +\appendtoks \popsplitnegativeproperty \to \everypopsplitproperties + +%D Special font effects. + +\setupproperty + [\s!effect] + [\c!rulethickness=.25pt, + \c!stretch=1] + +\defineproperty [\v!inner] [\s!effect] +\defineproperty [\v!outer] [\s!effect] +\defineproperty [\v!both] [\s!effect] +\defineproperty [\v!normal] [\s!effect] +\defineproperty [\v!hidden] [\s!effect] + +\definepropertyhandler \v!normal {0} +\definepropertyhandler \v!inner {0} +\definepropertyhandler \v!outer {1} +\definepropertyhandler \v!both {2} +\definepropertyhandler \v!hidden {3} + +% \def\handleeffectproperty#1% +% {\expanded{\dostartfonteffect +% {\propertyhandler{#1}}% +% {\propertyparameter{#1}\c!lijndikte}% +% {\propertyparameter{#1}\c!rek}}} + +% \def\starteffectproperty +% {\handleeffectproperty\currentproperty +% \doeffectmark\currentproperty} + +% \def\stopeffectproperty +% {\dostopfonteffect +% \ifcase\currentpropertylevel\or +% \doeffectmark\empty +% \else +% \handleeffectproperty\previousproperty +% \doeffectmark\previousproperty +% \fi} + +% \rawnewmark\effectmark + +% \def\doeffectmark#1% +% {\ifinpagebody \else \ifinframed \else +% \expanded{\rawsetmark\noexpand\effectmark{#1}}% could be number +% \fi \fi} + +% \def\pusheffectproperty +% {\doifsomething{\rawgetbotmark\effectmark}\dostopfonteffect} + +% \def\popeffectproperty +% {\doifsomething{\rawgetbotmark\effectmark}% +% {\handleeffectproperty{\rawgetbotmark\effectmark}}} + +% \def\popspliteffectproperty +% {\getsplitmarks\effectmark +% \doifsomething{\rawgetsplitbotmark\effectmark}% +% {\handleeffectproperty{\rawgetsplitbotmark\effectmark}}} + +% \appendtoks \pusheffectproperty \to \everypushproperties +% \appendtoks \popeffectproperty \to \everypopproperties +% \appendtoks \popspliteffectproperty \to \everypopsplitproperties + +% % + +\def\effectpropertydata#1% + {{\propertyhandler{#1}}% + {\propertyparameter{#1}\c!rulethickness}% + {\propertyparameter{#1}\c!stretch}} + +\def\starteffectproperty + {\expanded{\dostartfonteffect\effectpropertydata\currentproperty}% + \doeffectmark{\effectpropertydata\currentproperty}} + +\def\stopeffectproperty + {\dostopfonteffect + \ifcase\currentpropertylevel\or + \doeffectmark\empty + \else + \expanded{\dostartfonteffect\effectpropertydata\previousproperty}% + \doeffectmark{\effectpropertydata\previousproperty}% + \fi} + +\rawnewmark\effectmark + +\def\doeffectmark#1% + {\ifinpagebody \else \ifinframed \else + \expanded{\rawsetmark\noexpand\effectmark{#1}}% could be number + \fi \fi} + +\def\pusheffectproperty + {\doifsomething{\rawgetbotmark\effectmark}\dostopfonteffect} + +\def\popeffectproperty + {\doifsomething{\rawgetbotmark\effectmark}% + {\expanded{\dostartfonteffect\rawgetbotmark\effectmark}}} + +\def\popspliteffectproperty + {\getsplitmarks\effectmark + \doifsomething{\rawgetsplitbotmark\effectmark}% + {\expanded{\dostartfonteffect\rawgetsplitbotmark\effectmark}}} + +\appendtoks \pusheffectproperty \to \everypushproperties +\appendtoks \popeffectproperty \to \everypopproperties +\appendtoks \popspliteffectproperty \to \everypopsplitproperties + +\protect \endinput diff --git a/tex/context/base/prop-run.tex b/tex/context/base/prop-run.tex index 1f4f12d17..4eb853b42 100644 --- a/tex/context/base/prop-run.tex +++ b/tex/context/base/prop-run.tex @@ -11,18 +11,23 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\unprotect +\unprotect -\doglobal\newif\ifshowcomponents +\doglobal\newif\ifshowcomponents \gdef\showlayoutcomponents {\showcomponentstrue} - + +% By postponing loading of the next two macro's till their usage, we +% don't put a burden on the system when they are not used. + \gdef\startlayoutcomponent#1#2% - {\ifshowcomponents - \doifelsenothing{#2}% - {\defineproperty[#1][layer][\c!titel=#1]}% - {\defineproperty[#1][layer][\c!titel=#2]}% + {\ifshowcomponents + \doifelseproperty{#1} + \donothing + {\doifelsenothing{#2}% + {\defineproperty[#1][\s!layer]}% [\c!title=#1] + {\defineproperty[#1][\s!layer][\c!title=#2]}}% \startproperty[#1]% \fi} @@ -31,4 +36,4 @@ \stopproperty \fi} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/regi-cyr.tex b/tex/context/base/regi-cyr.tex index cc54551f6..1ca020825 100644 --- a/tex/context/base/regi-cyr.tex +++ b/tex/context/base/regi-cyr.tex @@ -13,13 +13,13 @@ %D Here are input regimes for cyrillic encodings: %D -%D \startopsomming -%D \som windows -%D \som two variants of dos -%D \som three variants of koi-8 for *nix: russian, +%D \startitemize +%D \item windows +%D \item two variants of dos +%D \item three variants of koi-8 for *nix: russian, %D ukrainian and mixed -%D \som two variants for the mac -%D \stopopsomming +%D \item two variants for the mac +%D \stopitemize %D %D Other, not so popular regimes, can be found in \type %D {regi-cy2}. diff --git a/tex/context/base/regi-ibm.tex b/tex/context/base/regi-ibm.tex index aebd4951a..1fad9545a 100644 --- a/tex/context/base/regi-ibm.tex +++ b/tex/context/base/regi-ibm.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D This module activates the \kap{IBM PC} high \ASCII\ +%D This module activates the \cap{IBM PC} high \ASCII\ %D characters, such as ‰ and á. \startregime [ibm] diff --git a/tex/context/base/regi-utf.tex b/tex/context/base/regi-utf.tex index 2a441f19d..b529406e1 100644 --- a/tex/context/base/regi-utf.tex +++ b/tex/context/base/regi-utf.tex @@ -42,4 +42,4 @@ \stopregime -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex index 8d567f78b..1eb1baf69 100644 --- a/tex/context/base/s-abr-01.tex +++ b/tex/context/base/s-abr-01.tex @@ -13,16 +13,17 @@ \unprotect -\stelsorterenin[logo][\c!letter=\v!kapitaal] +\setupsorting[logo][\c!style=\v!capital] -\setupcapitals[\c!titel=\v!nee] +\setupcapitals[\c!title=\v!no] \protect \logo [ACROBAT] {Acro\-bat} \logo [AFM] {afm} -\logo [ALEPH] {Aleph} +\logo [ALEPH] {Aleph} % {\mathematics{\aleph}} \logo [ALGOL] {ALGOL} +\logo [ARABTEX] {Arab\TeX} \logo [AMSLATEX] {\AmSLaTeX} \logo [AMSTEX] {\AmSTeX} \logo [AMS] {ams} @@ -50,6 +51,7 @@ \logo [DVIPSONE] {dvipsone} \logo [DVIPDFM] {dvipdfm} \logo [DVIPDFMX] {dvipdfmx} +\logo [DVIPOS] {dvipos} \logo [DVIPS] {dvips} \logo [DVISCR] {dviscr} \logo [DVIWINDO] {dviwindo} @@ -76,6 +78,7 @@ %logo [FGBBS] {fgbbs} \logo [FPTEX] {fp\TeX} \logo [FREEBSD] {FreeBSD} +\logo [FOXET] {foXet} \logo [FTP] {ftp} \logo [GHOSTSCRIPT]{Ghost\-Script} \logo [GHOSTVIEW] {Ghost\-View} @@ -85,6 +88,7 @@ \logo [GUST] {Gust} \logo [GWTEX] {gw\TeX} \logo [HTTP] {http} +\logo [HSB] {hsb} \logo [HTML] {html} \logo [IBM] {ibm} \logo [IMAGEMAGICK]{ImageMagick} @@ -121,6 +125,7 @@ \logo [NTS] {nts} \logo [OMEGA] {Omega} \logo [OPI] {opi} +\logo [OTP] {otp} \logo [PASCAL] {Pascal} \logo [PCTEX] {pc\TeX} \logo [PDFETEX] {pdfe\TeX} @@ -169,6 +174,11 @@ \logo [TEXUTIL] {\TeX util} \logo [TEXWORK] {\TeX work} \logo [TEXFONT] {\TeX font} +\logo [TEXTOOLS] {textools} +\logo [XMLTOOLS] {xmltools} +\logo [PDFTOOLS] {pdftools} +\logo [TEXMFSTART] {texmfstart} +\logo [TEXSYNC] {texsync} \logo [TEX] {\TeX} \logo [TFM] {tfm} \logo [TIFFINFO] {tiffinfo} @@ -200,10 +210,14 @@ \logo [XPDFETEX] {xpdfe\TeX} \logo [XSLT] {xslt} \logo [XSL] {xsl} +\logo [XSLFO] {xsl-fo} +\logo [XYPIC] {XYPIC} % wrong logo \logo [YandY] {y\&y} \def\METAFUN {\MetaFun} +\logo [METAFUN] {\MetaFun} + \def\SystemSpecialA#1{$\langle\it#1\rangle$} \def\SystemSpecialB#1{{\tttf<#1>}} diff --git a/tex/context/base/s-abr-02.tex b/tex/context/base/s-abr-02.tex index 1e99dbe00..e2cdbfb72 100644 --- a/tex/context/base/s-abr-02.tex +++ b/tex/context/base/s-abr-02.tex @@ -15,9 +15,9 @@ \unprotect -\stelsorterenin[logo][\c!letter=\v!smallcaps] +\setupsorting[logo][\c!style=\v!smallcaps] -\setupcapitals[\c!titel=\v!nee] +\setupcapitals[\c!title=\v!no] \protect diff --git a/tex/context/base/s-abr-03.tex b/tex/context/base/s-abr-03.tex index b746383f6..43068b9a5 100644 --- a/tex/context/base/s-abr-03.tex +++ b/tex/context/base/s-abr-03.tex @@ -8,14 +8,14 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \usemodule[abr-01] \unprotect -\stelsorterenin[logo][\c!letter=\v!WOORD] +\setupsorting[logo][\c!style=\v!WORD] \protect diff --git a/tex/context/base/s-chi-00.tex b/tex/context/base/s-chi-00.tex index 30df05757..c62a02d08 100644 --- a/tex/context/base/s-chi-00.tex +++ b/tex/context/base/s-chi-00.tex @@ -9,45 +9,45 @@ %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. -\mainlanguage[cn] +\mainlanguage[cn] -\setupbodyfont[chi] +\setupbodyfont[chi] -\unprotect +\unprotect -\stelsectiein [\v!sectionlevel-1] [\c!kopconversie=\s!chinese] -\stelsectiein [\v!sectionlevel-2] [\c!kopconversie=\s!chinese] -\stelsectiein [\v!sectionlevel-3] [\c!kopconversie=\s!chinese] +\setupsection [\v!sectionlevel-1] [\c!headconversion=\s!chinese] +\setupsection [\v!sectionlevel-2] [\c!headconversion=\s!chinese] +\setupsection [\v!sectionlevel-3] [\c!headconversion=\s!chinese] -\stelsectiein [\v!sectionlevel-2] [\v!bijlage\c!conversie=] +\setupsection [\v!sectionlevel-2] [\v!appendix\c!conversion=] -\stelkopin [\v!hoofdstuk] [\c!afstand=1.25em] -\stelkopin [\v!paragraaf] [\c!afstand=1.25em] -\stelkopin [\v!sub\v!paragraaf] [\c!afstand=1.00em] +\setuphead [\v!chapter] [\c!distance=1.25em] +\setuphead [\v!section] [\c!distance=1.25em] +\setuphead [\v!subsection] [\c!distance=1.00em] -\stellijstin [\v!hoofdstuk] [\c!koplabel=\v!ja,\c!kopconversie=\v!ja,\c!breedte=5em] -\stellijstin [\v!paragraaf] [\c!koplabel=\v!ja,\c!kopconversie=\v!ja,\c!breedte=5em] +\setuplist [\v!chapter] [\c!headlabel=\v!yes,\c!headconversion=\v!yes,\c!width=5em] +\setuplist [\v!section] [\c!headlabel=\v!yes,\c!headconversion=\v!yes,\c!width=5em] -\stelmarkeringin [\v!hoofdstuk\v!nummer] [\c!koplabel=\v!ja,\c!kopconversie=\v!ja] -\stelmarkeringin [\v!paragraaf\v!nummer] [\c!koplabel=\v!ja,\c!kopconversie=\v!ja] +\setupmarking [\v!chapter\v!number] [\c!headlabel=\v!yes,\c!headconversion=\v!yes] +\setupmarking [\v!section\v!number] [\c!headlabel=\v!yes,\c!headconversion=\v!yes] -\setuplabeltext[cn][\v!sub\v!paragraaf={\symbol[S]\kern.25em}] -\setuplabeltext[cn][\v!sub\v!sub\v!paragraaf={\symbol[S]\kern.25em}] -\setuplabeltext[cn][\v!sub\v!sub\v!sub\v!paragraaf={\symbol[S]\kern.25em}] -\setuplabeltext[cn][\v!sub\v!sub\v!sub\v!sub\v!paragraaf={\symbol[S]\kern.25em}] +\setuplabeltext[cn][\v!subsection={\symbol[S]\kern.25em}] +\setuplabeltext[cn][\v!subsubsection={\symbol[S]\kern.25em}] +\setuplabeltext[cn][\v!subsubsubsection={\symbol[S]\kern.25em}] +\setuplabeltext[cn][\v!subsubsubsubsection={\symbol[S]\kern.25em}] -% nog taalonafhankelijk maken -> \e!tabel enz +% nog taalonafhankelijk maken -> \e!tabel enz -\definereferenceformat [intable] [\c!label=\v!tabel] -\definereferenceformat [infigure] [\c!label=\v!figuur] -\definereferenceformat [inchapter] [\c!label=\v!hoofdstuk] -\definereferenceformat [insection] [\c!label=\v!paragraaf] +\definereferenceformat [intable] [\c!label=\v!table] +\definereferenceformat [infigure] [\c!label=\v!figure] +\definereferenceformat [inchapter] [\c!label=\v!chapter] +\definereferenceformat [insection] [\c!label=\v!section] -% important +% important -\setuptyping[\c!tab=\v!nee] +\setuptyping[\c!tab=\v!no] \protect \endinput diff --git a/tex/context/base/s-dtk-01.tex b/tex/context/base/s-dtk-01.tex deleted file mode 100644 index 6f4a80c98..000000000 --- a/tex/context/base/s-dtk-01.tex +++ /dev/null @@ -1,257 +0,0 @@ -%D \module -%D [ file=s-dtk-01, -%D version=1999.08.15, -%D title=\CONTEXT\ Style File, -%D subtitle=\DTK\ basis stijl, -%D author=Hans Hagen \& Taco Hoekwater, -%D date=\currentdate, -%D copyright=PRAGMA] -%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 Preliminary. Still dutch and english intermixed. - -\unprotect - -%D Temp hack. - -\let\doverbatimgoodbreak\donothing - -%D Fonts. - -\definebodyfontenvironment - [8pt] - [\c!interlinie=9pt, - \c!groot=9pt, - \c!klein=7pt] - -\definebodyfontenvironment - [9pt] - [\c!interlinie=11pt, - \c!groot=10pt, - \c!klein=8pt] - -\definebodyfontenvironment - [10pt] - [\c!interlinie=12pt, - \c!groot=12pt, - \c!klein=8pt] - -\definebodyfontenvironment - [12pt] - [\c!interlinie=14pt, - \c!groot=14.4pt, - \c!klein=10pt] - -\definebodyfontenvironment - [14.4pt] - [\c!interlinie=18pt, - \c!groot=14.4pt, - \c!klein=12pt] - -\setupbodyfont - [10pt,cmx,ams] - -%D Color. - -\setupcolors - [\c!conversie=\v!altijd] - -%D Default language. - -\mainlanguage[en] \language[en] - -%D Paper size and layout. The Dante style depends on the -%D driver to sort out the margins. Therefore we are not -%D really typesetting in A5, but on something larger. - -\definepapersize - [DanteA5] - [breedte=486.54pt] - -\setuppapersize - [DanteA5][A4] - -\setuplayout % w=342pt h=484pt - [\c!rugwit=1in, - \c!kopwit=1in, - \c!plaats=\v!enkelzijdig, - \c!breedte=342pt, - \c!hoogte=548pt, - \c!hoofd=17pt, - \c!hoofdafstand=17pt, - \c!voetafstand=17pt, - \c!voet=17pt] - -%D Headers and footers. - -\setupheader [\c!voor=\vfill,\c!na=] -\setupfooter [\c!voor=\vfill,\c!na=] - -%D Numbering. - -\setuppagenumbering - [\c!plaats=, - \c!variant=\v!dubbelzijdig] - -%D Spacing. - -\setupwhitespace [\v!halveregel] -\setupblank [\v!halveregel] - -%D Itemize. - -\stelopsommingin [\v!elk] [\c!afstand=0pt,\c!marge=.5em] -\stelopsommingin [1] [\c!breedte=1.0em,\c!symbool=circle] -\stelopsommingin [2] [\c!breedte=0.9em,\c!symbool=triangle] -\stelopsommingin [3] [\c!breedte=0.8em,\c!symbool=diamond] -\stelopsommingin [4] [\c!breedte=0.7em,\c!symbool=dash] - -\stelopsommingin [1] [\v!opelkaar] - -%D Verbatim. - -\setuptyping [\c!optie=,\c!blanko=halveregel] - -%D Footnotes. - -\def\VoetNootLijn% - {\hrule width 5pc height .4pt} - -\setupfootnotes - [\c!korps=8pt, - \c!lijn=\VoetNootLijn, - \c!voor=\vskip24pt, - \c!nummercommando=] - -\setupfootnotedefinition - [\c!plaats=\v!aansluitend, - \c!breedte=\v!passend, - \c!kopletter=\v!normaal, - \c!afstand=.5em] - -% Abbreviations and logos. - -\usemodule[abr-03] - - -%D Some real macros: - -\def\startAbstract% - {\dostartbuffer[abstract][startAbstract][stopAbstract]} - -%D And some dummies (for \MAPS\ style compatibility): - -\def\startKeywords#1\stopKeywords - {} - -\def\Keywords#1% - {} - -%D We will pick up some user settings. - -\def\DTKTypering[#1]% - {\getparameters - [DTK] - [Jaar=1998, - Volume=19, - Nummer=3, - Pagina=99, - Titel=Publish or Perish, - Subtitel=, - Auteur=D.T.K. Auteur, - Adres=PRAGMA Advanced Document Engineering \\ - Ridderstraat 27 \\ 8061GH Hasselt NL, - Email=pragma@wxs.nl, - #1]} - -\DTKTypering[] - -%D Some of those are shown in headers and footers. - -\def\DTKFooter% - {Die \TeX nische Kom\"odie \DTKVolume/\DTKJaar - \space---\space - Proceedings of the \DTKJaar\ Euro\TeX\ Meeting} - -\setupheader[\c!linkerletter=\ss\sl,\c!rechterletter=\ss] -\setupfooter[\c!letter={\switchtobodyfont[9pt]\ss\sl}] - -\setupheadertexts [\DTKTitel] [\pagenumber] -\setupfootertexts [\DTKFooter] [] - -%D It all starts here: - -\def\dostartBijdrage[#1]% - {\pagina - \DTKTypering[#1] - \setupheader[\c!status=\v!leeg] - \stelpaginanummerin[\c!nummer=\DTKPagina] - \bgroup - \setupwhitespace[\v!geen] - \bgroup - \switchtobodyfont[14.4pt,ss] - \setupalign[\v!rechts] - \let\\=\par - \DTKTitel\par - \doifsomething{\DTKSubtitel} - {\bgroup - \vskip3pt - \switchtobodyfont[12pt,ss] - \DTKSubtitel\par - \egroup} - \egroup - \vskip12pt - \bgroup - \switchtobodyfont[12pt,ss] - \def\\{\unskip\space\ignorespaces} - \DTKAuteur - \par - \egroup - \vskip12pt - \bgroup - \switchtobodyfont[9pt] - \setupnarrower[\c!voor=,\c!na=] - \startsmaller[.05\hsize] - \setupwhitespace[\v!halveregel] - \haalbuffer[abstract] - \stopsmaller - \egroup - \vskip20pt - \egroup} - -\def\startBijdrage - {\starttekst - \dosingleempty\dostartBijdrage} - -\def\stopBijdrage - {\stoptekst} - -%D Sectioning. - -\stelkopin - [\v!paragraaf] - [\c!letter={\ss\bfa}, - \c!uitlijnen=\v!rechts, - \c!voor={\blanko[\v!regel,\v!halveregel]}, - \c!na={\blanko[\v!halveregel]}] - -\stelkopin - [\v!sub\v!paragraaf] - [\c!letter=\ss, - \c!uitlijnen=\v!rechts, - \c!voor={\blanko[\v!halveregel]}, - \c!na={\blanko[\v!halveregel]}] - -\stelkopin - [\v!sub\v!sub\v!paragraaf] - [\c!letter=\ss, - \c!variant=\v!tekst, - \c!voor=, - \c!na=] - -%D Done. - -\protect \endinput diff --git a/tex/context/base/s-faq-00.tex b/tex/context/base/s-faq-00.tex index db03f666f..11859936c 100644 --- a/tex/context/base/s-faq-00.tex +++ b/tex/context/base/s-faq-00.tex @@ -54,7 +54,7 @@ \def\IndexOfFAQ {} \def\FrequentlyAskedQuestion#1#2% - {\pagina + {\page \doglobal\increment\CurrentNOfFAQ \pagereference[faq:\CurrentNOfFAQ] \gdef\IndexOfFAQ{#1} diff --git a/tex/context/base/s-grk-00.tex b/tex/context/base/s-grk-00.tex new file mode 100644 index 000000000..4c0c88c0e --- /dev/null +++ b/tex/context/base/s-grk-00.tex @@ -0,0 +1,77 @@ +%D \module +%D [ file=s-grk-00, +%D version=2004.08.23, +%D title=\CONTEXT\ Style File, +%D subtitle=CB Greek Support, +%D author=Hans Hagen, +%D date=\currentdate, +%D suggestions=Giuseppe Bilotta, +%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. + +\usetypescriptfile[type-cbg] + +\usetypescript [all] [cbgreek] + +\startsetups [cbgreek] + + \catcode`~=\other + \catcode`|=\other + + \language[greek] + \switchtobodyfont[cbgreek] + +\stopsetups + +\definestartstop + [greek] + [commands=\directsetup{cbgreek}] + +\doifnotmode{demo}{\endinput} + +% The following sample file was submitted to the \CONTEXT\ +% mailing list by Giuseppe Bilotta, along with the right +% typescripts. + +% already loaded: \usemodule[greek] + +\mainlanguage[english] + +\starttext + +We can easily use plain English for normal text, and then switch +to greek when we want; as a first try we type the lower and +upper case 26 letters of the latin alphabet and see how they come +out in greek: + +\startgreek +a b c d e f g h i j k l m n o p q r s t u v w x y z \par +A B C D E F G H I J K L M N O P Q R S T U V W X Y Z +\stopgreek + +As it can be observed, some uppercase letters have strange +outcomes; also, j gives \greek{j} and c gives the +end-of-word sigma \greek{c}; interestingly, s gives either the +normal sigma or the end-of-word one, depending on whether it's at +the end of the word or not: \greek{satrapws}. + +Of course we can use the various diacritical signs: accents +(\greek{`a, 'a, ~a}), breathings (\greek{w, a"}) and +subscribed iotas (\greek{a|, h|, w|}) (these last are pretty ugly in my +opinion); observe how they automatically get the correct position +with uppercase letters: (\greek{`A, 'A, ~A, A, A|}). + +Can the thing be used for serious work? + +\startgreek +>>'Andra moi >'ennepe, Mo~usa, pol'utropon, >'os m'ala poll`a\hfill\break +pl'agqjh, >epe`i Tro'ihs 'eperse;\hfill\break +poll~wn d" >anjr'wpwn >'iden >'astea ka`i n'oon >'egnw,\hfill\break +poll`a d" <'o g" >en p'ontw| p'ajen >'algea <`on kat`a jum'on,\hfill\break +>>arn'umenos <'hn te yuq`hn ka`i n'oston \NOfTextLines\relax \doglobal\increment\NOfTextLines @@ -303,15 +303,15 @@ \else \index{#2{##1}}% \fi - #2{\doboundtext{##1}{\linkermargebreedte}{..}}}% + #2{\doboundtext{##1}{\leftmarginwidth}{..}}}% \doglobal\increment\NOfMarginLines \endgraf}% \processcommalist[#1]\docommando} \def\margeaanduidingen#1[#2]% {\def\domargeaanduidingen##1##2% - {\margetitel[#2]% - {\switchtobodyfont[\v!klein]% + {\margintitle[#2]% + {\switchtobodyfont[\v!small]% \doglobal\newcounter\NOfMarginLines \dodomargeaanduidingen[##1]#1% \scratchcounter=\NOfMarginLines @@ -325,7 +325,7 @@ \def\complexmacros{\margeaanduidingen\tex } \def\complexextras{\margeaanduidingen\relax} -\def\complexelements% +\def\complexelements {\margeaanduidingen\someelement} \def\someelement#1{\type{<#1>}} @@ -340,7 +340,7 @@ {\bgroup \processXMLbuffer \typebuffer - \setupcolors[\c!status=\v!stop] + \setupcolors[\c!state=\v!stop] \showXSDcomponent[#1][#2] \egroup} @@ -350,65 +350,63 @@ % weg ermee -\definieeralineas [interface] [\c!n=2] -\stelalineasin [interface] [1] [\c!breedte=4cm] +\defineparagraphs [interface] [\c!n=2] +\setupparagraphs [interface] [1] [\c!width=4cm] -\def\startvoorbeeld{\par\startsmaller} -\def\stopvoorbeeld {\stopsmaller} +\def\startvoorbeeld{\par\startnarrower} +\def\stopvoorbeeld {\stopnarrower} -\gdef\VisualizeLastSpace% - {\ifdim\lastskip>0pt\unskip\tttf\char32\fi} -\gdef\ShowHeadText#1% - {\tttf#1\VL\headtext{#1}\VisualizeLastSpace}% -\gdef\ShowLabelText#1% - {\tttf#1\VL\labeltext{#1}\VisualizeLastSpace} +\gdef\VisualizeLastSpace{\ifdim\lastskip>0pt\unskip\tttf\char32\fi} + +\gdef\ShowHeadText #1{\tttf#1\VL\headtext {#1}\VisualizeLastSpace} +\gdef\ShowLabelText#1{\tttf#1\VL\labeltext{#1}\VisualizeLastSpace} \startbuffer[lang-a] -\starttabel[|l|l|] +\starttable[|l|l|] \HL \VL \bf head key \VL \bf current value \VL\SR \HL - \VL \ShowHeadText \v!afkortingen \VL\FR - \VL \ShowHeadText \v!eenheden \VL\MR - \VL \ShowHeadText \v!figuren \VL\MR - \VL \ShowHeadText \v!grafieken \VL\MR + \VL \ShowHeadText \v!abbreviations \VL\FR + \VL \ShowHeadText \v!units \VL\MR + \VL \ShowHeadText \v!figures \VL\MR + \VL \ShowHeadText \v!graphics \VL\MR \VL \ShowHeadText \v!index \VL\MR - \VL \ShowHeadText \v!inhoud \VL\MR - \VL \ShowHeadText \v!intermezzos \VL\MR + \VL \ShowHeadText \v!content \VL\MR + \VL \ShowHeadText \v!intermezzi \VL\MR \VL \ShowHeadText \v!logos \VL\MR - \VL \ShowHeadText \v!tabellen \VL\LR + \VL \ShowHeadText \v!tables \VL\LR \HL -\stoptabel +\stoptable \stopbuffer \startbuffer[lang-b] -\starttabel[|l|l|] +\starttable[|l|l|] \HL - \VL \bf label key \VL \bf current value \VL\SR + \VL \bf label key \VL \bf current value \VL\SR \HL - \VL \ShowLabelText \v!tabel \VL\FR - \VL \ShowLabelText \v!figuur \VL\MR - \VL \ShowLabelText \v!intermezzo \VL\MR - \VL \ShowLabelText \v!grafiek \VL\MR - \VL \ShowLabelText \v!hoofdstuk \VL\MR - \VL \ShowLabelText \v!paragraaf \VL\MR - \VL \ShowLabelText {\v!sub\v!paragraaf} \VL\MR - \VL \ShowLabelText {\v!sub\v!sub\v!paragraaf} \VL\MR - \VL \ShowLabelText \v!bijlage \VL\MR - \VL \ShowLabelText \v!deel \VL\MR - \VL \ShowLabelText \v!regel \VL\MR - \VL \ShowLabelText \v!regels \VL\LR + \VL \ShowLabelText \v!table \VL\FR + \VL \ShowLabelText \v!figure \VL\MR + \VL \ShowLabelText \v!intermezzo \VL\MR + \VL \ShowLabelText \v!graphic \VL\MR + \VL \ShowLabelText \v!chapter \VL\MR + \VL \ShowLabelText \v!section \VL\MR + \VL \ShowLabelText \subsection \VL\MR + \VL \ShowLabelText \subsubsection \VL\MR + \VL \ShowLabelText \v!appendix \VL\MR + \VL \ShowLabelText \v!part \VL\MR + \VL \ShowLabelText \v!line \VL\MR + \VL \ShowLabelText \v!lines \VL\LR \HL -\stoptabel +\stoptable \stopbuffer \startbuffer[lang-c] -\starttabel[|l|l|] +\starttable[|l|l|] \HL \VL \bf label key \VL \bf current value \VL\SR \HL \VL \ShowLabelText \v!january \VL\FR - \VL \ShowLabelText \v!february \VL\MR + \VL \ShowLabelText \v!february \VL\MR \VL \ShowLabelText \v!march \VL\MR \VL \ShowLabelText \v!april \VL\MR \VL \ShowLabelText \v!may \VL\MR @@ -420,11 +418,11 @@ \VL \ShowLabelText \v!november \VL\MR \VL \ShowLabelText \v!december \VL\LR \HL -\stoptabel +\stoptable \stopbuffer \startbuffer[lang-d] -\starttabel[|l|l|] +\starttable[|l|l|] \HL \VL \bf label key \VL \bf current value \VL\SR \HL @@ -434,9 +432,9 @@ \VL \ShowLabelText \v!wednesday \VL\MR \VL \ShowLabelText \v!thursday \VL\MR \VL \ShowLabelText \v!friday \VL\MR - \VL \ShowLabelText \v!saturday \VL\MR + \VL \ShowLabelText \v!saturday \VL\LR \HL -\stoptabel +\stoptable \stopbuffer \gdef\ShowTextsValues [#1] [#2] @@ -450,9 +448,9 @@ \vskip2em \halign {\hss##\hss&##\hskip1em&\hss##\hss\cr - $\vcenter{\haalbuffer[lang-a]}$&&$\vcenter{\haalbuffer[lang-b]}$\cr + $\vcenter{\getbuffer[lang-a]}$&&$\vcenter{\getbuffer[lang-b]}$\cr \noalign{\vskip1em} - $\vcenter{\haalbuffer[lang-c]}$&&$\vcenter{\haalbuffer[lang-d]}$\cr}% + $\vcenter{\getbuffer[lang-c]}$&&$\vcenter{\getbuffer[lang-d]}$\cr}% \egroup} \gdef\ShowLanguageValues [#1] [#2] #3 #4 @@ -462,14 +460,14 @@ \bgroup \language[#1]% \let\normalbar=| - \starttabel[||||] + \starttable[||||] \HL \VL \THREE{\bf subsentence symbol and quotes} \VL\SR \HL - \VL \citaat{#3 #4} \VL \citeer{#2} \VL \let|=\normalbar |<||<|#3|>|#4|>| \VL\SR - \VL \citaat{#3 #4} \VL \citeer{#2} \VL |<||<|#3|>|#4|>| \VL\SR + \VL \quotation{#3 #4} \VL \quote{#2} \VL \let|=\normalbar |<||<|#3|>|#4|>| \VL\SR + \VL \quotation{#3 #4} \VL \quote{#2} \VL |<||<|#3|>|#4|>| \VL\SR \HL - \stoptabel + \stoptable \egroup \hss}} @@ -479,10 +477,10 @@ \vskip2em \ShowLanguageValues [#1] [#2] #3 #4 } \protect - \pagina} + \page} \gdef\ShowAllLanguageValues% - {\pagina + {\page \unprotect \doShowAllLanguageValues} @@ -495,13 +493,13 @@ \unprotect -\def\showsetup% +\def\showsetup {\doglobal\newcounter\CurrentArgument \setup} \setupframedtexts [setuptext] - [\c!achtergrond=\v!raster, - \c!kader=\v!uit] + [\c!background=\v!screen, + \c!frame=\v!off] \protect \endinput diff --git a/tex/context/base/s-mod-01.tex b/tex/context/base/s-mod-01.tex index 5bb42c988..0e834049f 100644 --- a/tex/context/base/s-mod-01.tex +++ b/tex/context/base/s-mod-01.tex @@ -25,49 +25,49 @@ [en] \setupwhitespace - [\v!groot] + [\v!big] \setuptolerance - [\v!soepel] + [\v!tolerant] \emergencystretch=5em \setuplayout - [\c!rugwit=3.5cm, - \c!linkermarge=1.75cm, - \c!rechtermarge=0cm, - \c!margeafstand=.5cm, - \c!linkerrandafstand=.25cm, - \c!rechterrandafstand=.5cm, - \c!rand=1.5cm, - \c!breedte=15.55333cm, % 13.998cm at 9pt => 15.55333 at 10pt - \c!kopwit=2cm, - \c!hoofd=1.25cm, - \c!voet=1.25cm, - \c!hoogte=25cm, - \c!letter=\ss] - -\stelsetupin - [\c!verwijzing=1] + [\c!backspace=3.5cm, + \c!leftmargin=1.75cm, + \c!rightmargin=0cm, + \c!margindistance=.5cm, + \c!leftedgedistance=.25cm, + \c!rightedgedistance=.5cm, + \c!edge=1.5cm, + \c!width=15.55333cm, % 13.998cm at 9pt => 15.55333 at 10pt + \c!topspace=2cm, + \c!header=1.25cm, + \c!footer=1.25cm, + \c!height=25cm, + \c!style=\ss] + +\setupsetup + [\c!reference=1] \startnotmode[single] \setuppagenumbering - [\c!variant={\v!dubbelzijdig,\v!enkelzijdig}] + [\c!alternative={\v!doublesided,\v!singlesided}] \stopnotmode -\stelnummeringin - [\c!plaats=] +\setuppagenumbering + [\c!location=] \setupfootertexts - [\v!rand] - [][\v!paginanummer] + [\v!edge] + [][\v!pagenumber] \startmode[single] \setupfootertexts - [\v!marge] + [\v!margin] [\tt\Modulefile][] \stopmode @@ -75,65 +75,65 @@ \startnotmode[single] \setupfootertexts - [\v!marge] + [\v!margin] [\tt\Modulefile][] [\tt\Modulefile][] \stopnotmode \setupfootertexts - [\v!tekst] + [\v!text] [\CONTEXT] [\Moduletitle] \setupheadertexts - [\v!tekst] + [\v!text] [] [\Modulesubtitle] -\stelinmargein - [\c!plaats=\v!links] +\setupinmargin + [\c!location=\v!left] -\stelkoppenin - [\c!variant=\v!inmarge] +\setupheads + [\c!alternative=\v!inmargin] -\stelkopin - [\v!hoofdstuk] - [\c!letter=\ssc, - \c!pagina=\v!rechts, - \c!hoofd=\v!leeg] +\setuphead + [\v!chapter] + [\c!style=\ssc, + \c!page=\v!right, + \c!header=\v!empty] -\stelkopin - [\v!paragraaf] - [\c!letter=\ssb, - \c!pagina=\v!rechts] +\setuphead + [\v!section] + [\c!style=\ssb, + \c!page=\v!right] -\stellijstin - [\v!hoofdstuk] - [\c!letter=\v!vet, - \c!na=\blanko] +\setuplist + [\v!chapter] + [\c!style=\v!bold, + \c!after=\blank] -\stelsamengesteldelijstin - [\v!inhoud] - [\c!breedte=3em, - \c!titeluitlijnen=\v!ja] +\setupcombinedlist + [\v!content] + [\c!width=3em, + \c!aligntitle=\v!yes] -\stelregisterin +\setupregister [\v!index] - [\c!balanceren=\v!ja, - \c!aanduiding=\v!nee] + [\c!balance=\v!yes, + \c!indicator=\v!no] \startnotmode[nocolor] \setupcolors - [\c!status=\v!start] + [\c!state=\v!start] \stopnotmode \startnotmode[color] \setupcolors - [\c!conversie=\v!altijd] + [\c!conversion=\v!always] \setuptyping [\c!palet=graypretty] @@ -141,8 +141,8 @@ \stopnotmode \setupinteraction - [\c!status=\v!start, - \c!kleur=, - \c!letter=] + [\c!state=\v!start, + \c!color=, + \c!style=] \protect \endinput diff --git a/tex/context/base/s-mod-02.tex b/tex/context/base/s-mod-02.tex index 6eabe7329..09fbca288 100644 --- a/tex/context/base/s-mod-02.tex +++ b/tex/context/base/s-mod-02.tex @@ -20,24 +20,24 @@ % todo: internationalize + setups -\stelkopin[paragraaf][expansie=commando] +\setuphead[paragraaf][expansie=commando] \def\complexmodule[#1]% redefined - {\startglobaal % i.v.m. \bgroup in \startdocumentation + {\startglobal % i.v.m. \bgroup in \startdocumentation \getparameters[Module][#1] - \stopglobaal % i.v.m. \bgroup in \startdocumentation + \stopglobal % i.v.m. \bgroup in \startdocumentation \paragraaf{\Modulesubtitle} \SchrijfLijstenWeg} \def\stopmodule% redefined - {\pagina - \bepaalregisterkenmerken + {\page + \determineregistercharacteristics [index] [criterium=paragraaf] \ifutilitydone - \paginareferentie + \pagereference [index] - \plaatsregister + \placeregister [index] [balanceren=ja, aanduiding=nee, @@ -50,15 +50,15 @@ \newwrite\BatchFile \openout\BatchFile=\jobname.bat -\def\WriteBatchFile% +\def\WriteBatchFile {\doglobal\increment\ModuleNumber \immediate\write\BatchFile{call modu-run \FileName\space \ModuleNumber}} \newif\ifProcessingPublic -\def\SchrijfLijstenWeg% - {\schrijfnaarlijst[FileNames] {}{\FileName} - \schrijfnaarlijst[GroupItems]{}{\GroupItem}} +\def\SchrijfLijstenWeg + {\writetolist[FileNames] {}{\FileName} + \writetolist[GroupItems]{}{\GroupItem}} \def\moduletitel{} @@ -87,11 +87,11 @@ \WriteBatchFile} \def\verwerkmodule#1#2% - {\pagina + {\page \bgroup \def\FileName{#1} - \stelrefererenin[prefix=#1] - \gebruikexterndocument[PaperVersion][#1][] + \setupreferencing[prefix=#1] + \useexternaldocument[PaperVersion][#1][] \aftersplitstring#1\at-\to\GroupItem \StelLijstenSamen \ifcase#2 @@ -103,16 +103,16 @@ \or \TypeThreeModule{#1} \fi - \pagina - \stelrefererenin[prefix=] + \page + \setupreferencing[prefix=] \egroup} \def\ModuleGroep#1#2% - {\pagina + {\page \let\Modulefile=\empty - \stelrefererenin[prefix=#1] + \setupreferencing[prefix=#1] \def\FileGroup{#1} - \schrijfnaarlijst[FileGroups]{}{\FileGroup} + \writetolist[FileGroups]{}{\FileGroup} \hoofdstuk[inhoud]{#2} \MaakLijstMetItems \MaakLijstMetNames @@ -121,13 +121,13 @@ % Layout -\stelkorpsin +\setupbodyfont [9pt,ams] -\taal +\mainlanguage [en] -\stelpapierformaatin +\setuppapersize [S6][S6] \setuplayout @@ -147,139 +147,139 @@ hoogte=410pt, letter=\ss] -\steltypenin +\setuptyping [palet=colorpretty] -\stelsetupin +\setupsetup [verwijzing=3] -\definieerkleur [AchtergrondKleur] [s=.6] -\definieerkleur [ButtonKleur] [r=.2,g=.2,b=.6] -\definieerkleur [TekstKleur] [r=.6,g=.2,b=.2] +\definecolor [AchtergrondKleur] [s=.6] +\definecolor [ButtonKleur] [r=.2,g=.2,b=.6] +\definecolor [TekstKleur] [r=.6,g=.2,b=.2] -\definieerkleur [colorprettyone] [r=.6,g=.0,b=.0] % red -\definieerkleur [colorprettytwo] [r=.0,g=.6,b=.0] % green -\definieerkleur [colorprettythree] [r=.0,g=.0,b=.6] % blue -\definieerkleur [colorprettyfour] [r=.6,g=.6,b=.0] % yellow +\definecolor [colorprettyone] [r=.6,g=.0,b=.0] % red +\definecolor [colorprettytwo] [r=.0,g=.6,b=.0] % green +\definecolor [colorprettythree] [r=.0,g=.0,b=.6] % blue +\definecolor [colorprettyfour] [r=.6,g=.6,b=.0] % yellow -\stelinteractiein +\setupinteraction [status=start, pagina=ja, contrastkleur=, menu=aan, kleur=] -\stelachtergrondenin +\setupbackgrounds [pagina] [achtergrond=kleur, achtergrondkleur=AchtergrondKleur, offset=2.5pt] % this offset influences the menus! -\stelachtergrondenin +\setupbackgrounds [tekst,voet] [tekst,linkermarge] [achtergrond=kleur, achtergrondkleur=wit] -\stelsubpaginanummerin +\setupsubpagenumber [wijze=perparagraaf, status=start] -\stelinteractiebalkin +\setupinteractionbar [kader=uit, offset=0pt, hoogte=passend] -\stelwitruimtein +\setupwhitespace [groot] -\steltypenin +\setuptyping [typen] [optie=kleur] -\steltypenin +\setuptyping [definition] [optie=kleur] -\steltypenin +\setuptyping [file] [optie=kleur] -\stelpaginanummeringin +\setuppagenumbering [variant=enkelzijdig, wijze=perparagraaf, status=geen] -\stelinmargein +\setupinmargin [plaats=links] -\stelkoppenin +\setupheads [variant=inmarge] -\stelkopin +\setuphead [hoofdstuk] [letter=\ssc, pagina=rechts] -\stelkopin +\setuphead [paragraaf] [letter=\ssb, pagina=rechts] -\stellijstin +\setuplist [hoofdstuk] [letter=vet, - na=\blanko] + na=\blank] -\stelinhoudin +\setupcontent [breedte=2em] -\stelindexin +\setupindex [balanceren=ja, aanduiding=nee] -\stelkleurenin +\setupcolors [status=start] \def\TitelBlad#1% - {\startstandaardopmaak + {\startstandardmakeup \definefont[GrootFont] [SansBold at 72pt] \definefont[MiddelFont][Sans at 32pt] \definefont[KleinFont] [Sans at 24pt] - \startkleur[AchtergrondKleur] + \startcolor[AchtergrondKleur] \vskip12pt - \regelmidden{\GrootFont\setstrut\strut Con\TeX t} + \midaligned{\GrootFont\setstrut\strut Con\TeX t} \vskip24pt - \regelmidden{\MiddelFont\setstrut\strut #1} + \midaligned{\MiddelFont\setstrut\strut #1} \vskip24pt - \regelmidden{\KleinFont\setstrut\strut Hans Hagen} + \midaligned{\KleinFont\setstrut\strut Hans Hagen} \vfilll - \regelmidden{\KleinFont\setstrut\strut PRAGMA ADE} + \midaligned{\KleinFont\setstrut\strut PRAGMA ADE} \vskip24pt - \regelmidden{\KleinFont\setstrut\strut www.pragma-ade.nl --- \currentdate} + \midaligned{\KleinFont\setstrut\strut www.pragma-ade.nl --- \currentdate} \vskip12pt - \stopkleur - \stopstandaardopmaak} + \stopcolor + \stopstandardmakeup} \def\ColofonBlad% {\startmode[atpragma] - \pagina + \page \bgroup - \def\PragmaHoogte {\zethoogte} - \def\PragmaBreedte{\tekstbreedte} - \def\PragmaKopwit {\kopwit} + \def\PragmaHoogte {\makeupheight} + \def\PragmaBreedte{\textwidth} + \def\PragmaKopwit {\topspace} \def\PragmaRugwit {\rugwit} \def\PragmaMarge {0pt} \PragmaLijnentrue \PlaatsPragmaLogo[ADE] \vfill - \startsmaller[3*midden] + \startnarrower[3*midden] This is the official documentation of \CONTEXT\ version - \kenmerkdatum, a \TEX\ macropackage developed by J.~Hagen + \referraldate, a \TEX\ macropackage developed by J.~Hagen \& A.F.~Otten, who both hold the copyrights. - \stopsmaller + \stopnarrower \vfill - \pagina + \page \egroup \stopmode} @@ -287,23 +287,23 @@ \newbox\LijstMetGroups \newbox\LijstMetNames -\definieerlijst[FileNames] \def\FileName {} -\definieerlijst[FileGroups] \def\FileGroup {} -\definieerlijst[GroupItems] \def\GroupItem {} +\definelist[FileNames] \def\FileName {} +\definelist[FileGroups] \def\FileGroup {} +\definelist[GroupItems] \def\GroupItem {} -\stellijstin +\setuplist [FileNames,FileGroups,FileGroups] [expansie=ja, paginanummer=nee, letter=\ss\bf] -\stellijstin +\setuplist [FileNames] [commando=\FileNameEntry, na=\endgraf, variant=geen] -\stellijstin +\setuplist [FileGroups] [commando=\FileGroupEntry, na=\hss, @@ -315,33 +315,33 @@ \def\FileGroupEntry#1#2#3% {\strut#2\endgraf} -\def\MaakLijstMetItems% +\def\MaakLijstMetItems {\setbox\LijstMetItems=\vbox {\ss\bf - \plaatslijst[GroupItems][kleur=ButtonKleur,contrastkleur=wit,criterium=hoofdstuk]}} + \placelist[GroupItems][kleur=ButtonKleur,contrastkleur=wit,criterium=hoofdstuk]}} -\def\MaakLijstMetNames% +\def\MaakLijstMetNames {\setbox\LijstMetNames=\vbox - {\hsize\rechterrandbreedte + {\hsize\rightedgewidth \ss\bf\stelinterliniein \startsimplecolumns[afstand=10pt] - \plaatslijst[FileNames][kleur=ButtonKleur,contrastkleur=wit,criterium=hoofdstuk] + \placelist[FileNames][kleur=ButtonKleur,contrastkleur=wit,criterium=hoofdstuk] \stopsimplecolumns}} -\def\MaakLijstMetGroups% - {\setbox\LijstMetGroups=\hbox to \tekstbreedte +\def\MaakLijstMetGroups + {\setbox\LijstMetGroups=\hbox to \textwidth {\ss\bf - \stelinteractiein[kleur=ButtonKleur]% - \plaatslijst[FileGroups][kleur=ButtonKleur,contrastkleur=wit,criterium=alles]\unskip\unskip}} + \setupinteraction[kleur=ButtonKleur]% + \placelist[FileGroups][kleur=ButtonKleur,contrastkleur=wit,criterium=alles]\unskip\unskip}} \setbox\LijstMetGroups=\hbox{} -%\stelvoettekstenin +%\setupfootertexts % [rand] % [] % [{\interactiebalk[variant=g]}] -\stelinteractiemenuin +\setupinteractionmenu [rechts,onder] [status=start, kader=uit, @@ -354,8 +354,8 @@ achtergrond=kleur, achtergrondkleur=ButtonKleur] -\startinteractiemenu[rechts] - \boxofsize \vbox \teksthoogte \voetafstand \voethoogte 5pt +\startinteractionmenu[rechts] + \boxofsize \vbox \textheight \voetafstand \voethoogte 5pt \bgroup \copy\LijstMetNames \vfill @@ -368,27 +368,27 @@ \but [VerlaatViewer] close document \\ \unskip \egroup -\stopinteractiemenu +\stopinteractionmenu -\startinteractiemenu[onder] +\startinteractionmenu[onder] \unhcopy\LijstMetGroups -\stopinteractiemenu - -\def\plaatsmoduleregister% - {\startuitleidingen - \stelsubpaginanummerin[reset] - \titel[-:index]{Register} - \plaatsindex - \stopuitleidingen} - -\def\plaatsmoduleinhoud% - {\startinleidingen - \titel[-:inhoud]{Contents} - \stelinteractiebalkin[status=stop] - \plaatsinhoud[criterium=tekst,niveau=hoofdstuk] - \stopinleidingen} - -\stelinhoudin +\stopinteractionmenu + +\def\plaatsmoduleregister + {\startbackmatter + \setupsubpagenumber[reset] + \title[-:index]{Register} + \placeregister[index] + \stopbackmatter} + +\def\plaatsmoduleinhoud + {\startfrontmatter + \title[-:inhoud]{Contents} + \setupinteractionbar[status=stop] + \placecontent[criterium=tekst,niveau=hoofdstuk] + \stopfrontmatter} + +\setupcontent [paginanummer=nee, niveau=hoofdstuk, interactie=alles, @@ -396,19 +396,19 @@ voor=, na=] -\stelvoettekstenin +\setupfootertexts [marge] [\tt\Modulefile] [] -\stelvoettekstenin +\setupfootertexts [tekst] [hoofdstuk][paragraaf] -\stelindexin +\setupindex [symbool=1] -\steltolerantiein +\setuptolerance [zeersoepel] -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/s-pre-00.tex b/tex/context/base/s-pre-00.tex index 3866514b8..8e3eefc23 100644 --- a/tex/context/base/s-pre-00.tex +++ b/tex/context/base/s-pre-00.tex @@ -34,10 +34,10 @@ \setupframedtexts [presentationshield] - [\c!achtergrond=\v!kleur, - \c!achtergrondkleur=StepColor, + [\c!background=\v!color, + \c!backgroundcolor=StepColor, \c!offset=\v!overlay, - \c!kader=\v!uit] + \c!frame=\v!off] \definecolor[StepColor][white] @@ -45,7 +45,7 @@ {\let\enablepresentationstep\relax \useJSpreamblenow{presentation}% \setuptexttexts - [\vbox to \teksthoogte + [\vbox to \textheight {\dopresentationstep1\box\presentationstack\vfill}]} \def\presentationstep% @@ -66,7 +66,7 @@ \global\presentationheight=\pagetotal \forgetall \offinterlineskip - \mindermeldingen + \dontcomplain \box\presentationstack \doglobal\increment\presentationcounter \scratchcounter=\realpageno \multiply\scratchcounter by 100 @@ -74,15 +74,15 @@ \edef\presentationtag{presentation:\the\scratchcounter} \setupfield [presentation] - [\c!breedte=\v!passend,\c!hoogte=\v!passend,\c!offset=\v!overlay, - \c!strut=\v!nee,\c!kader=\v!uit,\c!optie=\v!alleenleesbaar] + [\c!width=\v!fit,\c!height=\v!fit,\c!offset=\v!overlay, + \c!strut=\v!no,\c!frame=\v!off,\c!option=\v!readonly] \definesymbol [\presentationtag] [\presentationshade] \def\presentationshade% {\presentationshield - [\c!breedte=\tekstbreedte,\c!hoogte=\presentationstepheight]{}} - \definefield[\presentationtag][check][presentation][\presentationtag,\v!geen][\presentationtag] + [\c!width=\textwidth,\c!height=\presentationstepheight]{}} + \definefield[\presentationtag][check][presentation][\presentationtag,\v!none][\presentationtag] \fitfield[\presentationtag]}} \startJSpreamble {presentation} used later @@ -119,7 +119,7 @@ %D show functionality. It sort of records pieces of the page %D that will show up stepwise. It can be used like: %D -%D \starttypen +%D \starttyping %D \startitemize %D \item eerste %D \item tweede @@ -132,57 +132,57 @@ %D \stopformula %D %D \presentationstep -%D \stoptypen +%D \stoptyping %D %D When the document is opened, the two text fragments are %D covered by a shield. Each page has its own shield stack. The %D logical reference \type {NextStep} can be used to hide the %D shield. %D -%D \starttypen +%D \starttyping %D \setupfootertexts[{\button{Show Up}[NextStep]}] -%D \stoptypen +%D \stoptyping %D %D In case of presentation style 2, you can say: %D -%D \starttypen +%D \starttyping %D \definereference[Whatever][JS(NextPresentation{\realfolio})] -%D \stoptypen +%D \stoptyping %D %D Depending of the viewer, you need to reset the fields at %D startup: %D -%D \starttypen +%D \starttyping %D \setupinteraction[openaction=ResetForm] -%D \stoptypen +%D \stoptyping %D %D Fixed spacing give you the best results: %D -%D \starttypen +%D \starttyping %D \setupwhitespace[fixed] %D \setupblank[fixed] -%D \stoptypen +%D \stoptyping %D %D Sometimes you need to set the color of the background, as %D with style 2: %D -%D \starttypen +%D \starttyping %D \definecolor[StepColor][Page] -%D \stoptypen +%D \stoptyping %D %D Special effects can be reached with: %D -%D \starttypen +%D \starttyping %D \setupframedtexts %D [presentationshield] %D [background=color,backgroundcolor=red] -%D \stoptypen +%D \stoptyping %D %D There is also: %D -%D \starttypen +%D \starttyping %D \autopresentationsteptrue -%D \stoptypen +%D \stoptyping %D %D One can enable this feature as \type {step} mode. @@ -199,4 +199,4 @@ \doifmode{comment}{\setuppagecomment[state=start,location=bottom]} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/s-pre-01.tex b/tex/context/base/s-pre-01.tex index 9243162f2..2cc8c6e35 100644 --- a/tex/context/base/s-pre-01.tex +++ b/tex/context/base/s-pre-01.tex @@ -103,12 +103,12 @@ %D I considered the next setup too, but finaly decided to %D comment it out. %D -%D \starttypen +%D \starttyping %D \setupbackgrounds %D [bottom][text] %D [frame=on, %D framecolor=white] -%D \stoptypen +%D \stoptyping %D \macros %D {setupinteraction} @@ -182,17 +182,17 @@ %D The titlepage is rather simple and can be typeset in two %D ways: %D -%D \starttypen +%D \starttyping %D \StartTitlePage %D text \\ text \\ text %D \StopTitlepage -%D \stoptypen +%D \stoptyping %D %D or more straightforward: %D -%D \starttypen +%D \starttyping %D \TitlePage{text\\text\\text} -%D \stoptypen +%D \stoptyping %D %D The first alternative can be used for more complicated %D title pages. @@ -216,7 +216,7 @@ %D %D A presentation after loading this module looks like: %D -%D \starttypen +%D \starttyping %D \TitlePage {About Whatever\\Topics} %D %D \Topics {Todays Talk} @@ -230,7 +230,7 @@ %D \Subject {Beta} %D %D ..... -%D \stoptypen +%D \stoptyping %D \macros %D {definehead} @@ -291,7 +291,7 @@ %D subject line by using one of the default alternatives (g). We %D could have said: %D -%D \starttypen +%D \starttyping %D \setuplist %D [Subject] %D [alternative=none, @@ -300,7 +300,7 @@ %D %D \def\SubjectListLine#1#2#3% %D {\midaligned{#2}} -%D \stoptypen +%D \stoptyping %D %D But why should we complicate things when we can use %D alternative~\type{g}. The test is only needed if one @@ -332,7 +332,7 @@ %D {setuplist, placelist,startinteractionmenu} %D %D The actual topic list is typeset using a \type{\vbox}. We -%D have to specify \type{criterium=all} because otherwise no +%D have to specify \type{criteriumcriterium=all} because otherwise no %D list will be typeset. (By default lists are typeset %D locally.) diff --git a/tex/context/base/s-pre-02.tex b/tex/context/base/s-pre-02.tex index cbdd97ae9..4cd450f84 100644 --- a/tex/context/base/s-pre-02.tex +++ b/tex/context/base/s-pre-02.tex @@ -236,7 +236,7 @@ %D %D A presentation after loading this module looks like: %D -%D \starttypen +%D \starttyping %D \TitlePage {About Whatever\\Topics} %D %D \Topics {Todays Talk} @@ -248,7 +248,7 @@ %D \Topic {Next Topic} %D %D ..... -%D \stoptypen +%D \stoptyping %D \macros %D {StartTitlePage, TitlePage} @@ -256,17 +256,17 @@ %D The titlepage is rather simple and can be typeset in two %D ways: %D -%D \starttypen +%D \starttyping %D \StartTitlePage %D text \\ text \\ text %D \StopTitlepage -%D \stoptypen +%D \stoptyping %D %D or as one||liner: %D -%D \starttypen +%D \starttyping %D \TitlePage{text\\text\\text} -%D \stoptypen +%D \stoptyping %D %D The first alternative can be used for more complicated %D title pages. diff --git a/tex/context/base/s-pre-03.tex b/tex/context/base/s-pre-03.tex index 440c1b931..c7420ba37 100644 --- a/tex/context/base/s-pre-03.tex +++ b/tex/context/base/s-pre-03.tex @@ -170,7 +170,7 @@ %D instead of \type {\chapters}. This time we don't provide %D an additional sectioning. So we have: %D -%D \starttypen +%D \starttyping %D \TitlePage{How nice} %D %D \Topics{This is about ...} @@ -178,7 +178,7 @@ %D \Topic{The first one} %D %D \Topic{Another one} -%D \stoptypen +%D \stoptyping \definehead [Topic] [chapter] \definehead [Nopic] [title] @@ -214,11 +214,11 @@ %D Instead of \type {\TitlePage}, one can use the pair %D \type {\StartTitlePage} -- \type {\StopTitlePage}: %D -%D \starttypen +%D \starttyping %D \StartTitlePage %D A Self Made Title %D \StopTitlePage -%D \stoptypen +%D \stoptyping \def\StartTitlePage% {\startstandardmakeup diff --git a/tex/context/base/s-pre-06.tex b/tex/context/base/s-pre-06.tex index 32e24c27f..d3b99d9b7 100644 --- a/tex/context/base/s-pre-06.tex +++ b/tex/context/base/s-pre-06.tex @@ -160,7 +160,7 @@ %D compatible with the other styles, they are added. A %D presentation looks like: %D -%D \starttypen +%D \starttyping %D \usemodule[pre-antikwa] %D %D \startext @@ -181,7 +181,7 @@ %D ... %D %D \stoptext -%D \stoptypen +%D \stoptyping %D \macros %D {definehead, Topic, Subject} @@ -227,11 +227,11 @@ %D The \type {\Topics} command uses a bot of low level %D \CONTEXT. We could have done with: %D -%D \starttypen +%D \starttyping %D \def\Topics#1% %D {\Nopic[Topics]{#1} -%D \placelist[Topic][criterium=all]} -%D \stoptypen +%D \placelist[Topic][criteriumcriterium=all]} +%D \stoptyping %D %D but the next alternative sort of ignores this command when %D no list is found. diff --git a/tex/context/base/s-pre-07.tex b/tex/context/base/s-pre-07.tex index 3f4c51087..65514403a 100644 --- a/tex/context/base/s-pre-07.tex +++ b/tex/context/base/s-pre-07.tex @@ -19,7 +19,7 @@ %D goal. I must admit that the main macro looks fuzzy. On %D the other hand, the presentation can look quite structured. %D -%D \starttypen +%D \starttyping %D \Topics{...} %D %D \StartIdeas @@ -27,7 +27,7 @@ %D \StartIdea ... \StopIdea %D \StartIdea ... \StopIdea %D \StopIdeas -%D \stoptypen +%D \stoptyping \startmode[asintended] \setupbodyfont[lbr] \stopmode diff --git a/tex/context/base/s-pre-08.tex b/tex/context/base/s-pre-08.tex index 5680e86d2..425310299 100644 --- a/tex/context/base/s-pre-08.tex +++ b/tex/context/base/s-pre-08.tex @@ -26,9 +26,9 @@ %D You may want to turn on layer tracing: %D -%D \starttypen +%D \starttyping %D \tracelayerstrue -%D \stoptypen +%D \stoptyping \setuppapersize [S6][S6] diff --git a/tex/context/base/s-pre-09.tex b/tex/context/base/s-pre-09.tex index cba452973..a829dd6e2 100644 --- a/tex/context/base/s-pre-09.tex +++ b/tex/context/base/s-pre-09.tex @@ -168,10 +168,10 @@ %D it covers something else. Otherwise we could have stuct %D to: %D -%D \starttypen +%D \starttyping %D \def\Topic#1% %D {\setlayer[topic]{\color[PageColor]{\bfb\setstrut#1}}} -%D \stoptypen +%D \stoptyping %D %D But, we go for the nice alternative: @@ -331,7 +331,7 @@ \let\Topics \gobbleoneargument \let\Subjects \relax -%D We will avoid \citeer {overfull} messages. +%D We will avoid \quote {overfull} messages. \dontcomplain diff --git a/tex/context/base/s-pre-15.tex b/tex/context/base/s-pre-15.tex index 49e13b3da..c9a157abb 100644 --- a/tex/context/base/s-pre-15.tex +++ b/tex/context/base/s-pre-15.tex @@ -19,7 +19,7 @@ %D This presentation is meant for presentations that build up %D an idea stepwise. %D -%D \starttypen +%D \starttyping %D \TitlePage{Do you know \TEX ?} %D %D \StartIdea @@ -29,7 +29,7 @@ %D \StartItem or presentations like this \unknown \StopItem %D \StartItem and whatever you can come up with! \StopItem %D \StopIdea -%D \stoptypen +%D \stoptyping %D The basic layout is rather simple and used as much of the %D screen as possible. diff --git a/tex/context/base/s-pre-19.tex b/tex/context/base/s-pre-19.tex index 204cb41a1..c6ad4f693 100644 --- a/tex/context/base/s-pre-19.tex +++ b/tex/context/base/s-pre-19.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. %D This style is made in the process or writing the \METAFUN\ %D manual. It exploits a few tricks, like graphics calculated @@ -17,64 +17,64 @@ %D moment) new menu list placement alternative. If you forget %D about the definition of the button shapes, which is %D complicated in any system, this style is not even that hard -%D to follow. Watch how the left side of the buttons follow -%D the right side of the text graphic. -%D -%D While playing bit with this style, the random alternative -%D made me think of those organic building with non equal -%D windows (we have a few in The Netherlands), so I decided to -%D label this style as \type {pre-organic}. +%D to follow. Watch how the left side of the buttons follow +%D the right side of the text graphic. %D -%D At the end of this file, there is a small test file, so -%D when you process this file with \TEXEXEC\ and the options -%D \type {--mode=demo} and \type {--pdf}, you will get a demo -%D document. +%D While playing bit with this style, the random alternative +%D made me think of those organic building with non equal +%D windows (we have a few in The Netherlands), so I decided to +%D label this style as \type {pre-organic}. +%D +%D At the end of this file, there is a small test file, so +%D when you process this file with \TEXEXEC\ and the options +%D \type {--mode=demo} and \type {--pdf}, you will get a demo +%D document. -%D We use one of the standard screen \citeer {paper} sizes, and -%D map it onto the same size, so that we get a nicely cropped -%D page. +%D We use one of the standard screen \quote {paper} sizes, and +%D map it onto the same size, so that we get a nicely cropped +%D page. \setuppapersize [S6][S6] -%D Like in the \METAFUN\ manual, we use the Palatino as main -%D bodyfont. This font is quite readable on even low -%D resolution screens, although I admit that this style is +%D Like in the \METAFUN\ manual, we use the Palatino as main +%D bodyfont. This font is quite readable on even low +%D resolution screens, although I admit that this style is %D developed using an $1400\times1050$ pixel LCD screen, so I -%D may be biased. +%D may be biased. %\startmode[asintended] \setupbodyfont[ppl] \stopmode %D The layout specification sets up a text area and a right %D edge area where the menus will go. Watch the rather large %D edge distance. By setting the header and footer dimensions -%D to zero, we automatically get rid of page body ornaments, -%D like the pagenumber. +%D to zero, we automatically get rid of page body ornaments, +%D like the pagenumber. \setuplayout [topspace=48pt, backspace=48pt, cutspace=12pt, width=400pt, - margin=0cm, + margin=0cm, rightedge=88pt, rightedgedistance=48pt, header=0cm, footer=0cm, height=middle] -%D We use a moderate, about a line height, interparagraph -%D white space. +%D We use a moderate, about a line height, interparagraph +%D white space. \setupwhitespace [big] -%D Of course we use colors, since on computer displays they -%D come for free. +%D Of course we use colors, since on computer displays they +%D come for free. \setupcolors [state=start] - + \definecolor [red] [r=.75] \definecolor [yellow] [r=.75,g=.75] \definecolor [gray] [s=.50] @@ -87,11 +87,11 @@ \definecolor [ContrastColor] [gray] %D This is an interactive document, so we enable interaction. -%D In this style, we disable the viewer's \citeer {highlight a -%D hyperlink when it's clicked on} feature. We will use a -%D menu, so we enable menus. Later we will see the contract -%D color |<|hyperlinks gets that color when we are already on -%D the location|>| in action. +%D In this style, we disable the viewer's \quote {highlight a +%D hyperlink when it's clicked on} feature. We will use a +%D menu, so we enable menus. Later we will see the contract +%D color |<|hyperlinks gets that color when we are already on +%D the location|>| in action. \setupinteraction [state=start, @@ -103,7 +103,7 @@ %D The menu itself is set up as follows. Because we will %D calculate menubuttons based on their position on the page, %D we have to keep track of the positions. Therefore, we set -%D the \type {position} variable to \type {yes}. +%D the \type {position} variable to \type {yes}. \setupinteractionmenu [right] @@ -118,9 +118,9 @@ before=, after=] -%D The menu content is rather sober: a list of topics (later -%D we will define the command that generates topic entries), -%D and a close button. +%D The menu content is rather sober: a list of topics (later +%D we will define the command that generates topic entries), +%D and a close button. \startinteractionmenu[right] \placelist[Topic][alternative=right] @@ -134,7 +134,7 @@ %D \METAPOST\ graphic. Page backgrounds are recalculated each %D page, opposite to the other backgrounds that are calculated %D when a new background is defined, or when repetitive -%D calculation is turned on. +%D calculation is turned on. \setupbackgrounds [page] @@ -146,141 +146,141 @@ \setupMPvariables [page] - [alternative=3] + [alternative=3] \startuseMPgraphic{page} - \includeMPgraphic{rightsuperbutton} + \includeMPgraphic{rightsuperbutton} StartPage ; path p, q ; pickup pencircle scaled 3pt ; - + p := Field[Text][Text] enlarged 36pt superellipsed .90 ; - fill Page withcolor \MPcolor{PageColor} ; - fill p withcolor \MPcolor{TextColor} ; - draw p withcolor \MPcolor{OrnamentColor} ; + fill Page withcolor \MPcolor{PageColor} ; + fill p withcolor \MPcolor{TextColor} ; + draw p withcolor \MPcolor{OrnamentColor} ; - p := Field[Text][Text] enlarged 48pt superellipsed .90 ; + p := Field[Text][Text] enlarged 48pt superellipsed .90 ; - def right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) = - if (pp>0) and (rr>0) : - q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ; - fill q withcolor \MPcolor{TextColor} ; - draw q withcolor if rr=2 : \MPcolor{ContrastColor} - else : \MPcolor{InteractionColor} fi ; - fi ; - enddef ; + def right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) = + if (pp>0) and (rr>0) : + q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ; + fill q withcolor \MPcolor{TextColor} ; + draw q withcolor if rr=2 : \MPcolor{ContrastColor} + else : \MPcolor{InteractionColor} fi ; + fi ; + enddef ; - \MPmenubuttons{right} + \MPmenubuttons{right} - StopPage ; + StopPage ; \stopuseMPgraphic \startuseMPgraphic{page} - \includeMPgraphic{rightsuperbutton} + \includeMPgraphic{rightsuperbutton} StartPage ; - numeric alternative, seed, superness, squeezeness, randomness ; - path p, q ; transform t ; + numeric alternative, seed, superness, squeezeness, randomness ; + path p, q ; transform t ; alternative := \MPvar{alternative} ; - seed := uniformdeviate 100 ; + seed := uniformdeviate 100 ; - if alternative > 10 : - superness := .85 + ((\realfolio-1)/\lastpage) * .15 ; + if alternative > 10 : + superness := .85 + ((\realfolio-1)/\lastpage) * .15 ; squeezeness := 12pt - ((\realfolio-1)/\lastpage) * 10pt ; - else : + else : superness := .90 ; squeezeness := 12pt ; fi ; - randomness := squeezeness ; + randomness := squeezeness ; - alternative := alternative mod 10 ; + alternative := alternative mod 10 ; - t := identity if alternative=3: shifted (9pt,-9pt) fi ; - - % first we draw the shape that surrounds the text + t := identity if alternative=3: shifted (9pt,-9pt) fi ; - randomseed := seed ; + % first we draw the shape that surrounds the text - p := Field[Text][Text] enlarged if - alternative = 1 : 36pt superellipsed superness elseif - alternative = 2 : 36pt squeezed squeezeness elseif + randomseed := seed ; + + p := Field[Text][Text] enlarged if + alternative = 1 : 36pt superellipsed superness elseif + alternative = 2 : 36pt squeezed squeezeness elseif alternative = 3 : 36pt randomized randomness else - : 36pt fi ; + : 36pt fi ; pickup pencircle scaled 3pt ; - fill Page withcolor \MPcolor{PageColor} ; - fill p withcolor \MPcolor{TextColor} ; - draw p withcolor \MPcolor{OrnamentColor} ; + fill Page withcolor \MPcolor{PageColor} ; + fill p withcolor \MPcolor{TextColor} ; + draw p withcolor \MPcolor{OrnamentColor} ; - % we set p to the wider shape from which we will chip off pieces + % we set p to the wider shape from which we will chip off pieces - randomseed := seed ; + randomseed := seed ; - p := ( Field[Text][Text] enlarged if - alternative = 1 : 48pt superellipsed superness elseif - alternative = 2 : 48pt squeezed squeezeness elseif + p := ( Field[Text][Text] enlarged if + alternative = 1 : 48pt superellipsed superness elseif + alternative = 2 : 48pt squeezed squeezeness elseif alternative = 3 : 36pt randomized randomness else : 48pt fi ) transformed t ; % calls to *_menu_button are generated automatically ... - def right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) = - if (pp>0) and (rr>0) : - q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ; % \MPw{menu:right:\realfolio} - fill q withcolor \MPcolor{TextColor} ; - draw q withcolor if rr=2 : \MPcolor{ContrastColor} - else : \MPcolor{InteractionColor} fi ; - fi ; - enddef ; + def right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) = + if (pp>0) and (rr>0) : + q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ; % \MPw{menu:right:\realfolio} + fill q withcolor \MPcolor{TextColor} ; + draw q withcolor if rr=2 : \MPcolor{ContrastColor} + else : \MPcolor{InteractionColor} fi ; + fi ; + enddef ; - % ... and inserted when the graphic data is flushed here ... + % ... and inserted when the graphic data is flushed here ... - \MPmenubuttons{right} + \MPmenubuttons{right} - StopPage ; + StopPage ; \stopuseMPgraphic \startuseMPgraphic{rightsuperbutton} vardef rightsuperbutton (expr pat, xpos, ypos, wid, hei) = - save p, ptop, pbot, t, b, edge, shift, width, height ; - path p, ptop, pbot ; pair t, b ; numeric edge, shift, width, height ; + save p, ptop, pbot, t, b, edge, shift, width, height ; + path p, ptop, pbot ; pair t, b ; numeric edge, shift, width, height ; - edge := xpos + wid ; shift := ypos + hei ; + edge := xpos + wid ; shift := ypos + hei ; - p := rightpath pat ; + p := rightpath pat ; ptop := ((-infinity,shift)--(edge,shift)) ; - pbot := ((-infinity,shift-hei)--(edge,shift-hei)) ; + pbot := ((-infinity,shift-hei)--(edge,shift-hei)) ; - t := p intersectionpoint ptop ; - b := p intersectionpoint pbot ; + t := p intersection_point ptop ; + b := p intersection_point pbot ; p := subpath(0,xpart (p intersectiontimes ptop)) of p ; p := subpath(xpart (p intersectiontimes pbot),length(p)) of p ; - (p -- t -- point 1 of ptop & - point 1 of ptop -- point 1 of pbot & - point 1 of pbot -- b - -- cycle) + (p -- t -- point 1 of ptop & + point 1 of ptop -- point 1 of pbot & + point 1 of pbot -- b + -- cycle) -enddef ; +enddef ; \stopuseMPgraphic %D Topics are identified with \type {\Topic}, which is an %D instance of chapter headings. The number is made invisible. %D Since it still is a numbered section header, \CONTEXT\ will -%D write the header to the table of contents. +%D write the header to the table of contents. \definehead [Topic] @@ -290,19 +290,19 @@ enddef ; [Topic] [number=no] -%D We will use a bold font in the table of contents. We also -%D force a complete list. +%D We will use a bold font in the table of contents. We also +%D force a complete list. \setuplist [Topic] [criterium=all, style=bold, before=, - after=] + after=] -%D The \type {\TitlePage} macro looks horrible, because we -%D want to keep the interface simple: a list of small -%D sentences, separated by \type {\\}. +%D The \type {\TitlePage} macro looks horrible, because we +%D want to keep the interface simple: a list of small +%D sentences, separated by \type {\\}. \def\StartTitlePage {\startstandardmakeup @@ -318,17 +318,17 @@ enddef ; \def\TitlePage#1% {\StartTitlePage#1\StopTitlePage} -%D A couple of goodies: +%D A couple of goodies: \def\Subject {\Topic} \def\Topics #1{} \def\Subjects {} -%D For those who want to test: +%D For those who want to test: \doifnotmode{demo}{\endinput} -\starttext +\starttext \setupMPvariables[page][alternative=3] @@ -337,10 +337,10 @@ enddef ; A Simple Style Demo\\ Hans Hagen, August 2000} -\Topic {Douglas R. Hofstadter} \input douglas \page -\Topic {Donald E. Knuth} \input knuth \page -\Topic {Edward R. Tufte} \input tufte \page -\Topic {Hermann Zapf} \input zapf \page -%Topic {David F. Stork} \input stork \page +\Topic {Douglas R. Hofstadter} \input douglas \page +\Topic {Donald E. Knuth} \input knuth \page +\Topic {Edward R. Tufte} \input tufte \page +\Topic {Hermann Zapf} \input zapf \page +%Topic {David F. Stork} \input stork \page -\stoptext +\stoptext diff --git a/tex/context/base/s-pre-22.tex b/tex/context/base/s-pre-22.tex index edd99ebde..cb09816dc 100644 --- a/tex/context/base/s-pre-22.tex +++ b/tex/context/base/s-pre-22.tex @@ -16,16 +16,16 @@ %D and title. When documenting this style, I changed %D reprocessing into pushing on layers. %D -%D A \citeer {problem} like this can be solved in several ways: +%D A \quote {problem} like this can be solved in several ways: %D -%D \startopsomming -%D \som writing a lot of semi||complex \TEX\ code as shown -%D \som keeping track of positions and draw everything on the +%D \startitemize +%D \item writing a lot of semi||complex \TEX\ code as shown +%D \item keeping track of positions and draw everything on the %D page layer -%D \som defining an overlay for each summary and changing the +%D \item defining an overlay for each summary and changing the %D order when flushing -%D \som maintaining a so called field stack -%D \stopopsomming +%D \item maintaining a so called field stack +%D \stopitemize %D %D We go for the first method. We assume that summaries are %D simple text snippets. diff --git a/tex/context/base/s-pre-50.tex b/tex/context/base/s-pre-50.tex index 49a206fd7..0332001ab 100644 --- a/tex/context/base/s-pre-50.tex +++ b/tex/context/base/s-pre-50.tex @@ -21,9 +21,9 @@ %D still have some 10 of those styles to clean up and %D document.) You can give it a try: %D -%D \starttypen +%D \starttyping %D texexec --pdf --mode=demo s-pre-50 -%D \stoptypen +%D \stoptyping % Basic definitions. diff --git a/tex/context/base/s-pre-60.tex b/tex/context/base/s-pre-60.tex index 44fdb7fc0..f6ed92f59 100644 --- a/tex/context/base/s-pre-60.tex +++ b/tex/context/base/s-pre-60.tex @@ -21,7 +21,8 @@ \ifnum\getvariable{stepper}{nofsteps}>\StepMaximum \dostepwiserecurse {\numexpr(\StepMaximum+1)} {\getvariable{stepper}{nofsteps}} {1} - {\expanded{\defineproperty[step:\recurselevel][layer][state=stop,global=yes]}} + {\doifnotmode{nosteps,nostep} + {\expanded{\defineproperty[step:\recurselevel][layer][state=stop,global=yes]}}} \xdef\StepMaximum{\getvariable{stepper}{nofsteps}} @@ -47,14 +48,16 @@ % todo: roll back blank +\def\StepLayer{step:\StepCounter} + \def\StartStep {\ifvmode \scratchskip\lastskip \vskip-\scratchskip - \startproperty[step:\StepCounter]% + \startproperty[\StepLayer]% \vskip\scratchskip \else - \startproperty[step:\StepCounter]% + \startproperty[\StepLayer]% \fi \ignorespaces} @@ -62,9 +65,9 @@ {\removeunwantedspaces \stopproperty} -\def\StartSteps{\ResetStep\NextStep\StartStep} -\def\StopSteps {\StopStep\PrevStep} -\def\FlushStep {\StopStep\NextStep\StartStep} +\def\StartSteps{\iftrialtypesetting\else\ResetStep\NextStep\StartStep\fi} +\def\StopSteps {\iftrialtypesetting\else\StopStep\PrevStep\fi} +\def\FlushStep {\iftrialtypesetting\else\StopStep\NextStep\StartStep\fi} \appendtoks \ResetStep @@ -84,4 +87,25 @@ [text] [background=invoke] -\endinput \ No newline at end of file +% bonus + +\useMPlibrary[nav] + +\definepalet + [navplus] + [attach=interactioncolor, + comment=interactioncolor] + +\setupcomment + [symbol={comment-normal,comment-down}, + textlayer=\StepLayer, + option=buffer, + height=\textheight, + width=\textwidth, + margin=0pt] + +\setupattachments + [symbol={attach-normal,attach-down}, + textlayer=\StepLayer] + +\endinput diff --git a/tex/context/base/s-pre-61.tex b/tex/context/base/s-pre-61.tex index 9ae4abf09..905b07363 100644 --- a/tex/context/base/s-pre-61.tex +++ b/tex/context/base/s-pre-61.tex @@ -17,7 +17,8 @@ \definetypeface[mainface][ss][sans][optima-nova][default][encoding=\defaultencoding] -\setupbodyfont[mainface,ss,22pt] +\setupbodyfont[mainface,ss,18pt] +\setupinterlinespace[line=3.25ex] \setuppapersize [S6][S6] @@ -41,7 +42,10 @@ \setupinteraction [state=start, click=off, - menu=on] + menu=on, + style=, + color=interactioncolor, + contrastcolor=interactioncolor] \setupinteractionscreen [option=max] @@ -85,6 +89,8 @@ \definecolor [maincolor] [bright] \definecolor [textcolor] [red] +\definecolor [interactioncolor] [r=.8,g=.8,b=.6] + \setupcolors [state=start, textcolor=maincolor] @@ -94,6 +100,19 @@ [background=page, backgroundcolor=textcolor] +\setupbackgrounds + [text]% [text] + [background={comments,text,invoke}] + +\definelayer + [text] + [width=\textwidth, + height=\textheight] + +\defineoverlay + [comments] + [{\setlayer[text][preset=middle]{\placecomments}}] + \defineoverlay[page][\uniqueMPgraphic{page-\ifcase\realpageno\or one\else plus\fi}] \startuniqueMPgraphic{page-one} @@ -121,13 +140,15 @@ StopPage ; \stopuniqueMPgraphic -\NormalizeFontHeight \HeadFont {\setstrut\strut\quad} {\headerheight} {SansBold} -\NormalizeFontHeight \TitleFont {\setstrut\strut\quad} {2\headerheight} {SansBold} +\NormalizeFontHeight \HeadFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold} +\NormalizeFontHeight \TitleFont {\setstrut\strut\quad} {2.0\headerheight} {SansBold} +\NormalizeFontHeight \SubTitleFont {\setstrut\strut\quad} {1.5\headerheight} {SansBold} +\NormalizeFontHeight \SubSubTitleFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold} \setuphead [chapter] [placehead=empty, - after={\blank[big]}, + after={\blank[medium]}, color=maincolor, placenumber=no, style=\HeadFont] @@ -141,15 +162,27 @@ \setuppagenumbering [location=] -\definesymbol[emdash][\emdash] \setupitemize[each][packed][symbol=emdash] +\definesymbol + [emdash] + [\emdash] + +\setupitemize + [each] + [loose,serried,joinedup] + [symbol=emdash] -\setupalign[broad,right] +\setupalign + [broad,right] -\def\TitlePage#1% +\def\doTitlePage#1#2#3% {\startstandardmakeup[headerstate=high] - \def\\{\endgraf\quad}\TitleFont\setstrut\setupinterlinespace\vfil#1\vfil\vfil + \def\\{\def\\{\endgraf\quad\quad}\endgraf\quad#2}% + #1\setstrut\setupinterlinespace\vfil#3\vfil\vfil \stopstandardmakeup} +\def\TitlePage {\doTitlePage\TitleFont\relax} +\def\SubTitlePage{\doTitlePage\TitleFont\SubTitleFont} + \definehead[Topic][chapter] \definehead[Nopic][title] @@ -219,4 +252,4 @@ \StopSteps -\stoptext \ No newline at end of file +\stoptext diff --git a/tex/context/base/setupa.tex b/tex/context/base/setupa.tex index 843a531d3..6dfa4a027 100644 --- a/tex/context/base/setupa.tex +++ b/tex/context/base/setupa.tex @@ -198,7 +198,7 @@ sectionnumber: numero sezione \egroup -% \stelsetupin +% \setupsetup % [verwijzing=<0,1,2,3>] % % \startsetup @@ -339,27 +339,27 @@ sectionnumber: numero sezione \def\c!doropt! #1#2#3{{\setupoptfont{#1#2#3}}} \def\c!noropt! #1{{\setupoptfont{#1}}} -\definieerregister +\defineregister [texmacro] [texmacros] -\definieersorteren +\definesorting [texcommando] [texcommandos] -\stelsorterenin +\setupsorting [texcommando] - [\c!commando=\@@stpcommando, + [\c!command=\@@stpcommand, \c!criterium=\@@stpcriterium] -\definieersorteren +\definesorting [elktexcommando] [alletexcommandos] -\stelsorterenin +\setupsorting [elktexcommando] - [\c!commando=\@@stpcommando, - \c!criterium=\v!alles] + [\c!command=\@@stpcommand, + \c!criterium=\v!all] % verwijzing: 0 geen verwijzingen plaatsen / wel genereren % 1 alleen bij zie plaatsen / wel genereren @@ -381,7 +381,7 @@ sectionnumber: numero sezione \fi} \def\writesetupparbox#1% - {\hbox to \@@stpbreedte{\strut#1\hss}}% + {\hbox to \@@stpwidth{\strut#1\hss}}% \def\writesetupparameter#1#2% {\doifcommonelse{#1}{#2} @@ -394,7 +394,7 @@ sectionnumber: numero sezione {\writesetupparameter{##1}{#3}}% \veryraggedright \noindent - \hangindent=\@@stpbreedte + \hangindent=\@@stpwidth \writesetupparbox{\let\c!setup!variable!\firstofoneargument\getinterfaceconstant{#1}}% \processcommalist[#2]\dowritesetupparameter \doifcommonelse{#3}{#2}{}{\underbar{#3}}% @@ -408,7 +408,7 @@ sectionnumber: numero sezione {\writesetupparameter{##1}{#2}}% \indent \veryraggedright - \hangindent=\@@stpbreedte + \hangindent=\@@stpwidth \writesetupparbox{\c!dots!}% \processcommalist[#1]\dowritesetupparameter \endgraf @@ -435,14 +435,14 @@ sectionnumber: numero sezione \unexpanded\def\inheritsetup#1% {\setsetupreference#1\to\currentsetupinheritance - \ifcase\@@stpverwijzing + \ifcase\@@stpreference \texescape#1% % njet \or - {\op{p}[\currentsetupinheritance]: \texescape#1}% zonder { } probleem + {\at{p}[\currentsetupinheritance]: \texescape#1}% zonder { } probleem \or - {\op{p}[\currentsetupinheritance]: \texescape#1}% nog eens uitzoeken + {\at{p}[\currentsetupinheritance]: \texescape#1}% nog eens uitzoeken \or - {\naar{\tttf\texescape#1}[\currentsetupinheritance]}% + {\goto{\tttf\texescape#1}[\currentsetupinheritance]}% \fi} % #1=name @@ -463,7 +463,7 @@ sectionnumber: numero sezione \variable[..=..][\getmessage{setup}{see} \inheritsetup{#1}\next#3][]% \egroup} -\def\stelsetupin +\def\setupsetup {\dodoubleargument\getparameters[\??stp]} \bgroup \catcode`<=\active @@ -539,8 +539,8 @@ sectionnumber: numero sezione \defineframedtext [setuptext] - [\c!breedte=\hsize, - \c!hoogte=\v!passend, + [\c!width=\hsize, + \c!height=\v!fit, \c!offset=0.75em] \popmacro\setuptext @@ -568,7 +568,7 @@ sectionnumber: numero sezione \advance\hsize by -\leftskip \advance\hsize by -\rightskip \getvalue{\e!start setuptext} - \setupwhitespace[\v!geen]% + \setupwhitespace[\v!none]% \bgroup \verbatimsetupvariablepart \edef\first {#2*}% \protectsetupvariablepart \edef\second{#2}% @@ -598,19 +598,19 @@ sectionnumber: numero sezione \visualizesetupvariablepart \writetexcommand{#2}#3% \ifbreaksetup\hfill\else\hss\fi - \ifnum\@@stpverwijzing>0 + \ifnum\@@stpreference>0 \dointeractivesetup \fi \setsetupnumber #1\to\currentsetupnumber \setsetupreference#2\to\currentsetupreference - \ifcase\@@stpverwijzing + \ifcase\@@stpreference \dosetupreference \or \dosetupreference \or \hskip1em \doifreferencefoundelse{\currentsetupreference} - {\bf\op[\currentsetupreference]} + {\bf\at[\currentsetupreference]} {\setupvarfont \translate [nl=nog niet beschreven, en=not yet described, @@ -622,7 +622,7 @@ sectionnumber: numero sezione \endgraf \fi \ifshortsetup \else - \switchtobodyfont[\v!klein]% + \switchtobodyfont[\v!small]% \setuptxtfont \redefinesetupconstants \global\v!dotnumber!=0 @@ -635,11 +635,11 @@ sectionnumber: numero sezione \dimen0=2.5em \fi \advance\dimen0 by 2em - \xdef\@@stpbreedte{\the\dimen0}}% + \xdef\@@stpwidth{\the\dimen0}}% \global\v!dotnumber!=0 \setbox0=\vbox{#4}% \ifdim\wd0>\!!zeropoint - \blanko + \blank \unvbox0 \fi \fi @@ -650,7 +650,7 @@ sectionnumber: numero sezione {\protect \verbatimsetupvariablepart \xdef\globalsetupname{#1}% - \expanded{\gebruikcommandos{#1*}}% + \expanded{\usecommands{#1*}}% \doifdefinedelse{\@@setup\globalsetupname} {\getvalue{\@@setup\globalsetupname}} {\bgroup @@ -658,10 +658,10 @@ sectionnumber: numero sezione \setuptxtfont [setup \makemessage{setup}{3}{#1}]\endgraf \egroup}% \egroup - \@@stpna} + \@@stpafter} \def\setup - {\@@stpvoor + {\@@stpbefore \bgroup \catcode`\<=\@@active \catcode`\>=\@@other @@ -670,7 +670,7 @@ sectionnumber: numero sezione \dosetup} \def\shortsetup - {\@@stpvoor + {\@@stpbefore \bgroup \catcode`\<=\@@active \catcode`\>=\@@other @@ -707,34 +707,33 @@ sectionnumber: numero sezione \let\documenteduntilhere\relax -\definieerblok [dutch, english, german, czech, italian] -\verbergblokken [dutch, english, german, czech, italian] +\defineblock [dutch, english, german, czech, italian] +\hideblocks [dutch, english, german, czech, italian] -\stelsetupin - [\c!voor=, - \c!na=, - \c!commando=\setup, - \c!verwijzing=0, - \c!criterium=\v!gebruikt] - -\def\plaatssetup +\setupsetup + [\c!before=, + \c!after=, + \c!command=\setup, + \c!reference=0, + \c!criterium=\v!used] + +\def\placesetup {\bgroup - \getvalue{\e!plaats\e!lijstmet texcommandos} + \getvalue{\e!place\e!listof texcommandos} \egroup} -\def\plaatselkesetup % for fun purposes only +\def\placeeverysetup % for fun purposes only {\bgroup - \stelsetupin[\c!verwijzing=2]% - \setupreferencing[\c!status=\v!stop]% - \getvalue{\e!plaats\e!lijstmet alletexcommandos}% + \setupsetup[\c!reference=2]% + \setupreferencing[\c!state=\v!stop]% + \getvalue{\e!place\e!listof alletexcommandos}% \egroup} -\let\setupsetup \stelsetupin -\let\placesetup \plaatssetup -\let\placeeverysetup\plaatselkesetup +\let\plaatssetup \placesetup +\let\plaatselkesetup\placeeverysetup \bgroup \catcode`\<=\active \def<{\lesscharacter} \egroup % \showmessage{setup}{1}{} \catcode`\<=\active -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/setupb.tex b/tex/context/base/setupb.tex index 36877f432..fe937ad31 100644 --- a/tex/context/base/setupb.tex +++ b/tex/context/base/setupb.tex @@ -14,6 +14,7 @@ % nieuw: oncomment plaatssamengesteldelijst % placeheadtext placeheadnumber placefloatnumber +% setupinitial placeinitial \c!state \c!location \c!n \s!font=initial (Initial) % nog 'reductie=ja/nee' in \setupcolors @@ -30,9 +31,9 @@ [\c!identifier!] [] \variable - [\c!spatiering] - [\v!opelkaar,\v!ruim] - [\v!opelkaar] + [\c!spacing] + [\v!packed,\v!broad] + [\v!packed] \variable [\s!lefthyphenmin] [\c!dimension!] @@ -42,7 +43,7 @@ [\c!dimension!] [2] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!stop] \variable @@ -205,11 +206,11 @@ [\c!dimension!] [] \variable - [\c!klein] + [\c!small] [\c!dimension!] [] \variable - [\c!groot] + [\c!big] [\c!dimension!] [] \stopsetup @@ -306,7 +307,7 @@ \type [\c!vals!] \value - [5pt,...,12pt,\v!klein,\v!groot,\v!globaal] + [5pt,...,12pt,\v!small,\v!big,\v!global] [] \stopsetup @@ -329,8 +330,8 @@ \type [\c!opt!\c!vals!] \value - [\v!ja,\v!nee,\v!kap,\c!text!] - [\v!ja] + [\v!yes,\v!no,\v!cap,\c!text!] + [\v!yes] \stopsetup % colo-ini @@ -351,45 +352,45 @@ \type [\c!vars!] \variable - [\c!status] - [\v!start,\v!stop,\v!globaal,\v!lokaal] + [\c!state] + [\v!start,\v!stop,\v!global,\v!local] [\v!stop] \variable - [\c!conversie] - [\v!ja,\v!nee,\v!altijd] - [\v!ja] + [\c!conversion] + [\v!yes,\v!no,\v!always] + [\v!yes] \variable - [\c!reductie] - [\v!ja,\v!nee] - [\v!nee] + [\c!reduction] + [\v!yes,\v!no] + [\v!no] \variable [\c!rgb] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable [\c!cmyk] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable [\c!mp\c!cmyk] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable [\c!mp\c!spot] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!tekstkleur] + [\c!textcolor] [\c!identifier!] [] \variable - [\c!splitsen] - [\c!c,\c!m,\c!y,\c!k,\c!p,\c!s,\v!nee,\c!identifier!] - [\v!nee] + [\c!split] + [\c!c,\c!m,\c!y,\c!k,\c!p,\c!s,\v!no,\c!identifier!] + [\v!no] \variable [\c!criterium] - [\v!alles,\v!geen] - [\v!geen] + [\v!all,\v!none] + [\v!none] \stopsetup \startsetup @@ -510,7 +511,7 @@ [\c!identifier!] [] \value - [\v!rgb,\v!cmyk,\v!grijs,\v!s] + [\v!rgb,\v!cmyk,\v!gray,\v!s] [\v!rgb] \stopsetup @@ -523,7 +524,7 @@ [\c!identifier!] [] \value - [\v!horizontaal,\v!vertikaal,\v!naam,\v!waarde] + [\v!horizontal,\v!vertical,\v!name,\v!value] [] \stopsetup @@ -536,7 +537,7 @@ [\c!identifier!] [] \value - [\v!horizontaal,\v!vertikaal,\v!naam,\v!waarde,\v!nummer] + [\v!horizontal,\v!vertical,\v!name,\v!value,\v!number] [] \stopsetup @@ -586,19 +587,19 @@ \type [\c!vars!] \variable - [\c!spatie] - [\v!aan,\v!uit] - [\v!uit] + [\c!space] + [\v!on,\v!off] + [\v!off] \variable - [\c!optie] - [\v!schuin,\v!normaal,\v!geen] - [\v!geen] + [\c!option] + [\v!slanted,\v!normal,\v!none] + [\v!none] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [\v!type] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \stopsetup @@ -633,7 +634,7 @@ \type [\c!val!\c!vars!] \value - [\v!file,\v!typen,\c!identifier!] + [\v!file,\v!typing,\c!identifier!] [] \inheritvariables [\y!setuptyping] @@ -646,74 +647,74 @@ \type [\c!opt!\c!val!\c!vars!] \value - [\v!file,\v!typen,\c!identifier!] + [\v!file,\v!typing,\c!identifier!] [] \variable - [\c!spatie] - [\v!aan,\v!uit] - [\v!uit] + [\c!space] + [\v!on,\v!off] + [\v!off] \variable - [\c!pagina] - [\v!ja,\v!nee] - [\v!ja] + [\c!page] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!optie] - [\v!schuin,\v!normaal,\v!commandos,\v!kleur,\v!geen] - [\v!geen] + [\c!option] + [\v!slanted,\v!normal,\v!commands,\v!color,\v!none] + [\v!none] \variable - [\c!tekst] - [\v!ja,\v!nee] - [\v!nee] + [\c!text] + [\v!yes,\v!no] + [\v!no] \variable - [i\c!commando] + [i\c!command] [\c!command!] [\ttsl] \variable - [v\c!commando] + [v\c!command] [\c!command!] [] \variable - [c\c!commando] + [c\c!command] [\c!command!] [\tf] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!marge] - [\c!dimension!,\v!standaard,\v!ja,\v!nee] + [\c!margin] + [\c!dimension!,\v!standard,\v!yes,\v!no] [0pt] \variable - [\c!evenmarge] + [\c!evenmargin] [\c!dimension!] [0pt] \variable - [\c!onevenmarge] + [\c!oddmargin] [\c!dimension!] [0pt] \variable - [\c!blanko] - [\c!dimension!,\v!klein,\v!middel,\v!groot,\v!standaard,\v!halveregel,\v!regel] - [\v!regel] + [\c!blank] + [\c!dimension!,\v!small,\v!medium,\v!big,\v!standard,\v!halfline,\v!line] + [\v!line] \variable [\c!escape] [\c!character!] [/] \variable - [\c!springvolgendein] - [\v!ja,\v!nee] - [\v!ja] + [\c!indentnext] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [\v!type] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable @@ -721,14 +722,14 @@ [\c!identifier!] [colorpretty] \variable - [\c!regels] - [\v!ja,\v!nee,\v!afgebroken] - [\v!ja] + [\c!lines] + [\v!yes,\v!no,\v!hyphenated] + [\v!yes] \stopsetup \startsetup \command - [\e!start<<\y!typen>>] + [\e!start<<\y!typing>>] \type [\c!stp!] \stopsetup @@ -754,55 +755,55 @@ \type [\c!vars!] \variable - [\c!conversie] - [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins] - [\v!cijfers] + [\c!conversion] + [\v!numbers,\v!characters,\v!Characters,\v!romannumerals,\v!Romannumerals] + [\v!numbers] \variable - [\c!wijze] - [\v!per\v!tekst,\v!per\c!section!] - [\v!per\v!tekst] + [\c!way] + [\v!by\v!text,\v!by\c!section!] + [\v!by\v!text] \variable - [\c!plaats] - [\v!pagina,\v!tekst,\v!kolommen,\v!hoog,\v!geen] - [\v!pagina] + [\c!location] + [\v!page,\v!text,\v!columns,\v!firstcolumn,\v!lastcolumn,\v!high,\v!none] + [\v!page] \variable - [\c!lijn] - [\v!aan,\v!uit] - [\v!uit] + [\c!rule] + [\v!on,\v!off] + [\v!off] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [] \variable - [\c!korps] - [5pt,...,12pt,\v!klein,\v!groot] - [\v!klein] + [\c!bodyfont] + [5pt,...,12pt,\v!small,\v!big] + [\v!small] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [.125em] \variable - [\c!kolomafstand] + [\c!columndistance] [\c!dimension!] [1em] \variable - [\c!margeafstand] + [\c!margindistance] [\c!dimension!] [.5em] \variable @@ -810,29 +811,29 @@ [\c!number!] [1] \variable - [\c!nummercommando] + [\c!numbercommand] [\c!oneargument!] [] \variable - [\c!tekstcommando] + [\c!textcommand] [\c!oneargument!] [] \variable - [\c!splitsen] - [\v!soepel,\v!streng,\v!zeerstreng,\c!number!] - [\v!soepel] + [\c!split] + [\v!tolerant,\v!strict,\v!verystrict,\c!number!] + [\v!tolerant] \variable - [\c!tekstletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!textstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [] \variable - [\c!tekstkleur] + [\c!textcolor] [\c!identifier!] [] \variable - [\c!interactie] - [\v!ja,\v!nee] - [\v!ja] + [\c!interaction] + [\v!yes,\v!no] + [\v!yes] \inheritvariables [\y!framed] [] @@ -844,7 +845,7 @@ \type [\c!vars!] \inheritvariables - [\y!doordefinieren] + [\y!definedescription] [] \stopsetup @@ -903,23 +904,23 @@ \type [\c!vars!] \variable - [\c!variant] + [\c!alternative] [a,b,c] [a] \variable - [\c!lijndikte] + [\c!rulethickness] [\c!dimension!] - [\lijndikte] + [\linewidth] \variable - [\c!onderoffset] + [\c!bottomoffset] [\c!dimension!] [1.5pt] \variable - [\c!bovenoffset] + [\c!topoffset] [\c!dimension!] [2.5pt] \variable - [\c!lijnkleur] + [\c!rulecolor] [\c!identifier!] [] \stopsetup @@ -1038,41 +1039,41 @@ \type [\c!vars!] \variable - [\c!titel] - [\v!ja,\v!nee] - [\v!ja] + [\c!title] + [\v!yes,\v!no] + [\v!yes] \variable [\c!sc] - [\v!ja,\v!nee] - [\v!nee] + [\v!yes,\v!no] + [\v!no] \stopsetup \startsetup - \command[\y!kap] + \command[\y!smallcapped] \type[\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\y!nokap] + \command[\y!notsmallcapped] \type[\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\y!KAP] + \command[\y!CAPPED] \type[\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\y!Kap] + \command[\y!SmallCapped] \type[\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\y!Kaps] + \command[\y!SmallCaps] \type[\c!wrds!] \value[\c!text!][] \stopsetup @@ -1265,11 +1266,11 @@ \type [\c!var!] \variable - [\c!niveau] + [\c!level] [\c!number!] [1] \variable - [\c!lijndikte] + [\c!rulethickness] [\c!dimension!] [] \stopsetup @@ -1329,131 +1330,131 @@ \type [\c!vars!] \variable - [\c!hoogte] - [\v!passend,\v!ruim,\c!dimension!] - [\v!ruim] + [\c!height] + [\v!fit,\v!broad,\c!dimension!] + [\v!broad] \variable - [\c!breedte] - [\v!passend,\v!ruim,\v!vast,\v!lokaal,\c!dimension!] - [\v!ruim] + [\c!width] + [\v!fit,\v!broad,\v!fixed,\v!local,\c!dimension!] + [\v!broad] \variable [\c!offset] - [\v!geen,\v!overlay,\v!default,\c!dimension!] + [\v!none,\v!overlay,\v!default,\c!dimension!] [1em] \variable - [\c!plaats] - [\v!laag,\v!diepte,\v!hangend] + [\c!location] + [\v!low,\v!depth,\v!hanging] [] \variable - [\c!optie] - [\v!geen,\v!leeg] - [\v!geen] + [\c!option] + [\v!none,\v!empty] + [\v!none] \variable [\c!strut] - [\v!ja,\v!nee,\v!globaal,\v!lokaal] - [\v!ja] + [\v!yes,\v!no,\v!global,\v!local] + [\v!yes] \variable - [\c!uitlijnen] - [\v!nee,\v!links,\v!rechts,\v!midden,\v!normaal,\v!hoog,\v!laag,\v!laho] - [\v!nee] + [\c!align] + [\v!no,\v!left,\v!right,\v!middle,\v!normal,\v!high,\v!low,\v!lohi] + [\v!no] \variable - [\c!onder] + [\c!bottom] [\c!command!] [\vss] \variable - [\c!boven] + [\c!top] [\c!command!] [] \variable - [\c!kader] - [\v!aan,\v!uit,\v!geen,\v!overlay] - [\v!aan] + [\c!frame] + [\v!on,\v!off,\v!none,\v!overlay] + [\v!on] \variable - [\c!bovenkader] - [\v!aan,\v!uit] - [\v!uit] + [\c!topframe] + [\v!on,\v!off] + [\v!off] \variable - [\c!onderkader] - [\v!aan,\v!uit] - [\v!uit] + [\c!bottomframe] + [\v!on,\v!off] + [\v!off] \variable - [\c!linkerkader] - [\v!aan,\v!uit] - [\v!uit] + [\c!leftframe] + [\v!on,\v!off] + [\v!off] \variable - [\c!rechterkader] - [\v!aan,\v!uit] - [\v!uit] + [\c!rightframe] + [\v!on,\v!off] + [\v!off] \variable - [\c!kaderoffset] + [\c!frameoffset] [\c!dimension!] [0pt] \variable - [\c!kaderdiepte] + [\c!framedepth] [\c!dimension!] [0pt] \variable - [\c!kaderhoek] - [\v!rond,\v!recht] - [\v!recht] + [\c!framecorner] + [\v!round,\v!rectangular] + [\v!rectangular] \variable - [\c!kaderstraal] + [\c!frameradius] [\c!dimension!] [.5\korpsgrootte] \variable - [\c!kaderkleur] + [\c!framecolor] [\c!identifier!] [] \variable - [\c!achtergrond] - [\v!raster,\v!kleur,\v!geen,\v!voorgrond,\c!identifier!] - [\v!geen] + [\c!background] + [\v!screen,\v!color,\v!none,\v!foreground,\c!identifier!] + [\v!none] \variable - [\c!achtergrondraster] + [\c!backgroundscreen] [\c!number!] [0.9] \variable - [\c!achtergrondkleur] + [\c!backgroundcolor] [\c!identifier!] [] \variable - [\c!achtergrondoffset] - [\v!kader,\c!dimension!] + [\c!backgroundoffset] + [\v!frame,\c!dimension!] [0pt] \variable - [\c!achtergronddiepte] + [\c!backgrounddepth] [\c!dimension!] [0pt] \variable - [\c!achtergrondhoek] - [\v!rond,\v!recht] - [\v!recht] + [\c!backgroundcorner] + [\v!round,\v!rectangular] + [\v!rectangular] \variable - [\c!achtergrondstraal] + [\c!backgroundradius] [\c!dimension!] [.5\korpsgrootte] \variable - [\c!diepte] + [\c!depth] [\c!dimension!] [0pt] \variable - [\c!hoek] - [\v!rond,\v!recht] - [\v!recht] + [\c!corner] + [\v!round,\v!rectangular] + [\v!rectangular] \variable - [\c!straal] + [\c!radius] [\c!dimension!] [.5\korpsgrootte] \variable - [\c!leeg] - [\v!ja,\v!nee] - [\v!nee] + [\c!empty] + [\v!yes,\v!no] + [\v!no] \variable - [\c!voorgrondkleur] + [\c!foregroundcolor] [\c!identifier!] [] \variable - [\c!voorgrondletter] + [\c!foregroundstyle] [\c!identifier!] [] \value @@ -1503,59 +1504,59 @@ \type [\c!var!] \variable - [\c!interlinie] - [\v!klein,\v!middel,\v!groot] - [\v!klein] + [\c!interlinespace] + [\v!small,\v!medium,\v!big] + [\v!small] \variable [\c!n] [\c!number!] [3] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!achtergrondkleur] + [\c!backgroundcolor] [\c!identifier!] [] \variable - [\c!hoogte] + [\c!height] [\c!dimension!,\v!max] [.5\linewidth] \variable - [\c!diepte] + [\c!depth] [\c!dimension!,\v!max] [.5\linewidth] \variable - [\c!variant] + [\c!alternative] [\v!a,\v!b,\v!c,\v!d] [\v!a] \variable - [\c!lijndikte] + [\c!rulethickness] [\c!dimension!] [] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!achtergrond] - [\v!kleur] + [\c!background] + [\v!color] [] \variable - [\c!achtergrondkleur] + [\c!backgroundcolor] [\c!identifier!] [] \stopsetup @@ -1602,48 +1603,48 @@ \type [\c!vars!] \variable - [\c!korps] - [5pt,...,12pt,\v!klein,\v!groot] + [\c!bodyfont] + [5pt,...,12pt,\v!small,\v!big] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!klein...,\c!command!] % \v!kap - [\v!vet] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!small...,\c!command!] % \v!cap + [\v!bold] \variable - [\c!links] + [\c!left] [\c!command!] [\hfill] \variable - [\c!rechts] + [\c!right] [\c!command!] [\hfill] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!binnen] + [\c!inner] [\c!command!] [] \variable - [\c!regelcorrectie] - [\v!aan,\v!uit] - [\v!aan] + [\c!linecorrection] + [\v!on,\v!off] + [\v!on] \variable - [\c!dieptecorrectie] - [\v!aan,\v!uit] - [\v!aan] + [\c!depthcorrection] + [\v!on,\v!off] + [\v!on] \variable - [\c!marge] - [\v!standaard,\v!ja,\v!nee] - [\v!standaard] + [\c!margin] + [\v!standard,\v!yes,\v!no] + [\v!standard] \variable - [\c!plaats] - [\v!links,\v!rechts,\v!midden,\v!geen] + [\c!location] + [\v!left,\v!right,\v!middle,\v!none] [] \inheritvariables [\y!setupframed] @@ -1669,7 +1670,7 @@ \type [\c!opt!\c!val!\c!opt!\c!vars!\c!stp!] \value - [\v!links,\v!rechts,\v!midden,\v!geen] + [\v!left,\v!right,\v!middle,\v!none] [] \inheritvariables [\y!setupframedtexts] @@ -1706,31 +1707,31 @@ \type [\c!vars!] \variable - [\c!linkeroffset] + [\c!leftoffset] [\c!dimension!] [.5\korpsgrootte] \variable - [\c!rechteroffset] + [\c!rightoffset] [\c!dimension!] [.5\korpsgrootte] \variable - [\c!bovenoffset] + [\c!topoffset] [\c!dimension!] [0pt] \variable - [\c!onderoffset] + [\c!bottomoffset] [\c!dimension!] [0pt] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \inheritvariables @@ -1764,35 +1765,35 @@ \type [\c!vars!] \variable - [\c!breedte] - [\v!passend,\v!ruim,\c!dimension!] - [\v!ruim] + [\c!width] + [\v!fit,\v!broad,\c!dimension!] + [\v!broad] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable [\c!n] [\c!number!] [1] \variable - [\c!interlinie] - [\v!klein,\v!middel,\v!groot] - [\v!klein] + [\c!interlinespace] + [\v!small,\v!medium,\v!big] + [\v!small] \variable - [\c!scheider] + [\c!separator] [\c!text!] [] \stopsetup @@ -1813,25 +1814,25 @@ \type [\c!vars!] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [3cm] \variable - [\c!marge] + [\c!margin] [\c!dimension!] [3cm] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \stopsetup \startsetup @@ -1840,43 +1841,43 @@ \type [\c!vars!] \variable - [\c!plaats] - [\v!links,\v!inmarge] - [\v!links] + [\c!location] + [\v!left,\v!inmargin] + [\v!left] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [2em] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [2em] \variable - [\c!korps] - [5pt,...,12pt,\v!klein,\v!groot] + [\c!bodyfont] + [5pt,...,12pt,\v!small,\v!big] [] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!lijnkleur] + [\c!rulecolor] [\c!identifier!] [] \stopsetup @@ -1887,7 +1888,7 @@ \type [\c!opt!\c!val!\c!opt!\c!arg!] \value - [\v!boven,\v!onder] + [\v!top,\v!bottom] [] \value [\c!text!] @@ -1900,7 +1901,7 @@ \type [\c!opt!\c!val!\c!opt!\c!arg!\c!stp!] \value - [\v!boven,\v!onder] + [\v!top,\v!bottom] [] \value [\c!text!] @@ -1933,23 +1934,23 @@ \type [\c!vars!] \variable - [\c!breedte] + [\c!width] [\c!dimension!,\v!max] [1.5em] \variable - [\c!hoogte] + [\c!height] [\c!dimension!,\v!max] [1ex] \variable - [\c!diepte] + [\c!depth] [\c!dimension!,\v!max] [0pt] \variable - [\c!variant] + [\c!alternative] [\c!a,\c!b] [\c!a] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [.25ex] \variable @@ -1988,12 +1989,12 @@ \stopsetup \startsetup - \command[\y!geentest] + \command[\y!donttest] \type[] \stopsetup \startsetup - \command[\y!startdeelomgeving] + \command[\e!start\v!localenvironment] \type[\c!stp!] \stopsetup @@ -2003,7 +2004,7 @@ \type [\c!vars!] \variable - [\c!resolutie] + [\c!resolution] [\c!number!] [] \variable @@ -2011,12 +2012,12 @@ [\c!text!] [\jobname] \variable - [\c!gebied] + [\c!directory] [\c!text!] [] \variable - [\c!willekeur] - [\v!normaal,\v!klein,\v!middel,\v!groot,\c!number!] + [\c!random] + [\v!normal,\v!small,\v!medium,\v!big,\c!number!] [] \stopsetup @@ -2045,7 +2046,7 @@ \startsetup \command[\y!lohi] \type[\c!opt!\c!val!\c!arg!\c!arg!] - \value[\v!laag][] + \value[\v!low][] \value[\c!text!][] \value[\c!text!][] \stopsetup @@ -2056,7 +2057,7 @@ \type [\c!opt!\c!val!] \value - [\v!tekst,\v!marge,\v!rand] + [\v!text,\v!margin,\v!edge] [] \stopsetup @@ -2068,54 +2069,68 @@ % \stopsetup \startsetup - \command[\y!regellinks] + \command[\y!leftaligned] \type[\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\y!regelrechts] + \command[\y!rightaligned] \type[\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\y!regelmidden] + \command[\y!midaligned] \type[\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\y!woordrechts] + \command[\y!wordright] \type[\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\y!inmarge] + \command[\y!inmargin] \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!] - \value[+,-,\v!laag][] + \value[+,-,\v!low][] \value[\c!text!][] \stopsetup \startsetup - \command[\y!inanderemarge] + \command[\y!inothermargin] \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!] - \value[+,-,\v!laag][] + \value[+,-,\v!low][] \value[\c!text!][] \stopsetup \startsetup - \command[\y!inlinker] + \command[\y!inleft] \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!] - \value[+,-,\v!laag][] + \value[+,-,\v!low][] \value[\c!text!][] \stopsetup \startsetup - \command[\y!inrechter] + \command[\y!inright] \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!] - \value[+,-,\v!laag][] + \value[+,-,\v!low][] + \value[\c!text!][] +\stopsetup + +\startsetup + \command[\y!ininner] + \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!] + \value[+,-,\v!low][] + \value[\c!text!][] +\stopsetup + +\startsetup + \command[\y!inouter] + \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!] + \value[+,-,\v!low][] \value[\c!text!][] \stopsetup @@ -2160,126 +2175,126 @@ % \stopsetup \startsetup - \command[\y!margetekst] + \command[\y!margintext] \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!] - \value[+,-,\v!laag][] + \value[+,-,\v!low][] \value[\c!text!][] \stopsetup \startsetup \command - [\y!stelmargeblokkenin] + [\y!setupmarginblocks] \type [\c!vars!] \variable - [\c!plaats] - [\v!inmarge,\v!links,\v!midden,\v!rechts] - [\v!inmarge] + [\c!location] + [\v!inmargin,\v!left,\v!middle,\v!right] + [\v!inmargin] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!uitlijnen] - [\v!links,\v!midden,\v!rechts,\v!nee] + [\c!align] + [\v!left,\v!middle,\v!right,\v!no] [] \variable - [\c!boven] + [\c!top] [\c!command!] [] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] - [\blanko] + [\blank] \variable - [\c!onder] + [\c!bottom] [\c!command!] [\vfill] \variable - [\c!links] + [\c!left] [\c!command!] [] \variable - [\c!rechts] + [\c!right] [\c!command!] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \stopsetup \startsetup \command - [\y!startmargeblok] + [\y!startmarginblock] \type [\c!stp!] \stopsetup \startsetup - \command[\v!deel] + \command[\v!part] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\v!titel] + \command[\v!title] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\v!hoofdstuk] + \command[\v!chapter] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\v!paragraaf] + \command[\v!section] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\v!sub\v!paragraaf] + \command[\v!subsection] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\v!sub\v!sub\v!paragraaf] + \command[\v!subsubsection] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\v!onderwerp] + \command[\v!subject] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\v!sub\v!onderwerp] + \command[\v!subsubject] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\v!sub\v!sub\v!onderwerp] + \command[\v!subsubsubject] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup \startsetup - \command[\v!bijlage] + \command[\v!appendix] \type[\c!opt!\c!refs!\c!arg!] \value[\c!text!][] \stopsetup @@ -2291,13 +2306,13 @@ \stopsetup \startsetup - \command[\y!op] + \command[\y!at] \type[\c!optint!\c!arg!\c!optint!\c!arg!\c!ref!] \value[\c!text!][] \stopsetup \startsetup - \command[\y!over] + \command[\y!about] \type[\c!optint!\c!arg!\c!ref!] \value[\c!text!][] \stopsetup @@ -2359,15 +2374,15 @@ [\c!identifier!] [] \variable - [\c!links] + [\c!left] [\c!text!] [] \variable - [\c!rechts] + [\c!right] [\c!text!] [] \variable - [\c!tekst] + [\c!text] [\c!text!] [] \variable @@ -2379,7 +2394,7 @@ % rudiment % % \startsetup -% \command[\y!definieerhbox] +% \command[\y!definehbox] % \type[\c!val!\c!val!] % \value[\c!identifier!][] % \value[\c!number!][] @@ -2398,18 +2413,18 @@ \stopsetup \startsetup - \command[\y!omlaag] + \command[\y!godown] \type[\c!val!] \value[\c!dimension!][] \stopsetup \startsetup - \command[\y!witruimte] + \command[\y!whitespace] \type[] \stopsetup \startsetup - \command[\y!geenwitruimte] + \command[\y!nowhitespace] \type[] \stopsetup @@ -2440,167 +2455,171 @@ \stopsetup \startsetup - \command[\y!opelkaar] + \command[\y!packed] \type[] \stopsetup -\startsetup - \command[\y!herhaal] - \type[\c!val!] - \value[\c!repeat!\c!text!][] -\stopsetup +% \startsetup +% \command[\y!redo] +% \type[\c!val!] +% \value[\c!repeat!\c!text!][] +% \stopsetup \startsetup \command - [\y!steldoordefinierenin] + [\y!setupdescriptions] \type [\c!opt!\c!vals!\c!vars!] \value [\c!identifier!] [] \variable - [\c!kopletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!headstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!breedte] - [\v!passend,\v!ruim,\c!dimension!] + [\c!width] + [\v!fit,\v!broad,\c!dimension!] [8em] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [0pt] \variable - [\c!monster] + [\c!sample] [\c!text!] [] \variable - [\c!tekst] + [\c!text] [\c!text!] [] \variable - [\c!uitlijnen] - [\v!links,\v!midden,\v!rechts] + [\c!align] + [\v!left,\v!middle,\v!right] [] \variable - [\c!marge] - [\v!standaard,\v!ja,\v!nee,\c!dimension!] + [\c!margin] + [\v!standard,\v!yes,\v!no,\c!dimension!] [] \variable - [\c!plaats] - [\v!links,\v!rechts,\v!boven,\v!aanelkaar, - \v!inmarge,\v!inlinker,\v!inrechter,\v!hangend] - [\v!links] + [\c!location] + [\v!left,\v!right,\v!top,\v!serried,\c!command, + \v!inmargin,\v!inleft,\v!inright,\v!hanging] + [\v!left] + \variable + [\c!headcommand] + [] + [] \variable [\c!hang] - [\v!passend,\v!ruim,\c!number!] + [\v!fit,\v!broad,\c!number!] [] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!springvolgendein] - [\v!ja,\v!nee] - [\v!ja] + [\c!indentnext] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!inspringen] - [\v!nooit,\v!niet,\v!nee,\v!ja,\v!altijd,\v!eerste,\v!volgende] - [\v!nooit] + [\c!indenting] + [\v!never,\v!not,\v!no,\v!yes,\v!always,\v!first,\v!next] + [\v!never] \stopsetup \startsetup \command - [\y!steldoornummerenin] + [\y!setupenumerations] \type [\c!opt!\c!vals!\c!vars!] \value [\c!identifier!] [] \inheritvariables - [\y!doordefinieren] + [\y!definedescription] [] \variable - [\c!plaats] - [\v!links,\v!rechts,\v!boven,\v!aanelkaar, - \v!inmarge,\v!inlinker,\v!inrechter,\v!hangend] - [\v!boven] + [\c!location] + [\v!left,\v!right,\v!top,\v!serried, + \v!inmargin,\v!inleft,\v!inright,\v!hanging] + [\v!top] \variable - [\c!tekst] + [\c!text] [\c!text!] [] \variable - [\c!niveaus] + [\c!levels] [\c!number!] [3] \variable - [\c!conversie] - [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins] - [\v!cijfers] + [\c!conversion] + [\v!numbers,\v!characters,\v!Characters,\v!romannumerals,\v!Romannumerals] + [\v!numbers] \variable - [\c!wijze] - [\v!per\v!tekst,\v!per\c!section!] - [\v!per\v!tekst] + [\c!way] + [\v!by\v!text,\v!by\c!section!] + [\v!by\v!text] \variable - [\c!blokwijze] - [\v!ja,\v!nee] - [\v!ja] + [\c!blockway] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!sectienummer] - [\v!ja,\v!nummer,\v!nee] + [\c!sectionnumber] + [\v!yes,\v!number,\v!no] [] \variable - [\c!scheider] + [\c!separator] [\c!text!] [.] \variable - [\c!afsluiter] + [\c!stopper] [\c!text!] [] \variable - [\c!koppeling] + [\c!coupling] [\c!identifier!] [] \variable - [\c!koppelwijze] - [\v!globaal,\v!lokaal] - [\v!lokaal] + [\c!couplingway] + [\v!global,\v!local] + [\v!local] \variable - [\c!nummer] - [\v!nee,\c!identifier!] + [\c!number] + [\v!no,\c!identifier!] [] \variable - [\c!titeluitlijnen] - [\v!nee,\v!ja] - [\v!ja] + [\c!aligntitle] + [\v!no,\v!yes] + [\v!yes] \variable [\c!start] [\c!number!] [0] \inheritvariables - [\y!steldoornummerenin] + [\y!setupenumerations] [] \stopsetup \startsetup \command - [\y!doornummeren] + [\y!defineenumeration] \type [\c!vals!\c!opt!\c!val!\c!opt!\c!vars!] \value @@ -2610,13 +2629,13 @@ [\c!identifier!] [] \inheritvariables - [\y!steldoornummerenin] + [\y!setupenumerations] [] \stopsetup \startsetup \command - [<<\y!doornummering>>] + [<<\y!enumeration>>] \type [\c!optint!\c!nop!\c!par!] \value @@ -2626,27 +2645,27 @@ \startsetup \command - [\e!start<<\y!doornummering>>] + [\e!start<<\y!enumeration>>] \type [\c!stp!] \stopsetup \startsetup \command - [\y!doordefinieren] + [\y!definedescription] \type [\c!val!\c!opt!\c!vars!] \value [\c!identifier!] [] \inheritvariables - [\y!steldoordefinierenin] + [\y!setupdescriptions] [] \stopsetup \startsetup \command - [<<\y!doordefinitie>>] + [<<\y!description>>] \type [\c!arg!\c!nop!\c!par!] \value @@ -2659,7 +2678,7 @@ \startsetup \command - [\e!start<<\y!doordefinitie>>] + [\e!start<<\y!description>>] \type [\c!arg!\c!stp!] \value @@ -2669,66 +2688,66 @@ \startsetup \command - [\y!steldoorspringenin] + [\y!setupindentations] \type [\c!opt!\c!vals!\c!vars!] \value [\c!identifier!] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!kopletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!headstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!breedte] - [\v!passend,\c!dimension!] - [\v!passend] + [\c!width] + [\v!fit,\c!dimension!] + [\v!fit] \variable - [\c!tekst] + [\c!text] [\c!text!] [] \variable - [\c!monster] + [\c!sample] [\c!text!] [] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \variable - [\c!scheider] + [\c!separator] [\c!text!] [{:}] \stopsetup \startsetup \command - [\y!doorspringen] + [\y!defineindenting] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \inheritvariables - [\y!steldoorspringenin] + [\y!setupindentations] [] \stopsetup \startsetup \command - [<<\y!doorsprong>>] + [<<\y!indentation>>] \type [\c!nop!\c!par!] \value @@ -2738,56 +2757,56 @@ \startsetup \command - [\y!doorlabelen] + [\y!definelabel] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \variable - [\c!tekst] + [\c!text] [\c!text!] [] \variable - [\c!plaats] - [\v!inmarge,\v!intekst] - [\v!intekst] + [\c!location] + [\v!inmargin,\v!intext] + [\v!intext] \variable - [\c!wijze] - [\v!per\v!tekst,\v!per\c!section!] - [\v!per\v!hoofdstuk] + [\c!way] + [\v!by\v!text,\v!by\c!section!] + [\v!by\v!chapter] \variable - [\c!blokwijze] - [\v!ja,\v!nee] - [\v!ja] + [\c!blockway] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!kopletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!headstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [] \variable - [\c!kopkleur] + [\c!headcolor] [\c!identifier!] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \stopsetup \startsetup \command - [<<\y!doorlabel>>] + [<<\y!labeling>>] \type [\c!opt!\c!ref!] \stopsetup \startsetup \command - [\y!stelkolommenin] + [\y!setupcolumns] \type [\c!vars!] \variable @@ -2795,45 +2814,45 @@ [\c!number!] [2] \variable - [\c!nboven] + [\c!ntop] [\c!number!] [1] \variable - [\c!lijn] - [\v!aan,\v!uit] - [\v!uit] + [\c!rule] + [\v!on,\v!off] + [\v!off] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [] \variable - [\c!tolerantie] - [\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel,\v!rek] - [\v!soepel] + [\c!tolerance] + [\v!verystrict,\v!strict,\v!tolerant,\v!verytolerant,\v!stretch] + [\v!tolerant] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1.5em] \variable - [\c!balanceren] - [\v!ja,\v!nee] - [\v!ja] + [\c!balance] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!uitlijnen] - [\v!ja,\v!nee,\v!tekst] - [\v!tekst] + [\c!align] + [\v!yes,\v!no,\v!text] + [\v!text] \variable - [\c!blanko] - [\v!vast,\v!halveregel,\v!regel,\v!flexibel,\v!groot,\v!middel,\v!klein] - [\v!vast,\v!regel] + [\c!blank] + [\v!fixed,\v!halfline,\v!line,\v!flexible,\v!big,\v!medium,\v!small] + [\v!fixed,\v!line] \variable - [\c!optie] - [\v!achtergrond] + [\c!option] + [\v!background] [] \variable - [\c!richting] - [\v!links,\v!rechts] - [\v!rechts] + [\c!direction] + [\v!left,\v!right] + [\v!right] \inheritvariables [\y!setupframed] [] @@ -2841,11 +2860,11 @@ \startsetup \command - [\y!startkolommen] + [\y!startcolumns] \type [\c!opt!\c!vars!\c!stp!] \inheritvariables - [\y!stelkolommenin] + [\y!setupcolumns] [] \stopsetup @@ -2858,7 +2877,7 @@ [\c!identifier!] [] \value - [\v!hoofd,\v!voet] + [\v!header,\v!footer] [] \value [\c!text!] @@ -2877,43 +2896,43 @@ \type [\c!opt!\c!val!\c!vars!] \value - [\v!tekst,\v!marge,\v!rand] - [\v!tekst] + [\v!text,\v!margin,\v!edge] + [\v!text] \variable - [\c!status] - [\v!normaal,\v!stop,\v!start,\v!leeg,\v!hoog,\v!geen, - \v!geenmarkering,\c!identifier!] - [\v!normaal] + [\c!state] + [\v!normal,\v!stop,\v!start,\v!empty,\v!high,\v!none, + \v!nomarking,\c!identifier!] + [\v!normal] \variable [\c!strut] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!linkerletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!leftstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!rechterletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!rightstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!linkerbreedte] + [\c!leftwidth] [\c!dimension!] [] \variable - [\c!rechterbreedte] + [\c!rightwidth] [\c!dimension!] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \stopsetup @@ -2986,13 +3005,13 @@ \type [\c!opt!\c!val!\c!val!\c!val!] \value - [\v!tekst,\v!marge,\v!rand] - [\v!tekst] + [\v!text,\v!margin,\v!edge] + [\v!text] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \stopsetup @@ -3002,13 +3021,13 @@ \type [\c!opt!\c!val!\c!val!\c!val!] \value - [\v!tekst,\v!marge,\v!rand] - [\v!tekst] + [\v!text,\v!margin,\v!edge] + [\v!text] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \stopsetup @@ -3018,13 +3037,13 @@ \type [\c!opt!\c!val!\c!val!\c!val!] \value - [\v!tekst,\v!marge,\v!rand] - [\v!tekst] + [\v!text,\v!margin,\v!edge] + [\v!text] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \stopsetup @@ -3034,13 +3053,13 @@ \type [\c!opt!\c!val!\c!val!\c!val!] \value - [\v!tekst,\v!marge,\v!rand] - [\v!tekst] + [\v!text,\v!margin,\v!edge] + [\v!text] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \stopsetup @@ -3050,19 +3069,19 @@ \type [\c!opt!\c!val!\c!val!\c!val!] \value - [\v!tekst,\v!marge,\v!rand] - [\v!tekst] + [\v!text,\v!margin,\v!edge] + [\v!text] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \value - [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer] + [\c!text!,\c!section!,\v!date,\c!marker!,\v!pagenumber] [] \stopsetup \startsetup \command - [\y!definieermarkering] + [\y!definemarking] \type [\c!val!\c!opt!\c!val!] \value @@ -3075,7 +3094,7 @@ \startsetup \command - [\y!koppelmarkering] + [\y!couplemarking] \type [\c!val!\c!val!] \value @@ -3088,7 +3107,7 @@ \startsetup \command - [\y!ontkoppelmarkering] + [\y!decouplemarking] \type [\c!val!] \value @@ -3098,7 +3117,7 @@ \startsetup \command - [\y!resetmarkering] + [\y!resetmarking] \type [\c!val!] \value @@ -3108,24 +3127,24 @@ \startsetup \command - [\y!stelmarkeringin] + [\y!setupmarking] \type [\c!val!\c!var!] \value [\c!identifier!] [] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \variable - [\c!scheider] + [\c!separator] [\c!command!] [---] \variable - [\c!expansie] - [\v!ja,\v!nee] - [\v!nee] + [\c!expansion] + [\v!yes,\v!no] + [\v!no] \stopsetup \startsetup @@ -3143,20 +3162,20 @@ \startsetup \command - [\y!haalmarkering] + [\y!getmarking] \type [\c!val!\c!val!] \value [\c!identifier!] [] \value - [\v!eerste,\v!laatste,\v!vorige,\v!beide,\v!alles,\v!huidige] + [\v!first,\v!last,\v!previous,\v!both,\v!all,\v!current] [] \stopsetup \startsetup \command - [\y!geenmarkering] + [\y!nomarking] \type [\c!arg!] \value @@ -3170,116 +3189,116 @@ \type [\c!vars!] \variable - [\c!breedte] - [\c!dimension!,\v!passend,\v!midden] + [\c!width] + [\c!dimension!,\v!fit,\v!middle] [15cm] \variable - [\c!hoogte] - [\c!dimension!,\v!passend,\v!midden] + [\c!height] + [\c!dimension!,\v!fit,\v!middle] [25cm] \variable - [\c!rugwit] + [\c!backspace] [\c!dimension!] [2.5cm] \variable - [\c!kopwit] + [\c!topspace] [\c!dimension!] [2.5cm] \variable - [\c!marge] + [\c!margin] [\c!dimension!] [2.5cm] \variable - [\c!linkermarge] + [\c!leftmargin] [\c!dimension!] [] \variable - [\c!rechtermarge] + [\c!rightmargin] [\c!dimension!] [] \variable - [\c!hoofd] + [\c!header] [\c!dimension!] [2.0cm] \variable - [\c!voet] + [\c!footer] [\c!dimension!] [2.0cm] \variable - [\c!boven] + [\c!top] [\c!dimension!] [2.0cm] \variable - [\c!onder] + [\c!bottom] [\c!dimension!] [2.0cm] \variable - [\c!linkerrand] + [\c!leftedge] [\c!dimension!] [3cm] \variable - [\c!rechterrand] + [\c!rightedge] [\c!dimension!] [3cm] \variable - [\c!hoofdafstand] + [\c!headerdistance] [\c!dimension!] [0pt] \variable - [\c!voetafstand] + [\c!footerdistance] [\c!dimension!] [0pt] \variable - [\c!bovenafstand] + [\c!topdistance] [\c!dimension!] [0pt] \variable - [\c!onderafstand] + [\c!bottomdistance] [\c!dimension!] [0pt] \variable - [\c!linkermargeafstand] + [\c!leftmargindistance] [\c!dimension!] [12pt] \variable - [\c!rechtermargeafstand] + [\c!rightmargindistance] [\c!dimension!] [12pt] \variable - [\c!linkerrandafstand] + [\c!leftedgedistance] [\c!dimension!] [12pt] \variable - [\c!rechterrandafstand] + [\c!rightedgedistance] [\c!dimension!] [12pt] \variable - [\c!rugoffset] + [\c!horoffset] [\c!dimension!] [0pt] \variable - [\c!kopoffset] + [\c!veroffset] [\c!dimension!] [0pt] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!markering] - [\v!aan,\v!uit,\v!kleur,\v!raster,\v!tekst] - [\v!uit] + [\c!marking] + [\v!on,\v!off,\v!color,\v!screen,\v!text] + [\v!off] \variable - [\c!plaats] - [\v!links,\v!midden,\v!rechts,\v!onder,\v!boven, - \v!enkelzijdig,\v!dubbelzijdig] - [\v!enkelzijdig] + [\c!location] + [\v!left,\v!middle,\v!right,\v!bottom,\v!top, + \v!singlesided,\v!doublesided] + [\v!singlesided] \variable - [\c!schaal] + [\c!scale] [\c!dimension!] [1] \variable @@ -3299,61 +3318,69 @@ [\c!dimension!] [0pt] \variable - [\c!regels] + [\c!lines] [\c!number!] [0] \variable - [\c!kolommen] + [\c!columns] [\c!number!] [0] \variable - [\c!kolomafstand] + [\c!columndistance] [\c!dimension!] [0pt] \variable [\c!grid] - [\v!ja,\v!nee] - [\v!nee] + [\v!yes,\v!no] + [\v!no] \variable - [\c!bodemwit] + [\c!bottomspace] [\c!dimension!] [] \variable - [\c!snijwit] + [\c!cutspace] [\c!dimension!] [] \variable - [\c!tekstafstand] + [\c!textdistance] [\c!dimension!] [] \variable - [\c!tekstbreedte] + [\c!textwidth] [\c!number!] [] \variable - [\c!tekstmarge] + [\c!textmargin] [\c!dimension!] [] \variable [\c!clipoffset] [\c!dimension!] [\!!zeropoint] + \variable + [\c!page] + [\c!identifier!] + [] + \variable + [\c!paper] + [\c!identifier!] + [] \stopsetup \startsetup \command - [\y!paslayoutaan] + [\y!adaptlayout] \type [\c!opt!\c!vals!\c!vars!] \value [\c!number!] [] \variable - [\c!hoogte] + [\c!height] [\c!dimension!,\v!max] [] \variable - [\c!regels] + [\c!lines] [\c!number!] [] \stopsetup @@ -3367,24 +3394,24 @@ \startsetup \command - [\y!plaatsopgrid] + [\y!placeongrid] \type [\c!opt!\c!val!\c!arg!] \inheritvalues - [\y!verplaatsopgrid] + [\y!moveongrid] [] \stopsetup \startsetup \command - [\y!verplaatsopgrid] + [\y!moveongrid] \type [\c!opt!\c!vals!] \value - [\v!boven,\v!beide,\v!onder,-\v!boven,-\v!beide,-\v!onder,\v!tekst, - \v!hoog,\v!midden,\v!laag,\v!pagina,\v!geen,\v!standaard, - \v!ruim,\v!passend,\v!diepte,\v!regel,\c!dimension!] - [\v!standaard] + [\v!top,\v!both,\v!bottom,-\v!top,-\v!both,-\v!bottom,\v!text, + \v!high,\v!middle,\v!low,\v!page,\v!none,\v!standard, + \v!broad,\v!fit,\v!depth,\v!line,\c!dimension!] + [\v!standard] \stopsetup \startsetup @@ -3399,7 +3426,7 @@ \startsetup \command - [\y!startomgeving] + [\y!startenvironment] \type [\c!fil!\c!stp!] \value @@ -3409,7 +3436,7 @@ \startsetup \command - [\y!startprodukt] + [\y!startproduct] \type [\c!fil!\c!stp!] \value @@ -3419,7 +3446,7 @@ \startsetup \command - [\y!startonderdeel] + [\y!startcomponent] \type [\c!fil!\c!stp!] \value @@ -3429,7 +3456,7 @@ \startsetup \command - [\y!geenfilesmeer] + [\y!nomorefiles] \type [] \stopsetup @@ -3440,26 +3467,26 @@ \type [\c!opt!\c!or!\c!val!\c!vars!] \value - [\v!reset,\v!klein,\v!middel,\v!groot,\v!aan,\v!uit] - [\v!klein] + [\v!reset,\v!small,\v!medium,\v!big,\v!on,\v!off] + [\v!small] \variable - [\v!hoogte] + [\v!height] [\c!number!] [0.72] \variable - [\v!diepte] + [\v!depth] [\c!number!] [0.28] \variable - [\v!regel] + [\v!line] [\c!dimension!] [2.8ex] \variable - [\v!boven] + [\v!top] [\c!number!] [1.0] \variable - [\v!onder] + [\v!bottom] [\c!number!] [0.4] \stopsetup @@ -3470,69 +3497,69 @@ \type [\c!vars!] \variable - [\c!variant] - [\v!enkelzijdig,\v!dubbelzijdig] - [\v!enkelzijdig] + [\c!alternative] + [\v!singlesided,\v!doublesided] + [\v!singlesided] \variable - [\c!plaats] - [\v!hoofd,\v!voet, - \v!links,\v!rechts,\v!midden, - \v!marge,\v!kantlijn,\v!inlinker,\v!inrechter] - [\v!midden] + [\c!location] + [\v!header,\v!footer, + \v!left,\v!right,\v!middle, + \v!margin,\v!marginedge,\v!inleft,\v!inright] + [\v!middle] \variable - [\c!conversie] - [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins] - [\v!cijfers] + [\c!conversion] + [\v!numbers,\v!characters,\v!Characters,\v!romannumerals,\v!Romannumerals] + [\v!numbers] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!links] + [\c!left] [\c!text!] [] \variable - [\c!rechts] + [\c!right] [\c!text!] [] \variable - [\c!wijze] - [\v!per\v!tekst,\v!per\c!section!] - [\v!per\v!deel] + [\c!way] + [\v!by\v!text,\v!by\c!section!] + [\v!by\v!part] \variable - [\c!tekst] + [\c!text] [\c!text!] [] \variable - [\c!nummerscheider] + [\c!numberseparator] [\c!text!] [--] \variable - [\c!tekstscheider] + [\c!textseparator] [\c!text!] [] \variable [\c!sectionnumber!] - [\v!ja,\v!nee] + [\v!yes,\v!no] [] \variable - [\c!scheider] + [\c!separator] [\c!text!] [--] \variable [\c!strut] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!commando] + [\c!command] [\c!oneargument!] [] \stopsetup @@ -3543,22 +3570,22 @@ \type [\c!vars!] \variable - [\c!links] + [\c!left] [\c!dimension!] [1.5em] \variable - [\c!rechts] + [\c!right] [\c!dimension!] [1.5em] \variable - [\c!midden] + [\c!middle] [\c!dimension!] [1.5em] \stopsetup \startsetup \command - [\y!definieer] + [\y!define] \type [\c!opt!\c!val!\c!cmd!\c!arg!] \value @@ -3568,7 +3595,7 @@ \startsetup \command - [\y!gebruikcommandos] + [\y!usecommands] \type [\c!arg!] \stopsetup @@ -3582,201 +3609,201 @@ [\c!identifier!] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!commandos] + [\c!commands] [\c!command!] [] \stopsetup \startsetup \command - [\y!stelkoppenin] + [\y!setupheads] \type [\c!vars!] \variable - [\c!sectienummer] - [\v!ja,\v!nummer,\v!nee] - [\v!ja] + [\c!sectionnumber] + [\v!yes,\v!number,\v!no] + [\v!yes] \variable - [\c!variant] - [\v!normaal,\v!marge,\v!midden,\v!tekst,\v!alinea] - [\v!normaal] + [\c!alternative] + [\v!normal,\v!margin,\v!middle,\v!text,\v!paragraph] + [\v!normal] \variable - [\c!scheider] + [\c!separator] [\c!text!] [.] \variable - [\c!uitlijnen] - [\v!links,\v!rechts,\v!normaal,\v!ruim] - [\v!normaal] + [\c!align] + [\v!left,\v!right,\v!normal,\v!broad] + [\v!normal] \variable - [\c!titeluitlijnen] - [\v!ja,\v!nee] - [\v!nee] + [\c!aligntitle] + [\v!yes,\v!no] + [\v!no] \variable - [\c!tolerantie] - [\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel,\v!rek] - [\v!soepel] + [\c!tolerance] + [\v!verystrict,\v!strict,\v!tolerant,\v!verytolerant,\v!stretch] + [\v!tolerant] \variable - [\c!springvolgendein] - [\v!ja,\v!nee] - [\v!nee] + [\c!indentnext] + [\v!yes,\v!no] + [\v!no] \variable - [\c!commando] + [\c!command] [\c!twoarguments!] [] \variable - [\c!marge] + [\c!margin] [\c!dimension!] [0pt] \stopsetup \startsetup \command - [\y!stelblokkopjesin] + [\y!setupcaptions] \type [\c!vars!] \variable - [\c!plaats] - [\v!boven,\v!onder,\v!geen,\v!hoog,\v!laag,\v!midden] - [\v!onder] + [\c!location] + [\v!top,\v!bottom,\v!none,\v!high,\v!low,\v!middle] + [\v!bottom] \variable - [\c!breedte] - [\v!passend,\v!ruim,\v!max,\c!dimension!] - [\v!passend] + [\c!width] + [\v!fit,\v!broad,\v!max,\c!dimension!] + [\v!fit] \variable - [\c!minbreedte] - [\v!passend,\c!dimension!] - [\v!passend] + [\c!minwidth] + [\v!fit,\c!dimension!] + [\v!fit] \variable - [\c!kopletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!headstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!nummer] - [\v!ja,\v!nee] - [\v!ja] + [\c!number] + [\v!yes,\v!no] + [\v!yes] %\variable - % [\c!voor] + % [\c!before] % [\c!command!] - % [\blanko] + % [\blank] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] - []% {\blanko[\v!middel]}] + []% {\blank[\v!medium]}] %\variable - % [\c!na] + % [\c!after] % [\c!command!] - % [\blanko] + % [\blank] \variable - [\c!uitlijnen] - [\v!links,\v!midden,\v!rechts,\v!nee] + [\c!align] + [\v!left,\v!middle,\v!right,\v!no] [] \variable - [\c!conversie] - [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins] - [\v!cijfers] + [\c!conversion] + [\v!numbers,\v!characters,\v!Characters,\v!romannumerals,\v!Romannumerals] + [\v!numbers] \variable - [\c!wijze] - [\v!per\v!tekst,\v!per\c!section!] - [\v!per\v!tekst] + [\c!way] + [\v!by\v!text,\v!by\c!section!] + [\v!by\v!text] \variable - [\c!scheider] + [\c!separator] [\c!text!] [.] \variable - [\c!commando] + [\c!command] [\c!command!] [] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \stopsetup \startsetup \command - [\y!stelblokkopjein] + [\y!setupcaption] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \inheritvariables - [\y!stelblokkopjesin] + [\y!setupcaptions] [] \stopsetup \startsetup \command - [\y!stelplaatsblokkenin] + [\y!setupfloats] \type [\c!vars!] \variable - [\c!plaats] - [\v!links,\v!rechts,\v!midden] - [\v!midden] + [\c!location] + [\v!left,\v!right,\v!middle] + [\v!middle] \variable - [\c!breedte] - [\v!passend,\c!dimension!] - [\v!passend] + [\c!width] + [\v!fit,\c!dimension!] + [\v!fit] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!marge] + [\c!margin] [\c!dimension!] [1em] \variable - [\c!voorwit] - [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot,\v!geen] + [\c!spacebefore] + [\c!repeat!\v!small,\c!repeat!\v!medium,\c!repeat!\v!big,\v!none] [] \variable - [\c!nawit] - [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot,\v!geen] + [\c!spaceafter] + [\c!repeat!\v!small,\c!repeat!\v!medium,\c!repeat!\v!big,\v!none] [] \variable - [\c!zijvoorwit] - [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot,\v!geen] + [\c!sidespacebefore] + [\c!repeat!\v!small,\c!repeat!\v!medium,\c!repeat!\v!big,\v!none] [] \variable - [\c!zijnawit] - [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot,\v!geen] + [\c!sidespaceafter] + [\c!repeat!\v!small,\c!repeat!\v!medium,\c!repeat!\v!big,\v!none] [] \variable - [\c!springvolgendein] - [\v!ja,\v!nee] - [\v!ja] + [\c!indentnext] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!nboven] + [\c!ntop] [\c!number!] [2] \variable - [\c!nonder] + [\c!nbottom] [\c!number!] [0] \variable - [\c!nregels] + [\c!nlines] [\c!number!] [4] \variable @@ -3784,21 +3811,21 @@ [\c!identifier!] [] \variable - [\c!tolerantie] + [\c!tolerance] [0,1,2] [1] \variable - [\c!linkermargeafstand] + [\c!leftmargindistance] [\c!dimension!] [\!!zeropoint] \variable - [\c!rechtermargeafstand] + [\c!rightmargindistance] [\c!dimension!] [\!!zeropoint] \variable - [\c!zijuitlijnen] - [\v!normaal,\v!regel] - [\v!normaal] + [\c!sidealign] + [\v!normal,\v!line] + [\v!normal] \inheritvariables [\y!setupframed] [] @@ -3806,54 +3833,66 @@ \startsetup \command - [\y!stelplaatsblokkensplitsenin] + [\y!setupfloatsplitting] \type [\c!vars!] \variable - [\c!conversie] - [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins] - [\v!letter] + [\c!conversion] + [\v!numbers,\v!characters,\v!Characters,\v!romannumerals,\v!Romannumerals] + [\v!character] \variable - [\c!regels] + [\c!lines] [\c!number!] [3] \stopsetup \startsetup \command - [\y!splitsplaatsblok] + [\y!splitfloat] \type [\c!opt!\c!vars!\c!arg!\c!arg!] \inheritvariables - [\y!stelplaatsblokkensplitsenin] + [\y!setupfloatsplitting] [] \stopsetup \startsetup \command - [\y!stelnaastplaatsenin] + [\y!setupoppositeplacing] \type [\c!var!] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!stop] + \variable + [\c!before] + [\c!command!] + [] + \variable + [\c!inbetween] + [\c!command!] + [\blank] + \variable + [\c!after] + [\c!command!] + [] \stopsetup \startsetup \command - [\y!startnaast] + [\y!startopposite] \type [\c!stp!] \stopsetup \startsetup \command - [\y!stelkoppeltekenin] + [\y!setuphyphenmark] \type [\c!var!] \variable - [\c!teken] + [\c!sign] [--,---,-,~,(,),=,/] [--] \stopsetup @@ -3864,11 +3903,11 @@ \type [\c!vars!] \variable - [\c!status] + [\c!state] [\v!start,\v!overlay] [\v!start] \variable - [\c!eenheid] + [\c!unit] [\s!cm,\s!pt,\s!em,\s!mm,\s!ex,\s!es,\s!in] [\s!cm] \variable @@ -3876,21 +3915,21 @@ [\c!number!] [1] \variable - [\c!schaal] + [\c!scale] [\c!number!] [1] \variable [\c!offset] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!xstap] - [\v!absoluut,\v!relatief] - [\v!absoluut] + [\c!xstep] + [\v!absolute,\v!relative] + [\v!absolute] \variable - [\c!ystap] - [\v!absoluut,\v!relatief] - [\v!absoluut] + [\c!ystep] + [\v!absolute,\v!relative] + [\v!absolute] \stopsetup \startsetup @@ -3930,33 +3969,33 @@ [\c!number!] [0.5] \variable - [\c!xstap] + [\c!xstep] [\c!number!] [0] \variable - [\c!ystap] + [\c!ystep] [\c!number!] [0] \variable [\c!offset] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable [\c!factor] [\c!number!] [1] \variable - [\c!schaal] + [\c!scale] [\c!number!] [1] \variable - [\c!eenheid] + [\c!unit] [\s!cm,\s!pt,\s!em,\s!mm,\s!ex,\s!es,\s!in] [\s!cm] \variable - [\c!plaats] - [\v!links,\v!midden] - [\v!links] + [\c!location] + [\v!left,\v!middle] + [\v!left] \stopsetup @@ -3966,10 +4005,10 @@ \type [\c!vals!] \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!start,\v!stop] - [\v!ja] + [\v!yes,\v!makeup,\v!no,\v!preference,\v!bigpreference, + \v!left,\v!right,\v!disable,\v!last,\v!quadruple, + \v!even,\v!odd,\v!blank,\v!empty,\v!reset,\v!start,\v!stop] + [\v!yes] \stopsetup \startsetup @@ -3978,49 +4017,49 @@ \type [\c!vars!] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \variable [\c!sectionnumber!] - [\v!ja,\v!nee] + [\v!yes,\v!no] [] \variable [\c!prefix] [+,-,\c!text!] [] \variable - [\c!interactie] - [\v!label,\v!tekst,\v!alles,\v!symbool] - [\v!alles] + [\c!interaction] + [\v!label,\v!text,\v!all,\v!symbol] + [\v!all] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!links] + [\c!left] [\c!command!] [] \variable - [\c!rechts] + [\c!right] [\c!command!] [] \variable - [\c!converteerfile] - [\v!ja,\v!nee,\v!klein,\v!groot] - [\v!nee] + [\c!convertfile] + [\v!yes,\v!no,\v!small,\v!big] + [\v!no] \variable - [\c!scheider] + [\c!separator] [\c!text!] [~] \variable [\c!autofile] - [\v!ja,\v!nee,\v!pagina] - [\v!nee] + [\v!yes,\v!no,\v!page] + [\v!no] \variable - [\c!globaal] - [\v!ja,\v!nee] - [\v!nee] + [\c!global] + [\v!yes,\v!no] + [\v!no] \stopsetup \startsetup @@ -4029,22 +4068,22 @@ \type [\c!vars!] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [\v!type] \variable - [\c!urlvariant] - [\v!geen,\v!beide,\v!voor,\v!na] - [\v!beide] + [\c!urlalternative] + [\v!none,\v!both,\v!before,\v!after] + [\v!both] \variable - [\c!urlspatie] - [\v!ja,\v!nee] - [\v!nee] + [\c!urlspace] + [\v!yes,\v!no] + [\v!no] \stopsetup \startsetup \command - [\y!schrijfnaarreferentielijst] + [\y!writetoreferencelist] \type [\c!val!\c!arg!\c!arg!] \value @@ -4054,7 +4093,7 @@ \startsetup \command - [\y!plaatsreferentielijst] + [\y!placereferencelist] \type [\c!vals!] \value @@ -4064,7 +4103,7 @@ \startsetup \command - [\y!definieerreferentielijst] + [\y!definereferencelist] \type [\c!val!\c!opt!\c!vars!] \value @@ -4077,37 +4116,37 @@ \startsetup \command - [\y!stelreferentielijstin] + [\y!setupreferencelist] \type [\c!vals!\c!vars!] \value [\c!identifier!] [] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \variable [\c!criterium] - [\c!section!,\v!lokaal,\v!vorige,\v!alles] - [\v!alles] + [\c!section!,\v!local,\v!previous,\v!all] + [\v!all] \variable - [\c!commando] + [\c!command] [\c!command!] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \stopsetup \startsetup \command - [\y!schrijfnaarlijst] + [\y!writetolist] \type [\c!val!\c!arg!\c!arg!] \value @@ -4117,7 +4156,7 @@ \startsetup \command - [\y!schrijftussenlijst] + [\y!writebetweenlist] \type [\c!val!\c!arg!] \value @@ -4127,7 +4166,7 @@ \startsetup \command - [\y!geenlijst] + [\y!nolist] \type [\c!arg!] \value @@ -4150,48 +4189,48 @@ \startsetup \command - [\y!plaatslijst] + [\y!placelist] \type [\c!vals!\c!opt!\c!vars!] \value [\c!identifier!] [] \inheritvariables - [\y!stellijstin] + [\y!setuplist] [] \stopsetup \startsetup \command - [\y!bepaallijstkenmerken] + [\y!determinelistcharacteristics] \type [\c!vals!\c!opt!\c!vars!] \value [\c!identifier!] [] \inheritvariables - [\y!stellijstin] + [\y!setuplist] [] \stopsetup % nieuw: -% \startsetup -% \command -% [\y!plaatssamengesteldelijst] -% \type -% [\c!val!\c!opt!\c!vars!] -% \value -% [\c!identifier!] -% [] -% \inheritvariables -% [\y!stelsamengesteldelijstin] -% [] -% \stopsetup +\startsetup + \command + [\y!placecombinedlist] + \type + [\c!val!\c!opt!\c!vars!] + \value + [\c!identifier!] + [] + \inheritvariables + [\y!setupcombinedlist] + [] +\stopsetup \startsetup \command - [\y!definieerlijst] + [\y!definelist] \type [\c!val!\c!opt!\c!val!\c!opt!\c!vars!] \value @@ -4201,160 +4240,160 @@ [\c!identifier!] [] \inheritvariables - [\y!stellijstin] + [\y!setuplist] [] \stopsetup \startsetup \command - [\y!stellijstin] + [\y!setuplist] \type [\c!vals!\c!vars!] \value [\c!identifier!] [] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \variable - [\c!variant] - [\v!a,\v!b,\v!c,...,\v!geen,\v!commando] + [\c!alternative] + [\v!a,\v!b,\v!c,...,\v!none,\v!command] [\v!b] \variable - [\c!koppeling] - [\v!aan,\v!uit] - [\v!uit] + [\c!coupling] + [\v!on,\v!off] + [\v!off] \variable [\c!criterium] - [\c!section!,\v!lokaal,\v!vorige,\v!huidige,\v!alles] - [\v!lokaal] + [\c!section!,\v!local,\v!previous,\v!current,\v!all] + [\v!local] \variable - [\c!paginaovergangen] + [\c!pageboundaries] [\c!list!] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!nummerletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!numberstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!tekstletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!textstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!paginaletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!pagestyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!commando] + [\c!command] [\c!threearguments!] [] \variable - [\c!nummercommando] + [\c!numbercommand] [\c!oneargument!] [] \variable - [\c!tekstcommando] + [\c!textcommand] [\c!oneargument!] [] \variable - [\c!paginacommando] + [\c!pagecommand] [\c!oneargument!] [] \variable - [\c!interactie] - [\v!sectienummer,\v!tekst,\v!paginanummer,\v!alles] - [\v!sectienummer] + [\c!interaction] + [\v!sectionnumber,\v!text,\v!pagenumber,\v!all] + [\v!sectionnumber] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] [] \variable - [\c!links] + [\c!left] [\c!text!] [] \variable - [\c!rechts] + [\c!right] [\c!text!] [] \variable [\c!label] - [\v!ja,\v!nee] - [\v!nee] + [\v!yes,\v!no] + [\v!no] \variable [\c!prefix] - [\v!ja,\v!nee,\v!geen] - [\v!ja] + [\v!yes,\v!no,\v!none] + [\v!yes] \variable - [\c!paginanummer] - [\v!ja,\v!nee] - [\v!ja] + [\c!pagenumber] + [\v!yes,\v!no] + [\v!yes] \variable [\c!sectionnumber!] - [\v!ja,\v!nee] + [\v!yes,\v!no] [] \variable - [\c!titeluitlijnen] - [\v!ja,\v!nee] - [\v!nee] + [\c!aligntitle] + [\v!yes,\v!no] + [\v!no] \variable - [\c!marge] + [\c!margin] [\c!dimension!] [3em] \variable - [\c!breedte] - [\c!dimension!,\v!passend] + [\c!width] + [\c!dimension!,\v!fit] [3em] \variable - [\c!hoogte] - [\c!dimension!,\v!passend,\v!ruim] - [\v!ruim] + [\c!height] + [\c!dimension!,\v!fit,\v!broad] + [\v!broad] \variable - [\c!diepte] - [\c!dimension!,\v!passend,\v!ruim] - [\v!ruim] + [\c!depth] + [\c!dimension!,\v!fit,\v!broad] + [\v!broad] % \variable % [\c!offset] % [\c!dimension!] % [.25em] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [0em] \variable - [\c!scheider] + [\c!separator] [\c!text!] [.] \variable - [\c!afsluiter] + [\c!stopper] [\c!text!] [] \variable - [\c!symbool] - [\v!geen,1,2,3,...] + [\c!symbol] + [\v!none,1,2,3,...] [] \variable - [\c!expansie] - [\v!ja,\v!nee,\v!commando] - [\v!nee] + [\c!expansion] + [\v!yes,\v!no,\v!command] + [\v!no] \variable - [\c!maxbreedte] + [\c!maxwidth] [\c!dimension!] [] \inheritvariables @@ -4364,7 +4403,7 @@ \startsetup \command - [\y!definieersamengesteldelijst] + [\y!definecombinedlist] \type [\c!val!\c!vals!\c!opt!\c!vars!] \value @@ -4374,64 +4413,64 @@ [\c!list!] [] \inheritvariables - [\y!stelsamengesteldelijstin] + [\y!setupcombinedlist] [] \stopsetup \startsetup \command - [\y!stelsamengesteldelijstin] + [\y!setupcombinedlist] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \variable - [\c!niveau] - [1,2,3,4,\c!section!,\v!huidige] + [\c!level] + [1,2,3,4,\c!section!,\v!current] [4] \inheritvariables - [\y!stellijstin] + [\y!setuplist] [] \stopsetup \startsetup \command - [\e!plaats<<\y!samengesteldelijst>>] + [\e!place<<\y!combinedlist>>] \type [\c!val!\c!opt!\c!vars!] \value [\c!identifier!] [] \inheritvariables - [\y!stelsamengesteldelijstin] + [\y!setupcombinedlist] [] \stopsetup \startsetup \command - [\e!volledige<<\y!samengesteldelijst>>] + [\e!complete<<\y!combinedlist>>] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \inheritvariables - [\y!stelsamengesteldelijstin] + [\y!setupcombinedlist] [] \stopsetup \startsetup \command - [\y!stelnummerenin] + [\y!setupnumbering] \type [\c!vars!] \variable - [\c!wijze] - [\v!per\v!tekst,\v!per\c!section!] - [\v!per\v!hoofdstuk] + [\c!way] + [\v!by\v!text,\v!by\c!section!] + [\v!by\v!chapter] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \stopsetup @@ -4444,256 +4483,256 @@ \type [\c!vars!] \variable - [\c!plaats] - [\v!links,\v!rechts] - [\v!rechts] + [\c!location] + [\v!left,\v!right] + [\v!right] \variable - [\c!links] + [\c!left] [\c!text!] [{(}] \variable - [\c!rechts] + [\c!right] [\c!text!] [{)}] \variable - [\c!uitlijnen] - [\v!links,\v!midden,\v!rechts] + [\c!align] + [\v!left,\v!middle,\v!right] [] \variable [\c!strut] - [\v!ja,\v!nee] - [\v!nee] + [\v!yes,\v!no] + [\v!no] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \variable - [\c!marge] - [\c!dimension!,\v!standaard,\v!ja,\v!nee] + [\c!margin] + [\c!dimension!,\v!standard,\v!yes,\v!no] [0pt] \variable - [\c!linkermarge] + [\c!leftmargin] [\c!dimension!] [0pt] \variable - [\c!rechtermarge] + [\c!rightmargin] [\c!dimension!] [0pt] \variable - [\c!springvolgendein] - [\v!ja,\v!nee] - [\v!nee] + [\c!indentnext] + [\v!yes,\v!no] + [\v!no] \variable - [\c!variant] + [\c!alternative] [\c!identifier!] [\s!default] \variable - [\c!voorwit] + [\c!spacebefore] [\c!dimension!] [0pt] \variable - [\c!na] + [\c!after] [\c!dimension!] [0pt] \variable - [\c!scheider] + [\c!separator] [\c!text!] [.] \stopsetup \startsetup \command - [\y!publicatie] + [\y!publication] \type [\c!ref!] \stopsetup \startsetup \command - [\y!stelpublicatiesin] + [\y!setuppublications] \type [\c!vars!] \variable - [\c!variant] - [\c!apa,\v!normaal] + [\c!alternative] + [\c!apa,\v!normal] [\c!apa] \inheritvariables - [\y!steldoornummerenin] + [\y!setupenumerations] [] \stopsetup \startsetup \command - [\y!stelregelsin] + [\y!setuplines] \type [\c!vars!] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] - [\blanko] + [\blank] \variable - [\c!inspringen] - [\v!ja,\v!nee,\v!even,\v!oneven] - [\v!nee] + [\c!indenting] + [\v!yes,\v!no,\v!even,\v!odd] + [\v!no] \stopsetup \startsetup \command - [\y!startregels] + [\y!startlines] \type [\c!stp!] \stopsetup \startsetup \command - [\y!stelparagraafnummerenin] + [\y!setupparagraphnumbering] \type [\c!vars!] \variable - [\c!status] - [\v!start,\v!stop,\v!reset,\v!regel] + [\c!state] + [\v!start,\v!stop,\v!reset,\v!line] [\v!stop] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [0pt] \stopsetup \startsetup \command - [\y!stelregelnummerenin] + [\y!setuplinenumbering] \type [\c!vars!] \variable - [\c!conversie] - [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins, - \v!tekst] - [\v!cijfers] + [\c!conversion] + [\v!numbers,\v!characters,\v!Characters,\v!romannumerals,\v!Romannumerals, + \v!text] + [\v!numbers] \variable [\c!start] [\c!number!] [1] \variable - [\c!stap] + [\c!step] [\c!number!] [1] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [2ex] \variable - [\c!plaats] - [\v!intekst,\v!inmarge] - [\v!inmarge] + [\c!location] + [\v!intext,\v!inmargin] + [\v!inmargin] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable [\c!prefix] [\c!text!] [] \variable - [\c!refereren] - [\v!aan,\v!uit] - [\v!aan] + [\c!referencing] + [\v!on,\v!off] + [\v!on] \stopsetup \startsetup \command - [\y!startregelnummeren] + [\y!startlinenumbering] \type [\c!val!\c!stp!] \value - [\v!verder] + [\v!continue] [] \stopsetup \startsetup \command - [\y!startregel] + [\y!startline] \type [\c!ref!\c!stp!] \stopsetup \startsetup \command - [\y!eenregel] + [\y!someline] \type [\c!ref!] \stopsetup \startsetup \command - [\y!inregel] + [\y!inline] \type [\c!ref!] \stopsetup \startsetup \command - [\y!stelinmargein] + [\y!setupinmargin] \type [\c!opt!\c!val!\c!vars!] \value - [\v!links,\v!rechts,\c!number!] + [\v!left,\v!right,\c!number!] [] \variable - [\c!plaats] - [\v!links,\v!rechts,\v!beide] - [\v!beide] + [\c!location] + [\v!left,\v!right,\v!both] + [\v!both] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!uitlijnen] - [\v!binnen,\v!buiten,\v!links,\v!rechts,\v!midden,\v!normaal,\v!nee,\v!ja] - [\v!binnen] + [\c!align] + [\v!inner,\v!outer,\v!left,\v!right,\v!middle,\v!normal,\v!no,\v!yes] + [\v!inner] \variable - [\c!regel] + [\c!line] [\c!number!] [1] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [0pt] \variable - [\c!scheider] + [\c!separator] [\c!text!] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [] \variable - [\c!stapel] - [\v!ja,\v!nee] - [\v!nee] + [\c!stack] + [\v!yes,\v!no] + [\v!no] \inheritvariables [\y!setupframed] [] @@ -4701,38 +4740,38 @@ \startsetup \command - [\y!stelpaginanummerin] + [\y!setuppagenumber] \type [\c!vars!] \variable - [\c!nummer] + [\c!number] [\c!number!] [] \variable - [\c!status] - [\v!start,\v!stop,\v!handhaaf] + [\c!state] + [\v!start,\v!stop,\v!keep] [\v!start] \stopsetup \startsetup \command - [\y!stelsubpaginanummerin] + [\y!setupsubpagenumber] \type [\c!vars!] \variable - [\c!wijze] - [\v!per\v!tekst,\v!per\c!section!] - [\v!per\v!deel] + [\c!way] + [\v!by\v!text,\v!by\c!section!] + [\v!by\v!part] \variable - [\c!status] - [\v!start,\v!stop,\v!geen] + [\c!state] + [\v!start,\v!stop,\v!none] [\v!stop] \stopsetup %\startsetup \command[\y!paginanummer] \type[] \stopsetup %\startsetup \command[\y!subpaginanummer] \type[] \stopsetup -%\startsetup \command[\y!aantalsubpaginas] \type[] \stopsetup -%\startsetup \command[\y!totaalaantalpaginas] \type[] \stopsetup +%\startsetup \command[\y!numberofsubpages] \type[] \stopsetup +%\startsetup \command[\y!totalnumberofpages] \type[] \stopsetup \startsetup \command @@ -4740,15 +4779,15 @@ \type [\c!opt!\c!val!] \value - [\v!normaal,\v!standaard,\v!regel,\c!dimension!, - \v!groot,\v!middel,\v!klein, - \v!vast,\v!flexibel] - [\v!normaal] + [\v!normal,\v!standard,\v!line,\c!dimension!, + \v!big,\v!medium,\v!small, + \v!fixed,\v!flexible] + [\v!normal] \stopsetup \startsetup \command - [\y!definieerblanko] + [\y!defineblank] \type [\c!val!\c!val!] \value @@ -4768,11 +4807,11 @@ [\c!identifier!] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [297mm] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [210mm] \variable @@ -4780,7 +4819,7 @@ [\c!dimension!] [210mm] \variable - [\c!schaal] + [\c!scale] [\c!number!] [1] \stopsetup @@ -4791,11 +4830,11 @@ \type [\c!vars!] \variable - [\c!papier] + [\c!paper] [\c!identifier!] [] \variable - [\c!pagina] + [\c!page] [\c!identifier!] [] \variable @@ -4807,21 +4846,25 @@ [\c!number!] [1] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [0pt] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [0pt] \variable - [\c!kopwit] + [\c!topspace] [\c!dimension!] [0pt] \variable - [\c!rugwit] + [\c!backspace] [\c!dimension!] [0pt] + \variable + [\c!option] + [\c!max,\v!fit] + [\c!max] \stopsetup \startsetup @@ -4831,11 +4874,11 @@ [\c!vals!\c!opt!\c!vals!] \value [A3,A4,A5,A6,letter,...,CD,\c!identifier!, - \v!liggend,\v!gespiegeld,\v!geroteerd,90,180,270] + \v!landscape,\v!mirrored,\v!rotated,90,180,270] [A4] \value [A3,A4,A5,A6,letter,...,\c!identifier!, - \v!liggend,\v!gespiegeld,\v!geroteerd,\v!negatief,90,180,270] + \v!landscape,\v!mirrored,\v!rotated,\v!negative,90,180,270] [A4] \stopsetup @@ -4845,9 +4888,9 @@ \type [\c!vals!] \value - [\v!blokkeer, + [\v!disable, 2*16,2*8,2*4,2*2,2**2,2*2*4,2*4*2,2UP,2DOWN,2SIDE,2TOP, - \v!gespiegeld,\v!geroteerd,\v!dubbelzijdig,\v!negatief,90,180,270] + \v!mirrored,\v!rotated,\v!doublesided,\v!negative,90,180,270] [] \stopsetup @@ -4876,20 +4919,20 @@ [\c!identifier!] [] \value - [\v!boven,\v!hoofd,\v!voet,\v!onder] + [\v!top,\v!header,\v!footer,\v!bottom] [] \value - [\v!geen,\v!pagina, - \v!linkerrand,\v!linkermarge, - \v!links,\v!midden,\v!rechts, - \v!rechtermarge,\v!rechterrand] + [\v!none,\v!page, + \v!leftedge,\v!leftmargin, + \v!left,\v!middle,\v!right, + \v!rightmargin,\v!rightedge] [] \variable - [\c!commando] + [\c!command] [\c!command!,\c!text!] [] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!stop] \stopsetup @@ -4910,8 +4953,8 @@ \type [\c!opt!\c!val!] \value - [\v!geen,\v!klein,\v!middel,\v!groot,\v!regel,\v!vast,\v!herstel,\c!dimension!] - [\v!geen] + [\v!none,\v!small,\v!medium,\v!big,\v!line,\v!fixed,\v!fix,\c!dimension!] + [\v!none] \stopsetup \startsetup @@ -4920,52 +4963,52 @@ \type [\c!vals!] \value - [\v!geen,\v!klein,\v!middel,\v!groot,\v!volgende,\v!eerste,\c!dimension!] - [\v!geen] + [\v!none,\v!small,\v!medium,\v!big,\v!next,\v!first,\c!dimension!] + [\v!none] \stopsetup \startsetup \command - [\y!definieersectieblok] + [\y!definesectionblock] \type [\c!val!\c!opt!\c!vars!] \value [\c!identifier!] [] \inheritvariables - [\y!stelsectieblokin] + [\y!setupsectionblock] [] \stopsetup \startsetup \command - [\y!stelsectieblokin] + [\y!setupsectionblock] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \variable - [\c!nummer] - [\v!ja,\v!nee] - [\v!ja] + [\c!number] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!pagina] - [\v!ja,\v!rechts] - [\v!rechts] + [\c!page] + [\v!yes,\v!right] + [\v!right] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \stopsetup \startsetup \command - [\y!definieersectie] + [\y!definesection] \type [\c!val!] \value @@ -4975,7 +5018,7 @@ \startsetup \command - [\y!stelsectiein] + [\y!setupsection] \type [\c!val!\c!opt!\c!val!\c!vars!] \value @@ -4983,103 +5026,103 @@ [] \value [\c!identifier!] - [\v!inleiding,\v!hoofdtekst,\v!bijlage,\v!uitleiding] + [\v!frontpart,\v!bodypart,\v!appendix,\v!backpart] \variable - [\c!conversie] - [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins] - [\v!cijfers] + [\c!conversion] + [\v!numbers,\v!characters,\v!Characters,\v!romannumerals,\v!Romannumerals] + [\v!numbers] \variable - [\c!vorigenummer] - [\v!ja,\v!nee] - [\v!ja] + [\c!previousnumber] + [\v!yes,\v!no] + [\v!yes] \stopsetup \startsetup \command - [\y!stelkopin] + [\y!setuphead] \type [\c!vals!\c!vars!] \value [\c!section!] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [] \variable - [\c!tekstletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!textstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [] \variable - [\c!nummerletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!numberstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!tekstkleur] + [\c!textcolor] [\c!identifier!] [] \variable - [\c!nummerkleur] + [\c!numbercolor] [\c!identifier!] [] \variable - [\c!nummer] - [\v!ja,\v!nee] - [\v!ja] + [\c!number] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!eigennummer] - [\v!ja,\v!nee] - [\v!nee] + [\c!ownnumber] + [\v!yes,\v!no] + [\v!no] \variable - [\c!pagina] - [\v!links,\v!rechts,\v!ja] + [\c!page] + [\v!left,\v!right,\v!yes] [] \variable - [\c!doorgaan] - [\v!ja,\v!nee] - [\v!ja] + [\c!continue] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!hoofd] - [\v!geen,\v!leeg,\v!hoog,\v!geenmarkering] + [\c!header] + [\v!none,\v!empty,\v!high,\v!nomarking] [] \variable - [\c!tekst] - [\v!geen,\v!leeg,\v!hoog,\v!geenmarkering] + [\c!text] + [\v!none,\v!empty,\v!high,\v!nomarking] [] \variable - [\c!voet] - [\v!geen,\v!leeg,\v!hoog,\v!geenmarkering] + [\c!footer] + [\v!none,\v!empty,\v!high,\v!nomarking] [] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!variant] - [\v!normaal,\v!inmarge,\v!midden,\v!tekst] - [\v!normaal] + [\c!alternative] + [\v!normal,\v!inmargin,\v!middle,\v!text] + [\v!normal] \variable - [\c!commando] + [\c!command] [\c!twoarguments!] [] \variable - [\c!nummercommando] + [\c!numbercommand] [\c!oneargument!] [] \variable - [\c!tekstcommando] + [\c!textcommand] [\c!oneargument!] [] \variable @@ -5087,57 +5130,37 @@ [+,-,\c!text!] [] \variable - [\c!plaatskop] - [\v!ja,\v!nee,\v!leeg] % leeg: wel markering - [\v!ja] + [\c!placehead] + [\v!yes,\v!no,\v!empty] % leeg: wel markering + [\v!yes] \variable - [\c!verhoognummer] - [\v!ja,\v!nee,\v!lijst,\c!filename!] % lijst: wel lijstentry - [\v!ja] + [\c!incrementnumber] + [\v!yes,\v!no,\v!list,\c!filename!] % lijst: wel lijstentry + [\v!yes] \variable - [\c!resetnummer] - [\v!ja,\v!nee] - [\v!ja] -% \variable -% [\c!scheider] -% [\c!text!] -% [.] -% \variable -% [\c!uitlijnen] -% [\v!links,\v!rechts,\v!normaal,\v!ruim] -% [\v!normaal] -% \variable -% [\c!titeluitlijnen] -% [\v!ja,\v!nee] -% [\v!nee] -% \variable -% [\c!tolerantie] -% [\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel,\v!rek] -% [\v!soepel] -% \variable -% [\c!springvolgendein] -% [\v!ja,\v!nee] -% [\v!nee] + [\c!resetnumber] + [\v!yes,\v!no] + [\v!yes] \variable [\c!file] [\c!identifier!] [] \variable - [\c!expansie] - [\v!ja,\v!commando,\v!nee] - [\v!nee] + [\c!expansion] + [\v!yes,\v!command,\v!no] + [\v!no] \variable - [\c!margetekst] - [\v!ja,\v!nee] - [\v!ja] + [\c!margintext] + [\v!yes,\v!no] + [\v!yes] \inheritvariables - [\y!stelkoppenin] + [\y!setupheads] [] \stopsetup \startsetup \command - [\y!stelkopnummerin] + [\y!setupheadnumber] \type [\c!val!\c!val!] \value @@ -5150,7 +5173,7 @@ \startsetup \command - [\y!kopnummer] + [\y!headnumber] \type [\c!opt!\c!val!] \value @@ -5160,7 +5183,7 @@ \startsetup \command - [\y!bepaalkopnummer] + [\y!determineheadnumber] \type [\c!val!] \value @@ -5170,21 +5193,21 @@ \startsetup \command - [\y!huidigekopnummer] + [\y!currentheadnumber] \type [] \stopsetup \startsetup \command - [\e!volgende<<\y!sectie>>] + [\e!next<<\y!section>>] \type [] \stopsetup \startsetup \command - [\y!definieerkop] + [\y!definehead] \type [\c!val!\c!val!] \value @@ -5204,23 +5227,31 @@ [\c!identifier!] [] \value - [\c!number!,\v!elk] + [\c!number!,\v!each] [] \value - [\v!standaard,\c!repeat!\v!ruim,\c!repeat!\v!aanelkaar,\v!opelkaar, - \v!vanelkaar,\v!afsluiter,\v!aansluitend,\v!opmarge,\v!inmarge, - \v!autointro,\v!los,\v!paragraaf,\v!intekst] - [\v!standaard] + [\v!standard,\c!repeat!\v!broad,\c!repeat!\v!serried,\v!packed, + \v!unpacked,\v!stopper,\v!joinedup,\v!atmargin,\v!inmargin, + \v!autointro,\v!loose,\v!section,\v!intext] + [\v!standard] \variable - [\c!marge] - [\v!nee,\v!standaard,\c!dimension!] + [\c!margin] + [\v!no,\v!standard,\c!dimension!] [0pt] \variable - [\c!breedte] + [\c!leftmargin] + [\v!no,\v!standard,\c!dimension!] + [0pt] + \variable + [\c!rightmargin] + [\v!no,\v!standard,\c!dimension!] + [0pt] + \variable + [\c!width] [\c!dimension!] [1.5em] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [0.5em] \variable @@ -5236,47 +5267,47 @@ [\c!number!] [1] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!links] + [\c!left] [\c!text!] [] \variable - [\c!rechts] + [\c!right] [\c!text!] [] \variable - [\c!kopvoor] + [\c!beforehead] [\c!command!] [] \variable - [\c!kopna] + [\c!afterhead] [\c!command!] [] \variable - [\c!kopletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!headstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!marletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!marstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [\v!type] \variable - [\c!symletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!symstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!afsluiter] + [\c!stopper] [\c!text!] [.] \variable @@ -5284,17 +5315,17 @@ [\c!number!] [] \variable - [\c!symbool] + [\c!symbol] [\c!number!] [] \variable - [\c!uitlijnen] - [\v!links,\v!rechts,\v!normaal] - [\v!normaal] + [\c!align] + [\v!left,\v!right,\v!normal] + [\v!normal] \variable - [\c!springvolgendein] - [\v!ja,\v!nee] - [\v!ja] + [\c!indentnext] + [\v!yes,\v!no] + [\v!yes] \stopsetup %\startsetup @@ -5307,6 +5338,8 @@ % [] %\stopsetup +% + \startsetup \command [\e!start<<\y!itemgroup>>] @@ -5316,11 +5349,11 @@ [\c!identifier!] [] \value - [a,A,KA,n,N,m,r,R,KR,\c!number!,\v!verder, - \v!standaard,\c!repeat!\v!ruim,\c!repeat!\v!aanelkaar,\v!opelkaar, - \v!afsluiter,\v!aansluitend,\v!opmarge,\v!inmarge,\v!intro, - \v!kolommen] - [\v!standaard] + [a,A,KA,n,N,m,r,R,KR,\c!number!,\v!continue, + \v!standard,\c!repeat!\v!broad,\c!repeat!\v!serried,\v!packed, + \v!stopper,\v!joinedup,\v!atmargin,\v!inmargin,\v!intro, + \v!columns] + [\v!standard] \inheritvariables [\y!setupitemgroup] [] @@ -5338,7 +5371,7 @@ \startsetup \command - [\y!definieerregister] + [\y!defineregister] \type [\c!val!\c!val!] \value @@ -5351,7 +5384,7 @@ \startsetup \command - [\y!stelregisterin] + [\y!setupregister] \type [\c!val!\c!opt!\c!val!\c!vars!] \value @@ -5365,79 +5398,79 @@ [\c!number!] [2] \variable - [\c!balanceren] - [\v!ja,\v!nee] - [\v!nee] + [\c!balance] + [\v!yes,\v!no] + [\v!no] \variable - [\c!uitlijnen] - [\v!ja,\v!nee] - [\v!nee] + [\c!align] + [\v!yes,\v!no] + [\v!no] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!paginaletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!pagestyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!tekstletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!textstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!aanduiding] - [\v!ja,\v!nee] - [\v!ja] + [\c!indicator] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!koppeling] - [\v!ja,\v!nee] - [\v!nee] + [\c!coupling] + [\v!yes,\v!no] + [\v!no] \variable [\c!sectionnumber!] - [\v!ja,\v!nee] + [\v!yes,\v!no] [] \variable [\c!criterium] - [\c!section!,\v!lokaal,\v!alles] - [\v!deel] + [\c!section!,\v!local,\v!all] + [\v!part] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \variable - [\c!symbool] - [1,2,...,\c!n,\c!a,...,\v!geen] + [\c!symbol] + [1,2,...,\c!n,\c!a,...,\v!none] [] \variable - [\c!interactie] - [\v!paginanummer,\v!tekst] - [\v!paginanummer] + [\c!interaction] + [\v!pagenumber,\v!text] + [\v!pagenumber] \variable - [\c!expansie] - [\v!ja,\v!commando,\v!nee] - [\v!nee] + [\c!expansion] + [\v!yes,\v!command,\v!no] + [\v!no] \variable - [\c!refereren] - [\v!aan,\v!uit] - [\v!aan] + [\c!referencing] + [\v!on,\v!off] + [\v!on] \variable - [\c!commando] + [\c!command] [\c!oneargument!] [] \variable - [\c!plaats] - [\v!links,\v!midden,\v!rechts] - [\v!midden] + [\c!location] + [\v!left,\v!middle,\v!right] + [\v!middle] \variable - [\c!maxbreedte] + [\c!maxwidth] [\c!dimension!] [] \variable - [\c!onbekendeverwijzing] - [\v!leeg,\v!geen] - [\v!leeg] + [\c!unknownreference] + [\v!empty,\v!none] + [\v!empty] \variable - [\c!variant] + [\c!alternative] [a,b,A,B] [a] \stopsetup @@ -5470,7 +5503,7 @@ \startsetup \command - [\y!schrijfnaarregister] + [\y!writetoregister] \type [\c!val!\c!opt!\c!val!\c!idxs!] \value @@ -5486,7 +5519,7 @@ \startsetup \command - [\e!gekoppelde<<\y!register>>] + [\e!coupled<<\y!register>>] \type [\c!opt!\c!val!\c!idx!] \value @@ -5499,7 +5532,7 @@ \startsetup \command - [\y!koppelregister] + [\y!coupleregister] \type [\c!val!] \value @@ -5509,7 +5542,20 @@ \startsetup \command - [\e!zie<<\y!register>>] + [\y!placeregister] + \type + [\c!val!\c!opt!\c!vars!] + \value + [\c!identifier!] + [] + \inheritvariables + [\y!setupregister] + [] +\stopsetup + +\startsetup + \command + [\e!see<<\y!register>>] \type [\c!opt!\c!val!\c!arg!\c!idxs!] \value @@ -5525,27 +5571,27 @@ \startsetup \command - [\e!volledige<<\y!register>>] + [\e!complete<<\y!register>>] \type [\c!optint!\c!opt!\c!vars!] \inheritvariables - [\y!stelregisterin] + [\y!setupregister] [] \stopsetup \startsetup \command - [\e!plaats<<\y!register>>] + [\e!place<<\y!register>>] \type [\c!optint!\c!opt!\c!vars!] \inheritvariables - [\y!stelregisterin] + [\y!setupregister] [] \stopsetup \startsetup \command - [\y!definieersynoniemen] + [\y!definesynonyms] \type [\c!val!\c!val!\c!val!\c!opt!\c!val!] \value @@ -5564,54 +5610,54 @@ \startsetup \command - [\y!stelsynoniemenin] + [\y!setupsynonyms] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \variable - [\c!tekstletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!kap] + [\c!textstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!cap] \variable - [\c!synoniemletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!synonymstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!plaats] - [\v!links,\v!rechts,\v!boven,\v!aanelkaar, - \v!inmarge,\v!inlinker,\v!inrechter] - [\v!links] + [\c!location] + [\v!left,\v!right,\v!top,\v!serried, + \v!inmargin,\v!inleft,\v!inright] + [\v!left] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [5em] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \variable [\c!criterium] - [\v!alles,\v!gebruikt] - [\v!gebruikt] + [\v!all,\v!used] + [\v!used] \variable - [\c!conversie] - [\v!ja,\v!nee] - [\v!nee] + [\c!conversion] + [\v!yes,\v!no] + [\v!no] \variable - [\c!expansie] - [\v!ja,\v!commando,\v!nee] - [\v!nee] + [\c!expansion] + [\v!yes,\v!command,\v!no] + [\v!no] \variable - [\c!commando] + [\c!command] [\c!threearguments!] [] \stopsetup \startsetup \command - [<<\y!synoniem>>] + [<<\y!synonym>>] \type [\c!opt!\c!val!\c!arg!\c!arg!] \value @@ -5627,26 +5673,26 @@ \startsetup \command - [\e!volledige\e!lijstmet<<\y!synoniemen>>] + [\e!complete\e!listof<<\y!synonyms>>] \type [] \stopsetup \startsetup \command - [\e!plaats\e!lijstmet<<\y!synoniemen>>] + [\e!place\e!listof<<\y!synonyms>>] \type [] \stopsetup \startsetup - \command[\e!laad<<\y!synoniemen>>] + \command[\e!load<<\y!synonyms>>] \type[] \stopsetup \startsetup \command - [\y!definieersorteren] + [\y!definesorting] \type [\c!val!\c!val!\c!opt!\c!val!] \value @@ -5662,45 +5708,45 @@ \startsetup \command - [\y!stelsorterenin] + [\y!setupsorting] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!commando] + [\c!command] [\c!oneargument!] [] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \variable [\c!criterium] - [\v!alles,\v!gebruikt] - [\v!gebruikt] + [\v!all,\v!used] + [\v!used] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!expansie] - [\v!ja,\v!commando,\v!nee] - [\v!nee] + [\c!expansion] + [\v!yes,\v!command,\v!no] + [\v!no] \stopsetup \startsetup \command - [<<\y!sorteer>>] + [<<\y!sort>>] \type [\c!val!\c!arg!] \value @@ -5713,20 +5759,20 @@ \startsetup \command - [\e!volledige\e!lijstmet<<\y!sorteren>>] + [\e!complete\e!listof<<\y!sorts>>] \type [] \stopsetup \startsetup \command - [\e!plaats\e!lijstmet<<\y!sorteren>>] + [\e!place\e!listof<<\y!sorts>>] \type [] \stopsetup \startsetup - \command[\e!laad<<\y!sorteren>>] + \command[\e!load<<\y!sorts>>] \type[] \stopsetup @@ -5765,13 +5811,13 @@ [\c!identifier!] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] - [\zetbreedte] + [\makeupwidth] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] - [\teksthoogte] + [\textheight] \variable [\c!voffset] [\c!dimension!] @@ -5781,62 +5827,62 @@ [\c!dimension!] [\!!zeropoint] \variable - [\c!pagina] - [\v!links,\v!ja,\v!rechts] + [\c!page] + [\v!left,\v!yes,\v!right] [] \variable - [\c!commandos] + [\c!commands] [\c!command!] [] \variable - [\c!dubbelzijdig] - [\v!ja,\v!nee,\v!leeg] - [\v!leeg] + [\c!doublesided] + [\v!yes,\v!no,\v!empty] + [\v!empty] \variable - [\c!hoofdstatus] - [\v!normaal,\v!stop,\v!start,\v!leeg,\v!geen,\v!geenmarkering] - [\v!leeg] + [\c!headerstate] + [\v!normal,\v!stop,\v!start,\v!empty,\v!none,\v!nomarking] + [\v!empty] \variable - [\c!voetstatus] - [\v!normaal,\v!stop,\v!start,\v!leeg,\v!geen,\v!geenmarkering] - [\v!leeg] + [\c!footerstate] + [\v!normal,\v!stop,\v!start,\v!empty,\v!none,\v!nomarking] + [\v!empty] \variable - [\c!tekststatus] - [\v!normaal,\v!stop,\v!start,\v!leeg,\v!geen,\v!geenmarkering] - [\v!leeg] + [\c!textstate] + [\v!normal,\v!stop,\v!start,\v!empty,\v!none,\v!nomarking] + [\v!empty] \variable - [\c!bovenstatus] + [\c!topstate] [\v!stop,\v!start] [\v!stop] \variable - [\c!onderstatus] + [\c!bottomstate] [\v!stop,\v!start] [\v!stop] \variable - [\c!paginastatus] + [\c!pagestate] [\v!stop,\v!start] [\v!stop] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \stopsetup \startsetup \command - [\e!start<<\y!naam>>\e!opmaak] % \tf + [\e!start<<\y!name>>\e!makeup] % \tf \type [\c!stp!] \stopsetup \startsetup \command - [\y!versie] + [\y!version] \type [\c!val!] \value - [\v!definitief,\v!concept,\v!voorlopig] - [\v!definitief] + [\v!final,\v!concept,\v!temporary] + [\v!final] \stopsetup \startsetup @@ -5867,93 +5913,81 @@ [\c!number!] [] \value - [\v!dag,\v!dag+,\v!maand,\v!weekdag,\v!jaar, % \v!WEEKDAG,\v!MAAND, - dd,dd+,mm,jj,yy,d,d+,m,j,y,\v!kenmerk] - [\v!dag,\v!maand,\v!jaar] + [\v!day,\v!day+,\v!month,\v!weekday,\v!year, % \v!WEEKDAY,\v!MONTH, + dd,dd+,mm,jj,yy,d,d+,m,j,y,\v!referral] + [\v!day,\v!month,\v!year] \stopsetup \startsetup \command - [\y!kenmerkdatum] + [\y!referraldate] \type [] \stopsetup \startsetup \command - [\y!inspringen] + [\y!indenting] \type [\c!vals!] \value - [\v!nooit,\v!niet,\v!nee,\v!ja,\v!altijd,\v!eerste,\v!volgende] - [\v!nooit] + [\v!never,\v!not,\v!no,\v!yes,\v!always,\v!first,\v!next] + [\v!never] \stopsetup \startsetup \command - [\y!nietinspringen] + [\y!noindenting] \type [] \stopsetup \startsetup \command - [\y!blanko] + [\y!blank] \type [\c!opt!\c!vals!] \value - [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot, - \v!geenwit,\v!back,\v!wit,\v!blokkeer,\v!forceer,\v!reset, - \v!regel,\v!halveregel,\v!formule,\v!vast,\v!flexibel,\v!geen] - [\v!groot] + [\c!repeat!\v!small,\c!repeat!\v!medium,\c!repeat!\v!big, + \v!nowhite,\v!back,\v!white,\v!disable,\v!force,\v!reset, + \v!line,\v!halfline,\v!formula,\v!fixed,\v!flexible,\v!none] + [\v!big] \stopsetup \startsetup \command - [\y!startopelkaar] + [\y!startpacked] \type [\c!opt!\c!val!\c!stp!] % tzt \c!vals! \value - [\v!blanko] + [\v!blank] [] \stopsetup \startsetup \command - [\y!startvanelkaar] + [\y!startunpacked] \type [\c!stp!] \stopsetup -% \startsetup -% \command -% [\y!startregelcorrectie] -% \type -% [\c!opt!\c!val!\c!stp!] -% \value -% [\v!klein,\v!middel,\v!groot,\v!blanko] -% [] -% \stopsetup -% -% beter: - \startsetup \command - [\y!startregelcorrectie] + [\y!startlinecorrection] \type [\c!stp!] \stopsetup \startsetup \command - [\y!corrigeerwitruimte] + [\y!correctwhitespace] \type [\c!arg!] \stopsetup \startsetup \command - [\e!start\v!uitstellen] + [\e!start\v!postponing] \type [\c!stp!] \stopsetup @@ -5967,17 +6001,17 @@ \startsetup \command - [\y!startsmaller] + [\y!startnarrower] \type [\c!opt!\c!vals!\c!stp!] \value - [\c!repeat!\v!links,\c!repeat!\v!midden,\c!repeat!\v!rechts] - [\v!midden] + [\c!repeat!\v!left,\c!repeat!\v!middle,\c!repeat!\v!right] + [\v!middle] \stopsetup \startsetup \command - [\e!start\v!verbergen] + [\e!start\v!hiding] \type [\c!stp!] \stopsetup @@ -5988,15 +6022,15 @@ \type [\c!val!] \value - [\v!breedte,\v!links,\v!rechts,\v!midden,\v!binnen,\v!buiten, - \v!breed,\v!ruim,\v!hoogte,\v!onder,\v!regel,\v!reset, - \v!hangend,\v!niethangend,\v!afgebroken,\v!nietafgebroken] + [\v!width,\v!left,\v!right,\v!middle,\v!inner,\v!outer, + \v!wide,\v!broad,\v!height,\v!bottom,\v!line,\v!reset, + \v!hanging,\v!nothanging,\v!hyphenated,\v!nothyphenated] [] \stopsetup \startsetup \command - [\y!startuitlijnen] + [\y!startalignment] \type [\c!stp!\c!opt!\c!val!] \inheritvariables @@ -6010,7 +6044,7 @@ \type [\c!val!] \value - [\v!ruim,\v!opelkaar] + [\v!broad,\v!packed] [] \stopsetup @@ -6020,14 +6054,14 @@ \type [\c!vals!] \value - [\v!horizontaal,\v!vertikaal, - \v!rek,\v!spatie,\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel] - [\v!zeerstreng] + [\v!horizontal,\v!vertical, + \v!stretch,\v!space,\v!verystrict,\v!strict,\v!tolerant,\v!verytolerant] + [\v!verystrict] \stopsetup \startsetup \command - [\y!soortpagina] + [\y!pagetype] \type [\c!val!] \value @@ -6037,35 +6071,35 @@ \startsetup \command - [\y!verwerkpagina] + [\y!processpage] \type [\c!vals!\c!val!] \value [\c!identifier!] [] \value - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \stopsetup \startsetup \command - [\y!koppelpagina] + [\y!couplepage] \type [\c!vals!\c!vars!] \value [\c!identifier!] [] \variable - [\c!optie] - [\v!dubbelzijdig] + [\c!option] + [\v!doublesided] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \stopsetup @@ -6092,11 +6126,11 @@ \type [\c!vars!] \variable - [\c!methode] - [\v!punt,\v!lijn,\v!extern] - [\v!extern] + [\c!method] + [\v!dot,\v!rule,\v!external] + [\v!external] \variable - [\c!resolutie] + [\c!resolution] [\c!number!] [508] \variable @@ -6104,7 +6138,7 @@ [\c!number!] [8] \variable - [\c!raster] + [\c!screen] [\c!number!] [0.95] \stopsetup @@ -6115,15 +6149,15 @@ \type [\c!opt!\c!val!\c!opt!\c!vals!\c!vars!] \value - [\v!boven,\v!hoofd,\v!tekst,\v!voet,\v!onder, - \v!pagina,\v!papier,\v!linkerpagina,\v!rechterpagina] + [\v!top,\v!header,\v!text,\v!footer,\v!bottom, + \v!page,\v!paper,\v!leftpage,\v!rightpage] [] \value - [\v!linkerrand,\v!linkermarge,\v!tekst,\v!rechtermarge,\v!rechterrand] + [\v!leftedge,\v!leftmargin,\v!text,\v!rightmargin,\v!rightedge] [] \variable - [\c!status] - [\v!start,\v!stop,\v!herhaal] + [\c!state] + [\v!start,\v!stop,\v!repeat] [\v!start] % \variable % [\c!commando] @@ -6146,7 +6180,7 @@ \startsetup \command - [\y!haalbuffer] + [\y!getbuffer] \type [\c!opt!\c!val!] \value @@ -6166,7 +6200,7 @@ \startsetup \command - [\y!definieerbuffer] + [\y!definebuffer] \type [\c!val!] \value @@ -6176,29 +6210,29 @@ \startsetup \command - [\y!stelbufferin] + [\y!setupbuffer] \type [\c!opt!\c!val!\c!vars!] \value [\c!identifier!] [] \variable - [\c!alinea] + [\c!paragraph] [\c!number!] [0] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \stopsetup \startsetup \command - [\y!definieerblok] + [\y!defineblock] \type [\c!val!] \value @@ -6208,14 +6242,14 @@ \startsetup \command - [\y!geenblokkenmeer] + [\y!nomoreblocks] \type [] \stopsetup \startsetup \command - [\y!verbergblokken] + [\y!hideblocks] \type [\c!vals!\c!opt!\c!vals!] \value @@ -6228,20 +6262,20 @@ \startsetup \command - [\y!handhaafblokken] + [\y!keepblocks] \type [\c!vals!\c!opt!\c!vals!] \value [\c!identifier!] [] \value - [\v!alles,\c!identifier!] + [\v!all,\c!identifier!] [] \stopsetup \startsetup \command - [\y!gebruikblokken] + [\y!useblocks] \type [\c!vals!\c!opt!\c!vals!] \value @@ -6254,7 +6288,33 @@ \startsetup \command - [\y!verwerkblokken] + [\y!processblocks] + \type + [\c!vals!\c!opt!\c!vals!] + \value + [\c!identifier!] + [] + \value + [\c!identifier!] + [] +\stopsetup + +\startsetup + \command + [\y!bypassblocks] + \type + [\c!vals!\c!opt!\c!vals!] + \value + [\c!identifier!] + [] + \value + [\c!identifier!] + [] +\stopsetup + +\startsetup + \command + [\y!forceblocks] \type [\c!vals!\c!opt!\c!vals!] \value @@ -6267,7 +6327,7 @@ \startsetup \command - [\y!selecteerblokken] + [\y!selectblocks] \type [\c!vals!\c!opt!\c!vals!\c!opt!\c!var!] \value @@ -6278,34 +6338,34 @@ [] \variable [\c!criterium] - [\v!alles,\c!section!] - [\v!alles] + [\v!all,\c!section!] + [\v!all] \stopsetup \startsetup \command - [\y!stelblokin] + [\y!setupblock] \type [\c!vals!\c!vars!] \value [\c!identifier!] [] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!binnen] + [\c!inner] [\c!command!] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] % \variable % [\c!scope] % [\v!globaal,\v!lokaal] @@ -6318,7 +6378,7 @@ \startsetup \command - [\e!start<<\y!formule>>] + [\e!start<<\y!formula>>] \type [\c!stp!] \value @@ -6338,7 +6398,7 @@ \startsetup \command - [\y!plaatsformule] + [\y!placeformula] \type [\c!opt!\c!refs!\c!opt!\c!arg!\c!dis!] \value @@ -6351,7 +6411,7 @@ \startsetup \command - [\y!plaatssubformule] + [\y!placesubformula] \type [\c!opt!\c!refs!\c!opt!\c!arg!\c!dis!] \value @@ -6364,18 +6424,18 @@ \startsetup \command - [\e!plaats<<\y!blok>>] + [\e!place<<\y!float>>] \type [\c!opt!\c!val!\c!opt!\c!refs!\c!arg!\c!arg!] \value - [\v!links,\v!rechts,\v!hier,\v!boven,\v!onder, - \v!inlinker,\v!inrechter,\v!inmarge,\v!marge, - \v!linkermarge,\v!rechtermarge,\v!linkerrand,\v!rechterrand, - \v!binnenmarge,\v!buitenmarge,\v!binnenrand,\v!buitenrand, - \v!binnen,\v!buiten,\c!regel,\v!hoog,\v!laag,\v!passend, - \v!pagina,\v!naast,\v!altijd,\v!forceer,\v!lang,\v!reset, - \v!regel,\v!hoogte,\v!diepte] - [\v!hier] + [\v!left,\v!right,\v!here,\v!top,\v!bottom, + \v!inleft,\v!inright,\v!inmargin,\v!margin, + \v!leftmargin,\v!rightmargin,\v!leftedge,\v!rightedge, + \v!innermargin,\v!outermargin,\v!inneredge,\v!outeredge, + \v!inner,\v!outer,\c!line,\v!high,\v!low,\v!fit, + \v!page,\v!opposite,\v!always,\v!force,\v!tall,\v!reset, + \v!line,\v!height,\v!depth] + [\v!here] \value [\c!text!] [] @@ -6386,26 +6446,26 @@ \startsetup \command - [\e!reserveer<<\y!blok>>] + [\e!reserve<<\y!float>>] \type [\c!opt!\c!vars!\c!opt!\c!val!\c!opt!\c!refs!\c!arg!] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!kader] - [\v!aan,\v!uit] + [\c!frame] + [\v!on,\v!off] [] \value - [\v!links,\v!rechts,\v!hier,\v!boven,\v!onder, - \v!inlinker,\v!inrechter,\v!inmarge,\v!marge, - \v!pagina,\v!naast,\v!altijd,\v!forceer] - [\v!hier] + [\v!left,\v!right,\v!here,\v!top,\v!bottom, + \v!inleft,\v!inright,\v!inmargin,\v!margin, + \v!page,\v!opposite,\v!always,\v!force] + [\v!here] \value [\c!text!] [] @@ -6413,7 +6473,7 @@ \startsetup \command - [\y!definieerplaatsblok] + [\y!definefloat] \type [\c!val!\c!val!] \value @@ -6426,30 +6486,30 @@ \startsetup \command - [\y!stelplaatsblokin] + [\y!setupfloat] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!maxhoogte] + [\c!maxheight] [\c!dimension!] [] \variable - [\c!maxbreedte] + [\c!maxwidth] [\c!dimension!] [] \variable - [\c!minbreedte] + [\c!minwidth] [\c!dimension!] [] \variable @@ -6457,21 +6517,21 @@ [\c!identifier!] [] \variable - [\c!paginaovergangen] + [\c!pageboundaries] [\c!list!] [] \variable - [\c!linkermargeafstand] + [\c!leftmargindistance] [\c!dimension!] [0pt] \variable - [\c!rechtermargeafstand] + [\c!rightmargindistance] [\c!dimension!] [0pt] \variable - [\c!plaats] - [\v!links,\v!midden,\v!rechts] - [\v!midden] + [\c!location] + [\v!left,\v!middle,\v!right] + [\v!middle] \inheritvariables [\y!setupframed] [] @@ -6479,11 +6539,11 @@ \startsetup \command - [\e!start<<\y!blok>>\e!tekst] + [\e!start<<\y!float>>\e!text] \type [\c!opt!\c!val!\c!opt!\c!ref!\c!arg!\c!arg!\c!stp!] \value - [\v!links,\v!rechts,\v!hoog,\v!midden,\v!laag,\c!offset,\v!lang] + [\v!left,\v!right,\v!high,\v!middle,\v!low,\c!offset,\v!tall] [] \value [\c!text!] @@ -6497,12 +6557,12 @@ \stopsetup \startsetup - \command[\e!plaats\e!lijstmet<<\y!blokken>>] + \command[\e!place\e!listof<<\y!floats>>] \type[\c!optint!] \stopsetup \startsetup - \command[\e!volledige\e!lijstmet<<\y!blokken>>] + \command[\e!complete\e!listof<<\y!floats>>] \type[\c!optint!] \stopsetup @@ -6538,7 +6598,7 @@ \startsetup \command - [\y!kenmerk] + [\y!referral] \type [\c!vars!] \variable @@ -6569,18 +6629,18 @@ \startsetup \command - [\y!selecteerpapier] + [\y!selectpaper] \type [\c!vars!] \variable - [\c!soort] + [\c!family] [1,2] [] \stopsetup \startsetup \command - [\y!koppelpapier] + [\y!couplepaper] \type [\c!val!] \value @@ -6599,20 +6659,20 @@ \stopsetup \startsetup - \command[\y!breuk] + \command[\y!fraction] \type[\c!arg!\c!arg!] \value[\c!text!][] \value[\c!text!][] \stopsetup \startsetup - \command[\y!punten] + \command[\y!periods] \type[\c!val!] \value[\c!number!][] \stopsetup \startsetup - \command[\y!woonplaats] + \command[\y!domicile] \type[\c!arg!] \value[\c!text!][] \stopsetup @@ -6623,62 +6683,62 @@ \type [\c!opt!\c!vars!\c!args!] \inheritvariables - [\y!stelitemsin] + [\y!setupitems] [] \stopsetup \startsetup \command - [\y!stelitemsin] + [\y!setupitems] \type [\c!vars!] \variable - [\c!plaats] - [\v!links,\v!rechts,\v!inmarge,\v!boven,\v!onder] - [\v!links] + [\c!location] + [\v!left,\v!right,\v!inmargin,\v!top,\v!bottom] + [\v!left] \variable - [\c!symbool] - [1,2,...,\c!n,\c!a,...,\c!text!,\v!geen] + [\c!symbol] + [1,2,...,\c!n,\c!a,...,\c!text!,\v!none] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [\hsize] \variable [\c!n] - [\c!number!,\v!onbekend] - [\v!onbekend] + [\c!number!,\v!unknown] + [\v!unknown] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] - [{\blanko[\v!middel]}] + [{\blank[\v!medium]}] \variable - [\c!uitlijnen] - [\v!links,\v!rechts,\v!midden,\v!marge] - [\v!midden] + [\c!align] + [\v!left,\v!right,\v!middle,\v!margin] + [\v!middle] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \stopsetup \startsetup \command - [\y!startcitaat] + [\y!startquotation] \type [\c!vals!\c!stp!] \value - [\c!repeat!\v!links,\c!repeat!\v!midden,\c!repeat!\v!rechts] - [\v!midden] + [\c!repeat!\v!left,\c!repeat!\v!middle,\c!repeat!\v!right] + [\v!middle] \stopsetup \startsetup \command - [\y!citaat] + [\y!quotation] \type [\c!arg!] \value @@ -6688,7 +6748,7 @@ \startsetup \command - [\y!citeer] + [\y!quote] \type [\c!arg!] \value @@ -6698,44 +6758,44 @@ \startsetup \command - [\y!stelciterenin] + [\y!setupquote] \type [\c!vars!] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!plaats] - [\v!tekst,\v!marge] - [\v!marge] + [\c!location] + [\v!text,\v!margin] + [\v!margin] \stopsetup \startsetup \command - [\y!toevoegen] + [\y!adding] \type [\c!val!] \value - [\v!klein,\v!middel,\v!groot] - [\v!middel] + [\v!small,\v!medium,\v!big] + [\v!medium] \stopsetup \startsetup \command - [\y!definieeralineas] + [\y!defineparagraphs] \type [\c!val!\c!vars!] \value @@ -6746,131 +6806,131 @@ [\c!number!] [2] \variable - [\c!lijn] - [\v!aan,\v!uit] - [\v!uit] + [\c!rule] + [\v!on,\v!off] + [\v!off] \variable - [\c!hoogte] - [\v!passend,\c!dimension!] - [\v!passend] + [\c!height] + [\v!fit,\c!dimension!] + [\v!fit] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!binnen] + [\c!inner] [\c!command!] [] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \variable - [\c!tolerantie] - [\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel,\v!rek] - [\v!soepel] + [\c!tolerance] + [\v!verystrict,\v!strict,\v!tolerant,\v!verytolerant,\v!stretch] + [\v!tolerant] \variable - [\c!uitlijnen] - [\v!links,\v!rechts,\v!midden] + [\c!align] + [\v!left,\v!right,\v!middle] [] \stopsetup \startsetup \command - [<<\y!alinea>>] + [<<\y!paragraph>>] \type [] \stopsetup \startsetup \command - [\e!start<<\y!alinea>>] + [\e!start<<\y!paragraph>>] \type [\c!stp!] \stopsetup \startsetup \command - [\y!stelalineasin] + [\y!setupparagraphs] \type [\c!val!\c!opt!\c!val!\c!vars!] \value [\c!identifier!] [] \value - [\c!number!,\v!elk] + [\c!number!,\v!each] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [] \variable - [\c!uitlijnen] - [\v!links,\v!rechts,\v!midden,\v!breedte] - [\c!breedte] + [\c!align] + [\v!left,\v!right,\v!middle,\v!width] + [\c!width] \variable - [\c!tolerantie] - [\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel,\v!rek] - [\v!soepel] + [\c!tolerance] + [\v!verystrict,\v!strict,\v!tolerant,\v!verytolerant,\v!stretch] + [\v!tolerant] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!binnen] + [\c!inner] [\c!command!] [] \variable - [\c!commando] + [\c!command] [\c!command!] [] \variable - [\c!lijn] - [\v!aan,\v!uit] - [\v!uit] + [\c!rule] + [\v!on,\v!off] + [\v!off] \stopsetup \startsetup \command - [\y!steltabin] + [\y!setuptab] \type [\c!vars!] \variable - [\c!monster] + [\c!sample] [\c!text!] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!kopletter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] + [\c!headstyle] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!normal] \variable - [\c!plaats] - [\v!links,\v!rechts] - [\v!links] + [\c!location] + [\v!left,\v!right] + [\v!left] \stopsetup \startsetup @@ -6898,16 +6958,6 @@ [] \stopsetup -\startsetup - \command - [\y!brieven] - \type - [\c!val!] - \value - [\c!identifier!] - [] -\stopsetup - \startsetup \command [\y!labels] @@ -6918,75 +6968,6 @@ [] \stopsetup -\startsetup - \command - [\y!stelbrievenin] - \type - [\c!vals!] - \value - [\v!formeel,\v!informeel,\v!rekening,\v!ls, - \v!hoog,\v!midden,\v!laag] - [\v!formeel,\v!laag] -\stopsetup - -\startsetup - \command - [\y!stelsheetsin] - \type - [\c!vars!] - \variable - [\c!variant] - [\c!number!] - [] - \variable - [\c!tekst] - [\c!text!] - [] - \variable - [\c!formaat] - [\v!klein,\v!middel,\v!groot] - [\v!middel] - \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!normaal] - \variable - [\c!nummer] - [\c!number!,\v!aansluitend] - [] -\stopsetup - -\startsetup - \command - [\y!sheet] - \type - [\c!val!] - \value - [\c!text!] - [] -\stopsetup - -\startsetup - \command - [\y!stelstickersin] - \type - [\c!vars!] - \variable - [\c!variant] - [a] - [] - \variable - [\c!n] - [\c!number!,\v!alles] - [\c!val!] - \variable - [\c!plaats] - [\v!marge,\v!links,\v!rechts,\v!midden] - [\v!links] -\stopsetup - -% *.tex - \startsetup \command [\y!definetabulate] @@ -7025,57 +7006,57 @@ [\c!identifier!] [] \variable - [\c!eenheid] + [\c!unit] [\c!dimension!] [1em] \variable - [\c!inspringen] - [\v!ja,\v!nee] - [\v!nee] + [\c!indenting] + [\v!yes,\v!no] + [\v!no] \variable - [\c!voor] + [\c!before] [\c!command!] - [\blanko] + [\blank] \variable - [\c!na] + [\c!after] [\c!command!] - [\blanko] + [\blank] \variable - [\c!binnen] + [\c!inner] [\c!command!] - [\blanko] + [\blank] \variable [EQ] [\c!text!] [:] \variable - [\c!lijnkleur] + [\c!rulecolor] [\c!identifier!] [] \variable - [\c!uitlijnen] - [\v!links,\v!midden,\v!rechts,\v!normaal] - [\v!normaal] + [\c!align] + [\v!left,\v!middle,\v!right,\v!normal] + [\v!normal] \variable - [\c!lijndikte] + [\c!rulethickness] [\c!dimension!] - [\lijndikte] + [\linewidth] \variable - [\c!afstand] - [\v!blanko,\v!grid,\v!diepte,\c!dimension!,\v!klein,\v!middel,\v!groot,\v!geen] - [\v!diepte,\v!middel] + [\c!distance] + [\v!blank,\v!grid,\v!depth,\c!dimension!,\v!small,\v!medium,\v!big,\v!none] + [\v!depth,\v!medium] \variable - [\c!korps] - [5pt,...,12pt,\v!klein,\v!groot] + [\c!bodyfont] + [5pt,...,12pt,\v!small,\v!big] [] \variable - [\c!lijn] - [\v!normaal,\v!regel] - [\v!regel] + [\c!rule] + [\v!normal,\v!line] + [\v!line] \variable - [\c!splitsen] - [\v!ja,\v!nee] - [\v!ja] + [\c!split] + [\v!yes,\v!no] + [\v!yes] \stopsetup \startsetup @@ -7084,64 +7065,64 @@ \type [\c!vars!] \variable - [\c!afstand] - [\v!klein,\v!middel,\v!groot] - [\v!middel] + [\c!distance] + [\v!small,\v!medium,\v!big] + [\v!medium] \variable - [\c!korps] - [5pt,...,12pt,\v!klein,\v!groot] + [\c!bodyfont] + [5pt,...,12pt,\v!small,\v!big] [] \variable [HL] - [\c!number!,\v!klein,\v!middel,\v!groot,\v!geen] - [\v!middel] + [\c!number!,\v!small,\v!medium,\v!big,\v!none] + [\v!medium] \variable [VL] - [\c!number!,\v!klein,\v!middel,\v!groot,\v!geen] - [\v!middel] + [\c!number!,\v!small,\v!medium,\v!big,\v!none] + [\v!medium] \variable - [\c!diepte] + [\c!depth] [\c!number!,\v!strut] [.40] \variable - [\c!hoogte] + [\c!height] [\c!number!,\v!strut] [80] \variable - [\c!lijndikte] + [\c!rulethickness] [\c!dimension!] - [\lijndikte] + [\linewidth] \variable - [\c!lijnkleur] + [\c!rulecolor] [\c!identifier!] [] \variable - [\c!uitlijnen] - [\v!rechts,\v!midden,\v!links,\v!normaal] - [\v!rechts] + [\c!align] + [\v!right,\v!middle,\v!left,\v!normal] + [\v!right] \variable - [\c!commandos] + [\c!commands] [\c!command!] [] \variable - [\c!uitlijnen] - [\v!links,\v!midden,\v!rechts,\v!normaal] - [\v!rechts] + [\c!align] + [\v!left,\v!middle,\v!right,\v!normal] + [\v!right] \variable - [\c!achtergrond] - [\v!raster,\v!kleur,\v!geen] - [\v!geen] + [\c!background] + [\v!screen,\v!color,\v!none] + [\v!none] \variable - [\c!achtergrondraster] + [\c!backgroundscreen] [\c!number!] [0.9] \variable - [\c!achtergrondkleur] + [\c!backgroundcolor] [\c!identifier!] [] \variable - [\c!korps] - [5pt,...,12pt,\v!klein,\v!groot] + [\c!bodyfont] + [5pt,...,12pt,\v!small,\v!big] [] \stopsetup @@ -7186,15 +7167,15 @@ \startsetup \command - [\y!gebruikexternefiles] + [\y!useexternalfiles] \type [\c!val!\c!vars!] \value [\c!identifier!] [] \variable - [\c!korps] - [5pt,...,12pt,\v!klein,\v!groot] + [\c!bodyfont] + [5pt,...,12pt,\v!small,\v!big] [] \variable [\c!file] @@ -7204,7 +7185,7 @@ \startsetup \command - [\y!gebruikexternefile] + [\y!useexternalfile] \type [\c!val!\c!val!\c!val!\c!vars!] \value @@ -7217,8 +7198,8 @@ [\c!filename!] [] \variable - [\c!korps] - [5pt,...,12pt,\v!klein,\v!groot] + [\c!bodyfont] + [5pt,...,12pt,\v!small,\v!big] [] \stopsetup @@ -7264,59 +7245,59 @@ [\c!filename!] [] \variable - [\c!schaal] + [\c!scale] [\c!number!] [1000] \variable [\c!factor] - [\v!max,\v!passend,\v!ruim] + [\v!max,\v!fit,\v!broad] [] \variable - [\c!bfactor] - [\c!number!,\v!max,\v!ruim,\v!passend] + [\c!wfactor] + [\c!number!,\v!max,\v!broad,\v!fit] [] \variable [\c!hfactor] - [\c!number!,\v!max,\v!ruim,\v!passend] + [\c!number!,\v!max,\v!broad,\v!fit] [] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [] \variable - [\c!kader] - [\v!aan,\v!uit] - [\v!uit] + [\c!frame] + [\v!on,\v!off] + [\v!off] \variable [\c!preset] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!scherm] + [\c!display] [\c!filename!] [] \variable [\c!preview] - [\v!ja,\v!nee] - [\v!nee] + [\v!yes,\v!no] + [\v!no] \variable - [\c!herhaal] - [\v!ja,\v!nee] - [\v!nee] + [\c!repeat] + [\v!yes,\v!no] + [\v!no] \variable [\c!object] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable [\c!type] [\c!eps,\c!mps,\c!pdf,\c!tif,\c!png,\c!jpg,\c!mov,\c!tex] [] \variable - [\c!methode] + [\c!method] [\c!eps,\c!mps,\c!pdf,\c!tif,\c!png,\c!jpg,\c!mov,\c!tex] [] \stopsetup @@ -7340,17 +7321,17 @@ \type [\c!var!] \variable - [\c!optie] - [\v!kader,\v!leeg,\v!test] + [\c!option] + [\v!frame,\v!empty,\v!test] [] \variable [\c!object] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!hokjes] - [\v!aan,\v!uit] - [\v!uit] + [\c!frames] + [\v!on,\v!off] + [\v!off] \variable [\c!ymax] [\c!number!] @@ -7360,19 +7341,19 @@ [\c!number!] [] \variable - [\c!gebied] + [\c!directory] [\c!text!] [] \variable - [\c!plaats] - [\v!lokaal,\v!globaal,\v!default,\v!geen] + [\c!location] + [\v!local,\v!global,\v!default,\v!none] [] \variable - [\c!maxbreedte] + [\c!maxwidth] [\c!dimension!] [] \variable - [\c!maxhoogte] + [\c!maxheight] [\c!dimension!] [] \stopsetup @@ -7383,7 +7364,7 @@ \type [\c!opt!\c!vars!] \variable - [\c!variant] + [\c!alternative] [\v!a,\v!b,\v!c] [\v!a] \stopsetup @@ -7403,7 +7384,7 @@ \startsetup \command - [\y!naam] + [\y!macroname] \type [\c!arg!] \value @@ -7413,11 +7394,11 @@ \startsetup \command - [\e!start\v!legenda] + [\e!start\v!legend] \type [\c!opt!\c!val!\c!tex!{leg}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\c!tex!{leg}\c!stp!] \value - [\v!twee] + [\v!two] [] \value [\c!text!] @@ -7432,10 +7413,10 @@ \startsetup \command - [\e!start\v!gegeven] + [\e!start\v!fact] \type % [\c!tex!{geg}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\c!tex!{geg}\c!stp!] - [\c!tex!{\y!geg}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\c!tex!{\y!geg}\c!stp!] + [\c!tex!{\y!fact}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\c!tex!{\y!fact}\c!stp!] \value [\c!text!] [] @@ -7463,13 +7444,13 @@ \type [\c!vars!] \variable - [\c!rotatie] + [\c!rotation] [\c!number!] [90] \variable - [\c!plaats] - [\v!normaal,\v!hoog,\v!passend,\v!ruim,\v!diepte] - [\v!normaal] + [\c!location] + [\v!normal,\v!high,\v!fit,\v!broad,\v!depth] + [\v!normal] \inheritvariables [\y!setupframed] [] @@ -7477,14 +7458,14 @@ \startsetup \command - [\y!spiegel] + [\y!mirror] \type [\c!arg!] \stopsetup \startsetup \command - [\y!schaal] + [\y!scale] \type [\c!opt!\c!vars!\c!arg!] \variable @@ -7503,43 +7484,43 @@ \type [\c!vars!] \variable - [\c!voor] - [\c!commando] + [\c!before] + [\c!command] [] \variable - [\c!tussen] - [\c!commando] + [\c!inbetween] + [\c!command] [] \variable - [\c!na] - [\c!commando] + [\c!after] + [\c!command] [] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \variable - [\c!hoogte] - [\c!dimension!,\v!passend] - [\v!passend] + [\c!height] + [\c!dimension!,\v!fit] + [\v!fit] \variable - [\c!breedte] - [\c!dimension!,\v!passend] - [\v!passend] + [\c!width] + [\c!dimension!,\v!fit] + [\v!fit] \variable - [\c!plaats] - [\c!boven,\c!midden,\c!onder,\c!links,\c!rechts] - [\c!onder] + [\c!location] + [\c!top,\c!middle,\c!bottom,\c!left,\c!right] + [\c!bottom] \variable - [\c!uitlijnen] - [\v!nee,\v!links,\v!rechts,\v!midden,\v!normaal] - [\v!midden] + [\c!align] + [\v!no,\v!left,\v!right,\v!middle,\v!normal] + [\v!middle] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...\c!command!] - [\v!vet] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...\c!command!] + [\v!bold] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \stopsetup @@ -7612,51 +7593,51 @@ \startsetup \command - [\y!stelinteractieschermin] + [\y!setupinteractionscreen] \type [\c!alwint!\c!vars!] \variable - [\c!breedte] - [\c!dimension!,\v!passend,\v!max] - [\papierbreedte] + [\c!width] + [\c!dimension!,\v!fit,\v!max] + [\paperwidth] \variable - [\c!hoogte] - [\c!dimension!,\v!passend,\v!max] - [\papierhoogte] + [\c!height] + [\c!dimension!,\v!fit,\v!max] + [\paperheight] \variable - [\c!rugwit] + [\c!backspace] [\c!dimension!] - [\rugwit] + [\backspace] \variable - [\c!kopwit] + [\c!topspace] [\c!dimension!] - [\kopwit] + [\topspace] \variable - [\c!rugoffset] + [\c!horoffset] [\c!dimension!] [0pt] \variable - [\c!kopoffset] + [\c!veroffset] [\c!dimension!] [0pt] \variable - [\c!optie] - [\v!max,\v!passend,\v!dubbelzijdig,\v!bookmark] + [\c!option] + [\v!max,\v!fit,\v!doublesided,\v!bookmark] [] \variable - [\c!wachttijd] - [\c!number!,\v!geen] - [\v!geen] + [\c!delay] + [\c!number!,\v!none] + [\v!none] \stopsetup \startsetup - \command[\y!scherm] + \command[\y!screen] \type[\c!alwint!] \stopsetup \startsetup \command - [\y!stelpaginaovergangenin] + [\y!setuppagetransitions] \type [\c!opt!\c!vals!] \value @@ -7673,179 +7654,179 @@ \type [\c!alwint!\c!vars!] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!stop] \variable [\c!menu] - [\v!aan,\v!uit] - [\v!uit] + [\v!on,\v!off] + [\v!off] \variable - [\c!pagina] - [\v!ja,\v!nee] - [\v!nee] + [\c!page] + [\v!yes,\v!no] + [\v!no] \variable - [\c!klik] - [\v!ja,\v!nee] - [\v!ja] + [\c!click] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!splitsen] - [\v!ja,\v!nee] - [\v!ja] + [\c!split] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!scherm] - [\v!nieuw] + [\c!display] + [\v!new] [] \variable - [\c!openactie] + [\c!openaction] [\c!reference!] [] \variable - [\c!sluitactie] + [\c!closeaction] [\c!reference!] [] \variable - [\c!openpaginaactie] + [\c!openpageaction] [\c!reference!] [] \variable - [\c!sluitpaginaactie] + [\c!closepageaction] [\c!reference!] [] \variable - [\c!bereken] + [\c!calculate] [\c!identifier!] [] -% \variable -% [\c!scherm] -% [\v!normaal,\v!passend,\v!hoogte,\v!breedte] -% [\v!normaal] \variable [\c!strut] - [\v!ja,\v!nee] - [\v!ja] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [1em] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [0pt] \variable - [\c!diepte] + [\c!depth] [\c!dimension!] [0pt] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...\c!command!] - [\v!vet] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...\c!command!] + [\v!bold] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!contrastkleur] + [\c!contrastcolor] [\c!identifier!] [] \variable - [\c!symboolset] + [\c!symbolset] [\c!identifier!] [] \variable - [\c!titel] + [\c!title] + [\c!text!] + [] + \variable + [\c!subtitle] [\c!text!] [] \variable - [\c!subtitel] + [\c!author] [\c!text!] [] \variable - [\c!auteur] + [\c!date] [\c!text!] [] \variable - [\c!datum] + [\c!keyword] [\c!text!] [] \stopsetup \startsetup \command - [\y!stelinteractiemenuin] + [\y!defineinteractionmenu] \type [\c!alwint!\c!vals!\c!opt!\c!vars!] % \c!opt!\c!dests! \value - [\v!links,\v!rechts,\v!boven,\v!onder,\c!identifier!] + [\v!left,\v!right,\v!top,\v!bottom,\c!identifier!] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] [] \variable - [\c!links] + [\c!left] [\c!command!] [] \variable - [\c!rechts] + [\c!right] [\c!command!] [] \variable - [\c!midden] + [\c!middle] [\c!command!] [] \variable - [\c!status] - [\v!start,\v!stop,\v!geen,\v!lokaal] + [\c!state] + [\v!start,\v!stop,\v!none,\v!local] [\v!start] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...\c!command!] - [\v!vet] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...\c!command!] + [\v!bold] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!afstand] + [\c!distance] [\v!overlay,\c!dimension!] [] \variable - [\c!zelfdepagina] - [\v!ja,\v!leeg,\v!nee,\v!geen] + [\c!samepage] + [\v!yes,\v!empty,\v!no,\v!none] [] \variable - [\c!onbekendeverwijzing] - [\v!ja,\v!leeg,\v!nee,\v!geen] + [\c!unknownreference] + [\v!yes,\v!empty,\v!no,\v!none] [] \variable - [\c!linkeroffset] + [\c!leftoffset] [\c!dimension!] [0pt] \variable - [\c!rechteroffset] + [\c!rightoffset] [\c!dimension!] [0pt] \variable - [\c!bovenoffset] + [\c!topoffset] [\c!dimension!] [0pt] \variable - [\c!onderoffset] + [\c!bottomoffset] [\c!dimension!] [0pt] \variable - [\c!positie] - [\v!ja,\v!nee] - [\v!nee] + [\c!position] + [\v!yes,\v!no] + [\v!no] \inheritvariables [\y!setupframed] [] @@ -7853,23 +7834,23 @@ \startsetup \command - [\y!definieerinteractiemenu] + [\y!defineinteractionmenu] \type [\c!alwint!\c!val!\c!opt!\c!val!\c!opt!\c!vars!] \value - [\v!links,\v!rechts,\v!boven,\v!onder,\c!identifier!] + [\v!left,\v!right,\v!top,\v!bottom,\c!identifier!] [] \value - [\v!links,\v!rechts,\v!boven,\v!onder,\c!identifier!] + [\v!left,\v!right,\v!top,\v!bottom,\c!identifier!] [] \inheritvariables - [\y!stelinteractiemenuin] + [\y!setupinteractionmenu] [] \stopsetup \startsetup \command - [\e!start\v!interactiemenu] + [\e!start\y!interactionmenu] % y! ? \type [\c!alwint!\c!val!\c!stp!] \value @@ -7879,17 +7860,17 @@ \startsetup \command - [\y!blokkeerinteractiemenu] + [\y!disableinteractionmenu] \type [\c!alwint!\c!val!\c!refs!] \value - [\v!links,\v!rechts,\v!boven,\v!onder,\c!identifier!] + [\v!left,\v!right,\v!top,\v!bottom,\c!identifier!] [] \stopsetup \startsetup \command - [\y!gebruikexterndocument] + [\y!useexternaldocument] \type [\c!alwint!\c!val!\c!val!\c!val!] \value @@ -7905,7 +7886,7 @@ \startsetup \command - [\y!gebruikURL] + [\y!useURL] \type [\c!alwint!\c!val!\c!val!\c!val!\c!val!] \value @@ -7942,28 +7923,28 @@ \stopsetup \startsetup - \command[\y!uit] + \command[\y!from] \type[\c!alwint!\c!ref!] \value[\c!text!][] \stopsetup \startsetup \command - [\y!interactiebalk] + [\y!interactionbar] \type [\c!alwint!\c!vars!] \inheritvariables - [\y!stelinteractiebalkin] + [\y!setupinteractionbar] [] \stopsetup \startsetup \command - [\y!interactiebuttons] + [\y!interactionbuttons] \type [\c!alwint!\c!opt!\c!vars!\c!vals!] \inheritvariables - [\y!stelinteractiebalkin] + [\y!setupinteractionbar] [] \value [\c!identifier!] @@ -7974,40 +7955,40 @@ \startsetup \command - [\y!stelinteractiebalkin] + [\y!setupinteractionbar] \type [\c!alwint!\c!vars!] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \variable - [\c!variant] + [\c!alternative] [a,b,c,d,e,f,g] [b] \variable - [\c!symbool] - [\v!ja,\v!nee] - [\v!nee] + [\c!symbol] + [\v!yes,\v!no] + [\v!no] \variable - [\c!breedte] - [\c!dimension!,\c!hoogte,\v!passend] + [\c!width] + [\c!dimension!,\c!height,\v!fit] [3cm] \variable - [\c!hoogte] - [\c!dimension!,\c!hoogte,\v!passend] - [\v!ruim] + [\c!height] + [\c!dimension!,\c!height,\v!fit] + [\v!broad] \variable - [\c!diepte] + [\c!depth] [\c!dimension!] [0pt] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!stap] - [\c!number!,\v!klein,\v!middel,\v!groot] + [\c!step] + [\c!number!,\v!small,\v!medium,\v!big] [1] \inheritvariables [\y!setupframed] @@ -8016,41 +7997,41 @@ \startsetup \command - [\y!synchroniseer] + [\y!synchronize] \type [\c!alwint!] \stopsetup \startsetup \command - [\y!startsynchronisatie] + [\y!startsynchronization] \type [\c!alwint!\c!stp!] \stopsetup \startsetup \command - [\y!stelsynchronisatiebalkin] + [\y!setupsynchronizationbar] \type [\c!alwint!\c!vars!] \variable - [\c!variant] - [\v!pagina,\v!lokaal] - [\v!pagina] + [\c!alternative] + [\v!page,\v!local] + [\v!page] \variable - [\c!breedte] - [\c!dimension!,\c!hoogte,\v!passend] + [\c!width] + [\c!dimension!,\c!height,\v!fit] [3cm] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [.5em] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] - [\v!vet] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] + [\v!bold] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \inheritvariables @@ -8060,35 +8041,35 @@ \startsetup \command - [\y!synchronisatiebalk] + [\y!synchronizationbar] \type [\c!alwint!\c!val!\c!vars!] \value [\c!identifier!] [] \variable - [\c!variant] - [\v!pagina,\v!lokaal] - [\v!pagina] + [\c!alternative] + [\v!page,\v!local] + [\v!page] \inheritvariables - [\y!stelsynchronisatiebalkin] + [\y!setupsynchronizationbar] [] \stopsetup \startsetup \command - [\y!stelsynchronisatiein] + [\y!setupsynchronization] \type [\c!alwint!\c!vars!] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!stop] \stopsetup \startsetup \command - [\y!definieerprofiel] + [\y!defineprofile] \type [\c!alwint!\c!vals!\c!vals!] \value @@ -8101,18 +8082,18 @@ \startsetup \command - [\y!stelprofielenin] + [\y!setupprofiles] \type [\c!alwint!\c!vars!] \variable - [\c!optie] + [\c!option] [\v!test] [] \stopsetup \startsetup \command - [\y!startprofiel] + [\y!startprofile] \type [\c!alwint!\c!vals!\c!stp!] \value @@ -8122,7 +8103,7 @@ \startsetup \command - [\y!volgprofiel] + [\y!followprofile] \type [\c!alwint!\c!arg!\c!val!] \value @@ -8155,7 +8136,7 @@ \startsetup \command - [\y!startversie] + [\y!startversion] \type [\c!alwint!\c!vals!\c!stp!] \value @@ -8165,36 +8146,36 @@ \startsetup \command - [\y!stelversiesin] + [\y!setupversions] \type [\c!vars!] \variable - [\c!nummer] + [\c!number] [\c!number!] [1] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!bold\v!slanted,\v!type,\v!cap,\v!small...,\c!command!] [] \stopsetup \startsetup \command - [\y!markeerversie] + [\y!markversion] \type [\c!alwint!] \stopsetup \startsetup \command - [\y!selecteerversie] + [\y!selectversion] \type [] \stopsetup \startsetup \command - [\y!definieerversie] + [\y!defineversion] \type [\c!val!\c!vals!] \value @@ -8207,7 +8188,7 @@ \startsetup \command - [\y!volgversie] + [\y!followversion] \type [\c!alwint!\c!arg!\c!val!] \value @@ -8220,7 +8201,7 @@ \startsetup \command - [\y!volgprofielversie] + [\y!followprofileversion] \type [\c!alwint!\c!arg!\c!val!\c!val!] \value @@ -8236,7 +8217,7 @@ \startsetup \command - [\y!definieerprogramma] + [\y!defineprogram] \type [\c!alwint!\c!val!\c!val!\c!val!] \value @@ -8252,18 +8233,18 @@ \startsetup \command - [\y!stelprogrammasin] + [\y!setupprograms] \type [\c!alwint!\c!vars!] \variable - [\c!gebied] + [\c!directory] [\c!text!] [] \stopsetup \startsetup \command - [\y!programma] + [\y!program] \type [\c!alwint!\c!val!] \value @@ -8289,14 +8270,14 @@ [\c!number!] [] \variable - [\c!kader] - [\v!aan,\v!uit] - [\v!uit] + [\c!frame] + [\v!on,\v!off] + [\v!off] \stopsetup \startsetup \command - [\y!referring\subsetup{\v!figuur}] + [\y!referring\subsetup{\v!figure}] \type [\c!poss!\c!poss!\c!val!] \value @@ -8318,7 +8299,7 @@ \startsetup \command - [\y!marking\subsetup{\v!figuur}] + [\y!marking\subsetup{\v!figure}] \type [\c!poss!\c!poss!\c!val!] \value @@ -8359,7 +8340,7 @@ \startsetup \command - [\y!naar] + [\y!goto] \type [\c!alwint!\c!arg!\c!alwint!\c!arg!\c!refs!] \value @@ -8369,7 +8350,7 @@ \startsetup \command - [\y!naarbox] + [\y!gotobox] \type [\c!alwint!\c!arg!\c!refs!] \value @@ -8383,7 +8364,7 @@ \type [\c!alwint!\c!opt!\c!vars!\c!arg!\c!refs!] \inheritvariables - [\y!stelbuttonsin] + [\y!setupbuttons] [] \value [\c!text!] @@ -8392,11 +8373,11 @@ \startsetup \command - [\y!stelbuttonsin] + [\y!setupbuttons] \type [\c!vars!] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \inheritvariables @@ -8423,45 +8404,45 @@ \type [\c!vars!] \variable - [\c!status] + [\c!state] [\v!start,\v!stop] [\v!start] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!titel] + [\c!title] [\c!text!] [] \variable - [\c!spatie] - [\v!ja,\v!nee] - [\v!ja] + [\c!space] + [\v!yes,\v!no] + [\v!yes] \variable - [\c!symbool] - [\v!normaal, + [\c!symbol] + [\v!normal, \v!New,\v!Balloon,\v!Addition,\v!Help,\v!Paragraph,\v!Key, \c!identifier!] - [\v!normaal] + [\v!normal] \variable - [\c!optie] + [\c!option] [\v!max,\v!buffer] [] \variable - [\c!marge] + [\c!margin] [\c!dimension!] [2.5em] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \stopsetup @@ -8481,7 +8462,7 @@ \startsetup \command - [\y!commentaar] + [\y!comment] \type [\c!opt!\c!val!\c!opt!\c!vars!\c!arg!] \value @@ -8601,7 +8582,7 @@ \type [\c!opt!\c!val!\c!arg!\c!arg!] \value - [\v!links,\v!rechts,\v!midden] + [\v!left,\v!right,\v!middle] [] \value [\c!text!] @@ -8634,7 +8615,7 @@ [\c!identifier!] [] \value - [\v!label,\v!horizontaal,\v!vertikaal,\v!kader] + [\v!label,\v!horizontal,\v!vertical,\v!frame] [] \inheritvariables [\y!setupfields] @@ -8650,87 +8631,87 @@ [\c!identifier!] [] \value - [\v!reset,\v!label,\v!horizontaal,\v!vertikaal,\v!kader] + [\v!reset,\v!label,\v!horizontal,\v!vertical,\v!frame] [] \variable [\c!n] [\c!number!] [] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [] \variable - [\c!voor] + [\c!before] [\c!command!] [] \variable - [\c!na] + [\c!after] [\c!command!] [] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] [] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \variable - [\c!letter] - [\v!normaal,\v!vet,\v!schuin,\v!vetschuin,\v!type] - [\v!normaal] + [\c!style] + [\v!normal,\v!bold,\v!slanted,\v!boldslanted,\v!type] + [\v!normal] \variable - [\c!uitlijnen] - [\v!links,\v!midden,\v!rechts] + [\c!align] + [\v!left,\v!middle,\v!right] [] \variable - [\c!optie] - [\v!alleenleesbaar,\v!verplicht,\v!beschermd,\v!gesorteerd, - \v!nietbeschikbaar, \v!verborgen,\v!printbaar] + [\c!option] + [\v!readonly,\v!required,\v!protected,\v!sorted, + \v!unavailable, \v!hidden,\v!printable] [] \variable - [\c!klikin] + [\c!clickin] [\c!reference!] [] \variable - [\c!klikuit] + [\c!clickout] [\c!reference!] [] \variable - [\c!gebiedin] + [\c!regionin] [\c!reference!] [] \variable - [\c!gebieduit] + [\c!regionout] [\c!reference!] [] \variable - [\c!natoets] + [\c!afterkey] [\c!reference!] [] \variable - [\c!formatteer] + [\c!format] [\c!reference!] [] \variable - [\c!valideer] + [\c!validate] [\c!reference!] [] \variable - [\c!bereken] + [\c!calculate] [\c!reference!] [] \variable - [\c!veldoffset] + [\c!fieldoffset] [\c!dimension!] [\!!zeropoint] \variable - [\c!veldkaderkleur] + [\c!fieldframecolor] [\c!identifier!] [] \variable - [\c!veldachtergrondkleur] + [\c!fieldbackgroundcolor] [\c!identifier!] [] \inheritvariables @@ -8744,7 +8725,7 @@ \type [\c!vars!] \variable - [\c!methode] + [\c!method] [HTML,FDF] [HTML] \stopsetup @@ -8813,11 +8794,11 @@ [\c!number!] [1] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [\!!zeropoint] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [\!!zeropoint] \variable @@ -8857,28 +8838,28 @@ [\c!number!] [1] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [1em] \variable - [\c!tussen] + [\c!inbetween] [\c!command!] - [] % [{\blanko[\v!middel]}] + [] % [{\blank[\v!medium]}] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [\hsize] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [\vsize] \variable - [\c!plaats] - [\v!rechts,\v!onder] - [\v!onder] + [\c!location] + [\v!right,\v!bottom] + [\v!bottom] \variable - [\c!korps] - [5pt,...,12pt,\v!klein,\v!groot] + [\c!bodyfont] + [5pt,...,12pt,\v!small,\v!big] [] \stopsetup @@ -8916,27 +8897,27 @@ [\c!identifier!] [] \variable - [\c!diepte] + [\c!depth] [\c!dimension!] [\!!zeropoint] \variable - [\c!hoogte] + [\c!height] [\c!dimension!] [\!!zeropoint] \variable - [\c!breedte] + [\c!width] [\c!dimension!] [\hsize] \variable - [\c!voorwit] + [\c!spacebefore] [\c!dimension!] [\!!zeropoint] \variable - [\c!nawit] + [\c!spaceafter] [\c!dimension!] [\!!zeropoint] \variable - [\c!kleur] + [\c!color] [\c!identifier!] [] \stopsetup @@ -8960,24 +8941,24 @@ [\c!identifier!] [] \variable - [\c!links] + [\c!left] [\c!text!] [] \variable - [\c!rechts] + [\c!right] [\c!text!] [] \variable - [\c!afstand] + [\c!distance] [\c!dimension!] [5em] \variable - [\c!commando] + [\c!command] [\c!oneargument!] [] \variable [\c!strut] - [\v!ja,\v!nee,\v!kap,\c!text!] + [\v!yes,\v!no,\v!cap,\c!text!] [\c!ja] \stopsetup @@ -9085,8 +9066,8 @@ \type [\c!val!] \value - [\v!ja,\v!nee,\v!kap,\c!text!] - [\v!ja] + [\v!yes,\v!no,\v!cap,\c!text!] + [\v!yes] \stopsetup -\stopsetupfile \ No newline at end of file +\stopsetupfile diff --git a/tex/context/base/spec-def.tex b/tex/context/base/spec-def.tex index 9fc3b76a5..863f355ee 100644 --- a/tex/context/base/spec-def.tex +++ b/tex/context/base/spec-def.tex @@ -20,8 +20,8 @@ %D drivers are supported, as well as two mechanisms for %D interactive texts. %D -%D \startregelcorrectie -%D \starttabel[|l|l|l|l|l|] +%D \startlinecorrection +%D \starttable[|l|l|l|l|l|] %D \HL %D \NC \bf file \NC %D \bf name \NC @@ -69,8 +69,8 @@ %D HTML V 2.0 \NC %D (dvips) \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D \macros %D {dostartgraymode,dostopgraymode, @@ -78,10 +78,10 @@ %D %D Switching to and from color can be done in two ways: %D -%D \startopsomming[opelkaar,n] -%D \som insert driver specific commands -%D \som pass instructions to the output device -%D \stopopsomming +%D \startitemize[packed,n] +%D \item insert driver specific commands +%D \item pass instructions to the output device +%D \stopitemize %D %D The first approach is more general and lays the %D responsibility at the driver side. Probably due to the fact @@ -91,10 +91,10 @@ %D package handles colored text that crosses the page boundary. %D Again, there are two approaches. %D -%D \startopsomming[opelkaar,n] -%D \som let \TEX\ do the job -%D \som let the driver handle things -%D \stopopsomming +%D \startitemize[packed,n] +%D \item let \TEX\ do the job +%D \item let the driver handle things +%D \stopitemize %D %D The first approach is as driver independant as possible and %D can easily be accomplished by using \TEX's mark mechanism. @@ -105,9 +105,9 @@ %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. %D Technically it's possible to get a grayscale from combining -%D colors. In the \kap{RGB} color system, a color with Red, +%D colors. In the \cap{RGB} color system, a color with Red, %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 Gray Scale specified 0.80. The \cap{CMYK} color system %D supports a Black component apart from Cyan, Magenta and %D Yellow. %D @@ -122,7 +122,7 @@ %D in black and white, still can be distinguished. This %D approach enables us to serve both printed and electronic %D versions, using colored text and illustrations. More on the -%D fundamentals of this topic can be found in the \kap{MAPS} of +%D fundamentals of this topic can be found in the \cap{MAPS} of %D the Dutch User Group, 14 (95.1). %D %D To satisfy all those needs, we define four specials which @@ -134,12 +134,12 @@ %D We start with the installation of color and grayscale %D specials. The values are in the range 0..1 (e.g. 0.25). %D -%D \starttypen +%D \starttyping %D \dostartgraymode {gray} ... \dostopgraymode %D \dostartrgbcolormode {red} {green} {blue} ... \dostopcolormode %D \dostartcmykcolormode {cyan} {magenta} {yellow} {black} ... \dostopcolormode %D \dostartgraycolormode {gray} ... \dostopcolormode -%D \stoptypen +%D \stoptyping %D %D Because we can expect conflicts between drivers, we %D implement them as category \type{or}. In previous versions @@ -158,9 +158,15 @@ \installspecial [\dostartspotcolormode] [or] [2] -\installspecial [\doregistercmykspotcolor] [or] [5] -\installspecial [\doregisterrgbspotcolor] [or] [4] -\installspecial [\doregistergrayspotcolor] [or] [2] +\installspecial [\doregisterrgbspotcolor] [or] [7] +\installspecial [\doregistercmykspotcolor] [or] [8] +\installspecial [\doregistergrayspotcolor] [or] [5] + +\installspecial [\doregisterrgbindexcolor] [or] [7] +\installspecial [\doregistercmykindexcolor] [or] [8] +\installspecial [\doregistergrayindexcolor] [or] [5] + +\installspecial [\doregisterspotcolorname] [or] [2] \installspecial [\dostartnonecolormode] [or] [0] \installspecial [\doregisternonecolor] [or] [0] @@ -169,7 +175,7 @@ %D simply call the start one with zero arguments. %D \macros -%D {doinsertfile} +%D {doinsertfile,doinsertMPfile} %D %D Probably the most problematic special is the following %D one. Because we want to be able to support different @@ -182,11 +188,11 @@ %D specials for different formats sometimes are more clear, we %D decided to combine them all in one: %D -%D \starttypen +%D \starttyping %D \doinsertfile {type,method} {file,label} %D {xscale} {yscale} {x} {y} {w} {h} %D {options} -%D \stoptypen +%D \stoptyping %D %D The scale is given percents, the other values are base %D points. @@ -198,7 +204,8 @@ %D When option 1 is passed, the viewers is asked to present a %D preview, like the first frame of a movie. -\installspecial [\doinsertfile] [or] [9] +\installspecial [\doinsertfile] [or] [9] +\installspecial [\doinsertMPfile] [or] [1] % speed up %D No start||stop construction is needed here, because there in %D no further interference of \TEX. All dimensions are output @@ -211,9 +218,9 @@ %D Sounds are (for the moment) just files with %D associated options. %D -%D \starttypen +%D \starttyping %D \doinsertsoundtrack {file} {label} {options} -%D \stoptypen +%D \stoptyping \installspecial [\doinsertsoundtrack] [or] [3] @@ -224,9 +231,9 @@ %D and for special applications, one may want to have access %D to the total number of pages. %D -%D \starttypen +%D \starttyping %D \dogetnofinsertpages{filename} -%D \stoptypen +%D \stoptyping %D %D The number is also available after the insert is placed, %D since inclusion may take place immediate when an insert is @@ -242,9 +249,9 @@ %D %D We support rotation with the special: %D -%D \starttypen +%D \starttyping %D \dostartrotation {angle} ... \dostoprotation -%D \stoptypen +%D \stoptyping %D %D For the moment these specials are installed as %D category \type{or}. @@ -258,9 +265,9 @@ %D %D Scaling is also supported: %D -%D \starttypen +%D \starttyping %D \dostartscaling {x} {y} ... \dostopscaling -%D \stoptypen +%D \stoptyping %D %D Like the previous one, these specials are of category %D \type{or}. @@ -274,9 +281,9 @@ %D %D And indeed, mirroring is there too: %D -%D \starttypen +%D \starttyping %D \dostartmirroring {x} {y} ... \dostopmirroring -%D \stoptypen +%D \stoptyping %D %D Again these specials are installed as category \type{or}. @@ -293,6 +300,15 @@ \installspecial [\dostartnegative] [or] [0] \installspecial [\dostopnegative] [or] [0] +%D \macros +%D {dostartoverprint, +%D dostopoverprint} +%D +%D Rudimentary overprint (knockout) control is implemented +%D using: + +\installspecial [\dostartoverprint] [or] [0] +\installspecial [\dostopoverprint] [or] [0] %D The following two specials are used in for instance \type %D {\vadjust}'d margin material inside colored paragraphs. @@ -316,9 +332,9 @@ %D When we look at the implementation, this is a complicated %D one. There are seven arguments. %D -%D \starttypen +%D \starttyping %D \doovalbox {w} {h} {d} {linewidth} {radius} {stroke} {fill} -%D \stoptypen +%D \stoptyping %D %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 @@ -333,7 +349,7 @@ %D Clipping is implemented in such a way that an arbitrary %D can be fed. %D -%D \starttypen +%D \starttyping %D \dostartclipping {pathname}{width} {height} %D \dostopclipping %D \stoptyping @@ -348,9 +364,9 @@ %D %D We can declare some characteristics of the document with %D -%D \starttypen +%D \starttyping %D \dosetupidentity {title} {subject} {author} {creator} {date} {keys} -%D \stoptypen +%D \stoptyping %D %D All data is in string format. @@ -362,9 +378,9 @@ %D This special can be used to tell the driver what page size %D to use. The special takes three arguments. %D -%D \starttypen +%D \starttyping %D \dosetuppaper {type} {width} {height} -%D \stoptypen +%D \stoptyping %D %D The type is one of the common identifiers, like A4, A5 or %D B2. @@ -377,9 +393,9 @@ %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 \starttyping %D \dosetupprinter {type} {hoffset} {voffset} {width} {height} -%D \stoptypen +%D \stoptyping %D %D The first argument is one of \type{letter}, \type{legal}, %D \type{A4}, \type{A5} etc. The dimensions are in @@ -400,17 +416,17 @@ %D %D The first ones can be used to set up the interaction. %D -%D \starttypen +%D \starttyping %D \dosetupinteraction -%D \stoptypen +%D \stoptyping %D %D Normally this command does nothing but giving a message %D that some scheme is supported. %D -%D \starttypen +%D \starttyping %D \dosetupstartaction %D \dosetupstopaction -%D \stoptypen +%D \stoptyping %D %D These two setup the actions to be executed when the document %D is opened and closed. @@ -418,17 +434,17 @@ %D The next commands sets up the page and screen. They are %D kind of related. %D -%D \starttypen +%D \starttyping %D \dosetuppage {hoffset} {voffset} {width} {height} {options} %D \dosetupscreen {hoffset} {voffset} {width} {height} {options} -%D \stoptypen +%D \stoptyping %D %D The first four arguments are in points. Option~1 results in a %D full screen launch. %D -%D \starttypen +%D \starttyping %D \dosetuppageview {keyword} -%D \stoptypen +%D \stoptyping %D %D For the moment we only support \type{fit}. @@ -459,10 +475,10 @@ %D for instance have no meaning on an non||interactive medium. %D These elements are hidden by means of: %D -%D \starttypen +%D \starttyping %D \dostarthide %D \dostophide -%D \stoptypen +%D \stoptyping \installspecial [\dostarthide] [or] [0] \installspecial [\dostophide] [or] [0] @@ -474,10 +490,10 @@ %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 \startitemize[packed,n] +%D \item let \TEX\ highlight the text +%D \item let the driver show us where to click +%D \stopitemize %D %D The first approach is the most secure one. It gives us %D complete control over the visual appearance of hyper @@ -514,17 +530,17 @@ %D destination, we had to provide both labels (\DVIWINDO) and %D pagenumbers (\PDF). Some drivers use start stop pairs. %D -%D \starttypen +%D \starttyping %D \dostartgotolocation {w} {h} {url} {file} {label} {page} %D \dostartgotorealpage {w} {h} {url} {file} {page} -%D \stoptypen +%D \stoptyping %D %D Their counterparts are: %D -%D \starttypen +%D \starttyping %D \dostopgotolocation %D \dostopgotorealpage -%D \stoptypen +%D \stoptyping %D %D The internal alternative is used for system||generated %D links, the external one for user||generated links. The @@ -547,9 +563,9 @@ %D Rather special is the option to include and execute %D JavaScript code. This is a typical \PDF\ option. %D -%D \starttypen +%D \starttyping %D \dostartgotoJS {w} {h} {script} -%D \stoptypen +%D \stoptyping %D %D This not so standard \TEX\ feature should be used with %D care. Preamble scripts are flushed by @@ -573,17 +589,17 @@ %D The opposite commands of \type{\dogotosomething} have only %D one argument: %D -%D \starttypen +%D \starttyping %D \dostartthisislocation {label} %D \dostartthisisrealpage {page} -%D \stoptypen +%D \stoptyping %D %D These commands are accompanied by: %D -%D \starttypen +%D \starttyping %D \dostopthisislocation %D \dostopthisisrealpage -%D \stoptypen +%D \stoptyping %D %D As with all interactive commands's they are installed as %D \type{and} category specials. @@ -611,15 +627,15 @@ %D much on the viewing engine. Therefore one cannot depend %D too much on their support. %D -%D \starttypen +%D \starttyping %D \dostartexecutecommand {w} {h} {command} {options} -%D \stoptypen +%D \stoptyping %D %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 \startlinecorrection\setupalign[middle]\leavevmode +%D \starttable[|l|l|] %D \HL %D \NC \bf command \NC \bf action \NC\SR %D \HL @@ -635,8 +651,8 @@ %D \NC enter \NC enter viewer \NC\MR %D \NC help \NC show help on the viewer \NC\LR %D \HL -%D \stoptabel -%D \stopregelcorrectie +%D \stoptable +%D \stoplinecorrection %D %D Options are to be passed as a comma separated list of %D assignments. @@ -653,21 +669,23 @@ %D Reuse of object can reduce the output filesize %D considerably. Reusable objects are implemented with: %D -%D \starttypen +%D \starttyping %D \dostartobject{class}{name}{width}{height}{depth} %D some typeset material %D \dostopobject -%D \stoptypen +%D \stoptyping %D -%D \starttypen +%D \starttyping %D \doinsertobject{class}{name} -%D \stoptypen +%D \stoptyping %D -%D The savings can be huge in interactive texts. +%D The savings can be huge in interactive texts. The next macro needs +%D to be called after a graphic is inserted (in order to clean up +%D global references). %D -%D \starttypen +%D \starttyping %D \doresetobjects -%D \stoptypen +%D \stoptyping \installspecial [\dostartobject] [or] [5] \installspecial [\dostopobject] [or] [0] @@ -727,9 +745,9 @@ %D This special is called as: %D -%D \starttypen +%D \starttyping %D \doinstallbookmark {level} {nofsubentries} {text} {page} {open} -%D \stoptypen +%D \stoptyping %D %D This definition is very \PDF\ oriented, so for more %D information we kindly refer to the \PDF\ manuals. @@ -741,9 +759,9 @@ %D short moment, let the audience focus at the screen. Like the %D previous one, this special is very \PDF. %D -%D \starttypen +%D \starttyping %D \dosetpagetransition{dissolve}{0} -%D \stoptypen +%D \stoptyping %D %D Transitions have symbolic names, like dissolve, box, split, %D blinds, wipe and glitter. The second argument determines @@ -762,7 +780,7 @@ %D passing parameters. Unfortunately fields often have more %D than nine characteristics, so we pack some arguments in one. %D -%D \starttypen +%D \starttyping %D \dopresettextfield / \dopresetlinefield %D {name} {width} {height} {default} {length} %D {style,color} {options} {alignment} {actions} @@ -785,7 +803,7 @@ %D %D \dopresetradiorecord %D {name} {top} {options} {kids} {actions} -%D \stoptypen +%D \stoptyping \installspecial [\dopresetlinefield] [or] [9] \installspecial [\dopresettextfield] [or] [9] @@ -813,9 +831,9 @@ %D For practical reasons we set some field characteristics %D using: %D -%D \starttypen +%D \starttyping %D \dosetfieldstatus {mode} {parent} {kids} {root} -%D \stoptypen +%D \stoptyping \installspecial [\dosetfieldstatus] [or] [4] @@ -831,9 +849,9 @@ %D %D We can define a calculation order list with: %D -%D \starttypen +%D \starttyping %D \doregistercalculationset {set identifier} -%D \stoptypen +%D \stoptyping \installspecial [\doregistercalculationset] [or] [1] @@ -843,16 +861,16 @@ %D Not so much out of need, but to be complete, we also %D implement text annotations, so called comment: %D -%D \starttypen +%D \starttyping %D \doinsertcomment %D {title} {width} {height} {color} {open} {symbol} {collect} {data} -%D \stoptypen +%D \stoptyping %D %D When enables, comments can be collected and flushed: %D -%D \starttypen +%D \starttyping %D \doflushcomments -%D \stoptypen +%D \stoptyping \installspecial[\doinsertcomment] [and] [8] \installspecial[\doflushcomments] [and] [0] @@ -865,12 +883,12 @@ %D means of postprocessed \DVI, we can save and call upon %D positions. %D -%D \starttypen +%D \starttyping %D \dosetposition {identifier} %D \dosetpositionwhd {identifier} {width} {height} {depth} %D \dosetpositionplus {identifier} {width} {height} {depth} {list} %D \dosetpositionpapersize {width} {height} -%D \stoptypen +%D \stoptyping %D %D This is one of the few specials where when using \PDFTEX\ %D the driver directly deals with the utility file. @@ -883,10 +901,10 @@ %D \macros %D {dostarttransparency,dostoptransparency} %D -%D \starttypen +%D \starttyping %D \dostarttransparency{fraction}{type} %D \dostoptransparency -%D \stoptypen +%D \stoptyping %D %D Although in \CONTEXT\ transparency is closely integrated %D in the color drivers, in the end it is an independent @@ -898,9 +916,9 @@ %D \macros %D {doattachfile} %D -%D \starttypen +%D \starttyping %D \doattachfile{title}{width}{height}{depth}{color}{symbol}{filename}{source} -%D \stoptypen +%D \stoptyping \installspecial [\doattachfile] [or] [8] @@ -918,6 +936,9 @@ \installspecial[\doinsertrenderingobject] [or] [4] \installspecial[\doinsertrenderingobject] [or] [4] +\installspecial[\dostartfonteffect] [or] [3] +\installspecial[\dostopfonteffect] [or] [0] + %D From now on, mapfile loading is also a special; we assume the %D more or less standard dvips syntax. @@ -948,15 +969,15 @@ %D that strong on objects and \PDFTEX\ does a better job. %D Some reasonable alternatives are: %D -%D \starttypen +%D \starttyping %D \setupoutput [dvipsone,acrobat] %D \setupoutput [dviwindo,acrobat] -%D \stoptypen +%D \stoptyping %D %D Although, better is: %D -%D \starttypen +%D \starttyping %D \setupoutput [pdftex] -%D \stoptypen +%D \stoptyping -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/spec-dpm.tex b/tex/context/base/spec-dpm.tex index 2ddbe4f94..0aceee9ca 100644 --- a/tex/context/base/spec-dpm.tex +++ b/tex/context/base/spec-dpm.tex @@ -14,7 +14,9 @@ \unprotect %D This driver is build on top of the general \PDF\ macros, -%D as defined in \type{spec-fdf}, so we inherit that one. +%D as defined in \type{spec-fdf}, so we inherit that one. Remark: +%D this driver is no longer actively maintained, use the dpx one +%D instead! \startspecials[dpm][reset,fdf] @@ -57,7 +59,7 @@ \definefileinsertion{dpm}{mps}#1#2#3#4#5#6#7#8#9% {\PointsToWholeBigPoints{#7}\width \PointsToWholeBigPoints{#8}\height - % brrr, should use #1->#9 + % brrr, should use #1->#9 \special {PSfile="#1"\space llx=\EPSllx\space lly=\EPSlly\space @@ -84,7 +86,7 @@ %D \macros %D {doinsertsoundtrack} %D -%D Sounds are supported too. +%D Sounds are supported too. \definespecial\doinsertsoundtrack{\doPDFinsertsoundtrack} @@ -133,7 +135,7 @@ %D dosetupopenaction,dosetupcloseaction} \definespecial\dosetupinteraction% - {\showmessage{\m!interactions}{21}{DVIPDFM}} + {\showmessage\m!interactions{21}{DVIPDFM}} \definespecial\dosetupopenaction {\doPDFsetupopenaction} \definespecial\dosetupcloseaction{\doPDFsetupcloseaction} @@ -175,12 +177,12 @@ %D \macros %D {dosetupscreen} -\definespecial\dosetupscreen {\doPDFsetupscreen \printpapierhoogte} +\definespecial\dosetupscreen {\doPDFsetupscreen \printpaperheight} -\definespecial\dosetupartbox {\doPDFsetupartbox \printpapierhoogte} -\definespecial\dosetupcropbox {\doPDFsetupcropbox \printpapierhoogte} -\definespecial\dosetupbleedbox{\doPDFsetupbleedbox\printpapierhoogte} -\definespecial\dosetuptrimbox {\doPDFsetuptrimbox \printpapierhoogte} +\definespecial\dosetupartbox {\doPDFsetupartbox \printpaperheight} +\definespecial\dosetupcropbox {\doPDFsetupcropbox \printpaperheight} +\definespecial\dosetupbleedbox{\doPDFsetupbleedbox\printpaperheight} +\definespecial\dosetuptrimbox {\doPDFsetuptrimbox \printpaperheight} %D \macros %D {dostartexecutecommand} @@ -226,26 +228,52 @@ %D \macros %D {dostartobject,dostopobject,doinsertobject} +% \definespecial\dostartobject#1#2#3#4#5% +% {\bgroup +% \setbox\nextbox=\hbox\bgroup +% \dosetobjectreference{#1}{#2}{#1::#2}% +% \scratchdimen#3\edef\width {\the\scratchdimen\space}% +% \scratchdimen#4\edef\height{\the\scratchdimen\space}% +% \special{pdf: bxobj @#1::#2 width \width height \height}} + +% \definespecial\dostopobject% +% {\special{pdf: exobj}% +% \egroup +% \smashbox\nextbox +% \flushatshipout{\box\nextbox}% +% \egroup} + \definespecial\dostartobject#1#2#3#4#5% {\bgroup - \setbox\nextbox=\hbox\bgroup - \dosetobjectreference{#1}{#2}{#1::#2}% - \scratchdimen#3\edef\width {\the\scratchdimen\space}% - \scratchdimen#4\edef\height{\the\scratchdimen\space}% - \special{pdf: bxobj @#1::#2 width \width height \height}} - -\definespecial\dostopobject% - {\special{pdf: exobj}% - \egroup - \smashbox\nextbox - \flushatshipout{\box\nextbox}% - \egroup} + \dowithnextbox + {\dosetobjectreference{#1}{#2}{#1::#2}% + \scratchdimen#3\edef\width {\the\scratchdimen\space}% + \scratchdimen#4\edef\height{\the\scratchdimen\space}% + \setbox\nextbox\vbox + {\special{pdf: bxobj @#1::#2 width \width height \height}% + % we need to compensate for the box offset (ugly, sigh) + \scratchdimen\nextboxht + \advance\scratchdimen\nextboxdp + \advance\scratchdimen-#4\relax + \nextboxdp\zeropoint + \nextboxht\zeropoint + \hbox to #3{\hss\lower.5\scratchdimen\box\nextbox\hss}% + \special{pdf: exobj}% + \global\let\currentPDFresources\empty}% + \smashbox\nextbox + \flushatshipout{\box\nextbox}% + \egroup}% + \hbox\bgroup} + +\definespecial\dostopobject + {\egroup} + \definespecial\doinsertobject#1#2% {\hbox {\dogetobjectreference{#1}{#2}\PDFobjectreference \ifx\PDFobjectreference\empty \else - \special{pdf: usexobj @\PDFobjectreference}% + \special{pdf: usexobj @#1::#2}% \fi}} %D \macros @@ -301,11 +329,11 @@ \newif\ifsharePDFactions \sharePDFactionsfalse \def\dodoPDFaction#1#2#3#4% - {\ifcollectreferenceactions + {\ifcollectreferenceactions \xdef\lastPDFaction{#4}% \else \bgroup - % this is yet untested + % this is yet untested %\ifsharePDFactions % \ifcase\similarreference\relax % \xdef\lastPDFaction{<<#4>>}% @@ -314,7 +342,7 @@ % \special{pdf: object @PDF::sim:\the\nofPDFsimilar\space<<#4>>}% % \xdef\lastPDFaction{@PDF::sim:\the\nofPDFsimilar}% % \else - % % leave \lastPDFaction untouched + % % leave \lastPDFaction untouched % \fi %\else \xdef\lastPDFaction{<<#4>>}% @@ -361,7 +389,7 @@ \def\doPDFaddtocatalog#1% {\special{pdf: put @catalog <<#1>>}} -\def\doPDFaddtoinfo#1% Is this auto appended? Not checked! +\def\doPDFaddtoinfo#1% Is this auto appended? Not checked! {\special{pdf: docinfo <<#1>>}} % put @docinfo <<#1>>}} \def\doPDFpageattribute#1% diff --git a/tex/context/base/spec-dpx.tex b/tex/context/base/spec-dpx.tex index 61156e42c..95d5a3021 100644 --- a/tex/context/base/spec-dpx.tex +++ b/tex/context/base/spec-dpx.tex @@ -40,19 +40,19 @@ %D DVIPDFMx supports the special command \type{pdf: literal ...} %D since the version \type{dvipdfmx-20021028}. %D -%D 1. \type{pdf: linteral #1} puts the given PDF commands \#1 +%D 1. \type{pdf: literal #1} puts the given PDF commands \#1 %D after changing the text matrix with \type{"1 0 0 1 x y cm"} %D to set the current DVI position $(x,y)$ to the origin. %D -%D 2. \type{pdf: linteral reverse #1} puts the given PDF commands \#1 +%D 2. \type{pdf: literal reverse #1} puts the given PDF commands \#1 %D after changing the text matrix with \type{"1 0 0 1 -x -y cm"}. %D -%D 3. \type{pdf: linteral direct #1} puts directly the given PDF +%D 3. \type{pdf: literal direct #1} puts directly the given PDF %D commands \#1 without changing the text matrix. %D %D Literal \PDF\ inclusion is implemented as: -\def\PDFcode#1{\special{pdf: literal direct #1}} +\def\PDFcode#1{\special{pdf: literal #1}} % no direct in pdftex ! ! ! %D \type{\dosetuppaper} in \type{spec-dpm} did not work properly %D because DVIPDFM did not permit changing the page size. @@ -203,18 +203,70 @@ %D Negation is not (yet) supported: +% we need resource access +% % \definespecial\dostartnegative {} % \definespecial\dostopnegative {} % \definespecial\dostarttransparency {} % \definespecial\dostoptransparency {} +\definespecial\dostarttransparency{\doPDFstarttransparency} +\definespecial\dostoptransparency {\doPDFstoptransparency} + +\PDFtransparencysupportedtrue + +\def\@@PDT{@PDT@} + +\ifx\PDFcurrenttransparency\undefined + \newcount\PDFcurrenttransparency \PDFcurrenttransparency=0 % -1 +\fi + +\def\assignPDFtransparency#1#2% + {\def\PDFtransparencyidentifier{/Tr#1}% + %\def\PDFtransparencyreference{#2 0 R}} + \def\PDFtransparencyreference{@TR:#2}} + +\def\presetPDFtransparency#1#2% + {\initializePDFtransparency + \executeifdefined{\@@PDT#1:#2}{\dopresetPDFtransparency{#1}{#2}}} + +\def\dopresetPDFtransparency#1#2% + {\global\advance\PDFcurrenttransparency \plusone + %\immediate\pdfobj{\PDFtransparancydictionary{#1}{#2}{}}% +% \special{pdf: object @TR:\the\PDFcurrenttransparency\space \PDFtransparancydictionary{#1}{#2}{}}% + \doPDFreserveDPXobject{TR:\the\PDFcurrenttransparency}{<< >>}% + \special{pdf: \doPDFcheckedDPXobject{TR:\the\PDFcurrenttransparency}\PDFtransparancydictionary{#1}{#2}{}}% + \edef\PDFtransparencyidentifier{/Tr\the\PDFcurrenttransparency}% + %\edef\PDFtransparencyreference {\the\pdflastobj\space 0 R}% + \edef\PDFtransparencyreference {@TR:\the\PDFcurrenttransparency}% + \setxvalue{\@@PDT#1:#2}% + {\noexpand\assignPDFtransparency{\the\PDFcurrenttransparency}{\the\PDFcurrenttransparency}}% + \appendtoPDFdocumentextgstates + {\PDFtransparencyidentifier\space + \PDFtransparencyreference\space}} + +\def\initializePDFtransparency + %{\immediate\pdfobj{\PDFtransparancydictionary{1}{1}{/AIS false}}% +% {\special{pdf: object @TR:0 \PDFtransparancydictionary{1}{1}{/AIS false}}% + {\doPDFreserveDPXobject{TR:0}{<< >>}% + \special{pdf: \doPDFcheckedDPXobject{TR:0}\PDFtransparancydictionary{1}{1}{/AIS false}}% + \xdef\PDFtransparencyresetidentifier{/Tr0}% + %\xdef\PDFtransparencyresetreference{\the\pdflastobj\space 0 R}% + \xdef\PDFtransparencyresetreference{@TR:0}% + \setxvalue{\@@PDT0:0}% + %{\noexpand\assignPDFtransparency{0}{\the\pdflastobj}}% + {\noexpand\assignPDFtransparency{0}{0}}% + \appendtoPDFdocumentextgstates + {\PDFtransparencyresetidentifier\space + \PDFtransparencyresetreference\space}% + \global\let\initializePDFtransparency\relax} %D \macros %D {dosetupinteraction, %D dosetupopenaction,dosetupcloseaction} \definespecial\dosetupinteraction - {\showmessage{\m!interactions}{21}{DVIPDFMx}} + {\showmessage\m!interactions{21}{DVIPDFMx}} \definespecial\dosetupopenaction {\doPDFsetupopenaction} \definespecial\dosetupcloseaction{\doPDFsetupcloseaction} @@ -256,12 +308,12 @@ %D \macros %D {dosetupscreen} -\definespecial\dosetupscreen {\doPDFsetupscreen \printpapierhoogte} +\definespecial\dosetupscreen {\doPDFsetupscreen \printpaperheight} -\definespecial\dosetupartbox {\doPDFsetupartbox \printpapierhoogte} -\definespecial\dosetupcropbox {\doPDFsetupcropbox \printpapierhoogte} -\definespecial\dosetupbleedbox{\doPDFsetupbleedbox\printpapierhoogte} -\definespecial\dosetuptrimbox {\doPDFsetuptrimbox \printpapierhoogte} +\definespecial\dosetupartbox {\doPDFsetupartbox \printpaperheight} +\definespecial\dosetupcropbox {\doPDFsetupcropbox \printpaperheight} +\definespecial\dosetupbleedbox{\doPDFsetupbleedbox\printpaperheight} +\definespecial\dosetuptrimbox {\doPDFsetuptrimbox \printpaperheight} %D \macros %D {dostartexecutecommand} @@ -306,35 +358,46 @@ %D \macros %D {dostartobject,dostopobject,doinsertobject} +%D +%D Modified to support the color shading feature since version +%D \type{dvipdfmx-20021128}. + +% wd nextbox > #3 ivm offset \definespecial\dostartobject#1#2#3#4#5% {\bgroup - \setbox\nextbox\hbox\bgroup - \dosetobjectreference{#1}{#2}{#1::#2}% - \scratchdimen#3\edef\width {\the\scratchdimen\space}% - \scratchdimen#4\edef\height{\the\scratchdimen\space}% - \special{pdf: bxobj @#1::#2 width \width height \height}} - -%D Modified to support the color shading feature since version -%D \type{dvipdfmx-20021128}. + \dowithnextbox + {\dosetobjectreference{#1}{#2}{@#1::#2}% + \scratchdimen#3\edef\width {\the\scratchdimen\space}% + \scratchdimen#4\edef\height{\the\scratchdimen\space}% + \setbox\nextbox\vbox + {\special{pdf: bxobj @#1::#2 width \width height \height}% + % we need to compensate for the box offset (ugly, sigh) + \scratchdimen\nextboxht + \advance\scratchdimen\nextboxdp + \advance\scratchdimen-#4\relax + \nextboxdp\zeropoint + \nextboxht\zeropoint + \hbox to #3{\hss\lower.5\scratchdimen\box\nextbox\hss}% + \ifx\currentPDFresources\empty + \special{pdf: exobj}% + \else + \special{pdf: exobj <<\currentPDFresources\the\pdfpageresources>>}% + \global\let\currentPDFresources\empty + \fi}% + \smashbox\nextbox + \flushatshipout{\box\nextbox}% + \egroup}% + \hbox\bgroup} \definespecial\dostopobject - {\ifx\currentPDFresources\empty - \special{pdf: exobj}% - \else - \special{pdf: exobj <<\currentPDFresources>>}% - \global\let\currentPDFresources\empty - \fi - \egroup - \smashbox\nextbox - \flushatshipout{\box\nextbox}% - \egroup} + {\egroup} \definespecial\doinsertobject#1#2% {\hbox - {\dogetobjectreference{#1}{#2}\PDFobjectreference + {\doPDFgetobjectreference{#1}{#2}\PDFobjectreference \ifx\PDFobjectreference\empty \else - \special{pdf: usexobj @\PDFobjectreference}% + \special{pdf: usexobj @#1::#2}% \fi}} %D \macros @@ -439,17 +502,44 @@ \scratchdimen#3\edef\width {\the\scratchdimen\space}% \scratchdimen#4\edef\height{\the\scratchdimen\space}% \special{pdf: ann @#1::#2 width \width height \height <<#5>>}% - \dosetobjectreference{#1}{#2}{#1::#2}% + \dosetobjectreference{#1}{#2}{@#1::#2}% \egroup} \def\doPDFactionobject class #1 name #2 width #3 height #4 action #5% {\dodoPDFaction{@#1::#2}{#3}{#4}{#5}% - \dosetobjectreference{#1}{#2}{#1::#2}} + \dosetobjectreference{#1}{#2}{@#1::#2}} %D \macros %D {doPDFaddtocatalog,doPDFaddtoinfo, %D doPDFpageattribute,doPDFpagesattribute} +% we could move much more to spec-fdf + +% \ifx\pdfcatalog \undefined \newtoks\pdfcatalog \fi +% \ifx\pdfinfo \undefined \newtoks\pdfinfo \fi +% \ifx\pdfpageattr \undefined \newtoks\pdfpageattr \fi +% \ifx\pdfpageresources\undefined \newtoks\pdfpageresources \fi +% \ifx\pdfpagesattr \undefined \newtoks\pdfpagesattr \fi + +% \def\doPDFaddtocatalog #1{\expanded{\global\pdfcatalog {#1\the\pdfcatalog }}} +% \def\doPDFaddtoinfo #1{\expanded{\global\pdfinfo {#1\the\pdfinfo }}} +% \def\doPDFpageattribute #1{\expanded{\global\pdfpageattr {#1\the\pdfpageattr }}} +% \def\doPDFpageresource #1{\expanded{\global\pdfpageresources{#1\the\pdfpageresources}}} +% \def\doPDFpagesattribute#1{\expanded{\global\pdfpagesattr {#1\the\pdfpagesattr }}} + +% \def\doPDFresetpageattributes{\global\pdfpageattr\emptytoks} +% \def\doPDFresetpageresources {\global\pdfpageresources\emptytoks} + +% \appendtoks +% \special{pdf: put @catalog <<#1>>}% +% \special{pdf: docinfo <<#1>>}% +% \special{pdf: put @pages <<#1>>}% +% \to \everylastshipout + +% \appendtoks +% \special{pdf: put @thispage <<#1>>}% +% \to\everyshipout + \def\doPDFaddtocatalog#1% {\special{pdf: put @catalog <<#1>>}} @@ -463,7 +553,7 @@ {\special{pdf: put @pages <<#1>>}} \def\doPDFpageresource#1% - {\message{[skipping PDF resource]}} + {\special{pdf: put @resources <<#1>>}} \let\doPDFresetpageresources =\relax \let\doPDFresetpageattributes=\relax @@ -483,21 +573,58 @@ %D \macros %D {doPDFdictionaryobject,doPDFarrayobject} +% Dvipdfmx can't handle +% +% \special{pdf:put @foo << /Bar @bar >>} +% \special{pdf:put @bar << /Foo @foo >>} +% +% Objects must be defined before they are used. +% +% \special{pdf:obj @foo << >>} +% \special{pdf:obj @bar << >>} +% \special{pdf:put @foo << /Bar @bar >>} +% \special{pdf:put @bar << /Foo @foo >>} +% +% However, this only works for dictionary and array. + +\def\doPDFreserveDPXobject#1#2% + {\ifundefined{r:pdx:d:#1}% + % we need a \flushatshipoutprep (prepended, normally appended) + \flushatshipout{\special{pdf: object @#1 #2}}% + \global\letvalue{r:pdx:d:#1}\empty + \fi} + +\def\doPDFreserveDPXobjectfirst#1#2% + {\ifundefined{r:pdx:d:#1}% + \doglobal\prependtoks\special{pdf: object @#1 #2}\to\everyfirstshipout + \global\letvalue{r:pdx:d:#1}\empty + \fi} + +\def\doPDFcheckedDPXobject#1{\ifundefined{r:pdx:d:#1}object\else put\fi\space @#1\space} + +% todo when etex is fixed, \everyPDFpresets, leeg voor pdftex, nodig voor dvipdfmx + +\doPDFreserveDPXobjectfirst{FDF::docuextgstates}{<< >>} + \def\doPDFdictionaryobject class #1 name #2 data #3% - {\special{pdf: object @#1::#2 <<#3>>}} + {\flushatshipout + {\special{pdf: \doPDFcheckedDPXobject{#1::#2}<<#3>>}% + \dosetobjectreference{#1}{#2}{@#1::#2}}} \def\doPDFarrayobject class #1 name #2 data #3% - {\special{pdf: object @#1::#2 [#3]}} + {\flushatshipout + {\special{pdf: \doPDFcheckedDPXobject{#1::#2}[#3]}% + \dosetobjectreference{#1}{#2}{@#1::#2}}} %D \macros %D {defaultobjectreference,doPDFgetobjectreference} -\def\defaultobjectreference#1#2{#1::#2} +\def\defaultobjectreference#1#2{@#1::#2} %D \type{\doPDFgetobjectreference} in \type{spec-dpm} had a bug. \def\doPDFgetobjectreference#1#2#3% - {\dogetobjectreference{@#1}{#2}#3% + {\dogetobjectreference{#1}{#2}#3% \ifx#3\empty\else\edef#3{#3}\fi} % \def\doPDFgetobjectpage #1#2#3{..} @@ -578,14 +705,38 @@ %D 5. Modified codes from \type{supp-pdf} -\let\dohandleMPfshow\handleMPfshow - \def\handleMPfshow {\special{pdf: literal direct q}% \special{pdf: literal reverse}% \dohandleMPfshow \special{pdf: literal direct Q}} +\newcounter\MPPDFcounter + +\def\setMPPDFobject#1#2% resources boxnumber / see other object macros / unchecked + {\doglobal\increment\MPPDFcounter + \bgroup + \setbox\nextbox\vbox + {\scratchdimen\wd#2\edef\width {\the\scratchdimen\space}% + \scratchdimen\ht#2\edef\height{\the\scratchdimen\space}% + \special{pdf: bxobj @MPPDF:\MPPDFcounter\space width \width height \height}% + \box#2% + \special{pdf: exobj <<\currentPDFresources>>}}% + \smashbox\nextbox + \flushatshipout{\box\nextbox}% + \egroup + \edef\getMPPDFobject{\special{pdf: usexobj @MPPDF:\MPPDFcounter}}} + +\let\getMPPDFobject\relax + +\definespecial\doinsertMPfile#1% + {\doiffileelse{./#1}{\includeMPasPDF{./#1}}{\message{[MP #1]}}} + +%D Experimental (untested): + +\definespecial\dostartfonteffect{\doPDFstartfonteffect} +\definespecial\dostopfonteffect {\doPDFstopfonteffect} + \stopspecials -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/spec-dvi.tex b/tex/context/base/spec-dvi.tex index 150d4bdb1..daf860cbe 100644 --- a/tex/context/base/spec-dvi.tex +++ b/tex/context/base/spec-dvi.tex @@ -26,15 +26,15 @@ \newbox\DVIobjects \newcounter\DVIobjectcounter \definespecial\dostartobject#1#2#3#4#5% - {\setbox\nextbox=\vbox\bgroup - \def\dodostopobject% + {\setbox\nextbox\vbox\bgroup + \def\dodostopobject {\egroup \doglobal\increment\DVIobjectcounter - \global\setbox\DVIobjects=\vbox + \global\setbox\DVIobjects\vbox {\offinterlineskip \forgetall \unvbox\DVIobjects - \setbox\nextbox\hbox{\box\nextbox} + \setbox\nextbox\hbox{\box\nextbox}% \wd\nextbox\zeropoint \dp\nextbox\zeropoint \ht\nextbox\onepoint @@ -42,7 +42,7 @@ \box\nextbox}% \dosetobjectreference{#1}{#2}{\DVIobjectcounter}}} -\definespecial\dostopobject% +\definespecial\dostopobject {\dodostopobject} \definespecial\doinsertobject#1#2% @@ -50,13 +50,15 @@ \dogetobjectreference{#1}{#2}\DVIobjectreference \splittopskip\zeropoint \setbox0=\copy\DVIobjects - \dimen0=\DVIobjectreference pt + \dimen0=\DVIobjectreference\onepoint \advance\dimen0 -\onepoint - \setbox2=\vsplit0 to \dimen0 + \setbox2\vsplit0 to \dimen0 \ifdim\ht0>\onepoint \setbox0\vsplit0 to \onepoint \fi - \unvbox0\setbox0=\lastbox\unhbox0 + \unvbox0 + \setbox0\lastbox + \hbox{\unhbox0}% the \hbox is really needed! \egroup} %D \macros @@ -74,11 +76,11 @@ %D commands and append these to \type {jobname.tuo} using the %D format: %D -%D \starttypen +%D \starttyping %D \pospxy {identifier}{page}{x}{y} %D \pospxywhd {identifier}{page}{x}{y}{w}{h}{d} %D \pospxyplus{identifier}{page}{x}{y}{w}{h}{d}{list} -%D \stoptypen +%D \stoptyping %D %D The postprocessor should, of course, provide the \type %D {page}, \type {x}, and \type {y} values. diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex index ac5151e99..f17777671 100644 --- a/tex/context/base/spec-fdf.tex +++ b/tex/context/base/spec-fdf.tex @@ -217,7 +217,7 @@ %D interface macros. These must be provided by the special %D drivers \type{pdf} (\ACROBAT) and \type{tpd} (\PDFTEX). %D -%D \starttypen +%D \starttyping %D \doPDFdestination name #1 %D \doPDFaction width #1 height #2 action #3 %D \doPDFannotation width #1 height #2 data #3 @@ -234,7 +234,7 @@ %D \defaultobjectreference #1#2 % class name %D \doPDFgetobjectreference #1#2#3 % class name \PDFobjectreference %D \doPDFgetobjectpagereference #1#2#3 % class name \PDFobjectreference -%D \stoptypen +%D \stoptyping %D %D The keywords reflect their use. For the moment we stick to %D keywords, because that way at we get an indication of what @@ -378,12 +378,24 @@ {\ifcase#6 \or\or\else /ViewerPreferences << /FitWindow true >>\fi}% \egroup} +% not that good if we switch drivers + \appendtoksonce % hack to prevent duplicates \doPDFaddtocatalog{\currentPDFpagemode\currentPDFviewerprefs}% \doPDFaddtoinfo{/Trapped /False}% \doPDFaddtoinfo{/ConTeXt.Version (\contextversion)}% \to \everyfirstshipout +\def\PDFversion{1.5} + +\appendtoksonce + \def\PDFversion{1.5}% +\to \everyresetspecials + +\appendtoksonce % we catch both n and 1.n + \doPDFaddtocatalog{/Version \ifdim\PDFversion00\points>100\points 1.\fi\PDFversion}% +\to \everylastshipout + \def\doPDFsetupwhateverbox#1#2#3#4#5#6% watch the extra arguments {\bgroup \!!widtha#5% @@ -945,8 +957,8 @@ \donefalse \@EA\processallactionsinset\@EA [#9] - [\v!sturing=>\donetrue, - \v!herhaal=>\edef\pdf@@actions{\pdf@@actions /Mode /Repeat }, + [\v!controls=>\donetrue, + \v!repeat=>\edef\pdf@@actions{\pdf@@actions /Mode /Repeat }, \v!preview=>\edef\pdf@@options{\pdf@@options /Poster true }]% \edef\pdf@@actions{\pdf@@actions /ShowControls \ifdone true\else false\fi}% \doPDFannotation width #7 height #8 data @@ -962,6 +974,8 @@ %D %D In \PDF\ sounds can be embedded like movies. +\ifx\everygoto\undefined \newtoks\everygoto \fi + \let\currentsound\s!unknown \def\doPDFinsertsoundtrack#1#2#3% @@ -970,8 +984,9 @@ \let\pdf@@actions\empty \@EA\processallactionsinset\@EA [#3] - [\v!herhaal=>\edef\pdf@@actions{\pdf@@actions /Mode /Repeat }]% - \flushatshipout % since it can be buried in a chained box + [\v!repeat=>\edef\pdf@@actions{\pdf@@actions /Mode /Repeat }]% +\collectdriverresource +% \flushatshipout % since it can be buried in a chained box {\doPDFannotation width 0pt height 0pt data {/Subtype /Movie /Border [0 0 0] @@ -1022,11 +1037,13 @@ \startPDFsymbolappearance \doPDFembedfile\PDFfile{#7}{#8}% \doPDFgetembeddedfilereference\PDFfile\PDFobjectreference + \setFDFlayer\@@DriverAttachmentLayer \doPDFannotation width {\width} height {\totalheight} data {/Subtype /FileAttachment /FS \PDFobjectreference\space /Contents (#1) \PDFsymbol + \FDFlayer \PDFattributes}% \stopPDFsymbolappearance \egroup} @@ -1257,37 +1274,6 @@ %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 @@ -1341,17 +1327,17 @@ \def\@@FDFflag{FDFflag} \def\@@FDFplus{FDFplus} -\letvalue {\@@FDFflag\v!alleenleesbaar}=\FDFflagReadOnly -\letvalue {\@@FDFflag\v!verplicht}=\FDFflagRequired -\letvalue {\@@FDFflag\v!beschermd}=\FDFflagPassword -\letvalue {\@@FDFflag\v!gesorteerd}=\FDFflagSort -\letvalue {\@@FDFflag\v!nietbeschikbaar}=\FDFflagNoExport -\letvalue {\@@FDFflag\v!geencontrole}=\FDFflagDoNotSpellCheck -\letvalue {\@@FDFflag\v!vast}=\FDFflagDoNotScroll +\letvalue {\@@FDFflag\v!readonly}=\FDFflagReadOnly +\letvalue {\@@FDFflag\v!required}=\FDFflagRequired +\letvalue {\@@FDFflag\v!protected}=\FDFflagPassword +\letvalue {\@@FDFflag\v!sorted}=\FDFflagSort +\letvalue {\@@FDFflag\v!unavailable}=\FDFflagNoExport +\letvalue {\@@FDFflag\v!nocheck}=\FDFflagDoNotSpellCheck +\letvalue {\@@FDFflag\v!fixed}=\FDFflagDoNotScroll \letvalue {\@@FDFflag\v!file}=\FDFflagFileSelect -\letvalue {\@@FDFplus\v!verborgen}=\FDFplusHidden -\letvalue {\@@FDFplus\v!printbaar}=\FDFplusPrintable +\letvalue {\@@FDFplus\v!hidden}=\FDFplusHidden +\letvalue {\@@FDFplus\v!printable}=\FDFplusPrintable \letvalue {\@@FDFplus\v!auto}=\FDFplusAutoView @@ -1429,9 +1415,9 @@ \def\setFDFalignment[#1]% {\processaction [#1] - [ \v!links=>\edef\FDFalign{2}, % raggedleft - \v!midden=>\edef\FDFalign{1}, % raggedcenter - \v!rechts=>\edef\FDFalign{0}]} % raggedright + [ \v!left=>\edef\FDFalign{2}, % raggedleft + \v!middle=>\edef\FDFalign{1}, % raggedcenter + \v!right=>\edef\FDFalign{0}]} % raggedright %D \macros %D {setFDFattributes} @@ -1556,10 +1542,10 @@ %D The event handler becomes something: %D -%D \starttypen +%D \starttyping %D /AA << /D << /S ... >> ... /C << /S ... >> %D /A << /S /JavaScript /JS (...) >> -%D \stoptypen +%D \stoptyping % \def\setFDFaction#1#2% % {\bgroup @@ -1595,9 +1581,9 @@ %D This rather confusion prone series of script can be tested %D with: %D -%D \starttypen +%D \starttyping %D \testFDFactions -%D \stoptypen +%D \stoptyping %D %D which simply redefined the previous macro to one that prints %D a message to the console. @@ -1665,7 +1651,7 @@ \xdef\FDFcollection{\FDFcollection\space\PDFobjectreference}% \fi} -\prependtoksonce \flushFDFnames \to \everylastshipout % test \everybye +\appendtoksonce \flushFDFnames \to \everylastshipout % test \everybye / was \prependtoksonce %D \macros %D {defineFDFfonts, @@ -1776,25 +1762,21 @@ %D screen is adapted when going to a destination. Watch the %D space. -\def\PDFpageviewkey{ fit} -\def\PDFpageviewwrd{ /Fit} +\def\PDFpageviewkey{fit} +\def\PDFpageviewwrd{/Fit} \def\PDFpageview {/View [\PDFpageviewwrd] } +\def\PDFpagexyzspec{0 0 0} % hack, pdftex does handle this -\def\PDFpagexyzspec{ 0 0 0} % hack, pdftex does handle this - -\def\dosetuppageview#1% +\def\dosetuppageview#1% watch the v-h swapping here {\processaction [#1] - [\v!passend=>\def\PDFpageviewkey{ fit}% - \def\PDFpageviewwrd{ /Fit}, - \v!breedte=>\def\PDFpageviewkey{ fith}% % watch the v-h - \def\PDFpageviewwrd{ /FitH}, % swapping here - \v!hoogte=>\def\PDFpageviewkey{ fitv}% % and here and - \def\PDFpageviewwrd{ /FitV}, % here too - \v!standaard=>\def\PDFpageviewkey{ xyz\PDFpagexyzspec}% - \def\PDFpageviewwrd{ /XYZ\PDFpagexyzspec}, - \s!unknown=>\def\PDFpageviewkey{ fit}% - \def\PDFpageviewwrd{ /Fit}]% + [\v!fit=>\def\PDFpageviewkey {fit}\def\PDFpageviewwrd{/Fit}, + \v!width=>\def\PDFpageviewkey {fith}\def\PDFpageviewwrd{/FitH}, + \v!height=>\def\PDFpageviewkey {fitv}\def\PDFpageviewwrd{/FitV}, + \v!minbreedte=>\def\PDFpageviewkey{fitbh}\def\PDFpageviewwrd{/FitBH}, + \v!minhoogte=>\def\PDFpageviewkey{fitbv}\def\PDFpageviewwrd{/FitBV}, + \v!standard=>\def\PDFpageviewkey{xyz \PDFpagexyzspec}\def\PDFpageviewwrd{/XYZ \PDFpagexyzspec}, + \s!unknown=>\def\PDFpageviewkey {fit}\def\PDFpageviewwrd{/Fit}]% \edef\PDFpageview{/View [\PDFpageviewwrd]}} %D \macros @@ -1823,7 +1805,7 @@ \def\doFDFpresetlinefield#1#2#3#4#5#6#7#8#9% {\bgroup - \setFDFlayer + \setFDFlayer\@@DriverFieldLayer \setFDFswitches[#7]% \setFDFattributes[#6]% \setFDFalignment[#8]% @@ -1888,7 +1870,7 @@ \def\doFDFpresetchoicefield#1#2#3#4#5#6#7#8% {\bgroup - \setFDFlayer + \setFDFlayer\@@DriverFieldLayer \setFDFswitches[#6]% \setFDFattributes[#5]% \setFDFvalues[#7][#4]% @@ -1953,7 +1935,7 @@ \def\doFDFpresetpushcheckfield#1#2#3#4#5#6#7#8% in acro<5 (\FDFdefault) {\bgroup % in acro>5 /\FDFdefault - \setFDFlayer + \setFDFlayer\@@DriverFieldLayer \ifcase#8\relax\FDFvaluesfalse\else\FDFvaluestrue\fi \setFDFswitches[#5]% \setFDFactions[#7]% @@ -2034,7 +2016,7 @@ \def\doFDFpresetradiofield#1#2#3#4#5#6#7#8% {\bgroup - \setFDFlayer + \setFDFlayer\@@DriverFieldLayer \FDFvaluestrue \setFDFswitches[#5]% \setFDFactions[#8]% @@ -2199,22 +2181,22 @@ %D Layer support: -\def\setFDFlayer % todo : \ifx\PDFobjectreference\noPDFobjectreference ipv found +\def\setFDFlayer#1% todo : \ifx\PDFobjectreference\noPDFobjectreference ipv found {\letempty\FDFlayer - \doifsomething\@@DriverFieldLayer - {\checkproperty\@@DriverFieldLayer - \doifobjectreferencefoundelse{PDLN}\@@DriverFieldLayer - {\doPDFgetobjectreference{PDLN}\@@DriverFieldLayer\PDFobjectreference - \edef\FDFlayer{/OC \PDFobjectreference}}% + \doifsomething{#1}% + {\checkproperty[#1]% == \dodocheckproperty\@@DriverFieldLayer + \doifobjectreferencefoundelse{PDLN}{#1} + {\doPDFgetobjectreference{PDLN}{#1}\!!stringa % we need to avoid a clash with other macros + \edef\FDFlayer{/OC \!!stringa}}% \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: %D -%D \starttypen +%D \starttyping %D {yes,ok,fine},{no,rubish,awful} -%D \stoptypen +%D \stoptyping %D \macros %D {doFDFdefinefieldset,doFDFgetfieldset,doFDFiffieldset} @@ -2222,11 +2204,11 @@ %D Field sets, the ones we use in submitting and resetting %D fields, are implemented using the next low level specials: %D -%D \starttypen +%D \starttyping %D \doFDFdefinefieldset{TAG}{name,name,...} %D \doFDFgetfieldset{TAG} %D \doFDFiffieldset{TAG}{sequence} -%D \stoptypen +%D \stoptyping \def\doFDFdefinefieldset#1#2% tag commalist {\let\FDFfieldset\empty @@ -2308,22 +2290,22 @@ %D Once filled in, we can export or submit the field in the %D \FDF\ file format. Such a file can be loaded by %D -%D \starttypen +%D \starttyping %D \loadFDFfields{fiel-ini} -%D \stoptypen +%D \stoptyping %D %D or inspected by %D -%D \starttypen +%D \starttyping %D \showFDFfields{fiel-ini} -%D \stoptypen +%D \stoptyping %D %D After both commands, one can use %D -%D \starttypen +%D \starttyping %D \getFDFfield{name} %D \setFDFfield{name}{value} -%D \stoptypen +%D \stoptyping %D %D to inspect and overrule the data. %D @@ -2332,9 +2314,9 @@ %D named \type{filename.fdt}. If one disables the call to this %D script, by saying: %D -%D \starttypen +%D \starttyping %D \runFDFconverterfalse -%D \stoptypen +%D \stoptyping %D %D or when \CONTEXT\ cannot find the \type{fdt} file, it tries %D to interpret the \type{fdf} file directly. Both mechanisms @@ -2344,7 +2326,7 @@ %D The \PERL\ script produces a file formatted as: %D -%D \starttypen +%D \starttyping %D \beginFDFobject %D \beginFDFdata %D \beginFDFfields @@ -2352,7 +2334,7 @@ %D \endFDFfields %D \endFDFdata %D \endFDFobject -%D \stoptypen +%D \stoptyping %D %D One reason for using key value pairs is that we cannot be %D sure or the order in which the name and value are given @@ -2523,13 +2505,14 @@ \def\doPDFflushcomments {\box\PDFsymbolbox} -\long\def\doPDFinsertcomment#1#2#3#4#5#6#7#8% +\long\def\doPDFinsertcomment#1#2#3#4#5#6#7#8% % \@@DriverCommentLayer set otherwise {\bgroup % title width height color open symbol collect data \presetPDFsymbolappearance{#4}{#6}{#2}{#3}\!!zeropoint% sets width/height \doifelsenothing{#1} {\let\PDFidentifier\empty} {\def\PDFidentifier{/T (#1)}}% \sanitizePDFencoding#8\to\PDFdata + \setFDFlayer\@@DriverCommentLayer \startPDFsymbolappearance \ifPDFpopupcomments \doglobal\increment\nofFDFcomments @@ -2539,22 +2522,26 @@ \donefalse \ifdone \setbox\scratchbox\hbox - % pdftex (efficient) - % {\doPDFannotation - % generic (less efficient) {\doPDFannotationobject class FDF name {c::\nofFDFcomments} - % argument (common) - width #2 height #3 data % text window + width #2 height #3 data % text window, size does not work {/Subtype /Popup /Parent \PDFobjectreference}}% \ifcase#7\relax \vbox to \height{\forgetall\vskip#3\box\scratchbox\vss}% \else % incredible trial and error hack + % it's quite a mess, the annot width cannot be set, well, it can + % but the appearance and text sizes get mixed up +% \setbox\scratchbox\vbox to \height{\forgetall\vskip#3\box\scratchbox\vss}% +% \global\setbox\PDFsymbolbox\vbox +% {\hsize#2% +% \forgetall +% \vsmash{\box\PDFsymbolbox} +% \box\scratchbox}% + % this may change when acrobat gets less bugged + \setbox\scratchbox\vbox to #3{\forgetall\vss\box\scratchbox}% + \wd\scratchbox#2% \global\setbox\PDFsymbolbox\vbox - {\hsize#2% - \forgetall - \vsmash{\box\PDFsymbolbox} - \box\scratchbox}% + {\startoverlay{\box\PDFsymbolbox}{\box\scratchbox}\stopoverlay}% \fi \fi % generic @@ -2572,6 +2559,7 @@ \ifdone /Popup \PDFobjectreference\fi /Contents \ifPDFunicode <\PDFdata> \else(\PDFdata) \fi \PDFidentifier + \FDFlayer \PDFsymbol \PDFattributes}% \else @@ -2579,6 +2567,7 @@ {/Subtype /Text \ifcase#5 \else/Open true\fi /Contents \ifPDFunicode <\PDFdata> \else(\PDFdata) \fi + \FDFlayer \PDFsymbol \PDFidentifier \PDFattributes}% @@ -2656,7 +2645,7 @@ %D Hooked into \CONTEXT, this special supports %D -%D \starttypen +%D \starttyping %D \startcomment %D hello beautiful\\world %D \stopcomment @@ -2666,12 +2655,12 @@ %D the f\'irst time %D \stopcommen %D -%D \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm] +%D \startcommentaar[hallo][color=green,width=4cm,height=3cm] %D first %D %D second %D \stopcommentaar -%D \stoptypen +%D \stoptyping %D %D So, special characters, forced linebreaks using \type{\\} %D and \type{\par} are handled in the appropriate way. @@ -2757,8 +2746,27 @@ \def\doPDFstartgraycolormode#1% {\PDFcode{#1 g\ifPDFstrokecolor\space#1 G\fi}} -\def\doPDFstartspotcolormode#1#2% - {\PDFcode{/#1 CS #2 SC /#1 cs #2 sc}} +% \def\doPDFstartspotcolormode#1#2% +% {\PDFcode{/#1 CS #2 SC /#1 cs #2 sc}} + +\def\doPDFstartspotcolormode#1#2% redefining spotcolors is not possible anyway + {\ifundefined{pdf:scs:#2}% + \bgroup + \getcommacommandsize[#2]% + \ifcase\commalistsize\or + \setxvalue{pdf:scs:#2}{#2 SCN #2 scn}% \setxvalue{pdf:scs:#2}{#2 SC #2 sc}% + \else + \let\PDFspotcolorspecs\empty + \def\dospotcolorcommand##1{\edef\PDFspotcolorspecs{\PDFspotcolorspecs##1\space}}% + \processcommacommand[#2]\dospotcolorcommand + \setxvalue{pdf:scs:#2}{\PDFspotcolorspecs SCN \PDFspotcolorspecs scn}% + \fi + \egroup + \fi + \PDFcode{/#1 cs /#1 CS \PDFgetspotcolorspec{#2}}} + +\def\PDFgetspotcolorspec#1% + {\executeifdefined{pdf:scs:#1}\empty} % better no default than one with too less args \def\doPDFstartnonecolormode {\PDFcode{/None CS 1 SC /None cs 1 sc}} @@ -2773,27 +2781,59 @@ % /Device#2 \the\pdflastobj\space0 R]} so we use separation % colors that work and print ok -\def\doPDFregistersomespotcolor#1#2#3#4% +\def\doPDFregistersomespotcolor#1#2#3#4% implemented in the driver {\writestatus\m!systems{missing spot color definition}\wait} \def\doPDFregisternonecolor % internal command {\doPDFregistergrayspotcolor{None}{1}% \globallet\doPDFregisternonecolor\relax} -\def\doPDFregisterrgbspotcolor#1#2#3#4% - {\doPDFregistersomespotcolor - {#1}{RGB}{[0.0 1.0 0.0 1.0 0.0 1.0]}% - {{dup #2 mul exch dup #3 mul exch #4 mul}}} +\def\doPDFregisterspotcolorname#1#2% implemented in the driver + {} + +\definespecial\doregisterspotcolorname{\doPDFregisterspotcolorname} + +% \def\doPDFregisterrgbspotcolor#1#2#3#4% +% {\doPDFregistersomespotcolor +% {#1}{RGB}{[0.0 1.0 0.0 1.0 0.0 1.0]}% +% {{dup #2 mul exch dup #3 mul exch #4 mul}}} +% +% \def\doPDFregistercmykspotcolor#1#2#3#4#5% +% {\doPDFregistersomespotcolor +% {#1}{CMYK}{[0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0]}% +% {{dup #2 mul exch dup #3 mul exch dup #4 mul exch #5 mul}}} +% +% \def\doPDFregistergrayspotcolor#1#2% +% {\doPDFregistersomespotcolor +% {#1}{Gray}{[0.0 1.0]}% +% {{pop}}} + + +\def\doPDFregisterrgbspotcolor#1#2#3#4#5#6#7% name noffractions names p's r g b + {\doPDFregistersomespotcolor{#1}{#2}{#3}{#4}{RGB}{0.0 1.0 0.0 1.0 0.0 1.0}% + {\ifcase#2\or dup #5 mul exch dup #6 mul exch #7 mul\else#5 #6 #7\fi}} -\def\doPDFregistercmykspotcolor#1#2#3#4#5% - {\doPDFregistersomespotcolor - {#1}{CMYK}{[0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0]}% - {{dup #2 mul exch dup #3 mul exch dup #4 mul exch #5 mul}}} +\def\doPDFregistercmykspotcolor#1#2#3#4#5#6#7#8% name noffractions names p's c m y k + {\doPDFregistersomespotcolor{#1}{#2}{#3}{#4}{CMYK}{0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0}% + {\ifcase#2\or dup #5 mul exch dup #6 mul exch dup #7 mul exch #8 mul\else #5 #6 #7 #8\fi}} -\def\doPDFregistergrayspotcolor#1#2% - {\doPDFregistersomespotcolor - {#1}{Gray}{[0.0 1.0]}% - {{pop}}} +\def\doPDFregistergrayspotcolor#1#2#3#4#5% name noffractions names p's s + {\doPDFregistersomespotcolor{#1}{#2}{#3}{#4}{Gray}{0.0 1.0}% + {\ifcase#2\or pop\else#5\fi}} + +%D New and very experimental. + +\def\doPDFregistercmykindexcolor#1#2#3#4#5#6#7#8% name noffractions names p's c m y k + {\doPDFregistersomeindexcolor{#1}{#2}{#3}{#4}{CMYK}{0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0}% + {dup #5 mul exch dup #6 mul exch dup #7 mul exch #8 mul}} + +\def\doPDFregisterrgbindexcolor#1#2#3#4#5#6#7% name noffractions names p's r g b + {\doPDFregistersomeindexcolor{#1}{#2}{#3}{#4}{RGB}{0.0 1.0 0.0 1.0 0.0 1.0}% + {dup #5 mul exch dup #6 mul exch #7 mul}} + +\def\doPDFregistergrayindexcolor#1#2#3#4#5% name noffractions names p's s + {\doPDFregistersomeindexcolor{#1}{#2}{#3}{#4}{Gray}{0.0 1.0}% + {pop}} %D \macros %D {doPDFstartrotation,doPDFstoprotation} @@ -2858,8 +2898,11 @@ %D %D Scaling is rather straightforward: -\def\doPDFstartscaling#1#2% - {\PDFcode{q #1\space 0 0 #2\space 0 0 cm}} +\def\@@PDFzeroscale{.0001} + +\def\doPDFstartscaling#1#2% the test is needed because acrobat is bugged! + {\PDFcode{q \ifdim#1\points=\zeropoint\@@PDFzeroscale\else#1\fi\space 0 0 + \ifdim#2\points=\zeropoint\@@PDFzeroscale\else#2\fi\space 0 0 cm}} \def\doPDFstopscaling% {\PDFcode{Q}} @@ -2889,11 +2932,31 @@ \def\doPDFstopnegative {\ifx\initializePDFnegative\undefined\else + \initializePDFnegative \PDFcode{/GSpositive gs}% \fi} +%D \macros +%D {doPDFstartoverprint,doPDFstopoverprint} +%D +%D Some printers like overprint more than knockout. + +\def\doPDFstartoverprint + {\ifx\initializePDFoverprint\undefined\else + \initializePDFoverprint + \PDFcode{/GSoverprint gs}% + \fi} + +\def\doPDFstopoverprint + {\ifx\initializePDFoverprint\undefined\else + \initializePDFoverprint + \PDFcode{/GSknockout gs}% + \fi} + %D Transparency support (experimental): +\newif\ifPDFtransparencysupported + \def\PDFtransparancydictionary#1#2#3% type fraction extras {<>} -\newif\ifPDFtransparencysupported - \def\dodoPDFstarttransparency#1#2% {\presetPDFtransparency{#1}{#2}% \PDFcode{\PDFtransparencyidentifier\space gs }} @@ -2991,7 +3052,7 @@ \fi /Name (#2)}% \doPDFgetobjectreference{PDLN}{#1}\PDFobjectreference - \xdef\PDFtextlayers{\PDFtextlayers\space\PDFobjectreference}% + \xdef\PDFtextlayers{\PDFtextlayers\space\PDFobjectreference}% \doifelse{#3}\v!start {\xdef\PDFvidelayers{\PDFvidelayers\space\PDFobjectreference}}% {\xdef\PDFhidelayers{\PDFhidelayers\space\PDFobjectreference}}% @@ -3004,8 +3065,8 @@ \def\flushPDFtextlayers {\ifx\PDFtextlayers\empty \else - \driverreferenced \doPDFarrayobject class PDF name textlayers data {\PDFtextlayers}% - \doPDFgetobjectreference{PDF}{textlayers}\!!stringa + \driverreferenced \doPDFarrayobject class PDF name textlayers data {\PDFtextlayers}% + \doPDFgetobjectreference{PDF}{textlayers}\!!stringa \ifx\PDFvidelayers\empty \def\!!stringb{[null]}% \else @@ -3052,6 +3113,29 @@ \processcommalist[#1]\docommando \egroup} +%D Something rather pdf dependent: + +% #1 => 1=fill 2=stroke 3=strokedfill 4=invisible +% #2 => linewidth +% #3 => spacing (beware, one needs to set the hsize as well) + +\def\doPDFstartfonteffect#1#2#3% + {\ifdim#2>\zeropoint + \PointsToBigPoints{#2}\ascii + \PDFcode{\ascii\space w}% + \fi + \ifdim#3\points=\onepoint\else + \scratchdimen#3\points + \PDFcode{\withoutpt{\the\scratchdimen}\space Tc}% + \fi +% \ifdim#3\points=\onepoint\else +% \PDFcode{#3\space Tc}% +% \fi + \PDFcode{\purenumber#1 Tr}} + +\def\doPDFstopfonteffect + {\PDFcode{1 w 0 Tc 0 Tr}} + %D And that was all. \stopspecials @@ -3067,4 +3151,4 @@ \fi -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/spec-ini.tex b/tex/context/base/spec-ini.tex index 33cae54dc..958f1dbe7 100644 --- a/tex/context/base/spec-ini.tex +++ b/tex/context/base/spec-ini.tex @@ -11,10 +11,11 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newif\ifsimplifyspecials \simplifyspecialstrue % see later - +% todo: make this one more plain so that i can use it in plain jobs % todo: no args, named vars instead -% maybe also drop multiple drivers and make simply the default, then simplier defs +% maybe also drop multiple drivers and make simplify the default, then simplier defs + +\newif\ifsimplifyspecials \simplifyspecialstrue % see later %D We will forbid loading specials after the first page is %D shipped out. @@ -146,15 +147,15 @@ %D channel to the outside world. This channel is activated by %D the \TEX\ primitive \type {\special}. The sequence %D -%D \starttypen +%D \starttyping %D \special{Hello here I am.} -%D \stoptypen +%D \stoptyping %D %D results in \DVI||codes: %D -%D \starttypen +%D \starttyping %D xxx1 16 Hello here I am. -%D \stoptypen +%D \stoptyping %D %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 @@ -207,7 +208,7 @@ %D the \type{yandy} library. A library is build with the %D commands: %D -%D \starttypen +%D \starttyping %D \startspecials[name][inheritance] %D %D \definespecial\none{...} @@ -215,7 +216,7 @@ %D \definespecial\alot#1#2#3#4{...} %D %D \stopspecials -%D \stoptypen +%D \stoptyping %D %D Because drivers can have overlap in low level macros, a %D mechanism of inheritance is implemented. The libraries @@ -224,11 +225,11 @@ %D Every special has to be predefined first. We do this with %D the command: %D -%D \starttypen +%D \starttyping %D \installspecial [\none] [and] [0] %D \installspecial [\onlyone] [and] [1] %D \installspecial [\alot] [or] [4] -%D \stoptypen +%D \stoptyping %D %D This means as much as: there is a special names %D \type{\none} which has no arguments and has more than one @@ -245,9 +246,9 @@ %D A library is defined in a file with the name %D \type{spec-...}. We load a library with the command: %D -%D \starttypen +%D \starttyping %D \usespecials [list] -%D \stoptypen +%D \stoptyping %D %D where the list can contain one or more file tags, the %D \type{...} in the filename. The keyword \type{reset} @@ -428,7 +429,7 @@ %D additions however |<|like the specials that implement object %D handling|>| asked for non||grouped execution. -%D \starttypen +%D \starttyping %D \def\executespecials#1#2% %D {\def\doonespecial##1% %D {\getvalue{##1\string#1}#2\relax}% @@ -471,7 +472,7 @@ %D {\message{illegal special: \string#1}}% %D \fi %D \next} -%D \stoptypen +%D \stoptyping %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 @@ -480,9 +481,9 @@ %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 \starttyping %D \testfeature{10000}{\setbox0=\hbox{test \color[red]{oeps} test}} -%D \stoptypen +%D \stoptyping \def\@@exsp{exsp} @@ -497,7 +498,7 @@ \setvalue{\@@exsp8}#1#2#3#4#5#6#7#8{{{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}} \setvalue{\@@exsp9}#1#2#3#4#5#6#7#8#9{{{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}} -%D \starttypen +%D \starttyping %D \def\executespecials#1% %D {\def\doonespecial##1% %D {\csname##1\xspecialcommand\endcsname#1\relax}% @@ -507,7 +508,7 @@ %D \def\executespecial#1% %D {\def\xspecialcommand{\string#1}% %D \@EA\@EA\@EA\executespecials\csname\@@exsp\csname\@@specarg@@\xspecialcommand\endcsname\endcsname} -%D \stoptypen +%D \stoptyping %D Some more speed can be gained by using a dedicated string %D processing routine. Now we can bring down the execution @@ -550,15 +551,15 @@ %D For testing purposes (this was first needed when object %D support was implemented) we have: %D -%D \starttypen +%D \starttyping %D \doifspecialavailableelse\specialcommand{true}{false} -%D \stoptypen +%D \stoptyping %D %D e.g: %D -%D \starttypen +%D \starttyping %D \doifspecialavailableelse\doinsertobject{...}{...} -%D \stoptypen +%D \stoptyping \def\doifspecialavailableelse#1#2#3% {\doifelsevaluenothing{\@@speclst@@\string#1}{#3}{#2}} @@ -612,31 +613,31 @@ %D For quite some time the \CONTEXT\ way of specifying the %D output format has been: %D -%D \starttypen +%D \starttyping %D \usespecials[ps,yy,win,pdf] -%D \stoptypen +%D \stoptyping %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 \starttyping %D \usespecials[reset,ps,tr,pdf] -%D \stoptypen +%D \stoptyping %D %D On the other hand, for \PDFTEX\ we needed: %D -%D \starttypen +%D \starttyping %D \usespecials[tpd] -%D \stoptypen +%D \stoptyping %D %D To simplify things, I decided to provide a higher level %D command. %D -%D \starttypen +%D \starttyping %D \defineoutput[name][specials] %D \setupoutput[name,...] -%D \stoptypen +%D \stoptyping %D %D In a \type {spec-def} you can find some examples. diff --git a/tex/context/base/spec-mis.tex b/tex/context/base/spec-mis.tex index 49c7d40dd..0134c8bbc 100644 --- a/tex/context/base/spec-mis.tex +++ b/tex/context/base/spec-mis.tex @@ -8,13 +8,13 @@ %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 Quite some modules in this group are dedicated to supporting %D \PDF\ directly by means of \PDFTEX or indirectly by using %D Acrobat Distiller. This module implements some common -%D features. +%D features. \writestatus{loading}{Context Special Macros / Miscellaneous Macros} @@ -23,13 +23,13 @@ %D \macros %D {URLhash} %D -%D A rather trivial macro: +%D A rather trivial macro: \expandafter\def\expandafter\URLhash\expandafter{\string#} -%D \macros +%D \macros %D {ifusepagedestinations} -%D +%D %D In \PDF\ version 1.0 only page references were supported, %D while in \DVIWINDO\ 1.N only named references were accepted. %D Therefore \CONTEXT\ supports both methods of referencing. In @@ -38,55 +38,79 @@ %D therefore sometimes forces us to prefer page references. As %D a bonus, they are faster too and have no limitations. How %D fortunate we were having both mechanisms available when the -%D version 3.0 (\PDF\ version 1.2) viewers proved to be too -%D bugged to support named destinations. +%D version 3.0 (\PDF\ version 1.2) viewers proved to be too +%D bugged to support named destinations. \newif\ifusepagedestinations -%D \macros -%D {ifhighlighthyperlinks} -%D -%D The next switch can be used to make user hyperlinks are -%D not highlighted when clicked on. +%D \macros +%D {ifhighlighthyperlinks} +%D +%D The next switch can be used to make user hyperlinks are +%D not highlighted when clicked on. -\newif\ifhighlighthyperlinks +\newif\ifhighlighthyperlinks -%D \macros +%D \macros %D {ifgotonewwindow} -%D -%D To make the {\em goto previous jump} feature more -%D convenient when using more than one file, it makes sense -%D to force the viewer to open a new window for each file -%D opened. +%D +%D To make the {\em goto previous jump} feature more +%D convenient when using more than one file, it makes sense +%D to force the viewer to open a new window for each file +%D opened. -\newif\ifgotonewwindow +\newif\ifgotonewwindow -%D \macros +%D \macros %D {ifPDFstrokecolor} %D -%D We can reduce the filesize a bit by setting the next switch -%D to false. The amount of reduction depends on the use of -%D color, but don't expect more than a few percent. Zip -%D compression is already rather efficient in itself. +%D We can reduce the filesize a bit by setting the next switch +%D to false. The amount of reduction depends on the use of +%D color, but don't expect more than a few percent. Zip +%D compression is already rather efficient in itself. \newif\ifPDFstrokecolor \PDFstrokecolortrue -%D \macros +%D \macros %D {dodoinsertfile,dofileinsertion, %D definefileinsertion,doiffileinsertionsupported} -%D +%D %D File insertion depend on the driver or \TEX\ variant used. %D All driver modules use the same scheme for file insertion, -%D and therefore have the next macro in common: - -\def\dododoinsertfile[#1][#2,#3][#4,#5]% \next kan weg - {\def\fileinsertionclass{do#1insert}% - \doifdefinedelse{\fileinsertionclass#3} - {\def\next{\getvalue{\fileinsertionclass#3}}} - {\doifdefinedelse{\fileinsertionclass#2} - {\def\next{\getvalue{\fileinsertionclass#2}}} - {\def\next{\gobbleninearguments}}}% - \next{#4}{#5}} +%D and therefore have the next macro in common: + +% \def\dododoinsertfile[#1][#2,#3][#4,#5]% \next kan weg +% {\def\fileinsertionclass{do#1insert}% +% \doifdefinedelse{\fileinsertionclass#3} +% {\def\next{\getvalue{\fileinsertionclass#3}}} +% {\doifdefinedelse{\fileinsertionclass#2} +% {\def\next{\getvalue{\fileinsertionclass#2}}} +% {\def\next{\gobbleninearguments}}}% +% \next{#4}{#5}} +% +% more modern +% +% \def\dododoinsertfile[#1][#2,#3][#4,#5]% +% {\def\fileinsertionclass{do#1insert}% +% \doifdefinedelse{\fileinsertionclass#3} +% {\getvalue{\fileinsertionclass#3}} +% {\doifdefinedelse{\fileinsertionclass#2} +% {\getvalue{\fileinsertionclass#2}} +% {\gobbleninearguments}}% +% {#4}{#5}} +% +% more efficient +% +% \def\dododoinsertfile[#1][#2,#3][#4,#5]% +% {\def\fileinsertionclass{do#1insert}% +% \executeifdefined{\fileinsertionclass#3} +% {\executeifdefined{\fileinsertionclass#2}\gobbleninearguments}% +% {#4}{#5}} +% +% cleaner + +\def\dododoinsertfile[#1][#2,#3][#4,#5]% + {\executeifdefined{do#1insert#3}{\executeifdefined{do#1insert#2}\gobbleninearguments}{#4}{#5}} \def\dodoinsertfile#1#2#3% {\dododoinsertfile[#1][#2][#3]} @@ -107,18 +131,18 @@ \def\doiffileinsertionsupportedelse#1% {\ExpandBothAfter\doifinstringelse{#1}{\c!tex,\c!tmp,\supportedfileinsertions}} -%D This macro is called with 10 arguments, where the first +%D This macro is called with 10 arguments, where the first %D one specifies the driver, like \type{yy} or \type{tr}. The -%D second argument is a \type{{type,method}} pair and the -%D third the filename. +%D second argument is a \type{{type,method}} pair and the +%D third the filename. -%D Just in case this one is undefined (which can happen if -%D this module is used outside \CONTEXT): +%D Just in case this one is undefined (which can happen if +%D this module is used outside \CONTEXT): \ifx\setreferencefilename\undefined \def\setreferencefilename#1\to#2{\edef#2{#1}} - + \fi %D When submitting forms, we need to communicate the format. @@ -127,20 +151,20 @@ \def\setsubmitoutputformat#1% {\doifinsetelse{#1}{FDF,fdf} - {\chardef\submitoutputformat2} + {\chardef\submitoutputformat2} {\doifinsetelse{#1}{XML,xml} {\chardef\submitoutputformat3} {\chardef\submitoutputformat1}}% - \relax} + \relax} -%D \macros +%D \macros %D {escapePSstring} %D -%D \starttypen -%D \escapePSstring(t\e\1st)))))\to\crap \crap -%D \stoptypen +%D \starttyping +%D \escapePSstring(t\e\1st)))))\to\crap \crap +%D \stoptyping -% testcase: webschrift met lege regels en unbalanced () +% testcase: webschrift met lege regels en unbalanced () \bgroup @@ -188,12 +212,26 @@ \def\par{\rawcharacter{12}\rawcharacter{12}}% \expanded{\egroup\noexpand\def\noexpand#2{#1}}} -%D \macros +%D \macros %D {ifPDFunicode} -%D +%D %D We can use this switch to signal that content streams has -%D to be unicoded. +%D to be unicoded. \newif\ifPDFunicode +%D \macros +%D {makeMPintoPDFobject, handleMPfshow, setMPPDFobject, getMPPDFobject} +%D +%D \METAPOST\ support. + +\appendtoks + \chardef\makeMPintoPDFobject\zerocount + \def\setMPPDFobject#1#2{\def\getMPPDFobject{\box#2}}% +\to \everyresetspecials + +\appendtoks + \let\handleMPfshow\dohandleMPfshow +\to \everyresetspecials + \protect \endinput diff --git a/tex/context/base/spec-pdf.tex b/tex/context/base/spec-pdf.tex index 50733a835..58a8876a2 100644 --- a/tex/context/base/spec-pdf.tex +++ b/tex/context/base/spec-pdf.tex @@ -8,15 +8,15 @@ %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. % funny things: mail to yeny: "please geen auto-crlf in special" \unprotect %D This driver is build on top of the general \PDF\ macros, -%D as defined in \type{spec-fdf}, so we inherit that one. +%D as defined in \type{spec-fdf}, so we inherit that one. \startspecials[pdf][fdf] @@ -27,7 +27,7 @@ %D Instead of a prolog, we can put the code in the file %D ourselve. %D -%D \starttypen +%D \starttyping %D \definespecial\dosetupinteraction% %D {\special %D {\@@insertpostscriptretain @@ -35,14 +35,14 @@ %D {pop} %D {userdict /pdfmark /cleartomark load put} %D ifelse}} -%D \stoptypen +%D \stoptyping %D %D We decided to use a prolog file. The following code has to %D be put somewhere, e.g.\ in the startup directory of %D \DISTILLER. To overcome problems, we always embed the fonts, %D but copyrights force us always to make subsets. %D -%D \starttypen +%D \starttyping %D /currentdistillerparams where %D { pop } { userdict /currentdistillerparams { 1 dict } put } ifelse %D @@ -56,12 +56,12 @@ %D /MaxSubsetPct 99 %D /EmbedAllFonts true %D /SubSetFonts true >> setdistillerparams -%D \stoptypen +%D \stoptyping %D %D Beware, this is the PostScript Level 2 way of doing things. -\definespecial\dosetupinteraction% - {\showmessage{\m!interactions}{21}{acrobat}} +\definespecial\dosetupinteraction + {\showmessage\m!interactions{21}{acrobat}} \definespecial\dosetupopenaction {\doPDFsetupopenaction} \definespecial\dosetupcloseaction{\doPDFsetupcloseaction} @@ -98,7 +98,7 @@ %D have to misuse the page attributes. Beware, the preambles %D must be packed. -\definespecial\doflushJSpreamble#1% +\definespecial\doflushJSpreamble#1% {\bgroup \ifoneJSpreamble \edef\sanitizedJScode{\getJSpreamble{#1}}% @@ -137,15 +137,15 @@ %D {dosetupscreen, %D dosetupidentity} %D -%D We can set up the page dimensions, full screen start up +%D We can set up the page dimensions, full screen start up %D mode and identify the file with: -\definespecial\dosetupscreen {\doPDFsetupscreen \printpapierhoogte} +\definespecial\dosetupscreen {\doPDFsetupscreen \printpaperheight} -\definespecial\dosetupartbox {\doPDFsetupartbox \printpapierhoogte} -\definespecial\dosetupcropbox {\doPDFsetupcropbox \printpapierhoogte} -\definespecial\dosetupbleedbox{\doPDFsetupbleedbox\printpapierhoogte} -\definespecial\dosetuptrimbox {\doPDFsetuptrimbox \printpapierhoogte} +\definespecial\dosetupartbox {\doPDFsetupartbox \printpaperheight} +\definespecial\dosetupcropbox {\doPDFsetupcropbox \printpaperheight} +\definespecial\dosetupbleedbox{\doPDFsetupbleedbox\printpaperheight} +\definespecial\dosetuptrimbox {\doPDFsetuptrimbox \printpaperheight} \definespecial\dosetupidentity{\doPDFsetupidentity} @@ -249,10 +249,10 @@ \definespecial\dosetpagetransition{\doPDFsetpagetransition} -%D \macros +%D \macros %D {doinsertcomment, doflushcomments} %D -%D I never needed (and used) one until now, but here is the +%D I never needed (and used) one until now, but here is the %D text annotation special: \definespecial\doinsertcomment{\doPDFinsertcomment} @@ -278,7 +278,7 @@ %D \macros %D {dodefinefieldset,dogetfieldset,doiffieldset} -%D +%D %D Field sets, used in resetting and submitting, are handled %D by: @@ -288,8 +288,8 @@ %D \macros %D {doregistercalculationset} -%D -%D The calculation order is defined using: +%D +%D The calculation order is defined using: \definespecial\doregistercalculationset{\doFDFregistercalculationset} @@ -321,11 +321,11 @@ \newif\ifsharePDFactions \sharePDFactionstrue \def\dodoPDFaction#1#2#3#4% - {\ifcollectreferenceactions + {\ifcollectreferenceactions \xdef\lastPDFaction{#4}% \else \bgroup - % does not work well with distiller 4 + % does not work well with distiller 4 %\ifsharePDFactions % \ifcase\similarreference\relax % \xdef\lastPDFaction{<<#4>>}% @@ -337,7 +337,7 @@ % [ {PDF::sim:\the\nofPDFsimilar} <<#4>>\space /PUT pdfmark}% % \xdef\lastPDFaction{{PDF::sim:\the\nofPDFsimilar}}% % \else - % % leave \lastPDFaction untouched + % % leave \lastPDFaction untouched % \fi %\else \xdef\lastPDFaction{<<#4>>}% @@ -352,7 +352,7 @@ /Border [0 0 0] \ifhighlighthyperlinks \else /H /N \fi /Subtype /Link - /ANN + /ANN pdfmark}% \egroup \fi} @@ -388,10 +388,10 @@ {\dodoPDFaction{/_objdef {#1::#2}}{#3}{#4}{#5}% \dosetobjectreference{#1}{#2}{#1::#2}} -%D \macros +%D \macros %D {doPDFdictionaryobject,doPDFarrayobject} -%D -%D These two macros are used to build low level objects. +%D +%D These two macros are used to build low level objects. \def\doPDFdictionaryobject class #1 name #2 data #3% {\special @@ -407,11 +407,11 @@ [ {#1::#2} 0 [#3] /PUTINTERVAL pdfmark}% \dosetobjectreference{#1}{#2}{#1::#2}} -%D \macros +%D \macros %D {doPDFaddtocatalog,doPDFaddtoinfo, %D doPDFpageattribute,doPDFpagesattribute} -%D -%D Next come our housekeeping macros. +%D +%D Next come our housekeeping macros. \def\doPDFaddtocatalog#1% {\doifsomething{#1} @@ -419,9 +419,9 @@ {\@@insertpostscriptretain [ {Catalog} << #1 >> /PUT pdfmark}}} -\def\doPDFaddtoinfo#1% unchecked +\def\doPDFaddtoinfo#1% unchecked {\special - {\@@insertpostscriptretain + {\@@insertpostscriptretain [ #1 /DOCINFO pdfmark}} % [ {DocInfo} << #1 >> /PUT pdfmark}} \def\doPDFpageattribute#1% @@ -442,10 +442,10 @@ \let\doPDFresetpageresources =\relax \let\doPDFresetpageattributes=\relax -%D \macros +%D \macros %D {doPDFbookmark} %D -%D This is how we force bookmarks entries in the file. +%D This is how we force bookmarks entries in the file. \def\doPDFbookmark level #1 n #2 text #3 page #4 open #5% {\special @@ -457,7 +457,7 @@ /OUT pdfmark}} -%D \macros +%D \macros %D {defaultobjectreference,doPDFgetobjectreference} %D %D The object references are \type{{named}}, that is, no hard diff --git a/tex/context/base/spec-ps.tex b/tex/context/base/spec-ps.tex index 409c77e62..077e22887 100644 --- a/tex/context/base/spec-ps.tex +++ b/tex/context/base/spec-ps.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. %D \macros %D {dostartgraymode,dostopgraymode, @@ -18,141 +18,144 @@ %D dostartscaling,dostopscaling, %D dostartmirroring,dostopmirroring, %D dostartnegative,dostopnegative, +%D dostartoverprint,dostopoverprint, %D doselectfirstpaperbin, %D doselectsecondpaperbin} %D -%D This implementation is straightforward and can be used as -%D a default with postscript||drivers. We use \type{ps:} as -%D opening, because most drivers support this. +%D This implementation is straightforward and can be used as +%D a default with postscript||drivers. We use \type{ps:} as +%D opening, because most drivers support this. \startspecials[postscript] \def\@@insertpostscriptliteral {ps: } -\def\@@insertpostscriptretain {" } +\def\@@insertpostscriptretain {" } \definespecial\dostartgraymode#1% {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral #1\space setgray}} -\definespecial\dostopgraymode% +\definespecial\dostopgraymode {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral 0 setgray}} \definespecial\dostartrgbcolormode#1#2#3% {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral #1\space #2\space #3\space setrgbcolor}} \definespecial\dostartcmykcolormode#1#2#3#4% {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral #1\space #2\space #3\space #4\space setcmykcolor}} \definespecial\dostartgraycolormode#1% {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral #1\space setgray}} \definespecial\dostopcolormode {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral 0 setgray}} -\definespecial\doselectfirstpaperbin% +\definespecial\doselectfirstpaperbin {\special - {\@@insertpostscriptliteral - statusdict begin 1 setpapertray end}} % checken + {\@@insertpostscriptliteral + statusdict begin 1 setpapertray end}} % checken -\definespecial\doselectsecondpaperbin% +\definespecial\doselectsecondpaperbin {\special - {\@@insertpostscriptliteral - statusdict begin 0 setpapertray end}} % checken + {\@@insertpostscriptliteral + statusdict begin 0 setpapertray end}} % checken \definespecial\dostartrotation#1% straight from the YandY manual {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral gsave currentpoint currentpoint translate \number#1\space\space rotate neg exch neg exch translate}} -\definespecial\dostoprotation% +\definespecial\dostoprotation {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral currentfont currentpoint grestore moveto setfont}} \definespecial\dostartscaling#1#2% conforming the YandY manual {\special - {\@@insertpostscriptliteral - gsave currentpoint currentpoint translate + {\@@insertpostscriptliteral + gsave currentpoint currentpoint translate #1\space #2\space scale neg exch neg exch translate}} - -\definespecial\dostopscaling% + +\definespecial\dostopscaling {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral currentfont currentpoint grestore moveto setfont}} -\definespecial\dostartmirroring% some translate and exch stuff from YandY +\definespecial\dostartmirroring % some translate and exch stuff from YandY {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral gsave currentpoint currentpoint translate [-1 0 0 1 0 0] concat neg exch neg exch translate}} -\definespecial\dostopmirroring% +\definespecial\dostopmirroring {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral currentfont currentpoint grestore moveto setfont}} -\definespecial\dostartnegative% - {\special - {\@@insertpostscriptliteral - gsave {1 exch sub} settransfer}} +\definespecial\dostartnegative + {\special{\@@insertpostscriptliteral gsave {1 exch sub} settransfer}} -\definespecial\dostopnegative% - {\special - {\@@insertpostscriptliteral - grestore}} +\definespecial\dostopnegative + {\special{\@@insertpostscriptliteral grestore}} + +\definespecial\dostartoverprint + {\special{\@@insertpostscriptliteral true setoverprint}} + +\definespecial\dostopoverprint + {\special{\@@insertpostscriptliteral false setoverprint}} \definespecial\dostartgraphicgroup {\special{\@@insertpostscriptliteral gsave}} -\definespecial\dostopgraphicgroup +\definespecial\dostopgraphicgroup {\special{\@@insertpostscriptliteral grestore}} %D \macros %D {doovalbox} %D -%D This implementation is a mixture of several possible -%D implementations. We use some constants that may not be -%D changed. It took some time to find them, but these values -%D offer quite accurate results. The macro calls for -%D \type{\forgetall}, which resets indentation, skips and +%D This implementation is a mixture of several possible +%D implementations. We use some constants that may not be +%D changed. It took some time to find them, but these values +%D offer quite accurate results. The macro calls for +%D \type{\forgetall}, which resets indentation, skips and %D \type{\everypar}. %D %D Because a stroke follows the line, we correct for half of -%D the linewidth. Furthermore we use scaling to overcome some -%D limitations in the precision ($<1$~sp) and to prevent -%D rounding errors. We also do some correction for large -%D values. We let PostScript compare some arguments with -%D \type{a b eq {action} fi}. +%D the linewidth. Furthermore we use scaling to overcome some +%D limitations in the precision ($<1$~sp) and to prevent +%D rounding errors. We also do some correction for large +%D values. We let PostScript compare some arguments with +%D \type{a b eq {action} fi}. %D -%D The path is based on a macro of J.~Hefferon cs. We also -%D tried the D.~Salomon implementation, but this did not work -%D well, just like some other alternatives. +%D The path is based on a macro of J.~Hefferon cs. We also +%D tried the D.~Salomon implementation, but this did not work +%D well, just like some other alternatives. -% #1 = width #2 = height #3 = depth -% #4 = linewidth #5 = radius +% #1 = width #2 = height #3 = depth +% #4 = linewidth #5 = radius % #5 = stroke (ja,nee) #7 = fill (ja,nee) \def\@@insertpostscriptliteral {ps: } -\def\@@insertpostscriptretain {postscript } % unknown +\def\@@insertpostscriptretain {postscript } % unknown \def\dosomeovalcalc#1#2#3% {\dimen2=#1% - \advance\dimen2 #2% + \advance\dimen2 #2% \PointsToBigPoints{\dimen2}#3} -\def\dosomeovalbox#1#2#3#4#5#6#7% +\def\dosomeovalbox#1#2#3#4#5#6#7% {\bgroup \dimen0=#4\divide\dimen0 2 \dosomeovalcalc{0pt}{+\dimen0}\xmin @@ -162,10 +165,10 @@ \dosomeovalcalc{#4}{0pt}\stroke \dosomeovalcalc{#5}{0pt}\radius \edef\dostroke{#6}% - \edef\dofill{#7}% - \setbox0=\hbox + \edef\dofill{#7}% + \setbox\nextbox\hbox {\ifnum\dostroke\dofill>0 - \special + \special {\@@insertpostscriptretain gsave newpath @@ -173,46 +176,54 @@ \xmax\space \ymin\space \xmax\space \ymax\space \radius\space arcto \xmax\space \ymax\space \xmin\space \ymax\space \radius\space arcto \xmin\space \ymax\space \xmin\space \ymin\space \radius\space arcto - \xmin\space \ymin\space \xmax\space \ymin\space \radius\space arcto + \xmin\space \ymin\space \xmax\space \ymin\space \radius\space arcto \xmin\space \radius\space add \ymin\space moveto 16 {pop} repeat closepath - (\dostroke) (1) eq - {\stroke\space 0 ne - {gsave - \stroke\space setlinewidth - stroke + (\dostroke) (1) eq + {\stroke\space 0 ne + {gsave + \stroke\space setlinewidth + stroke grestore} if} if - (\dofill) (1) eq + (\dofill) (1) eq {fill} if grestore}% - \fi}% - \wd0=#1\ht0=#2\dp0=#3\box0 + \fi}% + \nextboxwd#1% + \nextboxht#2% + \nextboxdp#3% + \flushnextbox \egroup} -%D The indirect call permits a (rather) dirty hack, needed -%D for \DVIPS\ support. +%D The indirect call permits a (rather) dirty hack, needed +%D for \DVIPS\ support. -\definespecial\doovalbox% +\definespecial\doovalbox% {\dosomeovalbox} -%D \macros +%D \macros %D {dostartclipping,dostopclipping} %D -%D These two specials are not yet working as expected. +%D These two specials are not yet working as expected. \definespecial\dostartclipping#1#2#3% {\PointsToBigPoints{#2}\width \PointsToBigPoints{#3}\height \grabMPclippath{#1}{0}{\width}{\height} - {0 0 moveto \width 0 lineto \width \height lineto 0 \height\space lineto}% + {0 0 moveto \width 0 lineto \width \height lineto 0 \height\space lineto}% \special - {\@@insertpostscriptliteral\space + {\@@insertpostscriptliteral\space save newpath \MPclippath\space closepath clip}} -\definespecial\dostopclipping% +\definespecial\dostopclipping {\special{\@@insertpostscriptliteral\space restore}} +%D Some MP stuff: + +\definespecial\doinsertMPfile#1% + {\doiffileelse{./#1}{\includeMPasEPS{./#1}}{\message{[MP #1]}}} + \stopspecials \endinput diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex index bc8abcaa8..3238ddc80 100644 --- a/tex/context/base/spec-tpd.tex +++ b/tex/context/base/spec-tpd.tex @@ -11,6 +11,11 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% todo: nagaan of we met reserveobjnum en useobjnum kunnen werken; +% driver referenced etc + +% layers and links don't work while the spec says they should + % method = auto % % \definefileinsertion{tpd}{auto}#1#2#3#4#5#6#7#8#9% @@ -22,10 +27,10 @@ % % \def\doPDFdestination name #1% % {\ifdim\PDFdestvoffset=\zeropoint\relax -% \pdfdest name {#1}\PDFpageviewkey +% \pdfdest name {#1} \PDFpageviewkey % \else % \setbox\pdfdestbox\hbox to \zeropoint -% {\raise\PDFdestvoffset\hbox{\pdfdest name {#1}\PDFpageviewkey}}% +% {\raise\PDFdestvoffset\hbox{\pdfdest name {#1} \PDFpageviewkey}}% % \ht\pdfdestbox\zeropoint % \box\pdfdestbox % \fi} @@ -118,7 +123,9 @@ \newcount\pdfoptionpdfminorversion \fi -\pdfoptionpdfminorversion=4 +\pdfoptionpdfminorversion=5 + +\def\PDFversion{1.\the\pdfoptionpdfminorversion}% % %D Why are the Acrobat viewers so buggy? To prevent font cache % %D mismatches, we say: @@ -139,9 +146,9 @@ %D This means that by saying %D -%D \starttypen +%D \starttyping %D \usespecials[tpd] -%D \stoptypen +%D \stoptyping %D %D we get ourselves full \PDF\ output. @@ -238,7 +245,7 @@ \definespecial\dogetnofinsertpages#1% {\xdef\nofinsertpages{1}% global \doifvalidpdfimagefileelse{#1}% - {\pdfximage{#1}\xdef\nofinsertpages{\the\pdflastximagepages}} + {\pdfximage {#1}\xdef\nofinsertpages{\the\pdflastximagepages}} {}} %D Currently we support \type{pdf} for \PDF\ files, \type{mps} @@ -255,13 +262,13 @@ %D The old, \TEX\ base \PDF\ insertion macro: %D -%D \starttypen +%D \starttyping %D \def\dotpdinsertpdf#1#2#3#4#5#6#7#8#9% %D {\beforesplitstring#1\at.\to\filename %D \scratchdimen=#3pt \PointsToReal{.01\scratchdimen}\xscale %D \scratchdimen=#4pt \PointsToReal{.01\scratchdimen}\yscale %D \convertPDFtoPDF{\filename.pdf}\xscale\yscale{#5}{#6}{#7}{#8}} -%D \stoptypen +%D \stoptyping %D %D superseded by the next macros. @@ -315,11 +322,12 @@ \ifdim#7>\zeropoint \!!width #7\fi \ifdim#8>\zeropoint \!!height #8\fi \pdfimagepagenumber +% \@@DriverImageBox {#1}% \xdef\PDFimagereference{\the\pdflastximage}% \xdef\nofinsertpages{\the\pdflastximagepages}% \pdfrefximage\pdflastximage} - {\framed[\c!breedte=#7,\c!hoogte=#8]{#1}}% + {\framed[\c!width=#7,\c!height=#8]{#1}}% \egroup} \else @@ -331,7 +339,7 @@ \ifdim#7>\zeropoint \!!width #7\fi \ifdim#8>\zeropoint \!!height #8\fi {#1}}% - {\framed[\c!breedte=#7,\c!hoogte=#8]{#1}}% + {\framed[\c!width=#7,\c!height=#8]{#1}}% \egroup} \fi @@ -365,6 +373,8 @@ %D themselves have alternatives, especially cylcic %D dependencies. +\ifx\@@DriverImageBox\undefined \def\@@DriverImageBox{artbox} \fi + \ifnum\pdftexversion>13 \def\checkpdfimageattributes @@ -395,8 +405,9 @@ \the\everyPDFximage \checkpdfimagepagenumber{#3}% \checkpdfimageattributes - \global\setbox\foundexternalfigure\vbox - {\immediate\pdfximage \pdfimageattributes \pdfimagepagenumber{#2}% + \global\setbox\foundexternalfigure\hbox + {\immediate\pdfximage + \pdfimageattributes \pdfimagepagenumber \@@DriverImageBox {#2}% \xdef\PDFimagereference{\the\pdflastximage}% \xdef\nofinsertpages{\the\pdflastximagepages}% \pdfrefximage\pdflastximage}% @@ -414,19 +425,19 @@ \else -\def\dogetTPDfiguresize#1#2#3#4#5#6#7% - {\ifmeasureTPDfiguresize - #4\zeropoint - #5\zeropoint - \doifvalidpdfimagefileelse{#2} - {\global\setbox\foundexternalfigure\vbox{\pdfimage{#2}}% - #6\wd\foundexternalfigure - #7\ht\foundexternalfigure} - {#6\zeropoint - #7\zeropoint}% - \else - #1{#2}{#3}{#4}{#5}{#6}{#7}% \normaldogetfiguresize... - \fi} + \def\dogetTPDfiguresize#1#2#3#4#5#6#7% + {\ifmeasureTPDfiguresize + #4\zeropoint + #5\zeropoint + \doifvalidpdfimagefileelse{#2} + {\global\setbox\foundexternalfigure\vbox{\pdfimage{#2}}% + #6\wd\foundexternalfigure + #7\ht\foundexternalfigure} + {#6\zeropoint + #7\zeropoint}% + \else + #1{#2}{#3}{#4}{#5}{#6}{#7}% \normaldogetfiguresize... + \fi} \fi @@ -478,7 +489,8 @@ %D dostartrotation,dostoprotation, %D dostartscaling,dostopscaling, %D dostartmirroring,dostopmirroring, -%D dostartnegative,dostopnegative} +%D dostartnegative,dostopnegative, +%D dostartoverprint,dostopoverprint} %D %D These are implemented in the main \PDF\ module. @@ -497,22 +509,103 @@ \definespecial\dostopmirroring {\doPDFstopmirroring} \definespecial\dostartnegative {\doPDFstartnegative} \definespecial\dostopnegative {\doPDFstopnegative} +\definespecial\dostartoverprint {\doPDFstartoverprint} +\definespecial\dostopoverprint {\doPDFstopoverprint} \definespecial\doregistercmykspotcolor{\doPDFregistercmykspotcolor} \definespecial\doregisterrgbspotcolor {\doPDFregisterrgbspotcolor} \definespecial\doregistergrayspotcolor{\doPDFregistergrayspotcolor} +\definespecial\doregistercmykindexcolor{\doPDFregistercmykindexcolor} +\definespecial\doregisterrgbindexcolor {\doPDFregisterrgbindexcolor} +\definespecial\doregistergrayindexcolor{\doPDFregistergrayindexcolor} + \definespecial\dostartnonecolormode{\doPDFstartnonecolormode} \definespecial\doregisternonecolor {\doPDFregisternonecolor} -\def\doPDFregistersomespotcolor#1#2#3#4% - {\immediate \pdfobj stream attr - {/FunctionType 4 /Domain [0.0 1.0] /Range #3}{#4}% +% \def\doPDFregistersomespotcolor#1#2#3#4% +% {\immediate \pdfobj stream attr +% {/FunctionType 4 /Domain [0.0 1.0] /Range #3}{#4}% +% \immediate \pdfobj +% {[/Separation /#1 /Device#2 \the\pdflastobj\space0 R]}% +% \dosetobjectreference{PDFCS}{#1}{\the\pdflastobj}% +% \appendtoPDFdocumentcolorspaces +% {/#1 \the\pdflastobj\space0 R}} + +\def\doPDFregisterspotcolorname#1#2% + {\bgroup + \let\ascii\empty + \def\docommand##1% + {\edef\ascii{\ascii + \ifx\nexthandledtoken\space + \letterhash20% + \else\ifx\nexthandledtoken\blankspace + \letterhash20% + \else + ##1% + \fi\fi}}% + \expanded{\handletokens#2}\with\docommand + \letgvalue{@@pdf@@scn@@#1}\ascii + \egroup} + +\def\doPDFregistersomespotcolor#1#2#3#4#5#6#7% name fractions names p's space domain function + {\bgroup + \let\spotpops\empty + \ifcase#2\or + %def\PDFspotcolornames{/Separation /#1}% + \edef\PDFspotcolornames{/Separation /\executeifdefined{@@pdf@@scn@@#1}{#1}}% + \def\PDFspotcolordomain{0.0 1.0}% + \else + \dorecurse{#2}{\edef\spotpops{\spotpops pop }}% + \let\PDFspotcolornames \empty + \let\PDFspotcolordomain\empty + \def\dospotcolorcommand##1% + {%\edef\PDFspotcolornames {\PDFspotcolornames/##1\space}% + \edef\PDFspotcolornames {\PDFspotcolornames/\executeifdefined{@@pdf@@scn@@##1}{##1}\space}% + \edef\PDFspotcolordomain{\PDFspotcolordomain 0.0 1.0\space}}% + \processcommacommand[#3]\dospotcolorcommand + \edef\PDFspotcolornames{/DeviceN [\PDFspotcolornames]}% + \fi + \immediate \pdfobj stream attr + {/FunctionType 4 /Domain [\PDFspotcolordomain] /Range [#6]}{{\spotpops#7}}% \immediate \pdfobj - {[/Separation /#1 /Device#2 \the\pdflastobj\space0 R]}% + {[\PDFspotcolornames\space /Device#5 \the\pdflastobj\space0 R]}% \dosetobjectreference{PDFCS}{#1}{\the\pdflastobj}% - \appendtoPDFdocumentcolorspaces - {/#1 \the\pdflastobj\space0 R}} + \appendtoPDFdocumentcolorspaces{/#1 \the\pdflastobj\space0 R}% + \egroup} + +%D New and very experimental. + +\def\doPDFregistersomeindexcolor#1#2#3#4#5#6#7% name fractions names p's space domain function + {\bgroup + \let\spotpops\empty + \dorecurse{#2}{\edef\spotpops{\spotpops exch pop\space}}% + \let\PDFspotcolornames \empty + \let\PDFspotcolordomain\empty + \def\docommand##1% + {%\edef\PDFspotcolornames {\PDFspotcolornames/##1\space}% + \edef\PDFspotcolornames{\PDFspotcolornames/\executeifdefined{@@pdf@@scn@@##1}{##1}\space}% + \edef\PDFspotcolordomain{\PDFspotcolordomain 0.0 1.0\space}}% + \processcommacommand[#3,None]\docommand + \let\PDFcolorindexvector\empty + \def\docommand##1% + {\scratchdimen##1\points + \scratchdimen\recurselevel\scratchdimen + \scratchcounter\scratchdimen + \divide\scratchcounter \maxcard + \edef\PDFcolorindexvector{\PDFcolorindexvector\uchexnumbers\scratchcounter}}% + \dostepwiserecurse\zerocount{255}\plusone + {\rawprocesscommacommand[#4,1]\docommand + \xdef\PDFcolorindexvector{\PDFcolorindexvector\space}}% + \immediate \pdfobj stream attr + {/FunctionType 4 /Domain [\PDFspotcolordomain] /Range [#6]}{{\spotpops#7}}% + \immediate \pdfobj + {[/Indexed + [/DeviceN [\PDFspotcolornames] /Device#5 \the\pdflastobj\space0 R] % + 255 <\PDFcolorindexvector>]}% + \dosetobjectreference{PDFIX}{#1}{\the\pdflastobj}% + \appendtoPDFdocumentcolorspaces{/#1_INDEXED \the\pdflastobj\space0 R}% + \egroup} %D \macros %D {dostarttransparency,dostoptransparency} @@ -527,7 +620,9 @@ \def\@@PDT{@PDT@} -\newcount\PDFcurrenttransparency \PDFcurrenttransparency=0 % -1 +\ifx\PDFcurrenttransparency\undefined + \newcount\PDFcurrenttransparency \PDFcurrenttransparency=0 % -1 +\fi \def\assignPDFtransparency#1#2% {\def\PDFtransparencyidentifier{/Tr#1}% @@ -942,7 +1037,7 @@ %D flushing \PDF\ code. First we handle the named destinations. \def\doPDFdestination name #1% - {\pdfdest name {#1}\PDFpageviewkey} + {\pdfdest name {#1} \PDFpageviewkey} %D \macros %D {doPDFaction,doPDFannotation,ifsharePDFactions} @@ -1120,7 +1215,7 @@ \def\doPDFbookmark level #1 n #2 text #3 page #4 open #5% {\pdfoutline - user {<>}% + user {<>}% \ifcase#2 \else count \ifcase#5-\fi#2 \fi {#3}} @@ -1132,11 +1227,13 @@ \def\doPDFdictionaryobject class #1 name #2 data #3% {\flushatshipout - {\immediate\pdfobj{<< #3 >>}\dosetobjectreference{#1}{#2}{\the\pdflastobj}}} + {\immediate\pdfobj{<< #3 >>}% + \dosetobjectreference{#1}{#2}{\the\pdflastobj}}} \def\doPDFarrayobject class #1 name #2 data #3% {\flushatshipout - {\immediate\pdfobj{[ #3 ]}\dosetobjectreference{#1}{#2}{\the\pdflastobj}}} + {\immediate\pdfobj{[ #3 ]}% + \dosetobjectreference{#1}{#2}{\the\pdflastobj}}} %D \macros %D {defaultobjectreference,doPDFgetobjectreference} @@ -1170,11 +1267,13 @@ \fi %D \macros -%D {initializePDFnegative} +%D {initializePDFnegative,initializePDFoverprint} %D %D Here follow some rather obscure macros. They will only %D come into action when one wants negated output. +%D Todo: move code to fdf module and + \def\initializePDFnegative {\immediate\pdfobj stream attr {/FunctionType 4 /Range [0 1] /Domain [0 1]} {{1 exch sub}}% \immediate\pdfobj{<>}% @@ -1183,9 +1282,17 @@ \appendtoPDFdocumentextgstates{/GSpositive \the\pdflastobj\space0 R}% \global\let\initializePDFnegative\relax} +\def\initializePDFoverprint + {\immediate\pdfobj{<>}% /op defaults to /OP + \appendtoPDFdocumentextgstates{/GSknockout \the\pdflastobj\space0 R}% + \immediate\pdfobj{<>}% /op defaults to /OP + \edef\PDFobjectreferenceB{\the\pdflastobj}% + \appendtoPDFdocumentextgstates{/GSoverprint \the\pdflastobj\space0 R}% + \global\let\initializePDFoverprint\relax} + %D File embedding. Storing the stream identifier is needed %D to get access to the number. When typeset, the user can -%D use feed this number to \type {pdftosrc} and filter the +%D feed this number to \type {pdftosrc} and filter the %D file from the \PDF\ file. \let\PDFlaststreamobject \s!unknown @@ -1211,6 +1318,33 @@ \def\MPprologues{2} +%D Experimental: + +\definespecial\dostartfonteffect{\doPDFstartfonteffect} +\definespecial\dostopfonteffect {\doPDFstopfonteffect} + +%D Some MP stuff: + +\let\handleMPfshow\dohandleMPfshow % default anyway + +\ifnum\pdftexversion<14 + + \def\setMPPDFobject#1#2% resources boxnumber + {\def\getMPPDFobject{\box#2}} + +\else + + \def\setMPPDFobject#1#2% resources boxnumber + {\immediate\pdfxform resources{#1}#2% + \edef\getMPPDFobject{\noexpand\pdfrefxform\the\pdflastxform}} + +\fi + +\let\getMPPDFobject\relax + +\definespecial\doinsertMPfile#1% + {\doiffileelse{./#1}{\includeMPasPDF{./#1}}{\message{[MP #1]}}} + %D Now we can finish this module. \stopspecials diff --git a/tex/context/base/spec-tr.tex b/tex/context/base/spec-tr.tex index 5d52e0abd..169a90978 100644 --- a/tex/context/base/spec-tr.tex +++ b/tex/context/base/spec-tr.tex @@ -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. -%D Especially the rotation proved to be incompatible with -%D the default \POSTSCRIPT\ special driver. Many thanks to -%D Gilbert van den Dobbelsteen for testing and hacking the -%D \DVIPS\ source and pinpointing the problem. +%D Especially the rotation proved to be incompatible with +%D the default \POSTSCRIPT\ special driver. Many thanks to +%D Gilbert van den Dobbelsteen for testing and hacking the +%D \DVIPS\ source and pinpointing the problem. %D \macros %D {doinsertfile} %D -%D We overrule the figure||insertion special. Things should -%D be more accurate, but maybe someday \onbekend +%D We overrule the figure||insertion special. Things should +%D be more accurate, but maybe someday \unknown -\startspecials[rokicki] +\startspecials[rokicki] \def\@@insertpostscriptliteral {ps: } -\def\@@insertpostscriptretain {" } +\def\@@insertpostscriptretain {" } %\definefileinsertion{tr}{eps}#1#2#3#4#5#6#7#8#9% -% {\PointsToBigPoints{#5}\width -% \PointsToBigPoints{#6}\height -% \special +% {\PointsToBigPoints{#5}\width +% \PointsToBigPoints{#6}\height +% \special % {psfile=#1 % hscale=#3\space % vscale=#4\space @@ -51,7 +51,7 @@ rwi=\width0\space rhi=\height0}} -\definefileinsertion{tr}{mps}#1#2#3#4#5#6#7#8#9% +\definefileinsertion{tr}{mps}#1#2#3#4#5#6#7#8#9% {\hbox {%\includeMPfonts{#1}% dvips know mp \convertMPcolors{#1}% @@ -62,29 +62,34 @@ \dodoinsertfile{tr}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}% \egroup} +%D Some MP stuff: + +\definespecial\doinsertMPfile#1% + {\doiffileelse{./#1}{\includeMPasEPS{./#1}}{\message{[MP #1]}}} + %D \macros %D {dostartrotation} %D -%D Because \DVIPS\ uses a reverse rotation scheme, we have -%D to add an extra \type{neg} to the default \POSTSCRIPT\ +%D Because \DVIPS\ uses a reverse rotation scheme, we have +%D to add an extra \type{neg} to the default \POSTSCRIPT\ %D rotation definition: \definespecial\dostartrotation#1% straight from the YandY manual / 1st neg added {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral gsave currentpoint currentpoint translate - \number#1\space\space neg rotate neg exch neg exch translate}} + \number#1\space\space neg rotate neg exch neg exch translate}} -\definespecial\dostoprotation% +\definespecial\dostoprotation {\special - {\@@insertpostscriptliteral + {\@@insertpostscriptliteral currentfont currentpoint grestore moveto setfont}} %D Drawing ovals in \DVIPS\ is complicated by the fact that %D the colors get reset. Therefore we need a more literal %D approach and therefore scale to local units. By redefining %D the retain constant into a macro, we can use the already -%D present \POSTSCRIPT\ definition (see \type{spec-ps}). +%D present \POSTSCRIPT\ definition (see \type{spec-ps}). \definespecial\doovalbox#1#2#3#4#5#6#7% {\bgroup diff --git a/tex/context/base/spec-var.tex b/tex/context/base/spec-var.tex new file mode 100644 index 000000000..0a508f561 --- /dev/null +++ b/tex/context/base/spec-var.tex @@ -0,0 +1,70 @@ +%D \module +%D [ file=spec-var, +%D version=2003.10.10, +%D title=\CONTEXT\ Special Macros, +%D subtitle=Variables, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This module used to be integrated in \type {spec-ini}, +%D but testing optimization is more convenient this way. + +\writestatus{loading}{Context Special Macros / Variables} + +% new approach, 'global' variables, since we run out of +% arguments + +\unprotect + +\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 + +\ifx\undefined\@@DriverCommentLayer + + \letempty \@@DriverCommentLayer + +\fi + +\ifx\undefined\@@DriverAttachmentLayer + + \letempty \@@DriverAttachmentLayer + +\fi + +\ifx\undefined\@@DriverImageBox + + \letempty \@@DriverImageBox + +\fi + +\protect \endinput diff --git a/tex/context/base/spec-win.tex b/tex/context/base/spec-win.tex index 77b88d005..73db8830e 100644 --- a/tex/context/base/spec-win.tex +++ b/tex/context/base/spec-win.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \unprotect @@ -26,16 +26,16 @@ %D {} %D %D As told before, these were the first interactive specials. -%D In those days, these kind of specials were still elegant -%D and straightforward. +%D In those days, these kind of specials were still elegant +%D and straightforward. \startspecials[dviwindo] \definespecial\dosetupinteraction% - {\showmessage{\m!interactions}{21}{dviwindo}} + {\showmessage\m!interactions{21}{dviwindo}} \definespecial\dostartgotolocation#1#2#3#4#5#6% - {\bgroup + {\bgroup \doifelsenothing{#3} {\doifelsenothing{#4} {\!!doneafalse} @@ -46,17 +46,17 @@ \scratchdimen#1\edef\width {\the\scratchdimen\space}% \scratchdimen#2\edef\height{\the\scratchdimen\space}% \special - {button: + {button: \width \height - \if!!donea - file: \DVIfile, + \if!!donea + file: \DVIfile, \fi "#5"}} - {}% nog uri afhandelen + {}% nog uri afhandelen \egroup} \definespecial\dostartgotorealpage#1#2#3#4#5% - {\bgroup + {\bgroup \doifelsenothing{#3} {\doifelsenothing{#4} {\!!doneafalse} @@ -67,15 +67,15 @@ \scratchdimen#1\edef\width {\the\scratchdimen\space}% \scratchdimen#2\edef\height{\the\scratchdimen\space}% \special - {button: + {button: \width \height - \if!!donea - file: \DVIfile, - \fi - \ifnum0#5=0 \else - page: #5 + \if!!donea + file: \DVIfile, + \fi + \ifnum0#5=0 \else + page: #5 \fi}} - {}% nog uri afhandelen + {}% nog uri afhandelen \egroup} \definespecial\dostartthisislocation#1% diff --git a/tex/context/base/spec-xtx.tex b/tex/context/base/spec-xtx.tex new file mode 100644 index 000000000..56a61631c --- /dev/null +++ b/tex/context/base/spec-xtx.tex @@ -0,0 +1,111 @@ +%D \module +%D [ file=spec-xtx, +%D version=2004.*.*, +%D title=\CONTEXT\ Special Macros, +%D subtitle=DVIPDFMx support, +%D author={Adam Lindsay \& Hans Hagen \& \unknown}, +%D date=\currentdate, +%D copyright={Adam Lindsay \& Hans Hagen}] + +\unprotect + +\startspecials[xetex] + +%D Rotation looks fine. Scaling and mirroring are also fine. + +\definespecial\dostartrotation #1{\special{x:gsave}\special{x:rotate #1}} +\definespecial\dostartscaling #1#2{\special{x:gsave}\special{x:scale #1 #2}} +\definespecial\dostartmirroring {\special{x:gsave}\special{x:scale -1 1}} + +\definespecial\dostoprotation {\special{x:grestore}} +\definespecial\dostopscaling {\special{x:grestore}} +\definespecial\dostopmirroring{\special{x:grestore}} + +\ifx\colorhexcomponent\undefined + + % this will be added to colo-hex.tex + +\else + + % because we intercept the zero condition, the .23pt in 1.23pt will disappear in the + % ifcase zero part branch + + \def\colorhexcomponent#1% + {\ifdim#1\points<.005\points + 00\else\lchexnumbers{\the\dimexpr(255\dimexpr(#1\points)\relax+.5\points)\relax}% + \fi} + + % the faster one + + \newdimen\hex@color@a \hex@color@a=.005pt + \newdimen\hex@color@b \hex@color@b=.5pt + \chardef \hex@color@c =255 + + \def\colorhexcomponent#1% + {\ifdim#1\points<\hex@color@a + 00\else\lchexnumbers{\the\dimexpr(#1\points*\hex@color@c+\hex@color@b)\relax}% + \fi} + +\fi + +% + +\definespecial\dostartrgbcolormode#1#2#3% + {\bgroup + \edef\hexcolorstring{\colorhexcomponent{#1}\colorhexcomponent{#2}\colorhexcomponent{#3}}% + \special{x:textcolor=\hexcolorstring}% + \special{x:rulecolor=\hexcolorstring}% + \egroup} + +\definespecial\dostopcolormode + {\special{x:textcolor=000000}% + \special{x:rulecolor=000000}} + +%D Whadda you mean by 'corected;, this hex color model is crazy. Why does +%D \XETEX\ provide high end font support but only hex rgb colors -) + +%D once colors are ``corrected'' by Hans, transparency should +%D follow fairly easily. A good side-effect of the above approach +%D is that we need to keep track of the color state (transparency +%D in \XETEX\ is accomplished setting the color to an RGBA quadruple, +%D rather than an RGB triple) + +%D File/graphic insertion is fouled up. I don't know why, but +%D the externalfile misses its designated box/frame. It's also not +%D finding files without the help of a \TEXUTIL\ file. + +%D Maybe \XETEX\ should provide a way to report the figure dimensions, +%D I suppose it can ask the QuickTime Driver. + +%D However it gets resolved, the following is the basic schema +%D of file inclusion for \XETEX. \type {\XeTeXpicfile} supports +%D rotation, as well, but it seems less important for \CONTEXT. +%D \XETEX\ uses QuickTime file import, which means a huge number of +%D file import options. + +%D More importantly and interestingly, there is \type +%D {XeTeXpdffile}, which supports a \type {page} option. + +\definespecial\doinsertfile#1#2#3#4#5#6#7#8#9% + {\bgroup + \dodoinsertfile{xtx}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}% + \egroup} + +\definefileinsertion{xtx}{jpg}{\handlepdfimage} +\definefileinsertion{xtx}{png}{\handlepdfimage} +\definefileinsertion{xtx}{pdf}{\handlepdfimage} +\definefileinsertion{xtx}{gif}{\handlepdfimage} +\definefileinsertion{xtx}{tif}{\handlepdfimage} + +% do we need it this way? either provide width and height or provide scales, +% best provide the dimensions + +% \def\handlepdfimage#1#2#3#4#5#6#7#8#9% +% {\XeTeXpicfile "#1" width #7 height #8 xscaled #3 yscaled #4\relax} + +\def\handlepdfimage#1#2#3#4#5#6#7#8#9% + {\XeTeXpicfile "#1" width #7 height #8\relax} + +\stopspecials + +\protect \endinput diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex index b5e908c8e..a122684c1 100644 --- a/tex/context/base/supp-box.tex +++ b/tex/context/base/supp-box.tex @@ -168,10 +168,10 @@ %D %D Also handy (all dimensions zeroed): %D -%D \starttypen +%D \starttyping %D \smashedhbox to ... {...} %D \smashedvbox to ... {...} -%D \stoptypen +%D \stoptyping \def\dosmashedbox#1% %{#1\bgroup\dowithnextbox{\smashbox\nextbox\flushnextbox\egroup}#1} @@ -224,13 +224,13 @@ {\dowithnextbox {\@EA\handletokens\@@smash\with\makesm@sh\flushnextbox}\normalhbox} -%D \starttabulatie[|l|l|] +%D \starttabulate[|l|l|] %D \NC w \NC \ruledhbox{\smash [w]{This is some great smashing, isn't it?}} \NC \NR %D \NC h \NC \ruledhbox{\smash [h]{This is some great smashing, isn't it?}} \NC \NR %D \NC d \NC \ruledhbox{\smash [d]{This is some great smashing, isn't it?}} \NC \NR %D \NC tb \NC \ruledhbox{\smash [tb]{This is some great smashing, isn't it?}} \NC \NR %D \NC whd \NC \ruledhbox{\smash[whd]{This is some great smashing, isn't it?}} \NC \NR -%D \stoptabulatie +%D \stoptabulate %D \macros %D {phantom, hphantom, vphantom, mathstrut} @@ -260,7 +260,7 @@ \futurelet\nextph@nt\doph@nt} \def\makeph@nt#1#2#3% - {\begingroup + {\begingroup % why no \bgroup \dowithnextbox {\setbox\scratchbox\null \ht\scratchbox\ht#1\dp\scratchbox\dp#2\wd\scratchbox\wd#3% @@ -285,29 +285,29 @@ %D Although often needed, \TEX\ does not support arithmics %D like: %D -%D \starttypen +%D \starttyping %D \dimen0 = \ht0 + \dp0 -%D \stoptypen +%D \stoptyping %D %D so we implemented: %D -%D \starttypen +%D \starttyping %D \getboxheight ... \of \box... -%D \stoptypen +%D \stoptyping %D %D For instance, %D -%D \starttypen +%D \starttyping %D \getboxheight \dimen0 \of \box0 %D \getboxheight \someheight \of \box \tempbox -%D \stoptypen +%D \stoptyping %D %D The implementation is rather stupid: %D -%D \starttypen +%D \starttyping %D \def\getboxheight#1\of#2\box#3% %D {#1\ht#3\advance#1\dp#3\relax} -%D \stoptypen +%D \stoptyping %D %D The next alternative is slightly more clever, since %D it accepts \type {{12}} as well as \type {12} as box @@ -328,9 +328,9 @@ %D (dimensie) in een aantal regels en kent dit toe aan %D \type{\noflines}. %D -%D \starttypen +%D \starttyping %D \getnoflines{dimensie} -%D \stoptypen +%D \stoptyping %D %D Er wordt gedeeld door \type{\openlineheight} en een hoogte %D van~0pt komt overeen met 0~regels. The raw alternative @@ -341,7 +341,7 @@ \def\dogetnoflines#1#2% {\noflinesheight#2\relax - \ifdim\noflinesheight=\zeropoint + \ifzeropt\noflinesheight % \ifdim\noflinesheight=\zeropoint \noflines\zerocount \else \divide\noflinesheight \openlineheight @@ -361,11 +361,11 @@ %D returns it it \type {\noflines}. The macro works %D reasonable well as long as the content can be unboxed. %D -%D \starttypen +%D \starttyping %D \determinenoflines{test\\test} %D \determinenoflines{\bfd test\\test} %D \determinenoflines{\definedfont[Sans at 40pt]test\\test} -%D \stoptypen +%D \stoptyping \def\determinenoflines {\bgroup @@ -388,10 +388,10 @@ %D instance because we pass data, we can fall back on the next %D macro: %D -%D \starttypen +%D \starttyping %D \doiftextelse {data} {then branch} {else branch} %D \doiftext {data} {then branch} -%D \stoptypen +%D \stoptyping %\def\doiftextelse#1#2#3% % {\bgroup @@ -444,18 +444,18 @@ %D treating it according to earlier specifications. We use for %D instance something like: %D -%D \starttypen +%D \starttyping %D \def\getfloat% %D {\def\handlefloat{...\flushnextbox...} %D \dowithnextbox\handlefloat\normalvbox} -%D \stoptypen +%D \stoptyping %D %D instead of: %D -%D \starttypen +%D \starttyping %D \def\getfloat#1% %D {...#1...} -%D \stoptypen +%D \stoptyping %D %D In this implementation the \type{\aftergroup} construction %D is needed because \type{\afterassignment} is executed inside @@ -473,19 +473,19 @@ %D So in fact we get: %D -%D \starttypen +%D \starttyping %D \setbox\nextbox { \aftergroup\dodowithnextbox ... } -%D \stoptypen +%D \stoptyping %D %D or %D -%D \starttypen +%D \starttyping %D \setbox\nextbox { ... } \dodowithnextbox -%D \stoptypen +%D \stoptyping %D %D A slower but more versatile implementation is: %D -%D \starttypen +%D \starttyping %D \long\def\dowithnextbox#1#2% %D {\long\def\dodowithnextbox{#1}% %D \ifx#2\normalhbox @@ -500,7 +500,7 @@ %D \afterassignment\dodowithnextbox %D \fi\fi\fi\fi %D \setbox\nextbox#2} -%D \stoptypen +%D \stoptyping %D %D This alternative also accepts \type{\box0} and alike, but %D we don't really need this functionality now. @@ -524,9 +524,9 @@ %D without wanting to use additional grouping. Therefore we %D provide: %D -%D \starttypen +%D \starttyping %D \dowithnextboxcontent{inside}{after}{box content} -%D \stoptypen +%D \stoptyping %D %D {\em todo: Search source for potential usage!} @@ -537,9 +537,13 @@ \setbox\nextbox} %D Now we can redefine \type {\dowithnextbox} as follows: - -\def\dowithnextbox - {\dowithnextboxcontent\empty} +%D +%D \starttyping +%D \def\dowithnextbox{\dowithnextboxcontent\empty} +%D \stoptyping +%D +%D But since this macro is used often and since this implementation +%D is slower, we will not use that definition. %D \macros %D {llap, rlap, tlap, blap, clap} @@ -581,11 +585,11 @@ %D First we have to grab the piece of text we want to act %D upon. This is done by means of the duo macros: %D -%D \starttypen +%D \starttyping %D \beginofshapebox %D a piece of text %D \endofshapebox -%D \stoptypen +%D \stoptyping %D %D When all texts is collected, we can call \type{\reshapebox} %D and do something with it's vertical components. We can make @@ -614,7 +618,7 @@ %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D As we can see, when some kind of numbering is done, we have %D to add a second pass. @@ -639,7 +643,7 @@ %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D This example shows that the content of the box is still %D available after flushing. Another feature is that only the @@ -660,7 +664,7 @@ %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D The macros are surprisingly easy to follow and in fact %D introduce no new concepts. Nearly all books on \TEX\ show @@ -670,9 +674,9 @@ %D reshaping, which can result in an endless loop. We %D therefore offer: %D -%D \starttypen +%D \starttyping %D \ifreshapingbox -%D \stoptypen +%D \stoptyping %D %D Some \CONTEXT\ commands are protected this way. Anyhow, %D reshaping is aborted after 100 dead cycles. @@ -712,7 +716,7 @@ \newbox\tmpshapebox \def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip - {\ifdim\ht\oldshapebox=\zeropoint + {\ifzeropt\ht\oldshapebox % \ifdim\ht\oldshapebox=\zeropoint \setbox\newshapebox\normalvbox{}% \else \setbox\newshapebox\normalvbox @@ -724,8 +728,8 @@ \fi} \def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip - {\ifcase\lastskip % \ifdim\lastskip=\zeropoint\relax - \ifcase\lastkern % \ifdim\lastkern=\zeropoint\relax + {\ifzeropt\lastskip % \ifdim\lastskip=\zeropoint\relax + \ifzeropt\lastkern % \ifdim\lastkern=\zeropoint\relax \ifcase\lastpenalty % \ifnum\lastpenalty=\zerocount \setbox\shapebox\lastbox \ifvoid\shapebox @@ -735,22 +739,22 @@ \exitloop \else \shapecounter\zerocount - \global\setbox\tmpshapebox\normalvbox{#1\unvbox\tmpshapebox} + \global\setbox\tmpshapebox\normalvbox{#1\unvbox\tmpshapebox}% \fi \fi \else \shapepenalty\lastpenalty - \global\setbox\tmpshapebox\normalvbox{#2\unvbox\tmpshapebox} + \global\setbox\tmpshapebox\normalvbox{#2\unvbox\tmpshapebox}% \unpenalty \fi \else \shapekern\lastkern - \global\setbox\tmpshapebox\normalvbox{#3\unvbox\tmpshapebox} + \global\setbox\tmpshapebox\normalvbox{#3\unvbox\tmpshapebox}% \unkern \fi \else \shapeskip\lastskip - \global\setbox\tmpshapebox\normalvbox{#4\unvbox\tmpshapebox} + \global\setbox\tmpshapebox\normalvbox{#4\unvbox\tmpshapebox}% \unskip \fi \ifnum\shapecounter>100 % can be less @@ -778,7 +782,7 @@ \def\flushshapebox {\bgroup - \ifdim\ht\newshapebox=\zeropoint + \ifzeropt\ht\newshapebox % \ifdim\ht\newshapebox=\zeropoint \else % make \prevdepth legal % \par before the next \vskip gives far worse results @@ -817,9 +821,9 @@ %D In real inner situations we can use: %D -%D \starttypen +%D \starttyping %D \flushinnershapebox -%D \stoptypen +%D \stoptyping %D %D This one is used in \type{\framed}. @@ -828,7 +832,7 @@ % \omlijnd[offset=0pt,hoogte=8mm,uitlijnen={rechts,laho}]{\bfa test} \def\innerflushshapebox - {\ifdim\ht\newshapebox=\zeropoint\relax \else + {\ifzeropt\ht\newshapebox \else % \ifdim\ht\newshapebox=\zeropoint\relax \else \unvcopy\newshapebox\relax % \kern-\dp\newshapebox\relax \fi} @@ -837,12 +841,12 @@ %D directly. This macro takes four arguments, that take care %D of: %D -%D \startopsomming[n,opelkaar] -%D \som \type{\shapebox} -%D \som \type{\shapepenalty} -%D \som \type{\shapekern} -%D \som \type{\shapeskip} -%D \stopopsomming +%D \startitemize[n,packed] +%D \item \type{\shapebox} +%D \item \type{\shapepenalty} +%D \item \type{\shapekern} +%D \item \type{\shapeskip} +%D \stopitemize %D \macros %D {shapedhbox} @@ -881,9 +885,9 @@ %D The simple command \type{\hyphenatedword} accepts one %D argument and gives the hyphenated word. This macro calls for %D -%D \starttypen +%D \starttyping %D \dohyphenateword {n} {pre} {word} -%D \stoptypen +%D \stoptyping %D %D The next examples tell more than lots of words: %D @@ -899,32 +903,31 @@ %D shorter alternative for the first line. %D %D \startvoorbeeld -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D These macros are slow but effective and not that hard to %D program at all. +\ifx\scantokens\undefined \let\scantokens\firstofoneargument \fi + \def\dohyphenateword#1#2#3% {\bgroup \setbox\scratchbox\normalhbox - {\mindermeldingen - \widowpenalty \zerocount % not really needed - \clubpenalty \zerocount % not really needed - \brokenpenalty \zerocount - \hyphenpenalty \zerocount - \exhyphenpenalty \zerocount - \doublehyphendemerits\zerocount - \finalhyphendemerits \zerocount - \adjdemerits \zerocount + {\dontcomplain + \nopenalties % \widowpenalty \clubpenalty \brokenpenalty \doublehyphendemerits \finalhyphendemerits \adjdemerits + \hyphenpenalty \zerocount + \exhyphenpenalty\zerocount \setbox0\normalvbox - {\hsize\zeropoint \space + {\hsize\zeropoint + \hskip\zeropoint % really needed \ifnum#1=\minusone \obeyspaces \obeylines \def\obeyedspace{\hskip\zeropoint\hbox to \onepoint{}\hskip\zeropoint}% \let\obeyedline \obeyedspace - \def\next{#3}\scantokens{\next}% + \def\next{#3}\scantokens\expandafter{\next}% + % also ok: \scantokens{#3}% \else #3% \fi}% @@ -947,7 +950,7 @@ \setbox2\lastbox \normalhbox{\unhbox2}}}% \ifnum#1=\minusone\ifdim\wd2=\onepoint\space\else\box2\allowbreak\fi\else\box2\fi - \ifdim\ht0=\zeropoint\exitloop\fi}% + \ifzeropt\ht0 \exitloop\fi}% % \ifdim\ht0=\zeropoint\exitloop\fi}% \removeunwantedspaces}% \ifnum#1>\zerocount \ht\scratchbox\strutht @@ -963,9 +966,9 @@ %D You may want to give the following call a try: %D -%D \starttypen +%D \starttyping %D \hyphenatedpar{\readfile{zapf}{}{}}\endgraf -%D \stoptypen +%D \stoptyping %D \macros %D {doboundtext} @@ -977,9 +980,9 @@ %D argument is appended. When the text to be checked is packed %D in a command, we'll have to use \type{\expandafter}. %D -%D \starttypen +%D \starttyping %D \doboundtext{a very, probably to long, text}{3cm}{...} -%D \stoptypen +%D \stoptyping %D %D When calculating the room needed, we take the width of the %D third argument into account, which leads to a bit more @@ -1036,10 +1039,10 @@ %D \TEX\ do most of the job. The previous command works better %D on text that cannot be hyphenated. %D -%D \starttypen +%D \starttyping %D \limitatetext {text} {width} {sentinel} %D \limitatetext {text} {-width} {prelude} -%D \stoptypen +%D \stoptyping %D %D When no width is given, the whole text comes available. The %D sentinel is optional. This is about the third version. @@ -1048,7 +1051,7 @@ %D The simple alternative is as follows: %D -%D \starttypen +%D \starttyping %D \unexpanded\def\limitatetext% %D {\bgroup % evt \setstrut %D \forgetall @@ -1084,7 +1087,7 @@ %D \unhbox\nextbox %D \fi}% %D \egroup} -%D \stoptypen +%D \stoptyping %D %D The next alternative accepts a negative width. A negative %D value crops the beginning. The macro thereby becomes less @@ -1101,8 +1104,7 @@ \def\dolimitatetext#1#2% {\doifelsenothing{#1} {\unhbox\nextbox} - {\widowpenalty\zerocount - \clubpenalty\zerocount + {\nopenalties \scratchdimen#1\relax \ifdim\scratchdimen<\zeropoint\relax % we'll take the last line \donefalse @@ -1200,9 +1202,9 @@ %D chapter~5} is for instance the results of the character %D sequence: %D -%D \starttypen +%D \starttyping %D The typeset text \in{chapter}[texniques] is for instance -%D \stoptypen +%D \stoptyping %D %D When such words are made active in interactive texts, the %D combination cannot longer be hyphenated. Normally this is no @@ -1218,9 +1220,9 @@ %D the more we needed a robust solution. Well, here it is and %D it called as: %D -%D \starttypen +%D \starttyping %D \processisolatedwords{some words}\someaction -%D \stoptypen +%D \stoptyping %D %D The second argument \type{someactions} handles the %D individual words, like in: @@ -1236,7 +1238,7 @@ %D which let the words turn up as: %D %D \startvoorbeeld -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D The macro has been made a bit more clever than needed at @@ -1254,9 +1256,9 @@ %D becomes: %D %D \startvoorbeeld -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \stopvoorbeeld %D %D Single word arguments are treated without further @@ -1278,7 +1280,7 @@ %D When needed, spacing can be suppressed by \type %D {\nothingbetweenisolatedwords}. -\newif\ifisolatedwords +\newif\ifisolatedwords % public, e.g. used in core-ref \def\betweenisolatedwords {\hskip\currentspaceskip} @@ -1288,14 +1290,17 @@ \newskip\isolatedlastskip +\chardef\isolatedwordsmode=0 % no nesting + \def\processisolatedwords#1#2% todo: vbox ipv hbox ivm afbreken! {\bgroup % todo: doloop \fakecompoundhyphen - \mindermeldingen + \dontcomplain \forgetall - \widowpenalty\zerocount - \clubpenalty\zerocount - \def\processisolatedwords##1##2{##2{##1}}% we split only once + \nopenalties + \ifcase\isolatedwordsmode + \def\processisolatedwords##1##2{##2{##1}}% we split only once + \fi \global\let\localbetweenisolatedwords\betweenisolatedwords \setbox0\normalhbox % we default to spaces, but from inside out {\ignorespaces#1% \localbetweenisolatedwords can be overruled @@ -1336,7 +1341,7 @@ \repeat \unskip}% \unhbox0\unskip - \ifdim\isolatedlastskip=\zeropoint\else % added + \ifzeropt\isolatedlastskip\else % added % \ifdim\isolatedlastskip=\zeropoint\else % added \hskip\isolatedlastskip \fi \fi @@ -1371,7 +1376,7 @@ %D %D \startvoorbeeld %D \vskip3\baselineskip -%D \haalbuffer +%D \getbuffer %D \stopvoorbeeld %D %D Before displaying the result we added some skip, otherwise @@ -1379,7 +1384,7 @@ %D macro can be useful when building complicated menus, headers %D and footers and|/|or margin material. -\def\sbox% in handleiding, voorbeeld \inlinker{xx} \extern.. +\def\sbox% in handleiding, voorbeeld \inleft{xx} \extern.. {\normalvbox\bgroup % new ! ! ! \dowithnextbox {\setbox\scratchbox\normalhbox @@ -1435,13 +1440,13 @@ %D should be centered with respect to the surrounding box. The %D last of the three examples we show below says: %D -%D \starttypen +%D \starttyping %D \vsize=3cm %D \hsize=3cm %D \ruledvbox to \vsize %D {\centeredbox height .5cm width -1cm %D {\vrule width \hsize height \vsize}}} -%D \stoptypen +%D \stoptyping %D %D Here the \type{\ruledvbox} just shows the surrounding box %D and \type{\vrule} is used to show the centered box. @@ -1451,15 +1456,15 @@ %D \hsize=3cm %D \ruledvbox to \vsize %D {\centeredbox height #1 width #2 -%D {\color[groen]{\vrule width \hsize height \vsize}}}} +%D {\color[green]{\vrule width \hsize height \vsize}}}} %D -%D \startregelcorrectie -%D \startcombinatie[3*1] +%D \startlinecorrection +%D \startcombination[3*1] %D {\AnExample {-1cm} {.5cm}} {} %D {\AnExample {.5cm} {-1cm}} {} %D {\AnExample {-1cm} {-.5cm}} {} -%D \stopcombinatie -%D \stopregelcorrectie +%D \stopcombination +%D \stoplinecorrection %D %D This command takes two optional arguments: \type{width} and %D \type{height}. Observing readers can see that we use \TEX's @@ -1474,7 +1479,7 @@ {\bgroup \setbox0\normalvbox to \vsize \bgroup - \mindermeldingen + \dontcomplain \forgetall \setbox0\normalhbox{\vrule\!!width \zeropoint#1}% \setbox2\normalvbox{\hrule\!!height\zeropoint#1}% @@ -1504,10 +1509,10 @@ %D For those who don't want to deal with \type {\hsize} %D and \type {\vsize}, we have: %D -%D \starttypen +%D \starttyping %D \centerednextbox width 2bp height 2bp %D {\framed[width=100bp,height=100bp]{}} -%D \stoptypen +%D \stoptyping %D %D Do you see what we call this one \type {next}? @@ -1525,9 +1530,9 @@ %D %D Centering on the available space is done by: %D -%D \starttypen +%D \starttyping %D \centerbox {content} -%D \stoptypen +%D \stoptyping %D %D When omitted, the current \type {\hsize} and \type %D {\vsize} are used. Local dimensions are supported. @@ -1538,8 +1543,8 @@ {\setlocalhsize \setbox0\normalhbox{\vrule\!!width \zeropoint#1}% \setbox2\normalvbox{\hrule\!!height\zeropoint#1}% - \hsize\ifdim\wd0=\zeropoint\hsize\else\wd0\fi - \vsize\ifdim\ht2=\zeropoint\vsize\else\ht2\fi + \ifzeropt\wd0\else\hsize\wd0\fi % \hsize\ifdim\wd0=\zeropoint\hsize\else\wd0\fi + \ifzeropt\ht2\else\vsize\ht2\fi % \vsize\ifdim\ht2=\zeropoint\vsize\else\ht2\fi \normalvbox to \vsize{\vss\normalhbox to \hsize{\hss\flushnextbox\hss}\vss}% \egroup}% \normalhbox} @@ -1550,10 +1555,10 @@ %D These macros are copied from the \TEX book, page~397, and %D extended by a macro that sets the \type{\hsize}. %D -%D \starttypen +%D \starttyping %D \setrigidcolumnhsize {total width} {distance} {n} %D \rigidcolumnbalance {box} -%D \stoptypen +%D \stoptyping %D %D Both these macros are for instance used in typesetting %D footnotes. @@ -1563,6 +1568,7 @@ \newif\ifalignrigidcolumns \newif\ifstretchrigidcolumns +\newif\iftightrigidcolumns % if true: just a vbox, no depth/noflines/gridsnap corrrections %D De eerste switch bepaald het uitlijnen, de tweede rekt de %D individuele kolommen op naar \type{\vsize}. @@ -1587,6 +1593,7 @@ \else \normalvbox {\forgetall + \nopenalties \dontcomplain \setbox\rigidcolumnbox\normalvbox {\line{}\goodbreak\unvbox#1\removebottomthings}% @@ -1603,23 +1610,28 @@ \setbox\scratchbox\normalhbox to \savedrigidhsize {\dorecurse\rigidcolumns {\setbox\scratchbox\vsplit\rigidcolumnbox to \scratchdimen - \dp\scratchbox\openstrutdepth + \dp\scratchbox\openstrutdepth \setbox\scratchbox\normalvtop - \ifalignrigidcolumns to - \ifstretchrigidcolumns\vsize\else\scratchdimen\fi - \fi + \ifalignrigidcolumns to + \ifstretchrigidcolumns\vsize\else\scratchdimen\fi + \fi {\unvbox\scratchbox}% \wd\scratchbox\hsize \box\scratchbox \hfill}% \hfillneg}% - \advance\scratchdimen -\openstrutdepth - \setbox\scratchbox\normalhbox{\raise\scratchdimen\box\scratchbox}% - \dp\scratchbox\openstrutdepth - \ht\scratchbox\scratchdimen + \iftightrigidcolumns + \setbox\scratchbox\normalhbox{\raise\dp\scratchbox\box\scratchbox}% + \else + \advance\scratchdimen -\openstrutdepth + \setbox\scratchbox\normalhbox{\raise\scratchdimen\box\scratchbox}% + \dp\scratchbox\openstrutdepth + \ht\scratchbox\scratchdimen + \fi \box\scratchbox}% \fi} + %D \macros %D {startvboxtohbox,stopvboxtohbox,convertvboxtohbox} %D @@ -1627,7 +1639,7 @@ %D pages 398 and 399 of the \TEX book. These macros can be used %D like: %D -%D \starttypen +%D \starttyping %D \normalvbox %D \bgroup %D \startvboxtohbox ... \stopvboxtohbox @@ -1639,7 +1651,7 @@ %D \bgroup %D \converthboxtovbox %D \egroup -%D \stoptypen +%D \stoptyping %D %D These macros are used in reformatting footnotes, so they do %D what they're meant for. @@ -1732,9 +1744,8 @@ \def\unhhbox#1\with#2% {\bgroup - \widowpenalty\zerocount - \clubpenalty\zerocount - \mindermeldingen + \nopenalties + \dontcomplain \forgetall \setbox\unhhedbox\normalvbox{\hskip\hhboxindent\strut\unhbox#1}% => \hsize \doloop @@ -1744,7 +1755,7 @@ \fi \ht\hhbox\strutht \dp\hhbox\strutdp - \ifdim\hhboxindent=\zeropoint\else + \ifzeropt\hhboxindent\else % \ifdim\hhboxindent=\zeropoint\else \setbox\hhbox\normalhbox{\hskip-\hhboxindent\box\hhbox}% \hhboxindent\zeropoint \fi @@ -1783,7 +1794,7 @@ %D \unhhbox2\with{\ruledhbox{\box\hhbox}} %D \stopbuffer %D -%D \haalbuffer +%D \getbuffer %D %D This piece of text was typeset by saying: %D @@ -1798,9 +1809,9 @@ %D When processing depends on the availability of content, one %D can give the next macro a try. %D -%D \starttypen +%D \starttyping %D \doifcontent{pre content}{post content}{no content}\somebox -%D \stoptypen +%D \stoptyping %D %D Where \type{\somebox} is either a \type{\normalhbox} or %D \type{\normalvbox}. If the dimension of this box suggest some @@ -1828,7 +1839,7 @@ %D \startbuffer %D \doifcontent{[}{]}{}\normalhbox{content sensitive typesetting} %D -%D \doifcontent{}{\pagina}{}\normalvbox{content sensitive typesetting} +%D \doifcontent{}{\page}{}\normalvbox{content sensitive typesetting} %D %D \doifcontent{}{}{\message{Didn't you forget something?}}\normalhbox{} %D \stopbuffer @@ -1837,7 +1848,7 @@ %D %D We get: %D -%D \haalbuffer +%D \getbuffer %D %D Where the last call of course does not show up in this %D document, but definitely generates a confusing message. @@ -1882,9 +1893,9 @@ %D %D \startbuffer %D \startoverlay -%D {\omlijnd{hans}} -%D {\omlijnd[breedte=3cm]{ton}} -%D {\omlijnd[hoogte=2cm]{oeps}} +%D {\framed{hans}} +%D {\framed[width=3cm]{ton}} +%D {\framed[height=2cm]{oeps}} %D \stopoverlay %D \stopbuffer %D @@ -1892,7 +1903,7 @@ %D %D shows up as: %D -%D \leavevmode\haalbuffer +%D \leavevmode\getbuffer % \def\dooverlaybox% % {\ifhmode\unskip\fi @@ -1971,7 +1982,7 @@ % %D % %D shows up as: % %D -% %D \leavevmode\haalbuffer +% %D \leavevmode\getbuffer % % \def\dohspread % {\flushnextbox @@ -1987,9 +1998,9 @@ %D %D The next macro is a rather silly one, but saves space. %D -%D \starttypen +%D \starttyping %D \normalhbox{\fakebox0} -%D \stoptypen +%D \stoptyping %D %D returns an empty box with the dimensions of the box %D specified, here being zero. @@ -2011,44 +2022,46 @@ %D %D Here are some convenient alternative box types: %D -%D \starttypen +%D \starttyping %D \lbox{text ...} %D \cbox{text ...} %D \rbox{text ...} -%D \stoptypen +%D \stoptyping %D %D Are similar to \type {\normalvbox}, which means that they also %D accept something like \type{to 3cm}, but align to the left, %D middle and right. These box types can be used to typeset %D paragraphs. -\def\lbox{\lrcbox\raggedleft} -\def\cbox{\lrcbox\raggedcenter} -\def\rbox{\lrcbox\raggedright} +\def\lbox{\makelrcbox\normalvbox\raggedleft} +\def\cbox{\makelrcbox\normalvbox\raggedcenter} +\def\rbox{\makelrcbox\normalvbox\raggedright} + +\def\ltop{\makelrcbox\normalvtop\raggedleft} +\def\ctop{\makelrcbox\normalvtop\raggedcenter} +\def\rtop{\makelrcbox\normalvtop\raggedright} -\def\lrcbox#1#2#% - {\normalvbox#2\bgroup - \let\\=\endgraf - \forgetall#1\let\next=} +\def\makelrcbox#1#2#3#% + {#1#3\bgroup \forgetall \let\\=\endgraf #2\let\next=} %D The alternatives \type {\tbox} and \type {\bbox} can be used %D to properly align boxes, like in: %D %D \startbuffer -%D \starttabel[|||] +%D \starttable[|||] %D \HL -%D \VL \tbox{\externfiguur[koe][hoogte=3cm,kader=aan]} \VL top aligned \VL\SR +%D \VL \tbox{\externalfigure[koe][height=3cm,frame=on]} \VL top aligned \VL\SR %D \HL -%D \VL \bbox{\externfiguur[koe][hoogte=3cm,kader=aan]} \VL bottom aligned \VL\SR +%D \VL \bbox{\externalfigure[koe][height=3cm,frame=on]} \VL bottom aligned \VL\SR %D \HL -%D \stoptabel +%D \stoptable %D \stopbuffer %D %D \typebuffer %D %D The positioning depends on the strut settings: %D -%D \haalbuffer +%D \getbuffer \def\tbox{\tbbox\ht\dp} \def\bbox{\tbbox\dp\ht} @@ -2089,9 +2102,9 @@ %D width made up of several dimensions. Instead of cumbersome %D additions, we can use: %D -%D \starttypen +%D \starttyping %D \boxofsize \normalvbox 10cm 3cm -5cm {the text to be typeset} -%D \stoptypen +%D \stoptyping %D %D This example demonstrates that one can use positive and %D negative values. Dimension registers are also accepted. @@ -2308,6 +2321,41 @@ \def\middlebox#1% {\normalhbox{\setbox0\placedbox{#1}\boxoffset=-.5\wd0\rightbox{\box0}}} + +\def\baselinemiddlebox#1% + {\normalhbox + {\setbox0\placedbox{#1}% + \global\boxhdisplacement-.5\wd0 + \global\advance\boxhdisplacement-\boxoffset + \global\boxvdisplacement-\boxoffset + \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}} + +\def\baselineleftbox#1% + {\normalhbox + {\setbox0\placedbox{#1}% + \global\boxhdisplacement-\wd0 + \global\advance\boxhdisplacement-\boxoffset + \global\boxvdisplacement-\boxoffset + \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}} + +\def\baselinerightbox#1% + {\normalhbox + {\setbox0\placedbox{#1}% + \global\boxhdisplacement\boxoffset + \global\boxvdisplacement-\boxoffset + \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}} + +%D \macros +%D {obox} +%D +%D Experimental, not yet frozen: + +\def\lrtbbox#1#2#3#4% l r t b + {\bgroup + \dowithnextboxcontent + {\advance\hsize-#1\advance\hsize-#2\advance\vsize-#3\advance\vsize-#4\relax} + {\forgetall\vbox to \vsize{\vskip#3\hbox to \hsize{\hskip#1\box\nextbox\hss}\vss}\egroup} + \vbox} %D \macros %D {toplinebox} @@ -2333,7 +2381,7 @@ %D At the cost of some memory, but saving box registers, we %D have implemented a box repository. %D -%D \starttypen +%D \starttyping %D \initializeboxstack{one} %D %D \savebox{one}{a}{test a} @@ -2345,7 +2393,7 @@ %D \normalhbox{p:\foundbox{one}{p}} \par %D \normalhbox{x:\foundbox{one}{x}} \par %D \normalhbox{y:\foundbox{two}{a}} \par -%D \stoptypen +%D \stoptyping % a first version % @@ -2509,7 +2557,8 @@ {\dorecurse5{\unskip\unkern\unpenalty}} \def\removelastskip % \ifvmode the plain tex one \fi - {\ifvmode\ifdim\lastskip=\zeropoint\else\vskip-\lastskip\fi\fi} +% {\ifvmode\ifdim\lastskip=\zeropoint\else\vskip-\lastskip\fi\fi} + {\ifvmode\ifzeropt\lastskip\else\vskip-\lastskip\fi\fi} %D \macros %D {makestrutofbox} @@ -2532,11 +2581,11 @@ %D construction). Nice stuff for a tips and tricks maps %D article. %D -%D \starttypen +%D \starttyping %D \raisebox{100pt}\normalhbox{test} %D \raisebox50pt\normalhbox{test} %D \hsmash{\raisebox{100pt}\normalhbox{test}} -%D \stoptypen +%D \stoptyping \def\doraiselowerbox#1#2% a nice trick us used to accept {\def\next % both direct and {} dimensions @@ -2584,7 +2633,7 @@ % %D \stopbuffer % %D % %D \typebuffer -% %D \haalbuffer +% %D \getbuffer % % \def\dodonormbox#1#2#3#4#5#6#7% % {\doifnumberelse{#1} @@ -2638,9 +2687,10 @@ %D And even rawer: -\let\naturalhbox \normalhbox -\let\naturalvbox \normalvbox -%let\naturalvtop \normalvtop +\let\naturalhbox \normalhbox +\let\naturalvbox \normalvbox +\let\naturalvtop \normalvtop +\let\naturalvcenter \normalvtop \beginOMEGA dir @@ -2662,7 +2712,10 @@ \dowithnextbox{\normalhbox{$\verynormalvcenter{\flushnextbox}$}\egroup} \normalvbox} +% could be \everymathematics + \prependtoks \let\vcenter\normalvcenter \to \everymath +\prependtoks \let\vcenter\normalvcenter \to \everydisplay %D \macros %D {frozenhbox} @@ -2702,4 +2755,4 @@ \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 +\protect \endinput diff --git a/tex/context/base/supp-emp.tex b/tex/context/base/supp-emp.tex index bd0736308..15489bca7 100644 --- a/tex/context/base/supp-emp.tex +++ b/tex/context/base/supp-emp.tex @@ -29,11 +29,11 @@ %D %D Therefore, \PDFTEX\ provides just these three primitives: %D -%D \starttabulatie[|l|l|] +%D \starttabulate[|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 \stoptabulate %D %D Based on these three primitives, very advanced systems can %D be build, and for some time now, \CONTEXT\ has such a @@ -45,7 +45,7 @@ %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 answer was \quotation {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 @@ -62,10 +62,10 @@ %D into the macros \type {\EMmoveto} and \type {\EMlineto}, %D like: %D -%D \starttypen +%D \starttyping %D \def\EMmoveto{\special{em:moveto}} %D \def\EMlineto{\special{em:lineto}} -%D \stoptypen +%D \stoptyping %D %D They are used in macro packages to draw lines, and the %D results are often boxes with content like the following: @@ -83,9 +83,11 @@ %D This box will contain a triangle, and when typeset, it should %D look like: %D -%D \startregelcorrectie[blanko] -%D \haalbuffer -%D \stopregelcorrectie +%D \startlinecorrection[blank] +%D \getbuffer +%D \stoplinecorrection + +\def\EMlinewd{.4} \ifx\dosetpositionpt\undefined % non context part @@ -105,13 +107,11 @@ %D length. We need to convert this number into base points as %D used by \POSTSCRIPT\ and \PDF. When done, we insert some %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 Here, the \type {m} means \quote {moveto}, the \type {l} +%D means \quote {lineto} and the \type {S} operator \quote %D {strokes} (draws) the line. The macro \type {\EMlinewd} %D holds the linewidth in basepoints. -\def\EMlinewd{.4} - \def\EMlineto {\bgroup \EMgetposition\EMlastlinex\EMlastliney @@ -119,7 +119,7 @@ \count2=\EMlastmovey \advance\count2 -\EMlastliney \divide\count0 65536 \divide\count2 65536 - \pdfliteral{\EMlinewd\space w 0 0 m \the\count0 \space\the\count2 \space l S}% + \PDFcode{\EMlinewd\space w 0 0 m \the\count0 \space\the\count2 \space l S}% \global\let\EMlastmovex\EMlastlinex \global\let\EMlastmovey\EMlastliney \egroup} @@ -136,21 +136,21 @@ %D shipped out, since \type {\write} postpones its action %D until that moment. The file has entries like: %D -%D \starttypen +%D \starttyping %D \EMsetpos 1 4661756 46651918 %D \EMsetpos 2 5000359 46990521 %D \EMsetpos 3 4661756 46313315 %D \EMsetpos 4 5338962 46990521 %D \EMsetpos 5 4661756 45974712 -%D \stoptypen +%D \stoptyping %D %D These lines are written with the command: %D -%D \starttypen +%D \starttyping %D \write\EMfile %D {\EMsetpos\number\EMcounter %D \space\number\pdflastxpos\space\number\pdflastypos}% -%D \stoptypen +%D \stoptyping %D %D In reality the argument to \type {\write} looks slightly %D more complicated, because we have to make sure that the @@ -231,12 +231,12 @@ %D \stopbuffer %D %D \startbuffer[pos-nl] -%D \stelpositionerenin[eenheid=ex] -%D \startpositioneren +%D \setuppositioning[uniteenheid=ex] +%D \startpositioning %D \dostepwiserecurse{-10}{10}{1} -%D {\positioneer(0,\recurselevel){\EMmoveto} -%D \positioneer(\recurselevel,0){\EMlineto}} -%D \stoppositioneren +%D {\position(0,\recurselevel){\EMmoveto} +%D \position(\recurselevel,0){\EMlineto}} +%D \stoppositioning %D \stopbuffer %D %D \typebuffer[pos-en] @@ -245,22 +245,22 @@ %D positioning mechanism, which positions the commands %D using \TEX's skips and kerns. %D -%D \startregelcorrectie[blanko] -%D \haalbuffer[pos-nl] -%D \stopregelcorrectie +%D \startlinecorrection[blank] +%D \getbuffer[pos-nl] +%D \stoplinecorrection %D %D Of course one should start and end the file with: %D -%D \starttypen +%D \starttyping %D \startEMspecials %D \stopEMspecials -%D \stoptypen +%D \stoptyping %D %D and, if needed, reset the begin position at each page using: %D -%D \starttypen +%D \starttyping %D \resetEMspecials -%D \stoptypen +%D \stoptyping \fi % end of non context part @@ -309,7 +309,7 @@ \global\advance\EMlastmovey -\EMlastliney \ScaledPointsToBigPoints{\number\EMlastmovex}\EMx \ScaledPointsToBigPoints{\number\EMlastmovey}\EMy - \pdfliteral{\EMlinewd\space w 0 0 m \EMx \space \EMy \space l S}% + \PDFcode{\EMlinewd\space w 0 0 m \EMx \space \EMy \space l S}% \global\EMlastmovex\EMlastlinex \global\EMlastmovey\EMlastliney} @@ -333,7 +333,15 @@ %D this mechanism transparant to \DVI\ as well as \PDF\ %D output. We will use \type {\pdfiteral} as trigger. -\ifx\pdfliteral\undefined +\ifx\PDFcode\undefined + \ifx\pdfliteral\undefined + \def\PDFcode#1{\special{PDF: #1}} + \else + \let\PDFcode\pdfliteral + \fi +\fi + +\ifx\PDFcode\undefined \def\EMpdfordvi#1#2{#2} \else\ifx\pdfoutput\undefined \def\EMpdfordvi#1#2{#2} @@ -363,9 +371,9 @@ %D macro does the job. Beware of the fact that \type %D {\special}'s may interfere with the typesetting process. %D -%D \starttypen +%D \starttyping %D \setEMlinewidth{1pt} -%D \stoptypen +%D \stoptyping \def\setEMlinewidth#1% this could be done more efficient for {\bgroup % context alone, but it's a hack anyway @@ -387,4 +395,4 @@ %D methods as well. Also, it is always good to have more roads %D to reach the same goal. -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/supp-eps.tex b/tex/context/base/supp-eps.tex index 8f4251041..17d68df4f 100644 --- a/tex/context/base/supp-eps.tex +++ b/tex/context/base/supp-eps.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \ifx \undefined \writestatus \input supp-mis.tex \relax \fi @@ -17,53 +17,53 @@ %D part of the figure inclusion macros. When \PDFTEX\ started %D to support \PDF\ inclusion, where some accompanying macros %D were put in \type{supp-pdf}, I considered it more suitable -%D to give the \EPS\ macros their own module. +%D to give the \EPS\ macros their own module. \writestatus{loading}{Context Support Macros / EPS} %D \macros %D {dogetEPSboundingbox} %D -%D The predecessors of the following macro's are derived from -%D Thomas Rockicky's macro's. They are rewritten to a more -%D compact form, made a bit more robust and also handle the -%D \type{HiResBoundingBox} and \type{ExactBoundingBox} that +%D The predecessors of the following macro's are derived from +%D Thomas Rockicky's macro's. They are rewritten to a more +%D compact form, made a bit more robust and also handle the +%D \type{HiResBoundingBox} and \type{ExactBoundingBox} that %D are sometimes present. %D -%D A bounding box has the form: +%D A bounding box has the form: %D -%D \starttypen -%D %%BoundingBox: llx lly urx ury -%D \stoptypen +%D \starttyping +%D %%BoundingBox: llx lly urx ury +%D \stoptyping %D -%D Before we scan the file, we have to reset special -%D characters and set some others. The percentage symbol also -%D needs special treatment. When a bounding box is -%D encountered, we keep on scanning until no more directives -%D are found, i.e. a line is found that does not start with a -%D percentage symbol. We also abort scanning after finding a -%D high resolution bounding box. +%D Before we scan the file, we have to reset special +%D characters and set some others. The percentage symbol also +%D needs special treatment. When a bounding box is +%D encountered, we keep on scanning until no more directives +%D are found, i.e. a line is found that does not start with a +%D percentage symbol. We also abort scanning after finding a +%D high resolution bounding box. %D -%D This method also works inside verbatim mode (like when we -%D are typesetting sources and putting eps coded logos into -%D a heading. Temporary restoring the \CATCODES\ is done in -%D the calling routine. +%D This method also works inside verbatim mode (like when we +%D are typesetting sources and putting eps coded logos into +%D a heading. Temporary restoring the \CATCODES\ is done in +%D the calling routine. %D -%D The creator as well as external support for specials are -%D analyzed as well and their status is available in \type -%D {\EPScreator} and \type {\EPSshading}. The boundingbox -%D components are available in \type {\EPSllx} etc. +%D The creator as well as external support for specials are +%D analyzed as well and their status is available in \type +%D {\EPScreator} and \type {\EPSshading}. The boundingbox +%D components are available in \type {\EPSllx} etc. \unprotect -\def\EPSllx{0} \let\MPllx\EPSllx % just in case these -\def\EPSlly{0} \let\MPlly\EPSlly % are used while running +\def\EPSllx{0} \let\MPllx\EPSllx % just in case these +\def\EPSlly{0} \let\MPlly\EPSlly % are used while running \def\EPSurx{0} \let\MPurx\EPSurx % in fast mode we set -\def\EPSury{0} \let\MPury\EPSury % them to 0. +\def\EPSury{0} \let\MPury\EPSury % them to 0. -\chardef\EPSfound =0 -\chardef\EPScreator=0 -\chardef\EPSspecial=0 +\chardef\EPSfound =0 +\chardef\EPScreator=0 +\chardef\EPSspecial=0 \chardef\EPSstatus =0 \let\EPScreatorstring\empty @@ -76,7 +76,7 @@ \def\dogetEPSboundingbox#1#2#3#4#5% {\bgroup \global\chardef\EPSfound 0 - \global\chardef\EPScreator0 + \global\chardef\EPScreator0 \global\chardef\EPSspecial0 \global\chardef\EPSstatus 0 \global\let\EPScreatorstring\empty @@ -88,10 +88,10 @@ \doprocessfile\scratchread{#1}\doprocessEPSline \egroup \ifnum\EPSfound>0 - #2=\EPSllx bp% Using \EPSllx bp instead of + #2=\EPSllx bp% Using \EPSllx bp instead of #4=\EPSurx bp% \dimen0=1bp and \EPSllx\dimen0 - #3=\EPSlly bp% is more accurate (.005pt). - #5=\EPSury bp% + #3=\EPSlly bp% is more accurate (.005pt). + #5=\EPSury bp% \scratchdimen\EPSllx bp\advance#4 -\scratchdimen \scratchdimen\EPSlly bp\advance#5 -\scratchdimen \else @@ -106,23 +106,23 @@ \bgroup \catcode`\%=\@@other \xdef\letterpercent{\string%} \egroup -\def\EPSboundingboxtag {BoundingBox} -\def\EPShiresboundingboxtag{HiResBoundingBox} -\def\EPSexactboundingboxtag{ExactBoundingBox} -\def\EPScreatortag {Creator} -\def\EPSmetaposttag {MetaPost} -\def\EPSmetapostspecialtag {MetaPostSpecial} -\def\EPSmetapostspecialstag{MetaPostSpecials} -\def\EPSpagetag {Page} +\def\EPSboundingboxtag {BoundingBox} +\def\EPShiresboundingboxtag{HiResBoundingBox} +\def\EPSexactboundingboxtag{ExactBoundingBox} +\def\EPScreatortag {Creator} +\def\EPSmetaposttag {MetaPost} +\def\EPSmetapostspecialtag {MetaPostSpecial} +\def\EPSmetapostspecialstag{MetaPostSpecials} +\def\EPSpagetag {Page} -\let\EPSspecialstring \empty -\let\EPSspecialcontent\empty +\let\EPSspecialstring \empty +\let\EPSspecialcontent\empty \long\def\checkEPSboundingbox#1#2#3:#4:.#5\end {\if\string#1\letterpercent \if\string#2\letterpercent - \edef\EPSspecialstring{#3}% - \edef\EPSspecialcontent{#4}% + \edef\EPSspecialstring{#3}% + \edef\EPSspecialcontent{#4}% \ifx\EPSspecialstring\EPScreatortag \getEPScreatorspec \else\ifx\EPSspecialstring\EPSboundingboxtag @@ -136,12 +136,12 @@ \getEPSboundingboxspec \global\chardef\EPSfound 2 \dofinishEPSfile - \else\ifx\EPSspecialstring\EPSmetapostspecialtag % only before finish! - \global\chardef\EPSspecial 1 % ah, we've met some MP extensions - \else\ifx\EPSspecialstring\EPSmetapostspecialstag % only before finish! - \global\chardef\EPSspecial 1 % ah, we've met some MP extensions - \else\ifx\EPSspecialstring\EPSpagetag - \global\chardef\EPSstatus 1 % we passed MP font defs + \else\ifx\EPSspecialstring\EPSmetapostspecialtag % only before finish! + \global\chardef\EPSspecial 1 % ah, we've met some MP extensions + \else\ifx\EPSspecialstring\EPSmetapostspecialstag % only before finish! + \global\chardef\EPSspecial 1 % ah, we've met some MP extensions + \else\ifx\EPSspecialstring\EPSpagetag + \global\chardef\EPSstatus 1 % we passed MP font defs \else \the\extraEPSpreambleparsers \fi\fi\fi\fi\fi\fi\fi @@ -161,7 +161,7 @@ \def\getEPSboundingboxspec {\edef\EPSspecialstring{\EPSspecialcontent\space . . . . }% \expandafter\dogetEPSboundingboxspec\EPSspecialstring\end} - + \def\dogetEPSboundingboxspec#1 #2 #3 #4 #5\end {\gdef\EPSllx{#1}% \ifx\EPSllx\empty @@ -188,8 +188,8 @@ \def\dogetEPSpreambledata#1% can be combined with \extraEPSpreambleparsers {\bgroup - \let\dofinishEPSfile\relax % dirty trick, read past all bboxes + \let\dofinishEPSfile\relax % dirty trick, read past all bboxes \dogetEPSboundingbox{#1}\!!widtha\!!heighta\!!widthb\!!heightb \egroup} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex index c2da977dd..9d54663af 100644 --- a/tex/context/base/supp-fil.tex +++ b/tex/context/base/supp-fil.tex @@ -15,12 +15,12 @@ %D is a separate module for file support. In \CONTEXT\ files %D are used for several purposes: %D -%D \startopsomming[opelkaar] -%D \som general textual input -%D \som logging status information -%D \som saving registers, lists and references -%D \som buffering defered textual input -%D \stopopsomming +%D \startitemize[packed] +%D \item general textual input +%D \item logging status information +%D \item saving registers, lists and references +%D \item buffering defered textual input +%D \stopitemize %D %D When dealing with files we can load them as a whole, using %D the \type{\input} primitive or load them on a line||by||line @@ -55,11 +55,11 @@ %D line ending character the \CATCODE\ comment. This is %D accomplished by %D -%D \starttypen +%D \starttyping %D \pushendofline %D ... reading ... %D \popendofline -%D \stoptypen +%D \stoptyping %D %D Just to be sure, we save the current meaning of \type{^^M} %D in \type{\poppedendofline}. @@ -118,9 +118,9 @@ %D The next macro offers a framework for processing files on a %D line by line basis. %D -%D \starttypen +%D \starttyping %D \doprocessfile \identifier {name} \action -%D \stoptypen +%D \stoptyping %D %D The first argument can for instance be \type{\scratchread}. %D The action must do something with \type{\fileline}, which @@ -136,11 +136,11 @@ {\immediate\openin#1=#2\relax \ifeof#1% \fileprocessedfalse - \immediate\closein#1\relax + \immediate\closein#1% \else \fileprocessedtrue \gdef\dofinishfile - {\immediate\closein#1\relax + {\immediate\closein#1% \global\let\doprocessline\relax}% \gdef\doprocessline {\ifeof#1% @@ -159,9 +159,9 @@ %D Use \type{\pathplusfile} to compose a full file name, like %D in: %D -%D \starttypen +%D \starttyping %D \pathplusfile{path}{file} -%D \stoptypen +%D \stoptyping %D %D By default, this expands into {\tt \pathplusfile{path}{file}}. @@ -183,14 +183,17 @@ \catcode`\/=\@@active \catcode`\:=\@@active \catcode`\~=\@@active +\catcode`\_=\@@active \gdef\sanitizefilename#1\to#2% {\bgroup \edef/{\string/}% \edef:{\string:}% \edef~{\string~}% + \edef_{\string_}% \expanded{\xdef\noexpand\sanitizedfilename{#1}}% \egroup + % maybe \convertcommand\sanitizedfilename\to#2% \let#2\sanitizedfilename} \egroup @@ -207,18 +210,30 @@ {\chardef\kindoffile\zerocount}}} %D \macros -%D {readfile,ReadFile,maxreadlevel, -%D normalinput} +%D {input, normalinput} +%D +%D Sometimes we run into troubles when \type {\input} wants to get +%D expanded, e.g. in a \type {\write} (which happens in the metafun +%D manual when we permit long MP lines). So, instead of fixing that, +%D we go for a redefinition of \type {\input}. Of course it's better +%D to use \type {\readfile} or \type {\processfile}. + +\ifx\normalinput\undefined \let\normalinput\input \fi + +\unexpanded\def\input{\normalinput} + +%D \macros +%D {readfile,ReadFile,maxreadlevel} %D %D One cannot be sure if a file exists. When no file can be %D found, the \type{\input} primitive gives an error message %D and switches to interactive mode. The macro \type{\readfile} %D takes care of non||existing files. This macro has two faces. %D -%D \starttypen +%D \starttyping %D \ReadFile {filename} %D \readfile {filename} {before loading} {not found} -%D \stoptypen +%D \stoptyping %D %D Many \TEX\ implementations have laid out some strategy for %D locating files. This can lead to unexpected results, @@ -252,9 +267,9 @@ %D directories, upto a predefined level. Users can change this %D level, but we default to~3. %D -%D \starttypen +%D \starttyping %D \def\maxreadlevel {3} -%D \stoptypen +%D \stoptyping %D %D This is a pseudo \COUNTER. %D @@ -268,8 +283,6 @@ \let \everyreadfile \everybeforereadfile -\ifx\normalinput\undefined \let\normalinput\input \fi - \newif\iftracefiles \def\maxreadlevel{3} @@ -330,26 +343,6 @@ \fi \next} -% \def\redoreadfile#1#2#3% -% {\immediate\openin\scratchread=#1\relax -% \ifeof\scratchread -% \iftracefiles\writestatus\m!systems{cannot locate #1}\fi -% \immediate\closein\scratchread -% \decrement\readlevel\relax -% \ifnum\readlevel>\zerocount -% \edef\readfilename{\pathplusfile{\f!parentpath}{\readfilename}}% -% \def\next{\redoreadfile\readfilename{#2}{#3}}% -% \else -% \def\next{#3}% -% \fi -% \else -% \immediate\closein\scratchread -% \edef\readfilename{#1}% -% \iftracefiles\writestatus\m!systems{#1 located}\fi -% \def\next{#2\dodoreadfile}% -% \fi -% \next} - \def\redoreadfile#1#2#3% {\doiffileexistselse{#1}% {\edef\readfilename{#1}% @@ -365,11 +358,6 @@ \fi}% \next} -% \def\dodoreadfile % we provide hooks, for instance for \enableXML -% {\the\everybeforereadfile -% \normalinput\readfilename\relax -% \the\everyafterreadfile} - \def\dodoreadfile % we provide hooks, for instance for \enableXML {\ifconditional\trackfilenames \setxvalue{fn..\trackedfilename}{\readfilename}% @@ -378,12 +366,11 @@ \normalinput\readfilename\relax \the\everyafterreadfile} -\def\readfile% #1% +\unexpanded\def\readfile% #1% {\let\readlevel\maxreadlevel - %\doreadfile} % {#1} \doreadfile\empty} % {#1} -\def\ReadFile#1% +\unexpanded\def\ReadFile#1% {\readfile{#1}\donothing\donothing} %D \macros @@ -400,63 +387,53 @@ %D backtracks~\readlevel\ directories, including the current %D one. -\def\readjobfile#1% current path, no backtracking +\unexpanded\def\readjobfile % #1% current path, no backtracking {\newcounter\readlevel - %\doreadfile{\pathplusfile{\f!currentpath}{#1}}} - \doreadfile\f!currentpath{#1}} + \doreadfile\f!currentpath} % {#1}} -\def\readlocfile#1% current path, backtracking +\unexpanded\def\readlocfile % #1% current path, backtracking {\let\readlevel\maxreadlevel - %\doreadfile{\pathplusfile{\f!currentpath}{#1}}} - \doreadfile\f!currentpath{#1}} + \doreadfile\f!currentpath} % {#1}} %D System files can be anywhere and therefore %D \type{\readsysfile} is not bound to the current directory %D and obeys the \TEX\ implementation. -% \def\readsysfile#1% current path, obeys tex search -% {\let\readlevel\maxreadlevel -% %\doreadfile{#1}} -% \doreadfile\empty{#1}} - -\def\readsysfile#1% current path, obeys tex search +\unexpanded\def\readsysfile % #1% current path, obeys tex search {\newcounter\readlevel - %\doreadfile{#1}} - \doreadfile\empty{#1}} + \doreadfile\empty} % {#1}} %D Of the last two, \type{\readfixfile} searches on the %D directory specified and backtracks too, while %D \type{\readsetfile} does only search on the specified path. -\def\readfixfile#1#2% specified path, backtracking +\unexpanded\def\readfixfile % #1#2% specified path, backtracking {\let\readlevel\maxreadlevel - %\doreadfile{\pathplusfile{#1}{#2}}} - \doreadfile{#1}{#2}} + \doreadfile} % {#1}{#2}} -\def\readsetfile#1#2% specified path, no backtracking +\unexpanded\def\readsetfile % #1#2% specified path, no backtracking {\newcounter\readlevel - %\doreadfile{\pathplusfile{#1}{#2}}} - \doreadfile{#1}{#2}} + \doreadfile} % {#1}{#2}} %D After having defined this commands, we reconsidered the %D previously defined \type{\readfile}. This time we more or %D less impose the search order. -\def\readfile#1#2#3% +\unexpanded\def\readfile#1#2#3% {\readlocfile{#1}{#2} {\readjobfile{#1}{#2} {\readsysfile{#1}{#2}{#3}}}} %D So now we've got ourselves five file loading commands: %D -%D \starttypen +%D \starttyping %D \readfile {filename} {before loading} {not found} %D %D \readjobfile {filename} {before loading} {not found} %D \readlocfile {filename} {before loading} {not found} %D \readfixfile {filename} {before loading} {not found} %D \readsysfile {directory} {filename} {before loading} {not found} -%D \stoptypen +%D \stoptyping %D \macros %D {readjobfile,readlocfile,readsysfile,readfixfile} @@ -472,10 +449,10 @@ \ifcase\kindoffile \increment\readlevel \immediate\openin#1=\readfilename\relax - \ifeof#1\relax - \ifnum\readlevel>\maxreadlevel\relax + \ifeof#1% \relax + \ifnum\readlevel>\maxreadlevel % \relax \else - \immediate\closein#1\relax + \immediate\closein#1% \relax \doopenin{#1}{\pathplusfile\f!parentpath{#2}}% \fi \fi @@ -485,9 +462,9 @@ {\newcounter\readlevel \doopenin{#1}{\pathplusfile\f!currentpath{#2}}} -\def\opensysin#1#2% +\def\opensysin % #1#2% {\let\readlevel\maxreadlevel - \doopenin{#1}{#2}} + \doopenin} % {#1}{#2}} \def\openlocin#1#2% {\let\readlevel\maxreadlevel @@ -504,26 +481,16 @@ %D loading is done. This one obeys the standard \TEX\ %D implementation method. %D -%D \starttypen +%D \starttyping %D \doiffileelse {filename} {before loading} {not found} -%D \stoptypen +%D \stoptyping %D %D We use \type{\next} here, because we want to close the %D file first. We also provide the alternatives: %D -%D \starttypen +%D \starttyping %D \doiflocfileelse {filename} {before loading} {not found} -%D \stoptypen - -% \def\doiffileelse#1#2#3% -% {\immediate\openin\scratchread=#1\relax -% \ifeof\scratchread -% \def\next{#3}% -% \else -% \def\next{#2}% -% \fi -% \immediate\closein\scratchread -% \next} +%D \stoptyping \def\doiffileelse#1% {\doifelsenothing{#1} @@ -537,9 +504,6 @@ \expandafter\firstoftwoarguments \fi}} -% \def\doiflocfileelse#1% -% {\doiffileelse{\pathplusfile\f!currentpath{#1}}} - \def\doiflocfileelse#1% {\makelocreadfilename{#1}% \doiffileelse\readfilename} @@ -560,19 +524,19 @@ %D capacity is limited. One can prevent multiple execution and %D loading by using one of both: %D -%D \starttypen +%D \starttyping %D \doonlyonce{actions} %D \doinputonce{filename} %D \doendinputonce{filename} -%D \stoptypen +%D \stoptyping %D %D This command obeys the standard method for locating files. \long\def\doonlyonce#1#2% - {\doifundefined{@@@#1@@@}{\setgvalue{@@@#1@@@}{}#2}} + {\doifundefined{@@@#1@@@}{\letgvalue{@@@#1@@@}\empty#2}} \def\doinputonce#1% - {\doonlyonce{#1}{\doiffileelse{#1}{\normalinput #1\relax}{}}} + {\doonlyonce{#1}{\doiffileelse{#1}{\normalinput#1\relax}\donothing}} \def\doendinputonce#1% {\doifdefined{@@@#1@@@}\endinput} @@ -588,9 +552,9 @@ %D to characters with \CATCODE~12, while the characters in %D \type{filename} have \CATCODE~11. So we can better use: %D -%D \starttypen +%D \starttyping %D \doifparentfileelse{filename}{yes}{no} -%D \stoptypen +%D \stoptyping %D %D Since \TEXEXEC\ (and thereby \CONTEXT) supports renaming of %D the outputfile, we also need to check on that alternative @@ -703,5 +667,5 @@ %% \catcode`"=\@@other %% \catcode`<=\@@other %% \catcode`>=\@@other} - + \protect \endinput diff --git a/tex/context/base/supp-fun.tex b/tex/context/base/supp-fun.tex index 2da73e625..185860f73 100644 --- a/tex/context/base/supp-fun.tex +++ b/tex/context/base/supp-fun.tex @@ -38,7 +38,7 @@ %D Let's start %D \stopbuffer %D -%D \haalbuffer with dropped caps, those blown up first +%D \getbuffer with dropped caps, those blown up first %D characters of a paragraph. It's hard to implement a general %D mechanism that suits all situations, but dropped caps are so %D seldomly used that we can permit ourselves a rather user @@ -63,7 +63,7 @@ %D This simple %D \stopbuffer %D -%D \haalbuffer case shows us what happens when we apply minimal +%D \getbuffer case shows us what happens when we apply minimal %D values. Here we used: %D %D \typebuffer @@ -75,7 +75,7 @@ %D Is this ugly %D \stopbuffer %D -%D \haalbuffer example the third argument tells +%D \getbuffer example the third argument tells %D this macro that we want a dropped capital scaled to the %D baseline distance. The two zero point arguments are the %D horizontal and vertical offsets and the last arguments @@ -106,7 +106,7 @@ %D %D \typebuffer %D -%D \haalbuffer of the general macro is rather simple and only +%D \getbuffer of the general macro is rather simple and only %D depends on the arguments given and the dimensions of the %D strut box. We explicitly load the font, which is no problem %D because \TEX\ does not load a font twice. We could have @@ -253,11 +253,11 @@ %D Before we go to the next topic, we summarize this command: %D -%D \starttypen +%D \starttyping %D \DroppedCaps %D {command} {font} %D {height} {hoffset} {voffset} {lines} -%D \stoptypen +%D \stoptyping %D %D Sometimes you need to make sure that the global settings are %D kept local, as in: @@ -267,9 +267,9 @@ % %D \setupparagraphs [SomePar][1][width=.5\textwidth] % %D \setupparagraphs [SomePar][2][width=.5\textwidth] %D \startbuffer -%D \definieeralineas[SomePar][n=2,rule=on] -%D \stelalineasin [SomePar][1][width=.5\textwidth] -%D \stelalineasin [SomePar][2][width=.5\textwidth] +%D \defineparagraphs[SomePar][n=2,rule=on] +%D \setupparagraphs [SomePar][1][width=.5\textwidth] +%D \setupparagraphs [SomePar][2][width=.5\textwidth] %D %D \startSomePar %D \localdropcaps\NiceDroppedCaps{}{cmr12}{0pt}{2}Here we need @@ -349,10 +349,10 @@ %D %D To save definitions, we also provide: %D -%D \starttypen +%D \starttyping %D \LineDroppedCaps {command} {font} {hoffset} {lines} %D \NiceDroppedCaps {command} {font} {hoffset} {lines} -%D \stoptypen +%D \stoptyping %D %D The first command scales the font to the exact height, while %D the second command scales the font to a nice 2.5 times the @@ -383,7 +383,7 @@ %D saying: %D \stopbuffer %D -%D \haalbuffer +%D \getbuffer %D %D \typebuffer %D @@ -395,7 +395,7 @@ %D respect. %D \stopbuffer %D -%D \haalbuffer +%D \getbuffer %D %D \typebuffer %D @@ -433,7 +433,7 @@ \egroup \else \setbox0\box2 - \@EAEAES\grabfirstline + \@EAEAEA\grabfirstline \fi\fi}% \grabfirstline} @@ -450,7 +450,7 @@ %D effects on the individual words. Of course one needs ... %D \stopbuffer %D -%D \haalbuffer +%D \getbuffer %D to know a bit more about the macro package used to get real %D nice effects, but this example probably demonstrates the %D principles well. @@ -460,10 +460,10 @@ %D Like in dropped caps case, one can hide such treatments in a %D macro, like: %D -%D \starttypen +%D \starttyping %D \def\MyTreatFirstLine% %D {\TreatFirstLine{\bf}{}{\FunnyCommand}{\FunnyCommand}} -%D \stoptypen +%D \stoptyping %D \macros %D {reshapebox} @@ -481,7 +481,7 @@ %D \reshapebox{\FunnyCommand{\box\shapebox}} \flushshapebox %D \stopbuffer %D -%D \haalbuffer +%D \getbuffer %D %D \typebuffer %D @@ -496,7 +496,7 @@ %D \TreatFirstCharacter{\bf\color[green]} Just to be %D \stopbuffer %D -%D \haalbuffer complete we also offer a very simple one +%D \getbuffer complete we also offer a very simple one %D character alternative, that is not that hard to understand: \def\TreatFirstCharacter#1#2% command, character @@ -526,7 +526,7 @@ %D %D Such a stack looks like: %D -%D \startregelcorrectie +%D \startlinecorrection %D \hbox to \hsize %D {$\hss\bfd %D \vcenter{\StackCharacters{TEX} {}{\vskip.2ex}{\FunnyCommand}}% @@ -537,7 +537,7 @@ %D \hss %D \vcenter{\StackCharacters{CONTEXT}{}{\vskip.2ex}{\FunnyCommand}} %D \hss$} -%D \stopregelcorrectie +%D \stoplinecorrection %D %D and is typeset by saying: %D @@ -545,9 +545,9 @@ %D %D An alternative would have been %D -%D \starttypen +%D \starttyping %D \StackCharacters {CONTEXT} {to 5cm} {\vfill} {\FunnyCommand} -%D \stoptypen +%D \stoptyping %D \macros %D {processtokens} @@ -555,9 +555,9 @@ %D At a lower level horizontal and vertical manipulations are %D already supported by: %D -%D \starttypen +%D \starttyping %D \processtokens {begin} {between} {end} {space} {text} -%D \stoptypen +%D \stoptyping %D %D \startbuffer[a] %D \processtokens @@ -575,9 +575,9 @@ %D %D \leavevmode\hbox to \hsize %D {$\hfil\hfil -%D \vcenter{\bf\haalbuffer[a]}% +%D \vcenter{\bf\getbuffer[a]}% %D \hfil -%D \vcenter{\bfd\haalbuffer[b]}% +%D \vcenter{\bfd\getbuffer[b]}% %D \hfil\hfil$} %D %D which was specified as: @@ -595,10 +595,10 @@ %D word spacing. In such situations the next few macros can be %D of help: %D -%D \starttypen +%D \starttyping %D \NormalizeFontHeight \name {sample text} {height} {font} %D \NormalizeFontWidth \name {sample text} {width} {font} -%D \stoptypen +%D \stoptyping %D %D These are implemented using an auxilliary macro: @@ -667,7 +667,7 @@ %D %D This shows up as (we also show the baselines): %D -%D {\showbaselines\haalbuffer} +%D {\showbaselines\getbuffer} %D %D The horizontal counterpart is: %D @@ -682,24 +682,24 @@ %D The calculated font scale is avaliable in the macro %D \type{\NormalizedFontSize}. %D -%D \startregelcorrectie -%D \ruledhbox{\haalbuffer} -%D \stopregelcorrectie +%D \startlinecorrection +%D \ruledhbox{\getbuffer} +%D \stoplinecorrection %D %D One can of course combine these macros with the ones %D described earlier, like in: %D -%D \starttypen +%D \starttyping %D \NormalizeFontHeight {text} \DroppedFont {2\baselineskip} {cmbx12} %D %D \def\NicelyDroppedCaps %D {\DroppedCaps -%D {\kleur[groen]} +%D {\color[green]} %D {\DroppedFont} %D {2pt} %D {\baselineskip} %D {2}} -%D \stoptypen +%D \stoptyping %D %D It's up to the reader to test this one. @@ -741,14 +741,14 @@ {\bgroup \forgetall \dontcomplain - \setuptolerance[\v!zeersoepel]% == \tolerance4500 + \setuptolerance[\v!verytolerant]% == \tolerance4500 \hsize#1% \def\\{\softbreak}% \!!heighta#4% \!!heightb#2% \doloop {\ifdim\!!heighta>\onepoint - \expanded{\definefont[\s!dummy][#3 at \the\!!heighta][\c!interlinie=#6]}% + \expanded{\definefont[\s!dummy][#3 at \the\!!heighta][\c!interlinespace=#6]}% \getvalue\s!dummy \setbox\scratchbox\vbox{#7\endgraf}% \ifdim\ht\scratchbox>\!!heightb @@ -800,7 +800,6 @@ \fi} \def\SpreadGapText#1#2% -% {{\def\+{\blackrule[\c!breedte=#1]}#2}} {{\def\+{\kern#1}#2}} \def\GapText#1#2#3#4#5% width distance font spec title diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex index 31fe2f23f..e49eac5c8 100644 --- a/tex/context/base/supp-lan.tex +++ b/tex/context/base/supp-lan.tex @@ -18,13 +18,13 @@ %D some memory. %D \gdef\starttest -%D {\blanko +%D {\blank %D \noindent %D \halign\bgroup\tt##\hskip2em&##\hskip2em&##\cr} %D %D \gdef\stoptest %D {\egroup -%D \blanko} +%D \blank} %D %D \gdef\test#1% %D {\convertargument#1\to\ascii\ascii&\hyphenatedword{#1}\cr} @@ -101,7 +101,7 @@ %D The next special case (concerning quotes) was brought to my %D attention by Piet Tutelaers, one of the driving forces %D behind rebuilding hyphenation patterns for the dutch -%D language.\voetnoot{In 1996 the spelling of the dutch +%D language.\footnote{In 1996 the spelling of the dutch %D language has been slightly reformed which made this topic %D actual again.} We'll also take care of this case. %D @@ -136,9 +136,9 @@ %D characters as delimiters. The prefered way of specifying %D compound words is using \type{||}, which is installed by: %D -%D \starttypen +%D \starttyping %D \installdiscretionaries || - -%D \stoptypen +%D \stoptyping %D %D Some alternative definitions are: %D @@ -154,7 +154,7 @@ %D after which we can say: %D %D \bgroup -%D \haalbuffer +%D \getbuffer %D \starttest %D \test {test**test**test} %D \test {test++test++test} @@ -191,13 +191,13 @@ %D supports \type{|} as command and delimiter. Before %D activating \type{|} we save it's value: %D -%D \starttypen +%D \starttyping %D \edef\domathmodediscretionary{\string|} -%D \stoptypen +%D \stoptyping %D %D after which we're ready to define it's meaning to: %D -%D \starttypen +%D \starttyping %D \catcode`\|=\@@active %D %D \unexpanded\def|% @@ -206,7 +206,7 @@ %D \else %D \expandafter\dotextmodediscretionary %D \fi} -%D \stoptypen +%D \stoptyping %D %D We need a two stage \type{\futurelet} because we want to %D look ahead for both the compound character definition and @@ -217,7 +217,7 @@ %D also save the character following the \type{|#1|} in %D \type{\nextnext}. %D -%D \starttypen +%D \starttyping %D \def\dotextmodediscretionary% %D {\bgroup %D \futurelet\next\dodotextmodediscretionary} @@ -225,13 +225,13 @@ %D \def\dodotextmodediscretionary#1|% %D {\def\betweendiscretionaries{#1}% %D \futurelet\nextnext\dododotextmodediscretionary} -%D \stoptypen +%D \stoptyping %D %D The main macro consists of quite some \type{\ifx} tests %D while \type{\checkafterdiscretionary} handles the commas. %D We show the simplified version here: %D -%D \starttypen +%D \starttyping %D \def\dododotextmodediscretionary% %D {\let\nextnextnext=\egroup %D \ifx |\next @@ -259,7 +259,7 @@ %D \else %D \let\nextnext=\relax %D \fi} -%D \stoptypen +%D \stoptyping %D %D Handling \type{(} and \type{)} is a a bit special, because %D \TEX\ sees them as decent hyphenation points, according to @@ -270,16 +270,16 @@ %D The most recent implementation is more advanced. As %D demonstrated we can install delimiters, like: %D -%D \starttypen +%D \starttyping %D \installdiscretionaries || \compoundhyphen -%D \stoptypen +%D \stoptyping %D %D This time we have to use a bit more clever way of saving the %D math mode specification of the character we're going to %D make active. We also save the user supplied compound hyphen. %D We show the a bit more traditional implementation first. %D -%D \starttypen +%D \starttyping %D \def\installdiscretionaries#1% %D {\catcode`#1\@@other %D \expandafter\doinstalldiscretionaries\string#1} @@ -292,7 +292,7 @@ %D \def\dodoinstalldiscretionaries#1#2% %D {\setvalue{textmodediscretionary\string#1}{#2}% %D \unexpanded\def#1{\discretionarycommand#1}} -%D \stoptypen +%D \stoptyping %D %D A bit more \CATCODE\ and character trickery enables us to %D discard the two intermediate steps. This trick originates @@ -345,11 +345,11 @@ %D not expanded. Thanks to Tobias Burnus for providing this %D example. %D -%D \startformule +%D \startformula %D \left|f(x_n)-{1\over2}\right| = %D {\cases{|{1\over2}-x_n| &for $0\le x_n < {1\over2}$\cr %D |x_n-{1\over2}| &for ${1\over2}=\@@active \def>{hello there} %D \catcode`(=\@@active \def({hello there} %D \catcode`)=\@@active \def){hello there} -%D \stoptypen +%D \stoptyping %D %D In normal day||to||day production of texts this kind of -%D activation is seldom used.\voetnoot{In the \CONTEXT\ manual +%D activation is seldom used.\footnote{In the \CONTEXT\ manual %D the \type{<} and \type{>} are made active and used for some %D cross||reference trickery.} If so, we have to take care of %D the math mode explicitly, just like we did when making @@ -899,28 +915,28 @@ %D versatile as possible. As a result one can define his own %D compound character support, like: %D -%D \starttypen +%D \starttyping %D \installcompoundcharacter "a {\"a} %D \installcompoundcharacter "e {\"e} %D \installcompoundcharacter "i {\"i} %D \installcompoundcharacter "u {\"u} %D \installcompoundcharacter "o {\"o} %D \installcompoundcharacter "s {\SS} -%D \stoptypen +%D \stoptyping %D %D or even %D -%D \starttypen +%D \starttyping %D \installcompoundcharacter "ck {\discretionary {k-}{k}{ck}} %D \installcompoundcharacter "ff {\discretionary{ff-}{f}{ff}} -%D \stoptypen +%D \stoptyping %D %D The support is not limited to alphabetic characters, so the %D next definition is also valid. %D -%D \starttypen +%D \starttyping %D \installcompoundcharacter ". {.\doifnextcharelse{\spacetoken}{}{\kern.125em}} -%D \stoptypen +%D \stoptyping %D %D The implementation looks familiar and uses the same tricks as %D mentioned earlier in this module. We take care of two @@ -971,9 +987,9 @@ %D A compound character can be reset with the following %D command. %D -%D \starttypen +%D \starttyping %D \restorecompoundcharacter / -%D \stoptypen +%D \stoptyping \def\restorecompoundcharacter#1% new {\catcode`#1=\csname\@nn@\string#1\endcsname\relax} @@ -1067,9 +1083,9 @@ %D defined. We either execute the compound character or just %D insert the first. So we have %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping %D %D In later modules we will see how these commands are used. @@ -1348,10 +1364,10 @@ %D This would be better, but it spoils \type {\~} and so: %D -%D \starttypen +%D \starttyping %D \convertargument#1\to\ascii %D \expandafter\handletokens\ascii\with\scanurl -%D \stoptypen +%D \stoptyping % \def\scanurl#1% % {\ifx#1\~% @@ -1475,7 +1491,7 @@ %D to handle url's passed as argument, the following solutions %D came to my mind: %D -%D \starttypen +%D \starttyping %D \def\whateverurl#1% %D {{\def~{\string~}\useURL[dummy][#1]\goto{\url[dummy]}[URL(dummy)]}} %D @@ -1485,16 +1501,16 @@ %D \def\whateverurl#1% %D {\convertargument#1\to\ascii %D \expanded{\useURL[dummy][\ascii]}\goto{\url[dummy]}[URL(dummy)]} -%D \stoptypen +%D \stoptyping %D \macros %D {hyphenatedfile} %D %D For the moment we treat filenames in a similar way, %D -%D \starttypen +%D \starttyping %D \hyphenatedfile{here/there/filename.suffix} -%D \stoptypen +%D \stoptyping \let\hyphenatedfile\hyphenatedurl diff --git a/tex/context/base/supp-mat.tex b/tex/context/base/supp-mat.tex index 66357407c..15ae7fdd8 100644 --- a/tex/context/base/supp-mat.tex +++ b/tex/context/base/supp-mat.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 For practical reasons, I decided to move some math things to -%D a support module. There is nothing spectacular here. +%D For practical reasons, I decided to move some math things to +%D a support module. There is nothing spectacular here. \writestatus{loading}{Context Support Macros / Math} @@ -20,33 +20,32 @@ %D \macros %D {mathematics, math, nomathematics, startmathmode} -%D +%D %D The \type{$} can be both an begin and end math character. %D This can lead to confusing and errorprone situations when -%D macros insert \type{$}. When for instance we have defined: -%D -%D \starttypen +%D macros insert \type{$}. When for instance we have defined: +%D +%D \starttyping %D \def\MyPlus{$\,+\,$} -%D \stoptypen -%D +%D \stoptyping +%D %D the sequence \type{$x^2 \MyPlus y^2 = r^2$} will expand to: -%D -%D \starttypen +%D +%D \starttyping %D $x^2 $\,+\,$ y^2 = r^2$ -%D \stoptypen -%D +%D \stoptyping +%D %D Here the \type{\,} are given outside math mode and \TEX\ will -%D definitely complain about this. A more save definition would -%D have been: -%D -%D \starttypen +%D definitely complain about this. A more save definition would +%D have been: +%D +%D \starttyping %D \def\MyPlus{\mathematics{\,+\,}} -%D \stoptypen -%D +%D \stoptyping +%D %D Which is implemented as: -\def\mathematics#1% - {\ifmmode#1\else$#1$\fi} +\def\mathematics#1{\relax\ifmmode#1\else$#1$\fi} % lookahead bug reported by brooks \def\startmathmode {\ifmmode @@ -64,11 +63,11 @@ %D {dimension, nodimension} %D %D The next few macros are used for typesetting dimensions in -%D such a way that spacing is acceptable. I won't spend much -%D words on these macros, because they will be overloaded in +%D such a way that spacing is acceptable. I won't spend much +%D words on these macros, because they will be overloaded in %D the units module. -\newsignal\dimensionsignal +\newsignal\dimensionsignal \def\dimensiontypeface {\tf} \def\dimensionhalfspace {\,} @@ -98,13 +97,13 @@ %D \macros %D {super, suber} %D -%D \TEX\ uses \type{^} and \type{_} for entering super- and -%D subscript mode. We want however a bit more control than -%D normally provided, and therefore provide \type {\super} -%D and \type{\suber} (\type {\sub} is already taken). +%D \TEX\ uses \type{^} and \type{_} for entering super- and +%D subscript mode. We want however a bit more control than +%D normally provided, and therefore provide \type {\super} +%D and \type{\suber} (\type {\sub} is already taken). -\global\let\normalsuper=^ -\global\let\normalsuber=_ +\global\let\normalsuper=^ +\global\let\normalsuber=_ \newcount\supersubmode @@ -114,10 +113,10 @@ % \def\dodosuper#1{\normalsuper{\the\everysupersub#1}} % \def\dodosuber#1{\normalsuber{\the\everysupersub#1}} -% +% % \def\dosuper{\ifx\next\bgroup\expandafter\dodosuper\else\normalsuper\fi} % \def\dosuber{\ifx\next\bgroup\expandafter\dodosuber\else\normalsuber\fi} -% +% % \def\super{\futurelet\next\dosuper} % \def\suber{\futurelet\next\dosuber} @@ -126,9 +125,9 @@ %D \macros %D {enablesupsub} -%D -%D We can let \type {^} and \type {_} act like \type {\super} -%D and \type {\suber} by saying \type {\enablesupsub}. +%D +%D We can let \type {^} and \type {_} act like \type {\super} +%D and \type {\suber} by saying \type {\enablesupsub}. \bgroup \catcode`\^=\@@active @@ -140,10 +139,10 @@ \def_{\ifmmode\expandafter\suber\else\expandafter\normalsuber\fi}} \egroup -%D \macro +%D \macros %D {restoremathstyle} %D -%D We can pick up the current math style by calling \type +%D We can pick up the current math style by calling \type %D {\restoremathstyle}. \def\restoremathstyle diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex index 8c3eec0c8..c568dda14 100644 --- a/tex/context/base/supp-mis.tex +++ b/tex/context/base/supp-mis.tex @@ -179,16 +179,21 @@ \ifnocontextobject \zeropoint \do \newdimen \zeropoint \fi % else problems with dimen12 \ifnocontextobject \onepoint \do \newdimen \onepoint \fi +\ifnocontextobject \onebasepoint \do \newdimen \onebasepoint \fi \ifnocontextobject \zerocount \do \chardef \zerocount =0 \fi \ifnocontextobject \plusone \do \chardef \plusone =1 \fi \ifnocontextobject \minusone \do \newcount \minusone \fi \ifnocontextobject \thousandpoint \do \newdimen \thousandpoint \fi -\thousandpoint=1000pt -\zeropoint = 0pt -\onepoint = 1pt -\minusone = -1 +\ifnocontextobject \onerealpoint \do \newdimen \onerealpoint \fi % latex has a funny \onepoint + +\thousandpoint = 1000pt +\zeropoint = 0pt +\onepoint = 1pt +\onebasepoint = 1bp +\minusone = -1 +\onerealpoint = 1pt \ifnocontextobject \emptytoks \do \newtoks \emptytoks \fi @@ -630,9 +635,9 @@ %D The following macro is the simplified version, but good %D enough for day to day hacks. %D -%D \starttypen +%D \starttyping %D \dohandletokens some text\with\somemacro -%D \stoptypen +%D \stoptyping \ifnocontextobject \dohandletokens \do @@ -691,4 +696,4 @@ %D That's it. Please forget this junk and take a look at how %D it should be done. -\StopLatexHack \protect \endinput \ No newline at end of file +\StopLatexHack \protect \endinput diff --git a/tex/context/base/supp-mpe.tex b/tex/context/base/supp-mpe.tex index 0285b9e82..e92191cb5 100644 --- a/tex/context/base/supp-mpe.tex +++ b/tex/context/base/supp-mpe.tex @@ -40,24 +40,24 @@ %D specification of the speciality can have two forms, %D determined by the setting of a boolean variable: %D -%D \starttypen +%D \starttyping %D _inline_specials_ := false ; % comment like code (default) %D _inline_specials_ := true ; % command like code -%D \stoptypen +%D \stoptyping %D %D When the specification is embedded as comment, it looks %D like: %D -%D \starttypen +%D \starttyping %D %%MetaPostSpecial -%D \stoptypen +%D \stoptyping %D %D The in||line alternative is more tuned for \POSTSCRIPT, %D since it permits us to define a macro \type {special}. %D -%D \starttypen +%D \starttyping %D inline : special -%D \stoptypen +%D \stoptyping %D %D The \type {identifier} determines what to do, and the data %D can be used to accomplish this. A type~2 shading function @@ -68,15 +68,15 @@ %D data: %D -%D \starttypen +%D \starttyping %D from to n inner_r g b x y outer_r g b x y %D from to n inner_r g b x y radius outer_r g b x y radius -%D \stoptypen +%D \stoptyping %D %D The implementation below saves the data on the stack in %D a way similar to the macros in \type {supp-pdf.tex}, and %D just overload a few already defined handlers. That way, -%D the existing macros are still generic. \voetnoot {Actually, +%D the existing macros are still generic. \footnote {Actually, %D the macros here are just as generic.} %D %D Currently the only extension concerns shading, which is @@ -216,8 +216,11 @@ \def\normalhandleMPgraycolor {{\checkPDFMPstrokecolor\execcolorS\gMPa1:0:0\od}} - \def\normalhandleMPspotcolor - {{\checkPDFMPstrokecolor\execcolorP\gMPa1:\gMPa2:0:0\od}} +% \def\normalhandleMPspotcolor +% {{\checkPDFMPstrokecolor\execcolorP\gMPa1:\gMPa2:0:0\od}} + + \def\normalhandleMPspotcolor % ??? + {{\checkPDFMPstrokecolor\execcolorP\gMPa1:\gMPa2:\gMPa3:\gMPa4:0:0\od}} \fi @@ -247,7 +250,7 @@ %D The naive case looks like: %D -%D \starttypen +%D \starttyping %D \def\handleMPrgbcolor% %D {\setMPcolor %D \ifcase\MPspecialversion @@ -257,7 +260,7 @@ %D \else %D \resetMPcolor\normalhandleMPrgbcolor %D \fi\fi} -%D \stoptypen +%D \stoptyping %D %D However, since we want \CMYK\ support, we will use the %D following implementation: @@ -267,7 +270,7 @@ % \edef\lastMPgvalue{\gMPa2}% % \edef\lastMPbvalue{\gMPa3}} % -% speed up: +% speed up (hardly called, so no let is needed) \def\setMPcolor {\edef\lastMPrvalue{\csname\@@MP01\endcsname}% @@ -308,6 +311,8 @@ % \writestatus{MPtoPDF}{unknown direct special}% \fi} +% ifcsname + \def\dointerceptMPcmykcolor {\revokeMPtransparencyspecial \@EA\ifx\csname\@@MPSK\number\MPrgbnumber\lastMPbvalue\endcsname\relax\else @@ -425,7 +430,7 @@ %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D These graphics can be hooked into the overlay mechanism, %D which is available in many commands. @@ -438,25 +443,25 @@ %D %D \typebuffer %D -%D \haalbuffer +%D \getbuffer %D %D These backgrounds can for instance be applied to \type %D {\framed}: %D %D \startbuffer -%D \setupframed[breedte=3cm,hoogte=2cm,kader=uit] -%D \startcombinatie[3*1] -%D {\framed[achtergrond=demo 1]{\bfd \white Demo 1}} {} -%D {\framed[achtergrond=demo 2]{\bfd \white Demo 2}} {} -%D {\framed[achtergrond=demo 3]{\bfd \white Demo 3}} {} -%D \stopcombinatie +%D \setupframed[width=3cm,height=2cm,frame=off] +%D \startcombination[3*1] +%D {\framed[backgroundachtergrond=demo 1]{\bfd \white Demo 1}} {} +%D {\framed[backgroundachtergrond=demo 2]{\bfd \white Demo 2}} {} +%D {\framed[backgroundachtergrond=demo 3]{\bfd \white Demo 3}} {} +%D \stopcombination %D \stopbuffer %D %D \typebuffer %D -%D \startregelcorrectie -%D \haalbuffer -%D \stopregelcorrectie +%D \startlinecorrection +%D \getbuffer +%D \stoplinecorrection %D %D There are a few more alternatives, determined by the second %D parameter passed to \type {circular_shade} and alike. @@ -469,40 +474,40 @@ %D #2_shade(p,#3,#4,#5) ; %D \stopuniqueMPgraphic %D \defineoverlay[Shade-#1][\uniqueMPgraphic{Shade-#1}]% -%D \framed[achtergrond=Shade-#1,breedte=2cm,hoogte=2cm,kader=uit]{}} +%D \framed[backgroundachtergrond=Shade-#1,width=2cm,height=2cm,frame=off]{}} %D -%D \startregelcorrectie -%D \startcombinatie[5*1] +%D \startlinecorrection +%D \startcombination[5*1] %D {\SomeShade{10}{circular}{0}{.3blue}{.9blue}} {circular 0} %D {\SomeShade{11}{circular}{1}{.3blue}{.9blue}} {circular 1} %D {\SomeShade{12}{circular}{2}{.3blue}{.9blue}} {circular 2} %D {\SomeShade{13}{circular}{3}{.3blue}{.9blue}} {circular 3} %D {\SomeShade{14}{circular}{4}{.3blue}{.9blue}} {circular 4} -%D \stopcombinatie -%D \stopregelcorrectie +%D \stopcombination +%D \stoplinecorrection %D -%D \blanko +%D \blank %D -%D \startregelcorrectie -%D \startcombinatie[5*1] +%D \startlinecorrection +%D \startcombination[5*1] %D {\SomeShade{20}{circular}{0}{.9green}{.3green}} {circular 0} %D {\SomeShade{21}{circular}{1}{.9green}{.3green}} {circular 1} %D {\SomeShade{22}{circular}{2}{.9green}{.3green}} {circular 2} %D {\SomeShade{23}{circular}{3}{.9green}{.3green}} {circular 3} %D {\SomeShade{24}{circular}{4}{.9green}{.3green}} {circular 4} -%D \stopcombinatie -%D \stopregelcorrectie +%D \stopcombination +%D \stoplinecorrection %D -%D \blanko +%D \blank %D -%D \startregelcorrectie -%D \startcombinatie[4*1] +%D \startlinecorrection +%D \startcombination[4*1] %D {\SomeShade{30}{linear}{0}{.3red}{.9red}} {linear 0} %D {\SomeShade{31}{linear}{1}{.3red}{.9red}} {linear 1} %D {\SomeShade{32}{linear}{2}{.3red}{.9red}} {linear 2} %D {\SomeShade{33}{linear}{3}{.3red}{.9red}} {linear 3} -%D \stopcombinatie -%D \stopregelcorrectie +%D \stopcombination +%D \stoplinecorrection %D %D These macros closely cooperate with the \METAPOST\ module %D \type {mp-spec.mp}, which is part of the \CONTEXT\ @@ -514,12 +519,12 @@ %D earlier. In \PDF\ type~2 and~3 shading functions are %D specified in terms of: %D -%D \starttabulatie[|Tl|l|] +%D \starttabulate[|Tl|l|] %D \NC /Domain \NC sort of meeting range \NC \NR %D \NC /C0 \NC inner shade \NC \NR %D \NC /C1 \NC outer shade \NC \NR %D \NC /N \NC smaller values, bigger inner circles \NC \NR -%D \stoptabulatie +%D \stoptabulate \newcount\currentPDFshade % 0 % global (document wide) counter \let\currentMPshades\empty @@ -546,13 +551,14 @@ \to \MPstopresources \def\invokeMPshadespecial - {\doifdefined{mps:Sh:\currentMPspecial} - {\edef\currentMPshade{\getvalue{obj:Sh:\currentMPspecial}}% - \doifinstringelse\currentMPshade\currentMPshades \donothing - {\xdef\currentMPshades{\currentMPshades\currentMPshade}}% - \def\extraMPpathcode{/Sh\getvalue{mps:Sh:\currentMPspecial} sh Q}% - \chardef\finiMPpath\zerocount - \PDFcode{q /Pattern cs}}} + {\ifundefined{mps:Sh:\currentMPspecial}\else + \edef\currentMPshade{\getvalue{obj:Sh:\currentMPspecial}}% + \doifinstringelse\currentMPshade\currentMPshades \donothing + {\xdef\currentMPshades{\currentMPshades\currentMPshade}}% + \def\extraMPpathcode{/Sh\getvalue{mps:Sh:\currentMPspecial} sh Q}% + \chardef\finiMPpath\zerocount + \PDFcode{q /Pattern cs}% + \fi} \appendtoks \invokeMPshadespecial \to \invokeMPspecials @@ -594,17 +600,17 @@ \fi \or % 3 = rgb transparency - % to do + % to do \or % 4 == cmyk transparency - % \ifMPcmykcolors - % to do - % \fi + % \ifMPcmykcolors + % to do + % \fi \or % 5 == spot transparency - % \ifMPspotcolors - % to do - % \fi + % \ifMPspotcolors + % to do + % \fi \fi \else \ifx\tempMPrvalue\tempMPgvalue @@ -732,12 +738,12 @@ {\ifcase\pdfoutput\or % will be hooked into the special driver \doiffileelse{#7} {\doifundefinedelse{mps:x:#7} - {\immediate\pdfximage\!!width1\s!bp\!!height1\s!bp{#7}% + {\immediate\pdfximage\!!width\onebasepoint\!!height\onebasepoint{#7}% \setxvalue{mps:x:#7}{\pdfrefximage\the\pdflastximage}}% {\message{[reusing figure #7]}}% - \pdfliteral{q #1 #2 #3 #4 #5 #6 cm}% + \PDFcode{q #1 #2 #3 #4 #5 #6 cm}% \rlap{\getvalue{mps:x:#7}}% - \pdfliteral{Q}} + \PDFcode{Q}} {\message{[unknown figure #7]}}% \fi \hss}}} @@ -745,7 +751,7 @@ %D An example of using both special features is the %D following. %D -%D \starttypen +%D \starttyping %D \startMPpage %D externalfigure "hakker1b.png" scaled 22cm rotated 10 shifted (-2cm,0cm); %D externalfigure "hakker1b.png" scaled 10cm rotated -10 ; @@ -758,7 +764,7 @@ %D circular_shade(s,0,.2red,.9red) ; %D addto currentpicture also c ; %D \stopMPpage -%D \stoptypen +%D \stoptyping %D This is some experimental hyperlink driver that I wrote %D for Mark Wicks. @@ -773,18 +779,18 @@ {%\ifcase\pdfoutput\or \setbox\scratchbox\hbox {\setbox\scratchbox\null - \scratchdimen#1\s!bp\scratchdimen-\scratchdimen - \advance\scratchdimen#3\s!bp + \scratchdimen#1\onebasepoint\scratchdimen-\scratchdimen + \advance\scratchdimen#3\onebasepoint \wd\scratchbox\scratchdimen - \scratchdimen#2bp\scratchdimen-\scratchdimen - \advance\scratchdimen#4\s!bp + \scratchdimen#2\onebasepoint\scratchdimen-\scratchdimen + \advance\scratchdimen#4\onebasepoint \ht\scratchbox\scratchdimen \incolorfalse \gotobox{\box\scratchbox}[#5]}% \setbox\scratchbox\hbox - {\scratchdimen\MPxoffset\s!bp\advance\scratchdimen#1\s!bp + {\scratchdimen\MPxoffset\onebasepoint\advance\scratchdimen#1\onebasepoint \hskip\scratchdimen - \scratchdimen\MPyoffset\s!bp\advance\scratchdimen#2\s!bp + \scratchdimen\MPyoffset\onebasepoint\advance\scratchdimen#2\onebasepoint \raise\scratchdimen\box\scratchbox}% \smashbox\scratchbox \box\scratchbox @@ -803,29 +809,29 @@ %D \stopbuffer %D %D \startbuffer[cmyk] -%D \startcombinatie[4*1] +%D \startcombination[4*1] %D {\definecolor[test][c=1,y=.3,k=.3] \processMPbuffer[mp]} {c=1 y=.3 k=.3} %D {\definecolor[test][c=.9,y=.15] \processMPbuffer[mp]} {c=.9 y=.15} %D {\definecolor[test][c=.25,y=.8] \processMPbuffer[mp]} {c=.25 y=.8} %D {\definecolor[test][c=.45,y=.1] \processMPbuffer[mp]} {c=.45 y=.1} -%D \stopcombinatie +%D \stopcombination %D \stopbuffer %D -%D \plaatsfiguur +%D \placefigure %D {\CMYK\ support disabled, %D conversion to \RGB.} -%D {\setupcolors[cmyk=nee,status=start]\haalbuffer[cmyk]} +%D {\setupcolors[cmyk=nee,state=start]\getbuffer[cmyk]} %D -%D \plaatsfiguur +%D \placefigure %D {\CMYK\ support enabled, %D no support in \METAPOST.} -%D {\setupcolors[cmyk=ja,mpcmyk=nee,status=start]\haalbuffer[cmyk]} +%D {\setupcolors[cmyk=ja,mpcmyk=nee,state=start]\getbuffer[cmyk]} %D -%D \plaatsfiguur +%D \placefigure %D {\CMYK\ support enabled, %D no conversion to \RGB, %D support in \METAPOST} -%D {\setupcolors[cmyk=ja,status=start]\haalbuffer[cmyk]} +%D {\setupcolors[cmyk=ja,state=start]\getbuffer[cmyk]} \defineMPspecial{1} {\ifMPcmykcolors @@ -843,19 +849,38 @@ % \setxvalue{\@@MPSP\gMPs1}{\gMPs2 \gMPs3 }% % \fi} +% \defineMPspecial{2} +% {\ifMPspotcolors +% \setxvalue{\@@MPSP\gMPs1}{\gMPs2 \gMPs3 }% +% \checkMPspot{\gMPs2}{\gMPs3}% +% \fi} +% +% \def\setMPspot#1 #2 % +% {\setvalue{\@@MP01}{#1}% +% \setvalue{\@@MP02}{#2}} +% +% \def\checkMPspot#1#2% +% {\expanded{\resolveMPspotcolor#1 #2}\end +% \ifx\MPspotspace\MPresolvedspace +% \edef\MPspotspacespec{/\MPspotspace\space}% +% \doifinstringelse\MPspotspacespec\currentMPcolorspaces +% \donothing\registerMPcolorspace +% \fi} \defineMPspecial{2} {\ifMPspotcolors - \setxvalue{\@@MPSP\gMPs1}{\gMPs2 \gMPs3 }% - \checkMPspot{\gMPs2}{\gMPs3}% + \setxvalue{\@@MPSP\gMPs1}{\gMPs2 \gMPs3 \gMPs4 \gMPs5 }% space is essential + \checkMPspot{\gMPs2}{\gMPs3}{\gMPs4}{\gMPs5}% \fi} -\def\setMPspot#1 #2 % +\def\setMPspot#1 #2 #3 #4 % {\setvalue{\@@MP01}{#1}% - \setvalue{\@@MP02}{#2}} + \setvalue{\@@MP02}{#2}% + \setvalue{\@@MP03}{#3}% + \setvalue{\@@MP04}{#4}} -\def\checkMPspot#1#2% - {\expanded{\resolveMPspotcolor#1 #2}\end +\def\checkMPspot#1#2#3#4% + {\expanded{\resolveMPspotcolor#1 #2 #3 #4}\end \ifx\MPspotspace\MPresolvedspace \edef\MPspotspacespec{/\MPspotspace\space}% \doifinstringelse\MPspotspacespec\currentMPcolorspaces @@ -895,16 +920,16 @@ %D imagine situations where tex has to work with values %D calculated by \METAPOST. %D -%D \startregelcorrectie +%D \startlinecorrection %D \getbuffer -%D \stopregelcorrectie +%D \stoplinecorrection %D %D Later we will implement a more convenient macro: %D -%D \starttypen +%D \starttyping %D \setMPlayer [test] [somepos-1] {Whatever we want here!} %D \setMPlayer [test] [somepos-2] {Whatever we need there!} -%D \stoptypen +%D \stoptyping \ifx\dosavepositionwhd\undefined \let\dosavepositionwhd\gobblesevenarguments @@ -912,16 +937,17 @@ \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 + \scratchdimen\MPllx\onebasepoint\scratchdimen-\scratchdimen + % \scratchdimen-\MPllx\onebasepoint % moet ook werken + \advance\scratchdimen\gMPs1\onebasepoint \edef\x{\number\scratchdimen}% - \scratchdimen\gMPs2\s!bp \scratchdimen-\scratchdimen - \advance\scratchdimen\MPury\s!bp + \scratchdimen\gMPs2\onebasepoint + \scratchdimen-\scratchdimen + \advance\scratchdimen\MPury\onebasepoint \edef\y{\number\scratchdimen}% - \scratchdimen\gMPs3\s!bp + \scratchdimen\gMPs3\onebasepoint \edef\w{\number\scratchdimen}% - \scratchdimen\gMPs4\s!bp + \scratchdimen\gMPs4\onebasepoint \edef\h{\number\scratchdimen}% \dosavepositionwhd{\gMPs5}0\x\y\w\h0% \egroup} @@ -939,7 +965,7 @@ %D %D \typebuffer %D -%D \startregelcorrectie \processMPbuffer \stopregelcorrectie +%D \startlinecorrection \processMPbuffer \stoplinecorrection %D %D One can also communicate colors between \CONTEXT\ and %D \METAPOST: @@ -960,7 +986,7 @@ %D fill p rotated 330 withcolor \MPcolor{tyellow} ; %D \stopbuffer %D -%D \startregelcorrectie \processMPbuffer \stopregelcorrectie +%D \startlinecorrection \processMPbuffer \stoplinecorrection %D %D We save all the three components needed in one macro, %D just to save hash space. @@ -972,16 +998,32 @@ \edef\PDFtransparencyreference {#2}% \edef\PDFtransparencycolorspecs{#3}} -\def\PDFtransparencyspec +% \def\PDFtransparencyspec +% {\ifx\MPresolvedspace\MPgrayspace +% \MPresolvedcolor\space g \MPresolvedcolor\space G% +% \else\ifx\MPresolvedspace\MPrgbspace +% \MPresolvedcolor\space rg \MPresolvedcolor\space RG% +% \else\ifx\MPresolvedspace\MPcmykspace +% \MPresolvedcolor\space k \MPresolvedcolor\space K% +% \else\ifx\MPresolvedspace\empty\else +% /\MPresolvedspace\space cs \MPresolvedcolor\space sc +% /\MPresolvedspace\space CS \MPresolvedcolor\space SC% +% \fi\fi\fi\fi} + +\def\PDFtransparencyspec % todo {\ifx\MPresolvedspace\MPgrayspace - \MPresolvedcolor\space g \MPresolvedcolor\space G% + \MPresolvedcolor\space g + \MPresolvedcolor\space G% \else\ifx\MPresolvedspace\MPrgbspace - \MPresolvedcolor\space rg \MPresolvedcolor\space RG% + \MPresolvedcolor\space rg + \MPresolvedcolor\space RG% \else\ifx\MPresolvedspace\MPcmykspace - \MPresolvedcolor\space k \MPresolvedcolor\space K% + \MPresolvedcolor\space k + \MPresolvedcolor\space K% \else\ifx\MPresolvedspace\empty\else - /\MPresolvedspace\space cs \MPresolvedcolor\space sc - /\MPresolvedspace\space CS \MPresolvedcolor\space SC% + /\MPresolvedspace\space cs + /\MPresolvedspace\space CS + \PDFgetspotcolorspec\MPresolvedcolor \fi\fi\fi\fi} \defineMPspecial{3} % rgb @@ -1004,25 +1046,20 @@ {\PDFtransparencyreference}% {\PDFtransparencyspec}}} -%\defineMPspecial{5} % spot -% {\edef\currentMPspecial{\gMPs5}% -% \presetPDFtransparency{\gMPs1}{\gMPs2}% -% \expanded{\resolveMPspotcolor\gMPs3 \gMPs4}\end -% \ifx\MPspotspace\MPresolvedspace -% \edef\MPspotspacespec{/\MPspotspace\space}% -% \doifinstringelse\MPspotspacespec\currentMPcolorspaces -% \donothing\registerMPcolorspace -% \fi -% \setevalue{\@@MPST\currentMPspecial}% was \setxvalue, bug ! -% {\noexpand\assignMPStransparency -% {\PDFtransparencyidentifier}% -% {\PDFtransparencyreference}% -% {\PDFtransparencyspec}}} +% \defineMPspecial{5} % spot +% {\edef\currentMPspecial{\gMPs5}% +% \presetPDFtransparency{\gMPs1}{\gMPs2}% +% \checkMPspot{\gMPs3}{\gMPs4}% +% \setevalue{\@@MPST\currentMPspecial}% was \setxvalue, bug ! +% {\noexpand\assignMPStransparency +% {\PDFtransparencyidentifier}% +% {\PDFtransparencyreference}% +% {\PDFtransparencyspec}}} \defineMPspecial{5} % spot - {\edef\currentMPspecial{\gMPs5}% + {\edef\currentMPspecial{\gMPs7}% \presetPDFtransparency{\gMPs1}{\gMPs2}% - \checkMPspot{\gMPs3}{\gMPs4}% + \checkMPspot{\gMPs3}{\gMPs4}{\gMPs5}{\gMPs6}% \setevalue{\@@MPST\currentMPspecial}% was \setxvalue, bug ! {\noexpand\assignMPStransparency {\PDFtransparencyidentifier}% @@ -1171,14 +1208,14 @@ \edef\PDFtransparencyidentifier{/Tr\getvalue{\@@MPSTN#1:#2}}% \edef\PDFtransparencyreference{\getvalue{\@@MPSTO#1:#2} 0 R}} - \def\PDFtransparencydictionary#1#2#3% type fraction extras - {<>} + \def\PDFtransparencydictionary#1#2#3% type fraction extras + {<>} \fi @@ -1243,9 +1280,17 @@ \execcolorS#1:0:0\od \stopMPcolorresolve} - \def\resolveMPspotcolor#1 #2\end +% \def\resolveMPspotcolor#1 #2\end +% {\startMPcolorresolve +% \execcolorP#1:#2:0:0\od +% \stopMPcolorresolve} + + \def\resolveMPspotcolor#1 #2 #3 #4\end {\startMPcolorresolve - \execcolorP#1:#2:0:0\od + \ifnum#2>\plusone + \checkmultitonecolor{#1}% + \fi + \execcolorP#1:#2:#3:#4:0:0\od \stopMPcolorresolve} \else @@ -1268,4 +1313,4 @@ \fi -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex index 80ff1fd6f..b36433be0 100644 --- a/tex/context/base/supp-mps.tex +++ b/tex/context/base/supp-mps.tex @@ -16,13 +16,13 @@ %D integrate \METAPOST\ support int \CONTEXT. We offer two %D tracks: %D -%D \startopsomming -%D \som generating \METAPOST\ code, running this program from +%D \startitemize +%D \item generating \METAPOST\ code, running this program from %D within \TEX\ using \type{\write18}, and importing the %D result -%D \som generating \METAPOST\ code, processing the code +%D \item generating \METAPOST\ code, processing the code %D afterward, and importing the result in a second pass -%D \stopopsomming +%D \stopitemize %D %D The first approach uses a non standard \TEX\ feature, %D implemented in Web2c. I'm not going to discuss the pros and @@ -30,9 +30,9 @@ %D arguments against this can be overcome by implementing a %D \TEX\ worthy primitive: %D -%D \starttypen +%D \starttyping %D \excuteMetaPost filename -%D \stoptypen +%D \stoptyping %D %D Ok then, let's start: @@ -56,17 +56,16 @@ %D From within \TEX\ one can execute \METAPOST\ code by putting %D it between the two commands %D -%D \starttypen +%D \starttyping %D \startMPgraphic %D \stopMPgraphic -%D \stoptypen +%D \stoptyping %D %D This is implemented as: \long\def\startMPgraphic#1\stopMPgraphic - {\checkMPTEXgraphic{#1}% % potential speedup: pass #1 as macro - \startwritingMPgraphic - \writeMPgraphic{#1}% + {\startwritingMPgraphic + \writecheckedMPgraphic{#1}% % potential speedup: pass #1 as macro \stopwritingMPgraphic} %D \macros @@ -76,15 +75,15 @@ %D explictly generate a figure in terms of \type{beginfig} and %D \type{endfig}, we can use: %D -%D \starttypen +%D \starttyping %D \startMPgraphic %D \stopMPgraphic -%D \stoptypen +%D \stoptyping %D -%D \starttypen +%D \starttyping %D \startMPrun %D \stopMPrun -%D \stoptypen +%D \stoptyping %D %D The next booleans are for internal purposes only. @@ -103,9 +102,8 @@ {\bgroup \MPruntrue \doifsomething{#1}{\def\MPgraphicfile{#1}}% - \checkMPTEXgraphic{#2}% \startwritingMPgraphic - \writeMPgraphic{#2}% + \writecheckedMPgraphic{#2}% \stopwritingMPgraphic \egroup} @@ -116,9 +114,8 @@ \long\def\startMPrun#1\stopMPrun {\MPruntrue - \checkMPTEXgraphic{#1}% \startwritingMPgraphic - \writeMPgraphic{#1}% + \writecheckedMPgraphic{#1}% \stopwritingMPgraphic \MPrunfalse} @@ -132,7 +129,7 @@ %D If the writing process is divided into more steps, one can %D use the components of this macro directly. %D -%D \starttypen +%D \starttyping %D \startwritingMPgraphic %D ... %D \writeMPgraphic{...} @@ -140,7 +137,7 @@ %D \writeMPgraphic{...} %D ... %D \stopwritingMPgraphic -%D \stoptypen +%D \stoptyping %D \macros %D {ifrunMPgraphics,ifrunMPTEXgraphics,ifinsertMPgraphics} @@ -198,27 +195,21 @@ %D One can include for instance common input commands by %D passing them to \type{\MPinclusions}: %D -%D \starttypen +%D \starttyping %D \MPinclusions{input mp-mine} -%D \stoptypen +%D \stoptyping %D %D The token register \type {\MPinitializations} is expanded -%D before all other inclusions. +%D before all other inclusions, the extensions are expanded +%D only once per run. -\newtoks \MPinitializations +\newtoks \MPinitializations % each graphic +\newtoks \MPextensions % once per run (can be multiple graphics) -% buggy -% -% \long\def\startMPinclusions#1\stopMPinclusions -% {\long\def\theMPinclusions -% {% \expanded ! -% \@EA\expanded\@EA{\@EA\writeMPgraphic\@EA{\the\MPinitializations;}}% -% \writeMPgraphic{#1}}} - -\long\def\startMPinclusions#1\stopMPinclusions +\long\def\startMPinclusions#1\stopMPinclusions % document wide {\long\def\theMPinclusions {% \expanded ! -% \@EA\expanded\@EA{\@EA\writeMPgraphic\@EA{\the\MPinitializations;}}% + \@EA\expanded\@EA{\@EA\writeMPgraphic\@EA{\the\MPextensions;}}% new \writeMPgraphic{#1}}} \long\def\MPinclusions#1% @@ -249,52 +240,104 @@ \edef\currentwidth {\the\hsize \space}% \edef\currentheight {\the\vsize \space}} +% \def\writeMPgraphic % no big #1 passing here +% {\iflongMPlines +% \expandafter\writeMPgraphiclong +% \else +% \expandafter\writeMPgraphicshort +% \fi} + +%D The \type {;} aware method (the \type {\else} branch) also +%D takes care of \type {btex}||\type {etex}, \type +%D {verbatimtex}||\type {etex}. The space after \type {tex} +%D is essential, since it protects \type {text}. + +\newif\ifMPTEXgraphic + \def\writeMPgraphic % no big #1 passing here {\iflongMPlines - \expandafter\writeMPgraphiclong + \ifMPTEXgraphic + \@EAEAEA\writeMPgraphiclongT + \else + \@EAEAEA\writeMPgraphiclongN + \fi \else - \expandafter\writeMPgraphicshort + \ifMPTEXgraphic + \@EAEAEA\writeMPgraphicshortT + \else + \@EAEAEA\writeMPgraphicshortN + \fi \fi} -\long\def\writeMPgraphiclong#1% +\long\def\writeMPgraphiclongT#1% {\bgroup - \presetMPdefinitions \let\par\space - \longMPflush#1\empty\par\relax\par + \longMPflushT#1\empty\par\relax\par \egroup} -\long\def\writeMPgraphicshort#1% +\long\def\writeMPgraphicshortT#1% {\bgroup - \presetMPdefinitions \let\par\space - \shortMPflush#1\empty;\relax;% + \shortMPflushT#1\empty;\relax;% \egroup} -\long\def\longMPflush#1#2\par +\long\def\longMPflushT#1#2\par {\ifx#1\relax \else - \immediate\write\MPwrite{#1#2}% - \expandafter\longMPflush + \dowriteMPgraphicline#1#2tex \relax etex\MPend + \expandafter\longMPflushT \fi} -\long\def\shortMPflush#1#2;% +\long\def\shortMPflushT#1#2;% {\ifx#1\relax \else \dowriteMPgraphicline#1#2tex \relax etex\MPend - \expandafter\shortMPflush + \expandafter\shortMPflushT \fi} -%D The \type {;} aware method (the \type {\else} branch) also -%D takes care of \type {btex}||\type {etex}, \type -%D {verbatimtex}||\type {etex}. The space after \type {tex} -%D is essential, since it protects \type {text}. +\long\def\writeMPgraphiclongN#1% + {\bgroup + \let\par\space + \longMPflushN#1\empty\par\relax\par + \egroup} -\newif\ifMPTEXgraphic +\long\def\writeMPgraphicshortN#1% + {\bgroup + \let\par\space + \shortMPflushN#1\empty;\relax;% + \egroup} + +\long\def\longMPflushN#1#2\par + {\ifx#1\relax \else + \nowriteMPgraphicline#1#2\MPend + \expandafter\longMPflushN + \fi} + +\long\def\shortMPflushN#1#2;% + {\ifx#1\relax \else + \nowriteMPgraphicline#1#2\MPend + \expandafter\shortMPflushN + \fi} + +\def\dowriteMPgraphicline{\futurelet\next\dodowriteMPgraphicline} +\def\nowriteMPgraphicline{\futurelet\next\nonowriteMPgraphicline} -\def\dowriteMPgraphicline - {\futurelet\next\dodowriteMPgraphicline} +%D Will move (check if next is needed): + +\long\def\nonowriteMPgraphicline#1\MPend + {\ifx\next\empty\else\ifx\next\relax\else + \bgroup + \let\par\space + \iflongMPlines + \immediate\write\MPwrite{#1;}% + \else + \long\edef\ascii{#1}% + \expandafter\flushMPgraphicline\ascii\empty;\relax;% + \fi + \egroup + \fi\fi} %D A first version: %D -%D \starttypen +%D \starttyping %D \long\def\dodowriteMPgraphicline#1tex #2#3etex#4\MPend% %D {\ifx\next\empty\else\ifx\next\relax\else %D \bgroup @@ -310,7 +353,7 @@ %D \dowriteMPgraphicline#4tex \relax etex\MPend %D \fi %D \fi\fi} -%D \stoptypen +%D \stoptyping %D The next alternative also handles inclusions well. @@ -320,7 +363,7 @@ %D Before we supported the graph module, we had: %D -%D \starttypen +%D \starttyping %D \convertargument etex\to\MPasciiB %D \convertargument textext\to\MPasciiC % geen "text" %D \convertargument graphictext\to\MPasciiD % geen "text" @@ -335,21 +378,32 @@ %D {\doifstringinstringelse\MPasciiD\MPasciiA{\global\MPTEXgraphictrue} %D {\global\MPTEXgraphicfalse}}}% %D \fi} -%D \stoptypen +%D \stoptyping %D %D The next alternative permits extensions in other modules %D without the need to know the details of testing. -\newtoks\MPTEXgrapicchecks +\newtoks\MPTEXgraphicchecks -\long\def\checkMPTEXgraphic#1% +% \long\def\checkMPTEXgraphic#1% +% {\ifforceMPTEXgraphic +% \global\MPTEXgraphictrue +% \else +% \global\MPTEXgraphicfalse +% \expandafter\convertargument#1\to\MPascii +% \the\MPTEXgraphicchecks\relax % \relax is end condition! +% \fi} + +\long\def\writecheckedMPgraphic#1% {\ifforceMPTEXgraphic \global\MPTEXgraphictrue \else \global\MPTEXgraphicfalse \expandafter\convertargument#1\to\MPascii - \the\MPTEXgrapicchecks\relax - \fi} + \the\MPTEXgraphicchecks\relax % \relax is end condition! + \fi + \flushMPTEXgraphic % verbatimtex etc + \writeMPgraphic{#1}} %D We could have used a kind of array approach using a %D counter appended to \type {MPascii}, but this is an @@ -362,13 +416,13 @@ \@EA\appendtoks \@EA\doifincsnameelse\csname MPascii#1\endcsname\MPascii {\global\MPTEXgraphictrue\gobbleuntil\relax}\donothing - \to \MPTEXgrapicchecks} + \to \MPTEXgraphicchecks} \forceMPTEXcheck{etex} \forceMPTEXcheck{textext} \forceMPTEXcheck{graphictext} -%D \starttypen +%D \starttyping %D \forceMPTEXgraphictrue %D %D \forceMPTEXcheck{lintext} @@ -378,12 +432,12 @@ %D draw hlintext.lft(0, 20, 5, 20cm, "@3e") ; %D draw vlogtext.bot(0, 10, 9, 10cm, "@3e") ; %D \stopMPcode -%D \stoptypen +%D \stoptyping \def\flushMPTEXgraphic - {\ifMPTEXgraphic \ifx\everyMPTEXgraphic\emptytoks \else + {\ifMPTEXgraphic \immediate\write\MPwrite{verbatimtex \the\everyMPTEXgraphic\space etex;}% - \fi \fi} + \fi} \long\def\flushMPgraphicline#1#2;% {\ifx#1\relax \else @@ -437,7 +491,7 @@ \iflongMPlines \immediate\write\MPwrite{#1;}% \else - \edef\ascii{#1}% + \long\edef\ascii{#1}% \expandafter\flushMPgraphicline\ascii\empty;\relax;% \fi \egroup @@ -544,13 +598,14 @@ \def\startwritingMPgraphic {\blabelgroup - \global\advance\nofMPgraphics 1 + \global\advance\nofMPgraphics \plusone \ifMPrun \else \allocateMPslot\currentMPgraphic \fi \enableincludeMPgraphics \xdef\MPgraphic{\the\currentMPgraphic}% \the\everyMPgraphic + \presetMPdefinitions % moved to here from \writeMPgraphic \ifrunMPgraphics \openMPgraphicfile1{runtime}% % no reset here ! @@ -558,11 +613,11 @@ \@EA\expanded\@EA{\@EA\writeMPgraphic\@EA{\the\MPinitializations;}}% \else \openMPgraphicfile0{collected}% - % reset here ! global added (due to adding \blabelgroup) + % reset here ! global added (due to adding \blabelgroup) \theMPinclusions \global\let\theMPinclusions\relax \fi - \flushMPTEXgraphic + %\flushMPTEXgraphic \ifMPrun \else \immediate\write\MPwrite{let mprunend = end ;}% \immediate\write\MPwrite{beginfig(\the\currentMPgraphic);}% @@ -571,7 +626,7 @@ \fi \fi \globallet\flushMPgraphics\closeMPgraphicfiles % \dodostopwritingMPgraphic - \globallet\stopwritingMPgraphic=\dostopwritingMPgraphic} + \globallet\stopwritingMPgraphic\dostopwritingMPgraphic} \let\MPgraphicfiles\empty @@ -605,7 +660,7 @@ \def\dostopwritingMPgraphic {\ifMPrun \else \immediate\write\MPwrite{endfig;}% - \immediate\write\MPwrite{let end = mprunend ;}% + \immediate\write\MPwrite{let end=mprunend;}% \fi \ifrunMPgraphics \dodostopwritingMPgraphic @@ -613,7 +668,7 @@ \elabelgroup} \def\dodostopwritingMPgraphic - {\ifnum\currentMPgraphic>0 + {\ifnum\currentMPgraphic>\zerocount \donetrue \else\ifMPrun \donetrue @@ -645,7 +700,7 @@ %D By default each graphic gets its own slot (number). Later %D on we will define a recycle bin. -\def \allocateMPslot#1{\global\advance#1 1 } +\def \allocateMPslot#1{\global\advance#1\plusone} \def\deallocateMPslot#1{} %D \macros @@ -653,7 +708,7 @@ %D %D For my polish friends: %D -%D \starttypen +%D \starttyping %D % translate=il2-pl %D %D \translateMPinput{il2-pl} @@ -667,7 +722,7 @@ %D \startMPcode %D draw btex MetaPost: ± ¶ etex scaled 5 ; %D \stopMPcode -%D \stoptypen +%D \stoptyping \def\translateMPinput#1% {\xdef\MPinputtranslation{\letterpercent -translate-file=#1\space}} @@ -685,8 +740,8 @@ \def\setMPrandomseed {\ifsetMPrandomseed \ifx\getrandomnumber\undefined \else - \getrandomnumber\localMPseed{0}{4095}% - \writeMPgraphic{randomseed := \localMPseed ;}% + \getrandomnumber\localMPseed\zerocount{4095}% + \writeMPgraphic{randomseed:=\localMPseed;}% \fi\fi} %D This feature has become optional. Thanks to Fabrice Popineau, @@ -699,9 +754,9 @@ %D one file. This means that we cannot close this file after %D every \type{\stopMPgraphic}. Therefore we need to say: %D -%D \starttypen +%D \starttyping %D \flushMPgraphics -%D \stoptypen +%D \stoptyping %D %D else the file is closed without writing the \METAPOST\ end %D command. One will notice this fast enough when in indirect @@ -715,10 +770,10 @@ %D %D Once defined, we can call for this graphic by saying: %D -%D \starttypen +%D \starttyping %D \loadcurrentMPgraphic{setups} %D \placeMPgraphic -%D \stoptypen +%D \stoptyping %D %D This two stage insert permits some intermediate manipulations %D of the graphic, which temporary saved in: @@ -736,15 +791,14 @@ \fi \def\loadMPgraphic#1#2% - {\setbox\MPgraphicbox=\hbox - {\ifinsertMPgraphics\insertMPfile{#1}{#2}\fi}} + {\setbox\MPgraphicbox\hbox{\ifinsertMPgraphics\insertMPfile{#1}{#2}\fi}} \def\MPllx{0} \def\MPlly{0} % \def\placeMPgraphic% % {\ifMPshiftdrawing -% \hbox{\hskip\MPllx bp\raise\MPlly bp\box\MPgraphicbox}% +% \hbox{\hskip\MPllx\onebasepoint\raise\MPlly\onebasepoint\box\MPgraphicbox}% % \else % \box\MPgraphicbox % \fi} @@ -758,7 +812,7 @@ \ht\MPgraphicbox\the\ht\MPgraphicbox \dp\MPgraphicbox\the\dp\MPgraphicbox}% \setbox\MPgraphicbox\hbox - {\hskip\MPllx bp\raise\MPlly bp\box\MPgraphicbox}% + {\hskip\MPllx\onebasepoint\raise\MPlly\onebasepoint\box\MPgraphicbox}% \next \fi \box\MPgraphicbox} @@ -774,7 +828,7 @@ %D We assume that one can set objects: %D -%D \starttypen +%D \starttyping %D \def\douseMPbox#1% %D {\setobject{MP}{#1}\vbox %D {\forgetall @@ -782,9 +836,9 @@ %D \deallocateMPslot\currentMPgraphic %D \placeMPgraphic}% %D \setgvalue{#1}{\getobject{MP}{#1}}} -%D \stoptypen +%D \stoptyping %D -%D More save is to use a number for {MP}{#1} which permits +%D More save is to use a number for \type {{MP}{#1}} which permits %D redefinition. \newcount\MPobjectcounter @@ -871,7 +925,7 @@ \let\useMPgraphic=\reuseMPgraphic -%D \macro +%D \macros %D {doifMPgraphicelse} %D %D For (mainly internal) purposes we provide a test macro. @@ -891,7 +945,7 @@ %D In a graphic one can call up another (predefined one) %D like: %D -%D \starttypen +%D \starttyping %D \startuseMPgraphic{a} %D fill fullcircle scaled 100 ; %D \stopuseMPgraphic @@ -902,7 +956,7 @@ %D \stopuseMPgraphic %D %D \useMPgraphic{b} -%D \stoptypen +%D \stoptyping \def\includeMPgraphic#1% {\csname\@@MPG#1\endcsname} @@ -926,9 +980,9 @@ %D %D For faster running, one can generate a format, saying %D -%D \starttypen +%D \starttyping %D mpost -ini context -%D \stoptypen +%D \stoptyping %D %D (The resulting \type {mem} file should be moved to the %D right location. Watch out for misatching \type {progname} @@ -1003,10 +1057,10 @@ \else \externalfigure [#1] - [\c!type=\c!mps,\c!object=\v!nee, - \c!symbool=\v!ja,\c!reset=\v!ja, - \c!maxbreedte=,\c!maxhoogte=, - \c!kader=\v!uit,\c!achtergrond=, + [\c!type=\c!mps,\c!object=\v!no, + \c!symbol=\v!yes,\c!reset=\v!yes, + \c!maxwidth=,\c!maxheight=, + \c!frame=\v!off,\c!background=, #2]% \fi} @@ -1020,7 +1074,7 @@ %D This module can be used in \PLAIN\ \TEX too. When using %D \DVIPS, just try to process: %D -%D \starttypen +%D \starttyping %D \input supp-mps %D %D \runMPgraphicstrue @@ -1034,15 +1088,15 @@ %D \stopuseMPgraphic %D %D \useMPgraphic{1} -%D \stoptypen +%D \stoptyping %D %D Don't forget to enable \type{\write18}. When does not say %D \type{\runMPgraphicstrue}, the \METAPOST\ scratch file %D must be closed by saying %D -%D \starttypen +%D \starttyping %D \flushMPgraphics -%D \stoptypen +%D \stoptyping %D %D When using the indirect method, one has to process the file %D \type{mpgraph.mp} between two successive \TEX\ runs. @@ -1070,15 +1124,15 @@ %D The method we use is both robust and simple: one can do %D with calling the next macro with the filename as argument: %D -%D \starttypen +%D \starttyping %D \includeMPfonts{filename} -%D \stoptypen +%D \stoptyping %D %D We can turn of this mechanism with: %D -%D \starttypen +%D \starttyping %D \includeMPfontsfalse -%D \stoptypen +%D \stoptyping %D %D {\em Currently this method fails for situations where the %D font definition is not on one line, which is he case when @@ -1096,7 +1150,7 @@ \endlinechar=-1 \setMPspecials \obeyMPspecials - \setbox\scratchbox=\hbox + \setbox\scratchbox\hbox {\hskip-\maxdimen \doprocessfile\scratchread{#1}\handleMPfont}% \smashbox\scratchbox @@ -1116,7 +1170,7 @@ %D In \CONTEXT\ font handling is intergrated in the figure %D inclusion macros. A decent plain \TEX\ alternative is: %D -%D \starttypen +%D \starttyping %D \def\includeMPgraphic#1% %D {\hbox\bgroup %D \includeMPfonts{#1}% @@ -1134,28 +1188,28 @@ %D urx=\EPSurx\space %D ury=\EPSury\space}}% %D \egroup} -%D \stoptypen +%D \stoptyping %D %D This macro needs \type {supp-eps.tex} and provided no %D scaling. For \LATEX\ users the next one will do: %D -%D \starttypen +%D \starttyping %D \def\includeMPgraphic#1#% %D {\hbox\bgroup %D \def\includeMPgraphics##1% %D {\includeMPfonts{##1}% -%D \includegraphics[type=mps,#1]{##1}% or whatever type they use +%D \includegraphics[typetype=mps,#1]{##1}% or whatever type they use %D \egroup}% %D \includeMPgraphics} -%D \stoptypen +%D \stoptyping %D We scan the graphics file for the \type{fshow} operator, %D that is, lines that start with \type{(}. If found it %D interprets the line, which looks like: %D -%D \starttypen +%D \starttyping %D (string ... string) font size fshow -%D \stoptypen +%D \stoptyping %D %D Font definitions specified in the preamble are simply %D ignored. Only lines starting with \type{(} are interpreted. @@ -1203,6 +1257,7 @@ \catcode`\]=\@@active \catcode`\{=\@@active \catcode`\}=\@@active + \lccode`\-=0 | latex sets this to `\- \lccode`\%=`\% | otherwise it's seen as a number \def\(B\char40\relax E| \def\)B\char41\relax E| @@ -1222,18 +1277,18 @@ %D The lines starting with \type{(} are interpreted and %D handled by %D -%D \starttypen +%D \starttyping %D \def\includeMPcharacters(#1) #2 #3 #4\relax% %D {\font\temp=#2 at #3bp\temp#1} -%D \stoptypen +%D \stoptyping %D %D While processing some \TUG~98 proceedings, I also had to %D deal with: %D -%D \starttypen +%D \starttyping %D /nfont {10 div dup scale 10} def %D (T) ANTTB 7.13086 nfont fshow -%D \stoptypen +%D \stoptyping %D %D which comes to rounding sizes. This is something %D experimental. (The macro in supp-pdf.tex is more @@ -1244,11 +1299,11 @@ \def\includeMPcharacters(#1) #2 #3 #4#5#6#7#8#9\relax {\edef\temp{#4#5#6#7#8}% \ifx\temp\PSnfont % round font size (to pt) - \scratchdimen#3pt - \ifdim\scratchdimen<1pt + \scratchdimen#3\onepoint + \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 @@ -1266,27 +1321,27 @@ %D Now let's see if things work all right and show the example %D files that are part of the \METAPOST\ distribution: %D -%D \startregelcorrectie -%D \steluitlijnenin[midden] +%D \startlinecorrection +%D \setupalign[middle] %D \leavevmode -%D \startcombinatie[3*3] -%D {\externfiguur[mp-exa-1][kader=aan,breedte=.2\hsize]} {} -%D {\externfiguur[mp-exa-2][kader=aan,breedte=.2\hsize]} {} -%D {\externfiguur[mp-exa-3][kader=aan,breedte=.2\hsize]} {} -%D {\externfiguur[mp-exa-4][kader=aan,breedte=.2\hsize]} {} -%D {\externfiguur[mp-exa-5][kader=aan,breedte=.2\hsize]} {} -%D {\externfiguur[mp-exa-6][kader=aan,breedte=.2\hsize]} {} -%D {\externfiguur[mp-exa-7][kader=aan,breedte=.2\hsize]} {} -%D {\externfiguur[mp-exa-8][kader=aan,breedte=.2\hsize]} {} -%D {\externfiguur[mp-exa-9][kader=aan,breedte=.2\hsize]} {} -%D \stopcombinatie -%D \stopregelcorrectie +%D \startcombination[3*3] +%D {\externalfigure[mp-exa-1][frame=on,width=.2\hsize]} {} +%D {\externalfigure[mp-exa-2][frame=on,width=.2\hsize]} {} +%D {\externalfigure[mp-exa-3][frame=on,width=.2\hsize]} {} +%D {\externalfigure[mp-exa-4][frame=on,width=.2\hsize]} {} +%D {\externalfigure[mp-exa-5][frame=on,width=.2\hsize]} {} +%D {\externalfigure[mp-exa-6][frame=on,width=.2\hsize]} {} +%D {\externalfigure[mp-exa-7][frame=on,width=.2\hsize]} {} +%D {\externalfigure[mp-exa-8][frame=on,width=.2\hsize]} {} +%D {\externalfigure[mp-exa-9][frame=on,width=.2\hsize]} {} +%D \stopcombination +%D \stoplinecorrection %D %D Here we used calls like: %D -%D \starttypen -%D \externfiguur[mp-exa-1][methode-mps,kader=aan,breedte=.2\hsize] -%D \stoptypen +%D \starttyping +%D \externalfigure[mp-exa-1][methode-mps,frame=on,width=.2\hsize] +%D \stoptyping %D \macros %D {convertMPcolors, @@ -1294,8 +1349,8 @@ %D %D When I told the editors that I wanted to use colored %D \METAPOST\ graphics in the color issue of the \MAPS, I was -%D asked to use the \kap{CMYK} colorspace instead of \kap{RGB} -%D one. However, \METAPOST\ only supports \kap{RGB} colors. I +%D asked to use the \cap{CMYK} colorspace instead of \cap{RGB} +%D one. However, \METAPOST\ only supports \cap{RGB} colors. I %D decided to write a utility to convert the \type %D {setrgbcolor} operators into \type {setcmykcolor} ones, and %D some experiments showed me that I could best let \TEX\ do it @@ -1310,9 +1365,9 @@ %D The main macro is called as: %D -%D \starttypen +%D \starttyping %D \convertMPcolors{filename} -%D \stoptypen +%D \stoptyping %D %D When active, this macro returns a message saying if indeed %D conversion took place. The old file is overwritten! This @@ -1416,13 +1471,13 @@ \ifx\convertRGBtoGRAY\undefined \def\convertRGBtoGRAY#1#2#3% - {\scratchdimen#1\s!pt + {\scratchdimen#1\onepoint \scratchdimen300\scratchdimen \scratchcounter\scratchdimen - \scratchdimen#2\s!pt + \scratchdimen#2\onepoint \scratchdimen590\scratchdimen \advance\scratchcounter \scratchdimen - \scratchdimen#3\s!pt + \scratchdimen#3\onepoint \scratchdimen110\scratchdimen \advance\scratchcounter \scratchdimen \advance\scratchcounter \!!medcard @@ -1439,37 +1494,37 @@ %D By setting both \type{rgb} and \type{cmyk} to off, we force %D conversion to gray scales using: %D -%D \plaatsformule[-] -%D \startformule +%D \placeformula[-] +%D \startformula %D G = .30r + .59g + .11b -%D \stopformule +%D \stopformula %D %D By using buffers, we keep the \ASCII\ layout clean: %D %D \startbuffer %D \startbuffer[rgb] -%D \stelkleurenin[rgb=ja,cmyk=nee,reductie=nee,conversie=nee] +%D \setupcolors[rgb=ja,cmyk=nee,reduction=no,conversion=no] %D \useMPgraphic{hans} %D \stopbuffer %D %D \startbuffer[cmyk] -%D \stelkleurenin[rgb=nee,cmyk=ja,reductie=nee,conversie=nee] +%D \setupcolors[rgb=nee,cmyk=ja,reduction=no,conversion=no] %D \useMPgraphic{hans} %D \stopbuffer %D %D \startbuffer[cmy] -%D \stelkleurenin[rgb=nee,cmyk=ja,reductie=ja,conversie=nee] +%D \setupcolors[rgb=nee,cmyk=ja,reduction=yes,conversion=no] %D \useMPgraphic{hans} %D \stopbuffer %D %D \startbuffer[gray] -%D \stelkleurenin[rgb=nee,cmyk=nee,reductie=nee,conversie=nee] +%D \setupcolors[rgb=nee,cmyk=nee,reduction=no,conversion=no] %D \useMPgraphic{hans} %D \stopbuffer %D \stopbuffer %D %D \typebuffer -%D \haalbuffer +%D \getbuffer %D %D The graphic is rather simple and is generated each time %D it's called: @@ -1479,7 +1534,7 @@ %D \startbuffer %D \startbuffer[graphic] %D \startuseMPgraphic{hans} -%D width :=\the\tekstbreedte/5; +%D width :=\the\textwidth/5; %D height := width/4; %D fill fullcircle %D xscaled width @@ -1490,40 +1545,40 @@ %D \stopbuffer %D %D \typebuffer -%D \haalbuffer +%D \getbuffer %D %D Next we combine the four alternative interpretations in a %D combination: %D %D \startbuffer %D \startbuffer[result] -%D \startcombinatie[4] -%D {\haalbuffer[rgb]} {\tfxx original} -%D {\haalbuffer[cmyk]} {\ttxx\string\convertMPcolorstrue} -%D {\haalbuffer[cmy]} {\ttxx\string\reduceMPcolorstrue} -%D {\haalbuffer[gray]} {\ttxx\string\forcegrayMPcolorstrue} -%D \stopcombinatie +%D \startcombination[4] +%D {\getbuffer[rgb]} {\tfxx original} +%D {\getbuffer[cmyk]} {\ttxx\string\convertMPcolorstrue} +%D {\getbuffer[cmy]} {\ttxx\string\reduceMPcolorstrue} +%D {\getbuffer[gray]} {\ttxx\string\forcegrayMPcolorstrue} +%D \stopcombination %D \stopbuffer %D \stopbuffer %D %D \typebuffer -%D \haalbuffer +%D \getbuffer %D %D Finally we call the buffers, using different setting: %D %D \startbuffer -%D \plaatsfiguur +%D \placefigure %D {\METAPOST\ color conversions} -%D {\def\RedGreenBlue{.1,.4,.6}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt -%D \def\RedGreenBlue{.1,.6,.4}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt -%D \def\RedGreenBlue{.4,.1,.6}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt -%D \def\RedGreenBlue{.4,.6,.1}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt -%D \def\RedGreenBlue{.6,.1,.4}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt -%D \def\RedGreenBlue{.6,.4,.1}\haalbuffer[graphic]\haalbuffer[result]} +%D {\def\RedGreenBlue{.1,.4,.6}\getbuffer[graphic]\getbuffer[result]\vskip6pt +%D \def\RedGreenBlue{.1,.6,.4}\getbuffer[graphic]\getbuffer[result]\vskip6pt +%D \def\RedGreenBlue{.4,.1,.6}\getbuffer[graphic]\getbuffer[result]\vskip6pt +%D \def\RedGreenBlue{.4,.6,.1}\getbuffer[graphic]\getbuffer[result]\vskip6pt +%D \def\RedGreenBlue{.6,.1,.4}\getbuffer[graphic]\getbuffer[result]\vskip6pt +%D \def\RedGreenBlue{.6,.4,.1}\getbuffer[graphic]\getbuffer[result]} %D \stopbuffer %D %D \typebuffer -%D \haalbuffer +%D \getbuffer %D %D By the way, when the \POSTSCRIPT\ file resulting from %D this input is converted into \PDF\ and viewed in Acrobat @@ -1536,7 +1591,7 @@ %D %D Some experimental macros: %D -%D \starttypen +%D \starttyping %D \startMPdrawing %D \stopMPdrawing %D \pushMPdrawing @@ -1545,7 +1600,7 @@ %D \ifMPdrawingdone %D \getMPdrawing %D \MPdivten[number] -%D \stoptypen +%D \stoptyping %D %D These macros are used in \PPCHTEX. @@ -1558,12 +1613,14 @@ {\globallet\MPdrawingdata\empty \global\MPdrawingdonefalse} +% why global push/pop here? + \def\pushMPdrawing - {\pushmacro\MPdrawingdata + {\globalpushmacro\MPdrawingdata \globallet\MPdrawingdata\empty} \def\popMPdrawing - {\popmacro\MPdrawingdata} + {\globalpopmacro\MPdrawingdata} \def\getMPdrawing {\ifMPdrawingdone @@ -1580,7 +1637,7 @@ {\relax \bgroup \enableincludeMPgraphics - \presetMPdefinitions + \presetMPdefinitions % in case #2 has measures \doifelse{#1}{-} {\convertargument#2\to\asciiA} {\long\def\asciiA{#2}}% @@ -1616,17 +1673,17 @@ %D We can use \METAPOST\ to calculate arbitrary clipping %D paths. Such a path is defined by (for instance): %D -%D \starttypen +%D \starttyping %D \startMPclip{window} %D clip currentpicture to fullcircle xscaled \width yscaled \height ; %D \stopMPclip -%D \stoptypen +%D \stoptyping %D %D Such a path can be extracted (processed) by: %D -%D \starttypen +%D \starttyping %D \grabMPclippath{window}{method}{width}{height}{default path} -%D \stoptypen +%D \stoptyping %D %D Currently only method 1 makes sense; it produces \PDF\ %D code. This macro only makes sense when hooked into a @@ -1710,6 +1767,15 @@ \newif \ifMPstaticgraphic \MPstaticgraphicfalse +\def\locateMPslot#1% slightly faster on one slot, much faster on multiple slots + {\ifundefined{\number#1MP}% could be \ifcsname if needed + \letgvalueempty{\number#1MP}% + \expandafter\gobbletwoarguments + \else + \global\advance#1\plusone + \fi + \locateMPslot#1} + \def\allocateMPslot#1% {\ifrunMPgraphics \ifx\pdfliteral\undefined @@ -1721,11 +1787,13 @@ \recycleMPslotsfalse \fi \ifrecycleMPslots - \doloop % slow but used seldom - {\doifundefined{\recurselevel MP} - {\letgvalueempty{\recurselevel MP}% - \global#1=\recurselevel - \exitloop}}% + % \doloop % slow but used seldom + % {\doifundefined{\recurselevel MP} + % {\letgvalueempty{\recurselevel MP}% + % \global#1\recurselevel + % \exitloop}}% + \global#1\plusone + \locateMPslot#1% % \message{[MP slot + \number#1]% \else\ifMPstaticgraphic \global#1\maxnofMPgraphics @@ -1735,7 +1803,7 @@ \global\advance\minnofMPgraphics \plusone \fi\fi \ifnum\minnofMPgraphics<\maxnofMPgraphics \else - \writestatus{\m!systems}{increase \string\maxnofMPgraphics}% + \writestatus\m!systems{increase \string\maxnofMPgraphics}% \fi} \def\deallocateMPslot#1% @@ -1745,7 +1813,7 @@ \recycleMPslotsfalse \fi \ifrecycleMPslots - \global\letbeundefined{\number#1MP}% + \global\letbeundefined{\number#1MP}% %\message{[MP slot - \number#1]}% \fi} @@ -1771,9 +1839,9 @@ %D %D We can save some typing with: %D -%D \starttypen +%D \starttyping %D \startMPcode whatever \stopMPcode -%D \stoptypen +%D \stoptyping %D %D this automatically places the graphic diff --git a/tex/context/base/supp-mrk.tex b/tex/context/base/supp-mrk.tex index 725f3138a..0cab213c4 100644 --- a/tex/context/base/supp-mrk.tex +++ b/tex/context/base/supp-mrk.tex @@ -55,13 +55,13 @@ %D We start with the presetting the interface macros. %D -%D \starttabulatie[|||] +%D \starttabulate[|||] %D \NC \type{\getmarks} \NC sets the marks to their values \NC \NR %D \NC \type{\getallmarks} \NC sets all marks to their values \NC \NR %D \NC \type{\getsplitmarks} \NC sets the splitmarks to their values\NC \NR %D \NC \type{\getallsplitmarks} \NC sets all splitmarks to their values\NC \NR %D \NC \type{\setmarks} \NC synchronizes topmarks (\ETEX) \NC \NR -%D \stoptabulatie +%D \stoptabulate %D %D Later we will overload these, dependent of the brand of %D \TEX\ that we use. @@ -90,46 +90,46 @@ %D other \type {\new} macros in \PLAIN\ \TEX. A mark is %D defined by: %D -%D \starttypen +%D \starttyping %D \newmark\name -%D \stoptypen +%D \stoptyping %D %D and can be called upon with: %D -%D \starttypen +%D \starttyping %D \gettopmark \name % or \topname %D \getbotmark \name % or \botname %D \getfirstmark\name % or \firstname -%D \stoptypen +%D \stoptyping %D %D The only drawback of his approach is that the marks must be %D preloaded in the output routine. This is accomplished by %D means of: %D -%D \starttypen +%D \starttyping %D \getmarks\name -%D \stoptypen +%D \stoptyping %D %D The macros presented here are in most aspects copies of %D those presented by Jim Fox. We've taken the freedom to %D change a few things for more or less obvious reasons: %D -%D \startopsomming -%D \som Because the original macros look quite complicated, +%D \startitemize +%D \item Because the original macros look quite complicated, %D which is mainly due to extensive use of %D \type{\expandafter}'s and \type{\csname}'s, we changed %D those in favor of \type{\getvalue}. -%D \som To be more in line with the rest of \CONTEXT, we've +%D \item To be more in line with the rest of \CONTEXT, we've %D changed some of the names of macros. -%D \som Because we are already short on \COUNTERS\ we use +%D \item Because we are already short on \COUNTERS\ we use %D macros when possible. -%D \som We maintain a list of defined marks and use one +%D \item We maintain a list of defined marks and use one %D call for getting them all at once. -%D \som We have extended the mechanism to splitmarks (not +%D \item We have extended the mechanism to splitmarks (not %D perfected yet). -%D \som We've introduced optional expansion of the contents +%D \item We've introduced optional expansion of the contents %D of marks. -%D \stopopsomming +%D \stopitemize %D %D Whatever changes we've made, the credits still go to Jim, %D whatever goes wrong is due to me. The method is described @@ -139,17 +139,17 @@ %D be defined at will and a number concerning the position at %D which it was defined. %D -%D \starttypen +%D \starttyping %D \def\somelist{... \domark5{this} ... \domark31{that} ...} -%D \stoptypen +%D \stoptyping %D %D The original \type{\mark} keeps track of the number and %D \type{\topmark} and \type{\botmark} are used to extract the %D actual marks from the list. The counting is done by %D -%D \starttypen +%D \starttyping %D \currentmarker -%D \stoptypen +%D \stoptyping %D %D In \CONTEXT\ we use the mark mechanism to keep track of %D colors. In a complicated documents with many colors per @@ -163,11 +163,11 @@ %D have been substituted by macros, one has been replaced by %D our scratch counter. %D -%D \starttypen +%D \starttyping %D \newcount\topmarker %D \newcount\botmarker %D \newcount\foundmarker -%D \stoptypen +%D \stoptyping %D %D We've also introduced some constants, one for the lists and %D three for composing the mark commands. @@ -246,9 +246,9 @@ %D list is done by \type{\addmarker}. This is an internal %D command, the user set a marks bij calling it's name: %D -%D \starttypen +%D \starttyping %D \setmark\mymark{some text} % or \mymark{some text} -%D \stoptypen +%D \stoptyping %D %D Where \type{\mymark} is previously defined by %D \type{\newmark}. @@ -257,7 +257,7 @@ {\bgroup \makemarknames{#1}% \setgvalue{\@@markcurrent@@\markname}{#2}% - \global\advance\currentmarker 1 + \global\advance\currentmarker \plusone \normalmark{\the\currentmarker}% \!!toksa\@EA\@EA\@EA{\csname\marklist\endcsname}% \ifexpandmarks @@ -366,7 +366,7 @@ \!!toksa\@EA{\@EA\domark\the\scratchcounter{#1}}% \normalfi} -\def\doscanmarks% +\def\doscanmarks {\afterassignment\dodoscanmarks\scratchcounter=} \long\def\dorecovermarks#1\lastmark% nice trick @@ -476,10 +476,10 @@ %D In \type {page-ini} or \type {core-mar} we should say: %D -%D \starttypen +%D \starttyping %D \appendtoks \getallmarks \to \everybeforepagebody %D \appendtoks \setallmarks \to \everyafterpagebody -%D \stoptypen +%D \stoptyping \let\getcurrentmark \thecurrentmarks \let\gettopmark \checkedtopmarks @@ -529,9 +529,9 @@ %D Here a node is inserted, which can interfere badly. In %D fact, a real \type {\clearmarks\name} is needed. %D -%D \starttypen +%D \starttyping %D \def\resetmark#1{\marks#1{}} -%D \stoptypen +%D \stoptyping %D %D A possible macro solution is presented here. When discussing %D \type {\clearmarks} on the \ETEX\ discussion list, Chris @@ -552,7 +552,7 @@ %D \ruledhbox{\unhbox0} %D \stopbuffer %D -%D \typebuffer\blanko\haalbuffer\blanko +%D \typebuffer\blank\getbuffer\blank %D %D \startbuffer %D \setbox0=\vbox{test\normalmark{}} @@ -560,7 +560,7 @@ %D \ruledhbox{\unhbox0} %D \stopbuffer %D -%D \typebuffer\blanko\haalbuffer\blanko +%D \typebuffer\blank\getbuffer\blank %D %D \startbuffer %D \setbox0=\vbox{test\hbox{\normalmark{}}} @@ -568,7 +568,7 @@ %D \ruledhbox{\unhbox0} %D \stopbuffer %D -%D \typebuffer\blanko\haalbuffer\blanko +%D \typebuffer\blank\getbuffer\blank %D %D \startbuffer %D \setbox0=\vbox{test\vbox{\normalmark{}}} @@ -576,7 +576,7 @@ %D \ruledhbox{\unhbox0} %D \stopbuffer %D -%D \typebuffer\blanko\haalbuffer\blanko +%D \typebuffer\blank\getbuffer\blank %D One final advice. Use marks with care. When used in globally %D assigned boxes, the list can grow quite big, and processing diff --git a/tex/context/base/supp-num.tex b/tex/context/base/supp-num.tex index 73ba3311b..a5a9114c1 100644 --- a/tex/context/base/supp-num.tex +++ b/tex/context/base/supp-num.tex @@ -21,15 +21,15 @@ %D Depending on the digit mode the command \type {\digits} %D normalizes number patterns depending on the language set. %D -%D \starttypen +%D \starttyping %D This will never be a \digits{1.000.000} seller. -%D \stoptypen +%D \stoptyping %D %D or %D -%D \starttypen +%D \starttyping %D I will never grow longer than \digits 1.86 \Meter. -%D \stoptypen +%D \stoptyping %D %D The different modes are shown in: %D @@ -46,9 +46,9 @@ %D %D This is typset as: %D -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D %D The sign can be typeset as is or within the space of a %D digit. @@ -64,9 +64,9 @@ %D %D This is typset as: %D -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines \chardef\digitoutputmode=1 % 0..6 \chardef\digitsignmode =0 % 0..3 @@ -76,14 +76,14 @@ %D The digit modes are: %D -%D \startopsomming[opelkaar] -%D \som periods \& comma -%D \som commas \& period -%D \som thinmuskips \& comma -%D \som thinmuskips \& period -%D \som thickmuskips \& comma -%D \som thickmuskips \& period -%D \stopopsomming +%D \startitemize[packed] +%D \item periods \& comma +%D \item commas \& period +%D \item thinmuskips \& comma +%D \item thinmuskips \& period +%D \item thickmuskips \& comma +%D \item thickmuskips \& period +%D \stopitemize \let\collecteddigits \empty \chardef\digitinputmode =1 \let\saveddigits \empty \chardef\skipdigit =0 @@ -117,10 +117,10 @@ %D we need to do an indirect test (see \type {verb-ini.tex}) %D for details. %D -%D \starttypen +%D \starttyping %D \def ^^M{\obeyedline} %D \def\nextbeyedline{\obeyedline} -%D \stoptypen +%D \stoptyping \ifx\normalmathshift\undefined \let\normalmathshift=$ \fi @@ -323,7 +323,7 @@ %D well as different formats. We strongly suggest you to use %D the grouped call. %D -%D \starttabulatie[|l|l|l|] +%D \starttabulate[|l|l|l|] %D \NC \type{.} \NC , . \NC comma or period \NC \NR %D \NC \type{,} \NC , . \NC comma or period \NC \NR %D \NC \type{@} \NC \NC invisible space \NC \NR @@ -336,7 +336,7 @@ %D \NC \type{m} \NC $\negative$ \NC high minus sign \NC \NR %D \NC \type{n} \NC $\negative$ \NC high minus (negative) sign \NC \NR %D \NC \type{=} \NC $\zeroamount$ \NC zero padding \NC \NR -%D \stoptabulatie +%D \stoptabulate %D %D These triggers are used in the following examples. %D @@ -368,9 +368,9 @@ %D %D \typebuffer %D -%D \startregels -%D \haalbuffer -%D \stopregels +%D \startlines +%D \getbuffer +%D \stoplines %D \macros %D {Digits} @@ -382,22 +382,22 @@ %D These macros are complicated by the fact that we also %D have to support cases like: %D -%D \starttypen +%D \starttyping %D {\digits1234} %D \digits{1234} %D \digits 1234\whatever %D $\digits 123.222,00$ %D \digits 123.222,00. -%D \stoptypen +%D \stoptyping %D %D The latter case shows us that trailing non digits are to %D be passed untreated. %D %D Another interesting case is: %D -%D \starttypen +%D \starttyping %D \digits 123.222,00^10 -%D \stoptypen +%D \stoptyping %D %D The separator is defined as: @@ -410,9 +410,9 @@ %D Users can specify the way they enter those digits by saying %D something like: %D -%D \starttypen +%D \starttyping %D \digittemplate 12.000.000,00 % \digittemplate ., -%D \stoptypen +%D \stoptyping \def\digittemplate #1 % {\chardef\digitinputmode\zerocount diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex index 8152f0e32..c2c8f79e5 100644 --- a/tex/context/base/supp-pdf.tex +++ b/tex/context/base/supp-pdf.tex @@ -77,10 +77,10 @@ %D natural to the form embedding. This enables alternative %D images to be embedded. %D -%D \starttypen +%D \starttyping %D \pdfimage {file} %D \pdfimages {high res file} {low res file} -%D \stoptypen +%D \stoptyping %D %D The first one replaces the pre||version||14 original, %D while the latter provides alternative images. @@ -89,9 +89,9 @@ %D needed to paste prepared \PDF\ pages into conference %D proceedings. %D -%D \starttypen +%D \starttyping %D \pdfclippedimage {file} {l} {r} {t} {b} -%D \stoptypen +%D \stoptyping % \ifx\pdftexversion\undefined % no \m!systems for the sake of latex % \writestatus{systems}{Why not use pdf(e)TeX binaries?} @@ -145,13 +145,13 @@ %D If you want to save a few hash entries, you may prefer the %D less readable alternatives, like: %D -%D \starttypen +%D \starttyping %D \def\pdfimage#1#% This one is less readable but needs no additional %D {\bgroup % hash entry for the second stage macro. %D \def\pdfimage##1% %D {\immediate\pdfximage##1{#2}% %D \pdfrefximage\pdflastximage\egroup}} -%D \stoptypen +%D \stoptyping %D For old times sake we provide a few aliases. These will be %D removed some day. @@ -178,21 +178,21 @@ %D work. Interpreting their specifications is beyond the %D current implementation. %D -%D \starttypen +%D \starttyping %D \convertPDFtoPDF %D {filename} %D {x scale} {y scale} %D {x offset } {y offset} %D {width} {height} -%D \stoptypen +%D \stoptyping %D %D When the scales are set to~1, the last last four values %D are the same as the bounding box, e.g. %D -%D \starttypen +%D \starttyping %D \convertPDFtoPDF{mp-pra-1.pdf} {1} {1}{-1bp}{-1bp}{398bp}{398bp} %D \convertPDFtoPDF{mp-pra-1.pdf}{.5}{.5} {0bp} {0bp}{199bp}{199bp} -%D \stoptypen +%D \stoptyping %D %D Keep in mind, that this kind of copying only works for %D pure and valid pdf code (without fonts). @@ -210,9 +210,9 @@ %D specifies the dimensions and offsets of the graphic. When %D we say: %D -%D \starttypen +%D \starttyping %D \PDFmediaboxpreferedtrue -%D \stoptypen +%D \stoptyping %D %D the mediabox present in the file superseded the user %D specified, already scaled and calculated offset and @@ -223,24 +223,24 @@ % \newif\ifPDFmediaboxprefered -% \def\setPDFboundingbox#1#2#3#4#5#6% -% {\dimen0=#1\dimen0=#5\dimen0 -% \ScaledPointsToBigPoints{\number\dimen0}\PDFxoffset -% \dimen0=#3\dimen0=#5\dimen0 -% \xdef\PDFwidth{\the\dimen0}% -% \dimen0=#2\dimen0=#6\dimen0 -% \ScaledPointsToBigPoints{\number\dimen0}\PDFyoffset -% \dimen0=#4\dimen0=#6\dimen0 -% \xdef\PDFheight{\the\dimen0}% -% \global\let\PDFxoffset\PDFxoffset -% \global\let\PDFyoffset\PDFyoffset} - -% \def\setPDFmediabox#1[#2 #3 #4 #5]#6\done -% {\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} +\def\setPDFboundingbox#1#2#3#4#5#6% + {\dimen0=#1\dimen0=#5\dimen0 + \ScaledPointsToBigPoints{\number\dimen0}\PDFxoffset + \dimen0=#3\dimen0=#5\dimen0 + \xdef\PDFwidth{\the\dimen0}% + \dimen0=#2\dimen0=#6\dimen0 + \ScaledPointsToBigPoints{\number\dimen0}\PDFyoffset + \dimen0=#4\dimen0=#6\dimen0 + \xdef\PDFheight{\the\dimen0}% + \global\let\PDFxoffset\PDFxoffset + \global\let\PDFyoffset\PDFyoffset} + +\def\setPDFmediabox#1[#2 #3 #4 #5]#6\done + {\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} % \def\checkPDFmediabox#1/MediaBox#2#3\done % {\ifx#2\relax \else @@ -281,7 +281,7 @@ %D one transform call (\type{cm}). This saves some additional %D scaling. -%D \starttypen +%D \starttyping %D \def\startPDFtoPDF% %D {\setbox0=\vbox\bgroup %D \message{[PDF to PDF \PDFfilename}% @@ -329,11 +329,11 @@ %D The next macro can be used to find the mediabox of a \PDF\ %D illustration. %D -%D \starttypen +%D \starttyping %D \dogetPDFmediabox %D {filename} %D {new dimen}{new dimen}{new dimen}{new dimen} -%D \stoptypen +%D \stoptyping %D %D Beware of dimen clashes: this macro uses the 5~default %D scratch registers! When no file or mediabox is found, the @@ -370,7 +370,10 @@ #4\zeropoint #5\zeropoint \else - #2=\PDFxoffset bp #3=\PDFyoffset bp #4=\PDFwidth #5=\PDFheight + #2=\PDFxoffset\onebasepoint + #3=\PDFyoffset\onebasepoint + #4=\PDFwidth + #5=\PDFheight \fi} %D \macros @@ -436,7 +439,7 @@ %D By the way, the \type {setcmykcolor} operator is not %D output by \METAPOST\ but can result from converting the -%D \kap{RGB} color specifications, as implemented in +%D \cap{RGB} color specifications, as implemented in %D \type{supp-mps}. %D In \POSTSCRIPT\ arguments precede the operators. Due to the @@ -448,23 +451,23 @@ %D (optional) postprocessing. Values are pushed onto the stack %D by: %D -%D \starttypen +%D \starttyping %D \setMPargument {value} -%D \stoptypen +%D \stoptyping %D %D They can be retrieved by the short named macros: %D -%D \starttypen +%D \starttyping %D \gMPa {number} %D \gMPs {number} -%D \stoptypen +%D \stoptyping %D %D When scanning a path specification, we also save the %D operator, using %D -%D \starttypen +%D \starttyping %D \setMPkeyword {n} -%D \stoptypen +%D \stoptyping %D %D The path drawing operators are coded for speed: \type{clip}, %D \type{stroke}, \type{fill} and \type{fillstroke} become @@ -473,9 +476,9 @@ %D When processing the path this code can be retrieved %D using %D -%D \starttypen -%D \getMPkeyword{n} -%D \stoptypen +%D \starttyping +%D \getMPkeyword % {n} +%D \stoptyping %D %D When setting an argument, the exact position on the stack %D depends on the current value of the \COUNTERS\ @@ -487,9 +490,9 @@ %D These variables hold the coordinates. The argument part of %D the stack is reset by: %D -%D \starttypen +%D \starttyping %D \resetMPstack -%D \stoptypen +%D \stoptyping %D %D We use the prefix \type{@@MP} to keep the stack from %D conflicting with existing macros. To speed up things a bit @@ -527,8 +530,8 @@ \advance\nofMPsegments \plusone \nofMParguments\zerocount} -\def\getMPkeyword#1% - {\csname\@@MP#10\endcsname} +\def\getMPkeyword% #1% + {\csname\@@MP\the\nofMPsegments0\endcsname} % {\csname\@@MP#10\endcsname} %D When we reset the stack, we can assume that all further %D comment is to be ignored and handled in strings. @@ -538,7 +541,7 @@ %D when dealing with comments. \def\doresetMPstack - {\nofMParguments0 } + {\nofMParguments\zerocount} \def\resetMPstack {\let\handleMPgraphic\handleMPendgraphic @@ -624,9 +627,9 @@ %D In earlier versions we used the sequence %D -%D \starttypen +%D \starttyping %D \expandafter\handleMPsequence\input filename\relax -%D \stoptypen +%D \stoptyping %D %D Persistent problems in \LATEX\ however forced us to use a %D different scheme. Every \POSTSCRIPT\ file starts with a @@ -797,11 +800,11 @@ %D We check for three kind of bounding boxes: the normal one %D and two high precision ones: %D -%D \starttypen +%D \starttyping %D BoundingBox: llx lly ucx ucy %D HiResBoundingBox: llx lly ucx ucy %D ExactBoundingBox: llx lly ucx ucy -%D \stoptypen +%D \stoptyping %D %D The original as well as the recalculated dimensions are %D saved for later use. @@ -814,16 +817,20 @@ {\ifnum#1>\currentMPboundingbox \xdef\MPllx{#2}\xdef\MPlly{#3}% \xdef\MPurx{#4}\xdef\MPury{#5}% - \dimen0=#2pt\dimen0=-\MPxscale\dimen0 - \dimen2=#3pt\dimen2=-\MPyscale\dimen2 + \dimen0=#2\onepoint + \dimen0=-\MPxscale\dimen0 + \dimen2=#3\onepoint + \dimen2=-\MPyscale\dimen2 \xdef\MPxoffset{\withoutpt\the\dimen0}% \xdef\MPyoffset{\withoutpt\the\dimen2}% - \dimen0=#2bp\dimen0=-\dimen0 - \dimen2=#3bp\dimen2=-\dimen2 - \advance\dimen0 #4bp + \dimen0=#2\onebasepoint + \dimen0=-\dimen0 + \dimen2=#3\onebasepoint + \dimen2=-\dimen2 + \advance\dimen0 #4\onebasepoint \dimen0=\MPxscale\dimen0 \xdef\MPwidth{\the\dimen0}% - \advance\dimen2 #5bp + \advance\dimen2 #5\onebasepoint \xdef\MPyshift{\the\dimen2}% unscaled \dimen2=\MPyscale\dimen2 \xdef\MPheight{\the\dimen2}% @@ -834,7 +841,7 @@ \let\next\handleMPsequence \ifskipemptyMPgraphic \ifdim\MPheight=\zeropoint\relax\ifdim\MPwidth=\zeropoint\relax - \def\next{\endinput\finishMPgraphic}% + \def\next{\endinput\finishMPgraphic}% \fi\fi \fi \next} @@ -884,7 +891,7 @@ \let\MPfshowcommand\empty -\def\handleMPfshow +\def\dohandleMPfshow {\bgroup \setbox\scratchbox\hbox {\obeyMPspecials @@ -931,7 +938,7 @@ \fi \unskip}}% % - % this fails in latest pdftex's + % this fails in some versions of pdftex % % \dimen0=\lastMPmoveY bp % \advance\dimen0 by \ht0 @@ -945,13 +952,15 @@ % \egroup} % \setbox\scratchbox\hbox - {\hskip\lastMPmoveX bp\raise\lastMPmoveY bp\box\scratchbox}% + {\hskip\lastMPmoveX\onebasepoint\raise\lastMPmoveY\onebasepoint\box\scratchbox}% \ht\scratchbox\zeropoint \dp\scratchbox\zeropoint \wd\scratchbox\zeropoint \box\scratchbox \egroup} +\let\handleMPfshow\dohandleMPfshow % so we can overload this one later + %D You could consider the following definition to be the most %D natural one. @@ -962,7 +971,7 @@ %D However, the following implementation is more robust, since %D some fonts have funny visible spaces in the space slot. This %D gives a mismatch between the space that \METAPOST\ took into -%D account and the \citeer {natural} space. This only happens in +%D account and the \quote {natural} space. This only happens in %D labels, since \type {btex}||\type {etex} thingies don't have %D spaces. This phenomena showed up when preparing the %D \METAFUN\ manual, where Palatino fonts are used. We can @@ -987,11 +996,11 @@ \def\handleMPsetdash {\bgroup \def\somestring{[}% - \scratchcounter1 + \scratchcounter\plusone \loop \ifnum\scratchcounter<\nofMParguments \edef\somestring{\somestring\space\gMPa\scratchcounter}% - \advance\scratchcounter 1 + \advance\scratchcounter \plusone \repeat \edef\somestring{\somestring]\gMPa\scratchcounter\space d}% \PDFcode{\somestring}% @@ -1001,11 +1010,11 @@ %D two alternatives, that result in a similar look in both %D $x$- and $y$-dorection. As John Hobby says: %D -%D \startsmaller \switchtobodyfont[ss] -%D \starttypen +%D \startnarrower \switchtobodyfont[ss] +%D \starttyping %D x 0 dtransform exch truncate exch idtransform pop setlinewidth %D 0 y dtransform truncate idtransform setlinewidth pop -%D \stoptypen +%D \stoptyping %D %D These are just fancy versions of \type{x setlinewidth} and %D \type{y setlinewidth}. The \type{x 0 ...} form is used if @@ -1019,13 +1028,13 @@ %D conversion rules cause a horizontal or vertical line of %D integer width $n$ in device space to come out $n+1$ pixels %D wide, regardless of the phase relative to the pixel grid.) -%D \stopsmaller +%D \stopnarrower %D %D The common operator in these sequences is \type{dtransform}, %D so we can use this one to trigger setting the linewidth. \def\handleMPdtransform - {\ifdim\gMPa1pt>\zeropoint + {\ifdim\gMPa1\onepoint>\zeropoint \PDFcode{\gMPa1 w}% \def\next##1 ##2 ##3 ##4 ##5 ##6 {\handleMPsequence}% \else @@ -1052,13 +1061,13 @@ %D In \METAPOST\ there are three ways to handle a path $p$: %D -%D \starttypen +%D \starttyping %D draw p; fill p; filldraw p; -%D \stoptypen +%D \stoptyping %D %D The last case outputs a \type{gsave fill grestore} before %D \type{stroke}. Handling the path outside the main loops -%D saves about 40\% run time.\voetnoot{We can save some more by +%D saves about 40\% run time.\footnote{We can save some more by %D following the \METAPOST\ output routine, but for the moment %D we keep things simple.} Switching between the main loop and %D the path loop is done by means of the recursely called @@ -1069,7 +1078,7 @@ \let\closeMPpath\relax \let\flushMPpath\flushnormalMPpath \resetMPstack - \nofMPsegments1 + \nofMPsegments\plusone \let\handleMPsequence\dohandleMPpath \dohandleMPpath} @@ -1077,7 +1086,8 @@ %D split up the routine in two. \def\flushnormalMPsegment - {\expandafter\ifcase\getMPkeyword{\the\nofMPsegments}\relax +% {\expandafter\ifcase\getMPkeyword\relax % {\the\nofMPsegments}\relax + {\ifcase\getMPkeyword\relax % {\the\nofMPsegments}\relax \PDFcode{\!MPgMPs1 \!MPgMPs2 l}% \or \PDFcode{\!MPgMPs1 \!MPgMPs2 \!MPgMPs3 \!MPgMPs4 \!MPgMPs5 \!MPgMPs6 c}% @@ -1089,17 +1099,9 @@ \PDFcode{\!MP\lastMPmoveX\space \!MP\lastMPmoveY\space m}% \fi} -\def\flushnormalMPpath - {\scratchcounter\nofMPsegments - \nofMPsegments1 - \loop - \flushnormalMPsegment - \advance\nofMPsegments 1 - \ifnum\nofMPsegments<\scratchcounter - \repeat} - \def\flushconcatMPsegment - {\expandafter\ifcase\getMPkeyword{\the\nofMPsegments}\relax +% {\expandafter\ifcase\getMPkeyword\relax % {\the\nofMPsegments}\relax + {\ifcase\getMPkeyword\relax % {\the\nofMPsegments}\relax \doMPconcat{\gMPs1}\a{\gMPs2}\b% \PDFcode{\!MP\a\space\!MP\b\space l}% \or @@ -1122,23 +1124,49 @@ \PDFcode{\!MP\a\space\!MP\b\space m}% \fi} -\def\flushconcatMPpath +% \def\flushnormalMPpath +% {\scratchcounter\nofMPsegments +% \nofMPsegments\plusone +% \loop +% \flushnormalMPsegment +% \advance\nofMPsegments \plusone +% \ifnum\nofMPsegments<\scratchcounter +% \repeat} +% +% \def\flushconcatMPpath +% {\scratchcounter\nofMPsegments +% \nofMPsegments\plusone +% \loop +% \flushconcatMPsegment +% \advance\nofMPsegments \plusone +% \ifnum\nofMPsegments<\scratchcounter +% \repeat} +% +% an alternative is presented below: (no \def assignment) + +\def\doflushsomeMPpath + {\dodoflushsomeMPpath + \advance\nofMPsegments \plusone + \ifnum\nofMPsegments<\scratchcounter + \expandafter\doflushsomeMPpath + \fi} + +\def\flushsomeMPpath {\scratchcounter\nofMPsegments - \nofMPsegments1 - \loop - \flushconcatMPsegment - \advance\nofMPsegments 1 - \ifnum\nofMPsegments<\scratchcounter - \repeat} + \nofMPsegments\plusone + \doflushsomeMPpath} + +\def\flushnormalMPpath{\let\dodoflushsomeMPpath\flushnormalMPsegment\flushsomeMPpath} +\def\flushconcatMPpath{\let\dodoflushsomeMPpath\flushconcatMPsegment\flushsomeMPpath} %D The transformation of the coordinates is handled by one of %D the macros Tanmoy posted to the \PDFTEX\ mailing list. %D I rewrote and optimized the original macro to suit the other %D macros in this module. %D -%D \starttypen +%D \starttyping %D \doMPconcat {x position} \xresult {y position} \yresult -%D \stoptypen +%D \stoptyping %D %D By setting the auxiliary \DIMENSIONS\ \type{\dimen0} upto %D \type{\dimen10} only once per path, we save over 20\% run @@ -1192,7 +1220,7 @@ {\dimen 8=\zeropoint % t_x \dimen10=\zeropoint} % t_y -%D \starttypen +%D \starttyping %D \def\doMPconcat#1#2#3#4% %D {\dimen12=#1 pt \doMPreducedimen12 % p_x %D \dimen14=#3 pt \doMPreducedimen14 % p_y @@ -1231,12 +1259,12 @@ %D % %D \edef#2{\withoutpt\the\dimen18}% % p_x^\prime %D \edef#4{\withoutpt\the\dimen12}} % p_y^\prime -%D \stoptypen +%D \stoptyping %D The following optimization resulted from some tests by %D and email exchanges with Sanjoy Mahajan. %D -%D \starttypen +%D \starttyping %D \def\doMPconcat#1#2#3#4% %D {\dimen12=#1 pt \doMPreducedimen12 % p_x %D \dimen14=#3 pt \doMPreducedimen14 % p_y @@ -1283,7 +1311,7 @@ %D % %D \edef#2{\withoutpt\the\dimen18}% % p_x^\prime %D \edef#4{\withoutpt\the\dimen12}} % p_y^\prime -%D \stoptypen +%D \stoptyping %D %D But, this one is still too inaccurate, so we now have: @@ -1369,18 +1397,18 @@ {\dimen12=#1pt % p_x \dimen14=#3pt % p_y % - \chardef\MPfactor0 + \chardef\MPfactor\zerocount \ifdim\dimen4<\MPcriteriumB\ifdim\dimen4>-\MPcriteriumB \ifdim\dimen6<\MPcriteriumB\ifdim\dimen6>-\MPcriteriumB \ifdim\dimen8<\MPcriteriumB\ifdim\dimen8>-\MPcriteriumB \ifdim\dimen10<\MPcriteriumB\ifdim\dimen10>-\MPcriteriumB - \chardef\MPfactor1 + \chardef\MPfactor\plusone \fi\fi \fi\fi \fi\fi \fi\fi - \ifcase\MPfactor0 - \chardef\MPfactor1 + \ifcase\MPfactor % spurious 0 removed + \chardef\MPfactor\plusone \ifdim\dimen12<\MPcriteriumA\ifdim\dimen12>-\MPcriteriumA \ifdim\dimen14<\MPcriteriumA\ifdim\dimen14>-\MPcriteriumA \chardef\MPfactor16 @@ -1446,7 +1474,7 @@ %D \METAPOST\ to \PDF\ conversion however only needs %D transformation. -%M \start \switchnaarkorps [ss] +%M \start \switchtobodyfont [ss] %D Given a point $(U_x, U_y)$ in user coordinates, the business %D of \POSTSCRIPT\ is to convert it to device space. Let us say @@ -1454,37 +1482,37 @@ %D \POSTSCRIPT\ $(D_x, D_y)$ can be written in terms of %D $(U_x, U_y)$ in matrix notation, either as %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D \pmatrix{D_x&D_y&1\cr} = \pmatrix{U_x&U_y&1\cr} %D \pmatrix{s_x&r_x&0\cr %D r_y&s_y&0\cr %D t_x&t_y&1\cr} -%D \stopformule +%D \stopformula %D %D or %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D \pmatrix{D_x\cr D_y\cr 1} = \pmatrix{s_x&r_y&t_x\cr %D r_x&s_y&t_y\cr %D 0 &0 &1 \cr} %D \pmatrix{U_x\cr %D U_y\cr %D 1 \cr} -%D \stopformule +%D \stopformula %D %D both of which is a shorthand for the same set of equations: %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D D_x = s_x U_x + r_y U_y + t_x -%D \stopformule +%D \stopformula %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D D_y = r_x U_x + s_y U_y + t_y -%D \stopformule +%D \stopformula %D %D which define what is called an `affine transformation'. %D @@ -1501,7 +1529,7 @@ %D $[s_x\, r_x\, r_y\, s_y\, t_x\, t_y]$ and you say \typ{[a b %D c d e f] concat}, this means: %D -%D \startsmaller +%D \startnarrower %D Take the user space coordinates and transform them to an %D intermediate set of coordinates using array $[a\, b\, c\, d\, %D e\, f]$ as the transformation matrix. @@ -1509,29 +1537,29 @@ %D Take the intermediate set of coordinates and change them to %D device coordinates using array $[s_x\, r_x\, r_y\, s_y\, t_x\, t_y]$ %D as the transformation matrix. -%D \stopsmaller +%D \stopnarrower %D %D Well, what is the net effect? In matrix notation, it is %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D \pmatrix{I_x\cr I_y\cr 1\cr} = \pmatrix{a&c&e\cr %D b&d&f\cr %D 0&0&1\cr} %D \pmatrix{U_x\cr %D U_y\cr %D 1 \cr} -%D \stopformule +%D \stopformula %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D \pmatrix{D_y\cr D_y\cr 1\cr} = \pmatrix{s_x&r_y&t_x\cr %D r_x&s_y&t_y\cr %D 0 &0 &1 \cr} %D \pmatrix{I_x\cr %D I_y\cr %D 1 \cr} -%D \stopformule +%D \stopformula %D %D where $(I_x, I_y)$ is the intermediate coordinate. %D @@ -1539,26 +1567,26 @@ %D a chain of such matrix equations, one can always compose %D them into one matrix equation using the standard matrix %D composition law. The composite matrix from two matrices can -%D be derived very easily: the element in the $i$\hoog{th} -%D horizontal row and $j$\hoog{th} vertical column is -%D calculated by`multiplying' the $i$\hoog{th} row of the first -%D matrix and the $j$\hoog{th} column of the second matrix (and +%D be derived very easily: the element in the $i$\high{th} +%D horizontal row and $j$\high{th} vertical column is +%D calculated by`multiplying' the $i$\high{th} row of the first +%D matrix and the $j$\high{th} column of the second matrix (and %D summing over the elements). Thus, in the above: %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D \pmatrix{D_x\cr D_y\cr 1} = \pmatrix{s_x^\prime&r_y^\prime&t_x^\prime\cr %D r_x^\prime&s_y^\prime&t_y^\prime\cr %D 0 &0 &0 \cr} %D \pmatrix{U_x\cr %D U_y\cr %D 1 \cr} -%D \stopformule +%D \stopformula %D %D with %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D \eqalign %D {s_x^\prime & = s_x a + r_y b \cr %D r_x^\prime & = r_x a + s_y b \cr @@ -1566,7 +1594,7 @@ %D s_y^\prime & = r_x c + s_y d \cr %D t_x^\prime & = s_x e + r_y f + t_x \cr %D t_y^\prime & = r_x e + s_y f + t_y \cr} -%D \stopformule +%D \stopformula %D In fact, the same rule is true not only when one is going %D from user coordinates to device coordinates, but whenever @@ -1591,23 +1619,23 @@ %D acts on $(P_x^\prime, P_y^\prime)$, they produce $(P_x, %D P_y)$. That is we need to solve the set of equations: %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D \pmatrix{P_x\cr P_y\cr 1\cr} = \pmatrix{s_x&r_y&t_x\cr %D r_x&s_y&t_y\cr %D 0 &0 &1 \cr} %D \pmatrix{P_x^\prime\cr %D P_y^\prime\cr %D 1 \cr} -%D \stopformule +%D \stopformula %D %D Again matrix notation comes in handy (i.e. someone has %D already solved the problem for us): we need the inverse %D transformation matrix. The inverse transformation matrix can %D be calculated very easily: %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D \pmatrix{P_x^\prime\cr P_y^\prime\cr 1\cr} = %D \pmatrix{s_x^\prime&r_y^\prime&t_x^\prime\cr %D r_x^\prime&s_y^\prime&t_y^\prime\cr @@ -1615,12 +1643,12 @@ %D \pmatrix{P_x\cr %D P_y\cr %D 1 \cr} -%D \stopformule +%D \stopformula %D %D where, the inverse transformation matrix is given by %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D \eqalign %D {D & = s_x s_y - r_x r_y \cr %D s_x^\prime & = s_y / D \cr @@ -1629,22 +1657,22 @@ %D r_y^\prime & = - r_y / D \cr %D t_x^\prime & = ( - s_y t_x + r_y t_y ) / D \cr %D t_y^\prime & = ( r_x t_x - s_x t_y ) / D \cr} -%D \stopformule +%D \stopformula %D %D And you can see that when expanded out, this does %D give the formulas: %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D P_x^\prime = { { s_y(p_x-t_x) + r_y(t_y-p_y) } \over %D { s_x s_y-r_x r_y } } -%D \stopformule +%D \stopformula %D -%D \plaatsformule -%D \startformule +%D \placeformula +%D \startformula %D P_y^\prime = { { s_x(p_y-t_y) + r_x(t_x-p_x) } \over %D { s_x*s_y-r_x*r_y } } -%D \stopformule +%D \stopformula %D %D The code works by representing a real number by converting %D it to a dimension to be put into a \DIMENSION\ register: 2.3 would @@ -1684,7 +1712,7 @@ \fi \let\handleMPsequence\dohandleMPsequence \resetMPstack - \nofMPsegments0 + \nofMPsegments\zerocount \handleMPsequence} %D The following \METAPOST\ code is quite valid but, when @@ -1694,16 +1722,16 @@ %D between, is hard to determine, so we add an additional %D check. %D -%D \starttypen +%D \starttyping %D clip currentpicture to origin -- cycle ; %D setbounds currentpicture to fullsquare scaled 5cm ; -%D \stoptypen +%D \stoptyping \def\checkMPpath {\ifcase\finiMPpath \ifnum\nofMPsegments<3 % n is one ahead \message{omitting zero clip path}% - \nofMPsegments0 + \nofMPsegments\zerocount \fi \fi} @@ -1776,17 +1804,17 @@ %D The main conversion command is: %D -%D \starttypen +%D \starttyping %D \convertMPtoPDF {filename} {x scale} {y scale} -%D \stoptypen +%D \stoptyping %D %D The dimensions are derived from the bounding box. So we %D only have to say: %D -%D \starttypen +%D \starttyping %D \convertMPtoPDF{mp-pra-1.eps}{1}{1} %D \convertMPtoPDF{mp-pra-1.eps}{.5}{.5} -%D \stoptypen +%D \stoptyping %D \macros %D {makeMPintoPDFobject,lastPDFMPobject} @@ -1799,16 +1827,18 @@ %D This option defaults to~0, because \CONTEXT\ takes care %D of objects at another level, which saves some bytes. %D -%D \starttabulatie[|l|l|p|] +%D \starttabulate[|l|l|p|] %D \NC 0 \NC never \NC don't use an object \NC\NR %D \NC 1 \NC always \NC always use an object \NC\NR %D \NC 2 \NC optional \NC use object when needed \NC\NR -%D \stoptabulatie +%D \stoptabulate %D %D The last object number used is avaliable in the macro %D \type {\lastPDFMPobject}. -\chardef\makeMPintoPDFobject=0 \def\lastPDFMPobject{0} +\ifx\makeMPintoPDFobject\undefined \chardef\makeMPintoPDFobject=0 \fi + +\def\lastPDFMPobject{0} %D The additional code needed can be made available in the %D (global) macro \type {\currentPDFresources}. @@ -1817,14 +1847,16 @@ \newtoks\everyMPtoPDFconversion -\def\convertMPtoPDF#1#2#3% +\def\convertMPtoPDF % #1#2#3% {\bgroup \ifx\pdfdecimaldigits\undefined\else \pdfdecimaldigits=5 \fi % new \setbox\scratchbox\vbox\bgroup \forgetall \offinterlineskip \startMPresources - \doprocessMPtoPDFfile{#1}{#2}{#3}} % {#1}{0#2}{0#3} would be saver + \doprocessMPtoPDFfile} % {#1}{#2}{#3}} % {#1}{0#2}{0#3} would be saver + +%D The next one is kind of private and probably will become obsolete): \def\processMPtoPDFfile % file xscale yscale {\bgroup @@ -1832,13 +1864,24 @@ \doprocessMPtoPDFfile} \def\doprocessMPtoPDFfile#1#2#3% file xscale yscale - {\setMPspecials + {% the following line is needed for latex where onepoint is not + % onepoint but a number (maxdimen); some day i'll make a latex + % variant of this file so that i no longer have to deal with such + % issues; then i'll also speed up this module using a few context + % tricks + % + \let\onepoint\onerealpoint + % + \setMPspecials \the\everyMPtoPDFconversion \catcode`\^^M=\@@endofline \startMPscanning \let\do\empty \xdef\MPxscale{#2}% \xdef\MPyscale{#3}% + \xdef\MPxoffset{0}% + \xdef\MPyoffset{0}% + \xdef\MPyshift{\zeropoint}% \donefalse \let\handleMPsequence\dohandleMPsequence \message{[MP to PDF]}% was: [MP to PDF #1] but there is a (#1) anyway @@ -1899,18 +1942,6 @@ \def\finishMPgraphic {\stopMPresources \egroup - % we go simple when in doubt, this macro will get a proper - % context counterpart so that we can also cover dvipdfmx - \ifx\pdfxform\undefined - \chardef\makeMPintoPDFobject0 % no pdftex at all - \else\ifx\pdftexversion\undefined - \chardef\makeMPintoPDFobject0 % no pdftex at all - \else\ifnum\pdftexversion<14 - \chardef\makeMPintoPDFobject0 % no resource support - \fi\fi\fi - \ifcase\makeMPintoPDFobject\or\or\ifx\currentPDFresources\empty\else - \chardef\makeMPintoPDFobject1 - \fi\fi \setbox\scratchbox\vbox {\forgetall \hbox @@ -1920,35 +1951,60 @@ \ht\scratchbox\MPheight \wd\scratchbox\MPwidth \dp\scratchbox\zeropoint\relax + \dopackageMPgraphic\scratchbox + \egroup + \endinput} + +%D Alternative for \PDFTEX. We cannot come up with something more contexy +%D because this module is also used in \LATEX. + +\def\dopackageMPgraphic#1% #1 = boxregister + {%\ifx\pdfxform\undefined + % \chardef\makeMPintoPDFobject\zerocount % no pdftex at all + %\else\ifx\pdftexversion\undefined + % \chardef\makeMPintoPDFobject\zerocount % no pdftex at all + %\else\ifnum\pdftexversion<14 + % \chardef\makeMPintoPDFobject\zerocount % no resource support + %\else + % % keep the default value + %\fi\fi\fi + \ifcase\makeMPintoPDFobject\or\or\ifx\currentPDFresources\empty\else + % an existing value of 2 signals object support (set elsewhere) + \chardef\makeMPintoPDFobject\plusone + \fi\fi \ifcase\makeMPintoPDFobject - \box\scratchbox + \box#1% \or \scratchdimen\PDFMPformoffset\relax \ifdim\scratchdimen>\zeropoint % compensate for error - \setbox\scratchbox\vbox spread 2\scratchdimen - {\forgetall - \vss - \hbox spread 2\scratchdimen - {\hss - \box\scratchbox - \hss}% - \vss}% + \setbox#1\vbox spread 2\scratchdimen + {\forgetall\vss\hbox spread 2\scratchdimen{\hss\box#1\hss}\vss}% \fi - \immediate\pdfxform resources{\currentPDFresources}\scratchbox - \xdef\lastPDFMPobject{\the\pdflastxform}% + \setMPPDFobject{\currentPDFresources}{#1}% \ifdim\scratchdimen>\zeropoint % compensate for error \vbox to \MPheight - {\forgetall - \vss\hbox to \MPwidth{\hss\pdfrefxform\lastPDFMPobject\hss}\vss}% + {\forgetall\vss\hbox to \MPwidth{\hss\getMPPDFobject\hss}\vss}% \else - \pdfrefxform\lastPDFMPobject + \getMPPDFobject \fi \global\let\currentPDFresources\empty \else - \box\scratchbox - \fi - \egroup - \endinput} + \box#1% + \fi} + +\def\setMPPDFobject#1#2% resources boxnumber + {\ifx\pdfxform\undefined + \def\getMPPDFobject{\box#2}% + \else\ifx\pdftexversion\undefined + \def\getMPPDFobject{\box#2}% + \else\ifnum\pdftexversion<14 + \def\getMPPDFobject{\box#2}% + \else + \immediate\pdfxform resources{#1}#2% + \edef\getMPPDFobject{\noexpand\pdfrefxform\the\pdflastxform}% + \fi\fi\fi} + +\let\getMPPDFobject\relax %D \macros %D {deleteMPgraphic, @@ -1972,9 +2028,9 @@ %D We can limit the precision to two digits after the comma %D by saying: %D -%D \starttypen +%D \starttyping %D \twodigitMPoutput -%D \stoptypen +%D \stoptyping %D %D This option only works in \CONTEXT\ combined with \ETEX. @@ -1993,4 +2049,4 @@ \ifx\undefined\StopLatexHack \else \StopLatexHack \fi -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/supp-ran.tex b/tex/context/base/supp-ran.tex index 7e55988f0..8c83e6735 100644 --- a/tex/context/base/supp-ran.tex +++ b/tex/context/base/supp-ran.tex @@ -23,12 +23,12 @@ %D redefine some \TEX\ primitives. We also use different names %D for the two generators and add an extra one. %D -%D \starttypen +%D \starttyping %D \getrandomcount \countregister {minimum} {maximum} %D \getrandomdimen \dimenregister {minimum} {maximum} %D \getrandomnumber \macroname {minimum} {maximum} %D \getrandomfloat \macroname {minimum} {maximum} -%D \stoptypen +%D \stoptyping %D %D Of course the file \type{random.tex} needs to be present. %D To prevent name clashes, the \CONTEXT\ distribution @@ -36,15 +36,15 @@ %D %D The randomseed can be set by: %D -%D \starttypen +%D \starttyping %d \setrandomseed{number>0} -%D \stoptypen +%D \stoptyping %D %D and get by: %D -%D \starttypen +%D \starttyping %D \getrandomseed\randomseed -%D \stoptypen +%D \stoptyping \ifx\nextrandom\undefined diff --git a/tex/context/base/supp-spe.tex b/tex/context/base/supp-spe.tex index a03eb4ba2..d84859b59 100644 --- a/tex/context/base/supp-spe.tex +++ b/tex/context/base/supp-spe.tex @@ -25,17 +25,17 @@ %D When interpreting specials we need to do some basic scanning. %D For the moment we distinguish between three cases. We need %D -%D \starttypen +%D \starttyping %D \special{tag: arguments} %D \special{tag arguments} %D \special{tag} -%D \stoptypen +%D \stoptyping %D %D We cannot be sure that the first case isn't %D -%D \starttypen +%D \starttyping %D \special{tag:arguments} -%D \stoptypen +%D \stoptyping %D %D So we have to take care of that one too. @@ -72,9 +72,9 @@ %D %D Mimmicking specials is activated by saying: %D -%D \starttypen +%D \starttyping %D \mimmickspecials -%D \stoptypen +%D \stoptyping %D %D This commands redefines the \PLAIN\ \TEX\ primitive %D \type{\special}. @@ -126,10 +126,10 @@ %D %D Which results in: %D -%D \startregels -%D \haalbuffer[tmp-1] -%D \haalbuffer[tmp-2] -%D \stopregels +%D \startlines +%D \getbuffer[tmp-1] +%D \getbuffer[tmp-2] +%D \stoplines %D \macros %D {mimmickspecial} @@ -137,9 +137,9 @@ %D When needed, one can call a mimmicked special directly by %D saying for instance: %D -%D \starttypen +%D \starttyping %D \mimmickspecial a: \using...\endspecial -%D \stoptypen +%D \stoptyping %D %D This can be handy when specials have much in common. @@ -152,9 +152,9 @@ %D One can for instance ignore all further specials by saying %D \type{\normalspecial}: %D -%D \starttypen +%D \starttyping %D \def\defaultspecial#1{} -%D \stoptypen +%D \stoptyping %D %D But here we default to idle. diff --git a/tex/context/base/supp-tpi.tex b/tex/context/base/supp-tpi.tex index c01d1fef5..2feeeac18 100644 --- a/tex/context/base/supp-tpi.tex +++ b/tex/context/base/supp-tpi.tex @@ -46,9 +46,9 @@ %D offers some rather discutable, but nevertheless handy %D feature: %D -%D \starttypen +%D \starttyping %D \write18{execute program with arguments} -%D \stoptypen +%D \stoptyping %D %D Knowing this, I immediatelly decided to throw away the old %D conversion macros and use the marvelous \METAPOST, \TEX\ @@ -66,8 +66,8 @@ %D because we don't know in advance what actions to apply on %D it. %D -%D \plaatstabel[hier][tab:TPIC specials]{The \TPIC\ special syntax.} -%D \starttabel[|||l|] +%D \placetable[here][tab:TPIC specials]{The \TPIC\ special syntax.} +%D \starttable[|||l|] %D \HL %D \NC \bf tag \NC \bf arguments \NC \bf meaning \NC\SR %D \HL @@ -82,7 +82,7 @@ %D \NC ia \NC $x$ $y$ $r_x$ $r_y$ $b$ $e$ \NC fill (partial) arc \NC\MR %D \NC sh \NC $s$ \NC fill next path \NC\LR %D \HL -%D \stoptabel +%D \stoptable %D The first problem we have to take care of is the fact that %D there is no decent begin or end of the drawing process @@ -91,16 +91,16 @@ %D simply because else this is the most common used way to %D treat something \TEX\ as as a whole, like: %D -%D \starttypen +%D \starttyping %D \hbox{\special{}\special{}...} -%D \stoptypen +%D \stoptyping %D %D We just start a picture as soon as the first special is %D encountered, so this becomes: %D -%D \starttypen +%D \starttyping %D \hbox{\openpicture\newspecial{}\newspecial{}... -%D \stoptypen +%D \stoptyping %D The first step in opening the picture is to start a group. %D Now we can savely use the egroup that closes the box to also @@ -325,14 +325,14 @@ %D then most \DVI\ drivers do using the \TPIC\ prescribed %D b-splines. Take for instance the sequence: %D -%D \starttypen +%D \starttyping %D \special{pa 2000 1000} %D \special{pa 1000 2000} %D \special{pa 0000 1000} %D \special{pa 1000 0000} %D \special{pa 2000 1000} %D \special{sp} -%D \stoptypen +%D \stoptyping %D %D One would expect that this code produced a closed circle, %D but the curve that comes out using b-splines is far from diff --git a/tex/context/base/supp-vis.tex b/tex/context/base/supp-vis.tex index bf982d82f..af4004e2e 100644 --- a/tex/context/base/supp-vis.tex +++ b/tex/context/base/supp-vis.tex @@ -8,13 +8,13 @@ %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 \gdef\ShowBufferedExample% private typeseting macro -%D {\startregelcorrectie +%D {\startlinecorrection %D \bgroup -%D \steltypenin[marge=0pt,optie=kleur] +%D \setuptyping[margin=0pt,option=color] %D \showmakeup %D \centeredvcuetrue %D \dontinterfere @@ -23,15 +23,15 @@ %D {\normalhbox to \hsize %D {$\hsize=.5\hsize %D \advance\hsize by -.5em -%D \normalvcenter{\vbox{\haalbuffer}}\normalhss +%D \normalvcenter{\vbox{\getbuffer}}\normalhss %D \normalvcenter{\vbox{\dontshowcomposition\typebuffer}}$}} %D \egroup -%D \stopregelcorrectie} +%D \stoplinecorrection} %D %D \gdef\ShowBufferedExampleBox% private typeseting macro -%D {\startregelcorrectie +%D {\startlinecorrection %D \bgroup -%D \steltypenin[marge=0pt,optie=kleur] +%D \setuptyping[margin=0pt,option=color] %D \showmakeup %D \centeredvcuetrue %D \dontinterfere @@ -40,10 +40,10 @@ %D {\normalhbox to \hsize %D {$\hsize=.5\hsize %D \advance\hsize by -.5em -%D \normalvcenter{\baselineruletrue\vbox{\haalbuffer}}\normalhss +%D \normalvcenter{\baselineruletrue\vbox{\getbuffer}}\normalhss %D \normalvcenter{\vbox{\dontshowcomposition\typebuffer}}$}} %D \egroup -%D \stopregelcorrectie} +%D \stoplinecorrection} %D Although an integral part of \CONTEXT, this module is one %D of the support modules. Its stand alone character permits @@ -53,8 +53,8 @@ %D that does not support buffering. In \CONTEXT\ we show the %D commands in the margin, use bit more advanced way of %D numbering, and typeset the source in \TEX nicolored -%D verbatim. Sorry for this inconvenience.\fi -%D +%D verbatim. Sorry for this inconvenience.\fi +%D %D Depending on my personal needs and those of whoever uses it, %D the macros will be improved in terms of visualization, %D efficiency and compatibility. These rather low level @@ -62,7 +62,7 @@ %D visualize baselines, the page layout and whatever deserves %D attention. Most of those macros can be found in \type %D {core-vis} and other core modules. Their integration in -%D \CONTEXT\ prohibits generic applications. +%D \CONTEXT\ prohibits generic applications. \ifx \undefined \writestatus \input supp-mis.tex \fi @@ -121,13 +121,18 @@ {\hbadness\!!tenthousand \vbadness\hbadness \hfuzz \maxdimen \vfuzz \hfuzz} +% This obsolete dutch name is sometimes uses in manual styles; when +% cleaning up the codebase I decided to move this definition here. + +\let\mindermeldingen\dontcomplain + %D \macros %D {normaloffinterlineskip} %D -%D The next hack is needed because in \CONTEXT\ we redefine -%D \type{\offinterlineskip}. +%D The next hack is needed because in \CONTEXT\ we redefine +%D \type{\offinterlineskip}. -\ifx\undefined\normaloffinterlineskip +\ifx\undefined\normaloffinterlineskip \let\normaloffinterlineskip\offinterlineskip \fi @@ -141,10 +146,10 @@ %D baseline behavior. Especially \type{\vtop}'s need our %D special attention. -\ifx \normalhbox \undefined \let \normalhbox = \hbox \fi -\ifx \normalvbox \undefined \let \normalvbox = \vbox \fi -\ifx \normalvtop \undefined \let \normalvtop = \vtop \fi -\ifx \normalvcenter \undefined \let \normalvcenter = \vcenter \fi +\ifx \normalhbox \undefined \let \normalhbox = \hbox \fi +\ifx \normalvbox \undefined \let \normalvbox = \vbox \fi +\ifx \normalvtop \undefined \let \normalvtop = \vtop \fi +\ifx \normalvcenter \undefined \let \normalvcenter = \vcenter \fi %D \macros %D {normalhskip, @@ -238,14 +243,14 @@ %D option off in those (unpredictable) situations, we just %D redefine a few \PLAIN\ macros. -\ifx\tlap\undefined +\ifx\tlap\undefined \def\rlap#1{\normalhbox to \zeropoint{#1\normalhss}} \def\llap#1{\normalhbox to \zeropoint{\normalhss#1}} \def\blap#1{\normalvbox to \zeropoint{#1\normalvss}} \def\tlap#1{\normalvbox to \zeropoint{\normalvss#1}} -\fi +\fi \def~{\normalpenalty\!!tenthousand\ } @@ -253,25 +258,25 @@ %D {makeruledbox} %D %D Ruled boxes can be typeset is many ways. Here we present -%D just one alternative. This implementation may be a little -%D complicated, but it supports all three kind of boxes. The -%D next command expects a \BOX\ specification, like: +%D just one alternative. This implementation may be a little +%D complicated, but it supports all three kind of boxes. The +%D next command expects a \BOX\ specification, like: %D -%D \starttypen +%D \starttyping %D \makeruledbox0 -%D \stoptypen +%D \stoptyping %D \macros %D {baselinerule,baselinefill} -%D +%D %D We can make the baseline of a box visible, both dashed and -%D as a rule. The line is drawn on top of the baseline. All +%D as a rule. The line is drawn on top of the baseline. All %D we have to say is: %D -%D \starttypen +%D \starttyping %D \baselineruletrue %D \baselinefilltrue -%D \stoptypen +%D \stoptyping %D %D At the cost of some overhead these alternatives are %D implemented using \type{\if}'s: @@ -281,15 +286,15 @@ %D \macros %D {iftoprule,ifbottomrule,ifleftrule,ifrightrule} -%D +%D %D Rules can be turned on and off, but by default we have: %D -%D \starttypen +%D \starttyping %D \topruletrue %D \bottomruletrue %D \leftruletrue %D \rightruletrue -%D \stoptypen +%D \stoptyping %D %D As we see below: @@ -300,14 +305,14 @@ %D \macros %D {boxrulewidth} -%D +%D %D The width in the surrounding rules can be specified by %D assigning an apropriate value to the dimension used. This %D module defaults the width to: %D -%D \starttypen +%D \starttyping %D \boxrulewidth=.2pt -%D \stoptypen +%D \stoptyping %D %D Although we are already low on \DIMENSIONS\ it's best to %D spend one here, mainly because it enables easy manipulation, @@ -321,12 +326,12 @@ %D \type{\vtop}'s and \type{\vbox}'es behave the way we expect %D them to do. %D -%D \startregelcorrectie +%D \startlinecorrection %D \hbox %D {\ruledhbox to 5em{\strut test\normalhss}\hskip1em %D \ruledvbox{\hsize 5em\strut test \par test\strut}\hskip1em %D \ruledvtop{\hsize 5em\strut test \par test\strut}} -%D \stopregelcorrectie +%D \stoplinecorrection %D %D The \type{\cleaders} part of the macro is responsible for %D the visual baseline. The \type{\normalhfill} belongs to this @@ -389,21 +394,21 @@ %D Just in case one didn't notice: the rules are in fact layed %D over the box. This way the contents of a box cannot %D visually interfere with the rules around (upon) it. A more -%D advanced version of ruled boxes can be found in one of the -%D core modules of \CONTEXT. There we take offsets, color, +%D advanced version of ruled boxes can be found in one of the +%D core modules of \CONTEXT. There we take offsets, color, %D rounded corners, backgrounds and alignment into account too. %D \macros %D {ruledhbox, %D ruledvbox,ruledvtop, %D ruledvcenter} -%D +%D %D These macro's can be used instead of \type{\hbox}, %D \type{\vbox}, \type{\vtop} and, when in math mode, %D \type{\vcenter}. They just do what their names state. Using %D an auxiliary macro would save us a few words of memory, but -%D it would make their appearance even more obscure. -%D +%D it would make their appearance even more obscure. +%D %D \startbuffer %D \hbox %D {\strut @@ -459,11 +464,11 @@ %D \startbuffer %D \hbox -%D {$\vcenter{\hsize.2\hsize +%D {$\vcenter{\hsize.2\hsize %D alfa \par beta}$ -%D $\vcenter to 3cm{\hsize.2\hsize +%D $\vcenter to 3cm{\hsize.2\hsize %D alfa \par beta \par gamma}$ -%D $\vcenter{\hsize.2\hsize +%D $\vcenter{\hsize.2\hsize %D alfa \par beta}$} %D \stopbuffer %D @@ -490,16 +495,16 @@ %D with \type{\ruledbox} and afterwards --- when the macro %D satisfy the needs --- let it to \type{\relax}. %D -%D \starttypen +%D \starttyping %D \ruledbox\hbox{What rules do you mean?} -%D \stoptypen +%D \stoptyping %D %D The macro \type{\setruledbox} can be used to directly %D rule a box. %D -%D \starttypen +%D \starttyping %D \setruledbox12=\hbox{Who's talking about rules here?} -%D \stoptypen +%D \stoptyping %D %D At the cost of some extra macros we can implement a %D variant that does not need the~\type{=}, but we stick to: @@ -521,19 +526,19 @@ %D variables, that tell us a bit more about the registers we %D use: %D -%D \starttypen +%D \starttyping %D \ifflexible %D \ifzero %D \ifnegative %D \ifpositive -%D \stoptypen +%D \stoptyping %D %D These status variables are set when we call for one of the %D investigation macros, e.g. %D -%D \starttypen +%D \starttyping %D \investigateskip\scratchskip -%D \stoptypen +%D \stoptyping %D %D We use some dirty trick to check stretchability of \SKIPS. %D Users of these macros are invited to study their exact @@ -562,6 +567,33 @@ \negativefalse \else \negativetrue \fi} +% etex +% +% \def\investigateskip#1% +% {\relax +% \ifdim\scratchskip=\zeropoint +% \ifdim\gluestretch\scratchskip=\zeropoint +% \ifdim\glueshrink\scratchskip=\zeropoint +% \flexiblefalse +% \else +% \flexibletrue +% \fi +% \else +% \flexibletrue +% \fi +% \else +% \flexibletrue +% \fi +% \ifdim#1=\zeropoint\relax +% \zerotrue \else +% \zerofalse \fi +% \ifdim#1<\zeropoint\relax +% \positivefalse \else +% \positivetrue \fi +% \ifdim#1>\zeropoint\relax +% \negativefalse \else +% \negativetrue \fi} + \def\investigatecount#1% {\relax \flexiblefalse @@ -610,43 +642,43 @@ %D \macros %D {ifcenteredvcue,normalvcue} %D -%D Depending on the context, one can force visual vertical cues -%D being centered along \type{\hsize} or being put at the -%D current position. Although centering often looks better, -%D we've chosen the second alternative as default. The main -%D reason for doing so is that often when we don't set the -%D \type{\hsize} ourselves, \TEX\ takes the value of the -%D surrounding box. As a result the visual cues can migrate -%D outside the current context. -%D -%D This behavior is accomplished by a small but effective -%D auxiliary macro, which behavior can be influenced by the -%D boolean \type{\centeredvcue}. By saying -%D -%D \starttypen +%D Depending on the context, one can force visual vertical cues +%D being centered along \type{\hsize} or being put at the +%D current position. Although centering often looks better, +%D we've chosen the second alternative as default. The main +%D reason for doing so is that often when we don't set the +%D \type{\hsize} ourselves, \TEX\ takes the value of the +%D surrounding box. As a result the visual cues can migrate +%D outside the current context. +%D +%D This behavior is accomplished by a small but effective +%D auxiliary macro, which behavior can be influenced by the +%D boolean \type{\centeredvcue}. By saying +%D +%D \starttyping %D \centeredvcuetrue -%D \stoptypen -%D -%D one turns centering on. As said, we turn it off. +%D \stoptyping +%D +%D one turns centering on. As said, we turn it off. \newif\ifcenteredvcue \centeredvcuefalse \def\normalvcue#1% {\normalhbox \ifcenteredvcue to \hsize \fi {\normalhss#1\normalhss}} -%D We could have used the more robust version -%D -%D \starttypen +%D We could have used the more robust version +%D +%D \starttyping %D \def\normalvcue% %D {\normalhbox \ifcenteredvcue to \hsize \fi %D \bgroup\bgroup\normalhss %D \aftergroup\normalhss\aftergroup\egroup %D \let\next=} -%D \stoptypen -%D -%D or the probably best one: -%D -%D \starttypen +%D \stoptyping +%D +%D or the probably best one: +%D +%D \starttyping %D \def\normalvcue% %D {\hbox \ifcenteredvcue to \hsize %D \bgroup\bgroup\normalhss @@ -655,10 +687,10 @@ %D \bgroup %D \fi %D \let\next=} -%D \stoptypen -%D -%D Because we don't have to preserve \CATCODES\ and only use -%D small arguments, we stick to the first alternative. +%D \stoptyping +%D +%D Because we don't have to preserve \CATCODES\ and only use +%D small arguments, we stick to the first alternative. %D \macros %D {testrulewidth} @@ -671,9 +703,9 @@ %D As with ruled boxes, we use a \DIMENSION\ to specify the %D width of the ruled elements. This dimension defaults to: %D -%D \starttypen +%D \starttyping %D \testrulewidth=\boxrulewidth -%D \stoptypen +%D \stoptyping %D %D Because we prefer whole numbers for specifying the %D dimensions, we often use even multiples of @@ -681,14 +713,14 @@ %D \macros %D {visiblestretch} -%D +%D %D A second variable is introduced because of the stretch %D components of \SKIPS. At the cost of some accuracy we can -%D make this stretch visible. -%D -%D \starttypen +%D make this stretch visible. +%D +%D \starttyping %D \visiblestretchtrue -%D \stoptypen +%D \stoptyping \newdimen\testrulewidth \testrulewidth=\boxrulewidth \newif\ifvisiblestretch \visiblestretchfalse @@ -709,9 +741,9 @@ \def\setvisiblehfilbox#1\to#2#3#4% {\setbox#1\normalhbox {\visualvrule - \!!width#2\testrulewidth + \!!width #2\testrulewidth \!!height#3\testrulewidth - \!!depth#4\testrulewidth}% + \!!depth #4\testrulewidth}% \smashbox#1} \def\doruledhfiller#1#2#3#4% @@ -736,59 +768,59 @@ \egroup} %D The horizontal fillers differ in their boundary -%D visualization. Watch the small dots. Fillers can be -%D combined within reasonable margins. +%D visualization. Watch the small dots. Fillers can be +%D combined within reasonable margins. %D -%D \startregelcorrectie +%D \startlinecorrection %D \baselinerulefalse %D \ruledhbox to \hsize %D {\strut\type{\hss}\ruledhss test} -%D \stopregelcorrectie +%D \stoplinecorrection %D -%D \startregelcorrectie +%D \startlinecorrection %D \baselinerulefalse %D \ruledhbox to \hsize %D {\strut\type{\hfil}\ruledhfil test} -%D \stopregelcorrectie +%D \stoplinecorrection %D -%D \startregelcorrectie +%D \startlinecorrection %D \baselinerulefalse %D \ruledhbox to \hsize %D {\strut\type{\hfill}\ruledhfill test} -%D \stopregelcorrectie +%D \stoplinecorrection %D -%D \startregelcorrectie +%D \startlinecorrection %D \baselinerulefalse %D \ruledhbox to \hsize %D {\strut -%D \type{\hfil}\type{\hfil}\ruledhfil\ruledhfil +%D \type{\hfil}\type{\hfil}\ruledhfil\ruledhfil %D test% %D \ruledhfil\type{\hfil}} -%D \stopregelcorrectie +%D \stoplinecorrection %D %D The negative counterparts are visualizes, but seldom %D become visible, apart from their boundaries. %D -%D \startregelcorrectie +%D \startlinecorrection %D \baselinerulefalse %D \ruledhbox to \hsize %D {\strut\type{\hfilneg}\ruledhfilneg test} -%D \stopregelcorrectie +%D \stoplinecorrection %D -%D \startregelcorrectie +%D \startlinecorrection %D \baselinerulefalse %D \ruledhbox to \hsize %D {\strut\type{\hfillneg}\ruledhfillneg test} -%D \stopregelcorrectie +%D \stoplinecorrection %D %D Although leaders are used for visualizing, they are %D visualized themselves correctly as the next example shows. %D -%D \startregelcorrectie +%D \startlinecorrection %D \baselinerulefalse %D \ruledhbox to \hsize %D {\strut\cleaders\normalhbox to 2em{\normalhss$\circ$\normalhss}\ruledhfill} -%D \stopregelcorrectie +%D \stoplinecorrection %D %D All five substitutions use the same auxiliary macro. Watch %D the positive first -- negative next approach. @@ -819,9 +851,9 @@ \def\setvisiblevfilbox#1\to#2#3#4% {\setbox#1\normalhbox {\visualvrule - \!!width#2\testrulewidth + \!!width #2\testrulewidth \!!height#3\testrulewidth - \!!depth#4\testrulewidth}% + \!!depth #4\testrulewidth}% \smashbox#1}% \def\doruledvfiller#1#2#3% @@ -831,12 +863,12 @@ \dontcomplain \normaloffinterlineskip \setvisiblevfilbox0\to422% - \setbox2\normalvcue + \setbox2\normalvcue {\normalhskip -#3\testrulewidth\copy0}% \smashbox2% \copy2 \bgroup - \setbox2\normalvcue + \setbox2\normalvcue {\normalhskip -2\testrulewidth\copy0}% \smashbox2% \copy2 @@ -855,7 +887,7 @@ %D Because they act the same as their horizontal counterparts %D we only show a few examples. %D -%D \startregelcorrectie +%D \startlinecorrection %D \hbox to \hsize %D {\dontinterfere %D \baselinerulefalse @@ -875,36 +907,27 @@ %D \ruledvbox to 10ex %D {\hsize.18\hsize %D \type{\vfillneg}\ruledvfillneg last line}} -%D \stopregelcorrectie -%D +%D \stoplinecorrection +%D %D Keep in mind that \type{\vfillneg} is not part of \PLAIN\ -%D \TEX, but are mimmicked by a macro. - -\unexpanded\def\ruledvss - {\doruledvfiller\normalvss\normalvfilneg{2}} - -\unexpanded\def\ruledvfil - {\doruledvfiller\normalvfil\normalvfilneg{-4}} +%D \TEX, but are mimmicked by a macro. -\unexpanded\def\ruledvfill - {\doruledvfiller\normalvfill\normalvfillneg{-12}} - -\unexpanded\def\ruledvfilneg - {\doruledvfiller\normalvfilneg\normalvfil{8}} - -\unexpanded\def\ruledvfillneg - {\doruledvfiller\normalvfillneg\normalvfill{16}} +\unexpanded\def\ruledvss {\doruledvfiller\normalvss \normalvfilneg {2}} +\unexpanded\def\ruledvfil {\doruledvfiller\normalvfil \normalvfilneg {-4}} +\unexpanded\def\ruledvfill {\doruledvfiller\normalvfill \normalvfillneg{-12}} +\unexpanded\def\ruledvfilneg {\doruledvfiller\normalvfilneg \normalvfil {8}} +\unexpanded\def\ruledvfillneg{\doruledvfiller\normalvfillneg\normalvfill {16}} %D \macros %D {ruledhskip} %D %D Skips differ from kerns in two important aspects: %D -%D \startopsomming[opelkaar] -%D \som line and pagebreaks are allowed at a skip -%D \som skips can have a positive and/or negative +%D \startitemize[packed] +%D \item line and pagebreaks are allowed at a skip +%D \item skips can have a positive and/or negative %D stretchcomponent -%D \stopopsomming +%D \stopitemize %D %D Stated a bit different: kerns are fixed skips at which no %D line or pagebreak can occur. Because skips have a more open @@ -960,7 +983,7 @@ \fi \normalhfill \ifflexible - \normalhskip\ifnegative\else-\fi\scratchskip + \normalhskip\ifnegative\else-\fi\scratchskip \normalhskip2\testrulewidth \cleaders \normalhbox @@ -1018,20 +1041,20 @@ %D test} %D \stopbuffer %D -%D \startregelcorrectie +%D \startlinecorrection %D \showmakeup -%D \haalbuffer -%D \stopregelcorrectie +%D \getbuffer +%D \stoplinecorrection %D -%D \startregelcorrectie +%D \startlinecorrection %D \showmakeup %D \visiblestretchtrue -%D \haalbuffer -%D \stopregelcorrectie +%D \getbuffer +%D \stoplinecorrection %D -%D \startregelcorrectie -%D \haalbuffer -%D \stopregelcorrectie +%D \startlinecorrection +%D \getbuffer +%D \stoplinecorrection %D \macros %D {ruledvskip} @@ -1064,9 +1087,9 @@ %D %D \ShowBufferedExample %D -%D We have to postpone \type{\prevdepth}. Although this -%D precaution probably is not completely waterproof, it works -%D quite well. +%D We have to postpone \type{\prevdepth}. Although this +%D precaution probably is not completely waterproof, it works +%D quite well. \def\dodoruledvskip {\nextdepth\prevdepth @@ -1122,12 +1145,12 @@ \smashbox0% \fi \ifvisiblestretch - \ifflexible - \skip2\scratchskip + \ifflexible + \skip2\scratchskip \advance\skip2 -1\scratchskip - \divide\skip2 2 - \advance\scratchskip -\skip2 - \normalvskip\skip2 + \divide\skip2 2 + \advance\scratchskip -\skip2 + \normalvskip\skip2 \fi \fi \normalpenalty\!!tenthousand @@ -1180,8 +1203,8 @@ %D %D Positive and negative kerns are placed on top or below the %D baseline, so we are able to track their added result. We -%D didn't mention spacings of 0~pt yet. Zero values are -%D visualized a bit different, because we want to see them +%D didn't mention spacings of 0~pt yet. Zero values are +%D visualized a bit different, because we want to see them %D anyhow. \def\doruledhkern @@ -1255,8 +1278,8 @@ %D %D \ShowBufferedExample %D -%D Like before, we have to postpone \type{\prevdepth}. If we -%D leave out this trick, we got ourselves some wrong spacing. +%D Like before, we have to postpone \type{\prevdepth}. If we +%D leave out this trick, we got ourselves some wrong spacing. \def\dodoruledvkern {\nextdepth\prevdepth @@ -1299,7 +1322,7 @@ \smashbox0% \setbox0\normalvbox {\ifnegative\normalvskip\scratchskip\fi - \normalvcue + \normalvcue {\ifnegative\normalhskip-16\testrulewidth\fi\box0}}% \smashbox0% \normalpenalty\!!tenthousand @@ -1332,11 +1355,11 @@ \normalkern} %D A a bit more \TEX nice solution is: -%D -%D \starttypen +%D +%D \starttyping %D \unexpanded\def\ruledkern% %D {\csname ruled\ifvmode v\else h\fi kern\endcsname\normalkern} -%D \stoptypen +%D \stoptyping %D \macros %D {ruledhglue,ruledvglue} @@ -1393,7 +1416,7 @@ \def\doruledvglue {\endgraf % \par - \nextdepth\prevdepth + \nextdepth\prevdepth \visualhrule\!!height\zeropoint \normalpenalty\!!tenthousand \ruledvkern\normalvskip\scratchskip @@ -1520,7 +1543,7 @@ %D size. The next example shows the positive and negative %D penalties of 0, 1, 10, 100, 1000 and 10000. %D -%D \startregelcorrectie +%D \startlinecorrection %D \hbox %D {test \ruledhpenalty0 %D test \ruledhpenalty1 @@ -1529,11 +1552,11 @@ %D test \ruledhpenalty1000 %D test \ruledhpenalty10000 %D test} -%D \stopregelcorrectie +%D \stoplinecorrection %D -%D \blanko +%D \blank %D -%D \startregelcorrectie +%D \startlinecorrection %D \hbox %D {test \ruledhpenalty0 %D test \ruledhpenalty-1 @@ -1542,9 +1565,9 @@ %D test \ruledhpenalty-1000 %D test \ruledhpenalty-10000 %D test} -%D \stopregelcorrectie +%D \stoplinecorrection %D -%D \blanko +%D \blank %D %D This way stacked penalties of different severance can be %D shown in combination. @@ -1557,11 +1580,8 @@ \def\setruledpenaltybox#1#2#3#4#5#6% {\setbox#1\normalhbox {\ifnum#2=0 \else - \ifnum#2>0 - \def\sign{+}% - \else - \def\sign{-}% - \fi + \edef\sign + {\ifnum#2>0 +\else-\fi}% \dimen0=\ifnum\sign#2>9999 28\else \ifnum\sign#2>999 @@ -1646,7 +1666,7 @@ \def\doruledvpenalty {\ifdim\pagegoal=\maxdimen \else - \nextdepth\prevdepth + \nextdepth\prevdepth \dontinterfere \dontcomplain \investigatecount\scratchcounter @@ -1673,7 +1693,7 @@ \smashbox0% \normalpenalty\!!tenthousand \nointerlineskip - \dp0\nextdepth % not \prevdepth=\nextdepth + \dp0\nextdepth % not \prevdepth=\nextdepth \normalvbox {\normalvcue{\box0}}% \fi @@ -1692,13 +1712,13 @@ \expandafter\ruledhpenalty \fi} -%D At the cost of some more tokens, a bit more clever +%D At the cost of some more tokens, a bit more clever %D implementation would be: %D -%D \starttypen +%D \starttyping %D \unexpanded\def\ruledpenalty% %D {\csname ruled\ifvmode v\else h\fi penalty\endcsname} -%D \stoptypen +%D \stoptyping %D \macros %D {showfils,dontshowfils, @@ -1778,19 +1798,19 @@ %D for turning the options on, one for turning them off, and a %D boolean for enabling the mechanism outside the scope of the %D user. The first two macros only do their job when we are -%D actually showing the composition. +%D actually showing the composition. %D -%D \starttypen +%D \starttyping %D \showingcompositiontrue %D \showcomposition -%D \stoptypen -%D +%D \stoptyping +%D %D Because the output routine can do tricky things, like %D multiple column typesetting and manipulation of the %D pagebody, shifting things around and so on, the macro %D \type{\dontshowcomposition} best can be called when we enter %D this routine. Too much visual cues just don't make sense. In -%D \CONTEXT\ this has been taken care of. +%D \CONTEXT\ this has been taken care of. \newif\ifshowingcomposition @@ -1816,17 +1836,17 @@ %D %D Just to make things even more easy, we have defined: %D -%D \starttypen +%D \starttyping %D \showmakeup -%D \stoptypen +%D \stoptyping %D -%D For the sake of those who don't (yet) use \CONTEXT\ we -%D preset \type{\defaulttestrulewidth} to the already set +%D For the sake of those who don't (yet) use \CONTEXT\ we +%D preset \type{\defaulttestrulewidth} to the already set %D value. Otherwise we default to a bodyfontsize related value. %D -%D \starttypen +%D \starttyping %D \def\defaulttestrulewidth{.2pt} -%D \stoptypen +%D \stoptyping %D %D Beware, it's a macro not a \DIMENSION. @@ -1843,46 +1863,41 @@ \protect -%D \ifCONTEXT \let\next=\relax \else \let\next=\endinput +%D \ifCONTEXT \let\next=\relax \else \let\next=\endinput %D The documented source you have been reading was processed %D using some surrogate makeup. When this file is processed %D in \CONTEXT, a few more examples show up here, like a local -%D table of contents and a local register. +%D table of contents and a local register. %D \fi \next -% %D Lets end with some more advanced examples. When visualized, -% %D the table of contents of the outer level is typeset as: -% %D -% %D {\showmakeup\plaatsinhoud[criterium=vorige]} -% %D -%D Lets end with some more advanced examples. -%D Definitions and enumerations come in many flavors. The -%D next one for instance is defined as: +%D Lets end with some more advanced examples. +%D Definitions and enumerations come in many flavors. The +%D next one for instance is defined as: %D -%D \starttypen +%D \starttyping %D \definedescription[test][place=left,hang=3,width=6em] -%D \stoptypen +%D \stoptyping %D -%D When applied to some text, this would look like: +%D When applied to some text, this would look like: %D %D \bgroup %D \showmakeup -%D \doordefinieren[test][plaats=links,hang=3,breedte=6em] +%D \definedescription[test][location=left,hang=3,width=6em] %D %D \test{visual\\debugger} I would be very pleased if \TEX\ %D had two more primitives: \type{\vnop} and \type{\hnop}. Both %D should act and show up as normal boxes, but stay invisible -%D for \TEX\ when it's doing calculations. The \type{\vnop} -%D for instance should not interact with the internal mechanism +%D for \TEX\ when it's doing calculations. The \type{\vnop} +%D for instance should not interact with the internal mechanism %D responsible for the disappearing skips, kerns and penalties -%D at a pagebreak. As long as we don't have these two boxtypes, -%D visual debugging will never be perfect. +%D at a pagebreak. As long as we don't have these two boxtypes, +%D visual debugging will never be perfect. %D %D \egroup %D %D The index to this section looks like: %D -%D {\stelrefererenin[prefix=dummy]\showmakeup\plaatsindex[criterium=lokaal]} +%D {\setupreferencing[prefixprefix=dummy]\showmakeup\placeindex[criterium=local]} %D %D Although not impressive examples or typesetting, both %D show us how and where things happen. When somehow the last diff --git a/tex/context/base/symb-eur.tex b/tex/context/base/symb-eur.tex index f5edb3b8b..515db6ae5 100644 --- a/tex/context/base/symb-eur.tex +++ b/tex/context/base/symb-eur.tex @@ -63,4 +63,4 @@ %D \NC \tt\it\euro \NC \tt\bs\euro \NC \tt\bi\euro \NC\NR %D \stoptabulate -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/symb-glm.tex b/tex/context/base/symb-glm.tex index b673a8e4a..1a961e900 100644 --- a/tex/context/base/symb-glm.tex +++ b/tex/context/base/symb-glm.tex @@ -15,26 +15,26 @@ \loadmapfile [ec-public-lm.map] -\definefontsynonym [GuilSerif] [plr10] [encoding=ec] -\definefontsynonym [GuilSerifBold] [plbx10] [encoding=ec] -\definefontsynonym [GuilSerifItalic] [plti10] [encoding=ec] -\definefontsynonym [GuilSerifSlanted] [plsl10] [encoding=ec] -\definefontsynonym [GuilSerifBoldItalic] [plbxti10] [encoding=ec] -\definefontsynonym [GuilSerifBoldSlanted] [plbxsl10] [encoding=ec] - -\definefontsynonym [GuilSans] [plss10] [encoding=ec] -\definefontsynonym [GuilSansBold] [plssbx10] [encoding=ec] -\definefontsynonym [GuilSansItalic] [plssi10] [encoding=ec] -\definefontsynonym [GuilSansSlanted] [plssi10] [encoding=ec] -\definefontsynonym [GuilSansBoldItalic] [plssbi10] [encoding=ec] -\definefontsynonym [GuilSansBoldSlanted] [plssbi10] [encoding=ec] - -\definefontsynonym [GuilMono] [pltt10] [encoding=ec] -%definefontsynonym [GuilMonoBold] [pltt10] [encoding=ec] -%definefontsynonym [GuilMonoSlanted] [pltt10] [encoding=ec] -%definefontsynonym [GuilMonoItalic] [pltt10] [encoding=ec] -%definefontsynonym [GuilMonoBoldItalic] [pltt10] [encoding=ec] -%definefontsynonym [GuilMonoBoldSlanted] [pltt10] [encoding=ec] +\definefontsynonym [GuilSerif] [cork-lmr10] [encoding=ec] +\definefontsynonym [GuilSerifBold] [cork-lmbx10] [encoding=ec] +\definefontsynonym [GuilSerifItalic] [cork-lmti10] [encoding=ec] +\definefontsynonym [GuilSerifSlanted] [cork-lmsl10] [encoding=ec] +\definefontsynonym [GuilSerifBoldItalic] [cork-lmbxti10] [encoding=ec] +\definefontsynonym [GuilSerifBoldSlanted] [cork-lmbxsl10] [encoding=ec] + +\definefontsynonym [GuilSans] [cork-lmss10] [encoding=ec] +\definefontsynonym [GuilSansBold] [cork-lmssbx10] [encoding=ec] +\definefontsynonym [GuilSansItalic] [cork-lmssi10] [encoding=ec] +\definefontsynonym [GuilSansSlanted] [cork-lmssi10] [encoding=ec] +\definefontsynonym [GuilSansBoldItalic] [cork-lmssbi10] [encoding=ec] +\definefontsynonym [GuilSansBoldSlanted] [cork-lmssbi10] [encoding=ec] + +\definefontsynonym [GuilMono] [cork-lmtt10] [encoding=ec] +%definefontsynonym [GuilMonoBold] [cork-lmtt10] [encoding=ec] +%definefontsynonym [GuilMonoSlanted] [cork-lmtt10] [encoding=ec] +%definefontsynonym [GuilMonoItalic] [cork-lmtt10] [encoding=ec] +%definefontsynonym [GuilMonoBoldItalic] [cork-lmtt10] [encoding=ec] +%definefontsynonym [GuilMonoBoldSlanted] [cork-lmtt10] [encoding=ec] \definesymbol [xleftguillemot] [\getglyph{Guil}{\char19}] \definesymbol [xrightguillemot] [\getglyph{Guil}{\char20}] @@ -54,4 +54,4 @@ \stopencoding -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/symb-ini.tex b/tex/context/base/symb-ini.tex index 9b514415b..a1bcd9fdd 100644 --- a/tex/context/base/symb-ini.tex +++ b/tex/context/base/symb-ini.tex @@ -73,10 +73,10 @@ %D Symbols are simply linked to a tag. Such tags can be numbers %D or strings. %D -%D \starttypen +%D \starttyping %D \definesymbol [1] [$\bullet$] %D \definesymbol [level 5] [$\star$] -%D \stoptypen +%D \stoptyping % ss:tag -> symbol % ss:set:tag -> symbol out of set @@ -190,13 +190,7 @@ {\dodoubleempty\dofiguresymbol} \def\dofiguresymbol[#1][% #2]% - {\externalfigure - [#1] - [\c!reset=\v!ja, - \c!symbool=\v!ja, - %\c!hfactor=\defaultsymbolfactor, - \c!hoogte=\defaultsymbolheight, - }% #2]} + {\externalfigure[#1][\c!reset=\v!yes,\c!symbol=\v!yes,\c!height=\defaultsymbolheight,}% #2]} \appendtoks \resetexternalfigures \to \everysymbol @@ -223,9 +217,7 @@ \def\xfetchsymbol#1% {\ifnosymbol - \@EA\ifx\csname\??ss:#1:\currentsymbol\endcsname\relax\else - \nosymbolfalse - \fi + \@EA\ifx\csname\??ss:#1:\currentsymbol\endcsname\relax\else\nosymbolfalse\fi \fi} \def\xredosymbol#1% @@ -270,24 +262,24 @@ %D From these macro definitions one can deduce that symbols can %D be grouped in symbol sets: %D -%D \starttypen +%D \starttyping %D \startsymbolset [navigation 1] %D \definefiguresymbol [Next] [mp-symb.1] %D \definefiguresymbol [Prev] [mp-symb.2] %D \stopsymbolset -%D \stoptypen +%D \stoptyping %D %D Such a symbol can be typeset with: %D -%D \starttypen +%D \starttyping %D \setupsymbolset[navigation 1]\symbol[Next] -%D \stoptypen +%D \stoptyping %D %D or simply: %D -%D \starttypen +%D \starttyping %D \symbol[navigation 1][Next] -%D \stoptypen +%D \stoptyping %D %D Formally: %D @@ -340,4 +332,4 @@ %D itemization macros, we prefer symbols because they can more %D easier be (partially) redefined. -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/symb-mis.tex b/tex/context/base/symb-mis.tex index 10defdc4c..b9eeceae8 100644 --- a/tex/context/base/symb-mis.tex +++ b/tex/context/base/symb-mis.tex @@ -16,7 +16,7 @@ %D We predefine some common symbols and conversions that will %D be understood by many commands. -\definesymbol [\v!geen] [] +\definesymbol [\v!none] [] \definesymbol [bullet] [\mathematics{\bullet}] \definesymbol [dash] [\mathematics{-}] \definesymbol [star] [\mathematics{\star}] @@ -39,27 +39,27 @@ %D Special hyperlinks, namely those to pages or navigational %D properties, are associated with symbols. -\definesymbol [\v!eerstepagina] [\gotobegincharacter] -\definesymbol [\v!vorigepagina] [\gobackwardcharacter] -\definesymbol [\v!volgendepagina] [\goforwardcharacter] -\definesymbol [\v!laatstepagina] [\gotoendcharacter] -\definesymbol [\v!eerstesubpagina] [\gotobegincharacter] -\definesymbol [\v!vorigesubpagina] [\gobackwardcharacter] -\definesymbol [\v!volgendesubpagina] [\goforwardcharacter] -\definesymbol [\v!laatstesubpagina] [\gotoendcharacter] +\definesymbol [\v!firstpage] [\gotobegincharacter] +\definesymbol [\v!previouspage] [\gobackwardcharacter] +\definesymbol [\v!nextpage] [\goforwardcharacter] +\definesymbol [\v!lastpage] [\gotoendcharacter] +\definesymbol [\v!firstsubpage] [\gotobegincharacter] +\definesymbol [\v!previoussubpage] [\gobackwardcharacter] +\definesymbol [\v!nextsubpage] [\goforwardcharacter] +\definesymbol [\v!lastsubpage] [\gotoendcharacter] \definesymbol [\v!PreviousJump] [\gobackjumpcharacter] \definesymbol [\v!NextJump] [\goforjumpcharacter] \definesymbol [\v!CloseDocument] [\closecharacter] -\definesymbol [\v!eerste] [{\symbol[\v!eerstepagina]}] -\definesymbol [\v!vorige] [{\symbol[\v!vorigepagina]}] -\definesymbol [\v!volgende] [{\symbol[\v!volgendepagina]}] -\definesymbol [\v!laatste] [{\symbol[\v!laatstepagina]}] -\definesymbol [\v!ergens] [\gotosomewherecharacter] -\definesymbol [\v!nergens] [\gonowherecharacter] +\definesymbol [\v!first] [{\symbol[\v!firstpage]}] +\definesymbol [\v!previous] [{\symbol[\v!previouspage]}] +\definesymbol [\v!next] [{\symbol[\v!nextpage]}] +\definesymbol [\v!last] [{\symbol[\v!lastpage]}] +\definesymbol [\v!somewhere] [\gotosomewherecharacter] +\definesymbol [\v!nowhere] [\gonowherecharacter] -\definesymbol [\v!achteruit] [{\symbol[\v!vorigepagina]}] -\definesymbol [\v!vooruit] [{\symbol[\v!volgendepagina]}] +\definesymbol [\v!backward] [{\symbol[\v!previouspage]}] +\definesymbol [\v!forward] [{\symbol[\v!nextpage]}] %D The next two symbols (\symbol[P] and \symbol[S]) are %D variations in their math counterparts. The following ones @@ -111,7 +111,7 @@ % {{\hbox{\hsmash{\gobackwardcharacter}\goforwardcharacter}}} \def\gotosomewherecharacter% - {{\hbox{\hsmash{\symbol[\v!vorige]}\symbol[\v!volgende]}}} + {{\hbox{\hsmash{\symbol[\v!previous]}\symbol[\v!next]}}} \unexpanded\def\closecharacter% {\dogotocharacter\boxtimes diff --git a/tex/context/base/symb-mvs.tex b/tex/context/base/symb-mvs.tex index 83e499c7e..1dd3da0a0 100644 --- a/tex/context/base/symb-mvs.tex +++ b/tex/context/base/symb-mvs.tex @@ -1,7 +1,3 @@ -% Insert this in font-fil.tex ( I would think): - -% tobias: what is the original and what the berry name? - %D \module %D [ file=symb-mvs, %D version=2000.03.30, @@ -16,7 +12,7 @@ %C details. %D This module implements the Martin Vogel Symbole font -%D (marvosym). The names are derived from the \LaTeXe\ package +%D (marvosym). The names are derived from the \LATEX\ package %D \type {marvosym} of Thomas Henlich. The symbols are %D available as Type~1 font and are included in \TETEX\ and %D \FPTEX\ distributions. diff --git a/tex/context/base/symb-nav.tex b/tex/context/base/symb-nav.tex index 765a9bd73..109b29535 100644 --- a/tex/context/base/symb-nav.tex +++ b/tex/context/base/symb-nav.tex @@ -23,20 +23,20 @@ \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!previouspage] [\ContextNavigationGlyph{1}] + \definesymbol [\v!nextpage] [\ContextNavigationGlyph{2}] + \definesymbol [\v!firstpage] [\ContextNavigationGlyph{3}] + \definesymbol [\v!lastpage] [\ContextNavigationGlyph{4}] \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{5}] \definesymbol [\v!NextJump] [\ContextNavigationGlyph{6}] \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!previoussubpage] [\ContextNavigationGlyph{1}] + \definesymbol [\v!nextsubpage] [\ContextNavigationGlyph{2}] + \definesymbol [\v!firstsubpage] [\ContextNavigationGlyph{3}] + \definesymbol [\v!lastsubpage] [\ContextNavigationGlyph{4}] \definesymbol [\v!StartSound] [\ContextNavigationGlyph{2}] \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{8}] @@ -55,20 +55,20 @@ \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!previouspage] [\ContextNavigationGlyph{101}] + \definesymbol [\v!nextpage] [\ContextNavigationGlyph{102}] + \definesymbol [\v!firstpage] [\ContextNavigationGlyph{103}] + \definesymbol [\v!lastpage] [\ContextNavigationGlyph{104}] \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{105}] \definesymbol [\v!NextJump] [\ContextNavigationGlyph{106}] \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!previoussubpage] [\ContextNavigationGlyph{101}] + \definesymbol [\v!nextsubpage] [\ContextNavigationGlyph{102}] + \definesymbol [\v!firstsubpage] [\ContextNavigationGlyph{103}] + \definesymbol [\v!lastsubpage] [\ContextNavigationGlyph{104}] \definesymbol [\v!StartSound] [\ContextNavigationGlyph{102}] \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{108}] @@ -87,20 +87,20 @@ \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!previouspage] [\ContextNavigationGlyph{201}] + \definesymbol [\v!nextpage] [\ContextNavigationGlyph{202}] + \definesymbol [\v!firstpage] [\ContextNavigationGlyph{203}] + \definesymbol [\v!lastpage] [\ContextNavigationGlyph{204}] \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{205}] \definesymbol [\v!NextJump] [\ContextNavigationGlyph{206}] \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!previoussubpage] [\ContextNavigationGlyph{201}] + \definesymbol [\v!nextsubpage] [\ContextNavigationGlyph{202}] + \definesymbol [\v!firstsubpage] [\ContextNavigationGlyph{203}] + \definesymbol [\v!lastsubpage] [\ContextNavigationGlyph{204}] \definesymbol [\v!StartSound] [\ContextNavigationGlyph{202}] \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{208}] @@ -121,4 +121,4 @@ %D \showsymbolset[navigation 2] %D \showsymbolset[navigation 3] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/symb-run.tex b/tex/context/base/symb-run.tex index 6668f40cd..8dd899c57 100644 --- a/tex/context/base/symb-run.tex +++ b/tex/context/base/symb-run.tex @@ -1,5 +1,5 @@ %D \module -%D [ file=symb-run, % code moved from symb-ini +%D [ file=symb-run, % code moved from symb-ini %D version=1998.07.20, %D title=\CONTEXT\ Symbol Libraries, %D subtitle=Runtime Macros, @@ -11,24 +11,24 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\unprotect +\unprotect \gdef\doshowsymbolset[#1][#2]% looks like \showexternalfigureb {\vbox\bgroup - \blanko + \blank \getparameters[\??ss][\c!n=5,#2]% \forcesymbolset[#1]% \doifdefined{\??ss#1} {\global\let\allfigures\empty \doglobal\newcounter\figurecounter - \setupcolors[\c!status=\v!start]% to prevent mps color conversion - \mindermeldingen + \setupcolors[\c!state=\v!start]% to prevent mps color conversion + \dontcomplain \def\doshowsymbols% global needed due to grouping in alignment {\expanded{\globalprocesscommalist[\getvalue{\??ss#1}]\noexpand\docommando}}% \def\docommando##1% {\vbox {\forgetall - \tttf + \tttf \halign {\hss\quad####\strut\quad\hss\cr \symbol[##1]\quad{\red\ruledhbox{\black\symbol[##1]}}\cr @@ -44,7 +44,7 @@ \tabskip\zeropoint \!!plus 1fill \halign to \hsize {&\hss##\hss\cr\doshowsymbols\crcr}}% - \blanko + \blank \egroup} \gdef\showsymbolset% diff --git a/tex/context/base/syst-con.tex b/tex/context/base/syst-con.tex index 0ce6ea579..473be7a9f 100644 --- a/tex/context/base/syst-con.tex +++ b/tex/context/base/syst-con.tex @@ -20,6 +20,8 @@ %D defining these in \type {font-ini}, we now have a dedicated %D module. +\catcode127=12 % \@@letter + %D \macros %D {lchexnumber,uchexnumber,lchexnumbers,uchexnumbers} %D @@ -30,7 +32,7 @@ %D The ugly indirectness is needed to get rid of \TEX\ %D induced spaces and \type {\relax}'s. %D -%D \starttypen +%D \starttyping %D [\uchexnumber{0}] %D [\uchexnumber\scratchcounter] %D [\uchexnumber\zerocount] @@ -44,7 +46,7 @@ %D [\expandafter\uchexnumber\expandafter{\number\zerocount}] %D [\expandafter\uchexnumber\expandafter{\the\scratchcounter}] %D [\expandafter\uchexnumber\expandafter{\the\zerocount}] -%D \stoptypen +%D \stoptyping \def\lchexnumber#1% {\@EA\dolchexnumber\number#1\relax} @@ -149,6 +151,28 @@ 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 {hexstringtonumber} +%D +%D This macro converts a two character hexadecimal number into +%D a decimal number, thereby taking care of lowercase characters +%D as well. + +\dostepwiserecurse{0}{9}{1}{\setevalue{@@uc@@\recurselevel}{\recurselevel}} + +\setvalue{@@uc@@a}{A} \setvalue{@@uc@@A}{A} +\setvalue{@@uc@@b}{B} \setvalue{@@uc@@B}{B} +\setvalue{@@uc@@c}{C} \setvalue{@@uc@@C}{C} +\setvalue{@@uc@@d}{D} \setvalue{@@uc@@D}{D} +\setvalue{@@uc@@e}{E} \setvalue{@@uc@@E}{E} +\setvalue{@@uc@@f}{F} \setvalue{@@uc@@F}{F} + +\def\hexstringtonumber#1% {FF} + {\dohexstringtonumber#1} + +\def\dohexstringtonumber#1#2% FF + {"\csname @@uc@@#1\endcsname\csname @@uc@@#2\endcsname} + %D \macros %D {rawcharacter} %D @@ -175,4 +199,4 @@ \egroup -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/syst-etx.tex b/tex/context/base/syst-etx.tex index adb98ba09..80a24b250 100644 --- a/tex/context/base/syst-etx.tex +++ b/tex/context/base/syst-etx.tex @@ -15,8 +15,24 @@ %D the definition files that come with this useful \TEX\ %D extension, but implement our own alternatives. +%D \CONTEXT\ was one of the first systems that had support for \ETEX\ +%D built in. In the process we found out that the extensions were not +%D as bug free as the rest of \TEX. Especially the bugs in \type +%D {lastnode}, flushing of token lists with an index in the extension +%D range, and spurious box behaviour of boxes adressed in the extended +%D box space made us a bit careful. It's hard to to track down such +%D bugs, especially if one has a mind set of \TEX\ being bug free. If +%D you encounter unexpected behaviour let me know. + \unprotect +%D \ETEX\ has a not so handy way of telling you the version number, +%D i.e. the revision number has a period in it: + +\long\def\gobbleoneargument#1{} + +\mathchardef\etexversion=\numexpr(\eTeXversion*100+\expandafter\gobbleoneargument\eTeXrevision) + %D Constants to be used with \type {\grouptype}. \chardef\@@bottomlevelgroup = 0 @@ -193,14 +209,15 @@ \mathchardef\@@maxallocation = 32767 %D I cannot imagine that more than~8 extra insert classes -%D are needed, so we say: +%D are needed, but, for critical editions, we may need many +%D more, so: -\chardef\@@insallocation=8 +\chardef\@@insallocation=32 -%D But, for critical editions, we may need many more, so -%D here we go again: +%D However, there's a bug in \ETEX\ versions smaller that 2.2, +%D so we need to play safe: -\chardef\@@insallocation=24 +\ifnum\etexversion<202 \chardef\@@insallocation=8 \fi %D My low level allocation macro now comes down to: @@ -225,9 +242,9 @@ %D These macros can be checked by tests like: %D -%D \starttypen +%D \starttyping %D \let\wlog\message \dorecurse{1000}{\newcount\dummy} -%D \stoptypen +%D \stoptyping %D A few bonus bindings. @@ -253,4 +270,4 @@ \endTEX -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex index f86bff57b..0cfd9681d 100644 --- a/tex/context/base/syst-ext.tex +++ b/tex/context/base/syst-ext.tex @@ -24,9 +24,9 @@ %D A raw and dirty alternative for \type {\getparameters}; no %D checking is done! -\def\rawgetparameters[#1][#2]% scheelt 5\% - {\def\rawparameterprefix{#1}% - \expandafter\rawsetparameter#2,]=,} +% \def\rawgetparameters[#1][#2]% scheelt 5\% +% {\def\rawparameterprefix{#1}% +% \expandafter\rawsetparameter#2,]=,} \def\rawsetparameter#1=#2,% {\if]#1\else @@ -34,6 +34,19 @@ \expandafter\rawsetparameter \fi} +% the next one handles empty #1 okay: + +\def\rawgetparameters[#1][#2% some 5-10% faster + {\ifx#2]% test is needed, else bomb on [#1][] + \expandafter\gobbleoneargument + \else + \def\rawparameterprefix{#1}% + \expandafter\dorawgetparameters + \fi#2} + +\def\dorawgetparameters#1]% + {\expandafter\rawsetparameter#1,]=,} + %D \macros %D {doglobal, %D redoglobal,dodoglobal,resetglobal} @@ -82,16 +95,16 @@ %D \type {\global} hopelessly fails here. But a slight %D adaption of Knuth's original macro permits: %D -%D \starttypen +%D \starttyping %D \doglobal\newif\iftest -%D \stoptypen +%D \stoptyping %D %D Of course one can still say: %D -%D \starttypen +%D \starttyping %D \global\testtrue %D \global\testfalse -%D \stoptypen +%D \stoptyping %D %D Apart from the prefixes, a few more \type{\expandafters} %D are needed: @@ -136,12 +149,12 @@ %D but fortunately we can store numbers in a macro. We can %D increment such pseudo \COUNTERS\ with \type{\increment}. %D -%D \starttypen +%D \starttyping %D \increment(\counter,20) %D \increment(\counter,-4) %D \increment(\counter) %D \increment\counter -%D \stoptypen +%D \stoptyping %D %D After this sequence of commands, the value of %D \type{\counter} is 20, 16, 17 and~18. Of course there is @@ -149,9 +162,9 @@ %D %D Global assignments are possible too, using \type{\doglobal}: %D -%D \starttypen +%D \starttyping %D \doglobal\increment\counter -%D \stoptypen +%D \stoptyping %D %D When \type{\counter} is undefined, it's value is initialized %D at~0. It is nevertheless better to define a \COUNTER\ @@ -160,9 +173,9 @@ %D not accept undefined macro's. The \COUNTER\ in our example %D can for instance be defined with: %D -%D \starttypen +%D \starttyping %D \newcounter\counter -%D \stoptypen +%D \stoptyping %D %D The command \type{\newcounter} must not be confused with %D \type{\newcount}! Of course this mechanism is much slower @@ -172,10 +185,10 @@ %D from some other incompatilities we want to mention a pitfal %D when using \type{\ifnum}. %D -%D \starttypen +%D \starttyping %D \ifnum\normalcounter=\pseudocounter \doif \else \doelse \fi %D \ifnum\pseudocounter=\normalcounter \doif \else \doelse \fi -%D \stoptypen +%D \stoptyping %D %D In the first test, \TEX\ continues it's search for the %D second number after reading \type{\pseudocounter}, while @@ -312,9 +325,9 @@ %D signal. Signals must be unique and the next macro takes care %D of that. %D -%D \starttypen +%D \starttyping %D \newsignal\somesignal -%D \stoptypen +%D \stoptyping %D %D Signals old dimensions and can be used in skips, kerns and %D tests like \type{\ifdim}. @@ -334,9 +347,9 @@ %D amount is too small to suit certain packages. Therefore when %D possible one should use: %D -%D \starttypen +%D \starttyping %D \newskimen\tempskimen -%D \stoptypen +%D \stoptyping %D %D This commands allocates a \DIMENSION\ or a \SKIP, depending %D on the availability. One should be aware of the difference @@ -345,7 +358,7 @@ %D found. This search can be canceled by using \type{\relax} %D when possible and needed. %D -%D \starttypen +%D \starttyping %D \def\newskimen#1% %D {\ifx#1\undefined %D \ifnum\count11>\count12 @@ -354,7 +367,7 @@ %D \newdimen#1\relax %D \fi %D \fi} -%D \stoptypen +%D \stoptyping %D %D In order to make this macro work in plain \TEX\ too, we %D use the following alternative, which fools \TEX\ about @@ -371,9 +384,9 @@ %D The next macro can be very useful when using \type{\csname} %D like in: %D -%D \starttypen +%D \starttyping %D \csname if\strippedcsname\something\endcsname -%D \stoptypen +%D \stoptyping %D %D This expands to \type{\ifsomething}. @@ -401,29 +414,29 @@ %D memory saving alternative is presented here. A conditional %D is defined by: %D -%D \starttypen +%D \starttyping %D \newconditional\doublesided %D \setfalse %D %D Setting a conditional is done by \type{\settrue} and %D \type{\setfalse}: %D -%D \starttypen +%D \starttyping %D \settrue\doublesided %D \setfalse %D %D while testing is accomplished by: %D -%D \starttypen +%D \starttyping %D \ifconditional\doublesided ... \else ... \fi %D \setfalse %D %D We cannot use the simple scheme: %D -%D \starttypen +%D \starttyping %D \def\settrue#1{\let#1=\iftrue} %D \def\settrue#1{\let#1=\iffalse} -%D \stoptypen +%D \stoptyping %D %D Such an implementation gives problems with nested %D conditionals. The next implementation is abaou as fast @@ -442,9 +455,9 @@ %D pretty \type{\if}||safe too. It can be used in cases %D like: %D -%D \starttypen +%D \starttyping %D \ifzeropt \somedimen ... \else ... \fi -%D \stoptypen +%D \stoptyping \let\ifzeropt\ifcase @@ -459,9 +472,9 @@ %D The most simple alternative is the one that only needs a %D number. %D -%D \starttypen +%D \starttyping %D \dorecurse {n} {whatever we want} -%D \stoptypen +%D \stoptyping %D %D This macro can be nested without problems and therefore be %D used in situations where \PLAIN\ \TEX's \type{\loop} macro @@ -469,7 +482,7 @@ %D available in \type{\recurselevel}, before as well as after %D the \typ{whatever we wat} stuff. %D -%D \starttypen +%D \starttyping %D \dorecurse % inner loop %D {10} %D {\recurselevel: % outer value @@ -480,7 +493,7 @@ %D {\recurselevel} % outer value %D {\recurselevel} % inner value %D \endgraf} -%D \stoptypen +%D \stoptyping %D %D In this example the first, second and fourth %D \type{\recurselevel} concern the outer loop, while the third @@ -501,7 +514,7 @@ %D Acceptable: %D -%D \starttypen +%D \starttyping %D \long\def\dostepwiserecurse#1#2#3% %D {\let\nextrecurse\gobblefourarguments %D \ifnum#3>0\relax\ifnum#2<#1\relax\else @@ -511,11 +524,11 @@ %D \def\nextrecurse{\dosetstepwiserecurse<}% %D \fi\fi %D \nextrecurse{#1}{#2}{#3}} -%D \stoptypen +%D \stoptyping %D %D Better: %D -%D \starttypen +%D \starttyping %D \long\def\dostepwiserecurse#1#2#3% %D {\let\nextrecurse\gobblefourarguments %D \ifnum#3>0\relax \ifnum#2<#1\relax \else @@ -564,7 +577,7 @@ %D \def\nododorecurse %D {\global\advance\outerrecurse -1 %D \edef\recurselevel{\csname\@@irecurse\recursedepth\endcsname}} -%D \stoptypen +%D \stoptyping %D %D Cleaner and much faster: @@ -669,18 +682,18 @@ %D As we can see here, the simple command \type{\dorecurse} is %D a special case of the more general: %D -%D \starttypen +%D \starttyping %D \dostepwiserecurse {from} {to} {step} {action} -%D \stoptypen +%D \stoptyping %D %D This commands accepts positive and negative steps. Illegal %D values are handles as good as possible and the macro accepts %D numbers and \COUNTERS. %D -%D \starttypen +%D \starttyping %D \dostepwiserecurse {1} {10} {2} {...} %D \dostepwiserecurse {10} {1} {-2} {...} -%D \stoptypen +%D \stoptyping %D %D Because the simple case is used often, we implement it %D more efficiently: @@ -744,7 +757,7 @@ %D pseudo counter. When this macro is nested, we have to use %D different counters. This time we use keywords. %D -%D \starttypen +%D \starttyping %D \def\alfa{2} \def\beta{100} \def\gamma{3} %D %D \for \n=55 \to 100 \step 1 \do {... \n ...} @@ -752,7 +765,7 @@ %D \for \n=\n \to 120 \step 1 \do {... \n ...} %D \for \n=120 \to 100 \step -3 \do {... \n ...} %D \for \n=55 \to 100 \step 2 \do {... \n ...} -%D \stoptypen +%D \stoptyping %D %D Only in the third example we need to predefine \type{\n}. %D The use of \type{\od} as a dilimiter would have made nested @@ -773,11 +786,11 @@ %D explictly exit it. Nesting is supported. First we present %D a more extensive alternative. %D -%D \starttypen +%D \starttyping %D \doloop %D {Some kind of typesetting punishment \par %D \ifnum\pageno>100 \exitloop \fi} -%D \stoptypen +%D \stoptyping %D %D When needed, one can call for \type{\looplevel} and %D \type{\loopdepth}. @@ -785,7 +798,7 @@ %D If we write this macros from scratch, we end up with %D something like the ones described above: %D -%D \starttypen +%D \starttyping %D \def\@@eloop{@@eloop} % exit %D \def\@@iloop{@@iloop} % stepper %D \def\@@aloop{@@aloop} % action @@ -832,7 +845,7 @@ %D %D \def\looplevel{\recurselevel} %D \def\loopdepth{\recursedepth} -%D \stoptypen +%D \stoptyping %D %D We don't have to declare new counters for \type{\looplevel} %D and \type{\loopdepth} because we can use \type{\recurselevel} @@ -841,13 +854,13 @@ %D We prefer however a more byte saving implementation, that %D executes of course a bit slower. %D -%D \starttypen +%D \starttyping %D \def\doloop% %D {\dostepwiserecurse1\maxdimen1} %D %D \def\exitloop% %D {\letvalue{\@@irecurse\recursedepth}\maxdimen} -%D \stoptypen +%D \stoptyping %D %D Although, the next version is faster because it used the %D simple loop. @@ -882,8 +895,9 @@ {\csname\@@arecurse\recursedepth\endcsname\endofloop} \def\nodoloop#1% - {\@EA\let\@EA\recurselevel\csname\@@irecurse\recursedepth\endcsname - \global\advance\outerrecurse \minusone } + {\let\endofloop\dodoloop % new, permits nested \doloop's + \@EA\let\@EA\recurselevel\csname\@@irecurse\recursedepth\endcsname + \global\advance\outerrecurse\minusone} \def\exitloop % \exitloop quits at end {\let\endofloop\nodoloop} @@ -894,16 +908,16 @@ %D The loop is executed at least once, so beware of situations %D like: %D -%D \starttypen +%D \starttyping %D \doloop {\exitloop some commands} -%D \stoptypen +%D \stoptyping %D %D It's just a matter of putting the text into the \type{\if} %D statement that should be there anyway, like in: %D -%D \starttypen +%D \starttyping %D \doloop {\ifwhatever \exitloop \else some commands\fi} -%D \stoptypen +%D \stoptyping %D %D You can also quit a loop immediately, by using \type %D {\exitloopnow} instead. Beware, this is more sensitive @@ -929,7 +943,7 @@ %D unreadable, so let's first show an implementation that %D shows how things are done: %D -%D \starttypen +%D \starttyping %D \newtoks \everyline %D \newtoks \oldeveryline %D \newif \ifeveryline @@ -1037,32 +1051,32 @@ %D going to present in the visual debugger. First we save %D the primitive \type{\everypar}: %D -%D \starttypen +%D \starttyping %D \let\normaleverypar=\everypar -%D \stoptypen +%D \stoptyping %D %D Next we allocate a \TOKENLIST\ named \type{\everypar}, %D which means that \type{\everypar} is no longer a primitive %D but something like \type{\toks44}. %D -%D \starttypen +%D \starttyping %D \newtoks\everypar -%D \stoptypen +%D \stoptyping %D %D Because \TEX\ now executes \type{\normaleverypar} instead %D of \type{\everypar}, we are ready to assign some tokens to %D this internally known and used \TOKENLIST. %D -%D \starttypen +%D \starttyping %D \normaleverypar={all the things the system wants to do \the\everypar} -%D \stoptypen +%D \stoptyping %D %D Where the user can provide his own tokens to be expanded %D every time he expects them to expand. %D -%D \starttypen +%D \starttyping %D \everypar={something the user wants to do} -%D \stoptypen +%D \stoptyping %D %D We don't use this method because it undoubtly leads to %D confusing situations, especially when other packages are @@ -1076,15 +1090,15 @@ %D macro converts a parameter or an expanded macro to it's %D textual meaning. %D -%D \starttypen +%D \starttyping %D \convertargument ... \to \command -%D \stoptypen +%D \stoptyping %D %D For example, %D -%D \starttypen +%D \starttyping %D \convertargument{one \two \three{four}}\to\ascii -%D \stoptypen +%D \stoptyping %D %D The resulting macro \type{\ascii} can be written to a file %D or the terminal without problems. In \CONTEXT\ we use this @@ -1092,9 +1106,9 @@ %D %D The second conversion alternative accepts a command: %D -%D \starttypen +%D \starttyping %D \convertcommand\command\to\ascii -%D \stoptypen +%D \stoptyping %D %D Both commands accept the prefix \type{\doglobal} for global %D assignments. @@ -1153,9 +1167,9 @@ %D was found after rereading the \TEX book. The first %D implementation was: %D -%D \starttypen +%D \starttyping %D \def\doconvertargument#1->#2\\\\{#2} -%D \stoptypen +%D \stoptyping %D %D The \type{-}, the delimiter \type{\\\\} and the the second %D argument are completely redundant. @@ -1163,9 +1177,9 @@ % %D As said, the \TEX\ alternative fails on expanding primitives, % %D like in: % %D -% %D \starttypen +% %D \starttyping % %D \convertcommand\someprimitive\to\ascii -% %D \stoptypen +% %D \stoptyping % %D % %D Because these primitives convert to themselves, we can use % %D the backslash as a signal to treat them different. At the @@ -1197,7 +1211,7 @@ \def\showvalue#1% {\expandafter\show\csname#1\endcsname} -\def\showargument#1% +\long\def\showargument#1% {\convertargument#1\to\ascii\show\ascii} %D \macros @@ -1208,9 +1222,9 @@ %D in the \ETEX\ implementation, but since we want %D compatibility, we need: %D -%D \starttypen +%D \starttyping %D \doifmeaningelse {\next} {\something} {true} {false} -%D \stoptypen +%D \stoptyping %D %D Watch the one level expansion of the second argument. @@ -1265,7 +1279,7 @@ %D executing the commands that uses them. We can best %D illustrate this with an example. %D -%D \starttypen +%D \starttyping %D \def\first {alfa,beta,gamma} %D \def\second {alfa,epsilon,zeta} %D @@ -1276,7 +1290,7 @@ %D \ExpandFirstAfter\processcommalist[\first]\message %D %D \ExpandAfter \doifcommon {\first} {alfa} {\message{OK}} -%D \stoptypen +%D \stoptyping %D %D The first three calls result in the threefold message %D \type{OK}, the fourth one shows the three elements of @@ -1318,19 +1332,19 @@ %D argument to a string of unexpandable characters. To make %D comparison possible, we have to convert the constant too %D -%D \starttypen +%D \starttyping %D \ConvertToConstant\doifelse {...} {...} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D This construction is only needed when the first argument %D can give troubles. Misuse can slow down processing. %D -%D \starttypen +%D \starttyping %D \ConvertToConstant\doifelse{\c!alfa} {\c!alfa}{...}{...} %D \ConvertToConstant\doifelse{alfa} {\c!alfa}{...}{...} %D \ConvertToConstant\doifelse{alfa} {alfa} {...}{...} %D \ConvertToConstant\doifelse{alfa \alfa test}{\c!alfa}{...}{...} -%D \stoptypen +%D \stoptyping %D %D In examples~2 and~3 both arguments equal, in~1 and~4 %D they differ. @@ -1356,27 +1370,27 @@ %D When the argument \type{#1} consists of commands, we had %D better use %D -%D \starttypen +%D \starttyping %D \ConvertConstantAfter\processaction[#1][...] -%D \ConvertConstantAfter\doifelse{#1}{\v!iets}{}{} -%D \stoptypen +%D \ConvertConstantAfter\doifelse{#1}{\v!something}{}{} +%D \stoptyping %D %D This commands accepts things like: %D -%D \starttypen +%D \starttyping %D \v!constant %D constant %D \hbox to \hsize{\rubish} -%D \stoptypen +%D \stoptyping %D %D As we will see in the core modules, this macro permits %D constructions like: %D -%D \starttypen +%D \starttyping %D \setupfootertexts[...][...] %D \setupfootertexts[margin][...][...] %D \setupfootertexts[\v!margin][...][...] -%D \stoptypen +%D \stoptyping %D %D where \type{...} can be anything legally \TEX. @@ -1397,9 +1411,9 @@ %D %D We can assign a default value to an empty macro using: %D -%D \starttypen +%D \starttyping %D \assignifempty \macros {default value} -%D \stoptypen +%D \stoptyping %D %D We don't explicitly test if the macro is defined. @@ -1417,10 +1431,10 @@ %D like constructions. Sometimes, the \type{\stop} is used as a %D hard coded delimiter like in: %D -%D \starttypen +%D \starttyping %D \def\startcommand#1\stopcommand% %D {... #1 ...} -%D \stoptypen +%D \stoptyping %D %D In many cases the \type{\start}||\type{\stop} pair is %D defined at format generation time or during a job. This @@ -1429,21 +1443,21 @@ %D \type{\expandafter} I was able to to implement a solution, %D starting with: %D -%D \starttypen +%D \starttyping %D \grabuntil{stop}\command -%D \stoptypen +%D \stoptyping %D %D This commands executes, after having encountered %D \type {\stop} the command \type {\command}. This command %D receives as argument the text preceding the \type {\stop}. %D This means that: %D -%D \starttypen +%D \starttyping %D \def\starthello% %D {\grabuntil{stophello}\message} %D %D \starthello Hello world!\stophello -%D \stoptypen +%D \stoptyping %D %D results in: \type{\message{Hello world!}}. @@ -1455,22 +1469,22 @@ %D The next command build on this mechanism: %D -%D \starttypen +%D \starttyping %D \processbetween{string}\command -%D \stoptypen +%D \stoptyping %D %D Here: %D -%D \starttypen +%D \starttyping %D \processbetween{hello}\message %D \starthello Hello again!\stophello -%D \stoptypen +%D \stoptyping %D %D leads to: \type{\message{Hello again!}}. The command %D -%D \starttypen +%D \starttyping %D \gobbleuntil{sequence} -%D \stoptypen +%D \stoptyping %D %D is related to these commands. This one simply throws away %D everything preceding \type{\command}. @@ -1486,9 +1500,9 @@ %D The next one simply expands the pickup up tokens. %D -%D \starttypen +%D \starttyping %D \processuntil{sequence} -%D \stoptypen +%D \stoptyping \def\processuntil#1% {\long\def\next##1#1{##1}\next} @@ -1498,9 +1512,9 @@ %D %D Commands often manipulate argument as in: %D -%D \starttypen +%D \starttyping %D \def\doezomaarwat#1{....#1....} -%D \stoptypen +%D \stoptyping %D %D A disadvantage of this approach is that the tokens that %D form \type{#1} are fixed the the moment the argument is read @@ -1516,27 +1530,27 @@ %D The next macro offers a solution for both unwanted %D situations: %D -%D \starttypen +%D \starttyping %D \groupedcommand {before} {after} -%D \stoptypen +%D \stoptyping %D %D Which can be used like: %D -%D \starttypen +%D \starttyping %D \def\cite% %D {\groupedcommand{\rightquote\rightquote}{\leftquote\leftquote}} -%D \stoptypen +%D \stoptyping %D %D This command is equivalent to, but more 'robust' than: %D -%D \starttypen +%D \starttyping %D \def\cite#1% %D {\rightquote\rightquote#1\leftquote\leftquote} -%D \stoptypen +%D \stoptyping %D %D One should say that the next implementation would suffice: %D -%D \starttypen +%D \starttyping %D \def\groupedcommand#1#2% %D {\def\BeforeGroup{#1\ignorespaces}% %D \def\AfterGroup{\unskip#2\egroup}% @@ -1544,23 +1558,23 @@ %D \aftergroup\AfterGroup %D \afterassignment\BeforeGroup %D \let\next=} -%D \stoptypen +%D \stoptyping %D %D It did indeed, but one day we decided to support the %D processing of boxes too: %D -%D \starttypen +%D \starttyping %D \def\rightword% %D {\groupedcommand{\hfill\hbox}{\parfillskip\!!zeropoint}} %D %D .......... \rightword{the right way} -%D \stoptypen +%D \stoptyping %D %D Here \TEX\ typesets \type{\bf the right way} unbreakable %D at the end of the line. The solution mentioned before does %D not work here. %D -%D \starttypen +%D \starttyping %D \long\unexpanded\def\groupedcommand#1#2% %D {\bgroup %D \long\def\BeforeGroup% @@ -1569,20 +1583,20 @@ %D {#2\egroup\egroup}% %D \afterassignment\BeforeGroup %D \let\next=} -%D \stoptypen +%D \stoptyping %D %D We used this method some time until the next alternative %D was needed. From now on we support both %D -%D \starttypen +%D \starttyping %D to be \bold{bold} or not, that's the question -%D \stoptypen +%D \stoptyping %D %D and %D -%D \starttypen +%D \starttyping %D to be {\bold bold} or not, that's the question -%D \stoptypen +%D \stoptyping %D %D This alternative checks for a \type{\bgroup} token first. %D The internal alternative does not accept the box handling @@ -1603,7 +1617,7 @@ %D These macros come together in: %D -%D \starttypen +%D \starttyping %D \long\unexpanded\def\groupedcommand#1#2% %D {\def\dogroupedcommand% %D {\ifx\next\bgroup @@ -1613,16 +1627,16 @@ %D \fi %D \next{#1}{#2}}% %D \futurelet\next\dogroupedcommand} -%D \stoptypen +%D \stoptyping %D %D From the missing paragraph number one can deduce that the %D last macro is not the real one yet. I considered it a %D nuisance that %D -%D \starttypen -%D \kleur[groen] +%D \starttyping +%D \color[green] %D {as grass} -%D \stoptypen +%D \stoptyping %D %D was not interpreted as one would expect. This is due to the %D fact that \type{\futurelet} obeys blank spaces, and a @@ -1654,10 +1668,10 @@ %D explictly close the paragraph with \type{\par}, else the %D settings will be forgotten and not applied. So it's: %D -%D \starttypen +%D \starttyping %D \def\BoldRaggedCenter% %D {\groupedcommand{\raggedcenter\bf}{\par}} -%D \stoptypen +%D \stoptyping %D \macros %D {checkdefined} @@ -1668,9 +1682,9 @@ %D already defined. We considered blocking the definition, but %D this is not always what we want. %D -%D \starttypen +%D \starttyping %D \checkdefined {category} {class} {command} -%D \stoptypen +%D \stoptyping %D %D The user is warned with the suggestion to use %D \type{CAPITALS}. This suggestion is feasible, because @@ -1690,16 +1704,16 @@ %D this contents grouped. The next macro for instance typesets %D a paragraph in boldface. %D -%D \starttypen +%D \starttyping %D \def\remark#1\par% %D {\bgroup\bf#1\egroup} -%D \stoptypen +%D \stoptyping %D %D This macro has to be called like %D -%D \starttypen +%D \starttyping %D \remark some text ... ending with \par -%D \stoptypen +%D \stoptyping %D %D Instead of \type{\par} we can of course use an empty line. %D When we started typesetting with \TEX, we already had @@ -1709,22 +1723,22 @@ %D \TEX\ permits a cramped and badly formatted source, it adds %D to confusion and sometimes introduces errors. So we prefer: %D -%D \starttypen +%D \starttyping %D \remark %D %D some text ... ending with an empty line -%D \stoptypen +%D \stoptyping %D %D We are going to implement a mechanism that allows such open %D specifications. The definition of the macro handling %D \type{\remark} becomes: %D -%D \starttypen +%D \starttyping %D \def\remark% %D {\BeforePar{\bgroup\bf}% %D \AfterPar{\egroup}% %D \GetPar} -%D \stoptypen +%D \stoptyping %D %D A macro like \type{\GetPar} can be defined in several %D ways. The recent version, the fourth one in a row, @@ -1743,7 +1757,7 @@ %D The original definition was: %D -%D \starttypen +%D \starttyping %D \def\doGotoPar %D {\ifx\nextchar\blankspace %D \@EA\GotoPar @@ -1760,13 +1774,13 @@ %D %D \def\GotoPar %D {\afterassignment\doGotoPar\let\nextchar=} -%D \stoptypen +%D \stoptyping %D Its big brother \type{\GetPar} redefines the \type{\par} %D primitive, which can lead to unexpected results, depending %D in the context. %D -%D \starttypen +%D \starttyping %D \def\GetPar %D {\expanded %D {\BeforePar @@ -1780,16 +1794,16 @@ %D \BeforePar\emptytoks %D \AfterPar\emptytoks}}}% %D \GotoPar} -%D \stoptypen +%D \stoptyping %D However, we can implement a better alternative by using: %D -%D \starttypen +%D \starttyping %D \def\dowithpar#1#2% %D {\def\handlepar##1\par{#1##1#2}% %D \def\gobblepar\par{\dowithpar{#1}{#2}}% %D \doifnextcharelse\par\gobblepar\handlepar} -%D \stoptypen +%D \stoptyping %D %D Or, nicer @@ -1837,10 +1851,10 @@ %D We start with a commands that acts on paragraphs. This %D command is called as: %D -%D \starttypen +%D \starttyping %D \dowithpargument\command %D \dowithpargument{\command ... } -%D \stoptypen +%D \stoptyping %D %D In \CONTEXT\ we use this one to read in the titles of %D chapters, sections etc. The commands responsible for these @@ -1848,19 +1862,19 @@ %D passing. In these examples, the \type{\par} can be omitted %D when an empty line is present. %D -%D \starttypen +%D \starttyping %D \command{...} %D \command ... \par %D \command %D {...} %D \command %D ... \par -%D \stoptypen +%D \stoptyping %D %D We show two implementations, of which for the moment the %D we prefier to use the second one: %D -%D \starttypen +%D \starttyping %D \def\dowithpargument#1% %D {\def\dodowithpargument% %D {\ifx\next\bgroup @@ -1870,18 +1884,18 @@ %D \fi %D \next}% %D \futurelet\next\dodowithpargument} -%D \stoptypen +%D \stoptyping %D %D A second and better implementation was: %D -%D \starttypen +%D \starttyping %D \def\dowithpargument#1% %D {\def\nextpar##1 \par{#1{##1}}% %D \def\nextarg##1{#1{##1}}% %D \doifnextcharelse{\bgroup} %D {\nextarg} %D {\nextpar}} -%D \stoptypen +%D \stoptyping %D %D We ended up with an alternative that also accepts en empty %D argument. This command permits for instance chapters to @@ -1905,27 +1919,27 @@ %D When we want to act upon words we can use the \type{w} %D alternative. %D -%D \starttypen +%D \starttyping %D \dowithwargument\command %D \dowithwargument{... \command ...} -%D \stoptypen +%D \stoptyping %D %D The main difference bwteen two alternatives is in the %D handling of \type{\par}'s. This time the space token acts %D as a delimiter. %D -%D \starttypen +%D \starttyping %D \command{...} %D \command ... %D \command %D {...} %D \command %D ... -%D \stoptypen +%D \stoptyping %D %D Again there are two implementations possible: %D -%D \starttypen +%D \starttyping %D \def\dowithwargument#1% %D {\def\dodowithwargument% %D {\ifx\next\bgroup @@ -1935,7 +1949,7 @@ %D \fi %D \next}% %D \futurelet\next\dodowithwargument} -%D \stoptypen +%D \stoptyping %D %D We've chosen: @@ -1958,44 +1972,42 @@ %D \type{\dorecurse}. The next alternative however, suits %D better some of the \CONTEXT\ interface commands. %D -%D \starttypen +%D \starttyping %D \dorepeat[n*\command] -%D \stoptypen +%D \stoptyping %D %D The value of the used \COUNTER\ can be called within %D \type{\command} by \type{\repeater}. %D %D A slightly different alternative is: %D -%D \starttypen +%D \starttyping %D \dorepeatwithcommand[n*{...}]\command -%D \stoptypen +%D \stoptyping %D %D When we call for something like: %D -%D \starttypen +%D \starttyping %D \dorepeatwithcommand[3*{Hello}]\message -%D \stoptypen +%D \stoptyping %D %D we get ourselves three \type{\message{Hello}} messages in %D a row. In both commands, the \type{n*} is optional. When this %D specification is missing, the command executes once. -% ! ! ! obsolete ! ! ! +% this one is obsolete: \def\dorepeat[#1]% {\dodorepeat#1*\empty*\relax} \long\def\dodorepeat#1*#2#3*#4\relax - {\ifx#2\empty - #1% - \else - \dorecurse{#1}{#2#3}% - \fi} + {\ifx#2\empty#1\else\dorecurse{#1}{#2#3}\fi} \def\repeater {\recurselevel} +% this one will be kept + \def\dorepeatwithcommand[#1]% {\dodorepeatwithcommand#1*\empty*\relax} @@ -2008,24 +2020,63 @@ % % more complex but better: +% \long\def\dodorepeatwithcommand#1*#2#3*#4\relax#5% +% {\ifx#2\empty +% #5{#1}% +% \else\ifnum#1<\zerocount +% % a la etex +% % \dorecurse{-\numexpr(#1)}{#5{-#2#3}}% +% % indirect +% %\innerrecurse#1% +% %\expanded{\dorecurse{\number-\innerrecurse}}{#5{-#2#3}}% +% % safer: +% \bgroup\scratchcounter#1% +% \expanded{\egroup\noexpand\dorecurse{\number-\scratchcounter}}{#5{-#2#3}}% +% \else\ifx#2+% +% \dorecurse{#1}{#5{#3}}% +% \else +% \dorecurse{#1}{#5{#2#3}}% +% \fi\fi\fi} + +\def\dorepeatwithcommand[#1]% + {\dodorepeatwithcommand#1*\empty*\relax} + \long\def\dodorepeatwithcommand#1*#2#3*#4\relax#5% - {\ifx#2\empty - #5{#1}% + {\ifx#2\empty\redorepeatwithcommand[#1]#5\else\dododorepeatwithcommand{#1}{#2}{#3}#5\fi} + +\long\def\dododorepeatwithcommand#1#2#3#4% + {\ifx#2\empty % redundant but gives cleaner extensions + #4{#1}% \else\ifnum#1<\zerocount - % a la etex - % \dorecurse{-\numexpr(#1)}{#5{-#2#3}}% - % indirect - %\innerrecurse#1% - %\expanded{\dorecurse{\number-\innerrecurse}}{#5{-#2#3}}% - % safer: \bgroup\scratchcounter#1% - \expanded{\egroup\noexpand\dorecurse{\number-\scratchcounter}}{#5{-#2#3}}% + \expanded{\egroup\noexpand\dorecurse{\number-\scratchcounter}}{#4{-#2#3}}% \else\ifx#2+% - \dorecurse{#1}{#5{#3}}% + \dorecurse{#1}{#4{#3}}% \else - \dorecurse{#1}{#5{#2#3}}% + \dorecurse{#1}{#4{#2#3}}% \fi\fi\fi} +\def\redorepeatwithcommand[#1]#2% + {#2{#1}} + +%D The extension hook permits something like: +%D +%D \starttyping +%D \bgroup +%D +%D \catcode`\*=\@@superscript +%D +%D \gdef\redorepeatwithcommand[#1]% +%D {\redodorepeatwithcommand#1*\empty*\relax} +%D +%D \long\gdef\redodorepeatwithcommand#1*#2#3*#4\relax#5% +%D {\dododorepeatwithcommand{#1}{#2}{#3}#5} +%D +%D \egroup +%D \stoptyping +%D +%D although one may wonder if changing the catcode of \type {*} is wise. + %D \macros %D {normalbgroup,normalgroup} %D @@ -2040,14 +2091,14 @@ %D The next macro is meant for situations where both strings %D are macros. This save some unneeded expansion. %D -%D \starttypen +%D \starttyping %D \long\def\doifstringinstringelse#1#2% %D {\p!doifinstringelse#1#2% %D \@EA\firstoftwoarguments %D \else %D \@EA\secondoftwoarguments %D \fi} -%D \stoptypen +%D \stoptyping %D %D A bit faster is: @@ -2071,12 +2122,12 @@ %D comma separated lists are more suitable for the user %D interface. Nevertheless we have: %D -%D \starttypen +%D \starttyping %D (\doglobal) \appendtoks ... \to\tokenlist %D (\doglobal) \prependtoks ... \to\tokenlist %D (\doglobal) \flushtoks\tokenlist %D \dotoks\tokenlist -%D \stoptypen +%D \stoptyping %D %D Er worden eerst enkele klad||registers gedefinieerd. These %D macros are clones of the ones implemented in page~378 of @@ -2085,7 +2136,7 @@ %D A simple implementation, one that does not handle braces %D at the outer level, is: %D -%D \starttypen +%D \starttyping %D \def\appendtoks#1\to#2% %D {\scratchtoks={#1}% %D \expanded{\dodoglobal\noexpand#2{\the#2\the\scratchtoks}}} @@ -2093,7 +2144,7 @@ %D \def\prependtoks#1\to#2% %D {\scratchtoks={#1}% %D \expanded{\dodoglobal\noexpand#2{\the\scratchtoks\the#2}}} -%D \stoptypen +%D \stoptyping %D %D But here we prefer: @@ -2166,28 +2217,41 @@ %D The test macro: %D -%D \starttypen +%D \starttyping %D \def\doifintokselse#1#2% #1 en #2 zijn toks %D {\edef\!!stringa{\the#1}\convertcommand\!!stringa\to\asciiA %D \edef\!!stringb{\the#2}\convertcommand\!!stringb\to\asciiB %D \doifinstringelse\asciiA\asciiB} -%D \stoptypen +%D \stoptyping %D %D Better: %D -%D \starttypen +%D \starttyping %D \def\doifintokselse#1#2% #1 en #2 zijn toks %D {\edef\!!stringa{\the#1}\convertcommand\!!stringa\to\asciiA %D \edef\!!stringb{\the#2}\convertcommand\!!stringb\to\asciiB %D \doifstringinstringelse\asciiA\asciiB} -%D \stoptypen +%D \stoptyping %D %D Even better: -\def\doifintokselse#1#2% #1 en #2 zijn toks - {\@EA\convertargument\the#1\to\asciiA - \@EA\convertargument\the#2\to\asciiB - \doifstringinstringelse\asciiA\asciiB} +\beginETEX + + \def\doifintokselse#1#2% #1 en #2 zijn toks + {\@EA\convertargument\the#1\to\asciiA + \@EA\convertargument\the#2\to\asciiB + \doifstringinstringelse\asciiA\asciiB} + +\endETEX + +\beginTEX + + \def\doifintokselse#1#2% #1 en #2 zijn toks + {\edef\asciiA{\the#1}\convertcommand\asciiA\to\asciiA + \edef\asciiB{\the#2}\convertcommand\asciiB\to\asciiB + \doifstringinstringelse\asciiA\asciiB} + +\endTEX %D Also: @@ -2210,19 +2274,19 @@ %D Declaring, setting and resetting \COUNTERS\ can be doen %D with the next set of commands. %D -%D \starttypen +%D \starttyping %D \makecounter {name} %D \pluscounter {name} %D \minuscounter {name} %D \resetcounter {name} %D \setcounter {name} {value} %D \countervalue {name} -%D \stoptypen +%D \stoptyping %D %D We prefer the use of global counters. This means that we %D have to load \PLAIN\ \TEX\ in a bit different way: %D -%D \starttypen +%D \starttyping %D \let\oldouter=\outer %D \let\outer=\relax %D \input plain.tex @@ -2230,12 +2294,12 @@ %D %D \def\newcount% %D {\alloc@0\count\countdef\insc@unt} -%D \stoptypen +%D \stoptyping %D %D First we show a solution in which we use real \COUNTERS. %D Apart from some expansion, nothing special is done. %D -%D \starttypen +%D \starttyping %D \def\makecounter#1% %D {\expandafter\newcount\csname#1\endcsname} %D @@ -2253,7 +2317,7 @@ %D %D \def\countervalue#1% %D {\the\getvalue{#1}} -%D \stoptypen +%D \stoptyping %D %D Because these macros are already an indirect way of working %D with counters, there is no harm in using pseudo \COUNTERS\ @@ -2336,10 +2400,10 @@ %D These both commands split a string at a given point in two %D parts, so \type{x.y} becomes \type{x} or \type{y}. %D -%D \starttypen +%D \starttyping %D \beforesplitstring test.tex\at.\to\filename %D \aftersplitstring test.tex\at.\to\extension -%D \stoptypen +%D \stoptyping %D %D The first routine looks (and is indeed) a bit simpler than %D the second one. The alternative looking more or less like @@ -2417,9 +2481,9 @@ %D %D A first application of the two routines defined above is: %D -%D \starttypen +%D \starttyping %D \removesubstringtest-\from first-last\to\nothyphenated -%D \stoptypen +%D \stoptyping %D %D Which in terms of \TEX\ looks like: @@ -2444,12 +2508,12 @@ %D list. When we add an item, we first check if it's already %D there. This means that every item in the list is unique. %D -%D \starttypen +%D \starttyping %D \addtocommalist {alfa} \name %D \addtocommalist {beta} \name %D \addtocommalist {gamma} \name %D \removefromcommalist {beta} \name -%D \stoptypen +%D \stoptyping %D %D These commands can be prefixed with \type{\doglobal}. The %D implementation of the second command is more complecated, @@ -2458,24 +2522,24 @@ %D commas. When one item is left, we also have to get rid of %D trailing spaces. %D -%D \starttypen +%D \starttyping %D \def\words{alfa, beta, gamma, delta} %D \def\words{alfa,beta,gamma,delta} -%D \stoptypen +%D \stoptyping %D %D Removing an item takes more time than adding one. %D %D A fast appending alternative, without any testing, is %D also provided: %D -%D \starttypen +%D \starttyping %D \appendtocommalist {something} \name %D \prependtocommalist {something} \name -%D \stoptypen +%D \stoptyping %D %D This can be implemented as follows: %D -%D \starttypen +%D \starttyping %D \def\appendtocommalist#1#2% %D {\ifx#2\empty %D \dodoglobal\edef#2{#1}% @@ -2489,7 +2553,7 @@ %D \else % no test on empty %D \dodoglobal\edef#2{#1,#2}% %D \fi} -%D \stoptypen +%D \stoptyping %D %D The faster alternatives are: @@ -2501,7 +2565,7 @@ %D The old ones are: %D -%D \starttypen +%D \starttyping %D \def\addtocommalist#1#2% %D {\ifx#2\empty %D \dodoglobal\edef#2{#1}% @@ -2537,7 +2601,7 @@ %D \doremovefromcommalist{}{#1}{#2}% %D \dofrontstrip#2% %D \dodoglobal\edef#2{#2}} -%D \stoptypen +%D \stoptyping %D %D Significantly faster (especially for longer lists): @@ -2586,9 +2650,9 @@ %D Slow but seldom used, so for the moment we stick to this %D implementation. %D -%D \starttypen +%D \starttyping %D \substituteincommalist{old}{new}{list} -%D \stoptypen +%D \stoptyping \def\substituteincommalist#1#2#3% old, new, list (slooow) {\edef\!!stringb{#1}% @@ -2628,21 +2692,21 @@ %D The next macro can be used to replace an indexed element %D in a commalist: %D -%D \starttypen +%D \starttyping %D \replaceincommalist\MyList{2} -%D \stoptypen +%D \stoptyping %D %D Element~2 will be replaced by the current meaning of the macro %D \type {\newcommalistelement}. The old meaning is saved in %D \type {\commalistelement}. The replacement honors grouped items, %D like in: %D -%D \starttypen +%D \starttyping %D \def\MyList{a,b,c,d,e,f} \replaceincommalist\MyList{3} %D \def\MyList{a,b,c,d,e,f} \replaceincommalist\MyList{3} %D \def\MyList{a,{b,c},d,e,f} \replaceincommalist\MyList{3} %D \def\MyList{a,b,c,{d,e,f}} \replaceincommalist\MyList{3} -%D \stoptypen +%D \stoptyping \let\newcommalistelement\empty @@ -2706,9 +2770,9 @@ %D %D We can convert point into centimeters with: %D -%D \starttypen +%D \starttyping %D \PtToCm{dimension} -%D \stoptypen +%D \stoptyping %D %D Splitting the value and the unit is done by: @@ -2753,10 +2817,10 @@ %D We also support: %D -%D \starttypen +%D \starttyping %D \numberofpoints {dimension} %D \dimensiontocount {dimension} {\count} -%D \stoptypen +%D \stoptyping %D %D Both macros return a rounded number. @@ -2792,10 +2856,10 @@ %D %D Premature and a bit of beta, we offer: %D -%D \starttypen +%D \starttyping %D \pushmacro\macro %D \popmacro\macro -%D \stoptypen +%D \stoptyping %D %D Beware: global! @@ -2871,11 +2935,11 @@ %D corrected value is available in \type{\localhsize}, which %D needs to be calculated with \type{\setlocalhsize} first. %D -%D \starttypen +%D \starttyping %D \setlocalhsize \hbox to \localhsize{...} %D \setlocalhsize[-1em] \hbox to \localhsize{...} %D \setlocalhsize[.5ex] \hbox to \localhsize{...} -%D \stoptypen +%D \stoptyping %D %D These examples show us that an optional can be used. The %D value provided is added to \type{\localhsize}. @@ -2884,12 +2948,14 @@ \def\complexsetlocalhsize[#1]% don't change ! {\localhsize\hsize - % \advance\localhsize -\parindent % changed anyway + \ifnum\hangafter<\zerocount + \advance\localhsize\ifdim\hangindent>\zeropoint-\fi\hangindent + \fi \advance\localhsize -\leftskip \advance\localhsize -\rightskip \advance\localhsize #1\relax} -\def\simplesetlocalhsize% +\def\simplesetlocalhsize {\complexsetlocalhsize[\zeropoint]} \definecomplexorsimple\setlocalhsize @@ -2903,9 +2969,9 @@ %D (definitely and fortunately) no feature of \TEX, we have to %D step through the token list ourselves. %D -%D \starttypen +%D \starttyping %D \processtokens {before} {between} {after} {space} {tokens} -%D \stoptypen +%D \stoptyping %D %D An example of a call is: %D @@ -2917,7 +2983,7 @@ %D %D This results in: %D -%D \haalbuffer +%D \getbuffer %D %D The list of tokens may contain spaces, while \type{\\}, %D \type{{}} and \type{\ } are handled as space too. @@ -3023,7 +3089,7 @@ %D Faster but spoiling inheritance (copying parameters): %D -%D \starttypen +%D \starttyping %D \def\doifelsevaluesomething#1#2#3% %D {\expandafter\ifx\csname#1\endcsname\empty#3\else#2\fi} %D @@ -3032,7 +3098,7 @@ %D %D \def\doifvaluenothing#1#2% %D {\expandafter\ifx\csname#1\endcsname\empty#2\fi} -%D \stoptypen +%D \stoptyping %D %D Slightly more efficient: @@ -3180,11 +3246,11 @@ %D compare filenames. The next three alternatives upcase their %D arguments before comparing them. %D -%D \starttypen +%D \starttyping %D \DOIF {string1} {string2} {...} %D \DOIFNOT {string1} {string2} {...} %D \DOIFELSE {string1} {string2} {then ...}{else ...} -%D \stoptypen +%D \stoptyping %D %D We have to use a two||step implementation, because the %D expansion has to take place outside \type{\uppercase}. @@ -3233,16 +3299,16 @@ %D \DVI||file, which passes them to for instance a PostScript %D file. %D -%D \starttypen +%D \starttyping %D \stripspaces\from\one\to\two -%D \stoptypen +%D \stoptyping %D %D Both the old string \type{\one} and the new one \type{\two} %D are expanded. This command is a special case of: %D -%D \starttypen +%D \starttyping %D \stripcharacter\char\from\one\to\two -%D \stoptypen +%D \stoptyping %D %D As we can see below, spaces following a control sequence are %D to enclosed in \type{{}}. @@ -3281,9 +3347,9 @@ %D take care of such executions and when not defined, gobbles %D the unwanted arguments. %D -%D \starttypen +%D \starttyping %D \executeifdefined{name}\gobbleoneargument -%D \stoptypen +%D \stoptyping %D %D We can of course gobble more arguments using the %D appropriate gobbling command. @@ -3329,9 +3395,9 @@ %D %D An also fully expandable variant is the following: %D -%D \starttypen +%D \starttyping %D \executeifdefinedcs{a}{b} -%D \stoptypen +%D \stoptyping %D %D In dit geval zijn beide argumenten csnames. @@ -3341,9 +3407,9 @@ %D We considered an alternative implementation accepting %D commands directly, like: %D -%D \starttypen -%D \executeifdefined\naam\gobblefivearguments -%D \stoptypen +%D \starttyping +%D \executeifdefined\name\gobblefivearguments +%D \stoptyping %D %D For the moment we don't need this one, so we stick to the %D faster one. @@ -3354,10 +3420,10 @@ %D The following macros were requested by Simon. Watch the %D global variant. %D -%D \starttypen +%D \starttyping %D \executeandforget\SomeCommand %D \doglobal\executeandforget\AnotherCommand -%D \stoptypen +%D \stoptyping \def\executeandforget#1% {\global\let\@@expanded#1% @@ -3370,9 +3436,9 @@ %D The next command checks a string on the presence of a space %D and executed a command accordingly. %D -%D \starttypen +%D \starttyping %D \doifsomespaceelse {tekst} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D We use this command in \CONTEXT\ for determing if an %D argument must be broken into words when made interactive. @@ -3401,9 +3467,9 @@ %D an interface aspect of \CONTEXT. The first command can be %D used to adapt a \DIMENSION. %D -%D \starttypen +%D \starttyping %D \adaptdimension {dimension} {value} -%D \stoptypen +%D \stoptyping %D %D When the value is preceed by a \type{+} or minus, the %D dimension is advanced accordingly, otherwise it gets the @@ -3438,9 +3504,9 @@ %D maat. This time we take the value as it is, and don't look %D explicitly at the preceding sign. %D -%D \starttypen +%D \starttyping %D \balancedimensions {dimension 1} {dimension 2} {value} -%D \stoptypen +%D \stoptyping %D %D When a positive value is given, the first dimension is %D incremented, the second ond is decremented. A negative value @@ -3462,19 +3528,19 @@ %D \type{\processcommalist} command. This time we don't handle %D nesting but accept arbitrary seperators. %D -%D \starttypen +%D \starttyping %D \processseparatedlist[list][separator]\command -%D \stoptypen +%D \stoptyping %D %D One can think of things like: %D -%D \starttypen +%D \starttyping %D \processseparatedlist[alfa+beta+gamma][+]\message -%D \stoptypen +%D \stoptyping %D First we show the simple alternative: %D -%D \starttypen +%D \starttyping %D \def\processseparatedlist[#1][#2]#3% %D {\def\doprocessseparatedlist##1##2#2% %D {\if]##1% @@ -3490,7 +3556,7 @@ %D \fi\fi\fi %D \next}% %D \doprocessseparatedlist#1#2]#2} -%D \stoptypen +%D \stoptyping %D %D However, we want to handle all situations, like: %D @@ -3529,16 +3595,16 @@ %D An even more general list processing macro is the %D following one: %D -%D \starttypen +%D \starttyping %D \processlist{beginsym}{endsym}{separator}\docommando list -%D \stoptypen +%D \stoptyping %D %D This one supports arbitrary open and close symbols as well %D as user defined separators. %D -%D \starttypen +%D \starttyping %D \processlist(){=>}\docommando(a=>b=>c=>d) -%D \stoptypen +%D \stoptyping \def\processlist#1#2#3#4% {\def\doprocesslist##1#2% @@ -3577,9 +3643,9 @@ %D containing keywords. Assignments are treated accordingly, %D keywords are treated by \type{\command}. %D -%D \starttypen +%D \starttyping %D \processassignlist[...=...,...=...,...]\commando -%D \stoptypen +%D \stoptyping %D %D This command can be integrated in \type{\getparameters}, but %D we decided best not to do so. @@ -3599,10 +3665,10 @@ % %D Sometimes \type{\fi}'s can get into the way. We can reach % %D over such a troublemaker with: % %D -% %D \starttypen +% %D \starttyping % %D \DoAfterFi{some commands} % %D \DoAfterFiFi{some commands} -% %D \stoptypen +% %D \stoptyping % %D % %D It saves us a \type{\next} construction. Skipping % %D \type{\else...\fi} is more tricky, so this one is not @@ -3618,10 +3684,10 @@ %D When manipulating data(bases) and for instance generating %D index entries, the next three macros can be of help: %D -%D \starttypen +%D \starttyping %D \untextargument{...}\to\name %D \untexcommand {...}\to\name -%D \stoptypen +%D \stoptyping %D %D They remove braces and backslashes and give us something to %D sort. @@ -3648,10 +3714,10 @@ %D used big points (\TEX's bp). The next macros convert points %D and scaled points into big points. %D -%D \starttypen +%D \starttyping %D \ScaledPointsToBigPoints {number} \target %D \ScaledPointsToWholeBigPoints {number} \target -%D \stoptypen +%D \stoptyping %D %D The magic factor $72/72.27$ can be found in most \TEX\ %D related books. @@ -3716,9 +3782,9 @@ %D Points can be stripped from their suffix by using %D \type{\withoutpt}. The next macro enveloppes this macro. %D -%D \starttypen +%D \starttyping %D \PointsToReal {dimension} \target -%D \stoptypen +%D \stoptyping \def\PointsToReal#1#2% {\scratchdimen#1% @@ -3731,9 +3797,9 @@ %D first token gets the whole first line. We can prevent this %D by saying: %D -%D \starttypen +%D \starttyping %D \dontleavehmode -%D \stoptypen +%D \stoptyping %D %D This command is used in for instance the language module %D \type{lang-ini}. @@ -3747,22 +3813,26 @@ {\mathsurround\zeropoint\everymath\emptytoks$ $}% \fi \fi} +%D And now your version of \TEX\ may provide: + +\ifx\quitvmode\undefined \else \let\dontleavehmode\quitvmode \fi + %D \macros %D {uppercasestring,lowercasestring} %D %D The names tell what they do: %D -%D \starttypen +%D \starttyping %D \uppercasestring somestring\to\somestring %D \lowercasestring somestring\to\somestring -%D \stoptypen +%D \stoptyping %D %D the first argument may be a \type{\macro}. -\def\uppercasestring#1\to#2% +\def\uppercasestring#1\to#2% first @EA redundant {\edef#2{#1}\@EA\uppercase\@EA{\@EA\dodoglobal\@EA\edef\@EA#2\@EA{#2}}} -\def\lowercasestring#1\to#2% +\def\lowercasestring#1\to#2% first @EA redundant {\edef#2{#1}\@EA\lowercase\@EA{\@EA\dodoglobal\@EA\edef\@EA#2\@EA{#2}}} %D \macros @@ -3771,16 +3841,16 @@ %D With the next macro we enter a critical area of macro %D expansion. What we want is a macro that looks like: %D -%D \starttypen +%D \starttyping %D \handletokens some tokens\with \somemacro -%D \stoptypen +%D \stoptyping %D %D At first sight the next implementation will suffice, but %D running this one shows that we loose the spaces. This is no %D surprise because we grab arguments and spaces preceding those %D are just ignored. %D -%D \starttypen +%D \starttyping %D \def\nohandletokens#1\end% %D {} %D @@ -3796,13 +3866,13 @@ %D \long\def\handletokens#1\with#2% %D {\let\docommando=#2\relax %D \dohandletokens#1\endoftoken\end} -%D \stoptypen +%D \stoptyping %D %D A second approach therefore grabs the individual characters %D by using \type{\afterassignment}, in which case the space is %D read in as space. %D -%D \starttypen +%D \starttyping %D \def\dodohandletokens% %D {\ifx\next\end \else %D \docommando{\next}% @@ -3815,17 +3885,17 @@ %D \long\def\handletokens#1\with#2% %D {\let\docommando=#2% %D \dohandletokens#1\end} -%D \stoptypen +%D \stoptyping %D A bonus example: %D -%D \starttypen +%D \starttyping %D \hbox{\handletokens tekst en meer tekst\with\ruledhbox} %D %D \def\weetikveel#1{\if#1\blankspace\space\else\ruledhbox{#1}\fi} %D %D \hbox{\handletokens tekst en meer tekst\with\weetikveel} -%D \stoptypen +%D \stoptyping %D \macros %D {counttoken,counttokens} @@ -3833,10 +3903,10 @@ %D For the few occasions that we want to know the number of %D specific tokens in a string, we can use: %D -%D \starttypen +%D \starttyping %D \counttoken token\in string\to \count %D \counttokens string\to \count -%D \stoptypen +%D \stoptyping %D %D This macro, that for instance is used in \type{cont-tab}, %D takes a real counter. The macro can be preceded by \type @@ -3920,7 +3990,7 @@ %D Careful reading shows that inside an \type{\edef} macro's %D that are \type{\let} are not expanded! %D -%D \unprotect\haalbuffer[next]\protect +%D \unprotect\getbuffer[next]\protect %D %D That's why we finally end up with a macro that looks %D ahead by using an assignment, this time by using \type @@ -3932,7 +4002,7 @@ {\futurelet\nexthandledtoken\dodohandletokens} \long\def\handletokens#1\with#2% - {\global\let\dododohandletokens#2% + {\gdef\dododohandletokens{#2}% permits more complex #2's \dohandletokens#1\end} %D A previous version said \type{\docommando=#2}, but to enable @@ -3942,7 +4012,7 @@ %D This alternatives does not handle grouped tokens well, so %D next we had (for a short moment): %D -%D \starttypen +%D \starttyping %D \def\dodohandletokens#1% %D {\ifx\nexthandledtoken\blankspace %D \dododohandletokens{ }% @@ -3951,12 +4021,12 @@ %D \dododohandletokens{#1}% %D \expandafter\dohandletokens %D \fi} -%D \stoptypen +%D \stoptyping %D %D This one failed on a trailing space, something we %D encounter in \JAVASCRIPT\ cleaning. %D -%D \starttypen +%D \starttyping %D \def\dodohandletokens#1% %D {\ifx\nexthandledtoken\blankspace %D \dododohandletokens{ }% @@ -3965,7 +4035,7 @@ %D \dododohandletokens{#1}% %D \expandafter\dohandletokens %D \fi} -%D \stoptypen +%D \stoptyping %D %D So, now we have: @@ -3983,17 +4053,17 @@ %D %D \def\xxx#1{[#1]} %D -%D \startregels +%D \startlines %D \handletokens abc\with\xxx %D \handletokens a b c\with\xxx %D \handletokens a b c\with\xxx %D \handletokens a{bc}d\with\xxx %D \handletokens a\space bc \with\xxx -%D \stopregels +%D \stoplines %D %D And our previous example shows up as: %D -%D \haalbuffer[example] +%D \getbuffer[example] %D \macros %D {iftrialtypesetting} @@ -4011,7 +4081,7 @@ %D %D The next four macros are rather self explaining: %D -%D \starttypen +%D \starttyping %D \startlocal %D whatever assignments %D \stoplocal @@ -4019,7 +4089,7 @@ %D \startglobal %D whatever assignments %D \stopglobal -%D \stoptypen +%D \stoptyping %D %D These macros are meant for those who know the difference %D between local and global assignments and are aware of the @@ -4079,10 +4149,10 @@ %D longer compatible, although in many cases things go ok. %D Beware of verbatim, i.e. catcode changes. %D -%D \starttypen +%D \starttyping %D \def\starthans% %D {\processcontent{stophans}\test{\message{\test}\wait}} -%D \stoptypen +%D \stoptyping %D %D This macro is first used in the tabulation macros. @@ -4134,13 +4204,13 @@ %D supported. The sorting algorithm is very simple, so the list %D should not be too long or sorting will be very slow. %D -%D \starttypen +%D \starttyping %D \sortcommalist[10,2,4,5,6,1,2,3,4,10,20]\donumericcompare %D %D \def\test{10,2,4,5,6,1,2,3,4,10,20} %D %D \sortcommacommand[\test]\donumericcompare -%D \stoptypen +%D \stoptyping %D %D In both cases, the result is available in the macro \type %D {\sortedcommalist}. @@ -4276,13 +4346,13 @@ %D %D The next assignments are all valid: %D -%D \starttypen +%D \starttyping %D \setdimensionwithunit\scratchdimen{10} {cm} %D \setdimensionwithunit\scratchdimen{10cm}{cm} %D \setdimensionwithunit\scratchdimen{10cm}{} %D \freezedimensionwithunit\SomeWidth{\textwidth} %D \freezedimensionwithunit\SomeDepth{\dp\strutbox} -%D \stoptypen +%D \stoptyping %D %D As an alternative for the next macro we can use a global %D assignment inside a box. The \type{\empty}'s permits @@ -4379,9 +4449,9 @@ %D number, especially in full expandable macros where using %D \type {\relax} would lead to disasters. %D -%D \starttypen +%D \starttyping %D \ifodd\purenumber{...}\space ... \else ... \fi -%D \stoptypen +%D \stoptyping %D %D Here we use a space as number delimiter in combination %D with a space- and relax-less \type {\purenumber}. This @@ -4393,25 +4463,25 @@ %D \macros %D {filterfromvalue} %D -%D \starttypen +%D \starttyping %D \setvalue{xx}{{A}{B}{C}} %D %D \filterfromvalue{xx}{3}{3} %D \filterfromvalue{xx}{3}{2} %D \filterfromvalue{xx}{3}{1} -%D \stoptypen +%D \stoptyping %D %D An alternative is to store 'max' in the list, say: %D -%D \starttypen +%D \starttyping %D \setvalue{xx}{3{A}{B}{C}} %D -%D \filterfromvalues{xx}{3} -%D \filterfromvalues{xx}{2} -%D \filterfromvalues{xx}{1} -%D \stoptypen +%D \filterfromvalues{3}{xx}{3} +%D \filterfromvalues{3}{xx}{2} +%D \filterfromvalues{3}{xx}{1} +%D \stoptyping %D -%D I'll implement this when I'm in \citaat {writing dirty +%D I'll implement this when I'm in \quotation {writing dirty %D macros mood}. \def\filterfromvalue#1#2#3% value max n @@ -4476,11 +4546,11 @@ %D \macros %D {definemeasure} %D -%D \starttypen +%D \starttyping %D \definemeasure[mywidth][\dimexpr(\textwidth-1cm)] %D %D ... \measure{mywidth} ... -%D \stoptypen +%D \stoptyping \def\??dm{@@dm} % brrr @@ -4510,4 +4580,56 @@ \expandafter\thirdoffourarguments \fi} -\protect \endinput \ No newline at end of file +%D \macros +%D {comparedimension,comparedimensioneps} +%D +%D This is a dirty one: we simply append a unit and discard it when needed. + +\newdimen\roundingeps \roundingeps=10sp + +\def\comparedimension#1#2% + {\chardef\compresult + \ifdim#1<#2% + \zerocount + \else\ifdim#1<#2% + \plusone + \else + \plustwo + \fi\fi} + +\beginETEX + +\def\comparedimensioneps#1#2% + {\chardef\compresult + \ifdim\dimexpr(#1-#2)<\roudingeps + \zerocount + \else\ifdim\dimexpr(#2-#1)<\roudingeps + \zerocount + \else\ifdim#1<#2% + \plusone + \else + \plustwo + \fi\fi\fi} + +\endETEX + +\beginTEX + +\newdimen\comparedimen + +\def\comparedimensioneps#1#2% + {\comparedimen#1\advance\comparedimen-#2\relax + \chardef\compresult + \ifdim\comparedimen<\roudingeps + \zerocount + \else\ifdim-\comparedimen<\roudingeps + \zerocount + \else\ifdim#1<#2% + \plusone + \else + \plustwo + \fi\fi\fi} + +\endTEX + +\protect \endinput diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex index 5f6ca4570..4ca2a966f 100644 --- a/tex/context/base/syst-gen.tex +++ b/tex/context/base/syst-gen.tex @@ -31,14 +31,14 @@ %D want to prevent it being loaded more than once. This can be %D done using: %D -%D \starttypen +%D \starttyping %D \abortinputifdefined\command -%D \stoptypen +%D \stoptyping %D %D where \type{\command} is a command defined in the module %D to be loaded only once. %D -%D \starttypen +%D \starttyping %D \def\abortinputifdefined#1% %D {\ifx#1\undefined %D \let\next=\relax @@ -46,7 +46,7 @@ %D \let\next=\endinput %D \fi %D \next} -%D \stoptypen +%D \stoptyping %D %D This macro can be speed up in terms of speed as well as %D memory. Because this is a nice example of a bit strange @@ -54,31 +54,31 @@ %D %D If we perform such actions directly, we can say: %D -%D \starttypen +%D \starttyping %D \ifx\somecommand\undefined %D \let\next=\relax %D \else %D \let\next=\endinput %D \fi %D \next -%D \stoptypen +%D \stoptyping %D %D We need the \type{\next} because we need to end the %D \type{\fi}. The efficient one is: %D -%D \starttypen +%D \starttyping %D \ifx\somecommand\undefined %D \else %D \expandafter\endinput %D \fi -%D \stoptypen +%D \stoptyping %D %D Because \type{\endinput} comes into action after the current %D line, we can also say: %D -%D \starttypen +%D \starttyping %D \ifx\somecommand\undefined \else \endinput \fi -%D \stoptypen +%D \stoptyping %D %D When we define a macro, we tend to use a format which %D shows as besat as can how things are done. \TEX\ however @@ -104,17 +104,20 @@ %D However, the command that is needed for this is not yet %D defined. %D -%D \starttypen +%D \starttyping %D \writestatus{laden}{Context Systeem Macro's (a)} -%D \stoptypen +%D \stoptyping %D The next few macros are needed in case this module is %D used outside \CONTEXT. \ifx\beginTEX\undefined - \long\def\beginETEX#1\endETEX{} - \long\def\beginOMEGA#1\endOMEGA{} \let\beginTEX\relax\let\endTEX\relax + \long\def\beginETEX #1\endETEX {} + \long\def\beginOMEGA #1\endOMEGA{} +% \long\def\onlyTEX #1{#1} +% \long\def\onlyETEX #1{} +% \long\def\onlyOMEGA#1{} \fi %D \macros @@ -129,11 +132,11 @@ %D This is done by \type{\unprotect} and \type{\protect}, for %D instance: %D -%D \starttypen +%D \starttyping %D \unprotect %D \def\!test{test} %D \protect -%D \stoptypen +%D \stoptyping %D %D The defined command \type{\!test} can of course only be %D called upon when we are in the \type{\unprotect}'ed state, @@ -332,17 +335,16 @@ %D define some shortcuts to the local scatchregisters~0, 2, 4, %D 6 and~8. -\newcount\!!counta \toksdef\!!toksa=0 \dimendef\!!dimena= 0 \chardef\!!boxa=0 -\newcount\!!countb \toksdef\!!toksb=2 \dimendef\!!dimenb= 2 \chardef\!!boxb=2 -\newcount\!!countc \toksdef\!!toksc=4 \dimendef\!!dimenc= 4 \chardef\!!boxc=4 -\newcount\!!countd \toksdef\!!toksd=6 \dimendef\!!dimend= 6 \chardef\!!boxd=6 -\newcount\!!counte \toksdef\!!tokse=8 \dimendef\!!dimene= 8 \chardef\!!boxe=8 -\newcount\!!countf \dimendef\!!dimenf=10 - \dimendef\!!dimeng=12 - \dimendef\!!dimenh=14 - \dimendef\!!dimeni=16 - \dimendef\!!dimenj=18 - +\newcount\!!counta \toksdef\!!toksa=0 \dimendef\!!dimena= 0 \chardef\!!boxa =0 +\newcount\!!countb \toksdef\!!toksb=2 \dimendef\!!dimenb= 2 \chardef\!!boxb =2 +\newcount\!!countc \toksdef\!!toksc=4 \dimendef\!!dimenc= 4 \chardef\!!boxc =4 +\newcount\!!countd \toksdef\!!toksd=6 \dimendef\!!dimend= 6 \chardef\!!boxd =6 +\newcount\!!counte \toksdef\!!tokse=8 \dimendef\!!dimene= 8 \chardef\!!boxe =8 +\newcount\!!countf \dimendef\!!dimenf=10 %skipdef\!!skipa=0 + \dimendef\!!dimeng=12 %skipdef\!!skipb=2 + \dimendef\!!dimenh=14 %skipdef\!!skipc=4 + \dimendef\!!dimeni=16 %skipdef\!!skipd=6 + \dimendef\!!dimenj=18 %skipdef\!!skipe=8 \let\!!stringa=\empty \let\!!stringb=\empty \let\!!stringc=\empty \let\!!stringd=\empty \let\!!stringe=\empty \let\!!stringf=\empty @@ -409,9 +411,9 @@ %D don't expand them before interpretation. Such commands can %D be enclosed with \type{\expanded}, like: %D -%D \starttypen +%D \starttyping %D \expanded{\setupsomething[\alfa]} -%D \stoptypen +%D \stoptyping %D %D Such situations occur for instance when \type{\alfa} is a %D commalist or when data stored in macros is fed to index of @@ -459,26 +461,20 @@ %D lot of \type {\expandafter}'s. They expand the arguments %D after the first command. %D -%D \starttypen +%D \starttyping %D \expandoneargafter \command{\abc} %D \expandtwoargsafter\command{\abc}{\def} -%D \stoptypen +%D \stoptyping %D %D These commands expect the arguments to be macros. -\def\expandoneargafter#1% - {\@EA#1\@EA} - -\def\expandtwoargsafter#1#2% - {\@EA\@EA\@EA#1\@EA\@EA\@EA{\@EA#2\@EA}\@EA} +\def\expandoneargafter #1{\@EA#1\@EA} +\def\expandtwoargsafter#1#2{\@EA\@EA\@EA#1\@EA\@EA\@EA{\@EA#2\@EA}\@EA} %D These two do a full expansion: -\def\fullexpandoneargafter#1#2% - {\long\xdef\@@expanded{\noexpand#1{#2}}\@@expanded} - -\def\fullexpandtwoargsafter#1#2#3% - {\long\xdef\@@expanded{\noexpand#1{#2}{#3}}\@@expanded} +\def\fullexpandoneargafter #1#2{\long\xdef\@@expanded{\noexpand#1{#2}}\@@expanded} +\def\fullexpandtwoargsafter#1#2#3{\long\xdef\@@expanded{\noexpand#1{#2}{#3}}\@@expanded} %D \macros %D {gobbleoneargument,gobble...arguments} @@ -514,9 +510,9 @@ %D character. Disturbing spaces and line endings, which are %D normally interpreted as spaces too, are skipped. %D -%D \starttypen +%D \starttyping %D \doifnextcharelse {karakter} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D This macro differs from the original in the use of \type %D {\localnext} because we don't want clashes with \type @@ -558,10 +554,10 @@ %D \type{\reinspectnextcharacter}. The chain reaction is %D visually compatible with the next sequence: %D -%D \starttypen +%D \starttyping %D \expandafter\def\reinspectnextcharacter % %D {\futurelet\nexttoken\inspectnextcharacter} -%D \stoptypen +%D \stoptyping %D %D However complicated it may look, I'm still glad I stumbled %D into this construction. Saving and restoring \type {\:} is @@ -588,7 +584,7 @@ %D \type{\def} and \type{\let}. Every macro programmer sooner %D or later wants macros like these. %D -%D \starttypen +%D \starttyping %D \setvalue {name}{...} = \def\name{...} %D \setgvalue {name}{...} = \gdef\name{...} %D \setevalue {name}{...} = \edef\name{...} @@ -597,7 +593,7 @@ %D \letgvalue {name}=\... = \global\let\name=\... %D \getvalue {name} = \name %D \resetvalue {name} = \def\name{} -%D \stoptypen +%D \stoptyping %D %D As we will see, \CONTEXT\ uses these commands many times, %D which is mainly due to its object oriented and parameter @@ -634,17 +630,17 @@ %D Sometimes prefixing the macro with \type{\donottest} leads %D to defining an auxiliary macro, like %D -%D \starttypen +%D \starttyping %D \def\dosomecommand {... ... ...} %D \def\somecommand {\donottest\dosomecommand} -%D \stoptypen +%D \stoptyping %D %D This double definition can be made transparant by using %D \type{\unexpanded}, as in: %D -%D \starttypen +%D \starttyping %D \unexpanded\def\somecommand{... ... ...} -%D \stoptypen +%D \stoptyping %D %D The protection mechanism uses: @@ -677,11 +673,11 @@ %D a negative impact on searching in the hash table. Because %D some simple testing does not show differences, we just use: %D -%D \starttypen +%D \starttyping %D \def\unexpanded#1#2% %D {\@EA#1\@EA#2\@EA{\@EA\donottest\csname\s!do\string#2\endcsname}% %D \@EA#1\csname\s!do\string#2\endcsname} -%D \stoptypen +%D \stoptyping %D %D Well, in fact we use the bit more versatile alternative. The %D \type {\honorunexpanded} can be used to \type {\string} @@ -734,10 +730,10 @@ %D %D And so the definition in our example turns out to be: %D -%D \starttypen +%D \starttyping %D \def\csname do\somecommand\endcsname{... ... ...} %D \def\somecommand{\donottest\csname do\somecommand\endcsname} -%D \stoptypen +%D \stoptyping %D %D In which \type{do\somecommand} is hidden from the user and %D cannot lead to confusion. It's still permitted to define @@ -757,13 +753,13 @@ %D \type{\undefined}. To garantee correct working of the next %D set of macros, \type{\undefined} may never be defined! %D -%D \starttypen +%D \starttyping %D \doifundefined {string} {...} %D \doifdefined {string} {...} %D \doifundefinedelse {string} {then ...} {else ...} %D \doifdefinedelse {string} {then ...} {else ...} %D \doifalldefinedelse {commalist} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D Every macroname that \TEX\ builds gets an entry in the hash %D table, which is of limited size. It is expected that e-\TeX\ @@ -774,11 +770,11 @@ %D name to be build by using \type{\csname} and %D \type{\endcsname} and testing the \type{\name} directly. %D -%D \starttypen +%D \starttyping %D \expandafter\ifx\csname NameA\endcsname\relax ... \else ... \fi %D %D \ifx\NameB\undefined ... \else ... \fi -%D \stoptypen +%D \stoptyping %D %D I became aware of this when I mistakenly testen the first %D one against \type{\undefined}. When \TEX\ build a name using @@ -787,11 +783,11 @@ %D quickest way to check these things is asking \TEX\ to show %D the meaning of the names: %D -%D \starttypen +%D \starttyping %D \expandafter\show\csname NameA\endcsname %D %D \show\NameB -%D \stoptypen +%D \stoptyping %D %D The main reason why this never will be a big problem is that %D when one uses the \type{\csname} way, one probably has to do @@ -808,7 +804,7 @@ %D Our first implementation of \type{\ifundefined} was %D straightforward and readable: %D -%D \starttypen +%D \starttyping %D \def\ifundefined#1% %D {\expandafter\ifx\csname#1\endcsname\relax}% %D @@ -840,7 +836,7 @@ %D \else %D \endgroup#3% %D \fi} -%D \stoptypen +%D \stoptyping %D %D When this module was optimized, timing showed that the %D next alternative can be upto twice as fast, especially when @@ -964,7 +960,7 @@ %D Before we start using this variant, we used another one, %D which is even a bit faster. This one looked like: %D -%D \starttypen +%D \starttyping %D \def\p!doifundefined% %D {\begingroup %D \let\donottest=\dontprocesstest @@ -976,18 +972,18 @@ %D \else %D \endgroup#3% %D \fi} -%D \stoptypen +%D \stoptyping %D %D A even more previous version used \type{\bgroup} and %D \type {\egroup}. In math mode however, \type{$1{x}2$} differs %D from \type{$1x2$}. This can been seen when one compares the %D output of: %D -%D \starttypen +%D \starttyping %D $\kern10pt\showthe\lastkern$ %D $\kern10pt{\showthe\lastkern}$ %D $\kern10pt\begingroup\showthe\lastkern\endgroup$ -%D \stoptypen +%D \stoptyping %D %D Also in math mode, one can better use \type {\begingroup} %D and companion instead of \type {\bgroup}. @@ -1058,11 +1054,11 @@ %D runtime redefinition, expansion etc. While \MODULA\ taught %D me to structure, \TEX\ taught me to think recursive. %D -%D \starttypen +%D \starttyping %D \doif {string1} {string2} {...} %D \doifnot {string1} {string2} {...} %D \doifelse {string1} {string2} {then ...}{else ...} -%D \stoptypen +%D \stoptyping %D %D When expansion gives problems, we can precede the %D troublemaker with \type{\donottest}. @@ -1070,14 +1066,14 @@ %D This implementatie does not use the construction which is %D more robust for nested conditionals. %D -%D \starttypen +%D \starttyping %D \ifx\!!stringa\!!stringb %D \def\next{#3}% %D \else %D \def\next{#4}% %D \fi %D \next -%D \stoptypen +%D \stoptyping %D %D In practice, this alternative is at least 20\% slower than %D the alternative used here. The few cases in which we @@ -1208,7 +1204,7 @@ %D auxiliary macro also proved to be slower, so we definitely %D did not choose for: %D -%D \starttypen +%D \starttyping %D \def\p!doifelse#1#2% %D {\let\donottest=\dontprocesstest %D \edef\!!stringa{#1}% @@ -1224,7 +1220,7 @@ %D %D \long\def\doifelse#1#2#3#4% %D {\p!doifelse{#1}{#2}#3\else#4\fi} -%D \stoptypen +%D \stoptyping %D %D Optimizations like this are related of course to the %D bottlenecks in \TEX. It seems that restoring saved meanings @@ -1235,11 +1231,11 @@ %D %D We complete our set of conditionals with: %D -%D \starttypen +%D \starttyping %D \doifempty {string} {...} %D \doifnotempty {string} {...} %D \doifemptyelse {string} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D This time, the string is not expanded. @@ -1274,15 +1270,15 @@ %D set of strings. Depending on the result, some action is %D taken. %D -%D \starttypen +%D \starttyping %D \doifinset {string} {string,...} {...} %D \doifnotinset {string} {string,...} {...} %D \doifinsetelse {string} {string,...} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D The second argument is the comma separated set of strings. %D -%D \starttypen +%D \starttyping %D \long\def\doifinsetelse#1#2#3#4% %D {\doifelse{#1}{} %D {#4} @@ -1303,7 +1299,7 @@ %D %D \long\def\doifnotinset#1#2#3% %D {\doifinsetelse{#1}{#2}{}{#3}} -%D \stoptypen +%D \stoptyping %D %D Because this macro is called quite often we've spent some %D time optimizing it. This time, the gain in speed is due to @@ -1460,16 +1456,16 @@ %D Probably the most time consuming tests are those that test %D for overlap in sets of strings. %D -%D \starttypen +%D \starttyping %D \doifcommon {string,...} {string,...} {...} %D \doifnotcommon {string,...} {string,...} {...} %D \doifcommonelse {string,...} {string,...} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D We show the slower alternative first, because it shows us %D how things are done. %D -%D \starttypen +%D \starttyping %D \long\def\doifcommonelse#1#2#3#4% %D {\donefalse %D \def\p!docommoncheck##1% @@ -1492,7 +1488,7 @@ %D %D \long\def\doifnotcommon#1#2#3% %D {\doifcommonelse{#1}{#2}{}{#3}} -%D \stoptypen +%D \stoptyping %D %D The processing time is shortened by getting the auxiliary %D macro to the outermost level and using less \type{\edef}'s. @@ -1648,9 +1644,9 @@ %D We've already seen some macros that take care of comma %D separated lists. Such list can be processed with %D -%D \starttypen +%D \starttyping %D \processcommalist[string,string,...]\commando -%D \stoptypen +%D \stoptyping %D %D The user supplied command \type{\commando} receives one %D argument: the string. This command permits nesting and @@ -1706,7 +1702,7 @@ %D however are treated. We have to check for the special case %D \type{[{a,b,c}]}. %D -%D \starttypen +%D \starttyping %D \def\processcommalist[% %D {\futurelet\nexttoken\docheckcommaitem} %D @@ -1733,7 +1729,7 @@ %D {#2{##1}\doprocesscommaitem}% %D \doprocesscommaitem#1,]\relax %D \global\advance\commalevel -1 } -%D \stoptypen +%D \stoptyping %D %D However, this is not a the most straightforward solution! %D We can misuse one of \TEX's hidden features, and prepend @@ -1782,32 +1778,32 @@ %D The previous examples lead to: %D -%D \haalbuffer +%D \getbuffer %D When a list is saved in a macro, we can use a construction %D like: %D -%D \starttypen +%D \starttyping %D \expandafter\processcommalist\expandafter[\list]\command -%D \stoptypen +%D \stoptyping %D %D Such solutions suit most situations, but we wanted a bit %D more. %D -%D \starttypen +%D \starttyping %D \processcommacommand[string,\stringset,string]\commando -%D \stoptypen +%D \stoptyping %D %D where \type{\stringset} is a predefined set, like: %D -%D \starttypen +%D \starttyping %D \def\first{aap,noot,mies} %D \def\second{laatste} %D %D \processcommacommand[\first]\message %D \processcommacommand[\first,second,third]\message %D \processcommacommand[\first,between,\second]\message -%D \stoptypen +%D \stoptyping %D %D Commands that are part of the list are expanded, so the %D use of this macro has its limits. @@ -1818,15 +1814,15 @@ %D The argument to \type{\command} is not delimited. Because %D we often use \type{[]} as delimiters, we also have: %D -%D \starttypen +%D \starttyping %D \processcommalistwithparameters[string,string,...]\command -%D \stoptypen +%D \stoptyping %D %D where \type{\command} looks like: %D -%D \starttypen +%D \starttyping %D \def\command[#1]{... #1 ...} -%D \stoptypen +%D \stoptyping \def\processcommalistwithparameters[#1]#2% {\def\docommand##1{#2[##1]}% @@ -1842,16 +1838,16 @@ %D items, some actions is taken. These macros can be nested %D without problems. %D -%D \starttypen +%D \starttyping %D \processaction [x] [a=>\a,b=>\b,c=>\c] %D \processfirstactioninset [x,y,z] [a=>\a,b=>\b,c=>\c] %D \processallactionsinset [x,y,z] [a=>\a,b=>\b,c=>\c] -%D \stoptypen +%D \stoptyping %D %D We can supply both a \type{default} action and an action %D to be undertaken when an \type{unknown} value is met: %D -%D \starttypen +%D \starttyping %D \processallactionsinset %D [x,y,z] %D [ a=>\a, @@ -1859,7 +1855,7 @@ %D c=>\c, %D default=>\default, %D unknown=>\unknown{... \commalistelement ...}] -%D \stoptypen +%D \stoptyping %D %D When \type{#1} is empty, this macro scans list \type{#2} for %D the keyword \type{default} and executed the related action @@ -1880,7 +1876,7 @@ %D direct result of the support of nesting. Protection is only %D applied in \type{\processaction}. %D -%D \starttypen +%D \starttyping %D \newcount\processlevel %D %D \def\processaction[#1]#2[#3]% @@ -1950,7 +1946,7 @@ %D \processcommalist[#3]\p!dodoprocessaction}% %D \processcommalist[#1]{\getvalue{\s!do\the\processlevel}}% %D \advance\processlevel by -1 }} -%D \stoptypen +%D \stoptyping %D %D The gain of speed in the (again) next implementation is %D around 20\%, depending on the application. @@ -2245,9 +2241,9 @@ %D next character. This macro get this character and puts it in %D \type{\firstcharacter}. %D -%D \starttypen +%D \starttyping %D \getfirstcharacter {string} -%D \stoptypen +%D \stoptyping %D %D A two step expansion is used to prevent problems with %D complicated arguments, for instance arguments that @@ -2280,15 +2276,15 @@ %D We can check for the presence of a substring in a given %D sequence of characters. %D -%D \starttypen +%D \starttyping %D \doifinsetelse {substring} {string} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D An application of this command can be found further on. %D Like before, we first show some alternatives, like the one %D we started with: %D -%D \starttypen +%D \starttyping %D \long\def\p!doifinstringelse#1#2#3#4% %D {\def\pp!doifinstringelse##1#1##2##3\war% %D {\if##2@% @@ -2300,11 +2296,11 @@ %D %D \def\doifinstringelse% %D {\ExpandBothAfter\p!doifinstringelse} -%D \stoptypen +%D \stoptyping %D %D After this we came to: %D -%D \starttypen +%D \starttyping %D \def\p!doifinstringelse#1#2% %D {\def\pp!doifinstringelse##1#1##2##3\war% %D {\if##2@}% @@ -2316,7 +2312,7 @@ %D \else %D #3% %D \fi} -%D \stoptypen +%D \stoptyping %D %D Sometimes the second argument is passed as a macro. By %D postponing the expansion of this macro, we gain quite some @@ -2353,7 +2349,7 @@ \@EA\gobbleoneargument \fi} -%D \starttypen +%D \starttyping %D \beginTEX %D %D \long\def\p!doifinstringelse#1#2% @@ -2371,7 +2367,7 @@ %D \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} % expand #2 here %D %D \endETEX -%D \stoptypen +%D \stoptyping %D %D And then \unknown\ after a couple of years, we ran into a %D situation where \type {##2} was something \type {{bla}}. So @@ -2422,9 +2418,9 @@ %D typesetting! This is mainly due to the fact that passing %D (expanded) strings is much slower that passing a macro. %D -%D \starttypen +%D \starttyping %D \doifincsnameelse {substring} {\string} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D Where \type{\doifinstringelse} does as much expansion as %D possible, the latter alternative does minimal (one level) @@ -2464,24 +2460,24 @@ %D test possible, exept from a less robust 10||step %D \type{\if}||ladder or some tricky \type{\lcode} checking. %D -%D \starttypen +%D \starttyping %D \doifnumberelse {string} {then ...} {else ...} -%D \stoptypen +%D \stoptyping %D %D The macro accepts \type{123}, \type{abc}, \type{{}}, %D \type{\getal} and \type{\the\count...}. This macro is a %D rather dirty one. %D -%D \starttypen +%D \starttyping %D \long\def\doifnumberelse#1#2#3% %D {\begingroup\donefalse %D \ifcase1#1\or\or\or\or\or\or\or\or\or\else\donetrue\fi %D \ifdone\endgroup#2\else\endgroup#3\fi} -%D \stoptypen +%D \stoptyping %D %D Or better: %D -%D \starttypen +%D \starttyping %D \long\def\doifnumberelse#1% %D {\begingroup\donefalse %D \ifcase1#1\or\or\or\or\or\or\or\or\or\else\donetrue\fi @@ -2490,11 +2486,11 @@ %D \else %D \endgroup\expandafter\secondoftwoarguments %D \fi} -%D \stoptypen +%D \stoptyping %D %D A previous implementation was: %D -%D \starttypen +%D \starttyping %D \long\def\doifnumberelse#1#2#3% %D {\getfirstcharacter{#1}% %D \@EA\p!doifinstringelse\@EA{\firstcharacter}{1234567890}% @@ -2502,21 +2498,21 @@ %D \else %D #3% %D \fi} -%D \starttypen +%D \starttyping %D %D And before we had \type{\p!doifinstringelse} available, we %D used: %D -%D \starttypen +%D \starttyping %D \def\doifnumberelse#1% %D {\getfirstcharacter{#1}% %D \rawdoifinsetelse{\firstcharacter}{1,2,3,4,5,6,7,8,9,0}} -%D \stoptypen +%D \stoptyping %D %D The implementation using \type {\ifcase} is much faster, but %D the next one is not, not even when testing milion calls. %D -%D \starttypen +%D \starttyping %D \newif\ifitsanumber %D %D \long\def\isitanumber#1% @@ -2525,7 +2521,7 @@ %D %D \long\def\doifnumberelse#1#2#3% %D {\isitanumber{#1}\ifitsanumber#2\else#3\fi} -%D \stoptypen +%D \stoptyping %D %D After a while the next evolved and this one is the one we %D will use. This one is some 5\% faster than the group/done @@ -2556,12 +2552,12 @@ %D compare anything. Expandable macros are permitted as search %D string. %D -%D \starttypen +%D \starttyping %D \makerawcommalist[string,string,...]\stringlist %D \rawdoifinsetelse{string}{string,...}{...}{...} %D \rawprocesscommalist[string,string,...]\commando %D \rawprocessaction[x][a=>\a,b=>\b,c=>\c] -%D \stoptypen +%D \stoptyping %D %D Spaces embedded in the list, for instance after commas, %D spoil the search process. The gain in speed depends on the @@ -2570,7 +2566,7 @@ %D %D The slow alternative looks like: %D -%D \starttypen +%D \starttyping %D \def\makerawcommalist[#1]#2% %D {\def\appendtocommalist##1% %D {\doifelse{#2}{} @@ -2578,7 +2574,7 @@ %D {\edef#2{#2,##1}}}% %D \def#2{}% %D \processcommalist[#1]\appendtocommalist} -%D \stoptypen +%D \stoptyping %D %D But we prefer: @@ -2691,11 +2687,11 @@ % %D macros are used for interfacing. The next alternative can be used % %D for % %D -% %D \starttypen +% %D \starttyping % %D \processunexpandedcommalist % %D [\alfa\beta,\gamma,\delta\epsilon] % %D \handleitem -% %D \stoptypen +% %D \stoptyping % %D % %D This time nesting is not supported. % @@ -2736,13 +2732,13 @@ %D multi||linguality into account. For the moment we keep %D things simple and single||lingual. %D -%D \starttypen +%D \starttyping %D \dosetvalue {label} {variable} {value} %D \dosetevalue {label} {variable} {value} %D \dosetgvalue {label} {variable} {value} %D \docopyvalue {to label} {from label} {variable} %D \doresetvalue {label} {variable} -%D \stoptypen +%D \stoptyping %D %D These macros are in fact auxiliary ones and are not meant %D for use outside the assignment macros. @@ -2753,7 +2749,7 @@ \def\dosetevalue#1#2% #3 {\@EA\edef\csname#1#2\endcsname} % {#3}} -\def\dosetevalue#1#2% #3 +\def\dosetgvalue#1#2% #3 {\@EA\gdef\csname#1#2\endcsname} % {#3}} \def\doresetvalue#1#2% @@ -2778,22 +2774,22 @@ %D %D Assignments can be realized with: %D -%D \starttypen +%D \starttyping %D \doassign[label][variable=value] %D \undoassign[label][variable=value] -%D \stoptypen +%D \stoptyping %D %D and: %D -%D \starttypen +%D \starttyping %D \doassignempty[label][variable=value] -%D \stoptypen +%D \stoptyping %D %D Assignments like \type{\doassign} are compatible with: %D -%D \starttypen +%D \starttyping %D \def\labelvariable{value} -%D \stoptypen +%D \stoptyping %D %D We do check for the presence of an \type{=} and loudly %D complain of it's missed. We will redefine this macro later @@ -2843,54 +2839,54 @@ %D ideal of user friendly interfacing, so we take some further %D steps. %D -%D \starttypen +%D \starttyping %D \getparameters [label] [...=...,...=...] % %D \forgetparameters [label] [...=...,...=...] -%D \stoptypen +%D \stoptyping %D %D Again, the label identifies the category a variable %D belongs to. The second argument can be a comma separated %D list of assignments. %D -%D \starttypen +%D \starttyping %D \getparameters %D [demo] %D [alfa=1, %D beta=2] -%D \stoptypen +%D \stoptyping %D %D is equivalent to %D -%D \starttypen +%D \starttyping %D \def\demoalfa{1} %D \def\demobeta{2} -%D \stoptypen +%D \stoptyping %D %D %D In the pre||multi||lingual stadium \CONTEXT\ took the next %D approach. With %D -%D \starttypen +%D \starttyping %D \def\??demo {@@demo} %D \def\!!alfa {alfa} %D \def\!!beta {beta} -%D \stoptypen +%D \stoptyping %D %D calling %D -%D \starttypen +%D \starttyping %D \getparameters %D [\??demo] %D [\!!alfa=1, %D \!!beta=2] -%D \stoptypen +%D \stoptyping %D %D lead to: %D -%D \starttypen +%D \starttyping %D \def\@@demoalfa{1} %D \def\@@demobeta{2} -%D \stoptypen +%D \stoptyping %D %D Because we want to be able to distinguish the \type{!!} %D pre||tagged user supplied variables from internal @@ -3003,9 +2999,9 @@ %D Sometimes we explicitly want variables to default to an %D empty string, so we welcome: %D -%D \starttypen +%D \starttyping %D \getemptyparameters [label] [...=...,...=...] -%D \stoptypen +%D \stoptyping \def\getemptyparameters[#1]#2[#3]% {\def\p!dogetemptyparameter##1% @@ -3021,24 +3017,24 @@ %D standard command for ruled boxes. Is situations like this %D we can use: %D -%D \starttypen +%D \starttyping %D \copyparameters [to-label] [from-label] [name1,name2,...] -%D \stoptypen +%D \stoptyping %D %D For instance %D -%D \starttypen +%D \starttyping %D \copyparameters %D [internal][external] %D [alfa,beta] -%D \stoptypen +%D \stoptyping %D %D Leads to: %D -%D \starttypen +%D \starttyping %D \def\internalalfa {\externalalfa} %D \def\internalbeta {\externalbeta} -%D \stoptypen +%D \stoptyping %D %D By using \type{\docopyvalue} we've prepared this command %D for use in a multi||lingual environment. @@ -3055,19 +3051,19 @@ %D A lot of \CONTEXT\ commands take optional arguments, for %D instance: %D -%D \starttypen +%D \starttyping %D \dothisorthat[alfa,beta] %D \dothisorthat[first=foo,second=bar] %D \dothisorthat[alfa,beta][first=foo,second=bar] -%D \stoptypen +%D \stoptyping %D %D Although a combined solution is possible, we prefer a %D seperation. The next command takes care of propper %D handling of such multi||faced commands. %D -%D \starttypen +%D \starttyping %D \doifassignmentelse {...} {then ...} {else ...} -%D \stoptypen +%D \stoptyping % not robust % @@ -3094,9 +3090,9 @@ %D Combining both in one \type{\if}||macro would lead to %D problems with nested \type{\if}'s. %D -%D \starttypen +%D \starttyping %D \checkparameters[argument] -%D \stoptypen +%D \stoptyping \newif\ifparameters @@ -3114,10 +3110,10 @@ %D It's possible to get an element from a commalist or a %D command representing a commalist. %D -%D \starttypen +%D \starttyping %D \getfromcommalist [string] [n] %D \getfromcommacommand [string,\strings,string,...] [n] -%D \stoptypen +%D \stoptyping %D %D The difference betwee the two of them is the same as the %D difference between \type{\processcomma...}. The found string @@ -3126,10 +3122,10 @@ %D We can calculate the size of a comma separated list by %D using: %D -%D \starttypen +%D \starttyping %D \getcommalistsize [string,string,...] %D \getcommacommandsize [string,\strings,string,...] -%D \stoptypen +%D \stoptyping %D %D Afterwards, the length is available in the macro %D \type{\commalistsize} (not a \COUNTER). @@ -3187,7 +3183,7 @@ %D macro for those cases. The indirect call however slows %D down the other cases. %D -%D \starttypen +%D \starttyping %D \def\p!dogetfirstfromcommalist [#1,#2]{\def\commalistelement{#1}} %D \def\p!dogetsecondfromcommalist[#1,#2,#3]{\def\commalistelement{#2}} %D \let\p!dogetotherfromcommalist=\getfromcommalist @@ -3202,7 +3198,7 @@ %D \else %D \p!dogetotherfromcommalist[#1][#3]% %D \fi} -%D \stoptypen +%D \stoptyping %D %D Even worse, this alternative does not strip preceding %D spaces, which is what we want. So, we stick to the slow @@ -3229,7 +3225,7 @@ %D %D reports: %D -%D \haalbuffer +%D \getbuffer %D \macros %D {dogetcommalistelement,dogetcommacommandelement} @@ -3237,9 +3233,9 @@ %D For low level (fast) purposes, we can also use the next %D alternative, which can handle 8~elements at most. %D -%D \starttypen +%D \starttyping %D \dogetcommalistelement1\from a,b,c\to\commalistelement -%D \stoptypen +%D \stoptyping \def\dodogetcommalistelement#1\from#2,#3,#4,#5,#6,#7,#8\to#9% {\edef#9{\ifcase#1\relax\or#2\or#3\or#4\or#5\or#6\or#7\or#8\fi}} @@ -3266,30 +3262,30 @@ %D \TEX' internal scanner for grabbing everything between %D arguments. Forgive me the funny names. %D -%D \starttypen +%D \starttyping %D \dosingleargument\commando = \commando[#1] %D \dodoubleargument\commando = \commando[#1][#2] %D \dotripleargument\commando = \commando[#1][#2][#3] %D \doquadrupleargument\commando = \commando[#1][#2][#3][#4] %D \doquintupleargument\commando = \commando[#1][#2][#3][#4][#5] %D \dosixtupleargument\commando = \commando[#1][#2][#3][#4][#5][#6] -%D \doseventupleargument\commando= \commando[#1][#2][#3][#4][#5][#6][#7] -%D \stoptypen +%D \doseventupleargument\command= \commando[#1][#2][#3][#4][#5][#6][#7] +%D \stoptyping %D %D These macros are used in the following way: %D -%D \starttypen +%D \starttyping %D \def\dosetupsomething[#1][#2]% %D {... #1 ... #2 ...} %D %D \def\setupsomething% %D {\dodoubleargument\dosetupsomething} -%D \stoptypen +%D \stoptyping %D %D The implementation can be surprisingly simple and needs no %D further explanation, like: %D -%D \starttypen +%D \starttyping %D \def\dosingleargument#1[#2]% %D {#1[#2]} %D \def\dotripleargument#1[#2]#3[#4]#5[#6]% @@ -3298,7 +3294,7 @@ %D {\def\dodoquintupleargument[##1]##2[##3]##4[##5]##6[##7]##8[##9]% %D {#1[##1][##3][##5][##7][##9]}% %D \dodoquintupleargument} -%D \stoptypen +%D \stoptyping %D %D Because \TEX\ accepts 9~arguments at most, we have to use %D two||step solution when getting five or more arguments. @@ -3342,7 +3338,7 @@ %D The empty argument supplying macros mentioned before, look %D like: %D -%D \starttypen +%D \starttyping %D \dosingleempty \command %D \dodoubleempty \command %D \dotripleempty \command @@ -3350,15 +3346,15 @@ %D \doquintupleempty \command %D \dosixtupleempty \command %D \doseventupleempty\command -%D \stoptypen +%D \stoptyping %D %D So \type{\dodoubleempty} leades to: %D -%D \starttypen +%D \starttyping %D \command[#1][#2] %D \command[#1][] %D \command[][] -%D \stoptypen +%D \stoptyping %D %D Depending of the generousity of the user. Afterwards one can %D use the \type{\if...argument} boolean. For novice: watch @@ -3660,32 +3656,32 @@ %D These maybe too mysterious macros enable us to handle more %D than one setup at once. %D -%D \starttypen +%D \starttyping %D \dosingleargumentwithset \command[#1] %D \dodoubleargumentwithset \command[#1][#2] %D \dotripleargumentwithset \command[#1][#2][#3] %D \dodoubleemptywithset \command[#1][#2] %D \dotripleemptywithset \command[#1][#2][#3] -%D \stoptypen +%D \stoptyping %D %D The first macro calls \type{\command[##1]} for each string %D in the set~\type{#1}. The second one calls for %D \type{\commando[##1][#2]} and the third, well one may guess. %D These commands support constructions like: %D -%D \starttypen +%D \starttyping %D \def\dodefinesomething[#1][#2]% %D {\getparameters[\??xx#1][#2]} %D %D \def\definesomething% %D {\dodoubleargumentwithset\dodefinesomething} -%D \stoptypen +%D \stoptyping %D %D Which accepts calls like: %D -%D \starttypen +%D \starttyping %D \definesomething[alfa,beta,...][variable=...,...] -%D \stoptypen +%D \stoptyping %D %D Now a whole bunch of variables like \type{\@@xxalfavariable} %D and \type{\@@xxbetavariable} is defined. @@ -3731,9 +3727,9 @@ %D The next macro can be very useful when using \type{\csname} %D like in: %D -%D \starttypen +%D \starttyping %D \csname if\strippedcsname\something\endcsname -%D \stoptypen +%D \stoptyping %D %D This expands to \type{\ifsomething}. @@ -3747,35 +3743,35 @@ %D prefixed by \type{\complex}, a command without one gets the %D prefix \type{\simple}. Commands like this can be defined by: %D -%D \starttypen +%D \starttyping %D \complexorsimple\command -%D \stoptypen +%D \stoptyping %D %D When \type{\command} is followed by a \type{[setup]}, then %D -%D \starttypen +%D \starttyping %D \complexcommand [setup] -%D \stoptypen +%D \stoptyping %D %D executes, else we get %D -%D \starttypen +%D \starttyping %D \simplecommand -%D \stoptypen +%D \stoptyping %D %D An alternative for \type{\complexorsimple} is: %D -%D \starttypen +%D \starttyping %D \complexorsimpleempty {command} -%D \stoptypen +%D \stoptyping %D %D Depending on the presence of \type{[setup]}, this one %D leads to one of: %D -%D \starttypen +%D \starttyping %D \complexcommando [setup] %D \complexcommando [] -%D \stoptypen +%D \stoptyping %D %D Many \CONTEXT\ commands started as complex or simple ones, %D but changed into more versatile (more object oriented) ones @@ -3884,16 +3880,16 @@ %D These commands are called as: %D -%D \starttypen +%D \starttyping %D \definecomplexorsimple\command -%D \stoptypen +%D \stoptyping %D %D Of course, we must have available %D -%D \starttypen +%D \starttyping %D \def\complexcommand[#1]{...} %D \def\simplecommand {...} -%D \stoptypen +%D \stoptyping %D %D Using this construction saves a few string now and then. @@ -3908,38 +3904,38 @@ %D We won't go into details here, but the general form of %D this using this command is: %D -%D \starttypen +%D \starttyping %D \definestartstopcommand\somecommand\e!specifier{arg}{arg}% %D {do something with arg} -%D \stoptypen +%D \stoptyping %D %D This expands to something like: %D -%D \starttypen +%D \starttyping %D \def\somecommand arg \startspecifier arg \stopspecifier% %D {do something with arg} -%D \stoptypen +%D \stoptyping %D %D The arguments can be anything reasonable, but double %D \type{#}'s are needed in the specification part, like: %D -%D \starttypen +%D \starttyping %D \definestartstopcommand\somecommand\e!specifier{[##1][##2]}{##3}% %D {do #1 something #2 with #3 arg} -%D \stoptypen +%D \stoptyping %D %D which becomes: %D -%D \starttypen +%D \starttyping %D \def\somecommand[#1][#2]\startspecifier#3\stopspecifier% %D {do #1 something #2 with #3 arg} -%D \stoptypen +%D \stoptyping %D %D We will see some real applications of this command in the %D core modules. \def\definestartstopcommand#1#2#3#4% can be done with \expanded ot better, toks - {\def\!stringa{#3}% % but let's keep this unuded one crappy + {\def\!stringa{#3}% % but let's keep this unused one crappy \def\!stringb{\e!start#2}% \def\!stringc{#4}% \def\!stringd{\e!stop#2}% @@ -3959,19 +3955,19 @@ %D optional arguments between \type{[]}. The next two commands %D handle the ones with \type{{}}. They are called as: %D -%D \starttypen +%D \starttyping %D \dosinglegroupempty \ineedONEargument %D \dodoublegroupempty \ineedTWOarguments %D \dotriplegroupempty \ineedTHREEarguments %D \doquadruplegroupempty \ineedFOURarguments %D \doquintuplegroupempty \ineedFIVEarguments -%D \stoptypen +%D \stoptyping %D %D where \type{\ineedONEargument} takes one and the others %D two and three arguments. These macro's were first needed in %D \PPCHTEX. %D -%D \starttypen +%D \starttyping %D \def\dogetgroupargument#1#2% redefined in mult-ini %D {\def\nextnextargument% %D {\ifx\nextargument\bgroup @@ -3993,7 +3989,7 @@ %D \fi%\fi\fi % so let's get rid of it %D \nextargument}% %D \futurelet\nextargument\nextnextargument} -%D \stoptypen +%D \stoptyping %D %D In order to catch \type {\nextargument}'s that expand to %D \type {\if} and friends, in practice we will use a @@ -4157,7 +4153,7 @@ %D These macros can explictly take care of spaces, which means %D that the next definition and calls are valid: %D -%D \starttypen +%D \starttyping %D \def\test#1#2#3{[#1#2#3]} %D %D \dotriplegroupempty\test {a}{b}{c} @@ -4169,7 +4165,7 @@ %D \dotriplegroupempty\test %D {a} %D {b} -%D \stoptypen +%D \stoptyping %D %D And alike. @@ -4230,11 +4226,11 @@ %D we will also introduce a mechanism for message passing. For %D the moment we stick to the core macros: %D -%D \starttypen +%D \starttyping %D \writestring {string} %D \writeline %D \writestatus {category} {message} -%D \stoptypen +%D \stoptyping %D %D Messages are formatted. One can provide the maximum with %D of the identification string with the macro @@ -4309,14 +4305,14 @@ %D Because we're grouped, we could have initialized at forehand: %D -%D \starttypen +%D \starttyping %D \statuscounter\statuswidth -%D \stoptypen +%D \stoptyping %D The next implementation saves only some 10 words of format %D memory, but we hardly gain any speed. %D -%D \starttypen +%D \starttyping %D \def\dosplitstatus#1#2#3#4#5#6#7#8#9% %D {#1#2#3#4#5#6#7#8#9\dodosplitstatus} %D @@ -4330,7 +4326,7 @@ %D \space\space\space\space\space %D \space\space\space\space\space\end %D \space:\space#2}} -%D \stoptypen +%D \stoptyping %D Okay then. More obscure but slightly faster: no split grabs %D the do split part and skipping the else branch has to happen @@ -4375,4 +4371,4 @@ %D Well, the real final command is the one that resets the %D unprotected characters \type{@}, \type{?} and \type{!}. -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/syst-new.tex b/tex/context/base/syst-new.tex index 84733098c..3027ac4af 100644 --- a/tex/context/base/syst-new.tex +++ b/tex/context/base/syst-new.tex @@ -18,7 +18,7 @@ % moved from core-ntb -\def\v!oddeven#1{\ifodd#1\v!oneven\else\v!even\fi} +\def\v!oddeven#1{\ifodd#1\v!odd\else\v!even\fi} % For myself @@ -28,7 +28,7 @@ {\nofprofiled\zerocount \letvalue{\string#1\string#1}#1% \appendtoks - \writestatus\m!systems{profile \string#1: \number\nofprofiled}% + \normalwritestatus\m!systems{profile \string#1: \number\nofprofiled}% \to \everystoptext \unexpanded\def#1% {\global\advance\nofprofiled\plusone @@ -274,7 +274,7 @@ % \def\maximizespacing% % {\maximizeskip\blankoskipamount % \maximizeskip\parskip -% \maximizeskip\tussenwit +% \maximizeskip\ctxparskip % \maximizeskip\baselineskip % \maximizeskip\bigskipamount % \maximizeskip\medskipamount @@ -366,9 +366,9 @@ \def\retestfeature {\bgroup \ifcase\interactionmode\let\wait\relax\fi - \message{starting feature test}\wait + \writestatus\m!systems{starting feature test}\wait \featuretest\zerocount \dotestfeature - \message{feature test done}\wait + \writestatus\m!systems{feature test done}\wait \egroup} \def\testfeatureonce#1#2% @@ -381,10 +381,10 @@ %D the next macros to add|/|subtract a series of dimensions %D to a register or macro. %D -%D \starttypen -%D \adddimenregister 10pt 5pt \papierbreedte \to \somedimen -%D \adddimenmacro 10pt 5pt \papierbreedte \to \bagger -%D \stoptypen +%D \starttyping +%D \adddimenregister 10pt 5pt \paperwidth \to \somedimen +%D \adddimenmacro 10pt 5pt \paperwidth \to \bagger +%D \stoptyping \newdimen\dimentoaddto @@ -412,18 +412,18 @@ %D %D This macro is use as: %D -%D \starttypen -%D \freezedimenmacro\linkermargeafstand -%D \stoptypen +%D \starttyping +%D \freezedimenmacro\leftmargindistance +%D \stoptyping \def\freezedimenmacro#1% {\scratchdimen#1\edef#1{\the\scratchdimen}} %D The next one is slower: %D -%D \starttypen +%D \starttyping %D \def\freezedimenmacro#1{\edef#1{\the\dimexpr(#1)}} -%D \stoptypen +%D \stoptyping % \newcount\rawrecursecounter % @@ -443,12 +443,12 @@ % \dodorawrecurse} %D The next macro negates a macro (dimension or number, or actually, whatever. -%D It's a typical example of \if usage: +%D It's a typical example of \type {\if} usage: %D -%D \starttypen +%D \starttyping %D \if-\whatever \else-\whatever\fi => else => -whatever %D \if--\whatever\else-\whatever\fi => then => whatever -%D \stoptypen +%D \stoptyping \def\negated#1{\if-#1\else-#1\fi} % does only work in macros or text @@ -520,7 +520,7 @@ {\if#4"\@EA#1\else\if#4'\@EAEAEA#2\else\@EAEAEA#3\fi\fi#4} \def\unstringed - {\dowithstringed\unstringdouble\unstringsingle\unstringnothing} + {\dowithstringed\unstringdouble\unstringsingle\unstringspaced} \long\def\unstringdouble"#1"{#1} \long\def\unstringsingle'#1'{#1} @@ -606,4 +606,4 @@ \def\appendvalue #1{\@EA\appended\@EA \def\csname#1\endcsname} \def\appendgvalue#1{\@EA\appended\@EA\gdef\csname#1\endcsname} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/syst-omg.tex b/tex/context/base/syst-omg.tex index e01bdf371..da620fa7e 100644 --- a/tex/context/base/syst-omg.tex +++ b/tex/context/base/syst-omg.tex @@ -74,7 +74,7 @@ \mathchardef\@@medallocation = 256 \mathchardef\@@maxallocation = 32767 -\chardef\@@insallocation=8 +\chardef\@@insallocation=24 \def\myalloc@#1#2#3#4#5% {\global\advance\count1#1by\@ne @@ -110,4 +110,4 @@ \fi -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/syst-pln.tex b/tex/context/base/syst-pln.tex index bf2cc1e60..becf67f83 100644 --- a/tex/context/base/syst-pln.tex +++ b/tex/context/base/syst-pln.tex @@ -8,24 +8,24 @@ %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 We used to load plain \TEX\ in a special way, but redefining %D a couple of primitives so that for instance font loading was -%D ignored. For those interested, this loader is found in -%D \type {syst-tex.tex}. +%D ignored. For those interested, this loader is found in +%D \type {syst-tex.tex}. %D This is a stripped down version of plain \TEX. We need this %D module to get started. Whole sections are missing here, %D like font loading and math. Thise are taken care of in -%D dedicated modules. A few definitions are added (and -%D marked as such). +%D dedicated modules. A few definitions are added (and +%D marked as such). %D Characters can have special states, that can be triggered %D by setting their category coded. Some are preset, others %D are to be set as soon as possible, otherwise we cannot -%D define any useful macros. +%D define any useful macros. %catcode`\^^@ = 9 % ascii null is ignored %catcode`\\ = 0 % backslash is TeX escape character @@ -45,44 +45,44 @@ %catcode`\^^? = 15 % ascii delete is invalid \catcode`\~ = 13 % tilde is active -\catcode`\^^L = 13 % ascii form-feed +\catcode`\^^L = 13 % ascii form-feed -%catcode`\A = 11 +%catcode`\A = 11 %....... %catcode`\Z = 11 -%catcode`\a = 11 +%catcode`\a = 11 %....... -%catcode`\z = 11 +%catcode`\z = 11 -\chardef\active = 13 +\chardef\active = 13 -\def ^^L{\par} +\def ^^L{\par} \def\^^M{\ } % control = control \def\^^I{\ } % same for %D In \CONTEXT, we simply ignore end||of||file tokens: - + \catcode`\^^Z=9 -%D First we define a simplified version of the \CONTEXT\ +%D First we define a simplified version of the \CONTEXT\ %D protection mechanism. \def\unprotect{\catcode`@=11} \def\protect {\catcode`@=12} -\unprotect +\unprotect -%D We do not set up mathcodes here, but postpone that to the -%D math modules. +%D We do not set up mathcodes here, but postpone that to the +%D math modules. \mathcode`\ = "8000 % \space \mathcode`\' = "8000 % ^\prime \mathcode`\_ = "8000 % \_ \mathcode`\^^? = "1273 % \smallint -\sfcode`\)=0 -\sfcode`\'=0 +\sfcode`\)=0 +\sfcode`\'=0 \sfcode`\]=0 \chardef\@ne = 1 @@ -96,33 +96,33 @@ \mathchardef\@M = 10000 \mathchardef\@MM = 20000 -%D Pretty important definitions: +%D Pretty important definitions: -\let\bgroup={ +\let\bgroup={ \let\egroup=} %D In plain \TEX\ the following explanation about the register -%D allocation mechanism is given: +%D allocation mechanism is given: %D -%D \startsmaller +%D \startnarrower %D The following counters are reserved: %D -%D \starttabulatie -%D \NC 0--9 \NC page numbering \NC \NR -%D \NC 10 \NC count allocation \NC \NR -%D \NC 11 \NC dimen allocation \NC \NR -%D \NC 12 \NC skip allocation \NC \NR -%D \NC 13 \NC muskip allocation \NC \NR -%D \NC 14 \NC box allocation \NC \NR -%D \NC 15 \NC toks allocation \NC \NR -%D \NC 16 \NC read file allocation \NC \NR -%D \NC 17 \NC write file allocation \NC \NR -%D \NC 18 \NC math family allocation \NC \NR -%D \NC 19 \NC language allocation \NC \NR -%D \NC 20 \NC insert allocation \NC \NR -%D \NC 21 \NC the most recently allocated number \NC \NR -%D \NC 22 \NC constant $-1$ \NC \NR -%D \stoptabulatie +%D \starttabulate +%D \NC 0--9 \NC page numbering \NC \NR +%D \NC 10 \NC count allocation \NC \NR +%D \NC 11 \NC dimen allocation \NC \NR +%D \NC 12 \NC skip allocation \NC \NR +%D \NC 13 \NC muskip allocation \NC \NR +%D \NC 14 \NC box allocation \NC \NR +%D \NC 15 \NC toks allocation \NC \NR +%D \NC 16 \NC read file allocation \NC \NR +%D \NC 17 \NC write file allocation \NC \NR +%D \NC 18 \NC math family allocation \NC \NR +%D \NC 19 \NC language allocation \NC \NR +%D \NC 20 \NC insert allocation \NC \NR +%D \NC 21 \NC the most recently allocated number \NC \NR +%D \NC 22 \NC constant $-1$ \NC \NR +%D \stoptabulate %D %D New counters are allocated starting with 23, 24, etc. Other %D registers are allocated starting with 10. This leaves 0 @@ -138,17 +138,17 @@ %D lowest-numbered insert that has been allocated. Of course, %D \type {\box255} is reserved for \type {\output}; \type %D {\count255}, \type {\dimen255}, and \type {\skip255} can be -%D used freely. -%D +%D used freely. +%D %D It is recommended that macro designers always use \type %D {\globa}l assignments with respect to registers numbered 1, %D 3, 5, 7, 9, and always non||\type {\global} assignments %D with respect to registers 0, 2, 4, 6, 8, 255. This will %D prevent \quote {save stack buildup} that might otherwise -%D occur. -%D \stopsmaller +%D occur. +%D \stopnarrower %D -%D We well overload some macros in \ETEX\ mode. +%D We well overload some macros in \ETEX\ mode. \count10 = 22 % allocates \count registers 23, 24, ... \count11 = 9 % allocates \dimen registers 10, 11, ... @@ -165,14 +165,14 @@ \countdef\insc@unt = 20 % the insertion counter \countdef\allocationnumber= 21 % the most recent allocation \countdef\m@ne = 22 % a handy constant - \m@ne = -1 + \m@ne = -1 \def\wlog{\immediate\write\m@ne} % write on log file (only) -%D \startsmaller +%D \startnarrower %D Here are abbreviations for the names of scratch registers %D that don't need to be allocated. -%D \stopsmaller +%D \stopnarrower \countdef \count@ = 255 \dimendef \dimen@ = 0 @@ -181,15 +181,15 @@ \skipdef \skip@ = 0 \toksdef \toks@ = 0 -%D \startsmaller +%D \startnarrower %D Now, we define \type {\newcount}, \type {\newbox}, etc. so %D that you can say \newcount\foo and \type {\foo} will be %D defined (with \type {\countdef}) to be the next counter. To %D find out which counter \type {\foo} is, you can look at %D \type {\allocationnumber}. Since there's no \type {\boxdef} %D command, \type {\chardef} is used to define a \type -%D {\newbox}, \type {\newinsert}, \type {\newfam}, and so on. -%D \stopsmaller +%D {\newbox}, \type {\newinsert}, \type {\newfam}, and so on. +%D \stopnarrower \def\newcount {\alloc@0\count \countdef \insc@unt} \def\newdimen {\alloc@1\dimen \dimendef \insc@unt} @@ -226,35 +226,35 @@ \errmessage{No room for a new #3} \fi} -\newdimen\maxdimen \maxdimen = 16383.99999pt -\newskip \hideskip \hideskip = -1000pt plus 1fill +\newdimen\maxdimen \maxdimen = 16383.99999pt +\newskip \hideskip \hideskip = -1000pt plus 1fill \newskip \centering \centering = 0pt plus 1000pt minus 1000pt -\newdimen\p@ \p@ = 1pt -\newdimen\z@ \z@ = 0pt +\newdimen\p@ \p@ = 1pt +\newdimen\z@ \z@ = 0pt \newskip \z@skip \z@skip = 0pt plus 0pt minus 0pt \newbox \voidb@x % permanently void box register -%D We define \type {\newif} a la plain \TEX, but will -%D redefine it later. As Knuth says: +%D We define \type {\newif} a la plain \TEX, but will +%D redefine it later. As Knuth says: +%D +%D \startnarrower +%D And here's a different sort of allocation: for example, %D -%D \startsmaller -%D And here's a different sort of allocation: for example, +%D \starttyping +%D \newif\iffoo +%D \stoptyping %D -%D \starttypen -%D \newif\iffoo -%D \stoptypen -%D -%D creates \type {\footrue}, \type {\foofalse} to go +%D creates \type {\footrue}, \type {\foofalse} to go %D with \type {\iffoo}. -%D \stopsmaller +%D \stopnarrower \def\newif#1% - {\count@\escapechar + {\count@\escapechar \escapechar\m@ne \expandafter\expandafter\expandafter\def\@if #1{true}{\let#1\iftrue }% \expandafter\expandafter\expandafter\def\@if#1{false}{\let#1\iffalse}% \@if#1{false}% the condition starts out false - \escapechar\count@} + \escapechar\count@} \def\@if#1#2% {\csname\expandafter\if@\string#1#2\endcsname} @@ -265,7 +265,7 @@ \egroup -%D Build||in numeric variables. +%D Build||in numeric variables. \adjdemerits = 10000 \binoppenalty = 700 @@ -277,21 +277,21 @@ \delimiterfactor = 901 \displaywidowpenalty = 50 \doublehyphendemerits = 10000 -%endlinechar = `\^^M -\errorcontextlines = 5 -%escapechar = `\\ +%endlinechar = `\^^M +\errorcontextlines = 5 +%escapechar = `\\ \exhyphenpenalty = 50 %fam = 0 \finalhyphendemerits = 5000 %floatingpenalty = 0 %globaldefs = 0 -%hangafter = 1 +%hangafter = 1 \hbadness = 1000 %holdinginserts = 0 \hyphenpenalty = 50 %interlinepenalty = 0 %language = 0 -\lefthyphenmin = 2 +\lefthyphenmin = 2 \linepenalty = 10 %looseness = 0 %mag = 1000 @@ -308,7 +308,7 @@ \showboxbreadth = 5 \showboxdepth = 3 %time = 0 -\tolerance = 200 +\tolerance = 200 %tracingcommands = 0 \tracinglostchars = 1 %tracingmacros = 0 @@ -323,15 +323,15 @@ \widowpenalty = 150 %year = 0 -%D Extra numeric variables. +%D Extra numeric variables. -\newcount \interdisplaylinepenalty -\newcount \interfootnotelinepenalty +\newcount \interdisplaylinepenalty +\newcount \interfootnotelinepenalty \interdisplaylinepenalty = 100 \interfootnotelinepenalty = 100 -%D Build in dimension variables. +%D Build in dimension variables. \abovedisplayshortskip = 0pt plus 3pt \abovedisplayskip = 12pt plus 3pt minus 9pt @@ -372,15 +372,15 @@ \vsize = 8.9in %xspaceskip = 0pt -%D Extra dimension parameters. +%D Extra dimension parameters. -\newskip \bigskipamount -\newdimen \jot -\newskip \medskipamount -\newskip \normalbaselineskip -\newskip \normallineskip -\newdimen \normallineskiplimit -\newskip \smallskipamount +\newskip \bigskipamount +\newdimen \jot +\newskip \medskipamount +\newskip \normalbaselineskip +\newskip \normallineskip +\newdimen \normallineskiplimit +\newskip \smallskipamount \bigskipamount = 12pt plus 4pt minus 4pt \jot = 3pt @@ -390,15 +390,15 @@ \normallineskiplimit = 0pt \smallskipamount = 3pt plus 1pt minus 1pt -%D The following shortcuts are rather standard: +%D The following shortcuts are rather standard: -\def\lq{`} +\def\lq{`} \def\rq{'} -\def\lbrack{[} +\def\lbrack{[} \def\rbrack{]} -\let\endgraf=\par +\let\endgraf=\par \let\endline=\cr \def\space{ } @@ -406,46 +406,47 @@ \def\null {\hbox{}} %D The next loop construct is about the fastest you can get. -%D Beware: this macro does not support nested loops. +%D Beware: this macro does not support nested loops. We use +%D a namespace prefix \type {@@pln}. -\long\def\loop#1\repeat{\long\def\body{#1}\iterate} +\long\def\loop#1\repeat{\long\def\@@plnbody{#1}\@@plniterate} -%D The following makes \type {\loop} \unknown\ \type {\if} -%D \unknown\ \type {\repeat} skippable: +%D The following makes \type {\loop} \unknown\ \type {\if} +%D \unknown\ \type {\repeat} skippable (clever trick): -\let\repeat=\fi +\let\repeat=\fi -%D The original: +%D The original (no \type {@@pln} there): -\def\iterate{\body\let\next\iterate\else\let\next\relax\fi\next} +\def\@@plniterate{\@@plnbody\let\next\@@plniterate\else\let\next\relax\fi\next} -%D A more efficient alternative: +%D A more efficient alternative: -\def\iterate{\body\expandafter\iterate\else\expandafter\relax\fi} +\def\@@plniterate{\@@plnbody\expandafter\@@plniterate\else\expandafter\relax\fi} -%D An even more efficient one: +%D An even more efficient one: -\def\iterate{\body\expandafter\iterate\else\fi} +\def\@@plniterate{\@@plnbody\expandafter\@@plniterate\else\fi} %D Counter 0 is normally used as page counter: \countdef\pageno=0 \pageno=1 % first page is number 1 %D Beside the raw counter \type {\pageno} the \type {\folio} -%D macro provides the value. +%D macro provides the value. \def\folio{\the\pageno} -%D Indeed, we don't define a real output routine yet: +%D Indeed, we don't define a real output routine yet: \output{\box255} -%D We don't support \type {\magnification} and just consume -%D the value. +%D We don't support \type {\magnification} and just consume +%D the value. \let\magnification\count@ -%D The following macro will be overloaded in \ETEX. +%D The following macro will be overloaded in \ETEX. \def\tracingall {\tracingonline \@ne @@ -461,8 +462,8 @@ \showboxdepth \maxdimen \errorstopmode} -%D Some users expect this macro to be present. This one -%D sends the hyphenated word to the terminal. +%D Some users expect this macro to be present. This one +%D sends the hyphenated word to the terminal. \def\showhyphens#1% {\setbox0\vbox @@ -471,31 +472,31 @@ \pretolerance\m@ne \tolerance\m@ne \hbadness0 - \showboxdepth0 + \showboxdepth0 \ #1}} %D The following bunch of macros deals with basic alignment. -%D We just include them here so that they can be used if -%D needed. Normally, \CONTEXT\ users will fall back on one of -%D the three table environments. +%D We just include them here so that they can be used if +%D needed. Normally, \CONTEXT\ users will fall back on one of +%D the three table environments. \newcount \mscount -\newif \ifus@ +\newif \ifus@ \newif \if@cr -\newbox \tabs -\newbox \tabsyet +\newbox \tabs +\newbox \tabsyet \newbox \tabsdone \def\hidewidth % for alignment entries that can stick out - {\hskip\hideskip} + {\hskip\hideskip} \def\ialign % initialized \halign {\everycr{} \tabskip\z@skip - \halign} + \halign} \def\multispan#1% - {\omit + {\omit \mscount#1\relax \loop \ifnum\mscount>\@ne \sp@n @@ -507,43 +508,43 @@ \advance\mscount\m@ne} \def\cleartabs - {\global\setbox\tabsyet\null + {\global\setbox\tabsyet\null \setbox\tabs\null} \def\settabs - {\setbox\tabs\null + {\setbox\tabs\null \futurelet\next\sett@b} \def\sett@b - {\ifx\next\+% + {\ifx\next\+% \def\nxt{\afterassignment\s@tt@b\let\nxt}% \else \let\nxt\s@tcols - \fi - \let\next\relax + \fi + \let\next\relax \nxt} -\def\s@tt@b% - {\let\nxt\relax +\def\s@tt@b% + {\let\nxt\relax \us@false\m@ketabbox} -\def\tabalign% - {\us@true\m@ketabbox} +\def\tabalign% + {\us@true\m@ketabbox} -\let\+\tabalign % no outer here +\let\+\tabalign % no outer here \def\s@tcols#1\columns% {\count@#1% \dimen@\hsize \loop - \ifnum\count@>\z@ \@nother + \ifnum\count@>\z@ \@nother \repeat} \def\@nother% - {\dimen@ii\dimen@ + {\dimen@ii\dimen@ \divide\dimen@ii\count@ \setbox\tabs\hbox{\hbox to\dimen@ii{}\unhbox\tabs}% - \advance\dimen@-\dimen@ii + \advance\dimen@-\dimen@ii \advance\count@\m@ne} \def\m@ketabbox% @@ -564,8 +565,8 @@ {\if@cr \egroup % now \box\z@ holds the column \else - \hss\egroup - \global\setbox\tabsyet\hbox + \hss\egroup + \global\setbox\tabsyet\hbox {\unhbox\tabsyet\global\setbox\@ne\lastbox}% now \box\@ne holds its size \ifvoid\@ne \global\setbox\@ne\hbox to\wd\z@{}% @@ -576,7 +577,7 @@ \fi \box\z@} -%D Users are advised not to use the following macros: +%D Users are advised not to use the following macros: \def\hang {\hangindent\parindent} @@ -590,11 +591,11 @@ {\advance\leftskip \parindent \advance\rightskip\parindent} -%D Useful, used too, but sometimes dangerous: +%D Useful, used too, but sometimes dangerous: -\def\leavevmode{\unhbox\voidb@x} +\def\leavevmode{\unhbox\voidb@x} -%D We will overload these, but may need them beforehand: +%D We will overload these, but may need them beforehand: \bgroup \catcode`\^^M=\active% @@ -615,27 +616,27 @@ \chardef\#=`\# \chardef\$=`\$ -\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em}} +\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em}} -%D Used at all? +%D Used at all? \def\slash{/\penalty\exhyphenpenalty} % a `/' that acts like a `-' -%D Replaced later on: +%D Replaced later on: \def\line {\hbox to\hsize} \def\leftline #1{\line{#1\hss}} \def\rightline #1{\line{\hss#1}} \def\centerline#1{\line{\hss#1\hss}} -%D These are used by TaBlE: +%D These are used by TaBlE: \newif\ifh@ \newif\ifv@ -%D Let's end in the plain way: +%D Let's end in the plain way: \def\fmtname {ConTeXt Minimized Plain TeX} -\def\fmtversion{3.1415926} +\def\fmtversion{3.1415926} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/syst-tex.tex b/tex/context/base/syst-tex.tex index 2ad5b77a0..55a160237 100644 --- a/tex/context/base/syst-tex.tex +++ b/tex/context/base/syst-tex.tex @@ -8,48 +8,48 @@ %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 We've build \CONTEXT\ on top of \PLAIN\ \TEX. Because we -%D want to make the format file as independant as possible of -%D machine dependant font encodings, we have to bypass the -%D loading of fonts. -%D +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D We've build \CONTEXT\ on top of \PLAIN\ \TEX. Because we +%D want to make the format file as independant as possible of +%D machine dependant font encodings, we have to bypass the +%D loading of fonts. +%D %D Let's start at the beginning. Because \PLAIN\ is not yet -%D loaded we have to define some \CATCODES\ ourselves. +%D loaded we have to define some \CATCODES\ ourselves. \catcode`\{=1 % left brace is begin-group character \catcode`\}=2 % right brace is end-group character \catcode`\#=6 % hash mark is macro parameter character \catcode`\^=7 % circumflex is for superscripts -%D To prevent all kind of end||of||file problems, for the -%D moment we simply ignore the Control~Z token. +%D To prevent all kind of end||of||file problems, for the +%D moment we simply ignore the Control~Z token. \catcode`\^^Z=9 %D We are going to report to the user what we are skipping. -\def\skipmessage#1{\immediate\write16{skipping #1 in plain}} +\def\skipmessage#1{\immediate\write16{skipping #1 in plain}} %D We want to be able to use the \type{\newsomething} %D declarations not only on the \type{\outer} level. This can %D be done by redefining \type{\outer} so we have to save its -%D original meaning. +%D original meaning. -\let\normalouter = \outer +\let\normalouter = \outer \let\outer = \relax %D We also want to postpone the loading of hyphenation patters, -%D so we redefine and therefore save \type{\input}. +%D so we redefine and therefore save \type{\input}. -\let\normalinput = \input +\let\normalinput = \input \def\input #1 {\skipmessage{\string\input}} -%D Finaly are going to we redefine some font specification +%D Finaly are going to we redefine some font specification %D commands and that's why we save them too. The redefinitions -%D are straightforward because the macros have to do nothing +%D are straightforward because the macros have to do nothing %D but skipping. \let\normalskewchar = \skewchar @@ -63,9 +63,9 @@ \def\scriptfont #1=#2{\skipmessage{\string\scriptfont}} \def\scriptscriptfont #1=#2{\skipmessage{\string\scriptscriptfont}} -%D The redefinition of \type{\font} is a bit more complicated, -%D because in version 3.14159 a scaled specification was -%D introduced. +%D The redefinition of \type{\font} is a bit more complicated, +%D because in version 3.14159 a scaled specification was +%D introduced. \let\normalfont = \font @@ -81,7 +81,7 @@ \fi \next#3} -% or: +% or: % % \long\def\font#1=#2 #3% % {\ifx#3s% @@ -92,68 +92,68 @@ % \fi % #3} -%D Relaxing some font switching macros is needed because we -%D don't want any error messages during loading. These -%D unharmfull messages could be ingored. +%D Relaxing some font switching macros is needed because we +%D don't want any error messages during loading. These +%D unharmfull messages could be ingored. %D -%D The next substitution is needed for determining -%D \type{\p@renwd} in the macro \type{\bordermatrix}. +%D The next substitution is needed for determining +%D \type{\p@renwd} in the macro \type{\bordermatrix}. \def\tenex#1% - {\skipmessage{used \string\tenex}\hskip8.75002pt} + {\skipmessage{used \string\tenex}\hskip8.75002pt} -%D We need to define \type{\tenrm} for switching to -%D \type{\rm}. +%D We need to define \type{\tenrm} for switching to +%D \type{\rm}. \def\tenrm% - {\skipmessage{\string\tenrm}} + {\skipmessage{\string\tenrm}} -%D In \CONTEXT\ all \PLAIN\ \TEX\ fonts are available, just +%D In \CONTEXT\ all \PLAIN\ \TEX\ fonts are available, just %D like \type{\p@renwd}. We only postpone loading them until %D they are actually needed. -%D By bypassing fonts, some definitions become less valid so -%D we have to redefine them afterwards. -%D -%D \starttypen +%D By bypassing fonts, some definitions become less valid so +%D we have to redefine them afterwards. +%D +%D \starttyping %D \let\normalbordermatrix=\bordermatrix -%D +%D %D \def\bordermatrix% %D {\bgroup %D \setbox0=\hbox{\getvalue{\textface\c!mm\c!ex}B}% %D \global\p@renwd=\wd0\relax %D \egroup %D \normalbordermatrix} -%D \stoptypen +%D \stoptyping -%D Now we are ready for loading \PLAIN\ \TEX. Of couse we use +%D Now we are ready for loading \PLAIN\ \TEX. Of couse we use %D \type{\normalinput} and not \type{\input}. \normalinput plain.tex \let\normalfmtversion\fmtversion -%D We have to take care of unwanted \PDFTEX\ -%D initializations. We just want to default to \DVI\ output. +%D We have to take care of unwanted \PDFTEX\ +%D initializations. We just want to default to \DVI\ output. -\ifx\pdftexversion\undefined +\ifx\pdftexversion\undefined \chardef\pdfoutput=0 \else \pdfoutput=0 -\fi +\fi -%D When applicable, we also load the \ETEX\ source and -%D definition files. +%D When applicable, we also load the \ETEX\ source and +%D definition files. -\bgroup \obeylines +\bgroup \obeylines -\ifx\eTeXversion\undefined +\ifx\eTeXversion\undefined \long\gdef\beginETEX#1\endETEX% {} - \gdef\beginTEX% + \gdef\beginTEX% {\bgroup\obeylines\dobeginTEX} - \gdef\dobeginTEX#1 + \gdef\dobeginTEX#1 {\egroup} \global\let\endTEX\relax @@ -163,42 +163,50 @@ \long\gdef\beginTEX#1\endTEX% {} - \gdef\beginETEX% + \gdef\beginETEX% {\bgroup\obeylines\dobeginETEX} - \gdef\dobeginETEX#1 + \gdef\dobeginETEX#1 {\egroup\immediate\write16% %{line \the\inputlineno: inserting E-TEX code \detokenize{#1}}} {system (E-TEX) : [line \the\inputlineno] \detokenize{#1}}} \global\let\endETEX\relax -\fi +\fi \egroup -%D Well, this redefintion of \type {\input} fails on \ETEX, +% \ifx\eTeXversion\undefined +% \long\def\onlyTEX #1{#1} +% \long\def\onlyETEX#1{} +% \else +% \long\def\only TEX#1{} +% \long\def\onlyETEX#1{#1} +% \fi + +%D Well, this redefintion of \type {\input} fails on \ETEX, %D because of some \type {\cs\fi} constructs. So now we use: -% \beginETEX etex.src etexdefs.lib -% +% \beginETEX etex.src etexdefs.lib +% % \def\input#1% % {\bgroup % \skipmessage{\string\input}% -% \expandafter\ifx\expandafter#1\csname l@ngdefnfile\endcsname +% \expandafter\ifx\expandafter#1\csname l@ngdefnfile\endcsname % \let\input\egroup % \else % \def\input##1 {\egroup}% % \fi % \input} -% -% \normalinput etex.src \relax -% \normalinput etexdefs.lib \relax -% +% +% \normalinput etex.src \relax +% \normalinput etexdefs.lib \relax +% % \let\fmtversion\normalfmtversion -% +% % \savinghyphcodes=1 -% +% % \endETEX % % \let\normalprotected = \protected @@ -209,8 +217,8 @@ \savinghyphcodes=1 \endETEX - -%D We restore some redefined primitives to their old meaning. + +%D We restore some redefined primitives to their old meaning. \let\font = \normalfont \let\skewchar = \normalskewchar @@ -220,9 +228,9 @@ \let\input = \normalinput \let\outer = \normalouter -%D We reset some of the used auxiliary macro's to +%D We reset some of the used auxiliary macro's to %D \type{\undefined}. One never knows what testing on them is -%D done elsewhere. +%D done elsewhere. \let\skipmessage = \undefined \let\skipscaled = \undefined @@ -235,17 +243,17 @@ % \let\normalinput = \undefined % \let\normalouter = \undefined -%D We want a bit more statistics and some less logging info -%D in the \type{log} file. +%D We want a bit more statistics and some less logging info +%D in the \type{log} file. -\def\wlog#1{} +\def\wlog#1{} -% \let\normalwlog\wlog +% \let\normalwlog\wlog % % \def\wlog#1{\normalwlog{system (\string\wlog) : #1}} -%D To prevent clashes, we slightly redefine the phantom -%D macros: we let them hide their behaviour by grouping. +%D To prevent clashes, we slightly redefine the phantom +%D macros: we let them hide their behaviour by grouping. \catcode`@=11 @@ -262,11 +270,11 @@ \def\finph@nt% {\setbox\tw@\null \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@ \fi - \ifh@ \wd\tw@\wd\z@ \fi + \ifh@ \wd\tw@\wd\z@ \fi \box\tw@ \egroup} -%D But this one does work. +%D But this one does work. \def\ph@nt% {\ifmmode @@ -278,7 +286,7 @@ \def\finph@nt% {\setbox\tw@\null \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@ \fi - \ifh@ \wd\tw@\wd\z@ \fi + \ifh@ \wd\tw@\wd\z@ \fi \box\tw@ \ifmmode\else\egroup\fi} @@ -288,13 +296,13 @@ \tracingstats=1 -%D To circumvent dependencies, we can postpone certain -%D initializations to dumping time, by appending them to the -%D \type {\everydump} token register. +%D To circumvent dependencies, we can postpone certain +%D initializations to dumping time, by appending them to the +%D \type {\everydump} token register. -\newtoks \everydump +\newtoks \everydump -\let\normaldump \dump +\let\normaldump \dump \def\dump{\the\everydump\normaldump} diff --git a/tex/context/base/thrd-ran.tex b/tex/context/base/thrd-ran.tex index 63b3e1371..7a186204b 100644 --- a/tex/context/base/thrd-ran.tex +++ b/tex/context/base/thrd-ran.tex @@ -98,10 +98,10 @@ % %D The next macro is not needed in \CONTEXT, which provides % %D the \type {\withoutpt} macro. % %D -% %D \starttypen +% %D \starttyping % %D \def\pointless{\expandafter\PoinTless\the} % %D {\catcode`p=12 \catcode`t=12 \gdef\PoinTless#1pt{#1}} -% %D \stoptypen +% %D \stoptyping % % \catcode`\@=\randomi % \global\randomi=0 @@ -165,4 +165,4 @@ \expandafter\getr@nval \fi} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/thrd-trg.tex b/tex/context/base/thrd-trg.tex index 32e042b38..3fce672d5 100644 --- a/tex/context/base/thrd-trg.tex +++ b/tex/context/base/thrd-trg.tex @@ -111,4 +111,4 @@ %D Usage: \type {\calculatesin{10}} and \type {\calculatedsin{10}} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/type-akb.tex b/tex/context/base/type-akb.tex index af2ba760c..196b13be5 100644 --- a/tex/context/base/type-akb.tex +++ b/tex/context/base/type-akb.tex @@ -17,17 +17,17 @@ %D and maps to the standard postscript fonts conforming the %D psnfss system as used by \LaTeX. %D -%D \starttypen -%D \setupencoding[default=texnansi] +%D \starttyping +%D \setupencoding[defaultdefault=texnansi] %D \usetypescript[adobekb][\defaultencoding] -%D \stoptypen +%D \stoptyping %D %D The following is not needed since the file is already %D registered: %D -%D \starttypen +%D \starttyping %D \usetypescriptfile[akb] -%D \stoptypen +%D \stoptyping \starttypescript [adobekb] [8r] @@ -199,4 +199,4 @@ \stoptypescript -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/type-buy.tex b/tex/context/base/type-buy.tex index c53beb489..c8ce968a5 100644 --- a/tex/context/base/type-buy.tex +++ b/tex/context/base/type-buy.tex @@ -50,11 +50,10 @@ % Lucida Bright : Biggelow and Holmes -\starttypescript [all] [lucida] [ec,8r,texnansi] +\starttypescript [map] [lucida] [ec,8r,texnansi] \loadmapfile [\typescriptthree-bh-lucida.map] \stoptypescript - \starttypescript [serif] [lucida] [name] \definefontsynonym [Serif] [LucidaBright] \definefontsynonym [SerifBold] [LucidaBright-Demi] @@ -95,13 +94,6 @@ \definefontsynonym [MathBeta] [LucidaNewMath-Roman] \stoptypescript - \definefontsynonym [LucidaNewMath-AltDemiItalic] [lbmdo] - \definefontsynonym [LucidaNewMath-Arrows-Demi] [lbmad] - \definefontsynonym [LucidaNewMath-Extension] [lbme] - \definefontsynonym [LucidaNewMath-Demibold] [lbmd] - \definefontsynonym [LucidaNewMath-DemiItalic] [lbmdi] - \definefontsynonym [LucidaNewMath-Symbol-Demi] [lbmsd] - \starttypescript [boldmath] [lucida] [name] \definefontsynonym [MathRoman] [LucidaBright-Demi] \definefontsynonym [MathExtension] [LucidaNewMath-Extension] @@ -196,7 +188,7 @@ % Informal : Vulis -\starttypescript [all] [informal] [default] +\starttypescript [map] [informal] [default] \loadmapfile[original-micropress-informal.map] \stoptypescript @@ -233,7 +225,7 @@ % ITC Officina -\starttypescript [all] [officina] [ec,8r,texnansi] +\starttypescript [map] [officina] [ec,8r,texnansi] \loadmapfile [\typescriptthree-itc-officina.map] \stoptypescript @@ -289,7 +281,7 @@ % FontFont Meta -\starttypescript [all] [meta] [ec,8r,texnansi] +\starttypescript [map] [meta] [ec,8r,texnansi] \loadmapfile [\typescriptthree-fontfont-meta.map] \stoptypescript @@ -413,7 +405,7 @@ %D Linotype Univers -\starttypescript [all] [univers] [texnansi] +\starttypescript [map] [univers] [texnansi] \loadmapfile[\typescriptthree-linotype-univers.map] \stoptypescript @@ -459,7 +451,7 @@ % mendoza -\starttypescript [all] [mendoza] [ec,8r,texnansi] +\starttypescript [map] [mendoza] [ec,8r,texnansi] \loadmapfile[\typescriptthree-itc-mendoza.map] \stoptypescript @@ -488,7 +480,7 @@ % frutiger -\starttypescript [all] [frutiger] [ec,8r,texnansi] +\starttypescript [map] [frutiger] [ec,8r,texnansi] \loadmapfile[\typescriptthree-adobe-frutiger.map] \stoptypescript @@ -520,10 +512,21 @@ % kabel -\starttypescript [all] [kabel] [ec,8r,texnansi] +\starttypescript [map] [kabel] [ec,8r,texnansi] \loadmapfile [\typescriptthree-itc-kabel.map] \stoptypescript +% \starttypescript [sans] [kabel] [name] + +% \definefontsynonym [Sans] [ItcKabel-Bold] +% \definefontsynonym [SansItalic] [ItcKabel-Bold] +% \definefontsynonym [SansSlanted] [ItcKabel-Bold] +% \definefontsynonym [SansBold] [ItcKabel-Bold] +% \definefontsynonym [SansBoldItalic] [ItcKabel-Bold] +% \definefontsynonym [SansBoldSlanted] [ItcKabel-Bold] + +% \stoptypescript + \starttypescript [sans] [kabel] [ec,8r,texnansi] \definefontsynonym [ItcKabel-Bold] [\typescriptthree-kbb] [encoding=\typescriptthree] @@ -534,4 +537,90 @@ \stoptypescript +% thesans + +\starttypescript [map] [thesans] [ec,8r,texnansi] + \loadmapfile[\typescriptthree-lucas-thesans.map] +\stoptypescript + +\starttypescript [sans] [thesans] [name] + + \definefontsynonym [Sans] [TheSans-Plain] + \definefontsynonym [SansItalic] [TheSans-Italic] + \definefontsynonym [SansSlanted] [TheSans-Italic] + \definefontsynonym [SansBold] [TheSansBold-Plain] + \definefontsynonym [SansBoldItalic] [TheSansBold-Italic] + \definefontsynonym [SansBoldSlanted] [TheSansBold-Italic] + + \definefontsynonym [SansCaps] [TheSans-Caps] + \definefontsynonym [SansCapsItalic] [TheSans-CapsItalic] + \definefontsynonym [SansCapsSlanted] [TheSans-CapsItalic] + \definefontsynonym [SansCapsBold] [TheSansBold-Caps] + \definefontsynonym [SansCapsBoldItalic] [TheSansBold-CapsItalic] + \definefontsynonym [SansCapsBoldSlanted] [TheSansBold-CapsItalic] + +\stoptypescript + +\starttypescript [mono] [thesans] [name] + + \definefontsynonym [Mono] [TheSansTypewriter-Plain] + \definefontsynonym [MonoCaps] [TheSansTypewriter-Plain] + \definefontsynonym [MonoItalic] [TheSansTypewriter-Italic] + \definefontsynonym [MonoSlanted] [TheSansTypewriter-Italic] + \definefontsynonym [MonoBold] [TheSansTypewriter-Bold] + \definefontsynonym [MonoBoldItalic] [TheSansTypewriter-BoldItalic] + \definefontsynonym [MonoBoldSlanted] [TheSansTypewriter-BoldItalic] + +\stoptypescript + +\starttypescript [sans] [thesans] [ec,8r,texnansi] + + \definefontsynonym [TheSans-Plain] [\typescriptthree-tsan5] [encoding=\typescriptthree] + \definefontsynonym [TheSans-Italic] [\typescriptthree-tsan5i] [encoding=\typescriptthree] + \definefontsynonym [TheSansBold-Plain] [\typescriptthree-tsan7] [encoding=\typescriptthree] + \definefontsynonym [TheSansBold-Italic] [\typescriptthree-tsan7i] [encoding=\typescriptthree] + + \definefontsynonym [TheSans-Caps] [\typescriptthree-tsan5c] [encoding=\typescriptthree] + \definefontsynonym [TheSans-CapsItalic] [\typescriptthree-tsan5ci] [encoding=\typescriptthree] + \definefontsynonym [TheSansBold-Caps] [\typescriptthree-tsan7c] [encoding=\typescriptthree] + \definefontsynonym [TheSansBold-CapsItalic] [\typescriptthree-tsan7ci] [encoding=\typescriptthree] + +% \definefontsynonym[TheSans-B2ExtraLight] [\typescriptthree-thesnb2] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B2ExtraLightItalic] [\typescriptthree-thesnb2i] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B3Light] [\typescriptthree-thesnb3] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B3LightItalic] [\typescriptthree-thesnb3i] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B4SemiLight] [\typescriptthree-thesnb4] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B4SemiLightItalic] [\typescriptthree-thesnb4i] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B5Plain] [\typescriptthree-thesnb5] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B5PlainItalic] [\typescriptthree-thesnb5i] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B6SemiBold] [\typescriptthree-thesnb6] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B6SemiBoldItalic] [\typescriptthree-thesnb6i] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B7Bold] [\typescriptthree-thesnb7] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B7BoldItalic] [\typescriptthree-thesnb7i] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B8ExtraBold] [\typescriptthree-thesnb8] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B8ExtraBoldItalic] [\typescriptthree-thesnb8i] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B8ExtraBoldItalic] [\typescriptthree-thesnb8i] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B9Black] [\typescriptthree-thesnb9] [encoding=\typescriptthree] +% \definefontsynonym[TheSans-B9BlackItalic] [\typescriptthree-thesnb9i] [encoding=\typescriptthree] + +\stoptypescript + +\starttypescript [mono] [thesans] [ec,8r,texnansi] + + \definefontsynonym [TheSansTypewriter-Plain] [\typescriptthree-tsaty5] [encoding=\typescriptthree] + \definefontsynonym [TheSansTypewriter-Italic] [\typescriptthree-tsaty5i] [encoding=\typescriptthree] + \definefontsynonym [TheSansTypewriter-Bold] [\typescriptthree-tsaty7] [encoding=\typescriptthree] + \definefontsynonym [TheSansTypewriter-BoldItalic] [\typescriptthree-tsaty7i] [encoding=\typescriptthree] + +\stoptypescript + +\starttypescript [expert] [thesans] + + \definefontsynonym [TheSans-Expert] [tsan5e] [encoding=\typescriptthree] + \definefontsynonym [TheSans-ExpertItalic] [tsan5ei] [encoding=\typescriptthree] + \definefontsynonym [TheSansBold-Expert] [tsan7e] [encoding=\typescriptthree] + \definefontsynonym [TheSansBold-ExpertItalic] [tsan7ei] [encoding=\typescriptthree] + +\stoptypescript + \endinput diff --git a/tex/context/base/type-cbg.tex b/tex/context/base/type-cbg.tex new file mode 100644 index 000000000..4f8070ba6 --- /dev/null +++ b/tex/context/base/type-cbg.tex @@ -0,0 +1,349 @@ +%D \module +%D [ file=type-cbg, +%D version=2004.08.23, +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=CB Greek, +%D author={Giuseppe Bilotta, Hans Hagen}, +%D date=\currentdate, +%D copyright=PRAGMA-ADE] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% legend: +% +% g=greek +% r=regular s=sansserif t=typewriter +% m=medium x=boldextended t=monospaced +% n=normal o=oblique i=italic u=uprightitalic c=smallcaps + +% ruby script to make small zip file: +% +% zipfile = 'cbsmall.zip' +% +% fontfiles = Array.new +% +% fontfiles.push(Dir.glob("fonts/{tfm,vf,afm,type1}/public/cb/{gr,gs,gt}{m,s,t}{n,o,i,u,c}{0800,1000,1200}.{tfm,afm,pfb}")) +% fontfiles.push(Dir.glob("fonts/{map,enc,lig}/{dvips,pdftex,dvipdfm,dvipdfmx}/cb/{cbgreek,cbsmall}.{map,enc,lig}")) +% +% File.delete(zipfile) if FileTest.file?(zipfile) +% system("zip -r -9 cbsmall #{fontfiles.join(' ')}") + +\starttypescript [serif] [cbgreek] [name] + + \definefontsynonym [CBGreek-Regular-Medium-Normal] [grmn1000] + \definefontsynonym [CBGreek-Regular-Medium-Oblique] [grmo1000] + \definefontsynonym [CBGreek-Regular-Medium-Italic] [grmi1000] + \definefontsynonym [CBGreek-Regular-Medium-UprightItalic] [grmu1000] + \definefontsynonym [CBGreek-Regular-Medium-Caps] [grmc1000] + \definefontsynonym [CBGreek-Regular-Medium-Leipzig] [grml1000] + \definefontsynonym [CBGreek-Regular-Medium-Roman] [grmr1000] + + \definefontsynonym [CBGreek-Regular-BoldExtended-Normal] [grxn1000] + \definefontsynonym [CBGreek-Regular-BoldExtended-Oblique] [grxo1000] + \definefontsynonym [CBGreek-Regular-BoldExtended-Italic] [grxi1000] + \definefontsynonym [CBGreek-Regular-BoldExtended-UprightItalic] [grxu1000] + \definefontsynonym [CBGreek-Regular-BoldExtended-Caps] [grxc1000] + \definefontsynonym [CBGreek-Regular-BoldExtended-Leipzig] [grxl1000] + \definefontsynonym [CBGreek-Regular-BoldExtended-Roman] [grxr1000] + +\stoptypescript + +\starttypescript [sans] [cbgreek] [name] + + \definefontsynonym [CBGreek-Sans-Medium-Normal] [gsmn1000] + \definefontsynonym [CBGreek-Sans-Medium-Oblique] [gsmo1000] + \definefontsynonym [CBGreek-Sans-Medium-Italic] [gsmi1000] + \definefontsynonym [CBGreek-Sans-Medium-UprightItalic] [gsmu1000] + \definefontsynonym [CBGreek-Sans-Medium-Caps] [gsmc1000] + \definefontsynonym [CBGreek-Sans-Medium-Leipzig] [gsml1000] + \definefontsynonym [CBGreek-Sans-Medium-Roman] [gsmr1000] + + \definefontsynonym [CBGreek-Sans-BoldExtended-Normal] [gsxn1000] + \definefontsynonym [CBGreek-Sans-BoldExtended-Oblique] [gsxo1000] + \definefontsynonym [CBGreek-Sans-BoldExtended-Italic] [gsxi1000] + \definefontsynonym [CBGreek-Sans-BoldExtended-UprightItalic] [gsxu1000] + \definefontsynonym [CBGreek-Sans-BoldExtended-Caps] [gsxc1000] + \definefontsynonym [CBGreek-Sans-BoldExtended-Leipzig] [gsxl1000] + \definefontsynonym [CBGreek-Sans-BoldExtended-Roman] [gsxr1000] + +\stoptypescript + +\starttypescript [mono] [cbgreek] [name] + + \definefontsynonym [CBGreek-Mono-Medium-Normal] [gttn1000] + \definefontsynonym [CBGreek-Mono-Medium-Oblique] [gtto1000] + \definefontsynonym [CBGreek-Mono-Medium-Italic] [gtti1000] + \definefontsynonym [CBGreek-Mono-Medium-UprightItalic] [gttu1000] + \definefontsynonym [CBGreek-Mono-Medium-Caps] [gttc1000] + \definefontsynonym [CBGreek-Mono-Medium-Leipzig] [gttl1000] + \definefontsynonym [CBGreek-Mono-Medium-Roman] [gttr1000] + +\stoptypescript + +\starttypescript [serif] [cbgreek] [name] + + \definefontsynonym [Serif] [CBGreek-Regular-Medium-Normal] + \definefontsynonym [SerifSlanted] [CBGreek-Regular-Medium-Oblique] + \definefontsynonym [SerifItalic] [CBGreek-Regular-Medium-Italic] + \definefontsynonym [SerifCaps] [CBGreek-Regular-Medium-Caps] + \definefontsynonym [SerifBold] [CBGreek-Regular-BoldExtended-Normal] + \definefontsynonym [SerifBoldSlanted] [CBGreek-Regular-BoldExtended-Oblique] + \definefontsynonym [SerifBoldItalic] [CBGreek-Regular-BoldExtended-Italic] + \definefontsynonym [SerifBoldCaps] [CBGreek-Regular-BoldExtended-Caps] + +\stoptypescript + +\starttypescript [sans] [cbgreek] [name] + + \definefontsynonym [Sans] [CBGreek-Sans-Medium-Normal] + \definefontsynonym [SansSlanted] [CBGreek-Sans-Medium-Oblique] + \definefontsynonym [SansItalic] [CBGreek-Sans-Medium-Italic] + \definefontsynonym [SansCaps] [CBGreek-Sans-Medium-Caps] + \definefontsynonym [SansBold] [CBGreek-Sans-BoldExtended-Normal] + \definefontsynonym [SansBoldSlanted] [CBGreek-Sans-BoldExtended-Oblique] + \definefontsynonym [SansBoldItalic] [CBGreek-Sans-BoldExtended-Italic] + \definefontsynonym [SansBoldCaps] [CBGreek-Sans-BoldExtended-Caps] + +\stoptypescript + +\starttypescript [mono] [cbgreek] [name] + + \definefontsynonym [Mono] [CBGreek-Typewriter-Medium-Normal] + \definefontsynonym [MonoSlanted] [CBGreek-Typewriter-Medium-Oblique] + \definefontsynonym [MonoItalic] [CBGreek-Typewriter-Medium-Italic] + \definefontsynonym [MonoCaps] [CBGreek-Typewriter-Medium-Caps] + +\stoptypescript + +% Please note that we use Bold Extended instead of Bold + +\starttypescript [serif] [cbgreek-all] [size] + + \definebodyfont [4pt,5pt] [rm] + [tf=grmn0500 sa 1,sl=grmo0500 sa 1,it=grmi0500 sa 1, + bf=grxn0500 sa 1,bs=grxo0500 sa 1,bi=grxi0500 sa 1, + sc=grmc0500 sa 1] + + \definebodyfont [6pt] [rm] + [tf=grmn0600,sl=grmo0600,it=grmi0600, + bf=grxn0600,bs=grxo0600,bi=grxi0600, + sc=grmc0600] + + \definebodyfont [7pt] [rm] + [tf=grmn0700,sl=grmo0700,it=grmi0700, + bf=grxn0700,bs=grxo0700,bi=grxi0700, + sc=grmc0700] + + \definebodyfont [8pt] [rm] + [tf=grmn0800,sl=grmo0800,it=grmi0800, + bf=grxn0800,bs=grxo0800,bi=grxi0800, + sc=grmc0800] + + \definebodyfont [9pt] [rm] + [tf=grmn0900,sl=grmo0900,it=grmi0900, + bf=grxn0900,bs=grxo0900,bi=grxi0900, + sc=grmc0900] + + \definebodyfont [10pt] [rm] + [tf=grmn1000,sl=grmo1000,it=grmi1000, + bf=grxn1000,bs=grxo1000,bi=grxi1000, + sc=grmc1000] + + \definebodyfont [11pt] [rm] + [tf=grmn1095,sl=grmo1095,it=grmi1095, + bf=grxn1095,bs=grxo1095,bi=grxi1095, + sc=grmc1095] + + \definebodyfont [12pt] [rm] + [tf=grmn1200,sl=grmo1200,it=grmi1200, + bf=grxn1200,bs=grxo1200,bi=grxi1200, + sc=grmc1200] + + \definebodyfont [14.4pt,17.3pt,20.7pt] [rm] + [tf=grmn1440 sa 1,sl=grmo1440 sa 1,it=grmi1440 sa 1, + bf=grxn1440 sa 1,bs=grxo1440 sa 1,bi=grxi1440 sa 1, + sc=grmc1440 sa 1] + +\stoptypescript + +\starttypescript [sans] [cbgreek-all] [size] + + \definebodyfont [4pt,5pt] [ss] + [tf=gsmn0500 sa 1,sl=gsmo0500 sa 1,it=gsmi0500 sa 1, + bf=gsxn0500 sa 1,bs=gsxo0500 sa 1,bi=gsxi0500 sa 1, + sc=gsmc0500 sa 1] + + \definebodyfont [6pt] [ss] + [tf=gsmn0600,sl=gsmo0600,it=gsmi0600, + bf=gsxn0600,bs=gsxo0600,bi=gsxi0600, + sc=gsmc0600] + + \definebodyfont [7pt] [ss] + [tf=gsmn0700,sl=gsmo0700,it=gsmi0700, + bf=gsxn0700,bs=gsxo0700,bi=gsxi0700, + sc=gsmc0700] + + \definebodyfont [8pt] [ss] + [tf=gsmn0800,sl=gsmo0800,it=gsmi0800, + bf=gsxn0800,bs=gsxo0800,bi=gsxi0800, + sc=gsmc0800] + + \definebodyfont [9pt] [ss] + [tf=gsmn0900,sl=gsmo0900,it=gsmi0900, + bf=gsxn0900,bs=gsxo0900,bi=gsxi0900, + sc=gsmc0900] + + \definebodyfont [10pt] [ss] + [tf=gsmn1000,sl=gsmo1000,it=gsmi1000, + bf=gsxn1000,bs=gsxo1000,bi=gsxi1000, + sc=gsmc1000] + + \definebodyfont [11pt] [ss] + [tf=gsmn1095,sl=gsmo1095,it=gsmi1095, + bf=gsxn1095,bs=gsxo1095,bi=gsxi1095, + sc=gsmc1095] + + \definebodyfont [12pt] [ss] + [tf=gsmn1200,sl=gsmo1200,it=gsmi1200, + bf=gsxn1200,bs=gsxo1200,bi=gsxi1200, + sc=gsmc1200] + + \definebodyfont [14.4pt,17.3pt,20.7pt] [ss] + [tf=gsmn1440 sa 1,sl=gsmo1440 sa 1,it=gsmi1440 sa 1, + bf=gsxn1440 sa 1,bs=gsxo1440 sa 1,bi=gsxi1440 sa 1, + sc=gsmc1440 sa 1] + +\stoptypescript + +\starttypescript [mono] [cbgreek-all] [size] + + \definebodyfont [4pt,5pt] [tt] + [tf=gttn0500 sa 1,sl=gtto0500 sa 1,it=gtti0500 sa 1, + sc=gttc0500 sa 1] + + \definebodyfont [6pt] [tt] + [tf=gttn0600,sl=gtto0600,it=gtti0600, + sc=gttc0600] + + \definebodyfont [7pt] [tt] + [tf=gttn0700,sl=gtto0700,it=gtti0700, + sc=gttc0700] + + \definebodyfont [8pt] [tt] + [tf=gttn0800,sl=gtto0800,it=gtti0800, + sc=gttc0800] + + \definebodyfont [9pt] [tt] + [tf=gttn0900,sl=gtto0900,it=gtti0900, + sc=gttc0900] + + \definebodyfont [10pt] [tt] + [tf=gttn1000,sl=gtto1000,it=gtti1000, + sc=gttc1000] + + \definebodyfont [11pt] [tt] + [tf=gttn1095,sl=gtto1095,it=gtti1095, + sc=gttc1095] + + \definebodyfont [12pt] [tt] + [tf=gttn1200,sl=gtto1200,it=gtti1200, + sc=gttc1200] + + \definebodyfont [14.4pt,17.3pt,20.7pt] [tt] + [tf=gttn1440 sa 1,sl=gtto1440 sa 1,it=gtti1440 sa 1, + sc=gttc1440 sa 1] + +\stoptypescript + +\starttypescript [serif] [cbgreek-some] [size] + + \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt] [rm] + [tf=grmn0800 sa 1,sl=grmo0800 sa 1,it=grmi0800 sa 1, + bf=grxn0800 sa 1,bs=grxo0800 sa 1,bi=grxi0800 sa 1, + sc=grmc0800 sa 1] + + \definebodyfont [10pt,11pt] [rm] + [tf=grmn1000 sa 1,sl=grmo1000 sa 1,it=grmi1000 sa 1, + bf=grxn1000 sa 1,bs=grxo1000 sa 1,bi=grxi1000 sa 1, + sc=grmc1000 sa 1] + + \definebodyfont [12pt,14.4pt,17.3pt,20.7pt] [rm] + [tf=grmn1200 sa 1,sl=grmo1200 sa 1,it=grmi1200 sa 1, + bf=grxn1200 sa 1,bs=grxo1200 sa 1,bi=grxi1200 sa 1, + sc=grmc1200 sa 1] + +\stoptypescript + +\starttypescript [sans] [cbgreek-some] [size] + + \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt] [ss] + [tf=gsmn0800 sa 1,sl=gsmo0800 sa 1,it=gsmi0800 sa 1, + bf=gsxn0800 sa 1,bs=gsxo0800 sa 1,bi=gsxi0800 sa 1, + sc=gsmc0800 sa 1] + + \definebodyfont [10pt,11pt] [ss] + [tf=gsmn1000 sa 1,sl=gsmo1000 sa 1,it=gsmi1000 sa 1, + bf=gsxn1000 sa 1,bs=gsxo1000 sa 1,bi=gsxi1000 sa 1, + sc=gsmc1000 sa 1] + + \definebodyfont [12pt,14.4pt,17.3pt,20.7pt] [ss] + [tf=gsmn1200 sa 1,sl=gsmo1200 sa 1,it=gsmi1200 sa 1, + bf=gsxn1200 sa 1,bs=gsxo1200 sa 1,bi=gsxi1200 sa 1, + sc=gsmc1200 sa 1] + +\stoptypescript + +\starttypescript [mono] [cbgreek-some] [size] + + \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt] [tt] + [tf=gttn0800 sa 1,sl=gtto0800 sa 1,it=gtti0800 sa 1, + sc=gttc0800 sa 1] + + \definebodyfont [10pt,11pt] [tt] + [tf=gttn1000 sa 1,sl=gtto1000 sa 1,it=gtti1000 sa 1, + sc=gttc1000 sa 1] + + \definebodyfont [12pt,14.4pt,17.3pt,20.7pt] [tt] + [tf=gttn1200 sa 1,sl=gtto1200 sa 1,it=gtti1200 sa 1, + sc=gttc1200 sa 1] + +\stoptypescript + +\starttypescript [map] [cbgreek] + \loadmapfile [cbgreek.map] +% \loadmapfile [cbsmall.map] +\stoptypescript + +\starttypescript [cbgreek-all] + + \definebodyfontenvironment [cbgreek] [default] [] + + \definetypeface [cbgreek] [rm] [serif] [cbgreek] [cbgreek-all] + \definetypeface [cbgreek] [ss] [sans] [cbgreek] [cbgreek-all] + \definetypeface [cbgreek] [tt] [mono] [cbgreek] [cbgreek-all] + +\stoptypescript + +\starttypescript [cbgreek-some] % lowercase, patched HH + + \definebodyfontenvironment [cbgreek] [default] [] + + \definetypeface [cbgreek] [rm] [serif] [cbgreek] [cbgreek-some] + \definetypeface [cbgreek] [ss] [sans] [cbgreek] [cbgreek-some] + \definetypeface [cbgreek] [tt] [mono] [cbgreek] [cbgreek-some] + +\stoptypescript + +\starttypescript [cbgreek] % lowercase, patched HH + + \definebodyfontenvironment [cbgreek] [default] [] + + \definetypeface [cbgreek] [rm] [serif] [cbgreek] [default] + \definetypeface [cbgreek] [ss] [sans] [cbgreek] [default] + \definetypeface [cbgreek] [tt] [mono] [cbgreek] [default] + +\stoptypescript + +\endinput diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex index 1ecd20247..18ca0c927 100644 --- a/tex/context/base/type-enc.tex +++ b/tex/context/base/type-enc.tex @@ -1257,4 +1257,4 @@ \stoptypescript -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/type-exa.tex b/tex/context/base/type-exa.tex index cbd55abd5..b9dfd0049 100644 --- a/tex/context/base/type-exa.tex +++ b/tex/context/base/type-exa.tex @@ -42,10 +42,10 @@ \starttypescript [times] [texnansi,ec,8r] - \definetypeface [times] [rm] [serif] [times] [default] [encoding=\typescripttwo] - \definetypeface [times] [ss] [sans] [helvetica] [default] [rscale=.9,encoding=\typescripttwo] - \definetypeface [times] [tt] [mono] [computer-modern] [default] [rscale=1.1] - \definetypeface [times] [mm] [math] [times] [default] [encoding=\typescripttwo] + \definetypeface [times] [rm] [serif] [times] [default] [encoding=\typescripttwo] + \definetypeface [times] [ss] [sans] [helvetica] [default] [rscale=.9,encoding=\typescripttwo] + \definetypeface [times] [tt] [mono] [modern] [default] [encoding=\typescripttwo,rscale=1.1] + \definetypeface [times] [mm] [math] [times] [default] [encoding=\typescripttwo] % \usemathcollection[default] @@ -53,9 +53,9 @@ \starttypescript [palatino] [texnansi,ec,8r] - \definetypeface [palatino] [rm] [serif] [palatino] [default] [encoding=\typescripttwo] - \definetypeface [palatino] [mm] [math] [palatino] [default] [encoding=default] - \definetypeface [palatino] [tt] [mono] [computer-modern] [default] [rscale=1.075,encoding=\typescripttwo] + \definetypeface [palatino] [rm] [serif] [palatino] [default] [encoding=\typescripttwo] + \definetypeface [palatino] [mm] [math] [palatino] [default] [encoding=default] + \definetypeface [palatino] [tt] [mono] [modern] [default] [encoding=\typescripttwo,rscale=1.075] % \usemathcollection[default] @@ -63,14 +63,24 @@ \starttypescript [fourier] [ec] - \definetypeface [fourier] [rm] [serif] [fourier] [default] [encoding=ec] - \definetypeface [fourier] [mm] [math] [fourier] [default] [encoding=default] - \definetypeface [fourier] [tt] [mono] [latin-modern] [default] [rscale=1.070,encoding=ec] + \definetypeface [fourier] [rm] [serif] [fourier] [default] [encoding=ec] + \definetypeface [fourier] [mm] [math] [fourier] [default] [encoding=default] + \definetypeface [fourier] [tt] [mono] [modern] [default] [encoding=ec,rscale=1.07] \usemathcollection[fou] \stoptypescript +% \starttypescript [utopia] [ec] + +% \definetypeface [fourier] [rm] [serif] [fourier] [default] [encoding=ec] +% \definetypeface [fourier] [mm] [math] [fourier] [default] [encoding=default] +% \definetypeface [fourier] [tt] [mono] [latin-modern] [default] [rscale=1.070,encoding=ec] + +% \usemathcollection[fou] + +% \stoptypescript + \starttypescript [lucida,lucidabfm] [texnansi,ec,8r] \definetypeface [lucida] [rm] [serif] [lucida] [default] [encoding=\typescripttwo] @@ -175,7 +185,7 @@ \stoptypescript -\starttypescript [serif] [simple] [name] +\starttypescript [serif] [simple] [name] % bad, will be changed but in sycn with manuals that use it \definefontsynonym [Simple] [cmvtt10] \setupfontsynonym [Simple] [handling=pure] @@ -191,4 +201,4 @@ \stoptypescript -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/type-fsf.tex b/tex/context/base/type-fsf.tex index 4e5a1be9b..f8a2aff78 100644 --- a/tex/context/base/type-fsf.tex +++ b/tex/context/base/type-fsf.tex @@ -19,8 +19,6 @@ \starttypescript [sans] [opus] [texnansi,ec,8r] - \loadmapfile[\typefaceencoding-fontsite-opus.map] - \definefontsynonym [Opus] [\typefaceencoding-opusrg] [encoding=\typefaceencoding] \definefontsynonym [OpusSmCaps] [\typefaceencoding-opusscrg] [encoding=\typefaceencoding] \definefontsynonym [Opus-Italic] [\typefaceencoding-opusi] [encoding=\typefaceencoding] @@ -33,6 +31,10 @@ \stoptypescript +\starttypescript [map] [opus] [texnansi,ec,8r] + \loadmapfile[\typefaceencoding-fontsite-opus.map] +\stoptypescript + \starttypescript [mono] [typewriter] [name] \definefontsynonym [Mono] [Typewriter] @@ -47,7 +49,6 @@ \starttypescript [mono] [typewriter] [texnansi,ec,8r] - \loadmapfile[\typefaceencoding-fontsite-typewriter.map] \definefontsynonym [Typewriter] [\typefaceencoding-typerg] [encoding=\typefaceencoding] \definefontsynonym [Typewriter-Italic] [\typefaceencoding-typei] [encoding=\typefaceencoding] @@ -62,6 +63,10 @@ \stoptypescript +\starttypescript [map] [typewriter] [texnansi,ec,8r] + \loadmapfile[\typefaceencoding-fontsite-typewriter.map] +\stoptypescript + \starttypescript [serif] [garamond] [name] \definefontsynonym [Serif] [FSGaramond] @@ -77,8 +82,6 @@ \starttypescript [serif] [garamond] [texnansi,ec,8r] - \loadmapfile[\typefaceencoding-fontsite-garamond.map] - \definefontsynonym [FSGaramond] [\typefaceencoding-garamond] [encoding=\typefaceencoding] \definefontsynonym [FSGaramondSmCaps] [\typefaceencoding-garasc] [encoding=\typefaceencoding] \definefontsynonym [FSGaramond-Italic] [\typefaceencoding-garai] [encoding=\typefaceencoding] @@ -91,4 +94,8 @@ \stoptypescript +\starttypescript [map] [garamond] [texnansi,ec,8r] + \loadmapfile[\typefaceencoding-fontsite-garamond.map] +\stoptypescript + \endinput \ No newline at end of file diff --git a/tex/context/base/type-ghz.tex b/tex/context/base/type-ghz.tex index 98687fe91..ad429aa1d 100644 --- a/tex/context/base/type-ghz.tex +++ b/tex/context/base/type-ghz.tex @@ -6,17 +6,21 @@ % zapfino -\starttypescript [serif] [zapfino] [texnansi,ec,8r] % todo: handwriting +\starttypescript [serif,handwriting] [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] + \definefontsynonym [ZapfinoOne] [\typefaceencoding-lt54223] [encoding=\typefaceencoding] + \definefontsynonym [ZapfinoTwo] [\typefaceencoding-lt54224] [encoding=\typefaceencoding] + \definefontsynonym [ZapfinoThree] [\typefaceencoding-lt54225] [encoding=\typefaceencoding] + \definefontsynonym [ZapfinoFour] [\typefaceencoding-lt54226] [encoding=\typefaceencoding] \loadmapfile[\typefaceencoding-linotype-zapfino.map] \stoptypescript +% \starttypescript [handwriting] [zapfino-1] \definefontsynonym [Handwriting] [ZapfinoOne] \stoptypescript +% \starttypescript [handwriting] [zapfino-2] \definefontsynonym [Handwriting] [ZapfinoTwo] \stoptypescript +% \starttypescript [handwriting] [zapfino-3] \definefontsynonym [Handwriting] [ZapfinoThree] \stoptypescript +% \starttypescript [handwriting] [zapfino-4] \definefontsynonym [Handwriting] [ZapfinoFour] \stoptypescript % optima @@ -52,6 +56,13 @@ \stoptypescript + +\starttypescript [map] [optima,optima-nova] [texnansi,ec,8r] + + \loadmapfile[\typefaceencoding-linotype-optima.map] + +\stoptypescript + % optima nova \starttypescript [sans] [optima-nova] [name] @@ -75,6 +86,10 @@ \stoptypescript +\starttypescript [map] [optima-nova] [texnansi,ec,8r] + \loadmapfile[\typefaceencoding-linotype-optima-nova.map] +\stoptypescript + % palatino \starttypescript [serif] [palatino] [name] @@ -114,4 +129,8 @@ \stoptypescript +\starttypescript [map] [palatino] [texnansi,ec,8r] + \loadmapfile[\typefaceencoding-linotype-palatino.map] +\stoptypescript + \endinput \ No newline at end of file diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex index 580dde7e4..342fe59b9 100644 --- a/tex/context/base/type-ini.tex +++ b/tex/context/base/type-ini.tex @@ -1,6 +1,3 @@ -% wat te doen met casual, evt `cs', danwel een manier om te -% mappen (zie showcase) - %D \module %D [ file=type-ini, %D version=2001.03.05, @@ -14,6 +11,9 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% wat te doen met casual, evt `cs', danwel een manier om te +% mappen (zie showcase) + \writestatus{loading}{Context Typescript Macros (ini)} \unprotect @@ -43,8 +43,12 @@ \let\@@typescripttwo \empty \let\typescripttwo \empty \let\@@typescriptthree\empty \let\typescriptthree\empty -\unexpanded\def\usetypescript - {\dotripleempty\dousetypescript} +% method 2 is for Hans van der Meer + +\chardef\typescriptmethod\plusone % 1: empty==all==true 2: empty==false + +\unexpanded\def\usetypescript {\chardef\typescriptmethod\plusone\dotripleempty\dousetypescript} +\unexpanded\def\usetypescriptexact{\chardef\typescriptmethod\plustwo\dotripleempty\dousetypescript} \def\dousetypescript[#1][#2][#3]% {\expanded{\dodousetypescript[#1][#2][#3]}} @@ -56,12 +60,14 @@ \pushmacro\typescriptone \pushmacro\typescripttwo \pushmacro\typescriptthree + \pushmacro\typescriptmethod \pushmacro\stoptypescript \typescriptfoundfalse \writestatus\m!fonts{[\@@typescriptone] [\@@typescripttwo] [\@@typescriptthree]}% \processcommacommand[\typescriptfiles]\dododousetypescript \firsttypescriptpassfalse % testen \popmacro\stoptypescript + \popmacro\typescriptmethod \popmacro\typescriptthree \popmacro\typescripttwo \popmacro\typescriptone @@ -98,9 +104,7 @@ \def\truetypescript#1% {\expandafter\ifx\csname\??tm#1\endcsname\relax - #1% - \else - \@EA\truetypescript\csname\??tm#1\endcsname + #1\else\@EA\truetypescript\csname\??tm#1\endcsname \fi} \endTEX @@ -109,9 +113,7 @@ \def\truetypescript#1% {\ifcsname\??tm#1\endcsname - \@EA\truetypescript\csname\??tm#1\endcsname - \else - #1% + \@EA\truetypescript\csname\??tm#1\endcsname\else#1% \fi} \endETEX @@ -126,100 +128,25 @@ \prependtoks\firsttypescriptpasstrue\to\everyjob -% \def\dochecktypescript#1#2#3% script use value -% {\donefalse -% \doifelsenothing{#1}\donetrue -% {\doifelse{#2}{all}\donetrue -% {\doifelse{#1}{all}\donetrue -% {\fullexpandtwoargsafter\doifcommonelse{#1}{#2}\donetrue\donefalse -% \ifdone\let#3\commalistelement\fi}}}} -% -% \def\starttypescript% -% {\dotripleempty\dostarttypescript} -% -% \long\def\dostarttypescript[#1][#2][#3]#4\stoptypescript -% {\iffirstargument -% \let\typescriptone \@@typescriptone -% \let\typescripttwo \@@typescripttwo -% \let\typescriptthree\@@typescriptthree -% \dochecktypescript{#1}\@@typescriptone \typescriptone \ifdone -% \dochecktypescript{#2}\@@typescripttwo \typescripttwo \ifdone -% \dochecktypescript{#3}\@@typescriptthree\typescriptthree \ifdone -% %\writestatus -% \debuggerinfo -% {typescript} -% {\currenttypefile: use=scr (val) -% [\@@typescriptone =#1 (\typescriptone)] -% [\@@typescripttwo =#2 (\typescripttwo)] -% [\@@typescriptthree=#3 (\typescriptthree)]}% -% #4\typescriptfoundtrue -% \fi\fi\fi -% \else\iffirsttypescriptpass -% \pushmacro\fontclass -% #4% -% \popmacro\fontclass -% \else -% % skip this since it may do unwanted resets, like -% % setting symbolic font names to unknown, especially -% % in run time user type scripts -% \fi\fi} - \def\typescript@@all{all} \def\dochecktypescript#1#2#3% script use value {\donefalse \def\@@typescriptcheck{#1}% \ifx\@@typescriptcheck\empty - \donetrue + \ifcase\typescriptmethod\or\donetrue\else\donefalse\fi \else\ifx#2\typescript@@all \donetrue \else\ifx\@@typescriptcheck\typescript@@all \donetrue - \else\fullexpandtwoargsafter\doifcommonelse{#1}{#2}\donetrue\donefalse\ifdone +% \else\fullexpandtwoargsafter\doifcommonelse{#1}{#2}\donetrue\donefalse\ifdone % == + \else\expanded{\doifcommonelse{#1}{#2}}\donetrue\donefalse\ifdone \let#3\commalistelement \fi\fi\fi\fi} \def\starttypescript {\dotripleempty\dostarttypescript} -% \long\def\dostarttypescript[#1][#2][#3]% #4\stoptypescript -% {\iffirstargument -% \let\typescriptone \@@typescriptone -% \let\typescripttwo \@@typescripttwo -% \let\typescriptthree\@@typescriptthree -% \dochecktypescript{#1}\@@typescriptone \typescriptone -% \ifdone -% \dochecktypescript{#2}\@@typescripttwo \typescripttwo -% \ifdone -% \dochecktypescript{#3}\@@typescriptthree\typescriptthree -% \ifdone -% %\debuggerinfo -% % {typescript} -% % {\currenttypefile: use=scr (val) -% % [\@@typescriptone =#1 (\typescriptone)] -% % [\@@typescripttwo =#2 (\typescripttwo)] -% % [\@@typescriptthree=#3 (\typescriptthree)]}% -% \typescriptfoundtrue -% \let\next\dostarttypescriptA -% \else -% \let\next\dostarttypescriptC -% \fi -% \else -% \let\next\dostarttypescriptC -% \fi -% \else -% \let\next\dostarttypescriptC -% \fi -% \else\iffirsttypescriptpass -% \let\next\dostarttypescriptB -% \else -% % skip this since it may do unwanted resets, like -% % setting symbolic font names to unknown, especially -% % in run time user type scripts -% \let\next\dostarttypescriptC -% \fi\fi -% \next} - \newif\iftracetypescripts \long\def\dostarttypescript[#1][#2][#3]% #4\stoptypescript @@ -279,13 +206,13 @@ % 2 reported % 3 preloaded -% flags ipv \c!status, more flag values +% flags ipv \c!state, more flag values % \def\preloadmapfile[#1]% % {\def\docommando##1% % {\doifinstringelse{.}{##1} % {\writestatus{pdftex}{compensate map file: ##1}% -% \setxvalue{##1 \c!status}{3}% +% \setxvalue{##1 \c!state}{3}% % \doglobal\removefromcommalist{##1}\allfontmapsfiles} % {\expanded{\docommando{##1.\f!fontmapextension}}}}% % \expanded{\processcommalist[#1]}\docommando} @@ -303,7 +230,7 @@ \def\dopreloadmapfile#1% {\doifinstringelse{.}{#1} {\writestatus\m!fonts{assuming map file: #1}% - \setxvalue{#1 \c!status}{3}% + \setxvalue{#1 \c!state}{3}% \doglobal\removefromcommalist{#1}\allfontmapsfiles} {\expanded{\dopreloadmapfile{#1.\f!fontmapextension}}}} @@ -343,16 +270,16 @@ \fi \fi \def\doloadfontmapfile#1% - {\ifundefined{#1 \c!status}% + {\ifundefined{#1 \c!state}% \writestatus\m!fonts{using map file: #1}% \doloadmapfile{+}{#1}% - \setxvalue{#1 \c!status}{1}% + \setxvalue{#1 \c!state}{1}% \fi} \def\doreportfontmapfile#1% - {\ifundefined{#1 \c!status}% + {\ifundefined{#1 \c!state}% \writestatus\m!fonts{needs map file: #1}% - \setxvalue{#1 \c!status}{2}% + \setxvalue{#1 \c!state}{2}% \fi} \def\loadallfontmapfiles @@ -412,7 +339,7 @@ \def\typefaceencoding{\defaultencoding} \def\dodefinetypeface[#1][#2][#3][#4][#5][#6]% - {\dododefinetypeface[#1][#2] + {\dododefinetypeface[#1][#2]% \iffifthargument % sixth is optional % \getparameters[\??ts][rscale=1,\s!encoding=\defaultencoding,#6] % we need to expand since in #6 there can be a \typescripttwo @@ -426,17 +353,17 @@ \setcurrentfontclass{#1} \saverelativefontsize{#2}{\relativefontsize}% fall back %\writestatus{typeface}{[#1] [#2] [#3] [#4]} - \writestatus\m!fonts{[#1] [#2] [#3] [#4]} - \usetypescript[map][\typefaceencoding] - \usetypescript[#3,map][#4][name,default,\typefaceencoding,special] - \usetypescript[#3][#5][size] + \writestatus\m!fonts{[#1] [#2] [#3] [#4] / \typefaceencoding}% + \usetypescript[map][\typefaceencoding]% will become obsolete + \usetypescript[#3,map][#4][name,default,\typefaceencoding,special]% + \usetypescript[#3][#5][size]% \popmacro\fontclass \popmacro\typefaceencoding \popmacro\relativefontsize \else\iffourthargument \definetypeface[#1][#2][#3][#4][\s!default]% \else\ifthirdargument - \getparameters[\??tf#1#2][#3] + \getparameters[\??tf#1#2][#3]% \fi\fi\fi} \def\dododefinetypeface[#1][#2]% saveguard against redefinition @@ -467,7 +394,7 @@ \ifmmode\mr\else\tf\fi} % needed ? \def\usetypefile[#1]% recurses on path ! - {\readfile{\f!typeprefix#1}{}{}}% \relax\relax} + {\readfile{\f!typeprefix#1}\donothing\donothing} %D For backward compatibility we reimplement the font file %D loading macro. @@ -503,4 +430,4 @@ % \usetypescript [berry] [ec] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/type-map.tex b/tex/context/base/type-map.tex index 471d7897a..97d42d9bf 100644 --- a/tex/context/base/type-map.tex +++ b/tex/context/base/type-map.tex @@ -41,95 +41,92 @@ % cmr and related -\starttypescript [all] [cmr] +\starttypescript [map] [cmr] \loadmapfile[original-ams-cmr.map] \loadmapfile[original-ams-euler.map] \stoptypescript -\starttypescript [all] [il2,csr] +\starttypescript [map] [il2,csr] \loadmapfile[original-public-csr.map] \stoptypescript -\starttypescript [all] [pl0,plr] +\starttypescript [map] [pl0,plr] \loadmapfile[original-public-plr.map] \stoptypescript -\starttypescript [all] [lm,lmr] +\starttypescript [map] [lm,lmr] \loadmapfile[original-public-lm.map] \stoptypescript % latin modern -\starttypescript [all] [latin-modern] [ec,texnansi,qx] +\starttypescript [map] [latin-modern] [ec,texnansi,qx] \loadmapfile[\typescriptthree-public-lm.map] -\stoptypescript - -\starttypescript [var] [latin-modern] [ec,texnansi,qx] \loadmapfile[\typescriptthree-var-exclusive-public-lm.map] \stoptypescript % the next applies to texfont generated metrics -\starttypescript [all] [utopia] [ec,8r,texnansi] +\starttypescript [map] [utopia] [ec,8r,texnansi] \loadmapfile[\typescriptthree-adobe-utopia.map] \stoptypescript -\starttypescript [all] [charter] [ec,8r,texnansi] +\starttypescript [map] [charter] [ec,8r,texnansi] \loadmapfile[\typescriptthree-bitstrea-charter.map] \stoptypescript -\starttypescript [all] [antykwa-torunska] [ec,8r,texnansi] +\starttypescript [map] [antykwa-torunska] [ec,8r,texnansi] \loadmapfile[\typescriptthree-public-antt.map] \stoptypescript -\starttypescript [all] [antykwa-poltawskiego] [ec,8r,texnansi] +\starttypescript [map] [antykwa-poltawskiego] [ec,8r,texnansi] \loadmapfile[\typescriptthree-public-antp.map] \stoptypescript -\starttypescript [all] [bookman] [ec,8r,texnansi] +\starttypescript [map] [bookman] [ec,8r,texnansi] \loadmapfile[\typescriptthree-urw-bookman.map] \stoptypescript -\starttypescript [all] [courier] [ec,8r,texnansi] +\starttypescript [map] [courier] [ec,8r,texnansi] \loadmapfile[\typescriptthree-urw-courier.map] \stoptypescript -\starttypescript [all] [helvetica] [ec,8r,texnansi] +\starttypescript [map] [helvetica] [ec,8r,texnansi] \loadmapfile[\typescriptthree-urw-helvetica.map] \stoptypescript -\starttypescript [all] [palatino] [ec,8r,texnansi] +\starttypescript [map] [palatino] [ec,8r,texnansi] \loadmapfile[\typescriptthree-urw-palatino.map] \stoptypescript -\starttypescript [all] [times] [ec,8r,texnansi] +\starttypescript [map] [times] [ec,8r,texnansi] \loadmapfile[\typescriptthree-urw-times.map] \stoptypescript -\starttypescript [all] [chancery] [ec,8r,texnansi] +\starttypescript [map] [chancery] [ec,8r,texnansi] \loadmapfile[\typescriptthree-urw-zapfchan.map] \stoptypescript -\starttypescript [all] [schoolbook] [ec,8r,texnansi] +\starttypescript [map] [schoolbook] [ec,8r,texnansi] \loadmapfile[\typescriptthree-urw-ncntrsbk.map] \stoptypescript % once i can be sure that the map files are in the tree, i will % use those instead of original (too many variants anyway) -\starttypescript [all] [palatino] [default,ec,texnansi,8r] +\starttypescript [map] [palatino] [default,ec,texnansi,8r] \loadmapfile[original-youngryu-px.map] \stoptypescript -\starttypescript [all] [times] [default,ec,texnansi,8r] +\starttypescript [map] [times] [default,ec,texnansi,8r] \loadmapfile[original-youngryu-tx.map] \stoptypescript % to do: maybe original, maybe not -\starttypescript [all] [fourier] [ec] +\starttypescript [map] [fourier] [ec] \loadmapfile[fourier.map] \loadmapfile[fourier-utopia-expert.map] \stoptypescript -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/type-pre.tex b/tex/context/base/type-pre.tex index 7f903f972..10413eae8 100644 --- a/tex/context/base/type-pre.tex +++ b/tex/context/base/type-pre.tex @@ -164,7 +164,7 @@ \usemathcollection[lbr] - \usetypescript [map] [\defaultencoding] + \usetypescript [all] [lucida] [\defaultencoding] \stoptypescript @@ -180,7 +180,7 @@ \usemathcollection[tim] - \usetypescript [map] [\defaultencoding] + \usetypescript [all] [times] [\defaultencoding] \stoptypescript @@ -193,7 +193,7 @@ \usetypescript [serif] [antykwa-torunska] [name,\defaultencoding] \usetypescript [serif] [default] [size] - \usetypescript [map] [\defaultencoding] + \usetypescript [all] [antykwa-torunska] [\defaultencoding] \stoptypescript @@ -204,7 +204,7 @@ \usetypescript [mono] [courier] [name,\defaultencoding] \usetypescript [mono] [default] [size] - \usetypescript [map] [\defaultencoding] + \usetypescript [all] [courier] [\defaultencoding] \stoptypescript @@ -215,7 +215,7 @@ \usetypescript [sans] [helvetica] [name,\defaultencoding] \usetypescript [sans] [default] [size] - \usetypescript [map] [\defaultencoding] + \usetypescript [all] [helvetica] [\defaultencoding] \stoptypescript @@ -226,7 +226,7 @@ \usetypescript [serif] [times] [name,\defaultencoding] \usetypescript [serif] [default] [size] - \usetypescript [map] [\defaultencoding] + \usetypescript [all] [times] [\defaultencoding] \stoptypescript @@ -244,7 +244,7 @@ % \usetypescript [math] [times] [all] % \usetypescript [math] [default] [size] - \usetypescript [map] [\defaultencoding] + \usetypescript [all] [times,helvetica,courier] [\defaultencoding] \stoptypescript @@ -255,7 +255,7 @@ \usetypescript [serif] [palatino] [name,\defaultencoding] \usetypescript [serif] [default] [size] - \usetypescript [map] [\defaultencoding] + \usetypescript [all] [palatino] [\defaultencoding] \stoptypescript @@ -272,4 +272,4 @@ \usetypescript [berry] [ec] \stoptypescript -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/type-run.tex b/tex/context/base/type-run.tex index 2e9f02a84..5070c791e 100644 --- a/tex/context/base/type-run.tex +++ b/tex/context/base/type-run.tex @@ -11,23 +11,22 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\unprotect +\unprotect -\gdef\typetypescript% +\gdef\typetypescript {\dotripleempty\dotypetypescript} \gdef\dotypetypescript[#1][#2][#3]% {\bgroup - \def\dochecktypescript##1##2% script use + \def\dochecktypescript##1##2% script use {\doifelsenothing{##1##2} {\donetrue} - {\donefalse - \ExpandBothAfter\doifcommonelse{##1}{##2}\donetrue\donefalse}} + {\ExpandBothAfter\doifcommonelse{##1}{##2}\donetrue\donefalse}} \edef\typescriptone {\truetypescript{#1}}% \edef\typescripttwo {\truetypescript{#2}}% \edef\typescriptthree{\truetypescript{#3}}% \def\starttypescript - {\bgroup + {\bgroup \obeylines % else we loose the first line due to lookahead \dotripleempty\dostarttypescript} \def\dostarttypescript[##1][##2][##3]% @@ -38,7 +37,7 @@ \def\next% {\def\stoptypescript% {\egroup\type{\stoptypescript}} - % what follows now is quite ugly + % what follows now is quite ugly \skipfirstverbatimlinefalse \processdisplayverbatim{\stoptypescript}% \type{\starttypescript} @@ -46,8 +45,8 @@ \doifsomething{##2}{\type{[##2]}} \doifsomething{##3}{\type{[##3]}}} \fi\fi\fi - \next} + \next} \processcommacommand[\typescriptfiles]\dodousetypescript \egroup} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/type-siz.tex b/tex/context/base/type-siz.tex index 9dff7caba..5394e3631 100644 --- a/tex/context/base/type-siz.tex +++ b/tex/context/base/type-siz.tex @@ -67,73 +67,73 @@ [4pt] [ \s!text=4pt, \s!script=4pt, \s!scriptscript=4pt, \c!x=4pt, \c!xx=4pt, - \c!groot=6pt, \c!klein=4pt] + \c!big=6pt, \c!small=4pt] \definebodyfontenvironment [5pt] [ \s!text=5pt, \s!script=5pt, \s!scriptscript=5pt, \c!x=5pt, \c!xx=5pt, - \c!groot=7pt, \c!klein=5pt] + \c!big=7pt, \c!small=5pt] \definebodyfontenvironment [6pt] [ \s!text=6pt, \s!script=5pt, \s!scriptscript=5pt, \c!x=5pt, \c!xx=5pt, - \c!groot=8pt, \c!klein=5pt] + \c!big=8pt, \c!small=5pt] \definebodyfontenvironment [7pt] [ \s!text=7pt, \s!script=6pt, \s!scriptscript=5pt, \c!x=6pt, \c!xx=5pt, - \c!groot=9pt, \c!klein=5pt] + \c!big=9pt, \c!small=5pt] \definebodyfontenvironment [8pt] [ \s!text=8pt, \s!script=6pt, \s!scriptscript=5pt, \c!x=6pt, \c!xx=5pt, - \c!groot=10pt, \c!klein=6pt] + \c!big=10pt, \c!small=6pt] \definebodyfontenvironment [9pt] [ \s!text=9pt, \s!script=7pt, \s!scriptscript=5pt, \c!x=7pt, \c!xx=5pt, - \c!groot=11pt, \c!klein=7pt] + \c!big=11pt, \c!small=7pt] \definebodyfontenvironment [10pt] [ \s!text=10pt, \s!script=7pt, \s!scriptscript=5pt, \c!x=8pt, \c!xx=6pt, - \c!groot=12pt, \c!klein=8pt] + \c!big=12pt, \c!small=8pt] \definebodyfontenvironment [11pt] [ \s!text=11pt, \s!script=8pt, \s!scriptscript=6pt, \c!x=9pt, \c!xx=7pt, - \c!groot=13pt, \c!klein=9pt] + \c!big=13pt, \c!small=9pt] \definebodyfontenvironment [12pt] [ \s!text=12pt, \s!script=9pt, \s!scriptscript=7pt, \c!x=10pt, \c!xx=8pt, - \c!groot=14pt, \c!klein=10pt] + \c!big=14pt, \c!small=10pt] \definebodyfontenvironment [13pt] [ \s!text=13pt, \s!script=10pt, \s!scriptscript=8pt, \c!x=11pt, \c!xx=9pt, - \c!groot=16pt, \c!klein=11pt] + \c!big=16pt, \c!small=11pt] \definebodyfontenvironment [14pt] [ \s!text=14pt, \s!script=10pt, \s!scriptscript=7pt, \c!x=12pt, \c!xx=10pt, - \c!groot=16pt, \c!klein=12pt] + \c!big=16pt, \c!small=12pt] \definebodyfontenvironment [16pt] [ \s!text=16pt, \s!script=12pt, \s!scriptscript=9pt, \c!x=13pt, \c!xx=11pt, - \c!groot=18pt, \c!klein=14pt] + \c!big=18pt, \c!small=14pt] \stoptypescript @@ -668,4 +668,4 @@ \stoptypescript -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/type-spe.tex b/tex/context/base/type-spe.tex index 51fc51b4a..a113a7652 100644 --- a/tex/context/base/type-spe.tex +++ b/tex/context/base/type-spe.tex @@ -39,4 +39,4 @@ \usemathcollection[fou] \stoptypescript -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/type-syn.tex b/tex/context/base/type-syn.tex index d8a7d458a..0b4ed6e81 100644 --- a/tex/context/base/type-syn.tex +++ b/tex/context/base/type-syn.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% Simple Minded Fonts +% Simple Minded Fonts / to be redone so that it's not bound to modern \starttypescript [serif] [simple] [name] \definefontsynonym [Serif] [Simple] @@ -23,6 +23,16 @@ \definefontsynonym [SerifCaps] [Serif] \stoptypescript +% \starttypescript [sans] [simple] [name] +% \definefontsynonym [Sans] [Simple] +% \definefontsynonym [SansBold] [Sans] +% \definefontsynonym [SansItalic] [Sans] +% \definefontsynonym [SansSlanted] [Sans] +% \definefontsynonym [SansBoldItalic] [Sans] +% \definefontsynonym [SansBoldSlanted] [Sans] +% \definefontsynonym [SansCaps] [Sans] +% \stoptypescript + % Computer Modern Roman : Donald Knuth \starttypescript [serif] [computer-modern,latin-modern] [name] @@ -338,4 +348,4 @@ \definefontsynonym [MathBeta] [Palatino-Math-SymbolsB] \stoptypescript -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/typo-ini.tex b/tex/context/base/typo-ini.tex index f6f3e88f9..e249b51e0 100644 --- a/tex/context/base/typo-ini.tex +++ b/tex/context/base/typo-ini.tex @@ -8,33 +8,33 @@ %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 Since \CONTEXT\ is dealing with typographics, isn't %D September 2000 a bit late to start writing this module? It %D may seem so, but since more and more languages are %D supported, we think it is time to isolate language specific %D typographic extensions in modules. The first language that -%D demands this is Chinese, and more will follow. +%D demands this is Chinese, and more will follow. \writestatus{loading}{Context Typographic Macros (ini)} -\unprotect +\unprotect -%D \macros +%D \macros %D {ifvertical} -%D +%D %D The following switch can be used to signal macros that they -%D should adapt their behaviour. +%D should adapt their behaviour. -\newif\ifvertical +\newif\ifvertical % maybe also ifreverse -%D \macros +%D \macros %D {vhbox} %D -%D A stupid but useful macro. +%D A stupid but useful macro. \def\vhbox{\ifvertical\vbox\else\hbox\fi} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/unic-000.tex b/tex/context/base/unic-000.tex index 047814cb8..83e90e444 100644 --- a/tex/context/base/unic-000.tex +++ b/tex/context/base/unic-000.tex @@ -71,7 +71,7 @@ Ocircumflex\or Otilde\or Odiaeresis\or - \@@unknownchar\or + textmultiply\or Ostroke\or Ugrave\or Uacute\or @@ -103,7 +103,7 @@ ocircumflex\or ohungarumlaut\or odiaeresis\or - \@@unknownchar\or + textdiv\or ostroke\or ugrave\or uacute\or @@ -176,7 +176,7 @@ \Ocircumflex \or \Otilde \or \Odiaeresis \or - \unknownchar \or + \textmultiply \or \Ostroke \or \Ugrave \or \Uacute \or @@ -208,7 +208,7 @@ \ocircumflex \or \ohungarumlaut \or \odiaeresis \or - \unknownchar \or + \textdiv \or \ostroke \or \ugrave \or \uacute \or @@ -221,4 +221,4 @@ \fi \stopunicodevector -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/unic-001.tex b/tex/context/base/unic-001.tex index d91dfe673..5a7a59fc1 100644 --- a/tex/context/base/unic-001.tex +++ b/tex/context/base/unic-001.tex @@ -284,4 +284,4 @@ \fi \stopunicodevector -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/unic-002.tex b/tex/context/base/unic-002.tex index 5790fa76a..40475b297 100644 --- a/tex/context/base/unic-002.tex +++ b/tex/context/base/unic-002.tex @@ -45,4 +45,4 @@ \fi\fi \stopunicodevector -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/unic-032.tex b/tex/context/base/unic-032.tex index 75009566e..f2061823a 100644 --- a/tex/context/base/unic-032.tex +++ b/tex/context/base/unic-032.tex @@ -8,32 +8,32 @@ %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 +\unprotect \startunicodevector 32 \ifcase\numexpr(#1-19) endash\or - emdash\or - \@@unknownchar\or - \@@unknownchar\or - \@@unknownchar\or - quoteleft\or - quoteright\or + emdash\or + \@@unknownchar\or + \@@unknownchar\or + \@@unknownchar\or + quoteleft\or + quoteright\or quotesinglebase\or - \@@unknownchar\or - quotedblleft\or - quotedblright\or - quotedblbase\or - \@@unknownchar\or - textdag\or + \@@unknownchar\or + quotedblleft\or + quotedblright\or + quotedblbase\or + \@@unknownchar\or + textdag\or textddag\or textbullet\or - \@@unknownchar\or - \@@unknownchar\or - \@@unknownchar\or + \@@unknownchar\or + \@@unknownchar\or + \@@unknownchar\or textellipsis\else \ifcase\numexpr(#1-48) perthousand\else @@ -41,44 +41,165 @@ \@@unknownchar\or % SINGLE LEFT-POINTING ANGLE QUOTATION MARK \@@unknownchar\else % SINGLE RIGHT-POINTING ANGLE QUOTATION MARK \ifcase\numexpr(#1-172) - texteuro\else + texteuro\else \@@unknownchar \fi\fi\fi\fi \stopunicodevector -%D More efficient: +%D More efficient: + +% U+2001 EM QUAD +% U+2002 EN SPACE +% U+2003 EM SPACE +% U+2004 THREE-PER-EM SPACE +% U+2005 FOUR-PER-EM SPACE +% U+2006 SIX-PER-EM SPACE +% U+2007 FIGURE SPACE +% U+2008 PUNCTUATION SPACE +% U+2009 THIN SPACE +% U+200A HAIR SPACE +% U+200B ZERO WIDTH SPACE +% U+200C ZERO WIDTH NON-JOINER +% U+200D ZERO WIDTH JOINER +% U+200E LEFT-TO-RIGHT MARK +% U+200F RIGHT-TO-LEFT MARK +% U+2010 HYPHEN +% U+2011 NON-BREAKING HYPHEN +% U+2012 FIGURE DASH +% U+2013 EN DASH +% U+2014 EM DASH +% U+2015 HORIZONTAL BAR +% U+2016 DOUBLE VERTICAL LINE +% U+2017 DOUBLE LOW LINE +% U+2018 LEFT SINGLE QUOTATION MARK +% U+2019 RIGHT SINGLE QUOTATION MARK +% U+201A SINGLE LOW-9 QUOTATION MARK +% U+201B SINGLE HIGH-REVERSED-9 QUOTATION MARK +% U+201C LEFT DOUBLE QUOTATION MARK +% U+201D RIGHT DOUBLE QUOTATION MARK +% U+201E DOUBLE LOW-9 QUOTATION MARK +% U+201F DOUBLE HIGH-REVERSED-9 QUOTATION MARK +% U+2020 DAGGER +% U+2021 DOUBLE DAGGER +% U+2022 BULLET +% U+2023 TRIANGULAR BULLET +% U+2024 ONE DOT LEADER +% U+2025 TWO DOT LEADER +% U+2026 HORIZONTAL ELLIPSIS +% U+2027 HYPHENATION POINT +% U+2028 LINE SEPARATOR +% U+2029 PARAGRAPH SEPARATOR +% U+202A LEFT-TO-RIGHT EMBEDDING +% U+202B RIGHT-TO-LEFT EMBEDDING +% U+202C POP DIRECTIONAL FORMATTING +% U+202D LEFT-TO-RIGHT OVERRIDE +% U+202E RIGHT-TO-LEFT OVERRIDE +% U+202F NARROW NO-BREAK SPACE +% U+2030 PER MILLE SIGN +% U+2031 PER TEN THOUSAND SIGN +% U+2032 PRIME +% U+2033 DOUBLE PRIME +% U+2034 TRIPLE PRIME +% U+2035 REVERSED PRIME +% U+2036 REVERSED DOUBLE PRIME +% U+2037 REVERSED TRIPLE PRIME +% U+2038 CARET +% U+2039 SINGLE LEFT-POINTING ANGLE QUOTATION MARK +% U+203A SINGLE RIGHT-POINTING ANGLE QUOTATION MARK +% U+203B REFERENCE MARK +% U+203C DOUBLE EXCLAMATION MARK +% U+203D INTERROBANG +% U+203E OVERLINE +% U+203F UNDERTIE +% U+2040 CHARACTER TIE +% U+2041 CARET INSERTION POINT +% U+2042 ASTERISM +% U+2043 HYPHEN BULLET +% U+2044 FRACTION SLASH +% U+2045 LEFT SQUARE BRACKET WITH QUILL +% U+2046 RIGHT SQUARE BRACKET WITH QUILL +% U+2047 DOUBLE QUESTION MARK +% U+2048 QUESTION EXCLAMATION MARK +% U+2049 EXCLAMATION QUESTION MARK +% U+204A TIRONIAN SIGN ET +% U+204B REVERSED PILCROW SIGN +% U+204C BLACK LEFTWARDS BULLET +% U+204D BLACK RIGHTWARDS BULLET +% U+204E LOW ASTERISK +% U+204F REVERSED SEMICOLON +% U+2050 CLOSE UP +% U+2051 TWO ASTERISKS ALIGNED VERTICALLY +% U+2052 COMMERCIAL MINUS SIGN +% U+2053 SWUNG DASH +% U+2054 INVERTED UNDERTIE +% U+2057 QUADRUPLE PRIME +% U+205F MEDIUM MATHEMATICAL SPACE +% U+2060 WORD JOINER +% U+2061 FUNCTION APPLICATION +% U+2062 INVISIBLE TIMES +% U+2063 INVISIBLE SEPARATOR +% U+206A INHIBIT SYMMETRIC SWAPPING +% U+206B ACTIVATE SYMMETRIC SWAPPING +% U+206C INHIBIT ARABIC FORM SHAPING +% U+206D ACTIVATE ARABIC FORM SHAPING +% U+206E NATIONAL DIGIT SHAPES +% U+206F NOMINAL DIGIT SHAPES \startunicodevector 32 - \ifcase\numexpr(#1-19) - \strippedcsname \endash \or - \strippedcsname \emdash \or - \strippedcsname \unknownchar \or - \strippedcsname \unknownchar \or - \strippedcsname \unknownchar \or - \strippedcsname \quoteleft \or - \strippedcsname \quoteright \or + \ifcase\numexpr(#1) + \strippedcsname \enspace \or % U+2000 EN QUAD + \strippedcsname \emspace \or % U+2001 EM QUAD + \strippedcsname \enspace \or % U+2002 EN SPACE + \strippedcsname \emspace \or % U+2003 EM SPACE + \strippedcsname \unknownchar \or % U+2004 THREE-PER-EM SPACE + \strippedcsname \unknownchar \or % U+2005 FOUR-PER-EM SPACE + \strippedcsname \unknownchar \or % U+2006 SIX-PER-EM SPACE + \strippedcsname \unknownchar \or % U+2007 FIGURE SPACE + \strippedcsname \unknownchar \or % U+2008 PUNCTUATION SPACE + \strippedcsname \unknownchar \or % U+2009 THIN SPACE + \strippedcsname \unknownchar \or % U+200A HAIR SPACE + \strippedcsname \unknownchar \or % U+200B ZERO WIDTH SPACE + \strippedcsname \unknownchar \or % U+200C ZERO WIDTH NON-JOINER + \strippedcsname \unknownchar \or % U+200D ZERO WIDTH JOINER + \strippedcsname \unknownchar \or % U+200E LEFT-TO-RIGHT MARK + \strippedcsname \unknownchar \or % U+200F RIGHT-TO-LEFT MARK + \strippedcsname \unknownchar \or % U+2010 HYPHEN + \strippedcsname \unknownchar \or % U+2011 NON-BREAKING HYPHEN + \strippedcsname \unknownchar \or % U+2012 FIGURE DASH + % \ifcase\numexpr(#1-19) + \strippedcsname \endash \or % U+2013 EN DASH + \strippedcsname \emdash \or % U+2014 EM DASH + \strippedcsname \unknownchar \or % U+2015 HORIZONTAL BAR + \strippedcsname \unknownchar \or % U+2016 DOUBLE VERTICAL LINE + \strippedcsname \unknownchar \or % U+2017 DOUBLE LOW LINE + \strippedcsname \quoteleft \or + \strippedcsname \quoteright \or \strippedcsname \quotesinglebase \or - \strippedcsname \unknownchar \or - \strippedcsname \quotedblleft \or - \strippedcsname \quotedblright \or - \strippedcsname \quotedblbase \or - \strippedcsname \unknownchar \or - \strippedcsname \textdag \or + \strippedcsname \unknownchar \or + \strippedcsname \quotedblleft \or + \strippedcsname \quotedblright \or + \strippedcsname \quotedblbase \or + \strippedcsname \unknownchar \or + \strippedcsname \textdag \or \strippedcsname \textddag \or \strippedcsname \textbullet \or - \strippedcsname \unknownchar \or - \strippedcsname \unknownchar \or - \strippedcsname \unknownchar \or + \strippedcsname \unknownchar \or + \strippedcsname \unknownchar \or + \strippedcsname \unknownchar \or \strippedcsname \textellipsis \else \ifcase\numexpr(#1-48) - \strippedcsname \perthousand \else + \strippedcsname \perthousand \or % U+2030 PER MILLE SIGN + \strippedcsname \unknownchar \or % U+2031 PER TEN THOUSAND SIGN + \strippedcsname \prime \or % U+2032 PRIME + \strippedcsname \doubleprime \or % U+2033 DOUBLE PRIME + \strippedcsname \tripleprime \else % U+2034 TRIPLE PRIME \ifcase\numexpr(#1-57) \strippedcsname \unknownchar \or % SINGLE LEFT-POINTING ANGLE QUOTATION MARK \strippedcsname \unknownchar \else % SINGLE RIGHT-POINTING ANGLE QUOTATION MARK \ifcase\numexpr(#1-172) - \strippedcsname \texteuro \else + \strippedcsname \texteuro \else \strippedcsname \unknownchar \fi\fi\fi\fi \stopunicodevector -\protect \endinput +\protect \endinput diff --git a/tex/context/base/unic-exp.tex b/tex/context/base/unic-exp.tex index a6d39ea78..1f60cb99c 100644 --- a/tex/context/base/unic-exp.tex +++ b/tex/context/base/unic-exp.tex @@ -68,4 +68,4 @@ \expandunivector[0,1,2,32,33] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/unic-ini.tex b/tex/context/base/unic-ini.tex index 00c8f85d2..8125bab2d 100644 --- a/tex/context/base/unic-ini.tex +++ b/tex/context/base/unic-ini.tex @@ -28,12 +28,12 @@ %D macros below deal with conversions. Thanks to Taco for %D providing the following conversion rules. %D -%D \starttabulatie[|c|c|c|c|c|] +%D \starttabulate[|c|c|c|c|c|] %D \NC $b_1$ \NC $b_2$ \NC $b_3$ \NC $b_4$ \NC unicode \NC \NR %D \NC192---223\NC128---191\NC \NC \NC 0x80---0x7FF \NC \NR %D \NC224---239\NC128---191\NC128---191\NC \NC 0x800---0xFFFF \NC \NR %D \NC240---247\NC128---191\NC128---191\NC128---191\NC0x10000---0x1FFFF\NC \NR -%D \stoptabulatie +%D \stoptabulate %D %D In \UTF-8 the characters in the range 128---191 are illegal %D as first characters. The characters 254 and 255 are @@ -43,12 +43,12 @@ %D The unicode number for an \UTF-8 sequence can be calculated %D as follows: %D -%D \starttabulatie[|mc|m|mc|m|mc|m|mc|m|] +%D \starttabulate[|mc|m|mc|m|mc|m|mc|m|] %D \NC b_1 \NC \NC \NC \NC \NC \NC \NC if b_1<=127\NC \NR %D \NC 64(b_1-192)\NC+\NC (b_2-128)\NC \NC \NC \NC \NC if 192<=b1<=223\NC \NR %D \NC 4096(b_1-224)\NC+\NC 64(b_2-128)\NC+\NC (b_3-128)\NC \NC \NC if 224<=b1<=239\NC \NR %D \NC262144(b_1-240)\NC+\NC4096(b_2-128)\NC+\NC64(b_3-128)\NC+\NC(b_4-128)\NC if 240<=b1<=247\NC \NR -%D \stoptabulatie +%D \stoptabulate %D %D A lot of information abou tunicode can be found on the %D web (search for Markus Kuhn and unicode and you'll @@ -58,7 +58,7 @@ %D We need the \type {`} in order to turn a character into a %D number. %D -%D \starttypen +%D \starttyping %D \def\utftwounicode#1#2% %D {\number\numexpr (64*(\numexpr (#1-192))+% %D (\numexpr(`#2-128)))} @@ -73,7 +73,7 @@ %D 4096*(\numexpr(`#1-128))+ %D 64*(\numexpr(`#2-128))+% %D (\numexpr(`#3-128)))} -%D \stoptypen +%D \stoptyping %D %D When we map the unicode number on one of the 256 char wide %D unicode tables, we need to do a bit of div and mod. Watch @@ -84,10 +84,10 @@ %D also makes it possible to avoid scratch counters, so that we %D get fast and fully expandable conversions. %D -%D \starttypen +%D \starttyping %D \def\utfdiv#1{\number\numexpr((#1-128)/256)} %D \def\utfmod#1{\number\numexpr((#1)-(256*(\utfdiv{#1})))} -%D \stoptypen +%D \stoptyping %D %D So far for the readable alternatives. When using \type %D {\numexpr} you should be aware of rather unexpected look @@ -109,7 +109,7 @@ %D The definitions now become: %D -%D \starttypen +%D \starttyping %D \def\utftwounicode#1#2% %D {\number\numexpr(\utf@a*(\numexpr (#1-\utf@d))+% %D (\numexpr(`#2-\utf@g)))} @@ -124,18 +124,18 @@ %D \utf@b*(\numexpr(`#2-\utf@g))+ %D \utf@a*(\numexpr(`#3-\utf@g))+% %D (\numexpr(`#4-\utf@g)))} -%D \stoptypen +%D \stoptyping %D %D And: %D -%D \starttypen +%D \starttyping %D \def\utfdiv#1{\number\numexpr((#1-\utf@g)/\utf@h)} %D \def\utfmod#1{\number\numexpr((#1)-(\utf@h*(\utfdiv{#1})))} -%D \stoptypen +%D \stoptyping %D %D Depending on the usage, you can rely on parenthesis only: %D -%D \starttypen +%D \starttyping %D \def\utftwounicode#1#2% %D {\numexpr(\utf@a*(#1-\utf@d)+% %D `#2-\utf@g)} @@ -150,7 +150,7 @@ %D \utf@b*(`#2-\utf@g)+% %D \utf@a*(`#3-\utf@g)+% %D `#4-\utf@g)} -%D \stoptypen +%D \stoptyping \def\utfdiv#1{\number\numexpr((#1-\utf@g)/\utf@h)} \def\utfmod#1{\number\numexpr(#1-\utf@h*((#1-\utf@g)/\utf@h))} @@ -163,7 +163,7 @@ %D a few handlers. They all call the general \type %D {\unicodechar} conversion macro. %D -%D \starttypen +%D \starttyping %D \def\utftwouniglph#1#2% %D {\unicodechar{\utftwounicode {#1}{#2}}} %D @@ -172,13 +172,13 @@ %D %D \def\utffouruniglph#1#2#3#4% %D {\unicodechar{\utffourunicode {#1}{#2}{#3}{#4}}} -%D \stoptypen +%D \stoptyping %D %D Because the unicode number is used a few times per %D conversion, we can expand it once (\type {\the} and \type %D {\number} make sure of this). This saves us another 10\%. %D -%D \starttypen +%D \starttyping %D \def\utftwouniglph#1#2% %D {\@EA\unicodechar\@EA{\the\utftwounicode{#1}{#2}}} %D @@ -187,7 +187,7 @@ %D %D \def\utffouruniglph#1#2#3#4% %D {\@EA\unicodechar\@EA{\the\utffourunicode{#1}{#2}{#3}{#4}}} -%D \stoptypen +%D \stoptyping %D %D We can rewrite these macros to faster alternatives: the %D less arguments we pass, the faster the conversion will be, @@ -229,7 +229,7 @@ %D \def\TraceUnic#1% %D {\chardef\utfunicodetracer#1\relax\enableregime[utf]Å°} %D -%D \starttabulatie[|c|c|c|c|c|c|] +%D \starttabulate[|c|c|c|c|c|c|] %D \NC option \NC number\NC mapping\NC glyph\NC string\NC example \NC \NR %D \NC 0 \NC \NC \NC \star\NC \NC \TraceUnic0\NC \NR %D \NC 1 \NC \star \NC \NC \NC \NC \TraceUnic1\NC \NR @@ -241,7 +241,7 @@ %D \NC 7 \NC \NC \NC \NC \star \NC \TraceUnic7\NC \NR %D \NC 8 \NC \star \NC \NC \NC \NC \TraceUnic8\NC \NR %D \NC otherwise\NC \NC \NC \star\NC \NC \TraceUnic9\NC \NR -%D \stoptabulatie +%D \stoptabulate %D \macros %D {unicodechar} @@ -291,25 +291,18 @@ %D problems; somehow \type {\numexpr} cannot look beyond this %D sign, and expects a number. -\def\utfunichar #1% - {{\tttf U\low{\unicodenumber{#1}}}} - -\def\utfunisplit#1% - {{\tttf U\low{\unicodepair{#1}}}} - -\def\utfuniboth #1% - {{\tttf U\low{\unicodenumber{#1\relax}->\unicodepair{#1}}}} - -\def\utfunientity #1% - {{\tttf\&\#\unicodehexnumber{#1};}} +\def\utfunichar #1{{\tttf U\low{\unicodenumber{#1}}}} +\def\utfunisplit #1{{\tttf U\low{\unicodepair{#1}}}} +\def\utfuniboth #1{{\tttf U\low{\unicodenumber{#1\relax}->\unicodepair{#1}}}} +\def\utfunientity #1{{\tttf\&\#\unicodehexnumber{#1};}} %D The character itself is accessed and typeset by: %D -%D \starttypen +%D \starttyping %D \def\utfunihash#1% %D {\executeifdefined{\@@univector\utfdiv{#1}}% %D \gobbleoneargument{\utfmod{#1}}} -%D \stoptypen +%D \stoptyping %D %D Again, we can provide a faster alternative, because inside %D the conditional executer, the argument is expanded twice, @@ -318,16 +311,16 @@ %D forehand. Just to remind you: \type {#1} is the \UNICODE\ %D number. %D -%D \starttypen +%D \starttyping %D \def\utfunihash#1% %D {\@EA\executeifdefined\@EA{\@EA\@@univector\number\utfdiv{#1}}% %D {\unknownchar\gobbleoneargument}{\utfmod{#1}}} -%D \stoptypen +%D \stoptyping %D %D In order to save calculation time, I decided to change %D this definition into: -%D \starttypen +%D \starttyping %D \def\utfunihash#1% %D {\@EA\doutfunihash\@EA{\number\utfdiv{#1}}{#1}} %D @@ -337,11 +330,11 @@ %D \else %D \unknownchar %D \fi} -%D \stoptypen +%D \stoptyping %D %D Or leaner and meaner: %D -%D \starttypen +%D \starttyping %D \def\doutfunihash#1#2% %D {\csname %D \ifcsname\@@univector\number#1\endcsname @@ -350,7 +343,7 @@ %D \@@unknownchar %D \fi %D \endcsname} -%D \stoptypen +%D \stoptyping %D %D And finaly it became: @@ -431,7 +424,7 @@ %D inside the name constructor, we prevent problems with %D partial expansion in macros and special cases. %D -%D \starttypen +%D \starttyping %D \startunicodevector 0 %D \ifcase\numexpr(#1-159)\or %D \@@unknownchar\or % NO-BREAK SPACE @@ -441,7 +434,7 @@ %D \@@unknowncharacter %D \fi %D \stopunicodevector -%D \stoptypen +%D \stoptyping %D %D In vector \type {unix-000} you will find another %D optimizations. By using as less tokens as possible, we limit @@ -554,4 +547,4 @@ \useunicodevector[0,1,2,32,33] \useregime[utf] -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex index 617a9314e..fb6a9ed6e 100644 --- a/tex/context/base/verb-ini.tex +++ b/tex/context/base/verb-ini.tex @@ -58,18 +58,18 @@ %D verbatim mode with some strange active character, we will %D use the following construction for display verbatim: %D -%D \starttypen +%D \starttyping %D \starttyping %D The Dutch word 'typen' stands for 'typing', therefore in the Dutch version %D one will not find the word 'verbatim'. %D \stoptyping -%D \stoptypen +%D \stoptyping %D %D In \CONTEXT\ files can be typed with \type{\typefile} and %D inline verbatim can be accomplished with \type{\type}. This %D last command comes in many flavors: %D -%D \starttypen +%D \starttyping %D We can say \type<> or \type{something}. The first one is a bit %D longer but also supports slanted typing, which accomplished by typing %D \type<> word>>. We can also use commands to enhance the text @@ -77,7 +77,7 @@ %D to accept also \LaTeX\ alike verbatim, which means that \type+something+ %D and \type|something| are valid commands too. Of course we want the grouped %D alternatives to process \type{hello {\bf big} world} with braces. -%D \stoptypen +%D \stoptyping %D %D In the core modules, we will build this support on top of %D this module. There these commands can be tuned with @@ -220,25 +220,25 @@ %D braces are implemented in the core module. This commands %D takes one argument: the closing command. %D -%D \starttypen +%D \starttyping %D \processinlineverbatim{\closingcommand} -%D \stoptypen +%D \stoptyping %D %D One can define his own verbatim commands, which can be very %D simple: %D -%D \starttypen +%D \starttyping %D \def\Verbatim {\processinlineverbatim\relax} -%D \stoptypen +%D \stoptyping %D %D or a bit more more complex: %D -%D \starttypen +%D \starttyping %D \def\GroupedVerbatim% %D {\bgroup %D \dosomeusefullthings %D \processinlineverbatim\egroup} -%D \stoptypen +%D \stoptyping %D %D Before entering inline verbatim mode, we take care of the %D unwanted \TAB, \NEWLINE\ and \NEWPAGE\ characters and @@ -304,35 +304,35 @@ %D %D \bgroup %D -%D \def\doverbatimnobreak% +%D \def\doverbatimnobreak %D {\nobreak\hrule width 10cm\par\penalty500} % == \nobreak %D -%D \def\doverbatimgoodbreak% +%D \def\doverbatimgoodbreak %D {\nobreak\hrule width 3cm \par\penalty\linepenalty} %D -%D \starttypen +%D \starttyping %D test %D test -%D \stoptypen +%D \stoptyping %D %D or %D -%D \starttypen +%D \starttyping %D test %D test %D test %D test -%D \stoptypen +%D \stoptyping %D %D or %D -%D \starttypen +%D \starttyping %D test %D %D test %D test %D test -%D \stoptypen +%D \stoptyping %D %D \egroup %D @@ -424,9 +424,9 @@ %D By default the rest of the first line is ignored. We can %D turn this feature off by saying: %D -%D \starttypen +%D \starttyping %D \skipfirstverbatimlinefalse -%D \stoptypen +%D \stoptyping \newif\ifskipfirstverbatimline \skipfirstverbatimlinetrue @@ -436,22 +436,22 @@ %D We can define a display verbatim environment with the %D command \type{\processdisplayverbatim} in the following way: %D -%D \starttypen +%D \starttyping %D \processdisplayverbatim{\closingcommand} -%D \stoptypen +%D \stoptyping %D %D \noindent For instance, we can define a simple command like: %D -%D \starttypen +%D \starttyping %D \def\BeginVerbatim {\processdisplayverbatim{EndVerbatim}} -%D \stoptypen +%D \stoptyping %D %D \noindent But we can also do more advance things like: %D -%D \starttypen +%D \starttyping %D \def\BeginVerbatim {\bigskip \processdisplayverbatim{\EndVerbatim}} %D \def\EndVerbatim {\bigskip} -%D \stoptypen +%D \stoptyping %D %D When we compare these examples, we see that the backslash in %D the closing command is optional. One is free in actually @@ -686,10 +686,10 @@ %D %D The next alternative was okay when memory was still low. %D -%D \starttypen -%D \def\makeallother% +%D \starttyping +%D \def\makeallother %D {\dorecurse{255}{\catcode\recurselevel=\@@other}} -%D \stoptypen +%D \stoptyping %D %D Today we prebuild a token list: @@ -798,9 +798,9 @@ %D them into vertical skips. This default behavior can be %D overruled by: %D -%D \starttypen +%D \starttyping %D \obeyemptylines -%D \stoptypen +%D \stoptyping %D %D Although it would cost us only a few lines of code, we %D decided not to take care of multiple empty lines. When a @@ -947,9 +947,9 @@ %D look for \EOF\ and when we've met, we make sure it does not %D turn into an empty line. %D -%D \starttypen +%D \starttyping %D \processfileverbatim{filename} -%D \stoptypen +%D \stoptyping %D %D We reserve a dedicated file handle. @@ -1052,10 +1052,10 @@ %D The following two macros can be set to achieve special %D effects, like: %D -%D \starttypen +%D \starttyping %D \convertargument\StartFake{something}\to\firstverbatimfileline %D \convertargument\StopFake\to\firstverbatimfileline -%D \stoptypen +%D \stoptyping %D %D These hooks were needed for typesetting flowchart %D definitions verbatim, since the temporary files does not @@ -1099,9 +1099,9 @@ %D The first step in defining a pretty interpreter is to assign %D each character that needs special attention a number, like: %D -%D \starttypen +%D \starttyping %D \setpretty \`A 21 -%D \stoptypen +%D \stoptyping %D %D Here the macro \type{\setpretty} makes the character %D \type{A} active, and sets it meaning to the auxiliary macro @@ -1128,18 +1128,18 @@ %D This interpreter is installed by saying %D -%D \starttypen +%D \starttyping %D \installprettyhandler 21 \SOMEprettyone -%D \stoptypen +%D \stoptyping \def\installprettyhandler#1 #2% {\letvalue{\!!PRETTY#1}#2} %D Such an interpreter gets the character number: %D -%D \starttypen +%D \starttyping %D \def\SOMEprettyone#1{...\getpretty{#1}...} -%D \stoptypen +%D \stoptyping %D %D where \type{\getpretty} equals \type{\char}. We can't %D use \type{\let} here because we have to get rid of the @@ -1177,7 +1177,7 @@ %D \type{\newpretty} and its associates. %D %D \bgroup -%D \steltypenin[file][optie=tex,palet=colorpretty] +%D \setuptyping[file][optionoptie=tex,paletpalet=colorpretty] %D %D \startbuffer %D \bgroup @@ -1225,7 +1225,7 @@ %D \installnewpretty b \blue %D \stopbuffer %D -%D \haalbuffer[pretty] +%D \getbuffer[pretty] %D %D \startbuffer %D %%\ r{Red @@ -1318,6 +1318,12 @@ \newif\ifnaturaltextext +% \starttyping +% test /naturaltextext\hpos{word}{test}/relax test +% \stoptyping +% +% \MPxy{word} + \beginETEX \scantokens %\def\naturaltextext#1#2\relax @@ -1328,6 +1334,14 @@ \prettynaturalfont{\restorecatcodes\scantokens{\ignorespaces#1}}% \egroup} +\def\naturaltextext#1\relax + {\bgroup + \def\ascii{#1}% + \setnormalcatcodes + \restorecatcodes + \prettynaturalfont{\scantokens\expandafter{\ascii}\ifhmode\unskip\fi}% + \egroup} + \endETEX \beginTEX @@ -1348,7 +1362,7 @@ %D \stopTEX %D \stopbuffer %D -%D \haalbuffer +%D \getbuffer %D %D This is keyed in as: %D @@ -1383,10 +1397,10 @@ %D When implementing new pretty macros, one only needs to %D define something like: %D -%D \starttypen +%D \starttyping %D \def\TEXtypezero% %D {\handlenewpretty\TEXtypethree} -%D \stoptypen +%D \stoptyping %D %D Here the number states the category (in our examples the %D backslash). The second argument takes care of normal @@ -1479,10 +1493,10 @@ %D The \PERL\ and \METAPOST\ interpreters will also handle %D reserved words. Sets of identifiers are defined like: %D -%D \starttypen +%D \starttyping %D \useprettyidentifiers \MODULAidentifiers \MODULAsetspecials %D if then else elsif case while do repeat until ... -%D \stoptypen +%D \stoptyping %D %D New entries can be added to existing sets by repeatedly %D using this command. @@ -1521,12 +1535,12 @@ %D repetitive loading, one should load the modules before the %D first call to the macros. %D -%D \starttypen +%D \starttyping %D \input verb-tex.tex %D \input verb-pl.tex %D \input verb-mp.tex %D \input verb-jv.tex -%D \stoptypen +%D \stoptyping %D %D In \CONTEXT\ we follow a different thread, and therefore all %D macros in the additional modules use \type {\gdef}'s and @@ -1594,7 +1608,7 @@ %D text and files verbatim. The inline alternative also accepts %D user supplied delimiters. %D -%D \starttypen +%D \starttyping %D \type{text} %D %D \starttyping @@ -1602,15 +1616,15 @@ %D \stoptyping %D %D \typefile{filename} -%D \stoptypen +%D \stoptyping %D %D We can turn on the options by: %D -%D \starttypen +%D \starttyping %D \controlspacetrue %D \verbatimtabstrue %D \prettyverbatimtrue -%D \stoptypen +%D \stoptyping %D %D Here is the implementation: @@ -1650,18 +1664,18 @@ %D In \CONTEXT\ users say things like: %D -%D \starttypen +%D \starttyping %D \definetyping [TEX] [option=TEX] %D \definetyping [MP] [option=MP] %D \definetyping [PL] [option=PL] %D \definetyping [JV] [option=JV] -%D \stoptypen +%D \stoptyping %D %D or %D -%D \starttypen +%D \starttyping %D \setuptyping[file][option=color] -%D \stoptypen +%D \stoptyping %D %D That way \CONTEXT\ selects the appropriate interpreter %D itself, but more on that in another module. In other @@ -1752,19 +1766,19 @@ %D the verbatim part of the text was typeset with the following %D commands for the examples: %D -%D \starttypen -%D \def\starttypen% We simplify the \ConTeXt\ macro. +%D \starttyping +%D \def\starttyping% We simplify the \ConTeXt\ macro. %D {\bgroup %D \everypar{} % We disable some troublesome mechanisms. %D \advance\leftskip by 1em -%D \processdisplayverbatim{\stoptypen}} +%D \processdisplayverbatim{\stoptyping}} %D -%D \let\stoptypen=\egroup -%D \stoptypen +%D \let\stoptyping=\egroup +%D \stoptyping %D %D We also used: %D -%D \starttypen +%D \starttyping %D \def\startdefinition% %D {\bgroup %D \everypar{} % Again we disable some troublesome mechanisms. @@ -1776,13 +1790,13 @@ %D %D \def\stopdefinition% %D {\egroup} -%D \stoptypen +%D \stoptyping %D %D And because we have both \type{\EveryPar} and %D \type{\EveryLine} available, we can implement a dual %D numbering mechanism: %D -%D \starttypen +%D \starttyping %D \newcount\paragraphcounter %D \newcount\linecounter %D @@ -1805,20 +1819,20 @@ %D \hss \the\linecounter}% %D \egroup %D \hskip1em}} -%D \stoptypen +%D \stoptyping %D %D One may have noticed that the \type{\EveryPar} is only %D executed once, because we consider each piece of verbatim %D as one paragraph. When one wants to take the empty lines %D into account, the following assignments are appropriate: %D -%D \starttypen +%D \starttyping %D \EveryLine %D {\iflinepar %D \showparagraphcounter %D \fi %D \showlinecounter} -%D \stoptypen +%D \stoptyping %D %D In this case, nothing has to be assigned to \type{\EveryPar}, %D maybe except of just another extra numbering scheme. The @@ -1834,49 +1848,49 @@ %D %D Now let's summarize the most important commands. %D -%D \starttypen +%D \starttyping %D \processinlineverbatim{\closingcommand} %D \processdisplayverbatim{\closingcommand} %D \processfileverbatim{filename} -%D \stoptypen +%D \stoptyping %D %D We can satisfy our own specific needs with the following %D interfacing macro's: %D -%D \starttypen +%D \starttyping %D \obeyspaces \obeytabs \obeylines \obeypages \obeycharacters -%D \stoptypen +%D \stoptyping %D %D We can influence the verbatim environment with the following %D macro: %D -%D \starttypen +%D \starttyping %D \obeyemptylines -%D \stoptypen +%D \stoptyping %D %D Some needs are fulfilled already with: %D -%D \starttypen +%D \starttyping %D \setcontrolspace \settabskips -%D \stoptypen +%D \stoptyping %D %D lines can be enhanced with ornaments using: %D -%D \starttypen +%D \starttyping %D \everypar \everyline \iflinepar -%D \stoptypen +%D \stoptyping %D %D and pretty verbatim support is implemented by: %D -%D \starttypen +%D \starttyping %D \beginofpretty[#1] ... \endofpretty -%D \stoptypen +%D \stoptyping %D %D and some setup macro, like: %D -%D \starttypen +%D \starttyping %D \setupprettyIDENTIFIERtype -%D \stoptypen +%D \stoptyping %D %D The color support macro can be redefined by the user. The %D parameter \type{#1} can be one of the four 'fixed' @@ -1886,9 +1900,9 @@ %D using \type{specials}. One can toggle between color and %D grayscale with: %D -%D \starttypen +%D \starttyping %D \setgrayverbatim \setcolorverbatim -%D \stoptypen +%D \stoptyping %D \macros %D {permitshiftedendofverbatim} diff --git a/tex/context/base/verb-pas.tex b/tex/context/base/verb-pas.tex index 4b9698022..b7b041700 100644 --- a/tex/context/base/verb-pas.tex +++ b/tex/context/base/verb-pas.tex @@ -5,11 +5,11 @@ %D subtitle=Pretty \PASCAL\ and \MODULA\ Verbatim, %D author=Berend de Boer, %D date=\currentdate, -%D copyright={Berend de Boer \& Hans Hagen] +%D copyright={Berend de Boer \& Hans Hagen}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. % This module will be cleaned up a bit in the process of more % flexible verbatim options. @@ -21,20 +21,20 @@ %D \startbuffer %D \startPAS %D program Hello; -%D +%D %D begin %D writeln('hello world.'); %D end. %D \stopPAS -%D \stopbuffer +%D \stopbuffer %D -%D Berend's preferences: +%D Berend's preferences: %D %D \startbuffer[setup] %D \setuptyping %D [DELPHI] %D [palet=,icommand=\bf,vcommand=,ccommand=\it] -%D \stopbuffer +%D \stopbuffer \ifx\undefined\setupprettyPLtype \input verb-pl \relax \fi @@ -50,7 +50,7 @@ \setpretty`\#=32 \setpretty`\%=41 \setpretty`\:=41 - \setpretty`\/=43 + \setpretty`\/=43 \setpretty`\*=44 \setpretty`\{=45 \setpretty`\}=46 } @@ -65,7 +65,7 @@ {\PLsetcontrols \def\flushrestofverbatimline% {\endPLtypesix - \ifinPASslashslashcomment + \ifinPASslashslashcomment \PASstopslashslashcomment \fi \PLverbosefalse @@ -219,7 +219,7 @@ \useprettyidentifiers \PASidentifiers \PASsetspecials forward - + % Extended Pascal keywords (ISO/IEC 10206) \useprettyidentifiers \PASidentifiers \PASsetspecials @@ -240,13 +240,13 @@ % Object Pascal directives (draft September 20, 1993) \useprettyidentifiers \PASidentifiers \PASsetspecials - override + override % Delphi keywords \useprettyidentifiers \PASidentifiers \PASsetspecials - as asm dispinterface except exports finalization finally - initialization inline library object out raise resourcestring + as asm dispinterface except exports finalization finally + initialization inline library object out raise resourcestring shl shr string threadvar try unit uses xor % Delphi directives @@ -255,12 +255,12 @@ \useprettyidentifiers \PASidentifiers \PASsetspecials absolute assembler automated cdecl contains default dispid - dynamic external far implements index message name near - nodefault overload override package pascal private protected - public published readonly register reintroduce requires - resident safecall stdcall stored virtual writeonly + dynamic external far implements index message name near + nodefault overload override package pascal private protected + public published readonly register reintroduce requires + resident safecall stdcall stored virtual writeonly \useprettyidentifiers \PASvariables \PASsetspecials not-yet-defined -\protect \endinput +\protect \endinput diff --git a/tex/context/base/verb-sql.tex b/tex/context/base/verb-sql.tex index 59218dc59..555ba304b 100644 --- a/tex/context/base/verb-sql.tex +++ b/tex/context/base/verb-sql.tex @@ -13,8 +13,8 @@ \writestatus{loading}{Context Support Macros / Pretty SQL Verbatim} -%D \citaat {He, I want pretty pretting too!}, Berend cried out -%D one day, \citaat {But now for \SQL.}. This query language +%D \quotation {He, I want pretty pretting too!}, Berend cried out +%D one day, \quotation {But now for \SQL.}. This query language %D shows code like: %D %D \startbuffer @@ -29,18 +29,18 @@ %D %D and this should become something pretty like: %D -%D \haalbuffer +%D \getbuffer %D %D or, with Berend's preferences: %D %D \startbuffer[setup] -%D \steltypenin +%D \setuptyping %D [SQL] -%D [tekst=ja,palet=,icommando=\bf,vcommando=,ccommando=\it] +%D [text=yes,palet=,icommand=\bf,vcommand=,ccommand=\it] %D \stopbuffer %D -%D \haalbuffer[setup] -%D \haalbuffer +%D \getbuffer[setup] +%D \getbuffer %D %D This kind of pretty printing is accomplished by: %D diff --git a/tex/context/base/verb-tex.tex b/tex/context/base/verb-tex.tex index 0ccf1e218..431703c2a 100644 --- a/tex/context/base/verb-tex.tex +++ b/tex/context/base/verb-tex.tex @@ -18,7 +18,7 @@ %D natural and less complicated. %D \startTEX -%D \definetyping[niceTEX][option=TEX,palet=graypretty] +%D \definetyping[niceTEX][option=TEX,paletpalet=graypretty] %D %D \startniceTEX %D \message{A vivid look at TeX} @@ -58,10 +58,10 @@ %D We use a maximum of four colors because more colors will %D distract too much. In the following table we show the -%D logical names of the colors, their color and \kap{RGB} values. +%D logical names of the colors, their color and \cap{RGB} values. %D -%D \plaatstabel{geen} -%D \starttabel[|l|l|c|c|c|c|] +%D \placetable{geen} +%D \starttable[|l|l|c|c|c|c|] %D \HL %D \FC\bf identifier \MC\bf color \MC\bf r \MC\bf g \MC\bf b \MC\bf bw \LC\SR %D \HL @@ -70,7 +70,7 @@ %D \FC prettythree \MC yellow \MC 0.0 \MC 0.0 \MC 0.9 \MC 0.60 \LC\MR %D \FC prettyfour \MC blue \MC 0.8 \MC 0.8 \MC 0.6 \MC 0.75 \LC\LR %D \HL -%D \stoptabel +%D \stoptable %D %D Outside \CONTEXT\ these colors are defined in %D \type{verb-ini}, in \CONTEXT\ their definitions can be found diff --git a/tex/context/base/verb-xml.tex b/tex/context/base/verb-xml.tex index 52304fc53..adf2f4c30 100644 --- a/tex/context/base/verb-xml.tex +++ b/tex/context/base/verb-xml.tex @@ -55,7 +55,7 @@ %D [margin=1cm, %D before={\switchtobodyfont[9pt]\blank[medium]}, %D after={\switchtobodyfont[11pt]\blank[medium]}, -%D letter=\ss] +%D style=\ss] %D \ifx\XMLlinebreak\undefined diff --git a/tex/context/base/x-chemml.tex b/tex/context/base/x-chemml.tex index 8475fe81a..68b52cdd1 100644 --- a/tex/context/base/x-chemml.tex +++ b/tex/context/base/x-chemml.tex @@ -2,19 +2,19 @@ %D [ file=m-chemml, %D version=2001.09.12, %D title=\CONTEXT\ XML Modules, -%D subtitle=Loading \CHEMML\ Filters, +%D subtitle=Loading CHEMML Filters, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA ADE / 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. -\useXMLfilter[cml] +\useXMLfilter[cml] -%D Structural formulas are codes in a \PPCHTEX\ way; this -%D will change -) +%D Structural formulas are codes in a \PPCHTEX\ way; this +%D will change -) %D %D \startbuffer %D @@ -60,23 +60,23 @@ %D %D \typebuffer -% \ifx\XMLgtoks\undefined \newtoks\XMLgtoks \fi -% \ifx\XMLttoks\undefined \newtoks\XMLttoks \fi -% +% \ifx\XMLgtoks\undefined \newtoks\XMLgtoks \fi +% \ifx\XMLttoks\undefined \newtoks\XMLttoks \fi +% % \defineXMLenvironment [structure] % {\startchemical\ignorespaces} % {\relax\stopchemical} -% -% \def\chemicalXMLg#1% \defineXMLcollect [graphic] \XMLgtoks +% +% \def\chemicalXMLg#1% \defineXMLcollect [graphic] \XMLgtoks % {\doifelsenothing{\the\XMLgtoks} % {\doglobal\appendtoks #1\to\XMLgtoks\ignorespaces} % {\doglobal\appendtoks,#1\to\XMLgtoks\ignorespaces}} -% +% % \def\chemicalXMLt#1% % {\doifelsenothing{\the\XMLttoks} % {\doglobal\appendtoks #1\to\XMLttoks\ignorespaces} % {\doglobal\appendtoks,#1\to\XMLttoks\ignorespaces}} -% +% % \defineXMLenvironment [component] [type=] % {\global\XMLgtoks\emptytoks % \global\XMLttoks\emptytoks @@ -85,21 +85,21 @@ % \ignorespaces} % {\expanded{\chemical[\the\XMLgtoks][\the\XMLttoks]}% % \ignorespaces} -% -% \defineXMLargument [oxidation] [sign=,n=1] \chemicalXMLo % +/- 1..7 -% +% +% \defineXMLargument [oxidation] [sign=,n=1] \chemicalXMLo % +/- 1..7 +% % \def\chemicalXMLo#1% % {\expanded{\chemicalXMLt % {\noexpand\chemicaloxidation{\XMLop{sign}}{\XMLop{n}}{#1}}}% % \ignorespaces} -% -% \defineXMLenvironment [annotation] [location=] +% +% \defineXMLenvironment [annotation] [location=] % {\bgroup % \defineXMLenvironmentsave[text]{\ignorespaces}{\ignorespaces}% % \defineXMLenvironmentsave[caption]{\ignorespaces}{\ignorespaces}% % \ignorespaces} % {\scratchtoks{\chemicalright}% -% \processaction +% \processaction % [\XMLop{location}] % [ t=>\scratchtoks{\chemicaltop}, % b=>\scratchtoks{\chemicalbottom}, @@ -115,29 +115,29 @@ % lb=>\scratchtoks{\chemicalleftbottom}, % rt=>\scratchtoks{\chemicalrighttop}, % rb=>\scratchtoks{\chemicalrightbottom}, -% x=>\scratchtoks{\chemicaltighttext}, +% x=>\scratchtoks{\chemicaltighttext}, % sl=>\scratchtoks{\chemicalsmashedleft}, % sm=>\scratchtoks{\chemicalsmashedmiddle}, -% sr=>\scratchtoks{\chemicalsmashedright}]% +% sr=>\scratchtoks{\chemicalsmashedright}]% % \expanded{\chemicalXMLt % {\the\scratchtoks{\XMLflush{text}}{\XMLflush{caption}}}}% % \egroup % \ignorespaces} -% +% % \defineXMLenvironment [forever] -% {\chemicalXMLt{\[}\ignorespaces} -% {\chemicalXMLt{\]}\ignorespaces} +% {\chemicalXMLt{\[}\ignorespaces} +% {\chemicalXMLt{\]}\ignorespaces} -\ifx\XMLgtoks\undefined \newtoks\XMLgtoks \fi -\ifx\XMLttoks\undefined \newtoks\XMLttoks \fi +\ifx\XMLgtoks\undefined \newtoks\XMLgtoks \fi +\ifx\XMLttoks\undefined \newtoks\XMLttoks \fi \startXMLmapping [cml] -% this will be a more natural method; this also triggers it +% this will be a more natural method; this also triggers it -\installXMLunknownremapping +\installXMLunknownremapping -% extensions +% extensions \remapXMLsequence [structure] [CPA] \doCMLstructure \remapXMLsequence [component] [CPA] \doCMLcomponent @@ -152,7 +152,7 @@ \def\doCMLstructure#1#2% {\startchemical\ignorespaces#2\unskip\stopchemical} -\def\doCMLgraphic#1#2% +\def\doCMLgraphic#1#2% {\doifelsenothing{\the\XMLgtoks} {\uppercase{\doglobal\appendtoks #2\to\XMLgtoks\ignorespaces}} {\uppercase{\doglobal\appendtoks,#2\to\XMLgtoks\ignorespaces}}% @@ -173,11 +173,11 @@ \def\doCMLannotation#1#2% {\getXMLarguments{cml}{location="" #1}% - \def\dodoCMLannotation##1% + \def\dodoCMLannotation##1% {\doCMLtext\empty{##1% {\let\doCMLtext \secondoftwoarguments\processXMLRchild{text}{#2}}% {\let\doCMLcaption\unmapXMLdata \processXMLRchild{caption}{#2}}}}% - \processaction + \processaction [\XMLpar{cml}{location}{r}] [ t=>\dodoCMLannotation\chemicaltop, b=>\dodoCMLannotation\chemicalbottom, @@ -193,7 +193,7 @@ lb=>\dodoCMLannotation\chemicalleftbottom, rt=>\dodoCMLannotation\chemicalrighttop, rb=>\dodoCMLannotation\chemicalrightbottom, - x=>\dodoCMLannotation\chemicaltighttext, + x=>\dodoCMLannotation\chemicaltighttext, sl=>\dodoCMLannotation\chemicalsmashedleft, sm=>\dodoCMLannotation\chemicalsmashedmiddle, sr=>\dodoCMLannotation\chemicalsmashedright]% @@ -209,4 +209,4 @@ \stopXMLmapping -\endinput +\endinput diff --git a/tex/context/base/x-contml.tex b/tex/context/base/x-contml.tex index 328e1a4f0..9f3fe6fd2 100644 --- a/tex/context/base/x-contml.tex +++ b/tex/context/base/x-contml.tex @@ -97,7 +97,7 @@ %D %D \showelements [context] [references] -\defineXMLpickup [context:pageref] [label=] {\op} {[\XMLop{label}]} +\defineXMLpickup [context:pageref] [label=] {\at} {[\XMLop{label}]} \defineXMLpickup [context:textref] [label=] {\in} {[\XMLop{label}]} \defineXMLpickup [context:lineref] [label=] {\inline} {[\XMLop{label}]} @@ -201,10 +201,8 @@ \defineXMLenvironment [context:itemize] [type=,packed=] {\let\XMLoptions\empty - \doifsomethingXMLop{type} - {\addtocommalist{\XMLop{type}}\XMLoptions} - \doifXMLop{packed}{yes} - {\addtocommalist{packed}\XMLoptions} + \doifsomethingXMLop{type}{\addtocommalist{\XMLop{type}}\XMLoptions}% + \doifXMLop{packed}{yes}{\addtocommalist{packed}\XMLoptions}% \expanded{\startitemize[\XMLoptions]}} {\stopitemize} @@ -212,6 +210,28 @@ {\expanded{\item[\XMLop{label}]}} {\endgraf} +%D \elements {externalfigure} +%D +%D \startbuffer +%D The previous examples already demonstrated how we can include a graphic: +%D +%D +%D +%D +%D \stopbuffer +%D +%D \showelements [context] [externalfigure] + +\defineXMLsingular [context:externalfigure] [\??ef] [base=,label=,file=] + {\bgroup % \getXMLta \expandXMLta \expandXMLtp{file}% + \expandXMLta + \getXMLta % expand entities first + \doifelsenothing{\XMLtp{label}} + {\expanded{\externalfigure[\XMLtp{file}][\XMLta]}} + {\doifsomething{\XMLtp{base}}{\usefigurebase[\XMLtp{base}]}% + \expanded{\externalfigure[\XMLtp{label}][\XMLta]}} + \egroup} + %D \elements {fixed} %D %D \startbuffer @@ -236,12 +256,12 @@ {\bgroup \defineXMLsave[context:caption] \defineXMLsave[context:content]} - {\expanded{\startfixed[\XMLop{location}]} - \doifXMLdataelse{context:caption} - {\startcombination[1*1] - {\XMLflush{context:content}} {\XMLflush{context:caption}} - \stopcombination} - {\XMLflush{context:content}} + {\expanded{\startfixed[\XMLop{location}]}% + \doifXMLdataelse{context:caption} + {\startcombination[1*1] + {\XMLflush{context:content}} {\XMLflush{context:caption}} + \stopcombination} + {\XMLflush{context:content}}% \stopfixed \egroup} @@ -272,27 +292,6 @@ {\XMLflush{context:caption}} {\XMLflush{context:content}}} \egroup} -%D \elements {externalfigure} -%D -%D \startbuffer -%D The previous examples already demonstrated how we can include a graphic: -%D -%D -%D -%D -%D \stopbuffer -%D -%D \showelements [context] [externalfigure] - -\defineXMLsingular [context:externalfigure] [\??ef] [base=,label=,file=] - {\bgroup % \getXMLta \expandXMLta \expandXMLtp{file}% - \expandXMLta \getXMLta % expand entities first - \doifelsenothing{\XMLtp{label}} - {\expanded{\externalfigure[\XMLtp{file}][\XMLta]}} - {\doifsomething{\XMLtp{base}}{\usefigurebase[\XMLtp{base}]}% - \expanded{\externalfigure[\XMLtp{label}][\XMLta]}} - \egroup} - %D \elements {quotation,quote} %D %D \startbuffer @@ -390,12 +389,13 @@ \defineXMLsingular [context:tcell] [align=] {\appendtoks|\to\XMLtabtoks - \processaction - [\XMLop{align}] - [ left=>\appendtoks l\to\XMLtabtoks, - right=>\appendtoks r\to\XMLtabtoks, - center=>\appendtoks c\to\XMLtabtoks, - middle=>\appendtoks c\to\XMLtabtoks]} + \expanded{\processallactionsinset + [\XMLop{align}]} + [ paragraph=>\appendtoks p\to\XMLtabtoks, + left=>\appendtoks l\to\XMLtabtoks, + right=>\appendtoks r\to\XMLtabtoks, + center=>\appendtoks c\to\XMLtabtoks, + middle=>\appendtoks c\to\XMLtabtoks]} \defineXMLenvironment [context:tr] {\ignorespaces} {\NC\NR} \defineXMLenvironment [context:td] {\NC} {\ignorespaces} @@ -476,3 +476,5 @@ \defineXMLpickup [combinationcaption] {\appendtoks\bgroup}{\egroup\to\scratchtoks} + +\endinput diff --git a/tex/context/base/x-corres.tex b/tex/context/base/x-corres.tex index 259c07e95..09c7263dc 100644 --- a/tex/context/base/x-corres.tex +++ b/tex/context/base/x-corres.tex @@ -133,4 +133,4 @@ \processcommacommand[#1]\processXMLfile}% \egroup} -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/x-dir-01.tex b/tex/context/base/x-dir-01.tex index 7fc3f7983..b1056fdd5 100644 --- a/tex/context/base/x-dir-01.tex +++ b/tex/context/base/x-dir-01.tex @@ -1,4 +1,15 @@ -% interface=en +%D \module +%D [ file=x-dir-01, +%D version=2003.05.10, % around that time -) +%D title=\CONTEXT\ Directory Handling, +%D subtitle=Overview (1), +%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. \setuppapersize [S6][S6] @@ -131,4 +142,4 @@ \ifnum\NOfEntries=0 There are no files found that match the pattern. \fi -\stoptext \ No newline at end of file +\stoptext diff --git a/tex/context/base/x-fe.tex b/tex/context/base/x-fe.tex new file mode 100644 index 000000000..cc1be32c1 --- /dev/null +++ b/tex/context/base/x-fe.tex @@ -0,0 +1,118 @@ +%D \module +%D [ file=x-fe, +%D version=2004.03.12, % based on earlier experiments +%D title=\CONTEXT\ XML Modules, +%D subtitle=Formatting Objects Extensions, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE / 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 Extensions: fe:definecolor + +% menus +% extra areas +% protruding and hz +% compound +% title container +% more float placements + +\unprotect + +% \XMLattributes{aural}, + +\defineXMLnested + [fe:table-next] + [id=, + \XMLattributes{accessibility}, + \XMLattributes{border-padding-background}, + \XMLattributes{relative-position}, + border-after-precedence=, + border-before-precedence=, + border-end-precedence=, + border-start-precedence=, + visibility=] + {\bTABLEnext} + {\eTABLEnext} + +% definitions + +\defineXMLcommand + [fe:definecolor] + [name=,r=,g=,b=,c=,m=,y=,k=,s=,p=,a=,t=] + {\expanded{\definecolor[\XMLop{name}] + [r=\XMLop r,g=\XMLop g,b=\XMLop b, + c=\XMLop c,m=\XMLop m,y=\XMLop y,k=\XMLop k, + s=\XMLop s,p=\XMLop p,a=\XMLop a,t=\XMLop t]}} + +\defineXMLcommand + [fe:definefontsynonym] + [name=,file,encoding=] + {\doifelsenothing{\XMLop{encoding}} + {\expanded{\definefontsynonym[\XMLop{name}][\XMLop{file}][encoding=\XMLop{encoding}]}} + {\expanded{\definefontsynonym[\XMLop{name}][\XMLop{file}]}}} + +%D Extensions: fe:include + +\defineXMLsingular + [fe:include] + [url=,n=1] + {\doifelse{\XMLop{n}}{1} + {\readfile{\XMLpar{fe:include}{url}{}}{}{}} + {\dorecurse{\XMLop{n}}{\readfile{\XMLpar{fe:include}{url}{}}{}{}\endgraf}}} + +%D Extensions: fe:sample + +\defineXMLenvironment + [fe:sample] + [origin=unknown] + {\removeunwantedspaces\ignorespaces} + {\removeunwantedspaces} + +%D Extensions: fe: + +% \defineXMLenvironmentsave +% [fe:loop] +% [n=1] +% {} +% {\dorecurse{\XMLop{n}}{\XMLflush{fe:loop}}} + +\defineXMLargument + [fe:loop] + [n=1] + {\dorecurse{\XMLop{n}}} + +%D Extensions: fe:compound + +\defineXMLsingular + [fe:compound] + [character=-] + {\prewordbreak\XMLop{character}\prewordbreak} + +%D Extensions: fe:message + +\defineXMLargument + [fe:message] + {\writestatus{XML-FO}} + +%D Extensions: + +\startsetups fe:page:option:fit:start + \startTEXpage[margin=page] +\stopsetups + +\startsetups fe:page:option:fit:stop + \stopTEXpage +\stopsetups + +\mapXMLvalue {fe:tracing} {true} {\tracingFOtrue} +\mapXMLvalue {fe:tracing} {false} {\tracingFOfalse} + +\startsetups fe:setup + \XMLval{fe:tracing}{\XMLop{fe:tracing}}{} +\stopsetups + +\protect \endinput diff --git a/tex/context/base/x-fig-00.tex b/tex/context/base/x-fig-00.tex index 0afc6aea3..858d23bf3 100644 --- a/tex/context/base/x-fig-00.tex +++ b/tex/context/base/x-fig-00.tex @@ -23,7 +23,7 @@ %D %D A figure base coded this way looks like: %D -%D \starttypen +%D \starttyping %D %D %D @@ -50,28 +50,28 @@ %D
%D %D -%D \stoptypen +%D \stoptyping %D %D You can convert this base into a \PDF\ file using %D \TEXEXEC\ and another module in this suite. %D -%D \starttypen +%D \starttyping %D texexec --pdf --use=fig-make yourfile.xml -%D \stoptypen +%D \stoptyping %D %D You can now select a graphic from this file using the %D -%D \starttypen +%D \starttyping %D \externalfigure[a dutch cow][width=4cm] -%D \stoptypen +%D \stoptyping %D %D This module overloads this command so that a figure is %D it first searched in the list of databases. %D -%D \starttypen +%D \starttyping %D \usemodule [fig-base] %D \usefigurebases[yourfile] -%D \stoptypen +%D \stoptyping %D %D The special keyword \type {reset} can be used to reset %D this list. @@ -170,7 +170,7 @@ \else \let\figurepathlist\figurefilebasepath \normalcalculateexternalfigure - [#1][#2][\figurefilebase.pdf][\c!pagina=\figurefilepage,#4][#5][#6]% + [#1][#2][\figurefilebase.pdf][\c!page=\figurefilepage,#4][#5][#6]% \fi \fi} diff --git a/tex/context/base/x-fig-01.tex b/tex/context/base/x-fig-01.tex index 173139a86..5d6c0fa3f 100644 --- a/tex/context/base/x-fig-01.tex +++ b/tex/context/base/x-fig-01.tex @@ -19,34 +19,34 @@ %D variable). You can apply this style to a database by %D saying: %D -%D \starttypen +%D \starttyping %D texexec --pdf --use=fig-make yourfile.xml -%D \stoptypen +%D \stoptyping %D %D The following modes are supported: %D -%D \starttabulatie[|lT|l|] +%D \starttabulate[|lT|l|] %D \NC letter \NC map the preview on letter size \NC \NR %D \NC compact \NC use an alternative presentation \NC \NR -%D \stoptabulatie +%D \stoptabulate %D %D The resulting file has the following characteristics: %D -%D \startopsomming[opelkaar] -%D \som the document is split into three sections: first each +%D \startitemize[packed] +%D \item the document is split into three sections: first each %D figure is shown at its own page, then an overview of %D figures is shown with some data alongside, and %D finally an index and table of contents shows up -%D \som there is no title page, which means that one can +%D \item there is no title page, which means that one can %D access a figure by page number without offset -%D \som the document is opened at the first overview page, +%D \item the document is opened at the first overview page, %D that is, when the viewer supports it -%D \som the graphic is shown 3~times: on a page of its own, +%D \item the graphic is shown 3~times: on a page of its own, %D scaled to a fixed dimension, and relative to a4 or %D letter paper size -%D \som the labels can be accessed in an index and list at +%D \item the labels can be accessed in an index and list at %D the end of the document -%D \stopopsomming +%D \stopitemize %D %D We use named destinations, which means that one can %D access a figure by name from an external application. diff --git a/tex/context/base/x-fig-02.tex b/tex/context/base/x-fig-02.tex index 0fec27981..22d49d27a 100644 --- a/tex/context/base/x-fig-02.tex +++ b/tex/context/base/x-fig-02.tex @@ -16,23 +16,23 @@ %D This module enables non||\ConTeXt\ users to access the %D database. For this, you need to run %D -%D \starttypen +%D \starttyping %D texexec --pdf --use=fig-fake yourfile.xml -%D \stoptypen +%D \stoptyping %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 \starttyping %D \getfigurefile{label} %D \getfigurepage{label} -%D \stoptypen +%D \stoptyping %D %D A a bonus, the following macro is defined: %D -%D \starttypen +%D \starttyping %D \includefigurefile width 10cm {label} -%D \stoptypen +%D \stoptyping \usemodule[fig-00] diff --git a/tex/context/base/x-fo.tex b/tex/context/base/x-fo.tex new file mode 100644 index 000000000..075e88de0 --- /dev/null +++ b/tex/context/base/x-fo.tex @@ -0,0 +1,3607 @@ +%D \module +%D [ file=x-fo, +%D version=2004.03.12, % based on earlier experiments +%D title=\CONTEXT\ XML Modules, +%D subtitle=Formatting Objects, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% todo: global assignment in order to limit restore +% todo: combine mp graphics (see end) saves 30% +% todo: using contants and variables (for internal use) + +% beware: aftergroup vs egroup/endgroup + +%D Most time went into figuring out the specifications, especially +%D because there are no examples included. Samples that circulate on the +%D web are often border cases and torture test and don't have much to do +%D with real live. Another complication lays in the inheritance model: +%D some of the attributes are inherited. This also leaves some room for +%D interpretation, for instance do values that are used at a certain +%D point migrate downwards or not. +%D +%D The \CONTEXT\ \XML handler can deal with attributes in several ways +%D and for this purpose I have played with a few experimental mechanisms +%D just to end up with the existing begin/end mechanism combined with +%D a recursive attribute resolver which means that one has to implicitly +%D ask for an inherited attributes. This approach is probably one of the +%D most efficient ways of dealing with formatting objects in \CONTEXT, +%D unless of course I start adding rather specific support to the kernel. +%D +%D This module is rather experimental. More information about its usage +%D can be found in the \FOXET\ manual. + +%D Since we're not dealing with the fine points of typesetting here, we +%D can safely ignore \TEX's warnings about overful or underful boxes. + +\dontcomplain + +%D We will use fonts that have the characters in the normal (ascii) +%D slots. We will also use the stupid verbatim handler. + +\chardef\XMLtokensreduction = 2 +\chardef\XMLcdatamethod = 2 + +%D For the moment we stick to utf-8. + +\useXMLfilter[utf] + +%D This will be sorted out later (esp in relation to mathml). + +\setupbodyfont[pos,10pt] + +%D There are a couple of predefined colors. Don't ask me why, but +%D formatting objects are not a fresh start but a mix of existing +%D technologies. Color support is poluted by cascading stylesheets. +%D +%D Because hexadecimal color specifications are not enabled by +%D default, this feature has to be enables by loading the appropriate +%D color module. Here we define colors in \RGB\ values because we +%D don't want to loose accuracy. + +\setupcolors[state=start] \setupcolor[hex] + +\definecolor [black] [s=0] % [h=000000] +\definecolor [gray] [s=.5] % [h=808080] +\definecolor [silver] [s=.75] % [h=C0C0C0] +\definecolor [white] [s=1] % [h=FFFFFF] +\definecolor [maroon] [r=.5] % [h=800000] +\definecolor [red] [r=1] % [h=FF0000] +\definecolor [purple] [r=.5,b=.5] % [h=800080] +\definecolor [fuchsia] [r=1,b=1] % [h=FF00FF] +\definecolor [green] [g=.5] % [h=008000] +\definecolor [lime] [g=1] % [h=00FF00] +\definecolor [olive] [r=.5,g=.5] % [h=808000] +\definecolor [yellow] [r=1,g=1] % [h=FFFF00] +\definecolor [navy] [r=1,g=1] % [h=000080] +\definecolor [blue] [b=1] % [h=0000FF] +\definecolor [teal] [g=.5,b=.5] % [h=008080] +\definecolor [aqua] [g=1,b=1] % [h=00FFFF] + +%D The layout is rather basic. Of the 25 available areas we +%D only use the text area. Maybe some day I will plug in a +%D more dedicated page builder. + +\setuplayout + [backspace=0pt, + topspace=0pt, + header=0pt, + footer=0pt, + width=middle, + height=middle, + % marking=on, + location=middle] + +\setuppagenumbering + [alternative=doublesided, + location=] + +\setuptolerance + [verytolerant,stretch] + +%D We will position the regions using layers. + +\definelayer[regions][width=\paperwidth,height=\paperheight] + +\definelayer[xsl-region-before] +\definelayer[xsl-region-after] +\definelayer[xsl-region-start] +\definelayer[xsl-region-end] +\definelayer[xsl-region-body] + +\setupbackgrounds[page][background=regions] + +%D We now enter the part of this module where the action takes +%D place. As usual we provide some tracing options. + +\newif\iftracingFO \readsysfile{page-run}\donothing\donothing + +%D We will organize the attribute definitions in a similar fashion as in +%D the specification. Unfortunately there are more sets defined in there +%D than are actually used, so the definitions later on will look a bit +%D messy. +%D +%D Quite some attributes can be inherited, which means that they can +%D end up in all elements and influence those way down the tree. + +\defineXMLattributeset + [fo:inherited] + +%D The properties: + +% \defineXMLattributeset +% [fe:tracing] +% [tracing=] + +\defineXMLattributeset + [fo:accessibility] + [source-document=none, + role=none] + +\defineXMLattributeset + [fo:absolute-position] + [absolute-position=auto, + top=auto, + right=auto, + bottom=auto, + left=auto] + +% \defineXMLattributeset +% [fo:aural] +% [azitmuth=, +% cue-after=, +% cue-before=, +% elevation=, +% pause-after=, +% pause-before=, +% pitch=, +% pitch-range=, +% play-during=, +% richness=, +% speak=, +% speak-header=, +% speak-numeral=, +% speak-punctuation=, +% speech-rate=, +% stress=, +% voice-family=, +% volume=] + +\defineXMLattributeset + [fo:border-padding-background] + [background-attachment=scroll, + background-color=transparent, + background-image=none, + background-repeat=repeat, + background-position-horizontal=left, + background-position-vertical=top, + border-color=transparent, + border-style=none, + border-width=medium, + background-position=, + border-top=, + border-bottom=, + border-left=, + border-right=, + border-before-color=\XMLop{border-color}, + border-before-style=\XMLop{border-style}, + border-before-width=\XMLop{border-width}, + border-after-color=\XMLop{border-color}, + border-after-style=\XMLop{border-style}, + border-after-width=\XMLop{border-width}, + border-start-color=\XMLop{border-color}, + border-start-style=\XMLop{border-style}, + border-start-width=\XMLop{border-width}, + border-end-color=\XMLop{border-color}, + border-end-style=\XMLop{border-style}, + border-end-width=\XMLop{border-width}, + border-top-color=\XMLop{border-before-color}, + border-top-style=\XMLop{border-before-style}, + border-top-width=\XMLop{border-before-width}, + border-bottom-color=\XMLop{border-after-color}, + border-bottom-style=\XMLop{border-after-style}, + border-bottom-width=\XMLop{border-after-width}, + border-left-color=\XMLop{border-start-color}, + border-left-style=\XMLop{border-start-style}, + border-left-width=\XMLop{border-start-width}, + border-right-color=\XMLop{border-end-color}, + border-right-style=\XMLop{border-end-style}, + border-right-width=\XMLop{border-end-width}, + padding=0pt, + padding-before=\XMLop{padding}, + padding-after=\XMLop{padding}, + padding-start=\XMLop{padding}, + padding-end=\XMLop{padding}, + padding-top=\XMLop{padding-before}, + padding-bottom=\XMLop{padding-after}, + padding-left=\XMLop{padding-start}, + padding-right=\XMLop{padding-end}] + +\extendXMLattributeset + [fo:border-padding-background] + [fe:background-height=, + fe:background-width=] + +\defineXMLattributeset + [fo:font] + [] + +\extendXMLattributeset + [fo:inherited] + [font=, + font-family=Times, + font-selection-strategy=, + font-size=12pt, + font-size-adjust=1, + font-style=normal, + font-variant=normal, + font-weight=normal] + +\defineXMLattributeset + [fo:hyphenation] + [] + +\extendXMLattributeset + [fo:inherited] + [country=, + language=, + script=, + hyphenate=, + hyphenation-character=, + hyphenation-push-character-count=, + hyphenation-remain-character-count=] + +\defineXMLattributeset + [fo:margin-block] + [margin=0pt, + margin-top=\XMLop{margin}, + margin-bottom=\XMLop{margin}, + margin-left=\XMLop{margin}, + margin-right=\XMLop{margin}, + space-before=0pt, + space-after=0pt, + space-before.precedence=, + space-before.conditionality=, + space-before.minimum=, + space-before.optimum=, + space-before.maximum=, + space-after.precedence=, + space-after.conditionality=, + space-after.minimum=, + space-after.optimum=, + space-after.maximum=] + +\extendXMLattributeset + [fo:inherited] + [start-indent=, + end-indent=] + +\defineXMLattributeset + [fo:margin-inline] + [space-start=, + space-end=] + +\defineXMLattributeset + [fo:relative-position] + [relative-position=, + top=auto, + right=auto, + bottom=auto, + left=auto] + +\defineXMLattributeset + [fo:area-alignment] + [alignment-adjust=, + alignment-baseline=, + baseline-shift=, + dominant-baseline=] + +\extendXMLattributeset + [fo:inherited] + [display-align=, + relative-align=] + +\defineXMLattributeset + [fo:area-dimension] + [block-progression-dimension=, + inline-progression-dimension=, + content-height=, + content-width=, + height=, + width=, + max-height=, + max-width=, + min-height=, + min-width=, + scaling=, + scaling-method=] + +\defineXMLattributeset + [fo:block-and-line] + [] + +\extendXMLattributeset + [fo:inherited] + [hyphenation-keep=, + hyphenation-ladder-count=, + last-line-end-indent=, + line-height=, + line-height-shift-adjustment=, + line-stacking-strategy=, + linefeed-treatment=, + white-space-treatment=, + text-align=, + text-align-last=, + text-indent=, + white-space-collapse=, + wrap-option=] + +\defineXMLattributeset + [fo:character] + [character=, + suppress-at-line-break=, + text-decoration=, + text-shadow=, + treat-as-word-space=] + +\extendXMLattributeset + [fo:inherited] + [letter-spacing=, + text-transform=, + word-spacing=] + +\defineXMLattributeset + [fo:color] + [color-profile-name=, + rendering-intent=] + +\extendXMLattributeset + [fo:inherited] + [color=] + +\defineXMLattributeset + [fo:float] + [clear=, + float=] + +\extendXMLattributeset + [fo:inherited] + [intrusion-displace=] + +\defineXMLattributeset + [fo:keeps-and-breaks] + [break-after=, + break-before=, + keep-with-next.within-line=, + keep-with-next.within-column=, + keep-with-next.within-page=, + keep-with-previous.within-line=, + keep-with-previous.within-column=, + keep-with-previous.within-page=] + +\extendXMLattributeset + [fo:inherited] + [keep-together.within-line=, + keep-together.within-column=, + keep-together.within-page=, + orphans=, + widows=] + +\defineXMLattributeset + [fo:layout] + [clip=, + overflow= + span=] + +\extendXMLattributeset + [fo:inherited] + [reference-orientation=] + +\defineXMLattributeset + [fo:leader-and-rule] + [] + +\extendXMLattributeset + [fo:inherited] + [leader-alignment=, + leader-pattern=, + leader-pattern-width=, + leader-pattern-width=, + leader-length=, + rule-style=, + rule-thickness=] + +\defineXMLattributeset + [fo:dynamic-effects] + [active-state=, + case-name=, + case-title=, + destination-placement-offset=, + external-destination=, + indicate-destination=, + internal-destination=, + show-destination=, + starting-state=, + switch-to=, + target-presentation-context=, + target-processing-context=, + target-stylesheet=] + +\extendXMLattributeset + [fo:inherited] + [auto-restore=] + +\defineXMLattributeset + [fo:markers] + [marker-class-name=, + retrieve-class-name=, + retrieve-position=, + retrieve-boundary=] + +\defineXMLattributeset + [fo:number-to-string] + [country=, + language=, + format=, + grouping-separator=, + grouping-size=, + letter-value=] + +% \defineXMLattributeset +% [fo:pagination-and-layout] +% [black-or-not-blank=, +% column-count=1, +% column-gap=12pt, +% extent=, +% flow-name=, +% force-page-count=, +% initial-page-number=, +% master-name=, +% master-reference=, +% maximum-repeats=, +% media-usage=, +% odd-or-even=, +% page-height=, +% page-position=, +% page-width=, +% precedence=, +% region-name=] + +\defineXMLattributeset + [fo:table] + [border-after-precedence=, + border-before-precedence=, + border-end-precedence=, + border-start-precedence=, + column-number=, + column-width=, + ends-row=, + number-columns-repeated=, + number-columns-spanned=, + number-rows-spanned=, + starts-row=, + table-layout=, + table-omit-footer-at-break=, + table-omit-header-at-break=] + +\extendXMLattributeset + [fo:inherited] + [border-collapse=, + border-separation=, + caption-side=, + empty-cells=] + +\defineXMLattributeset + [fo:writing-mode] + [text-altitude=, + text-depth=, + unicode-bidi=] + +\extendXMLattributeset + [fo:inherited] + [direction=, + glyph-orientation-horizontal=, + glyph-orientation-vertical=, + writing-mode=] + +\defineXMLattributeset + [fo:list-block] + [] + +\extendXMLattributeset + [fo:inherited] + [provisional-label-separation=, + provisional-distance-between-starts=] + +% \starttext +% \setuplayout[topspace=1cm,height=middle,header=0pt,footer=0pt] +% \setupbodyfont[small,tt] +% \expanded{\processcommalist[\XMLattributeset{fo:inherited}]}\endgraf +% \stoptext + +% content-type +% id + +% ref-id +% score-spaces % inherited +% src +% visibility % inherited +% z-index + +% shorthands: +% +% background +% background-position +% border +% border-bottom +% border-left +% border-top +% border-right +% border-style +% border-color +% border-spacing % inherited +% border-width +% cue +% font % inherited +% margin +% padding +% page-break-after +% page-break-before +% page-break-inside % inherited +% pause +% position +% size +% vertical-align +% white-space % inherited + +%D We will speed up the process of setting up attributes by compiling the +%D definitions. Sometimes we need to access attributes explicitly by +%D element (for instance when handling regions). We also need to deal +%D with nested elements (for instance blocks) or a sequence of similar +%D ones, while we may not always want to use grouping. As a result, the +%D next series of definitions and macros are quite ugly. The begin|/|end +%D is needed in order to comfortably fetch attribute values from +%D ancestors. + +\startXMLcompiling + +%D Element: fo:root + +%D todo: set defaults here + +\defineXMLenvironment + [fo:root] + [\XMLattributeset{fo:inherited}, +leader-pattern=spaces, +leader-pattern-width=12pt, + media-usage=] + {\directsetup{fo:root:start}} + {\directsetup{fo:root:stop}} + +\startsetups fo:root:start + \starttext \beginXMLelement \startXMLignore +\stopsetups + +\startsetups fo:root:stop + \stopXMLignore \endXMLelement \stoptext +\stopsetups + +%D Element: fo:declarations + +\defineXMLprocess + [fo:declarations] + +%D Element: fo:color-profile + +\defineXMLignore + [fo:color-profile] + [src=, + color-profile-name=, + rendering-intent=] + +%D Element: fo:page-sequence + +% master-name and master-reference are often mixed up in examples + +\defineXMLenvironment + [fo:page-sequence] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fe:tracing}, + \XMLattributeset{fo:number-to-string}, + initial-page-number=auto, + master-reference=any, + force-page-count=auto] + {\beginXMLelement\directsetup{fo:page-sequence:start}} + {\directsetup{fo:page-sequence:stop}\endXMLelement} + +\mapXMLvalue {fo:page-initial} {auto} {\relax} +\mapXMLvalue {fo:page-initial} {auto-odd} {\ifodd\pageno \expanded{\setuppagenumber[number=\the\dimexpr(\pageno+1)]}\fi} +\mapXMLvalue {fo:page-initial} {auto-even} {\ifodd\pageno\else\expanded{\setuppagenumber[number=\the\dimexpr(\pageno+1)]}\fi} + +% todo: blokkeer left/right/etc in geval van blank + +\mapXMLvalue {fo:page-start} {auto} {\page} +\mapXMLvalue {fo:page-start} {even} {\page\setuplayout[blank]\page[even]} +\mapXMLvalue {fo:page-start} {odd} {\page\setuplayout[blank]\page[odd]} +\mapXMLvalue {fo:page-end} {end-on-even} {\page\setuplayout[blank]\page[even]} +\mapXMLvalue {fo:page-end} {end-on-odd} {\page\setuplayout[blank]\page[odd]} +\mapXMLvalue {fo:page-start} {no-force} {\page} + +\startsetups fo:page-sequence:start + + % we're still in the previous page-sequence + + \XMLval{fo:page-start}{\XMLop{force-page-count}}{\page} \begingroup + + \directsetup{fe:setup} + + \iftracingFO \showframe[text] \fi + + \xdef\SavedPageNumber{\the\realpageno} + + % now we enter the new page-sequence + + % todo: check on number + + \doifXMLvalelse{fo:page-initial}{\XMLop{initial-page-number}} + {\XMLval{fo:page-initial}{\XMLop{initial-page-number}}{}} + {\doifnot{\XMLop{initial-page-number}}{auto} + {\expanded{\setuppagenumber[number=\XMLop{initial-page-number}]}}} + + \doifsomething{\XMLpar{fo:page-sequence}{master-reference}{}} + {\doifelseXMLelement{fo:page-sequence-master:\XMLpar{fo:page-sequence}{master-reference}{}} + {%[starting page sequence master: \XMLpar{fo:page-sequence}{master-reference}{}]\endgraf + \flushXMLelement{fo:page-sequence-master:\XMLpar{fo:page-sequence}{master-reference}{}}} + {%[starting simple page master: \XMLpar{fo:page-sequence}{master-reference}{any}]\endgraf + \flushXMLelement{fo:simple-page-master:\XMLpar{fo:page-sequence}{master-reference}{any}}}} + + \doif{\XMLpar{fo:simple-page-master-do}{fe:option}{}}{fit} + {\directsetup{fe:page:option:fit:start}} + + \doifnot{\XMLpar{fo:region-body}{column-count}{1}}{1} + {\directsetup{fo:columns:start}} + +\stopsetups + +\startsetups fo:page-sequence:stop + + \doifnot{\XMLpar{fo:region-body}{column-count}{1}}{1} + {\directsetup{fo:columns:stop}} + + \doif{\XMLpar{fo:simple-page-master-do}{fe:option}{}}{fit} + {\directsetup{fe:page:option:fit:stop}} + + % \XMLval{fo:page-end}{\XMLop{force-page-count}}{\page} \endgroup + + \ifnum\SavedPageNumber=\realpageno + + \ifdim\pagetotal<.5\textheight \null \vfill \fi % force a page with only containers + + \fi + + \XMLval{fo:page-end}{\XMLpar{fo:page-sequence}{force-page-count}{}}{\page} \endgroup + +\stopsetups + +\newdimen\FOcolumngap + +\startsetups fo:columns:start + + \FOcolumngap\textwidth + + \setpercentdimen\FOcolumngap{\XMLpar{fo:region-body}{column-gap}{12pt}} + + \definecolumnset + [fo:set] + [n=\XMLpar{fo:region-body}{column-count}{1}, + distance=\FOcolumngap] + + \directsetup{fo:font:setup} % else problems + + \startcolumnset[fo:set] + + % \startcolumns[\XMLpar{fo:region-body}{column-count}{1}] + +\stopsetups + +\startsetups fo:columns:stop + + % \stopcolumns + + \stopcolumnset + +\stopsetups + +%D Element: fo:layout-master-set + +\defineXMLprocess + [fo:layout-master-set] + +%D Element: fo:page-sequence-master + +\defineXMLenvironmentsave + [fo:page-sequence-master] + [\XMLattributeset{fo:inherited}, + master-name=any] + {} + {%[saved page sequence master: \XMLop{master-name}]\endgraf + \gsaveXMLdatainelement + {fo:page-sequence-master:\XMLop{master-name}} + {fo:page-sequence-master-do} + {fo:page-sequence-master}} + +\defineXMLprocess + [fo:page-sequence-master-do] + [\XMLattributeset{fo:inherited}] + +%D Element: fo:single-page-master-reference + +% makeup - one page + +\defineXMLcommand + [fo:single-page-master-reference] + [master-reference=any] + {\flushXMLelement{fo:simple-page-master:\XMLop{master-reference}}} + +%D Element: fo:repeatable-page-master-reference + +\defineXMLcommand + [fo:repeatable-page-master-reference] + [master-reference=any, + maximum-repeats=] + {\flushXMLelement{fo:simple-page-master:\XMLop{master-reference}}} + +%D Element: fo:repeatable-page-master-alternatives + +\defineXMLprocess + [fo:repeatable-page-master-alternatives] + [maximum-repeats=] + +%D Element: fo:conditional-page-master-reference + +% page-position : first last rest any +% odd-or-even : odd even any +% blank-or-not-blank : blank not-blank + +% The page-position default is needed (else possible loops) + +\defineXMLcommand + [fo:conditional-page-master-reference] + [master-reference=any, + page-position=\XMLpar{fo:conditional-page-master-reference}{master-reference}{any}, + blank-or-not-blank=, + odd-or-even=] + {\flushXMLelement{fo:simple-page-master:\XMLpar{fo:conditional-page-master-reference}{master-reference}{}}} + +%D Element: fo:simple-page-master + +% first-page left-page right-page blank-page + +% default dimensions + +\defineXMLenvironmentsave + [fo:simple-page-master] + [master-name=any] + {} + {%[saved simple page master: \XMLop{master-name}]\endgraf + \gsaveXMLdatainelement + {fo:simple-page-master:\XMLop{master-name}} + {fo:simple-page-master-do} + {fo:simple-page-master}} + +% reference-orientation=0, +% writing-mode= + +\defineXMLenvironment + [fo:simple-page-master-do] + [\XMLattributeset{fo:margin-block}, + page-height=29.7cm, + page-width=21cm] + {\directsetup{fo:simple-page-master:start}} + {\directsetup{fo:simple-page-master:stop}} + +% not needed any more: + +\mapXMLvalue {fo:reference-orientation} {90} {90} +\mapXMLvalue {fo:reference-orientation} {180} {180} +\mapXMLvalue {fo:reference-orientation} {270} {270} +\mapXMLvalue {fo:reference-orientation} {-90} {270} +\mapXMLvalue {fo:reference-orientation} {-180} {180} +\mapXMLvalue {fo:reference-orientation} {-270} {90} + +\startsetups fo:simple-page-master:start + + % nothing + +\stopsetups + +% can be low level tex + +\startsetups fo:simple-page-master:stop + + \writestatus{XML-FO}{defining papersize '\directsetup{fo:layout:kind}'} + + \expanded + {\definepapersize + [\directsetup{fo:layout:kind}] + [width=\XMLop{page-width}, + height=\XMLop{page-height}]} + + \checkFOpadding {fo:region-body} + + \writestatus{XML-FO}{defining layout '\directsetup{fo:layout:kind}'} + + \expanded + {\definelayout + [\directsetup{fo:layout:kind}] + [ page={\directsetup{fo:layout:kind},\XMLval{fo:reference-orientation}{\XMLop{reference-orientation}}{}}, + paper=\directsetup{fo:layout:kind}, + backspace=\the\dimexpr(\XMLpar{fo:simple-page-master-do}{margin-left}{0pt}+ + \XMLpar{fo:region-body}{padding-left}{0pt}+ + \XMLpar{fo:region-body}{margin-left}{0pt}), + cutspace=\the\dimexpr(\XMLpar{fo:simple-page-master-do}{margin-right}{0pt}+ + \XMLpar{fo:region-body}{padding-right}{0pt}+ + \XMLpar{fo:region-body}{margin-right}{0pt}), + topspace=\the\dimexpr(\XMLpar{fo:simple-page-master-do}{margin-top}{0pt}+ + \XMLpar{fo:region-body}{padding-top}{0pt}+ + \XMLpar{fo:region-body}{margin-top} {0pt}), + bottomspace=\the\dimexpr(\XMLpar{fo:simple-page-master-do}{margin-top}{0pt}+ + \XMLpar{fo:region-body}{padding-bottom}{0pt}+ + \XMLpar{fo:region-body}{margin-bottom}{0pt})]} + + \expanded{\setuplayout[\directsetup{fo:layout:kind}]} + + % this is a nasty bit of code: this local setup stores some data that + % needs to be used later + + \startexpanded + \noexpand \startlocalsetups[layout:\directsetup{fo:layout:kind}] + \noexpand \writestatus{XML-FO}{processing simple page master '\XMLpar{fo:simple-page-master-do}{master-name}{any}'} + \noexpand \resetsetups[fo:simple-page-master:start] + \noexpand \resetsetups[fo:simple-page-master:stop] + \noexpand \flushXMLelement{fo:simple-page-master:\XMLpar{fo:simple-page-master-do}{master-name}{any}} + \noexpand \stoplocalsetups + \stopexpanded + +\stopsetups + +% \defineXMLcommand[fo:simple-page-master-do-do] +% {\writestatus{XML-FO}{setting up master \XMLop{master-name} in page body}} + +%D Element: fo:region-body + +% display-align=, +% reference-orientation=, +% writing-mode=, + +\defineXMLcommand % or process + [fo:region-body] + [\XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:margin-block}, + clip=, + column-count=1, + column-gap=12pt, + overflow=, + region-name=] + {\directsetup{fo:region-body:process}} + +\startsetups fo:region-body:process + \writestatus{XML-FO}{refreshing region-body parameters} +\stopsetups + +% todo: naar realfolio handelen ipv folio + +\mapXMLvalue {fo:odd-or-even} {odd} {odd} +\mapXMLvalue {fo:odd-or-even} {even} {even} + +\mapXMLvalue {fo:page-position} {even} {even} +\mapXMLvalue {fo:page-position} {odd} {odd} +\mapXMLvalue {fo:page-position} {first} {current} +\mapXMLvalue {fo:page-position} {blank} {blank} % todo +\mapXMLvalue {fo:page-position} {rest} {rest} % todo + +% check this one esp default value + +\startsetups fo:layout:kind + + \XMLpav + {fo:odd-or-even} + {fo:conditional-page-master-reference} + {odd-or-even} + {\XMLpav + {fo:page-position} + {fo:conditional-page-master-reference} + {page-position} +% {\XMLop{master-reference}}} + {\XMLpar{fo:page-sequence-master}{master-reference}{any}}} + +\stopsetups + +% common border things + +% clip +% display-align +% extent +% overflow +% precedence +% region-name +% reference-orientation +% writing-mode + +%D Element: fo:region-before fo:region-after fo:region-start fo:region-end + +% border-before-color : | inherit +% border-before-style : | inherit +% border-before-width.length|conditional : | | inherit +% +% style: none hidden dotted dashed solid double groove ridge inset outset +% width: thin medium thick length + +\mapXMLvalue {fo:display-align} {auto} {before} % todo: related to relative-align +\mapXMLvalue {fo:display-align} {before} {high} +\mapXMLvalue {fo:display-align} {after} {low} +\mapXMLvalue {fo:display-align} {center} {lohi} + +% display-align=, +% reference-orientation=, +% writing-mode=, + +\defineXMLcommand % will become process when stable + [fo:region-before] + [\XMLattributeset{fo:border-padding-background}, + clip=, + extent=, + overflow=, + precedence=, + region-name=] + {\directsetup{fo:region-before:process}} + +\startsetups fo:region-before:process + \writestatus{XML-FO}{refreshing region-before parameters} +\stopsetups + +\defineXMLprocess + [fo:region-after] + [\XMLattributeset{fo:border-padding-background}, + clip=, + extent=, + overflow=, + precedence=, + region-name=] + +\defineXMLprocess + [fo:region-start] + [\XMLattributeset{fo:border-padding-background}, + clip=, + extent=, + overflow=, + region-name=] + +\defineXMLprocess + [fo:region-end] + [\XMLattributeset{fo:border-padding-background}, + clip=, + extent=, + overflow=, + region-name=] + +\mapXMLvalue {fo:border-style} {none} {0} +\mapXMLvalue {fo:border-style} {hidden} {1} +\mapXMLvalue {fo:border-style} {dotted} {2} +\mapXMLvalue {fo:border-style} {dashed} {3} +\mapXMLvalue {fo:border-style} {solid} {4} +\mapXMLvalue {fo:border-style} {double} {5} +\mapXMLvalue {fo:border-style} {groove} {6} +\mapXMLvalue {fo:border-style} {ridge} {7} +\mapXMLvalue {fo:border-style} {inset} {8} +\mapXMLvalue {fo:border-style} {outset} {9} + +\mapXMLvalue {fo:border-width} {thin} {.25pt} +\mapXMLvalue {fo:border-width} {medium} {.5pt} +\mapXMLvalue {fo:border-width} {thick} {1pt} + +\startsetups fo:regions:check + + \startprocesscommalist[body,before,after,start,end] + + \checkFOborder{fo:region-\currentcommalistitem}{bottom} + \checkFOborder{fo:region-\currentcommalistitem}{top} + \checkFOborder{fo:region-\currentcommalistitem}{left} + \checkFOborder{fo:region-\currentcommalistitem}{right} + + \checkhexcolor[\XMLpar{fo:region-\currentcommalistitem}{border-bottom-color}{}] + \checkhexcolor[\XMLpar{fo:region-\currentcommalistitem}{border-top-color}{}] + \checkhexcolor[\XMLpar{fo:region-\currentcommalistitem}{border-left-color}{}] + \checkhexcolor[\XMLpar{fo:region-\currentcommalistitem}{border-right-color}{}] + + \checkhexcolor[\XMLpar{fo:region-\currentcommalistitem}{background-color}{}] + + \checkFOposition{fo:region-\currentcommalistitem}{background} + \checkFOpadding {fo:region-\currentcommalistitem} + + \stopprocesscommalist + +\stopsetups + +%D Element: fo:flow + +\defineXMLenvironment + [fo:flow] + [\XMLattributeset{fo:inherited}, + flow-name=unknown] + {\beginXMLelement\directsetup{fo:flow:start}} + {\directsetup{fo:flow:stop}\endXMLelement} + +\startsetups fo:flow:start + \begingroup +\stopsetups + +\startsetups fo:flow:stop + \endgroup +\stopsetups + +%D Element: fo:static-content + +% \beginXMLelement \endXMLelement - maybe save with attributes + +\defineXMLenvironmentsave + [fo:static-content] + [flow-name=unknown] + {} + {\directsetup{fo:static-content:process}} + +\startsetups fo:static-content:process + + \gsaveXMLdata{fo:static-content:\XMLop{flow-name}}{fo:static-content} + +\stopsetups + +\newdimen\FOscratchML \newdimen\FOscratchMR +\newdimen\FOscratchMT \newdimen\FOscratchMB +\newdimen\FOscratchRB \newdimen\FOscratchRA +\newdimen\FOscratchRS \newdimen\FOscratchRE + +\mapXMLvalue {fo:background-repeat} {no-repeat} {0} +\mapXMLvalue {fo:background-repeat} {repeat} {1} +\mapXMLvalue {fo:background-repeat} {repeat-x} {2} +\mapXMLvalue {fo:background-repeat} {repeat-y} {3} + +\expanded {\mapXMLvalue {fo:background-location} {left} {0\letterpercent}} +\expanded {\mapXMLvalue {fo:background-location} {right} {100\letterpercent}} +\expanded {\mapXMLvalue {fo:background-location} {top} {0\letterpercent}} +\expanded {\mapXMLvalue {fo:background-location} {bottom} {100\letterpercent}} +\expanded {\mapXMLvalue {fo:background-location} {center} {50\letterpercent}} + +\newdimen\FObgpositionH +\newdimen\FObgpositionV + +\def\FObackgroundimage#1#2#3% + {\doifnot{\XMLpar{fo:#1}{background-image}{none}}{none} + {\setFOimagename{\XMLpar{fo:#1}{background-image}{dummy}}% + \FObgpositionH#2% + \setpercentdimen\FObgpositionH{\XMLpav{fo:background-location}{fo:#1}{background-position-horizontal}{}}% + \ifpercentdimendone + \skip0\zeropoint plus \FObgpositionH + \skip2\zeropoint plus \dimexpr(#2-\FObgpositionH)% + \else + \skip0\FObgpositionH + \skip2\zeropoint plus 1fill\relax + \fi + \FObgpositionV#3% + \setpercentdimen\FObgpositionV{\XMLpav{fo:background-location}{fo:#1}{background-position-vertical}{}}% + \ifpercentdimendone + \skip4\zeropoint plus \FObgpositionV + \skip6\zeropoint plus \dimexpr(#3-\FObgpositionV)% + \else + \skip4\FObgpositionV + \skip6\zeropoint plus 1fill\relax + \fi + \vbox to #3 \bgroup + \vskip\skip4\relax + \hbox to #2 \bgroup + \hskip\skip0\relax + \backgroundimage + {\XMLpav{fo:background-repeat}{fo:#1}{background-repeat}{}}{#2}{#3}% + {\externalfigure + [\FOimagename] + [width=\XMLpar{fo:#1}{fe:background-width}{}, + height=\XMLpar{fo:#1}{fe:background-height}{}]}% + \hskip\skip2\relax + \egroup + \vskip\skip6\relax + \egroup}} + +\def\checkFOclipping#1% + {\doifsomething{\XMLpar{#1}{clip}{}} + {\analyzefunction{\XMLpar{#1}{clip}{}}% + \doif\functionname{rect} + {\def\postprocessframebox##1% + {\edef\next{\dimen0=\the\wd##1\dimen2=\the\ht##1\dimen4=\the\dp##1}% + \setbox##1\hbox + {\clip % expanded? + [topoffset=-\functionA, + bottomoffset=-\functionC, + leftoffset=-\functionD, + rightoffset=-\functionB] + {\box##1}}% + \next}}}} + +\def\clipFOarea#1% + {\doifsomething{\XMLpar{#1}{clip}{}}% + {\analyzefunction{\XMLpar{#1}{clip}{}}% + \doif\functionname{rect} + {\setbox\scratchbox\hbox{\foregroundbox}% + \edef\next{\dimen0=\the\wd\scratchbox\dimen2=\the\ht\scratchbox\dimen4=\the\dp\scratchbox}% + \setbox\scratchbox\hbox + {\clip % expanded? + [topoffset=-\functionA, + bottomoffset=-\functionC, + leftoffset=-\functionD, + rightoffset=-\functionB] + {\box\scratchbox}}% + \next + \box\scratchbox}}} + +\defineoverlay + [text] + [\clipFOarea{fo:region-body}] + +\setupbackgrounds + [text] + [background=text] + +\def\FOregionbuilder#1#2#3#4#5#6% #1=location #2=preset #3=x #4=y #5=width #6=height + {\writestatus{XML-FO}{building region #1}% + \defineoverlay + [image] + [{\framed + [frame=off, + orientation=\XMLpav{fo:reference-orientation}{fo:#1}{reference-orientation}{0}, + offset=overlay, + height=\overlayheight, + width=\overlaywidth] + {\FObackgroundimage{#1}\hsize\vsize}}]% + \setlayerframed + [regions] + [preset=#2,x=\dimexpr(#3),y=\dimexpr(#4)] + [frame=off, + offset=overlay,background={#1-graphic,image,xsl-#1}, + width=\dimexpr(#5),height=\dimexpr(#6)] + {\lrtbbox + {\XMLpar{fo:#1}{padding-left}\zeropoint}% + {\XMLpar{fo:#1}{padding-right}\zeropoint}% + {\XMLpar{fo:#1}{padding-top}\zeropoint}% + {\XMLpar{fo:#1}{padding-bottom}\zeropoint}% + {\checkFOclipping{fo:#1}% + \framed + [frame=off, + offset=overlay, + orientation=\XMLpav{fo:reference-orientation}{fo:#1}{reference-orientation}{0}, + align={\XMLpav{fo:display-align}{fo:#1}{display-align}{high},\XMLpav{fo:align-key}{fo:#1}{text-align}{normal}}, + width=\hsize,height=\vsize] + {\doFObeforeskip{fo:#1}% + \flushXMLelement{fo:static-content:\XMLpar{fo:#1}{region-name}{xsl-#1}}}% + \doFOafterskip{fo:#1}}}} + +\startsetups fo:regions:process + + \directsetup{fo:regions:check} + + \FOscratchML \XMLpar{fo:simple-page-master-do}{margin-left} \zeropoint + \FOscratchMR \XMLpar{fo:simple-page-master-do}{margin-right} \zeropoint + \FOscratchMT \XMLpar{fo:simple-page-master-do}{margin-top} \zeropoint + \FOscratchMB \XMLpar{fo:simple-page-master-do}{margin-bottom}\zeropoint + + \FOscratchRB \XMLpar{fo:region-before} {extent} \zeropoint + \FOscratchRA \XMLpar{fo:region-after} {extent} \zeropoint + \FOscratchRS \XMLpar{fo:region-start} {extent} \zeropoint + \FOscratchRE \XMLpar{fo:region-end} {extent} \zeropoint + + \doifelse{\XMLpar{fo:region-before}{precedence}{false}}{true} + {\doifelse{\XMLpar{fo:region-after}{precedence}{false}}{true} + {\directsetup{fo:regions:process:true:true}} + {\directsetup{fo:regions:process:true:false}}} + {\doifelse{\XMLpar{fo:region-after}{precedence}{false}}{true} + {\directsetup{fo:regions:process:false:true}} + {\directsetup{fo:regions:process:false:false}}} + + \FOscratchRB \XMLpar{fo:region-body}{margin-top} \zeropoint + \FOscratchRA \XMLpar{fo:region-body}{margin-bottom}\zeropoint + \FOscratchRS \XMLpar{fo:region-body}{margin-left} \zeropoint + \FOscratchRE \XMLpar{fo:region-body}{margin-right} \zeropoint + + \FOregionbuilder + {region-body} + {lefttop} + {\FOscratchML+\FOscratchRS} + {\FOscratchMT+\FOscratchRA} + {\paperwidth -\FOscratchML-\FOscratchMR-\FOscratchRS-\FOscratchRE} + {\paperheight-\FOscratchMT-\FOscratchMB-\FOscratchRB-\FOscratchRA} + +\stopsetups + +\startsetups fo:regions:process:true:true + + \ifdim\FOscratchRB>\zeropoint \FOregionbuilder + {region-before}{lefttop} + {\FOscratchML}{\FOscratchMT} + {\paperwidth-\FOscratchML-\FOscratchMR}{\FOscratchRB} + \fi \ifdim\FOscratchRA>\zeropoint \FOregionbuilder + {region-after}{leftbottom} + {\FOscratchML}{\FOscratchMB} + {\paperwidth-\FOscratchML-\FOscratchMR}{\FOscratchRA} + \fi \ifdim\FOscratchRS>\zeropoint \FOregionbuilder + {region-start}{lefttop} + {\FOscratchML}{\FOscratchMT+\FOscratchRB} + {\FOscratchRS}{\paperheight-\FOscratchMT-\FOscratchMB-\FOscratchRA-\FOscratchRB} + \fi \ifdim\FOscratchRE>\zeropoint \FOregionbuilder + {region-end}{righttop} + {\FOscratchMR}{\FOscratchMT+\FOscratchRA} + {\FOscratchRE}{\paperheight-\FOscratchMT-\FOscratchMB-\FOscratchRA-\FOscratchRB} + \fi + +\stopsetups + +\startsetups fo:regions:process:false:true + + \ifdim\FOscratchRB>\zeropoint \FOregionbuilder + {region-before}{lefttop} + {\FOscratchML+\FOscratchRS}{\FOscratchMT} + {\paperwidth-\FOscratchML-\FOscratchMR-\FOscratchRS-\FOscratchRE}{\FOscratchRB} + \fi \ifdim\FOscratchRA>\zeropoint \FOregionbuilder + {region-after}{leftbottom} + {\FOscratchML}{\FOscratchMB} + {\paperwidth-\FOscratchML-\FOscratchMR}{\FOscratchRA} + \fi \ifdim\FOscratchRS>\zeropoint \FOregionbuilder + {region-start}{lefttop} + {\FOscratchML}{\FOscratchMT} + {\FOscratchRS}{\paperheight-\FOscratchMB-\FOscratchRA-\FOscratchRB} + \fi \ifdim\FOscratchRE>\zeropoint \FOregionbuilder + {region-end}{righttop} + {\FOscratchMR}{\FOscratchMT} + {\FOscratchRE}{\paperheight-\FOscratchMB-\FOscratchRA-\FOscratchRB} + \fi + +\stopsetups + +\startsetups fo:regions:process:true:false + + \ifdim\FOscratchRB>\zeropoint \FOregionbuilder + {region-before}{lefttop} + {\FOscratchML}{\FOscratchMT} + {\paperwidth-\FOscratchML-\FOscratchMR}{\FOscratchRB} + \fi \ifdim\FOscratchRA>\zeropoint \FOregionbuilder + {region-after}{leftbottom} + {\FOscratchML+\FOscratchRS}{\FOscratchMB} + {\paperwidth-\FOscratchML-\FOscratchMR-\FOscratchRS-\FOscratchRE}{\FOscratchRA} + \fi \ifdim\FOscratchRS>\zeropoint \FOregionbuilder + {region-start}{lefttop} + {\FOscratchML}{\FOscratchMT+\FOscratchRB} + {\FOscratchRS}{\paperheight-\FOscratchMT-\FOscratchMB-\FOscratchRB} + \fi \ifdim\FOscratchRE>\zeropoint \FOregionbuilder + {region-end}{righttop} + {\FOscratchMR}{\FOscratchMT+\FOscratchRA} + {\FOscratchRE}{\paperheight-\FOscratchMT-\FOscratchMB-\FOscratchRB} + \fi + +\stopsetups + +\startsetups fo:regions:process:false:false + + \ifdim\FOscratchRB>\zeropoint \FOregionbuilder + {region-before}{lefttop} + {\FOscratchML+\FOscratchRS}{\FOscratchMT} + {\paperwidth-\FOscratchML-\FOscratchMR-\FOscratchRS-\FOscratchRE}{\FOscratchRB} + \fi \ifdim\FOscratchRA>\zeropoint \FOregionbuilder + {region-after}{leftbottom} + {\FOscratchML+\FOscratchRS}{\FOscratchMB} + {\paperwidth-\FOscratchML-\FOscratchMR-\FOscratchRS-\FOscratchRE}{\FOscratchRA} + \fi \ifdim\FOscratchRS>\zeropoint \FOregionbuilder + {region-start}{lefttop} + {\FOscratchML}{\FOscratchMT} + {\FOscratchRS}{\paperheight-\FOscratchMT-\FOscratchMB} + \fi \ifdim\FOscratchRE>\zeropoint \FOregionbuilder + {region-end}{righttop} + {\FOscratchMR}{\FOscratchMT} + {\FOscratchRE}{\paperheight-\FOscratchMT-\FOscratchMB} + \fi + +\stopsetups + +\startsetups fo:before:each:page + + \writestatus{XML-FO}{setting up layout \currentlayout} + \directsetup{layout:\currentlayout} + \directsetup{fo:regions:process} + +\stopsetups + +\prependtoks + \directsetup{fo:before:each:page}% +\to \everybeforepagebody + +%D Element: fo:title + +% \XMLattributeset{fo:aural}, +% color=, +% line-height=, + +\defineXMLignore + [fo:title] + [\XMLattributeset{fo:inherited},\XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:font}, + \XMLattributeset{fo:margin-inline}, + visibility=] + +%D Element: fo:block + +\defineXMLenvironment + [fo:block] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fe:tracing}, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:font}, + \XMLattributeset{fo:hyphenation}, + \XMLattributeset{fo:margin-block}, + \XMLattributeset{fo:relative-position}, + \XMLattributeset{fo:keeps-and-breaks}, + text-depth=, + text-altitude=, + span=, + visibility=] + {\beginXMLelement\directsetup{fo:block:start}} + {\directsetup{fo:block:stop}\endXMLelement} + +\newdimen \dFOlineheight + +\let\FOlineheight\empty + +\startsetups fo:block:start + + \endgraf + + \begingroup + + \directsetup{fe:setup} + + \directsetup{fo:break-and-space:before} + + \begingroup + + \setFOreference{fo:block} + + \increment\FOblocklevel + + \directsetup{fo:font:setup} + + % \setupinterlinespace, no, interferes with columnset and lineheight + + \edef\xFOlineheight{\XMLop{line-height}} + + \ifx\xFOlineheight\FOlineheight \else + + \let\FOlineheight\xFOlineheight + \dFOlineheight 2.8ex + \setpercentdimen\dFOlineheight\FOlineheight + \ifpercentdimendone + \expanded{\setupinterlinespace[line=\dFOlineheight]}% + \else\ifx\FOlineheight\empty \else + \doifdimensionelse\FOlineheight + {\expanded{\setupinterlinespace[line=\FOlineheight]}} + {\expanded{\setupinterlinespace[\FOlineheight]}}% + \fi \fi + + \fi + + \directsetup{fo:indent:setup} + + \doifsomething{\XMLop{background-color}} + {\checkhexcolor[\XMLop{background-color}] + \doifcolorelse{\XMLop{background-color}} + \donothing + {\setXMLpar{fo:block}{background-color}{}}} + + \doifsomething{\XMLop{color}} + {\checkhexcolor[\XMLop{color}] + \doifcolorelse{\XMLop{color}} + \donothing + {\setXMLpar{fo:block}{color}{}}} + + \doifsomething{\XMLop{background-color}} + {\expanded + {\definetextbackground + [FOattribute-\FOblocklevel] + [location=paragraph, + color=\XMLop{color}, + style=, + before=, + after=, + background=color, + backgroundcolor=\XMLop{background-color}]}} + + \endgraf + + \getvalue{startFOattribute-\FOblocklevel} + + \directsetup{fo:hyphenation:setup} + \directsetup{fo:align:setup} + + \doif{\XMLop{wrap-option}}{no-wrap} + {\obeylines} + + \doif{\XMLop{white-space-collapse}}{false} + {\obeyspaces} + + \doifsomething{\XMLop{text-indent}} + {\expanded{\setupindenting[\XMLop{text-indent}]} + \indenting[always]} + +\stopsetups + +\startsetups fo:block:stop + + \endstrut \endgraf + + \getvalue{stopFOattribute-\FOblocklevel} + + \endgraf + + \endgroup + + \directsetup{fo:break-and-space:after} + + \endgroup + +\stopsetups + +% todo: map + +\mapXMLvalue {fo:break} {column} {\column} +\mapXMLvalue {fo:break} {page} {\page} +\mapXMLvalue {fo:break} {even-page} {\page[even]} +\mapXMLvalue {fo:break} {odd-page} {\page[odd]} + +% keep-together : either vbox or something \interlinepenalty\maxdimen ? +% +% nasty interference with accumulated skips + +\mapXMLvalue {fo:keep-next} {auto} {} +\mapXMLvalue {fo:keep-next} {always} {\allowbreak} + +\mapXMLvalue {fo:keep-prev} {auto} {} +\mapXMLvalue {fo:keep-prev} {always} {\nobreak} + +\mapXMLvalue {fo:keep-start} {auto} {} +\mapXMLvalue {fo:keep-start} {always} {\interlinepenalty\maxdimen} + +\mapXMLvalue {fo:keep-stop} {auto} {} +\mapXMLvalue {fo:keep-stop} {always} {} + +\newskip\FOsavedlastskip + +\startsetups fo:break-and-space:before + + \XMLval{fo:break}{\XMLop{break-before}}{} + +% test +% +% \FOsavedlastskip \lastskip +% \ifdim\FOsavedlastskip>\zeropoint \vskip-\FOsavedlastskip \fi + + \XMLval{fo:keep-start}{\XMLop{keep-together}}\empty + \XMLval{fo:keep-start}{\XMLop{keep-together.within-column}}\empty + \XMLval{fo:keep-start}{\XMLop{keep-together.within-page}}\empty + + \XMLval{fo:keep-prev} {\XMLop{keep-with-previous}}\empty + \XMLval{fo:keep-prev} {\XMLop{keep-with-previous.within-column}}\empty + \XMLval{fo:keep-prev} {\XMLop{keep-with-previous.within-page}}\empty + +% test +% +% \ifdim\FOsavedlastskip>\zeropoint \vskip\FOsavedlastskip \fi + + \doFObeforeskip\currentXMLelement + +\stopsetups + +\startsetups fo:break-and-space:after + + \doFOafterskip\currentXMLelement + +% \FOsavedlastskip \lastskip +% \ifdim\FOsavedlastskip>\zeropoint \vskip-\FOsavedlastskip \fi + + \XMLval{fo:keep-stop}{\XMLop{keep-together}}\empty + \XMLval{fo:keep-stop}{\XMLop{keep-together.within-column}}\empty + \XMLval{fo:keep-stop}{\XMLop{keep-together.within-page}}\empty + + \XMLval{fo:keep-next}{\XMLop{keep-with-next}}\empty + \XMLval{fo:keep-next}{\XMLop{keep-with-next.within-column}}\empty + \XMLval{fo:keep-next}{\XMLop{keep-with-next.within-page}}\empty + +% \ifdim\FOsavedlastskip>\zeropoint \vskip\FOsavedlastskip \fi + + \XMLval{fo:break}{\XMLop{break-after}}{} + +\stopsetups + +\startsetups fo:space:start + \doFOstartspace\currentXMLelement +\stopsetups + +\startsetups fo:space:end + \doFOendspace\currentXMLelement +\stopsetups + +\startsetups fo:indent:setup + + \doifsomething{\XMLop{start-indent}}{\advance\leftskip \XMLop{start-indent}\relax} + \doifsomething{\XMLop{end-indent}} {\advance\rightskip\XMLop{end-indent} \relax} + +\stopsetups + +\mapXMLvalue {fo:align} {center} {\raggedcenter} +\mapXMLvalue {fo:align} {left} {\raggedright} +\mapXMLvalue {fo:align} {right} {\raggedleft} +\mapXMLvalue {fo:align} {begin} {\raggedright} +\mapXMLvalue {fo:align} {end} {\raggedleft} + +\mapXMLvalue {fo:align-key} {center} {middle} +\mapXMLvalue {fo:align-key} {left} {right} +\mapXMLvalue {fo:align-key} {right} {left} +\mapXMLvalue {fo:align-key} {begin} {right} +\mapXMLvalue {fo:align-key} {end} {left} + +\startsetups fo:align:setup + + \XMLval{fo:align}{\XMLop{text-align}}{} + +\stopsetups + +% todo: font-stretch +% +% ultra-condensed +% extra-condensed +% condensed +% semi-condensed +% expanded +% extra-expanded +% ultra-expanded +% +% wider narrower + +\mapXMLvalue {fo:font-size} {xx-small} {\dFOfontsize0.58\dFOfontsize} +\mapXMLvalue {fo:font-size} {x-small} {\dFOfontsize0.69\dFOfontsize} +\mapXMLvalue {fo:font-size} {small} {\dFOfontsize0.83\dFOfontsize} +\mapXMLvalue {fo:font-size} {medium} {\relax} +\mapXMLvalue {fo:font-size} {large} {\dFOfontsize1.20\dFOfontsize} +\mapXMLvalue {fo:font-size} {x-large} {\dFOfontsize1.44\dFOfontsize} +\mapXMLvalue {fo:font-size} {xx-large} {\dFOfontsize1.73\dFOfontsize} + +\mapXMLvalue {fo:font-size} {smaller} {\dFOfontsize0.83\dFOfontsize} +\mapXMLvalue {fo:font-size} {larger} {\dFOfontsize1.20\dFOfontsize} + +\newdimen\dFOfontsize +\newdimen\dFOdepth +\newdimen\dFOheight + +% evt class Times Helvetica + +\definefontsynonym [FO:Times] [Times-Roman] +\definefontsynonym [FO:Times:bold] [Times-Bold] +\definefontsynonym [FO:Times:italic] [Times-Italic] +\definefontsynonym [FO:Times:bold:italic] [Times-BoldItalic] + +\definefontsynonym [FO:Helvetica] [Helvetica] +\definefontsynonym [FO:Helvetica:bold] [Helvetica-Bold] +\definefontsynonym [FO:Helvetica:italic] [Helvetica-Italic] +\definefontsynonym [FO:Helvetica:bold:italic] [Helvetica-BoldItalic] + +\definefontsynonym [FO:Courier] [Courier] +\definefontsynonym [FO:Courier:bold] [Courier-Bold] +\definefontsynonym [FO:Courier:italic] [Courier-Oblique] +\definefontsynonym [FO:Courier:bold:italic] [Courier-BoldOblique] + +\definefontsynonym [FO:Symbol] [ZapfDingbats] + +\definefontsynonym [FO:Computer-Modern-Typewriter] [ComputerModernMono] +\definefontsynonym [FO:Computer-Modern-Typewriter:italic] [ComputerModernMono-Slanted] + +\definefontsynonym [*Times Roman*] [Times] + +% nasty: no FO prefix + +\definefontsynonym [*serif*] [Times] +\definefontsynonym [*sans-serif*] [Helvetica] +\definefontsynonym [*monospace*] [Courier] + +\definefontsynonym [*cursive*] [Times] +\definefontsynonym [*fantasy*] [Helvetica] + +\definefontsynonym [*Arial*] [Helvetica] +\definefontsynonym [*Times Roman*] [Times] +\definefontsynonym [*Wingdings*] [ZapfDingbats] + +% \definefontsynonym [Computer-Modern-Typewriter] [ComputerModernMono] +% \definefontsynonym [monospace] [ComputerModernMono] + +\startsetups fo:fonts:reset + + \dFOfontsize=12pt + + \def\FOfontsize {12pt} + \def\FOfontfamily {Times} + \def\FOfontweight {normal} + \def\FOfontstyle {normal} + \def\FOfontvariant {normal} + \def\FOfontsizeadjust{1} + + \def\FOtextdepth {} + \def\FOtextaltitude {} + \def\FOlineheight {} + + \def\FOfontdefinition{} + \def\FOfontname {} + +\stopsetups + +\directsetup{fo:fonts:reset} + +\def\setFOfontname + {\edef\xFOfontname{FO:\FOfontfamily:\FOfontweight:\FOfontstyle:\FOfontvariant}% + \doifelsefontsynonym\xFOfontname + {\let\FOfontname\xFOfontname} + {\edef\xFOfontname{FO:\FOfontfamily:\FOfontweight:\FOfontstyle}% + \doifelsefontsynonym\xFOfontname + {\let\FOfontname\xFOfontname} + {\edef\xFOfontname{FO:\FOfontfamily:\FOfontstyle}% + \doifelsefontsynonym\xFOfontname + {\let\FOfontname\xFOfontname} + {\edef\xFOfontname{FO:\FOfontfamily:\FOfontweight}% + \doifelsefontsynonym\xFOfontname + {\let\FOfontname\xFOfontname} + {\edef\xFOfontname{FO:\FOfontfamily}% + \doifelsefontsynonym\xFOfontname + {\let\FOfontname\xFOfontname} + {}}}}}} + +% \unprotected \def\doifelseFOfontsynonym#1#2#3#4#5% family weight style variant default +% {\edef\FOfontname +% {\ifcsname\??ff\fontclass FO:#1:#2:#3:#4\endcsname FO:#1:#2:#3:#4% +% \else\ifcsname\??ff\fontclass FO:#1:#2:#3\endcsname FO:#1:#2:#3% +% \else\ifcsname\??ff\fontclass FO:#1:#3\endcsname FO:#1:#3% +% \else\ifcsname\??ff\fontclass FO:#1:#2\endcsname FO:#1:#2% +% \else\ifcsname\??ff\fontclass FO:#1\endcsname FO:#1% +% \else #5% +% \fi\fi\fi\fi\fi}} + +\startsetups fo:font:family:check + + \doifelsefontsynonym{*\FOfontfamily*} + {\expandfontsynonym\FOfontfamily{*\FOfontfamily*}} + {} + +\stopsetups + +\let\FOfont\empty + +\startsetups fo:font:setup + + % todo: optimize, define fonts first time and do that global + + \edefXMLinh\xFOfont {font} + \edefXMLinh\xFOfontsize {font-size} + \edefXMLinh\xFOfontsizeadjust{font-size-adjust} + \edefXMLinh\xFOfontfamily {font-family} + \edefXMLinh\xFOfontweight {font-weight} + \edefXMLinh\xFOfontstyle {font-style} + \edefXMLinh\xFOfontvariant {font-variant} + + \donefalse + + \ifx\xFOfont\empty \else + \let\FOfont\xFOfont + \checkFOfont\FOfont + \fi + + \ifx\xFOfontsize\empty \else + \let\FOfontsize\xFOfontsize + \doifXMLvalelse{fo:font-size}\FOfontsize + {\XMLval{fo:font-size}\FOfontsize\empty} + {\setpercentdimen\dFOfontsize\FOfontsize} + \fi + + \ifx\xFOfontsizeadjust\empty \else + \doifelse\xFOfontsizeadjust{none} + {\def\FOfontsizeadjust{1}} + {\let\FOfontsizeadjust\xFOfontsizeadjust} + \fi + + \ifx\xFOfontfamily\empty \else \ifx\xFOfontfamily\FOfontfamily \else + \donetrue \let\FOfontfamily\xFOfontfamily \directsetup{fo:font:family:check} + \fi \fi + \ifx\xFOfontweight\empty \else \ifx\xFOfontweight\FOfontweight \else + \donetrue \let\FOfontweight\xFOfontweight + \fi \fi + \ifx\xFOfontstyle\empty \else \ifx\xFOfontstyle\FOfontstyle \else + \donetrue \let\FOfontstyle\xFOfontstyle + \fi \fi + \ifx\xFOfontvariant\empty \else \ifx\xFOfontvariant\FOfontvariant \else + \donetrue \let\FOfontvariant\xFOfontvariant + \fi \fi + + \ifdone + \setFOfontname + \edef\xFOfontdefinition{\FOfontname\space at \the\dimexpr(\FOfontsizeadjust\dFOfontsize)} + \else + \edef\xFOfontdefinition{\purefontname{\font} at \the\dimexpr(\FOfontsizeadjust\dFOfontsize)} + \fi + + \ifx\FOfontdefinition\xFOfontdefinition \else + \let\FOfontdefinition\xFOfontdefinition + \expanded{\definedfont[\FOfontdefinition]} + \fi + + \edefXMLop\xFOtextdepth {text-depth} + \edefXMLop\xFOtextaltitude{text-altitude} + \edefXMLop\xFOlineheight {line-height} + + \ifx\xFOtextdepth\empty \else \ifx\xFOtextdepth\FOtextdepth \else + \let\FOtextdepth\xFOtextdepth + \doifnot\FOtextdepth{use-font-metrics} + {\setstrut \dFOdepth=\strutdepth + \setpercentdimen\dFOdepth\FOtextdepth + \setupinterlinespace[mindepth=\dFOdepth]} + \fi \fi + + \ifx\xFOtextaltitude\empty \else \ifx\xFOtextaltitude\FOtextaltitude \else + \let\FOtextaltitude\xFOtextaltitude + \doifnot\FOtextaltitude{use-font-metrics} + {\setstrut \dFOheight=\strutheight + \setpercentdimen\dFOheight\FOtextaltitude + \setupinterlinespace[minheight=\dFOheight]} + \fi \fi + + \ifx\xFOlineheight\empty \else \ifx\xFOlineheight\FOlineheight \else + \let\FOlineheight\xFOlineheight + \doifnot\FOlineheight{use-font-metrics} + {\setstrut \dFOheight=\strutheight + \setpercentdimen\dFOheight\FOlineheight + \setupinterlinespace[line=\dFOheight]} + \fi \fi + +\stopsetups + +\let\orphanpenalty \clubpenalty +\let\orphanpenalties\clubpenalties + +\newcount\FOwidows \FOwidows =2 +\newcount\FOorphans \FOorphans=2 + +\mapXMLvalue {fo:hyphens} {false} {\nohyphens} +\mapXMLvalue {fo:hyphens} {true} {\dohyphens} + +\startsetups fo:hyphenation:setup + + \edefXMLinh\xFOhyphenate {hyphenate} + \edefXMLinh\xFOwidows {widows} + \edefXMLinh\xFOorphans {orphans} + + \ifx\xFOhyphenate\empty \else + \XMLval{fo:hyphens}{\xFOhyphenate}\empty + \fi + \ifx\xFOwidows\empty \else \ifnum\xFOwidows=\FOwidows \else + \FOwidows\xFOwidows \setpenalties\widowpenalties\FOwidows\maxdimen + \fi \fi + \ifx\xFOorphans\empty \else \ifnum\xFOorphans=\FOorphans \else + \FOorphans\xFOorphans \setpenalties\clubpenalties\FOorphans\maxdimen + \fi \fi + + % hyphenation-character + +\stopsetups + +%D fo:block-container + +% todo: potential optimization: set fonts and spacing at container level + +% display-align=, +% intrusion-displace=, +% reference-orientation=, +% writing-mode=, + +\defineXMLenvironment + [fo:block-container] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fe:tracing}, + \XMLattributeset{fo:absolute-positioning}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:margin-block}, + \XMLattributeset{fo:keeps-and-breaks}, + block-progression-dimension=, + inline-progression-dimension=, + clip=, + height=, + overflow=, + span=, + width=, + z-index=] + {\beginXMLelement\directsetup{fo:block-container:start}} + {\directsetup{fo:block-container:stop}\endXMLelement} + +\mapXMLvalue {fo:block-container:start} {absolute} {\directsetup{fo:block-container:start:pos}} +\mapXMLvalue {fo:block-container:start} {fixed} {\directsetup{fo:block-container:start:pos}} + +\mapXMLvalue {fo:block-container:stop} {absolute} {\directsetup{fo:block-container:stop:pos}} +\mapXMLvalue {fo:block-container:stop} {fixed} {\directsetup{fo:block-container:stop:pos}} + +\startsetups fo:block-container:start + + \XMLval{fo:block-container:start}{\XMLpar{fo:block-container}{absolute-position}{}}{} + + \setFOreference{fo:block-container} + +\stopsetups + +\startsetups fo:block-container:stop + + \XMLval{fo:block-container:stop}{\XMLpar{fo:block-container}{absolute-position}{}}{} + +\stopsetups + +% i need to figure out the details (specs are a bit fuzzy) + +% replaced, see position + +\newdimen\FOcontainerW \newdimen\FOcontainerX \newdimen\FOcontainerL \newdimen\FOcontainerR \newdimen\FOcontainerWW +\newdimen\FOcontainerH \newdimen\FOcontainerY \newdimen\FOcontainerT \newdimen\FOcontainerB \newdimen\FOcontainerHH + +\startsetups fo:block-container:start:pos + + % todo: textwidth -> region dimensions + + \begingroup % \forgetall + + \FOcontainerWW\textwidth + \FOcontainerHH\textheight + \def\FOlayername{\XMLpar{fo:flow}{flow-name}{xsl-region-body}} + \directsetup{fo:preset:layer} + + \setlayer + [\XMLpar{fo:flow}{flow-name}{xsl-region-body}] + [width=\FOcontainerW, + height=\FOcontainerH] + + \bgroup + +\stopsetups + +\startsetups fo:block-container:stop:pos + + \egroup + + \endgroup + +\stopsetups + +%D fo:bidi-override + +% \XMLattributeset{aural}, +% color=, +% direction=, +% letter-spacing=, +% line-height=, +% word-spacing=, + +\defineXMLenvironment + [fo:bidi-override] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:font}, + \XMLattributeset{fo:relative-position}, + score-spaces=, + unicode-bidi=] + {\beginXMLelement} + {\endXMLelement} + +% todo + +%D fo:character + +% \XMLattributeset{fo:aural}, +% color=, +% glyph-orientation-horizontal=, +% glyph-orientation-vertical=, +% line-height=, + +\defineXMLsingular + [fo:character] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fe:tracing}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:font}, + \XMLattributeset{fo:hyphenation}, + \XMLattributeset{fo:margin-inline}, + \XMLattributeset{fo:relative-position}, + \XMLattributeset{fo:character}, + alignment-adjust=, + baseline-shift=, + dominant-baseline=, + text-depth=, + text-altitude=, + keep-with-next=, + keep-with-previous=, + score-spaces=, + visibility=] + {\directsetup{fo:character:process}} + +\mapXMLvalue {fo:vertical-align} {baseline} {\hbox} +\mapXMLvalue {fo:vertical-align} {sub} {\low} +\mapXMLvalue {fo:vertical-align} {super} {\high} +\mapXMLvalue {fo:vertical-align} {inherit} {\firstofoneargument} + +\startsetups fo:character:process + + % border + % font + % margin + % positioning + % baseline + % color + % depth and altitude + % keep-with + % lineheight + + \dontleavehmode \begingroup + + \directsetup{fe:setup} + \directsetup{fo:font:setup} + + \iftracingFO \ruledhbox \else \hbox \fi \bgroup + + \doifsomethingXMLop{vertical-align} + {\doifXMLvalelse{fo:vertical-align}{\XMLop{vertical-align}} + {\XMLval{fo:vertical-align}{\XMLop{vertical-align}}{}} + {\wordshiftamount\lineheight + \setpercentdimen\wordshiftamount{\XMLop{vertical-align}} + \shiftedword}} + + {\directsetup{fo:character:orient}} + + \egroup \endgroup + +\stopsetups + +\startsetups fo:character:orient + + \doifsomethingXMLop{glyph-orientation-horizontal} + {\rotate[rotation=-\XMLop{glyph-orientation-horizontal}]} + + {\XMLop{character}} + +\stopsetups + +%D fo:initial-property-set + +% \XMLattributeset{fo:aural}, +% color=, +% letter-spacing=, +% line-height=, +% text-transform=, +% word-spacing=, + +\defineXMLprocess + [fo:initial-property-set] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:font}, + \XMLattributeset{fo:relative-position}, + score-spaces=, + text-decoration=, + text-shadow=] + +%D fo:external-graphic + +\useMPlibrary[dum] + +% \XMLattributeset{fo:aural}, +% display-align=, +% line-height=, +% text-align=, + +\defineXMLenvironmentsave + [fo:external-graphic] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:margin-inline}, + \XMLattributeset{fo:relative-position}, + alignment-adjust=, + alignment-baseline=, + baseline-shift=, + block-progression-dimension=, + clip=, + content-height=, + content-type=, + content-width=, + dominant-baseline=, + height=, + inline-progression-dimension=, + keep-with-next=, + keep-with-previous=, + overflow=, + scaling=, + scaling-method=, + src=dummy, + width=] + {} + {\directsetup{fo:external-graphic:process}} + +\newdimen\FOgraphicwidth +\newdimen\FOgraphicheight + +\mapXMLvalue {external-graphic:align} {top} {\tbox} +\mapXMLvalue {external-graphic:align} {bottom} {\bbox} +\mapXMLvalue {external-graphic:align} {center} {\cbox} + +\startsetups fo:external-graphic:process + + \doifelsenothing{\XMLop{content-height}} + {\FOgraphicheight\zeropoint} + {\doifelse{\XMLop{content-height}}{auto} + {\FOgraphicheight\zeropoint} + {\FOgraphicheight\lineheight + \setpercentdimen\FOgraphicheight{\XMLop{content-height}}}} + + \doifelsenothing{\XMLop{content-width}} + {\FOgraphicwidth\zeropoint} + {\doifelse{\XMLop{content-width}}{auto} + {\FOgraphicheight\zeropoint} + {\FOgraphicwidth1em + \setpercentdimen\FOgraphicwidth {\XMLop{content-width}}}} + + % leeg maken vars gaat ook goed, dan een \externalfigure + + \setbox\scratchbox\hbox + {\ifdim\FOgraphicheight>\zeropoint + \ifdim\FOgraphicwidth>\zeropoint + \externalfigure[\XMLop{src}][height=\FOgraphicheight,width=\FOgraphicwidth] + \else + \externalfigure[\XMLop{src}][height=\FOgraphicheight] + \fi + \else + \ifdim\FOgraphicwidth>\zeropoint + \externalfigure[\XMLop{src}][width=\FOgraphicwidth] + \else + \externalfigure[\XMLop{src}] + \fi + \fi} + + \XMLval{external-graphic:align}{\XMLop{vertical-align}}{}{\box\scratchbox} + +\stopsetups + +%D fo:instream-foreign-object + +% like external-graphic, only no src + +% \XMLattributeset{fo:aural}, +% display-align=, +% line-height=, +% text-align=, + +\defineXMLprocess + [fo:instream-foreign-object] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:margin-inline}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:relative-position}, + alignment-adjust=, + alignment-baseline=, + baseline-shift=, + block-progression-dimension=, + clip=, + content-height=, + content-type=, + content-width=, + dominant-baseline=, + height=, + inline-progression-dimension=, + keep-with-next=, + keep-with-previous=, + overflow=, + scaling=, + scaling-method=, + width=] + +%D Element: fo:inline + +% \XMLattributeset{fo:aural}, +% line-height=, +% wrap-option=, +% color=, +% keep-together=, + +\defineXMLnestedenvironmentsave + [fo:inline] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:font}, + \XMLattributeset{fo:margin-inline}, + \XMLattributeset{fo:relative-position}, + alignment-adjust=, + alignment-baseline=, + baseline-shift=, + block-progression-dimension=, + dominant-baseline=, + height=, + inline-progression-dimension=, + keep-with-next=, + keep-with-previous=, + text-decoration=, + visibility=, + width=] + {\beginXMLelement} + {\directsetup{fo:inline:process}\endXMLelement} + +% baseline-shift: baseline sub super % dimen inherit + +\chardef\isolatedwordsmode=1 + +\newdimen\wordshiftamount + +\def\shiftedword{\raise\wordshiftamount\hbox} + +\def\shiftedwords#1{\processisolatedwords{#1}\shiftedword} +\def\normalwords #1{\processisolatedwords{#1}\hbox} +\def\highwords #1{\processisolatedwords{#1}\high} +\def\lowwords #1{\processisolatedwords{#1}\low} + +\mapXMLvalue {fo:baseline-shift} {baseline} {\normalwords} +\mapXMLvalue {fo:baseline-shift} {sub} {\lowwords} +\mapXMLvalue {fo:baseline-shift} {super} {\highwords} +\mapXMLvalue {fo:baseline-shift} {inherit} {\firstofoneargument} + +\startsetups fo:inline:process + + \directsetup{fo:position:start} + + \dontleavehmode + + \begingroup + + \directsetup{fe:setup} + \directsetup{fo:space:start} + + \begingroup + + \directsetup{fo:hyphenation:setup} + \directsetup{fo:font:setup} + + \doifelsenothing{\XMLop{baseline-shift}} + {\XMLflushself} + {\doifXMLvalelse{fo:baseline-shift}{\XMLop{baseline-shift}} + {\XMLval{fo:baseline-shift}{\XMLop{baseline-shift}}{}{\XMLflushself}} + {\wordshiftamount\lineheight + \setpercentdimen\wordshiftamount{\XMLop{baseline-shift}} + \shiftedwords{\XMLflushself}}} + + \endgroup + + \directsetup{fo:space:end} + + \endgroup + + \directsetup{fo:position:stop} + +\stopsetups + +\startsetups fo:position:start + \begingroup + \directsetup{fo:position:\XMLop{position}:start} + \begingroup +\stopsetups + +\startsetups fo:position:stop + \endgroup + \directsetup{fo:position:\XMLop{position}:stop} + \endgroup +\stopsetups + +\startsetups fo:position:static:start +\stopsetups + +\startsetups fo:position:static:stop +\stopsetups + +\startsetups fo:position:fixed:start + \FOcontainerWW\paperwidth + \FOcontainerHH\paperheight + \def\FOlayername{regions} + \directsetup{fo:preset:layer} + \setlayer[regions]{\vbox \bgroup \setlocalhsize} +\stopsetups + +\startsetups fo:position:fixed:stop + \egroup +\stopsetups + +\positioningpartrue \positioningtrue + +\startsetups fo:position:absolute:start + \setbox\FOpositionbox\hbox\bgroup +\stopsetups + +\startsetups fo:position:absolute:stop + \egroup + % evt uitstellen tot otr, zodat text/realfolio is solved + \edef\FOpartag{p:\parposcounter} + \edef\FOtxttag{text:\realfolio} + \FOcontainerWW\MPplus\FOpartag{1}{0pt} + \FOcontainerHH\zeropoint % todo: add anchors to each 'object' + \directsetup{fo:preset:position} + \setlayer + [xsl-region-body] + [preset=lefttop, + hoffset=\dimexpr(\MPx\FOtxttag-\MPx\FOpartag), + voffset=\dimexpr(\MPy\FOtxttag+\MPh\FOtxttag-\MPy\FOpartag-\MPh\FOpartag)] + {\iftracingFO \ruledhbox \bgroup \fi + \offset + [method=fixed, + leftoffset=\FOcontainerL, + rightoffset=\FOcontainerR, + topoffset=\FOcontainerT, + bottomoffset=\FOcontainerB] + {\box\FOpositionbox} + \iftracingFO \egroup \fi} +\stopsetups + +\newbox\FOpositionbox + +\startsetups fo:position:relative:start + \setbox\FOpositionbox\hbox\bgroup +\stopsetups + +\startsetups fo:position:relative:stop + \egroup + \FOcontainerWW\wd\FOpositionbox + \FOcontainerHH\dimexpr(\ht\FOpositionbox+\dp\FOpositionbox) + \directsetup{fo:preset:position} + \iftracingFO \ruledhbox \bgroup \fi + \offset + [method=fixed, + leftoffset=\FOcontainerL, + rightoffset=\FOcontainerR, + topoffset=\FOcontainerT, + bottomoffset=\FOcontainerB] + {\box\FOpositionbox} + \iftracingFO \egroup \fi +\stopsetups + +% + +\startsetups fo:preset:position + + \FOcontainerW\zeropoint \FOcontainerL\zeropoint \FOcontainerR\zeropoint + \FOcontainerH\zeropoint \FOcontainerT\zeropoint \FOcontainerB\zeropoint + + \doifnot{\XMLop{left}} {auto}{\FOcontainerL\FOcontainerWW\setpercentdimen\FOcontainerL{\XMLop{left}}} + \doifnot{\XMLop{right}} {auto}{\FOcontainerR\FOcontainerWW\setpercentdimen\FOcontainerR{\XMLop{right}}} + \doifnot{\XMLop{top}} {auto}{\FOcontainerT\FOcontainerHH\setpercentdimen\FOcontainerT{\XMLop{top}}} + \doifnot{\XMLop{bottom}}{auto}{\FOcontainerB\FOcontainerHH\setpercentdimen\FOcontainerB{\XMLop{bottom}}} + + \doifnot{\XMLop{width}} {auto}{\FOcontainerW\FOcontainerWW\setpercentdimen\FOcontainerW{\XMLop{width}}} + \doifnot{\XMLop{height}}{auto}{\FOcontainerH\FOcontainerHH\setpercentdimen\FOcontainerH{\XMLop{height}}} + +\stopsetups + +\startsetups fo:preset:layer + + \directsetup{fo:preset:position} + + \setuplayer + [\FOlayername] + [width=\FOcontainerWW, + height=\FOcontainerHH] + + \ifzeropt\FOcontainerW + \FOcontainerW\dimexpr(\FOcontainerWW-\FOcontainerL-\FOcontainerR) + \fi + \ifzeropt\FOcontainerH + \FOcontainerH\dimexpr(\FOcontainerHH-\FOcontainerT-\FOcontainerB) + \fi + + \ifzeropt\FOcontainerB + \ifzeropt\FOcontainerL + \setuplayer[\FOlayername][preset=righttop, x=\FOcontainerR,y=\FOcontainerT] + \else + \setuplayer[\FOlayername][preset=lefttop, x=\FOcontainerL,y=\FOcontainerT] + \fi + \else + \ifzeropt\FOcontainerL + \setuplayer[\FOlayername][preset=rightbottom,x=\FOcontainerR,y=\FOcontainerB] + \else + \setuplayer[\FOlayername][preset=leftbottom, x=\FOcontainerL,y=\FOcontainerB] + \fi + \fi + +\stopsetups + +%D Element: fo:inline-container + +% display-align=, +% line-height=, +% reference-orientation=, +% writing-mode=, +% keep-together=, + +\defineXMLenvironment + [fo:inline-container] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:margin-inline}, + \XMLattributeset{fo:relative-position}, + alignment-adjust=, + alignment-baseline=, + baseline-shift=, + block-progression-dimension=, + clip=, + dominant-baseline=, + height=, + inline-progression-dimension=, + keep-with-next=, + keep-with-previous=, + overflow=, + width=] + {\beginXMLelement\begingroup} + {\endgroup\endXMLelement} + +%D Element: fo:leader + +% also a kind of fake fill + +% \XMLattributeset{fo:aural}, +% color=, +% line-height=, +% word-spacing=, + +\defineXMLenvironmentsave + [fo:leader] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:font}, + \XMLattributeset{fo:margin-inline}, + \XMLattributeset{fo:relative-position}, + \XMLattributeset{fo:leader-and-rule}, + alignment-adjust=, + alignment-baseline=, + baseline-shift=, + dominant-baseline=, + text-depth=, + text-altitude=, + keep-with-next=, + keep-with-previous=, + letter-spacing=, + text-shadow=, + visibility=] + {\beginXMLelement} + {\directsetup{fo:leader:process}\endXMLelement} + +\mapXMLvalue {fo:leader-pattern} {space} {\hfill} +\mapXMLvalue {fo:leader-pattern} {dots} {.} +\mapXMLvalue {fo:leader-pattern} {rule} {\hrulefill} +\mapXMLvalue {fo:leader-pattern} {use-content} {\XMLflushself} + +% todo: speed up + +\startsetups fo:leader:process + + % \tracebackXMLattribute{leader-pattern-width} + + \strut \leaders + +% \hbox to \XMLop{leader-pattern-width} +% {\hss\XMLval{fo:leader-pattern}{\XMLop{leader-pattern}}{\hfill}\hss} + + \hbox to \XMLinh{leader-pattern-width} + {\hss\XMLval{fo:leader-pattern}{\XMLinh{leader-pattern}}{\hfill}\hss} + + \hfill \strut + +\stopsetups + +%D Element: fo:pagenumber + +% \XMLattributeset{fo:aural}, +% line-height=, +% wrap-option=, +% letter-spacing=, +% text-transform=, +% word-spacing=, + +\defineXMLsingular + [fo:page-number] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:font}, + \XMLattributeset{fo:margin-inline}, + \XMLattributeset{fo:relative-position}, + alignment-adjust=, + alignment-baseline=, + baseline-shift=, + dominant-baseline=, + keep-with-next=, + keep-with-previous=, + score-spaces=, + text-altitude=, + text-decoration=, + text-depth=, + text-shadow=, + visibility=] + {\directsetup{fo:page-number:process}} + +\newcount\FOpnrefcounter + +\startsetups fo:page-number:process + + \doifelsenothing{\XMLpar{fo:page-sequence}{format}{}} + {\pagenumber} + {\ifinotr + \globallet\FOpnrefnumber\folio + \else + \global\advance\FOpnrefcounter\plusone + \pagereference[pnref:\the\FOpnrefcounter]% + \doifreferencefoundelse{pnref:\the\FOpnrefcounter} + {\globallet\FOpnrefnumber\currentfolioreference}% + {\globallet\FOpnrefnumber\folio}% + \fi + \expanded{\handletokens\XMLpar{fo:page-sequence}{format}{}}\with{\handleFOformat{\FOpnrefnumber}}} + +\stopsetups + +\def\handleFOformat#1#2% + {\convertargument#2\to\ascii + \doifconversiondefinedelse\ascii{\convertnumber\ascii{#1}}{#2}} + +%D Element: fo:pagenumber-citation + +% same as page-number + +% \XMLattributeset{fo:aural}, +% line-height=, +% wrap-option=, +% letter-spacing=, +% text-transform=, +% word-spacing=, + +\defineXMLsingular + [fo:page-number-citation] + [\XMLattributeset{fo:inherited}, + id=, + ref-id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:font}, + \XMLattributeset{fo:margin-inline}, + \XMLattributeset{fo:relative-position}, + alignment-adjust=, + alignment-baseline=, + baseline-shift=, + dominant-baseline=, + keep-with-next=, + keep-with-previous=, + score-spaces=, + text-altitude=, + text-decoration=, + text-depth=, + text-shadow=, + visibility=] + {\directsetup{fo:page-number-citation:process}} + +\startsetups fo:page-number-citation:process + + \doifreferencefoundelse{\XMLop{ref-id}} + {\globallet\FOpnrefnumber\currentfolioreference + \globallet\FOpnrefformat\currenttextreference} + {\gdef\FOpnrefnumber{?} + \gdef\FOpnrefformat{}} + + \doifelsenothing{\FOpnrefformat} + {\FOpnrefnumber} + {\expanded{\handletokens\FOpnrefformat}\with{\handleFOformat{\FOpnrefnumber}}} + +\stopsetups + +%D Element: fo:table-and-caption + +% \XMLattributeset{fo:aural}, +% text-align=, +% caption-side=, +% intrusion-displace=, +% keep-together=, + +\defineXMLenvironment + [fo:table-and-caption] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:margin-block}, + \XMLattributeset{fo:relative-position}, + break-after=, + break-before=, + keep-with-next=, + keep-with-previous=] + {\beginXMLelement} + {\endXMLelement} + +%D Element: fo:table fo:table-caption fo:table-header fo:table-footer +%D to:table-column fo:table-body fo:table-row fo:table-cell + +% \XMLattributeset{fo:aural}, +% border-collapse=, +% border-separation=, +% intrusion-displace=, +% keep-together=, +% writing-mode=, + +\defineXMLenvironment + [fo:table] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:margin-block}, + \XMLattributeset{fo:relative-position}, + block-progression-dimension=, + border-after-precedence=, + border-before-precedence=, + border-start-precedence=, + border-end-precedence=, + break-after=, + break-before=, + inline-progression-dimension=, + height=, + keep-with-next=, + keep-with-previous=, + table-layout=, + table-omit-footer-at-break=, + table-omit-header-at-break=, + width=] + {\beginXMLelement + \bTABLE % [option=stretch] % + \newcounter\FOtablecolumn} + {\eTABLE + \endXMLelement} + +\newdimen\FOtableW + +\defineXMLsingular + [fo:table-column] + [\XMLattributeset{fo:inherited}, + \XMLattributeset{fo:border-padding-background}, % only background, not the rest, make subset + border-after-precedence=, + border-before-precedence=, + border-end-precedence=, + border-start-precedence=, + column-width=, + column-number=, + number-columns-repeated=, + number-columns-spanned=, + visibility=] + {\doifelsenothing{\XMLop{column-number}} + {\increment\FOtablecolumn} + {\edef\FOtablecolumn{\XMLop{column-number}}% + \expanded{\setupTABLE[column][\FOtablecolumn][n=\FOtablecolumn]}}% + \doifsomething{\XMLop{column-width}} + {\setlocalhsize\FOtableW\localhsize + \setpercentdimen\FOtableW{\XMLop{column-width}}% + \expanded{\setupTABLE[column][\FOtablecolumn][width=\FOtableW]}}} + +% \XMLattributeset{fo:aural}, +% intrusion-displace=, +% keep-together=, + +\defineXMLprocess + [fo:table-caption] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:relative-position}, + block-progression-dimension=, + height=, + inline-progression-dimension=, + width=] + +% \XMLattributeset{fo:aural}, + +\defineXMLnested + [fo:table-header] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:relative-position}, + border-after-precedence=, + border-before-precedence=, + border-end-precedence=, + border-start-precedence=, + visibility=] + {\beginXMLelement\bTABLEfoot} + {\eTABLEfoot\endXMLelement} + +% \XMLattributeset{fo:aural}, + +\defineXMLnested + [fo:table-footer] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:relative-position}, + border-after-precedence=, + border-before-precedence=, + border-end-precedence=, + border-start-precedence=, + visibility=] + {\beginXMLelement\bTABLEhead} + {\eTABLEhead\endXMLelement} + +% \XMLattributeset{fo:aural}, + +\defineXMLnested + [fo:table-body] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:relative-position}, + border-after-precedence=, + border-before-precedence=, + border-end-precedence=, + border-start-precedence=, + visibility=] + {\beginXMLelement\bTABLEbody} + {\eTABLEbody\endXMLelement} + +% TODO: when stretch and when not + +% \XMLattributeset{fo:aural}, +% keep-together=, + +\defineXMLnested + [fo:table-row] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:relative-position}, + border-after-precedence=, + border-before-precedence=, + border-end-precedence=, + border-start-precedence=, + break-after=, + break-before=, + height=, + keep-with-next=, + keep-with-previous=, + visibility=] + {\beginXMLelement\bTR} + {\eTR\endXMLelement} + +% \XMLattributeset{fo:aural}, +% display-align=, +% relative-align=, +% empty-cells=, + +\defineXMLnested + [fo:table-cell] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:relative-position}, + border-after-precedence=, + border-before-precedence=, + border-end-precedence=, + border-start-precedence=, + column-number=, + ends-row=, + height=, + inline-progression-dimension=, + number-columns-spanned=1, + number-rows-spanned=1, + starts-row=, + width=] + {\doif{\XMLop{starts-row}}{true}{\bTR}% + \doifelsenothing{\XMLop{background-color}} + {\let\FoTableBG\empty} + {\checkhexcolor[\XMLop{background-color}]% + \doifcolorelse{\XMLop{background-color}} + {\def\FoTableBG{color}} + {\setXMLpar{fo:table-cell}{background-color}{}% + \let\FoTableBG\empty}}% + \expanded{\bTD[nx=\XMLop{number-columns-spanned},ny=\XMLop{number-rows-spanned},% + offset=\XMLop{padding},n=\XMLop{column-number}, + align={normal,lohi},background=\FoTableBG,backgroundcolor=\XMLop{background-color}]}% + % better as align=... + \setups{fo:align:setup}% + \ignorespaces} + {\removeunwantedspaces + \eTD + \doif{\XMLop{ends-row}}{true}{\eTR}} + +%D Element: fo:list-block fo:list-item fo:list-body fo:list-item-label + +% \XMLattributeset{fo:aural}, +% intrusion-displace=, +% keep-together=, +% provisional-distance-between-starts=24pt, +% provisional-label-separation=6pt, + +\defineXMLenvironment + [fo:list-block] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fe:tracing}, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:margin-block}, + \XMLattributeset{fo:relative-position}, + break-after=, + break-before=, + keep-with-next=, + keep-with-previous=, + space-between-list-rows=] % ? mentioned in bradley + {\beginXMLelement\directsetup{fo:list:start}} + {\directsetup{fo:list:stop}\endXMLelement} + +\startsetups fo:list:start + \endgraf + \begingroup + \directsetup{fe:setup} + \disablemode[fo:in-list] + % \forgetall, no! + \directsetup{fo:space:before} + \begingroup +\stopsetups + +\startsetups fo:list:stop + \endgraf + \endgroup + \directsetup{fo:space:after} + \endgroup +\stopsetups + +% \XMLattributeset{fo:aural}, +% relative-align=, +% intrusion-displace=, +% keep-together=, + +\defineXMLenvironment + [fo:list-item] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fe:tracing}, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:margin-block}, + \XMLattributeset{fo:relative-position}, + break-after=, + break-before=, + keep-with-next=, + keep-with-previous=] + {\beginXMLelement\directsetup{fo:list-item:start}} + {\directsetup{fo:list-item:stop}\endXMLelement} + +% check what is needed + +\newdimen\FOlistitemlabelhsize \newdimen\FOlistitembodyhsize +\newdimen\FOlistitemlabelleftskip \newdimen\FOlistitembodyleftskip +\newdimen\FOlistitemlabelrightskip \newdimen\FOlistitembodyrightskip + +% keep-together=, + +\defineXMLnestedsave + [fo:list-item-body] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}] + +% keep-together=, + +\defineXMLnestedsave + [fo:list-item-label] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}] + +\startsetups fo:list-item:start + + \bgroup + + \startmode[fo:in-list] + + \doifsomething{\XMLpar{fo:list-block}{space-between-list-rows}{}} + {\vskip\XMLpar{fo:list-block}{space-between-list-rows}{}} % todo ! ! ! ! + + \stopmode + + \enablemode[fo:in-list] + +\stopsetups + +\startsetups fo:list-item:stop + + % 24 pt en 6pt in fo:root instellen + + \edefXMLinh \FOprodis {provisional-distance-between-starts} + \edefXMLinh \FOprolab {provisional-label-separation} + + \FOlistitemlabelhsize \ifx\FOprodis\empty 24pt\else \FOprodis\fi + \FOlistitemlabelrightskip\ifx\FOprolab\empty 6pt\else \FOprolab\fi + + \edefXMLinh \FOstartindent {start-indent} + \edefXMLinh \FOendindent {end-indent} + +% \FOlistitemlabelleftskip \ifx\FOstartindent\empty 0pt\else \FOstartindent\fi +% \FOlistitembodyrightskip \ifx\FOendindent \empty 0pt\else \FOendindent \fi + + \advance\leftskip \FOlistitemlabelleftskip + \advance\leftskip \FOlistitemlabelhsize + \advance\leftskip \FOlistitemlabelrightskip + + \advance\rightskip\FOlistitembodyrightskip + + \setupparagraphintro[first][\directsetup{fo:list-item-label:process}] + \setupparagraphintro[next] [\begstrut\resetpenalties\clubpenalties] + \XMLflush{fo:list-item-body}\endstrut + + \egroup + +\stopsetups + +\newbox\FOitembox + +\startsetups fo:list-item-label:process + + \setbox \FOitembox \iftracingFO \ruledvtop \else \vtop \fi \bgroup + \forgetall + \postponefootnotes + \hsize\FOlistitemlabelhsize + \XMLflush{fo:list-item-label} + \egroup + \getnoflines{\dimexpr(\ht\FOitembox+\dp\FOitembox)} + \setpenalties\clubpenalties\noflines\maxdimen + \strut\llap{\box\FOitembox\hskip\FOlistitemlabelrightskip} + +\stopsetups + +% \setlocalhsize \hsize\localhsize + +%D Element: fo:basic-link + +% \XMLattributeset{fo:aural}, +% keep-together=, +% line-height=, + +\defineXMLenvironmentsave + [fo:basic-link] + [\XMLattributeset{fo:inherited}, + id=, + \XMLattributeset{fo:accessibility}, + \XMLattributeset{fo:border-padding-background}, + \XMLattributeset{fo:margin-inline}, + \XMLattributeset{fo:relative-position}, + alignment-adjust=, + alignment-baseline=, + baseline-shift=, + destination-placement-offset=, + dominant-baseline=, + external-destination=, + indicate-destination=, + internal-destination=, + keep-with-next=, + keep-with-previous=, + show-destination=, + target-processing-context=, + target-presentation-context=, + target-stylesheet=] + {} + {\directsetup{fo:basic-link}} + +\startsetups fo:basic-link + + \goto{\XMLflushself}[unknown] + +\stopsetups + +%D Element: fo:multi-switch fo:multi-case fo:multi-toggle fo:multi-properties fo:multi-property-set + +\defineXMLprocess[fo:multi-switch] +\defineXMLprocess[fo:multi-case] +\defineXMLprocess[fo:multi-toggle] +\defineXMLprocess[fo:multi-properties] +\defineXMLprocess[fo:multi-property-set] + +%D Element: fo:float + +\defineXMLenvironmentsave + [fo:float] + [\XMLattributeset{fo:inherited}, + float=before, + clear=] + {} + {\directsetup{fo:float:process}} + +% clear: start end left right both none inherit +% float: before start end left right none + +\mapXMLvalue {fo:float-position} {before} {here} % todo +\mapXMLvalue {fo:float-position} {start} {here} % todo +\mapXMLvalue {fo:float-position} {end} {here} % todo +\mapXMLvalue {fo:float-position} {left} {left} +\mapXMLvalue {fo:float-position} {right} {right} +\mapXMLvalue {fo:float-position} {none} {here} % todo + +\startsetups fo:float:process + + \placefigure + [\XMLval{fo:float-position}{\XMLop{float}},none] + {} + {\XMLflushself} + +\stopsetups + +%D Element: fo:footnote fo:footnote-body + +% Let's assume that 'whatever' contains the number or footnote marker. +% +% whatevernote + +% todo xsl-footnote area + +\defineXMLprocess + [fo:footnote] + [\XMLattributeset{fo:accessibility}] + +\defineXMLargument + [fo:footnote-body] + [\XMLattributeset{fo:accessibility}] + {\footnote[-]} + +%D Element: fo:wrapper + +\defineXMLenvironment % todo: all inheritable + [fo:wrapper] + [\XMLattributeset{fo:inherited},\XMLattributeset{fe:tracing}, + \XMLattributeset{fo:fonts}, + \XMLattributeset{fo:hyphenation}] + {\beginXMLelement\begingroup\directsetup{fo:wrapper}} + {\endgroup\endXMLelement} + +\startsetups fo:wrapper + + \directsetup{fe:setup} + \directsetup{fo:hyphenation:setup} + \directsetup{fo:font:setup} + +\stopsetups + +%D Element: fo:marker fo:retrieve-marker + +% In order to support 'retrieve-boundary' (page, page-sequence, +% document) I need to extend the context mark handler. + +% This object will probably interfere with a too spacy layout since +% it is unaware if its surrounding. + +\defineXMLenvironmentsave + [fo:marker] + [marker-class-name=unknown] + {} + {\directsetup{fo:marker:process}} + +\startsetups fo:marker:process + + \doifmarkingelse{fo:\XMLop{marker-class-name}} + {} {\definerawmarking[fo:\XMLop{marker-class-name}]} + + \expanded{\marking[fo:\XMLop{marker-class-name}]{\XMLflushself}} + +\stopsetups + +\defineXMLcommand + [fo:retrieve-marker] + [retrieve-class-name=unknown, + retrieve-position=first-starting-within-page, + retrieve-boundary=] + {\directsetup{fo:retrieve-marker:process}} + +\mapXMLvalue {fo:marker-position} {first-starting-within-page} {first} % first mark +\mapXMLvalue {fo:marker-position} {first-including-carryover} {previous} % top mark +\mapXMLvalue {fo:marker-position} {last-starting-within-page} {first} % dunno +\mapXMLvalue {fo:marker-position} {last-ending-within-page} {last} % bot mark + +\startsetups fo:retrieve-marker:process + + \expanded{\getmarking + [fo:\XMLop{retrieve-class-name}] + [\XMLval{fo:marker-position}{\XMLop{retrieve-position}}{first}]} + +\stopsetups + +%D Auxiliary macros + +\unprotect + +\def\noFOchecks#1\od{} + +\def\FOassignskip#1#2#3% + {\edef\!!stringa{\XMLpar{#1}{#2}\empty}% + \edef\!!stringb{\XMLpar{#1}{#2.optimum}\empty}% + \edef\!!stringc{\XMLpar{#1}{#2.minimum}\empty}% + \edef\!!stringd{\XMLpar{#1}{#2.maximum}\empty}% + \dimen0=\ifx\!!stringa\empty\zeropoint\else\!!stringa\fi + \dimen2=\ifx\!!stringb\empty\dimen0 \else\!!stringb\fi + \dimen4=\dimexpr(\ifx\!!stringd\empty\dimen0 \else\!!stringd\fi-\dimen2)\relax + \dimen6=\dimexpr(\ifx\!!stringc\empty\dimen0 \else\!!stringc\fi-\dimen2)\relax + #3=\dimen2 \ifzeropt\dimen4 \else\!!plus\dimen4 \fi\ifzeropt\dimen6 \else\!!minus\dimen6 \fi\relax} + +\mapXMLvalue{fo:space:conditionality} {retain} {\let\next\retainedskip } +\mapXMLvalue{fo:space:conditionality} {discard} {\let\next\discardedskip} +\mapXMLvalue{fo:space:conditionality} {} {\let\next\discardedskip} + +\mapXMLvalue{fo:space:precedence} {force} {\let\next\forcedskip} + +\def\FOdoskip#1#2% + {\begingroup + \iftracingFO\showskips\fi + \FOassignskip{#1}{#2}\scratchskip + \XMLval{fo:space:conditionality}{\XMLpar{#1}{#2.conditionality}\empty}\empty + \XMLval{fo:space:precedence}{\XMLpar{#1}{#2.precedence}\empty}\empty + \ifdim\scratchskip=\zeropoint + \ifdim\gluestretch\scratchskip=\zeropoint + \ifdim\glueshrink\scratchskip=\zeropoint + \let\next\gobbleoneargument + \fi + \fi + \fi + \next\scratchskip + \endgroup} + +\def\doFObeforeskip#1{\FOdoskip{#1}{space-before}} +\def\doFOafterskip #1{\FOdoskip{#1}{space-after}} + +\def\FOassignspace#1#2#3% + {\edef\!!stringa{\XMLpar{#1}{#2}\empty}% + \ifx\!!stringa\empty + #3=\zeropoint + \else + #3=1em% ? + \setpercentdimen#3\!!stringa + \fi + \relax} + +\def\FOdospace#1#2% + {\begingroup + \iftracingFO\showskips\fi + \FOassignspace{#1}{#2}\scratchskip + \ifdim\scratchskip=\zeropoint \else + \hskip\scratchskip + \fi + \endgroup} + +\def\doFOstartspace#1{\FOdospace{#1}{space-start}} +\def\doFOendspace #1{\FOdospace{#1}{space-end}} + +\def\checkFOborder#1#2% + {\edef\FOattribute{\XMLpar{#1}{border-#2}\empty}% + \ifx\FOattribute\empty\else + \edef\FOtag{#1}% + \edef\FOatt{border-#2}% + \expanded{\docheckFOborder\FOattribute\space\relax\space\relax}\od + \fi} + +\def\docheckFOborder#1#2 #3% + {\ifx#1\relax + \expandafter\noFOchecks + \else + \doifhexcolorelse{#1#2} + {\setXMLpar\FOtag{\FOatt-color}{#1#2}} + {\doifelsenothing{\XMLval{fo:border-style}{#1#2}\empty} + {\doifcolorelse{#1#2} + {\setXMLpar\FOtag{\FOatt-color}{#1#2}} + {\setXMLpar\FOtag{\FOatt-width}{#1#2}}} + {\setXMLpar\FOtag{\FOatt-style}{#1#2}}}% + \expandafter\docheckFOborder + \fi#3} + +\def\checkFOposition#1#2% + {\edef\FOattribute{\XMLpar{#1}{#2-position}\empty}% + \ifx\FOattribute\empty\else + \edef\FOtag{#1}% + \edef\FOatt{#2-position}% + \scratchcounter\zerocount + \expanded{\docheckFOposition\FOattribute\space\relax\space\relax}\od + \fi} + +\def\docheckFOposition#1#2 #3% + {\ifx#1\relax + \expandafter\noFOchecks + \else + \advance\scratchcounter\plusone + \ifcase\scratchcounter + \or + \setXMLpar\FOtag{\FOatt-vertical}{#1#2}% + \or + \setXMLpar\FOtag{\FOatt-horizontal}{#1#2}% + \fi + \expandafter\docheckFOposition + \fi#3} + +\def\checkFOpadding#1% + {\edef\FOattribute{\XMLpar{#1}{padding}\empty}% + \ifx\FOattribute\empty\else + \edef\FOtag{#1}% + \edef\FOatt{padding}% + \scratchcounter\zerocount + \expanded{\docheckFOpadding\FOattribute\space\relax\space\relax}\od + \fi} + +\def\docheckFOpadding#1#2 #3% + {\ifx#1\relax + \expandafter\noFOchecks + \else + \advance\scratchcounter\plusone + \ifcase\scratchcounter + \or + \setXMLpar\FOtag{\FOatt-top}{#1#2}% + \or + \setXMLpar\FOtag{\FOatt-bottom}{#1#2}% + \or + \setXMLpar\FOtag{\FOatt-left}{#1#2}% + \or + \setXMLpar\FOtag{\FOatt-right}{#1#2}% + \fi + \expandafter\docheckFOpadding + \fi#3} + +% \def\setFOimagename#1% +% {\edef\FOimagename{#1}% +% \aftersplitstring \FOimagename\at url('\to\xFOimagename +% \ifx\xFOimagename\empty \else +% \beforesplitstring\xFOimagename\at ')\to\FOimagename +% \fi +% \aftersplitstring \FOimagename\at url("\to\xFOimagename +% \ifx\xFOimagename\empty \else +% \beforesplitstring\xFOimagename\at ")\to\FOimagename +% \fi} +% +% let's overkill: + +\def\setFOimagename#1% + {\analyzefunction{#1}% + \doifelse\functionname{url} + {\edef\FOimagename{\@EA\unstringed\functionA}} + {\ifx\functionname\empty + \def\FOimagename{#1}% + \else + \def\FOimagename{dummy}% + \fi}} + +% font + +\mapXMLvalue {fo:weight} {normal} {} +\mapXMLvalue {fo:weight} {bold} {bold} +\mapXMLvalue {fo:weight} {bolder} {bold} +\mapXMLvalue {fo:weight} {lighter} {normal} +\mapXMLvalue {fo:weight} {100} {normal} +\mapXMLvalue {fo:weight} {200} {normal} +\mapXMLvalue {fo:weight} {300} {normal} +\mapXMLvalue {fo:weight} {400} {normal} +\mapXMLvalue {fo:weight} {500} {normal} +\mapXMLvalue {fo:weight} {600} {normal} +\mapXMLvalue {fo:weight} {700} {normal} +\mapXMLvalue {fo:weight} {800} {normal} +\mapXMLvalue {fo:weight} {900} {normal} + +\mapXMLvalue {fo:variant} {normal} {} +\mapXMLvalue {fo:variant} {small-caps} {small-caps} + +\mapXMLvalue {fo:style} {normal} {normal} +\mapXMLvalue {fo:style} {italic} {italic} +\mapXMLvalue {fo:style} {oblique} {oblique} +\mapXMLvalue {fo:style} {backslant} {normal} + +% we can get crap like: 10pt/1.5 bold "Times Roman" ; i'm really puzzled why an +% otherwise rather verbose coding occasionally packs attributes; a design flaw + +\unprotect + +\newtoks\FOfonttoks + +\def\checkFOfontSS#1'{} +\def\checkFOfontDD#1"{} +\def\checkFOfontII#1 {} + +\bgroup +\catcode`\'=\active +\catcode`\"=\active +\catcode`\/=\active +\gdef\setcheckFOfontX + {\catcode`\'=\active + \catcode`\"=\active + \catcode`\/=\active + \def'##1'{\global\FOfonttoks\expandafter{\the\FOfonttoks\def\FOfontfamily{##1}}}% + \def"##1"{\global\FOfonttoks\expandafter{\the\FOfonttoks\def\FOfontfamily{##1}}}% + \def/##1 {}}% todo linespacing +\gdef\setcheckFOfontXX + {\catcode`\'=\active + \catcode`\"=\active + \catcode`\/=\active + \def'##1'{}% + \def"##1"{}% + \def/##1 {}}% todo linespacing +\egroup + +\def\checkFOfont#1% + {\FOfonttoks\emptytoks + \bgroup + \catcode`\\=\@@escape + \catcode`\{=\@@begingroup + \catcode`\}=\@@endgroup + \setcheckFOfontX + \xdef\xFOattribute{#1 }% + \setbox\scratchbox\hbox{\scantokens\@EA{\xFOattribute}}% + \setcheckFOfontXX + \scantokens\@EA{\@EA\xdef\@EA\xFOattribute\@EA{\xFOattribute}}% + \egroup + \the\FOfonttoks + \ifx\xFOattribute\empty\else + \expanded{\docheckFOfont\xFOattribute\space\relax\space\relax}\od + \fi + \directsetup{fo:font:family:check}} + +\def\docheckFOfont#1#2 #3% + {\ifx#1\relax + \expandafter\noFOchecks + \else + \directsetup{fo:fonts:reset}% + \doifelsefontsynonym{#1#2} + {\def\FOfontfamily{#1#2}} + {\doifelsenothing{\XMLval{fo:weight}{#1#2}{}} + {\doifelsenothing{\XMLval{fo:variant}{#1#2}{}} + {\doifelsenothing{\XMLval{fo:style}{#1#2}{}} + {\setpercentdimen\FOfontsize{#1#2}} + {\edef\FOfontstyle{\XMLval{fo:style}{#1#2}{}}}} + {\edef\FOfontvariant{\XMLval{fo:variant}{#1#2}{}}}} + {\edef\FOfontweight{\XMLval{fo:weight}{#1#2}{}}}}% + \expandafter\docheckFOfont + \fi#3} + +\protect + +\newtoks\FOreferences + +\def\setFOreference#1% + {\doifsomething{\XMLpar{#1}{id}{}} + {\expanded{\appendtoks + \noexpand\reference[\XMLpar{#1}{id}{}]{\XMLpar{fo:page-sequence}{format}{}}}% + \to\FOreferences}} + +\def\flushFOreferences + {\the\FOreferences + \global\FOreferences\emptytoks} + +\appendtoks \flushFOreferences \to \everypar +\appendtoks \flushFOreferences \to \neverypar % check ! + +\protect + +%D Graphics: static frames + +% can become mp-foeg + +\startMPinclusions + FoNone := 0 ; FoHidden := 1 ; FoDotted := 2 ; FoDashed := 3 ; FoSolid := 4 ; + FoDouble := 5 ; FoGroove := 6 ; FoRidge := 7 ; FoInset := 8 ; FoOutset := 9 ; + FoAll := 0 ; FoTop := 1 ; FoBottom := 2 ; FoLeft := 3 ; FoRight := 4 ; + FoMedium := .5pt ; FoThin := FoMedium/2 ; FoThick := FoMedium*2 ; + color FoBackgroundColor, FoNoColor, FoLineColor[] ; FoNoColor := (-1,-1,-1) ; + numeric FoLineWidth[], FoLineStyle[] ; + boolean FoFrame, FoBackground, FoSplit ; + FoFrame := FoBackground := FoSplit := false ; + FoBackgroundColor := white ; + FoDashFactor := .5 ; + FoDotFactor := .375 ; + for i = FoAll upto FoRight : + FoLineColor[i] := black ; + FoLineWidth[i] := .5pt ; + FoLineStyle[i] := FoNone ; + endfor ; + def DrawFoFrame(expr n, p) = + drawoptions(withcolor FoLineColor[n] withpen pencircle scaled FoLineWidth[n]) ; + if FoLineStyle[n] = FoNone : + % nothing + elseif FoLineStyle[n] = FoHidden : + % nothing + elseif FoLineStyle[n] = FoDotted : + draw p dashed (withdots scaled (FoDotFactor*FoLineWidth[n])) ; + elseif FoLineStyle[n] = FoDashed : + draw p dashed (evenly scaled (FoDashFactor*FoLineWidth[n])) ; + elseif FoLineStyle[n] = FoSolid : + draw p ; + elseif FoLineStyle[n] = FoDouble : + draw p enlarged FoLineWidth[n] ; draw p enlarged -FoLineWidth[n] ; + elseif FoLineStyle[n] = FoGroove : + draw p ; + draw p withpen pencircle scaled .5FoLineWidth[n] withcolor (inverted FoLineColor[n] softened .5) ; + elseif FoLineStyle[n] = FoRidge : + draw p withcolor (inverted FoLineColor[n] softened .5) ; + draw p withpen pencircle scaled .5FoLineWidth[n] ; + elseif FoLineStyle[n] = FoInset : + draw p ; draw p inset 2.5FoLineWidth[n] ; + elseif FoLineStyle[n] = FoOutset : + draw p ; draw p outset 2.5FoLineWidth[n] ; + fi ; + enddef ; + primarydef p outset d = + ((lrcorner p -- urcorner p -- ulcorner p -- llcorner p -- cycle) + shifted (d*(-1,1)) cutbefore topboundary p) cutafter leftboundary p + enddef ; + primarydef p inset d = + ((ulcorner p -- llcorner p -- lrcorner p -- urcorner p -- cycle) + shifted (d*(1,-1)) cutbefore bottomboundary p) cutafter rightboundary p + enddef ; + vardef equalpaths(expr p, q) = + if length(p) = length(q) : + save ok ; boolean ok ; ok := true ; + for i = 0 upto length(p)-1 : + ok := ok and (round(point i of p) = round(point i of q)) ; + endfor ; + ok + else : + false + fi + enddef ; +\stopMPinclusions + +\def\unknownMPcolor{FoNoColor} + +% todo: combine into one en alleen tweede run, immers toch geen invloed; is +% aangezien de referentiepunten vast liggen + +\def\FoRegionWidth#1% + {\XMLpav + {fo:border-width} + {fo:region-\MPvar{location}} + {border-#1-width} + {FoMedium}} + +\def\FoRegionStyle#1% + {\XMLpav + {fo:border-style} + {fo:region-\MPvar{location}} + {border-#1-style} + {FoNone}} + +\def\FoRegionColor#1% + {\MPcolor{\XMLpar + {fo:region-\MPvar{location}} + {border-#1-color} + {black}}} + +\def\FoRegionBackgroundColor + {\MPcolor{\XMLpar + {fo:region-\MPvar{location}} + {background-color} + {FoNoColor}}} + +% todo: when connected and same color : one draw + +\startuseMPgraphic{region-do} + FoBackgroundColor := \FoRegionBackgroundColor ; + FoLineColor[FoTop] := \FoRegionColor{top} ; + FoLineColor[FoBottom] := \FoRegionColor{bottom} ; + FoLineColor[FoLeft] := \FoRegionColor{left} ; + FoLineColor[FoRight] := \FoRegionColor{right} ; + FoLineStyle[FoTop] := \FoRegionStyle{top} ; + FoLineStyle[FoBottom] := \FoRegionStyle{bottom} ; + FoLineStyle[FoLeft] := \FoRegionStyle{left} ; + FoLineStyle[FoRight] := \FoRegionStyle{right} ; + FoLineWidth[FoTop] := \FoRegionWidth{top} ; + FoLineWidth[FoBottom] := \FoRegionWidth{bottom} ; + FoLineWidth[FoLeft] := \FoRegionWidth{left} ; + FoLineWidth[FoRight] := \FoRegionWidth{right} ; + if FoBackgroundColor <> FoNoColor : + fill OverlayBox + withcolor FoBackgroundColor ; + fi ; + path OverlayFrameBox ; + interim linecap := butt ; + OverlayFrameBox := OverlayBox + topenlarged -.5FoLineWidth[FoTop] + bottomenlarged -.5FoLineWidth[FoBottom] + leftenlarged -.5FoLineWidth[FoLeft] + rightenlarged -.5FoLineWidth[FoRight] ; + DrawFoFrame(FoTop, topboundary OverlayFrameBox) ; + DrawFoFrame(FoBottom, bottomboundary OverlayFrameBox) ; + DrawFoFrame(FoLeft, leftboundary OverlayFrameBox) ; + DrawFoFrame(FoRight, rightboundary OverlayFrameBox) ; +\stopuseMPgraphic + +\startuseMPgraphic{region-body} \includeMPgraphic{region-do} \stopuseMPgraphic +\startuseMPgraphic{region-before} \includeMPgraphic{region-do} \stopuseMPgraphic +\startuseMPgraphic{region-after} \includeMPgraphic{region-do} \stopuseMPgraphic +\startuseMPgraphic{region-start} \includeMPgraphic{region-do} \stopuseMPgraphic +\startuseMPgraphic{region-end} \includeMPgraphic{region-do} \stopuseMPgraphic + +\defineoverlay[region-body-graphic] [\useMPgraphic{region-body}{location=body}] +\defineoverlay[region-before-graphic][\useMPgraphic{region-before}{location=before}] +\defineoverlay[region-after-graphic] [\useMPgraphic{region-after}{location=after}] +\defineoverlay[region-start-graphic] [\useMPgraphic{region-start}{location=start}] +\defineoverlay[region-end-graphic] [\useMPgraphic{region-end}{location=end}] + +% more efficient: todo: relocate and move to page background + +% \def\FoRegionWidth#1#2% +% {\XMLpav +% {fo:border-width} +% {fo:region-#2} +% {border-#1-width} +% {FoMedium}} + +% \def\FoRegionStyle#1#2% +% {\XMLpav +% {fo:border-style} +% {fo:region-#2} +% {border-#1-style} +% {FoNone}} + +% \def\FoRegionColor#1#2% +% {\MPcolor{\XMLpar +% {fo:region-#2} +% {border-#1-color} +% {black}}} + +% \def\FoRegionBackgroundColor#1% +% {\MPcolor{\XMLpar +% {fo:region-#1} +% {background-color} +% {FoNoColor}}} + +% \def\combinedFOgraphic#1% +% {FoBackgroundColor := \FoRegionBackgroundColor{#1} ; +% FoLineColor[FoTop] := \FoRegionColor{top}{#1} ; +% FoLineColor[FoBottom] := \FoRegionColor{bottom}{#1} ; +% FoLineColor[FoLeft] := \FoRegionColor{left}{#1} ; +% FoLineColor[FoRight] := \FoRegionColor{right}{#1} ; +% FoLineStyle[FoTop] := \FoRegionStyle{top}{#1} ; +% FoLineStyle[FoBottom] := \FoRegionStyle{bottom}{#1} ; +% FoLineStyle[FoLeft] := \FoRegionStyle{left}{#1} ; +% FoLineStyle[FoRight] := \FoRegionStyle{right}{#1} ; +% FoLineWidth[FoTop] := \FoRegionWidth{top}{#1} ; +% FoLineWidth[FoBottom] := \FoRegionWidth{bottom}{#1} ; +% FoLineWidth[FoLeft] := \FoRegionWidth{left}{#1} ; +% FoLineWidth[FoRight] := \FoRegionWidth{right}{#1} ; +% if FoBackgroundColor <> FoNoColor : +% fill OverlayBox +% withcolor FoBackgroundColor ; +% fi ; +% path OverlayFrameBox ; +% interim linecap := butt ; +% OverlayFrameBox := OverlayBox +% topenlarged -.5FoLineWidth[FoTop] +% bottomenlarged -.5FoLineWidth[FoBottom] +% leftenlarged -.5FoLineWidth[FoLeft] +% rightenlarged -.5FoLineWidth[FoRight] ; +% DrawFoFrame(FoTop, topboundary OverlayFrameBox) ; +% DrawFoFrame(FoBottom, bottomboundary OverlayFrameBox) ; +% DrawFoFrame(FoLeft, leftboundary OverlayFrameBox) ; +% DrawFoFrame(FoRight, rightboundary OverlayFrameBox) ;} + +% \startuseMPgraphic{region-body} +% \combinedFOgraphic{before} +% \combinedFOgraphic{body} +% \combinedFOgraphic{after} +% \combinedFOgraphic{start} +% \combinedFOgraphic{end} +% \stopuseMPgraphic + +% \defineoverlay[region-body-graphic] [\useMPgraphic{region-body}{location=body}] +% \defineoverlay[region-before-graphic][] +% \defineoverlay[region-after-graphic] [] +% \defineoverlay[region-start-graphic] [] +% \defineoverlay[region-end-graphic] [] + +\stopXMLcompiling + +\protect \endinput + +% we can follow two approaches: set the attributes global, using +% +% \defineXML...[tag][prefix][empty] +% +% in that case we trust the fo-file to be correct, i.e. the xslt style +% sheets should not put attributes in the wrong places; however, we need +% to do that with care, since for instance the attributes of some objects +% (regions) are used mixed +% +% \defineXMLprocess [fo:root] [XMLFO] [test=unset] +% +% \defineXMLenvironment [fo:block-container] [XMLFO] +% {\begingroup} +% {\endgroup} +% +% \defineXMLenvironment [fo:block] [XMLFO] +% {\begingroup\getXMLparameters[XMLFO]\begingroup} +% {\endgroup\XMLFOtest\endgraf\endgroup} +% +% \startXMLdata +% +% second: +% unset: +% nested:outer: +% last: +% +% \stopXMLdata +% +% the other approach is to set the attributes explicitly for each +% element, which is slower but more robust +% +% A mix is: +% +% \defineXMLenvironment +% [fo:root] +% [test=unset] +% {\beginXMLelement} +% {\endXMLelement} +% +% \defineXMLenvironment +% [fo:block-container] +% [test=\XMLpar\XMLpureparent{test}{}] +% {\beginXMLelement} +% {\endXMLelement} +% +% \defineXMLenvironment +% [fo:block] +% [test=\XMLpar\XMLpureparent{test}{}] +% {\beginXMLelement +% \begingroup} +% {\endgroup +% \XMLpar{fo:block}{test}{} +% \endXMLelement} +% +% \startXMLdata +% +% second: +% unset: +% nested:outer: +% last: +% +% \stopXMLdata diff --git a/tex/context/base/x-foxet.tex b/tex/context/base/x-foxet.tex new file mode 100644 index 000000000..e58d93c60 --- /dev/null +++ b/tex/context/base/x-foxet.tex @@ -0,0 +1,13 @@ +%D This is just a shortcut for: + +% fo = basic formatting objects +% fe = basic formatting extensions +% fx = extra formatting objects +% fu = user formatting objects +% fs = setup + +\usemodule[fo,fe,fx,fu,fs,mathml] + +% \autoXMLnamespace[mml,mm,mathml] + +\endinput \ No newline at end of file diff --git a/tex/context/base/x-mathml.tex b/tex/context/base/x-mathml.tex index 5c36c35fb..f5db61236 100644 --- a/tex/context/base/x-mathml.tex +++ b/tex/context/base/x-mathml.tex @@ -2,47 +2,27 @@ %D [ file=m-mathml, %D version=1999.12.20, %D title=\CONTEXT\ XML Modules, -%D subtitle=Loading \MATHML\ Filters, +%D subtitle=Loading \MATHML\ Filters, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA ADE / 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 We have to make sure that some basic entities are +%D We have to make sure that some basic entities are %D loaded: -\useXMLfilter[ent] +\useXMLfilter[ent] -%D Then we load the math: +%D Then we load the math: -\useXMLfilter[mml,mmp,mmc] +\useXMLfilter[mml,mmp,mmc] -%D And we also load the whole bunch of entities: +%D And we also load the whole bunch of entities: % \useXMLfilter[mea,meb,mec,meh,men,meo,mer] % \useXMLfilter[mxa,mxb,mxc,mxh,mxn,mxo,mxr] -%D For simple inline math, we first provide: - -\newcount\xmlmathlevel % todo : nesting ! ! ! ! - -\defineXMLenvironment [m] \startXMLinlinemath \stopXMLinlinemath - -\def\startXMLinlinemath - {\ifmmode - \advance\xmlmathlevel1\relax - \else - \xmlmathlevel1$% - \fi} - -\def\stopXMLinlinemath - {\ifcase\xmlmathlevel\or - $\xmlmathlevel0\relax - \else - \advance\xmlmathlevel-1\relax - \fi} - -\endinput +\endinput diff --git a/tex/context/base/x-physml.tex b/tex/context/base/x-physml.tex index 0b9799a34..7f6a94642 100644 --- a/tex/context/base/x-physml.tex +++ b/tex/context/base/x-physml.tex @@ -2,15 +2,15 @@ %D [ file=m-physml, %D version=2001.09.04, %D title=\CONTEXT\ XML Modules, -%D subtitle=Loading \PHYSML\ Filters, +%D subtitle=Loading PHYSML Filters, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA ADE / 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. -\usemodule[units] \useXMLfilter[pml,pmu] +\usemodule[units] \useXMLfilter[pml,pmu] -\endinput +\endinput diff --git a/tex/context/base/x-res-01.tex b/tex/context/base/x-res-01.tex index 9b724411f..181641332 100644 --- a/tex/context/base/x-res-01.tex +++ b/tex/context/base/x-res-01.tex @@ -17,34 +17,34 @@ %D (\TEXEXEC\ will set this variable). You can apply this %D style to a database by saying: %D -%D \starttypen +%D \starttyping %D texexec --pdf --use=fig-make yourfile.xml -%D \stoptypen +%D \stoptyping %D %D The following modes are supported: %D -%D \starttabulatie[|lT|l|] +%D \starttabulate[|lT|l|] %D \NC letter \NC map the preview on letter size \NC \NR %D \NC compact \NC use an alternative presentation \NC \NR -%D \stoptabulatie +%D \stoptabulate %D %D The resulting file has the following characteristics: %D -%D \startopsomming[opelkaar] -%D \som the document is split into three sections: first each +%D \startitemize[packed] +%D \item the document is split into three sections: first each %D figure is shown at its own page, then an overview of %D figures is shown with some data alongside, and %D finally an index and table of contents shows up -%D \som there is no title page, which means that one can +%D \item there is no title page, which means that one can %D access a figure by page number without offset -%D \som the document is opened at the first overview page, +%D \item the document is opened at the first overview page, %D that is, when the viewer supports it -%D \som the graphic is shown 3~times: on a page of its own, +%D \item the graphic is shown 3~times: on a page of its own, %D scaled to a fixed dimension, and relative to a4 or %D letter paper size -%D \som the labels can be accessed in an index and list at +%D \item the labels can be accessed in an index and list at %D the end of the document -%D \stopopsomming +%D \stopitemize %D %D We use named destinations, which means that one can %D access a figure by name from an external application. @@ -91,7 +91,7 @@ background=color, backgroundcolor=gray, foregroundcolor=darkred, - align=normal, + align={lohi,middle}, % normal, frame=off] {\bf \XMLflush{rl:dummy}} \stopbuffer @@ -145,14 +145,14 @@ % Ulgy: -\startnotmode[previewpage-letter,previewpage-S6] - \enablemode[previewpage-A4] -\stopnotmode - \startmode[letter] % downward compatible \enablemode[previewpage-letter] \stopmode +\startnotmode[previewpage-letter,previewpage-S6] + \enablemode[previewpage-A4] +\stopnotmode + %startbuffer[paper] \startsetups[paper] \startmode[previewpage-A4] @@ -448,4 +448,4 @@ \processXMLfilegrouped{\jobfullname} \page -\stoptext \ No newline at end of file +\stoptext diff --git a/tex/context/base/x-res-02.tex b/tex/context/base/x-res-02.tex index 5ef8e901d..a29f446f3 100644 --- a/tex/context/base/x-res-02.tex +++ b/tex/context/base/x-res-02.tex @@ -14,23 +14,23 @@ %D This module enables non||\ConTeXt\ users to access the %D database. For this, you need to run %D -%D \starttypen +%D \starttyping %D texexec --pdf --use=fig-fake yourfile.xml -%D \stoptypen +%D \stoptyping %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 \starttyping %D \getfigurefile{label} %D \getfigurepage{label} -%D \stoptypen +%D \stoptyping %D %D A a bonus, the following macro is defined: %D -%D \starttypen +%D \starttyping %D \includefigurefile width 10cm {label} -%D \stoptypen +%D \stoptyping \usemodule[res-00] diff --git a/tex/context/base/x-res-04.tex b/tex/context/base/x-res-04.tex index 578be1a7e..826a07d23 100644 --- a/tex/context/base/x-res-04.tex +++ b/tex/context/base/x-res-04.tex @@ -1,5 +1,18 @@ +%D \module +%D [ file=x-fig-04, +%D version=2001.03.21, +%D title=\CONTEXT\ Style File, +%D subtitle=Figure Base Loading, +%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. + % hele base laden - + \setXMLfallbackmode3 % icon : preview @@ -13,20 +26,7 @@ % applet % application -%D \module -%D [ file=x-fig-04, -%D version=2001.03.21, -%D title=\CONTEXT\ Style File, -%D subtitle=Figure Base Loading, -%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. - -\usemodule[res-00] % basic element definitions +\usemodule[res-00] % basic element definitions %D This module implements an interface to a figure database %D and file. The database is formatted in \XML\ conforming @@ -36,7 +36,7 @@ %D %D A figure base coded this way looks like: %D -%D \starttypen +%D \starttyping %D %D %D @@ -63,28 +63,28 @@ %D %D %D -%D \stoptypen +%D \stoptyping %D %D You can convert this base into a \PDF\ file using %D \TEXEXEC\ and another module in this suite. %D -%D \starttypen +%D \starttyping %D texexec --pdf --use=fig-make yourfile.xml -%D \stoptypen +%D \stoptyping %D %D You can now select a graphic from this file using the %D -%D \starttypen +%D \starttyping %D \externalfigure[a dutch cow][width=4cm] -%D \stoptypen +%D \stoptyping %D %D This module overloads this command so that a figure is %D it first searched in the list of databases. %D -%D \starttypen +%D \starttyping %D \usemodule [fig-base] %D \usefigurebases[yourfile] -%D \stoptypen +%D \stoptyping %D %D The special keyword \type {reset} can be used to reset %D this list. @@ -111,7 +111,7 @@ \newcounter\figurefilepage -% loading a complete figure base +% loading a complete figure base \startXMLmapping[rl:load] @@ -122,7 +122,7 @@ \figbase@savedata{\XMLflush{rl:label}}\figurefilepage \egroup} -\stopXMLmapping +\stopXMLmapping \def\loadfigurebase#1% {\doifnotflagged{rl:#1} @@ -133,14 +133,14 @@ \doglobal\newcounter\figurefilepage \processXMLfilegrouped{#1.xml} \stopXMLmapping - \doglobal\setflag{rl:#1} + \doglobal\setflag{rl:#1} \stopnointerference}} -\def\figbase@savedata#1#2% +\def\figbase@savedata#1#2% {%\writestatus{figbase}{data of #1 loaded}% \doglobal\saveXMLdatastructure{rl:rl:#1}{record}{page="#2"}{}{rl:figure}{}} -% locating and if needed loading one figure record +% locating and if needed loading one figure record \startXMLmapping[rl:find] @@ -157,14 +157,14 @@ {\XMLflush{rl:figure} \doglobal\increment\figurefilepage \doif\askedlabel{\XMLflush{rl:label}} - {\ifnum\figurebasemode=\plusone % load used ones + {\ifnum\figurebasemode=\plusone % load used ones \figbase@savedata\askedlabel\figurefilepage \fi \doglobal\saveXMLdata{rl:l:manipulation}{rl:manipulation}% \xdef\figurefilelabel {\XMLflush{rl:label}}% \xdef\figurefilefile {\XMLflush{rl:file}}% \xdef\figurefileoriginal{\XMLflush{rl:original}}% - \xdef\figurefilename {\XMLflush{rl:file}} + \xdef\figurefilename {\XMLflush{rl:file}} \endinput}% \egroup} @@ -173,7 +173,7 @@ {\xdef\figurefilename{\XMLpop{rl:file}} \xdef\figurefilepage{\XMLop {page}}} -\stopXMLmapping +\stopXMLmapping \def\getfigurefilename#1#2% {\ifnum\figurebasemode=\plustwo \loadfigurebase{#1} \fi @@ -191,8 +191,8 @@ \stopXMLmapping \stopnointerference} -% todo: niet toegekende naam doorgeven aan calculate en pad -% in padstring +% todo: niet toegekende naam doorgeven aan calculate en pad +% in padstring \def\dogetfigurefilename#1% {\ifx\figurefilename\empty @@ -236,7 +236,7 @@ \def\docommando##1% {\getfigurefilename{##1}{#3}% \ifx\figurefilename\empty\else - \gdef\figurefilelabel{#3}% + \gdef\figurefilelabel{#3}% \quitcommalist \fi}% \processcommacommand[\figurebaselist]\docommando @@ -249,16 +249,16 @@ {\let\figurepathlist\figurefilebasepath \normalcalculateexternalfigure [#1][#2][\figurefilebase.pdf]% - [\c!pagina=\figurefilepage,#4][#5][#6]} - {\@EA\stripspaces\@EA\from\figurefilename\to\figurefilename + [\c!page=\figurefilepage,#4][#5][#6]} + {\@EA\stripspaces\@EA\from\figurefilename\to\figurefilename \normalcalculateexternalfigure [#1][#2][\figurefilename][#4][#5][#6]}% \fi \fi} -% management +% management -% will become \useresourcelibrary +% will become \useresourcelibrary \def\usefigurebase[#1]% {\doifelse{#1}\v!reset @@ -269,30 +269,30 @@ \resetfigurefilebase -% manipulations / todo: fixed order +% manipulations / todo: fixed order -\defineXMLsave [rl:manipulation] +\defineXMLsave [rl:manipulation] -\defineXMLsingular [rl:background] [r=0,g=0,b=0,s=0,c=0,m=0,y=0,k=0] +\defineXMLsingular [rl:background] [r=0,g=0,b=0,s=0,c=0,m=0,y=0,k=0] {\global\setbox\foundexternalfigure\vbox {\definecolor [XMLRLcolor] [r=\XMLop{r},g=\XMLop{g},b=\XMLop{b},s=\XMLop{s},% c=\XMLop{c},m=\XMLop{m},y=\XMLop{y},k=\XMLop{k}]% \framed - [\c!kader=\v!uit,\c!offset=\v!overlay, - \c!achtergrond=\v!kleur,\c!achtergrondkleur=XMLRLcolor] + [\c!frame=\v!off,\c!offset=\v!overlay, + \c!background=\v!color,\c!backgroundcolor=XMLRLcolor] {\box\foundexternalfigure}}} \defineXMLsingular [rl:viewport] [\??cp] % [] {\global\setbox\foundexternalfigure\vbox - {\expandXMLta \getXMLta + {\expandXMLta \getXMLta \clip [\XMLta] {\box\foundexternalfigure}}% \global\setbox\foundexternalfigure\vbox {\scale - [\c!hoogte=\figurewidth,\c!hoogte=\figureheight] + [\c!width=\figurewidth,\c!height=\figureheight] {\box\foundexternalfigure}}} \defineXMLsingular [rl:dimensions] [width=,height=] diff --git a/tex/context/base/x-res-08.tex b/tex/context/base/x-res-08.tex index 28a48460b..74f8a7068 100644 --- a/tex/context/base/x-res-08.tex +++ b/tex/context/base/x-res-08.tex @@ -8,12 +8,12 @@ %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 Experimental module! %D -%D \starttyping +%D \starttyping %D %D %D figure @@ -25,9 +25,9 @@ %D text %D %D -%D \stoptyping +%D \stoptyping -\unprotect +\unprotect \def\XMLrlprefix{rl:} @@ -54,48 +54,48 @@ {\writtenXMLelement{\XMLrlprefix usage}% {\writtenXMLelement{\XMLrlprefix type}{#2}% \writtenXMLelement{\XMLrlprefix state}{#1}% - \ifx\figurefilelabel\empty - \ifx\figurelabel\s!dummy - % label equals filename + \ifx\figurefilelabel\empty + \ifx\figurelabel\s!dummy + % label equals filename \else \writtenXMLelement{\XMLrlprefix label}{\figurelabel}% \fi \writtenXMLelement{\XMLrlprefix file}{\figurefilename}% \ifx\figurefiletype\empty\else \writtenXMLelement{\XMLrlprefix suffix}{\figurefiletype}% - \fi + \fi \else - % \figurefilelabel is set in x-res-04 and since - % we fetch from this base using the normal - % \externalfigure macro, the label becomes the - % name of the figurebase + % \figurefilelabel is set in x-res-04 and since + % we fetch from this base using the normal + % \externalfigure macro, the label becomes the + % name of the figurebase \writtenXMLelement{\XMLrlprefix base}{\figurefilename}% \writtenXMLelement{\XMLrlprefix label}{\figurefilelabel}% \ifx\figurefilefile\empty\else \writtenXMLelement{\XMLrlprefix file}{\figurefilefile}% -\fi +\fi \ifx\figurefileoriginal\empty\else \writtenXMLelement{\XMLrlprefix original}{\figurefileoriginal}% -\fi +\fi \fi \ifnum\figurefilepage>\zerocount \writtenXMLelement{\XMLrlprefix page}{\figurefilepage}% \fi \ifx\currentresourcecomment\empty\else \writtenXMLelement{\XMLrlprefix comment}{\currentresourcecomment}% -\fi +\fi \writtenXMLelement{\XMLrlprefix width}{\figurewidth}% \writtenXMLelement{\XMLrlprefix height}{\figureheight}}}} \def\XMLfeedbackexternalfigure - {\doifmodeelse{*\v!figuur}% + {\doifmodeelse{*\v!figure}% {\XMLfeedbackresource{found}}% {\XMLfeedbackresource{missing}}% - {figure}} + {figure}} -\appendtoks \openXMLresourcelog \to \everystarttext -\appendtoks \closeXMLresourcelog \to \everystoptext +\appendtoks \openXMLresourcelog \to \everystarttext +\appendtoks \closeXMLresourcelog \to \everystoptext \let \feedbackexternalfigure \XMLfeedbackexternalfigure -\protect \endinput +\protect \endinput diff --git a/tex/context/base/x-res-11.tex b/tex/context/base/x-res-11.tex index c58f868c0..b8569d22e 100644 --- a/tex/context/base/x-res-11.tex +++ b/tex/context/base/x-res-11.tex @@ -48,11 +48,11 @@ \unprotect -\setuplayout[\v!midden] +\setuplayout[\v!middle] \startsetups[rl:figure] - \externalfigure[\XMLflush{rl:file}][\c!breedte=4cm] + \externalfigure[\XMLflush{rl:file}][\c!width=4cm] \stopsetups @@ -79,7 +79,7 @@ \startsetups[rl:usage] - \startfiguretext {\v!geen} {\setups[rl:figure]} + \startfiguretext {\v!none} {\setups[rl:figure]} \setups[rl:table] \stopfiguretext @@ -89,16 +89,16 @@ \useMPlibrary[nav] - \setupcolors[\c!status=\v!start] + \setupcolors[\c!state=\v!start] - \setupinteraction[\c!status=\v!start] + \setupinteraction[\c!state=\v!start] \useattachment[whatever][\outputfilename.zip] \startlocalsetups[rl:attach:button] \inframed - [\c!offset=\v!overlay,\c!kader=\v!uit] + [\c!offset=\v!overlay,\c!frame=\v!off] {\attachment[whatever]} \stoplocalsetups diff --git a/tex/context/base/x-res-50.tex b/tex/context/base/x-res-50.tex index d708b0821..382256fd4 100644 --- a/tex/context/base/x-res-50.tex +++ b/tex/context/base/x-res-50.tex @@ -14,7 +14,7 @@ %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 \starttyping %D %D Sample One %D application/x-shockwave-flash @@ -31,17 +31,17 @@ %D mb.mp3 %D mb.jpg %D -%D \stoptypen +%D \stoptyping %D -%D \starttypen +%D \starttyping %D texexec --pdf --use=med-show yourfile.xml -%D \stoptypen +%D \stoptyping %D %D Bonus: %D -%D \starttypen +%D \starttyping %D --arg="url=http://localhost:8881/e:/media" -%D \stoptypen +%D \stoptyping % output=pdftex @@ -55,8 +55,7 @@ % property (eigenschap) aan framed en layer -\usemodule[meta-dum] -\usemodule[contml] +\usemodule[meta-dum] \usemodule[contml] \autoXMLnamespace [context] \doifelsevariable{environment}{url} {\setvariables[mediaclip][url=\getvariable{environment}{url}/]} @@ -262,14 +261,25 @@ \stopsetups +\setuptabulate + [before=, + after=] + +\def\rlCleanupFileName#1% + {\bgroup + \def\cleanup##1##2{\ifnum##1##2=20 \space\else\char\octnumber{##1##2}\fi}% + \defineactivecharacter 37 {\cleanup}% + \scantokens{#1}% + \egroup} + \startsetups[mediaclip:data] \noindent \buttonframed [framecolor=lightgray, foregroundcolor=lightgray] - {\bf\XMLflush{rl:file}} + {\bf\expanded{\rlCleanupFileName{\XMLflush{rl:file}}}} - \vskip12pt + \vskip.75\measure{GapSize} \noindent \buttonframed [framecolor=lightgray, @@ -412,4 +422,4 @@ \doifelsenothing{\inputfilename} {\processXMLfile{mediaclient.xml}} - {\processXMLfile{\inputfilename}} \ No newline at end of file + {\processXMLfile{\inputfilename}} diff --git a/tex/context/base/x-sch-01.tex b/tex/context/base/x-sch-01.tex index d954b1730..d72cbf89c 100644 --- a/tex/context/base/x-sch-01.tex +++ b/tex/context/base/x-sch-01.tex @@ -15,9 +15,9 @@ %D implemented in \type {x-sch-00}. This is an experimental %D style, more will follow. %D -%D \starttypen +%D \starttyping %D texexec --use=sch-01 x-fig-00.xsd --pdf -%D \stoptypen +%D \stoptyping \doifnothing {\jobfilename} {\end} \doiffileelse {\jobfilename.xsd} {} {\end} diff --git a/tex/context/base/x-xml-01.tex b/tex/context/base/x-xml-01.tex index 093261e22..9502ab71a 100644 --- a/tex/context/base/x-xml-01.tex +++ b/tex/context/base/x-xml-01.tex @@ -1,5 +1,3 @@ -% output=pdftex modes=packed - %D \module %D [ file=x-xml-01, %D version=2001.10.10, @@ -51,39 +49,23 @@ \unprotect -% \setuplayout -% [backspace=0cm, -% topspace=0cm, -% %width=40em, -% width=middle, -% height=middle, -% header=0cm, -% footer=0cm] - \setuplayout - [\c!rugwit=0cm, - \c!kopwit=0cm, - %\c!breedte=40em, - \c!breedte=\v!midden, - \c!hoogte=\v!midden, - \c!hoofd=0cm, - \c!voet=0cm] - -% \setupbodyfont [tt,10pt] -% \setuptolerance [verytolerant] -% \setupalign [broad,right] -% \setupXMLfile [level=2] - + [\c!backspace=0cm, + \c!topspace=0cm, + %\c!width=40em, + \c!width=\v!middle, + \c!height=\v!middle, + \c!header=0cm, + \c!footer=0cm] \setupbodyfont [tt,10pt] -\setuptolerance [\v!zeersoepel] -\setupalign [\v!ruim,\v!rechts] -\setupXMLfile [\c!niveau=2] +\setuptolerance [\v!verytolerant] +\setupalign [\v!broad,\v!right] +\setupXMLfile [\c!level=2] \startmode[wide] -% \setuplayout [width=250cm] - \setuplayout [\c!breedte=250cm] + \setuplayout [\c!width=250cm] \stopmode @@ -106,4 +88,4 @@ \dontcomplain \showXMLfile{\inputfilename} -\stoptext \ No newline at end of file +\stoptext diff --git a/tex/context/base/x-xml-02.tex b/tex/context/base/x-xml-02.tex index c5b52573c..8411cdef5 100644 --- a/tex/context/base/x-xml-02.tex +++ b/tex/context/base/x-xml-02.tex @@ -1,22 +1,20 @@ -% output=pdftex modes=letter - %D \module %D [ file=x-xml-02, %D version=2001.10.10, %D title=\CONTEXT\ XML Style File, -%D subtitle=Pretty Printing, +%D subtitle=Pretty Printing, %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. % texexec --use=xml-pretty yourfile.x** [--mode=letter] -\doifnothing {\inputfilename} {\end} -\doiffileelse {\inputfilename} {} {\end} +\doifnothing {\inputfilename} {\end} +\doiffileelse {\inputfilename} {} {\end} \startmode[letter] \setuppapersize[letter][letter] @@ -44,7 +42,7 @@ [10pt,tt] \setuptolerance - [verytolerant] + [verytolerant] \setupalign [broad,right] @@ -57,14 +55,14 @@ \setupfootertexts [\currentdate\space\string| \currenttime\space \string| \pagenumber] -% let's have a look at the type of content: +% let's have a look at the type of content: \setupXMLfile [level=2] \startmode[*suffix-xml] - % ok -\stopmode + % ok +\stopmode \startmode[*suffix-rng] \showXMLlin[value] @@ -72,7 +70,7 @@ \startmode[*suffix-rlg] \showXMLlin - [rl:type,rl:state,rl:name,rl:suffix,rl:label,rl:file,rl:original, + [rl:type,rl:state,rl:name,rl:suffix,rl:label,rl:file,rl:original, rl:width,rl:height,rl:base,rl:page] \stopmode @@ -89,4 +87,4 @@ \showXMLfile{\inputfilename} -\stoptext +\stoptext diff --git a/tex/context/base/x-xml-11.tex b/tex/context/base/x-xml-11.tex new file mode 100644 index 000000000..bdacd97c2 --- /dev/null +++ b/tex/context/base/x-xml-11.tex @@ -0,0 +1,103 @@ +%D \module +%D [ file=x-xml-11, +%D version=2004.09.16, +%D title=\CONTEXT\ XML Style File, +%D subtitle=Formatting X?? files, +%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. + +% xmltools --analyze yourfile.xml +% texexec --use=xml-analyze yourfile.* + +\doifnothing {\inputfilename} {\end} +\doiffileelse {\inputfilename} {} {\end} + +\useXMLfilter[ent] +\useXMLfilter[utf] + +\chardef\XMLtokensreduction\plustwo + +\definehead + [SomeElement] + [subsection] + +\setuphead + [SomeElement] + [ownnumber=yes, + style=\tfb, + alternative=margin] + +\setuplayout + [width=middle, + height=middle, + backspace=2cm, + cutspace=1cm, + topspace=1cm, + header=0pt] + +\setupfootertexts + [\inputfilename] + +\usetypescript[modern][texnansi] \setupbodyfont[modern,tt,10pt] + +\defineXMLenvironment + [document] + {} + {} + +\defineXMLpickup + [entities] + {\page + \starttabulate[|l|p|]} + {\stoptabulate} + +\defineXMLcommand + [entity][name=,n=0] + {\startexpanded + \noexpand \NC \XMLop{name} + \noexpand \NC \XMLop{n} + \noexpand \NC + \noexpand \NR + \stopexpanded} + +\defineXMLenvironment + [elements] + {\page} + {} + +\newtoks \TabulateToks + +\defineXMLpickup + [element][name=,n=0] + {\expanded{\SomeElement{\XMLop{n}}{\XMLop{name}}} + \TabulateToks\emptytoks} + {\starttabulate[|l|r|p|] + \the\TabulateToks + \stoptabulate} + +\defineXMLenvironment + [attribute][name=] + {\xdef\AttributeName{\XMLop{name}}} + {} + +\defineXMLenvironment + [instance][value=,n=0] + {\appendetoks + \noexpand \NC \AttributeName + \noexpand \NC \XMLop{n} + \noexpand \NC \XMLop{value} + \noexpand \NC + \noexpand \NR + \to \TabulateToks} + {\xdef\AttributeName{}} + +\starttext + +\processXMLfilegrouped{\inputfilename} + +\stoptext diff --git a/tex/context/base/xtag-ent.tex b/tex/context/base/xtag-ent.tex index ef98e7eb1..edb437ea5 100644 --- a/tex/context/base/xtag-ent.tex +++ b/tex/context/base/xtag-ent.tex @@ -122,4 +122,4 @@ \defineXMLentity [zcaron] {\zcaron} % unofficial \defineXMLentity [dots] {\unknown} -\defineXMLentity [amp] {\&} \ No newline at end of file +\defineXMLentity [amp] {\&} diff --git a/tex/context/base/xtag-exp.tex b/tex/context/base/xtag-exp.tex index d60d1e0a0..7f289dbf5 100644 --- a/tex/context/base/xtag-exp.tex +++ b/tex/context/base/xtag-exp.tex @@ -52,7 +52,7 @@ \appendtoks \forcefileexpansiontrue \to \everyenableXML \let\enableXMLfiledata\relax} -\setupXMLprocessing[\c!status=\v!start] +\setupXMLprocessing[\c!state=\v!start] \appendtoks \ifproductionrun \enableXMLfiledata \fi @@ -64,7 +64,7 @@ {\bgroup \honorunexpanded \dontexpandencoding - \xdef\@@globalexpanded{\noexpand#1}% + \xdef\@@globalexpanded{\noexpand#1}% why \noexpand? \egroup \@@globalexpanded} @@ -82,4 +82,4 @@ \setxvalue{\@@crk\string#1}{\the\scratchtoks}% \normalmarks#1{\the\scratchtoks}} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/xtag-ext.tex b/tex/context/base/xtag-ext.tex index a700fcfae..3427efb30 100644 --- a/tex/context/base/xtag-ext.tex +++ b/tex/context/base/xtag-ext.tex @@ -27,11 +27,11 @@ %D will not conflict (don't confuse this with \XML\ %D namespaces.) %D -%D \starttypen +%D \starttyping %D \startXMLmapping [tag] | [-] [tag] | [+] [tag] %D definitions %D \stopXMLmapping -%D \stoptypen +%D \stoptyping %D %D When a \type {[+]} is specified, the mappings will %D nest. @@ -97,11 +97,11 @@ %D %D Imagine something: %D -%D \starttypen +%D \starttyping %D \defineXMLenvironment [something] %D {\startXMLmapping[whatever]} %D {\stopXMLmapping} -%D \stoptypen +%D \stoptyping %D %D Here the \type {\stopXMLmapping} will never be reached %D because we are in a mapping. Therefore we need: @@ -147,8 +147,8 @@ % \defineXMLdirective [flowchart] [shapes] \setupFLOWshapes % [#2=#3] % \defineXMLdirective [flowchart] [lines] \setupFLOWlines % [#2=#3] -\defineXMLprocessor [context-begin-group] {\begingroup\gobbleoneargument} -\defineXMLprocessor [context-end-group] {\endgroup \gobbleoneargument} +\defineXMLprocessor [context-begin-group] {\bgroup\gobbleoneargument} +\defineXMLprocessor [context-end-group] {\egroup\gobbleoneargument} % \def\XMLnspart#1:#2\empty{#1} % call ...:\empty\empty % \def\XMLidpart#1:#2#3\empty{\ifx#2\empty#1\else\XMLidpart#2#3\empty\empty\fi} @@ -207,6 +207,12 @@ \@EA\secondoftwoarguments \fi} +\gdef\doifXMLtextelse#1% new + {\doiftextelse{\simplifyXMLelements#1}} + +\gdef\doifXMLtext#1#2% new + {\doiftextelse{\simplifyXMLelements#1}{#2}\donothing} + \gdef\convertXMLelement#1\to#2% {\ifcsname\@@XMLsave:#1\endcsname \@EA\convertcommand\csname\@@XMLsave:#1\endcsname\to#2% @@ -266,4 +272,4 @@ \def\writtenXMLend #1{} \def\writtenXMLempty #1{<#1/>} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/xtag-hyp.tex b/tex/context/base/xtag-hyp.tex index 5328899c5..a805be9d1 100644 --- a/tex/context/base/xtag-hyp.tex +++ b/tex/context/base/xtag-hyp.tex @@ -46,4 +46,4 @@ % \hyphenatedword{pati\ediaeresis ntenorganisatie} % \hyphenatedword{pati\ediaeresis ntenplatform} % -% \stoptext \ No newline at end of file +% \stoptext diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex index fd545cd78..ee876b1a8 100644 --- a/tex/context/base/xtag-ini.tex +++ b/tex/context/base/xtag-ini.tex @@ -26,6 +26,13 @@ \endinput \endTEX +% to be moved + +\ifx\globalscratchtoks \undefined \newtoks \globalscratchtoks \fi +\ifx\globalscratchdimen\undefined \newdimen\globalscratchdimen \fi + +% tzt nog eens child grabber maken; mooier in mathml + %D This module is highly optimized for speed, which sometimes %D reads to rather unreadable code. Sorry for this. @@ -172,6 +179,7 @@ \edef\@@XMLdepth {\@@XML dep} % used to track nesting \edef\@@XMLdopth {\@@XML dop} % used to track nesting \edef\@@XMLsave {\@@XML sav} % namespace for saved elements +\edef\@@XMLglobal {\@@XML glb} % global assignment \iffalse % slightly faster @@ -192,6 +200,7 @@ \edef\@@XMLdepth {\@@XML n} % used to track nesting \edef\@@XMLdopth {\@@XML o} % used to track nesting \edef\@@XMLsave {\@@XML p} % namespace for saved elements +\edef\@@XMLglobal {\@@XML x} % global assignment \fi @@ -363,9 +372,9 @@ %D called an empty element. The following definitions are %D equivalent: %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping %D %D Empty elements can have arguments too. Conforming the %D standard, each key must have a value. These are separated @@ -373,15 +382,15 @@ %D \type {"} or \type {'}. There may be spaces around the %D equal sign. %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping %D %D Officially the following definition is not valid: %D -%D \starttypen +%D \starttyping %D some text -%D \stoptypen +%D \stoptyping %D %D Although we can handle both cases independently, this is %D seldom needed. @@ -389,27 +398,27 @@ %D Processing instructions are identified by a~\type {?} and are %D like empty elements. %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping %D %D Comment is formatted as follows. %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping %D %D Verbatim code inits purest form is called \type {CDATA} and %D is embedded in the following ugly and therefore recognizable %D way: %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping %D The parser is implemented as a multi||step macro. Because %D \type {!} and \type {?} should be picked up correctly, we @@ -695,9 +704,13 @@ \long\def\cleanupXMLarguments {\ifnum\kindofXMLelement=\emptyXMLtag \ifx\currentXMLarguments\empty \else - \@EA\docleanupXMLarguments\currentXMLarguments/ \relax + \@EA\docleanupXMLarguments\currentXMLarguments/ \relax \fi - \fi} + \else\ifnum\kindofXMLelement=\beginXMLtag + \ifx\currentXMLarguments\space + \let\currentXMLarguments\empty + \fi + \fi\fi} % \long\def\docleanupXMLarguments#1/ #2\relax % space added earlier % {\edef\currentXMLarguments{#1}} @@ -836,10 +849,13 @@ \def\beginXMLelement {\global\advance\XMLdepth\plusone - \global\@EA\let\csname\@@XMLdepth:\the\XMLdepth\endcsname\currentXMLelement} + \global\@EA\let\csname\@@XMLdepth:\the\XMLdepth\endcsname\currentXMLelement + }%\writestatus{XML TRACE}{[begin] [\the\XMLdepth] [\XMLself]}} \def\endXMLelement - {\global\advance\XMLdepth\minusone} + {%\writestatus{XML TRACE}{[end] [\the\XMLdepth] [\XMLself]}% + \global\@EA\let\csname\@@XMLdepth:\the\XMLdepth\endcsname\undefined + \global\advance\XMLdepth\minusone} % 0 = nothing % 1 = unknown @@ -854,29 +870,127 @@ \ifcase\XMLancestormode\or\s!unknown\or\currentXMLelement\fi \fi} -\def\XMLparent - {\XMLancestor\plusone} - \def\XMLpureancestor#1% {\ifnum\numexpr(\XMLdepth-#1)>0 \csname\@@XMLdepth:\the\numexpr(\XMLdepth-#1)\endcsname \fi} +% \def\XMLpureancestor#1% test for relax insertion +% {\ifcase\numexpr(\XMLdepth-#1)\or +% \csname\@@XMLdepth:\the\numexpr(\XMLdepth-#1)\endcsname +% \fi} + +\def\XMLparent{\XMLancestor\plusone} +\def\XMLself {\XMLancestor\zerocount} + +\def\XMLpureparent{\XMLpureancestor\plusone} +\def\XMLpureself {\XMLpureancestor\zerocount} + +% \def\XMLpureancestor#1% +% {\csname +% \ifnum\numexpr(\XMLdepth-#1)>\zerocount +% \@@XMLdepth:\the\numexpr(\XMLdepth-#1)% +% \else +% \s!empty +% \fi +% \endcsname} + \def\XMLpureparent {\XMLpureancestor\plusone} +% probleem: depth is vast en dus ook ancestor + +% \XMLinh{...} will backtrack definitions (given that the elements +% use begin/end, the backtracking stops when a non-empty value is +% encountered; maybe we will add some keyword (inherit) some day + +% \def\XMLinh#1% will recurse so no trickery can be used +% {\ifcsname\@@XMLvariable:\XMLpureancestor\plusone:#1\endcsname +% \@EA\@EA\csname\@@XMLvariable:\XMLpureancestor\plusone:#1\endcsname +% \fi} + +\def\XMLinh#1% + {\@EA\ifx\csname\@@XMLvariable:\currentXMLelement:#1\endcsname\empty + \@EA\pXMLinh + \else + \csname\@@XMLvariable:\currentXMLelement:#1\endcsname + \@EA\gobbletwoarguments + \fi\XMLdepth{#1}} + +\def\pXMLinh#1% + {\@EA\ppXMLinh\@EA{\the\numexpr(#1-\plusone)}} + +% \def\ppXMLinh#1#2% +% {\ifcsname\@@XMLvariable:\csname\@@XMLdepth:#1\endcsname:#2\endcsname +% \@EA\ifx\csname\@@XMLvariable:\csname\@@XMLdepth:#1\endcsname:#2\endcsname\empty +% \@EAEAEA\pppXMLinh +% \else +% \csname\@@XMLvariable:\csname\@@XMLdepth:#1\endcsname:#2\endcsname +% \@EAEAEA\gobbletwoarguments +% \fi +% \else +% \@EA\pppXMLinh +% \fi{#1}{#2}} + +% \def\pppXMLinh#1% +% {\ifnum#1>\zerocount +% \@EA\pXMLinh +% \else +% \@EA\gobbletwoarguments +% \fi{#1}} + +\def\ppXMLinh#1#2% + {\@EA\ifx\csname\@@XMLvariable:\csname\@@XMLdepth:#1\endcsname:#2\endcsname\empty + \ifnum#1>\plusone + \@EAEAEA\pXMLinh + \else + \@EAEAEA\gobbletwoarguments + \fi + \else + \csname\@@XMLvariable:\csname\@@XMLdepth:#1\endcsname:#2\endcsname + \@EA\gobbletwoarguments + \fi{#1}{#2}} + +% better +% +% \def\XMLpureancestor#1% +% {\ifcsname\@@XMLdepth:\the\numexpr(\XMLdepth-#1)\endcsname +% \csname\@@XMLdepth:\the\numexpr(\XMLdepth-#1)\endcsname +% \fi} + +% replaces macro in xtag-ini: ! ! ! + +\def\edefXMLop#1#2% \macro{att} + {\edef#1% + {\csname\ifcsname\@@XMLvariable:\ownXMLelement:#2\endcsname + \@@XMLvariable:\ownXMLelement:#2\else\s!empty + \fi\endcsname}} + +\def\edefXMLinh#1#2% \macro{att} + {\edef#1{\XMLinh{#2}}} + +% \def\doifXMLopdef#1#2% \macro{att} +% {\ifcsname\@@XMLvariable:\ownXMLelement:#1\endcsname +% \@EA\let\@EA#1\csname\@@XMLvariable:\ownXMLelement:#1\endcsname +% \expandafter\firstofoneargument +% \else +% \expandafter\gobbleoneargument +% \fi} + +\fetchruntimecommand \tracebackXMLattribute {\f!xtagprefix\s!run} + % \defineXMLenvironment[one] % {\beginXMLelement} % {\endXMLelement} % % \defineXMLenvironment[two] % {\beginXMLelement -% \starttabulate +% \starttabulatie % \NC ancestor 1 \NC \XMLancestor{1} \NC \NR % \NC ancestor 2 \NC \XMLancestor{2} \NC \NR % \NC ancestor 3 \NC \XMLancestor{3} \NC \NR % \NC ancestor 4 \NC \XMLancestor{4} \NC \NR -% \stoptabulate} +% \stoptabulatie} % {\endXMLelement} % % \startbuffer @@ -886,7 +1000,7 @@ % {fallback A: \setXMLfallbackmode 0 \processXMLbuffer}\par % {fallback B: \setXMLfallbackmode 1 \processXMLbuffer}\par % {fallback C: \setXMLfallbackmode 2 \processXMLbuffer}\par - + % todo: split #1 into raws en reconstruct, set current etc, push and pop % % \def\beginXMLelement @@ -909,10 +1023,10 @@ %D \defineXMLenvironment[two] %D {\beginXMLelement %D \starttabulate -%D \NC parent 1 \NC \XMLparent{1} \NC \NR -%D \NC parent 2 \NC \XMLparent{2} \NC \NR -%D \NC parent 3 \NC \XMLparent{3} \NC \NR -%D \NC parent 4 \NC \XMLparent{4} \NC \NR +%D \NC parent 1 \NC \XMLancestor{1} \NC \NR +%D \NC parent 2 \NC \XMLancestor{2} \NC \NR +%D \NC parent 3 \NC \XMLancestor{3} \NC \NR +%D \NC parent 4 \NC \XMLancestor{4} \NC \NR %D \stoptabulate} %D {\endXMLelement} %D @@ -920,14 +1034,14 @@ %D %D \stopbuffer %D -%D fallback A: \setXMLfallbacklevel0 \processXMLbuffer -%D fallback B: \setXMLfallbacklevel1 \processXMLbuffer -%D fallback C: \setXMLfallbacklevel2 \processXMLbuffer +%D fallback A: \setXMLfallbackmode0 \processXMLbuffer +%D fallback B: \setXMLfallbackmode1 \processXMLbuffer +%D fallback C: \setXMLfallbackmode2 \processXMLbuffer %D Here we do the namespace (re)mapping. More examples are %D provided in the manual. %D -%D \starttypen +%D \starttyping %D \supportXMLnamespace [test] % needed to get a namespace working %D \skipXMLnamespace [test] % slow %D \ignoreXMLnamespace [test] % faster @@ -938,7 +1052,7 @@ %D \remapXMLurlspace [http://www.pragma-ade.com/dtd/context] [context] %D \autoXMLnamespace [context] % fallback %D \autoXMLnamespace [whatever] % second fall back -%D \stoptypen +%D \stoptyping \newtoks\autoXMLnamespaces @@ -1217,14 +1331,9 @@ \else \@EAEAEA \crapXMLentity \fi\fi{#1}} -\def\execXMLentity#1% - {\csname\@@XMLentity:#1\endcsname} - -\def\crapXMLentity#1% - {\inframed[\c!offset=.1ex]{\tttf#1}} - -\def\autoXMLentity#1% - {\ifcsname#1\endcsname\csname#1\endcsname\fi} +\def\execXMLentity#1{\csname\@@XMLentity:#1\endcsname} +\def\crapXMLentity#1{\inframed[\c!offset=.1ex]{\tttf#1}} +\def\autoXMLentity#1{\ifcsname#1\endcsname\csname#1\endcsname\fi} \unexpanded\def\getXMLentity{\expandedXMLentity} @@ -1267,6 +1376,7 @@ \def\dosetXMLattributeB#1% {\ifx\@@XMLspac\originalXMLnamespace \@EA\def\csname\@@XMLvariable:\@@XMLclass:\@@XMLname\endcsname{#1}% + % maybe some day global handling here as well \fi} % \def\dosetXMLattributeC#1% @@ -1287,10 +1397,9 @@ % \@EA\def\csname\@@XMLvariable:\@@XMLclass:\@@XMLspac:\@@XMLname\endcsname{#1}% % \fi} -\def\dosetXMLattributeD% +\def\dosetXMLattributeD {\@EA\def\csname\@@XMLvariable:\@@XMLclass:\ifx\@@XMLspac - \originalXMLnamespace\currentXMLnamespace\else\@@XMLspac\fi - :\@@XMLname\endcsname} + \originalXMLnamespace\currentXMLnamespace\else\@@XMLspac\fi:\@@XMLname\endcsname} \def\setXMLattributemode#1% {\ifcase#1\relax @@ -1448,6 +1557,22 @@ % % the ugly alternative +% \def\dosetXMLargument#1% ugly alternative +% {\ifXMLnamespace +% \XMLnamespacefalse +% \ifx\@@XMLspac\@@XMLns +% \@EAEAEA\checkXMLnamespaceattr % xmlns:\@@XMLname="#1" +% \else +% \@EAEAEA\dosetXMLattribute % some:\@@XMLname="#1" +% \fi +% \else\ifx\@@XMLname\@@XMLns +% \@EAEAEA\checkXMLnamespaceattr % xmlns="#1" +% \else +% \@EAEAEA\dodosetXMLargument +% \fi\fi{#1}% +% \let\dodoparseXMLarguments\doparseXMLarguments +% \dodoparseXMLarguments} + \def\dosetXMLargument#1% ugly alternative {\ifXMLnamespace \XMLnamespacefalse @@ -1461,10 +1586,22 @@ \else \@EAEAEA\dodosetXMLargument \fi\fi{#1}% + \dodocopyXMLargument \let\dodoparseXMLarguments\doparseXMLarguments \dodoparseXMLarguments} -\def\dodosetXMLargumentA% +\let\dodocopyXMLargument\relax + +\def\dododocopyXMLargument + {\@EA\@EA\@EA\let\@EA\@EA + \csname\@@XMLvariable:\csname\@@XMLglobal:\currentXMLelement\endcsname:\@@XMLname\endcsname + \csname\@@XMLvariable:\@@XMLclass :\@@XMLname\endcsname} + +\def\copyXMLargumentindeed + {\def\dodocopyXMLargument{\ifcsname\@@XMLglobal:\currentXMLelement\endcsname\dododocopyXMLargument\fi}% + \let\copyXMLargumentindeed\relax} + +\def\dodosetXMLargumentA {\@EA\def\csname\@@XMLvariable:\@@XMLclass:\@@XMLname\endcsname} \def\dodosetXMLargumentB#1% @@ -1487,8 +1624,6 @@ \def\theXMLarguments#1% {\ifcsname\@@XMLmap:#1\endcsname\csname\@@XMLmap:#1\endcsname\fi} -\newtoks\globalscratchtoks - \def\doexpandXMLvalue#1#2% {\ifcsname#2\endcsname \bgroup @@ -1563,222 +1698,180 @@ \bgroup \catcode`<=\@@active -% \long\gdef\dododefineXMLsingular#1#2% -% {\long\setvalue{\@@XMLelement:#1/}{#2}} - \long\gdef\dododefineXMLsingular#1#2% {\long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2}} -% \long\gdef\dododefineXMLcommand#1#2% -% {\long\setvalue{\@@XMLelement:#1/}{#2}% -% \long\setvalue{\@@XMLelement:#1}{#2}} - \long\gdef\dododefineXMLcommand#1#2% - {\long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2}% - \long\@EA\def\csname\@@XMLelement:#1\endcsname{#2}} - -% \long\gdef\dododefineXMLgrouped#1#2% -% {\long\setvalue{\@@XMLelement:#1}{\groupedcommand{#2}{}\bgroup}% -% \long\setvalue{\@@XMLelement:/#1}{\egroup}} + {\long\@EA\def\csname\@@XMLelement:#1\endcsname{#2}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2}} \long\gdef\dododefineXMLgrouped#1#2% {\long\@EA\def\csname\@@XMLelement:#1\endcsname{\groupedcommand{#2}\donothing\bgroup}% - \@EA\let\csname\@@XMLelement:/#1\endcsname\egroup} - -% \long\gdef\dododefineXMLargument#1#2% watch the {} around ##1 -% {\long\setvalue{\@@XMLelement:#1/}{#2{}}% -% \long\setvalue{\@@XMLelement:#1}##1{#2{##1}}} - -% \long\gdef\dododefineXMLargument#1#2% watch the {} around ##1 -% {\long\setvalue{\@@XMLelement:#1/}{#2{}}% -% \long\setvalue{\@@XMLelement:#1}{\redoXMLargument{#1}{#2}}} + \@EA\let\csname\@@XMLelement:/#1\endcsname\egroup + \@EA\let\csname\@@XMLelement:#1/\endcsname\donothing} \long\gdef\dododefineXMLargument#1#2% watch the {} around ##1 - {\long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2{}}% - \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLargument{#1}{#2}}} + {\long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLargument{#1}{#2}} + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2{}}} \long\gdef\redoXMLargument#1#2% potential optimization: globalnext {\long\@EA\gdef\@EA\next\@EA##\@EA1\@EA<\@EA/\currentXMLelement>{#2{##1}}% \next} -%\long\gdef\dododefineXMLignore#1% -% {\long\setvalue{\@@XMLelement:#1/}{}% -% \long\setvalue{\@@XMLelement:#1}##1{}} - -% \long\gdef\dododefineXMLignore#1% -% {\long\setvalue{\@@XMLelement:#1/}{}% -% \long\setvalue{\@@XMLelement:#1}{\redoXMLignore{#1}}} - \long\gdef\dododefineXMLignore#1% - {\@EA\let\csname\@@XMLelement:#1/\endcsname\donothing - \@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLignore{#1}}} + {\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLignore{#1}} + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \@EA\let\csname\@@XMLelement:#1/\endcsname\donothing} \long\gdef\redoXMLignore#1% {\long\@EA\def\@EA\next\@EA##\@EA1\@EA<\@EA/\currentXMLelement>{}% \next} -% \long\gdef\dododefineXMLpickup#1#2#3% -% {\long\setvalue{\@@XMLelement:#1/}{#2#3}% -% \long\setvalue{\@@XMLelement:#1}##1{#2##1#3}} - -% \long\gdef\dododefineXMLpickup#1#2#3% -% {\long\setvalue{\@@XMLelement:#1/}{#2#3}% -% \long\setvalue{\@@XMLelement:#1}{\redoXMLpickup{#1}{#2}{#3}}} - \long\gdef\dododefineXMLpickup#1#2#3% - {\long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2#3}% - \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLpickup{#1}{#2}{#3}}} + {\long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLpickup{#1}{#2}{#3}} + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2#3}} \long\gdef\redoXMLpickup#1#2#3% {\long\@EA\def\@EA\next\@EA##\@EA1\@EA<\@EA/\currentXMLelement>{#2##1#3}% \next} -% \long\gdef\dododefineXMLenvironment#1#2#3% -% {\long\setvalue{\@@XMLelement:#1/}{#2#3}% -% \long\setvalue{\@@XMLelement:#1}{#2}% -% \long\setvalue{\@@XMLelement:/#1}{#3}} - \long\gdef\dododefineXMLenvironment#1#2#3% - {\long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2#3}% - \long\@EA\def\csname\@@XMLelement:#1\endcsname{#2}% - \long\@EA\def\csname\@@XMLelement:/#1\endcsname{#3}} - -% \long\gdef\dododefineXMLsave#1% -% {\letvalue{\@@XMLdata:#1}\longempty -% \long\setvalue{\@@XMLelement:#1/}{\long\setvalue{\@@XMLdata:#1}{}}% -% \long\setvalue{\@@XMLelement:#1}##1{\long\setvalue{\@@XMLdata:#1}{##1}}} - -% \long\gdef\dododefineXMLsave#1% -% {\letvalue{\@@XMLdata:#1}\longempty -% \long\setvalue{\@@XMLelement:#1/}{\long\setvalue{\@@XMLdata:#1}{}}% -% \long\setvalue{\@@XMLelement:#1}{\redoXMLsave{#1}}} + {\long\@EA\def\csname\@@XMLelement:#1\endcsname{#2}% + \long\@EA\def\csname\@@XMLelement:/#1\endcsname{#3}% + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2#3}} \long\gdef\dododefineXMLsave#1% {\@EA\let\csname\@@XMLdata:#1\endcsname\longempty - \long\@EA\def\csname\@@XMLelement:#1/\endcsname{\@EA\let\csname\@@XMLdata:#1\endcsname\longempty}% - \long\@EA\def\csname\@@XMLelement:#1\endcsname {\redoXMLsave{#1}}} - -% \long\gdef\dododefineXMLsavecontent#1#2% -% {\long\setvalue{\@@XMLdata:#1}{#2}% -% \long\setvalue{\@@XMLelement:#1/}{}% -% \long\setvalue{\@@XMLelement:#1}{\redoXMLsave{#1}}} + \long\@EA\def\csname\@@XMLelement:#1\endcsname {\redoXMLsave{#1}}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{\@EA\let\csname\@@XMLdata:#1\endcsname\longempty}} \long\gdef\dododefineXMLsavecontent#1#2% {\long\@EA\def\csname\@@XMLdata:#1\endcsname{#2}% - \@EA\let\csname\@@XMLelement:#1/\endcsname\donothing - \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLsave{#1}}} + \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLsave{#1}}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{\@EA\let\csname\@@XMLdata:#1\endcsname\longempty}} \gdef\redoXMLsave#1% {\long\@EA\def\@EA\next\@EA##\@EA1\@EA<\@EA/\currentXMLelement>% {\long\@EA\def\csname\@@XMLdata:#1\endcsname{##1}}% \next} -% \long\gdef\dododefineXMLgsave#1% -% {\letgvalue{\@@XMLdata:#1}\longempty -% \long\setvalue{\@@XMLelement:#1/}{\long\setgvalue{\@@XMLdata:#1}{}}% -% \long\setvalue{\@@XMLelement:#1}{\redoXMLgsave{#1}}} - \long\gdef\dododefineXMLgsave#1% {\global\@EA\let\csname\@@XMLdata:#1\endcsname\longempty - \long\@EA\def\csname\@@XMLelement:#1/\endcsname{\global\@EA\let\csname\@@XMLdata:#1\endcsname\longempty}% - \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLgsave{#1}}} - -% \long\gdef\dododefineXMLgsavecontent#1#2% -% {\long\setvalue{\@@XMLdata:#1}{#2}% -% %\long\setvalue{\@@XMLelement:#1/}{}% -% \long\setvalue{\@@XMLelement:#1/}{\long\setgvalue{\@@XMLdata:#1}{}}% -% \long\setvalue{\@@XMLelement:#1}{\redoXMLgsave{#1}}} + \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLgsave{#1}}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{\global\@EA\let\csname\@@XMLdata:#1\endcsname\longempty}} \long\gdef\dododefineXMLgsavecontent#1#2% {\long\@EA\gdef\csname\@@XMLdata:#1\endcsname{#2}% - \long\@EA\def\csname\@@XMLelement:#1/\endcsname{\global\@EA\let\csname\@@XMLdata:#1\endcsname\longempty}% - \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLgsave{#1}}} + \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLgsave{#1}}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{\global\@EA\let\csname\@@XMLdata:#1\endcsname\longempty}} \gdef\redoXMLgsave#1% {\long\@EA\def\@EA\next\@EA##\@EA1\@EA<\@EA/\currentXMLelement>% {\long\@EA\gdef\csname\@@XMLdata:#1\endcsname{##1}}% \next} -% \long\gdef\dododefineXMLenvironmentsave#1#2#3% -% {\letvalue{\@@XMLdata:#1}\longempty -% \long\setvalue{\@@XMLelement:#1/}{#2\long\setvalue{\@@XMLdata:#1}{}#3}% -% \long\setvalue{\@@XMLelement:#1}##1{#2\long\setvalue{\@@XMLdata:#1}{##1}#3}} - -% \long\gdef\dododefineXMLenvironmentsave#1#2#3% -% {\letvalue{\@@XMLdata:#1}\longempty -% \long\setvalue{\@@XMLelement:#1/}{#2\long\setvalue{\@@XMLdata:#1}{}#3}% -% \long\setvalue{\@@XMLelement:#1}{\redoXMLenvironmentsave{#1}{#2}{#3}}} - \long\gdef\dododefineXMLenvironmentsave#1#2#3% {\@EA\let\csname\@@XMLdata:#1\endcsname\longempty - \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2\@EA\let\csname\@@XMLdata:#1\endcsname\longempty#3}% - \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLenvironmentsave{#1}{#2}{#3}}} + \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLenvironmentsave{#1}{#2}{#3}}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2\@EA\let\csname\@@XMLdata:#1\endcsname\longempty#3}} + +% maybe \globalnext \gdef\redoXMLenvironmentsave#1#2#3% {\long\@EA\def\@EA\next\@EA##\@EA1\@EA<\@EA/\currentXMLelement>% {#2\long\@EA\def\csname\@@XMLdata:#1\endcsname{##1}#3}% \next} -% \long\gdef\dododefineXMLenvironmentgsave#1#2#3% -% {\letgvalue{\@@XMLdata:#1}\longempty -% \long\setvalue{\@@XMLelement:#1/}{#2\long\setgvalue{\@@XMLdata:#1}{}#3}% -% \long\setvalue{\@@XMLelement:#1}{\redoXMLenvironmentgsave{#1}{#2}{#3}}} - \long\gdef\dododefineXMLenvironmentgsave#1#2#3% {\global\@EA\let\csname\@@XMLdata:#1\endcsname\longempty - \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2\global\@EA\let\csname\@@XMLdata:#1\endcsname\longempty#3}% - \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLenvironmentgsave{#1}{#2}{#3}}} + \long\@EA\def\csname\@@XMLelement:#1\endcsname{\redoXMLenvironmentgsave{#1}{#2}{#3}}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2\global\@EA\let\csname\@@XMLdata:#1\endcsname\longempty#3}} \gdef\redoXMLenvironmentgsave#1#2#3% {\long\@EA\def\@EA\next\@EA##\@EA1\@EA<\@EA/\currentXMLelement>% {#2\long\@EA\gdef\csname\@@XMLdata:#1\endcsname{##1}#3}% \next} -% \long\gdef\dododefineXMLprocess#1% -% {\long\setvalue{\@@XMLelement:#1/}{}% -% \long\setvalue{\@@XMLelement:#1}{}% -% \long\setvalue{\@@XMLelement:/#1}{}} - -% \long\gdef\dododefineXMLprocess#1% -% {\letvalue{\@@XMLelement:#1/}\donothing -% \letvalue{\@@XMLelement:#1}\donothing -% \letvalue{\@@XMLelement:/#1}\donothing} - \long\gdef\dododefineXMLprocess#1% - {\@EA\let\csname\@@XMLelement:#1/\endcsname\donothing - \@EA\let\csname\@@XMLelement:#1\endcsname\donothing - \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing} - -% \long\gdef\dododefineXMLnestedenvironment#1#2#3% -% {\long\setvalue{\@@XMLelement:#1}{\getXMLgroupedenvironment{#1}{#2}{#3}}} + {\@EA\let\csname\@@XMLelement:#1\endcsname\donothing + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \@EA\let\csname\@@XMLelement:#1/\endcsname\donothing} \long\gdef\dododefineXMLnestedenvironment#1#2#3% {\long\@EA\def\csname\@@XMLelement:#1\endcsname{\getXMLgroupedenvironment{#1}{#2}{#3}}} -% \long\gdef\dododefineXMLnestedargument#1#2% -% {\long\setvalue{\@@XMLelement:#1}{\getXMLgroupedargument{#1}{#2}}} - \long\gdef\dododefineXMLnestedargument#1#2% - {\long\@EA\def\csname\@@XMLelement:#1\endcsname{\getXMLgroupedargument{#1}{#2}}} + {\long\@EA\def\csname\@@XMLelement:#1\endcsname{\getXMLgroupedargument{#1}{#2}}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2{}}} + +\long\gdef\dododefineXMLnestedsave#1% + {\@EA\let\csname\@@XMLdata:#1\endcsname\longempty + \long\@EA\def\csname\@@XMLelement:#1\endcsname {\getXMLgroupednestedsave{#1}}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{\@EA\let\csname\@@XMLdata:#1\endcsname\longempty}} + +\long\unexpanded\gdef\getXMLgroupednestedsave#1% + {\collectXMLgroupedtrue + \long\def\dodogetgrouped{\long\@EA\edef\csname\@@XMLdata:#1\endcsname{\the\groupedtoks}}% + \getXMLgrouped{#1}} + +\long\gdef\dododefineXMLnestedenvironmentsave#1#2#3% + {\@EA\let\csname\@@XMLdata:#1\endcsname\longempty + \long\@EA\def\csname\@@XMLelement:#1\endcsname {\getXMLgroupednestedenvironmentsave{#1}{#2}{#3}}% + \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing + \long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2\@EA\let\csname\@@XMLdata:#1\endcsname\longempty#3}} + +\long\unexpanded\gdef\getXMLgroupednestedenvironmentsave#1#2#3% + {\collectXMLgroupedtrue + \long\def\dodogetgrouped{#2\long\@EA\edef\csname\@@XMLdata:#1\endcsname{\the\groupedtoks}#3}% + \getXMLgrouped{#1}} \egroup %D The high level definition macros. -\def\defineXMLsingular {\dotripleempty\dodefineXMLsingular} -\def\defineXMLcommand {\dotripleempty\dodefineXMLcommand} -\def\defineXMLgrouped {\dotripleempty\dodefineXMLgrouped} -\def\defineXMLargument {\dotripleempty\dodefineXMLargument} -\def\defineXMLignore {\dotripleempty\dodefineXMLignore} -\def\defineXMLpickup {\dotripleempty\dodefineXMLpickup} -\def\defineXMLenvironment {\dotripleempty\dodefineXMLenvironment} -\def\defineXMLsave {\dotripleempty\dodefineXMLsave} -\def\defineXMLsavecontent {\dotripleempty\dodefineXMLsavecontent} -\def\defineXMLgsave {\dotripleempty\dodefineXMLgsave} -\def\defineXMLgsavecontent {\dotripleempty\dodefineXMLgsavecontent} -\def\defineXMLenvironmentsave {\dotripleempty\dodefineXMLenvironmentsave} -\def\defineXMLenvironmentgsave{\dotripleempty\dodefineXMLenvironmentgsave} -\def\defineXMLprocess {\dotripleempty\dodefineXMLprocess} +\def\defineXMLsingular {\dotripleempty\dodefineXMLsingular} +\def\defineXMLcommand {\dotripleempty\dodefineXMLcommand} +\def\defineXMLgrouped {\dotripleempty\dodefineXMLgrouped} +\def\defineXMLargument {\dotripleempty\dodefineXMLargument} +\def\defineXMLignore {\dotripleempty\dodefineXMLignore} +\def\defineXMLpickup {\dotripleempty\dodefineXMLpickup} +\def\defineXMLenvironment {\dotripleempty\dodefineXMLenvironment} +\def\defineXMLsave {\dotripleempty\dodefineXMLsave} +\def\defineXMLsavecontent {\dotripleempty\dodefineXMLsavecontent} +\def\defineXMLgsave {\dotripleempty\dodefineXMLgsave} +\def\defineXMLgsavecontent {\dotripleempty\dodefineXMLgsavecontent} +\def\defineXMLenvironmentsave {\dotripleempty\dodefineXMLenvironmentsave} +\def\defineXMLenvironmentgsave {\dotripleempty\dodefineXMLenvironmentgsave} +\def\defineXMLprocess {\dotripleempty\dodefineXMLprocess} +\def\defineXMLnested {\dotripleempty\dodefineXMLnestedenvironment} +\def\defineXMLnestedenvironment {\dotripleempty\dodefineXMLnestedenvironment} +\def\defineXMLnestedargument {\dotripleempty\dodefineXMLnestedargument} +\def\defineXMLnestedsave {\dotripleempty\dodefineXMLnestedsave} +\def\defineXMLnestedenvironmentsave{\dotripleempty\dodefineXMLnestedenvironmentsave} + +%D We can nill definitions with: + +\def\resetXMLelement[#1]{\dododefineXMLprocess{#1}} + +%D This is equivalent to: +%D +%D \starttyping +%D \def\resetXMLelement[#1]% handy in case only singular +%D {\@EA\let\csname\@@XMLelement:#1\endcsname \donothing +%D \@EA\let\csname\@@XMLelement:/#1\endcsname\donothing +%D \@EA\let\csname\@@XMLelement:#1/\endcsname\donothing} +%D \stoptyping % push is (not yet) a real push, so: @@ -1787,10 +1880,6 @@ % goes for all types -\def\defineXMLnested {\dotripleempty\dodefineXMLnestedenvironment} -\def\defineXMLnestedenvironment{\dotripleempty\dodefineXMLnestedenvironment} -\def\defineXMLnestedargument {\dotripleempty\dodefineXMLnestedargument} - \long\def\dodefineXMLsingular[#1][#2][#3]#4% {\defineXMLmethod\dododefineXMLsingular{#1}{#2}{#3}{#4}{}} @@ -1839,6 +1928,12 @@ \long\def\dodefineXMLnestedargument[#1][#2][#3]#4% {\defineXMLmethod\dododefineXMLnestedargument{#1}{#2}{#3}{#4}{}} +\long\def\dodefineXMLnestedsave[#1][#2][#3]% + {\defineXMLmethod\dododefineXMLnestedsave{#1}{#2}{#3}{}{}} + +\long\def\dodefineXMLnestedenvironmentsave[#1][#2][#3]#4#5% + {\defineXMLmethod\dododefineXMLnestedenvironmentsave{#1}{#2}{#3}{#4}{#5}} + % [key=val] => \presetXMLarguments{element} => default key/vals % [blabla] => \theXMLarguments{blabla} => user key/vals % [blabla] [key=val] => \presetXMLarguments{element} => default key/vals @@ -1876,8 +1971,101 @@ \presetXMLarguments\rawXMLidentifier \to \everyXMLelement +%D We now overload the previously defined argument setter by one +%D that is faster when definitions are surrounded by +%D +%D \starttyping +%D \startXMLcompiling ... \stopXMLcompiling +%D \stoptyping +%D +%D This method is twice as fast on (for instance) 100K calls to +%D an empty element with 10 arguments. + +% \long\def\prepareXMLargument#1#2#3% +% {\scratchtoks\expandafter{\the\scratchtoks\@EA\def\csname#1#2\endcsname{#3}}} + +% \long\def\prepareXMLargument#1#2#3% +% {\scratchtoks\@EA\@EA\@EA{\@EA\the\@EA\scratchtoks\@EA\def\csname\@@XMLvariable:#1:#2\endcsname{#3}}} + +\let\@@globalprefix\empty + +\long\def\prepareXMLargument#1#2#3% + {\expanded{\scratchtoks + {\the\scratchtoks + \def\@EA\noexpand\csname\@@XMLvariable:#1:#2\endcsname{#3}% + \ifx\@@globalprefix\empty\else + \let\@EA\noexpand\csname\@@XMLvariable:\@@globalprefix:#2\endcsname + \@EA\noexpand\csname\@@XMLvariable:#1:#2\endcsname + \fi}}} + +\long\def\setXMLargumentsN#1#2#3% element [tag] settings + {\doifassignmentelse{#2} + {\letbeundefined{\@@XMLmap:#1}% + \long\setvalue{\@@XMLpars:#1}{\getrawparameters[\@@XMLvariable:#1:][#2]}} + {\long\setvalue{\@@XMLmap:#1}{#2}% later we can init vars by this name + \doifsomething{#3}{\long\setvalue{\@@XMLpars:#1}{\getrawparameters[#2][#3]}}}} + +\long\def\setXMLargumentsP#1#2#3% element settings empty (we cannot test for assignment) + {\letbeundefined{\@@XMLmap:#1}% + \ifx\@@globalprefix\empty\else + \@EA\let\csname\@@XMLglobal:#1\endcsname\@@globalprefix + \fi + \bgroup +% \def\XMLinheritance{\noexpand\XMLinheritance} + \def\XMLop##1{\noexpand\XMLpar{#1}{##1}{}}% + \def\XMLpar{\noexpand\XMLpar}% + \def\XMLanc{\noexpand\XMLanc}% + \def\XMLinh{\noexpand\XMLinh}% + \xdef\!!XMLattr{[#1][#2]}% + \scratchtoks\emptytoks + \@EA\dogetparameters\@EA\prepareXMLargument\!!XMLattr + \xdef\globalnext{\the\scratchtoks}% + \egroup + \letvalue{\@@XMLpars:#1}\globalnext + \globallet\globalnext\relax} + +\def\defineXMLattributeset{\dodoubleargument\dodefineXMLattributeset} +\def\extendXMLattributeset{\dodoubleargument\doextendXMLattributeset} + +\def\dodefineXMLattributeset[#1][#2]{\setvalue {\@@XMLpars::#1}{#2}} +\def\doextendXMLattributeset[#1][#2]{\appendvalue{\@@XMLpars::#1}{,#2}} + +\def\XMLattributeset #1{\executeifdefined{\@@XMLpars::#1}\empty} +%def\XMLinheritance #1{\executeifdefined{\@@XMLpars:#1}\empty} +\def\showXMLattributes#1{\showvalue{\@@XMLpars:#1}} + +\chardef\@@precompile\zerocount + +\def\setXMLarguments + {\ifcase\@@precompile + \expandafter\setXMLargumentsN + \else + \expandafter\setXMLargumentsP + \fi} + +\def\docopyXMLargument + {\@EA\@EA\@EA\let\@EA\@EA + \csname\@@XMLvariable:\csname\@@XMLglobal:\currentXMLelement\endcsname:\@@XMLname\endcsname + \csname\@@XMLvariable:\@@XMLclass :\@@XMLname\endcsname} + +\def\startXMLcompiling + {\dosingleargument\dostartXMLcompiling} + +\def\dostartXMLcompiling[#1]% + {\iffirstargument + \copyXMLargumentindeed % when needed, from now on -) + \def\@@globalprefix{#1}% + \fi + \chardef\@@precompile\plusone} + +\def\stopXMLcompiling + {\chardef\@@precompile\zerocount + \let\@@globalprefix\empty} + +%D Interesting what kind of things are needed \unknown + \appendtoks - \disablelanguagespecifics % interesting what kind of things are needed ... + \disablelanguagespecifics \to \everyenableXML \long\def\longempty{} @@ -2036,8 +2224,13 @@ %D We can pick up key|/|value pairs, but we still need a way %D to process these. -\def\mapXMLvalue#1#2#3% td align center -> middle - {\setvalue{\@@XMLvalue:#1:#2:#3}} +% bugged +% +% \def\mapXMLvalue#1#2#3% td align center -> middle +% {\setvalue{\@@XMLvalue:#1:#2:#3}} + +\def\mapXMLvalue#1#2#3% td:align center -> middle + {\setvalue{\@@XMLvalue:#1:#2}{#3}} % keep #3 to grab spaces \def\XMLvar#1#2#3% td align center {\ifcsname\@@XMLvariable:#1:#2\endcsname @@ -2050,12 +2243,22 @@ % {\XMLval{#1}{#2}{\ifcsname\@@XMLvariable:#1:#2\endcsname % \csname\@@XMLvariable:#1:#2\endcsname\else#3\fi}} -\def\XMLval#1#2#3% +% \def\XMLval#1#2#3% td:align value default +% {\ifcsname\@@XMLvalue:#1:#2\endcsname +% \csname\@@XMLvalue:#1:#2\endcsname +% \else +% #3% +% \fi} +% +% The next one permits commands instead of strings in #3 + +\def\XMLval#1#2% #1=td:align #2=value #3=default {\ifcsname\@@XMLvalue:#1:#2\endcsname - \csname\@@XMLvalue:#1:#2\endcsname + \@EA\firstoftwoarguments \else - #3% - \fi} + \@EA\secondoftwoarguments + \fi + {\csname\@@XMLvalue:#1:#2\endcsname}} \def\XMLpar#1#2#3% {\ifcsname\@@XMLvariable:#1:#2\endcsname @@ -2074,6 +2277,190 @@ \def\setXMLpar#1#2% {\@EA\def\csname\@@XMLvariable:#1:#2\endcsname} +% ancestor arguments: +% +% \defineXMLenvironment +% [fo:root] +% [test=unset] +% {\beginXMLelement} +% {\endXMLelement} +% +% \defineXMLenvironment +% [fo:block-container] +% [test=oeps] +% {\beginXMLelement} +% {\endXMLelement} +% +% \defineXMLenvironment +% [fo:block] +% {\beginXMLelement +% \begingroup} +% {\endgroup +% \XMLanc{test}{} +% \endXMLelement} +% +% \startXMLdata +% +% second: +% unset: +% deep:nested:outer: +% last: +% +% \stopXMLdata +% +% \startXMLdata +% +% second: +% unset: +% deep:nested:outer: +% last: +% +% \stopXMLdata +% +% \startXMLdata +% +% second: +% unset: +% deep:nested:outer: +% last: +% +% \stopXMLdata + +% dit werkt alleen ok in niet ... situaties omdat anders +% de laatste b de attributen van de vorige heeft: + +\def\XMLanc#1% + {\ifcsname\@@XMLvariable:\currentXMLelement:#1\endcsname % \ownXMLelement + \csname\@@XMLvariable:\currentXMLelement:#1\endcsname % \ownXMLelement + \@EA\gobblethreearguments + \else + \@EA\pXMLanc + \fi\XMLdepth{#1}} + +\def\pXMLanc#1% + {\@EA\ppXMLanc\@EA{\the\numexpr(#1-\plusone)}} + +\def\ppXMLanc#1#2#3% + {\ifcsname\@@XMLdepth:#1\endcsname % is er altijd dus redundant + \ifcsname\@@XMLvariable:\csname\@@XMLdepth:#1\endcsname:#2\endcsname + \csname\@@XMLvariable:\csname\@@XMLdepth:#1\endcsname:#2\endcsname + \@EAEAEA\gobblethreearguments + \else + \@EAEAEA\pppXMLanc + \fi + \else + \@EA\pppXMLanc + \fi{#1}{#2}{#3}} + +\def\pppXMLanc#1% + {\ifnum#1>\zerocount + \@EA\pXMLanc + \else + \@EA\thirdofthreearguments + \fi{#1}} + +%D Experimental: local and global attributes, don't ask -) +%D +%D \starttyping +%D \gXMLpar{element}{global}{attribute}{default} +%D \gXMLatt{element}{attribute} +%D \lXMLatt{element}{attribute} +%D \lcXMLatt{atribute} +%D \gcXMLatt{atribute} +%D \stoptyping + +\def\gXMLpar#1#2#3#4% #2 can be auto: \csname\@@XMLglobal:#1\endcsname + {\ifcsname\@@XMLvariable:#1:#3\endcsname + \csname\@@XMLvariable:#1:#3\endcsname + \else\ifcsname\@@XMLvariable:#2:#3\endcsname + \csname\@@XMLvariable:#2:#3\endcsname + \else + #4% + \fi\fi} + +\def\gXMLatt#1#2% element tag + {\csname + \ifcsname\@@XMLvariable:#1:#2\endcsname + \@@XMLvariable:#1:#2% + \else\ifcsname\@@XMLglobal:#1\endcsname + \ifcsname\@@XMLvariable:\csname\@@XMLglobal:#1\endcsname:#2\endcsname + \@@XMLvariable:\csname\@@XMLglobal:#1\endcsname:#2% + \else + \s!empty + \fi + \else + \s!empty + \fi\fi + \endcsname} + +\def\lXMLatt#1#2% element tag + {\ifcsname\@@XMLvariable:#1:#2\endcsname + \csname\@@XMLvariable:#1:#2\endcsname + \else + \s!empty + \fi} + +\def\gcXMLatt{\gXMLatt\currentXMLelement} % tag +\def\lcXMLatt{\lXMLatt\currentXMLelement} % tag + +%D Experimental (not sure if this will stay): +%D +%D \starttyping +%D \startdefineXMLhandlers[one,two] +%D +%D \defineXMLenvironment[a=b,c=\XMLop{a}] +%D {}{} +%D +%D \stopdefineXMLhandlers +%D \stoptyping + +\long\def\startdefineXMLhandlers + {\bgroup\catcode`\^^M=\@@space + \dodoubleempty\dostartdefineXMLhandlers} + +\long\def\dostartdefineXMLhandlers[#1][#2]#3#4\stopdefineXMLhandlers % #2 is dummy + {\egroup + \long\def\dodefineXMLhandlers##1{#3[##1]#4}% + \processcommalist[#1]\dodefineXMLhandlers} + +\let\currentXMLhandler\s!unknown + +% \long\def\dostartdefineXMLhandlers[#1][#2]#3#4[#5]#6\stopdefineXMLhandlers % #2 is dummy +% {\egroup +% \pushmacro\XMLop +% \pushmacro\XMLpar +% \pushmacro\currentXMLhandler +% \long\def\dodefineXMLhandlers##1% +% {\edef\currentXMLhandler{##1}% +% \def\XMLop####1{\noexpand\XMLpar{##1}{####1}{}}% +% \def\XMLpar{\noexpand\XMLpar}% +% \def\XMLanc{\noexpand\XMLanc}% +% \edef\!!stringa{[##1][#5]}% +% \expandafter#3\!!stringa#6}% +% \processcommalist[#1]\dodefineXMLhandlers +% \popmacro\currentXMLhandler +% \popmacro\XMLpar +% \popmacro\XMLop} + +\long\def\dostartdefineXMLhandlers[#1][#2]#3#4[#5]#6\stopdefineXMLhandlers % #2 is dummy + {\egroup + \long\def\dodefineXMLhandlers##1% + {\bgroup + \edef\currentXMLhandler{##1}% + \def\XMLop####1{\noexpand\XMLpar{##1}{####1}{}}% + \def\XMLpar{\noexpand\XMLpar}% + \def\XMLanc{\noexpand\XMLanc}% + \def\XMLinh{\noexpand\XMLinh}% + \xdef\!!XMLattr{[##1][#5]}% + \egroup + \expandafter#3\!!XMLattr#6}% + \processcommalist[#1]\dodefineXMLhandlers} + +\def\XMLpav#1#2#3#4% + {\XMLval{#1}{\XMLpar{#2}{#3}{}}{#4}} + +%D A few weird ones: + \def\TEXpar#1#2% {\csname#1\interfaced{#2}\endcsname} @@ -2169,10 +2556,14 @@ \def\ownXMLelement{\rawXMLnamespace\rawXMLidentifier} \def\XMLop#1% ownpar - {\csname\@@XMLvariable:\ownXMLelement:#1\endcsname} + {\csname\ifcsname\@@XMLvariable:\ownXMLelement:#1\endcsname + \@@XMLvariable:\ownXMLelement:#1\else\s!empty + \fi\endcsname} \def\XMLtp#1% texpar - {\csname\@@XMLmapmap\interfaced{#1}\endcsname} + {\csname\ifcsname\@@XMLmapmap\interfaced{#1}\endcsname + \@@XMLmapmap\interfaced{#1}\else\s!empty + \fi\endcsname} \def\doifelseXMLop#1{\doifelse{\XMLop{#1}}} \def\doifXMLop #1{\doif {\XMLop{#1}}} @@ -2191,12 +2582,19 @@ \def\doifnothingXMLtp #1{\doifnothing {\XMLtp{#1}}} \def\XMLflushself{\csname\@@XMLdata:\ownXMLelement\endcsname} + +\def\showXMLdata#1{\showvalue{\@@XMLdata:#1}} \def\XMLta {\theXMLarguments\@@XMLmapmap} \def\getXMLta {\expanded{\getparameters[\@@XMLmapmap][\XMLta]}} \def\expandXMLta{\expandXMLarguments\@@XMLmapmap} \def\expandXMLtp{\expandTEXpar\@@XMLmapmap} % #1 +\def\getXMLparameters[#1]% faster than \rawgetparameters[#1][\theXMLar..] + {\ifcsname\@@XMLmap:#1\endcsname + \expanded{\rawgetparameters[#1][\csname\@@XMLmap:#1\endcsname]}% + \fi} + \def\defXMLop#1#2{\@EA\let\@EA#1\csname\@@XMLvariable:\ownXMLelement:#2\endcsname} \def\defXMLtp#1#2{\@EA\let\@EA#1\csname\@@XMLmapmap\interfaced{#2}\endcsname} @@ -2234,7 +2632,7 @@ \protectXMLdata \dostartXMLdata} -\long\def\dostartXMLdata#1\stopXMLdata +\long\def\dostartXMLdata#1\stopXMLdata % evt \everyeof{} {\enableXML\scantokens{#1}% \endgroup \ifhmode\unskip\unskip\fi} @@ -2422,7 +2820,7 @@ \def\doXMLifequalelse#1#2% {\@EA\@@ifequal#1\relax\@@and#2\relax\@@then} -%D \starttypen +%D \starttyping %D \defineXMLenvironment[test][a=1] %D {\XMLownifequalelse{a}{2}{YES}{NO}} %D {} @@ -2434,8 +2832,8 @@ %D \startXMLdata %D test %D \stopXMLdata -%D \stoptypen +%D \stoptyping \def\XMLyes#1{\XMLownifequalelse{#1}{yes}{#1}{}} -\protect \endinput \ No newline at end of file +\protect \endinput diff --git a/tex/context/base/xtag-map.tex b/tex/context/base/xtag-map.tex index 423a5a36d..077bca13e 100644 --- a/tex/context/base/xtag-map.tex +++ b/tex/context/base/xtag-map.tex @@ -13,8 +13,8 @@ %D There is a more versatile mapper available in \type {xtag-rem.tex}! -%D We also need something that lets content as-is, like for -%D instance XML embedded in a chemical caption. +%D We also need something that lets content as-is, like for +%D instance XML embedded in a chemical caption. \beginTEX \endinput @@ -46,15 +46,15 @@ \let\normalparseXMLprocess\parseXMLprocess \let\normaldoXMLelement \doXMLelement -\let\normaldoXMLentity \doXMLentity +\let\normaldoXMLentity \doXMLentity \def\setnormalXMLhandler {\let\doXMLelement \normaldoXMLelement \let\parseXMLelement\normalparseXMLelement - \let\parseXMLescape \normalparseXMLescape + \let\parseXMLescape \normalparseXMLescape \let\parseXMLprocess\normalparseXMLprocess - \let\doXMLentity \normaldoXMLentity} - + \let\doXMLentity \normaldoXMLentity} + %D A careful reader will notice that we do a full expansion of %D the content of the element, although commands that are %D protected will stay untouched. In this stage we also @@ -124,13 +124,13 @@ % \def\remapXMLunknownONE#1#2% name args % {\ifremapXMLunknown\remapXMLone{\s!unknown}{#1 #2}\fi} -% +% % \def\remapXMLunknownTWO#1#2% name args % {\ifremapXMLunknown\remapXMLtwo{\s!unknown}{#1 #2}\fi} -% +% % \def\remapXMLunknownTHREE#1#2% name args % {\ifremapXMLunknown\remapXMLthree{\s!unknown/}{#1 #2}\fi} -% +% % \long\def\remapXMLelement#1#2 #3>#4% todo: we need to get rid of the end / % {\ifcase\findendofXMLelement#2#3>% % \if#1/% @@ -298,22 +298,22 @@ %D macros, that both deal with elements. We distinguish %D between normal and empty elements. %D -%D \starttypen +%D \starttyping %D \remapXMLsequence [name] [result map] \unexpandablecommand %D \remapXMLsequence [name] [result map] \unexpandablecommand -%D \stoptypen +%D \stoptyping %D %D The \MATHML\ module demonstrates how these can be used. %D The element is converted into a sequence with one or more %D of the following components. %D -%D \starttypen +%D \starttyping %D { \command {parameters} {argument} } -%D \stoptypen +%D \stoptyping %D %D The following combinations are supported. %D -%D \starttabulatie[|c|c|c|c|c|] +%D \starttabulate[|c|c|c|c|c|] %D \NC GCPA \NC grouped \NC command \NC parameters \NC argument \NC \NR %D \NC GCP \NC grouped \NC command \NC parameters \NC \NC \NR %D \NC GCA \NC grouped \NC command \NC \NC argument \NC \NR @@ -323,7 +323,7 @@ %D \NC CA \NC \NC command \NC \NC argument \NC \NR %D \NC C \NC \NC command \NC \NC \NC \NR %D \NC G \NC grouped \NC \NC \NC \NC \NR -%D \stoptabulatie +%D \stoptabulate %D %D Empty elements (singular ones) never get an argument, %D which makes sense, since they have at most parameters. @@ -373,7 +373,7 @@ \def\remapXMLentity#1;#2% {\doremapXMLentity{#1}#2}% -\def\doremapXMLentity% +\def\doremapXMLentity {\xmlrent} \unexpanded\def\xmlrent#1% @@ -382,9 +382,9 @@ %D The remapping is taken care of by the following macro, %D which takes three arguments. %D -%D \starttypen +%D \starttyping %D \XMLremapdata{before}{after}{content} -%D \stoptypen +%D \stoptyping %D %D After the remapping, the content is executed (expanded) %D under the normal \TEX\ catcode regime. The intermediate @@ -417,15 +417,15 @@ \long\def\XMLremapdata% {\dosingleempty\doXMLremapdata} -\long\def\doXMLremapdata[#1]#2#3#4% +\long\def\doXMLremapdata[#1]#2#3#4% {\bgroup \startXMLmapping[#1]% % enable unknown elements (should be macro) \doifsomething{#1} - {\doifdefinedelse{\@@XML#1:\s!unknown:M} - {\remapXMLunknowntrue}{\remapXMLunknownfalse}}% - % - \pushmacro\doXMLentity % needed ? + {\doifdefinedelse{\@@XML#1:\s!unknown:M} + {\remapXMLunknowntrue}{\remapXMLunknownfalse}}% + % + \pushmacro\doXMLentity % needed ? % this will change, proper split in element itself \ifx\currentXMLnamespace\empty \let\parseXMLelement\remapXMLelement @@ -453,7 +453,7 @@ \catcode`\^^Z=\@@space \xdef\remappedXMLdata{#4\empty}% \let\par\endgraf - \popmacro\doXMLentity % needed ? + \popmacro\doXMLentity % needed ? \disableXMLexpansion \catcode`\{=\@@begingroup \catcode`\}=\@@endgroup @@ -617,6 +617,22 @@ #2\empty \popmacro\xmlr} +\def\doifelseXMLRneighbors#1#2% + {\XMLRtoks\emptytoks + \pushmacro\xmlr + \donefalse + \let\prevXMLRchild\empty + \def\xmlr##1##2##3##4% + {\doif{##1}{#1}{\doif{##1}\prevXMLRchild{\donetrue}}% + \def\prevXMLRchild{##1}}% + #2\empty + \popmacro\xmlr + \ifdone + \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments + \fi} + \def\collectbetweenXMLRchild#1#2#3% {\XMLRtoks\emptytoks \pushmacro\xmlr @@ -667,7 +683,7 @@ \def\countXMLRchildren#1% {\pushmacro\xmlr \nofXMLRchildren=0 - \def\xmlr##1##2##3##4{\advance\nofXMLRchildren 1 } + \def\xmlr##1##2##3##4{\advance\nofXMLRchildren\plusone} #1\empty \popmacro\xmlr} @@ -675,7 +691,7 @@ {\pushmacro\xmlr \nofXMLRchildren=0 \def\xmlr##1##2##3##4% - {\rawdoifinsetelse{##1}{#1}{\advance\nofXMLRchildren 1 }{}} + {\rawdoifinsetelse{##1}{#1}{\advance\nofXMLRchildren\plusone}{}} #2\empty \popmacro\xmlr} @@ -692,12 +708,12 @@ \gdef\unmapXMLdata#1#2% todo: singular, evt ##2 space ervoor en ##1##2 {\bgroup \revertXMLremapping - \expandXMLremapping % now we can roll back - \setnormalXMLhandler % using the normal parser + \expandXMLremapping % now we can roll back + \setnormalXMLhandler % using the normal parser \resetXMLmapping % and leaving the mapping namespace - \xdef\unmappedXMLdata{#2}% recreate the original - \enableXMLelements % enable normal handler - \unmappedXMLdata % off we go ... + \xdef\unmappedXMLdata{#2}% recreate the original + \enableXMLelements % enable normal handler + \unmappedXMLdata % off we go ... \egroup} \egroup diff --git a/tex/context/base/xtag-meb.tex b/tex/context/base/xtag-meb.tex index 88bedb00f..ba370cadf 100644 --- a/tex/context/base/xtag-meb.tex +++ b/tex/context/base/xtag-meb.tex @@ -1,4 +1,4 @@ -% filtered from html files by Patrick Ion +% filtered from html files by Patrick Ion % % ISOAMSB Characters Extended % diff --git a/tex/context/base/xtag-mmc.tex b/tex/context/base/xtag-mmc.tex index 9da718b27..2e6d3d988 100644 --- a/tex/context/base/xtag-mmc.tex +++ b/tex/context/base/xtag-mmc.tex @@ -43,11 +43,11 @@ \remapXMLsequence [cn] [CPA] \MMLcCN \remapXMLsequence [csymbol] [CPA] \MMLcCSYMBOL -\setupMMLappearance[polar][\c!variant=\v!a] % a|b|c +\setupMMLappearance[polar][\c!alternative=\v!a] % a|b|c \def\MMLcpolar#1% - {\doifdefinedelse{MMLcdopolar\@@MMLpolarvariant} - {\getvalue{MMLcdopolar\@@MMLpolarvariant}{#1}} + {\doifdefinedelse{MMLcdopolar\@@MMLpolaralternative} + {\getvalue{MMLcdopolar\@@MMLpolaralternative}{#1}} {#1}} \def\MMLcdopolara#1% @@ -66,10 +66,10 @@ % float will be obsolete, an is replace by e-notation -\setupMMLappearance[float][\c!symbool=\v!nee] % \v!ja|dot +\setupMMLappearance[float][\c!symbol=\v!no] % \v!yes|dot \def\MMLcfloat#1% - {\doifelse\@@MMLfloatsymbool\v!nee + {\doifelse\@@MMLfloatsymbol\v!no {{\rm#1}} % make sure that e shows up ok {% we should ignore \entities ! \beforesplitstring#1\at e\to\first @@ -77,20 +77,18 @@ \ifx\first\empty #1\else \ifx\last \empty #1\else \first - \doifelse\@@MMLfloatsymbool{dot}\cdot\times + \doifelse\@@MMLfloatsymbol{dot}\cdot\times 10^{\last}% \fi\fi}} % we now have: -\setupMMLappearance[enotation][\c!symbool=\v!nee] % \v!ja|dot +\setupMMLappearance[enotation][\c!symbol=\v!no] % \v!yes|dot \def\MMLcenotation#1% - {\doifelse\@@MMLenotationsymbool\v!nee - {\def\MMLcsep% - {\unskip{\rm e}\ignorespaces}} - {\def\MMLcsep##1\empty - {\doifelse\@@MMLenotationsymbool{dot}\cdot\times10^{##1}}}% + {\doifelse\@@MMLenotationsymbol\v!no + {\def\MMLcsep {\unskip{\rm e}\ignorespaces}} + {\def\MMLcsep##1\empty{\doifelse\@@MMLenotationsymbol{dot}\cdot\times10^{##1}}}% #1\empty} \def\MMLcCI#1% #2% can be sped up with \doifundefined ... @@ -126,10 +124,7 @@ complex-cartesian=>\let\next\MMLccartesian, {{\bi#1}} \def\MMLcCIfunction#1% - {\doifMMLoperatorelse{#1} - {\let\next\MMLcCIdefault} - {\let\next\MMLcFNdefault}% - \next{}{#1}} + {\doifMMLoperatorelse{#1}\MMLcCIdefault\MMLcFNdefault{}{#1}} \def\MMLcCIdefault#1#2% #1=dummy {#2%\!% \getXMLentity{NegThinSpace}% looks bad in A(x) @@ -156,19 +151,19 @@ complex-cartesian=>\let\next\MMLccartesian, {\let\next\firstofoneargument} \next} -\setupMMLappearance[base][\c!symbool=\v!cijfers] % cijfers|letters|tekst|nee +\setupMMLappearance[base][\c!symbol=\v!numbers] % cijfers|letters|tekst|nee \def\MMLcCNinteger#1% {\doifXMLparelse{cn}{base} {\def\MMLcCNbase{\XMLpar{cn}{base}{}}% - \doifelse\@@MMLbasesymbool\v!nee + \doifelse\@@MMLbasesymbol\v!no {\MMLcCNbasedata{#1}} {\MMLcCNbasedata{#1}_{\hbox{$\rm\scriptscriptstyle \processaction - [\@@MMLbasesymbool] - [\v!letters=>\MMLcCNbasestring BODH, - \v!tekst=>\MMLcCNbasestring{BIN}{OCT}{DEC}{HEX}, - \s!unknown=>\MMLcCNbase]$}}}} + [\@@MMLbasesymbol] + [\v!characters=>\MMLcCNbasestring BODH, + \v!text=>\MMLcCNbasestring{BIN}{OCT}{DEC}{HEX}, + \s!unknown=>\MMLcCNbase]$}}}} {#1}} \def\MMLcCNbasedata#1% @@ -266,10 +261,9 @@ complex-cartesian=>\let\next\MMLccartesian, {\doifXMLRchildelse{ci}{#2} {\collectXMLRchild{ci}{#2}% \@EA\doifMMLoperatorelse\@EA{\the\XMLRtoks} - {\let\next\MMLcFNoperator} - {\let\next\MMLcFNdefault}} - {\let\next\MMLcFNdefault}% - \next{#1}{#2}} + \MMLcFNoperator\MMLcFNdefault} + {\MMLcFNdefault}% + {#1}{#2}} \def\MMLcFNdefault#1#2% neg space needed because of \left {#2\!% \getXMLentity{NegThinSpace}% @@ -346,10 +340,10 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsequence [declare] [CPA] \MMLcDECLARE -\setupMMLappearance[declare][\c!status=\v!start] +\setupMMLappearance[declare][\c!state=\v!start] \def\MMLcDECLARE#1#2% - {\doif\@@MMLdeclarestatus\v!start + {\doif\@@MMLdeclarestate\v!start {\withnextXMLRelement {\getXMLentity{declare}\nextXMLRelement \countXMLRchildren{#2}% @@ -362,10 +356,10 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsequence [lambda] [CPA] \MMLcLAMBDA -\setupMMLappearance[lambda][\c!variant=b] +\setupMMLappearance[lambda][\c!alternative=b] \def\MMLcLAMBDA#1#2% - {\doifelse\@@MMLlambdavariant\v!a + {\doifelse\@@MMLlambdaalternative\v!a {\encapsulateXMLR{\getXMLentity{lambda}(}{\MMLccomma}{)}{#2}} {\countXMLRchild{bvar}{#2}% \ifnum\nofXMLRchildren>1 @@ -410,12 +404,12 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsequence [piece] [CPA] \MMLcPIECE \remapXMLsequence [otherwise] [CPA] \MMLcOTHERWISE -\setupMMLappearance[piece][\c!scheider=] +\setupMMLappearance[piece][\c!separator=] \def\MMLcPIECEWISE#1#2% {\cases{#2}} -%\def\MMLcPIECE#1#2% \@@MMLpiecescheider +%\def\MMLcPIECE#1#2% \@@MMLpieceseparator % {\withnexttwoXMLRelements % {\@EA\XMLRtoks\@EA{\firstXMLRelement\@col@amp@}% % \@EA\appendtoks\@EA\mathematics\@EA{\secondXMLRelement}\to\XMLRtoks @@ -425,7 +419,7 @@ complex-cartesian=>\let\next\MMLccartesian, %\def\MMLcOTHERWISE#1#2% % {#2\@col@amp@\mathematics{\getXMLentity{otherwise}}\crcr} -\def\MMLcPIECEseparator{\doif\@@MMLpiecescheider\v!ja,} +\def\MMLcPIECEseparator{\doif\@@MMLpieceseparator\v!yes,} \def\MMLcPIECE#1#2% {\withnexttwoXMLRelements @@ -451,12 +445,12 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [divide] [CPA] \MMLcDIVIDE -\setupMMLappearance [divide] [\c!niveau=\!!maxcard] +\setupMMLappearance [divide] [\c!level=\!!maxcard] \def\MMLcDIVIDE#1#2% {\withnexttwoXMLRelements {\increment\MMLcDIVIDElevel - \ifnum\MMLcDIVIDElevel>\@@MMLdivideniveau\space + \ifnum\MMLcDIVIDElevel>\@@MMLdividelevel\space \firstXMLRelement/\secondXMLRelement \else \frac{\MMLcreset\firstXMLRelement}{\MMLcreset\secondXMLRelement}% @@ -479,14 +473,14 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [minus] [CPA] \MMLcMINUS \remapXMLsingular [plus] [CPA] \MMLcPLUS -\setupMMLappearance[sign][\c!reductie=\v!ja] +\setupMMLappearance[sign][\c!reduction=\v!yes] \def\MMLcMINUS % expandafter needed ? - {\doifelse\@@MMLsignreductie\v!ja + {\doifelse\@@MMLsignreduction\v!yes {\expandafter\MMLcMINUSyes}{\expandafter\MMLcMINUSno}} \def\MMLcPLUS % expandafter needed ? - {\doifelse\@@MMLsignreductie\v!ja + {\doifelse\@@MMLsignreduction\v!yes {\expandafter\MMLcPLUSyes}{\expandafter\MMLcPLUSno}} \def\MMLcMINUSno#1#2#3\empty @@ -517,14 +511,14 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [power] [CPA] \MMLcPOWER -\setupMMLappearance[power][\c!reductie=\v!ja] +\setupMMLappearance[power][\c!reduction=\v!yes] \let\MMLpowerelement\empty \def\MMLcPOWER#1#2% {\withnexttwoXMLRelements {\doifXMLRchildelse{apply}{\firstXMLRelement} - {\doifelse\@@MMLpowerreductie\v!ja + {\doifelse\@@MMLpowerreduction\v!yes {\collectXMLRchild{apply}{\firstXMLRelement}% \@EA\doifXMLRchildelse\@EA{\MMLcfunctionlist}{\the\XMLRtoks} {\let\MMLpowerelement\secondXMLRelement @@ -541,13 +535,19 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [times] [CPA] \MMLcTIMES -\setupMMLappearance[times][\c!symbool=\v!nee] +\setupMMLappearance[times][\c!symbol=\v!no] % +\setupMMLappearance[times][\c!auto=\v!yes] % new, auto catches cn cn cn \def\MMLcTIMES#1#2#3\empty {\setMMLcreset{\MMLcfunctionlist,\MMLcconstructlist}% - \doifelse\@@MMLtimessymbool\v!ja + \doifelse\@@MMLtimesauto\v!no + {\let\@@MMLtimes@@symbol\@@MMLtimessymbol} + {\doifelseXMLRneighbors{cn}{#3} + {\let\@@MMLtimes@@symbol\@@MMLtimesauto} + {\let\@@MMLtimes@@symbol\v!no}}% + \doifelse\@@MMLtimes@@symbol\v!yes {\encapsulateXMLR{}{\times}{}{#3\empty}} - {\doifelse\@@MMLtimessymbool{dot} + {\doifelse\@@MMLtimes@@symbol{dot} {\encapsulateXMLR{}{\cdot}{}{#3\empty}} {#3\empty}}} @@ -560,11 +560,11 @@ complex-cartesian=>\let\next\MMLccartesian, % \MMLcreset\processXMLRchildren{#3}}} % {\sqrt{\MMLcreset\processXMLRchildren{#3}}}} -\setupMMLappearance[root][\c!symbool=\v!ja] +\setupMMLappearance[root][\c!symbol=\v!yes] \def\MMLcROOT#1#2#3\empty {\doifXMLRchildelse{degree}{#3}\donetrue\donefalse - \doif\@@MMLrootsymbool\v!nee\donefalse + \doif\@@MMLrootsymbol\v!no\donefalse \ifdone \root\processXMLRchild{degree}{#3}\of {\let\MMLcDEGREE\ignoreXMLRelement @@ -678,7 +678,7 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [approx] [CPA] \MMLcAPPROX \remapXMLsingular [factorof] [CPA] \MMLcFACTOROF -\setupMMLappearance[relation][\c!uitlijnen=\v!nee] +\setupMMLappearance[relation][\c!align=\v!no] \def\noMMLcrelation#1#2% {\encapsulatenextXMLRelements{}{#1}{}#2\empty} @@ -719,12 +719,12 @@ complex-cartesian=>\let\next\MMLccartesian, \def\MMLcrelation#1#2\empty {\MMLcreset \processaction - [\@@MMLrelationuitlijnen] - [\v!laatste=>\let\next\lastMMLcrelation , - \v!eerste=>\let\next\firstMMLcrelation, - \v!ja=>\let\next\leftMMLcrelation , - \v!links=>\let\next\leftMMLcrelation , - \v!rechts=>\let\next\rightMMLcrelation, + [\@@MMLrelationalign] + [\v!last=>\let\next\lastMMLcrelation , + \v!first=>\let\next\firstMMLcrelation, + \v!yes=>\let\next\leftMMLcrelation , + \v!left=>\let\next\leftMMLcrelation , + \v!right=>\let\next\rightMMLcrelation, \s!default=>\let\next\noMMLcrelation , \s!unknown=>\let\next\noMMLcrelation ] \next{#1}{#2}} @@ -749,12 +749,12 @@ complex-cartesian=>\let\next\MMLccartesian, %%% calculus and vector calculus -\setupMMLappearance[int][\c!plaats=\v!boven] +\setupMMLappearance[int][\c!location=\v!top] \remapXMLsingular [int] [CPA] \MMLcINT \def\doMMLlimits#1% - {\doifelsevalue{@@MML#1\c!plaats}\v!boven\limits\nolimits} + {\doifelsevalue{@@MML#1\c!location}\v!top\limits\nolimits} \def\MMLcINT#1#2#3\empty {\pushmacro\xmlr @@ -783,7 +783,7 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [diff] [CPA] \MMLcDIFF -\setupMMLappearance[diff][\c!plaats=\v!boven] +\setupMMLappearance[diff][\c!location=\v!top] \def\MMLcDIFF#1#2#3\empty {\pushmacro\xmlr @@ -794,7 +794,7 @@ complex-cartesian=>\let\next\MMLccartesian, \collectXMLRchild{bvar}{#3}% \let\MMLcDEGREE\superMMLcelement \expanded{\processXMLRchild{degree}{\the\XMLRtoks}}% - \doif\@@MMLdiffplaats\v!boven + \doif\@@MMLdifflocation\v!top {\doifXMLRchildelse{ci}{#3} {\processXMLRchild{ci}{#3}} {\doifMMLfunctionelse{#3} @@ -803,7 +803,7 @@ complex-cartesian=>\let\next\MMLccartesian, {\let\MMLcDEGREE\superMMLcelement \begingroup\rm\getXMLentity{mathematicald}\endgroup \processXMLRchild{bvar}{#3}}% - \doifnot\@@MMLdiffplaats\v!boven + \doifnot\@@MMLdifflocation\v!top {\left(\MMLcreset\processXMLRchild{apply,ci}{#3}\right)}} {\processXMLRchildren{#3}^\prime}% \popmacro\xmlr} @@ -928,8 +928,8 @@ complex-cartesian=>\let\next\MMLccartesian, \def\MMLcSUM {\MMLcSUMandPRODUCT{sum}\sum} \def\MMLcPRODUCT{\MMLcSUMandPRODUCT{product}\prod} -\setupMMLappearance[sum][\c!plaats=\v!boven] -\setupMMLappearance[product][\c!plaats=\v!boven] +\setupMMLappearance[sum][\c!location=\v!top] +\setupMMLappearance[product][\c!location=\v!top] \def\stackMMLsubscripts#1% {\vbox @@ -959,7 +959,7 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [limit] [CPA] \MMLcLIMIT -\setupMMLappearance[limit][\c!plaats=\v!boven] +\setupMMLappearance[limit][\c!location=\v!top] \def\MMLcLIMIT#1#2#3\empty {\pushmacro\xmlr @@ -1004,13 +1004,13 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [log] [CPA] \MMLcLOG -\setupMMLappearance[log][\c!plaats=\v!rechts] +\setupMMLappearance[log][\c!location=\v!right] \def\MMLcLOG#1#2#3\empty {\pushmacro\MMLcLOGBASE \let\MMLcLOGBASE\secondoftwoarguments \doifXMLRchildelse{logbase}{#3} - {\doifelse\@@MMLlogplaats\v!links + {\doifelse\@@MMLloglocation\v!left {\mathop{{}^{\processXMLRchild{logbase}{#3}}\!\getXMLentity{log}}} {\getXMLentity{log}_{\processXMLRchild{logbase}{#3}}}} {\getXMLentity{log}}% @@ -1047,7 +1047,7 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [sech] [CPA] \MMLcSECH \remapXMLsingular [arcsech] [CPA] \MMLcARCSECH -\setupMMLappearance[function][\c!reductie=\v!ja] +\setupMMLappearance[function][\c!reduction=\v!yes] \def\doMMLcfunction#1% {\doifnextcharelse\xmlr{\dodoMMLcfunction{#1}}{\getXMLentity{#1}}} @@ -1060,7 +1060,7 @@ complex-cartesian=>\let\next\MMLccartesian, {\ifx\MMLpowerelement\empty\else ^{\MMLcreset\MMLpowerelement\empty}\!\let\MMLpowerelement\empty \fi - \doifelse\@@MMLfunctionreductie\v!ja + \doifelse\@@MMLfunctionreduction\v!yes {\doifXMLRchildelse{apply}{#1} {\collectXMLRchild{apply}{#1}% \@EA\doifXMLRchildelse\@EA{\MMLcfunctionlist}{\the\XMLRtoks} @@ -1121,12 +1121,12 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsequence [vector] [CPA] \MMLcVECTOR -\setupMMLappearance[vector][\c!richting=\v!horizontaal] % \v!vertikaal +\setupMMLappearance[vector][\c!direction=\v!horizontal] % \v!vertical \def\MMLcVECTOR#1#2% {\countXMLRchildren{#2}% \ifnum\nofXMLRchildren>1 - \doifelse\@@MMLvectorrichting\v!horizontaal + \doifelse\@@MMLvectordirection\v!horizontal {\encapsulateXMLR{\left(}{\MMLccomma}{\right)}{#2}} {\collectbetweenXMLR{\crcr}{#2}% \MMLcreset\left(\matrix{\the\XMLRtoks}\right)}% diff --git a/tex/context/base/xtag-mml.tex b/tex/context/base/xtag-mml.tex index cacdaf4e3..b77063986 100644 --- a/tex/context/base/xtag-mml.tex +++ b/tex/context/base/xtag-mml.tex @@ -13,6 +13,9 @@ \writestatus{loading}{Context XML Macros (math ml)} +% I will reimplement this one without mapping since we now have more +% tricks available + %\enablemathpunctuation % First some general formula element definitions. @@ -60,6 +63,7 @@ \defineXMLargument [math] \doXMLmath \defineXMLargument [imath] \doXMLimath \defineXMLargument [dmath] \doXMLdmath +\defineXMLargument [m] \doXMLimath \unexpanded\def\doXMLmath {\ifhmode\@EA\doXMLimath\else\@EA\doXMLdmath\fi} \unexpanded\def\doXMLimath{\XMLremapdata[mml]{$}{$}} @@ -96,7 +100,7 @@ \bgroup \obeylines -\gdef\defineMMLentity +\gdef\defineMMLentity% % needed ! {\bgroup\obeylines\xdefineMMLentity} \gdef\xdefineMMLentity #1 #2 #3 #4 @@ -104,7 +108,7 @@ \global\let\dodefineMMLentity\gobblefourarguments -\gdef\defineMMLsynonym +\gdef\defineMMLsynonym% % needed ! {\bgroup\obeylines\xdefineMMLsynonym} \gdef\xdefineMMLsynonym #1 #2 @@ -124,7 +128,7 @@ \egroup} \newbox\unknownXMLentity -\setbox\unknownXMLentity\hbox{\inframed[strut=no,offset=1pt]{\ttx ?}} +\setbox\unknownXMLentity\hbox{\inframed[\c!strut=\v!no,\c!offset=1pt]{\ttx ?}} \defineXMLentity [unknown] {\copy\unknownXMLentity} @@ -399,7 +403,8 @@ \def\somespaceentity#1#2% {\mathortext {\mskip#1mu} - {\unskip\hskip#2em\strut\hskip\zeropoint\ignorespaces}\relax} + {\ifvmode\dontleavehmode\else\unskip\fi\hskip#2em\strut\hskip\zeropoint\ignorespaces}% + \relax} \defineXMLentity [VeryThinSpace] {\somespaceentity {2}{.125}} \defineXMLentity [ThinSpace] {\somespaceentity {3}{.25}} diff --git a/tex/context/base/xtag-mmp.tex b/tex/context/base/xtag-mmp.tex index 13d488e5e..84b421053 100644 --- a/tex/context/base/xtag-mmp.tex +++ b/tex/context/base/xtag-mmp.tex @@ -196,9 +196,9 @@ \def\doMMPpbackground#1#2% {\doifXMLparelse{#1}{background} {\inframed - [\c!kader=\v!uit, - \c!achtergrond=\v!kleur, - \c!achtergrondkleur=\XMLpar{#1}{background}{}] + [\c!frame=\v!off, + \c!background=\v!color, + \c!backgroundcolor=\XMLpar{#1}{background}{}] {#2}} {#2}} @@ -222,11 +222,11 @@ \remapXMLsequence [msup] [CPA] \MMLpSUP \remapXMLsequence [msub] [CPA] \MMLpSUB -\setupMMLappearance[scripts][\c!variant=\v!a] +\setupMMLappearance[scripts][\c!alternative=\v!a] \def\MMLpSUBP#1#2% {\withnexttwoXMLRelements - {\doifelse\@@MMLscriptsvariant\v!a + {\doifelse\@@MMLscriptsalternative\v!a {{\firstXMLRelement}#1{\secondXMLRelement}} % both {} essential {\firstXMLRelement#1{\secondXMLRelement}}}% #2} @@ -323,12 +323,12 @@ \getXMLarguments{mtable} {columnalign="" columnspacing=".25ex" rowspacing=".25ex" frame="" color="" background="" #1}% - \setupTABLE[\c!kader=\v!uit]% - \MMLpTABLEmapper{background}{\c!achtergrondkleur}{}% - \MMLpTABLEmapper{color}{\c!kleur}{}% - \MMLpTABLEmapper{frame}{\c!kader} + \setupTABLE[\c!frame=\v!off]% + \MMLpTABLEmapper{background}{\c!backgroundcolor}{}% + \MMLpTABLEmapper{color}{\c!color}{}% + \MMLpTABLEmapper{frame}{\c!frame} {\MMLpREMAP{none}{off}\MMLpREMAP{solid}{on}}% - \MMLpTABLEmapper{columnalign}{\c!uitlijnen} + \MMLpTABLEmapper{columnalign}{\c!align} {\MMLpREMAP{left}{right}% \MMLpREMAP{right}{left}% \MMLpREMAP{center}{middle}}% @@ -336,7 +336,7 @@ \let\MMLpTABLEoffset\MMLpunit \let\MMLpTR\doMMLpTR \let\MMLpTD\doMMLpTD - \bTABLE[\c!achtergrond=\v!kleur,\c!offset=\MMLpTABLEoffset]#2\eTABLE + \bTABLE[\c!background=\v!color,\c!offset=\MMLpTABLEoffset]#2\eTABLE \endgroup} \def\doMMLpTR#1#2% @@ -349,18 +349,18 @@ {columnalign="" columnspacing="" rowspacing="" frame="" color="" background="" #1}% \let\theMMLpTABLEmap\empty - \MMLpTABLEmap{background}{\c!achtergrondkleur}{}% - \MMLpTABLEmap{color}{\c!kleur}{}% - \MMLpTABLEmap{frame}{\c!kader} + \MMLpTABLEmap{background}{\c!backgroundcolor}{}% + \MMLpTABLEmap{color}{\c!color}{}% + \MMLpTABLEmap{frame}{\c!frame} {\MMLpREMAP{none}{off}\MMLpREMAP{solid}{on}}% - \MMLpTABLEmap{columnalign}{\c!uitlijnen} + \MMLpTABLEmap{columnalign}{\c!align} {\MMLpREMAP{left}{right}\MMLpREMAP{right}{left}}% \@EA\bTD\@EA[\theMMLpTABLEmap]$\ignorespaces#2\unskip$\eTD} -\setupMMLappearance[mtable][\c!variant=\v!a] +\setupMMLappearance[mtable][\c!alternative=\v!a] \def\MMLpTABLE - {\doifelse\@@MMLmtablevariant\v!a + {\doifelse\@@MMLmtablealternative\v!a {\expandafter\MMLpTABLEa} {\expandafter\MMLpTABLEb}} diff --git a/tex/context/base/xtag-pre.tex b/tex/context/base/xtag-pre.tex index 1a309c584..96231bd87 100644 --- a/tex/context/base/xtag-pre.tex +++ b/tex/context/base/xtag-pre.tex @@ -34,8 +34,8 @@ \def\defaultXMLelement {\iftraceXMLelements{\infofont<\currentXMLfullidentifier>}\fi} -%D We can use the default handler to implement automatic -%D element hiding. Beware: this overloads the tracer. +%D We can use the default handler to implement automatic +%D element hiding. Beware: this overloads the tracer. \def\startXMLignore{\dododefineXMLignore \s!default} \def\stopXMLignore {\dododefineXMLprocess\s!default} @@ -43,7 +43,9 @@ %D The following entities need to be defined anyway. They %D may be overloaded later. -\defineXMLentities [amp] {\string&} {\&} +% rest also \letter + +\defineXMLentities [amp] {\letterampersand} {\&} \defineXMLentities [gt] {\string>} {\mathematics{>}} \defineXMLentities [lt] {\string<} {\mathematics{<}} \defineXMLentities [quot] {\string"} {\mathematics{"}} @@ -90,8 +92,8 @@ \def\setupXMLfile{\dodoubleargument\getparameters[\??xf]} \setupXMLfile - [\c!tussen=\blanko, - \c!niveau=1] + [\c!inbetween=\blank, + \c!level=1] \fetchruntimecommand\showXMLfile {\f!xtagprefix\s!run} \fetchruntimecommand\showXMLbuffer{\f!xtagprefix\s!run} @@ -114,37 +116,58 @@ %D The comment escape has the form: %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping \defineXMLescape [--] {\gobbleuntil{-->}} %D The \type {CDATA} escape is kind of unique in its %D strange syntax. %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping %D %D Watch this rather obscure definition (we need to pass an %D \type {[} to the macro. -% \defineXMLescape [{CDATA[}] -% {\skipfirstverbatimlinefalse -% \processtaggeddisplayverbatim{]]>}} +\chardef\XMLcdatamethod=1 -\defineXMLescape [CDATA] +\newtoks \everyXMLcdata % \appendtoks \tt \to \everyXMLcdata + +\setvalue{XMLcdatamethod1}% {\skipfirstverbatimlinefalse \processtaggeddisplayverbatim{]]>}} -%D \starttypen +\setvalue{XMLcdatamethod2}% + {\begingroup + \obeylines + \obeyspaces + \the\everyXMLcdata + \processXMLcdata} + +\long\def\processXMLcdata#1]]>% + {#1\endgroup} + +\defineXMLescape [CDATA] + {\executeifdefined{XMLcdatamethod\number\XMLcdatamethod}{\begingroup\processXMLcdata}} + +%D \starttyping +%D +%D +%D \stoptyping + +\defineXMLescape [ATTLIST]{\gobbleuntil>} +\defineXMLescape [ELEMENT]{\gobbleuntil>} + +%D \starttyping %D %D %D -%D \stoptypen +%D \stoptyping \defineXMLescape [ENTITY] \handleXMLentityescape @@ -178,7 +201,7 @@ %D Such entities can be encapsulated in a \type {DOCTYPE} %D element. Therefore we remove the outer level of document %D type definitions. -%D +%D %D \starttyping %D %D @@ -218,7 +241,7 @@ {\executeifdefined{XMLdoctype#1}{\gobbleuntil>}} \setvalue{XMLdoctype>}{} -\setvalue{XMLdoctype[}{\processuntil{]>}} % or \gobbleuntil{]>}} +\setvalue{XMLdoctype[}{\processuntil{]>}} % or \gobbleuntil{]>}} \def\XMLdoctypeS YSTEM % {\dowithgrabbedstring\dodohandleXMLdoctype} @@ -226,11 +249,11 @@ \def\XMLdoctypeP UBLIC % {\dowithgrabbedstring{\dowithgrabbedstring\dodohandleXMLdoctype}} -% wrong +% wrong % % \def\XMLdoctypeS YSTEM {\XMLgrabstring} % \def\XMLdoctypeP UBLIC {\XMLgrabstring} -% +% % \def\XMLgrabstring % {\doifnextcharelse>{\gobbleuntil>}{\dowithgrabbedstring\XMLgrabstring}} @@ -260,7 +283,7 @@ %D because the possibility to process \CONTEXT\ commands is %D gone. -\setupXMLprocessing[\c!commando=\v!ja] +\setupXMLprocessing[\c!command=\v!yes] %\def\contextXMLcommand#1% % {\doif\@@xpcommando\v!ja @@ -271,7 +294,7 @@ % \popmacro\disableXML}} \def\contextXMLcommand#1% we don't use #1 here - {\doif\@@xpcommando\v!ja + {\doif\@@xpcommand\v!yes {\disableXML\scantokens\@EA{\currentXMLprocess}\enableXML}} %D The indirect method (using the macro \type @@ -280,9 +303,9 @@ %D definition, and given that \ETEX\ is used, we can now %D say: %D -%D \starttypen +%D \starttyping %D -%D \stoptypen +%D \stoptyping %D %D A non||\ETEX\ solution is also possible, using buffers, %D but for the moment we assume that \ETEX\ is used. @@ -297,7 +320,7 @@ {\docontextXMLdirective#1 @ @ @\end} \def\docontextXMLdirective#1 #2 #3 #4\end % class variable value - {\csname\@@XMLvariable:#1:#2\endcsname{#3}} + {\expandafter\def\csname\@@XMLvariable:#1:#2\endcsname{#3}} %D A simple processing instruction is the following. It just %D writes a message to the screen. @@ -344,24 +367,24 @@ %D Say that a file contains blocks like the following: %D -%D \starttypen +%D \starttyping %D %D %D maybe so much %D %D -%D \stoptypen +%D \stoptyping %D %D The following commands will show only this block: %D -%D \starttypen +%D \starttyping %D \videXMLcontextblock[whatevername] \showXMLfile{yourfile} -%D \stoptypen +%D \stoptyping %D %D You can also mark blocks in the following way, thereby %D saving yourself some work: %D -%D \starttypen +%D \starttyping %D %D %D What do you want? @@ -371,7 +394,7 @@ %D How do you want? %D %D -%D \stoptypen +%D \stoptyping % yet undocumented and experimental diff --git a/tex/context/base/xtag-prs.tex b/tex/context/base/xtag-prs.tex new file mode 100644 index 000000000..b3eb681fc --- /dev/null +++ b/tex/context/base/xtag-prs.tex @@ -0,0 +1,42 @@ +%D \module +%D [ file=xtag-prs, +%D version=2004.08.18, +%D title=\CONTEXT\ XML Support, +%D subtitle=Parsing, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\def\analyzefunction#1% + {\expanded{\doanalyzefunction#1\relax\relax(#1)}\empty\relax\end} + +\def\doanalyzefunction#1#2(#3)#4\relax#5\end + {\ifx#4\empty + \let\functionname\empty + \else + \def\functionname{#1#2}% + \fi + \getfunctionargs#3,\empty,\empty,\empty,\empty,\empty,\empty,\empty,\empty\relax} + +\def\getfunctionargs#1,#2,#3,#4,#5,#6,#7,#8,#9\relax + {\edef\functionA{#1}\edef\functionB{#2}% + \edef\functionC{#3}\edef\functionD{#4}% + \edef\functionE{#5}\edef\functionF{#6}% + \edef\functionG{#7}\edef\functionH{#8}} + +% \analyzefunction{x} [\functionname][a:\functionA/b:\functionB/c:\functionC/d:\functionD] \endgraf +% \analyzefunction{sin(x)} [\functionname][a:\functionA/b:\functionB/c:\functionC/d:\functionD] \endgraf +% \analyzefunction{1pt,2pt,3pt,4pt} [\functionname][a:\functionA/b:\functionB/c:\functionC/d:\functionD] \endgraf +% \analyzefunction{rect(1pt,2pt,3pt,4pt)} [\functionname][a:\functionA/b:\functionB/c:\functionC/d:\functionD] \endgraf +% \analyzefunction{1pt,2pt,3pt,4pt,5pt,6pt,7pt,8pt} [\functionname][e:\functionE/f:\functionF/g:\functionG/h:\functionH] \endgraf +% \analyzefunction{rect(1pt,2pt,3pt,4pt,5pt,6pt,7pt,8pt)} [\functionname][e:\functionE/f:\functionF/g:\functionG/h:\functionH] \endgraf + +% todo [#1][settings][maxwidth,maxheight,method=] with method=x y xy [1] + +\protect \endinput diff --git a/tex/context/base/xtag-rng.tex b/tex/context/base/xtag-rng.tex index a3a529f7f..524bba2d1 100644 --- a/tex/context/base/xtag-rng.tex +++ b/tex/context/base/xtag-rng.tex @@ -16,9 +16,9 @@ %D The following commands picks up a named block from the %D given file and pretty prints it. %D -%D \starttypen +%D \starttyping %D \showRNGcomponent [eximple.rng] [request] -%D \stoptypen +%D \stoptyping %D %D If needed, you adapt the colors used by redefining the %D \type {xtag} color palet. diff --git a/tex/context/base/xtag-run.tex b/tex/context/base/xtag-run.tex index b187f7817..639b6df53 100644 --- a/tex/context/base/xtag-run.tex +++ b/tex/context/base/xtag-run.tex @@ -94,10 +94,10 @@ \doglobal\newif\ifXMLunspacepretty \gdef\@XMLelement#1% - {\ifnum\XMLlevel<\@@xfniveau\relax + {\ifnum\XMLlevel<\@@xflevel\relax \ifnum\kindofXMLelement=2\else \doglobal\increment\@XMLnofelements\relax - \ifcase\@XMLnofelements\else\@@xftussen\fi + \ifcase\@XMLnofelements\else\@@xfinbetween\fi \fi \fi % no, too fragile: \hangindent2em @@ -116,10 +116,13 @@ \ifnum\kindofXMLelement=2\string/\fi \currentXMLelement \stopcolor - \ifcase#1\or\ifx\currentXMLarguments\empty\else - \cleanupXMLarguments - \startcolor[xtag:0]\hbox{\space}\showXMLarguments\unskip\stopcolor - \fi\fi + \ifcase#1\or + \cleanupXMLarguments % get rid of spurious end space and end / + \ifx\currentXMLarguments\empty\else + \setbox\scratchbox\hbox{\space}\hskip\wd\scratchbox % hm, slow + \startcolor[xtag:0]\showXMLarguments\unskip\stopcolor\unskip + \fi + \fi \startcolor[xtag:\ifnum\scratchcounter<0 0\else\number\scratchcounter\fi]% \ifnum\kindofXMLelement=3\string/\fi \string>% @@ -128,10 +131,10 @@ \ifcase\kindofXMLelement\or \getvalue{\@@XMLshow::\currentXMLelement}\relax \fi - \ifnum\XMLlevel<\@@xfniveau\relax + \ifnum\XMLlevel<\@@xflevel\relax \ifnum\kindofXMLelement=1\else \doglobal\increment\@XMLnofelements\relax - \ifcase\@XMLnofelements\else\@@xftussen\fi + \ifcase\@XMLnofelements\else\@@xfinbetween\fi \fi \fi \ifXMLunspacepretty\ignorespaces\fi} @@ -219,17 +222,18 @@ \nohyphens \dontcomplain \XMLlevel\zerocount - \increment\@@xfniveau % hack + \increment\@@xflevel % hack \tttf - \startopelkaar[\v!blanko] + \startpacked[\v!blank] \ifautoXMLshow \let\executeXMLelement\autoshowXMLelement \fi \let\executeXMLentity\@XMLentity \enableXML\verbatimXML \enableregime[utf]% \chardef\utfunicodetracer8 + \veryraggedright \readfile{\truefilename{#1}}\donothing\donothing\endgraf \removelastskip % really needed - \stopopelkaar + \stoppacked \egroup} \gdef\showXMLtext#1% @@ -239,7 +243,7 @@ % so far for hack \dontcomplain \XMLlevel\maxcard - \increment\@@xfniveau % hack + \increment\@@xflevel % hack \tttf \ifautoXMLshow \let\executeXMLelement\autoshowXMLelement \fi \let\executeXMLentity\@XMLentity @@ -283,4 +287,19 @@ \showXMLfile{#1} \egroup} -\protect \endinput \ No newline at end of file +%D + +\gdef\tracebackXMLattribute#1% + {\bgroup + \doloop + {\ifcsname\@@XMLdepth:\recurselevel\endcsname + \edef\!!stringa{\csname\@@XMLdepth:\recurselevel\endcsname}% + \writestatus + {XML TRACE} + {[#1] [\recurselevel] [\!!stringa] [\XMLinh{#1}]}% + \else + \exitloop + \fi}% + \egroup} + +\protect \endinput diff --git a/tex/context/base/xtag-utf.tex b/tex/context/base/xtag-utf.tex index e1faa04d2..0e25bafae 100644 --- a/tex/context/base/xtag-utf.tex +++ b/tex/context/base/xtag-utf.tex @@ -18,4 +18,4 @@ \enableregime[utf] -\endinput \ No newline at end of file +\endinput diff --git a/tex/context/base/xtag-xsd.tex b/tex/context/base/xtag-xsd.tex index ba885d5ff..96169afa2 100644 --- a/tex/context/base/xtag-xsd.tex +++ b/tex/context/base/xtag-xsd.tex @@ -16,9 +16,9 @@ %D The following commands picks up a named block from the %D given file and pretty prints it. %D -%D \starttypen +%D \starttyping %D \showXSDcomponent [x-exa-tx.xsd] [sequence] -%D \stoptypen +%D \stoptyping %D %D If needed, you adapt the colors used by redefining the %D \type {xtag} color palet. diff --git a/tex/context/base/xtag-xsl.tex b/tex/context/base/xtag-xsl.tex index 2ebb15e9b..4d844c8e1 100644 --- a/tex/context/base/xtag-xsl.tex +++ b/tex/context/base/xtag-xsl.tex @@ -11,6 +11,15 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% FOR THIS TO WORK YOU NEED A PROPER cp8bit VECTOR +% +% 8 bit support has been messed up in a couple of distributions +% +% 0x00 0x00 +% 0x01 0x01 +% 0x02 0x02 +% etc + %D This module is rather experimental so users may expect %D changes in the interface. diff --git a/tex/context/config/cont-usr.tex b/tex/context/config/cont-usr.tex index 22b8a63f5..50556c463 100644 --- a/tex/context/config/cont-usr.tex +++ b/tex/context/config/cont-usr.tex @@ -26,11 +26,9 @@ %D Thomas Esser's \TETEX\ distribution.) This list will be %D adapted to the actual situation. -%definefilesynonym [lang-cz.pat] [czhyph.tex] % is bound to latex (tl 8+) -\definefilesynonym [lang-cz.pat] [czhyphen.tex] +\definefilesynonym [lang-ca.pat] [cahyph.tex] \definefilesynonym [lang-da.pat] [dkhyph.tex] \definefilesynonym [lang-de.pat] [dehyphn.tex] -\definefilesynonym [lang-en.pat] [ushyph1.tex] \definefilesynonym [lang-es.pat] [eshyph.tex] \definefilesynonym [lang-fi.pat] [fihyph.tex] \definefilesynonym [lang-fr.pat] [frhyph.tex] @@ -38,19 +36,30 @@ \definefilesynonym [lang-hu.pat] [huhyph.tex] \definefilesynonym [lang-it.pat] [ithyph.tex] \definefilesynonym [lang-la.pat] [lahyph7.tex] -\definefilesynonym [lang-nl.pat] [nehyph.tex] \definefilesynonym [lang-no.pat] [nohyph.tex] \definefilesynonym [lang-pl.pat] [plhyph.tex] \definefilesynonym [lang-pt.pat] [pthyph.tex] \definefilesynonym [lang-ro.pat] [rohyph.tex] -\definefilesynonym [lang-ru.pat] [ruenhyph.tex] -%definefilesynonym [lang-sk.pat] [skhyph.tex] % is bound to latex (tl 8+) -\definefilesynonym [lang-sk.pat] [skhyphen.tex] -\definefilesynonym [lang-sv.pat] [sehyph.tex] -\definefilesynonym [lang-tr.pat] [trhyph.tex] -\definefilesynonym [lang-ua.pat] [ukrenhyp.tex] -\definefilesynonym [lang-uk.pat] [ukhyphen.tex] -\definefilesynonym [lang-us.pat] [ushyph1.tex] +\definefilesynonym [lang-ru.pat] [ruenhyph.tex] % sic: ruen +\definefilesynonym [lang-sl.pat] [sihyph.tex] % sic: sl/si +\definefilesynonym [lang-sv.pat] [svhyph.tex] % was [sehyph.tex] +\definefilesynonym [lang-tr.pat] [tkhyph.tex] % was [trhyph.tex] +\definefilesynonym [lang-ua.pat] [ukrenhyp.tex] % sic ukren +\definefilesynonym [lang-uk.pat] [ukhyph.tex] + +\definefilesynonym [lang-nl.pat] [nlhyphen.tex] % symbolic name, see below +\definefilesynonym [lang-af.pat] [nlhyphen.tex] % symbolic name, see below + +\definefilesynonym [lang-en.pat] [ushyphen.tex] % symbolic name, see below +\definefilesynonym [lang-us.pat] [ushyphen.tex] % symbolic name, see below + +\definefilesynonym [lang-cz.pat] [czhyphen.tex] % in a different part of the tree, sigh +\definefilesynonym [lang-sk.pat] [skhyphen.tex] % in a different part of the tree, sigh + +%definefilesynonym [lang-cz.hyp] [czhyphen.ex] % in a different part of the tree, sigh +%definefilesynonym [lang-sk.hyp] [skhyphen.ex] % in a different part of the tree, sigh + +\definefilesynonym [lang-deo.pat] [dehypht.tex] % old german patterns %D When the dutch spelling changed, new patterns were %D constructed. For long these were named \type {dutch96.pat}. @@ -60,63 +69,78 @@ %D files as well as their coding is one of the dark areas of %D \TEX\ distributions. -\doiffileelse{nehyph96.tex} - {\definefilesynonym[lang-nl.pat][nehyph96.tex]} - {\doiffileelse{dutch96.pat} - {\definefilesynonym[lang-nl.pat][dutch96.pat]} - {\definefilesynonym[lang-nl.pat][nehyph.tex]}} + \doiffileelse{nehyph96.tex} {\definefilesynonym[nlhyphen.tex][nehyph96.tex]} +{\doiffileelse{dutch96.pat} {\definefilesynonym[nlhyphen.tex][dutch96.pat]} + {\definefilesynonym[nlhyphen.tex][nehyph.tex]}} -%D Pattern files are (can be) encoded! And, alas, not all -%D pattern files are self contained, which is why (for the -%D moment) we specify encodings here. +%D Ah, something changed in 2003 with respect to ushyph.tex, so let's +%D fall back when needed. I first noticed this during a workshop at the +%D practical tex conference 2004 in sf. Yet another proof of a mess in +%D filenames. So, we now use \type {ushyphen} as name and do some +%D searching. + + \doiffileelse{ushyph.tex} {\definefilesynonym[ushyphen.tex][ushyph.tex]} +{\doiffileelse{ushyph1.tex} {\definefilesynonym[ushyphen.tex][ushyph1.tex]} +{\doiffileelse{ushyph2.tex} {\definefilesynonym[ushyphen.tex][ushyph2.tex]} + {\definefilesynonym[ushyphen.tex][ukhyph.tex]}}} + +%D In order to get 8 bit characters hyphenated, we need to load +%D patterns under the right circumstances. In some countries, more +%D than one font encoding is in use. I can add more defaults here +%D if users let me know what encoding they use. + +\installlanguage [\s!nl] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] +\installlanguage [\s!fr] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] +\installlanguage [\s!de] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] +\installlanguage [\s!it] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] -\installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}] \installlanguage [\s!hr] [\s!mapping={il2,ec},\s!encoding={il2,ec}] -%installlanguage [\s!pl] [\s!mapping=pl0,\s!encoding=pl0] \installlanguage [\s!pl] [\s!mapping={pl0,ec},\s!encoding={pl0,ec}] +\installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}] \installlanguage [\s!sk] [\s!mapping={il2,ec},\s!encoding={il2,ec}] - -%D Sometimes these are not wanted: - -%\definefilesynonym [lang-deo.pat] [dehypht.tex] % old patterns -%\definefilesynonym [lang-nlx.pat] [dutch96.pat] % new patterns +\installlanguage [\s!sl] [\s!mapping={il2,ec},\s!encoding={il2,ec}] %D Additional languages can be defined here. Beware of %D encoding incompatibilities. Please take a look at the %D \type {cont-en.tex}, \type {cont-nl.tex}, enz.\ files -%D first. Normally you don't have to change a byte. - -% \installlanguage [\s!af] [\c!status=\v!start] % afrikaans -% \installlanguage [\s!cz] [\c!status=\v!start] % czech -% \installlanguage [\s!da] [\c!status=\v!start] % danish -% \installlanguage [\s!de] [\c!status=\v!start] % german -% \installlanguage [\s!en] [\c!status=\v!start] % english us -% \installlanguage [\s!es] [\c!status=\v!start] % spanish -% \installlanguage [\s!fi] [\c!status=\v!start] % finnish -% \installlanguage [\s!fr] [\c!status=\v!start] % french -% \installlanguage [\s!hr] [\c!status=\v!start] % croatian -% \installlanguage [\s!hu] [\c!status=\v!start] % hungarian -% \installlanguage [\s!it] [\c!status=\v!start] % italian -% \installlanguage [\s!la] [\c!status=\v!start] % latin -% \installlanguage [\s!nl] [\c!status=\v!start] % dutch -% \installlanguage [\s!no] [\c!status=\v!start] % norwegian -% \installlanguage [\s!pl] [\c!status=\v!start] % polish -% \installlanguage [\s!pt] [\c!status=\v!start] % portuguese -% \installlanguage [\s!ro] [\c!status=\v!start] % romanian -% \installlanguage [\s!ru] [\c!status=\v!start] % russian -% \installlanguage [\s!sk] [\c!status=\v!start] % slovak -% \installlanguage [\s!sv] [\c!status=\v!start] % swedish -% \installlanguage [\s!tr] [\c!status=\v!start] % turkish -% \installlanguage [\s!ua] [\c!status=\v!start] % ukrainian -% \installlanguage [\s!uk] [\c!status=\v!start] % english uk - -% \installlanguage [deo] [\c!status=\v!start] % old german -% \installlanguage [nlx] [\c!status=\v!start] % dutch 8 bit +%D first. Normally you don't have to change a byte. If you +%D want to play safe, use \typ {texexec --make --alone +%D --all}. + +% \installlanguage [\s!af] [\c!state=\v!start] % afrikaans +% \installlanguage [\s!ca] [\c!state=\v!start] % catalan +% \installlanguage [\s!cz] [\c!state=\v!start] % czech +% \installlanguage [\s!da] [\c!state=\v!start] % danish +% \installlanguage [\s!de] [\c!state=\v!start] % german +% \installlanguage [\s!en] [\c!state=\v!start] % english us +% \installlanguage [\s!es] [\c!state=\v!start] % spanish +% \installlanguage [\s!fi] [\c!state=\v!start] % finnish +% \installlanguage [\s!fr] [\c!state=\v!start] % french +% \installlanguage [\s!hr] [\c!state=\v!start] % croatian +% \installlanguage [\s!hu] [\c!state=\v!start] % hungarian +% \installlanguage [\s!it] [\c!state=\v!start] % italian +% \installlanguage [\s!la] [\c!state=\v!start] % latin +% \installlanguage [\s!nl] [\c!state=\v!start] % dutch +% \installlanguage [\s!no] [\c!state=\v!start] % norwegian +% \installlanguage [\s!pl] [\c!state=\v!start] % polish +% \installlanguage [\s!pt] [\c!state=\v!start] % portuguese +% \installlanguage [\s!ro] [\c!state=\v!start] % romanian +% \installlanguage [\s!ru] [\c!state=\v!start] % russian +% \installlanguage [\s!sk] [\c!state=\v!start] % slovak +% \installlanguage [\s!sl] [\c!state=\v!start] % slovenian +% \installlanguage [\s!sv] [\c!state=\v!start] % swedish +% \installlanguage [\s!tr] [\c!state=\v!start] % turkish +% \installlanguage [\s!ua] [\c!state=\v!start] % ukrainian +% \installlanguage [\s!uk] [\c!state=\v!start] % english uk +% \installlanguage [\s!vn] [\c!state=\v!start] % vietnamese + +% \installlanguage [deo] [\c!state=\v!start] % old german %D The next lines can be used for setting the language to be %D used at startup time. % \setupcurrentlanguage[\s!af] +% \setupcurrentlanguage[\s!ca] % \setupcurrentlanguage[\s!cz] % \setupcurrentlanguage[\s!da] % \setupcurrentlanguage[\s!de] @@ -135,6 +159,7 @@ % \setupcurrentlanguage[\s!ro] % \setupcurrentlanguage[\s!ru] % \setupcurrentlanguage[\s!sk] +% \setupcurrentlanguage[\s!sl] % \setupcurrentlanguage[\s!sv] % \setupcurrentlanguage[\s!tr] % \setupcurrentlanguage[\s!ua] diff --git a/tex/context/foxet/fe-bryson.xml b/tex/context/foxet/fe-bryson.xml new file mode 100644 index 000000000..28646b65f --- /dev/null +++ b/tex/context/foxet/fe-bryson.xml @@ -0,0 +1,12 @@ + + +Imagine trying to live in a world dominated by dihydrogen oxide, a +compound that has no taste or smell and is so viable in its properties +that it is generally benign but at other times swiftly lethal. +Depending on its state, it can scald you or freeze you. In the +presence of certain organic molecules it can form carbonic acids so +nasty that they can strip the leaves from trees and eat the faces off +statuary. In bulk, when agitated, it can strike with a fury that no +human edifice could withstand. Even for those who have learned to live +with it, it is often murderous substance. We call it water. + diff --git a/tex/context/foxet/fe-ward.xml b/tex/context/foxet/fe-ward.xml new file mode 100644 index 000000000..05f774265 --- /dev/null +++ b/tex/context/foxet/fe-ward.xml @@ -0,0 +1,8 @@ + + +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 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. + diff --git a/tex/context/foxet/fe-zapf.xml b/tex/context/foxet/fe-zapf.xml new file mode 100644 index 000000000..faf9a0831 --- /dev/null +++ b/tex/context/foxet/fe-zapf.xml @@ -0,0 +1,14 @@ + + +Coming back to the use of typefaces in electronic +publishing: many of the new typographers receive their +knowledge and information about the rules of typography +from books, from computer magazines or the instruction +manuals which they get with the purchase of a PC or +software. There is not so much basic instruction, as of +now, as there was in the old days, showing the differences +between good and bad typographic design. Many people are +just fascinated by their PC's tricks, and think that a +widelypraised program, called up on the +screen, will make everything automatic from now on. + diff --git a/tex/context/foxet/fo-0101.fo b/tex/context/foxet/fo-0101.fo new file mode 100644 index 000000000..aae8178af --- /dev/null +++ b/tex/context/foxet/fo-0101.fo @@ -0,0 +1,8 @@ + + + + + + + diff --git a/tex/context/foxet/fo-0102.fo b/tex/context/foxet/fo-0102.fo new file mode 100644 index 000000000..21274c626 --- /dev/null +++ b/tex/context/foxet/fo-0102.fo @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0103.fo b/tex/context/foxet/fo-0103.fo new file mode 100644 index 000000000..14805a87b --- /dev/null +++ b/tex/context/foxet/fo-0103.fo @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0201.fo b/tex/context/foxet/fo-0201.fo new file mode 100644 index 000000000..f524cfd09 --- /dev/null +++ b/tex/context/foxet/fo-0201.fo @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0301.fo b/tex/context/foxet/fo-0301.fo new file mode 100644 index 000000000..9b5e0cc8b --- /dev/null +++ b/tex/context/foxet/fo-0301.fo @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + beforeafter + + + beforeafter + beforeafter + beforeafter + beforeafter + + + beforeafter + beforeafter + beforeafter + beforeafter + + + beforeafter + beforeafter + beforeafter + beforeafter + + + beforeafter + beforeafter + beforeafter + beforeafter + + + beforeafter + beforeafter + beforeafter + beforeafter + beforeafter + beforeafter + + + + + + diff --git a/tex/context/foxet/fo-0601.fo b/tex/context/foxet/fo-0601.fo new file mode 100644 index 000000000..ba3e58780 --- /dev/null +++ b/tex/context/foxet/fo-0601.fo @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0602.fo b/tex/context/foxet/fo-0602.fo new file mode 100644 index 000000000..143dfce88 --- /dev/null +++ b/tex/context/foxet/fo-0602.fo @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0603.fo b/tex/context/foxet/fo-0603.fo new file mode 100644 index 000000000..80e178c45 --- /dev/null +++ b/tex/context/foxet/fo-0603.fo @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0604.fo b/tex/context/foxet/fo-0604.fo new file mode 100644 index 000000000..92499d89d --- /dev/null +++ b/tex/context/foxet/fo-0604.fo @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0611.fo b/tex/context/foxet/fo-0611.fo new file mode 100644 index 000000000..70f495fb6 --- /dev/null +++ b/tex/context/foxet/fo-0611.fo @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0612.fo b/tex/context/foxet/fo-0612.fo new file mode 100644 index 000000000..c062ec4ee --- /dev/null +++ b/tex/context/foxet/fo-0612.fo @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0613.fo b/tex/context/foxet/fo-0613.fo new file mode 100644 index 000000000..f478a571d --- /dev/null +++ b/tex/context/foxet/fo-0613.fo @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0621.fo b/tex/context/foxet/fo-0621.fo new file mode 100644 index 000000000..fa14aefc6 --- /dev/null +++ b/tex/context/foxet/fo-0621.fo @@ -0,0 +1,100 @@ + + + + + + + + + setting up simple page master 'any' + + + + + + setting up simple page master 'first-page' + + + + + + setting up simple page master 'left-page' + + + + + + setting up simple page master 'right-page' + + + + + + setting up simple page master 'blank-page' + + + + + + setting up simple page master 'odd' + + + + + + setting up simple page master 'even' + + + + + + setting up simple page master 'rest' + + + + + + + setting up page sequence master 'demo' + + + + + + + setting up page sequence master 'omed' + + + + + + + + + starting page sequence 'any' + + + + + + + + + starting page sequence 'demo' + + + + + + + + + starting page sequence 'omed' + + + + + + + + diff --git a/tex/context/foxet/fo-0641.fo b/tex/context/foxet/fo-0641.fo new file mode 100644 index 000000000..1ec9772a8 --- /dev/null +++ b/tex/context/foxet/fo-0641.fo @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0642.fo b/tex/context/foxet/fo-0642.fo new file mode 100644 index 000000000..0c1a345b9 --- /dev/null +++ b/tex/context/foxet/fo-0642.fo @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0643.fo b/tex/context/foxet/fo-0643.fo new file mode 100644 index 000000000..7accf8ab8 --- /dev/null +++ b/tex/context/foxet/fo-0643.fo @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0644.fo b/tex/context/foxet/fo-0644.fo new file mode 100644 index 000000000..c23647159 --- /dev/null +++ b/tex/context/foxet/fo-0644.fo @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0650.fo b/tex/context/foxet/fo-0650.fo new file mode 100644 index 000000000..7ae67a1e5 --- /dev/null +++ b/tex/context/foxet/fo-0650.fo @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0651.fo b/tex/context/foxet/fo-0651.fo new file mode 100644 index 000000000..a10163f5d --- /dev/null +++ b/tex/context/foxet/fo-0651.fo @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-0701.fo b/tex/context/foxet/fo-0701.fo new file mode 100644 index 000000000..4d5391daa --- /dev/null +++ b/tex/context/foxet/fo-0701.fo @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + Test 1 + + + Test 2 + + + Test 3 + + + Test 4 + + + Test 5 + + + Test 6 + + + Test 7 + + + + + diff --git a/tex/context/foxet/fo-0801.fo b/tex/context/foxet/fo-0801.fo new file mode 100644 index 000000000..11747d360 --- /dev/null +++ b/tex/context/foxet/fo-0801.fo @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + digits: + + + + + + characters: + + + + + + romannumerals: + + + + + + complex format: + + + + + + no format: + + + + + + + digits: + characters: + romannumerals: + complex format: + no format: + + + + diff --git a/tex/context/foxet/fo-0901.fo b/tex/context/foxet/fo-0901.fo new file mode 100644 index 000000000..e071bd919 --- /dev/null +++ b/tex/context/foxet/fo-0901.fo @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + times + helvetica + courier + + + times + helvetica + courier + + + times + helvetica + courier + + + times + helvetica + courier + + + times + helvetica + courier + + + times + helvetica + courier + + + + + diff --git a/tex/context/foxet/fo-1001.fo b/tex/context/foxet/fo-1001.fo new file mode 100644 index 000000000..3733265fd --- /dev/null +++ b/tex/context/foxet/fo-1001.fo @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + a test line d 10pt + + a test line d 5pt + + a test line d 4pt + + a test line d d d + + + + a test line r d d + + + + a test line d r d + + + + a test line r r d + + + + a test line d d r + + + + a test line r d r + + + + a test line d r r + + + + a test line r r r + + + + a test line d r r force + + + + a test line + + + + + diff --git a/tex/context/foxet/fo-1002.fo b/tex/context/foxet/fo-1002.fo new file mode 100644 index 000000000..cc0ea8100 --- /dev/null +++ b/tex/context/foxet/fo-1002.fo @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-1003.fo b/tex/context/foxet/fo-1003.fo new file mode 100644 index 000000000..4c416e02d --- /dev/null +++ b/tex/context/foxet/fo-1003.fo @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/context/foxet/fo-1004.fo b/tex/context/foxet/fo-1004.fo new file mode 100644 index 000000000..1c057edd7 --- /dev/null +++ b/tex/context/foxet/fo-1004.fo @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + beforeinbetweenafter + + + beforeinbetweenafter + + + beforeinbetweenafter + + + beforeinbetweenafter + + + beforeinbetweenafter + + + + + + diff --git a/tex/context/foxet/fo-1101.fo b/tex/context/foxet/fo-1101.fo new file mode 100644 index 000000000..134e656b7 --- /dev/null +++ b/tex/context/foxet/fo-1101.fo @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + [a] + + + + + + + + [b] + + + + + [bb] + + + + + + + + + + + test + S + S + S + F + F + F + A + A + A + R + R + R + test + Q + Q + Q + Q + + + + + diff --git a/tex/context/sample/hawking.tex b/tex/context/sample/hawking.tex new file mode 100644 index 000000000..e0e0cccd2 --- /dev/null +++ b/tex/context/sample/hawking.tex @@ -0,0 +1,7 @@ +If [in 2600] you stacked all the new books being published next to +each other, you would have to move at ninety miles an hour just to +keep up with the end of the line. Of course, by 2600 new artistic +and scientific work will come in electronic forms, rather than as +physical books and paper. Nevertheless, if the exponential growth +continued, there would be ten papers a second in my kind of +theoretical physics, and no time to read them. diff --git a/tex/context/sample/sample.tex b/tex/context/sample/sample.tex index 6e18f08d5..44ef8ec5d 100644 --- a/tex/context/sample/sample.tex +++ b/tex/context/sample/sample.tex @@ -1,8 +1,12 @@ \starttext The sample directory contains a few files with quotes that can be used -while testing styles. I'll complete this file when I've reorganized my -books and audio cd's. +while testing styles. + +I'll complete this file when I've reorganized my books and audio cd's. + +If someone makes a nice bibtex file of these, the quotes can also be +used in testing bibliographic references and citations. \starttabulate[|l|l|p|] \NC \bf file \NC \bf author \NC \bf source \NC \NR @@ -24,6 +28,25 @@ books and audio cd's. Everything You Need to Know About American History but Never Learned, \endgraf HarperCollins, 2003 \NC \NR +\NC thuan.tex \NC Trinh Xuan Thuan \NC Chaos and Harmony, Perspectives on Scientific + Revolutions of the Twentieth Century, \endgraf + Oxford University Press, 2001 \NC \NR +\NC hawking.tex \NC Steve W. Hawking \NC The Universe in a Nutshell, Bantam Books + (Random House), 2001 \NC \NR \stoptabulate -\stoptext \ No newline at end of file +% Tufte: This quote will always produce hyphenated text, apart from the content, +% it's a pretty good test case for protruding. + +% Ward: I should find a quote in the extremely well written Rare Earth as well. + +% A Short History of Nearly Everything: I wish that I had the memory to remember this book +% verbatim. + +% Chaos and Harmony: very nice and well written book, but the typography is rather bad: +% quite visible inter-character spacing in a text that can be typeset quite well by \TeX. + +% The Universe in a Nutshell: a beautiful designed book, (companion of A Short History +% of Time) + +\stoptext diff --git a/tex/context/sample/thuan.tex b/tex/context/sample/thuan.tex new file mode 100644 index 000000000..e38c58489 --- /dev/null +++ b/tex/context/sample/thuan.tex @@ -0,0 +1,10 @@ +Had our solar system included two suns, the problem would have +involved three bodies (the two suns and each planet), and chaos +would have been immediately obvious. Planets would have had +erratic and unpredictable orbits, and creatures living on one +of these planets would never have been able to percieve the +slightest harmony. Nor would it have occurred to them that the +universe might be ruled by laws and that it is up to man's +intellect to discover them. Besides, it is not at all obvious +that life and conscience could even emerge in such a chaotic +system. \ No newline at end of file diff --git a/tex/context/sample/zapf.tex b/tex/context/sample/zapf.tex index b95a47190..f73835b1c 100644 --- a/tex/context/sample/zapf.tex +++ b/tex/context/sample/zapf.tex @@ -8,4 +8,4 @@ now, as there was in the old days, showing the differences between good and bad typographic design. Many people are just fascinated by their PC's tricks, and think that a widely||praised program, called up on the screen, will make -everything automatic from now on. +everything automatic from now on. \ No newline at end of file diff --git a/tex/generic/context/m-metapo.tex b/tex/generic/context/m-metapo.tex index 5a1baa3d3..a71c91910 100644 --- a/tex/generic/context/m-metapo.tex +++ b/tex/generic/context/m-metapo.tex @@ -41,7 +41,7 @@ %D An example of using this module is given below: %D -%D \starttypen +%D \starttyping %D \documentclass[10pt]{article} %D %D \usepackage{graphicx} @@ -51,7 +51,7 @@ %D \includeMPgraphics{somefile.1} %D \includeMPgraphics[angle=90]{somefile.2} %D \end{document} -%D \stoptypen +%D \stoptyping %D %D This module needs \type {supp-mps} and \type {supp-mis}, %D that both are present in the \CONTEXT\ path. diff --git a/tex/generic/context/mptopdf.tex b/tex/generic/context/mptopdf.tex index 8929ac1e4..97f2890a6 100644 --- a/tex/generic/context/mptopdf.tex +++ b/tex/generic/context/mptopdf.tex @@ -17,15 +17,15 @@ %D %D First generate a format, which in \WEBC\ looks like: %D -%D \starttypen +%D \starttyping %D pdftex --ini mptopdf -%D \stoptypen +%D \stoptyping %D %D or: %D -%D \starttypen +%D \starttyping %D texexec --make --tex=pdftex --format=mptopdf --alone -%D \stoptypen +%D \stoptyping %D %D Since this conversion only works with \PDFTEX\ or \PDFETEX, %D the session is aborted when another \TEX\ is used. When @@ -34,9 +34,9 @@ %D %D The conversion itself is accomplished by: %D -%D \starttypen +%D \starttyping %D pdftex &mptopdf \relax filename.number -%D \stoptypen +%D \stoptyping %D %D The \type {\relax} is needed since we don't want to process %D the file directly. Instead we pick up the filename using @@ -46,20 +46,20 @@ %D available in the file \type {filename.pdf}. This conversion %D process is roughly compatible with: %D -%D \starttypen +%D \starttyping %D texexec --pdf --fig=c --result=filename filename.number -%D \stoptypen +%D \stoptyping %D %D This uses \CONTEXT, and is therefore slower. Therefore, %D we provide a small \PERL\ script that does a faster job, %D using the minimal format. Given that a format is %D generated, one can say: %D -%D \starttypen +%D \starttyping %D mptopdf somefile %D mptopdf somefile.123 %D mptopdf mp*.* -%D \stoptypen +%D \stoptyping %D %D The results are copied into files named \type %D {somefile-number}. This mechanism will also be available diff --git a/tex/generic/context/ppchtex.noc b/tex/generic/context/ppchtex.noc index 12cc676af..4ae710279 100644 --- a/tex/generic/context/ppchtex.noc +++ b/tex/generic/context/ppchtex.noc @@ -9,38 +9,37 @@ %D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See licen-en.pdf for -%C details. - -%D This module facilitates the use of \PPCHTEX\ in macro -%D packages other than \CONTEXT. One of the features of -%D \CONTEXT\ is that the user interface can be in any -%D language. This language is defined at loading time. -%D -%D This module is indeed a surrogate one and is only a poor -%D man's alternative to the more extensive \type{mult-***} -%D modules of \CONTEXT. The extra overhead in terms of macros -%D and functionality that these modules offer is only useful -%D in \CONTEXT. -%D -%D Two interfaces are supported here, but others can easily be +%C therefore copyrighted by \PRAGMA. See licen-en.pdf for +%C details. + +%D This module facilitates the use of \PPCHTEX\ in macro +%D packages other than \CONTEXT. One of the features of +%D \CONTEXT\ is that the user interface can be in any +%D language. This language is defined at loading time. +%D +%D This module is indeed a surrogate one and is only a poor +%D man's alternative to the more extensive \type{mult-***} +%D modules of \CONTEXT. The extra overhead in terms of macros +%D and functionality that these modules offer is only useful +%D in \CONTEXT. +%D +%D Two interfaces are supported here, but others can easily be %D defined. This module expects the general system macros to be -%D loaded as wel as a interface switch \type{\ifalternativeinterface} -%D to be set. +%D loaded as wel as a interface switch \type{\ifalternativeinterface} +%D to be set. %D First we load some auxiliary macro's: \input supp-mis.tex \let\writestatus\undefined -\input syst-gen.tex +\input syst-gen.tex -%D after which we can go on with: +%D after which we can go on with: \unprotect -%D 0 = english -%D 1 = dutch -%D 2 = german -%D 3 = czech (not yet implemented here) +%D 0 = english +%D 1 = dutch +%D 2 = german \ifx\interfacenumber\undefined \chardef\interfacenumber=0 @@ -52,40 +51,40 @@ \def\definesystemconstant #1 % {\setvalue{s!#1}{#1}} -\def\definevariable #1 #2 #3 % +\def\definevariable #1 #2 #3 % en nl de {\ifcase\interfacenumber - \setvalue{v!#2}{#1} + \setvalue{v!#1}{#1} \or - \setvalue{v!#2}{#2} + \setvalue{v!#1}{#2} \or - \setvalue{v!#2}{#3} + \setvalue{v!#1}{#3} \fi} -\def\defineconstant #1 #2 #3 % +\def\defineconstant #1 #2 #3 % en nl de {\ifcase\interfacenumber - \setvalue{c!#2}{#2} \setvalue{c!#1}{#2} - \or \setvalue{c!#2}{#2} \or - \setvalue{c!#2}{#2} + \setvalue{c!#1}{#2} + \or + \setvalue{c!#1}{#2} \setvalue{c!#3}{#2} \fi} \def\definecommand #1 #2 #3 % {\ifcase\interfacenumber - % core commands are english + % core commands are english \or \doifnot{#1}{#2}{\setvalue{#2}{\getvalue{#1}}} \or \doifnot{#1}{#3}{\setvalue{#3}{\getvalue{#1}}} \fi} -\long\def\startcommands#1\stopcommands% +\long\def\startcommands#1\stopcommands {} \def\dosetvalue#1#2#3% - {\p!doifundefined{\c!prefix!#2}% + {\p!doifundefined{\c!prefix!#2}% \let\donottest=\doprocesstest \@EA\def\csname#1#2\endcsname{#3}% \else @@ -124,7 +123,7 @@ \defineconstant width breedte breite \defineconstant size formaat groesse \defineconstant number getal nummer -\defineconstant height hoogte hoehe +\defineconstant height hoogte hoehe \defineconstant frame kader rahmen %defineconstant framecolor kaderkleur rahmenfarbe \defineconstant color kleur farbe @@ -132,24 +131,24 @@ \defineconstant style letter schriftstil \defineconstant rulethickness lijndikte liniendicke \defineconstant rulecolor lijnkleur linienfarbe -\defineconstant left links links +\defineconstant left links links \defineconstant offset offset offset \defineconstant bottom onder unten \defineconstant option optie option \defineconstant location plaats platz \defineconstant right rechts rechts \defineconstant resolution resolutie aufloesung -\defineconstant scale schaal format +\defineconstant scale schaal format \defineconstant status status status \defineconstant text tekst text \defineconstant textcolor tekstkleur tekstfarbe -\defineconstant textsize tekstformaat textgroesse +\defineconstant textsize tekstformaat textgroesse \defineconstant alternative variant alternative \defineconstant x x x \defineconstant y y y \definevariable on aan an -\definevariable big groot gross +\definevariable big groot gross \definevariable intext intekst imtext \definevariable small klein klein \definevariable medium middel mittel @@ -159,53 +158,51 @@ \definevariable test test test \definevariable off uit aus -\definecommand definechemical definieerchemie definierechemie -\definecommand setupchemical stelchemiein stellechemieein -\definecommand chemical chemie chemie -\definecommand tochemical naarchemie zurchemie -\definecommand startchemical startchemie startchemie -\definecommand stopchemical stopchemie stopchemie -\definecommand toptext boventekst textueber +\definecommand definechemical definieerchemie definierechemie +\definecommand setupchemical stelchemiein stellechemieein +\definecommand chemical chemie chemie +\definecommand tochemical naarchemie zurchemie +\definecommand startchemical startchemie startchemie +\definecommand stopchemical stopchemie stopchemie +\definecommand toptext boventekst textueber \definecommand bottext ondertekst textunter \definecommand midtext middentekst textmitte \protect -%D After those definitions we actually load \PPCHTEX: +%D After those definitions we actually load \PPCHTEX: \input ppchtex.tex -%D We also change some setup values. Let's hope that the next -%D setups forever suits \LATEX. +%D We also change some setup values. Let's hope that the next +%D setups forever suits \LATEX. \unprotect \ifx\bodyfontsize\undefined \ifx\f@size\undefined \ifx\@ptsize\undefined - \setupchemical[\c!korps=11pt] + \setupchemical[\c!bodyfont=11pt] \else - \setupchemical[\c!korps=1\@ptsize pt] + \setupchemical[\c!bodyfont=1\@ptsize pt] \fi \else - \setupchemical[\c!korps=\f@size pt] + \setupchemical[\c!bodyfont=\f@size pt] \fi \else - \setupchemical[\c!korps=\bodyfontsize] + \setupchemical[\c!bodyfont=\bodyfontsize] \fi \ifx\mathrm\undefined - \setupchemical[\c!letter=\rm] + \setupchemical[\c!style=\rm] \else - \setupchemical[\c!letter=\mathrm] + \setupchemical[\c!style=\mathrm] \fi \ifx\outputresolution\undefined - \setupchemical[\c!resolutie=300] + \setupchemical[\c!resolution=300] \else - \setupchemical[\c!resolutie=\outputresolution] + \setupchemical[\c!resolution=\outputresolution] \fi -\protect - -\endinput +\protect \endinput diff --git a/tex/latex/context/m-ch-de.sty b/tex/latex/context/m-ch-de.sty index 5988d7a53..d35f8cf2d 100644 --- a/tex/latex/context/m-ch-de.sty +++ b/tex/latex/context/m-ch-de.sty @@ -1 +1,19 @@ -\input m-ch-de.tex \relax \endinput +\ProvidesPackage{m-ch-de}[2004/07/30 package wrapper for m-ch-de.tex] + +\newif\ifPPCH@PSTRICKS + +\DeclareOption{pstricks}{\PPCH@PSTRICKStrue} +\DeclareOption{pictex}{\PPCH@PSTRICKSfalse} + +\ExecuteOptions{pictex} +\ProcessOptions\relax + +\ifPPCH@PSTRICKS + \RequirePackage{pstricks,pst-plot} +\else + \RequirePackage{m-pictex} +\fi + +\input{m-ch-de.tex} + +\endinput \ No newline at end of file diff --git a/tex/latex/context/m-ch-en.sty b/tex/latex/context/m-ch-en.sty index f22512d05..e93a49867 100644 --- a/tex/latex/context/m-ch-en.sty +++ b/tex/latex/context/m-ch-en.sty @@ -1 +1,19 @@ -\input m-ch-en.tex \relax \endinput +\ProvidesPackage{m-ch-en}[2004/07/30 package wrapper for m-ch-en.tex] + +\newif\ifPPCH@PSTRICKS + +\DeclareOption{pstricks}{\PPCH@PSTRICKStrue} +\DeclareOption{pictex}{\PPCH@PSTRICKSfalse} + +\ExecuteOptions{pictex} +\ProcessOptions\relax + +\ifPPCH@PSTRICKS + \RequirePackage{pstricks,pst-plot} +\else + \RequirePackage{m-pictex} +\fi + +\input{m-ch-en.tex} + +\endinput \ No newline at end of file diff --git a/tex/latex/context/m-ch-nl.sty b/tex/latex/context/m-ch-nl.sty index 29c40be30..6e2b8d43d 100644 --- a/tex/latex/context/m-ch-nl.sty +++ b/tex/latex/context/m-ch-nl.sty @@ -1 +1,19 @@ -\input m-ch-nl.tex \relax \endinput +\ProvidesPackage{m-ch-nl}[2004/07/30 package wrapper for m-ch-nl.tex] + +\newif\ifPPCH@PSTRICKS + +\DeclareOption{pstricks}{\PPCH@PSTRICKStrue} +\DeclareOption{pictex}{\PPCH@PSTRICKSfalse} + +\ExecuteOptions{pictex} +\ProcessOptions\relax + +\ifPPCH@PSTRICKS + \RequirePackage{pstricks,pst-plot} +\else + \RequirePackage{m-pictex} +\fi + +\input{m-ch-nl.tex} + +\endinput \ No newline at end of file diff --git a/tex/latex/context/m-metapo.sty b/tex/latex/context/m-metapo.sty index c1d9f3a9f..2d568df96 100644 --- a/tex/latex/context/m-metapo.sty +++ b/tex/latex/context/m-metapo.sty @@ -1 +1,5 @@ -\input m-metapo.tex \relax \endinput +\ProvidesPackage{m-metapo}[2004/07/30 package wrapper for m-metapo.tex] + +\input{m-metapo.tex} + +\endinput \ No newline at end of file diff --git a/tex/latex/context/m-pictex.sty b/tex/latex/context/m-pictex.sty index be5dd8504..18630f2cc 100644 --- a/tex/latex/context/m-pictex.sty +++ b/tex/latex/context/m-pictex.sty @@ -1 +1,5 @@ -\input m-pictex.tex \relax \endinput +\ProvidesPackage{m-pictex}[2004/07/30 package wrapper for m-pictex.tex] + +\input{m-pictex.tex} + +\endinput \ No newline at end of file -- cgit v1.2.3